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]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
|
@ -8,7 +8,6 @@
|
||||
"Redistributable",
|
||||
"fullscreen",
|
||||
"LGPL",
|
||||
"Browserstack",
|
||||
"mincount",
|
||||
"QNAME",
|
||||
"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`:
|
||||
|
||||
```json
|
||||
...
|
||||
{
|
||||
"content-metadata-presets": [
|
||||
{
|
||||
"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.
|
||||
|
@ -52,19 +52,15 @@ This registering can be done, using Angular's multi-provider capabilities:
|
||||
import { EXTENSION_DATA_LOADERS } from '@alfresco/aca-shared';
|
||||
|
||||
@NgModule({
|
||||
imports: [...],
|
||||
declarations: [...],
|
||||
providers: [
|
||||
...
|
||||
{
|
||||
provide: EXTENSION_DATA_LOADERS,
|
||||
multi: true,
|
||||
useValue: myExtensionLoader
|
||||
},
|
||||
...
|
||||
],
|
||||
}
|
||||
]
|
||||
})
|
||||
export class MyExtensionModule {
|
||||
export class MyExtensionModule {}
|
||||
```
|
||||
|
||||
1. `MyExtensionModule` is the extension's entry module, which needs to be imported by the extensions.module.ts.
|
||||
|
@ -296,13 +296,11 @@ exposed by the application with a custom one coming with the plugin.
|
||||
"create": [
|
||||
{
|
||||
"id": "app.create.folder",
|
||||
"disabled": true,
|
||||
...
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"id": "plugin1.create.folder",
|
||||
"title": "Create Folder",
|
||||
...
|
||||
"title": "Create Folder"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -103,8 +103,6 @@ Update the root `package.json` file and append the following entry to the `scrip
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
...,
|
||||
|
||||
"build:my-extension":
|
||||
"ng build my-extension && cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
|
||||
}
|
||||
@ -113,7 +111,7 @@ Update the root `package.json` file and append the following entry to the `scrip
|
||||
|
||||
You can now use that script to build the library and copy assets to the output folder.
|
||||
|
||||
**Tip:** It is good practice to provide installation instructions for your library in the `README.md` file.
|
||||
**Tip:** It is good practice providing installation instructions for your library in the `README.md` file.
|
||||
Be sure to mention that developers should have a build rule to copy your plugin definition file to the `assets/plugins` folder of the main application.
|
||||
|
||||
## Publishing library to NPM
|
||||
@ -174,13 +172,10 @@ Use the following rule if you are installing an extension from NPM:
|
||||
In the main application, edit the `src/app/extensions.module.ts` file and append the module declaration as in the next example:
|
||||
|
||||
```typescript
|
||||
...
|
||||
import { MyExtensionModule } from 'my-extension';
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
imports: [
|
||||
...,
|
||||
MyExtensionModule
|
||||
]
|
||||
})
|
||||
@ -194,7 +189,6 @@ Finally, update the `src/assets/app.extensions.json` file and add a reference to
|
||||
```json
|
||||
{
|
||||
"$references": [
|
||||
...,
|
||||
"my-extension.json"
|
||||
]
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ and use the following snippet to register custom content:
|
||||
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
||||
|
||||
@NgModule({
|
||||
imports: [ ExtensionsModule ]
|
||||
imports: [ ExtensionsModule ],
|
||||
declarations: [ MyComponent1, MyLayout ]
|
||||
})
|
||||
export class MyExtensionModule {
|
||||
|
@ -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:
|
||||
|
||||
```ts
|
||||
export const APP_ROUTES: Routes = [
|
||||
{
|
||||
path: 'files,
|
||||
path: 'files',
|
||||
component: FilesComponent,
|
||||
children: [
|
||||
{
|
||||
@ -101,6 +102,7 @@ Imagine the situation when application has the following route structure:
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Within the extension, you can declare a route like:
|
||||
@ -113,7 +115,7 @@ Within the extension, you can declare a route like:
|
||||
"parentRoute": "files",
|
||||
"path": "my-path",
|
||||
"layout": "app.layout.main",
|
||||
"component": "your.component.id",
|
||||
"component": "your.component.id"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -192,15 +192,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(...) {}
|
||||
|
||||
@Effect({ dispatch: false })
|
||||
showMyDialog$ = this.actions$.pipe(
|
||||
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
||||
map(() => {})
|
||||
);
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
@ -216,10 +212,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(
|
||||
...,
|
||||
private dialog: MatDialog
|
||||
) {}
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
@Effect({ dispatch: false })
|
||||
showMyDialog$ = this.actions$.pipe(
|
||||
@ -228,9 +221,6 @@ export class AppEffects {
|
||||
this.dialog.open(MyExtensionDialogComponent)
|
||||
})
|
||||
);
|
||||
|
||||
...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@ -240,8 +230,6 @@ Update the `src/assets/app.extensions.json` file, and insert a new entry to the
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
|
||||
"features": {
|
||||
"toolbar": [
|
||||
{
|
||||
@ -280,8 +268,8 @@ We need to add the custom route with our entry component and its child route for
|
||||
|
||||
```json
|
||||
{
|
||||
...
|
||||
"routes": [{
|
||||
"routes": [
|
||||
{
|
||||
"id": "start-process",
|
||||
"path": "start-process",
|
||||
"parentRoute": "",
|
||||
@ -304,11 +292,11 @@ We need to add the custom route with our entry component and its child route for
|
||||
"outlet": "viewer"
|
||||
}
|
||||
]
|
||||
}]
|
||||
...
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
##### Dispatching the right action within our component to open the file preview
|
||||
|
||||
```ts
|
||||
@ -316,8 +304,6 @@ import { PluginPreviewAction } from '@alfresco/aca-shared/store';
|
||||
|
||||
@Component({...})
|
||||
export class StartProcessComponent {
|
||||
...
|
||||
|
||||
onFilePreview({ nodeId }) {
|
||||
this.store.dispatch(new PluginPreviewAction('start-process-cloud', nodeId));
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ export interface ViewNodeExtras {
|
||||
|
||||
```typescript
|
||||
// app.routes.ts
|
||||
...
|
||||
export const APP_ROUTES: Routes = [
|
||||
{
|
||||
path: 'custom-path',
|
||||
children: [
|
||||
@ -95,7 +95,7 @@ export interface ViewNodeExtras {
|
||||
}
|
||||
]
|
||||
}
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
```typescript
|
||||
|
@ -20,8 +20,7 @@ The example below demonstrates the most common dynamic format for a development
|
||||
|
||||
```json
|
||||
{
|
||||
"ecmHost": "http://{hostname}{:port}",
|
||||
...
|
||||
"ecmHost": "http://{hostname}{:port}"
|
||||
}
|
||||
```
|
||||
|
||||
@ -40,8 +39,7 @@ Alternatively, you can provide a static address for the ACS server if necessary:
|
||||
|
||||
```json
|
||||
{
|
||||
"ecmHost": "http://localhost:4200",
|
||||
...
|
||||
"ecmHost": "http://localhost:4200"
|
||||
}
|
||||
```
|
||||
|
||||
@ -65,7 +63,6 @@ The following block allows you to change the name of the application.
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"application": {
|
||||
"name": "Alfresco Example Content Application"
|
||||
}
|
||||
@ -111,7 +108,7 @@ You can change the header background image by specifying the path to the corresp
|
||||
```json
|
||||
{
|
||||
"application": {
|
||||
"headerImagePath": "assets/images/mastHead-bg-shapesPattern.svg",
|
||||
"headerImagePath": "assets/images/mastHead-bg-shapesPattern.svg"
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -124,7 +121,6 @@ By default, the application ships with the following rules already predefined:
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"files": {
|
||||
"excluded": [
|
||||
".DS_Store",
|
||||
@ -132,8 +128,7 @@ By default, the application ships with the following rules already predefined:
|
||||
"thumbs.db",
|
||||
".git"
|
||||
]
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -145,15 +140,13 @@ You can change the default settings of the pagination that gets applied to all t
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"pagination": {
|
||||
"supportedPageSizes": [
|
||||
25,
|
||||
50,
|
||||
100
|
||||
]
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -35,7 +35,6 @@ To change the default language set edit the `app.config.json` file and add or re
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"languages": [
|
||||
{
|
||||
"key": "de",
|
||||
@ -48,8 +47,7 @@ To change the default language set edit the `app.config.json` file and add or re
|
||||
{
|
||||
"key": "es",
|
||||
"label": "Spanish"
|
||||
},
|
||||
...
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
@ -75,11 +73,9 @@ You can copy the content over to your newly created file and replace the English
|
||||
"CREATE_FOLDER": "Ordner erstellen",
|
||||
"UPLOAD_FILE": "Datei hochladen",
|
||||
"UPLOAD_FOLDER": "Ordner hochladen"
|
||||
},
|
||||
...
|
||||
}
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -109,7 +105,6 @@ Modify the `/src/assets/i18n/en.json` file and append the "CORE" section like in
|
||||
```json
|
||||
{
|
||||
"APP": {
|
||||
...
|
||||
},
|
||||
"CORE": {
|
||||
"FOLDER_DIALOG": {
|
||||
|
@ -22,12 +22,8 @@ Navigation configuration supports array and object like schema. Defining an obje
|
||||
```json
|
||||
{
|
||||
"navigation": {
|
||||
"main": [
|
||||
...
|
||||
],
|
||||
"secondary": [
|
||||
...
|
||||
]
|
||||
"main": [],
|
||||
"secondary": []
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -37,9 +33,8 @@ Navigation configuration supports array and object like schema. Defining an obje
|
||||
```json
|
||||
{
|
||||
"navigation": [
|
||||
{ ... },
|
||||
{ ... },
|
||||
...
|
||||
{ },
|
||||
{ }
|
||||
]
|
||||
}
|
||||
```
|
||||
@ -61,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`
|
||||
|
||||
```json
|
||||
{
|
||||
"APP": {
|
||||
...
|
||||
"BROWSE": {
|
||||
"PERSONAL": {
|
||||
"TITLE": "Personal Files",
|
||||
@ -70,8 +65,8 @@ To change the `title` and `label` of navigation links edit the values under `BRO
|
||||
"LABEL": "Personal Files",
|
||||
"TOOLTIP": "View your Personal Files"
|
||||
}
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -100,17 +95,12 @@ export class CustomPage {
|
||||
Register the component in ```app.module.ts```
|
||||
|
||||
```javascript
|
||||
|
||||
...
|
||||
import { CustomPage } from './components/custom-page/custom-page.component';
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
declarations: [
|
||||
...,
|
||||
CustomPage
|
||||
],
|
||||
...
|
||||
]
|
||||
})
|
||||
|
||||
```
|
||||
@ -119,7 +109,6 @@ In the `app.config.json` define a link entry which will point to the custom page
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"navigation": [
|
||||
"main": [ ... ],
|
||||
"secondary": [ ... ],
|
||||
@ -135,14 +124,12 @@ In the `app.config.json` define a link entry which will point to the custom page
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
This can also be declared using ngrx store action:
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"navigation": [
|
||||
"main": [ ... ],
|
||||
"secondary": [ ... ],
|
||||
@ -159,29 +146,25 @@ This can also be declared using ngrx store action:
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Map the `/custom-route` in `app.routes.ts` as a child of `LayoutComponent` definition.
|
||||
|
||||
```js
|
||||
|
||||
import { CustomPage } from './components/custom-page/custom-page.component.ts';
|
||||
|
||||
...
|
||||
export const APP_ROUTES: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: LayoutComponent,
|
||||
children: [
|
||||
...,
|
||||
{
|
||||
path: 'custom-route',
|
||||
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:
|
||||
|
||||
```json
|
||||
{
|
||||
"navbar": [
|
||||
{
|
||||
"id": "app.navbar.primary",
|
||||
"items": [
|
||||
...
|
||||
|
||||
{
|
||||
"id": "custom-component",
|
||||
"component": "custom-menu-item"
|
||||
}
|
||||
|
||||
...
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Navigation items or group of navigation items can be conditional render based on defined rules.
|
||||
|
||||
```json
|
||||
{
|
||||
"navbar": [
|
||||
{
|
||||
"id": "custom-group-1",
|
||||
"rules": {
|
||||
"visible": "rule-reference-id"
|
||||
},
|
||||
"items": [ ... ]
|
||||
"items": []
|
||||
},
|
||||
{
|
||||
"id": "custom-group-2",
|
||||
@ -226,14 +208,14 @@ Navigation items or group of navigation items can be conditional render based on
|
||||
"id": "itemId",
|
||||
"rules": {
|
||||
"visible": "rule-reference-id"
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
For more informations about rules checkout [Rules](../extending/rules.md) section.
|
||||
For more information about rules checkout [Rules](../extending/rules.md) section.
|
||||
|
||||
For more information about the content of a custom page see [Document List Layout](/features/document-list-layout) section.
|
||||
|
@ -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.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</svg>
|
Before Width: | Height: | Size: 7.4 KiB |
@ -3,10 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
|
||||
/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
|
||||
<title>Alfresco Content App</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/docute@3/dist/docute.css" />
|
||||
<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/prismjs/components/prism-typescript.js"></script>
|
||||
<script>
|
||||
var langs = [
|
||||
const langs = [
|
||||
{ title: 'English', path: '/' },
|
||||
{ title: '日本語', path: '/ja/', matchPath: /^\/ja[\/$]/ }
|
||||
];
|
||||
|
||||
docute.init({
|
||||
url: '.',
|
||||
toc: $route => {
|
||||
toc: ($route) => {
|
||||
const isJapaneseLang = $route.path.split('/')[1] === 'ja';
|
||||
const wasJapaneseLang = $route.from.path.split('/')[1] === 'ja';
|
||||
|
||||
if (wasJapaneseLang !== isJapaneseLang) {
|
||||
const isFirstPageLoad =
|
||||
$route.from.path === '/' && $route.from.meta.name !== 'home';
|
||||
const isFirstPageLoad = $route.from.path === '/' && $route.from.meta.name !== 'home';
|
||||
if (!isFirstPageLoad) {
|
||||
document.location.reload();
|
||||
}
|
||||
|
@ -649,7 +649,7 @@ export interface ViewerRules {
|
||||
`app.extension.json` の初期設定は次のとおりです:
|
||||
|
||||
```json
|
||||
...
|
||||
{
|
||||
"content-metadata-presets": [
|
||||
{
|
||||
"id": "app.content.metadata.custom",
|
||||
@ -681,8 +681,7 @@ export interface ViewerRules {
|
||||
]
|
||||
}
|
||||
]
|
||||
...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
**Tip:** content-metadata プリセットを拡張できるようにするには、 `app.config.json` の設定を `app.extensions.json` ファイルにコピーし、その ID をすべてのアイテムに追加する必要があります。
|
||||
|
@ -297,13 +297,11 @@ JSON 構造およびネストのレベルに制限はありません。
|
||||
"create": [
|
||||
{
|
||||
"id": "app.create.folder",
|
||||
"disabled": true,
|
||||
...
|
||||
"disabled": true
|
||||
},
|
||||
{
|
||||
"id": "plugin1.create.folder",
|
||||
"title": "Create Folder",
|
||||
...
|
||||
"title": "Create Folder"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -101,8 +101,6 @@ JSON 定義で `my-extension.main.component` 識別子を使用できるよう
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
...,
|
||||
|
||||
"build:my-extension":
|
||||
"ng build my-extension && cpr projects/my-extension/assets dist/my-extension/assets --deleteFirst"
|
||||
}
|
||||
@ -172,13 +170,10 @@ NPM から拡張機能をインストールする場合は、次のルールを
|
||||
メインアプリケーションで、`src/app/extensions.module.ts` ファイルを編集し、次の例のようにモジュール宣言を追加します:
|
||||
|
||||
```typescript
|
||||
...
|
||||
import { MyExtensionModule } from 'my-extension';
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
imports: [
|
||||
...,
|
||||
MyExtensionModule
|
||||
]
|
||||
})
|
||||
@ -192,7 +187,6 @@ export class AppExtensionsModule {}
|
||||
```json
|
||||
{
|
||||
"$references": [
|
||||
...,
|
||||
"my-extension.json"
|
||||
]
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ nav: ja
|
||||
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
|
||||
|
||||
@NgModule({
|
||||
imports: [ ExtensionsModule ]
|
||||
imports: [ ExtensionsModule ],
|
||||
declarations: [ MyComponent1, MyLayout ]
|
||||
})
|
||||
export class MyExtensionModule {
|
||||
|
@ -193,15 +193,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(...) {}
|
||||
|
||||
@Effect({ dispatch: false })
|
||||
showMyDialog$ = this.actions$.pipe(
|
||||
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
||||
map(() => {})
|
||||
);
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
@ -217,10 +213,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(
|
||||
...,
|
||||
private dialog: MatDialog
|
||||
) {}
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
@Effect({ dispatch: false })
|
||||
showMyDialog$ = this.actions$.pipe(
|
||||
@ -229,9 +222,6 @@ export class AppEffects {
|
||||
this.dialog.open(MyExtensionDialogComponent)
|
||||
})
|
||||
);
|
||||
|
||||
...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@ -241,8 +231,6 @@ export class AppEffects {
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
|
||||
"features": {
|
||||
"toolbar": [
|
||||
{
|
||||
|
@ -21,8 +21,7 @@ Content Application が起動したら、Alfresco Content Services サーバの
|
||||
|
||||
```json
|
||||
{
|
||||
"ecmHost": "http://{hostname}{:port}",
|
||||
...
|
||||
"ecmHost": "http://{hostname}{:port}"
|
||||
}
|
||||
```
|
||||
|
||||
@ -41,8 +40,7 @@ ACS リポジトリの `localhost:4200/alfresco` のプロキシサーバです
|
||||
|
||||
```json
|
||||
{
|
||||
"ecmHost": "http://localhost:4200",
|
||||
...
|
||||
"ecmHost": "http://localhost:4200"
|
||||
}
|
||||
```
|
||||
|
||||
@ -66,7 +64,6 @@ ACS リポジトリの `localhost:4200/alfresco` のプロキシサーバです
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"application": {
|
||||
"name": "Alfresco Example Content Application"
|
||||
}
|
||||
@ -86,7 +83,6 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"application": {
|
||||
"logo": "/assets/images/alfresco-logo-white.svg"
|
||||
}
|
||||
@ -99,7 +95,6 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"headerColor": "#ffffff"
|
||||
}
|
||||
```
|
||||
@ -112,7 +107,6 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"files": {
|
||||
"excluded": [
|
||||
".DS_Store",
|
||||
@ -120,8 +114,7 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
||||
"thumbs.db",
|
||||
".git"
|
||||
]
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -133,15 +126,13 @@ Alfresco コンテンツアプリケーションの左上隅に表示される
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"pagination": {
|
||||
"supportedPageSizes": [
|
||||
25,
|
||||
50,
|
||||
100
|
||||
]
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -36,7 +36,6 @@ nav: ja
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"languages": [
|
||||
{
|
||||
"key": "de",
|
||||
@ -49,8 +48,7 @@ nav: ja
|
||||
{
|
||||
"key": "es",
|
||||
"label": "スペイン語"
|
||||
},
|
||||
...
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
@ -76,11 +74,9 @@ nav: ja
|
||||
"CREATE_FOLDER": "Ordner erstellen",
|
||||
"UPLOAD_FILE": "Datei hochladen",
|
||||
"UPLOAD_FOLDER": "Ordner hochladen"
|
||||
},
|
||||
...
|
||||
}
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -110,7 +106,6 @@ ADF リソースの翻訳を提供することもできます。
|
||||
```json
|
||||
{
|
||||
"APP": {
|
||||
...
|
||||
},
|
||||
"CORE": {
|
||||
"FOLDER_DIALOG": {
|
||||
|
@ -38,9 +38,8 @@ nav: ja
|
||||
```json
|
||||
{
|
||||
"navigation": [
|
||||
{ ... },
|
||||
{ ... },
|
||||
...
|
||||
{},
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
@ -62,8 +61,8 @@ nav: ja
|
||||
ナビゲーションリンクの `title` と `label` を変更するには、`/src/assets/i18n/en.json` にある `BROWSE` エントリの下の値を編集します
|
||||
|
||||
```json
|
||||
{
|
||||
"APP": {
|
||||
...
|
||||
"BROWSE": {
|
||||
"PERSONAL": {
|
||||
"TITLE": "Personal Files",
|
||||
@ -71,8 +70,8 @@ nav: ja
|
||||
"LABEL": "Personal Files",
|
||||
"TOOLTIP": "View your Personal Files"
|
||||
}
|
||||
},
|
||||
...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -101,29 +100,22 @@ export class CustomPage {
|
||||
コンポーネントを ```app.module.ts``` に登録します
|
||||
|
||||
```javascript
|
||||
|
||||
...
|
||||
import { CustomPage } from './components/custom-page/custom-page.component';
|
||||
|
||||
@NgModule({
|
||||
...
|
||||
declarations: [
|
||||
...,
|
||||
CustomPage
|
||||
],
|
||||
...
|
||||
]
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
`app.config.json` で、カスタムページを指すリンクエントリを定義します
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
"navigation": [
|
||||
"main": [ ... ],
|
||||
"secondary": [ ... ],
|
||||
"main": [ ],
|
||||
"secondary": [ ],
|
||||
"custom": [
|
||||
{
|
||||
"icon": "work",
|
||||
@ -169,19 +161,18 @@ export class CustomPage {
|
||||
|
||||
import { CustomPage } from './components/custom-page/custom-page.component.ts';
|
||||
|
||||
...
|
||||
export const APP_ROUTES: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: LayoutComponent,
|
||||
children: [
|
||||
...,
|
||||
{
|
||||
path: 'custom-route',
|
||||
component: CustomPage
|
||||
}
|
||||
]
|
||||
}
|
||||
...,
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
@ -192,21 +183,19 @@ export class CustomPage {
|
||||
ナビゲーション定義は、動的にレンダリングされるカスタムコンポーネントもサポートします。このスキーマは次のとおりです:
|
||||
|
||||
```json
|
||||
{
|
||||
"navbar": [
|
||||
{
|
||||
"id": "app.navbar.primary",
|
||||
"items": [
|
||||
...
|
||||
|
||||
{
|
||||
"id": "custom-component",
|
||||
"component": "custom-menu-item"
|
||||
}
|
||||
|
||||
...
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
カスタムページのコンテンツの詳細については、[ドキュメントリストのレイアウト](/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.3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-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
|
||||
@NgModule({
|
||||
imports: [...],
|
||||
declarations: [
|
||||
...,
|
||||
MyExtensionDialogComponent
|
||||
]
|
||||
})
|
||||
@ -80,15 +78,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(...) {}
|
||||
|
||||
@Effect({ dispatch: false })
|
||||
showMyDialog$ = this.actions$.pipe(
|
||||
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
||||
map(() => {})
|
||||
);
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
@ -104,10 +98,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(
|
||||
...,
|
||||
private dialog: MatDialog
|
||||
) {}
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
@Effect({ dispatch: false })
|
||||
showMyDialog$ = this.actions$.pipe(
|
||||
@ -116,9 +107,6 @@ export class AppEffects {
|
||||
this.dialog.open(MyExtensionDialogComponent)
|
||||
})
|
||||
);
|
||||
|
||||
...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@ -128,8 +116,6 @@ export class AppEffects {
|
||||
|
||||
```json
|
||||
{
|
||||
...,
|
||||
|
||||
"features": {
|
||||
"toolbar": [
|
||||
{
|
||||
|
@ -67,15 +67,11 @@ import { ShowMydDialogAction, SHOW_MY_DIALOG } from '../actions/app.actions';
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(...) {}
|
||||
|
||||
@Effect({ dispatch: false })
|
||||
showMyDialog$ = this.actions$.pipe(
|
||||
ofType<ShowMydDialogAction>(SHOW_MY_DIALOG),
|
||||
map(() => {})
|
||||
);
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
@ -91,10 +87,7 @@ import { MyExtensionDialogComponent } from '../../dialogs/my-extension-dialog/my
|
||||
|
||||
@Injectable()
|
||||
export class AppEffects {
|
||||
constructor(
|
||||
...,
|
||||
private dialog: MatDialog
|
||||
) {}
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
@Effect({ dispatch: false })
|
||||
showMyDialog$ = this.actions$.pipe(
|
||||
@ -103,9 +96,6 @@ export class AppEffects {
|
||||
this.dialog.open(MyExtensionDialogComponent)
|
||||
})
|
||||
);
|
||||
|
||||
...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -61,6 +61,12 @@ describe('Create folder', () => {
|
||||
const { dataTable } = page;
|
||||
const adminApiActions = new AdminActions();
|
||||
|
||||
async function openCreateFolderDialog(name: string) {
|
||||
await page.dataTable.doubleClickOnRowByName(name);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
}
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await adminApiActions.createUser({ username });
|
||||
|
||||
@ -93,9 +99,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C216341] creates new folder with name', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
await createDialog.enterName(folderName1);
|
||||
await BrowserActions.click(createDialog.createButton);
|
||||
await createDialog.waitForDialogToClose();
|
||||
@ -105,9 +109,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C216340] creates new folder with name and description', async (done) => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
await createDialog.enterName(folderName2);
|
||||
await createDialog.enterDescription(folderDescription);
|
||||
await BrowserActions.click(createDialog.createButton);
|
||||
@ -121,9 +123,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C216345] dialog UI elements', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
|
||||
expect(await createDialog.getTitle()).toMatch('Create new folder');
|
||||
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 () => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
await clearTextWithBackspace(createDialog.nameInput);
|
||||
|
||||
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 () => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
await createDialog.enterName('folder-name.');
|
||||
|
||||
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 () => {
|
||||
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 page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
|
||||
for (const name of namesWithSpecialChars) {
|
||||
await createDialog.enterName(name);
|
||||
@ -167,9 +161,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C280406] with folder name containing only spaces', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
await createDialog.enterName(' ');
|
||||
|
||||
expect(await createDialog.isCreateButtonEnabled()).toBe(false, 'Create button is not disabled');
|
||||
@ -177,9 +169,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C216349] cancel folder creation', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
await createDialog.enterName('test');
|
||||
await createDialog.enterDescription('test description');
|
||||
await createDialog.clickCancel();
|
||||
@ -188,9 +178,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C216350] duplicate folder name', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
await createDialog.enterName(duplicateFolderName);
|
||||
await BrowserActions.click(createDialog.createButton);
|
||||
|
||||
@ -199,9 +187,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C216351] trim ending spaces from folder name', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(parent);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(parent);
|
||||
await createDialog.enterName(nameWithSpaces);
|
||||
await BrowserActions.click(createDialog.createButton);
|
||||
await createDialog.waitForDialogToClose();
|
||||
@ -225,9 +211,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C280394] creates new folder with name and description', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(siteName);
|
||||
await createDialog.enterName(folderSite);
|
||||
await createDialog.enterDescription(folderDescription);
|
||||
await BrowserActions.click(createDialog.createButton);
|
||||
@ -240,9 +224,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C280403] cancel folder creation', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(siteName);
|
||||
await createDialog.enterName('test');
|
||||
await createDialog.enterDescription('test description');
|
||||
await createDialog.clickCancel();
|
||||
@ -251,9 +233,7 @@ describe('Create folder', () => {
|
||||
});
|
||||
|
||||
it('[C280404] duplicate folder name', async () => {
|
||||
await page.dataTable.doubleClickOnRowByName(siteName);
|
||||
await page.sidenav.openCreateFolderDialog();
|
||||
await createDialog.waitForDialogToOpen();
|
||||
await openCreateFolderDialog(siteName);
|
||||
await createDialog.enterName(duplicateFolderSite);
|
||||
await BrowserActions.click(createDialog.createButton);
|
||||
|
||||
|
@ -88,46 +88,44 @@ describe('Breadcrumb', () => {
|
||||
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 () => {
|
||||
await page.clickPersonalFiles();
|
||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.currentItem.getText()).toBe('Personal Files');
|
||||
await verifyBreadcrumb(1, 'Personal Files');
|
||||
});
|
||||
|
||||
it('[C260966] My Libraries breadcrumb main node', async () => {
|
||||
await page.goToMyLibrariesAndWait();
|
||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.currentItem.getText()).toBe('My Libraries');
|
||||
await verifyBreadcrumb(1, 'My Libraries');
|
||||
});
|
||||
|
||||
it('[C289891] Favorite Libraries breadcrumb main node', async () => {
|
||||
await page.goToFavoriteLibrariesAndWait();
|
||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.currentItem.getText()).toBe('Favorite Libraries');
|
||||
await verifyBreadcrumb(1, 'Favorite Libraries');
|
||||
});
|
||||
|
||||
it('[C260971] Recent Files breadcrumb main node', async () => {
|
||||
await page.clickRecentFiles();
|
||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.currentItem.getText()).toBe('Recent Files');
|
||||
await verifyBreadcrumb(1, 'Recent Files');
|
||||
});
|
||||
|
||||
it('[C260972] Shared Files breadcrumb main node', async () => {
|
||||
await page.clickSharedFiles();
|
||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.currentItem.getText()).toBe('Shared Files');
|
||||
await verifyBreadcrumb(1, 'Shared Files');
|
||||
});
|
||||
|
||||
it('[C260973] Favorites breadcrumb main node', async () => {
|
||||
await page.clickFavorites();
|
||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.currentItem.getText()).toBe('Favorites');
|
||||
await verifyBreadcrumb(1, 'Favorites');
|
||||
});
|
||||
|
||||
it('[C260974] Trash breadcrumb main node', async () => {
|
||||
await page.clickTrash();
|
||||
expect(await breadcrumb.items.count()).toEqual(1, 'Breadcrumb has incorrect number of items');
|
||||
expect(await breadcrumb.currentItem.getText()).toBe('Trash');
|
||||
await verifyBreadcrumb(1, 'Trash');
|
||||
});
|
||||
|
||||
it('[C260965] Personal Files breadcrumb for a folder hierarchy', async () => {
|
||||
|
@ -125,7 +125,7 @@ export class SettingsComponent implements OnInit {
|
||||
if (result) {
|
||||
return result === 'true';
|
||||
} else {
|
||||
return param.value ? true : false;
|
||||
return !!param.value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,8 +212,7 @@ export function canDownloadSelection(context: RuleContext): boolean {
|
||||
* JSON ref: `app.selection.folder`
|
||||
*/
|
||||
export function hasFolderSelected(context: RuleContext): boolean {
|
||||
const folder = context.selection.folder;
|
||||
return folder ? true : false;
|
||||
return !!context.selection.folder;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -221,8 +220,7 @@ export function hasFolderSelected(context: RuleContext): boolean {
|
||||
* JSON ref: `app.selection.library`
|
||||
*/
|
||||
export function hasLibrarySelected(context: RuleContext): boolean {
|
||||
const library = context.selection.library;
|
||||
return library ? true : false;
|
||||
return !!context.selection.library;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -256,10 +254,7 @@ export function hasNoLibraryRole(context: RuleContext): boolean {
|
||||
* JSON ref: `app.selection.file`
|
||||
*/
|
||||
export function hasFileSelected(context: RuleContext): boolean {
|
||||
if (context && context.selection && context.selection.file) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return !!(context && context.selection && context.selection.file);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,9 +57,6 @@ export class ToolbarButtonComponent {
|
||||
}
|
||||
|
||||
private hasClickAction(actionRef: ContentActionRef): boolean {
|
||||
if (actionRef && actionRef.actions && actionRef.actions.click) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return !!(actionRef && actionRef.actions && actionRef.actions.click);
|
||||
}
|
||||
}
|
||||
|
@ -53,10 +53,7 @@ export class ToolbarMenuItemComponent {
|
||||
}
|
||||
|
||||
private hasClickAction(actionRef: ContentActionRef): boolean {
|
||||
if (actionRef && actionRef.actions && actionRef.actions.click) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return !!(actionRef && actionRef.actions && actionRef.actions.click);
|
||||
}
|
||||
|
||||
trackById(_: number, obj: { id: string }) {
|
||||
|
@ -47,10 +47,6 @@ export class ToolbarMenuComponent {
|
||||
this.matTrigger.closeMenu();
|
||||
}
|
||||
|
||||
get hasChildren(): boolean {
|
||||
return this.actionRef && this.actionRef.children && this.actionRef.children.length > 0;
|
||||
}
|
||||
|
||||
trackById(_: number, obj: { id: string }) {
|
||||
return obj.id;
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ export class AppExtensionService implements RuleContext {
|
||||
|
||||
// todo: move to ADF/RuleService
|
||||
isRuleDefined(ruleId: string): boolean {
|
||||
return ruleId && this.getEvaluator(ruleId) ? true : false;
|
||||
return !!(ruleId && this.getEvaluator(ruleId));
|
||||
}
|
||||
|
||||
// todo: move to ADF/RuleService
|
||||
|
@ -126,10 +126,6 @@ export class RouterEffects {
|
||||
}
|
||||
|
||||
private isLibraryContent(path: PathInfoEntity): boolean {
|
||||
if (path && path.elements.length >= 2 && path.elements[1].name === 'Sites') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return path && path.elements.length >= 2 && path.elements[1].name === 'Sites';
|
||||
}
|
||||
}
|
||||
|
@ -62,10 +62,7 @@ export class ContentMetadata extends Component {
|
||||
.filter(async (elem) => elem.isDisplayed())
|
||||
.map(async (elem) => {
|
||||
if (await elem.isElementPresent(by.css('.mat-checkbox'))) {
|
||||
if (await elem.isElementPresent(by.css('.mat-checkbox-checked'))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return !!(await elem.isElementPresent(by.css('.mat-checkbox-checked')));
|
||||
}
|
||||
|
||||
return this.getElementValue(elem);
|
||||
|
@ -30,7 +30,6 @@ import { Utils, isPresentAndEnabled, waitForPresence, waitForStaleness } from '.
|
||||
|
||||
export class Menu extends Component {
|
||||
items = this.allByCss('.mat-menu-item');
|
||||
backdrop = this.byCss('.cdk-overlay-backdrop', browser);
|
||||
|
||||
uploadFilesInput = this.byId('app-upload-files', browser);
|
||||
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']`);
|
||||
cancelJoinAction = this.byCssText('.mat-menu-item', 'Cancel Join');
|
||||
copyAction = this.byCssText('.mat-menu-item', 'Copy');
|
||||
deleteAction = this.byCssText('.mat-menu-item', 'Delete');
|
||||
downloadAction = this.byCssText('.mat-menu-item', 'Download');
|
||||
editFolderAction = this.byCss(`.mat-menu-item[id$='editFolder']`);
|
||||
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');
|
||||
leaveAction = this.byCssText('.mat-menu-item', 'Leave');
|
||||
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');
|
||||
shareAction = this.byCssText('.mat-menu-item', 'Share');
|
||||
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) {
|
||||
super('.mat-menu-panel', ancestor);
|
||||
|
@ -65,11 +65,11 @@ export class AosEditOnlineService {
|
||||
}
|
||||
|
||||
private isWindows(): boolean {
|
||||
return this.getUserAgent().indexOf('win') !== -1 ? true : false;
|
||||
return this.getUserAgent().indexOf('win') !== -1;
|
||||
}
|
||||
|
||||
private isMacOs(): boolean {
|
||||
return this.getUserAgent().indexOf('mac') !== -1 ? true : false;
|
||||
return this.getUserAgent().indexOf('mac') !== -1;
|
||||
}
|
||||
|
||||
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.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* 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';
|
||||
|
@ -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.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* 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';
|
||||
|
@ -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.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* 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';
|
||||
|
@ -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.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* 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';
|
||||
|
@ -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.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* 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';
|
||||
|
@ -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.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* 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';
|
||||
|
@ -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.
|
||||
* pursuant to a written agreement and any use of this program without such an
|
||||
* agreement is prohibited.
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
*
|
||||
* 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 {
|
||||
|
@ -57,7 +57,7 @@ export default class LiteServeRunner {
|
||||
|
||||
run() {
|
||||
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);
|
||||
if (!builtApps.length) {
|
||||
@ -65,7 +65,7 @@ export default class LiteServeRunner {
|
||||
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));
|
||||
}
|
||||
@ -92,7 +92,7 @@ export default class LiteServeRunner {
|
||||
logger.error(data.toString());
|
||||
reject();
|
||||
});
|
||||
replace.on('exit', (code) => {
|
||||
replace.on('exit', () => {
|
||||
spinner.succeed();
|
||||
logger.verbose(green(`Rewrite ${appPath} succeeded!`));
|
||||
resolvePromise(inputParams);
|
||||
|
@ -34,7 +34,7 @@ import { AppStore, ShareNodeAction, getAppSelection } from '@alfresco/aca-shared
|
||||
templateUrl: './toggle-shared.component.html'
|
||||
})
|
||||
export class ToggleSharedComponent implements OnInit {
|
||||
@Input() data: any;
|
||||
@Input() data: { iconButton?: string };
|
||||
|
||||
selection$: Observable<SelectionState>;
|
||||
|
||||
|
@ -46,10 +46,7 @@ export class ContextMenuItemComponent {
|
||||
}
|
||||
|
||||
private hasClickAction(actionRef: ContentActionRef): boolean {
|
||||
if (actionRef && actionRef.actions && actionRef.actions.click) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return !!(actionRef && actionRef.actions && actionRef.actions.click);
|
||||
}
|
||||
|
||||
trackById(_: number, obj: { id: string }) {
|
||||
|
@ -1,27 +1,10 @@
|
||||
<div [dir]="direction">
|
||||
<div
|
||||
style="visibility: hidden"
|
||||
[matMenuTriggerFor]="rootMenu"
|
||||
#rootTriggerEl
|
||||
></div>
|
||||
<div style="visibility: hidden" [matMenuTriggerFor]="rootMenu"></div>
|
||||
|
||||
<mat-menu
|
||||
#rootMenu="matMenu"
|
||||
class="aca-context-menu"
|
||||
hasBackdrop="false"
|
||||
acaContextMenuOutsideEvent
|
||||
(clickOutside)="onClickOutsideEvent()"
|
||||
>
|
||||
<ng-container
|
||||
*ngFor="let entry of actions; trackBy: trackById"
|
||||
[ngSwitch]="entry.type"
|
||||
>
|
||||
<mat-menu #rootMenu="matMenu" class="aca-context-menu" hasBackdrop="false" acaContextMenuOutsideEvent (clickOutside)="onClickOutsideEvent()">
|
||||
<ng-container *ngFor="let entry of actions; trackBy: trackById" [ngSwitch]="entry.type">
|
||||
<ng-container *ngSwitchDefault>
|
||||
<button
|
||||
mat-menu-item
|
||||
[id]="entry.id"
|
||||
(click)="runAction(entry.actions.click)"
|
||||
>
|
||||
<button mat-menu-item [id]="entry.id" (click)="runAction(entry.actions.click)">
|
||||
<adf-icon [value]="entry.icon"></adf-icon>
|
||||
<span>{{ entry.title | translate }}</span>
|
||||
</button>
|
||||
@ -38,19 +21,14 @@
|
||||
</button>
|
||||
|
||||
<mat-menu #childMenu="matMenu">
|
||||
<ng-container
|
||||
*ngFor="let child of entry.children; trackBy: trackById"
|
||||
>
|
||||
<ng-container *ngFor="let child of entry.children; trackBy: trackById">
|
||||
<app-context-menu-item [actionRef]="child"></app-context-menu-item>
|
||||
</ng-container>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngSwitchCase="'custom'">
|
||||
<adf-dynamic-component
|
||||
[data]="entry.data"
|
||||
[id]="entry.component"
|
||||
></adf-dynamic-component>
|
||||
<adf-dynamic-component [data]="entry.data" [id]="entry.component"></adf-dynamic-component>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</mat-menu>
|
||||
|
@ -32,6 +32,8 @@ import { AppExtensionService, ContentApiService } from '@alfresco/aca-shared';
|
||||
import { NavigateLibraryAction } from '@alfresco/aca-shared/store';
|
||||
import { PageComponent } from '../page.component';
|
||||
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
templateUrl: './favorite-libraries.component.html'
|
||||
})
|
||||
@ -44,7 +46,7 @@ export class FavoriteLibrariesComponent extends PageComponent implements OnInit
|
||||
isLoading = false;
|
||||
list: FavoritePaging;
|
||||
isSmallScreen = false;
|
||||
columns: any[] = [];
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(
|
||||
content: ContentManagementService,
|
||||
|
@ -34,6 +34,7 @@ import { Store } from '@ngrx/store';
|
||||
import { debounceTime, map } from 'rxjs/operators';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { PageComponent } from '../page.component';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
templateUrl: './favorites.component.html'
|
||||
@ -41,7 +42,7 @@ import { PageComponent } from '../page.component';
|
||||
export class FavoritesComponent extends PageComponent implements OnInit {
|
||||
isSmallScreen = false;
|
||||
|
||||
columns: any[] = [];
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
|
@ -307,7 +307,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
|
||||
navigateToFilter(activeFilters: FilterSearch[]) {
|
||||
const objectFromMap = {};
|
||||
activeFilters.forEach((filter: FilterSearch) => {
|
||||
let paramValue = null;
|
||||
let paramValue;
|
||||
if (filter.value && filter.value.from && filter.value.to) {
|
||||
paramValue = `${filter.value.from}||${filter.value.to}`;
|
||||
} else {
|
||||
|
@ -31,6 +31,7 @@ import { Store } from '@ngrx/store';
|
||||
import { ContentManagementService } from '../../services/content-management.service';
|
||||
import { PageComponent } from '../page.component';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
templateUrl: './libraries.component.html'
|
||||
@ -38,7 +39,7 @@ import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
export class LibrariesComponent extends PageComponent implements OnInit {
|
||||
isSmallScreen = false;
|
||||
|
||||
columns: any[] = [];
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(
|
||||
content: ContentManagementService,
|
||||
|
@ -34,6 +34,7 @@ import { UploadService } from '@alfresco/adf-core';
|
||||
import { debounceTime } from 'rxjs/operators';
|
||||
import { Router } from '@angular/router';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
templateUrl: './recent-files.component.html'
|
||||
@ -41,7 +42,7 @@ import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
export class RecentFilesComponent extends PageComponent implements OnInit {
|
||||
isSmallScreen = false;
|
||||
|
||||
columns: any[] = [];
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(
|
||||
store: Store<AppStore>,
|
||||
|
@ -33,6 +33,7 @@ import { ContentManagementService } from '../../../services/content-management.s
|
||||
import { PageComponent } from '../../page.component';
|
||||
import { SearchLibrariesQueryBuilderService } from './search-libraries-query-builder.service';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
selector: 'aca-search-results',
|
||||
@ -46,7 +47,7 @@ export class SearchLibrariesResultsComponent extends PageComponent implements On
|
||||
data: NodePaging;
|
||||
totalResults = 0;
|
||||
isLoading = false;
|
||||
columns: any[] = [];
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(
|
||||
private breakpointObserver: BreakpointObserver,
|
||||
|
@ -33,6 +33,7 @@ import { UploadService } from '@alfresco/adf-core';
|
||||
import { Router } from '@angular/router';
|
||||
import { MinimalNodeEntity } from '@alfresco/js-api';
|
||||
import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
import { DocumentListPresetRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
templateUrl: './shared-files.component.html'
|
||||
@ -40,7 +41,7 @@ import { AppExtensionService } from '@alfresco/aca-shared';
|
||||
export class SharedFilesComponent extends PageComponent implements OnInit {
|
||||
isSmallScreen = false;
|
||||
|
||||
columns: any[] = [];
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(
|
||||
store: Store<any>,
|
||||
|
@ -56,7 +56,10 @@ describe('ExpandMenuComponent', () => {
|
||||
it('should render action item', () => {
|
||||
component.item = {
|
||||
id: 'test-action-button',
|
||||
url: 'dummy'
|
||||
url: 'dummy',
|
||||
title: null,
|
||||
icon: null,
|
||||
route: null
|
||||
};
|
||||
|
||||
fixture.detectChanges();
|
||||
@ -68,16 +71,23 @@ describe('ExpandMenuComponent', () => {
|
||||
it('should render action item with children', () => {
|
||||
component.item = {
|
||||
id: 'test-action-button',
|
||||
icon: null,
|
||||
title: null,
|
||||
route: null,
|
||||
children: [
|
||||
{
|
||||
id: 'child-1',
|
||||
title: 'child-1',
|
||||
url: 'dummy'
|
||||
url: 'dummy',
|
||||
icon: null,
|
||||
route: null
|
||||
},
|
||||
{
|
||||
id: '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 { NavBarLinkRef } from '@alfresco/adf-extensions';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expand-menu',
|
||||
@ -32,7 +33,8 @@ import { Component, OnInit, Input, ViewEncapsulation, ChangeDetectorRef } from '
|
||||
host: { class: 'app-expand-menu' }
|
||||
})
|
||||
export class ExpandMenuComponent implements OnInit {
|
||||
@Input() item;
|
||||
@Input()
|
||||
item: NavBarLinkRef;
|
||||
|
||||
constructor(private cd: ChangeDetectorRef) {}
|
||||
|
||||
|
@ -71,7 +71,6 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
text-decoration: none;
|
||||
height: 24px;
|
||||
width: 100%;
|
||||
user-select: none;
|
||||
|
@ -35,8 +35,7 @@
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.mat-expansion-panel:not(.mat-expanded)
|
||||
.mat-expansion-panel-header:not([aria-disabled='true']):hover {
|
||||
.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled='true']):hover {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
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 { Component, OnInit } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
@ -40,7 +40,7 @@ export class TrashcanComponent extends PageComponent implements OnInit {
|
||||
isSmallScreen = false;
|
||||
user$: Observable<ProfileState>;
|
||||
|
||||
columns: any[] = [];
|
||||
columns: DocumentListPresetRef[] = [];
|
||||
|
||||
constructor(
|
||||
content: ContentManagementService,
|
||||
|
@ -820,11 +820,7 @@ export class ContentManagementService {
|
||||
}
|
||||
|
||||
private isLibraryContent(path: PathInfoEntity): boolean {
|
||||
if (path && path.elements.length >= 2 && path.elements[1].name === 'Sites') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return path && path.elements.length >= 2 && path.elements[1].name === 'Sites';
|
||||
}
|
||||
|
||||
private getRestoreMessage(status: DeleteStatus): SnackbarAction {
|
||||
|
@ -408,7 +408,7 @@ describe('NodeActionsService', () => {
|
||||
spyOn(service, 'getContentNodeSelection').and.callThrough();
|
||||
spyOn(service, 'getEntryParentId').and.returnValue('parent-id');
|
||||
|
||||
let dialogData: any;
|
||||
let dialogData = null;
|
||||
spyOn(dialog, 'open').and.callFake((_contentNodeSelectorComponent: any, data: any) => {
|
||||
dialogData = data;
|
||||
return { componentInstance: {} } as MatDialogRef<any>;
|
||||
|
@ -8,7 +8,7 @@ module.exports = {
|
||||
secure: false,
|
||||
changeOrigin: true,
|
||||
// workaround for REPO-2260
|
||||
onProxyRes: function(proxyRes, req, res) {
|
||||
onProxyRes: function (proxyRes) {
|
||||
const header = proxyRes.headers['www-authenticate'];
|
||||
if (header && header.startsWith('Basic')) {
|
||||
proxyRes.headers['www-authenticate'] = 'x' + header;
|
||||
|
Loading…
x
Reference in New Issue
Block a user