mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-16 18:13:06 +00:00
Compare commits
1
Commits
2.4.0-beta5
..
2.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afa298060a |
@@ -1,12 +0,0 @@
|
||||
.git
|
||||
.github
|
||||
.vscode
|
||||
coverage
|
||||
docs
|
||||
e2e
|
||||
node_modules
|
||||
scripts
|
||||
src
|
||||
lib
|
||||
integration
|
||||
/demo-shell/config/
|
||||
+3
-7
@@ -1,4 +1,5 @@
|
||||
# Editor configuration, see http://editorconfig.org
|
||||
# http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
@@ -14,10 +15,5 @@ indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[resources/*.json]
|
||||
indent_size = 2
|
||||
max_line_length = off
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
@@ -17,6 +17,7 @@ src/environments/
|
||||
/demo-shell-ng2/ng2-components/
|
||||
.happypack/
|
||||
.history
|
||||
package-lock.*
|
||||
/ng2-components/ng2-alfresco-core/prebuilt-themes/
|
||||
.ng_pkg_build/
|
||||
/demo-shell/dist-dev-temp/
|
||||
|
||||
+18
-10
@@ -51,7 +51,7 @@ script:
|
||||
fi
|
||||
|
||||
- if ([ "$MODULE" == "packaging" ]); then
|
||||
(npm run build-lib || exit 1;);
|
||||
(cd lib && npm run build || exit 1;);
|
||||
fi
|
||||
|
||||
- if ([ "$MODULE" == "demo-shell" ]); then
|
||||
@@ -64,20 +64,27 @@ script:
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: Demo shell prod && Demo shell e2e && Check ADF exports
|
||||
script: ./scripts/test-dist.sh -n $TRAVIS_BUILD_NUMBER && (./scripts/pr-publish.sh -n $TRAVIS_BUILD_NUMBER -r $REPO_DOCKER -u $USERNAME_DOCKER -p $PASSWORD_DOCKER || exit 1)
|
||||
- # Test Update version 2.0.0
|
||||
- stage: Check build demo shell in production mode AND e2e
|
||||
before_install:
|
||||
- "export DISPLAY=:99.0"
|
||||
- "sh -e /etc/init.d/xvfb start"
|
||||
script: travis_wait 30 ./scripts/test-dist.sh
|
||||
- stage: Check 2.0.0 Project Update
|
||||
script: ./scripts/test-e2e-bc.sh
|
||||
- # Test expors
|
||||
script: npm run test-export
|
||||
- stage: Update Apps dependencies
|
||||
- stage: Check ADF exports
|
||||
script: cd lib && npm run test-export
|
||||
- stage: Update Generator
|
||||
if: tag =~ .*beta.*
|
||||
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n generator-ng2-alfresco-app
|
||||
- stage: Update Content app
|
||||
if: tag =~ .*beta.*
|
||||
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-content-app
|
||||
- stage: Update DW
|
||||
if: tag =~ .*beta.*
|
||||
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n adf-app-manager-ui
|
||||
- stage: Update ng2-components
|
||||
if: tag =~ .*beta.*
|
||||
script: ./scripts/update-project.sh -gnu -t $GITHUB_TOKEN -n alfresco-ng2-components
|
||||
- stage: Deploy PR
|
||||
script: node ./scripts/pr-deploy.js -n $TRAVIS_BUILD_NUMBER -u $RANCHER_TOKEN -p $RANCHER_SECRET -s $REPO_RANCHER --image "docker:$REPO_DOCKER/adf/demo-shell:$TRAVIS_BUILD_NUMBER" --env $ENVIRONMENT_NAME -r $ENVIRONMENT_URL || exit 1
|
||||
|
||||
# jobs:
|
||||
# include:
|
||||
@@ -109,4 +116,5 @@ after_success:
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
- demo-shell/node_modules
|
||||
- lib/node_modules
|
||||
|
||||
Vendored
-1
@@ -20,7 +20,6 @@
|
||||
"MD031" : false
|
||||
},
|
||||
"cSpell.words": [
|
||||
"mincount",
|
||||
"webscript"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
"apps": [
|
||||
{
|
||||
"name": "dist",
|
||||
"root": "demo-shell/src",
|
||||
"outDir": "demo-shell/dist",
|
||||
"root": "src",
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
"assets",
|
||||
"favicon.ico",
|
||||
@@ -25,32 +25,32 @@
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../node_modules/@alfresco/adf-core/prebuilt-themes",
|
||||
"input": "../node_modules/@alfresco/adf-core/prebuilt-themes",
|
||||
"output": "./assets/prebuilt-themes"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../node_modules/@alfresco/adf-core/bundles/assets",
|
||||
"input": "../node_modules/@alfresco/adf-core/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../node_modules/@alfresco/adf-insights/bundles/assets",
|
||||
"input": "../node_modules/@alfresco/adf-insights/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../node_modules/@alfresco/adf-process-services/bundles/assets",
|
||||
"input": "../node_modules/@alfresco/adf-process-services/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../node_modules/@alfresco/adf-content-services/bundles/assets",
|
||||
"input": "../node_modules/@alfresco/adf-content-services/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "pdf.worker.js",
|
||||
"input": "../../node_modules/pdfjs-dist/build",
|
||||
"input": "../node_modules/pdfjs-dist/build",
|
||||
"output": "./"
|
||||
}
|
||||
],
|
||||
@@ -67,14 +67,14 @@
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"./node_modules/"
|
||||
"../node_modules/"
|
||||
]
|
||||
},
|
||||
"scripts": [
|
||||
"../../node_modules/pdfjs-dist/build/pdf.js",
|
||||
"../../node_modules/pdfjs-dist/web/pdf_viewer.js",
|
||||
"../../node_modules/raphael/raphael.min.js",
|
||||
"../../node_modules/moment/min/moment.min.js"
|
||||
"../node_modules/pdfjs-dist/build/pdf.js",
|
||||
"../node_modules/pdfjs-dist/web/pdf_viewer.js",
|
||||
"../node_modules/raphael/raphael.min.js",
|
||||
"../node_modules/moment/min/moment.min.js"
|
||||
],
|
||||
"environmentSource": "environments/environment.ts",
|
||||
"environments": {
|
||||
@@ -84,27 +84,12 @@
|
||||
},
|
||||
{
|
||||
"name": "dev",
|
||||
"root": "demo-shell/src",
|
||||
"outDir": "demo-shell/dist",
|
||||
"root": "src",
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
"assets",
|
||||
"app.config.json",
|
||||
"versions.json",
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "./assets",
|
||||
"output": "./assets"
|
||||
},
|
||||
{
|
||||
"glob": "app.config.json",
|
||||
"input": "./",
|
||||
"output": "./"
|
||||
},
|
||||
{
|
||||
"glob": "versions.json",
|
||||
"input": "./",
|
||||
"output": "./"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../resources",
|
||||
@@ -117,47 +102,12 @@
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/dist/core/prebuilt-themes",
|
||||
"output": "./assets/prebuilt-themes"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/core/assets",
|
||||
"output": "./assets"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/process-services/assets",
|
||||
"output": "./assets"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/content-services/assets",
|
||||
"output": "./assets"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/core/i18n",
|
||||
"output": "./assets/adf-core/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/content-services/i18n",
|
||||
"output": "./assets/adf-content-services/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/process-services/i18n",
|
||||
"output": "./assets/adf-process-services/i18n"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../../lib/insights/i18n",
|
||||
"output": "./assets/adf-insights/i18n"
|
||||
"input": "../dist-dev-temp/",
|
||||
"output": "./"
|
||||
},
|
||||
{
|
||||
"glob": "pdf.worker.js",
|
||||
"input": "../../node_modules/pdfjs-dist/build",
|
||||
"input": "../node_modules/pdfjs-dist/build",
|
||||
"output": "./"
|
||||
}
|
||||
],
|
||||
@@ -178,10 +128,10 @@
|
||||
]
|
||||
},
|
||||
"scripts": [
|
||||
"../../node_modules/pdfjs-dist/build/pdf.js",
|
||||
"../../node_modules/pdfjs-dist/web/pdf_viewer.js",
|
||||
"../../node_modules/raphael/raphael.min.js",
|
||||
"../../node_modules/moment/min/moment.min.js"
|
||||
"../node_modules/pdfjs-dist/build/pdf.js",
|
||||
"../node_modules/pdfjs-dist/web/pdf_viewer.js",
|
||||
"../node_modules/raphael/raphael.min.js",
|
||||
"../node_modules/moment/min/moment.min.js"
|
||||
],
|
||||
"environmentSource": "environments/environment.ts",
|
||||
"environments": {
|
||||
@@ -192,18 +142,18 @@
|
||||
],
|
||||
"e2e": {
|
||||
"protractor": {
|
||||
"config": "./demo-shell/protractor.conf.js"
|
||||
"config": "./protractor.conf.js"
|
||||
}
|
||||
},
|
||||
"lint": [
|
||||
{
|
||||
"project": "./demo-shell/src/tsconfig.app.json",
|
||||
"project": "src/tsconfig.app.json",
|
||||
"exclude": "**/node_modules/**/*"
|
||||
}
|
||||
],
|
||||
"test": {
|
||||
"karma": {
|
||||
"config": "./demo-shell/karma.conf.js"
|
||||
"config": "./karma.conf.js"
|
||||
}
|
||||
},
|
||||
"defaults": {
|
||||
@@ -0,0 +1,23 @@
|
||||
# Editor configuration, see http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.json]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[resources/*.json]
|
||||
indent_size = 2
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
@@ -57,4 +57,3 @@ app/**/*.d.ts
|
||||
|
||||
dist/
|
||||
coverage/
|
||||
!/e2e/protractor.conf.js
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -0,0 +1,14 @@
|
||||
const cpx = require('cpx');
|
||||
|
||||
//Workaround for https://github.com/angular/angular-cli/issues/8783
|
||||
//we copy before the files in dist-dev-temp in the demo shell and after we let the angular cli watch over them..double wathh necessary for dev mode
|
||||
|
||||
cpx.watch('../lib/core/prebuilt-themes/**/*.*', './dist-dev-temp/assets/prebuilt-themes')
|
||||
cpx.watch('../lib/core/assets/**/*.*', './dist-dev-temp/assets/' )
|
||||
cpx.watch('../lib/process-services/assets/**/*.*', './dist-dev-temp/assets/' )
|
||||
cpx.watch('../lib/content-services/assets/**/*.*', './dist-dev-temp/assets/' )
|
||||
|
||||
cpx.watch('../lib/core/i18n/**/*.*', './dist-dev-temp//assets/adf-core/i18n' )
|
||||
cpx.watch('../lib/process-services/i18n/**/*.*', './dist-dev-temp/assets/adf-process-services/i18n' )
|
||||
cpx.watch('../lib/content-services/i18n/**/*.*', './dist-dev-temp/assets/adf-content-services/i18n' )
|
||||
cpx.watch('../lib/insights/i18n/**/*.*', './dist-dev-temp//assets/adf-insights/i18n' )
|
||||
@@ -0,0 +1,42 @@
|
||||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
const path = require('path');
|
||||
|
||||
const extractScss = new ExtractTextPlugin('../lib/core/prebuilt-themes/[name].css');
|
||||
|
||||
module.exports = {
|
||||
|
||||
entry: {
|
||||
'adf-blue-orange': '../lib/core/styles/prebuilt/adf-blue-orange.scss',
|
||||
'adf-blue-purple': '../lib/core/styles/prebuilt/adf-blue-purple.scss',
|
||||
'adf-cyan-orange': '../lib/core/styles/prebuilt/adf-cyan-orange.scss',
|
||||
'adf-cyan-purple': '../lib/core/styles/prebuilt/adf-cyan-purple.scss',
|
||||
'adf-green-purple': '../lib/core/styles/prebuilt/adf-green-purple.scss',
|
||||
'adf-green-orange': '../lib/core/styles/prebuilt/adf-green-orange.scss',
|
||||
'adf-pink-bluegrey': '../lib/core/styles/prebuilt/adf-pink-bluegrey.scss',
|
||||
'adf-indigo-pink': '../lib/core/styles/prebuilt/adf-indigo-pink.scss',
|
||||
'adf-purple-green': '../lib/core/styles/prebuilt/adf-purple-green.scss'
|
||||
},
|
||||
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
modules: [path.resolve(__dirname, '../node_modules')]
|
||||
},
|
||||
|
||||
output: {
|
||||
filename: '../dist/[name].js'
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.scss$/,
|
||||
use: extractScss.extract([{
|
||||
loader: "raw-loader"
|
||||
}, {
|
||||
loader: "sass-loader"
|
||||
}])
|
||||
}]
|
||||
},
|
||||
plugins: [
|
||||
extractScss
|
||||
]
|
||||
};
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: './',
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular/cli'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
|
||||
@@ -21,9 +21,5 @@ http {
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~ ^/[a-zA-Z0-9_-]+/ {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+108
-2
@@ -1,8 +1,29 @@
|
||||
{
|
||||
"name": "Alfresco-ADF-Angular-Demo",
|
||||
"description": "Demo shell for Alfresco Angular components",
|
||||
"version": "2.4.0-beta2",
|
||||
"version": "2.3.0",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"prestart": "npm run validate-config",
|
||||
"start": "npm run server-versions && rimraf dist && ng serve --host 0.0.0.0 --proxy-config proxy.conf.js --app dist --open",
|
||||
"start:dev": " npm run lint && npm run server-versions && rimraf dist && npm run clean-lib-angular && concurrently \"ng serve --host 0.0.0.0 --disable-host-check --app dev --proxy-config proxy.conf.js --open\" \"npm run style:dev --watch\" \"npm run copy:dev\" ",
|
||||
"start:dist": "npm run server-versions && rimraf dist && node --max_old_space_size=30000 node_modules/.bin/ng serve --prod --host 0.0.0.0 --disable-host-check --app dist --proxy-config proxy.conf.js -open",
|
||||
"build": "npm run validate-config && npm run server-versions && rimraf dist && ng build --app dist",
|
||||
"build:dev": "npm run validate-config && npm run lint && npm run style:dev && npm run server-versions && rimraf dist && ng build --app dev",
|
||||
"build:dist": "npm run validate-config && npm run server-versions && rimraf dist && ng build --prod --app dist",
|
||||
"style:dev": "npm run webpack -- --config config/webpack.style.js --progress --profile --bail",
|
||||
"copy:dev": "node ./config/dev-copy-watch.js",
|
||||
"test": " ng test --single-run",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e",
|
||||
"validate-config": "ajv validate -s ../lib/core/app-config/schema.json -d ./src/app.config.json --errors=text --verbose",
|
||||
"server-versions": "rimraf ./src/versions.json && npm list --depth=0 --json=true --prod=true > ./src/versions.json || exit 0",
|
||||
"clean": "rimraf dist node_modules typings",
|
||||
"clean-lib-angular": "rimraf ../lib/node_modules/@angular",
|
||||
"clean-lock": "rimraf package-lock.json",
|
||||
"webpack": "node node_modules/webpack/bin/webpack.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components.git"
|
||||
@@ -11,11 +32,96 @@
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Denys Vuika",
|
||||
"email": "denis.vuyka@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Mario Romano",
|
||||
"email": "mario.romano83@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Will Abson",
|
||||
"email": "will.abson@alfresco.com"
|
||||
},
|
||||
{
|
||||
"name": "Eugenio Romano",
|
||||
"email": "eugenio.romano@alfresco.com"
|
||||
},
|
||||
{
|
||||
"name": "Maurizio Vitale",
|
||||
"email": "maurizio.vitale@alfresco.com"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"ng2",
|
||||
"angular",
|
||||
"angular2",
|
||||
"alfresco"
|
||||
],
|
||||
"private": true
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@alfresco/adf-content-services": "2.3.0",
|
||||
"@alfresco/adf-core": "2.3.0",
|
||||
"@alfresco/adf-insights": "2.3.0",
|
||||
"@alfresco/adf-process-services": "2.3.0",
|
||||
"@angular/animations": "5.1.1",
|
||||
"@angular/cdk": "5.0.1",
|
||||
"@angular/common": "5.1.1",
|
||||
"@angular/compiler": "5.1.1",
|
||||
"@angular/core": "5.1.1",
|
||||
"@angular/flex-layout": "2.0.0-beta.12",
|
||||
"@angular/forms": "5.1.1",
|
||||
"@angular/http": "5.1.1",
|
||||
"@angular/material": "5.0.1",
|
||||
"@angular/platform-browser": "5.1.1",
|
||||
"@angular/platform-browser-dynamic": "5.1.1",
|
||||
"@angular/router": "5.1.1",
|
||||
"@mat-datetimepicker/core": "1.0.4",
|
||||
"@mat-datetimepicker/moment": "1.0.4",
|
||||
"@ngx-translate/core": "9.1.1",
|
||||
"alfresco-js-api": "2.3.0",
|
||||
"chart.js": "2.5.0",
|
||||
"classlist.js": "1.1.20150312",
|
||||
"core-js": "2.4.1",
|
||||
"custom-event-polyfill": "0.3.0",
|
||||
"hammerjs": "2.0.8",
|
||||
"intl": "1.2.5",
|
||||
"minimatch": "3.0.4",
|
||||
"moment": "2.20.1",
|
||||
"moment-es6": "^1.0.0",
|
||||
"ng2-charts": "1.6.0",
|
||||
"pdfjs-dist": "2.0.265",
|
||||
"raphael": "2.2.7",
|
||||
"reflect-metadata": "0.1.10",
|
||||
"rxjs": "5.5.2",
|
||||
"web-animations-js": "2.3.1",
|
||||
"zone.js": "0.8.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "1.6.5",
|
||||
"@angular/compiler-cli": "^5.2.0",
|
||||
"@angular/language-service": "^5.2.0",
|
||||
"@types/jasmine": "~2.8.3",
|
||||
"@types/jasminewd2": "~2.0.2",
|
||||
"@types/node": "~6.0.60",
|
||||
"ajv-cli": "^3.0.0",
|
||||
"codelyzer": "4.1.0",
|
||||
"concurrently": "^3.5.1",
|
||||
"cpx": "^1.5.0",
|
||||
"jasmine-core": "~2.8.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~2.0.0",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-cli": "~1.0.1",
|
||||
"karma-coverage-istanbul-reporter": "^1.2.1",
|
||||
"karma-jasmine": "~1.1.0",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.1.2",
|
||||
"rimraf": "^2.6.2",
|
||||
"ts-node": "~4.1.0",
|
||||
"tslint": "~5.9.1",
|
||||
"typescript": "~2.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ exports.config = {
|
||||
},
|
||||
beforeLaunch: function() {
|
||||
require('ts-node').register({
|
||||
project: './demo-shell/e2e/tsconfig.e2e.json'
|
||||
project: 'e2e/tsconfig.e2e.json'
|
||||
});
|
||||
},
|
||||
onPrepare() {
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
"ADF_VERSION_MANAGER": {
|
||||
"ALLOW_DELETE": "Allow delete",
|
||||
"SHOW_COMMENTS" : "Show comments on versions",
|
||||
"ALLOW_DOWNLOAD" :"Enable version download",
|
||||
"READ_ONLY" : "Read only"
|
||||
"ALLOW_DOWNLOAD" :"Enable version download"
|
||||
}
|
||||
},
|
||||
"title": "Welcome",
|
||||
@@ -98,13 +97,7 @@
|
||||
"NEW_FOLDER":"New folder",
|
||||
"EDIT_FOLDER":"Edit folder",
|
||||
"DOWNLOAD":"Download",
|
||||
"DELETE":"Delete",
|
||||
"FAVORITES": "Add to favorites",
|
||||
"SHARE": "Share",
|
||||
"THEME": "Select a theme!",
|
||||
"SHOW_VERSION": "Show version",
|
||||
"HIDE_VERSION": "Hide version",
|
||||
"LISTVIEW": "List view mode"
|
||||
"DELETE":"Delete"
|
||||
},
|
||||
"ACTIONS": {
|
||||
"VERSIONS": "Manage versions",
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"bpmHost": "http://{hostname}:{port}",
|
||||
"contextRootBpm": "activiti-app",
|
||||
"application": {
|
||||
"name": "Alfresco ADF Application",
|
||||
"copyright": "© 2016 - 2018 Alfresco Software, Inc. All Rights Reserved."
|
||||
"name": "Alfresco ADF Application"
|
||||
},
|
||||
"languages": [
|
||||
{
|
||||
@@ -54,50 +53,53 @@
|
||||
}
|
||||
],
|
||||
"search": {
|
||||
"include": ["path", "allowableOperations"],
|
||||
"sorting": {
|
||||
"options": [
|
||||
{ "key": "name", "label": "Name", "type": "FIELD", "field": "cm:name", "ascending": true },
|
||||
{ "key": "content.sizeInBytes", "label": "Size", "type": "FIELD", "field": "content.size", "ascending": true },
|
||||
{ "key": "description", "label": "Description", "type": "FIELD", "field": "cm:description", "ascending": true }
|
||||
],
|
||||
"defaults": [
|
||||
{ "key": "name", "type": "FIELD", "field": "cm:name", "ascending": true }
|
||||
]
|
||||
"limits": {
|
||||
"permissionEvaluationTime": null,
|
||||
"permissionEvaluationCount": null
|
||||
},
|
||||
"filterQueries": [
|
||||
{ "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" },
|
||||
{ "query": "NOT cm:creator:System" }
|
||||
],
|
||||
"facetFields": [
|
||||
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
|
||||
{ "field": "content.size", "mincount": 1, "label": "Size" },
|
||||
{ "field": "creator", "mincount": 1, "label": "Creator" },
|
||||
{ "field": "modifier", "mincount": 1, "label": "Modifier" },
|
||||
{ "field": "created", "mincount": 1, "label": "Created" }
|
||||
],
|
||||
"facetQueries": {
|
||||
"label": "My facet queries",
|
||||
"pageSize": 5,
|
||||
"queries": [
|
||||
{ "query": "created:2018", "label": "Created This Year" },
|
||||
{ "query": "content.mimetype", "label": "Type" },
|
||||
{ "query": "content.size:[0 TO 10240]", "label": "Size: xtra small"},
|
||||
{ "query": "content.size:[10240 TO 102400]", "label": "Size: small"},
|
||||
{ "query": "content.size:[102400 TO 1048576]", "label": "Size: medium" },
|
||||
{ "query": "content.size:[1048576 TO 16777216]", "label": "Size: large" },
|
||||
{ "query": "content.size:[16777216 TO 134217728]", "label": "Size: xtra large" },
|
||||
{ "query": "content.size:[134217728 TO MAX]", "label": "Size: XX large" }
|
||||
"facetFields": {
|
||||
"facets": [
|
||||
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
|
||||
{ "field": "content.size", "mincount": 1, "label": "Size" },
|
||||
{ "field": "creator", "mincount": 1, "label": "Creator" },
|
||||
{ "field": "modifier", "mincount": 1, "label": "Modifier" }
|
||||
]
|
||||
},
|
||||
"categories": [
|
||||
"facetQueries": [
|
||||
{ "query": "created:2018", "label": "Created This Year" },
|
||||
{ "query": "content.mimetype", "label": "Type" },
|
||||
{ "query": "content.size:[0 TO 10240]", "label": "Size: xtra small"},
|
||||
{ "query": "content.size:[10240 TO 102400]", "label": "Size: small"},
|
||||
{ "query": "content.size:[102400 TO 1048576]", "label": "Size: medium" },
|
||||
{ "query": "content.size:[1048576 TO 16777216]", "label": "Size: large" },
|
||||
{ "query": "content.size:[16777216 TO 134217728]", "label": "Size: xtra large" },
|
||||
{ "query": "content.size:[134217728 TO MAX]", "label": "Size: XX large" }
|
||||
],
|
||||
"query": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "broken",
|
||||
"name": "Broken Facet",
|
||||
"enabled": false,
|
||||
"expanded": false,
|
||||
"component": {
|
||||
"selector": "adf-search-text",
|
||||
"settings": {
|
||||
"field": "fieldname"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "queryName",
|
||||
"name": "Name",
|
||||
"enabled": true,
|
||||
"expanded": true,
|
||||
"component": {
|
||||
"selector": "text",
|
||||
"selector": "adf-search-text",
|
||||
"settings": {
|
||||
"pattern": "cm:name:'(.*?)'",
|
||||
"field": "cm:name",
|
||||
@@ -106,69 +108,32 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "checkList",
|
||||
"name": "Check List",
|
||||
"id": "queryFields",
|
||||
"name": "Fields",
|
||||
"enabled": true,
|
||||
"expanded": false,
|
||||
"component": {
|
||||
"selector": "check-list",
|
||||
"selector": "adf-search-fields",
|
||||
"settings": {
|
||||
"pageSize": 5,
|
||||
"operator": "OR",
|
||||
"field": null,
|
||||
"options": [
|
||||
{ "name": "Folder", "value": "TYPE:'cm:folder'" },
|
||||
{ "name": "Document", "value": "TYPE:'cm:content'" }
|
||||
{ "name": "Name", "value": "name", "fields": ["name"], "default": true },
|
||||
{ "name": "File Size", "value": "content.sizeInBytes", "fields": ["content"], "default": true },
|
||||
{ "name": "Modified On", "value": "modifiedAt", "fields": ["modifiedAt"], "default": true },
|
||||
{ "name": "Modified By", "value": "modifiedByUser.displayName", "fields": ["modifiedByUser"], "default": true }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "contentSize",
|
||||
"name": "Content Size",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "slider",
|
||||
"settings": {
|
||||
"field": "cm:content.size",
|
||||
"min": 0,
|
||||
"max": 18,
|
||||
"step": 1,
|
||||
"thumbLabel": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "contentSizeRange",
|
||||
"name": "Content Size (range)",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "number-range",
|
||||
"settings": {
|
||||
"field": "cm:content.size",
|
||||
"format": "[{FROM} TO {TO}]"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "createdDateRange",
|
||||
"name": "Created Date (range)",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "date-range",
|
||||
"settings": {
|
||||
"field": "cm:created",
|
||||
"dateFormat": "DD-MMM-YY"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "queryType",
|
||||
"name": "Type",
|
||||
"enabled": true,
|
||||
"expanded": false,
|
||||
"component": {
|
||||
"selector": "radio",
|
||||
"selector": "adf-search-radio",
|
||||
"settings": {
|
||||
"field": null,
|
||||
"pageSize": 5,
|
||||
"options": [
|
||||
{ "name": "None", "value": "", "default": true },
|
||||
{ "name": "All", "value": "TYPE:'cm:folder' OR TYPE:'cm:content'" },
|
||||
@@ -177,8 +142,27 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "queryLocations",
|
||||
"name": "Locations",
|
||||
"enabled": true,
|
||||
"expanded": false,
|
||||
"component": {
|
||||
"selector": "adf-search-scope-locations",
|
||||
"settings": {
|
||||
"field": null,
|
||||
"options": [
|
||||
{ "name": "Default", "value": "nodes", "default": true },
|
||||
{ "name": "Nodes", "value": "nodes" },
|
||||
{ "name": "Deleted Nodes", "value": "deleted-nodes" },
|
||||
{ "name": "Versions", "value": "versions" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"pagination": {
|
||||
"size": 25,
|
||||
@@ -504,10 +488,5 @@
|
||||
"adf-version-manager": {
|
||||
"allowComments": true,
|
||||
"allowDownload": true
|
||||
},
|
||||
|
||||
"sideNav": {
|
||||
"expandedSidenav": true,
|
||||
"preserveState": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
<router-outlet></router-outlet>
|
||||
<app-log></app-log>
|
||||
<router-outlet name="overlay"></router-outlet>
|
||||
|
||||
@@ -1,3 +1,39 @@
|
||||
.empty-list {
|
||||
.adf-data-table {
|
||||
height: 100%;
|
||||
|
||||
tr:hover, tr:focus {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
&__block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
p {
|
||||
line-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
&__subtitle {
|
||||
font-size: 14px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
&__block > mat-icon {
|
||||
font-size: 52px;
|
||||
height: 52px;
|
||||
width: 52px;
|
||||
}
|
||||
}
|
||||
|
||||
router-outlet[name="overlay"] + * {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -17,7 +53,7 @@ router-outlet[name="overlay"] + * {
|
||||
.adf-data-table-cell:first-child,
|
||||
.adf-data-table-cell:nth-child(2) {
|
||||
display: table-cell;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
|
||||
import { SettingsService, PageTitleService, StorageService } from '@alfresco/adf-core';
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { SettingsService, PageTitleService, StorageService, TranslationService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -24,17 +25,15 @@ import { SettingsService, PageTitleService, StorageService } from '@alfresco/adf
|
||||
styleUrls: ['./app.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
export class AppComponent {
|
||||
|
||||
constructor(private settingsService: SettingsService,
|
||||
private storage: StorageService,
|
||||
private pageTitleService: PageTitleService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
constructor(private settingsService: SettingsService,
|
||||
private storage: StorageService,
|
||||
translationService: TranslationService,
|
||||
pageTitleService: PageTitleService,
|
||||
route: ActivatedRoute) {
|
||||
this.setProvider();
|
||||
|
||||
this.pageTitleService.setTitle('title');
|
||||
pageTitleService.setTitle();
|
||||
}
|
||||
|
||||
private setProvider() {
|
||||
|
||||
@@ -125,11 +125,6 @@ export const appRoutes: Routes = [
|
||||
component: ProcessServiceComponent,
|
||||
canActivate: [AuthGuardBpm]
|
||||
},
|
||||
{
|
||||
path: 'activiti/apps/:appId/tasks/:filterId',
|
||||
component: ProcessServiceComponent,
|
||||
canActivate: [AuthGuardBpm]
|
||||
},
|
||||
{
|
||||
path: 'activiti/apps/:appId/processes',
|
||||
component: ProcessServiceComponent,
|
||||
|
||||
@@ -1 +1,49 @@
|
||||
<adf-about></adf-about>
|
||||
<div class="about-container">
|
||||
<h3>Server settings</h3>
|
||||
<mat-list>
|
||||
<small>The values below are taken from the AppConfigService </small>
|
||||
<mat-list-item>
|
||||
<h4 matLine> Alfresco Process Services URL: {{ bpmHost }}</h4>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-list-item>
|
||||
<h4 matLine>Alfresco Content Services URL: {{ ecmHost }}</h4>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
|
||||
<h3>Product Versions</h3>
|
||||
<div *ngIf="bpmVersion">
|
||||
<h3>BPM</h3>
|
||||
<label> Edition </label> {{ bpmVersion.edition }}
|
||||
<p></p>
|
||||
<label> Version </label> {{ bpmVersion.majorVersion }}.{{ bpmVersion.minorVersion }}.{{ bpmVersion.revisionVersion }}
|
||||
</div>
|
||||
<div *ngIf="ecmVersion">
|
||||
<h3>ECM</h3>
|
||||
<label> Edition </label> {{ ecmVersion.edition }}
|
||||
<p></p>
|
||||
<label> Version </label> {{ ecmVersion.version.display }}
|
||||
<p></p>
|
||||
<h4>License</h4>
|
||||
<adf-datatable [data]="license"></adf-datatable>
|
||||
|
||||
<h4> Status</h4>
|
||||
<adf-datatable [data]="status"></adf-datatable>
|
||||
|
||||
<h4>Modules</h4>
|
||||
|
||||
<adf-datatable [data]="modules"></adf-datatable>
|
||||
</div>
|
||||
|
||||
<div *ngIf="githubUrlCommitAlpha">
|
||||
<h3>Source code</h3>
|
||||
<small>You are running the project based on the following commit:</small>
|
||||
<div>
|
||||
<a [href]="githubUrlCommitAlpha">{{githubUrlCommitAlpha}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Packages</h3>
|
||||
<small>Current project is using the following ADF libraries:</small>
|
||||
<adf-datatable [data]="data"></adf-datatable>
|
||||
</div>
|
||||
|
||||
@@ -15,12 +15,123 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Http } from '@angular/http';
|
||||
import {
|
||||
AuthenticationService,
|
||||
AppConfigService,
|
||||
BpmProductVersionModel,
|
||||
DiscoveryApiService,
|
||||
EcmProductVersionModel,
|
||||
ObjectDataTableAdapter
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-about-page',
|
||||
templateUrl: './about.component.html'
|
||||
templateUrl: './about.component.html',
|
||||
styleUrls: ['./about.component.css']
|
||||
})
|
||||
export class AboutComponent {
|
||||
export class AboutComponent implements OnInit {
|
||||
|
||||
data: ObjectDataTableAdapter;
|
||||
status: ObjectDataTableAdapter;
|
||||
license: ObjectDataTableAdapter;
|
||||
modules: ObjectDataTableAdapter;
|
||||
githubUrlCommitAlpha = 'https://github.com/Alfresco/alfresco-ng2-components/commits/';
|
||||
|
||||
ecmHost = '';
|
||||
bpmHost = '';
|
||||
|
||||
ecmVersion: EcmProductVersionModel = null;
|
||||
bpmVersion: BpmProductVersionModel = null;
|
||||
|
||||
constructor(private http: Http,
|
||||
private appConfig: AppConfigService,
|
||||
private authService: AuthenticationService,
|
||||
private discovery: DiscoveryApiService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
if (this.authService.isEcmLoggedIn()) {
|
||||
this.discovery.getEcmProductInfo().subscribe((ecmVers) => {
|
||||
this.ecmVersion = ecmVers;
|
||||
|
||||
this.modules = new ObjectDataTableAdapter(this.ecmVersion.modules, [
|
||||
{type: 'text', key: 'id', title: 'ID', sortable: true},
|
||||
{type: 'text', key: 'title', title: 'Title', sortable: true},
|
||||
{type: 'text', key: 'version', title: 'Description', sortable: true},
|
||||
{type: 'text', key: 'installDate', title: 'Install Date', sortable: true},
|
||||
{type: 'text', key: 'installState', title: 'Install State', sortable: true},
|
||||
{type: 'text', key: 'versionMin', title: 'Version Minor', sortable: true},
|
||||
{type: 'text', key: 'versionMax', title: 'Version Max', sortable: true}
|
||||
]);
|
||||
|
||||
this.status = new ObjectDataTableAdapter([this.ecmVersion.status], [
|
||||
{type: 'text', key: 'isReadOnly', title: 'ReadOnly', sortable: true},
|
||||
{type: 'text', key: 'isAuditEnabled', title: 'Is Audit Enable', sortable: true},
|
||||
{type: 'text', key: 'isQuickShareEnabled', title: 'Is quick shared enable', sortable: true},
|
||||
{type: 'text', key: 'isThumbnailGenerationEnabled', title: 'Thumbnail Generation', sortable: true}
|
||||
]);
|
||||
|
||||
this.license = new ObjectDataTableAdapter([this.ecmVersion.license], [
|
||||
{type: 'text', key: 'issuedAt', title: 'Issued At', sortable: true},
|
||||
{type: 'text', key: 'expiresAt', title: 'Expires At', sortable: true},
|
||||
{type: 'text', key: 'remainingDays', title: 'Remaining Days', sortable: true},
|
||||
{type: 'text', key: 'holder', title: 'Holder', sortable: true},
|
||||
{type: 'text', key: 'mode', title: 'Mode', sortable: true},
|
||||
{type: 'text', key: 'isClusterEnabled', title: 'Is Cluster Enabled', sortable: true},
|
||||
{type: 'text', key: 'isCryptodocEnabled', title: 'Is Cryptodoc Enable', sortable: true}
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
if (this.authService.isBpmLoggedIn()) {
|
||||
this.discovery.getBpmProductInfo().subscribe((bpmVers) => {
|
||||
this.bpmVersion = bpmVers;
|
||||
});
|
||||
}
|
||||
|
||||
this.http.get('/versions.json').subscribe(response => {
|
||||
const regexp = new RegExp('^(@alfresco)');
|
||||
|
||||
const alfrescoPackages = Object.keys(response.json().dependencies).filter((val) => {
|
||||
return regexp.test(val);
|
||||
});
|
||||
|
||||
const alfrescoPackagesTableRepresentation = [];
|
||||
alfrescoPackages.forEach((val) => {
|
||||
alfrescoPackagesTableRepresentation.push({
|
||||
name: val,
|
||||
version: response.json().dependencies[val].version
|
||||
});
|
||||
});
|
||||
|
||||
this.gitHubLinkCreation(alfrescoPackagesTableRepresentation);
|
||||
|
||||
this.data = new ObjectDataTableAdapter(alfrescoPackagesTableRepresentation, [
|
||||
{type: 'text', key: 'name', title: 'Name', sortable: true},
|
||||
{type: 'text', key: 'version', title: 'Version', sortable: true}
|
||||
]);
|
||||
|
||||
});
|
||||
|
||||
this.ecmHost = this.appConfig.get<string>('ecmHost');
|
||||
this.bpmHost = this.appConfig.get<string>('bpmHost');
|
||||
}
|
||||
|
||||
private gitHubLinkCreation(alfrescoPackagesTableRepresentation): void {
|
||||
const corePackage = alfrescoPackagesTableRepresentation.find((packageUp) => {
|
||||
return packageUp.name === '@alfresco/adf-core';
|
||||
});
|
||||
|
||||
if (corePackage) {
|
||||
const commitIsh = corePackage.version.split('-');
|
||||
if (commitIsh.length > 1) {
|
||||
this.githubUrlCommitAlpha = this.githubUrlCommitAlpha + commitIsh[1];
|
||||
} else {
|
||||
this.githubUrlCommitAlpha = this.githubUrlCommitAlpha + corePackage.version;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<adf-sidenav-layout [sidenavMin]="70" [sidenavMax]="220" [stepOver]="780" [hideSidenav]="false"[expandedSidenav]= "expandedSidenav" (expanded)="setState($event)">
|
||||
<adf-sidenav-layout [sidenavMin]="70" [sidenavMax]="220" [stepOver]="780" [hideSidenav]="false" [expandedSidenav]="false">
|
||||
|
||||
<adf-sidenav-layout-header>
|
||||
<ng-template let-toggleMenu="toggleMenu">
|
||||
@@ -51,5 +51,4 @@
|
||||
</ng-template>
|
||||
</adf-sidenav-layout-content>
|
||||
|
||||
</adf-sidenav-layout>
|
||||
<app-log></app-log>
|
||||
</adf-sidenav-layout>
|
||||
@@ -15,8 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
|
||||
import { UserPreferencesService, AppConfigService } from '@alfresco/adf-core';
|
||||
import { Component, ViewEncapsulation } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'app-layout.component.html',
|
||||
@@ -26,8 +25,7 @@ import { UserPreferencesService, AppConfigService } from '@alfresco/adf-core';
|
||||
},
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
|
||||
export class AppLayoutComponent implements OnInit {
|
||||
export class AppLayoutComponent {
|
||||
|
||||
links: Array<any> = [
|
||||
{ href: '/home', icon: 'home', title: 'APP_LAYOUT.HOME' },
|
||||
@@ -50,25 +48,6 @@ export class AppLayoutComponent implements OnInit {
|
||||
{ href: '/about', icon: 'info_outline', title: 'APP_LAYOUT.ABOUT' }
|
||||
];
|
||||
|
||||
expandedSidenav = false;
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
const expand = this.config.get<boolean>('sideNav.expandedSidenav');
|
||||
const preserveState = this.config.get('sideNav.preserveState');
|
||||
|
||||
if (preserveState && expand) {
|
||||
this.expandedSidenav = (this.userpreference.get('expandedSidenav', expand.toString()) === 'true');
|
||||
} else if (expand) {
|
||||
this.expandedSidenav = expand;
|
||||
}
|
||||
}
|
||||
constructor( private userpreference: UserPreferencesService, private config: AppConfigService) {
|
||||
}
|
||||
|
||||
setState(state) {
|
||||
if (this.config.get('sideNav.preserveState')) {
|
||||
this.userpreference.set('expandedSidenav', state);
|
||||
}
|
||||
constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.VERSIONS' | translate">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<adf-version-manager [node]="node"
|
||||
(uploadError)="uploadError($event)">
|
||||
<adf-version-manager [node]="node" (uploadError)="uploadError($event)">
|
||||
</adf-version-manager>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
@@ -22,7 +21,7 @@
|
||||
</adf-info-drawer>
|
||||
</ng-template>
|
||||
|
||||
<adf-viewer [nodeId]="nodeId" [allowSidebar]="true" [sidebarTemplate]="sidebarTemplate">
|
||||
<adf-viewer [fileNodeId]="nodeId" [allowSidebar]="true" [sidebarTemplate]="sidebarTemplate">
|
||||
|
||||
<adf-viewer-toolbar-actions>
|
||||
<button mat-icon-button>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
.adf-viewer__sidebar {
|
||||
width: 380px !important;
|
||||
}
|
||||
@@ -15,26 +15,24 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import { MatSnackBar } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'app-file-view',
|
||||
templateUrl: 'file-view.component.html',
|
||||
styleUrls: ['file-view.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
templateUrl: 'file-view.component.html'
|
||||
})
|
||||
export class FileViewComponent implements OnInit {
|
||||
|
||||
nodeId: string = null;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private snackBar: MatSnackBar,
|
||||
private apiService: AlfrescoApiService) {
|
||||
}
|
||||
constructor(
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
private snackBar: MatSnackBar,
|
||||
private apiService: AlfrescoApiService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -55,7 +53,7 @@ export class FileViewComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
onUploadError(errorMessage: string) {
|
||||
uploadError(errorMessage: string) {
|
||||
this.snackBar.open(errorMessage, '', { duration: 4000 });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,13 +8,6 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</adf-toolbar-title>
|
||||
<adf-toolbar-divider fxFlex="0 0 auto"></adf-toolbar-divider>
|
||||
<button mat-icon-button
|
||||
[disabled]="!hasSelection(customSourcesDocumentList.selection)"
|
||||
title="{{ 'DOCUMENT_LIST.TOOLBAR.DOWNLOAD' | translate }}"
|
||||
[adfNodeDownload]="customSourcesDocumentList.selection">
|
||||
<mat-icon>get_app</mat-icon>
|
||||
</button>
|
||||
</adf-toolbar>
|
||||
<adf-document-list
|
||||
#customSourcesDocumentList
|
||||
|
||||
@@ -41,8 +41,4 @@ export class CustomSourcesComponent {
|
||||
{ title: 'My', value: '-my-' },
|
||||
{ title: 'Shared', value: '-shared-' }
|
||||
];
|
||||
|
||||
hasSelection(selection: any[]): boolean {
|
||||
return selection && selection.length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="container">
|
||||
|
||||
<mat-accordion *ngIf="showRecentFiles" class="adf-container-recent">
|
||||
<mat-accordion class="adf-container-recent">
|
||||
<mat-expansion-panel hideToggle="true">
|
||||
<mat-expansion-panel-header >
|
||||
<mat-panel-title>
|
||||
@@ -28,14 +28,14 @@
|
||||
</mat-expansion-panel>
|
||||
</mat-accordion>
|
||||
|
||||
<div *ngIf="showSitePicker" class="adf-site-container-style" id="site-container">
|
||||
<div class="adf-site-container-style" id="site-container">
|
||||
<adf-sites-dropdown (change)="onSiteChange($event)" [hideMyFiles]="false" [relations]="'members'">
|
||||
</adf-sites-dropdown>
|
||||
</div>
|
||||
<div class="document-list-container" fxLayout="row" fxLayoutAlign="start stretch" fxLayoutGap="16px">
|
||||
<adf-upload-drag-area fxFlex="1 1 auto"
|
||||
[disabled]="disableDragArea"
|
||||
[rootFolderId]="getDocumentListCurrentFolderId()"
|
||||
[parentId]="getDocumentListCurrentFolderId()"
|
||||
[versioning]="versioning"
|
||||
[adf-node-permission]="'create'"
|
||||
[adf-nodes]="disableDragArea ? getCurrentDocumentListNode() : []">
|
||||
@@ -67,31 +67,28 @@
|
||||
mat-icon-button
|
||||
title="{{ 'DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}"
|
||||
(click)="toogleGalleryView()">
|
||||
<mat-icon *ngIf="displayMode === 'list'" matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }}">view_comfy</mat-icon>
|
||||
<mat-icon *ngIf="displayMode === 'gallery'" matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.LISTVIEW' | translate }}">list</mat-icon>
|
||||
<mat-icon *ngIf="displayMode === 'list'" >view_comfy</mat-icon>
|
||||
<mat-icon *ngIf="displayMode === 'gallery'">list</mat-icon>
|
||||
</button>
|
||||
<button
|
||||
mat-icon-button
|
||||
[disabled]="!canCreateContent(documentList.folderNode)"
|
||||
title="{{ 'DOCUMENT_LIST.TOOLBAR.NEW_FOLDER' | translate }}"
|
||||
(error)="openSnackMessage($event)"
|
||||
[adf-create-folder]="getDocumentListCurrentFolderId()"
|
||||
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.NEW_FOLDER' | translate }}">
|
||||
[adf-create-folder]="getDocumentListCurrentFolderId()">
|
||||
<mat-icon>create_new_folder</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button
|
||||
[disabled]="!canEditFolder(documentList.selection)"
|
||||
title="{{ 'DOCUMENT_LIST.TOOLBAR.EDIT_FOLDER' | translate }}"
|
||||
(error)="openSnackMessage($event)"
|
||||
[adf-edit-folder]="documentList.selection[0]?.entry"
|
||||
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.EDIT_FOLDER' | translate }}">
|
||||
[adf-edit-folder]="documentList.selection[0]?.entry">
|
||||
<mat-icon>create</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button
|
||||
[disabled]="!hasSelection(documentList.selection)"
|
||||
title="{{ 'DOCUMENT_LIST.TOOLBAR.DOWNLOAD' | translate }}"
|
||||
[adfNodeDownload]="documentList.selection"
|
||||
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.DOWNLOAD' | translate }}">
|
||||
[adfNodeDownload]="documentList.selection">
|
||||
<mat-icon>get_app</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button
|
||||
@@ -99,15 +96,13 @@
|
||||
[adf-nodes]="documentList.selection"
|
||||
title="{{ 'DOCUMENT_LIST.TOOLBAR.DELETE' | translate }}"
|
||||
(delete)="onDeleteActionSuccess($event)"
|
||||
[adf-delete]="documentList.selection"
|
||||
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.DELETE' | translate }}">
|
||||
[adf-delete]="documentList.selection">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<button mat-icon-button
|
||||
[disabled]="!documentList.selection.length"
|
||||
#favorite="adfFavorite"
|
||||
[adf-node-favorite]="documentList.selection"
|
||||
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.FAVORITES' | translate }}">
|
||||
[adf-node-favorite]="documentList.selection">
|
||||
<mat-icon>
|
||||
{{ favorite.hasFavorites() ? 'star' :'star_border' }}
|
||||
</mat-icon>
|
||||
@@ -115,15 +110,14 @@
|
||||
<button mat-icon-button
|
||||
[disabled]="!documentList.selection.length"
|
||||
[baseShareUrl]="baseShareUrl"
|
||||
[adf-share]="documentList.selection[0]"
|
||||
matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.SHARE' | translate }}">
|
||||
[adf-share]="documentList.selection[0]">
|
||||
<mat-icon>
|
||||
share
|
||||
</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button fxFlex="1 0 auto" mat-icon-button [matMenuTriggerFor]="themePicker" matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.THEME' | translate }}">
|
||||
<button fxFlex="1 0 auto" mat-icon-button [matMenuTriggerFor]="themePicker">
|
||||
<mat-icon>format_color_fill</mat-icon>
|
||||
</button>
|
||||
|
||||
@@ -135,8 +129,8 @@
|
||||
</mat-menu>
|
||||
|
||||
<button mat-icon-button (click)="showVersions = !showVersions" class="adf-show-versions-button">
|
||||
<mat-icon *ngIf="!showVersions" matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.SHOW_VERSION' | translate }}">chevron_left</mat-icon>
|
||||
<mat-icon *ngIf="showVersions" matTooltip="{{ 'DOCUMENT_LIST.TOOLBAR.HIDE_VERSION' | translate }}">chevron_right</mat-icon>
|
||||
<mat-icon *ngIf="!showVersions">chevron_left</mat-icon>
|
||||
<mat-icon *ngIf="showVersions">chevron_right</mat-icon>
|
||||
</button>
|
||||
|
||||
<adf-toolbar-divider fxFlex="0 0 auto" fxHide fxShow.lt-sm="true"></adf-toolbar-divider>
|
||||
@@ -194,9 +188,6 @@
|
||||
[display]="displayMode"
|
||||
[node]="nodeResult"
|
||||
[includeFields]="includeFields"
|
||||
[sorting]="sorting"
|
||||
[sortingMode]="sortingMode"
|
||||
[showHeader]="showHeader"
|
||||
(error)="onNavigationError($event)"
|
||||
(success)="resetError()"
|
||||
(ready)="emitReadyEvent($event)"
|
||||
@@ -218,7 +209,6 @@
|
||||
class="image-table-cell">
|
||||
</data-column>
|
||||
<data-column
|
||||
*ngIf="showNameColumn"
|
||||
key="name"
|
||||
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
|
||||
[formatTooltip]="getNodeNameTooltip"
|
||||
@@ -276,25 +266,6 @@
|
||||
</data-columns>
|
||||
|
||||
<content-actions>
|
||||
<!-- Conditional actions demo -->
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="Download this file now!"
|
||||
handler="download"
|
||||
[visible]="canDownloadNode">
|
||||
</content-action>
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="Never see this action again"
|
||||
handler="download"
|
||||
[visible]="false">
|
||||
</content-action>
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="This can be toggled"
|
||||
handler="download"
|
||||
[visible]="showCustomDownloadAction">
|
||||
</content-action>
|
||||
<!-- common actions -->
|
||||
<content-action
|
||||
icon="get_app"
|
||||
@@ -374,7 +345,7 @@
|
||||
(prevPage)="onPrevPage($event)">
|
||||
</adf-pagination>
|
||||
<adf-infinite-pagination
|
||||
[hidden]="!infiniteScrolling"
|
||||
*ngIf="infiniteScrolling"
|
||||
[target]="documentList"
|
||||
[loading]="documentList.infiniteLoading">
|
||||
{{ 'ADF-DOCUMENT-LIST.LAYOUT.LOAD_MORE' | translate }}
|
||||
@@ -419,7 +390,7 @@
|
||||
</adf-start-process>
|
||||
</div>
|
||||
|
||||
<div *ngIf="showSettingsPanel" class="adf-content-service-settings">
|
||||
<div class="adf-content-service-settings">
|
||||
|
||||
<p>Current folder ID: {{ documentList.currentFolderId }}</p>
|
||||
|
||||
@@ -433,18 +404,6 @@
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<section>
|
||||
<mat-slide-toggle color="primary" [(ngModel)]="showNameColumn">
|
||||
Show Name Column
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle color="primary" [(ngModel)]="showCustomDownloadAction">
|
||||
Toggle custom download action
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle [color]="'primary'" [(ngModel)]="multiselect">{{'DOCUMENT_LIST.MULTISELECT_CHECKBOXES' |
|
||||
translate}}
|
||||
@@ -482,7 +441,7 @@
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle color="primary" (click)="onInfiniteScrolling()">
|
||||
<mat-slide-toggle color="primary" [(ngModel)]="infiniteScrolling">
|
||||
{{'DOCUMENT_LIST.ENABLE_INFINITE_SCROLL' | translate}}
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
.adf-manage-versions-sidebar {
|
||||
width: 360px !important;
|
||||
width: 300px !important;
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
|
||||
.adf-manage-versions-empty,
|
||||
@@ -79,12 +79,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
& .adf-info-drawer-layout-header {
|
||||
display: none !important;
|
||||
& ::ng-deep .adf-info-drawer-layout-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
& .adf-info-drawer-layout-content {
|
||||
padding: 10px !important;
|
||||
& ::ng-deep .adf-info-drawer-layout-content {
|
||||
padding: 0;
|
||||
|
||||
.adf-version-upload,
|
||||
.adf-new-version-file-upload {
|
||||
width: 100%;
|
||||
|
||||
& .mat-raised-button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.adf-new-version-uploader-container {
|
||||
padding: 8px 24px 16px 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,13 +143,13 @@
|
||||
.adf-datatable-table-cell-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.adf-data-table-cell:first-child,
|
||||
.adf-datatable-table-cell-header:first-child,
|
||||
.adf-data-table-cell:nth-child(2),
|
||||
.adf-datatable-table-cell-header:nth-child(2) {
|
||||
display: table-cell;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.adf-site-container-style {
|
||||
@@ -159,11 +172,11 @@
|
||||
|
||||
@media (max-device-width: 1024px) {
|
||||
adf-document-list .adf-data-table {
|
||||
|
||||
|
||||
.adf-data-table-cell:nth-child(4),
|
||||
.adf-datatable-table-cell-header:nth-child(4) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
AuthenticationService, AppConfigService, ContentService, TranslationService,
|
||||
FileUploadEvent, FolderCreatedEvent, LogService, NotificationService,
|
||||
UploadService, DataColumn, DataRow, UserPreferencesService,
|
||||
PaginationComponent, FormValues, DisplayMode, UserPreferenceValues, InfinitePaginationComponent
|
||||
PaginationComponent, FormValues, DisplayMode, UserPreferenceValues
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
import { DocumentListComponent, PermissionStyleModel } from '@alfresco/adf-content-services';
|
||||
@@ -74,24 +74,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
processId;
|
||||
|
||||
@Input()
|
||||
sorting = ['name', 'asc'];
|
||||
|
||||
@Input()
|
||||
sortingMode = 'client';
|
||||
|
||||
@Input()
|
||||
showRecentFiles = true;
|
||||
|
||||
@Input()
|
||||
showSitePicker = true;
|
||||
|
||||
@Input()
|
||||
showSettingsPanel = true;
|
||||
|
||||
@Input()
|
||||
showHeader = true;
|
||||
|
||||
@Input()
|
||||
selectionMode = 'multiple';
|
||||
|
||||
@@ -137,9 +119,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@Input()
|
||||
disableDragArea = false;
|
||||
|
||||
@Input()
|
||||
showNameColumn = true;
|
||||
|
||||
@Output()
|
||||
documentListReady: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@@ -167,12 +146,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@ViewChild('standardPagination')
|
||||
standardPagination: PaginationComponent;
|
||||
|
||||
@ViewChild(InfinitePaginationComponent)
|
||||
infinitePaginationComponent: InfinitePaginationComponent;
|
||||
|
||||
@Input()
|
||||
showCustomDownloadAction = false;
|
||||
|
||||
permissionsStyle: PermissionStyleModel[] = [];
|
||||
infiniteScrolling: boolean;
|
||||
supportedPages: number[];
|
||||
@@ -373,6 +346,9 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
private reloadForInfiniteScrolling() {
|
||||
if (this.infiniteScrolling) {
|
||||
this.documentList.skipCount = 0;
|
||||
}
|
||||
this.documentList.reload();
|
||||
}
|
||||
|
||||
@@ -483,7 +459,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
this.turnedNextPage.emit(event);
|
||||
}
|
||||
|
||||
loadNextBatch(event: Pagination): void {
|
||||
loadNextBatch(event: Pagination) {
|
||||
this.loadNext.emit(event);
|
||||
}
|
||||
|
||||
@@ -505,17 +481,4 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
this.location.go(url);
|
||||
}
|
||||
}
|
||||
|
||||
onInfiniteScrolling(): void {
|
||||
this.infiniteScrolling = !this.infiniteScrolling;
|
||||
this.infinitePaginationComponent.reset();
|
||||
this.reloadForInfiniteScrolling();
|
||||
}
|
||||
|
||||
canDownloadNode = (node: MinimalNodeEntity): boolean => {
|
||||
if (node && node.entry && node.entry.name === 'For Sale.docx') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
<header mat-dialog-title>{{'VERSION.DIALOG.TITLE' | translate}}</header>
|
||||
|
||||
<section>
|
||||
<mat-slide-toggle color="primary" [(ngModel)]="readOnly">
|
||||
{{'APP.ADF_VERSION_MANAGER.READ_ONLY' | translate}}
|
||||
</mat-slide-toggle>
|
||||
</section>
|
||||
|
||||
<section mat-dialog-content *ngIf="!readOnly">
|
||||
<section mat-dialog-content>
|
||||
<adf-version-manager [node]="contentEntry" [allowDownload]="allowDownload" [showComments]="showComments" (uploadError)="uploadError($event)"></adf-version-manager>
|
||||
</section>
|
||||
<section mat-dialog-content *ngIf="readOnly">
|
||||
<adf-version-list [node]="contentEntry" [showActions]="false" ></adf-version-list>
|
||||
</section>
|
||||
|
||||
<footer mat-dialog-actions fxLayout="row" fxLayoutAlign="end center">
|
||||
<button mat-button (click)="close()">{{'VERSION.DIALOG.CLOSE' | translate}}</button>
|
||||
</footer>
|
||||
|
||||
@@ -30,7 +30,6 @@ export class VersionManagerDialogAdapterComponent {
|
||||
|
||||
showComments = true;
|
||||
allowDownload = true;
|
||||
readOnly = false;
|
||||
|
||||
constructor(@Inject(MAT_DIALOG_DATA) data: any,
|
||||
private snackBar: MatSnackBar,
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
[disableCsrf]="disableCsrf"
|
||||
[showLoginActions]="showFooter"
|
||||
[showRememberMe]="showFooter"
|
||||
copyrightText="{{ 'application.copyright' | adfAppConfig }}"
|
||||
copyrightText="© 2016 Alfresco Software, Inc. All Rights Reserved. (customised text)"
|
||||
(success)="onLogin($event)"
|
||||
(error)="onError($event)">
|
||||
<div class="mobile-settings">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
.toggle {
|
||||
width: auto;
|
||||
width: 190px;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
@@ -49,4 +49,4 @@
|
||||
.settings ::ng-deep .mat-slide-toggle-thumb-container {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,11 @@
|
||||
<button mat-raised-button
|
||||
[color]="toggleStatus?'accent':'primary'"
|
||||
adf-inherit-permission [nodeId]="nodeId"
|
||||
(error)="showErrorMessage($event)"
|
||||
(updated)="onUpdatedPermissions($event)">
|
||||
{{ (toggleStatus?'DEMO_PERMISSION.INHERITED_PERMISSIONS_BUTTON':'DEMO_PERMISSION.INHERIT_PERMISSION_BUTTON') | translate}}</button>
|
||||
<button mat-button color="primary" (click)="openAddPermissionDialog($event)">Add User or Group</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<adf-permission-list #permissionList
|
||||
[nodeId]="nodeId"
|
||||
(update)="reloadList()"
|
||||
(error)="showErrorMessage($event)">
|
||||
<adf-permission-list #permissionList [nodeId]="nodeId">
|
||||
</adf-permission-list>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.inherit_permission_button {
|
||||
padding-top: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
import { Component, Optional, OnInit, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, Params} from '@angular/router';
|
||||
import { PermissionListComponent, NodePermissionDialogService } from '@alfresco/adf-content-services';
|
||||
import { PermissionListComponent } from '@alfresco/adf-content-services';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { NodesApiService, NotificationService } from '@alfresco/adf-core';
|
||||
import { NodesApiService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-permissions',
|
||||
@@ -35,9 +35,7 @@ export class DemoPermissionComponent implements OnInit {
|
||||
toggleStatus = false;
|
||||
|
||||
constructor(@Optional() private route: ActivatedRoute,
|
||||
private nodeService: NodesApiService,
|
||||
private nodePermissionDialogService: NodePermissionDialogService,
|
||||
private notificationService: NotificationService) {
|
||||
private nodeService: NodesApiService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -58,24 +56,4 @@ export class DemoPermissionComponent implements OnInit {
|
||||
this.displayPermissionComponent.reload();
|
||||
}
|
||||
|
||||
reloadList() {
|
||||
this.displayPermissionComponent.reload();
|
||||
}
|
||||
|
||||
openAddPermissionDialog(event: Event) {
|
||||
this.nodePermissionDialogService.updateNodePermissionByDialog(this.nodeId).subscribe(() => {
|
||||
this.displayPermissionComponent.reload();
|
||||
},
|
||||
(error) => {
|
||||
this.showErrorMessage(error);
|
||||
});
|
||||
}
|
||||
|
||||
showErrorMessage(error) {
|
||||
this.notificationService.openSnackMessage(
|
||||
error,
|
||||
4000
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
<div class="adf-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
|
||||
<div class="adf-grid-item adf-tasks-menu" fxFlex.gt-md="225px">
|
||||
<div class="adf-list-buttons">
|
||||
<adf-sidebar-action-menu [expanded]="true" [width]="205" title="{{'ADF_SIDEBAR_ACTION_MENU.BUTTON.CREATE' | translate}}">
|
||||
<adf-sidebar-action-menu [expanded]="true" title="{{'ADF_SIDEBAR_ACTION_MENU.BUTTON.CREATE' | translate}}">
|
||||
<mat-icon sidebar-menu-title-icon >arrow_drop_down</mat-icon>
|
||||
<div sidebar-menu-options>
|
||||
<button mat-menu-item data-automation-id="btn-start-task" (click)="navigateStartTask()">
|
||||
<mat-icon>assessment</mat-icon>
|
||||
<span>{{'ADF_SIDEBAR_ACTION_MENU.BUTTON.NEW_TASK' | translate}}</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -18,7 +17,7 @@
|
||||
<adf-accordion-group [heading]="'Tasks'" [isSelected]="true" [isOpen]="true"
|
||||
[headingIcon]="'assignment'">
|
||||
<adf-filters
|
||||
[filterParam]="filterSelected"
|
||||
[filterParam]="{name:'MY tasks'}"
|
||||
[appId]="appId"
|
||||
[hasIcon]="false"
|
||||
(filterClick)="onTaskFilterClick($event)"
|
||||
@@ -109,11 +108,10 @@
|
||||
<div class="adf-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
|
||||
<div class="adf-grid-item adf-processes-menu" fxFlex.gt-md="225px">
|
||||
<div class="adf-list-buttons">
|
||||
<adf-sidebar-action-menu [expanded]="true" [width]="205" title="{{'ADF_SIDEBAR_ACTION_MENU.BUTTON.CREATE' | translate}}">
|
||||
<adf-sidebar-action-menu [expanded]="true" title="{{'ADF_SIDEBAR_ACTION_MENU.BUTTON.CREATE' | translate}}">
|
||||
<mat-icon sidebar-menu-title-icon >arrow_drop_down</mat-icon>
|
||||
<div sidebar-menu-options>
|
||||
<button mat-menu-item data-automation-id="btn-start-process" (click)="navigateStartProcess()">
|
||||
<mat-icon>assessment</mat-icon>
|
||||
<span>{{'ADF_SIDEBAR_ACTION_MENU.BUTTON.NEW_PROCESS' | translate}}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -109,9 +109,6 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
@Input()
|
||||
appId: number = null;
|
||||
|
||||
@Input()
|
||||
filterSelected: object = null;
|
||||
|
||||
@Output()
|
||||
changePageSize: EventEmitter<Pagination> = new EventEmitter();
|
||||
|
||||
@@ -216,9 +213,6 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
}
|
||||
this.sub = this.route.params.subscribe(params => {
|
||||
const applicationId = params['appId'];
|
||||
|
||||
this.filterSelected = params['filterId'] ? { id: params['filterId'] } : { index: 0 };
|
||||
|
||||
if (applicationId && applicationId !== '0') {
|
||||
this.appId = params['appId'];
|
||||
}
|
||||
@@ -240,7 +234,6 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
onTaskFilterClick(filter: FilterRepresentationModel): void {
|
||||
this.applyTaskFilter(filter);
|
||||
this.resetTaskPaginationPage();
|
||||
this.router.navigate(['/activiti/apps', this.appId || 0, 'tasks', filter.id]);
|
||||
}
|
||||
|
||||
resetTaskPaginationPage() {
|
||||
@@ -250,12 +243,6 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
onTabChange(event: any): void {
|
||||
this.showProcessPagination = event.index === 1;
|
||||
this.paginationPageSize = this.preferenceService.paginationSize;
|
||||
if (this.processList) {
|
||||
this.processList.reload();
|
||||
}
|
||||
if (this.taskList) {
|
||||
this.taskList.reload();
|
||||
}
|
||||
}
|
||||
|
||||
onChangePageSize(event: Pagination): void {
|
||||
@@ -342,10 +329,14 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
}
|
||||
|
||||
navigateStartProcess(): void {
|
||||
this.resetProcessFilters();
|
||||
this.reloadProcessFilters();
|
||||
this.currentProcessInstanceId = currentProcessIdNew;
|
||||
}
|
||||
|
||||
navigateStartTask(): void {
|
||||
this.resetTaskFilters();
|
||||
this.reloadTaskFilters();
|
||||
this.currentTaskId = currentTaskIdNew;
|
||||
}
|
||||
|
||||
@@ -376,12 +367,15 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
|
||||
onFormCompleted(form): void {
|
||||
this.currentTaskId = null;
|
||||
if (this.taskListPagination) {
|
||||
this.taskPage = this.taskListPagination.current - 1;
|
||||
}
|
||||
if (!this.taskList) {
|
||||
this.taskPage = this.taskListPagination.current - 1;
|
||||
if (this.taskList) {
|
||||
this.taskList.reload();
|
||||
} else {
|
||||
this.navigateToProcess();
|
||||
}
|
||||
if (this.processList) {
|
||||
this.processList.reload();
|
||||
}
|
||||
}
|
||||
|
||||
navigateToProcess(): void {
|
||||
@@ -446,6 +440,14 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
this.currentTaskId = taskId;
|
||||
}
|
||||
|
||||
private resetProcessFilters(): void {
|
||||
this.processFilter = null;
|
||||
}
|
||||
|
||||
private resetTaskFilters(): void {
|
||||
this.taskFilter = null;
|
||||
}
|
||||
|
||||
private reloadProcessFilters(): void {
|
||||
this.activitiprocessfilter.selectFilter(this.activitiprocessfilter.getCurrentFilter());
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { MinimalNodeEntity } from 'alfresco-js-api';
|
||||
import { PreviewService } from '../../services/preview.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-search-bar',
|
||||
@@ -27,7 +26,7 @@ import { PreviewService } from '../../services/preview.service';
|
||||
})
|
||||
export class SearchBarComponent {
|
||||
|
||||
constructor(public router: Router, private preview: PreviewService) {
|
||||
constructor(public router: Router) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,7 +43,7 @@ export class SearchBarComponent {
|
||||
|
||||
onItemClicked(event: MinimalNodeEntity) {
|
||||
if (event.entry.isFile) {
|
||||
this.preview.showResource(event.entry.id);
|
||||
this.router.navigate(['/files', event.entry.id, 'view']);
|
||||
} else if (event.entry.isFolder) {
|
||||
this.router.navigate(['/files', event.entry.id]);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[maxResults]="maxItems"
|
||||
[skipResults]="skipCount"
|
||||
(resultLoaded)="onSearchResultLoaded($event)"
|
||||
#searchResult>
|
||||
#search>
|
||||
</adf-search>
|
||||
|
||||
<div class="adf-search-results__facets">
|
||||
@@ -14,26 +14,17 @@
|
||||
<adf-search-filter #searchFilter></adf-search-filter>
|
||||
|
||||
<div class="adf-search-results__content">
|
||||
<div class="adf-search-results__sorting">
|
||||
<adf-search-sorting-picker></adf-search-sorting-picker>
|
||||
</div>
|
||||
<app-files-component
|
||||
[showHeader]="false"
|
||||
[sorting]="sorting"
|
||||
[sortingMode]="'server'"
|
||||
[showRecentFiles]="false"
|
||||
[showSitePicker]="false"
|
||||
[showSettingsPanel]="false"
|
||||
[currentFolderId]="null"
|
||||
[nodeResult]="resultNodePageList"
|
||||
[disableDragArea]="true"
|
||||
[pagination]="pagination"
|
||||
(changedPageSize)="onRefreshPagination($event)"
|
||||
(changedPageNumber)="onRefreshPagination($event)"
|
||||
(turnedNextPage)="onRefreshPagination($event)"
|
||||
(loadNext)="onRefreshPagination($event)"
|
||||
(turnedPreviousPage)="onRefreshPagination($event)"
|
||||
(deleteElementSuccess)="onDeleteElementSuccess($event)">
|
||||
[currentFolderId]="null"
|
||||
[nodeResult]="resultNodePageList"
|
||||
[disableDragArea]="true"
|
||||
[pagination]="pagination"
|
||||
(changedPageSize)="onRefreshPagination($event)"
|
||||
(changedPageNumber)="onRefreshPagination($event)"
|
||||
(turnedNextPage)="onRefreshPagination($event)"
|
||||
(loadNext)="onRefreshPagination($event)"
|
||||
(turnedPreviousPage)="onRefreshPagination($event)"
|
||||
(deleteElementSuccess)="onDeleteElementSuccess($event)">
|
||||
</app-files-component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
&__content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&__sorting {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
div.search-results-container {
|
||||
|
||||
@@ -19,27 +19,24 @@ import { Component, OnInit, Optional, ViewChild } from '@angular/core';
|
||||
import { Router, ActivatedRoute, Params } from '@angular/router';
|
||||
import { NodePaging, Pagination } from 'alfresco-js-api';
|
||||
import { SearchComponent, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||
import { UserPreferencesService, SearchService } from '@alfresco/adf-core';
|
||||
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-search-result-component',
|
||||
templateUrl: './search-result.component.html',
|
||||
styleUrls: ['./search-result.component.scss'],
|
||||
providers: [SearchService]
|
||||
styleUrls: ['./search-result.component.scss']
|
||||
})
|
||||
export class SearchResultComponent implements OnInit {
|
||||
|
||||
@ViewChild('searchResult')
|
||||
searchResult: SearchComponent;
|
||||
@ViewChild('search')
|
||||
search: SearchComponent;
|
||||
|
||||
queryParamName = 'q';
|
||||
searchedWord = '';
|
||||
resultNodePageList: NodePaging;
|
||||
pagination: Pagination;
|
||||
maxItems: number;
|
||||
skipCount = 0;
|
||||
|
||||
sorting = ['name', 'asc'];
|
||||
pagination: Pagination;
|
||||
|
||||
constructor(public router: Router,
|
||||
private preferences: UserPreferencesService,
|
||||
@@ -47,19 +44,12 @@ export class SearchResultComponent implements OnInit {
|
||||
@Optional() private route: ActivatedRoute) {
|
||||
this.maxItems = this.preferences.paginationSize;
|
||||
queryBuilder.paging = {
|
||||
maxItems: this.preferences.paginationSize,
|
||||
maxItems: this.maxItems,
|
||||
skipCount: 0
|
||||
};
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.sorting = this.getSorting();
|
||||
|
||||
this.queryBuilder.updated.subscribe(() => {
|
||||
this.sorting = this.getSorting();
|
||||
});
|
||||
|
||||
if (this.route) {
|
||||
this.route.params.forEach((params: Params) => {
|
||||
this.searchedWord = params.hasOwnProperty(this.queryParamName) ? params[this.queryParamName] : null;
|
||||
@@ -67,11 +57,12 @@ export class SearchResultComponent implements OnInit {
|
||||
this.queryBuilder.update();
|
||||
});
|
||||
}
|
||||
this.maxItems = this.preferences.paginationSize;
|
||||
}
|
||||
|
||||
onSearchResultLoaded(nodePaging: NodePaging) {
|
||||
this.resultNodePageList = nodePaging;
|
||||
this.pagination = {...nodePaging.list.pagination };
|
||||
this.pagination = nodePaging.list.pagination;
|
||||
}
|
||||
|
||||
onRefreshPagination(pagination: Pagination) {
|
||||
@@ -86,16 +77,6 @@ export class SearchResultComponent implements OnInit {
|
||||
}
|
||||
|
||||
onDeleteElementSuccess(element: any) {
|
||||
this.searchResult.reload();
|
||||
}
|
||||
|
||||
private getSorting(): string[] {
|
||||
const primary = this.queryBuilder.getPrimarySorting();
|
||||
|
||||
if (primary) {
|
||||
return [primary.key, primary.ascending ? 'asc' : 'desc'];
|
||||
}
|
||||
|
||||
return ['name', 'asc'];
|
||||
this.search.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<div class="inner-layout__content">
|
||||
|
||||
<adf-document-list #documentList
|
||||
[attr.class]="documentList.isEmpty() ? 'empty-list' : ''"
|
||||
currentFolderId="-trashcan-"
|
||||
selectionMode="multiple"
|
||||
[multiselect]="true"
|
||||
@@ -40,12 +41,12 @@
|
||||
|
||||
<empty-folder-content>
|
||||
<ng-template>
|
||||
<adf-empty-content
|
||||
icon="delete"
|
||||
[title]="'TRASHCAN.EMPTY_STATE.TITLE'">
|
||||
<p class="adf-empty-content__text">{{ 'TRASHCAN.EMPTY_STATE.FIRST_TEXT' | translate }}</p>
|
||||
<p class="adf-empty-content__text">{{ 'TRASHCAN.EMPTY_STATE.SECOND_TEXT' | translate }}</p>
|
||||
</adf-empty-content>
|
||||
<div class="empty-list__block">
|
||||
<mat-icon>delete</mat-icon>
|
||||
<p class="empty-list__title">{{ 'TRASHCAN.EMPTY_STATE.TITLE' | translate }}</p>
|
||||
<p class="empty-list__text">{{ 'TRASHCAN.EMPTY_STATE.FIRST_TEXT' | translate }}</p>
|
||||
<p class="empty-list__text">{{ 'TRASHCAN.EMPTY_STATE.SECOND_TEXT' | translate }}</p>
|
||||
</div>
|
||||
</ng-template>
|
||||
</empty-folder-content>
|
||||
|
||||
@@ -77,7 +78,7 @@
|
||||
key="archivedAt"
|
||||
title="DOCUMENT_LIST.COLUMNS.DELETED_ON">
|
||||
<ng-template let-value="value">
|
||||
<span title="{{ value | date:'medium' }}">{{ value | adfTimeAgo: currentLocale }}</span>
|
||||
<span title="{{ value | date:'medium' }}">{{ value | adfTimeAgo }}</span>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
|
||||
|
||||
@@ -37,17 +37,12 @@ export class TrashcanComponent {
|
||||
documentList: DocumentListComponent;
|
||||
|
||||
supportedPages = [];
|
||||
currentLocale;
|
||||
|
||||
constructor(private preference: UserPreferencesService) {
|
||||
this.preference.select(UserPreferenceValues.SupportedPageSizes)
|
||||
.subscribe((pages) => {
|
||||
this.supportedPages = pages;
|
||||
});
|
||||
|
||||
this.preference.select(UserPreferenceValues.Locale).subscribe((locale) => {
|
||||
this.currentLocale = locale;
|
||||
});
|
||||
}
|
||||
|
||||
refresh() {
|
||||
|
||||
@@ -24,6 +24,7 @@ $theme: mat-light-theme($primary, $accent, $warn);
|
||||
@include adf-login-component-theme($theme);
|
||||
@include adf-process-service-component-theme($theme);
|
||||
|
||||
|
||||
@include adf-content-services-theme($theme);
|
||||
@include adf-process-services-theme($theme);
|
||||
@include adf-insights-theme($theme);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE9, IE10 and IE11 requires all of the following polyfills. */
|
||||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
||||
import 'core-js/es6/symbol';
|
||||
import 'core-js/es6/object';
|
||||
import 'core-js/es6/function';
|
||||
@@ -39,12 +39,13 @@ import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
/** IE10 and IE11 requires the following to support `@angular/animation`. */
|
||||
import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
/** Evergreen browsers require these. */
|
||||
/** Evergreen browsers require these. **/
|
||||
import 'core-js/es6/reflect';
|
||||
import 'core-js/es7/reflect';
|
||||
import 'core-js/es6/array';
|
||||
import 'core-js/es7/array';
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by Angular itself.
|
||||
*/
|
||||
@@ -70,3 +71,4 @@ import 'intl/locale-data/jsonp/en';
|
||||
* */
|
||||
|
||||
import 'custom-event-polyfill/custom-event-polyfill'; // Run `npm install --save custom-event-polyfill`.
|
||||
|
||||
|
||||
+18
-6
@@ -1,20 +1,32 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import 'zone.js/dist/long-stack-trace-zone';
|
||||
import 'zone.js/dist/proxy.js';
|
||||
import 'zone.js/dist/sync-test';
|
||||
import 'zone.js/dist/jasmine-patch';
|
||||
import 'zone.js/dist/async-test';
|
||||
import 'zone.js/dist/fake-async-test';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
||||
declare var __karma__: any;
|
||||
declare var require: any;
|
||||
|
||||
// Prevent Karma from running prematurely.
|
||||
__karma__.loaded = function () {};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
// Finally, start Karma to run the tests.
|
||||
__karma__.start();
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
"types": [],
|
||||
"paths": {
|
||||
"alfresco-js-api": [
|
||||
"../../node_modules/alfresco-js-api/dist/alfresco-js-api.js"
|
||||
"../node_modules/alfresco-js-api/dist/alfresco-js-api.js"
|
||||
],
|
||||
"rxjs/*": [
|
||||
"../../node_modules/rxjs/*"
|
||||
"../node_modules/rxjs/*"
|
||||
],
|
||||
"@angular/*": [
|
||||
"../../node_modules/@angular/*"
|
||||
"../node_modules/@angular/*"
|
||||
],
|
||||
"@alfresco/adf-core": [
|
||||
"../../lib/core"
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/spec",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"module": "es2015",
|
||||
"rootDir": "..",
|
||||
"baseUrl": ".",
|
||||
"skipLibCheck": false,
|
||||
@@ -13,13 +12,13 @@
|
||||
],
|
||||
"paths": {
|
||||
"alfresco-js-api": [
|
||||
"../../node_modules/alfresco-js-api/dist/alfresco-js-api.js"
|
||||
"../node_modules/alfresco-js-api/dist/alfresco-js-api.js"
|
||||
],
|
||||
"rxjs/*": [
|
||||
"../../node_modules/rxjs/*"
|
||||
"../node_modules/rxjs/*"
|
||||
],
|
||||
"@angular/*": [
|
||||
"../../node_modules/@angular/*"
|
||||
"../node_modules/@angular/*"
|
||||
],
|
||||
"@alfresco/adf-core": [
|
||||
"../../lib/core"
|
||||
@@ -36,22 +35,8 @@
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"**/e2e/*.ts",
|
||||
"**/*.e2e-spec.ts",
|
||||
"**/*.po.ts",
|
||||
"**/integration/*.*",
|
||||
"**/lib/*.*",
|
||||
"node_modules",
|
||||
"tmp"
|
||||
],
|
||||
"include": [
|
||||
"**/*.ts"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": false
|
||||
},
|
||||
"files": [
|
||||
"test.ts",
|
||||
"polyfills.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/out-tsc",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"rulesDirectory": [
|
||||
"../node_modules/codelyzer",
|
||||
"../tools/tslint-rules/"
|
||||
"node_modules/codelyzer"
|
||||
],
|
||||
"rules": {
|
||||
"arrow-return-shorthand": true,
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
Added: v2.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-03
|
||||
---
|
||||
|
||||
# Add Permission Dialog Component
|
||||
|
||||
Allow user to search people or group that could be added to the current node permissions.
|
||||
|
||||

|
||||
|
||||
## Basic Usage
|
||||
|
||||
```ts
|
||||
import { NodePermissionDialogService } from '@alfresco/adf-content-services';
|
||||
|
||||
constructor(private nodePermissionDialogService: nodePermissionDialogService) {
|
||||
}
|
||||
|
||||
this.nodePermissionDialogService.openAddPermissionDialog(this.nodeId).subscribe((selectedNodes) => {
|
||||
//action for selected nodes
|
||||
},
|
||||
(error) => {
|
||||
this.showErrorMessage(error);
|
||||
});
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeId | `string` | "" | |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| success | `EventEmitter<MinimalNodeEntryEntity>` | |
|
||||
| error | `EventEmitter<any>` | |
|
||||
|
||||
## Details
|
||||
|
||||
This component extends the [Add permission panel component](../add-permission-panel.component.md)
|
||||
and apply the action confirm when the selection made is accepted.
|
||||
The dialog will be opened via the nodePermissionDialogService which will provide an Observable to subscribe to for getting the node selected.
|
||||
In case you want the dialog service to take care of update the current node you can call `updateNodePermissionByDialog` in this way :
|
||||
|
||||
```ts
|
||||
import { NodePermissionDialogService } from '@alfresco/adf-content-services';
|
||||
|
||||
constructor(private nodePermissionDialogService: nodePermissionDialogService) {
|
||||
}
|
||||
|
||||
this.nodePermissionDialogService.updateNodePermissionByDialog(this.nodeId).subscribe((node) => {
|
||||
//updated node
|
||||
},
|
||||
(error) => {
|
||||
this.showErrorMessage(error);
|
||||
});
|
||||
```
|
||||
@@ -1,37 +0,0 @@
|
||||
---
|
||||
Added: v2.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-03
|
||||
---
|
||||
|
||||
# Add Permission Component
|
||||
|
||||
Allow user to search people or group that could be added to the current node permissions.
|
||||
|
||||

|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<adf-add-permission [nodeId]="nodeId"
|
||||
(success)="onSuccess($event)" (error)="onError($event)">
|
||||
</adf-add-permission>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| select | `EventEmitter<MinimalNodeEntryEntity>` | |
|
||||
|
||||
## Details
|
||||
This component uses a [Search component](../search.component.md) to retrieve the
|
||||
groups and people that could be added to the permission list of the current node.
|
||||
The `select` event will be emitted when a result is clicked from the list.
|
||||
@@ -1,40 +0,0 @@
|
||||
---
|
||||
Added: v2.4.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-03
|
||||
---
|
||||
|
||||
# Add Permission Component
|
||||
|
||||
Searches for people or groups to add to the current node permissions.
|
||||
|
||||

|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<adf-add-permission [nodeId]="nodeId"
|
||||
(success)="onSuccess($event)" (error)="onError($event)">
|
||||
</adf-add-permission>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeId | `string` | | ID of the target node. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs during the update. |
|
||||
| success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the node is updated successfully. |
|
||||
|
||||
## Details
|
||||
|
||||
This component extends the [Add permission panel component](../add-permission-panel.component.md)
|
||||
and apply the action confirm when the selection made is accepted.
|
||||
|
||||
@@ -19,23 +19,21 @@ Indicates the current position within a navigation hierarchy.
|
||||
</adf-breadcrumb>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| folderNode | `MinimalNodeEntryEntity` | null | Active node, builds UI based on folderNode.path.elements collection. |
|
||||
| root | `string` | null | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value. |
|
||||
| rootId | `string` | null | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| folderNode | `MinimalNodeEntryEntity` | `null` | Active node, builds UI based on folderNode.path.elements collection. |
|
||||
| root | `string` | `null` | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value. |
|
||||
| rootId | `string` | `null` | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
|
||||
| target | `DocumentListComponent` | | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. |
|
||||
| transform | `function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
|
||||
| transform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. |
|
||||
| ---- | ---- | ----------- |
|
||||
| navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. |
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Content Action component
|
||||
|
||||
Adds options to a Document List actions menu for a particular content type.
|
||||
@@ -13,8 +12,6 @@ Adds options to a Document List actions menu for a particular content type.
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
|
||||
@@ -79,29 +76,26 @@ export class MyView {
|
||||
}
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| disableWithNoPermission | `boolean` | | Should this action be disabled in the menu if the user doesn't have permission for it? |
|
||||
| disabled | `boolean` | false | Is the menu item disabled? |
|
||||
| handler | `string` | | System actions. Can be "delete", "download", "copy" or "move". |
|
||||
| icon | `string` | | The name of the icon to display next to the menu command (can be left blank). |
|
||||
| permission | `string` | | The permission type. |
|
||||
| target | `string` | ContentActionTarget.All | Type of item that the action applies to. Can be "document" or "folder" |
|
||||
| title | `string` | "Action" | The title of the action as shown in the menu. |
|
||||
| visible | `boolean` or `Function` | Visibility state (see examples further in the document) |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| title | `string` | `'Action'` | The title of the action as shown in the menu. If the title is a translation key the translation will be automatically showed. |
|
||||
| icon | `string` | | The name of the icon to display next to the menu command (can be left blank). |
|
||||
| handler | `string` | | System actions. Can be "delete", "download", "copy" or "move". |
|
||||
| target | `string` | [ContentActionTarget.All](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/content-services/document-list/models/content-action.model.ts) | Type of item that the action applies to. Can be one of the values provided by the enum : **All**, **Folder**, **Document** |
|
||||
| permission | `string` | | The permission type. |
|
||||
| disableWithNoPermission | `boolean` | | Should this action be disabled in the menu if the user doesn't have permission for it? |
|
||||
| disabled | `boolean` | `false` | Is the menu item disabled? |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<Object>` | Emitted when an error occurs during the action. Applies to copy and move actions. |
|
||||
| execute | `EventEmitter<Object>` | Emitted when the user selects the action from the menu. |
|
||||
| permissionEvent | `EventEmitter<Object>` | Emitted when a permission error occurs |
|
||||
| success | `EventEmitter<Object>` | Emitted when the action succeeds with the success string message. Applies to copy, move and delete actions. |
|
||||
| ---- | ---- | ----------- |
|
||||
| execute | `EventEmitter<{}>` | Emitted when the user selects the action from the menu. |
|
||||
| permissionEvent | `EventEmitter<{}>` | Emitted when a permission error occurs |
|
||||
| error | `EventEmitter<{}>` | Emitted when an error occurs during the action. Applies to copy and move actions. |
|
||||
| success | `EventEmitter<{}>` | Emitted when the action succeeds with the success string message. Applies to copy, move and delete actions. |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -162,22 +156,22 @@ type and other details of the item just deleted:
|
||||
### Examples
|
||||
|
||||
#### System handler
|
||||
|
||||
|
||||
This action simply execute one of the built-in actions described above:
|
||||
|
||||
```html
|
||||
<adf-document-list [contentActions]="true"...>
|
||||
<content-actions>
|
||||
|
||||
<content-action
|
||||
target="document"
|
||||
title="Download"
|
||||
handler="download">
|
||||
</content-action>
|
||||
|
||||
</content-actions>
|
||||
</adf-document-list>
|
||||
```
|
||||
```html
|
||||
<adf-document-list [contentActions]="true"...>
|
||||
<content-actions>
|
||||
|
||||
<content-action
|
||||
target="document"
|
||||
title="Download"
|
||||
handler="download">
|
||||
</content-action>
|
||||
|
||||
</content-actions>
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||

|
||||
|
||||
@@ -185,6 +179,7 @@ This action simply execute one of the built-in actions described above:
|
||||
|
||||
If you specify a custom handler it will be executed at any click of the action:
|
||||
|
||||
|
||||
```html
|
||||
<adf-document-list [contentActions]="true"...>
|
||||
<content-actions>
|
||||
@@ -198,6 +193,7 @@ If you specify a custom handler it will be executed at any click of the action:
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
|
||||
```ts
|
||||
export class MyComponent {
|
||||
|
||||
@@ -280,6 +276,7 @@ export class MyComponent {
|
||||
|
||||

|
||||
|
||||
|
||||
#### Copy and move
|
||||
|
||||
These actions show the destination chooser dialog for copy and move actions. By default,
|
||||
@@ -320,84 +317,6 @@ allow the item being copied/moved to be the destination if it is itself a folder
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
### Conditional visibility
|
||||
|
||||
The `<content-action>` component allows you to control visibility with the help of the `visible` property and supports three major scenarios:
|
||||
|
||||
* direct value of `boolean` type
|
||||
* binding to a property of the `boolean` type
|
||||
* binding to a property of the `Function` type that evaluates condition and returns `boolean` value
|
||||
|
||||
#### Using direct value of boolean type
|
||||
|
||||
```html
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="Never see this action again"
|
||||
handler="download"
|
||||
[visible]="false">
|
||||
</content-action>
|
||||
```
|
||||
|
||||
#### Using a property of the boolean type
|
||||
|
||||
```html
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="This can be toggled"
|
||||
handler="download"
|
||||
[visible]="showCustomDownloadAction">
|
||||
</content-action>
|
||||
```
|
||||
|
||||
The markup above relies on the `showCustomDownloadAction` property declared at your component class level:
|
||||
|
||||
```ts
|
||||
export class MyComponent {
|
||||
|
||||
@Input()
|
||||
showCustomDownloadAction = true;
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
#### Using a property of the Function type
|
||||
|
||||
```html
|
||||
<content-action
|
||||
icon="get_app"
|
||||
title="Download this file now!"
|
||||
handler="download"
|
||||
[visible]="canDownloadNode">
|
||||
</content-action>
|
||||
```
|
||||
|
||||
The code above relies on the `canDownloadNode` property of a `Function` type declared at your component class level:
|
||||
|
||||
```ts
|
||||
export class MyComponent {
|
||||
|
||||
canDownloadNode = (node: MinimalNodeEntity): boolean => {
|
||||
if (node && node.entry && node.entry.name === 'For Sale.docx') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Code above checks the node name, and evaluates to `true` only if corresponding node is called "For Sale.docx".
|
||||
|
||||
Please note that if you want to preserve `this` context within the evaluator function,
|
||||
its property should be declared as a lambda one:
|
||||
|
||||
```ts
|
||||
functionName = (parameters): boolean => {
|
||||
// implementation
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
### Customizing built-in actions
|
||||
|
||||
The built-in actions are defined in the [Document Actions service](document-actions.service.md) and
|
||||
|
||||
@@ -24,14 +24,13 @@ Displays and edits metadata related to a node.
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| displayEmpty | `boolean` | false | Toggles whether to display empty values in the card view |
|
||||
| editable | `boolean` | false | Toggles whether the edit button should be shown |
|
||||
| expanded | `boolean` | false | Toggles between expanded (ie, full information) and collapsed (ie, reduced information) in the display |
|
||||
| multi | `boolean` | false | The multi="true" input allows the expansions state to be set independently of each other. When multi="false" (default) just one panel can be expanded at a given time |
|
||||
| node | `MinimalNodeEntryEntity` | | (required) The node entity to fetch metadata about |
|
||||
| preset | `string` | | Name of the metadata preset, which defines aspects and their properties |
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| node | MinimalNodeEntryEntity | - | (**required**) The node entity to fetch metadata about |
|
||||
| displayEmpty | boolean | false | Toggles whether to display empty values in the card view |
|
||||
| readOnly | boolean | true | Toggles whether the edit button should be shown |
|
||||
| multi | boolean | false | The multi parameter of the underlying material expansion panel |
|
||||
| preset | string | "*" | Name of the metadata preset, which defines aspects and their properties |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -45,7 +44,7 @@ properties.
|
||||
### Application config presets
|
||||
|
||||
You can define different presets for the metadata component or override the default presets in
|
||||
the `app.config.json` file. The **default** preset is "\*" if not set, meaning the component
|
||||
the `app.config.json` file. The **default** preset is "*" if not set, meaning the component
|
||||
will display every aspect and property of a node without filtering.
|
||||
|
||||
You can define as many extra presets as you need for your components.
|
||||
@@ -90,7 +89,7 @@ just the `exif:exif` and `custom:aspect` aspects are whitelisted:
|
||||
```
|
||||
|
||||
You can further restrict the whitelist to specific properties of one or more aspects by using
|
||||
an array of property names in place of the "\*" filter:
|
||||
an array of property names in place of the "*" filter:
|
||||
|
||||
```json
|
||||
...
|
||||
@@ -191,25 +190,24 @@ A more complex config is shown in the example below:
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The result of this config would be two accordion groups with the following properties:
|
||||
|
||||
| GROUP-TITLE1-TRANSLATION-KEY |
|
||||
| ---------------------------- |
|
||||
| exif:param1 |
|
||||
| exif:param2 |
|
||||
| ... |
|
||||
| exif:paramN |
|
||||
| kitten:custom1 |
|
||||
| kitten:custom3 |
|
||||
| owner:name |
|
||||
| kitten:name |
|
||||
| kitten:color |
|
||||
|GROUP-TITLE1-TRANSLATION-KEY|
|
||||
|---|
|
||||
|exif:param1|
|
||||
|exif:param2|
|
||||
|...|
|
||||
|exif:paramN|
|
||||
|kitten:custom1|
|
||||
|kitten:custom3|
|
||||
|owner:name|
|
||||
|kitten:name|
|
||||
|kitten:color|
|
||||
|
||||
| GROUP-TITLE2-TRANSLATION-KEY |
|
||||
| ---------------------------- |
|
||||
| kitten:favourite-food |
|
||||
| kitten:recommended-food |
|
||||
|GROUP-TITLE2-TRANSLATION-KEY|
|
||||
|---|
|
||||
|kitten:favourite-food|
|
||||
|kitten:recommended-food|
|
||||
|
||||
## What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect
|
||||
|
||||
|
||||
@@ -1,58 +1,50 @@
|
||||
---
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-03
|
||||
Last reviewed: 2018-03-13
|
||||
---
|
||||
|
||||
# Content Node Dialog service
|
||||
|
||||
Displays and manages dialogs for selecting content to open, copy or upload.
|
||||
|
||||
## Class members
|
||||
## Methods
|
||||
|
||||
### Methods
|
||||
- `openLockNodeDialog(nodeEntry: MinimalNodeEntryEntity): Observable<string>`
|
||||
Opens a dialog to lock or unlock file
|
||||
- `nodeEntry` - Item to lock or unlock.
|
||||
- `openFileBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]>`
|
||||
Opens a file browser at a chosen folder location.
|
||||
- `folderNodeId` - ID of the folder to use
|
||||
- `openFileBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`
|
||||
Opens a file browser at a chosen site location.
|
||||
|
||||
- `openFolderBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`
|
||||
Opens a folder browser at a chosen site location.
|
||||
|
||||
- `openFolderBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]>`
|
||||
Opens a folder browser at a chosen folder location.
|
||||
- `folderNodeId` - ID of the folder to use
|
||||
- `openCopyMoveDialog(action: string, contentEntry: MinimalNodeEntryEntity, permission?: string): Observable<MinimalNodeEntryEntity[]>`
|
||||
Opens a dialog to copy or move an item to a new location.
|
||||
- `action` - Name of the action (eg, "Copy" or "Move") to show in the title
|
||||
- `contentEntry` - Item to be copied or moved
|
||||
- `permission` - (Optional) Permission for the operation
|
||||
- `getTitleTranslation(action: string, name: string): string`
|
||||
Gets the translation of the dialog title.
|
||||
- `action` - Name of the action to display in the dialog title
|
||||
- `name` - Name of the item on which the action is being performed
|
||||
- `openUploadFolderDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]>`
|
||||
Opens a dialog to choose a folder to upload.
|
||||
- `action` - Name of the action to show in the title
|
||||
- `contentEntry` - Item to upload
|
||||
- `openUploadFileDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]>`
|
||||
Opens a dialog to choose a file to upload.
|
||||
- `action` - Name of the action to show in the title
|
||||
- `contentEntry` - Item to upload
|
||||
- `close()`
|
||||
Closes the currently open dialog.
|
||||
|
||||
- `close()`<br/>
|
||||
Closes the currently open dialog.
|
||||
- `getTitleTranslation(action: string = null, name: string = null): string`<br/>
|
||||
Gets the translation of the dialog title.
|
||||
- `action: string = null` - Name of the action to display in the dialog title
|
||||
- `name: string = null` - Name of the item on which the action is being performed
|
||||
- **Returns** `string` - Translated version of the title
|
||||
- `openCopyMoveDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null, permission?: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
|
||||
Opens a dialog to copy or move an item to a new location.
|
||||
- `action: string = null` - Name of the action (eg, "Copy" or "Move") to show in the title
|
||||
- `contentEntry: MinimalNodeEntryEntity = null` - Item to be copied or moved
|
||||
- `permission?: string = null` - (Optional) Permission for the operation
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about files that were copied/moved
|
||||
- `openFileBrowseDialogByFolderId(folderNodeId: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
|
||||
Opens a file browser at a chosen folder location.
|
||||
- `folderNodeId: string = null` - ID of the folder to use
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the selected file(s)
|
||||
- `openFileBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`<br/>
|
||||
Opens a file browser at a chosen site location.
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the selected file(s)
|
||||
- `openFolderBrowseDialogByFolderId(folderNodeId: string = null): Observable<MinimalNodeEntryEntity[]>`<br/>
|
||||
Opens a folder browser at a chosen folder location.
|
||||
- `folderNodeId: string = null` - ID of the folder to use
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the selected folder(s)
|
||||
- `openFolderBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`<br/>
|
||||
Opens a folder browser at a chosen site location.
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the selected folder(s)
|
||||
- `openLockNodeDialog(contentEntry: MinimalNodeEntryEntity = null): Subject<string>`<br/>
|
||||
Opens a lock node dialog.
|
||||
- `contentEntry: MinimalNodeEntryEntity = null` - Node to lock
|
||||
- **Returns** `Subject<string>` - Error/status message (if any)
|
||||
- `openUploadFileDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null): Observable<MinimalNodeEntryEntity[]>`<br/>
|
||||
Opens a dialog to choose a file to upload.
|
||||
- `action: string = null` - Name of the action to show in the title
|
||||
- `contentEntry: MinimalNodeEntryEntity = null` - Item to upload
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the chosen file(s)
|
||||
- `openUploadFolderDialog(action: string = null, contentEntry: MinimalNodeEntryEntity = null): Observable<MinimalNodeEntryEntity[]>`<br/>
|
||||
Opens a dialog to choose folders to upload.
|
||||
- `action: string = null` - Name of the action to show in the title
|
||||
- `contentEntry: MinimalNodeEntryEntity = null` - Item to upload
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity[]>` - Information about the chosed folder(s)
|
||||
|
||||
## Details
|
||||
|
||||
@@ -81,6 +73,14 @@ using a folder ID string. This can be obtained from the `id` property of a
|
||||
dialog operation, say) or be set to one of the well-known names "-my-" , "-shared-" or
|
||||
"-root-".
|
||||
|
||||
The `openCopyMoveDialog` and `openUploadXXX` methods require the following parameters:
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| action | string | The label for the confirm button of the dialog. |
|
||||
| contentEntry | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/MinimalNode.md) | The node we want to be copied/moved or uploaded. |
|
||||
| neededPermissionForAction | string | (`openCopyMoveDialog` only) Permission required to perform the relative action (eg: copy will need the 'update' permission ). |
|
||||
|
||||
## See Also
|
||||
|
||||
- [Content node selector panel component](content-node-selector-panel.component.md)
|
||||
|
||||
@@ -23,26 +23,24 @@ Opens a Content Node Selector in its own dialog window.
|
||||
</adf-content-node-selector-panel>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| breadcrumbTransform | `function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
|
||||
| currentFolderId | `string` | null | Node ID of the folder currently listed. |
|
||||
| dropdownHideMyFiles | `boolean` | false | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
|
||||
| dropdownSiteList | `SitePaging` | null | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
|
||||
| imageResolver | `ImageResolver` | null | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
|
||||
| isSelectionValid | `ValidationFunction` | defaultValidation | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
|
||||
| pageSize | `number` | | Number of items shown per page in the list. |
|
||||
| rowFilter | `RowFilter` | null | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| currentFolderId | `string` | `null` | Node ID of the folder currently listed. |
|
||||
| dropdownHideMyFiles | `boolean` | `false` | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
|
||||
| dropdownSiteList | `SitePaging` | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
|
||||
| rowFilter | `RowFilter` | `null` | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
|
||||
| imageResolver | `ImageResolver` | `null` | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
|
||||
| pageSize | `number` | | Number of items shown per page in the list. |
|
||||
| isSelectionValid | `ValidationFunction` | `defaultValidation` | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
|
||||
| breadcrumbTransform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| select | `EventEmitter<MinimalNodeEntryEntity[]>` | Emitted when the user has chosen an item. |
|
||||
| ---- | ---- | ----------- |
|
||||
| select | `EventEmitter<MinimalNodeEntryEntity[]>` | Emitted when the user has chosen an item. |
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-04-18
|
||||
Last reviewed: 2018-03-29
|
||||
---
|
||||
|
||||
# Content Node Selector component
|
||||
@@ -10,34 +10,19 @@ Allows a user to select items from a Content Services repository.
|
||||
|
||||

|
||||
|
||||
## Contents
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
|
||||
- [Details](#details)
|
||||
|
||||
- [Showing the dialog](#showing-the-dialog)
|
||||
- [Usage example](#usage-example)
|
||||
- [RowFilter and ImageResolver](#rowfilter-and-imageresolver)
|
||||
- [Using the breadcrumbTransform function](#using-the-breadcrumbtransform-function)
|
||||
|
||||
- [See also](#see-also)
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| currentFolderId | `string` | null | **Deprecated:** in 2.1.0 |
|
||||
| dropdownHideMyFiles | `boolean` | false | **Deprecated:** in 2.1.0 |
|
||||
| dropdownSiteList | `SitePaging` | null | **Deprecated:** in 2.1.0 |
|
||||
| imageResolver | `ImageResolver` | null | **Deprecated:** in 2.1.0 |
|
||||
| pageSize | `number` | | **Deprecated:** in 2.1.0 |
|
||||
| rowFilter | `RowFilter` | null | **Deprecated:** in 2.1.0 |
|
||||
| title | `string` | null | **Deprecated:** in 2.1.0 |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| currentFolderId | `string` | null | Deprecated: in 2.1.0 |
|
||||
| dropdownHideMyFiles | `boolean` | false | Deprecated: in 2.1.0 |
|
||||
| dropdownSiteList | `SitePaging` | null | Deprecated: in 2.1.0 |
|
||||
| imageResolver | `ImageResolver` | null | Deprecated: in 2.1.0 |
|
||||
| pageSize | `number` | | Deprecated: in 2.1.0 |
|
||||
| rowFilter | `RowFilter` | null | Deprecated: in 2.1.0 |
|
||||
| title | `string` | null | Deprecated: in 2.1.0 |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -48,8 +33,6 @@ repository rather than the filesystem. For example, the
|
||||
of Copy/Move actions (see the [Content Action component](content-action.component.md) for
|
||||
more information).
|
||||
|
||||
### Showing the dialog
|
||||
|
||||
Unlike most components, the Content Node Selector is typically shown in a dialog box
|
||||
rather than the main page and you are responsible for opening the dialog yourself. You can use the
|
||||
[Angular Material Dialog](https://material.angular.io/components/dialog/overview) for this,
|
||||
@@ -72,22 +55,6 @@ interface ContentNodeSelectorComponentData {
|
||||
}
|
||||
```
|
||||
|
||||
The properties are described in the table below:
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| title | `string` | "" | Dialog title |
|
||||
| actionName | `string` | "" | Text to appear on the dialog's main action button ("Move", "Copy", etc) |
|
||||
| currentFolderId | `string` | `null` | Node ID of the folder currently listed. |
|
||||
| dropdownHideMyFiles | `boolean` | `false` | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
|
||||
| dropdownSiteList | `SitePaging` | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
|
||||
| rowFilter | `RowFilter` | `null` | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
|
||||
| imageResolver | `ImageResolver` | `null` | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
|
||||
| pageSize | `number` | | Number of items shown per page in the list. |
|
||||
| isSelectionValid | `ValidationFunction` | `defaultValidation` | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
|
||||
| breadcrumbTransform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
|
||||
| select | `EventEmitter<MinimalNodeEntryEntity[]>` | | Event emitted with the current node selection when the dialog closes |
|
||||
|
||||
If you don't want to manage the dialog yourself then it is easier to use the
|
||||
[Content Node Selector Panel component](content-node-selector-panel.component.md), or the
|
||||
methods of the [Content Node Dialog service](content-node-dialog.service.md), which create
|
||||
@@ -106,7 +73,6 @@ constructor(dialog: MatDialog ... ) {}
|
||||
openSelectorDialog() {
|
||||
data: ContentNodeSelectorComponentData = {
|
||||
title: "Choose an item",
|
||||
actionName: "Choose",
|
||||
currentFolderId: someFolderId,
|
||||
select: new Subject<MinimalNodeEntryEntity[]>()
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-03
|
||||
Last reviewed: 2018-04-12
|
||||
---
|
||||
|
||||
# Custom Resources service
|
||||
@@ -12,49 +12,49 @@ Manages Document List information that is specific to a user.
|
||||
|
||||
### Methods
|
||||
|
||||
- `getCorrespondingNodeIds(nodeId: string = null, pagination: PaginationModel = null): Observable<string[]>`<br/>
|
||||
Gets the contents of one of the well-known aliases in the form of node ID strings.
|
||||
- `nodeId: string = null` - ID of the target folder node
|
||||
- `pagination: PaginationModel = null` - Specifies how to paginate the results
|
||||
- **Returns** `Observable<string[]>` - List of node IDs
|
||||
- `getRecentFiles(personId: string = null, pagination: PaginationModel = null): Observable<NodePaging>`<br/>
|
||||
- `getRecentFiles(personId: string, pagination: PaginationModel): Observable<NodePaging>`<br/>
|
||||
Gets files recently accessed by a user.
|
||||
- `personId: string = null` - ID of the user
|
||||
- `pagination: PaginationModel = null` - Specifies how to paginate the results
|
||||
- `personId: string` - ID of the user
|
||||
- `pagination: PaginationModel` - Specifies how to paginate the results
|
||||
- **Returns** `Observable<NodePaging>` - List of nodes for the recently used files
|
||||
- `isCustomSource(folderId: string = null): boolean`<br/>
|
||||
Is the folder ID one of the well-known aliases?
|
||||
- `folderId: string = null` - Folder ID name to check
|
||||
- **Returns** `boolean` - True if the ID is a well-known name, false otherwise
|
||||
- `loadFavorites(pagination: PaginationModel = null, includeFields: string[] = []): Observable<NodePaging>`<br/>
|
||||
- `loadFavorites(pagination: PaginationModel, includeFields: string[] = []): Observable<NodePaging>`<br/>
|
||||
Gets favorite files for the current user.
|
||||
- `pagination: PaginationModel = null` - Specifies how to paginate the results
|
||||
- `includeFields: string[] = []` - List of data field names to include in the results
|
||||
- `pagination: PaginationModel` - Specifies how to paginate the results
|
||||
- `includeFields: string[] = []` - List of data field names to include in the results
|
||||
- **Returns** `Observable<NodePaging>` - List of favorite files
|
||||
- `loadFolderByNodeId(nodeId: string = null, pagination: PaginationModel = null, includeFields: string[] = null): Observable<NodePaging>`<br/>
|
||||
Gets a folder's contents.
|
||||
- `nodeId: string = null` - ID of the target folder node
|
||||
- `pagination: PaginationModel = null` - Specifies how to paginate the results
|
||||
- `includeFields: string[] = null` - List of data field names to include in the results
|
||||
- **Returns** `Observable<NodePaging>` - List of items contained in the folder
|
||||
- `loadMemberSites(pagination: PaginationModel = null): Observable<NodePaging>`<br/>
|
||||
- `loadMemberSites(pagination: PaginationModel): Observable<NodePaging>`<br/>
|
||||
Gets sites that the current user is a member of.
|
||||
- `pagination: PaginationModel = null` - Specifies how to paginate the results
|
||||
- `pagination: PaginationModel` - Specifies how to paginate the results
|
||||
- **Returns** `Observable<NodePaging>` - List of sites
|
||||
- `loadSharedLinks(pagination: PaginationModel = null, includeFields: string[] = []): Observable<NodePaging>`<br/>
|
||||
Gets shared links for the current user.
|
||||
- `pagination: PaginationModel = null` - Specifies how to paginate the results
|
||||
- `includeFields: string[] = []` - List of data field names to include in the results
|
||||
- **Returns** `Observable<NodePaging>` - List of shared links
|
||||
- `loadSites(pagination: PaginationModel = null): Observable<NodePaging>`<br/>
|
||||
- `loadSites(pagination: PaginationModel): Observable<NodePaging>`<br/>
|
||||
Gets all sites in the respository.
|
||||
- `pagination: PaginationModel = null` - Specifies how to paginate the results
|
||||
- `pagination: PaginationModel` - Specifies how to paginate the results
|
||||
- **Returns** `Observable<NodePaging>` - List of sites
|
||||
- `loadTrashcan(pagination: PaginationModel = null, includeFields: string[] = []): Observable<DeletedNodesPaging>`<br/>
|
||||
- `loadTrashcan(pagination: PaginationModel, includeFields: string[] = []): Observable<DeletedNodesPaging>`<br/>
|
||||
Gets all items currently in the trash.
|
||||
- `pagination: PaginationModel = null` - Specifies how to paginate the results
|
||||
- `includeFields: string[] = []` - List of data field names to include in the results
|
||||
- `pagination: PaginationModel` - Specifies how to paginate the results
|
||||
- `includeFields: string[] = []` - List of data field names to include in the results
|
||||
- **Returns** `Observable<DeletedNodesPaging>` - List of deleted items
|
||||
- `loadSharedLinks(pagination: PaginationModel, includeFields: string[] = []): Observable<NodePaging>`<br/>
|
||||
Gets shared links for the current user.
|
||||
- `pagination: PaginationModel` - Specifies how to paginate the results
|
||||
- `includeFields: string[] = []` - List of data field names to include in the results
|
||||
- **Returns** `Observable<NodePaging>` - List of shared links
|
||||
- `isCustomSource(folderId: string): boolean`<br/>
|
||||
Is the folder ID one of the well-known aliases?
|
||||
- `FolderId` - Folder ID name to check
|
||||
- **Returns** `Observable<NodePaging>` - True if the ID is a well-known name, false otherwise
|
||||
- `loadFolderByNodeId(nodeId: string, pagination: PaginationModel, includeFields: string[]): Observable<NodePaging>`<br/>
|
||||
Gets a folder's contents.
|
||||
- `nodeId: string` - ID of the target folder node
|
||||
- `pagination: PaginationModel` - Specifies how to paginate the results
|
||||
- `includeFields: string[] = []` - List of data field names to include in the results
|
||||
- **Returns** `Observable<NodePaging>` - List of items contained in the folder
|
||||
- `getCorrespondingNodeIds(nodeId: string, pagination: PaginationModel): Observable<string[]>`<br/>
|
||||
Gets the contents of one of the well-known aliases in the form of node ID strings.
|
||||
- `nodeId: string` - ID of the target folder node
|
||||
- `pagination: PaginationModel` - Specifies how to paginate the results
|
||||
- **Returns** `Observable<string[]>` - List of node IDs
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Document Library model
|
||||
|
||||
Defines classes for use with the Content Services node API.
|
||||
@@ -110,11 +109,9 @@ class PathElementEntity {
|
||||
```
|
||||
|
||||
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
|
||||
|
||||
<!-- seealso start -->
|
||||
|
||||
## See also
|
||||
|
||||
- [Document list component](document-list.component.md)
|
||||
- [Nodes api service](../core/nodes-api.service.md)
|
||||
<!-- seealso end -->
|
||||
- [Document list component](document-list.component.md)
|
||||
- [Nodes api service](../core/nodes-api.service.md)
|
||||
<!-- seealso end -->
|
||||
@@ -14,15 +14,12 @@ Displays the documents from a repository.
|
||||
|
||||
- [Basic Usage](#basic-usage)
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
|
||||
- [Details](#details)
|
||||
|
||||
- [DOM Events](#dom-events)
|
||||
- [Conditional visibility](#conditional-visibility)
|
||||
- [Card view](#card-view)
|
||||
- [Pagination strategy](#pagination-strategy)
|
||||
- [Data Sources](#data-sources)
|
||||
@@ -55,51 +52,48 @@ Displays the documents from a repository.
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| allowDropFiles | `boolean` | false | Toggle file drop support for rows (see Upload Directive for further details |
|
||||
| contentActions | `boolean` | false | Toggles content actions for each row |
|
||||
| contentActionsPosition | `string` | "right" | Position of the content actions dropdown menu. Can be set to "left" or "right". |
|
||||
| contextMenuActions | `boolean` | false | Toggles context menus for each row |
|
||||
| currentFolderId | `string` | null | The ID of the folder node to display or a reserved string alias for special sources |
|
||||
| display | `string` | DisplayMode.List | Change the display mode of the table. Can be "list" or "gallery". |
|
||||
| emptyFolderImageUrl | `string` | "./assets/images/empty_doc_lib.svg" | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' |
|
||||
| enableInfiniteScrolling | `boolean` | false | Set document list to work in infinite scrolling mode |
|
||||
| folderNode | `MinimalNodeEntryEntity` | null | Currently displayed folder node |
|
||||
| imageResolver | `any | null` | null | Custom image resolver |
|
||||
| includeFields | `string[]` | | Include additional information about the node in the server request.for example: association, isLink, isLocked and others. |
|
||||
| loading | `boolean` | false | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. |
|
||||
| locationFormat | `string` | "/" | The default route for all the location-based columns (if declared). |
|
||||
| maxItems | `number` | | Default value is stored into user preference settings use it only if you are not using the pagination |
|
||||
| multiselect | `boolean` | false | Toggles multiselect mode |
|
||||
| navigate | `boolean` | true | Toggles navigation to folder content or file preview |
|
||||
| navigationMode | `string` | DocumentListComponent.DOUBLE_CLICK_NAVIGATION | User interaction for folder navigation or file preview. Valid values are "click" and "dblclick". Default value: "dblclick" |
|
||||
| node | `NodePaging` | null | The Document list will show all the nodes contained in the NodePaging entity |
|
||||
| permissionsStyle | `PermissionStyleModel[]` | \[] | Define a set of CSS styles styles to apply depending on the permission of the user on that node. See the Permission Style model page for further details and examples. |
|
||||
| rowFilter | `any | null` | null | Custom row filter |
|
||||
| rowStyle | `string` | | The inline style to apply to every row. See the Angular NgStyle docs for more details and usage examples. |
|
||||
| rowStyleClass | `string` | | The CSS class to apply to every row |
|
||||
| selectionMode | `string` | "single" | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||
| showHeader | `boolean` | true | Toggles the header |
|
||||
| skipCount | `number` | 0 | Number of elements to skip over for pagination purposes |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| display | `string` | `DisplayMode.List` | Change the display mode of the table. Can be "list" or "gallery". |
|
||||
| permissionsStyle | `PermissionStyleModel[]` | `[]` | Define a set of CSS styles styles to apply depending on the permission of the user on that node. See the Permission Style model page for further details and examples. |
|
||||
| locationFormat | `string` | `'/'` | The default route for all the location-based columns (if declared). |
|
||||
| navigate | `boolean` | `true` | Toggles navigation to folder content or file preview |
|
||||
| showHeader | `boolean` | `true` | Toggles the header |
|
||||
| navigationMode | `string` | See description | User interaction for folder navigation or file preview. Valid values are "click" and "dblclick". Default value: "dblclick" |
|
||||
| thumbnails | `boolean` | `false` | Show document thumbnails rather than icons |
|
||||
| selectionMode | `string` | `'single'` | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||
| multiselect | `boolean` | `false` | Toggles multiselect mode |
|
||||
| contentActions | `boolean` | `false` | Toggles content actions for each row |
|
||||
| contentActionsPosition | `string` | `'right'` | Position of the content actions dropdown menu. Can be set to "left" or "right". |
|
||||
| contextMenuActions | `boolean` | `false` | Toggles context menus for each row |
|
||||
| emptyFolderImageUrl | `string` | See description | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' |
|
||||
| allowDropFiles | `boolean` | `false` | Toggle file drop support for rows (see Upload Directive for further details |
|
||||
| sorting | `string[]` | | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override the default sorting detected by the component based on columns. |
|
||||
| thumbnails | `boolean` | false | Show document thumbnails rather than icons |
|
||||
| sortingMode | `string` | `client` | Defines sorting mode. Can be either `client` or `server`. |
|
||||
| rowStyle | `string` | | The inline style to apply to every row. See the Angular NgStyle docs for more details and usage examples. |
|
||||
| rowStyleClass | `string` | | The CSS class to apply to every row |
|
||||
| loading | `boolean` | `false` | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. |
|
||||
| rowFilter | `any` | `null` | Custom row filter |
|
||||
| imageResolver | `any` | `null` | Custom image resolver |
|
||||
| currentFolderId | `string` | `null` | The ID of the folder node to display or a reserved string alias for special sources |
|
||||
| folderNode | `MinimalNodeEntryEntity` | `null` | Currently displayed folder node |
|
||||
| node | `NodePaging` | `null` | The Document list will show all the nodes contained in the NodePaging entity |
|
||||
| maxItems | `number` | | Default value is stored into user preference settings |
|
||||
| skipCount | `number` | `0` | Number of elements to skip over for pagination purposes |
|
||||
| enableInfiniteScrolling | `boolean` | `false` | Set document list to work in infinite scrolling mode |
|
||||
| includeFields | `string[]` | `[]` | Include additional information about the node in the server request.for example: association, isLink, isLocked and others. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<any>` | Emitted when the API fails to get the Document List data |
|
||||
| folderChange | `EventEmitter<NodeEntryEvent>` | Emitted when the current display folder changes |
|
||||
| nodeClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user clicks a list node |
|
||||
| nodeDblClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user double-clicks a list node |
|
||||
| ---- | ---- | ----------- |
|
||||
| nodeClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user clicks a list node |
|
||||
| nodeDblClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user double-clicks a list node |
|
||||
| folderChange | `EventEmitter<NodeEntryEvent>` | Emitted when the current display folder changes |
|
||||
| preview | `EventEmitter<NodeEntityEvent>` | Emitted when the user acts upon files with either single or double click (depends on `navigation-mode`). Useful for integration with the Viewer component. |
|
||||
| ready | `EventEmitter<NodePaging>` | Emitted when the Document List has loaded all items and is ready for use |
|
||||
| ready | `EventEmitter<NodePaging>` | Emitted when the Document List has loaded all items and is ready for use |
|
||||
| error | `EventEmitter<any>` | Emitted when the API fails to get the Document List data |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -110,7 +104,7 @@ best.
|
||||
### DOM Events
|
||||
|
||||
Below are the DOM events the DocumentList component emits.
|
||||
All of them are _bubbling_, meaning you can handle them in any component up the parent hierarchy, even if the DocumentList is wrapped by one or more other components.
|
||||
All of them are *bubbling*, meaning you can handle them in any component up the parent hierarchy, even if the DocumentList is wrapped by one or more other components.
|
||||
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
@@ -147,18 +141,6 @@ Below is a basic example of handling DOM events in the parent elements.
|
||||
</div>
|
||||
```
|
||||
|
||||
### Conditional visibility
|
||||
|
||||
You can use `ngIf` directives to provide conditional visibility support for the columns:
|
||||
|
||||
```html
|
||||
<data-column
|
||||
*nfIg="showNameColumn"
|
||||
key="name"
|
||||
title="MY.RESOURCE.KEY">
|
||||
</data-column>
|
||||
```
|
||||
|
||||
### Card view
|
||||
|
||||
The Document List has an option to display items as "cards" instead of the
|
||||
@@ -175,14 +157,16 @@ Set the `[display]` property to "gallery" to enable card view mode:
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Pagination strategy
|
||||
|
||||
The Document List by default supports 2 types of pagination: **finite** and **infinite**:
|
||||
|
||||
- With **finite** pagination, the Document List needs 2 parameters: `maxItems` and `skipCount`. These set the maximum number of items shown in a single page and the start
|
||||
offset of the first item in the page (ie, the number of items you need to skip to get there).
|
||||
offset of the first item in the page (ie, the number of items you need to skip to get there).
|
||||
- You can enable **infinite** pagination by setting the same parameters plus an extra third
|
||||
parameter: `enableInfiniteScrolling`.
|
||||
parameter: `enableInfiniteScrolling`.
|
||||
|
||||
### Data Sources
|
||||
|
||||
@@ -457,7 +441,7 @@ documentation for a full explanation of the component lifecycle.
|
||||
### Underlying node object
|
||||
|
||||
The Document List component assigns an instance of
|
||||
[MinimalNode]\(<https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/MinimalNode.md>]
|
||||
[MinimalNode](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/MinimalNode.md]
|
||||
(defined in the [Alfresco JS API](https://github.com/Alfresco/alfresco-js-api)) as the data context
|
||||
for each row. You can make use of the properties of this object when defining custom columns:
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ Implements node operations used by the Document List component.
|
||||
|
||||
### Methods
|
||||
|
||||
- `copyNode(nodeId: string = null, targetParentId: string = null): Observable<any>`<br/>
|
||||
- `copyNode(nodeId: string = null, targetParentId: string = null): any`<br/>
|
||||
Copy a node to destination node
|
||||
- `nodeId: string = null` - The id of the node to be copied
|
||||
- `targetParentId: string = null` - The id of the folder where the node will be copied
|
||||
- **Returns** `Observable<any>` - NodeEntry for the copied node
|
||||
- **Returns** `any` - NodeEntry for the copied node
|
||||
- `createFolder(name: string = null, parentId: string = null): Observable<MinimalNodeEntity>`<br/>
|
||||
Creates a new folder in the path.
|
||||
Create a new folder in the path.
|
||||
- `name: string = null` - Folder name
|
||||
- `parentId: string = null` - Parent folder ID
|
||||
- **Returns** `Observable<MinimalNodeEntity>` - Details of the created folder node
|
||||
@@ -39,32 +39,25 @@ Implements node operations used by the Document List component.
|
||||
- `opts?: any = null` - (Optional) Options.
|
||||
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
|
||||
- **Returns** `Observable<NodePaging>` - Details of the folder
|
||||
- `getFolderNode(nodeId: string = null, includeFields: string[] = []): Observable<MinimalNodeEntryEntity>`<br/>
|
||||
|
||||
- `getFolderNode(nodeId: string = null, includeFields: string[] = []): Promise<MinimalNodeEntryEntity>`<br/>
|
||||
Gets a folder node via its node ID.
|
||||
- `nodeId: string = null` - ID of the folder node
|
||||
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the folder
|
||||
|
||||
- **Returns** `Promise<MinimalNodeEntryEntity>` - Details of the folder
|
||||
- `getMimeTypeIcon(mimeType: string = null): string`<br/>
|
||||
Gets the icon that represents a MIME type.
|
||||
- `mimeType: string = null` - MIME type to get the icon for
|
||||
- **Returns** `string` - Path to the icon file
|
||||
- `getNode(nodeId: string = null, includeFields: string[] = []): Observable<NodeEntry>`<br/>
|
||||
Gets a node via its node ID.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
|
||||
- **Returns** `Observable<NodeEntry>` - Details of the folder
|
||||
- `hasPermission(node: any = null, permission: PermissionsEnum | string = null): boolean`<br/>
|
||||
|
||||
Checks if a node has the specified permission.
|
||||
- `node: any = null` - Target node
|
||||
- `permission: PermissionsEnum | string = null` - Permission level to query
|
||||
- **Returns** `boolean` - True if the node has the permission, false otherwise
|
||||
|
||||
- `moveNode(nodeId: string = null, targetParentId: string = null): Observable<any>`<br/>
|
||||
Moves a node to destination node.
|
||||
- `moveNode(nodeId: string = null, targetParentId: string = null): any`<br/>
|
||||
Move a node to destination node
|
||||
- `nodeId: string = null` - The id of the node to be moved
|
||||
- `targetParentId: string = null` - The id of the folder where the node will be moved
|
||||
- **Returns** `Observable<any>` - NodeEntry for the moved node
|
||||
- **Returns** `any` - NodeEntry for the moved node
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Dropdown Breadcrumb Component
|
||||
|
||||
Indicates the current position within a navigation hierarchy using a dropdown menu.
|
||||
@@ -18,22 +17,19 @@ Indicates the current position within a navigation hierarchy using a dropdown me
|
||||
</adf-dropdown-breadcrumb>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| folderNode | `MinimalNodeEntryEntity` | null | Active node, builds UI based on folderNode.path.elements collection. |
|
||||
| root | `string` | null | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value. |
|
||||
| rootId | `string` | null | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| folderNode | `MinimalNodeEntryEntity` | `null` | Active node, builds UI based on folderNode.path.elements collection. |
|
||||
| root | `string` | `null` | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value. |
|
||||
| rootId | `string` | `null` | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
|
||||
| target | `DocumentListComponent` | | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. |
|
||||
| transform | `function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| ---- | ---- | ----------- |
|
||||
| navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. |
|
||||
|
||||
## See also
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-08
|
||||
---
|
||||
|
||||
# File Uploading Dialog Component
|
||||
|
||||
Shows a dialog listing all the files uploaded with the Upload Button or Drag Area components.
|
||||
@@ -14,19 +12,17 @@ Shows a dialog listing all the files uploaded with the Upload Button or Drag Are
|
||||
<adf-file-uploading-dialog></adf-file-uploading-dialog>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| position | `string` | "right" | Dialog position. Can be 'left' or 'right'. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| position | `string` | `'right'` | Dialog position. Can be 'left' or 'right'. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<any>` | Emitted when a file in the list has an error. |
|
||||
| ---- | ---- | ----------- |
|
||||
| error | `EventEmitter<any>` | Emitted when a file upload goes in error |
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-03
|
||||
Last reviewed: 2018-04-10
|
||||
---
|
||||
|
||||
# Folder Create directive
|
||||
@@ -13,9 +13,7 @@ Creates folders.
|
||||
```html
|
||||
<adf-toolbar>
|
||||
<button mat-icon-button
|
||||
[adf-create-folder]="documentList.currentFolderId"
|
||||
title="Title of the dialog"
|
||||
(success)="doSomething($event)">
|
||||
[adf-create-folder]="documentList.currentFolderId">
|
||||
<mat-icon>create_new_folder</mat-icon>
|
||||
</button>
|
||||
</adf-toolbar>
|
||||
@@ -31,24 +29,17 @@ Creates folders.
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeType | `string` | "cm:folder" | Type of node to create. |
|
||||
| adf-create-folder | `string` | DEFAULT_FOLDER_PARENT_ID | Parent folder where the new folder will be located after creation. |
|
||||
| title | `string` | null | Title of folder creation dialog. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs (eg, a folder with same name already exists). |
|
||||
| success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the folder is created successfully. |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs (for example a folder with same name already exists) |
|
||||
|
||||
## Details
|
||||
|
||||
Pass this directive the id of the parent folder where you want the new folder node to be created.
|
||||
If no value is provided, the '-my-' alias is used.
|
||||
This will open a Folder Dialog component to receive data for the new folder. If the data is valid
|
||||
then the dialog will emit a `success` event when it closes.
|
||||
|
||||
## See also
|
||||
|
||||
- [Folder Edit directive](folder-edit.directive.md)
|
||||
then the dialog will emit a `folderCreate` event when it closes.
|
||||
|
||||
@@ -13,9 +13,7 @@ Allows folders to be edited.
|
||||
```html
|
||||
<adf-toolbar title="toolbar example">
|
||||
<button mat-icon-button
|
||||
[adf-edit-folder]="documentList.selection[0]?.entry"
|
||||
title="Title of the dialog"
|
||||
(success)="doSomething($event)">
|
||||
[adf-edit-folder]="documentList.selection[0]?.entry">
|
||||
<mat-icon>create</mat-icon>
|
||||
</button>
|
||||
</adf-toolbar>
|
||||
@@ -32,14 +30,12 @@ Allows folders to be edited.
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| adf-edit-folder | `MinimalNodeEntryEntity` | | Folder node to edit. |
|
||||
| title | `string` | null | Title of folder edit dialog. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs (eg, a folder with same name already exists). |
|
||||
| success | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the folder has been edited successfully. |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs (for example a folder with same name already exists) |
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Inherit Permission directive
|
||||
|
||||
Update the current node by adding/removing the inherited permissions.
|
||||
@@ -16,13 +15,11 @@ Update the current node by adding/removing the inherited permissions.
|
||||
(updated)="onUpdatedPermissions($node)">PERMISSION</button>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| nodeId | `string` | | nodeId where to add/remove inherited permissions |
|
||||
| nodeId | `string` | | nodeId where to add/remove inherited permissions |
|
||||
|
||||
### Events
|
||||
|
||||
@@ -31,6 +28,5 @@ Update the current node by adding/removing the inherited permissions.
|
||||
| updated | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the node is updated. |
|
||||
|
||||
## Details
|
||||
|
||||
This directive switches on/off the inheritance on the permission based on what is set on the node entity.
|
||||
So if the node has inherited permissions, this will remove them viceversa if the node does not have the inherited permission this will add them.
|
||||
So if the node has inherited permissions, this will remove them viceversa if the node does not have the inherited permission this will add them.
|
||||
@@ -2,7 +2,6 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Like component
|
||||
|
||||
Allows a user to add "likes" to an item.
|
||||
@@ -15,19 +14,17 @@ Allows a user to add "likes" to an item.
|
||||
<adf-like [nodeId]="nodeId"></adf-like>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeId | `string` | | Identifier of a node to apply likes to. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| nodeId | `string` | | Identifier of a node to apply likes to. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| changeVote | `EventEmitter<Object>` | Emitted when the "vote" gets changed. |
|
||||
| ---- | ---- | ----------- |
|
||||
| changeVote | `EventEmitter<{}>` | Emitted when the "vote" gets changed. |
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -8,6 +8,12 @@ Last reviewed: 2018-04-10
|
||||
|
||||
Locks a node.
|
||||
|
||||
When the directive is clicked a dialog is shown and you can lock or unlock a file (folder cannot be locked)
|
||||
there are two types of lock: indefinite lock and time lock.
|
||||
If the time is not selected the user will lock the file it until will not unlock it
|
||||
When a file is locked it can be locked and unlocked by default only by the user that creates the lock but you can also allow the other file owners to modify it
|
||||

|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
@@ -16,25 +22,15 @@ Locks a node.
|
||||
</button>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| adf-node-lock | `MinimalNodeEntryEntity` | | Node to lock/unlock. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| adf-node-lock | `MinimalNodeEntryEntity` | | Node to lock. |
|
||||
|
||||
## Details
|
||||
|
||||
When the decorated element (eg, div) is clicked, a dialog is shown to let you lock
|
||||
or unlock a file (a folder cannot be locked).
|
||||
|
||||
There are two types of lock: indefinite lock and time lock.
|
||||
If the time is not selected the user will lock the file it until will not unlock it
|
||||
When a file is locked it can be locked and unlocked by default only by the user that creates the lock but you can also allow the other file owners to modify it
|
||||

|
||||
|
||||
This calls the `openLockNodeDialog` method from the
|
||||
[Content Node Dialog service](content-node-dialog.service.md) method when clicked,
|
||||
and disables the target button if the provided node is not a file or the user doesn't
|
||||
have permissions.
|
||||
have permissions.
|
||||
@@ -1,40 +1,36 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-08
|
||||
---
|
||||
|
||||
# Node Permission service
|
||||
|
||||
Manages role permissions for content nodes.
|
||||
Manages the role permissions for the content nodes
|
||||
|
||||
## Class members
|
||||
## Methods
|
||||
|
||||
### Methods
|
||||
- `getNodeRoles(node: MinimalNodeEntryEntity): Observable<string[]>`
|
||||
Gets a list of roles for the current node.
|
||||
- `node` - the target node
|
||||
- `updatePermissionRoles(node: MinimalNodeEntryEntity, updatedPermissionRole: PermissionElement): Observable<MinimalNodeEntryEntity>`
|
||||
Update the given permission for the related node
|
||||
- `node` - the target node
|
||||
- `updatedPermissionRole` the permission role to update/add
|
||||
|
||||
- `getGroupMemeberByGroupName(groupName: string, opts?: any): Observable<GroupMemberPaging>`
|
||||
Perform a call to the groups api to retrieve all the members related to that group name.
|
||||
- `groupName` the members group name
|
||||
- `opts` additional parameters to perform the call
|
||||
|
||||
- `getGroupMemeberByGroupName(groupName: string = null, opts?: any = null): Observable<GroupMemberPaging>`<br/>
|
||||
Gets all members related to a group name.
|
||||
- `groupName: string = null` - Name of group to look for members
|
||||
- `opts?: any = null` - (Optional) Extra options supported by JSAPI
|
||||
- **Returns** `Observable<GroupMemberPaging>` - List of members
|
||||
- `getNodeRoles(node: MinimalNodeEntryEntity = null): Observable<string[]>`<br/>
|
||||
Gets a list of roles for the current node.
|
||||
- `node: MinimalNodeEntryEntity = null` - The target node
|
||||
- **Returns** `Observable<string[]>` - Array of strings representing the roles
|
||||
- `updatePermissionRoles(node: MinimalNodeEntryEntity = null, updatedPermissionRole: PermissionElement = null): Observable<MinimalNodeEntryEntity>`<br/>
|
||||
Updates the permission for a node.
|
||||
- `node: MinimalNodeEntryEntity = null` - Target node
|
||||
- `updatedPermissionRole: PermissionElement = null` - Permission role to update or add
|
||||
- **Returns** `Observable<MinimalNodeEntryEntity>` - Node with updated permission
|
||||
|
||||
## Details
|
||||
|
||||
This service requires the Content Services Groups API, which is available from version 5.2.1.
|
||||
Content Services supports
|
||||
This service needs the support for the groups api fo content services that is available from version 5.2.1
|
||||
|
||||
See the
|
||||
[Groups API docs](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/GroupssApi.md)
|
||||
in the Alfresco JS API for more information about the types returned by
|
||||
the methods and for the implementation of the REST API the service is
|
||||
[Groups API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/GroupssApi.md)
|
||||
in the Alfresco JS API for more information about the types returned by Tag
|
||||
service methods and for the implementation of the REST API the service is
|
||||
based on.
|
||||
|
||||
## See also
|
||||
|
||||
@@ -26,26 +26,29 @@ Creates and manages public shared links for files.
|
||||
</adf-document-list>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| node | `MinimalNodeEntity` | | Nodes to share. |
|
||||
| baseShareUrl | `string` | | baseShareUrl to add as prefix to the generated link |
|
||||
| node | `MinimalNodeEntity` | | Nodes to share. |
|
||||
| baseShareUrl | `string` | | baseShareUrl to add as prefix to the generated link |
|
||||
|
||||
|
||||
## Details
|
||||
|
||||
This dialog will generate a link with the form "baseShareUrl + sharedId".
|
||||
For example, if you set the input parameter as follows:
|
||||
|
||||
[baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
|
||||
```
|
||||
[baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
|
||||
```
|
||||
|
||||
...then the directive will ask the [Content service](../core/content.service.md) to generate
|
||||
a `sharedId` for the file. This will create a URL like the following:
|
||||
|
||||
http://localhost:8080/myrouteForShareFile/NEW_GENERATED_SHAREID
|
||||
```
|
||||
http://localhost:8080/myrouteForShareFile/NEW_GENERATED_SHAREID
|
||||
```
|
||||
|
||||
To use this,ou will need to implement some code that gets the `NEW_GENERATED_SHAREID` with the router
|
||||
and passes it to a [Viewer component](../core/viewer.component.md):
|
||||
@@ -55,4 +58,4 @@ and passes it to a [Viewer component](../core/viewer.component.md):
|
||||
[sharedLinkId]="NEW_GENERATED_SHAREID"
|
||||
[allowGoBack]="false">
|
||||
</adf-viewer>
|
||||
```
|
||||
```
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-03
|
||||
Last reviewed: 2018-03-23
|
||||
---
|
||||
|
||||
# Permission List Component
|
||||
@@ -17,34 +17,21 @@ Shows node permissions as a table.
|
||||
</adf-permission-list>
|
||||
```
|
||||
|
||||
If permissions list is empty, `No permissions` text is displayed,
|
||||
or custom template can be added:
|
||||
|
||||
```html
|
||||
<adf-permission-list [nodeId]="nodeId">
|
||||
<adf-no-permission-template>
|
||||
Custom no permission template!
|
||||
</adf-no-permission-template>
|
||||
</adf-permission-list>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeId | `string` | "" | ID of the node whose permissions you want to show. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| nodeId | `string` | `null` | ID of the node whose permissions you want to show. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| update | `EventEmitter<PermissionElement>` | Emitted when the permission is updated. |
|
||||
| ---- | ---- | ----------- |
|
||||
| update | `PermissionElement` | Emitted when the permission is updated. |
|
||||
|
||||
## Details
|
||||
|
||||
This component uses a [Datatable component](../core/datatable.component.md) to show the
|
||||
permissions retrieved from the [Node service](../core/node.service.md).
|
||||
For the locally set permissions a role dropdown will be shown to let the user select a new role.
|
||||
When the user selects a new value, the permission role is automatically updated and the `update` event is emitted.
|
||||
For the locallyset permissions a role dropdown will be showed allowing the user to change it.
|
||||
When user select a new value, the permission role is automatically updated and the `update` event is thrown.
|
||||
@@ -2,13 +2,10 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Permission Style model
|
||||
|
||||
Sets custom CSS styles for rows of a Document List according to the item's permissions.
|
||||
|
||||
## Class members
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Rating component
|
||||
|
||||
Allows a user to add ratings to an item.
|
||||
@@ -17,19 +16,17 @@ Allows a user to add ratings to an item.
|
||||
</adf-rating>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeId | `string` | | Identifier of the node to apply the rating to. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| nodeId | `string` | | Identifier of the node to apply the rating to. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| changeVote | `EventEmitter<Object>` | Emitted when the "vote" gets changed. |
|
||||
| ---- | ---- | ----------- |
|
||||
| changeVote | `EventEmitter<{}>` | Emitted when the "vote" gets changed. |
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -1,33 +1,26 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-04
|
||||
---
|
||||
|
||||
# Rating service
|
||||
|
||||
Manages ratings for items in Content Services.
|
||||
|
||||
## Class members
|
||||
## Methods
|
||||
|
||||
### Methods
|
||||
|
||||
- `deleteRating(nodeId: string = null, ratingType: any = null): any`<br/>
|
||||
Removes the current user's rating for a node.
|
||||
- `nodeId: string = null` - Target node
|
||||
- `ratingType: any = null` - Type of rating to remove (can be "likes" or "fiveStar")
|
||||
- **Returns** `any` - Null response indicating that the operation is complete
|
||||
- `getRating(nodeId: string = null, ratingType: any = null): any`<br/>
|
||||
Gets the current user's rating for a node.
|
||||
- `nodeId: string = null` - Node to get the rating from
|
||||
- `ratingType: any = null` - Type of rating (can be "likes" or "fiveStar")
|
||||
- **Returns** `any` - The rating value
|
||||
- `postRating(nodeId: string = null, ratingType: any = null, vote: any = null): any`<br/>
|
||||
Adds the current user's rating for a node.
|
||||
- `nodeId: string = null` - Target node for the rating
|
||||
- `ratingType: any = null` - Type of rating (can be "likes" or "fiveStar")
|
||||
- `vote: any = null` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
|
||||
- **Returns** `any` - Details about the rating, including the new value
|
||||
- `getRating(nodeId: string, ratingType: any): any`
|
||||
Gets the current user's rating for a node.
|
||||
- `nodeId` - Node to get the rating from
|
||||
- `ratingType` - Type of rating (can be "likes" or "fiveStar")
|
||||
- `postRating(nodeId: string, ratingType: any, vote: any): any`
|
||||
Adds the current user's rating for a node.
|
||||
- `nodeId` - Target node for the rating
|
||||
- `ratingType` - Type of rating (can be "likes" or "fiveStar")
|
||||
- `vote` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
|
||||
- `deleteRating(nodeId: string, ratingType: any): any`
|
||||
Removes the current user's rating for a node.
|
||||
- `nodeId` - Target node
|
||||
- `ratingType` - Type of rating to remove (can be "likes" or "fiveStar")
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@ Displays search criteria as a set of "chips".
|
||||
<adf-search-filter #searchFilter></adf-search-filter>
|
||||
```
|
||||
|
||||

|
||||

|
||||
@@ -25,7 +25,7 @@ Displays a input text which shows find-as-you-type suggestions.
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| autocomplete | `boolean` | false | Toggles auto-completion of the search input field. |
|
||||
| customQueryBody | `QueryBody` | | **Deprecated:** in 2.1.0 |
|
||||
| expandable | `boolean` | true | Toggles whether to use an expanding search control. If false then a regular input is used. |
|
||||
@@ -37,7 +37,7 @@ Displays a input text which shows find-as-you-type suggestions.
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| ---- | ---- | ----------- |
|
||||
| optionClicked | `EventEmitter<any>` | Emitted when a file item from the list of "find-as-you-type" results is selected. |
|
||||
| searchChange | `EventEmitter<string>` | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. |
|
||||
| submit | `EventEmitter<any>` | Emitted when the search is submitted pressing ENTER button. The search term is provided as value of the event. |
|
||||
|
||||
@@ -14,16 +14,25 @@ Represents a main container component for custom search and faceted search setti
|
||||
<adf-search-filter #settings></adf-search-filter>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
For the property types please refer to the [Search Category interface](#categories).
|
||||
|
||||
| Property | Description |
|
||||
| --- | --- |
|
||||
| id | Unique identifier of the category. Also used to access QueryBuilder customizations for a particular widget. |
|
||||
| name | Public display name for the category. |
|
||||
| enabled | Toggles category availability. Set to `false` if you want to exclude a category from processing. |
|
||||
| expanded | Toggles the expanded state of the category |
|
||||
| component.selector | The id of the Angular component selector to render the Category |
|
||||
| component.settings | An object containing component specific settings. Put any properties needed for the target component here. |
|
||||
|
||||
## Details
|
||||
|
||||
The component is based on dynamically created widgets to modify the resulting query and options,
|
||||
and the [Search Query Builder service](search-query-builder.service.md)\` to build and execute the search queries.
|
||||
|
||||
Before you begin with customizations, check also the following articles:
|
||||
|
||||
- [Search API](https://docs.alfresco.com/5.2/concepts/search-api.html)
|
||||
- [Alfresco Full Text Search Reference](https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-intro.html)
|
||||
- [ACS API Explorer](https://api-explorer.alfresco.com/api-explorer/#!/search/search)
|
||||
and the [Search Query Builder service](search-query-builder.service.md)` to build and execute the search queries.
|
||||
|
||||
### Configuration
|
||||
|
||||
@@ -34,131 +43,60 @@ Below is an example configuration:
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"sorting": {
|
||||
"options": [
|
||||
{ "key": "name", "label": "Name", "type": "FIELD", "field": "cm:name", "ascending": true },
|
||||
{ "key": "content.sizeInBytes", "label": "Size", "type": "FIELD", "field": "content.size", "ascending": true },
|
||||
{ "key": "description", "label": "Description", "type": "FIELD", "field": "cm:description", "ascending": true }
|
||||
],
|
||||
"defaults": [
|
||||
{ "key": "name", "type": "FIELD", "field": "cm:name", "ascending": true }
|
||||
]
|
||||
"limits": {
|
||||
"permissionEvaluationTime": null,
|
||||
"permissionEvaluationCount": null
|
||||
},
|
||||
"filterQueries": [
|
||||
{ "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" },
|
||||
{ "query": "NOT cm:creator:System" }
|
||||
],
|
||||
"facetFields": [
|
||||
"facetFields": {
|
||||
"facets": [
|
||||
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
|
||||
{ "field": "content.size", "mincount": 1, "label": "Size" },
|
||||
{ "field": "creator", "mincount": 1, "label": "Creator" },
|
||||
{ "field": "modifier", "mincount": 1, "label": "Modifier" }
|
||||
],
|
||||
"facetQueries": {
|
||||
"label": "My facet queries",
|
||||
"pageSize": 4,
|
||||
"queries": [
|
||||
{ "query": "created:2018", "label": "Created This Year" },
|
||||
{ "query": "content.mimetype", "label": "Type" },
|
||||
{ "query": "content.size:[0 TO 10240]", "label": "Size: xtra small"},
|
||||
{ "query": "content.size:[10240 TO 102400]", "label": "Size: small"},
|
||||
{ "query": "content.size:[102400 TO 1048576]", "label": "Size: medium" },
|
||||
{ "query": "content.size:[1048576 TO 16777216]", "label": "Size: large" },
|
||||
{ "query": "content.size:[16777216 TO 134217728]", "label": "Size: xtra large" },
|
||||
{ "query": "content.size:[134217728 TO MAX]", "label": "Size: XX large" }
|
||||
]
|
||||
},
|
||||
"categories": [
|
||||
{
|
||||
"id": "queryName",
|
||||
"name": "Name",
|
||||
"enabled": true,
|
||||
"expanded": true,
|
||||
"component": {
|
||||
"selector": "adf-search-text",
|
||||
"settings": {
|
||||
"pattern": "cm:name:'(.*?)'",
|
||||
"field": "cm:name",
|
||||
"placeholder": "Enter the name"
|
||||
"facetQueries": [
|
||||
{ "query": "created:2018", "label": "Created This Year" },
|
||||
{ "query": "content.mimetype", "label": "Type" },
|
||||
{ "query": "content.size:[0 TO 10240]", "label": "Size: xtra small"},
|
||||
{ "query": "content.size:[10240 TO 102400]", "label": "Size: small"},
|
||||
{ "query": "content.size:[102400 TO 1048576]", "label": "Size: medium" },
|
||||
{ "query": "content.size:[1048576 TO 16777216]", "label": "Size: large" },
|
||||
{ "query": "content.size:[16777216 TO 134217728]", "label": "Size: xtra large" },
|
||||
{ "query": "content.size:[134217728 TO MAX]", "label": "Size: XX large" }
|
||||
],
|
||||
"query": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "queryName",
|
||||
"name": "Name",
|
||||
"enabled": true,
|
||||
"expanded": true,
|
||||
"component": {
|
||||
"selector": "adf-search-text",
|
||||
"settings": {
|
||||
"pattern": "cm:name:'(.*?)'",
|
||||
"field": "cm:name",
|
||||
"placeholder": "Enter the name"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Please refer to the [schema.json](https://github.com/Alfresco/alfresco-ng2-components/blob/master/lib/core/app-config/schema.json) to get more details on available settings, values and formats.
|
||||
|
||||
### Extra fields and filter queries
|
||||
|
||||
You can explicitly define the `include` section for the query from within the application configuration file.
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"include": ["path", "allowableOperations"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In addition, it is also possible to provide a set of queries that are always executed alongside user-defined settings:
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"filterQueries": [
|
||||
{ "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" },
|
||||
{ "query": "NOT cm:creator:System" }
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note that the entries of the `filterQueries` array are joined using the `AND` operator.
|
||||
|
||||
### Sorting
|
||||
|
||||
The Sorting configuration section consists of two blocks:
|
||||
`options` that holds a list of items that users can select from,
|
||||
and `defaults` that contains predefined sorting to use by default.
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"sorting": {
|
||||
"options": [
|
||||
{ "key": "name", "label": "Name", "type": "FIELD", "field": "cm:name", "ascending": true },
|
||||
{ "key": "content.sizeInBytes", "label": "Size", "type": "FIELD", "field": "content.size", "ascending": true },
|
||||
{ "key": "description", "label": "Description", "type": "FIELD", "field": "cm:description", "ascending": true }
|
||||
],
|
||||
"defaults": [
|
||||
{ "key": "name", "type": "FIELD", "field": "cm:name", "ascending": true }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Sorting Definition Attributes
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| key | string | Unique key to identify the entry, can also be used to map DataColumn instances. |
|
||||
| label | string | Display text, can also be an i18n resource key. |
|
||||
| type | string | This specifies how to order - either by using a field or based on the position of the document in the index, or by score/relevance. |
|
||||
| field | string | The name of the field. |
|
||||
| ascending | boolean | The sorting order. |
|
||||
|
||||
See also:
|
||||
* Alfresco Content Services API Reference / Search Api / [Sort](https://docs.alfresco.com/5.2/concepts/search-api-sort.html)
|
||||
|
||||
### Categories
|
||||
|
||||
The Search Settings component and Query Builder require a `categories` section provided within the configuration.
|
||||
|
||||
Categories are needed to build widgets so that users can modify the search query at runtime.
|
||||
Every Category can be represented by a single Angular component, which can be either a simple one or a composite one.
|
||||
Categories are needed to build widgets so that users can modify the search query at runtime. Every Category can be represented by a single Angular component, which can be either a simple one or a
|
||||
composite one.
|
||||
|
||||
```ts
|
||||
export interface SearchCategory {
|
||||
@@ -177,9 +115,6 @@ The interface above also describes entries in the `search.query.categories` sect
|
||||
|
||||

|
||||
|
||||
> **Important note: you need at least one category field to be provided in order to execute the query,
|
||||
so that filters and selected facets are applied.**
|
||||
|
||||
### Settings
|
||||
|
||||
Every use case will have a different set of settings.
|
||||
@@ -195,504 +130,6 @@ export interface SearchWidgetSettings {
|
||||
}
|
||||
```
|
||||
|
||||
### Facet Fields
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"facetFields": [
|
||||
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
|
||||
{ "field": "content.size", "mincount": 1, "label": "Size" },
|
||||
{ "field": "creator", "mincount": 1, "label": "Creator" },
|
||||
{ "field": "modifier", "mincount": 1, "label": "Modifier" },
|
||||
{ "field": "created", "mincount": 1, "label": "Created" }
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Every field declared within the `facetFields` group is presented by a separate collapsible category at runtime.
|
||||
|
||||
By default, users see only top 5 entries.
|
||||
If there are more than 5 entries, the "Show more" button is displayed to allow displaying next block of results.
|
||||
|
||||

|
||||
|
||||
#### FacetField Properties
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| field | string | | This specifies the facet field. |
|
||||
| mincount | number | 1 | This specifies the minimum count required for a facet field to be included in the response. The default value is 1. |
|
||||
| label | string | | This specifies the label to include in place of the facet field. |
|
||||
| prefix | string | | This restricts the possible constraints to only indexed values with a specified prefix. |
|
||||
| limit | number | | Maximum number of results |
|
||||
| pageSize | number | 5 | Display page size |
|
||||
| offset | number | | Offset position |
|
||||
|
||||
### Facet Queries
|
||||
|
||||
Provides a custom category based on admin-defined facet queries.
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"facetQueries": {
|
||||
"label": "Facet queries",
|
||||
"pageSize": 5,
|
||||
"expanded": true,
|
||||
"queries": [
|
||||
{ "query": "created:2018", "label": "Created This Year" },
|
||||
{ "query": "content.mimetype", "label": "Type" },
|
||||
{ "query": "content.size:[0 TO 10240]", "label": "Size: xtra small"},
|
||||
{ "query": "content.size:[10240 TO 102400]", "label": "Size: small"},
|
||||
{ "query": "content.size:[102400 TO 1048576]", "label": "Size: medium" },
|
||||
{ "query": "content.size:[1048576 TO 16777216]", "label": "Size: large" },
|
||||
{ "query": "content.size:[16777216 TO 134217728]", "label": "Size: xtra large" },
|
||||
{ "query": "content.size:[134217728 TO MAX]", "label": "Size: XX large" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The queries declared in the `facetQueries` are collected into a single collapsible category.
|
||||
Only the queries that have 1 or more response entries are displayed at runtime.
|
||||
Based on the `pageSize` value, the component provides a `Show more` button to display more items.
|
||||
|
||||
You can also provide a custom `label` (or i18n resource key) for the resulting collapsible category.
|
||||
|
||||
The `pageSize` property allows you to define the amount of results to display.
|
||||
Users will see `Show more` or `Show less` buttons depending on the result set.
|
||||
The default page size is `5`, it is going to be used in case you set the value to `0` or omit the value entirely.
|
||||
|
||||

|
||||
|
||||
## Widgets
|
||||
|
||||
You can use external application configuration to define a set of Angular components (aka Search Filter Widgets)
|
||||
that provide extra features and/or behaviour for the Search Filter component.
|
||||
|
||||
The Search Filter supports the following widgets out of the box:
|
||||
|
||||
- Check List (`check-list`)
|
||||
- Date Range (`date-range`)
|
||||
- Number Range (`number-range`)
|
||||
- Radio List (`radio`)
|
||||
- Slider (`slider`)
|
||||
- Text (`text`)
|
||||
|
||||
At runtime, ADF uses `selector` attribute values to map and create corresponding Angular element.
|
||||
|
||||
### Check List Widget
|
||||
|
||||
Provides you with a list of check-boxes, each backed by a particular query fragment.
|
||||
You can choose a `label` (or i18n resources key) and a `value`, alongside the conditional `operator` (either `AND` or `OR`).
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "checkList",
|
||||
"name": "Check List",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "check-list",
|
||||
"pageSize": 5,
|
||||
"settings": {
|
||||
"operator": "OR",
|
||||
"options": [
|
||||
{ "name": "Folder", "value": "TYPE:'cm:folder'" },
|
||||
{ "name": "Document", "value": "TYPE:'cm:content'" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
If user checks both boxes, the underlying query will get the following fragment:
|
||||
|
||||
```text
|
||||
... (TYPE:'cm:folder' OR TYPE:'cm:content') ...
|
||||
```
|
||||
|
||||
It is possible to set the size of the page to display items. The default size is 5.
|
||||
If all items fit a single page, then a "Clear all" action button is displayed at the bottom of the widget.
|
||||
|
||||
In case there are more than one page three icon buttons will be displayed to allow:
|
||||
|
||||
- clear all values
|
||||
- show more items (if applicable)
|
||||
- show less items (if applicable)
|
||||
|
||||
### Date Range Widget
|
||||
|
||||
Provides ability to select a range between two Dates based on the particular `field`.
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "createdDateRange",
|
||||
"name": "Created Date (range)",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "date-range",
|
||||
"settings": {
|
||||
"field": "cm:created"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
#### Widget Settings
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| field | string | `undefined` | Field to to use. Required value |
|
||||
| dateFormat | string | 'DD/MM/YYYY' | Date format. Dates used by the datepicker are Moment.js instances, so please check the documentation on [Moment](https://momentjs.com/docs/#/parsing/string-format/) so you can set your required date format. |
|
||||
|
||||
#### Custom date format
|
||||
|
||||
You can set the date range picker to work with any date format your app requires. Just set the wanted value for the 'dateFormat' like this:
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "createdDateRange",
|
||||
"name": "Created Date (range)",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "date-range",
|
||||
"settings": {
|
||||
"field": "cm:created",
|
||||
"dateFormat": "DD-MMM-YY"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Number Range Widget
|
||||
|
||||
Provides ability to select a range between two Numbers based on the particular `field`.
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "contentSizeRange",
|
||||
"name": "Content Size (range)",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "number-range",
|
||||
"settings": {
|
||||
"field": "cm:content.size",
|
||||
"format": "[{FROM} TO {TO}]"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
#### Widget Settings
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| field | string | Field to to use |
|
||||
| format | string | Value format. Uses string substitution to allow all sorts of [range queries](https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-ranges.html). |
|
||||
|
||||
#### Range query format
|
||||
|
||||
For more details on the range search format please refer to the "[Search for ranges](https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-ranges.html)" article.
|
||||
|
||||
The widget uses `{FROM}` and `{TO}` values together with the required target format of the query.
|
||||
You can use any type of the query pattern, the widget automatically substitutes the values, for example:
|
||||
|
||||
```json
|
||||
"settings": {
|
||||
"field": "cm:content.size",
|
||||
"format": "[{FROM} TO {TO}]"
|
||||
}
|
||||
```
|
||||
|
||||
The format above may result in the following query at runtime:
|
||||
|
||||
```text
|
||||
cm:content.size:[0 TO 100]
|
||||
```
|
||||
|
||||
Other format examples:
|
||||
|
||||
| Format | Example |
|
||||
| --- | --- |
|
||||
| `[{FROM} TO {TO}]` | `[0 TO 5]` |
|
||||
| `<{FROM} TO {TO}]` | `<0 TO 5]` |
|
||||
| `[{FROM} TO {TO}>` | `[0 TO 5>` |
|
||||
| `<{FROM} TO {TO}>` | `<0 TO 5>` |
|
||||
|
||||
### Radio List Widget
|
||||
|
||||
Provides you with a list of radio-boxes, each backed by a particular query fragment.
|
||||
The behaviour is very similar to those of the `check-list` except `radio` allows selecting only one item.
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "queryType",
|
||||
"name": "Type",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "radio",
|
||||
"settings": {
|
||||
"field": null,
|
||||
"pageSize": 5,
|
||||
"options": [
|
||||
{ "name": "None", "value": "", "default": true },
|
||||
{ "name": "All", "value": "TYPE:'cm:folder' OR TYPE:'cm:content'" },
|
||||
{ "name": "Folder", "value": "TYPE:'cm:folder'" },
|
||||
{ "name": "Document", "value": "TYPE:'cm:content'" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
It is possible to set the size of the page to display items. The default size is 5.
|
||||
In case there are more than one page three icon buttons will be displayed to allow:
|
||||
|
||||
- show more items (if applicable)
|
||||
- show less items (if applicable)
|
||||
|
||||
### Slider Widget
|
||||
|
||||
Provides ability to select a numeric range based on `min` and `max` values in the form of horizontal slider.
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "contentSize",
|
||||
"name": "Content Size",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "slider",
|
||||
"settings": {
|
||||
"field": "cm:content.size",
|
||||
"min": 0,
|
||||
"max": 18,
|
||||
"step": 1,
|
||||
"thumbLabel": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Resetting slider value
|
||||
|
||||
Slider widget comes with a `Clear` button that allows users to reset selected value to the initial state.
|
||||
|
||||
This helps to undo changes for scenarios where minimal value (like 0 or predefined number) still should not be used in a query.
|
||||
Upon clicking the `Clear` button slider will be reset to the `min` value or `0`, and underlying fragment is removed from the resulting query.
|
||||
|
||||
### Text Widget
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "queryName",
|
||||
"name": "Name",
|
||||
"enabled": true,
|
||||
"expanded": true,
|
||||
"component": {
|
||||
"selector": "text",
|
||||
"settings": {
|
||||
"pattern": "cm:name:'(.*?)'",
|
||||
"field": "cm:name",
|
||||
"placeholder": "Enter the name"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
> **Important note: you need at least one category field to be provided in order to execute the query,
|
||||
so that filters and selected facets are applied.**
|
||||
|
||||
## Custom Widgets
|
||||
|
||||
### Implementing custom widget
|
||||
|
||||
It is possible to create custom Angular components that display and/or modify resulting search query.
|
||||
|
||||
You start creating a Search Filter widget by generating a blank Angular component that implements `SearchWidget` interface:
|
||||
|
||||
```ts
|
||||
export interface SearchWidget {
|
||||
id: string;
|
||||
settings?: SearchWidgetSettings;
|
||||
context?: SearchQueryBuilderService;
|
||||
}
|
||||
```
|
||||
|
||||
Every widget implementation must have an `id`, and may also support external `settings`.
|
||||
At runtime, every time a new instance of the widget is created, it also receives a reference to the `SearchQueryBuilderService`
|
||||
so that you component can access query related information, events and methods.
|
||||
|
||||
```ts
|
||||
@Component({...})
|
||||
export class MyComponent implements SearchWidget, OnInit {
|
||||
|
||||
id: string;
|
||||
settings: SearchWidgetSettings;
|
||||
context: SearchQueryBuilderService;
|
||||
|
||||
key1: string;
|
||||
key2: string;
|
||||
}
|
||||
```
|
||||
|
||||
### Reading external settings
|
||||
|
||||
At runtime, ADF provides every Search Filter widget with the `settings` instance, based on the JSON data
|
||||
that administrator has provided for your widget in the external configuration file.
|
||||
|
||||
It is your responsibility to parse the `settings` property values, convert types or setup defaults.
|
||||
ADF does not provide any validation of the objects, it only reads from the configuration and passes data to your component instance.
|
||||
|
||||
```ts
|
||||
@Component({...})
|
||||
export class MyComponent implements SearchWidget, OnInit {
|
||||
|
||||
id: string;
|
||||
settings: SearchWidgetSettings;
|
||||
context: SearchQueryBuilderService;
|
||||
|
||||
key1: string;
|
||||
key2: string;
|
||||
|
||||
ngOnInit() {
|
||||
if (this.settings) {
|
||||
this.key1 = this.settings['key1'];
|
||||
this.key2 = this.settings['key2'];
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Updating final query
|
||||
|
||||
The `SearchQueryBuilderService` keeps track on all query fragments populated by widgets
|
||||
and composes them together alongside other settings when performing a final query.
|
||||
|
||||
Every query fragment is stored/retrieved using widget `id`.
|
||||
It is your responsibility to format the query correctly.
|
||||
|
||||
Once your value is ready, update the context and run `update` method to let other components know the query has been changed:
|
||||
|
||||
```ts
|
||||
@Component({...})
|
||||
export class MyComponent implements SearchWidget, OnInit {
|
||||
|
||||
...
|
||||
|
||||
onUIChanged() {
|
||||
this.context.queryFragments[this.id] = `some query`;
|
||||
this.context.update();
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
When executed, your fragment will be injected into the resulting query based on the category order in the application configuration file.
|
||||
|
||||
```text
|
||||
... AND (widget1) AND (some query) AND (widget2) AND ...
|
||||
```
|
||||
|
||||
### Registering custom widget
|
||||
|
||||
You can register your own Widgets by utilizing the `SearchFilterService` service:
|
||||
|
||||
```ts
|
||||
import { MyComponent } from './my-component.ts'
|
||||
|
||||
@Component({...})
|
||||
export class MyAppOrComponent {
|
||||
|
||||
constructor(searchFilterService: SearchFilterService) {
|
||||
searchFilterService.widgets['my-widget'] = MyComponent;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
That allows you to declare your widget in the external configuration
|
||||
and pass custom attributes in case your component supports them:
|
||||
|
||||
```json
|
||||
{
|
||||
"search": {
|
||||
"categories": [
|
||||
{
|
||||
"id": "someUniqueId",
|
||||
"name": "String or i18n key",
|
||||
"enabled": true,
|
||||
"component": {
|
||||
"selector": "my-widget",
|
||||
"settings": {
|
||||
"key1": "value1",
|
||||
"key2": "value2",
|
||||
"keyN": "valueN"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
- [Search Query Builder service](search-query-builder.service.md)
|
||||
- [Search Chip List Component](search-chip-list.component.md)
|
||||
- [Search Sorting Picker Component](search-sorting-picker.component.md)
|
||||
- [Search Query Builder service](search-query-builder.service.md)
|
||||
@@ -11,27 +11,21 @@ Stores information from all the custom search and faceted search widgets, compil
|
||||
|
||||
### Methods
|
||||
|
||||
- `addFilterQuery(query: string = null)`<br/>
|
||||
|
||||
- `query: string = null` -
|
||||
- `buildQuery(): QueryBody`<br/>
|
||||
|
||||
- **Returns** `QueryBody` -
|
||||
|
||||
- `execute(): Promise<void>`<br/>
|
||||
|
||||
- **Returns** `Promise<void>` -
|
||||
|
||||
- `getFacetQuery(label: string = null): FacetQuery`<br/>
|
||||
|
||||
- `label: string = null` -
|
||||
- **Returns** `FacetQuery` -
|
||||
|
||||
- `removeFilterQuery(query: string = null)`<br/>
|
||||
|
||||
- `query: string = null` -
|
||||
|
||||
- `update()`<br/>
|
||||
- `addFilterQuery(query: string): void`
|
||||
Adds a filter query to the search.
|
||||
- `query` - Query text
|
||||
- `removeFilterQuery(query: string): void`
|
||||
Removes a previously added filter query from the search.
|
||||
- `query` - Query text
|
||||
- `getFacetQuery(label: string): FacetQuery`
|
||||
Gets a facet query.
|
||||
- `label` - Identifier of the target query
|
||||
- `update(): void`
|
||||
Rebuilds the query and triggers the `updated` event.
|
||||
- `async execute()`
|
||||
Executes the query.
|
||||
- `buildQuery(): QueryBody`
|
||||
Builds the query.
|
||||
|
||||
## Details
|
||||
|
||||
@@ -40,13 +34,13 @@ You can reuse it with multiple component implementations.
|
||||
|
||||
You can use custom widgets to populate and edit the following parts of the resulting query:
|
||||
|
||||
- categories
|
||||
- query fragments that form query expression
|
||||
- include fields
|
||||
- scope settings
|
||||
- filter queries
|
||||
- facet fields
|
||||
- range queries
|
||||
- categories
|
||||
- query fragments that form query expression
|
||||
- include fields
|
||||
- scope settings
|
||||
- filter queries
|
||||
- facet fields
|
||||
- range queries
|
||||
|
||||
```ts
|
||||
constructor(queryBuilder: SearchQueryBuilderService) {
|
||||
@@ -60,4 +54,4 @@ constructor(queryBuilder: SearchQueryBuilderService) {
|
||||
});
|
||||
|
||||
}
|
||||
```
|
||||
```
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
Added: v2.3.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Search Sorting Picker Component
|
||||
|
||||
Provides an ability to select one of the predefined sorting definitions for search results:
|
||||
|
||||
```html
|
||||
<adf-search-sorting-picker></adf-search-sorting-picker>
|
||||
<adf-search-filter></adf-search-filter>
|
||||
```
|
||||
@@ -8,23 +8,6 @@ Last reviewed: 2018-04-13
|
||||
|
||||
Searches items for supplied search terms.
|
||||
|
||||
## Contents
|
||||
|
||||
- [Basic usage](#basic-usage)
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
|
||||
- [Details](#details)
|
||||
|
||||
- [Customise Search Results](#customise-search-results)
|
||||
- [Attach an input field to the search](#attach-an-input-field-to-the-search)
|
||||
- [Custom search configuration](#custom-search-configuration)
|
||||
|
||||
- [See Also](#see-also)
|
||||
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
|
||||
@@ -18,8 +18,6 @@ Displays a dropdown menu to show and interact with the sites of the current user
|
||||
</adf-sites-dropdown>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Tag Node Actions List component
|
||||
|
||||
Shows available actions for tags.
|
||||
@@ -17,18 +16,16 @@ Shows available actions for tags.
|
||||
</adf-tag-node-actions-list>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeId | `string` | | The identifier of a node. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| nodeId | `string` | | The identifier of a node. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs. |
|
||||
| result | `EventEmitter<Object>` | Emitted when an action is chosen. |
|
||||
| ---- | ---- | ----------- |
|
||||
| successAdd | `EventEmitter<any>` | Emitted when a tag is added successfully. |
|
||||
| error | `EventEmitter<any>` | Emitted when an error occurs. |
|
||||
| result | `EventEmitter<{}>` | Emitted when an action is chosen. |
|
||||
|
||||
@@ -2,20 +2,19 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Tag List component
|
||||
|
||||
Shows tags for an item.
|
||||
|
||||

|
||||
|
||||
## Class members
|
||||
## Basic Usage
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| result | `EventEmitter<Object>` | Emitted when a tag is selected. |
|
||||
| ---- | ---- | ----------- |
|
||||
| result | `EventEmitter<{}>` | Emitted when a tag is selected. |
|
||||
|
||||
## See Also
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Tag Node List component
|
||||
|
||||
Shows tags for a node.
|
||||
@@ -17,16 +16,14 @@ Shows tags for a node.
|
||||
</adf-tag-node-list>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| nodeId | `string` | | The identifier of a node. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| nodeId | `string` | | The identifier of a node. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| results | `EventEmitter<Object>` | Emitted when a tag is selected. |
|
||||
| ---- | ---- | ----------- |
|
||||
| results | `EventEmitter<{}>` | Emitted when a tag is selected. |
|
||||
|
||||
@@ -17,9 +17,9 @@ Manages tags in Content Services.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
- `tagName: string = null` - Name of the tag to add
|
||||
- **Returns** `any` - TagEntry object (defined in JSAPI) with details of the new tag
|
||||
- `getAllTheTags(): Observable<any>`<br/>
|
||||
- `getAllTheTags(): any`<br/>
|
||||
Gets a list of all the tags already defined in the repository.
|
||||
- **Returns** `Observable<any>` - TagPaging object (defined in JSAPI) containing the tags
|
||||
- **Returns** `any` - TagPaging object (defined in JSAPI) containing the tags
|
||||
- `getTagsByNodeId(nodeId: string = null): any`<br/>
|
||||
Gets a list of tags added to a node.
|
||||
- `nodeId: string = null` - ID of the target node
|
||||
|
||||
@@ -22,33 +22,28 @@ Activates a file upload.
|
||||
<adf-file-uploading-dialog></adf-file-uploading-dialog>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
|
||||
| comment | `string` | | When you overwrite existing content, you can use the comment field to add a version comment that appears in the version history |
|
||||
| disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
|
||||
| majorVersion | `boolean` | false | majorVersion boolean field to true to indicate a major version should be created. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| disabled | `boolean` | `false` | Toggles component disabled state (if there is no node permission checking). |
|
||||
| uploadFolders | `boolean` | `false` | Allows/disallows upload folders (only for Chrome). |
|
||||
| multipleFiles | `boolean` | `false` | Allows/disallows multiple files |
|
||||
| versioning | `boolean` | `false` | Toggles versioning. |
|
||||
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
|
||||
| multipleFiles | `boolean` | false | Allows/disallows multiple files |
|
||||
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
|
||||
| staticTitle | `string` | | Defines the text of the upload button. |
|
||||
| tooltip | `string` | null | Custom tooltip text. |
|
||||
| uploadFolders | `boolean` | false | Allows/disallows upload folders (only for Chrome). |
|
||||
| versioning | `boolean` | false | Toggles versioning. |
|
||||
| nodeType | `string` | "cm:content" | Custom node type for uploaded file. |
|
||||
| staticTitle | `string` | | Defines the text of the upload button. |
|
||||
| tooltip | `string` | `null` | Custom tooltip text. |
|
||||
| rootFolderId | `string` | `'-root-'` | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
|
||||
| acceptedFilesType | `string` | `'*'` | Filter for accepted file types. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| createFolder | `EventEmitter<Object>` | Emitted when a folder is created. |
|
||||
| error | `EventEmitter<Object>` | Emitted when an error occurs. |
|
||||
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when create permission is missing. |
|
||||
| success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
|
||||
| ---- | ---- | ----------- |
|
||||
| success | `EventEmitter<{}>` | Emitted when the file is uploaded successfully. |
|
||||
| error | `EventEmitter<{}>` | Emitted when an error occurs. |
|
||||
| createFolder | `EventEmitter<{}>` | Emitted when a folder is created. |
|
||||
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -82,4 +77,4 @@ export class MyComponent {
|
||||
|
||||
## See also
|
||||
|
||||
- [Upload Version Button component](upload-version-button.component.md)
|
||||
- [Upload Version Button component](upload-version-button.component.md)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
Last reviewed: 2018-05-04
|
||||
Last reviewed: 2018-04-16
|
||||
---
|
||||
|
||||
# Upload Drag Area Component
|
||||
@@ -36,18 +36,13 @@ export class AppComponent {
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
|
||||
| comment | `string` | | When you overwrite existing content, you can use the comment field to add a version comment that appears in the version history |
|
||||
| disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
|
||||
| majorVersion | `boolean` | false | majorVersion boolean field to true to indicate a major version should be created. |
|
||||
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
|
||||
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
|
||||
| versioning | `boolean` | false | Toggles versioning. |
|
||||
| parentId | `` | | **Deprecated:** 2.4.0 use rootFolderId ID of parent folder node. |
|
||||
| disabled | `boolean` | false | Toggle component disabled state. |
|
||||
| parentId | `string` | | ID of parent folder node. |
|
||||
| versioning | `boolean` | false | When false, renames the file using an integer suffix if there is a name clash. Set to true to indicate that a major version should be created instead. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| createFolder | `EventEmitter<Object>` | Emitted when a folder is created. |
|
||||
| error | `EventEmitter<Object>` | Emitted when an error occurs. |
|
||||
| success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
|
||||
| error | `EventEmitter<Object>` | Raised when the file upload goes in error. |
|
||||
| success | `EventEmitter<Object>` | Emitted when the file is uploaded. |
|
||||
|
||||
@@ -29,31 +29,29 @@ properties and events are the same except for the `node` property that specifies
|
||||
to be versioned (this is a _required_ input parameter). However, some properties don't make
|
||||
sense when applied to the Upload Version Button component, so they are simply ignored.
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
|
||||
| disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| node | `MinimalNodeEntryEntity` | | (**Required**) The node to be versioned. |
|
||||
| disabled | `boolean` | `false` | Toggles component disabled state (if there is no node permission checking). |
|
||||
| uploadFolders | `boolean` | `false` | Allows/disallows upload folders (only for Chrome). |
|
||||
| multipleFiles | `boolean` | `false` | Allows/disallows multiple files |
|
||||
| versioning | `boolean` | `false` | Toggles versioning. |
|
||||
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
|
||||
| multipleFiles | `boolean` | false | Allows/disallows multiple files |
|
||||
| node | `MinimalNodeEntryEntity` | | (**Required**) The node to be versioned. |
|
||||
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
|
||||
| staticTitle | `string` | | Defines the text of the upload button. |
|
||||
| tooltip | `string` | null | Custom tooltip text. |
|
||||
| uploadFolders | `boolean` | false | Allows/disallows upload folders (only for Chrome). |
|
||||
| versioning | `boolean` | false | Toggles versioning. |
|
||||
| staticTitle | `string` | | Defines the text of the upload button. |
|
||||
| tooltip | `string` | `null` | Custom tooltip text. |
|
||||
| rootFolderId | `string` | `'-root-'` | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
|
||||
| acceptedFilesType | `string` | `'*'` | Filter for accepted file types. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| createFolder | `EventEmitter<Object>` | Emitted when a folder is created. |
|
||||
| error | `EventEmitter<Object>` | Emitted when an error occurs. |
|
||||
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
|
||||
| success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
|
||||
| ---- | ---- | ----------- |
|
||||
| success | `EventEmitter<{}>` | Emitted when the file is uploaded successfully. |
|
||||
| error | `EventEmitter<{}>` | Emitted when an error occurs. |
|
||||
| createFolder | `EventEmitter<{}>` | Emitted when a folder is created. |
|
||||
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
|
||||
|
||||
## Details
|
||||
|
||||
@@ -73,4 +71,4 @@ So, to sum up, this component:
|
||||
|
||||
## See also
|
||||
|
||||
- [Upload Button component](upload-button.component.md)
|
||||
- [Upload Button component](upload-button.component.md)
|
||||
|
||||
@@ -1,42 +1,38 @@
|
||||
---
|
||||
Added: v2.0.0
|
||||
Status: Experimental
|
||||
Last reviewed: 2018-05-08
|
||||
---
|
||||
|
||||
# Version List component
|
||||
|
||||
Displays the version history of a node in a Version Manager component.
|
||||
Displays the version history of a node in a Version Manager component
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```html
|
||||
<adf-version-list [node]="myNode"></adf-version-list>
|
||||
<adf-version-list [id]="nodeId"></adf-version-list>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| allowDownload | `boolean` | true | Enable/disable possibility to download a version of the current node. |
|
||||
| id | `string` | | **Deprecated:** in 2.3.0 |
|
||||
| node | `MinimalNodeEntryEntity` | | The target node. |
|
||||
| showActions | `boolean` | true | Toggles showing/hiding of version actions |
|
||||
| showComments | `boolean` | true | Toggles showing/hiding of comments |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| node | `MinimalNodeEntryEntity` | | Node whose version history you want to display. |
|
||||
| showComments | `boolean` | true | Set this to false if version comments should not be displayed. |
|
||||
| allowDownload | `boolean` | true | Toggles downloads of previous versions. Set this to false to not show the menu item for version download. |
|
||||
|
||||
### DOM events
|
||||
|
||||
All DOM events are bubbling and can be handled in the parent components up to the root application component.
|
||||
|
||||
| Name | Description |
|
||||
| --- | --- |
|
||||
| version-deleted | Raised after a version is deleted. |
|
||||
| version-restored | Raised after a version is restored. |
|
||||
|
||||
## Details
|
||||
|
||||
This component is used by the Version Manager component to
|
||||
load and displays the version history of a node.
|
||||
|
||||
If you want show readonly version list you set this component with showActions false:
|
||||
|
||||
```html
|
||||
<adf-version-list [node]="myNode" [showActions]="false" ></adf-version-list>
|
||||
```
|
||||
|
||||
Inside the version manager component, there is the underlying VersionListComponent.
|
||||
The VersionListComponent loads and displays the version history of a node.
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -22,22 +22,20 @@ Displays the version history of a node with the ability to upload a new version.
|
||||
</adf-version-manager>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
|
||||
| node | `MinimalNodeEntryEntity` | | Target node to manage version history. |
|
||||
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
|
||||
| ---- | ---- | --- | ----------- |
|
||||
| node | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | |The node you want to manage the version history of. |
|
||||
| showComments | `boolean` | true | Set this to false if version comments should not be displayed. |
|
||||
| allowDownload | `boolean` | true | Toggles downloads of previous versions. Set this to false to not show the menu item for version download. |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| uploadError | `EventEmitter<Object>` | Emitted when an error occurs during upload. |
|
||||
| uploadSuccess | `EventEmitter<Object>` | Emitted when a file is uploaded successfully. |
|
||||
| Name | Description |
|
||||
| --- | --- |
|
||||
| uploadSuccess | Raised when the file is uploaded |
|
||||
| uploadError | Emitted when an error occurs.|
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -2,26 +2,10 @@
|
||||
Added: v2.0.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# Webscript component
|
||||
|
||||
Provides access to Webscript features.
|
||||
|
||||
## Contents
|
||||
|
||||
- [Basic usage](#basic-usage)
|
||||
|
||||
- [Class members](#class-members)
|
||||
|
||||
- [Properties](#properties)
|
||||
- [Events](#events)
|
||||
|
||||
- [Details](#details)
|
||||
|
||||
- [Webscript View HTML example](#webscript-view-html-example)
|
||||
- [Webscript View DATATABLE example](#webscript-view-datatable-example)
|
||||
- [Webscript View JSON example](#webscript-view-json-example)
|
||||
|
||||
## Basic usage
|
||||
|
||||
```html
|
||||
@@ -60,24 +44,22 @@ export class AppComponent {
|
||||
}
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| contentType | `string` | "TEXT" | Content type to interpret the data received from the webscript. Can be "JSON" , "HTML" , "DATATABLE" or "TEXT" |
|
||||
| contextRoot | `string` | "alfresco" | Path where the application is deployed |
|
||||
| scriptArgs | `any` | | Arguments to pass to the webscript. |
|
||||
| scriptPath | `string` | | (required) Path to the webscript (as defined by webscript). |
|
||||
| servicePath | `string` | "service" | Path that the webscript service is mapped to. |
|
||||
| showData | `boolean` | true | Toggles whether to show or hide the data. |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| scriptPath | `string` | | (required) Path to the webscript (as defined by webscript). |
|
||||
| scriptArgs | `any` | | Arguments to pass to the webscript. |
|
||||
| showData | `boolean` | `true` | Toggles whether to show or hide the data. |
|
||||
| contextRoot | `string` | `'alfresco'` | Path where the application is deployed |
|
||||
| servicePath | `string` | `'service'` | Path that the webscript service is mapped to. |
|
||||
| contentType | `string` | `'TEXT'` | Content type to interpret the data received from the webscript. Can be "JSON" , "HTML" , "DATATABLE" or "TEXT" |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| success | `EventEmitter<Object>` | Emitted when the operation succeeds. You can get the plain data from the webscript through the **success** event parameter and use it as you need in your application. |
|
||||
| ---- | ---- | ----------- |
|
||||
| success | `EventEmitter<{}>` | Emitted when the operation succeeds. You can get the plain data from the webscript through the **success** event parameter and use it as you need in your application. |
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
Added: v2.4.0
|
||||
Status: Experimental
|
||||
Last reviewed: 2018-05-16
|
||||
---
|
||||
|
||||
# About Component
|
||||
|
||||
This component allow you to have a general overview of the version of ADF installed and the status of the Content service and Process service
|
||||
Note at the moment this component is mostly for internal use and it require:
|
||||
|
||||
- create a version file : npm list --depth=0 --json=true --prod=true > versions.json
|
||||
- provide this version file in the dist folder
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```html
|
||||
<adf-about></adf-about>
|
||||
```
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user