mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2670] Updated doc indexes for 2.3 (#3183)
* [ADF-2670] Updated doc indexes for 2.3 * [ADF-2670] Clarified explanation of sharedLinkId property in Viewer * [ADF-2670] Updated review checker for new doc folder structure
This commit is contained in:
committed by
Eugenio Romano
parent
014f2ab26c
commit
0d2f0b7b84
@@ -212,11 +212,6 @@ for more information about installing and using the source code.
|
||||
| [Version list component](content-services/version-list.component.md)  | Displays the version history of a node in a Version Manager component | [Source](../lib/content-services/version-manager/version-list.component.ts) |
|
||||
| [Version manager component](content-services/version-manager.component.md)  | Displays the version history of a node with the ability to upload a new version. | [Source](../lib/content-services/version-manager/version-manager.component.ts) |
|
||||
| [Webscript component](content-services/webscript.component.md) | Provides access to Webscript features. | [Source](../lib/content-services/webscript/webscript.component.ts) |
|
||||
| _Search fields component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-fields/search-fields.component.ts) |
|
||||
| _Search radio component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-radio/search-radio.component.ts) |
|
||||
| _Search scope locations component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-scope-locations/search-scope-locations.component.ts) |
|
||||
| _Search text component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-text/search-text.component.ts) |
|
||||
| _Search widget container component_ | _Not currently documented_ | [Source](../lib/content-services/search/components/search-widget-container/search-widget-container.component.ts) |
|
||||
|
||||
## Directives
|
||||
|
||||
@@ -249,7 +244,6 @@ for more information about installing and using the source code.
|
||||
| [Node permission service](content-services/node-permission.service.md) | Manages the role permissions for the content nodes | [Source](../lib/content-services/permission-manager/services/node-permission.service.ts) |
|
||||
| [Rating service](content-services/rating.service.md) | Manages ratings for items in Content Services. | [Source](../lib/content-services/social/services/rating.service.ts) |
|
||||
| [Tag service](content-services/tag.service.md) | Manages tags in Content Services. | [Source](../lib/content-services/tag/services/tag.service.ts) |
|
||||
| _Search query builder service_ | _Not currently documented_ | [Source](../lib/content-services/search/search-query-builder.service.ts) |
|
||||
|
||||
<!--content-services end-->
|
||||
|
||||
|
@@ -36,11 +36,6 @@ for more information about installing and using the source code.
|
||||
| [Version list component](version-list.component.md)  | Displays the version history of a node in a Version Manager component | [Source](../../lib/content-services/version-manager/version-list.component.ts) |
|
||||
| [Version manager component](version-manager.component.md)  | Displays the version history of a node with the ability to upload a new version. | [Source](../../lib/content-services/version-manager/version-manager.component.ts) |
|
||||
| [Webscript component](webscript.component.md) | Provides access to Webscript features. | [Source](../../lib/content-services/webscript/webscript.component.ts) |
|
||||
| _Search fields component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-fields/search-fields.component.ts) |
|
||||
| _Search radio component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-radio/search-radio.component.ts) |
|
||||
| _Search scope locations component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-scope-locations/search-scope-locations.component.ts) |
|
||||
| _Search text component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-text/search-text.component.ts) |
|
||||
| _Search widget container component_ | _Not currently documented_ | [Source](../../lib/content-services/search/components/search-widget-container/search-widget-container.component.ts) |
|
||||
|
||||
## Directives
|
||||
|
||||
@@ -73,6 +68,5 @@ for more information about installing and using the source code.
|
||||
| [Node permission service](node-permission.service.md) | Manages the role permissions for the content nodes | [Source](../../lib/content-services/permission-manager/services/node-permission.service.ts) |
|
||||
| [Rating service](rating.service.md) | Manages ratings for items in Content Services. | [Source](../../lib/content-services/social/services/rating.service.ts) |
|
||||
| [Tag service](tag.service.md) | Manages tags in Content Services. | [Source](../../lib/content-services/tag/services/tag.service.ts) |
|
||||
| _Search query builder service_ | _Not currently documented_ | [Source](../../lib/content-services/search/search-query-builder.service.ts) |
|
||||
|
||||
<!--content-services end-->
|
||||
|
@@ -3,6 +3,7 @@ Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-03-07
|
||||
---
|
||||
|
||||
# Viewer component
|
||||
|
||||
Displays content from an ACS repository.
|
||||
@@ -55,6 +56,19 @@ Using with file url:
|
||||
</adf-viewer>
|
||||
```
|
||||
|
||||
Using with shared link:
|
||||
|
||||
```html
|
||||
<adf-viewer
|
||||
[overlayMode]="true"
|
||||
[sharedLinkId]="'WWDg_afiTU6lHEgr4fAbQA'">
|
||||
</adf-viewer>
|
||||
```
|
||||
|
||||
Note that if you have a URL which contains a shared link ID, you should extract the
|
||||
ID portion and use it with the `sharedLinkId` property rather than using the whole
|
||||
URL with `urlFile`.
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
|
@@ -95,13 +95,15 @@ name is _alfresco_ then you would set the `alfrescoRepositoryName` property in`a
|
||||
to _alfresco-1002_ as follows:
|
||||
|
||||
```json
|
||||
{
|
||||
{
|
||||
application: {
|
||||
name: 'Alfresco ADF Application'
|
||||
},
|
||||
ecmHost: 'http://{hostname}{:port}/ecm',
|
||||
bpmHost: 'http://{hostname}{:port}/bpm',
|
||||
logLevel: 'silent',
|
||||
alfrescoRepositoryName : 'alfresco-1002'
|
||||
}
|
||||
```
|
||||
|
||||
You then need to pass the node as the input `values` object with the other properties:
|
||||
|
@@ -52,5 +52,6 @@
|
||||
"people-search-",
|
||||
"people-selector",
|
||||
"sidenav-layout-",
|
||||
"layout-container"
|
||||
"layout-container",
|
||||
"search-"
|
||||
]
|
@@ -20,6 +20,7 @@ var angFilePattern = /(component)|(directive)|(model)|(pipe)|(service)|(widget)/
|
||||
var srcData = {};
|
||||
var stoplist = new stoplist_1.Stoplist(stoplistFilePath);
|
||||
var docsFolderPath = path.resolve("..", "docs");
|
||||
var libFolders = ["core", "content-services", "process-services", "insights"];
|
||||
libsearch(srcData, path.resolve(rootFolder));
|
||||
/*
|
||||
let keys = Object.keys(srcData);
|
||||
@@ -35,7 +36,7 @@ var client = new graphql_request_1.GraphQLClient('https://api.github.com/graphql
|
||||
}
|
||||
});
|
||||
var query = "query commitHistory($path: String) {\n repository(name: \"alfresco-ng2-components\", owner: \"alfresco\") {\n ref(qualifiedName: \"development\") {\n target {\n ... on Commit {\n history(first: 15, path: $path) {\n nodes {\n pushedDate\n message\n }\n }\n }\n }\n }\n }\n}";
|
||||
var docFiles = getDocFileNames(docsFolderPath);
|
||||
var docFiles = getDocFilePaths(docsFolderPath);
|
||||
var docNames = Rx_1.Observable.from(docFiles);
|
||||
console.log("'Name','Review date','Commits since review','Score'");
|
||||
docNames.subscribe(function (x) {
|
||||
@@ -47,7 +48,7 @@ docNames.subscribe(function (x) {
|
||||
};
|
||||
client.request(query, vars).then(function (data) {
|
||||
var nodes = data["repository"].ref.target.history.nodes;
|
||||
var lastReviewDate = getDocReviewDate(key + ".md");
|
||||
var lastReviewDate = getDocReviewDate(x); //(key + ".md");
|
||||
var numUsefulCommits = extractCommitInfo(nodes, lastReviewDate, stoplist);
|
||||
var dateString = lastReviewDate.format("YYYY-MM-DD");
|
||||
var score = priorityScore(lastReviewDate, numUsefulCommits).toPrecision(3);
|
||||
@@ -84,12 +85,19 @@ function extractCommitInfo(commitNodes, cutOffDate, stoplist) {
|
||||
});
|
||||
return numUsefulCommits;
|
||||
}
|
||||
function getDocFileNames(folderPath) {
|
||||
var files = fs.readdirSync(folderPath);
|
||||
function getDocFilePaths(folderPath) {
|
||||
var result = [];
|
||||
libFolders.forEach(function (element) {
|
||||
var libPath = path.resolve(folderPath, element);
|
||||
var files = fs.readdirSync(libPath);
|
||||
files = files.filter(function (filename) {
|
||||
return (path.extname(filename) === ".md") &&
|
||||
(filename !== "README.md") &&
|
||||
(filename.match(angFilePattern));
|
||||
});
|
||||
return files;
|
||||
files.forEach(function (element) {
|
||||
result.push(path.join(libPath, element));
|
||||
});
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
@@ -29,6 +29,8 @@ let stoplist = new Stoplist(stoplistFilePath);
|
||||
|
||||
let docsFolderPath = path.resolve("..", "docs");
|
||||
|
||||
let libFolders = ["core", "content-services", "process-services", "insights"];
|
||||
|
||||
libsearch(srcData, path.resolve(rootFolder));
|
||||
|
||||
/*
|
||||
@@ -64,7 +66,7 @@ const query = `query commitHistory($path: String) {
|
||||
}
|
||||
}`;
|
||||
|
||||
let docFiles = getDocFileNames(docsFolderPath);
|
||||
let docFiles = getDocFilePaths(docsFolderPath);
|
||||
|
||||
let docNames = Observable.from(docFiles);
|
||||
|
||||
@@ -83,7 +85,7 @@ docNames.subscribe(x => {
|
||||
client.request(query, vars).then(data => {
|
||||
let nodes = data["repository"].ref.target.history.nodes;
|
||||
|
||||
let lastReviewDate = getDocReviewDate(key + ".md");
|
||||
let lastReviewDate = getDocReviewDate(x);//(key + ".md");
|
||||
|
||||
let numUsefulCommits = extractCommitInfo(nodes, lastReviewDate, stoplist);
|
||||
let dateString = lastReviewDate.format("YYYY-MM-DD");
|
||||
@@ -139,8 +141,12 @@ function extractCommitInfo(commitNodes, cutOffDate, stoplist) {
|
||||
}
|
||||
|
||||
|
||||
function getDocFileNames(folderPath) {
|
||||
let files = fs.readdirSync(folderPath);
|
||||
function getDocFilePaths(folderPath) {
|
||||
let result = [];
|
||||
|
||||
libFolders.forEach(element => {
|
||||
let libPath = path.resolve(folderPath, element);
|
||||
let files = fs.readdirSync(libPath);
|
||||
|
||||
files = files.filter(filename =>
|
||||
(path.extname(filename) === ".md") &&
|
||||
@@ -148,5 +154,11 @@ function getDocFileNames(folderPath) {
|
||||
(filename.match(angFilePattern))
|
||||
);
|
||||
|
||||
return files;
|
||||
files.forEach(element => {
|
||||
result.push(path.join(libPath, element));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
return result;
|
||||
}
|
Reference in New Issue
Block a user