diff --git a/.travis.yml b/.travis.yml index 001e89ea77..361e9ad70e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,9 @@ node_js: addons: chrome: stable +before_script: + - "sudo chown root /opt/google/chrome/chrome-sandbox" + - "sudo chmod 4755 /opt/google/chrome/chrome-sandbox" before_install: - export CHROME_BIN=chromium-browser @@ -26,7 +29,7 @@ install: if ([ "$TRAVIS_BRANCH" = "master" ]); then (./scripts/npm-build-all.sh || exit 1;); else - (./scripts/npm-build-all.sh -vjsapi alpha || exit 1;); + (./scripts/npm-build-all.sh -vjsapi alpha -sb || exit 1;); fi fi @@ -48,7 +51,7 @@ script: fi - if ([ "$MODULE" == "packaging" ]); then - (cd lib && npm run new-build || exit 1;); + (cd lib && npm run build || exit 1;); fi - if ([ "$MODULE" == "demo-shell" ]); then @@ -58,12 +61,30 @@ script: (./scripts/start.sh -dev -t -ss -vjsapi alpha || exit 1;); fi fi + jobs: include: + - 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 - 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 # jobs: # include: diff --git a/.vscode/settings.json b/.vscode/settings.json index dfd9fe7bf0..d1d4ace8ba 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,6 @@ "**/.happypack": true }, "editor.renderIndentGuides": true, - "tslint.configFile": "ng2-components/tslint.json", "markdownlint.config": { "MD032": false, "MD004": false, diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..ce734dea7f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,23 @@ +# Contributor Code of Conduct + +We want to make everyone feel welcome to contribute to ADF. +We promise to respect everyone who posts issues, updates documentation, +submits pull requests, provides feedback in comments, or makes any other contribution to the project. + +We expect all discussion about the project (on GitHub, social media and other channels) to be positive and constructive. +We do not accept personal attacks, trolling, public or private harassment, insults, +or other unprofessional conduct towards anyone. + +We promise to show respect to all contributors regardless of their gender, gender identity, +sexual orientation, disability, age, race, ethnicity, religion, or level of experience. + +We expect all contributors to understand and follow these standards +If any member of the community does not follow the code of conduct, +the maintainers will do whatever they consider appropriate to stop the unacceptable behavior. +This may include removing issues, comments, and PRs or blocking accounts. +Any bans may be temporary or permanent, at the maintainers’ discretion. + +Contact us if you see any behavior that breaks the code of conduct, whether it is directed at you or at anyone else. +We take responsibility for making sure the code of conduct is clear and understandable, +so you should also contact us if you think there is anything that needs to be explained better. +Our contact email address is: [conduct@alfresco.com](mailto:conduct@alfresco.com) diff --git a/Dockerfile b/Dockerfile index 474eb72d44..a17a108b12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx +FROM nginx:alpine COPY demo-shell/nginx.conf /etc/nginx/nginx.conf diff --git a/appveyor.yml b/appveyor.yml index 67cd48a44b..89e4221079 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -54,4 +54,4 @@ install: # Don't actually build. build: off matrix: - fast_finish: false + fast_finish: true diff --git a/demo-shell/.angular-cli.json b/demo-shell/.angular-cli.json index 0b378c281f..fc67e939c3 100644 --- a/demo-shell/.angular-cli.json +++ b/demo-shell/.angular-cli.json @@ -149,14 +149,6 @@ { "project": "src/tsconfig.app.json", "exclude": "**/node_modules/**/*" - }, - { - "project": "src/tsconfig.spec.json", - "exclude": "**/node_modules/**/*" - }, - { - "project": "e2e/tsconfig.e2e.json", - "exclude": "**/node_modules/**/*" } ], "test": { diff --git a/demo-shell/README.md b/demo-shell/README.md index cfb3603655..95a5186aeb 100644 --- a/demo-shell/README.md +++ b/demo-shell/README.md @@ -22,44 +22,24 @@ To simplify development and reduce the time to get the application started, we h The settings above address most common scenarios for running ACS on port 8080 and APS on port 9999 and allow you to skip the CORS configuration. -If you would like to change default proxy settings, please edit the `config/webpack.common.js` file. +If you would like to change default proxy settings, please edit the `proxy.conf.js` file. ## Application settings (server-side) -All server-side application settings are stored in the `app.config-dev.json` and `app.config-prod.json` files. +All server-side application settings are stored in the [src/app.config.json](src/app.config.json). By default the configuration files have the content similar to the following one: ```json { - "ecmHost": "http://localhost:3000/ecm", - "bpmHost": "http://localhost:3000/bpm", + "$schema": "../../lib/core/app-config/schema.json", + "ecmHost": "http://{hostname}:{port}", + "bpmHost": "http://{hostname}:{port}", "application": { - "name": "Alfresco" + "name": "Alfresco ADF Application" } } ``` -You can add any additional settings to the application configuration file if needed. - -Configuration files are picked based on environment settings (see `app.module.ts` for more details). - -```ts -let appConfigFile = 'app.config-dev.json'; -if (process.env.ENV === 'production') { - appConfigFile = 'app.config-prod.json'; -} - -@NgModule({ - imports: [ - ... - CoreModule.forRoot({ - appConfigFile: appConfigFile - }), - ... - ] -}) -``` - ## Development build ```sh @@ -85,17 +65,10 @@ This command builds project in `production` mode. All output is placed to `dist` folder and can be served to your preferred web server. You should need no additional files outside the `dist` folder. -### Important notes - -By default demo application is configured to use [wsrv](https://www.npmjs.com/package/wsrv) tool (lightweight web server) -to serve production build output. It will be running at `0.0.0.0` address with port `3000` and allow you to access your application -via network. However, you can use any web server of your choice in production. - ## Development branch build If you want to run the demo shell with the latest changes from the development branch, use the following command from the /script folder: ```sh -./npm-clean.sh -./start-linked.sh -install +npm run start:dev ``` diff --git a/demo-shell/e2e/app.e2e-spec.ts b/demo-shell/e2e/app.e2e-spec.ts index cd3f2ce792..5cbdd1f59f 100644 --- a/demo-shell/e2e/app.e2e-spec.ts +++ b/demo-shell/e2e/app.e2e-spec.ts @@ -1,14 +1,14 @@ import { MyappPage } from './app.po'; describe('myapp App', () => { - let page: MyappPage; + let page: MyappPage; - beforeEach(() => { - page = new MyappPage(); - }); + beforeEach(() => { + page = new MyappPage(); + }); - it('should display message saying app works', () => { - page.navigateTo(); - expect(page.getParagraphText()).toEqual('app works!'); - }); + it('should display toolbar', () => { + page.navigateTo(); + expect(page.getToolbar()).toBeDefined(); + }); }); diff --git a/demo-shell/e2e/app.po.ts b/demo-shell/e2e/app.po.ts index ecb0bc31b9..73e3ccb8a1 100644 --- a/demo-shell/e2e/app.po.ts +++ b/demo-shell/e2e/app.po.ts @@ -1,11 +1,11 @@ import { browser, element, by } from 'protractor'; export class MyappPage { - navigateTo() { - return browser.get('/'); - } + navigateTo() { + return browser.get('/'); + } - getParagraphText() { - return element(by.css('app-root h1')).getText(); - } + getToolbar() { + return element(by.tagName('adf-toolbar')); + } } diff --git a/demo-shell/package.json b/demo-shell/package.json index af4e8f40bc..11accd56fb 100644 --- a/demo-shell/package.json +++ b/demo-shell/package.json @@ -1,27 +1,26 @@ { "name": "Alfresco-ADF-Angular-Demo", "description": "Demo shell for Alfresco Angular components", - "version": "2.2.0", + "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 --app dist --open --aot=false", - "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 pp-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 --build-optimizer=false --aot=false --host 0.0.0.0 --disable-host-check --app dist", - "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 style:dev && npm run server-versions && rimraf dist && node --max_old_space_size=30000 node_modules/.bin/ng build --prod --build-optimizer=false --aot=false --app dist", + "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", + "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": "npm run clean-build && rimraf dist node_modules typings dist", + "clean": "rimraf dist node_modules typings", "clean-lib-angular": "rimraf ../lib/node_modules/@angular", - "clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'", "clean-lock": "rimraf package-lock.json", "webpack": "node node_modules/webpack/bin/webpack.js" }, @@ -63,10 +62,10 @@ ], "private": true, "dependencies": { - "@alfresco/adf-content-services": "2.2.0", - "@alfresco/adf-core": "2.2.0", - "@alfresco/adf-insights": "2.2.0", - "@alfresco/adf-process-services": "2.2.0", + "@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", @@ -79,10 +78,10 @@ "@angular/platform-browser": "5.1.1", "@angular/platform-browser-dynamic": "5.1.1", "@angular/router": "5.1.1", - "@mat-datetimepicker/core": "^1.0.1", - "@mat-datetimepicker/moment": "^1.0.1", + "@mat-datetimepicker/core": "1.0.4", + "@mat-datetimepicker/moment": "1.0.4", "@ngx-translate/core": "9.1.1", - "alfresco-js-api": "2.2.0", + "alfresco-js-api": "2.3.0", "chart.js": "2.5.0", "classlist.js": "1.1.20150312", "core-js": "2.4.1", @@ -101,7 +100,6 @@ "zone.js": "0.8.14" }, "devDependencies": { - "@angular-devkit/core": "0.0.28", "@angular/cli": "1.6.5", "@angular/compiler-cli": "^5.2.0", "@angular/language-service": "^5.2.0", diff --git a/demo-shell/resources/i18n/de.json b/demo-shell/resources/i18n/de.json index 7d4ebd9694..56a7c16af3 100644 --- a/demo-shell/resources/i18n/de.json +++ b/demo-shell/resources/i18n/de.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Details", + "COMMENTS": "Kommentare", + "PROPERTIES": "Eigenschaften", + "VERSIONS": "Versionen" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Löschen zulassen", + "SHOW_COMMENTS": "Anmerkungen zu Versionen einblenden", + "ALLOW_DOWNLOAD": "Versions-Download zulassen" + } + }, "title": "Willkommen", "VERSION": { "NO_PERMISSION": "Sie verfügen nicht über die nötige Berechtigung, um Versionen dieses Inhalts zu verwalten", @@ -9,6 +22,12 @@ "TITLE": "Versionen verwalten" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "Schließen", + "TITLE": "Metadaten" + } + }, "APP_LAYOUT": { "APP_NAME": "ADF-Demoanwendung", "HOME": "Startseite", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "DataTable (Lazy)", "FORM": "Formular", "FORM_LIST": "Formularliste", + "FORM_LOADING": "Formular laden", "UPLOADER": "Uploader", "WEBSCRIPT": "Webscript", "TAG": "Tag", + "TRASHCAN": "Papierkorb", "SOCIAL": "Soziale Funktionen", "SETTINGS": "Einstellungen", "OVERLAY_VIEWER": "Overlay-Viewer", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "Erstellt von", "SEARCH_SERVICE_APPROACH": "Aktivieren Sie diese Option, um die Eingabeeigenschaft zu deaktivieren und die Nutzung des Services zu konfigurieren" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "Endgültig löschen", + "RESTORE": "Wiederherstellen" + }, + "EMPTY_STATE": { + "TITLE": "Papierkorb ist leer", + "FIRST_TEXT": "Gelöschte Elemente werden in den Papierkorb verschoben.", + "SECOND_TEXT": "Leeren Sie den Papierkorb, um die Elemente endgültig zu löschen." + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "Mehrfachauswahl (mit Kontrollkästchen)", "MULTIPLE_FILE_UPLOAD": "Mehrere Dateien hochladen", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "Hochladen aktivieren", "ENABLE_INFINITE_SCROLL": "Unendlich Scrollen aktivieren", "MULTISELECT_DESCRIPTION": "Mit der Befehls- (Mac) oder der Steuerungstaste (Windows) können Sie die Auswahl mehrerer Elemente umschalten", - "RECENT": "Zuletzt verwendete Dateien", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "Die Liste der zuletzt verwendeten Dateien ist leer" + }, + "TITLE": "Zuletzt verwendete Dateien" + }, "COLUMNS": { "DISPLAY_NAME": "Namen anzeigen", + "IS_LOCKED": "Sperren", "TAG": "Tag", "CREATED_BY": "Erstellt von", "CREATED_ON": "Erstellt am", - "CREATED": "Erstellt" + "CREATED": "Erstellt", + "SIZE": "Größe", + "DELETED_ON": "Gelöscht", + "DELETED_BY": "Gelöscht von" }, "TOOLBAR": { "CARDVIEW": "Kartenansichtsmodus", @@ -59,7 +100,10 @@ "DELETE": "Löschen" }, "ACTIONS": { + "VERSIONS": "Versionen verwalten", + "METADATA": "Info", "DOWNLOAD": "Herunterladen", + "PERMISSION": "Berechtigung", "FOLDER": { "COPY": "Kopieren", "MOVE": "Verschieben", @@ -98,6 +142,13 @@ "STORE": "Speichern", "RESTORE": "Wiederherstellen" }, + "FORM-LOADING": { + "FORM_DATA": "Formulardaten", + "FORM_DATA_MESSAGE": "Geben Sie Werte ein, um das Formular auszufüllen", + "TYPEAHEAD_PLACEHOLDER": "Automatische Vervollständigung", + "RADIO_PLACEHOLDER": "Optionsschaltfläche", + "SELECT_PLACEHOLDER": "Dropdown" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "Content Services-Tagliste", "INSERT": "Node-ID einfügen", "NODE_LIST": "Tagliste nach Node-ID" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "Berechtigungen erben", + "INHERITED_PERMISSIONS_BUTTON": "Berechtigungen geerbt" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/en.json b/demo-shell/resources/i18n/en.json index 1896f8ab17..bc3f79eae6 100644 --- a/demo-shell/resources/i18n/en.json +++ b/demo-shell/resources/i18n/en.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Details", + "COMMENTS": "Comments", + "PROPERTIES": "Properties", + "VERSIONS": "Versions" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Allow delete", + "SHOW_COMMENTS" : "Show comments on versions", + "ALLOW_DOWNLOAD" :"Enable version download" + } + }, "title": "Welcome", "VERSION": { "NO_PERMISSION": "You don't have permission to manage versions of this content", @@ -26,6 +39,7 @@ "DATATABLE_LAZY": "Datatable (Lazy)", "FORM": "Form", "FORM_LIST": "Form List", + "FORM_LOADING": "Form Loading", "UPLOADER": "Uploader", "WEBSCRIPT": "Webscript", "TAG": "Tag", @@ -42,7 +56,7 @@ }, "TRASHCAN" :{ "ACTIONS":{ - "DELETE_PERMANENT":"Delete permanent", + "DELETE_PERMANENT":"Delete permanently", "RESTORE":"Restore" }, "EMPTY_STATE": { @@ -63,12 +77,13 @@ "MULTISELECT_DESCRIPTION" : "Use Cmd (Mac) or Ctrl (Windows) to toggle selection of multiple items", "RECENT" : { "EMPTY_STATE": { - "TITLE": "Recent is empty" + "TITLE": "Recent Files list is empty" }, "TITLE":"Recent Files" }, "COLUMNS": { "DISPLAY_NAME": "Display name", + "IS_LOCKED": "Lock", "TAG": "Tag", "CREATED_BY": "Created by", "CREATED_ON": "Created on", @@ -88,6 +103,7 @@ "VERSIONS": "Manage versions", "METADATA": "Info", "DOWNLOAD": "Download", + "PERMISSION": "Permission", "FOLDER": { "COPY": "Copy", "MOVE": "Move", @@ -126,6 +142,13 @@ "STORE": "Store", "RESTORE": "Restore" }, + "FORM-LOADING": { + "FORM_DATA" : "Form Data", + "FORM_DATA_MESSAGE": "Enter values to populate the form", + "TYPEAHEAD_PLACEHOLDER": "Typeahead", + "RADIO_PLACEHOLDER": "Radio Button", + "SELECT_PLACEHOLDER": "DropDown" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -143,5 +166,9 @@ "LIST":"List Tags Content Services", "INSERT":"Insert Node ID", "NODE_LIST":"Tag list By Node ID" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON" :"Inherit Permission" , + "INHERITED_PERMISSIONS_BUTTON" : "Permission Inherited" } } diff --git a/demo-shell/resources/i18n/es.json b/demo-shell/resources/i18n/es.json index b2eda84972..ec3e1ec53f 100644 --- a/demo-shell/resources/i18n/es.json +++ b/demo-shell/resources/i18n/es.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Detalles", + "COMMENTS": "Comentarios", + "PROPERTIES": "Propiedades", + "VERSIONS": "Versiones" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Permitir eliminar", + "SHOW_COMMENTS": "Mostrar comentarios en las versiones", + "ALLOW_DOWNLOAD": "Permitir descarga de la versión" + } + }, "title": "Bienvenido", "VERSION": { "NO_PERMISSION": "No tiene permiso para administrar versiones de este contenido", @@ -9,6 +22,12 @@ "TITLE": "Gestionar versiones" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "Cerrar", + "TITLE": "Metadatos" + } + }, "APP_LAYOUT": { "APP_NAME": "Aplicación ADF Demo", "HOME": "Inicio", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Tabla de datos (diferida)", "FORM": "Formulario", "FORM_LIST": "Lista de formularios", + "FORM_LOADING": "Carga de formulario", "UPLOADER": "Cargador", "WEBSCRIPT": "Webscript", "TAG": "Etiqueta", + "TRASHCAN": "Papelera", "SOCIAL": "Social", "SETTINGS": "Configuración", "OVERLAY_VIEWER": "Visor de superposición", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "Creado por", "SEARCH_SERVICE_APPROACH": "Marque esto para desactivar la propiedad de entrada y configurar el uso del servicio" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "Eliminar permanentemente", + "RESTORE": "Restaurar" + }, + "EMPTY_STATE": { + "TITLE": "La papelera está vacía", + "FIRST_TEXT": "Los elementos que elimine se trasladan a la papelera.", + "SECOND_TEXT": "Vacíe la papelera para eliminar los elementos permanentemente." + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "Selección múltiple (con casillas)", "MULTIPLE_FILE_UPLOAD": "Carga de varios ficheros", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "Habilitar carga", "ENABLE_INFINITE_SCROLL": "Habilitar desplazamiento infinito", "MULTISELECT_DESCRIPTION": "Utilice Cmd (Mac) o Ctrl (Windows) para cambiar la selección de varios elementos", - "RECENT": "Ficheros recientes", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "La lista de ficheros recientes está vacía" + }, + "TITLE": "Ficheros recientes" + }, "COLUMNS": { "DISPLAY_NAME": "Nombre a mostrar", + "IS_LOCKED": "Bloquear", "TAG": "Etiqueta", "CREATED_BY": "Creado por", "CREATED_ON": "Creado", - "CREATED": "Creado" + "CREATED": "Creado", + "SIZE": "Tamaño", + "DELETED_ON": "Eliminado", + "DELETED_BY": "Eliminado por" }, "TOOLBAR": { "CARDVIEW": "Modo de vista de tarjeta", @@ -59,14 +100,16 @@ "DELETE": "Eliminar" }, "ACTIONS": { + "VERSIONS": "Gestionar versiones", + "METADATA": "Información", "DOWNLOAD": "Descargar", + "PERMISSION": "Permiso", "FOLDER": { "COPY": "Copiar", "MOVE": "Mover", "DELETE": "Eliminar" }, "DOCUMENT": { - "DOWNLOAD": "Descargar", "COPY": "Copiar", "MOVE": "Mover", "DELETE": "Eliminar", @@ -99,6 +142,13 @@ "STORE": "Almacenar", "RESTORE": "Restaurar" }, + "FORM-LOADING": { + "FORM_DATA": "Datos del formulario", + "FORM_DATA_MESSAGE": "Introduzca valores para rellenar el formulario", + "TYPEAHEAD_PLACEHOLDER": "Predictivo", + "RADIO_PLACEHOLDER": "Botón de opción", + "SELECT_PLACEHOLDER": "Desplegable" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -116,5 +166,9 @@ "LIST": "Lista de etiquetas de Content Services", "INSERT": "Insertar ID del nodo", "NODE_LIST": "Lista de etiquetas por ID de nodo" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "Heredar permiso", + "INHERITED_PERMISSIONS_BUTTON": "Permiso heredado" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/fr.json b/demo-shell/resources/i18n/fr.json index 68c788e59e..8b9fe63e7e 100644 --- a/demo-shell/resources/i18n/fr.json +++ b/demo-shell/resources/i18n/fr.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Détails", + "COMMENTS": "Commentaires", + "PROPERTIES": "Propriétés", + "VERSIONS": "Versions" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Autoriser la suppression", + "SHOW_COMMENTS": "Afficher les commentaires sur les versions", + "ALLOW_DOWNLOAD": "Autoriser le téléchargement de la version" + } + }, "title": "Bienvenue", "VERSION": { "NO_PERMISSION": "Vous n'avez pas les droits d'accès pour gérer les versions de ce contenu", @@ -9,6 +22,12 @@ "TITLE": "Gérer les versions" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "Fermer", + "TITLE": "Métadonnées" + } + }, "APP_LAYOUT": { "APP_NAME": "Application Démo ADF", "HOME": "Accueil", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Table de données (différé)", "FORM": "Formulaire", "FORM_LIST": "Liste de formulaires", + "FORM_LOADING": "Chargement du formulaire", "UPLOADER": "Chargeur", "WEBSCRIPT": "Script Web", "TAG": "Tag", + "TRASHCAN": "Corbeille", "SOCIAL": "Réseaux sociaux", "SETTINGS": "Paramètres", "OVERLAY_VIEWER": "Visualisation de la superposition", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "Créé par", "SEARCH_SERVICE_APPROACH": "Cochez cette option pour désactiver la propriété d'entrée et configurer à partir du service" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "Supprimer définitivement", + "RESTORE": "Restaurer" + }, + "EMPTY_STATE": { + "TITLE": "La corbeille est vide", + "FIRST_TEXT": "Les éléments supprimés sont placés dans la corbeille.", + "SECOND_TEXT": "Videz la corbeille pour supprimer définitivement les éléments." + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "Sélection multiple (avec cases à cocher)", "MULTIPLE_FILE_UPLOAD": "Importation de fichiers multiples", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "Activer l'importation", "ENABLE_INFINITE_SCROLL": "Activer le défilement illimité", "MULTISELECT_DESCRIPTION": "Utiliser Cmd (Mac) ou Ctrl (Windows) pour activer/désactiver la sélection d'éléments multiples", - "RECENT": "Fichiers récents", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "La liste des fichiers récents est vide" + }, + "TITLE": "Fichiers récents" + }, "COLUMNS": { "DISPLAY_NAME": "Nom affiché", + "IS_LOCKED": "Verrouiller", "TAG": "Tag", "CREATED_BY": "Créé par", "CREATED_ON": "Créé le", - "CREATED": "Créé" + "CREATED": "Créé", + "SIZE": "Taille", + "DELETED_ON": "Supprimé", + "DELETED_BY": "Supprimé par" }, "TOOLBAR": { "CARDVIEW": "Mode d'affichage Carte", @@ -59,7 +100,10 @@ "DELETE": "Supprimer" }, "ACTIONS": { + "VERSIONS": "Gérer les versions", + "METADATA": "Informations", "DOWNLOAD": "Télécharger", + "PERMISSION": "Droit d'accès", "FOLDER": { "COPY": "Copier", "MOVE": "Déplacer", @@ -98,6 +142,13 @@ "STORE": "Stocker", "RESTORE": "Restaurer" }, + "FORM-LOADING": { + "FORM_DATA": "Données du formulaire", + "FORM_DATA_MESSAGE": "Entrez les valeurs pour remplir le formulaire", + "TYPEAHEAD_PLACEHOLDER": "Saisie semi-automatique", + "RADIO_PLACEHOLDER": "Case d'option", + "SELECT_PLACEHOLDER": "Liste déroulante" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "Liste de tags Content Services", "INSERT": "Insérer l'ID du nœud", "NODE_LIST": "Liste de tags par ID de nœud" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "Hériter les droits d'accès", + "INHERITED_PERMISSIONS_BUTTON": "Droits d'accès hérités" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/it.json b/demo-shell/resources/i18n/it.json index f2246aee07..0027e52a75 100644 --- a/demo-shell/resources/i18n/it.json +++ b/demo-shell/resources/i18n/it.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Dettagli", + "COMMENTS": "Commenti", + "PROPERTIES": "Proprietà", + "VERSIONS": "Versione" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Consenti eliminazione", + "SHOW_COMMENTS": "Mostra commenti sulle versioni", + "ALLOW_DOWNLOAD": "Abilita download versioni" + } + }, "title": "Benvenuto", "VERSION": { "NO_PERMISSION": "Non hai il permesso di gestire versioni di questo contenuto", @@ -9,6 +22,12 @@ "TITLE": "Gestione versioni" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "Chiudi", + "TITLE": "Metadati" + } + }, "APP_LAYOUT": { "APP_NAME": "Applicazione demo ADF", "HOME": "Home", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Caricamento dati (ottimizzato)", "FORM": "Modulo", "FORM_LIST": "Elenco moduli", + "FORM_LOADING": "Caricamento modulo", "UPLOADER": "Uploader", "WEBSCRIPT": "Webscript", "TAG": "Tag", + "TRASHCAN": "Cestino", "SOCIAL": "Social", "SETTINGS": "Impostazioni", "OVERLAY_VIEWER": "Visualizzatore overlay", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "Creato da", "SEARCH_SERVICE_APPROACH": "Selezionare per disattivare la proprietà di input ed eseguire la configurazione utilizzando il servizio" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "Elimina definitivamente", + "RESTORE": "Ripristina" + }, + "EMPTY_STATE": { + "TITLE": "Il cestino è vuoto", + "FIRST_TEXT": "Gli elementi eliminati vengono spostati nel cestino.", + "SECOND_TEXT": "Svuotare il cestino per eliminare definitivamente gli elementi." + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "Selezione multipla (con caselle di spunta)", "MULTIPLE_FILE_UPLOAD": "Caricamento di file multipli", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "Abilita caricamento", "ENABLE_INFINITE_SCROLL": "Abilita scorrimento infinito", "MULTISELECT_DESCRIPTION": "Usa Cmd (Mac) o Ctrl (Windows) per attivare/disattivare la selezione di più elementi", - "RECENT": "File recenti", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "L'elenco File recenti è vuoto" + }, + "TITLE": "File recenti" + }, "COLUMNS": { "DISPLAY_NAME": "Nome visualizzato", + "IS_LOCKED": "Blocca", "TAG": "Tag", "CREATED_BY": "Creato da", "CREATED_ON": "Creato il", - "CREATED": "Creato" + "CREATED": "Creato", + "SIZE": "Dimensione", + "DELETED_ON": "Eliminato", + "DELETED_BY": "Eliminato da" }, "TOOLBAR": { "CARDVIEW": "Modalità di visualizzazione scheda", @@ -59,7 +100,10 @@ "DELETE": "Elimina" }, "ACTIONS": { + "VERSIONS": "Gestione versioni", + "METADATA": "Informazioni", "DOWNLOAD": "Download", + "PERMISSION": "Permesso", "FOLDER": { "COPY": "Copia", "MOVE": "Sposta", @@ -98,6 +142,13 @@ "STORE": "Memorizza", "RESTORE": "Ripristina" }, + "FORM-LOADING": { + "FORM_DATA": "Dati modulo", + "FORM_DATA_MESSAGE": "Inserire i dati per compilare il modulo", + "TYPEAHEAD_PLACEHOLDER": "Typeahead", + "RADIO_PLACEHOLDER": "Pulsante di opzione", + "SELECT_PLACEHOLDER": "Elenco a discesa" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "Elenco tag Content Services", "INSERT": "Inserisci ID nodo", "NODE_LIST": "Elenco tag per ID nodo" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "Eredita permessi", + "INHERITED_PERMISSIONS_BUTTON": "Permesso ereditato" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/ja.json b/demo-shell/resources/i18n/ja.json index dcb841dc69..2fbd4d590c 100644 --- a/demo-shell/resources/i18n/ja.json +++ b/demo-shell/resources/i18n/ja.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "詳細", + "COMMENTS": "コメント", + "PROPERTIES": "プロパティ", + "VERSIONS": "バージョン" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "削除を許可する", + "SHOW_COMMENTS": "バージョンに関するコメントを表示", + "ALLOW_DOWNLOAD": "バージョンのダウンロードを許可する" + } + }, "title": "ようこそ", "VERSION": { "NO_PERMISSION": "このコンテンツのバージョンを管理する権限がありません", @@ -9,6 +22,12 @@ "TITLE": "バージョンの管理" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "閉じる", + "TITLE": "メタデータ" + } + }, "APP_LAYOUT": { "APP_NAME": "ADF デモアプリケーション", "HOME": "ホーム", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Datatable (遅延読み込み)", "FORM": "フォーム", "FORM_LIST": "フォームリスト", + "FORM_LOADING": "フォームを読み込んでいます", "UPLOADER": "アップローダー", "WEBSCRIPT": "Webscript", "TAG": "タグ", + "TRASHCAN": "ごみ箱", "SOCIAL": "ソーシャル", "SETTINGS": "設定", "OVERLAY_VIEWER": "オーバーレイビューア", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "作成者", "SEARCH_SERVICE_APPROACH": "入力プロパティを無効にし、サービスを使って設定する場合は、このチェックボックスをオンにします" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "完全に削除する", + "RESTORE": "復元" + }, + "EMPTY_STATE": { + "TITLE": "ごみ箱は空です", + "FIRST_TEXT": "削除するアイテムはごみ箱に移動されます。", + "SECOND_TEXT": "ごみ箱を空にするとアイテムが完全に削除されます。" + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "複数選択 (チェックボックスを使用)", "MULTIPLE_FILE_UPLOAD": "複数ファイルのアップロード", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "アップロードを有効にします", "ENABLE_INFINITE_SCROLL": "無限スクロールを有効にする", "MULTISELECT_DESCRIPTION": "複数選択の切り替えを行うには、Cmd (Mac) キーまたは Ctrl (Windows) キーを押します", - "RECENT": "最近使ったファイル", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "[最近使ったファイル] 一覧は空です" + }, + "TITLE": "最近使ったファイル" + }, "COLUMNS": { "DISPLAY_NAME": "表示名", + "IS_LOCKED": "ロック", "TAG": "タグ", "CREATED_BY": "作成者", "CREATED_ON": "作成日", - "CREATED": "作成日" + "CREATED": "作成日", + "SIZE": "サイズ", + "DELETED_ON": "削除済み", + "DELETED_BY": "削除者" }, "TOOLBAR": { "CARDVIEW": "カード表示モード", @@ -59,7 +100,10 @@ "DELETE": "削除" }, "ACTIONS": { + "VERSIONS": "バージョンの管理", + "METADATA": "情報", "DOWNLOAD": "ダウンロード", + "PERMISSION": "権限", "FOLDER": { "COPY": "コピー", "MOVE": "移動", @@ -98,6 +142,13 @@ "STORE": "保存", "RESTORE": "復元" }, + "FORM-LOADING": { + "FORM_DATA": "フォーム データ", + "FORM_DATA_MESSAGE": "フォームに入力する値を入力してください", + "TYPEAHEAD_PLACEHOLDER": "先行入力", + "RADIO_PLACEHOLDER": "ラジオ ボタン", + "SELECT_PLACEHOLDER": "ドロップダウン" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "Content Services のタグリスト", "INSERT": "ノード ID の挿入", "NODE_LIST": "ノード ID 別タグリスト" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "権限の継承", + "INHERITED_PERMISSIONS_BUTTON": "継承された権限" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/nb.json b/demo-shell/resources/i18n/nb.json index a438b9cb8e..fcc1a47a8c 100644 --- a/demo-shell/resources/i18n/nb.json +++ b/demo-shell/resources/i18n/nb.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Detaljer", + "COMMENTS": "Kommentarer", + "PROPERTIES": "Egenskaper", + "VERSIONS": "Versjoner" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Tillat sletting", + "SHOW_COMMENTS": "Vis kommentarer om versjoner", + "ALLOW_DOWNLOAD": "Tillat versjonsnedlasting" + } + }, "title": "Velkommen", "VERSION": { "NO_PERMISSION": "Du har ikke tillatelse til å håndtere versjoner av dette innholdet", @@ -9,6 +22,12 @@ "TITLE": "Håndtere versjoner" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "Lukk", + "TITLE": "Metadata" + } + }, "APP_LAYOUT": { "APP_NAME": "ADF-demoprogam", "HOME": "Hjem", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Datatabell (avventende)", "FORM": "Skjema", "FORM_LIST": "Skjemaliste", + "FORM_LOADING": "Skjema lastes inn", "UPLOADER": "Opplaster", "WEBSCRIPT": "Webscript", "TAG": "Tagg", + "TRASHCAN": "Søppelkurv", "SOCIAL": "Sosial", "SETTINGS": "Innstillinger", "OVERLAY_VIEWER": "Overleggsfremviser", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "Opprettet av", "SEARCH_SERVICE_APPROACH": "Velg dette for å deaktivere inndataegenskapen og konfigurere ved hjelp av tjenesten" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "Slett for godt", + "RESTORE": "Gjenopprett" + }, + "EMPTY_STATE": { + "TITLE": "Søppelkurven er tom", + "FIRST_TEXT": "Elementer du sletter, flyttes til søppelkurven.", + "SECOND_TEXT": "Tøm søppelkurven for å slette elementer for godt." + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "Multivalg (med avskrysningsbokser)", "MULTIPLE_FILE_UPLOAD": "Opplasting av flere filer", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "Aktiver opplasting", "ENABLE_INFINITE_SCROLL": "Aktiver uendelig rulling", "MULTISELECT_DESCRIPTION": "Bruk Cmd (Mac) eller Ctrl (Windows) for å veksle mellom valg av flere elementer", - "RECENT": "Nylig brukte filer", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "Nylige filer-listen er tom" + }, + "TITLE": "Nylige filer" + }, "COLUMNS": { "DISPLAY_NAME": "Vis navn", + "IS_LOCKED": "Lås", "TAG": "Tagg", "CREATED_BY": "Opprettet av", "CREATED_ON": "Opprettet", - "CREATED": "Opprettet" + "CREATED": "Opprettet", + "SIZE": "Størrelse", + "DELETED_ON": "Slettet", + "DELETED_BY": "Slettet av" }, "TOOLBAR": { "CARDVIEW": "Kortvisningsmodus", @@ -59,7 +100,10 @@ "DELETE": "Slett" }, "ACTIONS": { + "VERSIONS": "Administrer versjoner", + "METADATA": "Info", "DOWNLOAD": "Last ned", + "PERMISSION": "Tillatelse", "FOLDER": { "COPY": "Kopier", "MOVE": "Flytt", @@ -98,6 +142,13 @@ "STORE": "Lagre", "RESTORE": "Gjenopprett" }, + "FORM-LOADING": { + "FORM_DATA": "Skjemadata", + "FORM_DATA_MESSAGE": "Skriv inn verdier for å fylle ut skjemaet", + "TYPEAHEAD_PLACEHOLDER": "Type-ahead", + "RADIO_PLACEHOLDER": "Alternativknapp", + "SELECT_PLACEHOLDER": "Nedtrekk" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "Liste med tagger Innholdstjenester", "INSERT": "Sett inn node-ID", "NODE_LIST": "Tagg listen etter node-ID" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "Arv tillatelse", + "INHERITED_PERMISSIONS_BUTTON": "Tillatelse arvet" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/nl.json b/demo-shell/resources/i18n/nl.json index 61ca2cce5b..3e94abf31c 100644 --- a/demo-shell/resources/i18n/nl.json +++ b/demo-shell/resources/i18n/nl.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Details", + "COMMENTS": "Opmerkingen", + "PROPERTIES": "Eigenschappen", + "VERSIONS": "Versies" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Verwijderen toestaan", + "SHOW_COMMENTS": "Opmerkingen over versies tonen", + "ALLOW_DOWNLOAD": "Downloaden van versies toestaan" + } + }, "title": "Welkom", "VERSION": { "NO_PERMISSION": "U hebt geen rechten voor het beheren van versies van deze content", @@ -9,6 +22,12 @@ "TITLE": "Versies beheren" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "Sluiten", + "TITLE": "Metagegevens" + } + }, "APP_LAYOUT": { "APP_NAME": "ADF-demotoepassing", "HOME": "Home", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Datatable (vertraagd)", "FORM": "Formulier", "FORM_LIST": "Formulierlijst", + "FORM_LOADING": "Formulier laden", "UPLOADER": "Uploader", "WEBSCRIPT": "Webscript", "TAG": "Tag", + "TRASHCAN": "Prullenbak", "SOCIAL": "Sociaal", "SETTINGS": "Instellingen", "OVERLAY_VIEWER": "Overlay-viewer", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "Gemaakt door", "SEARCH_SERVICE_APPROACH": "Schakel dit in om de invoereigenschap uit te schakelen en om te configureren via de service" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "Definitief verwijderen", + "RESTORE": "Herstellen" + }, + "EMPTY_STATE": { + "TITLE": "Prullenbak is leeg", + "FIRST_TEXT": "Items die u verwijdert, worden verplaatst naar de prullenbak.", + "SECOND_TEXT": "Leeg de prullenmand om items definitief te verwijderen." + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "Multiselect (met selectievakjes)", "MULTIPLE_FILE_UPLOAD": "Meerdere bestanden uploaden", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "Uploaden inschakelen", "ENABLE_INFINITE_SCROLL": "Oneindig scrollen inschakelen", "MULTISELECT_DESCRIPTION": "Cmd (Mac) of Ctrl (Windows) gebruiken om de selectie van meerdere items in of uit te schakelen", - "RECENT": "Recente bestanden", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "Lijst met recente bestanden is leeg" + }, + "TITLE": "Recente bestanden" + }, "COLUMNS": { "DISPLAY_NAME": "Getoonde naam", + "IS_LOCKED": "Vergrendeling", "TAG": "Tag", "CREATED_BY": "Gemaakt door", "CREATED_ON": "Gemaakt op", - "CREATED": "Gemaakt" + "CREATED": "Gemaakt", + "SIZE": "Grootte", + "DELETED_ON": "Verwijderd", + "DELETED_BY": "Verwijderd door" }, "TOOLBAR": { "CARDVIEW": "Kaartweergavemodus", @@ -59,7 +100,10 @@ "DELETE": "Verwijderen" }, "ACTIONS": { + "VERSIONS": "Versies beheren", + "METADATA": "Info", "DOWNLOAD": "Downloaden", + "PERMISSION": "Machtiging", "FOLDER": { "COPY": "Kopiëren", "MOVE": "Verplaatsen", @@ -98,6 +142,13 @@ "STORE": "Opslaan", "RESTORE": "Herstellen" }, + "FORM-LOADING": { + "FORM_DATA": "Formuliergegevens", + "FORM_DATA_MESSAGE": "Voer waarden in om het formulier in te vullen", + "TYPEAHEAD_PLACEHOLDER": "Automatische voltooiing", + "RADIO_PLACEHOLDER": "Keuzerondje", + "SELECT_PLACEHOLDER": "Dropdown" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "Taglijst Content Services", "INSERT": "Node-id invoegen", "NODE_LIST": "Taglijst per node-id" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "Machtiging overnemen", + "INHERITED_PERMISSIONS_BUTTON": "Machtiging overgenomen" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/pt-BR.json b/demo-shell/resources/i18n/pt-BR.json index f053d3f5fd..1d8033bf7b 100644 --- a/demo-shell/resources/i18n/pt-BR.json +++ b/demo-shell/resources/i18n/pt-BR.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Detalhes", + "COMMENTS": "Comentários", + "PROPERTIES": "Propriedades", + "VERSIONS": "Versões" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Permitir apagar", + "SHOW_COMMENTS": "Mostrar comentários em versões", + "ALLOW_DOWNLOAD": "Permitir download da versão" + } + }, "title": "Bem-vindo", "VERSION": { "NO_PERMISSION": "Você não tem permissão para gerenciar versões deste conteúdo", @@ -9,6 +22,12 @@ "TITLE": "Gerenciar versões" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "Fechar", + "TITLE": "Metadados" + } + }, "APP_LAYOUT": { "APP_NAME": "Aplicativo Demo ADF", "HOME": "Página Inicial", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Datatable (Sob demanda)", "FORM": "Formulário", "FORM_LIST": "Lista de Formulário", + "FORM_LOADING": "Carregamento de formulário", "UPLOADER": "Carregador", "WEBSCRIPT": "Webscript", "TAG": "Marca", + "TRASHCAN": "Lixeira", "SOCIAL": "Social", "SETTINGS": "Configurações", "OVERLAY_VIEWER": "Visualizador de sobreposição", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "Criado por", "SEARCH_SERVICE_APPROACH": "Marque essa opção para desativar a inserção e configurar a utilização do serviço" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "Apagar permanentemente", + "RESTORE": "Restaurar" + }, + "EMPTY_STATE": { + "TITLE": "A lixeira está vazia", + "FIRST_TEXT": "Itens apagados são movidos para a Lixeira.", + "SECOND_TEXT": "Esvazie a Lixeira para apagar os itens permanentemente." + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "Seleção Múltipla (com caixas de seleção)", "MULTIPLE_FILE_UPLOAD": "Carregamento de Vários Arquivos", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "Ativar carregamento", "ENABLE_INFINITE_SCROLL": "Ativar rolagem infinita", "MULTISELECT_DESCRIPTION": "Use Cmd (Mac) ou Ctrl (Windows) para alternar a seleção de vários itens", - "RECENT": "Arquivos recentes", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "A lista de Arquivos recentes está vazia" + }, + "TITLE": "Arquivos recentes" + }, "COLUMNS": { "DISPLAY_NAME": "Nome de exibição", + "IS_LOCKED": "Bloqueio", "TAG": "Marca", "CREATED_BY": "Criado por", "CREATED_ON": "Criado em", - "CREATED": "Criado" + "CREATED": "Criado", + "SIZE": "Tamanho", + "DELETED_ON": "Excluído", + "DELETED_BY": "Excluído por" }, "TOOLBAR": { "CARDVIEW": "Modo de visualização de cartão", @@ -59,7 +100,10 @@ "DELETE": "Excluir" }, "ACTIONS": { + "VERSIONS": "Gerenciar versões", + "METADATA": "Informações", "DOWNLOAD": "Download", + "PERMISSION": "Permissão", "FOLDER": { "COPY": "Copiar", "MOVE": "Mover", @@ -98,6 +142,13 @@ "STORE": "Armazenar", "RESTORE": "Restaurar" }, + "FORM-LOADING": { + "FORM_DATA": "Dados do formulário", + "FORM_DATA_MESSAGE": "Insira os valores para preencher o formulário", + "TYPEAHEAD_PLACEHOLDER": "Campo de sugestão", + "RADIO_PLACEHOLDER": "Botão de opção", + "SELECT_PLACEHOLDER": "Lista suspensa" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "Lista de Marcas do Content Services", "INSERT": "Inserir ID de Nó", "NODE_LIST": "Lista de marcas por ID de Nó" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "Herdar permissão", + "INHERITED_PERMISSIONS_BUTTON": "Permissão herdada" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/ru.json b/demo-shell/resources/i18n/ru.json index f8f2b37647..d471bdce78 100644 --- a/demo-shell/resources/i18n/ru.json +++ b/demo-shell/resources/i18n/ru.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "Сведения", + "COMMENTS": "Комментарии", + "PROPERTIES": "Свойства", + "VERSIONS": "Версии" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "Разрешить удаление", + "SHOW_COMMENTS": "Показать комментарии к версиям", + "ALLOW_DOWNLOAD": "Разрешить загрузку версии" + } + }, "title": "Добро пожаловать", "VERSION": { "NO_PERMISSION": "У вас нет разрешения на управление версиями этого контента", @@ -9,6 +22,12 @@ "TITLE": "Управление версиями" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "Закрыть", + "TITLE": "Метаданные" + } + }, "APP_LAYOUT": { "APP_NAME": "Демонстрационное приложение ADF", "HOME": "Домашняя", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Таблица данных (частичная загрузка)", "FORM": "Форма", "FORM_LIST": "Список форм", + "FORM_LOADING": "Загрузка формы", "UPLOADER": "Загрузчик", "WEBSCRIPT": "Webscript", "TAG": "Метка", + "TRASHCAN": "Корзина", "SOCIAL": "Социальный", "SETTINGS": "Параметры", "OVERLAY_VIEWER": "Просмотр наложения", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "Создано пользователем", "SEARCH_SERVICE_APPROACH": "Установите флажок, чтобы отключить свойство ввода и настроить, используя службу." }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "Удалить навсегда", + "RESTORE": "Восстановить" + }, + "EMPTY_STATE": { + "TITLE": "Корзина пуста", + "FIRST_TEXT": "Элементы, которые вы удаляете, перемещаются в корзину.", + "SECOND_TEXT": "Очистите корзину, чтобы удалить элементы навсегда." + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "Выбор нескольких вариантов (с флажками)", "MULTIPLE_FILE_UPLOAD": "Загрузка нескольких файлов", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "Включить загрузку", "ENABLE_INFINITE_SCROLL": "Включить бесконечную прокрутку", "MULTISELECT_DESCRIPTION": "Использовать кнопку Cmd (Mac) или Ctrl (Windows) для переключения выбора нескольких элементов", - "RECENT": "Недавние файлы", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "Список последних файлов пуст" + }, + "TITLE": "Последние файлы" + }, "COLUMNS": { "DISPLAY_NAME": "Отображаемое имя", + "IS_LOCKED": "Блокировка", "TAG": "Метка", "CREATED_BY": "Создано пользователем", "CREATED_ON": "Дата создания", - "CREATED": "Создано" + "CREATED": "Создано", + "SIZE": "Размер", + "DELETED_ON": "Удаленные", + "DELETED_BY": "Удалено пользователем" }, "TOOLBAR": { "CARDVIEW": "Режим просмотра карты", @@ -59,7 +100,10 @@ "DELETE": "Удалить" }, "ACTIONS": { + "VERSIONS": "Управление версиями", + "METADATA": "Информация", "DOWNLOAD": "Скачать", + "PERMISSION": "Право", "FOLDER": { "COPY": "Копировать", "MOVE": "Переместить", @@ -98,6 +142,13 @@ "STORE": "Хранилище", "RESTORE": "Восстановить" }, + "FORM-LOADING": { + "FORM_DATA": "Данные формы", + "FORM_DATA_MESSAGE": "Введите значения для заполнения формы", + "TYPEAHEAD_PLACEHOLDER": "Буфер клавиатуры", + "RADIO_PLACEHOLDER": "Селективная кнопка", + "SELECT_PLACEHOLDER": "Раскрывающееся меню" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "Список меток Content Services", "INSERT": "Вставить идентификатор узла", "NODE_LIST": "Список меток по идентификатору узла" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "Наследовать разрешение", + "INHERITED_PERMISSIONS_BUTTON": "Разрешение унаследовано" } } \ No newline at end of file diff --git a/demo-shell/resources/i18n/zh-CN.json b/demo-shell/resources/i18n/zh-CN.json index 16e52b27a9..81f7096cd9 100644 --- a/demo-shell/resources/i18n/zh-CN.json +++ b/demo-shell/resources/i18n/zh-CN.json @@ -1,4 +1,17 @@ { + "APP": { + "INFO_DRAWER": { + "TITLE": "详细信息", + "COMMENTS": "注释", + "PROPERTIES": "属性", + "VERSIONS": "版本" + }, + "ADF_VERSION_MANAGER": { + "ALLOW_DELETE": "允许删除", + "SHOW_COMMENTS": "显示有关版本的注释", + "ALLOW_DOWNLOAD": "允许版本下载" + } + }, "title": "欢迎使用", "VERSION": { "NO_PERMISSION": "您没有管理此内容版本的权限", @@ -9,6 +22,12 @@ "TITLE": "管理版本" } }, + "METADATA": { + "DIALOG": { + "CLOSE": "关闭", + "TITLE": "元数据" + } + }, "APP_LAYOUT": { "APP_NAME": "ADF 演示应用程序", "HOME": "主页", @@ -20,9 +39,11 @@ "DATATABLE_LAZY": "Datatable(迟缓)", "FORM": "表单", "FORM_LIST": "表单列表", + "FORM_LOADING": "表单加载", "UPLOADER": "上传程序", "WEBSCRIPT": "Webscript", "TAG": "标签", + "TRASHCAN": "垃圾桶", "SOCIAL": "社交", "SETTINGS": "设置", "OVERLAY_VIEWER": "重叠查看器", @@ -33,6 +54,17 @@ "SEARCH_CREATED_BY": "创建者", "SEARCH_SERVICE_APPROACH": "选中此项以禁用输入属性并使用服务进行配置" }, + "TRASHCAN": { + "ACTIONS": { + "DELETE_PERMANENT": "永久删除", + "RESTORE": "恢复" + }, + "EMPTY_STATE": { + "TITLE": "“垃圾”为空", + "FIRST_TEXT": "删除的项目移动到“垃圾”。", + "SECOND_TEXT": "清空“垃圾”以永久删除项目。" + } + }, "DOCUMENT_LIST": { "MULTISELECT_CHECKBOXES": "多选(含复选框)", "MULTIPLE_FILE_UPLOAD": "上传多个文件", @@ -43,13 +75,22 @@ "DESCRIPTION_UPLOAD": "启用上传", "ENABLE_INFINITE_SCROLL": "启用无限滚动", "MULTISELECT_DESCRIPTION": "使用 Cmd (Mac) 或 Ctrl (Windows) 切换多个项目的选择", - "RECENT": "最近的文件", + "RECENT": { + "EMPTY_STATE": { + "TITLE": "\"最近的文件\"列表为空" + }, + "TITLE": "最近的文件" + }, "COLUMNS": { "DISPLAY_NAME": "显示名称", + "IS_LOCKED": "锁定", "TAG": "标签", "CREATED_BY": "创建者", "CREATED_ON": "创建日期", - "CREATED": "已创建" + "CREATED": "已创建", + "SIZE": "字号(&S)", + "DELETED_ON": "已删除", + "DELETED_BY": "删除人" }, "TOOLBAR": { "CARDVIEW": "卡查看模式", @@ -59,7 +100,10 @@ "DELETE": "删除" }, "ACTIONS": { + "VERSIONS": "管理版本", + "METADATA": "信息", "DOWNLOAD": "下载", + "PERMISSION": "权限", "FOLDER": { "COPY": "复制", "MOVE": "移动", @@ -98,6 +142,13 @@ "STORE": "存储", "RESTORE": "恢复" }, + "FORM-LOADING": { + "FORM_DATA": "表单数据", + "FORM_DATA_MESSAGE": "输入值以填充表单", + "TYPEAHEAD_PLACEHOLDER": "预先输入", + "RADIO_PLACEHOLDER": "单选按钮", + "SELECT_PLACEHOLDER": "下拉列表" + }, "LOGIN": { "CONTENT_SERVICES": "Content Services", "PROCESS_SERVICES": "Process Services", @@ -115,5 +166,9 @@ "LIST": "列表标签 Content Services", "INSERT": "插入节点 ID", "NODE_LIST": "标签列表(按节点 ID 排序)" + }, + "DEMO_PERMISSION": { + "INHERIT_PERMISSION_BUTTON": "继承权限", + "INHERITED_PERMISSIONS_BUTTON": "已继承权限" } } \ No newline at end of file diff --git a/demo-shell/src/app.config.json b/demo-shell/src/app.config.json index 93d0b0aff8..18b2181d1a 100644 --- a/demo-shell/src/app.config.json +++ b/demo-shell/src/app.config.json @@ -2,6 +2,7 @@ "$schema": "../../lib/core/app-config/schema.json", "ecmHost": "http://{hostname}:{port}", "bpmHost": "http://{hostname}:{port}", + "contextRootBpm": "activiti-app", "application": { "name": "Alfresco ADF Application" }, @@ -51,6 +52,118 @@ "label": "Simplified Chinese" } ], + "search": { + "limits": { + "permissionEvaluationTime": null, + "permissionEvaluationCount": null + }, + "filterQueries": [ + { "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" }, + { "query": "NOT cm:creator:System" } + ], + "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": [ + { "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": "adf-search-text", + "settings": { + "pattern": "cm:name:'(.*?)'", + "field": "cm:name", + "placeholder": "Enter the name" + } + } + }, + { + "id": "queryFields", + "name": "Fields", + "enabled": true, + "expanded": false, + "component": { + "selector": "adf-search-fields", + "settings": { + "field": null, + "options": [ + { "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": "queryType", + "name": "Type", + "enabled": true, + "expanded": false, + "component": { + "selector": "adf-search-radio", + "settings": { + "field": null, + "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'" } + ] + } + } + }, + { + "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, "supportedPageSizes": [ 5, 10, 15, 20 ] @@ -371,5 +484,9 @@ "exif:exif": "*" } } + }, + "adf-version-manager": { + "allowComments": true, + "allowDownload": true } } diff --git a/demo-shell/src/app/app.component.html b/demo-shell/src/app/app.component.html index 0680b43f9c..8968c0e0ba 100644 --- a/demo-shell/src/app/app.component.html +++ b/demo-shell/src/app/app.component.html @@ -1 +1,3 @@ + + diff --git a/demo-shell/src/app/app.component.scss b/demo-shell/src/app/app.component.scss index b554b878f8..bdccc4c219 100644 --- a/demo-shell/src/app/app.component.scss +++ b/demo-shell/src/app/app.component.scss @@ -33,3 +33,27 @@ width: 52px; } } + +router-outlet[name="overlay"] + * { + width: 100%; + height: 100%; + z-index: 999999; + position: absolute; + top: 0; + right: 0; +} + +@media (max-width: 425px) { + adf-content-node-selector { + .adf-content-node-selector-content-list { + .adf-data-table-cell { + display: none; + } + + .adf-data-table-cell:first-child, + .adf-data-table-cell:nth-child(2) { + display: table-cell; + } + } + } +} diff --git a/demo-shell/src/app/app.component.spec.ts b/demo-shell/src/app/app.component.spec.ts index c740bcd745..91a015b61e 100644 --- a/demo-shell/src/app/app.component.spec.ts +++ b/demo-shell/src/app/app.component.spec.ts @@ -1,32 +1,25 @@ import { TestBed, async } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AdfModule } from './adf.module'; import { AppComponent } from './app.component'; describe('AppComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - })); + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule, + AdfModule + ], + declarations: [ + AppComponent + ] + }).compileComponents(); + })); - it('should create the app', async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - })); - - it(`should have as title 'app works!'`, async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('app works!'); - })); - - it('should render title in a h1 tag', async(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('app works!'); - })); + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); }); diff --git a/demo-shell/src/app/app.module.ts b/demo-shell/src/app/app.module.ts index 267ec44d16..801b7149a0 100644 --- a/demo-shell/src/app/app.module.ts +++ b/demo-shell/src/app/app.module.ts @@ -18,8 +18,10 @@ import { SearchBarComponent } from './components/search/search-bar.component'; import { SearchResultComponent } from './components/search/search-result.component'; import { SearchExtendedComponent } from './components/search/search-extended.component'; import { AboutComponent } from './components/about/about.component'; +import { LogComponent } from './components/log/log.component'; import { FormComponent } from './components/form/form.component'; import { FormListComponent } from './components/form/form-list.component'; +import { FormLoadingComponent } from './components/form/form-loading.component'; import { CustomSourcesComponent } from './components/files/custom-sources.component'; import { OverlayViewerComponent } from './components/overlay-viewer/overlay-viewer.component'; @@ -37,6 +39,7 @@ import { TagComponent } from './components/tag/tag.component'; import { SocialComponent } from './components/social/social.component'; import { VersionManagerDialogAdapterComponent } from './components/files/version-manager-dialog-adapter.component'; import { MetadataDialogAdapterComponent } from './components/files/metadata-dialog-adapter.component'; +import { BlobPreviewComponent } from './components/blob-preview/blob-preview.component'; import { ThemePickerModule } from './components/theme-picker/theme-picker'; import { DebugAppConfigService } from './services/debug-app-config.service'; @@ -46,21 +49,22 @@ import { ReactiveFormsModule } from '@angular/forms'; import { TaskAttachmentsComponent } from './components/process-service/task-attachments.component'; import { ProcessAttachmentsComponent } from './components/process-service/process-attachments.component'; import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component'; - +import { DemoPermissionComponent } from './components/permissions/demo-permissions.component'; +import { PreviewService } from './services/preview.service'; @NgModule({ imports: [ + BrowserModule, BrowserAnimationsModule, ReactiveFormsModule, - BrowserModule, routing, FormsModule, - AdfModule, MaterialModule, ThemePickerModule, FlexLayoutModule, ChartsModule, - HttpClientModule + HttpClientModule, + AdfModule ], declarations: [ AppComponent, @@ -72,6 +76,7 @@ import { SharedLinkViewComponent } from './components/shared-link-view/shared-li SearchResultComponent, SearchExtendedComponent, AboutComponent, + LogComponent, ProcessServiceComponent, ShowDiagramComponent, FormViewerComponent, @@ -92,7 +97,11 @@ import { SharedLinkViewComponent } from './components/shared-link-view/shared-li TaskAttachmentsComponent, ProcessAttachmentsComponent, OverlayViewerComponent, - SharedLinkViewComponent + SharedLinkViewComponent, + FormLoadingComponent, + DemoPermissionComponent, + FormLoadingComponent, + BlobPreviewComponent ], providers: [ { provide: AppConfigService, useClass: DebugAppConfigService }, @@ -111,7 +120,8 @@ import { SharedLinkViewComponent } from './components/shared-link-view/shared-li name: 'lazy-loading', source: 'resources/lazy-loading' } - } + }, + PreviewService ], entryComponents: [ VersionManagerDialogAdapterComponent, diff --git a/demo-shell/src/app/app.routes.ts b/demo-shell/src/app/app.routes.ts index 0302f0a23b..b8b1df16e0 100644 --- a/demo-shell/src/app/app.routes.ts +++ b/demo-shell/src/app/app.routes.ts @@ -39,21 +39,21 @@ import { SocialComponent } from './components/social/social.component'; import { FilesComponent } from './components/files/files.component'; import { FormComponent } from './components/form/form.component'; -import { UploadButtonComponent } from '@alfresco/adf-content-services'; import { FileViewComponent } from './components/file-view/file-view.component'; import { CustomSourcesComponent } from './components/files/custom-sources.component'; import { FormListComponent } from './components/form/form-list.component'; import { OverlayViewerComponent } from './components/overlay-viewer/overlay-viewer.component'; import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component'; +import { FormLoadingComponent } from './components/form/form-loading.component'; +import { DemoPermissionComponent } from './components/permissions/demo-permissions.component'; +import { BlobPreviewComponent } from './components/blob-preview/blob-preview.component'; export const appRoutes: Routes = [ { path: 'login', component: LoginComponent }, { path: 'settings', component: SettingsComponent }, - { path: 'files/:nodeId/view', component: FileViewComponent, canActivate: [ AuthGuardEcm ] }, - { - path: 'preview/s/:id', - component: SharedLinkViewComponent - }, + { path: 'files/:nodeId/view', component: FileViewComponent, canActivate: [ AuthGuardEcm ], outlet: 'overlay' }, + { path: 'preview/blob', component: BlobPreviewComponent, outlet: 'overlay', pathMatch: 'full' }, + { path: 'preview/s/:id', component: SharedLinkViewComponent }, { path: '', component: AppLayoutComponent, @@ -67,6 +67,10 @@ export const appRoutes: Routes = [ path: 'home', component: HomeComponent }, + { + path: 'settings-layout', + component: SettingsComponent + }, { path: 'trashcan', component: TrashcanComponent, @@ -82,6 +86,11 @@ export const appRoutes: Routes = [ component: FilesComponent, canActivate: [AuthGuardEcm] }, + { + path: 'files/:id/display/:mode', + component: FilesComponent, + canActivate: [AuthGuardEcm] + }, { path: 'dl-custom-sources', component: CustomSourcesComponent, @@ -91,11 +100,6 @@ export const appRoutes: Routes = [ path: 'datatable', component: DataTableComponent }, - { - path: 'uploader', - component: UploadButtonComponent, - canActivate: [AuthGuardEcm] - }, { path: 'search', component: SearchResultComponent, @@ -164,9 +168,15 @@ export const appRoutes: Routes = [ component: SocialComponent, canActivate: [AuthGuardEcm] }, + { + path: 'permissions/:id', + component: DemoPermissionComponent, + canActivate: [AuthGuardEcm] + }, { path: 'about', component: AboutComponent }, { path: 'form', component: FormComponent }, { path: 'form-list', component: FormListComponent }, + { path: 'form-loading', component: FormLoadingComponent }, { path: 'overlay-viewer', component: OverlayViewerComponent, diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.html b/demo-shell/src/app/components/app-layout/app-layout.component.html index 54bcac2615..83bdfd6fd0 100644 --- a/demo-shell/src/app/components/app-layout/app-layout.component.html +++ b/demo-shell/src/app/components/app-layout/app-layout.component.html @@ -1,47 +1,54 @@ - - - - - {{link.icon}} - {{link.title | translate }} - - - exit_to_app - Logout - - - + - - + + + + - {{'APP_LAYOUT.APP_NAME' | translate }} + {{'APP_LAYOUT.APP_NAME' | translate }} -
+
- + - {{'APP_LAYOUT.HOME' | translate }} - {{'APP_LAYOUT.CONTENT_SERVICES' | translate }} - {{'APP_LAYOUT.PROCESS_SERVICES' | translate }} - Login + - - - - - + + + + + +
+
+
- -
+ + + + + {{link.icon}} +
{{link.title | translate }}
+
+ + exit_to_app +
Logout
+
+
+
+
- -
+ + + + + + + \ No newline at end of file diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.scss b/demo-shell/src/app/components/app-layout/app-layout.component.scss index e316810173..451ee1d263 100644 --- a/demo-shell/src/app/components/app-layout/app-layout.component.scss +++ b/demo-shell/src/app/components/app-layout/app-layout.component.scss @@ -1,5 +1,7 @@ @mixin adf-app-layout-theme($theme) { $primary: map-get($theme, primary); + $background: map-get($theme, background); + $foreground: map-get($theme, foreground); $minimumAppWidth: 320px; $toolbarHeight: 64px; @@ -17,12 +19,14 @@ } .adf-app-layout-toolbar { - position: relative; - overflow: visible !important; + z-index: 1001; + position: relative; + overflow: visible !important; } .adf-app-layout { - display: block; + display: flex; + flex: 1; min-width: $minimumAppWidth; height: 100%; @@ -32,10 +36,32 @@ height: 100%; } + .adf-sidenav-linklist { + height: 100%; + overflow: auto; + padding-bottom: 8px; + box-sizing: border-box; + } + .adf-sidenav-link { + &.active { color: mat-color($primary); } + + .sidenav-menu-icon { + margin-right: 20px; + font-size: 14px; + } + + .sidenav-menu-label { + font-size: 14px; + white-space: nowrap; + } + } + + .mat-nav-list .mat-list-item.adf-sidenav-link { + height: 40px; } &-user-profile { diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.ts b/demo-shell/src/app/components/app-layout/app-layout.component.ts index 74a0634768..c1cf9ade45 100644 --- a/demo-shell/src/app/components/app-layout/app-layout.component.ts +++ b/demo-shell/src/app/components/app-layout/app-layout.component.ts @@ -30,19 +30,19 @@ export class AppLayoutComponent { links: Array = [ { href: '/home', icon: 'home', title: 'APP_LAYOUT.HOME' }, { href: '/files', icon: 'folder_open', title: 'APP_LAYOUT.CONTENT_SERVICES' }, - { href: '/trashcan', icon: 'delete', title: 'APP_LAYOUT.TRASHCAN' }, { href: '/activiti', icon: 'device_hub', title: 'APP_LAYOUT.PROCESS_SERVICES' }, { href: '/login', icon: 'vpn_key', title: 'APP_LAYOUT.LOGIN' }, + { href: '/trashcan', icon: 'delete', title: 'APP_LAYOUT.TRASHCAN' }, { href: '/dl-custom-sources', icon: 'extension', title: 'APP_LAYOUT.CUSTOM_SOURCES' }, { href: '/datatable', icon: 'view_module', title: 'APP_LAYOUT.DATATABLE' }, { href: '/datatable-lazy', icon: 'view_module', title: 'APP_LAYOUT.DATATABLE_LAZY' }, { href: '/form', icon: 'poll', title: 'APP_LAYOUT.FORM' }, { href: '/form-list', icon: 'library_books', title: 'APP_LAYOUT.FORM_LIST' }, - { href: '/uploader', icon: 'file_upload', title: 'APP_LAYOUT.UPLOADER' }, + { href: '/form-loading', icon: 'cached', title: 'APP_LAYOUT.FORM_LOADING' }, { href: '/webscript', icon: 'extension', title: 'APP_LAYOUT.WEBSCRIPT' }, { href: '/tag', icon: 'local_offer', title: 'APP_LAYOUT.TAG' }, { href: '/social', icon: 'thumb_up', title: 'APP_LAYOUT.SOCIAL' }, - { href: '/settings', icon: 'settings', title: 'APP_LAYOUT.SETTINGS' }, + { href: '/settings-layout', icon: 'settings', title: 'APP_LAYOUT.SETTINGS' }, { href: '/extendedSearch', icon: 'search', title: 'APP_LAYOUT.SEARCH' }, { href: '/overlay-viewer', icon: 'pageview', title: 'APP_LAYOUT.OVERLAY_VIEWER' }, { href: '/about', icon: 'info_outline', title: 'APP_LAYOUT.ABOUT' } diff --git a/demo-shell/src/app/components/blob-preview/blob-preview.component.ts b/demo-shell/src/app/components/blob-preview/blob-preview.component.ts new file mode 100644 index 0000000000..e68fffc913 --- /dev/null +++ b/demo-shell/src/app/components/blob-preview/blob-preview.component.ts @@ -0,0 +1,21 @@ +import { Component } from '@angular/core'; +import { PreviewService } from '../../services/preview.service'; +import { Router } from '@angular/router'; + +@Component({ + templateUrl: 'bob-preview.component.html' +}) +export class BlobPreviewComponent { + content: Blob; + name: string; + + constructor(preview: PreviewService, router: Router) { + if (preview.content === null || preview.name === null) { + router.navigate([{ outlets: { overlay: null } }]); + return; + } + + this.content = preview.content; + this.name = preview.name; + } +} diff --git a/demo-shell/src/app/components/blob-preview/bob-preview.component.html b/demo-shell/src/app/components/blob-preview/bob-preview.component.html new file mode 100644 index 0000000000..50d2a1515f --- /dev/null +++ b/demo-shell/src/app/components/blob-preview/bob-preview.component.html @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/demo-shell/src/app/components/datatable/datatable.component.ts b/demo-shell/src/app/components/datatable/datatable.component.ts index daf7d17901..cb8c92cc59 100644 --- a/demo-shell/src/app/components/datatable/datatable.component.ts +++ b/demo-shell/src/app/components/datatable/datatable.component.ts @@ -178,7 +178,7 @@ export class DataTableComponent { getRowForNode() { const opts: any = { includeSource: true, - include: ['path', 'properties', 'allowableOperations'] + include: ['path', 'properties', 'allowableOperations', 'permissions'] }; Observable.fromPromise(this.apiService.getInstance().nodes diff --git a/demo-shell/src/app/components/file-view/file-view.component.html b/demo-shell/src/app/components/file-view/file-view.component.html index 398f8fe312..9b258811ef 100644 --- a/demo-shell/src/app/components/file-view/file-view.component.html +++ b/demo-shell/src/app/components/file-view/file-view.component.html @@ -1,15 +1,19 @@ - - + + + + + + - + - + diff --git a/demo-shell/src/app/components/file-view/file-view.component.ts b/demo-shell/src/app/components/file-view/file-view.component.ts index d86bec404b..66b77c8101 100644 --- a/demo-shell/src/app/components/file-view/file-view.component.ts +++ b/demo-shell/src/app/components/file-view/file-view.component.ts @@ -18,6 +18,7 @@ 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', @@ -30,6 +31,7 @@ export class FileViewComponent implements OnInit { constructor( private router: Router, private route: ActivatedRoute, + private snackBar: MatSnackBar, private apiService: AlfrescoApiService) {} ngOnInit() { @@ -51,4 +53,7 @@ export class FileViewComponent implements OnInit { }); } + uploadError(errorMessage: string) { + this.snackBar.open(errorMessage, '', { duration: 4000 }); + } } diff --git a/demo-shell/src/app/components/files/custom-sources.component.html b/demo-shell/src/app/components/files/custom-sources.component.html index cbae81a06a..abeb0e05ac 100644 --- a/demo-shell/src/app/components/files/custom-sources.component.html +++ b/demo-shell/src/app/components/files/custom-sources.component.html @@ -10,6 +10,7 @@ diff --git a/demo-shell/src/app/components/files/custom-sources.component.ts b/demo-shell/src/app/components/files/custom-sources.component.ts index d3ff0ff261..85f078f695 100644 --- a/demo-shell/src/app/components/files/custom-sources.component.ts +++ b/demo-shell/src/app/components/files/custom-sources.component.ts @@ -27,7 +27,7 @@ export class CustomSourcesComponent { @Input() selectedSource = '-recent-'; - @ViewChild(DocumentListComponent) + @ViewChild('customSourcesDocumentList') documentList: DocumentListComponent; sources = [ diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html index 459ec8b8da..a98e66a05e 100644 --- a/demo-shell/src/app/components/files/files.component.html +++ b/demo-shell/src/app/components/files/files.component.html @@ -29,7 +29,7 @@
- +
@@ -50,7 +50,6 @@ @@ -75,12 +74,14 @@ mat-icon-button [disabled]="!canCreateContent(documentList.folderNode)" title="{{ 'DOCUMENT_LIST.TOOLBAR.NEW_FOLDER' | translate }}" + (error)="openSnackMessage($event)" [adf-create-folder]="getDocumentListCurrentFolderId()"> create_new_folder @@ -94,7 +95,7 @@ adf-node-permission="delete" [adf-nodes]="documentList.selection" title="{{ 'DOCUMENT_LIST.TOOLBAR.DELETE' | translate }}" - (delete)="documentList.reload()" + (delete)="onDeleteActionSuccess($event)" [adf-delete]="documentList.selection"> delete @@ -106,6 +107,14 @@ {{ favorite.hasFavorites() ? 'star' :'star_border' }} +
- @@ -137,12 +146,14 @@ {{ 'DOCUMENT_LIST.TOOLBAR.CARDVIEW' | translate }} @@ -165,7 +178,6 @@ --> + + + + + + + + + + [node]="documentList.selection[0].entry" + [showComments]="showVersionComments" + [allowDownload]="allowVersionDownload">
@@ -342,7 +381,7 @@ - +
- {{'DOCUMENT_LIST.ENABLE_VERSIONING' | - translate}} + + {{'DOCUMENT_LIST.ENABLE_VERSIONING' | translate}}
- + {{'DOCUMENT_LIST.ENABLE_INFINITE_SCROLL' | translate}}
+
+ + {{'APP.ADF_VERSION_MANAGER.SHOW_COMMENTS' | translate}} + +
+ +
+ + {{'APP.ADF_VERSION_MANAGER.ALLOW_DOWNLOAD' | translate}} + +
+
Upload
@@ -432,7 +483,7 @@ [multipleFiles]="multipleFileUpload" [uploadFolders]="folderUpload" [maxFilesSize]="maxSizeShow ? maxFilesSize : null" - (error)="handleUploadError($event)" + (error)="openSnackMessage($event)" [versioning]="versioning" [adf-node-permission]="'create'" [adf-nodes]="enableUpload ? getCurrentDocumentListNode() : []" @@ -450,7 +501,7 @@ [multipleFiles]="multipleFileUpload" [uploadFolders]="folderUpload" [versioning]="versioning" - (error)="handleUploadError($event)" + (error)="openSnackMessage($event)" [adf-node-permission]="'create'" [adf-nodes]="enableUpload ? getCurrentDocumentListNode() : []" (permissionEvent)="handlePermissionError($event)"> @@ -477,4 +528,4 @@
- + diff --git a/demo-shell/src/app/components/files/files.component.scss b/demo-shell/src/app/components/files/files.component.scss index 198feeded8..fc556620ce 100644 --- a/demo-shell/src/app/components/files/files.component.scss +++ b/demo-shell/src/app/components/files/files.component.scss @@ -1,149 +1,182 @@ -$minimumDocumentListWidth: 425px; +@mixin adf-file-component-theme($theme) { + $minimumDocumentListWidth: 900px; + $foreground: map-get($theme, foreground); -.container { - margin: 10px; -} - -@media only screen and (max-width: 640px) { .container { - margin: 0; - } -} - -.error-message { - text-align: left; -} - -.error-message--text { - color: #d50000; -} - -.adf-not-overlay-viewer { - height: 900px; -} - -adf-document-list ::ng-deep adf-datatable tr.document-list__create { - background: green !important; -} - -adf-document-list ::ng-deep adf-datatable tr.document-list__disable { - background: red !important; -} - -adf-document-list ::ng-deep .adf-datatable-selected > svg { - fill: #00bcd4 !important; -} - -.adf-site-container-style { - margin-top: 10px; - margin-bottom: 10px; - width: 100%; - min-width: 200px; -} - -.adf-content-service-settings { - padding: 16px; -} - -.adf-files-toolbar { - .adf-toolbar-title { - display: flex; - width: 100%; - - .adf-breadcrumb { - width: 0; - } - } -} - -.adf-manage-versions-sidebar { - width: 300px; - color: rgba(0, 0, 0, 0.87); - - .adf-manage-versions-empty, - .adf-manage-versions-no-permission { - margin: 24px; - color: grey; - text-align: justify; - - &-icon { - display: block; - font-size: 48px; - margin: 0 auto 32px auto; - } + margin: 10px !important; } - & ::ng-deep .adf-info-drawer-layout-header { - display: none; - } - - & ::ng-deep .adf-info-drawer-layout-content { - padding: 0; - - .adf-version-upload, - .adf-new-version-file-upload { - width: 100%; - - & .mat-raised-button { - width: 100%; - } + @media screen and ($mat-xsmall) { + .container { + margin: 0; } - .adf-new-version-uploader-container { - padding: 8px 24px 16px 24px; - } - } -} - -.adf-no-result__empty_doc_lib { - width: 565px; - height: 161px; - object-fit: contain; - margin-top: 17px; -} - -.adf-empty_template { - text-align: center; - margin-top: 20px; - margin-bottom: 20px; -} - -.adf-no-result-message { - height: 32px; - opacity: 0.26; - font-size: 24px; - line-height: 1.33; - letter-spacing: -1px; -} - -.adf-container-recent { - mat-icon { - margin-left: 20px; - } - - .empty-list__block { - height: 100%; - padding: 0; - margin: 0; - display: flex; - align-items: center; - justify-content: center; - } -} - -@media (max-width: $minimumDocumentListWidth) { - adf-document-list ::ng-deep adf-datatable { - & ::ng-deep .adf-data-table-cell--fileSize { + .adf-show-versions-button.mat-icon-button { display: none; } } - .adf-site-container-style { - width: 100%; - display: block; + .error-message { + text-align: left; + } - & ::ng-deep .adf-site-dropdown-list-element { + .error-message--text { + color: #d50000; + } + + .adf-not-overlay-viewer { + height: 900px; + } + + adf-document-list ::ng-deep adf-datatable tr.document-list__create { + background: green !important; + } + + adf-document-list ::ng-deep adf-datatable tr.document-list__disable { + background: red !important; + } + + adf-document-list ::ng-deep .adf-datatable-selected > svg { + fill: #00bcd4 !important; + } + + .adf-site-container-style { + margin-top: 10px; + margin-bottom: 10px; + width: 100%; + min-width: 200px; + } + + .adf-content-service-settings { + padding: 16px; + } + + .adf-files-toolbar { + .adf-toolbar-title { + display: flex; width: 100%; + + .adf-breadcrumb { + width: 0; + } } } + + .adf-manage-versions-sidebar { + width: 300px !important; + color: rgba(0, 0, 0, 0.87); + + .adf-manage-versions-empty, + .adf-manage-versions-no-permission { + margin: 44px; + color: mat-color($foreground, text, 0.54); + text-align: center; + + &-icon { + display: block; + font-size: 48px; + margin: 0 auto 32px auto; + } + } + + & ::ng-deep .adf-info-drawer-layout-header { + display: none; + } + + & ::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; + } + } + } + + .adf-no-result__empty_doc_lib { + width: 565px; + height: 161px; + object-fit: contain; + margin-top: 17px; + } + + .adf-empty_template { + text-align: center; + margin-top: 20px; + margin-bottom: 20px; + } + + .adf-no-result-message { + height: 32px; + opacity: 0.26; + font-size: 24px; + line-height: 1.33; + letter-spacing: -1px; + } + + .adf-container-recent { + mat-icon { + margin-left: 20px; + } + + .empty-list__block { + height: 100%; + padding: 0; + margin: 0; + display: flex; + align-items: center; + justify-content: center; + } + } + + @media (max-device-width: $minimumDocumentListWidth) { + adf-document-list .adf-data-table { + .adf-data-table-cell, + .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 { + width: 100%; + display: block; + + & ::ng-deep .adf-site-dropdown-list-element { + width: 100%; + } + } + + adf-file-uploading-dialog ::ng-deep .upload-dialog { + width: 80%; + + & ::ng-deep adf-file-uploading-list ::ng-deep adf-file-uploading-list-row .adf-file-uploading-row__group { + min-width: 0; + } + } + } + + @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; + } + } + } } diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts index e52f360c7b..94f51b4f49 100644 --- a/demo-shell/src/app/components/files/files.component.ts +++ b/demo-shell/src/app/components/files/files.component.ts @@ -16,24 +16,19 @@ */ import { - Component, Input, OnInit, OnChanges, OnDestroy, ChangeDetectorRef, - EventEmitter, Optional, ViewChild, SimpleChanges, Output + Component, Input, OnInit, OnChanges, OnDestroy, Optional, + EventEmitter, ViewChild, SimpleChanges, Output } from '@angular/core'; +import { Location } from '@angular/common'; + import { MatDialog } from '@angular/material'; import { ActivatedRoute, Params, Router } from '@angular/router'; +import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, SiteEntry } from 'alfresco-js-api'; import { - MinimalNodeEntity, - NodePaging, - Pagination, - PathElementEntity, - MinimalNodeEntryEntity, - SiteEntry -} from 'alfresco-js-api'; -import { - AuthenticationService, ContentService, TranslationService, + AuthenticationService, AppConfigService, ContentService, TranslationService, FileUploadEvent, FolderCreatedEvent, LogService, NotificationService, UploadService, DataColumn, DataRow, UserPreferencesService, - PaginationComponent, FormValues, DisplayMode + PaginationComponent, FormValues, DisplayMode, UserPreferenceValues } from '@alfresco/adf-core'; import { DocumentListComponent, PermissionStyleModel } from '@alfresco/adf-content-services'; @@ -43,6 +38,7 @@ import { SelectAppsDialogComponent } from '@alfresco/adf-process-services'; import { VersionManagerDialogAdapterComponent } from './version-manager-dialog-adapter.component'; import { MetadataDialogAdapterComponent } from './metadata-dialog-adapter.component'; import { Subscription } from 'rxjs/Subscription'; +import { PreviewService } from '../../services/preview.service'; const DEFAULT_FOLDER_TO_SHOW = '-my-'; @@ -58,6 +54,9 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { showViewer = false; showVersions = false; displayMode = DisplayMode.List; + includeFields = ['isLocked', 'aspectNames']; + + baseShareUrl = this.appConfig.get('ecmHost') + '/preview/s/'; toolbarColor = 'default'; @@ -67,8 +66,8 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { { value: 'multiple', viewValue: 'Multiple' } ]; + // The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root- @Input() - // The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root- currentFolderId: string = DEFAULT_FOLDER_TO_SHOW; formValues: FormValues = {}; @@ -93,9 +92,15 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { @Input() maxSizeShow = false; + @Input() + showVersionComments = true; + @Input() versioning = false; + @Input() + allowVersionDownload = true; + @Input() acceptedFilesType = '.jpg,.pdf,.js'; @@ -138,45 +143,43 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { @ViewChild('documentList') documentList: DocumentListComponent; - @ViewChild(PaginationComponent) + @ViewChild('standardPagination') standardPagination: PaginationComponent; permissionsStyle: PermissionStyleModel[] = []; infiniteScrolling: boolean; supportedPages: number[]; + currentSiteid = ''; private onCreateFolder: Subscription; private onEditFolder: Subscription; - constructor(private changeDetector: ChangeDetectorRef, - private notificationService: NotificationService, + constructor(private notificationService: NotificationService, private uploadService: UploadService, private contentService: ContentService, private dialog: MatDialog, + private location: Location, private translateService: TranslationService, private router: Router, private logService: LogService, private preference: UserPreferencesService, + private appConfig: AppConfigService, + private preview: PreviewService, @Optional() private route: ActivatedRoute, public authenticationService: AuthenticationService) { + this.preference.select(UserPreferenceValues.SupportedPageSizes) + .subscribe((pages) => { + this.supportedPages = pages; + }); } showFile(event) { const entry = event.value.entry; if (entry && entry.isFile) { - this.router.navigate(['/files', entry.id, 'view']); + this.preview.showResource(entry.id); } } - onFolderChange($event) { - this.currentFolderId = $event.value.id; - this.router.navigate(['/files', $event.value.id]); - } - - onBreadcrumbNavigate(route: PathElementEntity) { - this.router.navigate(['/files', route.id]); - } - toggleFolder() { this.multipleFileUpload = false; this.folderUpload = !this.folderUpload; @@ -190,11 +193,15 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { skipCount: 0 }; } + if (this.route) { this.route.params.forEach((params: Params) => { - if (params['id']) { + if (params['id'] && this.currentFolderId !== params['id']) { this.currentFolderId = params['id']; - this.changeDetector.detectChanges(); + } + + if (params['mode']) { + this.displayMode = DisplayMode.Gallery; } }); } @@ -205,7 +212,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { this.contentService.folderCreated.subscribe(value => this.onFolderCreated(value)); this.onCreateFolder = this.contentService.folderCreate.subscribe(value => this.onFolderAction(value)); this.onEditFolder = this.contentService.folderEdit.subscribe(value => this.onFolderAction(value)); - this.supportedPages = this.preference.getDifferentPageSizes(); + this.supportedPages = this.supportedPages ? this.supportedPages : this.preference.getDefaultPageSizes(); // this.permissionsStyle.push(new PermissionStyleModel('document-list__create', PermissionsEnum.CREATE)); // this.permissionsStyle.push(new PermissionStyleModel('document-list__disable', PermissionsEnum.NOT_CREATE, false, true)); @@ -274,33 +281,29 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { } } + onFolderChange($event) { + this.router.navigate(['/files', $event.value.id]); + } + handlePermissionError(event: any) { this.translateService.get('PERMISSON.LACKOF', { permission: event.permission, action: event.action, type: event.type }).subscribe((message) => { - this.notificationService.openSnackMessage( - message, - 4000 - ); + this.openSnackMessage(message); }); } - handleUploadError(event: any) { + openSnackMessage(event: any) { this.notificationService.openSnackMessage( event, 4000 ); } - emitReadyEvent(event: any) { - if (this.pageIsEmpty(event)) { - this.standardPagination.goPrevious(); - } else { - this.documentListReady.emit(event); - this.pagination = event.list.pagination; - } + emitReadyEvent(event: NodePaging) { + this.documentListReady.emit(event); } pageIsEmpty(node: NodePaging) { @@ -322,31 +325,47 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { translatedErrorMessage = this.translateService.get('OPERATION.ERROR.UNKNOWN'); } - this.notificationService.openSnackMessage(translatedErrorMessage.value, 4000); + this.openSnackMessage(translatedErrorMessage.value); } onContentActionSuccess(message) { const translatedMessage: any = this.translateService.get(message); - this.notificationService.openSnackMessage(translatedMessage.value, 4000); + this.openSnackMessage(translatedMessage.value); + this.reloadForInfiniteScrolling(); } onDeleteActionSuccess(message) { this.uploadService.fileDeleted.next(message); this.deleteElementSuccess.emit(); + this.reloadForInfiniteScrolling(); + this.openSnackMessage(message); + } + + onPermissionRequested(node) { + this.router.navigate(['/permissions', node.value.entry.id]); + } + + private reloadForInfiniteScrolling() { + if (this.infiniteScrolling) { + this.documentList.skipCount = 0; + } + this.documentList.reload(); } onManageVersions(event) { const contentEntry = event.value.entry; + const showComments = this.showVersionComments; + const allowDownload = this.allowVersionDownload; if (this.contentService.hasPermission(contentEntry, 'update')) { this.dialog.open(VersionManagerDialogAdapterComponent, { - data: { contentEntry }, + data: { contentEntry: contentEntry, showComments: showComments, allowDownload: allowDownload }, panelClass: 'adf-version-manager-dialog', width: '630px' }); } else { const translatedErrorMessage: any = this.translateService.get('OPERATION.ERROR.PERMISSION'); - this.notificationService.openSnackMessage(translatedErrorMessage.value, 4000); + this.openSnackMessage(translatedErrorMessage.value); } } @@ -361,7 +380,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { }); } else { const translatedErrorMessage: any = this.translateService.get('OPERATION.ERROR.PERMISSION'); - this.notificationService.openSnackMessage(translatedErrorMessage.value, 4000); + this.openSnackMessage(translatedErrorMessage.value); } } @@ -449,10 +468,17 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { } toogleGalleryView(): void { + const url = this + .router + .createUrlTree(['/files', this.currentFolderId, 'display', this.displayMode]) + .toString(); + if (this.displayMode === DisplayMode.List) { this.displayMode = DisplayMode.Gallery; + this.location.go(url); } else { this.displayMode = DisplayMode.List; + this.location.go(url); } } } diff --git a/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html b/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html index 062fbf32a4..ffb418667d 100644 --- a/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html +++ b/demo-shell/src/app/components/files/version-manager-dialog-adapter.component.html @@ -1,6 +1,6 @@
{{'VERSION.DIALOG.TITLE' | translate}}
- +