mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
reduce duplication and code improvements (#1707)
* reduce code duplication * reduce duplication, fix license headers * simplify code * typings fixes * update tests * minor fixes * markdown fixes * revert changes
This commit is contained in:
parent
b71e1530d1
commit
7a5350a06d
@ -11,6 +11,3 @@ trim_trailing_whitespace = true
|
|||||||
[*.md]
|
[*.md]
|
||||||
max_line_length = off
|
max_line_length = off
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.yml]
|
|
||||||
indent_size = 2
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
"Redistributable",
|
"Redistributable",
|
||||||
"fullscreen",
|
"fullscreen",
|
||||||
"LGPL",
|
"LGPL",
|
||||||
"Browserstack",
|
|
||||||
"mincount",
|
"mincount",
|
||||||
"QNAME",
|
"QNAME",
|
||||||
"PNAME",
|
"PNAME",
|
||||||
|
@ -657,7 +657,7 @@ This external plugin disables the initial `exif:exif` aspect already defined in
|
|||||||
Here is the initial setting from `app.extension.json`:
|
Here is the initial setting from `app.extension.json`:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
...
|
{
|
||||||
"content-metadata-presets": [
|
"content-metadata-presets": [
|
||||||
{
|
{
|
||||||
"id": "app.content.metadata.custom",
|
"id": "app.content.metadata.custom",
|
||||||
@ -689,8 +689,7 @@ Here is the initial setting from `app.extension.json`:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
...
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**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.
|
**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.
|
||||||
|
@ -52,19 +52,15 @@ This registering can be done, using Angular's multi-provider capabilities:
|
|||||||
import { EXTENSION_DATA_LOADERS } from '@alfresco/aca-shared';
|
import { EXTENSION_DATA_LOADERS } from '@alfresco/aca-shared';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [...],
|
|
||||||
declarations: [...],
|
|
||||||
providers: [
|
providers: [
|
||||||
...
|
|
||||||
{
|
{
|
||||||
provide: EXTENSION_DATA_LOADERS,
|
provide: EXTENSION_DATA_LOADERS,
|
||||||
multi: true,
|
multi: true,
|
||||||
useValue: myExtensionLoader
|
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.
|
1. `MyExtensionModule` is the extension's entry module, which needs to be imported by the extensions.module.ts.
|
||||||
|
@ -296,13 +296,11 @@ exposed by the application with a custom one coming with the plugin.
|
|||||||
"create": [
|
"create": [
|
||||||
{
|
{
|
||||||
"id": "app.create.folder",
|
"id": "app.create.folder",
|
||||||
"disabled": true,
|
"disabled": true
|
||||||
...
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plugin1.create.folder",
|
"id": "plugin1.create.folder",
|
||||||
"title": "Create Folder",
|
"title": "Create Folder"
|
||||||
...
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -103,8 +103,6 @@ Update the root `package.json` file and append the following entry to the `scrip
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
...,
|
|
||||||
|
|
||||||
"build:my-extension":
|
"build:my-extension":
|
||||||
"ng build my-extension && cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
|
"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.
|
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.
|
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
|
## 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:
|
In the main application, edit the `src/app/extensions.module.ts` file and append the module declaration as in the next example:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
...
|
|
||||||
import { MyExtensionModule } from 'my-extension';
|
import { MyExtensionModule } from 'my-extension';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
...
|
|
||||||
imports: [
|
imports: [
|
||||||
...,
|
|
||||||
MyExtensionModule
|
MyExtensionModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@ -194,7 +189,6 @@ Finally, update the `src/assets/app.extensions.json` file and add a reference to
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$references": [
|
"$references": [
|
||||||
...,
|
|
||||||
"my-extension.json"
|
"my-extension.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ and use the following snippet to register custom content:
|
|||||||
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ ExtensionsModule ]
|
imports: [ ExtensionsModule ],
|
||||||
declarations: [ MyComponent1, MyLayout ]
|
declarations: [ MyComponent1, MyLayout ]
|
||||||
})
|
})
|
||||||
export class MyExtensionModule {
|
export class MyExtensionModule {
|
||||||
|
@ -91,8 +91,9 @@ Extensions may register a routes that are children of some existing application
|
|||||||
Imagine the situation when application has the following route structure:
|
Imagine the situation when application has the following route structure:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
{
|
export const APP_ROUTES: Routes = [
|
||||||
path: 'files,
|
{
|
||||||
|
path: 'files',
|
||||||
component: FilesComponent,
|
component: FilesComponent,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@ -100,7 +101,8 @@ Imagine the situation when application has the following route structure:
|
|||||||
component: BinComponent,
|
component: BinComponent,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Within the extension, you can declare a route like:
|
Within the extension, you can declare a route like:
|
||||||
@ -113,7 +115,7 @@ Within the extension, you can declare a route like:
|
|||||||
"parentRoute": "files",
|
"parentRoute": "files",
|
||||||
"path": "my-path",
|
"path": "my-path",
|
||||||
"layout": "app.layout.main",
|
"layout": "app.layout.main",
|
||||||
"component": "your.component.id",
|
"component": "your.component.id"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -192,15 +192,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(...) {}
|
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
showMyDialog$ = this.actions$.pipe(
|
showMyDialog$ = this.actions$.pipe(
|
||||||
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
||||||
map(() => {})
|
map(() => {})
|
||||||
);
|
);
|
||||||
|
|
||||||
// ...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -216,10 +212,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(
|
constructor(private dialog: MatDialog) {}
|
||||||
...,
|
|
||||||
private dialog: MatDialog
|
|
||||||
) {}
|
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
showMyDialog$ = this.actions$.pipe(
|
showMyDialog$ = this.actions$.pipe(
|
||||||
@ -228,9 +221,6 @@ export class AppEffects {
|
|||||||
this.dialog.open(MyExtensionDialogComponent)
|
this.dialog.open(MyExtensionDialogComponent)
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -240,8 +230,6 @@ Update the `src/assets/app.extensions.json` file, and insert a new entry to the
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
|
|
||||||
"features": {
|
"features": {
|
||||||
"toolbar": [
|
"toolbar": [
|
||||||
{
|
{
|
||||||
@ -280,8 +268,8 @@ We need to add the custom route with our entry component and its child route for
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...
|
"routes": [
|
||||||
"routes": [{
|
{
|
||||||
"id": "start-process",
|
"id": "start-process",
|
||||||
"path": "start-process",
|
"path": "start-process",
|
||||||
"parentRoute": "",
|
"parentRoute": "",
|
||||||
@ -304,11 +292,11 @@ We need to add the custom route with our entry component and its child route for
|
|||||||
"outlet": "viewer"
|
"outlet": "viewer"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}]
|
}
|
||||||
...
|
]
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
##### Dispatching the right action within our component to open the file preview
|
##### Dispatching the right action within our component to open the file preview
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@ -316,8 +304,6 @@ import { PluginPreviewAction } from '@alfresco/aca-shared/store';
|
|||||||
|
|
||||||
@Component({...})
|
@Component({...})
|
||||||
export class StartProcessComponent {
|
export class StartProcessComponent {
|
||||||
...
|
|
||||||
|
|
||||||
onFilePreview({ nodeId }) {
|
onFilePreview({ nodeId }) {
|
||||||
this.store.dispatch(new PluginPreviewAction('start-process-cloud', nodeId));
|
this.store.dispatch(new PluginPreviewAction('start-process-cloud', nodeId));
|
||||||
}
|
}
|
||||||
|
@ -75,8 +75,8 @@ export interface ViewNodeExtras {
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
// app.routes.ts
|
// app.routes.ts
|
||||||
...
|
export const APP_ROUTES: Routes = [
|
||||||
{
|
{
|
||||||
path: 'custom-path',
|
path: 'custom-path',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@ -94,8 +94,8 @@ export interface ViewNodeExtras {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
...
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
|
@ -20,8 +20,7 @@ The example below demonstrates the most common dynamic format for a development
|
|||||||
|
|
||||||
```json
|
```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
|
```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
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"application": {
|
"application": {
|
||||||
"name": "Alfresco Example Content 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
|
```json
|
||||||
{
|
{
|
||||||
"application": {
|
"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
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"files": {
|
"files": {
|
||||||
"excluded": [
|
"excluded": [
|
||||||
".DS_Store",
|
".DS_Store",
|
||||||
@ -132,8 +128,7 @@ By default, the application ships with the following rules already predefined:
|
|||||||
"thumbs.db",
|
"thumbs.db",
|
||||||
".git"
|
".git"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -145,15 +140,13 @@ You can change the default settings of the pagination that gets applied to all t
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"pagination": {
|
"pagination": {
|
||||||
"supportedPageSizes": [
|
"supportedPageSizes": [
|
||||||
25,
|
25,
|
||||||
50,
|
50,
|
||||||
100
|
100
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@ To change the default language set edit the `app.config.json` file and add or re
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"key": "de",
|
"key": "de",
|
||||||
@ -48,8 +47,7 @@ To change the default language set edit the `app.config.json` file and add or re
|
|||||||
{
|
{
|
||||||
"key": "es",
|
"key": "es",
|
||||||
"label": "Spanish"
|
"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",
|
"CREATE_FOLDER": "Ordner erstellen",
|
||||||
"UPLOAD_FILE": "Datei hochladen",
|
"UPLOAD_FILE": "Datei hochladen",
|
||||||
"UPLOAD_FOLDER": "Ordner 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
|
```json
|
||||||
{
|
{
|
||||||
"APP": {
|
"APP": {
|
||||||
...
|
|
||||||
},
|
},
|
||||||
"CORE": {
|
"CORE": {
|
||||||
"FOLDER_DIALOG": {
|
"FOLDER_DIALOG": {
|
||||||
|
@ -22,12 +22,8 @@ Navigation configuration supports array and object like schema. Defining an obje
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"navigation": {
|
"navigation": {
|
||||||
"main": [
|
"main": [],
|
||||||
...
|
"secondary": []
|
||||||
],
|
|
||||||
"secondary": [
|
|
||||||
...
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -37,9 +33,8 @@ Navigation configuration supports array and object like schema. Defining an obje
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"navigation": [
|
"navigation": [
|
||||||
{ ... },
|
{ },
|
||||||
{ ... },
|
{ }
|
||||||
...
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -61,8 +56,8 @@ 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`
|
To change the `title` and `label` of navigation links edit the values under `BROWSE` entry found at `/src/assets/i18n/en.json`
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"APP" : {
|
{
|
||||||
...
|
"APP": {
|
||||||
"BROWSE": {
|
"BROWSE": {
|
||||||
"PERSONAL": {
|
"PERSONAL": {
|
||||||
"TITLE": "Personal Files",
|
"TITLE": "Personal Files",
|
||||||
@ -70,8 +65,8 @@ To change the `title` and `label` of navigation links edit the values under `BRO
|
|||||||
"LABEL": "Personal Files",
|
"LABEL": "Personal Files",
|
||||||
"TOOLTIP": "View your Personal Files"
|
"TOOLTIP": "View your Personal Files"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
...
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -100,17 +95,12 @@ export class CustomPage {
|
|||||||
Register the component in ```app.module.ts```
|
Register the component in ```app.module.ts```
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
import { CustomPage } from './components/custom-page/custom-page.component';
|
||||||
|
|
||||||
...
|
@NgModule({
|
||||||
import { CustomPage } from './components/custom-page/custom-page.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
...
|
|
||||||
declarations: [
|
declarations: [
|
||||||
...,
|
|
||||||
CustomPage
|
CustomPage
|
||||||
],
|
]
|
||||||
...
|
|
||||||
})
|
})
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -119,7 +109,6 @@ In the `app.config.json` define a link entry which will point to the custom page
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"navigation": [
|
"navigation": [
|
||||||
"main": [ ... ],
|
"main": [ ... ],
|
||||||
"secondary": [ ... ],
|
"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:
|
This can also be declared using ngrx store action:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"navigation": [
|
"navigation": [
|
||||||
"main": [ ... ],
|
"main": [ ... ],
|
||||||
"secondary": [ ... ],
|
"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.
|
Map the `/custom-route` in `app.routes.ts` as a child of `LayoutComponent` definition.
|
||||||
|
|
||||||
```js
|
```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: '',
|
path: '',
|
||||||
component: LayoutComponent,
|
component: LayoutComponent,
|
||||||
children: [
|
children: [
|
||||||
...,
|
|
||||||
{
|
{
|
||||||
path: 'custom-route',
|
path: 'custom-route',
|
||||||
component: CustomPage
|
component: CustomPage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
...,
|
]
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
@ -191,33 +174,32 @@ 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:
|
Navigation definition also supports custom components to be dynamically render. The schema for this is as follows:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"navbar": [
|
{
|
||||||
|
"navbar": [
|
||||||
{
|
{
|
||||||
"id": "app.navbar.primary",
|
"id": "app.navbar.primary",
|
||||||
"items": [
|
"items": [
|
||||||
...
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "custom-component",
|
"id": "custom-component",
|
||||||
"component": "custom-menu-item"
|
"component": "custom-menu-item"
|
||||||
}
|
}
|
||||||
|
|
||||||
...
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Navigation items or group of navigation items can be conditional render based on defined rules.
|
Navigation items or group of navigation items can be conditional render based on defined rules.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"navbar": [
|
{
|
||||||
|
"navbar": [
|
||||||
{
|
{
|
||||||
"id": "custom-group-1",
|
"id": "custom-group-1",
|
||||||
"rules": {
|
"rules": {
|
||||||
"visible": "rule-reference-id"
|
"visible": "rule-reference-id"
|
||||||
},
|
},
|
||||||
"items": [ ... ]
|
"items": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "custom-group-2",
|
"id": "custom-group-2",
|
||||||
@ -226,14 +208,14 @@ Navigation items or group of navigation items can be conditional render based on
|
|||||||
"id": "itemId",
|
"id": "itemId",
|
||||||
"rules": {
|
"rules": {
|
||||||
"visible": "rule-reference-id"
|
"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.
|
For more information about the content of a custom page see [Document List Layout](/features/document-list-layout) section.
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 490.1 105.6" style="enable-background:new 0 0 490.1 105.6;" xml:space="preserve">
|
|
||||||
<style type="text/css">
|
|
||||||
.st0{fill:#F4B960;}
|
|
||||||
.st1{fill:#E66F32;}
|
|
||||||
.st2{fill:#E43C41;}
|
|
||||||
.st3{fill:#BDD041;}
|
|
||||||
.st4{fill:#6DB54C;}
|
|
||||||
.st5{fill:#AEDAE6;}
|
|
||||||
.st6{fill:#56B8DE;}
|
|
||||||
.st7{fill:#00B1D5;}
|
|
||||||
.st8{fill:url(#SVGID_1_);}
|
|
||||||
.st9{fill:#221F1F;}
|
|
||||||
.st10{fill:#FFFFFF;}
|
|
||||||
.st11{fill:#000111;}
|
|
||||||
</style>
|
|
||||||
<title>Browserstack-logo-white</title>
|
|
||||||
<circle class="st0" cx="52.8" cy="52.8" r="52.8"/>
|
|
||||||
<circle class="st1" cx="47.5" cy="47.5" r="47.5"/>
|
|
||||||
<circle class="st2" cx="53.8" cy="41.1" r="41.1"/>
|
|
||||||
<circle class="st3" cx="57.1" cy="44.4" r="37.8"/>
|
|
||||||
<circle class="st4" cx="54.3" cy="47.2" r="35.1"/>
|
|
||||||
<circle class="st5" cx="48.8" cy="41.7" r="29.5"/>
|
|
||||||
<circle class="st6" cx="53.6" cy="36.8" r="24.7"/>
|
|
||||||
<circle class="st7" cx="56.6" cy="39.9" r="21.7"/>
|
|
||||||
<radialGradient id="SVGID_1_" cx="53.45" cy="63.02" r="18.57" gradientTransform="matrix(1 0 0 -1 0 106)" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop offset="0" style="stop-color:#797979"/>
|
|
||||||
<stop offset="1" style="stop-color:#4C4C4C"/>
|
|
||||||
</radialGradient>
|
|
||||||
<circle class="st8" cx="53.5" cy="43" r="18.6"/>
|
|
||||||
<circle class="st9" cx="53.5" cy="43" r="18.6"/>
|
|
||||||
<ellipse transform="matrix(0.4094 -0.9123 0.9123 0.4094 2.8913 76.9251)" class="st10" cx="60.9" cy="36.2" rx="5.7" ry="3.7"/>
|
|
||||||
<path class="st11" d="M122.5,32.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h16.6c9.5,0,13.9,4.4,13.9,11c0.2,3.7-1.8,7.2-5.2,8.8v0.1
|
|
||||||
c3.7,1.5,6.1,5.2,6,9.3c0,8.2-5.6,12.2-15.4,12.2h-16c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1L122.5,32.6L122.5,32.6z M139.6,49.1
|
|
||||||
c3.9,0,6.4-2.2,6.4-5.4s-2.4-5.5-6.4-5.5h-8.9c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1v10.2c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0
|
|
||||||
H139.6L139.6,49.1z M130.6,66.9h9.3c4.3,0,6.8-2.3,6.8-5.8s-2.4-5.7-6.7-5.7h-9.3c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1v10.7
|
|
||||||
C130.3,66.8,130.4,66.9,130.6,66.9C130.6,66.9,130.6,66.9,130.6,66.9L130.6,66.9z"/>
|
|
||||||
<path class="st11" d="M159.9,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V44.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6
|
|
||||||
c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v2.5h0.1c1.5-2.2,4.2-3.8,8.2-3.8c2.4,0,4.8,0.8,6.6,2.4c0.3,0.3,0.4,0.5,0.1,0.8l-3.5,4.1
|
|
||||||
c-0.2,0.3-0.6,0.4-0.9,0.2c0,0,0,0-0.1,0c-1.4-0.9-3-1.4-4.7-1.4c-4.1,0-6,2.7-6,7.4v15.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0
|
|
||||||
H159.9L159.9,73.3z"/>
|
|
||||||
<path class="st11" d="M182.9,65.8c-0.8-2.3-1.1-4.8-1.1-7.2c-0.1-2.5,0.3-4.9,1.1-7.2c1.8-5.1,6.6-8.1,13.1-8.1s11.2,3,13,8.1
|
|
||||||
c0.8,2.3,1.1,4.8,1.1,7.2c0.1,2.5-0.3,4.9-1.1,7.2c-1.8,5.1-6.6,8.1-13,8.1S184.7,71,182.9,65.8z M201.9,64c0.5-1.7,0.8-3.6,0.7-5.4
|
|
||||||
c0.1-1.8-0.1-3.7-0.7-5.4c-0.9-2.5-3.3-4-5.9-3.8c-2.6-0.2-5.1,1.4-6,3.8c-0.5,1.8-0.8,3.6-0.7,5.4c-0.1,1.8,0.1,3.7,0.7,5.4
|
|
||||||
c0.9,2.5,3.4,4,6,3.8C198.6,68,201,66.5,201.9,64L201.9,64z"/>
|
|
||||||
<path class="st11" d="M241.9,73.3c-0.4,0-0.7-0.3-0.8-0.6L235,53.9h-0.1l-6.2,18.7c-0.1,0.4-0.4,0.6-0.8,0.6h-5.4
|
|
||||||
c-0.4,0-0.7-0.3-0.8-0.6l-10-28.1c-0.1-0.2,0-0.5,0.2-0.6c0.1,0,0.2-0.1,0.3,0h6.3c0.4,0,0.8,0.2,0.9,0.6l6.1,19.3h0.1l6-19.3
|
|
||||||
c0.1-0.4,0.5-0.6,0.9-0.6h4.7c0.4,0,0.7,0.2,0.9,0.6l6.4,19.3h0.1l5.8-19.3c0.1-0.4,0.5-0.7,0.9-0.6h6.3c0.2-0.1,0.5,0.1,0.5,0.3
|
|
||||||
c0,0.1,0,0.2,0,0.3l-10,28.1c-0.1,0.4-0.4,0.6-0.8,0.6L241.9,73.3L241.9,73.3z"/>
|
|
||||||
<path class="st11" d="M259.3,69.3c-0.2-0.2-0.3-0.6-0.1-0.8c0,0,0,0,0.1-0.1l3.7-3.6c0.3-0.2,0.7-0.2,0.9,0c2.6,2.1,5.9,3.3,9.3,3.3
|
|
||||||
c3.9,0,5.9-1.5,5.9-3.5c0-1.8-1.1-2.9-5.2-3.2l-3.4-0.3c-6.4-0.6-9.7-3.6-9.7-8.6c0-5.7,4.4-9.2,12.3-9.2c4.2-0.1,8.4,1.2,11.9,3.6
|
|
||||||
c0.3,0.2,0.3,0.5,0.2,0.8c0,0,0,0,0,0.1l-3.2,3.6c-0.2,0.3-0.6,0.3-0.9,0.1c-2.5-1.5-5.4-2.4-8.3-2.4c-3.1,0-4.8,1.3-4.8,3
|
|
||||||
s1.1,2.7,5.2,3.1l3.4,0.3c6.6,0.6,9.8,3.8,9.8,8.6c0,5.8-4.6,9.9-13.3,9.9C268,74,263.2,72.4,259.3,69.3z"/>
|
|
||||||
<path class="st11" d="M291.2,65.8c-0.8-2.3-1.2-4.7-1.1-7.2c-0.1-2.5,0.3-4.9,1-7.2c1.8-5.1,6.6-8.1,12.9-8.1c6.5,0,11.2,3.1,13,8.1
|
|
||||||
c0.7,2.1,1,4.1,1,8.8c0,0.3-0.3,0.6-0.6,0.6c0,0-0.1,0-0.1,0h-19.5c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1c0,0.8,0.2,1.5,0.5,2.2
|
|
||||||
c1,2.9,3.5,4.4,7.1,4.4c2.7,0.1,5.4-0.9,7.4-2.8c0.2-0.3,0.7-0.4,1-0.1c0,0,0,0,0,0l3.9,3.2c0.2,0.1,0.3,0.5,0.2,0.7
|
|
||||||
c0,0.1-0.1,0.1-0.1,0.1c-2.7,2.9-7.2,5-13,5C297.8,73.9,293,70.9,291.2,65.8z M310.4,52.8c-0.9-2.4-3.2-3.8-6.2-3.8
|
|
||||||
s-5.4,1.4-6.2,3.8c-0.3,0.8-0.4,1.6-0.4,2.5c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0h12.4c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1
|
|
||||||
C310.8,54.5,310.6,53.6,310.4,52.8L310.4,52.8z"/>
|
|
||||||
<path class="st11" d="M323.6,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V44.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6
|
|
||||||
c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v2.5h0.1c1.5-2.2,4.2-3.8,8.2-3.8c2.4,0,4.8,0.8,6.6,2.4c0.3,0.3,0.4,0.5,0.1,0.8l-3.5,4.1
|
|
||||||
c-0.2,0.3-0.6,0.4-0.9,0.2c0,0,0,0-0.1,0c-1.4-0.9-3-1.4-4.7-1.4c-4.1,0-6,2.7-6,7.4v15.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0
|
|
||||||
H323.6L323.6,73.3z"/>
|
|
||||||
<path class="st11" d="M346.5,68.5c-0.3-0.2-0.4-0.6-0.2-0.9c0,0,0,0,0,0l4.1-4.4c0.2-0.3,0.6-0.3,0.9-0.1c0,0,0,0,0,0
|
|
||||||
c3.5,2.7,7.7,4.2,12.1,4.4c5.3,0,8.4-2.5,8.4-6c0-3-2-4.9-8.1-5.7l-2.4-0.3c-8.6-1.1-13.5-4.9-13.5-11.8c0-7.5,5.9-12.4,15.1-12.4
|
|
||||||
c5.1-0.1,10.1,1.4,14.5,4.2c0.3,0.1,0.4,0.4,0.2,0.7c0,0.1-0.1,0.1-0.1,0.2l-3.1,4.5c-0.2,0.3-0.6,0.4-0.9,0.2
|
|
||||||
c-3.2-2.1-6.9-3.2-10.7-3.2c-4.5,0-7,2.3-7,5.5c0,2.9,2.2,4.8,8.2,5.6l2.4,0.3c8.6,1.1,13.3,4.9,13.3,12c0,7.3-5.7,12.8-16.8,12.8
|
|
||||||
C356.3,73.9,350,71.5,346.5,68.5z"/>
|
|
||||||
<path class="st11" d="M393.3,73.8c-6.4,0-8.8-2.9-8.8-8.6V49.8c0-0.2-0.1-0.3-0.3-0.4c0,0,0,0-0.1,0H382c-0.3,0-0.6-0.2-0.7-0.5
|
|
||||||
c0,0,0,0,0-0.1v-4.1c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h2.1c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1v-8c0-0.3,0.3-0.6,0.6-0.6
|
|
||||||
c0,0,0,0,0.1,0h6c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v8c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0h4.2c0.3,0,0.6,0.2,0.7,0.5
|
|
||||||
c0,0,0,0,0,0.1v4.1c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0h-4.2c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1V65c0,2.1,0.9,2.7,3,2.7h1.6
|
|
||||||
c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v4.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0L393.3,73.8L393.3,73.8z"/>
|
|
||||||
<path class="st11" d="M421.2,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1v-2.1h0c-1.5,2-4.5,3.4-8.9,3.4c-5.8,0-10.6-2.8-10.6-8.9
|
|
||||||
c0-6.4,4.9-9.3,12.7-9.3h6.4c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1v-1.4c0-3.3-1.7-4.9-7-4.9c-2.6-0.1-5.1,0.6-7.2,2
|
|
||||||
c-0.3,0.2-0.7,0.2-0.9-0.1c0,0,0,0,0-0.1l-2.4-4c-0.2-0.2-0.1-0.6,0.1-0.8c0,0,0,0,0,0c2.6-1.7,6-2.9,11.2-2.9
|
|
||||||
c9.6,0,13.2,3,13.2,10.2v19.1c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0H421.2L421.2,73.3z M420.4,63.4v-2.2c0-0.2-0.1-0.3-0.3-0.4
|
|
||||||
c0,0,0,0-0.1,0h-5.2c-4.7,0-6.8,1.2-6.8,3.9c0,2.4,1.9,3.6,5.5,3.6C417.9,68.4,420.4,66.8,420.4,63.4L420.4,63.4z"/>
|
|
||||||
<path class="st11" d="M433.1,65.8c-0.7-2.3-1.1-4.8-1-7.2c-0.1-2.4,0.3-4.9,1-7.2c1.8-5.2,6.7-8.1,13.1-8.1c4.2-0.2,8.2,1.5,11,4.6
|
|
||||||
c0.2,0.2,0.2,0.6,0,0.8c0,0,0,0-0.1,0.1l-4.1,3.3c-0.3,0.2-0.7,0.2-0.9-0.1c0,0,0,0,0-0.1c-1.5-1.7-3.6-2.6-5.9-2.5
|
|
||||||
c-2.8,0-5,1.3-5.9,3.8c-0.5,1.8-0.8,3.6-0.7,5.4c-0.1,1.8,0.1,3.7,0.7,5.5c0.9,2.5,3.1,3.8,5.9,3.8c2.2,0.1,4.4-0.9,5.9-2.6
|
|
||||||
c0.2-0.3,0.6-0.3,0.9-0.1c0,0,0,0,0,0l4.1,3.3c0.3,0.2,0.3,0.5,0.1,0.8c0,0,0,0-0.1,0.1c-2.9,3-6.9,4.6-11,4.5
|
|
||||||
C439.8,73.9,435,71.1,433.1,65.8z"/>
|
|
||||||
<path class="st11" d="M482.8,73.3c-0.4,0-0.8-0.2-1-0.6l-8-12.3l-4.3,4.6v7.7c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0h-6
|
|
||||||
c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V32.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v23.8
|
|
||||||
l10.8-11.8c0.3-0.4,0.8-0.6,1.2-0.6h6.7c0.2,0,0.4,0.1,0.4,0.3c0,0.1,0,0.3-0.1,0.3l-10.1,10.7L490,72.7c0.1,0.2,0.1,0.4,0,0.5
|
|
||||||
c-0.1,0.1-0.2,0.1-0.3,0.1H482.8L482.8,73.3z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 7.4 KiB |
@ -3,10 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
|
||||||
name="viewport"
|
|
||||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
|
|
||||||
/>
|
|
||||||
<title>Alfresco Content App</title>
|
<title>Alfresco Content App</title>
|
||||||
<link rel="stylesheet" href="https://unpkg.com/docute@3/dist/docute.css" />
|
<link rel="stylesheet" href="https://unpkg.com/docute@3/dist/docute.css" />
|
||||||
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96" />
|
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96" />
|
||||||
@ -16,20 +13,19 @@
|
|||||||
<script src="https://unpkg.com/docute@3/dist/docute.js"></script>
|
<script src="https://unpkg.com/docute@3/dist/docute.js"></script>
|
||||||
<script src="https://unpkg.com/prismjs/components/prism-typescript.js"></script>
|
<script src="https://unpkg.com/prismjs/components/prism-typescript.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var langs = [
|
const langs = [
|
||||||
{ title: 'English', path: '/' },
|
{ title: 'English', path: '/' },
|
||||||
{ title: '日本語', path: '/ja/', matchPath: /^\/ja[\/$]/ }
|
{ title: '日本語', path: '/ja/', matchPath: /^\/ja[\/$]/ }
|
||||||
];
|
];
|
||||||
|
|
||||||
docute.init({
|
docute.init({
|
||||||
url: '.',
|
url: '.',
|
||||||
toc: $route => {
|
toc: ($route) => {
|
||||||
const isJapaneseLang = $route.path.split('/')[1] === 'ja';
|
const isJapaneseLang = $route.path.split('/')[1] === 'ja';
|
||||||
const wasJapaneseLang = $route.from.path.split('/')[1] === 'ja';
|
const wasJapaneseLang = $route.from.path.split('/')[1] === 'ja';
|
||||||
|
|
||||||
if (wasJapaneseLang !== isJapaneseLang) {
|
if (wasJapaneseLang !== isJapaneseLang) {
|
||||||
const isFirstPageLoad =
|
const isFirstPageLoad = $route.from.path === '/' && $route.from.meta.name !== 'home';
|
||||||
$route.from.path === '/' && $route.from.meta.name !== 'home';
|
|
||||||
if (!isFirstPageLoad) {
|
if (!isFirstPageLoad) {
|
||||||
document.location.reload();
|
document.location.reload();
|
||||||
}
|
}
|
||||||
|
@ -649,7 +649,7 @@ export interface ViewerRules {
|
|||||||
`app.extension.json` の初期設定は次のとおりです:
|
`app.extension.json` の初期設定は次のとおりです:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
...
|
{
|
||||||
"content-metadata-presets": [
|
"content-metadata-presets": [
|
||||||
{
|
{
|
||||||
"id": "app.content.metadata.custom",
|
"id": "app.content.metadata.custom",
|
||||||
@ -681,8 +681,7 @@ export interface ViewerRules {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
...
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Tip:** content-metadata プリセットを拡張できるようにするには、 `app.config.json` の設定を `app.extensions.json` ファイルにコピーし、その ID をすべてのアイテムに追加する必要があります。
|
**Tip:** content-metadata プリセットを拡張できるようにするには、 `app.config.json` の設定を `app.extensions.json` ファイルにコピーし、その ID をすべてのアイテムに追加する必要があります。
|
||||||
|
@ -297,13 +297,11 @@ JSON 構造およびネストのレベルに制限はありません。
|
|||||||
"create": [
|
"create": [
|
||||||
{
|
{
|
||||||
"id": "app.create.folder",
|
"id": "app.create.folder",
|
||||||
"disabled": true,
|
"disabled": true
|
||||||
...
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "plugin1.create.folder",
|
"id": "plugin1.create.folder",
|
||||||
"title": "Create Folder",
|
"title": "Create Folder"
|
||||||
...
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -101,8 +101,6 @@ JSON 定義で `my-extension.main.component` 識別子を使用できるよう
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
...,
|
|
||||||
|
|
||||||
"build:my-extension":
|
"build:my-extension":
|
||||||
"ng build my-extension && cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
|
"ng build my-extension && cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
|
||||||
}
|
}
|
||||||
@ -172,13 +170,10 @@ NPM から拡張機能をインストールする場合は、次のルールを
|
|||||||
メインアプリケーションで、`src/app/extensions.module.ts` ファイルを編集し、次の例のようにモジュール宣言を追加します:
|
メインアプリケーションで、`src/app/extensions.module.ts` ファイルを編集し、次の例のようにモジュール宣言を追加します:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
...
|
|
||||||
import { MyExtensionModule } from 'my-extension';
|
import { MyExtensionModule } from 'my-extension';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
...
|
|
||||||
imports: [
|
imports: [
|
||||||
...,
|
|
||||||
MyExtensionModule
|
MyExtensionModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@ -192,7 +187,6 @@ export class AppExtensionsModule {}
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"$references": [
|
"$references": [
|
||||||
...,
|
|
||||||
"my-extension.json"
|
"my-extension.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ nav: ja
|
|||||||
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ ExtensionsModule ]
|
imports: [ ExtensionsModule ],
|
||||||
declarations: [ MyComponent1, MyLayout ]
|
declarations: [ MyComponent1, MyLayout ]
|
||||||
})
|
})
|
||||||
export class MyExtensionModule {
|
export class MyExtensionModule {
|
||||||
|
@ -193,15 +193,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(...) {}
|
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
showMyDialog$ = this.actions$.pipe(
|
showMyDialog$ = this.actions$.pipe(
|
||||||
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
||||||
map(() => {})
|
map(() => {})
|
||||||
);
|
);
|
||||||
|
|
||||||
// ...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -217,10 +213,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(
|
constructor(private dialog: MatDialog) {}
|
||||||
...,
|
|
||||||
private dialog: MatDialog
|
|
||||||
) {}
|
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
showMyDialog$ = this.actions$.pipe(
|
showMyDialog$ = this.actions$.pipe(
|
||||||
@ -229,9 +222,6 @@ export class AppEffects {
|
|||||||
this.dialog.open(MyExtensionDialogComponent)
|
this.dialog.open(MyExtensionDialogComponent)
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -241,8 +231,6 @@ export class AppEffects {
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
|
|
||||||
"features": {
|
"features": {
|
||||||
"toolbar": [
|
"toolbar": [
|
||||||
{
|
{
|
||||||
|
@ -21,8 +21,7 @@ Content Application が起動したら、Alfresco Content Services サーバの
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"ecmHost": "http://{hostname}{:port}",
|
"ecmHost": "http://{hostname}{:port}"
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -41,8 +40,7 @@ ACS リポジトリの `localhost:4200/alfresco` のプロキシサーバです
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"ecmHost": "http://localhost:4200",
|
"ecmHost": "http://localhost:4200"
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -66,7 +64,6 @@ ACS リポジトリの `localhost:4200/alfresco` のプロキシサーバです
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"application": {
|
"application": {
|
||||||
"name": "Alfresco Example Content Application"
|
"name": "Alfresco Example Content Application"
|
||||||
}
|
}
|
||||||
@ -86,7 +83,6 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"application": {
|
"application": {
|
||||||
"logo": "/assets/images/alfresco-logo-white.svg"
|
"logo": "/assets/images/alfresco-logo-white.svg"
|
||||||
}
|
}
|
||||||
@ -99,7 +95,6 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"headerColor": "#ffffff"
|
"headerColor": "#ffffff"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -112,7 +107,6 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"files": {
|
"files": {
|
||||||
"excluded": [
|
"excluded": [
|
||||||
".DS_Store",
|
".DS_Store",
|
||||||
@ -120,8 +114,7 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
|||||||
"thumbs.db",
|
"thumbs.db",
|
||||||
".git"
|
".git"
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -133,15 +126,13 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"pagination": {
|
"pagination": {
|
||||||
"supportedPageSizes": [
|
"supportedPageSizes": [
|
||||||
25,
|
25,
|
||||||
50,
|
50,
|
||||||
100
|
100
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ nav: ja
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"languages": [
|
"languages": [
|
||||||
{
|
{
|
||||||
"key": "de",
|
"key": "de",
|
||||||
@ -49,8 +48,7 @@ nav: ja
|
|||||||
{
|
{
|
||||||
"key": "es",
|
"key": "es",
|
||||||
"label": "スペイン語"
|
"label": "スペイン語"
|
||||||
},
|
}
|
||||||
...
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -76,11 +74,9 @@ nav: ja
|
|||||||
"CREATE_FOLDER": "Ordner erstellen",
|
"CREATE_FOLDER": "Ordner erstellen",
|
||||||
"UPLOAD_FILE": "Datei hochladen",
|
"UPLOAD_FILE": "Datei hochladen",
|
||||||
"UPLOAD_FOLDER": "Ordner hochladen"
|
"UPLOAD_FOLDER": "Ordner hochladen"
|
||||||
},
|
|
||||||
...
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
...
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -110,7 +106,6 @@ ADF リソースの翻訳を提供することもできます。
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"APP": {
|
"APP": {
|
||||||
...
|
|
||||||
},
|
},
|
||||||
"CORE": {
|
"CORE": {
|
||||||
"FOLDER_DIALOG": {
|
"FOLDER_DIALOG": {
|
||||||
|
@ -38,9 +38,8 @@ nav: ja
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"navigation": [
|
"navigation": [
|
||||||
{ ... },
|
{},
|
||||||
{ ... },
|
{}
|
||||||
...
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -62,8 +61,8 @@ nav: ja
|
|||||||
ナビゲーションリンクの `title` と `label` を変更するには、`/src/assets/i18n/en.json` にある `BROWSE` エントリの下の値を編集します
|
ナビゲーションリンクの `title` と `label` を変更するには、`/src/assets/i18n/en.json` にある `BROWSE` エントリの下の値を編集します
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"APP" : {
|
{
|
||||||
...
|
"APP": {
|
||||||
"BROWSE": {
|
"BROWSE": {
|
||||||
"PERSONAL": {
|
"PERSONAL": {
|
||||||
"TITLE": "Personal Files",
|
"TITLE": "Personal Files",
|
||||||
@ -71,8 +70,8 @@ nav: ja
|
|||||||
"LABEL": "Personal Files",
|
"LABEL": "Personal Files",
|
||||||
"TOOLTIP": "View your Personal Files"
|
"TOOLTIP": "View your Personal Files"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
...
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -101,29 +100,22 @@ export class CustomPage {
|
|||||||
コンポーネントを ```app.module.ts``` に登録します
|
コンポーネントを ```app.module.ts``` に登録します
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
import { CustomPage } from './components/custom-page/custom-page.component';
|
||||||
|
|
||||||
...
|
@NgModule({
|
||||||
import { CustomPage } from './components/custom-page/custom-page.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
...
|
|
||||||
declarations: [
|
declarations: [
|
||||||
...,
|
|
||||||
CustomPage
|
CustomPage
|
||||||
],
|
]
|
||||||
...
|
|
||||||
})
|
})
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`app.config.json` で、カスタムページを指すリンクエントリを定義します
|
`app.config.json` で、カスタムページを指すリンクエントリを定義します
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
"navigation": [
|
"navigation": [
|
||||||
"main": [ ... ],
|
"main": [ ],
|
||||||
"secondary": [ ... ],
|
"secondary": [ ],
|
||||||
"custom": [
|
"custom": [
|
||||||
{
|
{
|
||||||
"icon": "work",
|
"icon": "work",
|
||||||
@ -167,21 +159,20 @@ export class CustomPage {
|
|||||||
|
|
||||||
```js
|
```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: '',
|
path: '',
|
||||||
component: LayoutComponent,
|
component: LayoutComponent,
|
||||||
children: [
|
children: [
|
||||||
...,
|
|
||||||
{
|
{
|
||||||
path: 'custom-route',
|
path: 'custom-route',
|
||||||
component: CustomPage
|
component: CustomPage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
...,
|
]
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -192,21 +183,19 @@ export class CustomPage {
|
|||||||
ナビゲーション定義は、動的にレンダリングされるカスタムコンポーネントもサポートします。このスキーマは次のとおりです:
|
ナビゲーション定義は、動的にレンダリングされるカスタムコンポーネントもサポートします。このスキーマは次のとおりです:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"navbar": [
|
{
|
||||||
|
"navbar": [
|
||||||
{
|
{
|
||||||
"id": "app.navbar.primary",
|
"id": "app.navbar.primary",
|
||||||
"items": [
|
"items": [
|
||||||
...
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"id": "custom-component",
|
"id": "custom-component",
|
||||||
"component": "custom-menu-item"
|
"component": "custom-menu-item"
|
||||||
}
|
}
|
||||||
|
|
||||||
...
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
カスタムページのコンテンツの詳細については、[ドキュメントリストのレイアウト](/ja/features/document-list-layout) セクションを参照してください。
|
カスタムページのコンテンツの詳細については、[ドキュメントリストのレイアウト](/ja/features/document-list-layout) セクションを参照してください。
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 490.1 105.6" style="enable-background:new 0 0 490.1 105.6;" xml:space="preserve">
|
|
||||||
<style type="text/css">
|
|
||||||
.st0{fill:#F4B960;}
|
|
||||||
.st1{fill:#E66F32;}
|
|
||||||
.st2{fill:#E43C41;}
|
|
||||||
.st3{fill:#BDD041;}
|
|
||||||
.st4{fill:#6DB54C;}
|
|
||||||
.st5{fill:#AEDAE6;}
|
|
||||||
.st6{fill:#56B8DE;}
|
|
||||||
.st7{fill:#00B1D5;}
|
|
||||||
.st8{fill:url(#SVGID_1_);}
|
|
||||||
.st9{fill:#221F1F;}
|
|
||||||
.st10{fill:#FFFFFF;}
|
|
||||||
.st11{fill:#000111;}
|
|
||||||
</style>
|
|
||||||
<title>Browserstack-logo-white</title>
|
|
||||||
<circle class="st0" cx="52.8" cy="52.8" r="52.8"/>
|
|
||||||
<circle class="st1" cx="47.5" cy="47.5" r="47.5"/>
|
|
||||||
<circle class="st2" cx="53.8" cy="41.1" r="41.1"/>
|
|
||||||
<circle class="st3" cx="57.1" cy="44.4" r="37.8"/>
|
|
||||||
<circle class="st4" cx="54.3" cy="47.2" r="35.1"/>
|
|
||||||
<circle class="st5" cx="48.8" cy="41.7" r="29.5"/>
|
|
||||||
<circle class="st6" cx="53.6" cy="36.8" r="24.7"/>
|
|
||||||
<circle class="st7" cx="56.6" cy="39.9" r="21.7"/>
|
|
||||||
<radialGradient id="SVGID_1_" cx="53.45" cy="63.02" r="18.57" gradientTransform="matrix(1 0 0 -1 0 106)" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop offset="0" style="stop-color:#797979"/>
|
|
||||||
<stop offset="1" style="stop-color:#4C4C4C"/>
|
|
||||||
</radialGradient>
|
|
||||||
<circle class="st8" cx="53.5" cy="43" r="18.6"/>
|
|
||||||
<circle class="st9" cx="53.5" cy="43" r="18.6"/>
|
|
||||||
<ellipse transform="matrix(0.4094 -0.9123 0.9123 0.4094 2.8913 76.9251)" class="st10" cx="60.9" cy="36.2" rx="5.7" ry="3.7"/>
|
|
||||||
<path class="st11" d="M122.5,32.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h16.6c9.5,0,13.9,4.4,13.9,11c0.2,3.7-1.8,7.2-5.2,8.8v0.1
|
|
||||||
c3.7,1.5,6.1,5.2,6,9.3c0,8.2-5.6,12.2-15.4,12.2h-16c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1L122.5,32.6L122.5,32.6z M139.6,49.1
|
|
||||||
c3.9,0,6.4-2.2,6.4-5.4s-2.4-5.5-6.4-5.5h-8.9c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1v10.2c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0
|
|
||||||
H139.6L139.6,49.1z M130.6,66.9h9.3c4.3,0,6.8-2.3,6.8-5.8s-2.4-5.7-6.7-5.7h-9.3c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1v10.7
|
|
||||||
C130.3,66.8,130.4,66.9,130.6,66.9C130.6,66.9,130.6,66.9,130.6,66.9L130.6,66.9z"/>
|
|
||||||
<path class="st11" d="M159.9,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V44.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6
|
|
||||||
c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v2.5h0.1c1.5-2.2,4.2-3.8,8.2-3.8c2.4,0,4.8,0.8,6.6,2.4c0.3,0.3,0.4,0.5,0.1,0.8l-3.5,4.1
|
|
||||||
c-0.2,0.3-0.6,0.4-0.9,0.2c0,0,0,0-0.1,0c-1.4-0.9-3-1.4-4.7-1.4c-4.1,0-6,2.7-6,7.4v15.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0
|
|
||||||
H159.9L159.9,73.3z"/>
|
|
||||||
<path class="st11" d="M182.9,65.8c-0.8-2.3-1.1-4.8-1.1-7.2c-0.1-2.5,0.3-4.9,1.1-7.2c1.8-5.1,6.6-8.1,13.1-8.1s11.2,3,13,8.1
|
|
||||||
c0.8,2.3,1.1,4.8,1.1,7.2c0.1,2.5-0.3,4.9-1.1,7.2c-1.8,5.1-6.6,8.1-13,8.1S184.7,71,182.9,65.8z M201.9,64c0.5-1.7,0.8-3.6,0.7-5.4
|
|
||||||
c0.1-1.8-0.1-3.7-0.7-5.4c-0.9-2.5-3.3-4-5.9-3.8c-2.6-0.2-5.1,1.4-6,3.8c-0.5,1.8-0.8,3.6-0.7,5.4c-0.1,1.8,0.1,3.7,0.7,5.4
|
|
||||||
c0.9,2.5,3.4,4,6,3.8C198.6,68,201,66.5,201.9,64L201.9,64z"/>
|
|
||||||
<path class="st11" d="M241.9,73.3c-0.4,0-0.7-0.3-0.8-0.6L235,53.9h-0.1l-6.2,18.7c-0.1,0.4-0.4,0.6-0.8,0.6h-5.4
|
|
||||||
c-0.4,0-0.7-0.3-0.8-0.6l-10-28.1c-0.1-0.2,0-0.5,0.2-0.6c0.1,0,0.2-0.1,0.3,0h6.3c0.4,0,0.8,0.2,0.9,0.6l6.1,19.3h0.1l6-19.3
|
|
||||||
c0.1-0.4,0.5-0.6,0.9-0.6h4.7c0.4,0,0.7,0.2,0.9,0.6l6.4,19.3h0.1l5.8-19.3c0.1-0.4,0.5-0.7,0.9-0.6h6.3c0.2-0.1,0.5,0.1,0.5,0.3
|
|
||||||
c0,0.1,0,0.2,0,0.3l-10,28.1c-0.1,0.4-0.4,0.6-0.8,0.6L241.9,73.3L241.9,73.3z"/>
|
|
||||||
<path class="st11" d="M259.3,69.3c-0.2-0.2-0.3-0.6-0.1-0.8c0,0,0,0,0.1-0.1l3.7-3.6c0.3-0.2,0.7-0.2,0.9,0c2.6,2.1,5.9,3.3,9.3,3.3
|
|
||||||
c3.9,0,5.9-1.5,5.9-3.5c0-1.8-1.1-2.9-5.2-3.2l-3.4-0.3c-6.4-0.6-9.7-3.6-9.7-8.6c0-5.7,4.4-9.2,12.3-9.2c4.2-0.1,8.4,1.2,11.9,3.6
|
|
||||||
c0.3,0.2,0.3,0.5,0.2,0.8c0,0,0,0,0,0.1l-3.2,3.6c-0.2,0.3-0.6,0.3-0.9,0.1c-2.5-1.5-5.4-2.4-8.3-2.4c-3.1,0-4.8,1.3-4.8,3
|
|
||||||
s1.1,2.7,5.2,3.1l3.4,0.3c6.6,0.6,9.8,3.8,9.8,8.6c0,5.8-4.6,9.9-13.3,9.9C268,74,263.2,72.4,259.3,69.3z"/>
|
|
||||||
<path class="st11" d="M291.2,65.8c-0.8-2.3-1.2-4.7-1.1-7.2c-0.1-2.5,0.3-4.9,1-7.2c1.8-5.1,6.6-8.1,12.9-8.1c6.5,0,11.2,3.1,13,8.1
|
|
||||||
c0.7,2.1,1,4.1,1,8.8c0,0.3-0.3,0.6-0.6,0.6c0,0-0.1,0-0.1,0h-19.5c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1c0,0.8,0.2,1.5,0.5,2.2
|
|
||||||
c1,2.9,3.5,4.4,7.1,4.4c2.7,0.1,5.4-0.9,7.4-2.8c0.2-0.3,0.7-0.4,1-0.1c0,0,0,0,0,0l3.9,3.2c0.2,0.1,0.3,0.5,0.2,0.7
|
|
||||||
c0,0.1-0.1,0.1-0.1,0.1c-2.7,2.9-7.2,5-13,5C297.8,73.9,293,70.9,291.2,65.8z M310.4,52.8c-0.9-2.4-3.2-3.8-6.2-3.8
|
|
||||||
s-5.4,1.4-6.2,3.8c-0.3,0.8-0.4,1.6-0.4,2.5c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0h12.4c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1
|
|
||||||
C310.8,54.5,310.6,53.6,310.4,52.8L310.4,52.8z"/>
|
|
||||||
<path class="st11" d="M323.6,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V44.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6
|
|
||||||
c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v2.5h0.1c1.5-2.2,4.2-3.8,8.2-3.8c2.4,0,4.8,0.8,6.6,2.4c0.3,0.3,0.4,0.5,0.1,0.8l-3.5,4.1
|
|
||||||
c-0.2,0.3-0.6,0.4-0.9,0.2c0,0,0,0-0.1,0c-1.4-0.9-3-1.4-4.7-1.4c-4.1,0-6,2.7-6,7.4v15.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0
|
|
||||||
H323.6L323.6,73.3z"/>
|
|
||||||
<path class="st11" d="M346.5,68.5c-0.3-0.2-0.4-0.6-0.2-0.9c0,0,0,0,0,0l4.1-4.4c0.2-0.3,0.6-0.3,0.9-0.1c0,0,0,0,0,0
|
|
||||||
c3.5,2.7,7.7,4.2,12.1,4.4c5.3,0,8.4-2.5,8.4-6c0-3-2-4.9-8.1-5.7l-2.4-0.3c-8.6-1.1-13.5-4.9-13.5-11.8c0-7.5,5.9-12.4,15.1-12.4
|
|
||||||
c5.1-0.1,10.1,1.4,14.5,4.2c0.3,0.1,0.4,0.4,0.2,0.7c0,0.1-0.1,0.1-0.1,0.2l-3.1,4.5c-0.2,0.3-0.6,0.4-0.9,0.2
|
|
||||||
c-3.2-2.1-6.9-3.2-10.7-3.2c-4.5,0-7,2.3-7,5.5c0,2.9,2.2,4.8,8.2,5.6l2.4,0.3c8.6,1.1,13.3,4.9,13.3,12c0,7.3-5.7,12.8-16.8,12.8
|
|
||||||
C356.3,73.9,350,71.5,346.5,68.5z"/>
|
|
||||||
<path class="st11" d="M393.3,73.8c-6.4,0-8.8-2.9-8.8-8.6V49.8c0-0.2-0.1-0.3-0.3-0.4c0,0,0,0-0.1,0H382c-0.3,0-0.6-0.2-0.7-0.5
|
|
||||||
c0,0,0,0,0-0.1v-4.1c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h2.1c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1v-8c0-0.3,0.3-0.6,0.6-0.6
|
|
||||||
c0,0,0,0,0.1,0h6c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v8c0,0.2,0.1,0.3,0.3,0.4c0,0,0,0,0.1,0h4.2c0.3,0,0.6,0.2,0.7,0.5
|
|
||||||
c0,0,0,0,0,0.1v4.1c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0h-4.2c-0.2,0-0.4,0.1-0.4,0.3c0,0,0,0,0,0.1V65c0,2.1,0.9,2.7,3,2.7h1.6
|
|
||||||
c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v4.9c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0L393.3,73.8L393.3,73.8z"/>
|
|
||||||
<path class="st11" d="M421.2,73.3c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1v-2.1h0c-1.5,2-4.5,3.4-8.9,3.4c-5.8,0-10.6-2.8-10.6-8.9
|
|
||||||
c0-6.4,4.9-9.3,12.7-9.3h6.4c0.2,0,0.4-0.1,0.4-0.3c0,0,0,0,0-0.1v-1.4c0-3.3-1.7-4.9-7-4.9c-2.6-0.1-5.1,0.6-7.2,2
|
|
||||||
c-0.3,0.2-0.7,0.2-0.9-0.1c0,0,0,0,0-0.1l-2.4-4c-0.2-0.2-0.1-0.6,0.1-0.8c0,0,0,0,0,0c2.6-1.7,6-2.9,11.2-2.9
|
|
||||||
c9.6,0,13.2,3,13.2,10.2v19.1c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0H421.2L421.2,73.3z M420.4,63.4v-2.2c0-0.2-0.1-0.3-0.3-0.4
|
|
||||||
c0,0,0,0-0.1,0h-5.2c-4.7,0-6.8,1.2-6.8,3.9c0,2.4,1.9,3.6,5.5,3.6C417.9,68.4,420.4,66.8,420.4,63.4L420.4,63.4z"/>
|
|
||||||
<path class="st11" d="M433.1,65.8c-0.7-2.3-1.1-4.8-1-7.2c-0.1-2.4,0.3-4.9,1-7.2c1.8-5.2,6.7-8.1,13.1-8.1c4.2-0.2,8.2,1.5,11,4.6
|
|
||||||
c0.2,0.2,0.2,0.6,0,0.8c0,0,0,0-0.1,0.1l-4.1,3.3c-0.3,0.2-0.7,0.2-0.9-0.1c0,0,0,0,0-0.1c-1.5-1.7-3.6-2.6-5.9-2.5
|
|
||||||
c-2.8,0-5,1.3-5.9,3.8c-0.5,1.8-0.8,3.6-0.7,5.4c-0.1,1.8,0.1,3.7,0.7,5.5c0.9,2.5,3.1,3.8,5.9,3.8c2.2,0.1,4.4-0.9,5.9-2.6
|
|
||||||
c0.2-0.3,0.6-0.3,0.9-0.1c0,0,0,0,0,0l4.1,3.3c0.3,0.2,0.3,0.5,0.1,0.8c0,0,0,0-0.1,0.1c-2.9,3-6.9,4.6-11,4.5
|
|
||||||
C439.8,73.9,435,71.1,433.1,65.8z"/>
|
|
||||||
<path class="st11" d="M482.8,73.3c-0.4,0-0.8-0.2-1-0.6l-8-12.3l-4.3,4.6v7.7c0,0.3-0.3,0.6-0.6,0.6c0,0,0,0-0.1,0h-6
|
|
||||||
c-0.3,0-0.6-0.2-0.7-0.5c0,0,0,0,0-0.1V32.6c0-0.3,0.3-0.6,0.6-0.6c0,0,0,0,0.1,0h6c0.3,0,0.6,0.2,0.7,0.5c0,0,0,0,0,0.1v23.8
|
|
||||||
l10.8-11.8c0.3-0.4,0.8-0.6,1.2-0.6h6.7c0.2,0,0.4,0.1,0.4,0.3c0,0.1,0,0.3-0.1,0.3l-10.1,10.7L490,72.7c0.1,0.2,0.1,0.4,0,0.5
|
|
||||||
c-0.1,0.1-0.2,0.1-0.3,0.1H482.8L482.8,73.3z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 7.4 KiB |
@ -19,9 +19,7 @@ ng g component dialogs/my-extension-dialog --module=app
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [...],
|
|
||||||
declarations: [
|
declarations: [
|
||||||
...,
|
|
||||||
MyExtensionDialogComponent
|
MyExtensionDialogComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@ -80,15 +78,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(...) {}
|
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
showMyDialog$ = this.actions$.pipe(
|
showMyDialog$ = this.actions$.pipe(
|
||||||
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
||||||
map(() => {})
|
map(() => {})
|
||||||
);
|
);
|
||||||
|
|
||||||
// ...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -104,10 +98,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(
|
constructor(private dialog: MatDialog) {}
|
||||||
...,
|
|
||||||
private dialog: MatDialog
|
|
||||||
) {}
|
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
showMyDialog$ = this.actions$.pipe(
|
showMyDialog$ = this.actions$.pipe(
|
||||||
@ -116,9 +107,6 @@ export class AppEffects {
|
|||||||
this.dialog.open(MyExtensionDialogComponent)
|
this.dialog.open(MyExtensionDialogComponent)
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -128,8 +116,6 @@ export class AppEffects {
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
...,
|
|
||||||
|
|
||||||
"features": {
|
"features": {
|
||||||
"toolbar": [
|
"toolbar": [
|
||||||
{
|
{
|
||||||
|
@ -67,15 +67,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(...) {}
|
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
showMyDialog$ = this.actions$.pipe(
|
showMyDialog$ = this.actions$.pipe(
|
||||||
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
||||||
map(() => {})
|
map(() => {})
|
||||||
);
|
);
|
||||||
|
|
||||||
// ...
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -91,10 +87,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppEffects {
|
export class AppEffects {
|
||||||
constructor(
|
constructor(private dialog: MatDialog) {}
|
||||||
...,
|
|
||||||
private dialog: MatDialog
|
|
||||||
) {}
|
|
||||||
|
|
||||||
@Effect({ dispatch: false })
|
@Effect({ dispatch: false })
|
||||||
showMyDialog$ = this.actions$.pipe(
|
showMyDialog$ = this.actions$.pipe(
|
||||||
@ -103,9 +96,6 @@ export class AppEffects {
|
|||||||
this.dialog.open(MyExtensionDialogComponent)
|
this.dialog.open(MyExtensionDialogComponent)
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -61,6 +61,12 @@ describe('Create folder', () => {
|
|||||||
const { dataTable } = page;
|
const { dataTable } = page;
|
||||||
const adminApiActions = new AdminActions();
|
const adminApiActions = new AdminActions();
|
||||||
|
|
||||||
|
async function openCreateFolderDialog(name: string) {
|
||||||
|
await page.dataTable.doubleClickOnRowByName(name);
|
||||||
|
await page.sidenav.openCreateFolderDialog();
|
||||||
|
await createDialog.waitForDialogToOpen();
|
||||||
|
}
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
beforeAll(async (done) => {
|
||||||
await adminApiActions.createUser({ username });
|
await adminApiActions.createUser({ username });
|
||||||
|
|
||||||
@ -93,9 +99,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C216341] creates new folder with name', async () => {
|
it('[C216341] creates new folder with name', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName(folderName1);
|
await createDialog.enterName(folderName1);
|
||||||
await BrowserActions.click(createDialog.createButton);
|
await BrowserActions.click(createDialog.createButton);
|
||||||
await createDialog.waitForDialogToClose();
|
await createDialog.waitForDialogToClose();
|
||||||
@ -105,9 +109,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C216340] creates new folder with name and description', async (done) => {
|
it('[C216340] creates new folder with name and description', async (done) => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName(folderName2);
|
await createDialog.enterName(folderName2);
|
||||||
await createDialog.enterDescription(folderDescription);
|
await createDialog.enterDescription(folderDescription);
|
||||||
await BrowserActions.click(createDialog.createButton);
|
await BrowserActions.click(createDialog.createButton);
|
||||||
@ -121,9 +123,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C216345] dialog UI elements', async () => {
|
it('[C216345] dialog UI elements', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
|
|
||||||
expect(await createDialog.getTitle()).toMatch('Create new folder');
|
expect(await createDialog.getTitle()).toMatch('Create new folder');
|
||||||
expect(await createDialog.nameInput.isDisplayed()).toBe(true, 'Name input is not displayed');
|
expect(await createDialog.nameInput.isDisplayed()).toBe(true, 'Name input is not displayed');
|
||||||
@ -133,9 +133,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C216346] with empty folder name', async () => {
|
it('[C216346] with empty folder name', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await clearTextWithBackspace(createDialog.nameInput);
|
await clearTextWithBackspace(createDialog.nameInput);
|
||||||
|
|
||||||
expect(await createDialog.isCreateButtonEnabled()).toBe(false, 'Create button is enabled');
|
expect(await createDialog.isCreateButtonEnabled()).toBe(false, 'Create button is enabled');
|
||||||
@ -143,9 +141,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C216348] with folder name ending with a dot "."', async () => {
|
it('[C216348] with folder name ending with a dot "."', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName('folder-name.');
|
await createDialog.enterName('folder-name.');
|
||||||
|
|
||||||
expect(await createDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
|
expect(await createDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
|
||||||
@ -155,9 +151,7 @@ describe('Create folder', () => {
|
|||||||
it('[C216347] with folder name containing special characters', async () => {
|
it('[C216347] with folder name containing special characters', async () => {
|
||||||
const namesWithSpecialChars = ['a*a', 'a"a', 'a<a', 'a>a', `a\\a`, 'a/a', 'a?a', 'a:a', 'a|a'];
|
const namesWithSpecialChars = ['a*a', 'a"a', 'a<a', 'a>a', `a\\a`, 'a/a', 'a?a', 'a:a', 'a|a'];
|
||||||
|
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
|
|
||||||
for (const name of namesWithSpecialChars) {
|
for (const name of namesWithSpecialChars) {
|
||||||
await createDialog.enterName(name);
|
await createDialog.enterName(name);
|
||||||
@ -167,9 +161,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C280406] with folder name containing only spaces', async () => {
|
it('[C280406] with folder name containing only spaces', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName(' ');
|
await createDialog.enterName(' ');
|
||||||
|
|
||||||
expect(await createDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
|
expect(await createDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
|
||||||
@ -177,9 +169,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C216349] cancel folder creation', async () => {
|
it('[C216349] cancel folder creation', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName('test');
|
await createDialog.enterName('test');
|
||||||
await createDialog.enterDescription('test description');
|
await createDialog.enterDescription('test description');
|
||||||
await createDialog.clickCancel();
|
await createDialog.clickCancel();
|
||||||
@ -188,9 +178,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C216350] duplicate folder name', async () => {
|
it('[C216350] duplicate folder name', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName(duplicateFolderName);
|
await createDialog.enterName(duplicateFolderName);
|
||||||
await BrowserActions.click(createDialog.createButton);
|
await BrowserActions.click(createDialog.createButton);
|
||||||
|
|
||||||
@ -199,9 +187,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C216351] trim ending spaces from folder name', async () => {
|
it('[C216351] trim ending spaces from folder name', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(parent);
|
await openCreateFolderDialog(parent);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName(nameWithSpaces);
|
await createDialog.enterName(nameWithSpaces);
|
||||||
await BrowserActions.click(createDialog.createButton);
|
await BrowserActions.click(createDialog.createButton);
|
||||||
await createDialog.waitForDialogToClose();
|
await createDialog.waitForDialogToClose();
|
||||||
@ -225,9 +211,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C280394] creates new folder with name and description', async () => {
|
it('[C280394] creates new folder with name and description', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
await openCreateFolderDialog(siteName);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName(folderSite);
|
await createDialog.enterName(folderSite);
|
||||||
await createDialog.enterDescription(folderDescription);
|
await createDialog.enterDescription(folderDescription);
|
||||||
await BrowserActions.click(createDialog.createButton);
|
await BrowserActions.click(createDialog.createButton);
|
||||||
@ -240,9 +224,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C280403] cancel folder creation', async () => {
|
it('[C280403] cancel folder creation', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
await openCreateFolderDialog(siteName);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName('test');
|
await createDialog.enterName('test');
|
||||||
await createDialog.enterDescription('test description');
|
await createDialog.enterDescription('test description');
|
||||||
await createDialog.clickCancel();
|
await createDialog.clickCancel();
|
||||||
@ -251,9 +233,7 @@ describe('Create folder', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('[C280404] duplicate folder name', async () => {
|
it('[C280404] duplicate folder name', async () => {
|
||||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
await openCreateFolderDialog(siteName);
|
||||||
await page.sidenav.openCreateFolderDialog();
|
|
||||||
await createDialog.waitForDialogToOpen();
|
|
||||||
await createDialog.enterName(duplicateFolderSite);
|
await createDialog.enterName(duplicateFolderSite);
|
||||||
await BrowserActions.click(createDialog.createButton);
|
await BrowserActions.click(createDialog.createButton);
|
||||||
|
|
||||||
|
@ -88,46 +88,44 @@ describe('Breadcrumb', () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
async function verifyBreadcrumb(expectedCount: number, expectedText: string) {
|
||||||
|
expect(await breadcrumb.items.count()).toEqual(expectedCount, 'Breadcrumb has incorrect number of items');
|
||||||
|
expect(await breadcrumb.currentItem.getText()).toBe(expectedText);
|
||||||
|
}
|
||||||
|
|
||||||
it('[C260964] Personal Files breadcrumb main node', async () => {
|
it('[C260964] Personal Files breadcrumb main node', async () => {
|
||||||
await page.clickPersonalFiles();
|
await page.clickPersonalFiles();
|
||||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
await verifyBreadcrumb(1, 'Personal Files');
|
||||||
expect(await breadcrumb.currentItem.getText()).toBe('Personal Files');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260966] My Libraries breadcrumb main node', async () => {
|
it('[C260966] My Libraries breadcrumb main node', async () => {
|
||||||
await page.goToMyLibrariesAndWait();
|
await page.goToMyLibrariesAndWait();
|
||||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
await verifyBreadcrumb(1, 'My Libraries');
|
||||||
expect(await breadcrumb.currentItem.getText()).toBe('My Libraries');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C289891] Favorite Libraries breadcrumb main node', async () => {
|
it('[C289891] Favorite Libraries breadcrumb main node', async () => {
|
||||||
await page.goToFavoriteLibrariesAndWait();
|
await page.goToFavoriteLibrariesAndWait();
|
||||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
await verifyBreadcrumb(1, 'Favorite Libraries');
|
||||||
expect(await breadcrumb.currentItem.getText()).toBe('Favorite Libraries');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260971] Recent Files breadcrumb main node', async () => {
|
it('[C260971] Recent Files breadcrumb main node', async () => {
|
||||||
await page.clickRecentFiles();
|
await page.clickRecentFiles();
|
||||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
await verifyBreadcrumb(1, 'Recent Files');
|
||||||
expect(await breadcrumb.currentItem.getText()).toBe('Recent Files');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260972] Shared Files breadcrumb main node', async () => {
|
it('[C260972] Shared Files breadcrumb main node', async () => {
|
||||||
await page.clickSharedFiles();
|
await page.clickSharedFiles();
|
||||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
await verifyBreadcrumb(1, 'Shared Files');
|
||||||
expect(await breadcrumb.currentItem.getText()).toBe('Shared Files');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260973] Favorites breadcrumb main node', async () => {
|
it('[C260973] Favorites breadcrumb main node', async () => {
|
||||||
await page.clickFavorites();
|
await page.clickFavorites();
|
||||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
await verifyBreadcrumb(1, 'Favorites');
|
||||||
expect(await breadcrumb.currentItem.getText()).toBe('Favorites');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260974] Trash breadcrumb main node', async () => {
|
it('[C260974] Trash breadcrumb main node', async () => {
|
||||||
await page.clickTrash();
|
await page.clickTrash();
|
||||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
await verifyBreadcrumb(1, 'Trash');
|
||||||
expect(await breadcrumb.currentItem.getText()).toBe('Trash');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('[C260965] Personal Files breadcrumb for a folder hierarchy', async () => {
|
it('[C260965] Personal Files breadcrumb for a folder hierarchy', async () => {
|
||||||
|
@ -125,7 +125,7 @@ export class SettingsComponent implements OnInit {
|
|||||||
if (result) {
|
if (result) {
|
||||||
return result === 'true';
|
return result === 'true';
|
||||||
} else {
|
} else {
|
||||||
return param.value ? true : false;
|
return !!param.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,8 +212,7 @@ export function canDownloadSelection(context: RuleContext): boolean {
|
|||||||
* JSON ref: `app.selection.folder`
|
* JSON ref: `app.selection.folder`
|
||||||
*/
|
*/
|
||||||
export function hasFolderSelected(context: RuleContext): boolean {
|
export function hasFolderSelected(context: RuleContext): boolean {
|
||||||
const folder = context.selection.folder;
|
return !!context.selection.folder;
|
||||||
return folder ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -221,8 +220,7 @@ export function hasFolderSelected(context: RuleContext): boolean {
|
|||||||
* JSON ref: `app.selection.library`
|
* JSON ref: `app.selection.library`
|
||||||
*/
|
*/
|
||||||
export function hasLibrarySelected(context: RuleContext): boolean {
|
export function hasLibrarySelected(context: RuleContext): boolean {
|
||||||
const library = context.selection.library;
|
return !!context.selection.library;
|
||||||
return library ? true : false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -256,10 +254,7 @@ export function hasNoLibraryRole(context: RuleContext): boolean {
|
|||||||
* JSON ref: `app.selection.file`
|
* JSON ref: `app.selection.file`
|
||||||
*/
|
*/
|
||||||
export function hasFileSelected(context: RuleContext): boolean {
|
export function hasFileSelected(context: RuleContext): boolean {
|
||||||
if (context && context.selection && context.selection.file) {
|
return !!(context && context.selection && context.selection.file);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,9 +57,6 @@ export class ToolbarButtonComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private hasClickAction(actionRef: ContentActionRef): boolean {
|
private hasClickAction(actionRef: ContentActionRef): boolean {
|
||||||
if (actionRef && actionRef.actions && actionRef.actions.click) {
|
return !!(actionRef && actionRef.actions && actionRef.actions.click);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,10 +53,7 @@ export class ToolbarMenuItemComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private hasClickAction(actionRef: ContentActionRef): boolean {
|
private hasClickAction(actionRef: ContentActionRef): boolean {
|
||||||
if (actionRef && actionRef.actions && actionRef.actions.click) {
|
return !!(actionRef && actionRef.actions && actionRef.actions.click);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trackById(_: number, obj: { id: string }) {
|
trackById(_: number, obj: { id: string }) {
|
||||||
|
@ -47,10 +47,6 @@ export class ToolbarMenuComponent {
|
|||||||
this.matTrigger.closeMenu();
|
this.matTrigger.closeMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasChildren(): boolean {
|
|
||||||
return this.actionRef && this.actionRef.children && this.actionRef.children.length > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
trackById(_: number, obj: { id: string }) {
|
trackById(_: number, obj: { id: string }) {
|
||||||
return obj.id;
|
return obj.id;
|
||||||
}
|
}
|
||||||
|
@ -466,7 +466,7 @@ export class AppExtensionService implements RuleContext {
|
|||||||
|
|
||||||
// todo: move to ADF/RuleService
|
// todo: move to ADF/RuleService
|
||||||
isRuleDefined(ruleId: string): boolean {
|
isRuleDefined(ruleId: string): boolean {
|
||||||
return ruleId && this.getEvaluator(ruleId) ? true : false;
|
return !!(ruleId && this.getEvaluator(ruleId));
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: move to ADF/RuleService
|
// todo: move to ADF/RuleService
|
||||||
|
@ -126,10 +126,6 @@ export class RouterEffects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private isLibraryContent(path: PathInfoEntity): boolean {
|
private isLibraryContent(path: PathInfoEntity): boolean {
|
||||||
if (path && path.elements.length >= 2 && path.elements[1].name === 'Sites') {
|
return path && path.elements.length >= 2 && path.elements[1].name === 'Sites';
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,10 +62,7 @@ export class ContentMetadata extends Component {
|
|||||||
.filter(async (elem) => elem.isDisplayed())
|
.filter(async (elem) => elem.isDisplayed())
|
||||||
.map(async (elem) => {
|
.map(async (elem) => {
|
||||||
if (await elem.isElementPresent(by.css('.mat-checkbox'))) {
|
if (await elem.isElementPresent(by.css('.mat-checkbox'))) {
|
||||||
if (await elem.isElementPresent(by.css('.mat-checkbox-checked'))) {
|
return !!(await elem.isElementPresent(by.css('.mat-checkbox-checked')));
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.getElementValue(elem);
|
return this.getElementValue(elem);
|
||||||
|
@ -30,7 +30,6 @@ import { Utils, isPresentAndEnabled, waitForPresence, waitForStaleness } from '.
|
|||||||
|
|
||||||
export class Menu extends Component {
|
export class Menu extends Component {
|
||||||
items = this.allByCss('.mat-menu-item');
|
items = this.allByCss('.mat-menu-item');
|
||||||
backdrop = this.byCss('.cdk-overlay-backdrop', browser);
|
|
||||||
|
|
||||||
uploadFilesInput = this.byId('app-upload-files', browser);
|
uploadFilesInput = this.byId('app-upload-files', browser);
|
||||||
submenus = browser.element.all(by.css('app-context-menu-item .mat-menu-item'));
|
submenus = browser.element.all(by.css('app-context-menu-item .mat-menu-item'));
|
||||||
@ -45,26 +44,15 @@ export class Menu extends Component {
|
|||||||
cancelEditingAction = this.byCss(`.mat-menu-item[title='Cancel Editing']`);
|
cancelEditingAction = this.byCss(`.mat-menu-item[title='Cancel Editing']`);
|
||||||
cancelJoinAction = this.byCssText('.mat-menu-item', 'Cancel Join');
|
cancelJoinAction = this.byCssText('.mat-menu-item', 'Cancel Join');
|
||||||
copyAction = this.byCssText('.mat-menu-item', 'Copy');
|
copyAction = this.byCssText('.mat-menu-item', 'Copy');
|
||||||
deleteAction = this.byCssText('.mat-menu-item', 'Delete');
|
|
||||||
downloadAction = this.byCssText('.mat-menu-item', 'Download');
|
downloadAction = this.byCssText('.mat-menu-item', 'Download');
|
||||||
editFolderAction = this.byCss(`.mat-menu-item[id$='editFolder']`);
|
editFolderAction = this.byCss(`.mat-menu-item[id$='editFolder']`);
|
||||||
editOfflineAction = this.byCss(`.mat-menu-item[title='Edit Offline']`);
|
editOfflineAction = this.byCss(`.mat-menu-item[title='Edit Offline']`);
|
||||||
favoriteAction = this.byCss(`.mat-menu-item[id$='favorite.add']`);
|
|
||||||
removeFavoriteAction = this.byCss(`.mat-menu-item[id$='favorite.remove']`);
|
|
||||||
toggleFavoriteAction = this.byCssText('.mat-menu-item', 'Favorite');
|
|
||||||
toggleRemoveFavoriteAction = this.byCssText('.mat-menu-item', 'Remove Favorite');
|
|
||||||
joinAction = this.byCssText('.mat-menu-item', 'Join');
|
joinAction = this.byCssText('.mat-menu-item', 'Join');
|
||||||
leaveAction = this.byCssText('.mat-menu-item', 'Leave');
|
leaveAction = this.byCssText('.mat-menu-item', 'Leave');
|
||||||
managePermissionsAction = this.byCssText('.mat-menu-item', 'Permissions');
|
managePermissionsAction = this.byCssText('.mat-menu-item', 'Permissions');
|
||||||
manageVersionsAction = this.byCssText('.mat-menu-item', 'Manage Versions');
|
|
||||||
uploadNewVersionAction = this.byCssText('.mat-menu-item', 'Upload New Version');
|
|
||||||
moveAction = this.byCssText('.mat-menu-item', 'Move');
|
|
||||||
permanentDeleteAction = this.byCssText('.mat-menu-item', 'Permanently Delete');
|
|
||||||
restoreAction = this.byCssText('.mat-menu-item', 'Restore');
|
restoreAction = this.byCssText('.mat-menu-item', 'Restore');
|
||||||
shareAction = this.byCssText('.mat-menu-item', 'Share');
|
shareAction = this.byCssText('.mat-menu-item', 'Share');
|
||||||
shareEditAction = this.byCssText('.mat-menu-item', 'Shared Link Settings');
|
shareEditAction = this.byCssText('.mat-menu-item', 'Shared Link Settings');
|
||||||
viewAction = this.byCssText('.mat-menu-item', 'View');
|
|
||||||
viewDetailsAction = this.byCssText('.mat-menu-item', 'View Details');
|
|
||||||
|
|
||||||
constructor(ancestor?: string) {
|
constructor(ancestor?: string) {
|
||||||
super('.mat-menu-panel', ancestor);
|
super('.mat-menu-panel', ancestor);
|
||||||
|
@ -65,11 +65,11 @@ export class AosEditOnlineService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private isWindows(): boolean {
|
private isWindows(): boolean {
|
||||||
return this.getUserAgent().indexOf('win') !== -1 ? true : false;
|
return this.getUserAgent().indexOf('win') !== -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private isMacOs(): boolean {
|
private isMacOs(): boolean {
|
||||||
return this.getUserAgent().indexOf('mac') !== -1 ? true : false;
|
return this.getUserAgent().indexOf('mac') !== -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private onAlreadyLockedNotification(nodeId: string, lockOwner: string) {
|
private onAlreadyLockedNotification(nodeId: string, lockOwner: string) {
|
||||||
|
@ -1,9 +1,26 @@
|
|||||||
/*
|
/*!
|
||||||
* Copyright 2005-2019 Alfresco Software, Ltd. All rights reserved.
|
* @license
|
||||||
|
* Alfresco Example Content Application
|
||||||
*
|
*
|
||||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* pursuant to a written agreement and any use of this program without such an
|
*
|
||||||
* agreement is prohibited.
|
* This file is part of the Alfresco Example Content Application.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ParamType } from './params';
|
import { ParamType } from './params';
|
||||||
|
@ -1,9 +1,26 @@
|
|||||||
/*
|
/*!
|
||||||
* Copyright 2005-2019 Alfresco Software, Ltd. All rights reserved.
|
* @license
|
||||||
|
* Alfresco Example Content Application
|
||||||
*
|
*
|
||||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* pursuant to a written agreement and any use of this program without such an
|
*
|
||||||
* agreement is prohibited.
|
* This file is part of the Alfresco Example Content Application.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ParamType } from './params';
|
import { ParamType } from './params';
|
||||||
|
@ -1,9 +1,26 @@
|
|||||||
/*
|
/*!
|
||||||
* Copyright 2005-2019 Alfresco Software, Ltd. All rights reserved.
|
* @license
|
||||||
|
* Alfresco Example Content Application
|
||||||
*
|
*
|
||||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* pursuant to a written agreement and any use of this program without such an
|
*
|
||||||
* agreement is prohibited.
|
* This file is part of the Alfresco Example Content Application.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ParamType } from './params';
|
import { ParamType } from './params';
|
||||||
|
@ -1,9 +1,26 @@
|
|||||||
/*
|
/*!
|
||||||
* Copyright 2005-2019 Alfresco Software, Ltd. All rights reserved.
|
* @license
|
||||||
|
* Alfresco Example Content Application
|
||||||
*
|
*
|
||||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* pursuant to a written agreement and any use of this program without such an
|
*
|
||||||
* agreement is prohibited.
|
* This file is part of the Alfresco Example Content Application.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import commander, { program } from 'commander';
|
import commander, { program } from 'commander';
|
||||||
|
@ -1,9 +1,26 @@
|
|||||||
/*
|
/*!
|
||||||
* Copyright 2005-2019 Alfresco Software, Ltd. All rights reserved.
|
* @license
|
||||||
|
* Alfresco Example Content Application
|
||||||
*
|
*
|
||||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* pursuant to a written agreement and any use of this program without such an
|
*
|
||||||
* agreement is prohibited.
|
* This file is part of the Alfresco Example Content Application.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ParamType } from './params';
|
import { ParamType } from './params';
|
||||||
|
@ -1,9 +1,26 @@
|
|||||||
/*
|
/*!
|
||||||
* Copyright 2005-2019 Alfresco Software, Ltd. All rights reserved.
|
* @license
|
||||||
|
* Alfresco Example Content Application
|
||||||
*
|
*
|
||||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* pursuant to a written agreement and any use of this program without such an
|
*
|
||||||
* agreement is prohibited.
|
* This file is part of the Alfresco Example Content Application.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ParamType } from './params';
|
import { ParamType } from './params';
|
||||||
|
@ -1,9 +1,26 @@
|
|||||||
/*
|
/*!
|
||||||
* Copyright 2005-2019 Alfresco Software, Ltd. All rights reserved.
|
* @license
|
||||||
|
* Alfresco Example Content Application
|
||||||
*
|
*
|
||||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||||
* pursuant to a written agreement and any use of this program without such an
|
*
|
||||||
* agreement is prohibited.
|
* This file is part of the Alfresco Example Content Application.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export enum ParamType {
|
export enum ParamType {
|
||||||
|
@ -57,7 +57,7 @@ export default class LiteServeRunner {
|
|||||||
|
|
||||||
run() {
|
run() {
|
||||||
const readerGenerator = this.cliReader.getReader(this.inputParams, this.cliArgs);
|
const readerGenerator = this.cliReader.getReader(this.inputParams, this.cliArgs);
|
||||||
const program: Object = readerGenerator.next().value;
|
readerGenerator.next();
|
||||||
|
|
||||||
const builtApps = this.getAppList().filter((app) => !app.disabled);
|
const builtApps = this.getAppList().filter((app) => !app.disabled);
|
||||||
if (!builtApps.length) {
|
if (!builtApps.length) {
|
||||||
@ -65,7 +65,7 @@ export default class LiteServeRunner {
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const inputInquirer = <Promise<Object>>readerGenerator.next().value;
|
const inputInquirer = readerGenerator.next().value as Promise<Object>;
|
||||||
|
|
||||||
return inputInquirer.then(this.appConfigReplace.bind(this)).then(this.spawnLiteServer.bind(this)).catch(logger.error.bind(logger));
|
return inputInquirer.then(this.appConfigReplace.bind(this)).then(this.spawnLiteServer.bind(this)).catch(logger.error.bind(logger));
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ export default class LiteServeRunner {
|
|||||||
logger.error(data.toString());
|
logger.error(data.toString());
|
||||||
reject();
|
reject();
|
||||||
});
|
});
|
||||||
replace.on('exit', (code) => {
|
replace.on('exit', () => {
|
||||||
spinner.succeed();
|
spinner.succeed();
|
||||||
logger.verbose(green(`Rewrite ${appPath} succeeded!`));
|
logger.verbose(green(`Rewrite ${appPath} succeeded!`));
|
||||||
resolvePromise(inputParams);
|
resolvePromise(inputParams);
|
||||||
|
@ -34,7 +34,7 @@ import { AppStore, ShareNodeAction, getAppSelection } from '@alfresco/aca-shared
|
|||||||
templateUrl: './toggle-shared.component.html'
|
templateUrl: './toggle-shared.component.html'
|
||||||
})
|
})
|
||||||
export class ToggleSharedComponent implements OnInit {
|
export class ToggleSharedComponent implements OnInit {
|
||||||
@Input() data: any;
|
@Input() data: { iconButton?: string };
|
||||||
|
|
||||||
selection$: Observable<SelectionState>;
|
selection$: Observable<SelectionState>;
|
||||||
|
|
||||||
|
@ -46,10 +46,7 @@ export class ContextMenuItemComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private hasClickAction(actionRef: ContentActionRef): boolean {
|
private hasClickAction(actionRef: ContentActionRef): boolean {
|
||||||
if (actionRef && actionRef.actions && actionRef.actions.click) {
|
return !!(actionRef && actionRef.actions && actionRef.actions.click);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trackById(_: number, obj: { id: string }) {
|
trackById(_: number, obj: { id: string }) {
|
||||||
|
@ -1,27 +1,10 @@
|
|||||||
<div [dir]="direction">
|
<div [dir]="direction">
|
||||||
<div
|
<div style="visibility: hidden" [matMenuTriggerFor]="rootMenu"></div>
|
||||||
style="visibility: hidden"
|
|
||||||
[matMenuTriggerFor]="rootMenu"
|
|
||||||
#rootTriggerEl
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<mat-menu
|
<mat-menu #rootMenu="matMenu" class="aca-context-menu" hasBackdrop="false" acaContextMenuOutsideEvent (clickOutside)="onClickOutsideEvent()">
|
||||||
#rootMenu="matMenu"
|
<ng-container *ngFor="let entry of actions; trackBy: trackById" [ngSwitch]="entry.type">
|
||||||
class="aca-context-menu"
|
|
||||||
hasBackdrop="false"
|
|
||||||
acaContextMenuOutsideEvent
|
|
||||||
(clickOutside)="onClickOutsideEvent()"
|
|
||||||
>
|
|
||||||
<ng-container
|
|
||||||
*ngFor="let entry of actions; trackBy: trackById"
|
|
||||||
[ngSwitch]="entry.type"
|
|
||||||
>
|
|
||||||
<ng-container *ngSwitchDefault>
|
<ng-container *ngSwitchDefault>
|
||||||
<button
|
<button mat-menu-item [id]="entry.id" (click)="runAction(entry.actions.click)">
|
||||||
mat-menu-item
|
|
||||||
[id]="entry.id"
|
|
||||||
(click)="runAction(entry.actions.click)"
|
|
||||||
>
|
|
||||||
<adf-icon [value]="entry.icon"></adf-icon>
|
<adf-icon [value]="entry.icon"></adf-icon>
|
||||||
<span>{{ entry.title | translate }}</span>
|
<span>{{ entry.title | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
@ -38,19 +21,14 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<mat-menu #childMenu="matMenu">
|
<mat-menu #childMenu="matMenu">
|
||||||
<ng-container
|
<ng-container *ngFor="let child of entry.children; trackBy: trackById">
|
||||||
*ngFor="let child of entry.children; trackBy: trackById"
|
|
||||||
>
|
|
||||||
<app-context-menu-item [actionRef]="child"></app-context-menu-item>
|
<app-context-menu-item [actionRef]="child"></app-context-menu-item>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngSwitchCase="'custom'">
|
<ng-container *ngSwitchCase="'custom'">
|
||||||
<adf-dynamic-component
|
<adf-dynamic-component [data]="entry.data" [id]="entry.component"></adf-dynamic-component>
|
||||||
[data]="entry.data"
|
|
||||||
[id]="entry.component"
|
|
||||||
></adf-dynamic-component>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
@ -32,6 +32,8 @@ import { AppExtensionService, ContentApiService } from '@alfresco/aca-shared';
|
|||||||
import { NavigateLibraryAction } from '@alfresco/aca-shared/store';
|
import { NavigateLibraryAction } from '@alfresco/aca-shared/store';
|
||||||
import { PageComponent } from '../page.component';
|
import { PageComponent } from '../page.component';
|
||||||
import { UserPreferencesService } from '@alfresco/adf-core';
|
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||||
|
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './favorite-libraries.component.html'
|
templateUrl: './favorite-libraries.component.html'
|
||||||
})
|
})
|
||||||
@ -44,7 +46,7 @@ export class FavoriteLibrariesComponent extends PageComponent implements OnInit
|
|||||||
isLoading = false;
|
isLoading = false;
|
||||||
list: FavoritePaging;
|
list: FavoritePaging;
|
||||||
isSmallScreen = false;
|
isSmallScreen = false;
|
||||||
columns: any[] = [];
|
columns: DocumentListPresetRef[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
content: ContentManagementService,
|
content: ContentManagementService,
|
||||||
|
@ -34,6 +34,7 @@ import { Store } from '@ngrx/store';
|
|||||||
import { debounceTime, map } from 'rxjs/operators';
|
import { debounceTime, map } from 'rxjs/operators';
|
||||||
import { ContentManagementService } from '../../services/content-management.service';
|
import { ContentManagementService } from '../../services/content-management.service';
|
||||||
import { PageComponent } from '../page.component';
|
import { PageComponent } from '../page.component';
|
||||||
|
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './favorites.component.html'
|
templateUrl: './favorites.component.html'
|
||||||
@ -41,7 +42,7 @@ import { PageComponent } from '../page.component';
|
|||||||
export class FavoritesComponent extends PageComponent implements OnInit {
|
export class FavoritesComponent extends PageComponent implements OnInit {
|
||||||
isSmallScreen = false;
|
isSmallScreen = false;
|
||||||
|
|
||||||
columns: any[] = [];
|
columns: DocumentListPresetRef[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
@ -307,7 +307,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
|||||||
navigateToFilter(activeFilters: FilterSearch[]) {
|
navigateToFilter(activeFilters: FilterSearch[]) {
|
||||||
const objectFromMap = {};
|
const objectFromMap = {};
|
||||||
activeFilters.forEach((filter: FilterSearch) => {
|
activeFilters.forEach((filter: FilterSearch) => {
|
||||||
let paramValue = null;
|
let paramValue;
|
||||||
if (filter.value && filter.value.from && filter.value.to) {
|
if (filter.value && filter.value.from && filter.value.to) {
|
||||||
paramValue = `${filter.value.from}||${filter.value.to}`;
|
paramValue = `${filter.value.from}||${filter.value.to}`;
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,6 +31,7 @@ import { Store } from '@ngrx/store';
|
|||||||
import { ContentManagementService } from '../../services/content-management.service';
|
import { ContentManagementService } from '../../services/content-management.service';
|
||||||
import { PageComponent } from '../page.component';
|
import { PageComponent } from '../page.component';
|
||||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||||
|
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './libraries.component.html'
|
templateUrl: './libraries.component.html'
|
||||||
@ -38,7 +39,7 @@ import { AppExtensionService } from '@alfresco/aca-shared';
|
|||||||
export class LibrariesComponent extends PageComponent implements OnInit {
|
export class LibrariesComponent extends PageComponent implements OnInit {
|
||||||
isSmallScreen = false;
|
isSmallScreen = false;
|
||||||
|
|
||||||
columns: any[] = [];
|
columns: DocumentListPresetRef[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
content: ContentManagementService,
|
content: ContentManagementService,
|
||||||
|
@ -34,6 +34,7 @@ import { UploadService } from '@alfresco/adf-core';
|
|||||||
import { debounceTime } from 'rxjs/operators';
|
import { debounceTime } from 'rxjs/operators';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||||
|
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './recent-files.component.html'
|
templateUrl: './recent-files.component.html'
|
||||||
@ -41,7 +42,7 @@ import { AppExtensionService } from '@alfresco/aca-shared';
|
|||||||
export class RecentFilesComponent extends PageComponent implements OnInit {
|
export class RecentFilesComponent extends PageComponent implements OnInit {
|
||||||
isSmallScreen = false;
|
isSmallScreen = false;
|
||||||
|
|
||||||
columns: any[] = [];
|
columns: DocumentListPresetRef[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
store: Store<AppStore>,
|
store: Store<AppStore>,
|
||||||
|
@ -33,6 +33,7 @@ import { ContentManagementService } from '../../../services/content-management.s
|
|||||||
import { PageComponent } from '../../page.component';
|
import { PageComponent } from '../../page.component';
|
||||||
import { SearchLibrariesQueryBuilderService } from './search-libraries-query-builder.service';
|
import { SearchLibrariesQueryBuilderService } from './search-libraries-query-builder.service';
|
||||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||||
|
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'aca-search-results',
|
selector: 'aca-search-results',
|
||||||
@ -46,7 +47,7 @@ export class SearchLibrariesResultsComponent extends PageComponent implements On
|
|||||||
data: NodePaging;
|
data: NodePaging;
|
||||||
totalResults = 0;
|
totalResults = 0;
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
columns: any[] = [];
|
columns: DocumentListPresetRef[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private breakpointObserver: BreakpointObserver,
|
private breakpointObserver: BreakpointObserver,
|
||||||
|
@ -33,6 +33,7 @@ import { UploadService } from '@alfresco/adf-core';
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { MinimalNodeEntity } from '@alfresco/js-api';
|
import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||||
|
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: './shared-files.component.html'
|
templateUrl: './shared-files.component.html'
|
||||||
@ -40,7 +41,7 @@ import { AppExtensionService } from '@alfresco/aca-shared';
|
|||||||
export class SharedFilesComponent extends PageComponent implements OnInit {
|
export class SharedFilesComponent extends PageComponent implements OnInit {
|
||||||
isSmallScreen = false;
|
isSmallScreen = false;
|
||||||
|
|
||||||
columns: any[] = [];
|
columns: DocumentListPresetRef[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
store: Store<any>,
|
store: Store<any>,
|
||||||
|
@ -56,7 +56,10 @@ describe('ExpandMenuComponent', () => {
|
|||||||
it('should render action item', () => {
|
it('should render action item', () => {
|
||||||
component.item = {
|
component.item = {
|
||||||
id: 'test-action-button',
|
id: 'test-action-button',
|
||||||
url: 'dummy'
|
url: 'dummy',
|
||||||
|
title: null,
|
||||||
|
icon: null,
|
||||||
|
route: null
|
||||||
};
|
};
|
||||||
|
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
@ -68,16 +71,23 @@ describe('ExpandMenuComponent', () => {
|
|||||||
it('should render action item with children', () => {
|
it('should render action item with children', () => {
|
||||||
component.item = {
|
component.item = {
|
||||||
id: 'test-action-button',
|
id: 'test-action-button',
|
||||||
|
icon: null,
|
||||||
|
title: null,
|
||||||
|
route: null,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: 'child-1',
|
id: 'child-1',
|
||||||
title: 'child-1',
|
title: 'child-1',
|
||||||
url: 'dummy'
|
url: 'dummy',
|
||||||
|
icon: null,
|
||||||
|
route: null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'child-2',
|
id: 'child-2',
|
||||||
title: 'child-2',
|
title: 'child-2',
|
||||||
url: 'dummy'
|
url: 'dummy',
|
||||||
|
icon: null,
|
||||||
|
route: null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, Input, ViewEncapsulation, ChangeDetectorRef } from '@angular/core';
|
import { Component, OnInit, Input, ViewEncapsulation, ChangeDetectorRef } from '@angular/core';
|
||||||
|
import { NavBarLinkRef } from '@alfresco/adf-extensions';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-expand-menu',
|
selector: 'app-expand-menu',
|
||||||
@ -32,7 +33,8 @@ import { Component, OnInit, Input, ViewEncapsulation, ChangeDetectorRef } from '
|
|||||||
host: { class: 'app-expand-menu' }
|
host: { class: 'app-expand-menu' }
|
||||||
})
|
})
|
||||||
export class ExpandMenuComponent implements OnInit {
|
export class ExpandMenuComponent implements OnInit {
|
||||||
@Input() item;
|
@Input()
|
||||||
|
item: NavBarLinkRef;
|
||||||
|
|
||||||
constructor(private cd: ChangeDetectorRef) {}
|
constructor(private cd: ChangeDetectorRef) {}
|
||||||
|
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-decoration: none;
|
|
||||||
height: 24px;
|
height: 24px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
@ -35,8 +35,7 @@
|
|||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mat-expansion-panel:not(.mat-expanded)
|
.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled='true']):hover {
|
||||||
.mat-expansion-panel-header:not([aria-disabled='true']):hover {
|
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AppStore, getUserProfile } from '@alfresco/aca-shared/store';
|
import { AppStore, getUserProfile } from '@alfresco/aca-shared/store';
|
||||||
import { ProfileState } from '@alfresco/adf-extensions';
|
import { DocumentListPresetRef, ProfileState } from '@alfresco/adf-extensions';
|
||||||
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
@ -40,7 +40,7 @@ export class TrashcanComponent extends PageComponent implements OnInit {
|
|||||||
isSmallScreen = false;
|
isSmallScreen = false;
|
||||||
user$: Observable<ProfileState>;
|
user$: Observable<ProfileState>;
|
||||||
|
|
||||||
columns: any[] = [];
|
columns: DocumentListPresetRef[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
content: ContentManagementService,
|
content: ContentManagementService,
|
||||||
|
@ -820,11 +820,7 @@ export class ContentManagementService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private isLibraryContent(path: PathInfoEntity): boolean {
|
private isLibraryContent(path: PathInfoEntity): boolean {
|
||||||
if (path && path.elements.length >= 2 && path.elements[1].name === 'Sites') {
|
return path && path.elements.length >= 2 && path.elements[1].name === 'Sites';
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private getRestoreMessage(status: DeleteStatus): SnackbarAction {
|
private getRestoreMessage(status: DeleteStatus): SnackbarAction {
|
||||||
|
@ -408,7 +408,7 @@ describe('NodeActionsService', () => {
|
|||||||
spyOn(service, 'getContentNodeSelection').and.callThrough();
|
spyOn(service, 'getContentNodeSelection').and.callThrough();
|
||||||
spyOn(service, 'getEntryParentId').and.returnValue('parent-id');
|
spyOn(service, 'getEntryParentId').and.returnValue('parent-id');
|
||||||
|
|
||||||
let dialogData: any;
|
let dialogData = null;
|
||||||
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||||
dialogData = data;
|
dialogData = data;
|
||||||
return { componentInstance: {} } as MatDialogRef<any>;
|
return { componentInstance: {} } as MatDialogRef<any>;
|
||||||
|
@ -8,7 +8,7 @@ module.exports = {
|
|||||||
secure: false,
|
secure: false,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
// workaround for REPO-2260
|
// workaround for REPO-2260
|
||||||
onProxyRes: function(proxyRes, req, res) {
|
onProxyRes: function (proxyRes) {
|
||||||
const header = proxyRes.headers['www-authenticate'];
|
const header = proxyRes.headers['www-authenticate'];
|
||||||
if (header && header.startsWith('Basic')) {
|
if (header && header.startsWith('Basic')) {
|
||||||
proxyRes.headers['www-authenticate'] = 'x' + header;
|
proxyRes.headers['www-authenticate'] = 'x' + header;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user