diff --git a/.angular-cli.json b/.angular-cli.json index a9075f9f2..dcab4b6fb 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -13,13 +13,21 @@ "app.config.json", "versions.json", - { "glob": "**/*", "input": "../node_modules/ng2-alfresco-core/bundles/assets", "output": "./assets/" }, - { "glob": "**/*", "input": "../node_modules/ng2-alfresco-datatable/bundles/assets", "output": "./assets/" }, - { "glob": "**/*", "input": "../node_modules/ng2-alfresco-viewer/bundles/assets", "output": "./assets/" }, - { "glob": "**/*", "input": "../node_modules/ng2-alfresco-documentlist/bundles/assets", "output": "./assets/" }, - { "glob": "**/*", "input": "../node_modules/ng2-alfresco-login/bundles/assets", "output": "./assets/" }, - { "glob": "**/*", "input": "../node_modules/ng2-alfresco-upload/bundles/assets", "output": "./assets/" }, - { "glob": "**/*", "input": "../node_modules/ng2-alfresco-search/bundles/assets", "output": "./assets/" }, + { + "glob": "**/*", + "input": "../node_modules/@alfresco/adf-core/prebuilt-themes", + "output": "./assets/prebuilt-themes" + }, + { + "glob": "**/*", + "input": "../node_modules/@alfresco/adf-core/bundles/assets", + "output": "./assets/" + }, + { + "glob": "**/*", + "input": "../node_modules/@alfresco/adf-content-services/bundles/assets", + "output": "./assets/" + }, { "glob": "pdf.worker.js", "input": "../node_modules/pdfjs-dist/build", "output": "./" } ], @@ -31,6 +39,8 @@ "testTsconfig": "tsconfig.spec.json", "prefix": "app", "styles": [ + "./assets/fonts/material-icons/material-icons.css", + "./assets/fonts/muli/muli.css", "styles.scss" ], "scripts": [ @@ -79,7 +89,8 @@ "component": {}, "serve": { "proxyConfig": "proxy.conf.js", - "port": 3000 + "port": 3000, + "host": "0.0.0.0" } } } diff --git a/LICENSE b/LICENSE index 430d42bbe..65c5ca88a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,177 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. + 0. Additional Definitions. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public 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. + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". - "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. + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. - "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). + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. - "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. + 1. Exception to Section 3 of the GNU GPL. - "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." + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. - "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. Conveying Modified Versions. -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. + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: -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. + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or -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: + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and + 3. Object Code Incorporating Material from Library Header Files. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: - (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 + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. - (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. + b) Accompany the object code with a copy of the GNU GPL and this license + document. - 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. + 4. Combined Works. -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. + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: -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. + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. -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. + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. -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. + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. -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. + d) Do one of the following: -END OF TERMS AND CONDITIONS + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/docs/README.md b/docs/README.md index 18e85ecff..a634fc473 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,9 +1,75 @@ -# Alfresco Content App +# Alfresco Example Content Application -## Prerequisites +## Introduction -- Alfresco Content Services (Community) or Alfresco Content Services 5.2.2 (Enterprise) -- [node.js](https://nodejs.org/en/) 8.9.1 or later +The Alfresco Content Application is an example application built using +[Alfresco Application Development Framework (ADF)](https://github.com/Alfresco/alfresco-ng2-components) components. + +### Who is this example application for + +This example application demonstrates to Angular software engineers +how to construct a content application using the Alfresco ADF. + +This example application represents a meaningful composition of ADF components that provide end users +with a simple and easy to use interface for working with files stored in the Alfresco Content Services repository. + +### Prerequisites + +This application utilises the latest releases from Alfresco: + +- [Alfresco ADF version 2.0](https://community.alfresco.com/community/application-development-framework/pages/get-started) +- [Alfresco Content Services version 5.2.2](https://www.alfresco.com/platform/content-services-ecm) +- [Alfresco Community Edition 201707](https://www.alfresco.com/products/community/download) + +

+You also need [node.js](https://nodejs.org/en/) (8.9.1 or later) installed to build it locally from source code. +

+ +The latest version of the Alfresco Content platform is required +due to the application utilising the latest [REST APIs](https://docs.alfresco.com/5.2/pra/1/topics/pra-welcome.html) developments. + +## Where to get help + +There are a number of ways to get help with building applications using the Alfresco Application Development Framework: + +### Alfresco DevCon 2018 + +DevCon 2018 is an international developer conference entirely dedicated to Alfresco technology. +With the support of our community, customers, and partners, DevCon will increase your technical know-how, +connect you with other Alfresco developers, and let you collaborate with our team and each other. + +Register now to avoid disappointment, places are limited: +http://devcon.alfresco.com/ + +### Alfresco Community + +Visit the Alfresco Community space where you can find many resources to help you get started building your application, +along with blog posts from the Alfresco developers and much more: +https://community.alfresco.com/community/application-development-framework + +### Alfresco ADF Gitter + +Join the vibrant community in Gitter where you can chat with experienced developers, +including the Alfresco employees working directly on the ADF and this example application project: +https://gitter.im/Alfresco/alfresco-ng2-components + +### Alfresco Developer Support + +Developer Support is a subscription-based support offering delivered remotely +by a dedicated team of development-focused, senior Support Engineers. +This support offering is best for customers and partners that require on-going support +for their development teams and customized code. + +Visit the Developer Support Services section on the Alfresco website for more information: +https://www.alfresco.com/alfresco-developer-support-services + +### Alfresco University + +Training with Alfresco University is the best way to acquire the right skills for your team to deliver a successful Alfresco implementation. +The most cost-effective way to take advantage of this valuable training is through Alfresco University Passport. + +Visit the Alfresco University section on the Alfresco website for more information: +https://www.alfresco.com/alfresco-university ## Building and running locally @@ -13,3 +79,25 @@ Please refer to the [developer docs](/build) to get more details on building and The Content App provides a "Dockerfile" and "docker-compose" files to aid in running application in a container. Please refer to the "[Using with Docker](/docker)" article for more details. + +## Contribution Policy + +### How to contribute + +Fork our repository and submit a pull request when your code is ready for review. +To be considered the Travis build has to be green and all our automation tests have to run without regressions. + +### Contribute to the existing code base + +What are we reviewing for? + +- **License**: Every file should contain the Alfresco LICENSE header, LGPL Licence. +- **Tests**: Add unit cases to cover the new behaviour, and make sure all the existing tests are still green. +- **JS Documentation**: Every class needs to have its own inline jsdoc, this documentation should explain the general purpose of the class and of each method. +- **Documentation**: Update the documentation explaining how to use the new functionality, may not be necessary in the cases where change impacts only the CSS style. +- **Clean Coding**: Some good rules are enforced by the tslint, but we want also our code to be easy to read. Please avoid comments inside the code or leaving pieces of code commented out. +- **Localization**: Your contribution needs to support localization, with all new strings externalized, all translations are inside the i18n. The minimum requirement is English. + +### How long will it take for my contribution to be reviewed? + +The time necessary for a code review will vary, smaller changes may be reviewed within days, while larger changes may take longer. diff --git a/docs/build.md b/docs/build.md index 2afeb489b..0100a765f 100644 --- a/docs/build.md +++ b/docs/build.md @@ -2,7 +2,14 @@ The Content App is based on [Angular CLI](https://cli.angular.io), and you can use all the commands, generators and blueprints supported by the CLI. -Use the following commands to clone a copy of the project, install dependencies and run it. +## Prerequisites + +- [Node.js](https://nodejs.org/en/) 8.9.1 or later LTS version +- [Angular CLI](https://cli.angular.io/) + +## Cloning and running + +Use the following commands to clone the project, install dependencies and run it. ```sh git clone https://github.com/Alfresco/alfresco-content-app.git @@ -11,18 +18,18 @@ npm install npm start ``` -The application run at port 3000 by default, and should automatically open in the default browser once project compilation finishes. +The application runs at port 3000 by default, and should automatically open in the default browser once project compilation finishes. ## Proxy settings The Content App provides a proxy configuration for local development server -that allows you to address specific scenarios with CORS and native authentication dialogue. +that allows you to address specific scenarios with CORS and native authentication dialog. You can find settings in the "proxy.conf.js" file in the project root directory.

The proxy settings get automatically applied every time you run the application with "npm start" script. -You must restart the application every time you change the setting values. +You must restart the application every time you change the settings values.

## Running documentation locally diff --git a/docs/configuration.md b/docs/configuration.md index 922b1fb13..6fdd3bf73 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1,6 +1,6 @@ # Application Configuration -The Content Application provides support for a global settings file `app.config.json` that you can use to customise the behaviour of ACA and ADF components. +The Content Application provides support for a global settings file `app.config.json` that you can use to customize the behavior of ACA and ADF components. ## Server settings @@ -29,7 +29,7 @@ Optionally it can also use the value of the original port if present, for exampl ### Static address -Alternatively, you can provide a static address for the ACS services if necessary: +Alternatively, you can provide a static address for the ACS server if necessary: ```json { @@ -40,7 +40,7 @@ Alternatively, you can provide a static address for the ACS services if necessar ## Application settings -The are many settings you can change to alter the default behaviour of the application. +The are many settings you can change to alter the default behavior of the application. ### Application Name @@ -104,7 +104,7 @@ You can change the default settings of the pagination that gets applied to all t ## Your custom settings -You can store any information in the application configuration file, and access it at runtime by utilising the `AppConfigService` service provided by the ADF framework. +You can store any information in the application configuration file, and access it at runtime by using the `AppConfigService` service provided by ADF.

Please refer to the [AppConfigService](https://github.com/Alfresco/alfresco-ng2-components/blob/master/docs/app-config.service.md) documentation to get more details on Application Configuration features and API available. diff --git a/docs/cors.md b/docs/cors.md index 192da5af7..f296a92ee 100644 --- a/docs/cors.md +++ b/docs/cors.md @@ -2,7 +2,7 @@ ## Chrome Workaround -For the Chrome you can use the following plugin that allows you toggle CORS: +For the Chrome browser you can use the following plugin that allows you toggle CORS: [Allow-Control-Allow-Origin](https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi) ## Firefox Workaround diff --git a/docs/docker.md b/docs/docker.md index 8f24330cc..3d98a5f05 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -86,3 +86,51 @@ To perform a cleanup operation, use the next command: ```sh docker-compose down --rmi all ``` + +## Publishing to Docker Hub + +First of all, if you do not have a Docker Hub account, you can register here: https://hub.docker.com/, the registration is absolutely free. + +Next, it is recommended that you get a clean build of the application: + +```sh +npm install +npm run build:dev +``` + +The commands above are going to produce a fresh build that is stored in the `dist` folder. +At this point, you can make modifications to the final code in the `dist` folder if needed. +For example you may want to change the `app.config.json` file content. + +Now you can build your first version of the image: + +```sh +docker image build -t myaccount/content-app:1.0 . +``` + +Where `myaccount` is usually your Docker Hub account name. + +

+Please note the ending "." symbol at the end of the command. It instructs the Docker to take current folder where the `Dockerfile` is located. +

+ +To publish the newly created image use the next command: + +```sh +docker push myaccount/content-app:1.0 +``` + +## Running from Docker Hub + +In order to quickly test the published image, or run it on another machine, use the following command: + +```sh +docker container run -p 80:80 --rm myaccount/content-app:1.0 +``` + +The `--rm` switch means the Docker will cleanup the container and image data once you stop the process. + +

+You may also want to remove your local image before trying out the Docker Hub:
+`docker image rm myaccount/content-app:1.0` +

diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 000000000..850164ecb --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,33 @@ +# Frequently asked questions + +## How do I log an issue (bug, enhancement, feature)? + +Log any issues in the ['ACA' JIRA project](https://issues.alfresco.com/jira/projects/ACA), +please include a clear description, steps to reproduce and screenshots where appropriate. +All issues will be reviewed; bugs will be categorised if reproducible and enhancement/feature suggestions +will be considered against existing priorities if the use case serves a general purpose need. + +## Does Alfresco provide customer support for the example content application? + +Alfresco does not provide Customer Support, it is an example application for developers; [Developer Support Services](https://www.alfresco.com/alfresco-developer-support-services) are available from Alfresco. + +## Does this/Will this application replace Alfresco Share? + +This example application is designed to demonstrate how to construct a content application using the Alfresco Application Development Framework, +it is not intended to be a replacement for Alfresco Share. + +## Where can I get help building an application? + +See [Where to get help](/?id=where-to-get-help) section. + +## How do I contribute to the project? + +See [Contribution Policy](/?id=contribution-policy) section. + +## What would you like me to contribute? + +Please refer to the ['ACA' JIRA project](https://issues.alfresco.com/jira/projects/ACA) for tickets in the project backlog. + +## How often will this project be updated? + +This project will continue evolve as the Alfresco ADF evolves, with Alfresco and community developers contributing to its progress. diff --git a/docs/features.md b/docs/features.md new file mode 100644 index 000000000..a4f7f0784 --- /dev/null +++ b/docs/features.md @@ -0,0 +1,191 @@ +# Features + +The concept of this example is a simple user interface which makes accessing files in the Alfresco Content Services repository easy. + +Often Content Management systems provide more capabilities out of the box than most users need; +providing too many capabilities to these users prevents them from working efficiently, +so they may end up using unsanctioned file management solutions which presents a proliferation of content storage +and collaboration solutions as well as compliance issues for organisations. + +This application demonstrates how the complexity of Content Management can be simplified +using the Alfresco Application Development Framework to easily and quickly create custom solutions for specific user cases. + +## User Interface - layout + +![](images/features-01.png) + +### Header (1) + +The application [header](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/header) has three main elements. + +Logo & app primary color - logo and color are configurable by updating the +[app.config.json](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app.config.json) file in the root folder of the project, +see [How to change the logo and color](/) and [Application Configuration](/configuration) for more information + +[Search](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/search) - +utilizing the [ADF Search Component](https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/content-services/search) +the app provides a 'live' search feature, where users can open files and folders directly from the Search API results. + +[Current User](https://github.com/Alfresco/alfresco-content-app/tree/development/src/app/components/current-user) - +displays the user's name, and a menu where users can logout. +Optionally through updating the [app.config.json](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app.config.json) +a language switching menu can be displayed. + +### Side Nav (2) + +The application [side navigation](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/sidenav) has two features; +a button menu and navigation links. + +#### New button + +The New button displays a menu which provides three actions: + +- Create a new folder - provides a dialog which allows the creation of a new folder, the folder name is mandatory and the description is optional. +- Upload a file - invokes the operating system file browser and allows a user to select file(s) to upload into their current location in the content repository. +- Upload a folder - invokes the operating system folder browser and allows a user to select folder(s) to upload to their current location in the content repository. + +When an upload starts the [upload component](https://github.com/Alfresco/alfresco-ng2-components/tree/master/lib/content-services/upload) +is displayed which shows the user the progress of the uploads they have started. +The upload dialog persists on the screen and can be minimised; users are able to continue using the application whilst uploads are in progress +and uploads can be canceled which will stop uploads in progress or permanently delete already completed uploads. + +#### Navigation + +The navigation links are configurable via the [app.config.json](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app.config.json). +Default configuration creates two sections. +See [How to work with the side navigation](/) for more information about configuring the side navigation. + +### Document List Layout (3) + +The main area of the application is composed from a number of individual ADF components: + +- [Breadcrumb](https://alfresco.github.io/adf-component-catalog/components/BreadcrumbComponent.html) +- [Toolbar](https://alfresco.github.io/adf-component-catalog/components/ToolbarComponent.html) +- [Document List](https://alfresco.github.io/adf-component-catalog/components/DocumentListComponent.html) +- [Pagination](https://alfresco.github.io/adf-component-catalog/components/PaginationComponent.html) + +The application has six different Document List views which contain subtle differences depending on the content being loaded. + +#### Personal Files + +Personal Files retrieves all content from the logged in users home area (`/User Homes//` in the repository); +if the user is ‘admin’ who does not have a home folder then the repository root folder is shown. + +Personal Files is the [Files component](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/files), +using the [Nodes API](https://api-explorer.alfresco.com/api-explorer/#/nodes). + +#### File Libraries + +File Libraries retrieves all the sites that the user is a member including what type of site it is; public, moderated or private. +File Libraries is the [Libraries component](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/libraries), +using the [Sites API](https://api-explorer.alfresco.com/api-explorer/#/sites). + +When a user opens one of their sites then the content for that sites document library is shown. +To display the files and folders from a site (`/Sites//Document Library/`) the [Files component](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/files), +using the [Nodes API](https://api-explorer.alfresco.com/api-explorer/#/nodes) is used. + +#### Shared Files + +The Shared Files view aggregates all files that have been shared using the QuickShare feature in the content repository. +The [Shared Files component](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/shared-files) +uses the [shared-links API](https://api-explorer.alfresco.com/api-explorer/#/shared-links) +and includes extra columns to display where the file is +[located](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/location-link) +in the content repository and who created the shared link. + +A feature for creating and removing Shared Links will be added in the future. + +#### Recent Files + +The Recent Files view shows all the files that have been modified within the last 30 days by the current user. +The [Recent Files](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/current-user) +component uses the Search API to query SOLR for changes made by the user and includes an extra column to display where the file is +[located](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/location-link) +in the content repository. + +#### Favorites + +The Favorites view shows all files and folders from the content repository that have been marked as a favorite by the current user. +The [Favorites](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/favorites) component uses the +[favorites](https://api-explorer.alfresco.com/api-explorer/#/favorites) API to retrieve all the favorite nodes for the user +and includes an extra column to display where the file is +[located](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/location-link) +in the content repository. + +#### Trash + +The Trash view shows all the items that a user has deleted, admin will see items deleted by all users. +The actions available in this view are Restore and Permanently Delete. +The [Trashcan](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/trashcan) component uses the +[trashcan](https://api-explorer.alfresco.com/api-explorer/#/trashcan) API to retrieve the deleted items +and perform the actions requested by the user and includes an extra column to display where the file is +[located](https://github.com/Alfresco/alfresco-content-app/tree/master/src/app/components/location-link) +in the content repository. + +#### Actions and the Actions Toolbar + +All the views incorporate the [toolbar](https://alfresco.github.io/adf-component-catalog/components/ToolbarComponent.html) +component from the Alfresco Application Development Framework; +apart from the Trash view they all display the following actions when the current user has the necessary permissions, +actions are automatically hidden when the user does not have permission. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ActionFileFolder
View + Opens the selected file using the [Preview](https://github.com/Alfresco/alfresco-content-app/tree/development/src/app/components/preview) component, + where the file cannot be displayed natively in a browser a PDF rendition is obtained from the repository. + Not applicable
DownloadDownloads single files to the users computer, when multiple files are selected they are compressed into a ZIP and then downloaded.Folders are automatically compressed into a ZIP and then downloaded to the users computer.
EditNot applicableThe folder name and description can be edited in a dialog.
Favorite + Toggle the favorite mark on or off for files and folders, when multiple items are selected + and one or more are not favorites then the mark will be toggled on. +
Copy + Files and folders can be copied into other locations in the content repository using the + [content-node-selector](https://alfresco.github.io/adf-component-catalog/components/ContentNodeSelectorComponent.html) component; + once the copy action has completed the user is notified and can undo the action (which permanently deletes the copies created). +
Move + Files and folders can be moved into other locations in the content repository using the + [content-node-selector](https://alfresco.github.io/adf-component-catalog/components/ContentNodeSelectorComponent.html) component; + once the move action has completed the user is notified and can undo the action (which moves the items back to the original location). +
Delete + Files and folders can be deleted from their location in the content repository; + once the delete action has completed the user is notified and undo the action (which restores the items from the trash). +
+ +As well as the actions available in the toolbar users can single click an item to select it, +or double click on a file to view it, and a folder to open it. diff --git a/docs/i18n.md b/docs/i18n.md new file mode 100644 index 000000000..8fe627e32 --- /dev/null +++ b/docs/i18n.md @@ -0,0 +1,131 @@ +# Internationalization (i18n) + +The Content Application provides support for the following languages: + +- German (`de`) +- English (`en`) +- Spanish (`es`) +- French (`fr`) +- Italian (`it`) +- Japanese (`ja`) +- Norwegian (`nb`) +- Dutch (`nl`) +- Brazilian Portuguese (`pt-BR`) +- Russian (`ru`) +- Simplified Chinese (`zh-CN`) + +The fallback locale is the English one, however current browser language is taken as the default one automatically when the application starts. + +## User-defined language + +You can allow users to set custom language that gets saved to user preferences. +The main application menu already has the [ADF Language Menu](https://github.com/Alfresco/alfresco-ng2-components/blob/development/docs/language-menu.component.md) component integrated and pre-filled with the supported items. + +To change the default language set edit the `app.config.json` file and add or remove items: + +```json +{ + ..., + "languages": [ + { + "key": "de", + "label": "German" + }, + { + "key": "en", + "label": "English" + }, + { + "key": "es", + "label": "Spanish" + }, + ... + ] +} +``` + +The file is located at the following path: `/src/app.config.json`. + +## Custom languages + +To add a custom language, add a new "JSON" file to the "/src/assets/i18n" folder +with the name of the target locale, for instance, a "de.json" for the "German". + +Translate the resource strings based on the default "en.json" file. +You can copy the content over to your newly created file and replace English values with translated text. + +```json +{ + "APP": { + "SIGN_IN": "Anmelden", + "SIGN_OUT": "Abmelden", + "NEW_MENU": { + "LABEL": "Neu", + "MENU_ITEMS": { + "CREATE_FOLDER": "Ordner erstellen", + "UPLOAD_FILE": "Datei hochladen", + "UPLOAD_FOLDER": "Ordner hochladen" + }, + ... + } + }, + ... +} +``` + +The Content Application automatically bundles your file upon project build. +You can test your locale by changing the browser language settings and reloading the page. + +Optionally, you can extend the [ADF Language Menu](https://github.com/Alfresco/alfresco-ng2-components/blob/development/docs/language-menu.component.md) component with the newly added language by updating the `app.config.json` file. + +## Customizing ADF translations + +In addition to creating a custom language file for the Content Application, +you can also provide translations for the ADF resources. + +Your `/src/assets/i18n/.json` file can reflect the structure of one of the ADF language files: + +- ADF Core ([en.json](https://github.com/Alfresco/alfresco-ng2-components/blob/master/lib/core/i18n/en.json)) +- ADF Content Services ([en.json](https://github.com/Alfresco/alfresco-ng2-components/blob/master/lib/content-services/i18n/en.json)) +- ADF Process Services ([en.json](https://github.com/Alfresco/alfresco-ng2-components/blob/master/lib/process-services/i18n/en.json)) +- ADF Insights ([en.json](https://github.com/Alfresco/alfresco-ng2-components/blob/master/lib/insights/i18n/en.json)) + +At runtime, the application-level strings have the highest priority. +That means you can replace the value of any ADF resource string if needed. + +For example, let's change the title of the "Create Folder" dialog shipped with the ADF. +Modify the `/src/assets/i18n/en.json` file and append the "CORE" section like in the example below: + +```json +{ + "APP": { + ... + }, + "CORE": { + "FOLDER_DIALOG": { + "CREATE_FOLDER_TITLE": "Custom title" + } + } +} +``` + +Now, if you run the application and click the "New → Create Folder" menu, +the title of the dialog should look similar to the following: + +![](images/aca-i18n-01.png) + +## Language picker + +You can enable internal language picker in the `app.config.json` file: + +```json +{ + ..., + + "languagePicker": true, + + ... +} +``` + +![](images/aca-i18n-02.png) diff --git a/docs/images/aca-i18n-01.png b/docs/images/aca-i18n-01.png new file mode 100644 index 000000000..856989c0c Binary files /dev/null and b/docs/images/aca-i18n-01.png differ diff --git a/docs/images/aca-i18n-02.png b/docs/images/aca-i18n-02.png new file mode 100644 index 000000000..26f56617e Binary files /dev/null and b/docs/images/aca-i18n-02.png differ diff --git a/docs/images/features-01.png b/docs/images/features-01.png new file mode 100755 index 000000000..daa6098bd Binary files /dev/null and b/docs/images/features-01.png differ diff --git a/docs/index.html b/docs/index.html index 4366360a0..b462bce7c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -18,6 +18,10 @@ title: 'Home', path: '/' }, + { + title: 'Features', + path: 'features' + }, { title: 'Building', path: 'build' @@ -26,6 +30,10 @@ title: 'Docker', path: 'docker' }, + { + title: 'FAQ', + path: 'faq' + }, { title: 'Guides', type: 'dropdown', @@ -34,6 +42,10 @@ title: 'Building', path: 'build' }, + { + title: 'Internationalization (i18n)', + path: 'i18n' + }, { title: 'CORS', path: 'cors' diff --git a/e2e/components/component.ts b/e2e/components/component.ts index 3d38761ef..24d7f1cb1 100644 --- a/e2e/components/component.ts +++ b/e2e/components/component.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, element, by, ExpectedConditions as EC, browser } from 'protractor'; diff --git a/e2e/components/components.ts b/e2e/components/components.ts index cfcca0826..70992f11d 100644 --- a/e2e/components/components.ts +++ b/e2e/components/components.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ export * from './login/login'; diff --git a/e2e/components/data-table/data-table.ts b/e2e/components/data-table/data-table.ts index 3c3fef193..ea809fcf3 100644 --- a/e2e/components/data-table/data-table.ts +++ b/e2e/components/data-table/data-table.ts @@ -1,21 +1,29 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ -import { ElementFinder, ElementArrayFinder, promise, by, browser, ExpectedConditions as EC } from 'protractor'; +import { ElementFinder, ElementArrayFinder, promise, by, browser, ExpectedConditions as EC, protractor } from 'protractor'; import { BROWSER_WAIT_TIMEOUT } from '../../configs'; import { Component } from '../component'; @@ -32,7 +40,9 @@ export class DataTable extends Component { body: 'table > tbody', row: 'tr', + selectedRow: 'tr.is-selected', cell: 'td', + locationLink: 'app-location-link', emptyListContainer: 'td.adf-no-content-container', emptyFolderDragAndDrop: '.adf-empty-list_template .adf-empty-folder', @@ -44,6 +54,7 @@ export class DataTable extends Component { head: ElementFinder = this.component.element(by.css(DataTable.selectors.head)); body: ElementFinder = this.component.element(by.css(DataTable.selectors.body)); cell = by.css(DataTable.selectors.cell); + locationLink = by.css(DataTable.selectors.locationLink); emptyList: ElementFinder = this.component.element(by.css(DataTable.selectors.emptyListContainer)); emptyFolderDragAndDrop: ElementFinder = this.component.element(by.css(DataTable.selectors.emptyFolderDragAndDrop)); emptyListTitle: ElementFinder = this.component.element(by.css(DataTable.selectors.emptyListTitle)); @@ -94,13 +105,16 @@ export class DataTable extends Component { return this.body.all(by.css(DataTable.selectors.row)); } + getSelectedRows(): ElementArrayFinder { + return this.body.all(by.css(DataTable.selectors.selectedRow)); + } + getNthRow(nth: number): ElementFinder { return this.getRows().get(nth - 1); } - getRowByContainingText(text: string): ElementFinder { - const locator = by.cssContainingText(DataTable.selectors.row, text); - return this.body.element(locator); + getRowByName(name: string): ElementFinder { + return this.body.element(by.cssContainingText(`.adf-data-table-cell`, name)); } countRows(): promise.Promise { @@ -108,18 +122,43 @@ export class DataTable extends Component { } // Navigation/selection methods - doubleClickOnRowByContainingText(text: string): promise.Promise { - const row = this.getRowByContainingText(text); - const dblClick = browser.actions().mouseMove(row).click().click(); + doubleClickOnItemName(name: string): promise.Promise { + const dblClick = browser.actions() + .mouseMove(this.getRowByName(name)) + .click() + .click(); return dblClick.perform(); } - clickOnRowByContainingText(text: string): promise.Promise { - const row = this.getRowByContainingText(text); - const click = browser.actions().mouseMove(row).click(); + clickOnItemName(name: string): promise.Promise { + return this.getRowByName(name).click(); + } - return click.perform(); + selectMultipleItems(names: string[]): promise.Promise { + return browser.actions().sendKeys(protractor.Key.COMMAND).perform() + .then(() => { + names.forEach(name => { + this.clickOnItemName(name); + }); + }) + .then(() => browser.actions().sendKeys(protractor.Key.NULL).perform()); + } + + clearSelection() { + this.getSelectedRows().count() + .then(count => { + if (count !== 0) { browser.refresh().then(() => this.waitForHeader()); } + }); + } + + getItemLocation(name: string) { + const rowLocator = by.cssContainingText(DataTable.selectors.row, name); + return this.body.element(rowLocator).element(this.locationLink); + } + + clickItemLocation(name: string) { + return this.getItemLocation(name).click(); } // empty state methods diff --git a/e2e/components/dialog/create-edit-folder-dialog.ts b/e2e/components/dialog/create-edit-folder-dialog.ts index c7caed104..a6d7f29e0 100644 --- a/e2e/components/dialog/create-edit-folder-dialog.ts +++ b/e2e/components/dialog/create-edit-folder-dialog.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, by, browser, protractor, ExpectedConditions as EC, promise } from 'protractor'; @@ -21,11 +29,11 @@ import { Component } from '../component'; export class CreateOrEditFolderDialog extends Component { private static selectors = { - root: '.mat-dialog-container', + root: 'adf-folder-dialog', title: '.mat-dialog-title', - nameInput: '.mat-dialog-container .mat-input-element[placeholder="Name"]', - descriptionTextArea: '.mat-dialog-container .mat-input-element[placeholder="Description"]', + nameInput: '.mat-input-element[placeholder="Name" i]', + descriptionTextArea: '.mat-input-element[placeholder="Description" i]', button: '.mat-dialog-actions button', validationMessage: '.mat-hint span' }; @@ -64,33 +72,27 @@ export class CreateOrEditFolderDialog extends Component { .catch(() => ''); } - enterName(name: string): CreateOrEditFolderDialog { - const { nameInput } = this; + enterName(name: string): promise.Promise { + return this.nameInput.clear() + .then(() => this.nameInput.sendKeys(name)) + .then(() => this); + } - nameInput.clear(); - nameInput.sendKeys(name); - - return this; + enterDescription(description: string): promise.Promise { + return this.descriptionTextArea.clear() + .then(() => { + browser.actions().click(this.descriptionTextArea).sendKeys(description).perform(); + }) + .then(() => this); } deleteNameWithBackspace(): promise.Promise { - const { nameInput } = this; - - return nameInput.clear() + return this.nameInput.clear() .then(() => { - return nameInput.sendKeys(' ', protractor.Key.CONTROL, 'a', protractor.Key.NULL, protractor.Key.BACK_SPACE); + return this.nameInput.sendKeys(' ', protractor.Key.CONTROL, 'a', protractor.Key.NULL, protractor.Key.BACK_SPACE); }); } - enterDescription(description: string): CreateOrEditFolderDialog { - const { descriptionTextArea } = this; - - descriptionTextArea.clear(); - descriptionTextArea.sendKeys(description); - - return this; - } - clickCreate() { return this.createButton.click(); } diff --git a/e2e/components/header/header.ts b/e2e/components/header/header.ts index 1ef2d47b5..be8d271d4 100644 --- a/e2e/components/header/header.ts +++ b/e2e/components/header/header.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, by } from 'protractor'; diff --git a/e2e/components/header/user-info.ts b/e2e/components/header/user-info.ts index cb9496a3d..da110f0a9 100644 --- a/e2e/components/header/user-info.ts +++ b/e2e/components/header/user-info.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, ElementArrayFinder, element, by, promise } from 'protractor'; diff --git a/e2e/components/login/login.ts b/e2e/components/login/login.ts index ceb89a61c..307059de3 100644 --- a/e2e/components/login/login.ts +++ b/e2e/components/login/login.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { by, ElementFinder, promise } from 'protractor'; diff --git a/e2e/components/menu/menu.ts b/e2e/components/menu/menu.ts index 536e4b05e..1f94354ec 100644 --- a/e2e/components/menu/menu.ts +++ b/e2e/components/menu/menu.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, ElementArrayFinder, by, browser, ExpectedConditions as EC, promise } from 'protractor'; @@ -47,7 +55,11 @@ export class Menu extends Component { return this.getItemByLabel(label).getAttribute('title'); } - clicktNthItem(nth: number): promise.Promise { + getItemsCount(): promise.Promise { + return this.items.count(); + } + + clickNthItem(nth: number): promise.Promise { return this.getNthItem(nth).click(); } diff --git a/e2e/components/pagination/pagination.ts b/e2e/components/pagination/pagination.ts index 24c36364d..7c52e3312 100644 --- a/e2e/components/pagination/pagination.ts +++ b/e2e/components/pagination/pagination.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, ElementArrayFinder, promise, by, browser, ExpectedConditions as EC } from 'protractor'; diff --git a/e2e/components/sidenav/sidenav.ts b/e2e/components/sidenav/sidenav.ts index 38149b9d4..406a5f8bb 100644 --- a/e2e/components/sidenav/sidenav.ts +++ b/e2e/components/sidenav/sidenav.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, ElementArrayFinder, by, promise } from 'protractor'; @@ -46,10 +54,7 @@ export class Sidenav extends Component { } isActiveByLabel(label: string): promise.Promise { - return this - .getLinkByLabel(label) - .getWebElement() - .then(element => element.getAttribute('class')) + return this.getLinkByLabel(label).getAttribute('class') .then(className => className.includes(Sidenav.selectors.activeLink.replace('.', ''))); } @@ -57,7 +62,7 @@ export class Sidenav extends Component { return this.component.element(by.cssContainingText(Sidenav.selectors.link, label)); } - navigateToLinkByLabel(label: string): promise.Promise { + navigateToLinkByLabel(label: string): promise.Promise { return this.getLinkByLabel(label).click(); } } diff --git a/e2e/components/toolbar/toolbar-actions.ts b/e2e/components/toolbar/toolbar-actions.ts index 23939ea84..5998cdedf 100644 --- a/e2e/components/toolbar/toolbar-actions.ts +++ b/e2e/components/toolbar/toolbar-actions.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, ElementArrayFinder, by, promise } from 'protractor'; diff --git a/e2e/components/toolbar/toolbar-breadcrumb.ts b/e2e/components/toolbar/toolbar-breadcrumb.ts index 8eac821f2..872782a6d 100644 --- a/e2e/components/toolbar/toolbar-breadcrumb.ts +++ b/e2e/components/toolbar/toolbar-breadcrumb.ts @@ -1,21 +1,29 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ -import { ElementFinder, ElementArrayFinder, by } from 'protractor'; +import { ElementFinder, ElementArrayFinder, by, promise } from 'protractor'; import { Menu } from '../menu/menu'; import { Component } from '../component'; @@ -34,4 +42,22 @@ export class ToolbarBreadcrumb extends Component { getNthItem(nth: number): ElementFinder { return this.items.get(nth - 1); } + + getItemsCount(): promise.Promise { + return this.items.count(); + } + + getFirstItemName(): promise.Promise { + return this.items.get(0).getAttribute('title'); + } + + getCurrentItem(): promise.Promise { + return this.getItemsCount() + .then(count => this.getNthItem(count)); + } + + getCurrentItemName(): promise.Promise { + return this.getCurrentItem() + .then(node => node.getAttribute('title')); + } } diff --git a/e2e/components/toolbar/toolbar.ts b/e2e/components/toolbar/toolbar.ts index e33a93251..ed0bbe4d5 100644 --- a/e2e/components/toolbar/toolbar.ts +++ b/e2e/components/toolbar/toolbar.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { ElementFinder, ElementArrayFinder, by } from 'protractor'; diff --git a/e2e/configs.ts b/e2e/configs.ts index 6c179fcd4..f0f304335 100644 --- a/e2e/configs.ts +++ b/e2e/configs.ts @@ -1,7 +1,32 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + export const BROWSER_RESOLUTION_WIDTH = 1200; export const BROWSER_RESOLUTION_HEIGHT = 800; -export const BROWSER_WAIT_TIMEOUT = 10000; +export const BROWSER_WAIT_TIMEOUT = 20000; // Application configs export const APP_HOST = 'http://localhost:3000'; diff --git a/e2e/pages/browsing-page.ts b/e2e/pages/browsing-page.ts index b5602458c..033859939 100644 --- a/e2e/pages/browsing-page.ts +++ b/e2e/pages/browsing-page.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { promise } from 'protractor'; diff --git a/e2e/pages/login-page.ts b/e2e/pages/login-page.ts index b4c1dbfb0..0a64257b0 100644 --- a/e2e/pages/login-page.ts +++ b/e2e/pages/login-page.ts @@ -1,20 +1,27 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ - import { browser, ExpectedConditions as EC, promise } from 'protractor'; import { LoginComponent } from '../components/components'; import { Page } from './page'; diff --git a/e2e/pages/logout-page.ts b/e2e/pages/logout-page.ts index ee2fac198..e250a9627 100644 --- a/e2e/pages/logout-page.ts +++ b/e2e/pages/logout-page.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { promise } from 'protractor'; diff --git a/e2e/pages/page.ts b/e2e/pages/page.ts index d925f70aa..2ac3b031b 100644 --- a/e2e/pages/page.ts +++ b/e2e/pages/page.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser, element, by, ElementFinder, promise, ExpectedConditions as EC } from 'protractor'; @@ -25,7 +33,8 @@ export abstract class Page { app: by.css('app-root'), layout: by.css('app-layout'), overlay: by.css('.cdk-overlay-container'), - snackBar: by.css('simple-snack-bar') + snackBar: by.css('simple-snack-bar'), + snackBarAction: by.css('.mat-simple-snackbar-action') }; public app: ElementFinder = element(this.locators.app); @@ -63,4 +72,8 @@ export abstract class Page { .then(() => this.snackBar.getText()) .catch(() => ''); } + + getSnackBarAction(): ElementFinder { + return this.snackBar.element(this.locators.snackBarAction); + } } diff --git a/e2e/pages/pages.ts b/e2e/pages/pages.ts index 4e1dbbc46..ce52fea89 100644 --- a/e2e/pages/pages.ts +++ b/e2e/pages/pages.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ export * from './browsing-page'; diff --git a/e2e/suites/actions/create-folder.test.ts b/e2e/suites/actions/create-folder.test.ts index f5639049e..b26b47686 100644 --- a/e2e/suites/actions/create-folder.test.ts +++ b/e2e/suites/actions/create-folder.test.ts @@ -1,23 +1,31 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { protractor, browser, by, ElementFinder } from 'protractor'; -import { APP_ROUTES, BROWSER_WAIT_TIMEOUT, SITE_VISIBILITY, SITE_ROLES } from '../../configs'; +import { SIDEBAR_LABELS, BROWSER_WAIT_TIMEOUT, SITE_VISIBILITY, SITE_ROLES } from '../../configs'; import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; import { CreateOrEditFolderDialog } from '../../components/dialog/create-edit-folder-dialog'; import { Utils } from '../../utilities/utils'; @@ -42,16 +50,13 @@ describe('Create folder', () => { const loginPage = new LoginPage(); const logoutPage = new LogoutPage(); - const personalFilesPage = new BrowsingPage(APP_ROUTES.PERSONAL_FILES); + const personalFilesPage = new BrowsingPage(); const createDialog = new CreateOrEditFolderDialog(); - const dataTable = personalFilesPage.dataTable; + const { dataTable } = personalFilesPage; function openCreateDialog(): any { - return personalFilesPage.sidenav - .openNewMenu() - .then((menu) => { - menu.clickMenuItem('Create folder'); - }) + return personalFilesPage.sidenav.openNewMenu() + .then(menu => menu.clickMenuItem('Create folder')) .then(() => createDialog.waitForDialogToOpen()); } @@ -61,25 +66,25 @@ describe('Create folder', () => { .then(() => apis.admin.nodes.createFolders([ folderName1 ], `Sites/${siteName}/documentLibrary`)) .then(() => apis.admin.sites.addSiteMember(siteName, username, SITE_ROLES.SITE_CONSUMER)) .then(() => apis.user.nodes.createFolders([ duplicateFolderName ], parent)) - .then(() => loginPage.load() - .then(() => loginPage.loginWith(username)) - .then(done)); + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); }); beforeEach(done => { - personalFilesPage.load() + personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES) .then(() => dataTable.waitForHeader()) .then(done); }); afterEach(done => { - browser.$('body').sendKeys(protractor.Key.ESCAPE).then(done); + browser.actions().sendKeys(protractor.Key.ESCAPE).perform().then(done); }); afterAll(done => { Promise .all([ - apis.admin.sites.deleteSite(siteName, true), + apis.admin.sites.deleteSite(siteName), apis.user.nodes.deleteNodes([ parent ]), logoutPage.load() ]) @@ -87,215 +92,188 @@ describe('Create folder', () => { }); it('option is enabled when having enough permissions', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => personalFilesPage.sidenav.openNewMenu() - .then((menu) => { - const isEnabled = menu.getItemByLabel('Create folder').getWebElement().isEnabled(); - - expect(isEnabled).toBe(true, 'Create folder is not enabled'); - }) - ); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => personalFilesPage.sidenav.openNewMenu()) + .then(menu => { + const isEnabled = menu.getItemByLabel('Create folder').isEnabled(); + expect(isEnabled).toBe(true, 'Create folder is not enabled'); + }); }); it('creates new folder with name', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => createDialog.enterName(folderName1).clickCreate()) - .then(() => createDialog.waitForDialogToClose()) - .then(() => dataTable.waitForHeader()) - .then(() => { - const isPresent = dataTable.getRowByContainingText(folderName1).isPresent(); - expect(isPresent).toBe(true, 'Folder not displayed in list view'); - }) - ); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => createDialog.enterName(folderName1)) + .then(() => createDialog.clickCreate()) + .then(() => createDialog.waitForDialogToClose()) + .then(() => dataTable.waitForHeader()) + .then(() => { + const isPresent = dataTable.getRowByName(folderName1).isPresent(); + expect(isPresent).toBe(true, 'Folder not displayed in list view'); + }); }); it('creates new folder with name and description', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => { - createDialog - .enterName(folderName2) - .enterDescription(folderDescription) - .clickCreate(); - }) - .then(() => createDialog.waitForDialogToClose()) - .then(() => dataTable.waitForHeader()) - .then(() => { - const isPresent = dataTable.getRowByContainingText(folderName2).isPresent(); - expect(isPresent).toBe(true, 'Folder not displayed in list view'); - }) - .then(() => { - apis.user.nodes.getNodeDescription(folderName2) - .then((description) => expect(description).toEqual(folderDescription)); - }) - ); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => createDialog.enterName(folderName2)) + .then(() => createDialog.enterDescription(folderDescription)) + .then(() => createDialog.clickCreate()) + .then(() => createDialog.waitForDialogToClose()) + .then(() => dataTable.waitForHeader()) + .then(() => { + const isPresent = dataTable.getRowByName(folderName2).isPresent(); + expect(isPresent).toBe(true, 'Folder not displayed in list view'); + }) + .then(() => { + expect(apis.user.nodes.getNodeDescription(folderName2)).toEqual(folderDescription); + }); }); it('enabled option tooltip', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => personalFilesPage.sidenav.openNewMenu() - .then(menu => { - const action = browser.actions().mouseMove(menu.getItemByLabel('Create folder')); - action.perform(); - - return menu; - }) - .then((menu) => { - const tooltip = menu.getItemTooltip('Create folder'); - expect(tooltip).toContain('Create new folder'); - }) - ); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => personalFilesPage.sidenav.openNewMenu()) + .then(menu => browser.actions().mouseMove(menu.getItemByLabel('Create folder')).perform() + .then(() => menu)) + .then(menu => { + expect(menu.getItemTooltip('Create folder')).toContain('Create new folder'); + }); }); it('option is disabled when not enough permissions', () => { - const fileLibrariesPage = new BrowsingPage(APP_ROUTES.FILE_LIBRARIES); + const fileLibrariesPage = new BrowsingPage(); - fileLibrariesPage.sidenav.navigateToLinkByLabel('File Libraries') - .then(() => fileLibrariesPage.dataTable.doubleClickOnRowByContainingText(siteName)) - .then(() => fileLibrariesPage.dataTable.doubleClickOnRowByContainingText(folderName1)) + fileLibrariesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES) + .then(() => fileLibrariesPage.dataTable.doubleClickOnItemName(siteName)) + .then(() => fileLibrariesPage.dataTable.doubleClickOnItemName(folderName1)) .then(() => fileLibrariesPage.sidenav.openNewMenu()) .then(menu => { - const isEnabled = menu.getItemByLabel('Create folder').getWebElement().isEnabled(); + const isEnabled = menu.getItemByLabel('Create folder').isEnabled(); expect(isEnabled).toBe(false, 'Create folder is not disabled'); }); }); it('disabled option tooltip', () => { - const fileLibrariesPage = new BrowsingPage(APP_ROUTES.FILE_LIBRARIES); + const fileLibrariesPage = new BrowsingPage(); - fileLibrariesPage.sidenav.navigateToLinkByLabel('File Libraries') - .then(() => fileLibrariesPage.dataTable.doubleClickOnRowByContainingText(siteName)) - .then(() => fileLibrariesPage.dataTable.doubleClickOnRowByContainingText(folderName1)) + fileLibrariesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES) + .then(() => fileLibrariesPage.dataTable.doubleClickOnItemName(siteName)) + .then(() => fileLibrariesPage.dataTable.doubleClickOnItemName(folderName1)) .then(() => fileLibrariesPage.sidenav.openNewMenu()) + .then(menu => browser.actions().mouseMove(menu.getItemByLabel('Create folder')).perform() + .then(() => menu)) .then(menu => { - const action = browser.actions().mouseMove(menu.getItemByLabel('Create folder')); - action.perform() - .then(() => { - const tooltip = menu.getItemTooltip('Create folder'); - expect(tooltip).toContain(`You can't create a folder here`); - }); + const tooltip = menu.getItemTooltip('Create folder'); + expect(tooltip).toContain(`You can't create a folder here`); }); }); it('dialog UI elements', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog().then(() => { + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => { const dialogTitle = createDialog.getTitle(); - const isFolderNameDisplayed = createDialog.nameInput.getWebElement().isDisplayed(); - const isDescriptionDisplayed = createDialog.descriptionTextArea.getWebElement().isDisplayed(); - const isCreateEnabled = createDialog.createButton.getWebElement().isEnabled(); - const isCancelEnabled = createDialog.cancelButton.getWebElement().isEnabled(); + const isFolderNameDisplayed = createDialog.nameInput.isDisplayed(); + const isDescriptionDisplayed = createDialog.descriptionTextArea.isDisplayed(); + const isCreateEnabled = createDialog.createButton.isEnabled(); + const isCancelEnabled = createDialog.cancelButton.isEnabled(); - expect(dialogTitle).toBe('Create new folder'); + expect(dialogTitle).toMatch('Create new folder'); expect(isFolderNameDisplayed).toBe(true, 'Name input is not displayed'); expect(isDescriptionDisplayed).toBe(true, 'Description field is not displayed'); expect(isCreateEnabled).toBe(false, 'Create button is not disabled'); expect(isCancelEnabled).toBe(true, 'Cancel button is not enabled'); - }) - ); + }); }); it('with empty folder name', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => { - createDialog.deleteNameWithBackspace(); - }) - .then(() => { - const isCreateEnabled = createDialog.createButton.getWebElement().isEnabled(); - const validationMessage = createDialog.getValidationMessage(); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => createDialog.deleteNameWithBackspace()) + .then(() => { + const isCreateEnabled = createDialog.createButton.isEnabled(); + const validationMessage = createDialog.getValidationMessage(); - expect(isCreateEnabled).toBe(false, 'Create button is enabled'); - expect(validationMessage).toMatch('Folder name is required'); - }) - ); + expect(isCreateEnabled).toBe(false, 'Create button is enabled'); + expect(validationMessage).toMatch('Folder name is required'); + }); }); it('with folder name ending with a dot "."', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => createDialog.enterName('folder-name.')) - .then((dialog) => { - const isCreateEnabled = dialog.createButton.getWebElement().isEnabled(); - const validationMessage = dialog.getValidationMessage(); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => createDialog.enterName('folder-name.')) + .then(dialog => { + const isCreateEnabled = dialog.createButton.isEnabled(); + const validationMessage = dialog.getValidationMessage(); - expect(isCreateEnabled).toBe(false, 'Create button is not disabled'); - expect(validationMessage).toMatch(`Folder name can't end with a period .`); - }) - ); + expect(isCreateEnabled).toBe(false, 'Create button is not disabled'); + expect(validationMessage).toMatch(`Folder name can't end with a period .`); + }); }); it('with folder name containing special characters', () => { const namesWithSpecialChars = [ 'a*a', 'a"a', 'aa', `a\\a`, 'a/a', 'a?a', 'a:a', 'a|a' ]; - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => { - namesWithSpecialChars.forEach(name => { - createDialog.enterName(name); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => namesWithSpecialChars.forEach(name => { + createDialog.enterName(name); - const isCreateEnabled = createDialog.createButton.getWebElement().isEnabled(); - const validationMessage = createDialog.getValidationMessage(); + const isCreateEnabled = createDialog.createButton.isEnabled(); + const validationMessage = createDialog.getValidationMessage(); - expect(isCreateEnabled).toBe(false, 'Create button is not disabled'); - expect(validationMessage).toContain(`Folder name can't contain these characters`); - }); - }) - ); + expect(isCreateEnabled).toBe(false, 'Create button is not disabled'); + expect(validationMessage).toContain(`Folder name can't contain these characters`); + })); }); it('with folder name containing only spaces', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => createDialog.enterName(' ')) - .then((dialog) => { - const isCreateEnabled = dialog.createButton.getWebElement().isEnabled(); - const validationMessage = dialog.getValidationMessage(); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => createDialog.enterName(' ')) + .then(dialog => { + const isCreateEnabled = dialog.createButton.isEnabled(); + const validationMessage = dialog.getValidationMessage(); - expect(isCreateEnabled).toBe(false, 'Create button is not disabled'); - expect(validationMessage).toMatch(`Folder name can't contain only spaces`); - }) - ); + expect(isCreateEnabled).toBe(false, 'Create button is not disabled'); + expect(validationMessage).toMatch(`Folder name can't contain only spaces`); + }); }); it('cancel folder creation', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => { - createDialog - .enterName('test') - .enterDescription('test description') - .clickCancel(); - }) - .then(() => expect(createDialog.component.isPresent()).not.toBe(true, 'dialog is not closed')) - ); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => createDialog.enterName('test')) + .then(() => createDialog.enterDescription('test description')) + .then(() => createDialog.clickCancel()) + .then(() => { + expect(createDialog.component.isPresent()).not.toBe(true, 'dialog is not closed'); + }); }); it('duplicate folder name', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => createDialog.enterName(duplicateFolderName).clickCreate()) - .then(() => { - personalFilesPage.getSnackBarMessage() - .then(message => { - expect(message).toEqual(`There's already a folder with this name. Try a different name.`); - expect(createDialog.component.isPresent()).toBe(true, 'dialog is not present'); - }); - }) - ); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => createDialog.enterName(duplicateFolderName)) + .then(() => createDialog.clickCreate()) + .then(() => personalFilesPage.getSnackBarMessage()) + .then(message => { + expect(message).toEqual(`There's already a folder with this name. Try a different name.`); + expect(createDialog.component.isPresent()).toBe(true, 'dialog is not present'); + }); }); it('trim ending spaces from folder name', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => openCreateDialog() - .then(() => createDialog.enterName(nameWithSpaces).clickCreate()) - .then(() => createDialog.waitForDialogToClose()) - .then(() => dataTable.waitForHeader()) - .then(() => { - const isPresent = dataTable.getRowByContainingText(nameWithSpaces.trim()).isPresent(); - expect(isPresent).toBe(true, 'Folder not displayed in list view'); - }) - ); + personalFilesPage.dataTable.doubleClickOnItemName(parent) + .then(() => openCreateDialog()) + .then(() => createDialog.enterName(nameWithSpaces)) + .then(() => createDialog.clickCreate()) + .then(() => createDialog.waitForDialogToClose()) + .then(() => dataTable.waitForHeader()) + .then(() => { + const isPresent = dataTable.getRowByName(nameWithSpaces.trim()).isPresent(); + expect(isPresent).toBe(true, 'Folder not displayed in list view'); + }); }); }); diff --git a/e2e/suites/actions/edit-folder.test.ts b/e2e/suites/actions/edit-folder.test.ts index 2e58b4d07..7a8826620 100644 --- a/e2e/suites/actions/edit-folder.test.ts +++ b/e2e/suites/actions/edit-folder.test.ts @@ -1,23 +1,31 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { protractor, element, browser, by, ElementFinder, promise } from 'protractor'; import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; -import { APP_ROUTES, SITE_VISIBILITY, SITE_ROLES } from '../../configs'; +import { SIDEBAR_LABELS, SITE_VISIBILITY, SITE_ROLES } from '../../configs'; import { RepoClient } from '../../utilities/repo-client/repo-client'; import { CreateOrEditFolderDialog } from '../../components/dialog/create-edit-folder-dialog'; import { Utils } from '../../utilities/utils'; @@ -44,42 +52,40 @@ describe('Edit folder', () => { const loginPage = new LoginPage(); const logoutPage = new LogoutPage(); - const personalFilesPage = new BrowsingPage(APP_ROUTES.PERSONAL_FILES); + const personalFilesPage = new BrowsingPage(); const editDialog = new CreateOrEditFolderDialog(); - const dataTable = personalFilesPage.dataTable; + const { dataTable } = personalFilesPage; const editButton = personalFilesPage.toolbar.actions.getButtonByTitleAttribute('Edit'); beforeAll(done => { - Promise - .all([ - apis.admin.people.createUser(username), - apis.admin.sites.createSite(siteName, SITE_VISIBILITY.PRIVATE) - .then(() => apis.admin.nodes.createFolders([ folderName ], `Sites/${siteName}/documentLibrary`)) - ]) + apis.admin.people.createUser(username) + .then(() => apis.admin.sites.createSite(siteName, SITE_VISIBILITY.PRIVATE)) + .then(() => apis.admin.nodes.createFolders([ folderName ], `Sites/${siteName}/documentLibrary`)) .then(() => apis.admin.sites.addSiteMember(siteName, username, SITE_ROLES.SITE_CONSUMER)) - .then(() => Promise.all([ - apis.user.nodes.createNodeWithProperties( folderName, '', folderDescription, parent ), - apis.user.nodes.createFolders([ folderNameToEdit, duplicateFolderName ], parent) - ])) - .then(() => loginPage.load() - .then(() => loginPage.loginWith(username)) - .then(done)); + + .then(() => apis.user.nodes.createNodeWithProperties( folderName, '', folderDescription, parent )) + .then(() => apis.user.nodes.createFolders([ folderNameToEdit, duplicateFolderName ], parent)) + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); }); beforeEach(done => { - personalFilesPage.load() + personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES) + .then(() => dataTable.waitForHeader()) + .then(() => dataTable.doubleClickOnItemName(parent)) .then(() => dataTable.waitForHeader()) .then(done); }); afterEach(done => { - browser.$('body').sendKeys(protractor.Key.ESCAPE).then(done); + browser.actions().sendKeys(protractor.Key.ESCAPE).perform().then(done); }); afterAll(done => { Promise .all([ - apis.admin.sites.deleteSite(siteName, true), + apis.admin.sites.deleteSite(siteName), apis.user.nodes.deleteNodes([ parent ]), logoutPage.load() ]) @@ -87,124 +93,98 @@ describe('Edit folder', () => { }); it('dialog UI defaults', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => dataTable.clickOnRowByContainingText(folderName) - .then(() => editButton.click()) - .then(() => { - expect(editDialog.getTitle()).toBe('Edit folder'); - expect(editDialog.nameInput.getWebElement().getAttribute('value')).toBe(folderName); - expect(editDialog.descriptionTextArea.getWebElement().getAttribute('value')).toBe(folderDescription); - expect(editDialog.updateButton.getWebElement().isEnabled()).toBe(true, 'upload button is not enabled'); - expect(editDialog.cancelButton.getWebElement().isEnabled()).toBe(true, 'cancel button is not enabled'); - }) - ); + dataTable.clickOnItemName(folderName) + .then(() => editButton.click()) + .then(() => { + expect(editDialog.getTitle()).toEqual('Edit folder'); + expect(editDialog.nameInput.getAttribute('value')).toBe(folderName); + expect(editDialog.descriptionTextArea.getAttribute('value')).toBe(folderDescription); + expect(editDialog.updateButton.isEnabled()).toBe(true, 'upload button is not enabled'); + expect(editDialog.cancelButton.isEnabled()).toBe(true, 'cancel button is not enabled'); + }); }); it('properties are modified when pressing OK', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => dataTable.clickOnRowByContainingText(folderNameToEdit) - .then(() => editButton.click()) - .then(() => { - editDialog - .enterName(folderNameEdited) - .enterDescription(folderDescriptionEdited) - .clickUpdate(); - }) - .then(() => editDialog.waitForDialogToClose()) - .then(() => dataTable.waitForHeader()) - .then(() => { - const isPresent = dataTable.getRowByContainingText(folderNameEdited).isPresent(); - expect(isPresent).toBe(true, 'Folder not displayed in list view'); - }) - .then(() => { - apis.user.nodes.getNodeDescription(folderNameEdited) - .then((description) => { - expect(description).toEqual(folderDescriptionEdited); - }); - }) - ); + dataTable.clickOnItemName(folderNameToEdit) + .then(() => editButton.click()) + .then(() => editDialog.waitForDialogToOpen()) + .then(() => editDialog.enterName(folderNameEdited)) + .then(() => editDialog.enterDescription(folderDescriptionEdited)) + .then(() => editDialog.clickUpdate()) + .then(() => editDialog.waitForDialogToClose()) + .then(() => dataTable.waitForHeader()) + .then(() => { + const isPresent = dataTable.getRowByName(folderNameEdited).isPresent(); + expect(isPresent).toBe(true, 'Folder not displayed in list view'); + }) + .then(() => { + expect(apis.user.nodes.getNodeDescription(folderNameEdited)).toEqual(folderDescriptionEdited); + }); }); it('with empty folder name', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => dataTable.clickOnRowByContainingText(folderName) - .then(() => editButton.click()) - .then(() => { - editDialog.deleteNameWithBackspace(); - }) - .then(() => { - expect(editDialog.updateButton.getWebElement().isEnabled()).toBe(false, 'upload button is not enabled'); - expect(editDialog.getValidationMessage()).toMatch('Folder name is required'); - }) - ); + dataTable.clickOnItemName(folderName) + .then(() => editButton.click()) + .then(() => editDialog.deleteNameWithBackspace()) + .then(() => { + expect(editDialog.updateButton.isEnabled()).toBe(false, 'upload button is not enabled'); + expect(editDialog.getValidationMessage()).toMatch('Folder name is required'); + }); }); it('with name with special characters', () => { const namesWithSpecialChars = [ 'a*a', 'a"a', 'aa', `a\\a`, 'a/a', 'a?a', 'a:a', 'a|a' ]; - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => dataTable.clickOnRowByContainingText(folderName) - .then(() => editButton.click()) - .then(() => { - namesWithSpecialChars.forEach(name => { - editDialog.enterName(name); + dataTable.clickOnItemName(folderName) + .then(() => editButton.click()) + .then(() => namesWithSpecialChars.forEach(name => { + editDialog.enterName(name); - expect(editDialog.updateButton.getWebElement().isEnabled()).toBe(false, 'upload button is not disabled'); - expect(editDialog.getValidationMessage()).toContain(`Folder name can't contain these characters`); - }); - }) - ); + expect(editDialog.updateButton.isEnabled()).toBe(false, 'upload button is not disabled'); + expect(editDialog.getValidationMessage()).toContain(`Folder name can't contain these characters`); + })); }); it('with name ending with a dot', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => dataTable.clickOnRowByContainingText(folderName) - .then(() => editButton.click()) - .then(() => editDialog.nameInput.sendKeys('.')) - .then(() => { - expect(editDialog.updateButton.getWebElement().isEnabled()).toBe(false, 'upload button is not enabled'); - expect(editDialog.getValidationMessage()).toMatch(`Folder name can't end with a period .`); - }) - ); + dataTable.clickOnItemName(folderName) + .then(() => editButton.click()) + .then(() => editDialog.nameInput.sendKeys('.')) + .then(() => { + expect(editDialog.updateButton.isEnabled()).toBe(false, 'upload button is not enabled'); + expect(editDialog.getValidationMessage()).toMatch(`Folder name can't end with a period .`); + }); }); it('Cancel button', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => dataTable.clickOnRowByContainingText(folderName) - .then(() => editButton.click()) - .then(() => editDialog.clickCancel()) - .then(() => { - expect(editDialog.component.isPresent()).not.toBe(true, 'dialog is not closed'); - }) - ); + dataTable.clickOnItemName(folderName) + .then(() => editButton.click()) + .then(() => editDialog.clickCancel()) + .then(() => { + expect(editDialog.component.isPresent()).not.toBe(true, 'dialog is not closed'); + }); }); it('with duplicate folder name', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => dataTable.clickOnRowByContainingText(folderName) - .then(() => editButton.click()) - .then(() => editDialog.enterName(duplicateFolderName).clickUpdate()) - .then(() => { - personalFilesPage.getSnackBarMessage() - .then(message => { - expect(message).toEqual(`There's already a folder with this name. Try a different name.`); - expect(editDialog.component.isPresent()).toBe(true, 'dialog is not present'); - }); - }) - ); + dataTable.clickOnItemName(folderName) + .then(() => editButton.click()) + .then(() => editDialog.enterName(duplicateFolderName)) + .then(() => editDialog.clickUpdate()) + .then(() => personalFilesPage.getSnackBarMessage()) + .then(message => { + expect(message).toEqual(`There's already a folder with this name. Try a different name.`); + expect(editDialog.component.isPresent()).toBe(true, 'dialog is not present'); + }); }); it('trim ending spaces', () => { - personalFilesPage.dataTable.doubleClickOnRowByContainingText(parent) - .then(() => dataTable.clickOnRowByContainingText(folderName) - .then(() => editButton.click()) - .then(() => editDialog.nameInput.sendKeys(' ')) - .then(() => editDialog.clickUpdate()) - .then(() => editDialog.waitForDialogToClose()) - .then(() => { - expect(personalFilesPage.snackBar.isPresent()).not.toBe(true, 'notification appears'); - expect(dataTable.getRowByContainingText(folderName).isPresent()).toBe(true, 'Folder not displayed in list view'); - }) - ); + dataTable.clickOnItemName(folderName) + .then(() => editButton.click()) + .then(() => editDialog.nameInput.sendKeys(' ')) + .then(() => editDialog.clickUpdate()) + .then(() => editDialog.waitForDialogToClose()) + .then(() => { + expect(personalFilesPage.snackBar.isPresent()).not.toBe(true, 'notification appears'); + expect(dataTable.getRowByName(folderName).isPresent()).toBe(true, 'Folder not displayed in list view'); + }); }); }); diff --git a/e2e/suites/actions/permanently-delete.test.ts b/e2e/suites/actions/permanently-delete.test.ts new file mode 100644 index 000000000..7cf88a95f --- /dev/null +++ b/e2e/suites/actions/permanently-delete.test.ts @@ -0,0 +1,113 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, protractor, promise } from 'protractor'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { APP_ROUTES, SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs'; +import { RepoClient } from '../../utilities/repo-client/repo-client'; +import { Utils } from '../../utilities/utils'; + +describe('Permanently delete from Trash', () => { + const username = `user-${Utils.random()}`; + + const file1 = `file-${Utils.random()}.txt`; + const file2 = `file-${Utils.random()}.txt`; + let filesIds; + + const folder1 = `folder-${Utils.random()}`; + const folder2 = `folder-${Utils.random()}`; + let foldersIds; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, username) + }; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const trashPage = new BrowsingPage(); + const { dataTable } = trashPage; + const { toolbar } = trashPage; + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => apis.user.nodes.createFiles([ file1, file2 ])) + .then(resp => filesIds = resp.data.list.entries.map(entries => entries.entry.id)) + .then(() => apis.user.nodes.createFolders([ folder1, folder2 ])) + .then(resp => foldersIds = resp.data.list.entries.map(entries => entries.entry.id)) + + .then(() => apis.user.nodes.deleteNodesById(filesIds, false)) + .then(() => apis.user.nodes.deleteNodesById(foldersIds, false)) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + Promise.all([ + apis.admin.trashcan.emptyTrash(), + logoutPage.load() + ]) + .then(done); + }); + + it('delete file', () => { + dataTable.clickOnItemName(file1) + .then(() => toolbar.actions.getButtonByTitleAttribute('Permanently delete').click()) + .then(() => trashPage.getSnackBarMessage()) + .then(text => { + expect(text).toBe(`${file1} deleted`); + expect(dataTable.getRowByName(file1).isPresent()).toBe(false, 'Item was not deleted'); + }); + }); + + it('delete folder', () => { + dataTable.clickOnItemName(folder1) + .then(() => toolbar.actions.getButtonByTitleAttribute('Permanently delete').click()) + .then(() => trashPage.getSnackBarMessage()) + .then(text => { + expect(text).toBe(`${folder1} deleted`); + expect(dataTable.getRowByName(folder1).isPresent()).toBe(false, 'Item was not deleted'); + }); + }); + + it('delete multiple items', () => { + dataTable.selectMultipleItems([ file2, folder2 ]) + .then(() => toolbar.actions.getButtonByTitleAttribute('Permanently delete').click()) + .then(() => trashPage.getSnackBarMessage()) + .then(text => { + expect(text).toBe(`2 items deleted`); + expect(dataTable.getRowByName(file2).isPresent()).toBe(false, 'Item was not deleted'); + expect(dataTable.getRowByName(folder2).isPresent()).toBe(false, 'Item was not deleted'); + }); + }); +}); diff --git a/e2e/suites/actions/restore.test.ts b/e2e/suites/actions/restore.test.ts new file mode 100644 index 000000000..179408cb5 --- /dev/null +++ b/e2e/suites/actions/restore.test.ts @@ -0,0 +1,147 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, protractor, promise } from 'protractor'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { APP_ROUTES, SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs'; +import { RepoClient } from '../../utilities/repo-client/repo-client'; +import { Utils } from '../../utilities/utils'; + +describe('Restore from Trash', () => { + const username = `user-${Utils.random()}`; + + const file1 = `file-${Utils.random()}.txt`; + const file2 = `file-${Utils.random()}.txt`; + const file3 = `file-${Utils.random()}.txt`; + let filesIds; + + const folder1 = `folder-${Utils.random()}`; + const folder2 = `folder-${Utils.random()}`; + let foldersIds; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, username) + }; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const trashPage = new BrowsingPage(); + const personalFilesPage = new BrowsingPage(); + const { dataTable } = trashPage; + const { toolbar } = trashPage; + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => apis.user.nodes.createFiles([ file1, file2, file3 ])) + .then(resp => filesIds = resp.data.list.entries.map(entries => entries.entry.id)) + .then(() => apis.user.nodes.createFolders([ folder1, folder2 ])) + .then(resp => foldersIds = resp.data.list.entries.map(entries => entries.entry.id)) + + .then(() => apis.user.nodes.deleteNodesById(filesIds, false)) + .then(() => apis.user.nodes.deleteNodesById(foldersIds, false)) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + Promise.all([ + apis.user.nodes.deleteNodesById(filesIds), + apis.user.nodes.deleteNodesById(foldersIds), + apis.admin.trashcan.emptyTrash(), + logoutPage.load() + ]) + .then(done); + }); + + it('restore file', () => { + dataTable.clickOnItemName(file1) + .then(() => toolbar.actions.getButtonByTitleAttribute('Restore').click()) + .then(() => trashPage.getSnackBarMessage()) + .then(text => { + expect(text).toContain(`${file1} restored`); + expect(text).toContain(`View`); + expect(dataTable.getRowByName(file1).isPresent()).toBe(false, 'Item was not removed from list'); + }) + .then(() => personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES)) + .then(() => personalFilesPage.dataTable.waitForHeader()) + .then(() => { + expect(personalFilesPage.dataTable.getRowByName(file1).isPresent()).toBe(true, 'Item not displayed in list'); + }); + }); + + it('restore folder', () => { + dataTable.clickOnItemName(folder1) + .then(() => toolbar.actions.getButtonByTitleAttribute('Restore').click()) + .then(() => trashPage.getSnackBarMessage()) + .then(text => { + expect(text).toContain(`${folder1} restored`); + expect(text).toContain(`View`); + expect(dataTable.getRowByName(folder1).isPresent()).toBe(false, 'Item was not removed from list'); + }) + .then(() => personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES)) + .then(() => personalFilesPage.dataTable.waitForHeader()) + .then(() => { + expect(personalFilesPage.dataTable.getRowByName(folder1).isPresent()).toBe(true, 'Item not displayed in list'); + }); + }); + + it('restore multiple items', () => { + dataTable.selectMultipleItems([ file2, folder2 ]) + .then(() => toolbar.actions.getButtonByTitleAttribute('Restore').click()) + .then(() => trashPage.getSnackBarMessage()) + .then(text => { + expect(text).toContain(`Restore successful`); + expect(text).not.toContain(`View`); + expect(dataTable.getRowByName(file2).isPresent()).toBe(false, 'Item was not removed from list'); + expect(dataTable.getRowByName(folder2).isPresent()).toBe(false, 'Item was not removed from list'); + }) + .then(() => personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES)) + .then(() => personalFilesPage.dataTable.waitForHeader()) + .then(() => { + expect(personalFilesPage.dataTable.getRowByName(file2).isPresent()).toBe(true, 'Item not displayed in list'); + expect(personalFilesPage.dataTable.getRowByName(folder2).isPresent()).toBe(true, 'Item not displayed in list'); + }); + }); + + it('View from notification', () => { + dataTable.clickOnItemName(file3) + .then(() => toolbar.actions.getButtonByTitleAttribute('Restore').click()) + .then(() => trashPage.getSnackBarAction().click()) + .then(() => personalFilesPage.dataTable.waitForHeader()) + .then(() => { + expect(personalFilesPage.sidenav.isActiveByLabel('Personal Files')).toBe(true, 'Personal Files sidebar link not active'); + expect(browser.getCurrentUrl()).toContain(APP_ROUTES.PERSONAL_FILES); + }); + }); +}); diff --git a/e2e/suites/actions/toolbar-multiple-selection.test.ts b/e2e/suites/actions/toolbar-multiple-selection.test.ts new file mode 100644 index 000000000..7a0f00ab8 --- /dev/null +++ b/e2e/suites/actions/toolbar-multiple-selection.test.ts @@ -0,0 +1,535 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, protractor, promise } from 'protractor'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { APP_ROUTES, SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs'; +import { RepoClient } from '../../utilities/repo-client/repo-client'; +import { Utils } from '../../utilities/utils'; + +describe('Toolbar actions - multiple selection : ', () => { + const user1 = `user-${Utils.random()}`; + const user2 = `user-${Utils.random()}`; + + const file1 = `file-${Utils.random()}.txt`; + let file1Id; + const file2 = `file-${Utils.random()}.txt`; + let file2Id; + + const folder1 = `folder-${Utils.random()}`; + let folder1Id; + const folder2 = `folder-${Utils.random()}`; + let folder2Id; + + const fileForDelete1 = `file-${Utils.random()}.txt`; let fileForDelete1Id; + const fileForDelete2 = `file-${Utils.random()}.txt`; let fileForDelete2Id; + const folderForDelete1 = `folder-${Utils.random()}`; let folderForDelete1Id; + const folderForDelete2 = `folder-${Utils.random()}`; let folderForDelete2Id; + + const siteName = `site-private-${Utils.random()}`; + const file1Admin = `file-${Utils.random()}.txt`; + const file2Admin = `file-${Utils.random()}.txt`; + const folder1Admin = `folder-${Utils.random()}`; + const folder2Admin = `folder-${Utils.random()}`; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(user1, user1) + }; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const page = new BrowsingPage(); + const { dataTable } = page; + const { toolbar } = page; + + beforeAll(done => { + apis.admin.people.createUser(user1) + .then(() => apis.user.nodes.createFiles([ file1 ]).then(resp => file1Id = resp.data.entry.id)) + .then(() => apis.user.nodes.createFiles([ file2 ]).then(resp => file2Id = resp.data.entry.id)) + .then(() => apis.user.nodes.createFolders([ folder1 ]).then(resp => folder1Id = resp.data.entry.id)) + .then(() => apis.user.nodes.createFolders([ folder2 ]).then(resp => folder2Id = resp.data.entry.id)) + .then(() => apis.user.nodes.createFiles([ fileForDelete1 ]).then(resp => fileForDelete1Id = resp.data.entry.id)) + .then(() => apis.user.nodes.createFiles([ fileForDelete2 ]).then(resp => fileForDelete2Id = resp.data.entry.id)) + .then(() => apis.user.nodes.createFolders([ folderForDelete1 ]).then(resp => folderForDelete1Id = resp.data.entry.id)) + .then(() => apis.user.nodes.createFolders([ folderForDelete2 ]).then(resp => folderForDelete2Id = resp.data.entry.id)) + + .then(() => apis.user.shared.shareFileById(file1Id)) + .then(() => apis.user.shared.shareFileById(file2Id)) + + .then(() => apis.user.favorites.addFavoriteById('file', file1Id)) + .then(() => apis.user.favorites.addFavoriteById('file', file2Id)) + .then(() => apis.user.favorites.addFavoriteById('folder', folder1Id)) + .then(() => apis.user.favorites.addFavoriteById('folder', folder2Id)) + + .then(() => apis.user.nodes.deleteNodeById(fileForDelete1Id, false)) + .then(() => apis.user.nodes.deleteNodeById(fileForDelete2Id, false)) + .then(() => apis.user.nodes.deleteNodeById(folderForDelete1Id, false)) + .then(() => apis.user.nodes.deleteNodeById(folderForDelete2Id, false)) + + .then(done); + }); + + afterAll(done => { + Promise.all([ + apis.user.nodes.deleteNodeById(file1Id), + apis.user.nodes.deleteNodeById(file2Id), + apis.user.nodes.deleteNodeById(folder1Id), + apis.user.nodes.deleteNodeById(folder2Id), + + apis.user.trashcan.permanentlyDelete(fileForDelete1Id), + apis.user.trashcan.permanentlyDelete(fileForDelete2Id), + apis.user.trashcan.permanentlyDelete(folderForDelete1Id), + apis.user.trashcan.permanentlyDelete(folderForDelete2Id), + + logoutPage.load() + ]) + .then(done); + }); + + xit(''); + + describe('Personal Files', () => { + beforeAll(done => { + loginPage.load() + .then(() => loginPage.loginWith(user1)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + logoutPage.load().then(done); + }); + + it('correct actions appear when multiple files are selected', () => { + dataTable.selectMultipleItems([file1, file2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when multiple folders are selected', () => { + dataTable.selectMultipleItems([folder1, folder2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when both files and folders are selected', () => { + dataTable.selectMultipleItems([file1, file2, folder1, folder2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + }); + + describe('File Libraries', () => { + beforeAll(done => { + apis.admin.sites.createSite(siteName, SITE_VISIBILITY.PUBLIC) + .then(() => apis.admin.people.createUser(user2)) + .then(() => apis.admin.sites.addSiteMember(siteName, user1, SITE_ROLES.SITE_MANAGER)) + .then(() => apis.admin.sites.addSiteMember(siteName, user2, SITE_ROLES.SITE_CONSUMER)) + .then(() => apis.admin.nodes.createFiles([ file1Admin, file2Admin ], `Sites/${siteName}/documentLibrary`)) + .then(() => apis.admin.nodes.createFolders([ folder1Admin, folder2Admin ], `Sites/${siteName}/documentLibrary`)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES) + .then(() => dataTable.waitForHeader()) + .then(() => dataTable.doubleClickOnItemName(siteName)) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + apis.admin.sites.deleteSite(siteName).then(done); + }); + + xit(''); + + describe('user is Manager', () => { + beforeAll(done => { + loginPage.load() + .then(() => loginPage.loginWith(user1)) + .then(done); + }); + + afterAll(done => { + logoutPage.load().then(done); + }); + + it('correct actions appear when multiple files are selected', () => { + dataTable.selectMultipleItems([file1Admin, file2Admin]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when multiple folders are selected', () => { + dataTable.selectMultipleItems([folder1Admin, folder2Admin]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when both files and folders are selected', () => { + dataTable.selectMultipleItems([file1Admin, file2Admin, folder1Admin, folder2Admin]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + }); + + describe('user is Consumer', () => { + beforeAll(done => { + loginPage.load() + .then(() => loginPage.loginWith(user2)) + .then(done); + }); + + afterAll(done => { + logoutPage.load().then(done); + }); + + it('correct actions appear when multiple files are selected', () => { + dataTable.selectMultipleItems([file1Admin, file2Admin]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(false, `Delete is displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(false, `Move is displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when multiple folders are selected', () => { + dataTable.selectMultipleItems([folder1Admin, folder2Admin]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(false, `Delete is displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(false, `Move is displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when both files and folders are selected', () => { + dataTable.selectMultipleItems([file1Admin, file2Admin, folder1Admin, folder2Admin]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(false, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(false, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + }); + }); + + describe('Shared Files', () => { + beforeAll(done => { + loginPage.load() + .then(() => loginPage.loginWith(user1)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + logoutPage.load().then(done); + }); + + it('correct actions appear when multiple files are selected', () => { + dataTable.selectMultipleItems([file1, file2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + }); + + describe('Recent Files', () => { + beforeAll(done => { + loginPage.load() + .then(() => loginPage.loginWith(user1)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + logoutPage.load().then(done); + }); + + it('correct actions appear when multiple files are selected', () => { + dataTable.selectMultipleItems([file1, file2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + }); + + describe('Favorites', () => { + beforeAll(done => { + loginPage.load() + .then(() => loginPage.loginWith(user1)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + logoutPage.load().then(done); + }); + + it('correct actions appear when multiple files are selected', () => { + dataTable.selectMultipleItems([file1, file2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when multiple folders are selected', () => { + dataTable.selectMultipleItems([folder1, folder2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when both files and folders are selected', () => { + dataTable.selectMultipleItems([file1, file2, folder1, folder2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('View')).toBe(false, 'View is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Download')).toBe(true, 'Download is not displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, 'Edit is displayed for selected files'); + }) + .then(() => toolbar.actions.openMoreMenu()) + .then(menu => { + expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for selected files`); + expect(menu.isMenuItemPresent('Delete')).toBe(true, `Delete is not displayed for selected files`); + expect(menu.isMenuItemPresent('Move')).toBe(true, `Move is not displayed for selected files`); + expect(menu.isMenuItemPresent('Favorite')).toBe(true, `Favorite is not displayed for selected files`); + }) + .then(() => browser.$('body').click()) + .then(() => dataTable.clearSelection()); + }); + }); + + describe('Trash', () => { + beforeAll(done => { + loginPage.load() + .then(() => loginPage.loginWith(user1)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + logoutPage.load().then(done); + }); + + it('correct actions appear when multiple files are selected', () => { + dataTable.selectMultipleItems([fileForDelete1, fileForDelete2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('Permanently delete')) + .toBe(true, 'Permanently delete is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed for selected files'); + }) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when multiple folders are selected', () => { + dataTable.selectMultipleItems([folderForDelete1, folderForDelete2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('Permanently delete')) + .toBe(true, 'Permanently delete is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed for selected files'); + }) + .then(() => dataTable.clearSelection()); + }); + + it('correct actions appear when both files and folders are selected', () => { + dataTable.selectMultipleItems([fileForDelete1, fileForDelete2, folderForDelete1, folderForDelete2]) + .then(() => { + expect(toolbar.actions.isButtonPresent('Permanently delete')) + .toBe(true, 'Permanently delete is displayed for selected files'); + expect(toolbar.actions.isButtonPresent('Restore')).toBe(true, 'Restore is not displayed for selected files'); + }) + .then(() => dataTable.clearSelection()); + }); + }); +}); diff --git a/e2e/suites/actions/toolbar-single-selection.test.ts b/e2e/suites/actions/toolbar-single-selection.test.ts index 99bf8d0eb..9721ef5d0 100644 --- a/e2e/suites/actions/toolbar-single-selection.test.ts +++ b/e2e/suites/actions/toolbar-single-selection.test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser, protractor, promise } from 'protractor'; @@ -49,15 +57,18 @@ describe('Toolbar actions - single selection : ', () => { const loginPage = new LoginPage(); const logoutPage = new LogoutPage(); const page = new BrowsingPage(); - const { dataTable } = page; - const { toolbar } = page; + const { dataTable, toolbar } = page; beforeAll(done => { apis.admin.people.createUser(username) - .then(() => apis.user.nodes.createFiles([ fileUser ]).then(resp => { fileUserId = resp.data.entry.id; })) - .then(() => apis.user.nodes.createFiles([ fileForDelete ]).then(resp => { fileForDeleteId = resp.data.entry.id; })) - .then(() => apis.user.nodes.createFolders([ folderForDelete ]).then((resp) => { folderForDeleteId = resp.data.entry.id; })) - .then(() => apis.user.nodes.createFolders([ folderUser ]).then(resp => { folderUserId = resp.data.entry.id; })) + .then(() => apis.user.nodes.createFiles([ fileUser ])) + .then(resp => fileUserId = resp.data.entry.id) + .then(() => apis.user.nodes.createFiles([ fileForDelete ])) + .then(resp => fileForDeleteId = resp.data.entry.id) + .then(() => apis.user.nodes.createFolders([ folderForDelete ])) + .then(resp => folderForDeleteId = resp.data.entry.id) + .then(() => apis.user.nodes.createFolders([ folderUser ])) + .then(resp => folderUserId = resp.data.entry.id) .then(() => apis.user.shared.shareFileById(fileUserId)) .then(() => apis.user.favorites.addFavoriteById('file', fileUserId)) .then(() => apis.user.favorites.addFavoriteById('folder', folderUserId)) @@ -97,28 +108,26 @@ describe('Toolbar actions - single selection : ', () => { }); it('actions are displayed when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileUser) + dataTable.clickOnItemName(fileUser) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${fileUser}`); }); }); it('actions are displayed when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderUser) + dataTable.clickOnItemName(folderUser) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${folderUser}`); }); }); it('correct actions appear when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileUser) + dataTable.clickOnItemName(fileUser) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(true, `View is not displayed for ${fileUser}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${fileUser}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, `Edit is displayed for ${fileUser}`); - }); - - dataTable.clickOnRowByContainingText(fileUser) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${fileUser}`); @@ -130,14 +139,12 @@ describe('Toolbar actions - single selection : ', () => { }); it('correct actions appear when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderUser) + dataTable.clickOnItemName(folderUser) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(false, `View is displayed for ${folderUser}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not enabled for ${folderUser}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(true, `Edit is not displayed for ${folderUser}`); - }); - - dataTable.clickOnRowByContainingText(folderUser) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${folderUser}`); @@ -163,11 +170,15 @@ describe('Toolbar actions - single selection : ', () => { beforeEach(done => { page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FILE_LIBRARIES) .then(() => dataTable.waitForHeader()) - .then(() => dataTable.doubleClickOnRowByContainingText(siteName)) + .then(() => dataTable.doubleClickOnItemName(siteName)) .then(() => dataTable.waitForHeader()) .then(done); }); + afterAll(done => { + apis.admin.sites.deleteSite(siteName).then(done); + }); + xit(''); describe('user is Manager', () => { @@ -186,28 +197,26 @@ describe('Toolbar actions - single selection : ', () => { }); it('actions are displayed when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileAdmin) + dataTable.clickOnItemName(fileAdmin) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${fileAdmin}`); }); }); it('actions are displayed when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderAdmin) + dataTable.clickOnItemName(folderAdmin) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${folderAdmin}`); }); }); it('correct actions appear when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileAdmin) + dataTable.clickOnItemName(fileAdmin) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(true, `View is not displayed for ${fileAdmin}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${fileAdmin}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, `Edit is displayed for ${fileAdmin}`); - }); - - dataTable.clickOnRowByContainingText(fileAdmin) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${fileAdmin}`); @@ -219,14 +228,12 @@ describe('Toolbar actions - single selection : ', () => { }); it('correct actions appear when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderAdmin) + dataTable.clickOnItemName(folderAdmin) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(false, `View is displayed for ${folderAdmin}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not enabled for ${folderAdmin}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(true, `Edit is not displayed for ${folderAdmin}`); - }); - - dataTable.clickOnRowByContainingText(folderAdmin) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${folderAdmin}`); @@ -254,28 +261,26 @@ describe('Toolbar actions - single selection : ', () => { }); it('actions are displayed when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileAdmin) + dataTable.clickOnItemName(fileAdmin) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${fileAdmin}`); }); }); it('actions are displayed when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderAdmin) + dataTable.clickOnItemName(folderAdmin) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${folderAdmin}`); }); }); it('correct actions appear when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileAdmin) + dataTable.clickOnItemName(fileAdmin) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(true, `View is not displayed for ${fileAdmin}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${fileAdmin}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, `Edit is displayed for ${fileAdmin}`); - }); - - dataTable.clickOnRowByContainingText(fileAdmin) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${fileAdmin}`); @@ -287,14 +292,12 @@ describe('Toolbar actions - single selection : ', () => { }); it('correct actions appear when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderAdmin) + dataTable.clickOnItemName(folderAdmin) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(false, `View is displayed for ${folderAdmin}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not enabled for ${folderAdmin}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, `Edit is displayed for ${folderAdmin}`); - }); - - dataTable.clickOnRowByContainingText(folderAdmin) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${folderAdmin}`); @@ -329,21 +332,19 @@ describe('Toolbar actions - single selection : ', () => { }); it('actions are displayed when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileUser) + dataTable.clickOnItemName(fileUser) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${fileUser}`); }); }); it('correct actions appear when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileUser) + dataTable.clickOnItemName(fileUser) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(true, `View is not displayed for ${fileUser}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${fileUser}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, `Edit is displayed for ${fileUser}`); - }); - - dataTable.clickOnRowByContainingText(fileUser) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${fileUser}`); @@ -377,21 +378,19 @@ describe('Toolbar actions - single selection : ', () => { }); it('actions are displayed when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileUser) + dataTable.clickOnItemName(fileUser) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${fileUser}`); }); }); it('correct actions appear when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileUser) + dataTable.clickOnItemName(fileUser) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(true, `View is not displayed for ${fileUser}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${fileUser}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, `Edit is displayed for ${fileUser}`); - }); - - dataTable.clickOnRowByContainingText(fileUser) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${fileUser}`); @@ -425,28 +424,26 @@ describe('Toolbar actions - single selection : ', () => { }); it('actions are displayed when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileUser) + dataTable.clickOnItemName(fileUser) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${fileUser}`); }); }); it('actions are displayed when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderUser) + dataTable.clickOnItemName(folderUser) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${folderUser}`); }); }); it('correct actions appear when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileUser) + dataTable.clickOnItemName(fileUser) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(true, `View is not displayed for ${fileUser}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not displayed for ${fileUser}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(false, `Edit is displayed for ${fileUser}`); - }); - - dataTable.clickOnRowByContainingText(fileUser) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${fileUser}`); @@ -458,14 +455,12 @@ describe('Toolbar actions - single selection : ', () => { }); it('correct actions appear when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderUser) + dataTable.clickOnItemName(folderUser) .then(() => { expect(toolbar.actions.isButtonPresent('View')).toBe(false, `View is displayed for ${folderUser}`); expect(toolbar.actions.isButtonPresent('Download')).toBe(true, `Download is not enabled for ${folderUser}`); expect(toolbar.actions.isButtonPresent('Edit')).toBe(true, `Edit is not displayed for ${folderUser}`); - }); - - dataTable.clickOnRowByContainingText(folderUser) + }) .then(() => toolbar.actions.openMoreMenu()) .then(menu => { expect(menu.isMenuItemPresent('Copy')).toBe(true, `Copy is not displayed for ${folderUser}`); @@ -506,21 +501,21 @@ describe('Toolbar actions - single selection : ', () => { }); it('actions are displayed when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileForDelete) + dataTable.clickOnItemName(fileForDelete) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${fileForDelete}`); }); }); it('actions are displayed when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderForDelete) + dataTable.clickOnItemName(folderForDelete) .then(() => { expect(toolbar.actions.isEmpty()).toBe(false, `actions not displayed for ${folderForDelete}`); }); }); it('correct actions appear when a file is selected', () => { - dataTable.clickOnRowByContainingText(fileForDelete) + dataTable.clickOnItemName(fileForDelete) .then(() => { expect(toolbar.actions.isButtonPresent('Permanently delete')) .toBe(true, `Permanently delete is not displayed for ${fileForDelete}`); @@ -529,7 +524,7 @@ describe('Toolbar actions - single selection : ', () => { }); it('correct actions appear when a folder is selected', () => { - dataTable.clickOnRowByContainingText(folderForDelete) + dataTable.clickOnItemName(folderForDelete) .then(() => { expect(toolbar.actions.isButtonPresent('Permanently delete')) .toBe(true, `Permanently delete is displayed for ${folderForDelete}`); diff --git a/e2e/suites/application/page-titles.test.ts b/e2e/suites/application/page-titles.test.ts index 498913ee6..69ee99f2e 100644 --- a/e2e/suites/application/page-titles.test.ts +++ b/e2e/suites/application/page-titles.test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser } from 'protractor'; @@ -49,7 +57,7 @@ describe('Page titles', () => { loginPage.load() .then(() => loginPage.loginWithAdmin()) .then(() => page.signOut()) - .then(() => browser.driver.navigate().back()) + .then(() => browser.navigate().back()) .then(() => { expect(browser.getTitle()).toContain('Sign in'); }); diff --git a/e2e/suites/authentication/login.test.ts b/e2e/suites/authentication/login.test.ts index 80fa54a38..50f976259 100644 --- a/e2e/suites/authentication/login.test.ts +++ b/e2e/suites/authentication/login.test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser } from 'protractor'; @@ -121,7 +129,7 @@ describe('Login', () => { loginPage .loginWith(username) - .then(() => browser.driver.navigate().back()) + .then(() => browser.navigate().back()) .then(() => { expect(browser.getCurrentUrl()).toContain(APP_ROUTES.PERSONAL_FILES); }); diff --git a/e2e/suites/authentication/logout.test.ts b/e2e/suites/authentication/logout.test.ts index 773f961a0..4e4a78212 100644 --- a/e2e/suites/authentication/logout.test.ts +++ b/e2e/suites/authentication/logout.test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser } from 'protractor'; @@ -58,7 +66,7 @@ describe('Logout', () => { it('redirects to Login page when pressing browser Back after logout', () => { page.signOut() - .then(() => browser.driver.navigate().back()) + .then(() => browser.navigate().back()) .then(() => { expect(browser.getCurrentUrl()).toContain(APP_ROUTES.LOGIN); }); diff --git a/e2e/suites/list-views/empty-list.test.ts b/e2e/suites/list-views/empty-list.test.ts index 223c8588e..5e20cb87f 100644 --- a/e2e/suites/list-views/empty-list.test.ts +++ b/e2e/suites/list-views/empty-list.test.ts @@ -1,22 +1,28 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ -import { browser, by } from 'protractor'; - import { APP_ROUTES, SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs'; import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; import { Utils } from '../../utilities/utils'; diff --git a/e2e/suites/list-views/favorites.test.ts b/e2e/suites/list-views/favorites.test.ts index 57e7dd0fe..8073b7d96 100644 --- a/e2e/suites/list-views/favorites.test.ts +++ b/e2e/suites/list-views/favorites.test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser, by } from 'protractor'; @@ -40,6 +48,7 @@ describe('Favorites', () => { const logoutPage = new LogoutPage(); const favoritesPage = new BrowsingPage(); const { dataTable } = favoritesPage; + const { breadcrumb } = favoritesPage.toolbar; beforeAll(done => { apis.admin.people.createUser(username) @@ -64,7 +73,7 @@ describe('Favorites', () => { afterAll(done => { Promise.all([ - apis.admin.sites.deleteSite(siteName, true), + apis.admin.sites.deleteSite(siteName), apis.user.nodes.deleteNodes([ folderName ]), logoutPage.load() ]) @@ -84,9 +93,9 @@ describe('Favorites', () => { it('displays the favorite files and folders', () => { expect(dataTable.countRows()).toEqual(3, 'Incorrect number of items displayed'); - expect(dataTable.getRowByContainingText(fileName1).isPresent()).toBe(true, `${fileName1} not displayed`); - expect(dataTable.getRowByContainingText(fileName2).isPresent()).toBe(true, `${fileName2} not displayed`); - expect(dataTable.getRowByContainingText(folderName).isPresent()).toBe(true, `${folderName} not displayed`); + expect(dataTable.getRowByName(fileName1).isPresent()).toBe(true, `${fileName1} not displayed`); + expect(dataTable.getRowByName(fileName2).isPresent()).toBe(true, `${fileName2} not displayed`); + expect(dataTable.getRowByName(folderName).isPresent()).toBe(true, `${folderName} not displayed`); }); it('Location column displays the parent folder of the files', () => { @@ -113,4 +122,36 @@ describe('Favorites', () => { }); }); + it('Location column redirect - item in user Home', () => { + dataTable.clickItemLocation(folderName) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe('Personal Files'); + }); + }); + + it('Location column redirect - file in folder', () => { + dataTable.clickItemLocation(fileName2) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe(folderName); + }) + .then(() => breadcrumb.getFirstItemName()) + .then(name => { + expect(name).toBe('Personal Files'); + }); + }); + + it('Location column redirect - file in site', () => { + dataTable.clickItemLocation(fileName1) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe(siteName); + }) + .then(() => breadcrumb.getFirstItemName()) + .then(name => { + expect(name).toBe('File Libraries'); + }); + }); + }); diff --git a/e2e/suites/list-views/file-libraries.test.ts b/e2e/suites/list-views/file-libraries.test.ts index 5c0e07894..89ac75a5b 100644 --- a/e2e/suites/list-views/file-libraries.test.ts +++ b/e2e/suites/list-views/file-libraries.test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser, by } from 'protractor'; @@ -54,6 +62,7 @@ describe('File Libraries', () => { .then(() => apis.admin.sites.addSiteMember(sitePublic, username, SITE_ROLES.SITE_CONSUMER)) .then(() => apis.admin.sites.addSiteMember(siteModerated, username, SITE_ROLES.SITE_MANAGER)) .then(() => apis.admin.sites.addSiteMember(sitePrivate, username, SITE_ROLES.SITE_CONTRIBUTOR)) + .then(() => loginPage.load()) .then(() => loginPage.loginWith(username)) .then(done); @@ -67,10 +76,10 @@ describe('File Libraries', () => { afterAll(done => { Promise.all([ - apis.admin.sites.deleteSite(sitePublic, true), - apis.admin.sites.deleteSite(siteModerated, true), - apis.admin.sites.deleteSite(sitePrivate, true), - apis.admin.sites.deleteSite(adminSite, true), + apis.admin.sites.deleteSite(sitePublic), + apis.admin.sites.deleteSite(siteModerated), + apis.admin.sites.deleteSite(sitePrivate), + apis.admin.sites.deleteSite(adminSite), logoutPage.load() ]) .then(done); @@ -97,7 +106,7 @@ describe('File Libraries', () => { }; expect(sitesCount).toEqual(3, 'Incorrect number of sites displayed'); - expect(dataTable.getRowByContainingText(adminSite).isPresent()).toBe(false, 'Incorrect site appears in list'); + expect(dataTable.getRowByName(adminSite).isPresent()).toBe(false, 'Incorrect site appears in list'); dataTable.getRows() .map((row) => { diff --git a/e2e/suites/list-views/personal-files.test.ts b/e2e/suites/list-views/personal-files.test.ts index d2e079c54..7a26d04eb 100644 --- a/e2e/suites/list-views/personal-files.test.ts +++ b/e2e/suites/list-views/personal-files.test.ts @@ -1,40 +1,47 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser } from 'protractor'; -import { APP_ROUTES } from '../../configs'; +import { SIDEBAR_LABELS } from '../../configs'; import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; import { Utils } from '../../utilities/utils'; -import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; +import { RepoClient } from '../../utilities/repo-client/repo-client'; describe('Personal Files', () => { const username = `user-${Utils.random()}`; - const password = username; const apis = { admin: new RepoClient(), - user: new RepoClient(username, password) + user: new RepoClient(username, username) }; const loginPage = new LoginPage(); const logoutPage = new LogoutPage(); - const personalFilesPage = new BrowsingPage(APP_ROUTES.PERSONAL_FILES); - const dataTable = personalFilesPage.dataTable; + const personalFilesPage = new BrowsingPage(); + const { dataTable } = personalFilesPage; const adminFolder = `admin-folder-${Utils.random()}`; @@ -44,7 +51,7 @@ describe('Personal Files', () => { beforeAll(done => { Promise .all([ - apis.admin.people.createUser(username, password), + apis.admin.people.createUser(username), apis.admin.nodes.createFolders([ adminFolder ]) ]) .then(() => apis.user.nodes.createFolders([ userFolder ])) @@ -71,41 +78,39 @@ describe('Personal Files', () => { }); beforeEach(done => { - personalFilesPage.load() + personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES) .then(() => dataTable.waitForHeader()) .then(done); }); afterAll(done => { - logoutPage.load() - .then(done); + logoutPage.load().then(done); }); it('has "Data Dictionary" folder', () => { - expect(dataTable.getRowByContainingText('Data Dictionary').isPresent()).toBe(true); + expect(dataTable.getRowByName('Data Dictionary').isPresent()).toBe(true); }); it('has created content', () => { - expect(dataTable.getRowByContainingText('admin-folder').isPresent()).toBe(true); + expect(dataTable.getRowByName(adminFolder).isPresent()).toBe(true); }); }); describe(`Regular user's personal files`, () => { beforeAll(done => { loginPage.load() - .then(() => loginPage.loginWith(username, password)) + .then(() => loginPage.loginWith(username)) .then(done); }); beforeEach(done => { - personalFilesPage.load() + personalFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES) .then(() => dataTable.waitForHeader()) .then(done); }); afterAll(done => { - logoutPage.load() - .then(done); + logoutPage.load().then(done); }); it('has the correct columns', () => { @@ -124,7 +129,7 @@ describe('Personal Files', () => { }); it('has user created content', () => { - expect(dataTable.getRowByContainingText(userFolder).isPresent()) + expect(dataTable.getRowByName(userFolder).isPresent()) .toBe(true); }); @@ -134,7 +139,7 @@ describe('Personal Files', () => { .then(response => response.data.entry.id); const navigatePromise = dataTable - .doubleClickOnRowByContainingText(userFolder) + .doubleClickOnItemName(userFolder) .then(() => dataTable.waitForHeader()); Promise @@ -146,28 +151,9 @@ describe('Personal Files', () => { expect(browser.getCurrentUrl()) .toContain(nodeId, 'Node ID is not in the URL'); - expect(dataTable.getRowByContainingText(userFile).isPresent()) + expect(dataTable.getRowByName(userFile).isPresent()) .toBe(true, 'user file is missing'); }); }); - - // Some tests regarding selection, breadcrumb and toolbar - // probably they can be move to a different suite - describe('Item selection', () => { - it('has toolbar when selected', done => { - const { actions } = personalFilesPage.toolbar; - - dataTable - .clickOnRowByContainingText(userFolder) - .then(() => { - expect(actions.isEmpty()).toBe(false, 'Toolbar to be present'); - }) - .then(() => actions.openMoreMenu()) - .then(menu => { - expect(menu.items.count()).toBeGreaterThan(0, 'More actions has items'); - }) - .then(done); - }); - }); }); }); diff --git a/e2e/suites/list-views/recent-files.test.ts b/e2e/suites/list-views/recent-files.test.ts new file mode 100644 index 000000000..6ce587ec5 --- /dev/null +++ b/e2e/suites/list-views/recent-files.test.ts @@ -0,0 +1,149 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, by } from 'protractor'; + +import { APP_ROUTES, SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { Utils } from '../../utilities/utils'; +import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; + +describe('Recent Files', () => { + const username = `user-${Utils.random()}`; + const password = username; + + const folderName = `folder-${Utils.random()}`; + let folderId; + const fileName1 = `file-${Utils.random()}.txt`; + + const fileName2 = `file-${Utils.random()}.txt`; + let file2Id; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, password) + }; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const recentFilesPage = new BrowsingPage(); + const { dataTable } = recentFilesPage; + const { breadcrumb } = recentFilesPage.toolbar; + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => apis.user.nodes.createFolders([ folderName ])) + .then(resp => folderId = resp.data.entry.id) + .then(() => apis.user.nodes.createFiles([ fileName1 ], folderName)) + + .then(() => apis.user.nodes.createFiles([ fileName2 ])) + .then(resp => file2Id = resp.data.entry.id) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + recentFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES) + .then(() => dataTable.isEmptyList()) + .then(empty => { + if (empty) { + browser.sleep(5000); + recentFilesPage.refresh(); + } + }) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + Promise.all([ + apis.user.nodes.deleteNodesById([ folderId, file2Id ]), + logoutPage.load() + ]) + .then(done); + }); + + it('has the correct columns', () => { + const labels = [ 'Name', 'Location', 'Size', 'Modified' ]; + const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label)); + + expect(dataTable.getColumnHeaders().count()).toBe(4 + 1, 'Incorrect number of columns'); + + elements.forEach((element, index) => { + expect(element.isPresent()).toBe(true, `"${labels[index]}" is missing`); + }); + }); + + it('displays the files added by the current user in the last 30 days', () => { + expect(dataTable.countRows()).toEqual(2, 'Incorrect number of sites displayed'); + expect(dataTable.getRowByName(fileName1).isPresent()).toBe(true, `${fileName1} not displayed`); + expect(dataTable.getRowByName(fileName2).isPresent()).toBe(true, `${fileName2} not displayed`); + }); + + it('Location column displays the parent folder of the file', () => { + const itemsLocations = { + [fileName2]: 'Personal Files', + [fileName1]: folderName + }; + + dataTable.getRows() + .map((row) => { + return row.all(dataTable.cell).map(cell => cell.getText()); + }) + .then((rowCells) => { + return rowCells.reduce((acc, cell) => { + acc[cell[1]] = cell[2]; + return acc; + }, {}); + }) + .then((recentList) => { + Object.keys(itemsLocations).forEach((item) => { + expect(recentList[item]).toEqual(itemsLocations[item]); + }); + }); + }); + + it('Location column redirect - file in user Home', () => { + dataTable.clickItemLocation(fileName1) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe(folderName); + }) + .then(() => breadcrumb.getFirstItemName()) + .then(name => { + expect(name).toBe('Personal Files'); + }); + }); + + it('Location column redirect - file in folder', () => { + dataTable.clickItemLocation(fileName2) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe('Personal Files'); + }); + }); +}); diff --git a/e2e/suites/list-views/shared-files.test.ts b/e2e/suites/list-views/shared-files.test.ts new file mode 100644 index 000000000..c4bb2cddc --- /dev/null +++ b/e2e/suites/list-views/shared-files.test.ts @@ -0,0 +1,155 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, by } from 'protractor'; + +import { APP_ROUTES, SITE_VISIBILITY, SITE_ROLES, SIDEBAR_LABELS } from '../../configs'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { Utils } from '../../utilities/utils'; +import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; + +describe('Shared Files', () => { + const username = `user-${Utils.random()}`; + const password = username; + + const siteName = `site-${Utils.random()}`; + const fileAdmin = `file-${Utils.random()}.txt`; + + const folderUser = `folder-${Utils.random()}`; + const fileUser = `file-${Utils.random()}.txt`; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, password) + }; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const sharedFilesPage = new BrowsingPage(); + const { dataTable } = sharedFilesPage; + const { breadcrumb } = sharedFilesPage.toolbar; + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => apis.admin.sites.createSite(siteName, SITE_VISIBILITY.PUBLIC)) + .then(() => apis.admin.sites.addSiteMember(siteName, username, SITE_ROLES.SITE_CONSUMER)) + .then(() => apis.admin.nodes.createFiles([ fileAdmin ], `Sites/${siteName}/documentLibrary`)) + .then(resp => apis.admin.shared.shareFileById(resp.data.entry.id)) + + .then(() => apis.user.nodes.createFolders([ folderUser ])) + .then(() => apis.user.nodes.createFiles([ fileUser ], folderUser)) + .then(resp => apis.user.shared.shareFileById(resp.data.entry.id)) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + sharedFilesPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES) + .then(() => dataTable.isEmptyList()) + .then(empty => { + if (empty) { + browser.sleep(5000); + sharedFilesPage.refresh(); + } + }) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterAll(done => { + Promise.all([ + apis.admin.sites.deleteSite(siteName), + apis.user.nodes.deleteNodes([ folderUser ]), + logoutPage.load() + ]) + .then(done); + }); + + it('has the correct columns', () => { + const labels = [ 'Name', 'Location', 'Size', 'Modified', 'Modified by', 'Shared by' ]; + const elements = labels.map(label => dataTable.getColumnHeaderByLabel(label)); + + expect(dataTable.getColumnHeaders().count()).toBe(6 + 1, 'Incorrect number of columns'); + + elements.forEach((element, index) => { + expect(element.isPresent()).toBe(true, `"${labels[index]}" is missing`); + }); + }); + + it('displays the files shared by everyone', () => { + expect(dataTable.countRows()).toEqual(2, 'Incorrect number of items displayed'); + expect(dataTable.getRowByName(fileAdmin).isPresent()).toBe(true, `${fileAdmin} not displayed`); + expect(dataTable.getRowByName(fileUser).isPresent()).toBe(true, `${fileUser} not displayed`); + }); + + it('Location column displays the parent folder of the file', () => { + const itemsLocations = { + [fileAdmin]: siteName, + [fileUser]: folderUser + }; + + dataTable.getRows() + .map((row) => { + return row.all(dataTable.cell).map(cell => cell.getText()); + }) + .then((rowCells) => { + return rowCells.reduce((acc, cell) => { + acc[cell[1]] = cell[2]; + return acc; + }, {}); + }) + .then((recentList) => { + Object.keys(itemsLocations).forEach((item) => { + expect(recentList[item]).toEqual(itemsLocations[item]); + }); + }); + }); + + it('Location column redirect - file in user Home', () => { + dataTable.clickItemLocation(fileUser) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe(folderUser); + }) + .then(() => breadcrumb.getFirstItemName()) + .then(name => { + expect(name).toBe('Personal Files'); + }); + }); + + it('Location column redirect - file in site', () => { + dataTable.clickItemLocation(fileAdmin) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe(siteName); + }) + .then(() => breadcrumb.getFirstItemName()) + .then(name => { + expect(name).toBe('File Libraries'); + }); + }); +}); diff --git a/e2e/suites/list-views/trash.test.ts b/e2e/suites/list-views/trash.test.ts index e6cd440c5..7c4969bc4 100644 --- a/e2e/suites/list-views/trash.test.ts +++ b/e2e/suites/list-views/trash.test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser, by } from 'protractor'; @@ -24,50 +32,59 @@ import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-cl describe('Trash', () => { const username = `user-${Utils.random()}`; - const password = username; const siteName = `site-${Utils.random()}`; - const folderAdmin = `folder-${Utils.random()}`; - const folderUser = `folder-${Utils.random()}`; - const fileAdmin = `file-${Utils.random()}.txt`; - const fileUser = `file-${Utils.random()}.txt`; const fileSite = `file-${Utils.random()}.txt`; + let fileSiteId; + + const folderAdmin = `folder-${Utils.random()}`; + let folderAdminId; + const fileAdmin = `file-${Utils.random()}.txt`; + let fileAdminId; + + const folderUser = `folder-${Utils.random()}`; + let folderUserId; + const fileUser = `file-${Utils.random()}.txt`; + let fileUserId; const apis = { admin: new RepoClient(), - user: new RepoClient(username, password) + user: new RepoClient(username, username) }; const loginPage = new LoginPage(); const logoutPage = new LogoutPage(); const trashPage = new BrowsingPage(); const { dataTable } = trashPage; + const { breadcrumb } = trashPage.toolbar; beforeAll(done => { apis.admin.people.createUser(username) - // admin: create file -> delete file .then(() => apis.admin.nodes.createFiles([ fileAdmin ]) - .then((resp) => apis.admin.nodes.deleteNodeById(resp.data.entry.id, false))) - // admin: create folder -> delete folder + .then(resp => fileAdminId = resp.data.entry.id)) .then(() => apis.admin.nodes.createFolders([ folderAdmin ]) - .then((resp) => apis.admin.nodes.deleteNodeById(resp.data.entry.id, false))) - // admin: create site, add user to site, create file + .then(resp => folderAdminId = resp.data.entry.id)) .then(() => apis.admin.sites.createSite(siteName, SITE_VISIBILITY.PUBLIC)) .then(() => apis.admin.sites.addSiteMember(siteName, username, SITE_ROLES.SITE_MANAGER)) .then(() => apis.admin.nodes.createFiles([ fileSite ], `Sites/${siteName}/documentLibrary`) - // user: delete file from site - .then(resp => apis.user.nodes.deleteNodeById(resp.data.entry.id, false))) - // user: create file -> delete file + .then(resp => fileSiteId = resp.data.entry.id)) .then(() => apis.user.nodes.createFiles([ fileUser ]) - .then((resp) => apis.user.nodes.deleteNodeById(resp.data.entry.id, false))) - // user: create folder -> delete folder + .then(resp => fileUserId = resp.data.entry.id)) .then(() => apis.user.nodes.createFolders([ folderUser ]) - .then((resp) => apis.user.nodes.deleteNodeById(resp.data.entry.id, false))) + .then(resp => folderUserId = resp.data.entry.id)) + + .then(() => apis.admin.nodes.deleteNodesById([ fileAdminId, folderAdminId ], false)) + .then(() => apis.user.nodes.deleteNodesById([ fileSiteId, fileUserId, folderUserId ], false)) + .then(done); }); afterAll(done => { - apis.admin.sites.deleteSite(siteName).then(done); + Promise.all([ + apis.admin.sites.deleteSite(siteName), + apis.admin.trashcan.emptyTrash() + ]) + .then(done); }); xit(''); @@ -76,7 +93,11 @@ describe('Trash', () => { beforeAll(done => { loginPage.load() .then(() => loginPage.loginWithAdmin()) - .then(() => trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH)) + .then(done); + }); + + beforeEach(done => { + trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH) .then(() => dataTable.waitForHeader()) .then(done); }); @@ -99,11 +120,11 @@ describe('Trash', () => { it('displays the files and folders deleted by everyone', () => { expect(dataTable.countRows()).toEqual(5, 'Incorrect number of deleted items displayed'); - expect(dataTable.getRowByContainingText(fileAdmin).isPresent()).toBe(true, `${fileAdmin} not displayed`); - expect(dataTable.getRowByContainingText(folderAdmin).isPresent()).toBe(true, `${folderAdmin} not displayed`); - expect(dataTable.getRowByContainingText(fileUser).isPresent()).toBe(true, `${fileUser} not displayed`); - expect(dataTable.getRowByContainingText(folderUser).isPresent()).toBe(true, `${folderUser} not displayed`); - expect(dataTable.getRowByContainingText(fileSite).isPresent()).toBe(true, `${fileSite} not displayed`); + expect(dataTable.getRowByName(fileAdmin).isPresent()).toBe(true, `${fileAdmin} not displayed`); + expect(dataTable.getRowByName(folderAdmin).isPresent()).toBe(true, `${folderAdmin} not displayed`); + expect(dataTable.getRowByName(fileUser).isPresent()).toBe(true, `${fileUser} not displayed`); + expect(dataTable.getRowByName(folderUser).isPresent()).toBe(true, `${folderUser} not displayed`); + expect(dataTable.getRowByName(fileSite).isPresent()).toBe(true, `${fileSite} not displayed`); }); }); @@ -111,7 +132,11 @@ describe('Trash', () => { beforeAll(done => { loginPage.load() .then(() => loginPage.loginWith(username)) - .then(() => trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH)) + .then(done); + }); + + beforeEach(done => { + trashPage.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH) .then(() => dataTable.waitForHeader()) .then(done); }); @@ -134,9 +159,30 @@ describe('Trash', () => { it('displays the files and folders deleted by the user', () => { expect(dataTable.countRows()).toEqual(3, 'Incorrect number of deleted items displayed'); - expect(dataTable.getRowByContainingText(fileSite).isPresent()).toBe(true, `${fileSite} not displayed`); - expect(dataTable.getRowByContainingText(fileUser).isPresent()).toBe(true, `${fileUser} not displayed`); - expect(dataTable.getRowByContainingText(folderUser).isPresent()).toBe(true, `${folderUser} not displayed`); + expect(dataTable.getRowByName(fileSite).isPresent()).toBe(true, `${fileSite} not displayed`); + expect(dataTable.getRowByName(fileUser).isPresent()).toBe(true, `${fileUser} not displayed`); + expect(dataTable.getRowByName(folderUser).isPresent()).toBe(true, `${folderUser} not displayed`); + expect(dataTable.getRowByName(fileAdmin).isPresent()).toBe(false, `${fileAdmin} is displayed`); + }); + + it('Location column redirect - file in user Home', () => { + dataTable.clickItemLocation(fileUser) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe('Personal Files'); + }); + }); + + it('Location column redirect - file in site', () => { + dataTable.clickItemLocation(fileSite) + .then(() => breadcrumb.getCurrentItemName()) + .then(name => { + expect(name).toBe(siteName); + }) + .then(() => breadcrumb.getFirstItemName()) + .then(name => { + expect(name).toBe('File Libraries'); + }); }); }); }); diff --git a/e2e/suites/navigation/side-navigation.test.ts b/e2e/suites/navigation/side-navigation.test.ts index 792b4d845..569c0fc5b 100644 --- a/e2e/suites/navigation/side-navigation.test.ts +++ b/e2e/suites/navigation/side-navigation.test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser } from 'protractor'; @@ -36,8 +44,7 @@ describe('Side navigation', () => { }); afterAll(done => { - logoutPage.load() - .then(done); + logoutPage.load().then(done); }); it('has "Personal Files" as default', () => { diff --git a/e2e/suites/pagination/pag-favorites.test.ts b/e2e/suites/pagination/pag-favorites.test.ts new file mode 100644 index 000000000..18c86311d --- /dev/null +++ b/e2e/suites/pagination/pag-favorites.test.ts @@ -0,0 +1,186 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, protractor, promise } from 'protractor'; +import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { Utils } from '../../utilities/utils'; +import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; + +describe('Pagination on Favorites', () => { + const username = `user-${Utils.random()}`; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, username) + }; + const { nodes: nodesApi, favorites: favoritesApi } = apis.user; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const page = new BrowsingPage(); + const { dataTable, pagination } = page; + + const parent = `parent-${Utils.random()}`; + const files = Array(101) + .fill('file') + .map((name, index): string => `${name}-${index + 1}.txt`); + let filesIds; + + function resetToDefaultPageSize(): promise.Promise { + return pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('25')) + .then(() => dataTable.waitForHeader()); + } + + function resetToDefaultPageNumber(): promise.Promise { + return pagination.openCurrentPageMenu() + .then(menu => menu.clickMenuItem('1')) + .then(() => dataTable.waitForHeader()); + } + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => nodesApi.createFiles(files, parent)) + .then(resp => filesIds = resp.data.list.entries.map(entries => entries.entry.id)) + + .then(() => favoritesApi.addFavoritesByIds('file', filesIds)) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterEach(done => { + browser.actions().sendKeys(protractor.Key.ESCAPE).perform().then(done); + }); + + afterAll(done => { + Promise.all([ + nodesApi.deleteNodes([ parent ]), + logoutPage.load() + ]) + .then(done); + }); + + it('default values', () => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(pagination.maxItems.getText()).toContain('25'); + expect(pagination.currentPage.getText()).toContain('Page 1'); + expect(pagination.totalPages.getText()).toContain('of 5'); + expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + }); + + it('page sizes', () => { + pagination.openMaxItemsMenu() + .then(menu => { + const [ first, second, third ] = [1, 2, 3] + .map(nth => menu.getNthItem(nth).getText()); + expect(first).toBe('25'); + expect(second).toBe('50'); + expect(third).toBe('100'); + }); + }); + + it('change the page size', () => { + pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('50')) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.maxItems.getText()).toContain('50'); + expect(pagination.totalPages.getText()).toContain('of 3'); + }) + + .then(() => resetToDefaultPageSize()); + }); + + it('current page menu items', () => { + pagination.openCurrentPageMenu() + .then(menu => { + expect(menu.getItemsCount()).toBe(5); + }); + }); + + it('change the current page from menu', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(3)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('51-75 of 101'); + expect(pagination.currentPage.getText()).toContain('Page 3'); + expect(pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + expect(dataTable.getRowByName('file-40.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to next page', () => { + pagination.nextButton.click() + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('26-50 of 101'); + expect(dataTable.getRowByName('file-70.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to previous page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(2)) + .then(() => dataTable.waitForHeader()) + .then(() => pagination.previousButton.click()) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(dataTable.getRowByName('file-88.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('last page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(5)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page'); + expect(pagination.currentPage.getText()).toContain('Page 5'); + expect(pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled'); + }); + }); +}); diff --git a/e2e/suites/pagination/pag-personal-files.test.ts b/e2e/suites/pagination/pag-personal-files.test.ts new file mode 100644 index 000000000..aed53568d --- /dev/null +++ b/e2e/suites/pagination/pag-personal-files.test.ts @@ -0,0 +1,183 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, protractor, promise } from 'protractor'; +import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { Utils } from '../../utilities/utils'; +import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; + +describe('Pagination on Personal Files', () => { + const username = `user-${Utils.random()}`; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, username) + }; + const { nodes: nodesApi } = apis.user; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const page = new BrowsingPage(); + const { dataTable, pagination } = page; + + const parent = `parent-${Utils.random()}`; + const files = Array(101) + .fill('file') + .map((name, index): string => `${name}-${index + 1}.txt`); + + function resetToDefaultPageSize(): promise.Promise { + return pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('25')) + .then(() => dataTable.waitForHeader()); + } + + function resetToDefaultPageNumber(): promise.Promise { + return pagination.openCurrentPageMenu() + .then(menu => menu.clickMenuItem('1')) + .then(() => dataTable.waitForHeader()); + } + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => nodesApi.createFiles(files, parent)) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES) + .then(() => dataTable.waitForHeader()) + .then(() => dataTable.doubleClickOnItemName(parent)) + .then(done); + }); + + afterEach(done => { + browser.actions().sendKeys(protractor.Key.ESCAPE).perform().then(done); + }); + + afterAll(done => { + Promise.all([ + nodesApi.deleteNodes([ parent ]), + logoutPage.load() + ]) + .then(done); + }); + + it('default values', () => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(pagination.maxItems.getText()).toContain('25'); + expect(pagination.currentPage.getText()).toContain('Page 1'); + expect(pagination.totalPages.getText()).toContain('of 5'); + expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + }); + + it('page sizes', () => { + pagination.openMaxItemsMenu() + .then(menu => { + const [ first, second, third ] = [1, 2, 3] + .map(nth => menu.getNthItem(nth).getText()); + expect(first).toBe('25'); + expect(second).toBe('50'); + expect(third).toBe('100'); + }); + }); + + it('change the page size', () => { + pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('50')) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.maxItems.getText()).toContain('50'); + expect(pagination.totalPages.getText()).toContain('of 3'); + }) + + .then(() => resetToDefaultPageSize()); + }); + + it('current page menu items', () => { + pagination.openCurrentPageMenu() + .then(menu => { + expect(menu.getItemsCount()).toBe(5); + }); + }); + + it('change the current page from menu', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(3)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('51-75 of 101'); + expect(pagination.currentPage.getText()).toContain('Page 3'); + expect(pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + expect(dataTable.getRowByName('file-60.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to next page', () => { + pagination.nextButton.click() + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('26-50 of 101'); + expect(dataTable.getRowByName('file-30.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to previous page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(2)) + .then(() => dataTable.waitForHeader()) + .then(() => pagination.previousButton.click()) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(dataTable.getRowByName('file-12.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('last page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(5)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page'); + expect(pagination.currentPage.getText()).toContain('Page 5'); + expect(pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled'); + }); + }); +}); diff --git a/e2e/suites/pagination/pag-recent-files.test.ts b/e2e/suites/pagination/pag-recent-files.test.ts new file mode 100644 index 000000000..7a1089e12 --- /dev/null +++ b/e2e/suites/pagination/pag-recent-files.test.ts @@ -0,0 +1,189 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, protractor, promise } from 'protractor'; +import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { Utils } from '../../utilities/utils'; +import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; + +describe('Pagination on Recent Files', () => { + const username = `user-${Utils.random()}`; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, username) + }; + const { nodes: nodesApi } = apis.user; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const page = new BrowsingPage(); + const { dataTable, pagination } = page; + + const parent = `parent-${Utils.random()}`; + const files = Array(101) + .fill('file') + .map((name, index): string => `${name}-${index + 1}.txt`); + + function resetToDefaultPageSize(): promise.Promise { + return pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('25')) + .then(() => dataTable.waitForHeader()); + } + + function resetToDefaultPageNumber(): promise.Promise { + return pagination.openCurrentPageMenu() + .then(menu => menu.clickMenuItem('1')) + .then(() => dataTable.waitForHeader()); + } + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => nodesApi.createFiles(files, parent)) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES) + .then(() => dataTable.isEmptyList()) + .then(empty => { + if (empty) { + browser.sleep(3000); + page.refresh(); + } + }) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterEach(done => { + browser.actions().sendKeys(protractor.Key.ESCAPE).perform().then(done); + }); + + afterAll(done => { + Promise.all([ + nodesApi.deleteNodes([ parent ]), + logoutPage.load() + ]) + .then(done); + }); + + it('default values', () => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(pagination.maxItems.getText()).toContain('25'); + expect(pagination.currentPage.getText()).toContain('Page 1'); + expect(pagination.totalPages.getText()).toContain('of 5'); + expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + }); + + it('page sizes', () => { + pagination.openMaxItemsMenu() + .then(menu => { + const [ first, second, third ] = [1, 2, 3] + .map(nth => menu.getNthItem(nth).getText()); + expect(first).toBe('25'); + expect(second).toBe('50'); + expect(third).toBe('100'); + }); + }); + + it('change the page size', () => { + pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('50')) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.maxItems.getText()).toContain('50'); + expect(pagination.totalPages.getText()).toContain('of 3'); + }) + + .then(() => resetToDefaultPageSize()); + }); + + it('current page menu items', () => { + pagination.openCurrentPageMenu() + .then(menu => { + expect(menu.getItemsCount()).toBe(5); + }); + }); + + it('change the current page from menu', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(3)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('51-75 of 101'); + expect(pagination.currentPage.getText()).toContain('Page 3'); + expect(pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + expect(dataTable.getRowByName('file-40.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to next page', () => { + pagination.nextButton.click() + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('26-50 of 101'); + expect(dataTable.getRowByName('file-70.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to previous page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(2)) + .then(() => dataTable.waitForHeader()) + .then(() => pagination.previousButton.click()) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(dataTable.getRowByName('file-88.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('last page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(5)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page'); + expect(pagination.currentPage.getText()).toContain('Page 5'); + expect(pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled'); + }); + }); +}); diff --git a/e2e/suites/pagination/pag-shared-files.test.ts b/e2e/suites/pagination/pag-shared-files.test.ts new file mode 100644 index 000000000..ac6faca9c --- /dev/null +++ b/e2e/suites/pagination/pag-shared-files.test.ts @@ -0,0 +1,193 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, protractor, promise } from 'protractor'; +import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { Utils } from '../../utilities/utils'; +import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; + +describe('Pagination on Shared Files', () => { + const username = `user-${Utils.random()}`; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, username) + }; + const { nodes: nodesApi, shared: sharedApi } = apis.user; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const page = new BrowsingPage(); + const { dataTable, pagination } = page; + + const parent = `parent-${Utils.random()}`; + const files = Array(101) + .fill('file') + .map((name, index): string => `${name}-${index + 1}.txt`); + let filesIds; + + function resetToDefaultPageSize(): promise.Promise { + return pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('25')) + .then(() => dataTable.waitForHeader()); + } + + function resetToDefaultPageNumber(): promise.Promise { + return pagination.openCurrentPageMenu() + .then(menu => menu.clickMenuItem('1')) + .then(() => dataTable.waitForHeader()); + } + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => nodesApi.createFiles(files, parent)) + .then(resp => filesIds = resp.data.list.entries.map(entries => entries.entry.id)) + + .then(() => sharedApi.shareFilesByIds(filesIds)) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES) + .then(() => dataTable.isEmptyList()) + .then(empty => { + if (empty) { + browser.sleep(6000); + page.refresh(); + } + }) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterEach(done => { + browser.actions().sendKeys(protractor.Key.ESCAPE).perform().then(done); + }); + + afterAll(done => { + Promise.all([ + nodesApi.deleteNodes([ parent ]), + logoutPage.load() + ]) + .then(done); + }); + + it('default values', () => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(pagination.maxItems.getText()).toContain('25'); + expect(pagination.currentPage.getText()).toContain('Page 1'); + expect(pagination.totalPages.getText()).toContain('of 5'); + expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + }); + + it('page sizes', () => { + pagination.openMaxItemsMenu() + .then(menu => { + const [ first, second, third ] = [1, 2, 3] + .map(nth => menu.getNthItem(nth).getText()); + expect(first).toBe('25'); + expect(second).toBe('50'); + expect(third).toBe('100'); + }); + }); + + it('change the page size', () => { + pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('50')) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.maxItems.getText()).toContain('50'); + expect(pagination.totalPages.getText()).toContain('of 3'); + }) + + .then(() => resetToDefaultPageSize()); + }); + + it('current page menu items', () => { + pagination.openCurrentPageMenu() + .then(menu => { + expect(menu.getItemsCount()).toBe(5); + }); + }); + + it('change the current page from menu', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(3)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('51-75 of 101'); + expect(pagination.currentPage.getText()).toContain('Page 3'); + expect(pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + expect(dataTable.getRowByName('file-40.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to next page', () => { + pagination.nextButton.click() + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('26-50 of 101'); + expect(dataTable.getRowByName('file-70.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to previous page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(2)) + .then(() => dataTable.waitForHeader()) + .then(() => pagination.previousButton.click()) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(dataTable.getRowByName('file-88.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('last page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(5)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page'); + expect(pagination.currentPage.getText()).toContain('Page 5'); + expect(pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled'); + }); + }); +}); diff --git a/e2e/suites/pagination/pag-trash.test.ts b/e2e/suites/pagination/pag-trash.test.ts new file mode 100644 index 000000000..4f318877c --- /dev/null +++ b/e2e/suites/pagination/pag-trash.test.ts @@ -0,0 +1,184 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + +import { browser, protractor, promise } from 'protractor'; +import { SIDEBAR_LABELS, SITE_VISIBILITY } from '../../configs'; +import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; +import { Utils } from '../../utilities/utils'; +import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; + +describe('Pagination on Trash', () => { + const username = `user-${Utils.random()}`; + + const apis = { + admin: new RepoClient(), + user: new RepoClient(username, username) + }; + const { nodes: nodesApi, trashcan: trashApi } = apis.user; + + const loginPage = new LoginPage(); + const logoutPage = new LogoutPage(); + const page = new BrowsingPage(); + const { dataTable, pagination } = page; + + const filesForDelete = Array(101) + .fill('file') + .map((name, index): string => `${name}-${index + 1}.txt`); + let filesDeletedIds; + + function resetToDefaultPageSize(): promise.Promise { + return pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('25')) + .then(() => dataTable.waitForHeader()); + } + + function resetToDefaultPageNumber(): promise.Promise { + return pagination.openCurrentPageMenu() + .then(menu => menu.clickMenuItem('1')) + .then(() => dataTable.waitForHeader()); + } + + beforeAll(done => { + apis.admin.people.createUser(username) + .then(() => nodesApi.createFiles(filesForDelete)) + .then(resp => filesDeletedIds = resp.data.list.entries.map(entries => entries.entry.id)) + .then(() => nodesApi.deleteNodesById(filesDeletedIds, false)) + + .then(() => loginPage.load()) + .then(() => loginPage.loginWith(username)) + .then(done); + }); + + beforeEach(done => { + page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH) + .then(() => dataTable.waitForHeader()) + .then(done); + }); + + afterEach(done => { + browser.actions().sendKeys(protractor.Key.ESCAPE).perform().then(done); + }); + + afterAll(done => { + Promise.all([ + trashApi.emptyTrash(), + logoutPage.load() + ]) + .then(done); + }); + + it('default values', () => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(pagination.maxItems.getText()).toContain('25'); + expect(pagination.currentPage.getText()).toContain('Page 1'); + expect(pagination.totalPages.getText()).toContain('of 5'); + expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + }); + + it('page sizes', () => { + pagination.openMaxItemsMenu() + .then(menu => { + const [ first, second, third ] = [1, 2, 3] + .map(nth => menu.getNthItem(nth).getText()); + expect(first).toBe('25'); + expect(second).toBe('50'); + expect(third).toBe('100'); + }); + }); + + it('change the page size', () => { + pagination.openMaxItemsMenu() + .then(menu => menu.clickMenuItem('50')) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.maxItems.getText()).toContain('50'); + expect(pagination.totalPages.getText()).toContain('of 3'); + }) + + .then(() => resetToDefaultPageSize()); + }); + + it('current page menu items', () => { + pagination.openCurrentPageMenu() + .then(menu => { + expect(menu.getItemsCount()).toBe(5); + }); + }); + + it('change the current page from menu', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(3)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('51-75 of 101'); + expect(pagination.currentPage.getText()).toContain('Page 3'); + expect(pagination.previousButton.isEnabled()).toBe(true, 'Previous button is not enabled'); + expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled'); + expect(dataTable.getRowByName('file-40.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to next page', () => { + pagination.nextButton.click() + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('26-50 of 101'); + expect(dataTable.getRowByName('file-70.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('navigate to previous page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(2)) + .then(() => dataTable.waitForHeader()) + .then(() => pagination.previousButton.click()) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(pagination.range.getText()).toContain('1-25 of 101'); + expect(dataTable.getRowByName('file-88.txt').isPresent()) + .toBe(true, 'File not found on page'); + }) + + .then(() => resetToDefaultPageNumber()); + }); + + it('last page', () => { + pagination.openCurrentPageMenu() + .then(menu => menu.clickNthItem(5)) + .then(() => dataTable.waitForHeader()) + .then(() => { + expect(dataTable.countRows()).toBe(1, 'Incorrect number of items on the last page'); + expect(pagination.currentPage.getText()).toContain('Page 5'); + expect(pagination.nextButton.isEnabled()).toBe(false, 'Next button is enabled'); + }); + }); +}); diff --git a/e2e/suites/pagination/pagination.test.ts b/e2e/suites/pagination/pagination.test.ts deleted file mode 100644 index e510e3973..000000000 --- a/e2e/suites/pagination/pagination.test.ts +++ /dev/null @@ -1,165 +0,0 @@ -/*! - * @license - * Copyright 2017 Alfresco Software, Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { browser } from 'protractor'; - -import { APP_ROUTES } from '../../configs'; -import { LoginPage, LogoutPage, BrowsingPage } from '../../pages/pages'; -import { Utils } from '../../utilities/utils'; -import { RepoClient, NodeContentTree } from '../../utilities/repo-client/repo-client'; - -describe('Pagination', () => { - const username = `user-${Utils.random()}`; - - const apis = { - admin: new RepoClient(), - user: new RepoClient(username, username) - }; - - const loginPage = new LoginPage(); - const logoutPage = new LogoutPage(); - - beforeAll(done => { - apis.admin.people - .createUser(username) - .then(done); - }); - - xit(''); - - describe(`on Personal Files`, () => { - const personalFilesPage = new BrowsingPage(APP_ROUTES.PERSONAL_FILES); - const { dataTable, pagination } = personalFilesPage; - - // Generate files - const content: NodeContentTree = { - name: `user-folder-${Utils.random()}`, - files: Array(101) - .fill('file') - .map((name, index): string => `${name}-${index + 1}.txt`) - }; - - const { nodes: nodesApi } = apis.user; - - beforeAll(done => { - nodesApi.createContent(content) - .then(() => loginPage.load() - .then(() => loginPage.loginWith(username)) - .then(done)); - }); - - beforeEach(done => { - personalFilesPage.load() - .then(() => dataTable.waitForHeader()) - .then(() => dataTable.doubleClickOnRowByContainingText(content.name)) - .then(() => dataTable.sortByColumn('Name')) - .then(done); - }); - - afterAll(done => { - logoutPage.load() - .then(() => nodesApi.deleteNodes([ content.name ])) - .then(done); - }); - - it('has default details', () => { - expect(pagination.range.getText()).toContain('1-25 of 101', 'Range'); - expect(pagination.maxItems.getText()).toContain('25', 'Items per page'); - expect(pagination.currentPage.getText()).toContain('Page 1', 'Current page'); - expect(pagination.totalPages.getText()).toContain('of 5', 'Total pages'); - expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button'); - expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button'); - }); - - it('has page sizes', () => { - pagination.openMaxItemsMenu() - .then(menu => { - const [ first, second, third ] = [1, 2, 3] - .map(nth => menu.getNthItem(nth).getText()); - - expect(first).toBe('25', 'Items per page'); - expect(second).toBe('50', 'Items per page'); - expect(third).toBe('100', 'Items per page'); - }); - }); - - it('changes the page size', () => { - pagination.openMaxItemsMenu() - .then(menu => menu.clickMenuItem('50')) - .then(() => dataTable.waitForHeader()) - .then(() => { - expect(pagination.maxItems.getText()).toContain('50', 'Items per page'); - expect(pagination.totalPages.getText()).toContain('of 3', 'Total pages'); - }); - }); - - it('has page items', () => { - pagination.openCurrentPageMenu() - .then(menu => { - expect(menu.items.count()).toBe(5); - }); - }); - - it('changes the current page from menu', () => { - pagination.openCurrentPageMenu() - .then(menu => menu.clicktNthItem(3)) - .then(() => dataTable.waitForHeader()) - .then(() => { - expect(pagination.range.getText()).toContain('51-75 of 101', 'Range'); - expect(pagination.currentPage.getText()).toContain('Page 3', 'Current page'); - expect(pagination.previousButton.isEnabled()).toBe(true, 'Previous button'); - expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button'); - expect(dataTable.getRowByContainingText('file-60.txt').isPresent()) - .toBe(true, 'File not found on page'); - }); - }); - - it('navigates to next page', () => { - pagination.nextButton.click() - .then(() => dataTable.waitForHeader()) - .then(() => { - expect(pagination.range.getText()).toContain('26-50 of 101', 'Range'); - expect(dataTable.getRowByContainingText('file-30.txt').isPresent()) - .toBe(true, 'File not found on page'); - }); - }); - - it('navigates to previous page', () => { - pagination.openCurrentPageMenu() - .then(menu => menu.clicktNthItem(2)) - .then(() => dataTable.waitForHeader()) - .then(() => pagination.previousButton.click()) - .then(() => dataTable.waitForHeader()) - .then(() => { - expect(pagination.range.getText()).toContain('1-25 of 101', 'Range'); - expect(dataTable.getRowByContainingText('file-12.txt').isPresent()) - .toBe(true, 'File not found on page'); - }); - }); - - it('has one item on the last page', () => { - pagination.openCurrentPageMenu() - .then(menu => menu.clicktNthItem(5)) - .then(() => dataTable.waitForHeader()) - .then(() => { - expect(dataTable.countRows()).toBe(1, 'Single item on the last page'); - expect(pagination.currentPage.getText()).toContain('Page 5', 'Last page'); - expect(pagination.nextButton.isEnabled()).toBe(false, 'Next button is not enabled'); - }); - }); - }); -}); diff --git a/e2e/utilities/repo-client/apis/favorites/favorites-api.ts b/e2e/utilities/repo-client/apis/favorites/favorites-api.ts index e2b0c4ee0..dd1cd7b47 100644 --- a/e2e/utilities/repo-client/apis/favorites/favorites-api.ts +++ b/e2e/utilities/repo-client/apis/favorites/favorites-api.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { promise } from 'protractor'; @@ -52,6 +60,12 @@ export class FavoritesApi extends RepoApi { .catch(this.handleError); } + addFavoritesByIds(nodeType: string, ids: string[]): Promise { + return ids.reduce((previous, current) => ( + previous.then(() => this.addFavoriteById(nodeType, current)) + ), Promise.resolve()); + } + getFavorite(api: RepoClient, name: string): Promise { return api.nodes.getNodeByPath(name) .then((response) => { diff --git a/e2e/utilities/repo-client/apis/nodes/node-body-create.ts b/e2e/utilities/repo-client/apis/nodes/node-body-create.ts index ba3a5ceb4..31c369d34 100644 --- a/e2e/utilities/repo-client/apis/nodes/node-body-create.ts +++ b/e2e/utilities/repo-client/apis/nodes/node-body-create.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ export const NODE_TYPE_FILE = 'cm:content'; diff --git a/e2e/utilities/repo-client/apis/nodes/node-content-tree.ts b/e2e/utilities/repo-client/apis/nodes/node-content-tree.ts index f9f68deaf..45516429b 100644 --- a/e2e/utilities/repo-client/apis/nodes/node-content-tree.ts +++ b/e2e/utilities/repo-client/apis/nodes/node-content-tree.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { NodeBodyCreate, NODE_TYPE_FILE, NODE_TYPE_FOLDER, NODE_TITLE, NODE_DESCRIPTION } from './node-body-create'; diff --git a/e2e/utilities/repo-client/apis/nodes/nodes-api.ts b/e2e/utilities/repo-client/apis/nodes/nodes-api.ts index e8ed5423e..410cebc92 100644 --- a/e2e/utilities/repo-client/apis/nodes/nodes-api.ts +++ b/e2e/utilities/repo-client/apis/nodes/nodes-api.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RepoApi } from '../repo-api'; @@ -33,6 +41,12 @@ export class NodesApi extends RepoApi { .catch(this.handleError); } + getNodeDescription(name: string): Promise { + return this.getNodeByPath(name) + .then(response => response.data.entry.properties['cm:description']) + .catch(() => Promise.resolve('')); + } + deleteNodeById(id: string, permanent: boolean = true): Promise { return this .delete(`/nodes/${id}?permanent=${permanent}`) @@ -47,22 +61,16 @@ export class NodesApi extends RepoApi { .catch(this.handleError); } - getNodeDescription(name: string): Promise { - let description = 'cm:description'; - - return this - .getNodeByPath(name) - .then((response: any): string => response.data.entry.properties[description]) - .catch(this.handleError); + deleteNodes(names: string[], relativePath: string = '', permanent: boolean = true): Promise { + return names.reduce((previous, current) => ( + previous.then(() => this.deleteNodeByPath(`${relativePath}/${current}`, permanent)) + ), Promise.resolve()); } - deleteNodes(names: string[], relativePath: string = '', permanent: boolean = true): Promise { - const deletions = names - .map((name: string): any => { - return this.deleteNodeByPath(`${relativePath}/${name}`, permanent); - }); - - return Promise.all(deletions); + deleteNodesById(ids: string[], permanent: boolean = true): Promise { + return ids.reduce((previous, current) => ( + previous.then(() => this.deleteNodeById(current, permanent)) + ), Promise.resolve()); } // children diff --git a/e2e/utilities/repo-client/apis/people/people-api-models.ts b/e2e/utilities/repo-client/apis/people/people-api-models.ts index 46f7f4feb..d00dc7dd4 100644 --- a/e2e/utilities/repo-client/apis/people/people-api-models.ts +++ b/e2e/utilities/repo-client/apis/people/people-api-models.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ export class Person { diff --git a/e2e/utilities/repo-client/apis/people/people-api.ts b/e2e/utilities/repo-client/apis/people/people-api.ts index 5b9a6ecec..b13811080 100644 --- a/e2e/utilities/repo-client/apis/people/people-api.ts +++ b/e2e/utilities/repo-client/apis/people/people-api.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RepoApi } from '../repo-api'; diff --git a/e2e/utilities/repo-client/apis/repo-api.ts b/e2e/utilities/repo-client/apis/repo-api.ts index 78cc802ae..0a7993f9c 100644 --- a/e2e/utilities/repo-client/apis/repo-api.ts +++ b/e2e/utilities/repo-client/apis/repo-api.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RestClient, RestClientArgs, RestClientResponse } from '../../rest-client/rest-client'; diff --git a/e2e/utilities/repo-client/apis/shared-links/shared-links-api.ts b/e2e/utilities/repo-client/apis/shared-links/shared-links-api.ts index b11854c3f..537aef7a5 100644 --- a/e2e/utilities/repo-client/apis/shared-links/shared-links-api.ts +++ b/e2e/utilities/repo-client/apis/shared-links/shared-links-api.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RepoApi } from '../repo-api'; @@ -28,6 +36,12 @@ export class SharedLinksApi extends RepoApi { .catch(this.handleError); } + shareFilesByIds(ids: string[]): Promise { + return ids.reduce((previous, current) => ( + previous.then(() => this.shareFileById(current)) + ), Promise.resolve()); + } + getSharedLinks(): Promise { return this.get(`/shared-links`) .catch(this.handleError); diff --git a/e2e/utilities/repo-client/apis/sites/sites-api-models.ts b/e2e/utilities/repo-client/apis/sites/sites-api-models.ts index 07280f753..f6729c1d7 100644 --- a/e2e/utilities/repo-client/apis/sites/sites-api-models.ts +++ b/e2e/utilities/repo-client/apis/sites/sites-api-models.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { SITE_VISIBILITY } from '../../../../configs'; diff --git a/e2e/utilities/repo-client/apis/sites/sites-api.ts b/e2e/utilities/repo-client/apis/sites/sites-api.ts index 05b3f7e6c..acf25c04b 100644 --- a/e2e/utilities/repo-client/apis/sites/sites-api.ts +++ b/e2e/utilities/repo-client/apis/sites/sites-api.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RepoApi } from '../repo-api'; @@ -35,7 +43,7 @@ export class SitesApi extends RepoApi { .catch(this.handleError); } - createSite(title: string, visibility: string, details?: Site): Promise { + createOrUpdateSite(title: string, visibility: string, details?: Site): Promise { const site: Site = new Site(title, visibility, details); const onSuccess = (response) => response; const onError = (response) => { @@ -50,12 +58,31 @@ export class SitesApi extends RepoApi { .catch(this.handleError); } + createSite(title: string, visibility: string, details?: Site): Promise { + const site: Site = new Site(title, visibility, details); + return this + .post(`/sites`, { data: site }) + .catch(this.handleError); + } + + createSites(titles: string[], visibility: string): Promise { + return titles.reduce((previous, current) => ( + previous.then(() => this.createSite(current, visibility)) + ), Promise.resolve()); + } + deleteSite(id: string, permanent: boolean = true): Promise { return this .delete(`/sites/${id}?permanent=${permanent}`) .catch(this.handleError); } + deleteSites(ids: string[], permanent: boolean = true): Promise { + return ids.reduce((previous, current) => ( + previous.then(() => this.deleteSite(current)) + ), Promise.resolve()); + } + updateSiteMember(siteId: string, userId: string, role: string): Promise { return this .put(`/sites/${siteId}/members/${userId}`, { data: { role } }) diff --git a/e2e/utilities/repo-client/apis/trashcan/trashcan-api.ts b/e2e/utilities/repo-client/apis/trashcan/trashcan-api.ts index cc50b1465..935fc19b5 100644 --- a/e2e/utilities/repo-client/apis/trashcan/trashcan-api.ts +++ b/e2e/utilities/repo-client/apis/trashcan/trashcan-api.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RepoApi } from '../repo-api'; @@ -23,4 +31,24 @@ export class TrashcanApi extends RepoApi { .delete(`/deleted-nodes/${id}`) .catch(this.handleError); } + + getDeletedNodes(): Promise { + return this + .get(`/deleted-nodes?maxItems=1000`) + .catch(this.handleError); + } + + emptyTrash(): Promise { + return this.getDeletedNodes() + .then(resp => { + return resp.data.list.entries.map(entries => entries.entry.id); + }) + .then(ids => { + return ids.reduce((previous, current) => ( + previous.then(() => this.permanentlyDelete(current)) + ), Promise.resolve()); + }) + .catch(this.handleError); + } + } diff --git a/e2e/utilities/repo-client/repo-client-models.ts b/e2e/utilities/repo-client/repo-client-models.ts index 2bc16c1c8..46222947b 100644 --- a/e2e/utilities/repo-client/repo-client-models.ts +++ b/e2e/utilities/repo-client/repo-client-models.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { diff --git a/e2e/utilities/repo-client/repo-client.ts b/e2e/utilities/repo-client/repo-client.ts index 2c0327cce..8ffe00b95 100644 --- a/e2e/utilities/repo-client/repo-client.ts +++ b/e2e/utilities/repo-client/repo-client.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RepoClientAuth, RepoClientConfig } from './repo-client-models'; diff --git a/e2e/utilities/reporters/console/console-logger.ts b/e2e/utilities/reporters/console/console-logger.ts index 80b1f786c..8b82d83da 100644 --- a/e2e/utilities/reporters/console/console-logger.ts +++ b/e2e/utilities/reporters/console/console-logger.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ /* tslint:disable */ diff --git a/e2e/utilities/reporters/console/console.ts b/e2e/utilities/reporters/console/console.ts index 8223def47..7985e52c5 100644 --- a/e2e/utilities/reporters/console/console.ts +++ b/e2e/utilities/reporters/console/console.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { log } from './console-logger'; diff --git a/e2e/utilities/rest-client/rest-client-models.ts b/e2e/utilities/rest-client/rest-client-models.ts index 918bebee4..89e3c9916 100644 --- a/e2e/utilities/rest-client/rest-client-models.ts +++ b/e2e/utilities/rest-client/rest-client-models.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ interface RequestConfig { diff --git a/e2e/utilities/rest-client/rest-client.ts b/e2e/utilities/rest-client/rest-client.ts index 7f457e46e..45b4c1ca8 100644 --- a/e2e/utilities/rest-client/rest-client.ts +++ b/e2e/utilities/rest-client/rest-client.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Client } from 'node-rest-client'; diff --git a/e2e/utilities/utils.ts b/e2e/utilities/utils.ts index 616adb672..368b7aa43 100644 --- a/e2e/utilities/utils.ts +++ b/e2e/utilities/utils.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { browser, promise } from 'protractor'; diff --git a/karma.conf.js b/karma.conf.js index 004fb9586..410aaa975 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -15,15 +15,13 @@ module.exports = function (config) { files: [ { pattern: './node_modules/hammerjs/hammer.js', watched: false }, { pattern: './node_modules/@angular/material/prebuilt-themes/indigo-pink.css', watched: false }, - { pattern: './node_modules/ng2-alfresco-*/bundles/assets/ng2-alfresco-*/i18n/en.json', watched: false, served: true, included: false }, + { pattern: './node_modules/@alfresco/adf-core/bundles/assets/adf-core/i18n/en.json', watched: false, served: true, included: false }, + { pattern: './node_modules/@alfresco/adf-content-services/bundles/assets/adf-content-services/i18n/en.json', watched: false, served: true, included: false } + ], proxies: { - '/assets/ng2-alfresco-core/i18n/en.json': '/base/node_modules/ng2-alfresco-core/bundles/assets/ng2-alfresco-core/i18n/en.json', - '/assets/ng2-alfresco-datatable/i18n/en.json': '/base/node_modules/ng2-alfresco-datatable/bundles/assets/ng2-alfresco-datatable/i18n/en.json', - '/assets/ng2-alfresco-documentlist/i18n/en.json': '/base/node_modules/ng2-alfresco-documentlist/bundles/assets/ng2-alfresco-documentlist/i18n/en.json', - '/assets/ng2-alfresco-login/i18n/en.json': '/base/node_modules/ng2-alfresco-login/bundles/assets/ng2-alfresco-login/i18n/en.json', - '/assets/ng2-alfresco-upload/i18n/en.json': '/base/node_modules/ng2-alfresco-upload/bundles/assets/ng2-alfresco-upload/i18n/en.json', - '/assets/ng2-alfresco-search/i18n/en.json': '/base/node_modules/ng2-alfresco-search/bundles/assets/ng2-alfresco-search/i18n/en.json' + '/assets/adf-core/i18n/en.json': '/base/node_modules/@alfresco/adf-core/bundles/assets/adf-core/i18n/en.json', + '/assets/adf-content-services/i18n/en.json': '/base/node_modules/@alfresco/adf-content-services/bundles/assets/adf-content-services/i18n/en.json' }, client:{ clearContext: false // leave Jasmine Spec Runner output visible in browser diff --git a/package.json b/package.json index a3112269b..334a7cba8 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "alfresco-content-app", "version": "0.1.0", - "license": "Apache-2.0", + "license": "LGPL-3.0", "scripts": { "ng": "ng", "start": "npm run server-versions && ng serve --open", "build": "npm run server-versions && ng build", "build:prod": "npm run server-versions && ng build --prod", "build:dev": "npm run server-versions && ng build && node postbuild-dev.js", + "build:tomcat": "npm run server-versions && ng build --base-href ./", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", @@ -15,35 +16,33 @@ }, "private": true, "dependencies": { - "@angular/animations": "4.4.5", - "@angular/cdk": "2.0.0-beta.12", - "@angular/common": "4.4.5", - "@angular/compiler": "4.4.5", - "@angular/core": "4.4.5", - "@angular/forms": "4.4.5", - "@angular/http": "4.4.5", - "@angular/material": "2.0.0-beta.12", - "@angular/platform-browser": "4.4.5", - "@angular/platform-browser-dynamic": "4.4.5", - "@angular/router": "4.4.5", + "@alfresco/adf-content-services": "2.0.0", + "@alfresco/adf-core": "2.0.0", + "@angular/animations": "5.0.0", + "@angular/cdk": "5.0.0-rc0", + "@angular/common": "5.0.0", + "@angular/compiler": "5.0.0", + "@angular/core": "5.0.0", + "@angular/flex-layout": "2.0.0-beta.10", + "@angular/forms": "5.0.0", + "@angular/http": "5.0.0", + "@angular/material": "5.0.0-rc0", + "@angular/platform-browser": "5.0.0", + "@angular/platform-browser-dynamic": "5.0.0", + "@angular/router": "5.0.0", "@ngx-translate/core": "8.0.0", - "alfresco-js-api": "1.10.0-beta6", - "core-js": "^2.4.1", + "alfresco-js-api": "2.0.0", + "core-js": "2.4.1", "hammerjs": "2.0.8", - "ng2-alfresco-core": "1.10.0-beta6", - "ng2-alfresco-datatable": "1.10.0-beta6", - "ng2-alfresco-documentlist": "1.10.0-beta6", - "ng2-alfresco-login": "1.10.0-beta6", - "ng2-alfresco-search": "1.10.0-beta6", - "ng2-alfresco-upload": "1.10.0-beta6", - "ng2-alfresco-viewer": "1.10.0-beta6", - "pdfjs-dist": "1.8.557", - "rxjs": "5.1.0", - "zone.js": "^0.8.14" + "moment-es6": "1.0.0", + "pdfjs-dist": "1.5.404", + "rxjs": "5.5.2", + "web-animations-js": "^2.3.1", + "zone.js": "0.8.14" }, "devDependencies": { - "@angular/cli": "1.4.7", - "@angular/compiler-cli": "4.4.5", + "@angular/cli": "1.5.0", + "@angular/compiler-cli": "5.0.0", "@angular/language-service": "4.4.5", "@types/jasmine": "^2.5.53", "@types/jasminewd2": "^2.0.2", @@ -64,6 +63,6 @@ "rimraf": "2.6.2", "ts-node": "~3.2.0", "tslint": "~5.7.0", - "typescript": "~2.3.3" + "typescript": "~2.4.2" } } diff --git a/postbuild-dev.js b/postbuild-dev.js index 02544050d..abd88c43e 100644 --- a/postbuild-dev.js +++ b/postbuild-dev.js @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ var fs = require('fs'); diff --git a/protractor.conf.js b/protractor.conf.js index 9141ac324..ba46ec01b 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -7,32 +7,42 @@ const jasmineReporters = require('jasmine-reporters'); const projectRoot = path.resolve(__dirname); +const width = 1366; +const height = 768; + exports.config = { - allScriptsTimeout: 11000, + allScriptsTimeout: 30000, + specs: [ './e2e/suites/authentication/*.test.ts', './e2e/suites/list-views/*.test.ts', './e2e/suites/application/page-titles.test.ts', './e2e/suites/navigation/side-navigation.test.ts', - './e2e/suites/pagination/pagination.test.ts', + './e2e/suites/pagination/*.test.ts', './e2e/suites/actions/*.test.ts' ], + capabilities: { - 'browserName': 'chrome', + browserName: 'chrome', chromeOptions: { prefs: { 'credentials_enable_service': false - } + }, + args: [ '--incognito', '--headless' ] } }, + directConnect: true, + baseUrl: 'http://localhost:3000', + framework: 'jasmine2', jasmineNodeOpts: { showColors: true, - defaultTimeoutInterval: 30000, + defaultTimeoutInterval: 50000, print: function() {} }, + plugins: [{ package: 'jasmine2-protractor-utils', disableHTMLReport: false, @@ -43,10 +53,14 @@ exports.config = { htmlReportDir: `${projectRoot}/e2e-output/html-report/`, screenshotPath: `${projectRoot}/e2e-output/screenshots/` }], + onPrepare() { require('ts-node').register({ project: 'e2e/tsconfig.e2e.json' }); + + browser.manage().window().setSize(width, height); + jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({ @@ -57,5 +71,23 @@ exports.config = { useFullTestName: false, reportFailedUrl: true })); + + return browser.driver.executeScript(disableCSSAnimation); + + function disableCSSAnimation() { + var css = '* {' + + '-webkit-transition-duration: 0s !important;' + + 'transition-duration: 0s !important;' + + '-webkit-animation-duration: 0s !important;' + + 'animation-duration: 0s !important;' + + '}', + head = document.head || document.getElementsByTagName('head')[0], + style = document.createElement('style'); + + style.type = 'text/css'; + style.appendChild(document.createTextNode(css)); + head.appendChild(style); + } + } }; diff --git a/src/app.config.json b/src/app.config.json index 80383e6d4..43cc289ec 100644 --- a/src/app.config.json +++ b/src/app.config.json @@ -2,9 +2,9 @@ "ecmHost": "http://{hostname}{:port}", "application": { "name": "Alfresco Example Content Application", - "build": "1234" + "logo": "/assets/images/alfresco-logo-white.svg" }, - "logo": "alfresco-logo-white.svg", + "headerColor": "#2196F3", "languagePicker": false, "document-list": { "supportedPageSizes": [ @@ -121,6 +121,10 @@ { "key": "ru", "label": "Russian" + }, + { + "key": "zh-CN", + "label": "Simplified Chinese" } ] } diff --git a/src/app/adf.module.ts b/src/app/adf.module.ts index 4a8ce27b3..15f8206b1 100644 --- a/src/app/adf.module.ts +++ b/src/app/adf.module.ts @@ -1,40 +1,38 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { NgModule } from '@angular/core'; // ADF modules -import { CoreModule } from 'ng2-alfresco-core'; -import { DataTableModule } from 'ng2-alfresco-datatable'; -import { ViewerModule } from 'ng2-alfresco-viewer'; -import { DocumentListModule } from 'ng2-alfresco-documentlist'; -import { LoginModule } from 'ng2-alfresco-login'; -import { UploadModule } from 'ng2-alfresco-upload'; -import { SearchModule } from 'ng2-alfresco-search'; +import { CoreModule } from '@alfresco/adf-core'; +import { ContentModule } from '@alfresco/adf-content-services'; export function modules() { return [ CoreModule, - DataTableModule, - DocumentListModule, - LoginModule, - SearchModule, - UploadModule, - ViewerModule + ContentModule ]; } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1fedb4b5d..4773c8632 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,23 +1,31 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute, NavigationEnd } from '@angular/router'; -import { TranslationService, PageTitleService } from 'ng2-alfresco-core'; +import { TranslationService, PageTitleService } from '@alfresco/adf-core'; @Component({ selector: 'app-root', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 7cffa948b..5548ff91d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,24 +1,32 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; -import { TRANSLATION_PROVIDER } from 'ng2-alfresco-core'; +import { TRANSLATION_PROVIDER } from '@alfresco/adf-core'; import { AdfModule } from './adf.module'; import { CommonModule } from './common/common.module'; @@ -48,6 +56,7 @@ import { LocationLinkComponent } from './components/location-link/location-link. imports: [ BrowserModule, RouterModule.forRoot(APP_ROUTES, { + useHash: true, enableTracing: false // enable for debug only }), AdfModule, diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 91ae0667d..3a28d1cef 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,22 +1,30 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Routes } from '@angular/router'; -import { AuthGuardEcm } from 'ng2-alfresco-core'; +import { AuthGuardEcm } from '@alfresco/adf-core'; import { LayoutComponent } from './components/layout/layout.component'; @@ -129,9 +137,8 @@ export const APP_ROUTES: Routes = [ component: GenericErrorComponent } ], - canActivate: [ - AuthGuardEcm - ] + canActivateChild: [ AuthGuardEcm ], + canActivate: [ AuthGuardEcm ] } ]; diff --git a/src/app/common/common.module.ts b/src/app/common/common.module.ts index a31010d56..c23ad7a14 100644 --- a/src/app/common/common.module.ts +++ b/src/app/common/common.module.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { NgModule } from '@angular/core'; @@ -29,7 +37,6 @@ import { NodeMoveDirective } from './directives/node-move.directive'; import { DownloadFileDirective } from './directives/node-download.directive'; import { NodeRestoreDirective } from './directives/node-restore.directive'; import { NodePermanentDeleteDirective } from './directives/node-permanent-delete.directive'; -import { NodeFavoriteDirective } from './directives/node-favorite.directive'; import { ContentManagementService } from './services/content-management.service'; import { BrowsingFilesService } from './services/browsing-files.service'; @@ -52,8 +59,7 @@ export function declarations() { NodeMoveDirective, DownloadFileDirective, NodeRestoreDirective, - NodePermanentDeleteDirective, - NodeFavoriteDirective + NodePermanentDeleteDirective ]; } diff --git a/src/app/common/directives/node-copy.directive.spec.ts b/src/app/common/directives/node-copy.directive.spec.ts index 113df96da..734527a33 100644 --- a/src/app/common/directives/node-copy.directive.spec.ts +++ b/src/app/common/directives/node-copy.directive.spec.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, DebugElement } from '@angular/core'; @@ -21,8 +29,8 @@ import { By } from '@angular/platform-browser'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, TranslationService, NodesApiService, NotificationService } from 'ng2-alfresco-core'; -import { DocumentListModule } from 'ng2-alfresco-documentlist'; +import { CoreModule, TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; +import { DocumentListModule } from '@alfresco/adf-content-services'; import { NodeActionsService } from '../services/node-actions.service'; import { ContentManagementService } from '../services/content-management.service'; @@ -92,7 +100,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -112,7 +120,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_COPY.PLURAL', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_COPY.PLURAL', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -131,7 +139,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_COPY.PARTIAL_SINGULAR', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_COPY.PARTIAL_SINGULAR', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -152,7 +160,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_COPY.PARTIAL_PLURAL', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_COPY.PARTIAL_PLURAL', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -255,7 +263,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'APP.ACTIONS.UNDO', 10000 ); expect(nodesApiService.deleteNode).toHaveBeenCalledWith(createdItems[0].entry.id, { permanent: true }); @@ -279,7 +287,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_COPY.PLURAL', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_COPY.PLURAL', 'APP.ACTIONS.UNDO', 10000 ); expect(spyOnDeleteNode).toHaveBeenCalled(); @@ -300,7 +308,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(nodesApiService.deleteNode).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction['calls'].allArgs()) - .toEqual([['APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'Undo', 10000], + .toEqual([['APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'APP.ACTIONS.UNDO', 10000], ['APP.MESSAGES.ERRORS.GENERIC', '', 3000]]); }); @@ -317,7 +325,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(nodesApiService.deleteNode).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction['calls'].allArgs()) - .toEqual([['APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'Undo', 10000], + .toEqual([['APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'APP.ACTIONS.UNDO', 10000], ['APP.MESSAGES.ERRORS.GENERIC', '', 3000]]); }); @@ -334,7 +342,7 @@ describe('NodeCopyDirective', () => { expect(service.copyNodes).toHaveBeenCalled(); expect(nodesApiService.deleteNode).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction['calls'].allArgs()) - .toEqual([['APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'Undo', 10000], + .toEqual([['APP.MESSAGES.INFO.NODE_COPY.SINGULAR', 'APP.ACTIONS.UNDO', 10000], ['APP.MESSAGES.ERRORS.PERMISSION', '', 3000]]); }); }); diff --git a/src/app/common/directives/node-copy.directive.ts b/src/app/common/directives/node-copy.directive.ts index 2e771f252..5cb250cce 100644 --- a/src/app/common/directives/node-copy.directive.ts +++ b/src/app/common/directives/node-copy.directive.ts @@ -1,24 +1,32 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Directive, HostListener, Input } from '@angular/core'; import { Observable } from 'rxjs/Rx'; -import { TranslationService, NodesApiService, NotificationService } from 'ng2-alfresco-core'; +import { TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; import { MinimalNodeEntity } from 'alfresco-js-api'; import { NodeActionsService } from '../services/node-actions.service'; import { ContentManagementService } from '../services/content-management.service'; @@ -96,7 +104,7 @@ export class NodeCopyDirective { } catch (err) { /* Do nothing, keep the original message */ } } - const undo = (numberOfCopiedItems > 0) ? 'Undo' : ''; + const undo = (numberOfCopiedItems > 0) ? this.translation.translate.instant('APP.ACTIONS.UNDO') : ''; const withUndo = (numberOfCopiedItems > 0) ? '_WITH_UNDO' : ''; this.translation.get(i18nMessageString, { success: numberOfCopiedItems, failed: failedItems }).subscribe(message => { diff --git a/src/app/common/directives/node-delete.directive.spec.ts b/src/app/common/directives/node-delete.directive.spec.ts index cf91a10ac..e681cd699 100644 --- a/src/app/common/directives/node-delete.directive.spec.ts +++ b/src/app/common/directives/node-delete.directive.spec.ts @@ -1,27 +1,36 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { TestBed, ComponentFixture, fakeAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { CoreModule, TranslationService, NodesApiService, NotificationService } from 'ng2-alfresco-core'; +import { CoreModule, TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; import { Component, DebugElement } from '@angular/core'; +import { Observable } from 'rxjs/Rx'; + import { NodeDeleteDirective } from './node-delete.directive'; import { ContentManagementService } from '../services/content-management.service'; -import { Observable } from 'rxjs/Rx'; @Component({ template: '
' @@ -83,7 +92,7 @@ describe('NodeDeleteDirective', () => { element.triggerEventHandler('click', null); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_DELETION.SINGULAR', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_DELETION.SINGULAR', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -112,7 +121,7 @@ describe('NodeDeleteDirective', () => { element.triggerEventHandler('click', null); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_DELETION.PLURAL', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_DELETION.PLURAL', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -150,7 +159,7 @@ describe('NodeDeleteDirective', () => { element.triggerEventHandler('click', null); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_DELETION.PARTIAL_SINGULAR', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_DELETION.PARTIAL_SINGULAR', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -179,7 +188,7 @@ describe('NodeDeleteDirective', () => { element.triggerEventHandler('click', null); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_DELETION.PARTIAL_PLURAL', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_DELETION.PARTIAL_PLURAL', 'APP.ACTIONS.UNDO', 10000 ); }); }); diff --git a/src/app/common/directives/node-delete.directive.ts b/src/app/common/directives/node-delete.directive.ts index 95502af98..42017244d 100644 --- a/src/app/common/directives/node-delete.directive.ts +++ b/src/app/common/directives/node-delete.directive.ts @@ -1,23 +1,31 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Directive, HostListener, Input } from '@angular/core'; -import { TranslationService, NodesApiService, NotificationService } from 'ng2-alfresco-core'; +import { TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; import { MinimalNodeEntity } from 'alfresco-js-api'; import { Observable } from 'rxjs/Rx'; @@ -59,7 +67,7 @@ export class NodeDeleteDirective { this.getDeleteMesssage(processedData) .subscribe((message) => { - const withUndo = processedData.someSucceeded ? 'Undo' : ''; + const withUndo = processedData.someSucceeded ? this.translation.translate.instant('APP.ACTIONS.UNDO') : ''; this.notification.openSnackMessageAction(message, withUndo, NodeDeleteDirective.DELETE_MESSAGE_DURATION) .onAction() diff --git a/src/app/common/directives/node-download.directive.spec.ts b/src/app/common/directives/node-download.directive.spec.ts index 89875eb9b..82aba7dfe 100644 --- a/src/app/common/directives/node-download.directive.spec.ts +++ b/src/app/common/directives/node-download.directive.spec.ts @@ -1,23 +1,31 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { TestBed, ComponentFixture } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { CoreModule, AlfrescoApiService } from 'ng2-alfresco-core'; +import { CoreModule, AlfrescoApiService } from '@alfresco/adf-core'; import { MatDialog } from '@angular/material'; import { Component, DebugElement } from '@angular/core'; import { DownloadFileDirective } from './node-download.directive'; diff --git a/src/app/common/directives/node-download.directive.ts b/src/app/common/directives/node-download.directive.ts index efb808932..7c9a9a777 100644 --- a/src/app/common/directives/node-download.directive.ts +++ b/src/app/common/directives/node-download.directive.ts @@ -1,24 +1,33 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Directive, Input, HostListener } from '@angular/core'; import { MatDialog } from '@angular/material'; import { MinimalNodeEntity } from 'alfresco-js-api'; -import { AlfrescoApiService, DownloadZipDialogComponent } from 'ng2-alfresco-core'; +import { AlfrescoApiService } from '@alfresco/adf-core'; +import { DownloadZipDialogComponent } from '@alfresco/adf-content-services'; @Directive({ selector: '[app-download-node]' diff --git a/src/app/common/directives/node-favorite.directive.spec.ts b/src/app/common/directives/node-favorite.directive.spec.ts deleted file mode 100644 index 325e3e2ea..000000000 --- a/src/app/common/directives/node-favorite.directive.spec.ts +++ /dev/null @@ -1,332 +0,0 @@ -/*! - * @license - * Copyright 2017 Alfresco Software, Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { TestBed, ComponentFixture, fakeAsync, tick } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { CoreModule, TranslationService, NodesApiService } from 'ng2-alfresco-core'; -import { Component, DebugElement } from '@angular/core'; -import { Observable } from 'rxjs/Rx'; - -import { AlfrescoApiService } from 'ng2-alfresco-core'; -import { ContentManagementService } from '../services/content-management.service'; -import { NodeFavoriteDirective } from './node-favorite.directive'; - -@Component({ - template: '
' -}) -class TestComponent { - selection; -} - -describe('NodeFavoriteDirective', () => { - let component: TestComponent; - let fixture: ComponentFixture; - let element: DebugElement; - let directiveInstance; - let apiService; - let contentService; - let favoritesApi; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - CoreModule - ], - declarations: [ - TestComponent, - NodeFavoriteDirective - ], - providers: [ - ContentManagementService, - AlfrescoApiService - ] - }); - - fixture = TestBed.createComponent(TestComponent); - component = fixture.componentInstance; - element = fixture.debugElement.query(By.directive(NodeFavoriteDirective)); - directiveInstance = element.injector.get(NodeFavoriteDirective); - - contentService = TestBed.get(ContentManagementService); - apiService = TestBed.get(AlfrescoApiService); - favoritesApi = apiService.getInstance().core.favoritesApi; - }); - - describe('selection input change event', () => { - it('does not call markFavoritesNodes() if input list is empty', () => { - spyOn(directiveInstance, 'markFavoritesNodes'); - - component.selection = []; - - fixture.detectChanges(); - - expect(directiveInstance.markFavoritesNodes).not.toHaveBeenCalledWith(); - }); - - it('calls markFavoritesNodes() on input change', () => { - spyOn(directiveInstance, 'markFavoritesNodes'); - - component.selection = [{ entry: { id: '1', name: 'name1' } }]; - - fixture.detectChanges(); - - expect(directiveInstance.markFavoritesNodes).toHaveBeenCalledWith(component.selection); - - component.selection = [ - { entry: { id: '1', name: 'name1' } }, - { entry: { id: '1', name: 'name1' } } - ]; - - fixture.detectChanges(); - - expect(directiveInstance.markFavoritesNodes).toHaveBeenCalledWith(component.selection); - }); - }); - - describe('markFavoritesNodes()', () => { - let favoritesApiSpy; - - beforeEach(() => { - favoritesApiSpy = spyOn(favoritesApi, 'getFavorite'); - }); - - it('check each selected node if it is a favorite', fakeAsync(() => { - favoritesApiSpy.and.returnValue(Promise.resolve()); - - component.selection = [ - { entry: { id: '1', name: 'name1' } }, - { entry: { id: '2', name: 'name2' } } - ]; - - fixture.detectChanges(); - tick(); - - expect(favoritesApiSpy.calls.count()).toBe(2); - })); - - it('it does not check processed node when another is unselected', fakeAsync(() => { - favoritesApiSpy.and.returnValue(Promise.resolve()); - - component.selection = [ - { entry: { id: '1', name: 'name1' } }, - { entry: { id: '2', name: 'name2' } } - ]; - - fixture.detectChanges(); - tick(); - - expect(directiveInstance.favorites.length).toBe(2); - expect(favoritesApiSpy.calls.count()).toBe(2); - - favoritesApiSpy.calls.reset(); - - component.selection = [ - { entry: { id: '2', name: 'name2' } } - ]; - - fixture.detectChanges(); - tick(); - - expect(directiveInstance.favorites.length).toBe(1); - expect(favoritesApiSpy).not.toHaveBeenCalled(); - })); - - it('it does not check processed nodes when another is selected', fakeAsync(() => { - favoritesApiSpy.and.returnValue(Promise.resolve()); - - component.selection = [ - { entry: { id: '1', name: 'name1' } }, - { entry: { id: '2', name: 'name2' } } - ]; - - fixture.detectChanges(); - tick(); - - expect(directiveInstance.favorites.length).toBe(2); - expect(favoritesApiSpy.calls.count()).toBe(2); - - favoritesApiSpy.calls.reset(); - - component.selection = [ - { entry: { id: '1', name: 'name1' } }, - { entry: { id: '2', name: 'name2' } }, - { entry: { id: '3', name: 'name3' } } - ]; - - fixture.detectChanges(); - tick(); - - expect(directiveInstance.favorites.length).toBe(3); - expect(favoritesApiSpy.calls.count()).toBe(1); - })); - }); - - describe('toggleFavorite()', () => { - let removeFavoriteSpy; - let addFavoriteSpy; - - beforeEach(() => { - removeFavoriteSpy = spyOn(favoritesApi, 'removeFavoriteSite'); - addFavoriteSpy = spyOn(favoritesApi, 'addFavorite'); - }); - - it('does not perform action if favorites collection is empty', () => { - component.selection = []; - - fixture.detectChanges(); - element.triggerEventHandler('click', null); - - expect(removeFavoriteSpy).not.toHaveBeenCalled(); - expect(addFavoriteSpy).not.toHaveBeenCalled(); - }); - - it('calls addFavorite() if none is a favorite', fakeAsync(() => { - addFavoriteSpy.and.returnValue(Promise.resolve()); - - directiveInstance.favorites = [ - { entry: { id: '1', name: 'name1', isFavorite: false } }, - { entry: { id: '2', name: 'name2', isFavorite: false } } - ]; - - element.triggerEventHandler('click', null); - tick(); - - expect(addFavoriteSpy.calls.argsFor(0)[1].length).toBe(2); - })); - - it('calls addFavorite() on the node that is not a favorite in selection', fakeAsync(() => { - addFavoriteSpy.and.returnValue(Promise.resolve()); - - directiveInstance.favorites = [ - { entry: { id: '1', name: 'name1', isFile: true, isFolder: false, isFavorite: false } }, - { entry: { id: '2', name: 'name2', isFile: true, isFolder: false, isFavorite: true } } - ]; - - element.triggerEventHandler('click', null); - tick(); - - const callArgs = addFavoriteSpy.calls.argsFor(0)[1]; - const callParameter = callArgs[0]; - - expect(callArgs.length).toBe(1); - expect(callParameter.target.file.guid).toBe('1'); - })); - - it('calls removeFavoriteSite() if all are favorites', fakeAsync(() => { - addFavoriteSpy.and.returnValue(Promise.resolve()); - - directiveInstance.favorites = [ - { entry: { id: '1', name: 'name1', isFavorite: true } }, - { entry: { id: '2', name: 'name2', isFavorite: true } } - ]; - - element.triggerEventHandler('click', null); - tick(); - - expect(removeFavoriteSpy.calls.count()).toBe(2); - })); - }); - - describe('getFavorite()', () => { - it('process node as favorite', fakeAsync(() => { - spyOn(favoritesApi, 'getFavorite').and.returnValue(Promise.resolve()); - - component.selection = [ - { entry: { id: '1', name: 'name1' } } - ]; - - fixture.detectChanges(); - tick(); - - expect(directiveInstance.favorites[0].entry.isFavorite).toBe(true); - })); - - it('process node as not a favorite', fakeAsync(() => { - spyOn(favoritesApi, 'getFavorite').and.returnValue(Promise.reject(null)); - - component.selection = [ - { entry: { id: '1', name: 'name1' } } - ]; - - fixture.detectChanges(); - tick(); - - expect(directiveInstance.favorites[0].entry.isFavorite).toBe(false); - })); - }); - - describe('reset()', () => { - beforeEach(() => { - spyOn(favoritesApi, 'removeFavoriteSite').and.returnValue(Promise.resolve()); - spyOn(favoritesApi, 'addFavorite').and.returnValue(Promise.resolve()); - }); - - it('reset favorite collection after addFavorite()', fakeAsync(() => { - directiveInstance.favorites = [ - { entry: { id: '1', name: 'name1', isFavorite: true } } - ]; - - element.triggerEventHandler('click', null); - tick(); - - expect(directiveInstance.favorites.length).toBe(0); - })); - - it('reset favorite collection after removeFavoriteSite()', fakeAsync(() => { - directiveInstance.favorites = [ - { entry: { id: '1', name: 'name1', isFavorite: false } } - ]; - - element.triggerEventHandler('click', null); - tick(); - - expect(directiveInstance.favorites.length).toBe(0); - })); - }); - - describe('hasFavorites()', () => { - it('returns false if favorites collection is empty', () => { - directiveInstance.favorites = []; - - const hasFavorites = directiveInstance.hasFavorites(); - - expect(hasFavorites).toBe(false); - }); - - it('returns false if some are not favorite', () => { - directiveInstance.favorites = [ - { entry: { id: '1', name: 'name1', isFavorite: true } }, - { entry: { id: '2', name: 'name2', isFavorite: false } } - ]; - - const hasFavorites = directiveInstance.hasFavorites(); - - expect(hasFavorites).toBe(false); - }); - - it('returns true if all are favorite', () => { - directiveInstance.favorites = [ - { entry: { id: '1', name: 'name1', isFavorite: true } }, - { entry: { id: '2', name: 'name2', isFavorite: true } } - ]; - - const hasFavorites = directiveInstance.hasFavorites(); - - expect(hasFavorites).toBe(true); - }); - }); -}); diff --git a/src/app/common/directives/node-favorite.directive.ts b/src/app/common/directives/node-favorite.directive.ts deleted file mode 100644 index 27460d1b1..000000000 --- a/src/app/common/directives/node-favorite.directive.ts +++ /dev/null @@ -1,181 +0,0 @@ -/*! - * @license - * Copyright 2017 Alfresco Software, Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Directive, HostListener, Input, OnChanges } from '@angular/core'; -import { AlfrescoApiService } from 'ng2-alfresco-core'; - -import { MinimalNodeEntity, FavoriteBody } from 'alfresco-js-api'; -import { Observable } from 'rxjs/Rx'; - -import { ContentManagementService } from '../services/content-management.service'; - -@Directive({ - selector: '[app-favorite-node]', - exportAs: 'favorite' -}) -export class NodeFavoriteDirective implements OnChanges { - private favorites: any[] = []; - - @Input('app-favorite-node') - selection: any[]; - - @HostListener('click') - onClick() { - this.toggleFavorite(); - } - - constructor( - public content: ContentManagementService, - private alfrescoApiService: AlfrescoApiService - ) {} - - ngOnChanges(changes) { - if (!changes.selection.currentValue.length) { - return; - } - - this.markFavoritesNodes(changes.selection.currentValue); - } - - toggleFavorite() { - if (!this.favorites.length) { - return; - } - - const every = this.favorites.every((selected) => selected.entry.isFavorite); - - if (every) { - const batch = this.favorites.map((selected) => { - // shared files have nodeId - const id = selected.entry.nodeId || selected.entry.id; - - return Observable.of(this.alfrescoApiService.getInstance().core.favoritesApi.removeFavoriteSite('-me-', id)); - }); - - Observable.forkJoin(batch) - .subscribe(() => { - this.content.toggleFavorite.next(); - this.reset(); - }); - } - - if (!every) { - const notFavorite = this.favorites.filter((node) => !node.entry.isFavorite); - const body: FavoriteBody[] = notFavorite.map((node) => this.createFavoriteBody(node)); - - Observable.from(this.alfrescoApiService.getInstance().core.favoritesApi.addFavorite('-me-', body)) - .subscribe(() => { - this.content.toggleFavorite.next(); - this.reset(); - }); - } - } - - markFavoritesNodes(selection) { - if (selection.length < this.favorites.length) { - const newFavorites = this.reduce(this.favorites, selection); - this.favorites = newFavorites; - } - - const result = this.diff(selection, this.favorites); - const batch = this.getProcessBatch(result); - - Observable.forkJoin(batch).subscribe((data) => this.favorites.push(...data)); - } - - hasFavorites(): boolean { - if (this.favorites && !this.favorites.length) { - return false; - } - - return this.favorites.every((selected) => selected.entry.isFavorite); - } - - private reset() { - this.favorites = []; - } - - private getProcessBatch(selection): any[] { - return selection.map((selected) => this.getFavorite(selected)); - } - - private getFavorite(selected): Observable { - const { name, isFile, isFolder } = selected.entry; - // shared files have nodeId - const id = selected.entry.nodeId || selected.entry.id; - - const promise = this.alfrescoApiService.getInstance() - .core.favoritesApi.getFavorite('-me-', id); - - return Observable.from(promise) - .map(() => ({ - entry: { - id, - isFolder, - isFile, - name, - isFavorite: true - } - })) - .catch(() => { - return Observable.of({ - entry: { - id, - isFolder, - isFile, - name, - isFavorite: false - } - }); - }); - } - - private createFavoriteBody(node): FavoriteBody { - const type = this.getNodeType(node); - // shared files have nodeId - const id = node.entry.nodeId || node.entry.id; - - return { - target: { - [type]: { - guid: id - } - } - }; - } - - private getNodeType(node): string { - // shared could only be files - if (!node.entry.isFile && !node.entry.isFolder) { - return 'file'; - } - - return node.entry.isFile ? 'file' : 'folder'; - } - - private diff(list, patch): any[] { - const ids = patch.map(item => item.entry.id); - - return list.filter(item => ids.includes(item.entry.id) ? null : item); - } - - private reduce(patch, comparator): any[] { - const ids = comparator.map(item => item.entry.id); - - return patch.filter(item => ids.includes(item.entry.id) ? item : null); - } -} diff --git a/src/app/common/directives/node-move.directive.spec.ts b/src/app/common/directives/node-move.directive.spec.ts index 98424d084..8c57e73df 100644 --- a/src/app/common/directives/node-move.directive.spec.ts +++ b/src/app/common/directives/node-move.directive.spec.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, DebugElement } from '@angular/core'; @@ -21,8 +29,8 @@ import { By } from '@angular/platform-browser'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, TranslationService, NodesApiService, NotificationService } from 'ng2-alfresco-core'; -import { DocumentListModule } from 'ng2-alfresco-documentlist'; +import { CoreModule, TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; +import { DocumentListModule } from '@alfresco/adf-content-services'; import { NodeActionsService } from '../services/node-actions.service'; import { ContentManagementService } from '../services/content-management.service'; @@ -107,7 +115,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -132,7 +140,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_MOVE.PLURAL', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_MOVE.PLURAL', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -155,7 +163,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_MOVE.PARTIAL.SINGULAR', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_MOVE.PARTIAL.SINGULAR', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -180,7 +188,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_MOVE.PARTIAL.PLURAL', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_MOVE.PARTIAL.PLURAL', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -204,7 +212,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_MOVE.SINGULAR APP.MESSAGES.INFO.NODE_MOVE.PARTIAL.FAIL', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_MOVE.SINGULAR APP.MESSAGES.INFO.NODE_MOVE.PARTIAL.FAIL', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -228,7 +236,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodes).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction).toHaveBeenCalledWith( - 'APP.MESSAGES.INFO.NODE_MOVE.SINGULAR APP.MESSAGES.INFO.NODE_MOVE.PARTIAL.SINGULAR', 'Undo', 10000 + 'APP.MESSAGES.INFO.NODE_MOVE.SINGULAR APP.MESSAGES.INFO.NODE_MOVE.PARTIAL.SINGULAR', 'APP.ACTIONS.UNDO', 10000 ); }); @@ -348,7 +356,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodeAction) .toHaveBeenCalledWith(movedItems.succeeded[0].itemMoved.entry, movedItems.succeeded[0].initialParentId); expect(notificationService.openSnackMessageAction) - .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'Undo', 10000); + .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'APP.ACTIONS.UNDO', 10000); }); it('should move node back to initial parent, after succeeded move of a single file', () => { @@ -370,7 +378,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodeAction).toHaveBeenCalledWith(node.entry, initialParent); expect(notificationService.openSnackMessageAction) - .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'Undo', 10000); + .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'APP.ACTIONS.UNDO', 10000); }); it('should restore deleted folder back to initial parent, after succeeded moving all its files', () => { @@ -396,7 +404,7 @@ describe('NodeMoveDirective', () => { expect(nodesApiService.restoreNode).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction) - .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'Undo', 10000); + .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'APP.ACTIONS.UNDO', 10000); }); it('should notify when error occurs on Undo Move action', () => { @@ -422,7 +430,7 @@ describe('NodeMoveDirective', () => { expect(nodesApiService.restoreNode).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction) - .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'Undo', 10000); + .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'APP.ACTIONS.UNDO', 10000); expect(notificationService.openSnackMessage) .toHaveBeenCalledWith('APP.MESSAGES.ERRORS.GENERIC', 3000); }); @@ -449,7 +457,7 @@ describe('NodeMoveDirective', () => { expect(nodesApiService.restoreNode).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction) - .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'Undo', 10000); + .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'APP.ACTIONS.UNDO', 10000); expect(notificationService.openSnackMessage) .toHaveBeenCalledWith('APP.MESSAGES.ERRORS.GENERIC', 3000); }); @@ -477,7 +485,7 @@ describe('NodeMoveDirective', () => { expect(service.moveNodes).toHaveBeenCalled(); expect(nodesApiService.restoreNode).toHaveBeenCalled(); expect(notificationService.openSnackMessageAction) - .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'Undo', 10000); + .toHaveBeenCalledWith('APP.MESSAGES.INFO.NODE_MOVE.SINGULAR', 'APP.ACTIONS.UNDO', 10000); expect(notificationService.openSnackMessage) .toHaveBeenCalledWith('APP.MESSAGES.ERRORS.PERMISSION', 3000); }); diff --git a/src/app/common/directives/node-move.directive.ts b/src/app/common/directives/node-move.directive.ts index 635234863..6bb4bcbfe 100644 --- a/src/app/common/directives/node-move.directive.ts +++ b/src/app/common/directives/node-move.directive.ts @@ -1,23 +1,31 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Directive, HostListener, Input } from '@angular/core'; -import { TranslationService, NodesApiService, NotificationService } from 'ng2-alfresco-core'; +import { TranslationService, NodesApiService, NotificationService } from '@alfresco/adf-core'; import { MinimalNodeEntity } from 'alfresco-js-api'; import { ContentManagementService } from '../services/content-management.service'; @@ -46,7 +54,7 @@ export class NodeMoveDirective { ) {} moveSelected() { - const permissionForMove: string = 'delete'; + const permissionForMove = '!'; Observable.zip( this.nodeActionsService.moveNodes(this.selection, permissionForMove), @@ -110,7 +118,7 @@ export class NodeMoveDirective { errorMessage = this.getErrorMessage(info); } - const undo = (succeeded + partiallySucceeded > 0) ? 'Undo' : ''; + const undo = (succeeded + partiallySucceeded > 0) ? this.translation.translate.instant('APP.ACTIONS.UNDO') : ''; const withUndo = errorMessage ? '' : '_WITH_UNDO'; failedMessage = errorMessage ? errorMessage : failedMessage; diff --git a/src/app/common/directives/node-permanent-delete.directive.spec.ts b/src/app/common/directives/node-permanent-delete.directive.spec.ts index 9bab26f07..c16659601 100644 --- a/src/app/common/directives/node-permanent-delete.directive.spec.ts +++ b/src/app/common/directives/node-permanent-delete.directive.spec.ts @@ -1,25 +1,33 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, DebugElement } from '@angular/core'; import { TestBed, ComponentFixture, async, fakeAsync, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, AlfrescoApiService, TranslationService, NotificationService } from 'ng2-alfresco-core'; +import { CoreModule, AlfrescoApiService, TranslationService, NotificationService } from '@alfresco/adf-core'; import { NodePermanentDeleteDirective } from './node-permanent-delete.directive'; diff --git a/src/app/common/directives/node-permanent-delete.directive.ts b/src/app/common/directives/node-permanent-delete.directive.ts index 8c54da68d..72417fabf 100644 --- a/src/app/common/directives/node-permanent-delete.directive.ts +++ b/src/app/common/directives/node-permanent-delete.directive.ts @@ -1,24 +1,32 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Directive, ElementRef, HostListener, Input } from '@angular/core'; import { Observable } from 'rxjs/Rx'; -import { TranslationService, AlfrescoApiService, NotificationService } from 'ng2-alfresco-core'; +import { TranslationService, AlfrescoApiService, NotificationService } from '@alfresco/adf-core'; import { MinimalNodeEntity, DeletedNodeEntry, PathInfoEntity } from 'alfresco-js-api'; @Directive({ diff --git a/src/app/common/directives/node-restore.directive.spec.ts b/src/app/common/directives/node-restore.directive.spec.ts index 3a282a53c..314f2ade7 100644 --- a/src/app/common/directives/node-restore.directive.spec.ts +++ b/src/app/common/directives/node-restore.directive.spec.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, DebugElement } from '@angular/core'; @@ -21,7 +29,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, ComponentFixture, async, fakeAsync, tick } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, AlfrescoApiService, TranslationService, NotificationService } from 'ng2-alfresco-core'; +import { CoreModule, AlfrescoApiService, TranslationService, NotificationService } from '@alfresco/adf-core'; import { NodeRestoreDirective } from './node-restore.directive'; diff --git a/src/app/common/directives/node-restore.directive.ts b/src/app/common/directives/node-restore.directive.ts index 13a6799cf..a0a5109b6 100644 --- a/src/app/common/directives/node-restore.directive.ts +++ b/src/app/common/directives/node-restore.directive.ts @@ -1,25 +1,33 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Directive, ElementRef, HostListener, Input } from '@angular/core'; import { Router } from '@angular/router'; import { Observable } from 'rxjs/Rx'; -import { TranslationService, AlfrescoApiService, NotificationService } from 'ng2-alfresco-core'; +import { TranslationService, AlfrescoApiService, NotificationService } from '@alfresco/adf-core'; import { MinimalNodeEntity, DeletedNodeEntry, PathInfoEntity, DeletedNodesPaging } from 'alfresco-js-api'; @Directive({ @@ -236,7 +244,7 @@ export class NodeRestoreDirective { private restoreNotification(): void { const status = Object.assign({}, this.restoreProcessStatus); - const action = (status.oneSucceeded && !status.someFailed) ? 'View' : ''; + const action = (status.oneSucceeded && !status.someFailed) ? this.translation.translate.instant('APP.ACTIONS.VIEW') : ''; this.getRestoreMessage() .subscribe((message) => { diff --git a/src/app/common/material.module.ts b/src/app/common/material.module.ts index 8aed00ac3..b516f4ec6 100644 --- a/src/app/common/material.module.ts +++ b/src/app/common/material.module.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { NgModule } from '@angular/core'; diff --git a/src/app/common/services/browsing-files.service.spec.ts b/src/app/common/services/browsing-files.service.spec.ts index 4120ec037..121bf4914 100644 --- a/src/app/common/services/browsing-files.service.spec.ts +++ b/src/app/common/services/browsing-files.service.spec.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { BrowsingFilesService } from './browsing-files.service'; @@ -24,7 +32,7 @@ describe('BrowsingFilesService', () => { service = new BrowsingFilesService(); }); - it('subscribs to event', () => { + it('subscribes to event', () => { const value: any = 'test-value'; service.onChangeParent.subscribe((result) => { diff --git a/src/app/common/services/browsing-files.service.ts b/src/app/common/services/browsing-files.service.ts index cca3528f7..c47067f0f 100644 --- a/src/app/common/services/browsing-files.service.ts +++ b/src/app/common/services/browsing-files.service.ts @@ -1,21 +1,29 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ -import { Subject } from 'rxjs/Subject'; +import { Subject } from 'rxjs/Rx'; import { Injectable } from '@angular/core'; import { MinimalNodeEntryEntity } from 'alfresco-js-api'; diff --git a/src/app/common/services/content-management.service.ts b/src/app/common/services/content-management.service.ts index 7aa324d71..477a0e970 100644 --- a/src/app/common/services/content-management.service.ts +++ b/src/app/common/services/content-management.service.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Subject } from 'rxjs/Rx'; @@ -23,5 +31,4 @@ export class ContentManagementService { deleteNode = new Subject(); moveNode = new Subject(); restoreNode = new Subject(); - toggleFavorite = new Subject(); } diff --git a/src/app/common/services/node-actions.service.spec.ts b/src/app/common/services/node-actions.service.spec.ts index 04861ec90..618b31841 100644 --- a/src/app/common/services/node-actions.service.spec.ts +++ b/src/app/common/services/node-actions.service.spec.ts @@ -1,36 +1,46 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { TestBed, async } from '@angular/core/testing'; import { MatDialog } from '@angular/material'; import { OverlayModule } from '@angular/cdk/overlay'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, AlfrescoApiService, NodesApiService } from 'ng2-alfresco-core'; -import { DocumentListService, NodeMinimal, NodeMinimalEntry } from 'ng2-alfresco-documentlist'; +import { CoreModule, AlfrescoApiService, NodesApiService } from '@alfresco/adf-core'; +import { DocumentListService } from '@alfresco/adf-content-services'; import { NodeActionsService } from './node-actions.service'; +import { MinimalNodeEntryEntity } from 'alfresco-js-api'; -class TestNode extends NodeMinimalEntry { - constructor(id?: string, isFile?: boolean, name?: string, permission?: string[]) { - super(); - this.entry = new NodeMinimal(); +class TestNode { + entry?: MinimalNodeEntryEntity; + + constructor(id?: string, isFile?: boolean, name?: string, permission?: string[], nodeType?: string) { + this.entry = {}; this.entry.id = id || 'node-id'; this.entry.isFile = isFile; this.entry.isFolder = !isFile; - this.entry.nodeType = isFile ? 'content' : 'folder'; + this.entry.nodeType = nodeType ? nodeType : (isFile ? 'content' : 'folder'); this.entry.name = name; if (permission) { this.entry['allowableOperations'] = permission; @@ -239,6 +249,42 @@ describe('NodeActionsService', () => { }); }); + describe('rowFilter', () => { + let fileToCopy; + let folderToCopy; + let testContentNodeSelectorComponentData; + + beforeEach(() => { + fileToCopy = new TestNode(fileId, isFile, 'file-name'); + folderToCopy = new TestNode(); + + spyOn(service, 'getFirstParentId').and.returnValue('parent-id'); + + const dialog = TestBed.get(MatDialog); + spyOn(dialog, 'open').and.callFake((contentNodeSelectorComponent: any, data: any) => { + testContentNodeSelectorComponentData = data; + return {}; + }); + + service.copyNodes([fileToCopy, folderToCopy]); + }); + + it('should filter destination nodes and not show files', () => { + const file = new TestNode('a-file', isFile); + expect(testContentNodeSelectorComponentData.data.rowFilter({node: file})).toBe(false); + }); + + it('should filter destination nodes and not show the symlinks', () => { + const symlinkDestinationFolder = new TestNode('symlink-id', !isFile, 'symlink-name', [], 'app:folderlink'); + expect(testContentNodeSelectorComponentData.data.rowFilter({node: symlinkDestinationFolder})).toBe(false); + }); + + it('should filter destination nodes and show folders', () => { + const destinationFolder = new TestNode(folderDestinationId); + expect(testContentNodeSelectorComponentData.data.rowFilter({node: destinationFolder})).toBe(true); + }); + }); + describe('copyNodes', () => { let fileToCopy; let folderToCopy; @@ -304,7 +350,7 @@ describe('NodeActionsService', () => { expect(spyOnBatchOperation).toHaveBeenCalled(); expect(testContentNodeSelectorComponentData).toBeDefined(); - expect(testContentNodeSelectorComponentData.data.title).toBe('copy entry-name to ...'); + expect(testContentNodeSelectorComponentData.data.title).toBe('copy \'entry-name\' to ...'); }); it('should use the ContentNodeSelectorComponentData object without file name in title, if no name exists', () => { diff --git a/src/app/common/services/node-actions.service.ts b/src/app/common/services/node-actions.service.ts index 837274980..239e30066 100644 --- a/src/app/common/services/node-actions.service.ts +++ b/src/app/common/services/node-actions.service.ts @@ -1,27 +1,34 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { EventEmitter, Injectable } from '@angular/core'; import { MatDialog } from '@angular/material'; import { Observable, Subject } from 'rxjs/Rx'; -import { AlfrescoApiService, AlfrescoContentService, NodesApiService } from 'ng2-alfresco-core'; -import { DataColumn } from 'ng2-alfresco-datatable'; -import { DocumentListService, ContentNodeSelectorComponent, ContentNodeSelectorComponentData } from 'ng2-alfresco-documentlist'; +import { AlfrescoApiService, ContentService, NodesApiService, DataColumn } from '@alfresco/adf-core'; +import { DocumentListService, ContentNodeSelectorComponent, ContentNodeSelectorComponentData } from '@alfresco/adf-content-services'; import { MinimalNodeEntity, MinimalNodeEntryEntity } from 'alfresco-js-api'; @Injectable() @@ -33,7 +40,7 @@ export class NodeActionsService { contentMoved: Subject = new Subject(); moveDeletedEntries: any[] = []; - constructor(private contentService: AlfrescoContentService, + constructor(private contentService: ContentService, private dialog: MatDialog, private documentListService: DocumentListService, private apiService: AlfrescoApiService, @@ -171,18 +178,23 @@ export class NodeActionsService { let nodeEntryName = ''; if (contentEntities.length === 1 && contentEntities[0].entry.name) { - nodeEntryName = `${contentEntities[0].entry.name} `; + nodeEntryName = `'${contentEntities[0].entry.name}' `; } const data: ContentNodeSelectorComponentData = { title: `${action} ${nodeEntryName}to ...`, currentFolderId: currentParentFolderId, + actionName: action, + dropdownHideMyFiles: true, + dropdownSiteList: [ + {title: 'APP.BROWSE.PERSONAL.SIDENAV_LINK.LABEL', guid: '-my-'}, + {title: 'APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL', guid: '-mysites-'}], rowFilter: this.rowFilter.bind(this), imageResolver: this.imageResolver.bind(this), select: new EventEmitter() }; - this.dialog.open(ContentNodeSelectorComponent, { + this.dialog.open(ContentNodeSelectorComponent, { data, panelClass: 'adf-content-node-selector-dialog', width: '630px' @@ -420,7 +432,7 @@ export class NodeActionsService { // todo: review once 1.10-beta6 is out private rowFilter(row: /*ShareDataRow*/ any): boolean { const node: MinimalNodeEntryEntity = row.node.entry; - return (!node.isFile); + return (!node.isFile && (node.nodeType !== 'app:folderlink')); } // todo: review once 1.10-beta6 is out diff --git a/src/app/components/about/about.component.ts b/src/app/components/about/about.component.ts index 31fcaddbc..d337bbab1 100644 --- a/src/app/components/about/about.component.ts +++ b/src/app/components/about/about.component.ts @@ -1,24 +1,32 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, OnInit } from '@angular/core'; import { Http } from '@angular/http'; -import { DiscoveryApiService, EcmProductVersionModel } from 'ng2-alfresco-core'; -import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable'; +import { DiscoveryApiService } from '@alfresco/adf-core'; +import { EcmProductVersionModel, ObjectDataTableAdapter } from '@alfresco/adf-core'; @Component({ selector: 'app-about', @@ -72,7 +80,7 @@ export class AboutComponent implements OnInit { }); this.http.get('/versions.json').subscribe(response => { - const regexp = new RegExp('^(ng2-alfresco|alfresco-)'); + const regexp = new RegExp('^(@alfresco|alfresco-)'); const alfrescoPackagesTableRepresentation = Object.keys(response.json().dependencies) .filter((val) => regexp.test(val)) diff --git a/src/app/components/current-user/current-user.component.html b/src/app/components/current-user/current-user.component.html index 29e77d41d..638f9230b 100644 --- a/src/app/components/current-user/current-user.component.html +++ b/src/app/components/current-user/current-user.component.html @@ -1,13 +1,11 @@
- - {{ userName }} - - {{ userInitials }} - - +
{{ userName }}
+
+ {{ userInitials }} +
diff --git a/src/app/components/current-user/current-user.component.scss b/src/app/components/current-user/current-user.component.scss index 7aae7f531..b301ce7bc 100644 --- a/src/app/components/current-user/current-user.component.scss +++ b/src/app/components/current-user/current-user.component.scss @@ -33,4 +33,17 @@ $am-avatar-dark-bg: rgba(black, .15); background: $am-avatar-dark-bg; } } + + .current-user__full-name { + width: 100px; + text-align: right; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + display:inline-block; + height: 20px; + font-size: 14px; + line-height: 1.43; + letter-spacing: -0.2px; + } } diff --git a/src/app/components/current-user/current-user.component.spec.ts b/src/app/components/current-user/current-user.component.spec.ts index bc62a2b08..9f3e76188 100644 --- a/src/app/components/current-user/current-user.component.spec.ts +++ b/src/app/components/current-user/current-user.component.spec.ts @@ -1,25 +1,33 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { TestBed, async } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { Observable } from 'rxjs/Rx'; import { MaterialModule } from '../../common/material.module'; -import { CoreModule, PeopleContentService } from 'ng2-alfresco-core'; +import { CoreModule, PeopleContentService } from '@alfresco/adf-core'; import { CurrentUserComponent } from './current-user.component'; diff --git a/src/app/components/current-user/current-user.component.ts b/src/app/components/current-user/current-user.component.ts index c37397a45..cc07ceac7 100644 --- a/src/app/components/current-user/current-user.component.ts +++ b/src/app/components/current-user/current-user.component.ts @@ -1,22 +1,30 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, OnInit, OnDestroy } from '@angular/core'; -import { PeopleContentService, AppConfigService } from 'ng2-alfresco-core'; +import { PeopleContentService, AppConfigService } from '@alfresco/adf-core'; import { Subscription } from 'rxjs/Rx'; @Component({ @@ -25,7 +33,7 @@ import { Subscription } from 'rxjs/Rx'; styleUrls: [ './current-user.component.scss' ] }) export class CurrentUserComponent implements OnInit, OnDestroy { - private personSubscription: Subscription; + private subscriptions: Subscription[] = []; user: any = null; @@ -35,14 +43,13 @@ export class CurrentUserComponent implements OnInit, OnDestroy { ) {} ngOnInit() { - this.personSubscription = this.peopleApi.getCurrentPerson() - .subscribe((person: any) => { - this.user = person.entry; - }); + this.subscriptions = this.subscriptions.concat([ + this.peopleApi.getCurrentPerson().subscribe((person: any) => this.user = person.entry) + ]); } ngOnDestroy() { - this.personSubscription.unsubscribe(); + this.subscriptions.forEach(s => s.unsubscribe()); } get userFirstName(): string { diff --git a/src/app/components/favorites/favorites.component.html b/src/app/components/favorites/favorites.component.html index beebb6856..323786641 100644 --- a/src/app/components/favorites/favorites.component.html +++ b/src/app/components/favorites/favorites.component.html @@ -23,7 +23,7 @@ @@ -58,7 +58,6 @@
diff --git a/src/app/components/favorites/favorites.component.spec.ts b/src/app/components/favorites/favorites.component.spec.ts index 8a2ab77d9..c121bd7ea 100644 --- a/src/app/components/favorites/favorites.component.spec.ts +++ b/src/app/components/favorites/favorites.component.spec.ts @@ -1,25 +1,33 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, async } from '@angular/core/testing'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, NodesApiService, AlfrescoApiService, AlfrescoContentService } from 'ng2-alfresco-core'; +import { CoreModule, NodesApiService, AlfrescoApiService, ContentService } from '@alfresco/adf-core'; import { CommonModule } from '../../common/common.module'; import { LocationLinkComponent } from '../location-link/location-link.component'; @@ -32,7 +40,7 @@ describe('Favorites Routed Component', () => { let component: FavoritesComponent; let nodesApi: NodesApiService; let alfrescoApi: AlfrescoApiService; - let alfrescoContentService: AlfrescoContentService; + let alfrescoContentService: ContentService; let contentService: ContentManagementService; let router: Router; let page; @@ -82,7 +90,7 @@ describe('Favorites Routed Component', () => { nodesApi = TestBed.get(NodesApiService); alfrescoApi = TestBed.get(AlfrescoApiService); - alfrescoContentService = TestBed.get(AlfrescoContentService); + alfrescoContentService = TestBed.get(ContentService); contentService = TestBed.get(ContentManagementService); router = TestBed.get(Router); }); @@ -110,15 +118,6 @@ describe('Favorites Routed Component', () => { expect(component.refresh).toHaveBeenCalled(); }); - - it('should fetch nodes on favorite toggle', () => { - spyOn(component, 'refresh'); - fixture.detectChanges(); - - contentService.toggleFavorite.next(null); - - expect(component.refresh).toHaveBeenCalled(); - }); }); describe('Node navigation', () => { @@ -179,6 +178,56 @@ describe('Favorites Routed Component', () => { }); }); + describe('edit option', () => { + it('should return false if a file node is selected', () => { + const selection = [ + { + entry: { + isFolder: false, + isFile: true + } + } + ]; + + const result = component.showEditOption(selection); + expect(result).toBe(false); + }); + + it('should return false if multiple nodes are selected', () => { + const selection = [ + { + entry: { + isFolder: true, + isFile: false + } + }, + { + entry: { + isFolder: true, + isFile: false + } + } + ]; + + const result = component.showEditOption(selection); + expect(result).toBe(false); + }); + + it('should return true if selected node is a folder', () => { + const selection = [ + { + entry: { + isFolder: true, + isFile: false + } + } + ]; + + const result = component.showEditOption(selection); + expect(result).toBe(true); + }); + }); + describe('refresh', () => { it('should call document list reload', () => { spyOn(component.documentList, 'reload'); diff --git a/src/app/components/favorites/favorites.component.ts b/src/app/components/favorites/favorites.component.ts index 92ebfdbe8..99b858404 100644 --- a/src/app/components/favorites/favorites.component.ts +++ b/src/app/components/favorites/favorites.component.ts @@ -1,27 +1,35 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core'; import { Router } from '@angular/router'; import { Subscription } from 'rxjs/Rx'; -import { MinimalNodeEntryEntity, PathElementEntity, PathInfo } from 'alfresco-js-api'; -import { AlfrescoContentService, NodesApiService } from 'ng2-alfresco-core'; -import { DocumentListComponent } from 'ng2-alfresco-documentlist'; +import { MinimalNodeEntryEntity, MinimalNodeEntity, PathElementEntity, PathInfo } from 'alfresco-js-api'; +import { ContentService, NodesApiService, UserPreferencesService } from '@alfresco/adf-core'; +import { DocumentListComponent } from '@alfresco/adf-content-services'; import { ContentManagementService } from '../../common/services/content-management.service'; import { PageComponent } from '../page.component'; @@ -34,29 +42,28 @@ export class FavoritesComponent extends PageComponent implements OnInit, OnDestr @ViewChild(DocumentListComponent) documentList: DocumentListComponent; - private onEditFolder: Subscription; - private onMoveNode: Subscription; - private onToggleFavorite: Subscription; + private subscriptions: Subscription[] = []; constructor( private router: Router, private nodesApi: NodesApiService, - private contentService: AlfrescoContentService, - private content: ContentManagementService) { - super(); + private contentService: ContentService, + private content: ContentManagementService, + preferences: UserPreferencesService) { + super(preferences); } ngOnInit() { - this.onEditFolder = this.contentService.folderEdit.subscribe(() => this.refresh()); - this.onMoveNode = this.content.moveNode.subscribe(() => this.refresh()); - this.onToggleFavorite = this.content.toggleFavorite - .debounceTime(300).subscribe(() => this.refresh()); + this.subscriptions = this.subscriptions.concat([ + this.content.deleteNode.subscribe(() => this.refresh()), + this.content.restoreNode.subscribe(() => this.refresh()), + this.contentService.folderEdit.subscribe(() => this.refresh()), + this.content.moveNode.subscribe(() => this.refresh()) + ]); } ngOnDestroy() { - this.onEditFolder.unsubscribe(); - this.onMoveNode.unsubscribe(); - this.onToggleFavorite.unsubscribe(); + this.subscriptions.forEach(s => s.unsubscribe()); } fetchNodes(): void { @@ -93,6 +100,10 @@ export class FavoritesComponent extends PageComponent implements OnInit, OnDestr } } + showEditOption(selection: MinimalNodeEntity[]) { + return selection && selection.length === 1 && selection[0].entry.isFolder; + } + refresh(): void { if (this.documentList) { this.documentList.reload(); diff --git a/src/app/components/files/files.component.html b/src/app/components/files/files.component.html index 2341d840a..6461f7859 100644 --- a/src/app/components/files/files.component.html +++ b/src/app/components/files/files.component.html @@ -44,10 +44,10 @@ class="secondary-options"> @@ -84,9 +84,8 @@
+ [parentId]="node?.id" + [disabled]="!canCreateContent(node)"> + (node-dblclick)="onNodeDoubleClick($event)" + (node-select)="onNodeSelect($event, documentList)"> - {{ value }} + {{ value }} @@ -137,6 +137,7 @@ @@ -145,8 +146,10 @@ + (change)="load(true, $event)" + (changePageSize)="onChangePageSize($event)"> diff --git a/src/app/components/files/files.component.spec.ts b/src/app/components/files/files.component.spec.ts index 622e3352e..266be3433 100644 --- a/src/app/components/files/files.component.spec.ts +++ b/src/app/components/files/files.component.spec.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Observable } from 'rxjs/Rx'; @@ -20,7 +28,7 @@ import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, async } from '@angular/core/testing'; import { UploadService, NodesApiService, FileUploadCompleteEvent, - FileUploadDeleteEvent, FileModel, AlfrescoContentService } from 'ng2-alfresco-core'; + FileUploadDeleteEvent, FileModel, ContentService } from '@alfresco/adf-core'; import { CommonModule } from '../../common/common.module'; import { ContentManagementService } from '../../common/services/content-management.service'; @@ -35,7 +43,7 @@ describe('FilesComponent', () => { let fixture; let component: FilesComponent; let contentManagementService: ContentManagementService; - let alfrescoContentService: AlfrescoContentService; + let alfrescoContentService: ContentService; let uploadService: UploadService; let nodesApi: NodesApiService; let router: Router; @@ -62,7 +70,7 @@ describe('FilesComponent', () => { uploadService = TestBed.get(UploadService); nodesApi = TestBed.get(NodesApiService); router = TestBed.get(Router); - alfrescoContentService = TestBed.get(AlfrescoContentService); + alfrescoContentService = TestBed.get(ContentService); browsingFilesService = TestBed.get(BrowsingFilesService); nodeActionsService = TestBed.get(NodeActionsService); }); @@ -137,12 +145,6 @@ describe('FilesComponent', () => { fixture.detectChanges(); }); - it('reset favorites colection onToggleFavorite event', () => { - contentManagementService.toggleFavorite.next(null); - - expect(component.load).toHaveBeenCalled(); - }); - it('calls refresh onContentCopied event if parent is the same', () => { const nodes = [ { entry: { parentId: '1' } }, @@ -262,7 +264,7 @@ describe('FilesComponent', () => { it('calls getNode api with node id', () => { component.fetchNodes('nodeId'); - expect(nodesApi.getNodeChildren).toHaveBeenCalledWith('nodeId', {}); + expect(nodesApi.getNodeChildren).toHaveBeenCalledWith('nodeId', jasmine.any(Object)); }); }); @@ -303,7 +305,14 @@ describe('FilesComponent', () => { spyOn(router, 'navigate').and.stub(); node.isFile = true; - component.onNodeDoubleClick( node); + const event: any = { + detail: { + node: { + entry: node + } + } + }; + component.onNodeDoubleClick(event); expect(router.navigate).toHaveBeenCalledWith(['/preview', node.id]); }); @@ -312,9 +321,17 @@ describe('FilesComponent', () => { spyOn(component, 'navigate').and.stub(); node.isFolder = true; - component.onNodeDoubleClick( node); - expect(component.navigate).toHaveBeenCalled(); + const event: any = { + detail: { + node: { + entry: node + } + } + }; + component.onNodeDoubleClick(event); + + expect(component.navigate).toHaveBeenCalledWith(node.id); }); }); diff --git a/src/app/components/files/files.component.ts b/src/app/components/files/files.component.ts index 0a48e3794..bf656c69b 100644 --- a/src/app/components/files/files.component.ts +++ b/src/app/components/files/files.component.ts @@ -1,25 +1,36 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Observable, Subscription } from 'rxjs/Rx'; -import { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core'; +import { Component, OnInit, OnDestroy, NgZone } from '@angular/core'; import { Router, ActivatedRoute, Params } from '@angular/router'; import { MinimalNodeEntity, MinimalNodeEntryEntity, PathElementEntity, NodePaging, PathElement } from 'alfresco-js-api'; -import { UploadService, FileUploadEvent, NodesApiService, AlfrescoContentService, AlfrescoApiService } from 'ng2-alfresco-core'; +import { + UploadService, FileUploadEvent, NodesApiService, + ContentService, AlfrescoApiService, UserPreferencesService +} from '@alfresco/adf-core'; import { BrowsingFilesService } from '../../common/services/browsing-files.service'; import { ContentManagementService } from '../../common/services/content-management.service'; @@ -31,32 +42,26 @@ import { PageComponent } from '../page.component'; templateUrl: './files.component.html' }) export class FilesComponent extends PageComponent implements OnInit, OnDestroy { + private routeData: any = {}; isValidPath = true; private nodePath: PathElement[]; - private onCopyNode: Subscription; - private onRemoveItem: Subscription; - private onCreateFolder: Subscription; - private onEditFolder: Subscription; - private onDeleteNode: Subscription; - private onMoveNode: Subscription; - private onRestoreNode: Subscription; - private onFileUploadComplete: Subscription; - private onToggleFavorite: Subscription; + private subscriptions: Subscription[] = []; constructor( private router: Router, + private zone: NgZone, private route: ActivatedRoute, private nodesApi: NodesApiService, - private changeDetector: ChangeDetectorRef, private nodeActionsService: NodeActionsService, private uploadService: UploadService, private contentManagementService: ContentManagementService, private browsingFilesService: BrowsingFilesService, - private contentService: AlfrescoContentService, - private apiService: AlfrescoApiService) { - super(); + private contentService: ContentService, + private apiService: AlfrescoApiService, + preferences: UserPreferencesService) { + super(preferences); } ngOnInit() { @@ -85,30 +90,20 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { ); }); - this.onCopyNode = nodeActionsService.contentCopied - .subscribe((nodes) => this.onContentCopied(nodes)); - this.onCreateFolder = contentService.folderCreate.subscribe(() => this.load()); - this.onEditFolder = contentService.folderEdit.subscribe(() => this.load()); - this.onDeleteNode = contentManagementService.deleteNode.subscribe(() => this.load()); - this.onMoveNode = contentManagementService.moveNode.subscribe(() => this.load()); - this.onRestoreNode = contentManagementService.restoreNode.subscribe(() => this.load()); - this.onToggleFavorite = contentManagementService.toggleFavorite.subscribe(() => this.load()); - this.onFileUploadComplete = uploadService.fileUploadComplete - .subscribe(file => this.onFileUploadedEvent(file)); - this.onRemoveItem = uploadService.fileUploadDeleted - .subscribe((file) => this.onFileUploadedEvent(file)); + this.subscriptions = this.subscriptions.concat([ + nodeActionsService.contentCopied.subscribe((nodes) => this.onContentCopied(nodes)), + contentService.folderCreate.subscribe(() => this.load(false, this.pagination)), + contentService.folderEdit.subscribe(() => this.load(false, this.pagination)), + contentManagementService.deleteNode.subscribe(() => this.load(false, this.pagination)), + contentManagementService.moveNode.subscribe(() => this.load(false, this.pagination)), + contentManagementService.restoreNode.subscribe(() => this.load(false, this.pagination)), + uploadService.fileUploadComplete.subscribe(file => this.onFileUploadedEvent(file)), + uploadService.fileUploadDeleted.subscribe((file) => this.onFileUploadedEvent(file)) + ]); } ngOnDestroy() { - this.onCopyNode.unsubscribe(); - this.onRemoveItem.unsubscribe(); - this.onCreateFolder.unsubscribe(); - this.onEditFolder.unsubscribe(); - this.onDeleteNode.unsubscribe(); - this.onMoveNode.unsubscribe(); - this.onRestoreNode.unsubscribe(); - this.onFileUploadComplete.unsubscribe(); - this.onToggleFavorite.unsubscribe(); + this.subscriptions.forEach(s => s.unsubscribe()); this.browsingFilesService.onChangeParent.next(null); } @@ -118,7 +113,13 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { } fetchNodes(parentNodeId?: string, options: any = {}): Observable { - return this.nodesApi.getNodeChildren(parentNodeId, options); + const defaults = { + include: [ 'isLocked', 'path', 'properties', 'allowableOperations' ] + }; + + const queryOptions = Object.assign({}, defaults, options); + + return this.nodesApi.getNodeChildren(parentNodeId, queryOptions); } navigate(nodeId: string = null) { @@ -133,15 +134,24 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { }); } - onNodeDoubleClick(node: MinimalNodeEntryEntity) { - if (node) { - if (node.isFolder) { - this.navigate(node.id); + onNodeDoubleClick(event) { + if (!!event.detail && !!event.detail.node) { + + const node: MinimalNodeEntryEntity = event.detail.node.entry; + if (node) { + + if (node.isFolder) { + this.navigate(node.id); + } + + if (PageComponent.isLockedNode(node)) { + event.preventDefault(); + + } else if (node.isFile) { + this.router.navigate(['/preview', node.id]); + } } - if (node.isFile) { - this.router.navigate(['/preview', node.id]); - } } } @@ -157,7 +167,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { onFileUploadedEvent(event: FileUploadEvent) { if (event && event.file.options.parentId === this.getParentNodeId()) { - this.load(); + this.load(false, this.pagination); } } @@ -167,7 +177,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { return node && node.entry && node.entry.parentId === this.getParentNodeId(); }); if (newNode) { - this.load(); + this.load(false, this.pagination); } } @@ -183,13 +193,33 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy { this.isLoading = showIndicator; this.fetchNodes(this.getParentNodeId(), pagination) + .flatMap((page) => { + if (this.isCurrentPageEmpty(page) && this.isNotFirstPage(page)) { + const newSkipCount = pagination.skipCount - pagination.maxItems; + + return this.fetchNodes(this.getParentNodeId(), {skipCount: newSkipCount, maxItems: pagination.maxItems}); + } + + return Observable.of(page); + }) .subscribe( - (page) => this.onPageLoaded(page), - error => this.onFetchError(error), - () => this.changeDetector.detectChanges() + (page) => this.zone.run(() => this.onPageLoaded(page)), + error => this.onFetchError(error) ); } + isCurrentPageEmpty(page): boolean { + return !this.hasPageEntries(page); + } + + hasPageEntries(page): boolean { + return page && page.list && page.list.entries && page.list.entries.length > 0; + } + + isNotFirstPage(page): boolean { + return (page.list.pagination.skipCount >= page.list.pagination.maxItems); + } + // todo: review this approach once 5.2.3 is out private async updateCurrentNode(node: MinimalNodeEntryEntity) { this.nodePath = null; diff --git a/src/app/components/generic-error/generic-error.component.ts b/src/app/components/generic-error/generic-error.component.ts index 0325292a0..b5c6ad3bb 100644 --- a/src/app/components/generic-error/generic-error.component.ts +++ b/src/app/components/generic-error/generic-error.component.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component } from '@angular/core'; diff --git a/src/app/components/header/header.component.html b/src/app/components/header/header.component.html index d6d641262..a289d2284 100644 --- a/src/app/components/header/header.component.html +++ b/src/app/components/header/header.component.html @@ -1,4 +1,4 @@ - + . */ import { TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { CoreModule, AppConfigService, PeopleContentService } from 'ng2-alfresco-core'; +import { CoreModule, AppConfigService, PeopleContentService } from '@alfresco/adf-core'; import { Observable } from 'rxjs/Rx'; import { CommonModule } from './../../common/common.module'; diff --git a/src/app/components/header/header.component.ts b/src/app/components/header/header.component.ts index 1605eaa2a..cd9636ea2 100644 --- a/src/app/components/header/header.component.ts +++ b/src/app/components/header/header.component.ts @@ -1,22 +1,31 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ -import { Component, ViewEncapsulation } from '@angular/core'; -import { AppConfigService } from 'ng2-alfresco-core'; +import { DomSanitizer } from '@angular/platform-browser'; +import { Component, ViewEncapsulation, SecurityContext } from '@angular/core'; +import { AppConfigService } from '@alfresco/adf-core'; @Component({ selector: 'app-header', @@ -25,16 +34,24 @@ import { AppConfigService } from 'ng2-alfresco-core'; encapsulation: ViewEncapsulation.None }) export class HeaderComponent { - static ASSETS_PATH = '/assets/images/'; - static DEFAULT_LOGO = 'alfresco-logo-white.svg'; + private defaultPath = '/assets/images/alfresco-logo-white.svg'; + private defaultBackgroundColor = '#2196F3'; - constructor(private appConfig: AppConfigService) {} + constructor( + private appConfig: AppConfigService, + private sanitizer: DomSanitizer + ) {} get appName(): string { return this.appConfig.get('application.name'); } get logo() { - return `${HeaderComponent.ASSETS_PATH}${this.appConfig.get('logo', HeaderComponent.DEFAULT_LOGO)}`; + return this.appConfig.get('application.logo', this.defaultPath); + } + + get backgroundColor() { + const color = this.appConfig.get('headerColor', this.defaultBackgroundColor); + return this.sanitizer.sanitize(SecurityContext.STYLE, color); } } diff --git a/src/app/components/layout/layout.component.html b/src/app/components/layout/layout.component.html index 6170b7690..45e9a97f1 100644 --- a/src/app/components/layout/layout.component.html +++ b/src/app/components/layout/layout.component.html @@ -1,8 +1,7 @@
+ [parentId]="node?.id" + [disabled]="!canCreateContent(node)">
diff --git a/src/app/components/layout/layout.component.spec.ts b/src/app/components/layout/layout.component.spec.ts index e9950baed..f4fc2930c 100644 --- a/src/app/components/layout/layout.component.spec.ts +++ b/src/app/components/layout/layout.component.spec.ts @@ -1,24 +1,32 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, ComponentFixture } from '@angular/core/testing'; import { MinimalNodeEntryEntity } from 'alfresco-js-api'; -import { CoreModule, AlfrescoContentService, PeopleContentService } from 'ng2-alfresco-core'; +import { CoreModule, ContentService, PeopleContentService } from '@alfresco/adf-core'; import { Observable } from 'rxjs/Observable'; import { BrowsingFilesService } from '../../common/services/browsing-files.service'; @@ -33,7 +41,7 @@ describe('LayoutComponent', () => { let fixture: ComponentFixture; let component: LayoutComponent; let browsingFilesService: BrowsingFilesService; - let contentService: AlfrescoContentService; + let contentService: ContentService; let node; beforeEach(() => { @@ -65,7 +73,7 @@ describe('LayoutComponent', () => { fixture = TestBed.createComponent(LayoutComponent); component = fixture.componentInstance; browsingFilesService = TestBed.get(BrowsingFilesService); - contentService = TestBed.get(AlfrescoContentService); + contentService = TestBed.get(ContentService); fixture.detectChanges(); }); diff --git a/src/app/components/layout/layout.component.ts b/src/app/components/layout/layout.component.ts index 7d1d67bad..a6b17facf 100644 --- a/src/app/components/layout/layout.component.ts +++ b/src/app/components/layout/layout.component.ts @@ -1,24 +1,32 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, OnInit, OnDestroy } from '@angular/core'; import { Subscription } from 'rxjs/Rx'; import { MinimalNodeEntryEntity } from 'alfresco-js-api'; -import { AlfrescoContentService } from 'ng2-alfresco-core'; +import { ContentService } from '@alfresco/adf-core'; import { BrowsingFilesService } from '../../common/services/browsing-files.service'; @Component({ @@ -29,19 +37,20 @@ import { BrowsingFilesService } from '../../common/services/browsing-files.servi export class LayoutComponent implements OnInit, OnDestroy { node: MinimalNodeEntryEntity; - browsingFilesSubscription: Subscription; + private subscriptions: Subscription[] = []; constructor( - private contentService: AlfrescoContentService, + private contentService: ContentService, private browsingFilesService: BrowsingFilesService) {} ngOnInit() { - this.browsingFilesSubscription = this.browsingFilesService.onChangeParent - .subscribe((node: MinimalNodeEntryEntity) => this.node = node); + this.subscriptions.concat([ + this.browsingFilesService.onChangeParent.subscribe((node: MinimalNodeEntryEntity) => this.node = node) + ]); } ngOnDestroy() { - this.browsingFilesSubscription.unsubscribe(); + this.subscriptions.forEach(s => s.unsubscribe()); } canCreateContent(node: MinimalNodeEntryEntity): boolean { diff --git a/src/app/components/libraries/libraries.component.html b/src/app/components/libraries/libraries.component.html index 0de1d3bb0..4b6a82ea6 100644 --- a/src/app/components/libraries/libraries.component.html +++ b/src/app/components/libraries/libraries.component.html @@ -14,7 +14,6 @@ selectionMode="none" [navigate]="false" [sorting]="[ 'name', 'asc' ]" - [pageSize]="25" [contextMenuActions]="true" [contentActions]="false" (node-dblclick)="onNodeDoubleClick($event)"> @@ -38,11 +37,11 @@ + title="APP.DOCUMENT_LIST.COLUMNS.TITLE"> - + {{ makeLibraryTitle(context.row.obj.entry) }} @@ -65,5 +64,10 @@ + + +
diff --git a/src/app/components/libraries/libraries.component.spec.ts b/src/app/components/libraries/libraries.component.spec.ts index d869760e7..6498569a7 100644 --- a/src/app/components/libraries/libraries.component.spec.ts +++ b/src/app/components/libraries/libraries.component.spec.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Router } from '@angular/router'; @@ -20,7 +28,8 @@ import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, async } from '@angular/core/testing'; import { Observable } from 'rxjs/Rx'; -import { CoreModule , NodesApiService, AlfrescoApiService} from 'ng2-alfresco-core'; +import { CoreModule , NodesApiService, AlfrescoApiService} from '@alfresco/adf-core'; +import { ShareDataTableAdapter } from '@alfresco/adf-content-services'; import { CommonModule } from '../../common/common.module'; import { LibrariesComponent } from './libraries.component'; @@ -101,26 +110,22 @@ describe('Libraries Routed Component', () => { it('sets title with id when duplicate nodes title exists in list', () => { node.title = 'title'; - component.documentList.node = { - list: { - entries: [{ entry: { id: 'some-id', title: 'title' } }] - } - }; + const data = new ShareDataTableAdapter(null); + data.setRows([{ node: { entry: { id: 'some-id', title: 'title' } } }]); + + component.documentList.data = data; const title = component.makeLibraryTitle(node); - expect(title).toContain('nodeId'); }); it('sets title when no duplicate nodes title exists in list', () => { node.title = 'title'; - component.paging = { - list: { - entries: [{ entry: { id: 'some-id', title: 'title-some-id' } }] - } - }; + const data = new ShareDataTableAdapter(null); + data.setRows([{ node: { entry: { id: 'some-id', title: 'title-some-id' } } }]); + component.documentList.data = data; const title = component.makeLibraryTitle(node); expect(title).toBe('title'); diff --git a/src/app/components/libraries/libraries.component.ts b/src/app/components/libraries/libraries.component.ts index e95fe8e95..3185aec72 100644 --- a/src/app/components/libraries/libraries.component.ts +++ b/src/app/components/libraries/libraries.component.ts @@ -1,26 +1,34 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, ViewChild } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; -import { NodesApiService } from 'ng2-alfresco-core'; +import { NodesApiService, UserPreferencesService } from '@alfresco/adf-core'; +import { DocumentListComponent, ShareDataRow } from '@alfresco/adf-content-services'; import { PageComponent } from '../page.component'; -import { DocumentListComponent } from 'ng2-alfresco-documentlist'; @Component({ templateUrl: './libraries.component.html' @@ -33,8 +41,9 @@ export class LibrariesComponent extends PageComponent { constructor( private nodesApi: NodesApiService, private route: ActivatedRoute, - private router: Router) { - super(); + private router: Router, + preferences: UserPreferencesService) { + super(preferences); } makeLibraryTooltip(library: any): string { @@ -44,11 +53,15 @@ export class LibrariesComponent extends PageComponent { } makeLibraryTitle(library: any): string { + const rows = this.documentList.data.getRows(); + const entries = rows.map((r: ShareDataRow) => r.node.entry); const { title, id } = library; + let isDuplicate = false; - if (this.documentList.node) { - isDuplicate = this.documentList.node.list.entries - .some(({ entry }: any) => { + + if (entries) { + isDuplicate = entries + .some((entry: any) => { return (entry.id !== id && entry.title === title); }); } diff --git a/src/app/components/location-link/location-link.component.ts b/src/app/components/location-link/location-link.component.ts index dfbacc866..5e4355cf9 100644 --- a/src/app/components/location-link/location-link.component.ts +++ b/src/app/components/location-link/location-link.component.ts @@ -1,6 +1,30 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2017 Alfresco Software Limited + * + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ + import { Component, Input, ChangeDetectionStrategy, OnInit, ViewEncapsulation } from '@angular/core'; -import { DataColumn, DataRow, DataTableAdapter } from 'ng2-alfresco-datatable'; -import { AlfrescoApiService } from 'ng2-alfresco-core'; +import { AlfrescoApiService, DataColumn, DataRow, DataTableAdapter } from '@alfresco/adf-core'; import { PathInfoEntity, AlfrescoApi } from 'alfresco-js-api'; import { Observable } from 'rxjs/Rx'; @@ -42,7 +66,7 @@ export class LocationLinkComponent implements OnInit { const row: DataRow = this.context.row; const value: PathInfoEntity = data.getValue(row, col); - if (value.name && value.elements) { + if (value && value.name && value.elements) { const isLibraryPath = this.isLibraryContent(value); this.displayText = this.getDisplayText(value); @@ -51,7 +75,12 @@ export class LocationLinkComponent implements OnInit { const parent = value.elements[value.elements.length - 1]; const area = isLibraryPath ? '/libraries' : '/personal-files'; - this.link = [ area, parent.id ]; + if (!isLibraryPath) { + this.link = [ area, parent.id ]; + } else { + // parent.id could be 'Site' folder or child as 'documentLibrary' + this.link = [ area, (parent.name === 'Sites' ? {} : parent.id) ]; + } } } } @@ -106,7 +135,7 @@ export class LocationLinkComponent implements OnInit { if (elements[0].name === 'Company Home') { elements[0].name = 'Personal Files'; - if (elements.length > 1) { + if (elements.length > 2) { if (elements[1].name === 'Sites') { const fragment = elements[2]; diff --git a/src/app/components/login/login.component.spec.ts b/src/app/components/login/login.component.spec.ts index 220b16194..9cc027b04 100644 --- a/src/app/components/login/login.component.spec.ts +++ b/src/app/components/login/login.component.spec.ts @@ -1,136 +1,99 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { RouterTestingModule } from '@angular/router/testing'; -import { Router, ActivatedRoute } from '@angular/router'; +import { Router } from '@angular/router'; import { TestBed, async } from '@angular/core/testing'; -import { Observable } from 'rxjs/Rx'; -import { CoreModule, AuthenticationService, UserPreferencesService } from 'ng2-alfresco-core'; -import { LoginModule } from 'ng2-alfresco-login'; +import { CoreModule, AuthenticationService, UserPreferencesService } from '@alfresco/adf-core'; import { LoginComponent } from './login.component'; describe('LoginComponent', () => { + let component; + let fixture; + let router; + let userPreference; + let auth; - class TestConfig { - private testBed; - private componentInstance; - private fixture; - - constructor(config: any = {}) { - const routerProvider = { - provide: Router, - useValue: { - navigateByUrl: jasmine.createSpy('navigateByUrl'), - navigate: jasmine.createSpy('navigate') - } - }; - - const authProvider = { - provide: AuthenticationService, - useValue: { - isEcmLoggedIn: jasmine.createSpy('navigateByUrl') - .and.returnValue(config.isEcmLoggedIn || false) - } - }; - - this.testBed = TestBed.configureTestingModule({ - imports: [ - RouterTestingModule, - CoreModule, - LoginModule - ], - declarations: [ - LoginComponent - ], - providers: [ - routerProvider, - authProvider, - { - provide: ActivatedRoute, - useValue: { - params: Observable.of({ redirect: config.redirect }) - } - } - ] - }); - - this.fixture = TestBed.createComponent(LoginComponent); - this.componentInstance = this.fixture.componentInstance; - this.fixture.detectChanges(); - } - - get userPrefService() { - return TestBed.get(UserPreferencesService); - } - - get authService() { - return TestBed.get(AuthenticationService); - } - - get routerService() { - return TestBed.get(Router); - } - - get component() { - return this.componentInstance; - } - } - - it('load app when user is already logged in', () => { - const testConfig = new TestConfig({ - isEcmLoggedIn: true + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule, + CoreModule + ], + declarations: [ + LoginComponent + ] }); - expect(testConfig.routerService.navigateByUrl).toHaveBeenCalled(); + fixture = TestBed.createComponent(LoginComponent); + component = fixture.componentInstance; + + router = TestBed.get(Router); + auth = TestBed.get(AuthenticationService); + userPreference = TestBed.get(UserPreferencesService); + })); + + beforeEach(() => { + spyOn(userPreference, 'setStoragePrefix'); + spyOn(router, 'navigateByUrl'); + spyOn(auth, 'getRedirectUrl').and.returnValue('/some-url'); }); - it('requires user to be logged in', () => { - const testConfig = new TestConfig({ - isEcmLoggedIn: false, - redirect: '/personal-files' + describe('OnInit()', () => { + it('should perform normal login when user is not logged in', () => { + spyOn(auth, 'isEcmLoggedIn').and.returnValue(false); + fixture.detectChanges(); + + expect(router.navigateByUrl).not.toHaveBeenCalled(); }); - expect(testConfig.routerService.navigate).toHaveBeenCalledWith(['/login', {}]); + it('should redirect when user is logged in', () => { + spyOn(auth, 'isEcmLoggedIn').and.returnValue(true); + fixture.detectChanges(); + + expect(router.navigateByUrl).toHaveBeenCalledWith('/some-url'); + }); }); describe('onLoginSuccess()', () => { - let testConfig; - beforeEach(() => { - testConfig = new TestConfig({ - isEcmLoggedIn: false, - redirect: 'somewhere-over-the-rainbow' - }); + spyOn(auth, 'isEcmLoggedIn').and.returnValue(false); + fixture.detectChanges(); }); - it('redirects on success', () => { - testConfig.component.onLoginSuccess(); + it('should redirect on success', () => { + component.onLoginSuccess(); - expect(testConfig.routerService.navigateByUrl).toHaveBeenCalledWith('somewhere-over-the-rainbow'); + expect(router.navigateByUrl).toHaveBeenCalledWith('/personal-files'); }); - it('sets user preference store prefix', () => { - const service = testConfig.userPrefService; - spyOn(service, 'setStoragePrefix').and.stub(); + it('should set user preference store prefix', () => { + component.onLoginSuccess({ username: 'bogus' }); - testConfig.component.onLoginSuccess({ username: 'bogus' }); - - expect(service.setStoragePrefix).toHaveBeenCalledWith('bogus'); + expect(userPreference.setStoragePrefix).toHaveBeenCalledWith('bogus'); }); }); }); diff --git a/src/app/components/login/login.component.ts b/src/app/components/login/login.component.ts index 87413a876..3486e138f 100644 --- a/src/app/components/login/login.component.ts +++ b/src/app/components/login/login.component.ts @@ -1,69 +1,53 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ -import { Component } from '@angular/core'; -import { Router, ActivatedRoute } from '@angular/router'; -import { Validators } from '@angular/forms'; - -import { AlfrescoAuthenticationService, UserPreferencesService } from 'ng2-alfresco-core'; - -const skipRedirectUrls: string[] = [ - '/logout', - '/personal-files' -]; +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { AuthenticationService, UserPreferencesService } from '@alfresco/adf-core'; @Component({ templateUrl: './login.component.html' }) -export class LoginComponent { - - private redirectUrl = ''; - +export class LoginComponent implements OnInit { constructor( private router: Router, - private route: ActivatedRoute, - private auth: AlfrescoAuthenticationService, + private auth: AuthenticationService, private userPreferences: UserPreferencesService - ) { - if (auth.isEcmLoggedIn()) { - this.redirect(); + ) {} + + ngOnInit() { + if (this.auth.isEcmLoggedIn()) { + this.router.navigateByUrl(this.auth.getRedirectUrl() || ''); } - - route.params.subscribe((params: any) => { - if (skipRedirectUrls.indexOf(params.redirect) > -1) { - const remainingParams = Object.assign({}, params); - - delete remainingParams.redirect; - - router.navigate(['/login', remainingParams]); - } - - this.redirectUrl = params.redirect; - }); - } - - redirect() { - this.router.navigateByUrl(this.redirectUrl || ''); } onLoginSuccess(data) { if (data && data.username) { this.userPreferences.setStoragePrefix(data.username); } - this.redirect(); + + this.router.navigateByUrl('/personal-files'); } } diff --git a/src/app/components/page.component.spec.ts b/src/app/components/page.component.spec.ts index fa45ed439..a13c0ce5a 100644 --- a/src/app/components/page.component.spec.ts +++ b/src/app/components/page.component.spec.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { TestBed } from '@angular/core/testing'; @@ -23,7 +31,7 @@ class TestClass extends PageComponent { node: any; constructor() { - super(); + super(null); } fetchNodes(parentNodeId?: string, options?: any) { diff --git a/src/app/components/page.component.ts b/src/app/components/page.component.ts index 59fcb0abc..64c19d0b3 100644 --- a/src/app/components/page.component.ts +++ b/src/app/components/page.component.ts @@ -1,36 +1,53 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging, Pagination } from 'alfresco-js-api'; +import { UserPreferencesService } from '@alfresco/adf-core'; +import { ShareDataRow } from '@alfresco/adf-content-services'; export abstract class PageComponent { - title: string = 'Page'; + title = 'Page'; - isLoading: boolean = false; - isEmpty: boolean = true; + isLoading = false; + isEmpty = true; paging: NodePaging; pagination: Pagination; node: MinimalNodeEntryEntity; + static isLockedNode(node) { + return node.isLocked || (node.properties && node.properties['cm:lockType'] === 'READ_ONLY_LOCK'); + } + abstract fetchNodes(parentNodeId?: string, options?: any): void; + constructor(private preferences: UserPreferencesService) { + } + onFetchError(error: any) { this.isLoading = false; } @@ -70,7 +87,7 @@ export abstract class PageComponent { isFileSelected(selection: Array): boolean { if (selection && selection.length === 1) { - let entry = selection[0].entry; + const entry = selection[0].entry; if (entry && entry.isFile) { return true; @@ -81,7 +98,7 @@ export abstract class PageComponent { canEditFolder(selection: Array): boolean { if (selection && selection.length === 1) { - let entry = selection[0].entry; + const entry = selection[0].entry; if (entry && entry.isFolder) { return this.nodeHasPermission(entry, 'update'); @@ -121,4 +138,50 @@ export abstract class PageComponent { return false; } + + onChangePageSize(event: Pagination): void { + this.preferences.paginationSize = event.maxItems; + } + + onNodeSelect(event, documentList) { + if (!!event.detail && !!event.detail.node) { + + const node: MinimalNodeEntryEntity = event.detail.node.entry; + if (node && PageComponent.isLockedNode(node)) { + this.unSelectLockedNodes(documentList); + } + } + } + + unSelectLockedNodes(documentList) { + documentList.selection = documentList.selection.filter(item => !PageComponent.isLockedNode(item.entry)); + + const dataTable = documentList.dataTable; + if (dataTable && dataTable.data) { + const rows = dataTable.data.getRows(); + + if (rows && rows.length > 0) { + rows.forEach(r => { + if (this.isLockedRow(r)) { + r.isSelected = false; + } + }); + } + } + } + + isLockedRow(row) { + return row.getValue('isLocked') || + (row.getValue('properties') && row.getValue('properties')['cm:lockType'] === 'READ_ONLY_LOCK'); + } + + imageResolver(row: ShareDataRow): string | null { + const entry: MinimalNodeEntryEntity = row.node.entry; + + if (PageComponent.isLockedNode(entry)) { + return '/assets/images/ic_lock_black_24dp_1x.png'; + } + return null; + } + } diff --git a/src/app/components/preview/preview.component.ts b/src/app/components/preview/preview.component.ts index b6f63bf4e..99d92bfe9 100644 --- a/src/app/components/preview/preview.component.ts +++ b/src/app/components/preview/preview.component.ts @@ -1,29 +1,38 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { AlfrescoApiService } from 'ng2-alfresco-core'; +import { AlfrescoApiService } from '@alfresco/adf-core'; @Component({ selector: 'app-preview', templateUrl: 'preview.component.html', styleUrls: ['preview.component.scss'], encapsulation: ViewEncapsulation.None, + // tslint:disable-next-line:use-host-property-decorator host: { 'class': 'app-preview' } }) export class PreviewComponent implements OnInit { diff --git a/src/app/components/recent-files/recent-files.component.html b/src/app/components/recent-files/recent-files.component.html index 4607b41c5..daaf8a436 100644 --- a/src/app/components/recent-files/recent-files.component.html +++ b/src/app/components/recent-files/recent-files.component.html @@ -33,10 +33,10 @@ class="secondary-options"> @@ -75,10 +75,11 @@ selectionMode="multiple" [navigate]="false" [sorting]="[ 'modifiedAt', 'desc' ]" - [pageSize]="25" [contextMenuActions]="true" [contentActions]="false" - (node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"> + [imageResolver]="imageResolver" + (node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)" + (node-select)="onNodeSelect($event, documentList)"> @@ -99,11 +100,11 @@ - {{ value }} + {{ value }} @@ -123,12 +124,17 @@ + + {{ value | adfTimeAgo }} + + +
diff --git a/src/app/components/recent-files/recent-files.component.spec.ts b/src/app/components/recent-files/recent-files.component.spec.ts index 65f7dd14f..890c5a6f9 100644 --- a/src/app/components/recent-files/recent-files.component.spec.ts +++ b/src/app/components/recent-files/recent-files.component.spec.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Router } from '@angular/router'; @@ -20,7 +28,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { TestBed, async } from '@angular/core/testing'; import { Observable } from 'rxjs/Rx'; -import { CoreModule, AlfrescoApiService } from 'ng2-alfresco-core'; +import { CoreModule, AlfrescoApiService } from '@alfresco/adf-core'; import { CommonModule } from '../../common/common.module'; import { ContentManagementService } from '../../common/services/content-management.service'; @@ -98,14 +106,6 @@ describe('RecentFiles Routed Component', () => { expect(component.refresh).toHaveBeenCalled(); }); - it('should reload on toggleFavorite event', () => { - fixture.detectChanges(); - - contentService.toggleFavorite.next(); - - expect(component.refresh).toHaveBeenCalled(); - }); - it('should reload on move node event', () => { fixture.detectChanges(); diff --git a/src/app/components/recent-files/recent-files.component.ts b/src/app/components/recent-files/recent-files.component.ts index 4bbe2d546..1e2617b36 100644 --- a/src/app/components/recent-files/recent-files.component.ts +++ b/src/app/components/recent-files/recent-files.component.ts @@ -1,25 +1,34 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Subscription } from 'rxjs/Rx'; import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core'; import { Router } from '@angular/router'; import { MinimalNodeEntryEntity } from 'alfresco-js-api'; -import { DocumentListComponent } from 'ng2-alfresco-documentlist'; +import { UserPreferencesService } from '@alfresco/adf-core'; +import { DocumentListComponent } from '@alfresco/adf-content-services'; import { ContentManagementService } from '../../common/services/content-management.service'; import { PageComponent } from '../page.component'; @@ -32,33 +41,32 @@ export class RecentFilesComponent extends PageComponent implements OnInit, OnDes @ViewChild(DocumentListComponent) documentList: DocumentListComponent; - private onDeleteNode: Subscription; - private onMoveNode: Subscription; - private onRestoreNode: Subscription; - private onToggleFavorite: Subscription; + private subscriptions: Subscription[] = []; constructor( private router: Router, - private content: ContentManagementService) { - super(); + private content: ContentManagementService, + preferences: UserPreferencesService) { + super(preferences); } ngOnInit() { - this.onDeleteNode = this.content.deleteNode.subscribe(() => this.refresh()); - this.onMoveNode = this.content.moveNode.subscribe(() => this.refresh()); - this.onRestoreNode = this.content.restoreNode.subscribe(() => this.refresh()); - this.onToggleFavorite = this.content.toggleFavorite.subscribe(() => this.refresh()); + this.subscriptions = this.subscriptions.concat([ + this.content.deleteNode.subscribe(() => this.refresh()), + this.content.moveNode.subscribe(() => this.refresh()), + this.content.restoreNode.subscribe(() => this.refresh()) + ]); } ngOnDestroy() { - this.onDeleteNode.unsubscribe(); - this.onMoveNode.unsubscribe(); - this.onRestoreNode.unsubscribe(); - this.onToggleFavorite.unsubscribe(); + this.subscriptions.forEach(s => s.unsubscribe()); } onNodeDoubleClick(node: MinimalNodeEntryEntity) { - if (node && node.isFile) { + if (node && PageComponent.isLockedNode(node)) { + event.preventDefault(); + + } else if (node && node.isFile) { this.router.navigate(['/preview', node.id]); } } diff --git a/src/app/components/search/search.component.html b/src/app/components/search/search.component.html index 516b78e5d..ed0b474ce 100644 --- a/src/app/components/search/search.component.html +++ b/src/app/components/search/search.component.html @@ -1,6 +1,4 @@ + (optionClicked)="onItemClicked($event)"> diff --git a/src/app/components/search/search.component.scss b/src/app/components/search/search.component.scss index e018c6e8e..01065f775 100644 --- a/src/app/components/search/search.component.scss +++ b/src/app/components/search/search.component.scss @@ -1,5 +1,10 @@ @import 'variables'; +// todo: remove once ADF 2.0 is out +:host { + overflow: hidden; +} + adf-search-control { color: $alfresco-white; } diff --git a/src/app/components/search/search.component.spec.ts b/src/app/components/search/search.component.spec.ts index 09f9d23e7..946c4d268 100644 --- a/src/app/components/search/search.component.spec.ts +++ b/src/app/components/search/search.component.spec.ts @@ -1,22 +1,30 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { TestBed, async } from '@angular/core/testing'; -import { CoreModule, AppConfigService } from 'ng2-alfresco-core'; +import { CoreModule, AppConfigService } from '@alfresco/adf-core'; import { Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; @@ -49,12 +57,12 @@ describe('SearchComponent', () => { }); })); - describe('onNodeClicked()', () => { + describe('onItemClicked()', () => { it('opens preview if node is file', () => { spyOn(router, 'navigate').and.stub(); const node = { entry: { isFile: true, id: 'node-id' } }; - component.onNodeClicked(node); + component.onItemClicked(node); expect(router.navigate).toHaveBeenCalledWith(['/preview', node.entry.id]); }); @@ -63,7 +71,7 @@ describe('SearchComponent', () => { const node = { entry: { isFolder: true } }; spyOn(router, 'navigate'); - component.onNodeClicked(node); + component.onItemClicked(node); expect(router.navigate).toHaveBeenCalled(); }); diff --git a/src/app/components/search/search.component.ts b/src/app/components/search/search.component.ts index 640b39091..e4f14405e 100644 --- a/src/app/components/search/search.component.ts +++ b/src/app/components/search/search.component.ts @@ -1,23 +1,30 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component } from '@angular/core'; import { Router } from '@angular/router'; - import { MinimalNodeEntity } from 'alfresco-js-api'; @Component({ @@ -27,13 +34,11 @@ import { MinimalNodeEntity } from 'alfresco-js-api'; }) export class SearchComponent { - searchTerm: string = ''; - constructor( private router: Router) { } - onNodeClicked(node: MinimalNodeEntity) { + onItemClicked(node: MinimalNodeEntity) { if (node && node.entry) { if (node.entry.isFile) { this.router.navigate(['/preview', node.entry.id]); diff --git a/src/app/components/shared-files/shared-files.component.html b/src/app/components/shared-files/shared-files.component.html index 142e62856..e7eb1481d 100644 --- a/src/app/components/shared-files/shared-files.component.html +++ b/src/app/components/shared-files/shared-files.component.html @@ -33,10 +33,10 @@ class="secondary-options"> @@ -73,7 +73,6 @@ currentFolderId="-sharedlinks-" selectionMode="multiple" [sorting]="[ 'modifiedAt', 'desc' ]" - [pageSize]="25" [contextMenuActions]="true" [contentActions]="false" (node-dblclick)="onNodeDoubleClick($event.detail?.node?.entry)"> @@ -97,11 +96,11 @@ - {{ value }} + {{ value }} @@ -113,7 +112,6 @@ - + + {{ value | adfTimeAgo }} + + + diff --git a/src/app/components/shared-files/shared-files.component.spec.ts b/src/app/components/shared-files/shared-files.component.spec.ts index db214f73b..86df66efd 100644 --- a/src/app/components/shared-files/shared-files.component.spec.ts +++ b/src/app/components/shared-files/shared-files.component.spec.ts @@ -1,25 +1,33 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Router } from '@angular/router'; import { TestBed, async, fakeAsync, tick } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { AlfrescoApiService } from 'ng2-alfresco-core'; +import { AlfrescoApiService } from '@alfresco/adf-core'; import { CommonModule } from '../../common/common.module'; import { ContentManagementService } from '../../common/services/content-management.service'; @@ -94,14 +102,6 @@ describe('SharedFilesComponent', () => { expect(component.refresh).toHaveBeenCalled(); }); - it('should refresh on favorite toggle event', () => { - fixture.detectChanges(); - - contentService.toggleFavorite.next(); - - expect(component.refresh).toHaveBeenCalled(); - }); - it('should reload on move node event', () => { fixture.detectChanges(); diff --git a/src/app/components/shared-files/shared-files.component.ts b/src/app/components/shared-files/shared-files.component.ts index 90410e00c..70265c61a 100644 --- a/src/app/components/shared-files/shared-files.component.ts +++ b/src/app/components/shared-files/shared-files.component.ts @@ -1,26 +1,34 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core'; import { Router } from '@angular/router'; import { Subscription } from 'rxjs/Rx'; import { MinimalNodeEntity } from 'alfresco-js-api'; -import { AlfrescoApiService } from 'ng2-alfresco-core'; -import { DocumentListComponent } from 'ng2-alfresco-documentlist'; +import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core'; +import { DocumentListComponent } from '@alfresco/adf-content-services'; import { ContentManagementService } from '../../common/services/content-management.service'; import { PageComponent } from '../page.component'; @@ -33,30 +41,26 @@ export class SharedFilesComponent extends PageComponent implements OnInit, OnDes @ViewChild(DocumentListComponent) documentList: DocumentListComponent; - private onDeleteNode: Subscription; - private onMoveNode: Subscription; - private onRestoreNode: Subscription; - private onToggleFavorite: Subscription; + private subscriptions: Subscription[] = []; constructor( private router: Router, private content: ContentManagementService, - private apiService: AlfrescoApiService) { - super(); + private apiService: AlfrescoApiService, + preferences: UserPreferencesService) { + super(preferences); } ngOnInit() { - this.onDeleteNode = this.content.deleteNode.subscribe(() => this.refresh()); - this.onMoveNode = this.content.moveNode.subscribe(() => this.refresh()); - this.onRestoreNode = this.content.restoreNode.subscribe(() => this.refresh()); - this.onToggleFavorite = this.content.toggleFavorite.subscribe(() => this.refresh()); + this.subscriptions = this.subscriptions.concat([ + this.content.deleteNode.subscribe(() => this.refresh()), + this.content.moveNode.subscribe(() => this.refresh()), + this.content.restoreNode.subscribe(() => this.refresh()) + ]); } ngOnDestroy() { - this.onDeleteNode.unsubscribe(); - this.onMoveNode.unsubscribe(); - this.onRestoreNode.unsubscribe(); - this.onToggleFavorite.unsubscribe(); + this.subscriptions.forEach(s => s.unsubscribe()); } onNodeDoubleClick(link: { nodeId?: string }) { diff --git a/src/app/components/sidenav/sidenav.component.html b/src/app/components/sidenav/sidenav.component.html index 97fba621b..e42653bc2 100644 --- a/src/app/components/sidenav/sidenav.component.html +++ b/src/app/components/sidenav/sidenav.component.html @@ -21,7 +21,6 @@ - {{ item.icon }} + {{ item.icon }} {{ item.label | translate }} diff --git a/src/app/components/sidenav/sidenav.component.scss b/src/app/components/sidenav/sidenav.component.scss index 33d0be7e0..b381bf5b7 100644 --- a/src/app/components/sidenav/sidenav.component.scss +++ b/src/app/components/sidenav/sidenav.component.scss @@ -14,6 +14,10 @@ $sidenav-menu-item--icon-size: 24px; flex: 1; flex-direction: column; + &__section:last-child { + border-bottom: 0; + } + &__section { padding: $sidenav-section--v-padding @@ -40,10 +44,9 @@ $sidenav-menu-item--icon-size: 24px; list-style-type: none; &__item { + padding: $sidenav-menu-item--v-padding 0; + &-link { - padding: - $sidenav-menu-item--v-padding - $sidenav-menu-item--h-padding; padding-left: $sidenav-menu-item--h-padding + 16px + 24px; position: relative; @@ -71,6 +74,10 @@ $sidenav-menu-item--icon-size: 24px; color: $alfresco-secondary-text-color !important; opacity: .25; } + + &--noicon { + padding-left: 26px; + } } } } diff --git a/src/app/components/sidenav/sidenav.component.spec.ts b/src/app/components/sidenav/sidenav.component.spec.ts index df000004c..99899f67c 100644 --- a/src/app/components/sidenav/sidenav.component.spec.ts +++ b/src/app/components/sidenav/sidenav.component.spec.ts @@ -1,24 +1,31 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { TestBed, async } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; -import { AlfrescoContentService } from 'ng2-alfresco-core'; - +import { ContentService, AppConfigService } from '@alfresco/adf-core'; import { BrowsingFilesService } from '../../common/services/browsing-files.service'; import { SidenavComponent } from './sidenav.component'; @@ -27,8 +34,17 @@ import { CommonModule } from './../../common/common.module'; describe('SidenavComponent', () => { let fixture; let component: SidenavComponent; - let contentService: AlfrescoContentService; + let contentService: ContentService; let browsingService: BrowsingFilesService; + let appConfig: AppConfigService; + let appConfigSpy; + + const navItem = { + label: 'some-label', + route: { + url: '/some-url' + } + }; beforeEach(async(() => { TestBed.configureTestingModule({ @@ -42,17 +58,19 @@ describe('SidenavComponent', () => { }) .compileComponents() .then(() => { - contentService = TestBed.get(AlfrescoContentService); + contentService = TestBed.get(ContentService); browsingService = TestBed.get(BrowsingFilesService); + appConfig = TestBed.get(AppConfigService); fixture = TestBed.createComponent(SidenavComponent); component = fixture.componentInstance; - fixture.detectChanges(); + appConfigSpy = spyOn(appConfig, 'get').and.returnValue([navItem]); }); })); - it('updates node on change', () => { + it('should update node on change', () => { + fixture.detectChanges(); const node: any = { entry: { id: 'someNodeId' } }; browsingService.onChangeParent.next(node); @@ -60,7 +78,8 @@ describe('SidenavComponent', () => { expect(component.node).toBe(node); }); - it('can create content', () => { + it('should have permission to create content', () => { + fixture.detectChanges(); spyOn(contentService, 'hasPermission').and.returnValue(true); const node: any = {}; @@ -68,18 +87,36 @@ describe('SidenavComponent', () => { expect(contentService.hasPermission).toHaveBeenCalledWith(node, 'create'); }); - it('cannot create content for missing node', () => { + it('should not have permission to create content for missing node', () => { + fixture.detectChanges(); spyOn(contentService, 'hasPermission').and.returnValue(true); expect(component.canCreateContent(null)).toBe(false); expect(contentService.hasPermission).not.toHaveBeenCalled(); }); - it('cannot create content based on permission', () => { + it('should not have permission to create content based on node permission', () => { + fixture.detectChanges(); spyOn(contentService, 'hasPermission').and.returnValue(false); const node: any = {}; expect(component.canCreateContent(node)).toBe(false); expect(contentService.hasPermission).toHaveBeenCalledWith(node, 'create'); }); + + describe('menu', () => { + it('should build menu from array', () => { + appConfigSpy.and.returnValue([navItem, navItem]); + fixture.detectChanges(); + + expect(component.navigation).toEqual([[navItem, navItem]]); + }); + + it('should build menu from object', () => { + appConfigSpy.and.returnValue({ a: [navItem, navItem], b: [navItem, navItem] }); + fixture.detectChanges(); + + expect(component.navigation).toEqual([[navItem, navItem], [navItem, navItem]]); + }); + }); }); diff --git a/src/app/components/sidenav/sidenav.component.ts b/src/app/components/sidenav/sidenav.component.ts index c7e8a8762..1f20ae809 100644 --- a/src/app/components/sidenav/sidenav.component.ts +++ b/src/app/components/sidenav/sidenav.component.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { Subscription } from 'rxjs/Rx'; @@ -20,7 +28,7 @@ import { Subscription } from 'rxjs/Rx'; import { Component, OnInit, OnDestroy } from '@angular/core'; import { MinimalNodeEntryEntity } from 'alfresco-js-api'; -import { AlfrescoContentService, AppConfigService } from 'ng2-alfresco-core'; +import { ContentService, AppConfigService } from '@alfresco/adf-core'; import { BrowsingFilesService } from '../../common/services/browsing-files.service'; @@ -31,29 +39,27 @@ import { BrowsingFilesService } from '../../common/services/browsing-files.servi }) export class SidenavComponent implements OnInit, OnDestroy { node: MinimalNodeEntryEntity = null; - onChangeParentSubscription: Subscription; navigation = []; + private subscriptions: Subscription[] = []; + constructor( private browsingFilesService: BrowsingFilesService, - private contentService: AlfrescoContentService, + private contentService: ContentService, private appConfig: AppConfigService - ) { - this.navigation = this.navigation.concat([ - this.appConfig.get('navigation.main'), - this.appConfig.get('navigation.secondary') + ) {} + + ngOnInit() { + this.navigation = this.buildMenu(); + + this.subscriptions.concat([ + this.browsingFilesService.onChangeParent + .subscribe((node: MinimalNodeEntryEntity) => this.node = node) ]); } - ngOnInit() { - this.onChangeParentSubscription = this.browsingFilesService.onChangeParent - .subscribe((node: MinimalNodeEntryEntity) => { - this.node = node; - }); - } - ngOnDestroy() { - this.onChangeParentSubscription.unsubscribe(); + this.subscriptions.forEach(s => s.unsubscribe()); } canCreateContent(parentNode: MinimalNodeEntryEntity): boolean { @@ -62,4 +68,11 @@ export class SidenavComponent implements OnInit, OnDestroy { } return false; } + + private buildMenu() { + const schema = this.appConfig.get('navigation'); + const data = Array.isArray(schema) ? { main: schema } : schema; + + return Object.keys(data).map((key) => data[key]); + } } diff --git a/src/app/components/trashcan/trashcan.component.html b/src/app/components/trashcan/trashcan.component.html index 9675b9e96..576f5503d 100644 --- a/src/app/components/trashcan/trashcan.component.html +++ b/src/app/components/trashcan/trashcan.component.html @@ -32,7 +32,6 @@ selectionMode="multiple" [navigate]="false" [sorting]="[ 'archivedAt', 'desc' ]" - [pageSize]="25" [contextMenuActions]="true" [contentActions]="false"> @@ -57,11 +56,11 @@ - {{ value }} + {{ value }} @@ -81,12 +80,14 @@ + title="APP.DOCUMENT_LIST.COLUMNS.DELETED_ON"> + + {{ value | adfTimeAgo }} + @@ -94,5 +95,9 @@ + + diff --git a/src/app/components/trashcan/trashcan.component.spec.ts b/src/app/components/trashcan/trashcan.component.spec.ts index b8c3e5c99..370c243fa 100644 --- a/src/app/components/trashcan/trashcan.component.spec.ts +++ b/src/app/components/trashcan/trashcan.component.spec.ts @@ -1,30 +1,40 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { TestBed, async } from '@angular/core/testing'; -import { CoreModule, AlfrescoApiService } from 'ng2-alfresco-core'; +import { CoreModule, AlfrescoApiService } from '@alfresco/adf-core'; import { TrashcanComponent } from './trashcan.component'; import { CommonModule } from '../../common/common.module'; import { LocationLinkComponent } from '../location-link/location-link.component'; +import { ContentManagementService } from '../../common/services/content-management.service'; describe('TrashcanComponent', () => { let fixture; let component; let alfrescoApi: AlfrescoApiService; + let contentService: ContentManagementService; let page; beforeEach(() => { @@ -45,6 +55,9 @@ describe('TrashcanComponent', () => { declarations: [ LocationLinkComponent, TrashcanComponent + ], + providers: [ + ContentManagementService ] }) .compileComponents() @@ -53,6 +66,7 @@ describe('TrashcanComponent', () => { component = fixture.componentInstance; alfrescoApi = TestBed.get(AlfrescoApiService); + contentService = TestBed.get(ContentManagementService); component.documentList = { loadTrashcan: jasmine.createSpy('loadTrashcan'), @@ -65,6 +79,17 @@ describe('TrashcanComponent', () => { spyOn(alfrescoApi.nodesApi, 'getDeletedNodes').and.returnValue(Promise.resolve(page)); }); + describe('onRestoreNode()', () => { + it('should call refresh()', () => { + spyOn(component, 'refresh'); + fixture.detectChanges(); + + contentService.restoreNode.next(); + + expect(component.refresh).toHaveBeenCalled(); + }); + }); + describe('refresh()', () => { it('calls child component to reload', () => { component.refresh(); diff --git a/src/app/components/trashcan/trashcan.component.ts b/src/app/components/trashcan/trashcan.component.ts index cb6575b2e..db9729e3b 100644 --- a/src/app/components/trashcan/trashcan.component.ts +++ b/src/app/components/trashcan/trashcan.component.ts @@ -1,31 +1,61 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ -import { Component, ViewChild } from '@angular/core'; -import { DocumentListComponent } from 'ng2-alfresco-documentlist'; +import { Component, ViewChild, OnInit, OnDestroy } from '@angular/core'; +import { Subscription } from 'rxjs/Rx'; +import { Pagination } from 'alfresco-js-api'; +import { UserPreferencesService } from '@alfresco/adf-core'; +import { DocumentListComponent } from '@alfresco/adf-content-services'; +import { ContentManagementService } from '../../common/services/content-management.service'; @Component({ templateUrl: './trashcan.component.html' }) -export class TrashcanComponent { +export class TrashcanComponent implements OnInit, OnDestroy { + private subscriptions: Subscription[] = []; + @ViewChild(DocumentListComponent) documentList; + constructor( + private contentManagementService: ContentManagementService, + private preferences: UserPreferencesService) {} + + ngOnInit() { + this.subscriptions.push(this.contentManagementService.restoreNode.subscribe(() => this.refresh())); + } + refresh(): void { this.documentList.loadTrashcan(); this.documentList.resetSelection(); } + + ngOnDestroy() { + this.subscriptions.forEach(s => s.unsubscribe()); + } + + onChangePageSize(event: Pagination): void { + this.preferences.paginationSize = event.maxItems; + } } diff --git a/src/app/ui/_layout.scss b/src/app/ui/_layout.scss index 8bcb6cd30..fb54980ad 100644 --- a/src/app/ui/_layout.scss +++ b/src/app/ui/_layout.scss @@ -40,6 +40,10 @@ $app-inner-layout--footer-height: 48px; } .inner-layout { + .no-border { + border: unset + } + display: flex; flex: 1; flex-direction: column; diff --git a/src/app/ui/overrides/_alfresco-document-list.scss b/src/app/ui/overrides/_alfresco-document-list.scss index ea0cd2627..a73705b0d 100644 --- a/src/app/ui/overrides/_alfresco-document-list.scss +++ b/src/app/ui/overrides/_alfresco-document-list.scss @@ -1,4 +1,4 @@ -@import '../_variables.scss'; +@import '../variables'; adf-document-list { display: flex; @@ -7,76 +7,28 @@ adf-document-list { overflow: auto; & > adf-datatable { - display: flex; - flex-direction: column; - flex: 1; - overflow: auto; + height: 100%; } } + .adf-data-table { border: none !important; - .sr-only { - display: none; - } - - th, td { - color: $alfresco-secondary-text-color; - } - th, tr, td { + color: $alfresco-secondary-text-color; &:focus { outline: none !important; } } - // TODO: Remove tr background-color once it gets to ADF tbody tr { &:hover, &:focus { background-color: $alfresco-app-color--hue-1; } - } - tr { - &.is-selected { + &.is-selected, &.is-selected:hover { background-color: $alfresco-app-color--hue-1; - - &:hover { - background-color: $alfresco-app-color--hue-1; - } - - .image-table-cell { - position: relative; - - &:before { - content: "\E876"; /* "done" */ - font-family: "Material Icons"; - font-size: 24px; - line-height: 32px; - text-align: center; - color: white; - position: absolute; - width: 32px; - height: 32px; - top: 50%; - left: 50%; - margin-top: -16px; - margin-left: -14px; - border-radius: 100%; - background: #00bcd4; - } - } - } - - .app-name-column { - width: 100%; - - .cell-container { - max-width: 45vw; - text-overflow: ellipsis; - overflow: hidden; - } } } @@ -96,7 +48,7 @@ adf-document-list { color: $alfresco-primary-text-color; &:hover { - color: $alfresco-app-color--default; + color: #2196F3; text-decoration: underline; } } @@ -105,6 +57,31 @@ adf-document-list { .adf-no-content-container { border: none !important; } + + + .adf-data-table-cell--ellipsis { + width: 100%; + } + + .adf-data-table-cell--ellipsis__name { + width: 85%; + } + + .adf-data-table-cell--ellipsis .cell-value, + .adf-data-table-cell--ellipsis__name .cell-value { + display: flex; + align-items: center; + } + + .adf-data-table-cell--ellipsis .adf-datatable-cell, + .adf-data-table-cell--ellipsis__name .adf-datatable-cell { + white-space: nowrap; + display: block; + position: absolute; + max-width: calc(100% - 2em); + overflow: hidden; + text-overflow: ellipsis; + } } .empty-list { diff --git a/src/app/ui/overrides/_breadcrumb.scss b/src/app/ui/overrides/_breadcrumb.scss index 0e33f840c..035d66e23 100644 --- a/src/app/ui/overrides/_breadcrumb.scss +++ b/src/app/ui/overrides/_breadcrumb.scss @@ -1,5 +1,6 @@ -@import '../variables'; +@import 'variables'; .adf-breadcrumb { + color: $alfresco-secondary-text-color; width: 0; } diff --git a/src/app/ui/theme.scss b/src/app/ui/theme.scss index 4f7edb0ae..6e2210ceb 100644 --- a/src/app/ui/theme.scss +++ b/src/app/ui/theme.scss @@ -1,12 +1,7 @@ @import "~@angular/material/theming"; -@import '~ng2-alfresco-core/styles/theming'; -@import '~ng2-alfresco-core/styles/index'; -@import '~ng2-alfresco-datatable/styles/index'; -@import '~ng2-alfresco-documentlist/styles/index'; -@import '~ng2-alfresco-login/styles/index'; -@import '~ng2-alfresco-upload/styles/index'; -@import '~ng2-alfresco-search/styles/index'; +@import '~@alfresco/adf-content-services/theming'; +@import '~@alfresco/adf-core/theming'; @include mat-core(); @@ -17,9 +12,5 @@ $theme: mat-light-theme($primary, $accent, $warn); @include angular-material-theme($theme); -@include alfresco-core-theme($theme); -@include alfresco-datatable-theme($theme); -@include alfresco-documentlist-theme($theme); -@include alfresco-login-theme($theme); -@include alfresco-upload-theme($theme); -@include alfresco-search-theme($theme); +@include adf-content-services-theme($theme); +@include adf-core-theme($theme); diff --git a/src/assets/fonts/material-icons/MaterialIcons-Regular.eot b/src/assets/fonts/material-icons/MaterialIcons-Regular.eot new file mode 100755 index 000000000..70508ebab Binary files /dev/null and b/src/assets/fonts/material-icons/MaterialIcons-Regular.eot differ diff --git a/src/assets/fonts/material-icons/MaterialIcons-Regular.ijmap b/src/assets/fonts/material-icons/MaterialIcons-Regular.ijmap new file mode 100755 index 000000000..d9f1d259f --- /dev/null +++ b/src/assets/fonts/material-icons/MaterialIcons-Regular.ijmap @@ -0,0 +1 @@ +{"icons":{"e84d":{"name":"3d Rotation"},"eb3b":{"name":"Ac Unit"},"e190":{"name":"Access Alarm"},"e191":{"name":"Access Alarms"},"e192":{"name":"Access Time"},"e84e":{"name":"Accessibility"},"e914":{"name":"Accessible"},"e84f":{"name":"Account Balance"},"e850":{"name":"Account Balance Wallet"},"e851":{"name":"Account Box"},"e853":{"name":"Account Circle"},"e60e":{"name":"Adb"},"e145":{"name":"Add"},"e439":{"name":"Add A Photo"},"e193":{"name":"Add Alarm"},"e003":{"name":"Add Alert"},"e146":{"name":"Add Box"},"e147":{"name":"Add Circle"},"e148":{"name":"Add Circle Outline"},"e567":{"name":"Add Location"},"e854":{"name":"Add Shopping Cart"},"e39d":{"name":"Add To Photos"},"e05c":{"name":"Add To Queue"},"e39e":{"name":"Adjust"},"e630":{"name":"Airline Seat Flat"},"e631":{"name":"Airline Seat Flat Angled"},"e632":{"name":"Airline Seat Individual Suite"},"e633":{"name":"Airline Seat Legroom Extra"},"e634":{"name":"Airline Seat Legroom Normal"},"e635":{"name":"Airline Seat Legroom Reduced"},"e636":{"name":"Airline Seat Recline Extra"},"e637":{"name":"Airline Seat Recline Normal"},"e195":{"name":"Airplanemode Active"},"e194":{"name":"Airplanemode Inactive"},"e055":{"name":"Airplay"},"eb3c":{"name":"Airport Shuttle"},"e855":{"name":"Alarm"},"e856":{"name":"Alarm Add"},"e857":{"name":"Alarm Off"},"e858":{"name":"Alarm On"},"e019":{"name":"Album"},"eb3d":{"name":"All Inclusive"},"e90b":{"name":"All Out"},"e859":{"name":"Android"},"e85a":{"name":"Announcement"},"e5c3":{"name":"Apps"},"e149":{"name":"Archive"},"e5c4":{"name":"Arrow Back"},"e5db":{"name":"Arrow Downward"},"e5c5":{"name":"Arrow Drop Down"},"e5c6":{"name":"Arrow Drop Down Circle"},"e5c7":{"name":"Arrow Drop Up"},"e5c8":{"name":"Arrow Forward"},"e5d8":{"name":"Arrow Upward"},"e060":{"name":"Art Track"},"e85b":{"name":"Aspect Ratio"},"e85c":{"name":"Assessment"},"e85d":{"name":"Assignment"},"e85e":{"name":"Assignment Ind"},"e85f":{"name":"Assignment Late"},"e860":{"name":"Assignment Return"},"e861":{"name":"Assignment Returned"},"e862":{"name":"Assignment Turned In"},"e39f":{"name":"Assistant"},"e3a0":{"name":"Assistant Photo"},"e226":{"name":"Attach File"},"e227":{"name":"Attach Money"},"e2bc":{"name":"Attachment"},"e3a1":{"name":"Audiotrack"},"e863":{"name":"Autorenew"},"e01b":{"name":"Av Timer"},"e14a":{"name":"Backspace"},"e864":{"name":"Backup"},"e19c":{"name":"Battery Alert"},"e1a3":{"name":"Battery Charging Full"},"e1a4":{"name":"Battery Full"},"e1a5":{"name":"Battery Std"},"e1a6":{"name":"Battery Unknown"},"eb3e":{"name":"Beach Access"},"e52d":{"name":"Beenhere"},"e14b":{"name":"Block"},"e1a7":{"name":"Bluetooth"},"e60f":{"name":"Bluetooth Audio"},"e1a8":{"name":"Bluetooth Connected"},"e1a9":{"name":"Bluetooth Disabled"},"e1aa":{"name":"Bluetooth Searching"},"e3a2":{"name":"Blur Circular"},"e3a3":{"name":"Blur Linear"},"e3a4":{"name":"Blur Off"},"e3a5":{"name":"Blur On"},"e865":{"name":"Book"},"e866":{"name":"Bookmark"},"e867":{"name":"Bookmark Border"},"e228":{"name":"Border All"},"e229":{"name":"Border Bottom"},"e22a":{"name":"Border Clear"},"e22b":{"name":"Border Color"},"e22c":{"name":"Border Horizontal"},"e22d":{"name":"Border Inner"},"e22e":{"name":"Border Left"},"e22f":{"name":"Border Outer"},"e230":{"name":"Border Right"},"e231":{"name":"Border Style"},"e232":{"name":"Border Top"},"e233":{"name":"Border Vertical"},"e06b":{"name":"Branding Watermark"},"e3a6":{"name":"Brightness 1"},"e3a7":{"name":"Brightness 2"},"e3a8":{"name":"Brightness 3"},"e3a9":{"name":"Brightness 4"},"e3aa":{"name":"Brightness 5"},"e3ab":{"name":"Brightness 6"},"e3ac":{"name":"Brightness 7"},"e1ab":{"name":"Brightness Auto"},"e1ac":{"name":"Brightness High"},"e1ad":{"name":"Brightness Low"},"e1ae":{"name":"Brightness Medium"},"e3ad":{"name":"Broken Image"},"e3ae":{"name":"Brush"},"e6dd":{"name":"Bubble Chart"},"e868":{"name":"Bug Report"},"e869":{"name":"Build"},"e43c":{"name":"Burst Mode"},"e0af":{"name":"Business"},"eb3f":{"name":"Business Center"},"e86a":{"name":"Cached"},"e7e9":{"name":"Cake"},"e0b0":{"name":"Call"},"e0b1":{"name":"Call End"},"e0b2":{"name":"Call Made"},"e0b3":{"name":"Call Merge"},"e0b4":{"name":"Call Missed"},"e0e4":{"name":"Call Missed Outgoing"},"e0b5":{"name":"Call Received"},"e0b6":{"name":"Call Split"},"e06c":{"name":"Call To Action"},"e3af":{"name":"Camera"},"e3b0":{"name":"Camera Alt"},"e8fc":{"name":"Camera Enhance"},"e3b1":{"name":"Camera Front"},"e3b2":{"name":"Camera Rear"},"e3b3":{"name":"Camera Roll"},"e5c9":{"name":"Cancel"},"e8f6":{"name":"Card Giftcard"},"e8f7":{"name":"Card Membership"},"e8f8":{"name":"Card Travel"},"eb40":{"name":"Casino"},"e307":{"name":"Cast"},"e308":{"name":"Cast Connected"},"e3b4":{"name":"Center Focus Strong"},"e3b5":{"name":"Center Focus Weak"},"e86b":{"name":"Change History"},"e0b7":{"name":"Chat"},"e0ca":{"name":"Chat Bubble"},"e0cb":{"name":"Chat Bubble Outline"},"e5ca":{"name":"Check"},"e834":{"name":"Check Box"},"e835":{"name":"Check Box Outline Blank"},"e86c":{"name":"Check Circle"},"e5cb":{"name":"Chevron Left"},"e5cc":{"name":"Chevron Right"},"eb41":{"name":"Child Care"},"eb42":{"name":"Child Friendly"},"e86d":{"name":"Chrome Reader Mode"},"e86e":{"name":"Class"},"e14c":{"name":"Clear"},"e0b8":{"name":"Clear All"},"e5cd":{"name":"Close"},"e01c":{"name":"Closed Caption"},"e2bd":{"name":"Cloud"},"e2be":{"name":"Cloud Circle"},"e2bf":{"name":"Cloud Done"},"e2c0":{"name":"Cloud Download"},"e2c1":{"name":"Cloud Off"},"e2c2":{"name":"Cloud Queue"},"e2c3":{"name":"Cloud Upload"},"e86f":{"name":"Code"},"e3b6":{"name":"Collections"},"e431":{"name":"Collections Bookmark"},"e3b7":{"name":"Color Lens"},"e3b8":{"name":"Colorize"},"e0b9":{"name":"Comment"},"e3b9":{"name":"Compare"},"e915":{"name":"Compare Arrows"},"e30a":{"name":"Computer"},"e638":{"name":"Confirmation Number"},"e0d0":{"name":"Contact Mail"},"e0cf":{"name":"Contact Phone"},"e0ba":{"name":"Contacts"},"e14d":{"name":"Content Copy"},"e14e":{"name":"Content Cut"},"e14f":{"name":"Content Paste"},"e3ba":{"name":"Control Point"},"e3bb":{"name":"Control Point Duplicate"},"e90c":{"name":"Copyright"},"e150":{"name":"Create"},"e2cc":{"name":"Create New Folder"},"e870":{"name":"Credit Card"},"e3be":{"name":"Crop"},"e3bc":{"name":"Crop 16 9"},"e3bd":{"name":"Crop 3 2"},"e3bf":{"name":"Crop 5 4"},"e3c0":{"name":"Crop 7 5"},"e3c1":{"name":"Crop Din"},"e3c2":{"name":"Crop Free"},"e3c3":{"name":"Crop Landscape"},"e3c4":{"name":"Crop Original"},"e3c5":{"name":"Crop Portrait"},"e437":{"name":"Crop Rotate"},"e3c6":{"name":"Crop Square"},"e871":{"name":"Dashboard"},"e1af":{"name":"Data Usage"},"e916":{"name":"Date Range"},"e3c7":{"name":"Dehaze"},"e872":{"name":"Delete"},"e92b":{"name":"Delete Forever"},"e16c":{"name":"Delete Sweep"},"e873":{"name":"Description"},"e30b":{"name":"Desktop Mac"},"e30c":{"name":"Desktop Windows"},"e3c8":{"name":"Details"},"e30d":{"name":"Developer Board"},"e1b0":{"name":"Developer Mode"},"e335":{"name":"Device Hub"},"e1b1":{"name":"Devices"},"e337":{"name":"Devices Other"},"e0bb":{"name":"Dialer Sip"},"e0bc":{"name":"Dialpad"},"e52e":{"name":"Directions"},"e52f":{"name":"Directions Bike"},"e532":{"name":"Directions Boat"},"e530":{"name":"Directions Bus"},"e531":{"name":"Directions Car"},"e534":{"name":"Directions Railway"},"e566":{"name":"Directions Run"},"e533":{"name":"Directions Subway"},"e535":{"name":"Directions Transit"},"e536":{"name":"Directions Walk"},"e610":{"name":"Disc Full"},"e875":{"name":"Dns"},"e612":{"name":"Do Not Disturb"},"e611":{"name":"Do Not Disturb Alt"},"e643":{"name":"Do Not Disturb Off"},"e644":{"name":"Do Not Disturb On"},"e30e":{"name":"Dock"},"e7ee":{"name":"Domain"},"e876":{"name":"Done"},"e877":{"name":"Done All"},"e917":{"name":"Donut Large"},"e918":{"name":"Donut Small"},"e151":{"name":"Drafts"},"e25d":{"name":"Drag Handle"},"e613":{"name":"Drive Eta"},"e1b2":{"name":"Dvr"},"e3c9":{"name":"Edit"},"e568":{"name":"Edit Location"},"e8fb":{"name":"Eject"},"e0be":{"name":"Email"},"e63f":{"name":"Enhanced Encryption"},"e01d":{"name":"Equalizer"},"e000":{"name":"Error"},"e001":{"name":"Error Outline"},"e926":{"name":"Euro Symbol"},"e56d":{"name":"Ev Station"},"e878":{"name":"Event"},"e614":{"name":"Event Available"},"e615":{"name":"Event Busy"},"e616":{"name":"Event Note"},"e903":{"name":"Event Seat"},"e879":{"name":"Exit To App"},"e5ce":{"name":"Expand Less"},"e5cf":{"name":"Expand More"},"e01e":{"name":"Explicit"},"e87a":{"name":"Explore"},"e3ca":{"name":"Exposure"},"e3cb":{"name":"Exposure Neg 1"},"e3cc":{"name":"Exposure Neg 2"},"e3cd":{"name":"Exposure Plus 1"},"e3ce":{"name":"Exposure Plus 2"},"e3cf":{"name":"Exposure Zero"},"e87b":{"name":"Extension"},"e87c":{"name":"Face"},"e01f":{"name":"Fast Forward"},"e020":{"name":"Fast Rewind"},"e87d":{"name":"Favorite"},"e87e":{"name":"Favorite Border"},"e06d":{"name":"Featured Play List"},"e06e":{"name":"Featured Video"},"e87f":{"name":"Feedback"},"e05d":{"name":"Fiber Dvr"},"e061":{"name":"Fiber Manual Record"},"e05e":{"name":"Fiber New"},"e06a":{"name":"Fiber Pin"},"e062":{"name":"Fiber Smart Record"},"e2c4":{"name":"File Download"},"e2c6":{"name":"File Upload"},"e3d3":{"name":"Filter"},"e3d0":{"name":"Filter 1"},"e3d1":{"name":"Filter 2"},"e3d2":{"name":"Filter 3"},"e3d4":{"name":"Filter 4"},"e3d5":{"name":"Filter 5"},"e3d6":{"name":"Filter 6"},"e3d7":{"name":"Filter 7"},"e3d8":{"name":"Filter 8"},"e3d9":{"name":"Filter 9"},"e3da":{"name":"Filter 9 Plus"},"e3db":{"name":"Filter B And W"},"e3dc":{"name":"Filter Center Focus"},"e3dd":{"name":"Filter Drama"},"e3de":{"name":"Filter Frames"},"e3df":{"name":"Filter Hdr"},"e152":{"name":"Filter List"},"e3e0":{"name":"Filter None"},"e3e2":{"name":"Filter Tilt Shift"},"e3e3":{"name":"Filter Vintage"},"e880":{"name":"Find In Page"},"e881":{"name":"Find Replace"},"e90d":{"name":"Fingerprint"},"e5dc":{"name":"First Page"},"eb43":{"name":"Fitness Center"},"e153":{"name":"Flag"},"e3e4":{"name":"Flare"},"e3e5":{"name":"Flash Auto"},"e3e6":{"name":"Flash Off"},"e3e7":{"name":"Flash On"},"e539":{"name":"Flight"},"e904":{"name":"Flight Land"},"e905":{"name":"Flight Takeoff"},"e3e8":{"name":"Flip"},"e882":{"name":"Flip To Back"},"e883":{"name":"Flip To Front"},"e2c7":{"name":"Folder"},"e2c8":{"name":"Folder Open"},"e2c9":{"name":"Folder Shared"},"e617":{"name":"Folder Special"},"e167":{"name":"Font Download"},"e234":{"name":"Format Align Center"},"e235":{"name":"Format Align Justify"},"e236":{"name":"Format Align Left"},"e237":{"name":"Format Align Right"},"e238":{"name":"Format Bold"},"e239":{"name":"Format Clear"},"e23a":{"name":"Format Color Fill"},"e23b":{"name":"Format Color Reset"},"e23c":{"name":"Format Color Text"},"e23d":{"name":"Format Indent Decrease"},"e23e":{"name":"Format Indent Increase"},"e23f":{"name":"Format Italic"},"e240":{"name":"Format Line Spacing"},"e241":{"name":"Format List Bulleted"},"e242":{"name":"Format List Numbered"},"e243":{"name":"Format Paint"},"e244":{"name":"Format Quote"},"e25e":{"name":"Format Shapes"},"e245":{"name":"Format Size"},"e246":{"name":"Format Strikethrough"},"e247":{"name":"Format Textdirection L To R"},"e248":{"name":"Format Textdirection R To L"},"e249":{"name":"Format Underlined"},"e0bf":{"name":"Forum"},"e154":{"name":"Forward"},"e056":{"name":"Forward 10"},"e057":{"name":"Forward 30"},"e058":{"name":"Forward 5"},"eb44":{"name":"Free Breakfast"},"e5d0":{"name":"Fullscreen"},"e5d1":{"name":"Fullscreen Exit"},"e24a":{"name":"Functions"},"e927":{"name":"G Translate"},"e30f":{"name":"Gamepad"},"e021":{"name":"Games"},"e90e":{"name":"Gavel"},"e155":{"name":"Gesture"},"e884":{"name":"Get App"},"e908":{"name":"Gif"},"eb45":{"name":"Golf Course"},"e1b3":{"name":"Gps Fixed"},"e1b4":{"name":"Gps Not Fixed"},"e1b5":{"name":"Gps Off"},"e885":{"name":"Grade"},"e3e9":{"name":"Gradient"},"e3ea":{"name":"Grain"},"e1b8":{"name":"Graphic Eq"},"e3eb":{"name":"Grid Off"},"e3ec":{"name":"Grid On"},"e7ef":{"name":"Group"},"e7f0":{"name":"Group Add"},"e886":{"name":"Group Work"},"e052":{"name":"Hd"},"e3ed":{"name":"Hdr Off"},"e3ee":{"name":"Hdr On"},"e3f1":{"name":"Hdr Strong"},"e3f2":{"name":"Hdr Weak"},"e310":{"name":"Headset"},"e311":{"name":"Headset Mic"},"e3f3":{"name":"Healing"},"e023":{"name":"Hearing"},"e887":{"name":"Help"},"e8fd":{"name":"Help Outline"},"e024":{"name":"High Quality"},"e25f":{"name":"Highlight"},"e888":{"name":"Highlight Off"},"e889":{"name":"History"},"e88a":{"name":"Home"},"eb46":{"name":"Hot Tub"},"e53a":{"name":"Hotel"},"e88b":{"name":"Hourglass Empty"},"e88c":{"name":"Hourglass Full"},"e902":{"name":"Http"},"e88d":{"name":"Https"},"e3f4":{"name":"Image"},"e3f5":{"name":"Image Aspect Ratio"},"e0e0":{"name":"Import Contacts"},"e0c3":{"name":"Import Export"},"e912":{"name":"Important Devices"},"e156":{"name":"Inbox"},"e909":{"name":"Indeterminate Check Box"},"e88e":{"name":"Info"},"e88f":{"name":"Info Outline"},"e890":{"name":"Input"},"e24b":{"name":"Insert Chart"},"e24c":{"name":"Insert Comment"},"e24d":{"name":"Insert Drive File"},"e24e":{"name":"Insert Emoticon"},"e24f":{"name":"Insert Invitation"},"e250":{"name":"Insert Link"},"e251":{"name":"Insert Photo"},"e891":{"name":"Invert Colors"},"e0c4":{"name":"Invert Colors Off"},"e3f6":{"name":"Iso"},"e312":{"name":"Keyboard"},"e313":{"name":"Keyboard Arrow Down"},"e314":{"name":"Keyboard Arrow Left"},"e315":{"name":"Keyboard Arrow Right"},"e316":{"name":"Keyboard Arrow Up"},"e317":{"name":"Keyboard Backspace"},"e318":{"name":"Keyboard Capslock"},"e31a":{"name":"Keyboard Hide"},"e31b":{"name":"Keyboard Return"},"e31c":{"name":"Keyboard Tab"},"e31d":{"name":"Keyboard Voice"},"eb47":{"name":"Kitchen"},"e892":{"name":"Label"},"e893":{"name":"Label Outline"},"e3f7":{"name":"Landscape"},"e894":{"name":"Language"},"e31e":{"name":"Laptop"},"e31f":{"name":"Laptop Chromebook"},"e320":{"name":"Laptop Mac"},"e321":{"name":"Laptop Windows"},"e5dd":{"name":"Last Page"},"e895":{"name":"Launch"},"e53b":{"name":"Layers"},"e53c":{"name":"Layers Clear"},"e3f8":{"name":"Leak Add"},"e3f9":{"name":"Leak Remove"},"e3fa":{"name":"Lens"},"e02e":{"name":"Library Add"},"e02f":{"name":"Library Books"},"e030":{"name":"Library Music"},"e90f":{"name":"Lightbulb Outline"},"e919":{"name":"Line Style"},"e91a":{"name":"Line Weight"},"e260":{"name":"Linear Scale"},"e157":{"name":"Link"},"e438":{"name":"Linked Camera"},"e896":{"name":"List"},"e0c6":{"name":"Live Help"},"e639":{"name":"Live Tv"},"e53f":{"name":"Local Activity"},"e53d":{"name":"Local Airport"},"e53e":{"name":"Local Atm"},"e540":{"name":"Local Bar"},"e541":{"name":"Local Cafe"},"e542":{"name":"Local Car Wash"},"e543":{"name":"Local Convenience Store"},"e556":{"name":"Local Dining"},"e544":{"name":"Local Drink"},"e545":{"name":"Local Florist"},"e546":{"name":"Local Gas Station"},"e547":{"name":"Local Grocery Store"},"e548":{"name":"Local Hospital"},"e549":{"name":"Local Hotel"},"e54a":{"name":"Local Laundry Service"},"e54b":{"name":"Local Library"},"e54c":{"name":"Local Mall"},"e54d":{"name":"Local Movies"},"e54e":{"name":"Local Offer"},"e54f":{"name":"Local Parking"},"e550":{"name":"Local Pharmacy"},"e551":{"name":"Local Phone"},"e552":{"name":"Local Pizza"},"e553":{"name":"Local Play"},"e554":{"name":"Local Post Office"},"e555":{"name":"Local Printshop"},"e557":{"name":"Local See"},"e558":{"name":"Local Shipping"},"e559":{"name":"Local Taxi"},"e7f1":{"name":"Location City"},"e1b6":{"name":"Location Disabled"},"e0c7":{"name":"Location Off"},"e0c8":{"name":"Location On"},"e1b7":{"name":"Location Searching"},"e897":{"name":"Lock"},"e898":{"name":"Lock Open"},"e899":{"name":"Lock Outline"},"e3fc":{"name":"Looks"},"e3fb":{"name":"Looks 3"},"e3fd":{"name":"Looks 4"},"e3fe":{"name":"Looks 5"},"e3ff":{"name":"Looks 6"},"e400":{"name":"Looks One"},"e401":{"name":"Looks Two"},"e028":{"name":"Loop"},"e402":{"name":"Loupe"},"e16d":{"name":"Low Priority"},"e89a":{"name":"Loyalty"},"e158":{"name":"Mail"},"e0e1":{"name":"Mail Outline"},"e55b":{"name":"Map"},"e159":{"name":"Markunread"},"e89b":{"name":"Markunread Mailbox"},"e322":{"name":"Memory"},"e5d2":{"name":"Menu"},"e252":{"name":"Merge Type"},"e0c9":{"name":"Message"},"e029":{"name":"Mic"},"e02a":{"name":"Mic None"},"e02b":{"name":"Mic Off"},"e618":{"name":"Mms"},"e253":{"name":"Mode Comment"},"e254":{"name":"Mode Edit"},"e263":{"name":"Monetization On"},"e25c":{"name":"Money Off"},"e403":{"name":"Monochrome Photos"},"e7f2":{"name":"Mood"},"e7f3":{"name":"Mood Bad"},"e619":{"name":"More"},"e5d3":{"name":"More Horiz"},"e5d4":{"name":"More Vert"},"e91b":{"name":"Motorcycle"},"e323":{"name":"Mouse"},"e168":{"name":"Move To Inbox"},"e02c":{"name":"Movie"},"e404":{"name":"Movie Creation"},"e43a":{"name":"Movie Filter"},"e6df":{"name":"Multiline Chart"},"e405":{"name":"Music Note"},"e063":{"name":"Music Video"},"e55c":{"name":"My Location"},"e406":{"name":"Nature"},"e407":{"name":"Nature People"},"e408":{"name":"Navigate Before"},"e409":{"name":"Navigate Next"},"e55d":{"name":"Navigation"},"e569":{"name":"Near Me"},"e1b9":{"name":"Network Cell"},"e640":{"name":"Network Check"},"e61a":{"name":"Network Locked"},"e1ba":{"name":"Network Wifi"},"e031":{"name":"New Releases"},"e16a":{"name":"Next Week"},"e1bb":{"name":"Nfc"},"e641":{"name":"No Encryption"},"e0cc":{"name":"No Sim"},"e033":{"name":"Not Interested"},"e06f":{"name":"Note"},"e89c":{"name":"Note Add"},"e7f4":{"name":"Notifications"},"e7f7":{"name":"Notifications Active"},"e7f5":{"name":"Notifications None"},"e7f6":{"name":"Notifications Off"},"e7f8":{"name":"Notifications Paused"},"e90a":{"name":"Offline Pin"},"e63a":{"name":"Ondemand Video"},"e91c":{"name":"Opacity"},"e89d":{"name":"Open In Browser"},"e89e":{"name":"Open In New"},"e89f":{"name":"Open With"},"e7f9":{"name":"Pages"},"e8a0":{"name":"Pageview"},"e40a":{"name":"Palette"},"e925":{"name":"Pan Tool"},"e40b":{"name":"Panorama"},"e40c":{"name":"Panorama Fish Eye"},"e40d":{"name":"Panorama Horizontal"},"e40e":{"name":"Panorama Vertical"},"e40f":{"name":"Panorama Wide Angle"},"e7fa":{"name":"Party Mode"},"e034":{"name":"Pause"},"e035":{"name":"Pause Circle Filled"},"e036":{"name":"Pause Circle Outline"},"e8a1":{"name":"Payment"},"e7fb":{"name":"People"},"e7fc":{"name":"People Outline"},"e8a2":{"name":"Perm Camera Mic"},"e8a3":{"name":"Perm Contact Calendar"},"e8a4":{"name":"Perm Data Setting"},"e8a5":{"name":"Perm Device Information"},"e8a6":{"name":"Perm Identity"},"e8a7":{"name":"Perm Media"},"e8a8":{"name":"Perm Phone Msg"},"e8a9":{"name":"Perm Scan Wifi"},"e7fd":{"name":"Person"},"e7fe":{"name":"Person Add"},"e7ff":{"name":"Person Outline"},"e55a":{"name":"Person Pin"},"e56a":{"name":"Person Pin Circle"},"e63b":{"name":"Personal Video"},"e91d":{"name":"Pets"},"e0cd":{"name":"Phone"},"e324":{"name":"Phone Android"},"e61b":{"name":"Phone Bluetooth Speaker"},"e61c":{"name":"Phone Forwarded"},"e61d":{"name":"Phone In Talk"},"e325":{"name":"Phone Iphone"},"e61e":{"name":"Phone Locked"},"e61f":{"name":"Phone Missed"},"e620":{"name":"Phone Paused"},"e326":{"name":"Phonelink"},"e0db":{"name":"Phonelink Erase"},"e0dc":{"name":"Phonelink Lock"},"e327":{"name":"Phonelink Off"},"e0dd":{"name":"Phonelink Ring"},"e0de":{"name":"Phonelink Setup"},"e410":{"name":"Photo"},"e411":{"name":"Photo Album"},"e412":{"name":"Photo Camera"},"e43b":{"name":"Photo Filter"},"e413":{"name":"Photo Library"},"e432":{"name":"Photo Size Select Actual"},"e433":{"name":"Photo Size Select Large"},"e434":{"name":"Photo Size Select Small"},"e415":{"name":"Picture As Pdf"},"e8aa":{"name":"Picture In Picture"},"e911":{"name":"Picture In Picture Alt"},"e6c4":{"name":"Pie Chart"},"e6c5":{"name":"Pie Chart Outlined"},"e55e":{"name":"Pin Drop"},"e55f":{"name":"Place"},"e037":{"name":"Play Arrow"},"e038":{"name":"Play Circle Filled"},"e039":{"name":"Play Circle Outline"},"e906":{"name":"Play For Work"},"e03b":{"name":"Playlist Add"},"e065":{"name":"Playlist Add Check"},"e05f":{"name":"Playlist Play"},"e800":{"name":"Plus One"},"e801":{"name":"Poll"},"e8ab":{"name":"Polymer"},"eb48":{"name":"Pool"},"e0ce":{"name":"Portable Wifi Off"},"e416":{"name":"Portrait"},"e63c":{"name":"Power"},"e336":{"name":"Power Input"},"e8ac":{"name":"Power Settings New"},"e91e":{"name":"Pregnant Woman"},"e0df":{"name":"Present To All"},"e8ad":{"name":"Print"},"e645":{"name":"Priority High"},"e80b":{"name":"Public"},"e255":{"name":"Publish"},"e8ae":{"name":"Query Builder"},"e8af":{"name":"Question Answer"},"e03c":{"name":"Queue"},"e03d":{"name":"Queue Music"},"e066":{"name":"Queue Play Next"},"e03e":{"name":"Radio"},"e837":{"name":"Radio Button Checked"},"e836":{"name":"Radio Button Unchecked"},"e560":{"name":"Rate Review"},"e8b0":{"name":"Receipt"},"e03f":{"name":"Recent Actors"},"e91f":{"name":"Record Voice Over"},"e8b1":{"name":"Redeem"},"e15a":{"name":"Redo"},"e5d5":{"name":"Refresh"},"e15b":{"name":"Remove"},"e15c":{"name":"Remove Circle"},"e15d":{"name":"Remove Circle Outline"},"e067":{"name":"Remove From Queue"},"e417":{"name":"Remove Red Eye"},"e928":{"name":"Remove Shopping Cart"},"e8fe":{"name":"Reorder"},"e040":{"name":"Repeat"},"e041":{"name":"Repeat One"},"e042":{"name":"Replay"},"e059":{"name":"Replay 10"},"e05a":{"name":"Replay 30"},"e05b":{"name":"Replay 5"},"e15e":{"name":"Reply"},"e15f":{"name":"Reply All"},"e160":{"name":"Report"},"e8b2":{"name":"Report Problem"},"e56c":{"name":"Restaurant"},"e561":{"name":"Restaurant Menu"},"e8b3":{"name":"Restore"},"e929":{"name":"Restore Page"},"e0d1":{"name":"Ring Volume"},"e8b4":{"name":"Room"},"eb49":{"name":"Room Service"},"e418":{"name":"Rotate 90 Degrees Ccw"},"e419":{"name":"Rotate Left"},"e41a":{"name":"Rotate Right"},"e920":{"name":"Rounded Corner"},"e328":{"name":"Router"},"e921":{"name":"Rowing"},"e0e5":{"name":"Rss Feed"},"e642":{"name":"Rv Hookup"},"e562":{"name":"Satellite"},"e161":{"name":"Save"},"e329":{"name":"Scanner"},"e8b5":{"name":"Schedule"},"e80c":{"name":"School"},"e1be":{"name":"Screen Lock Landscape"},"e1bf":{"name":"Screen Lock Portrait"},"e1c0":{"name":"Screen Lock Rotation"},"e1c1":{"name":"Screen Rotation"},"e0e2":{"name":"Screen Share"},"e623":{"name":"Sd Card"},"e1c2":{"name":"Sd Storage"},"e8b6":{"name":"Search"},"e32a":{"name":"Security"},"e162":{"name":"Select All"},"e163":{"name":"Send"},"e811":{"name":"Sentiment Dissatisfied"},"e812":{"name":"Sentiment Neutral"},"e813":{"name":"Sentiment Satisfied"},"e814":{"name":"Sentiment Very Dissatisfied"},"e815":{"name":"Sentiment Very Satisfied"},"e8b8":{"name":"Settings"},"e8b9":{"name":"Settings Applications"},"e8ba":{"name":"Settings Backup Restore"},"e8bb":{"name":"Settings Bluetooth"},"e8bd":{"name":"Settings Brightness"},"e8bc":{"name":"Settings Cell"},"e8be":{"name":"Settings Ethernet"},"e8bf":{"name":"Settings Input Antenna"},"e8c0":{"name":"Settings Input Component"},"e8c1":{"name":"Settings Input Composite"},"e8c2":{"name":"Settings Input Hdmi"},"e8c3":{"name":"Settings Input Svideo"},"e8c4":{"name":"Settings Overscan"},"e8c5":{"name":"Settings Phone"},"e8c6":{"name":"Settings Power"},"e8c7":{"name":"Settings Remote"},"e1c3":{"name":"Settings System Daydream"},"e8c8":{"name":"Settings Voice"},"e80d":{"name":"Share"},"e8c9":{"name":"Shop"},"e8ca":{"name":"Shop Two"},"e8cb":{"name":"Shopping Basket"},"e8cc":{"name":"Shopping Cart"},"e261":{"name":"Short Text"},"e6e1":{"name":"Show Chart"},"e043":{"name":"Shuffle"},"e1c8":{"name":"Signal Cellular 4 Bar"},"e1cd":{"name":"Signal Cellular Connected No Internet 4 Bar"},"e1ce":{"name":"Signal Cellular No Sim"},"e1cf":{"name":"Signal Cellular Null"},"e1d0":{"name":"Signal Cellular Off"},"e1d8":{"name":"Signal Wifi 4 Bar"},"e1d9":{"name":"Signal Wifi 4 Bar Lock"},"e1da":{"name":"Signal Wifi Off"},"e32b":{"name":"Sim Card"},"e624":{"name":"Sim Card Alert"},"e044":{"name":"Skip Next"},"e045":{"name":"Skip Previous"},"e41b":{"name":"Slideshow"},"e068":{"name":"Slow Motion Video"},"e32c":{"name":"Smartphone"},"eb4a":{"name":"Smoke Free"},"eb4b":{"name":"Smoking Rooms"},"e625":{"name":"Sms"},"e626":{"name":"Sms Failed"},"e046":{"name":"Snooze"},"e164":{"name":"Sort"},"e053":{"name":"Sort By Alpha"},"eb4c":{"name":"Spa"},"e256":{"name":"Space Bar"},"e32d":{"name":"Speaker"},"e32e":{"name":"Speaker Group"},"e8cd":{"name":"Speaker Notes"},"e92a":{"name":"Speaker Notes Off"},"e0d2":{"name":"Speaker Phone"},"e8ce":{"name":"Spellcheck"},"e838":{"name":"Star"},"e83a":{"name":"Star Border"},"e839":{"name":"Star Half"},"e8d0":{"name":"Stars"},"e0d3":{"name":"Stay Current Landscape"},"e0d4":{"name":"Stay Current Portrait"},"e0d5":{"name":"Stay Primary Landscape"},"e0d6":{"name":"Stay Primary Portrait"},"e047":{"name":"Stop"},"e0e3":{"name":"Stop Screen Share"},"e1db":{"name":"Storage"},"e8d1":{"name":"Store"},"e563":{"name":"Store Mall Directory"},"e41c":{"name":"Straighten"},"e56e":{"name":"Streetview"},"e257":{"name":"Strikethrough S"},"e41d":{"name":"Style"},"e5d9":{"name":"Subdirectory Arrow Left"},"e5da":{"name":"Subdirectory Arrow Right"},"e8d2":{"name":"Subject"},"e064":{"name":"Subscriptions"},"e048":{"name":"Subtitles"},"e56f":{"name":"Subway"},"e8d3":{"name":"Supervisor Account"},"e049":{"name":"Surround Sound"},"e0d7":{"name":"Swap Calls"},"e8d4":{"name":"Swap Horiz"},"e8d5":{"name":"Swap Vert"},"e8d6":{"name":"Swap Vertical Circle"},"e41e":{"name":"Switch Camera"},"e41f":{"name":"Switch Video"},"e627":{"name":"Sync"},"e628":{"name":"Sync Disabled"},"e629":{"name":"Sync Problem"},"e62a":{"name":"System Update"},"e8d7":{"name":"System Update Alt"},"e8d8":{"name":"Tab"},"e8d9":{"name":"Tab Unselected"},"e32f":{"name":"Tablet"},"e330":{"name":"Tablet Android"},"e331":{"name":"Tablet Mac"},"e420":{"name":"Tag Faces"},"e62b":{"name":"Tap And Play"},"e564":{"name":"Terrain"},"e262":{"name":"Text Fields"},"e165":{"name":"Text Format"},"e0d8":{"name":"Textsms"},"e421":{"name":"Texture"},"e8da":{"name":"Theaters"},"e8db":{"name":"Thumb Down"},"e8dc":{"name":"Thumb Up"},"e8dd":{"name":"Thumbs Up Down"},"e62c":{"name":"Time To Leave"},"e422":{"name":"Timelapse"},"e922":{"name":"Timeline"},"e425":{"name":"Timer"},"e423":{"name":"Timer 10"},"e424":{"name":"Timer 3"},"e426":{"name":"Timer Off"},"e264":{"name":"Title"},"e8de":{"name":"Toc"},"e8df":{"name":"Today"},"e8e0":{"name":"Toll"},"e427":{"name":"Tonality"},"e913":{"name":"Touch App"},"e332":{"name":"Toys"},"e8e1":{"name":"Track Changes"},"e565":{"name":"Traffic"},"e570":{"name":"Train"},"e571":{"name":"Tram"},"e572":{"name":"Transfer Within A Station"},"e428":{"name":"Transform"},"e8e2":{"name":"Translate"},"e8e3":{"name":"Trending Down"},"e8e4":{"name":"Trending Flat"},"e8e5":{"name":"Trending Up"},"e429":{"name":"Tune"},"e8e6":{"name":"Turned In"},"e8e7":{"name":"Turned In Not"},"e333":{"name":"Tv"},"e169":{"name":"Unarchive"},"e166":{"name":"Undo"},"e5d6":{"name":"Unfold Less"},"e5d7":{"name":"Unfold More"},"e923":{"name":"Update"},"e1e0":{"name":"Usb"},"e8e8":{"name":"Verified User"},"e258":{"name":"Vertical Align Bottom"},"e259":{"name":"Vertical Align Center"},"e25a":{"name":"Vertical Align Top"},"e62d":{"name":"Vibration"},"e070":{"name":"Video Call"},"e071":{"name":"Video Label"},"e04a":{"name":"Video Library"},"e04b":{"name":"Videocam"},"e04c":{"name":"Videocam Off"},"e338":{"name":"Videogame Asset"},"e8e9":{"name":"View Agenda"},"e8ea":{"name":"View Array"},"e8eb":{"name":"View Carousel"},"e8ec":{"name":"View Column"},"e42a":{"name":"View Comfy"},"e42b":{"name":"View Compact"},"e8ed":{"name":"View Day"},"e8ee":{"name":"View Headline"},"e8ef":{"name":"View List"},"e8f0":{"name":"View Module"},"e8f1":{"name":"View Quilt"},"e8f2":{"name":"View Stream"},"e8f3":{"name":"View Week"},"e435":{"name":"Vignette"},"e8f4":{"name":"Visibility"},"e8f5":{"name":"Visibility Off"},"e62e":{"name":"Voice Chat"},"e0d9":{"name":"Voicemail"},"e04d":{"name":"Volume Down"},"e04e":{"name":"Volume Mute"},"e04f":{"name":"Volume Off"},"e050":{"name":"Volume Up"},"e0da":{"name":"Vpn Key"},"e62f":{"name":"Vpn Lock"},"e1bc":{"name":"Wallpaper"},"e002":{"name":"Warning"},"e334":{"name":"Watch"},"e924":{"name":"Watch Later"},"e42c":{"name":"Wb Auto"},"e42d":{"name":"Wb Cloudy"},"e42e":{"name":"Wb Incandescent"},"e436":{"name":"Wb Iridescent"},"e430":{"name":"Wb Sunny"},"e63d":{"name":"Wc"},"e051":{"name":"Web"},"e069":{"name":"Web Asset"},"e16b":{"name":"Weekend"},"e80e":{"name":"Whatshot"},"e1bd":{"name":"Widgets"},"e63e":{"name":"Wifi"},"e1e1":{"name":"Wifi Lock"},"e1e2":{"name":"Wifi Tethering"},"e8f9":{"name":"Work"},"e25b":{"name":"Wrap Text"},"e8fa":{"name":"Youtube Searched For"},"e8ff":{"name":"Zoom In"},"e900":{"name":"Zoom Out"},"e56b":{"name":"Zoom Out Map"}}} \ No newline at end of file diff --git a/src/assets/fonts/material-icons/MaterialIcons-Regular.svg b/src/assets/fonts/material-icons/MaterialIcons-Regular.svg new file mode 100755 index 000000000..a449327e2 --- /dev/null +++ b/src/assets/fonts/material-icons/MaterialIcons-Regular.svg @@ -0,0 +1,2373 @@ + + + + + +Created by FontForge 20151118 at Mon Feb 8 11:58:02 2016 + By shyndman +Copyright 2015 Google, Inc. All Rights Reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/fonts/material-icons/MaterialIcons-Regular.ttf b/src/assets/fonts/material-icons/MaterialIcons-Regular.ttf new file mode 100755 index 000000000..7015564ad Binary files /dev/null and b/src/assets/fonts/material-icons/MaterialIcons-Regular.ttf differ diff --git a/src/assets/fonts/material-icons/MaterialIcons-Regular.woff b/src/assets/fonts/material-icons/MaterialIcons-Regular.woff new file mode 100755 index 000000000..b648a3eea Binary files /dev/null and b/src/assets/fonts/material-icons/MaterialIcons-Regular.woff differ diff --git a/src/assets/fonts/material-icons/MaterialIcons-Regular.woff2 b/src/assets/fonts/material-icons/MaterialIcons-Regular.woff2 new file mode 100755 index 000000000..9fa211252 Binary files /dev/null and b/src/assets/fonts/material-icons/MaterialIcons-Regular.woff2 differ diff --git a/src/assets/fonts/material-icons/README.md b/src/assets/fonts/material-icons/README.md new file mode 100755 index 000000000..ce4141eca --- /dev/null +++ b/src/assets/fonts/material-icons/README.md @@ -0,0 +1,9 @@ +The recommended way to use the Material Icons font is by linking to the web font hosted on Google Fonts: + +```html + +``` + +Read more in our full usage guide: +http://google.github.io/material-design-icons/#icon-font-for-the-web diff --git a/src/assets/fonts/material-icons/codepoints b/src/assets/fonts/material-icons/codepoints new file mode 100755 index 000000000..3c8b07507 --- /dev/null +++ b/src/assets/fonts/material-icons/codepoints @@ -0,0 +1,932 @@ +3d_rotation e84d +ac_unit eb3b +access_alarm e190 +access_alarms e191 +access_time e192 +accessibility e84e +accessible e914 +account_balance e84f +account_balance_wallet e850 +account_box e851 +account_circle e853 +adb e60e +add e145 +add_a_photo e439 +add_alarm e193 +add_alert e003 +add_box e146 +add_circle e147 +add_circle_outline e148 +add_location e567 +add_shopping_cart e854 +add_to_photos e39d +add_to_queue e05c +adjust e39e +airline_seat_flat e630 +airline_seat_flat_angled e631 +airline_seat_individual_suite e632 +airline_seat_legroom_extra e633 +airline_seat_legroom_normal e634 +airline_seat_legroom_reduced e635 +airline_seat_recline_extra e636 +airline_seat_recline_normal e637 +airplanemode_active e195 +airplanemode_inactive e194 +airplay e055 +airport_shuttle eb3c +alarm e855 +alarm_add e856 +alarm_off e857 +alarm_on e858 +album e019 +all_inclusive eb3d +all_out e90b +android e859 +announcement e85a +apps e5c3 +archive e149 +arrow_back e5c4 +arrow_downward e5db +arrow_drop_down e5c5 +arrow_drop_down_circle e5c6 +arrow_drop_up e5c7 +arrow_forward e5c8 +arrow_upward e5d8 +art_track e060 +aspect_ratio e85b +assessment e85c +assignment e85d +assignment_ind e85e +assignment_late e85f +assignment_return e860 +assignment_returned e861 +assignment_turned_in e862 +assistant e39f +assistant_photo e3a0 +attach_file e226 +attach_money e227 +attachment e2bc +audiotrack e3a1 +autorenew e863 +av_timer e01b +backspace e14a +backup e864 +battery_alert e19c +battery_charging_full e1a3 +battery_full e1a4 +battery_std e1a5 +battery_unknown e1a6 +beach_access eb3e +beenhere e52d +block e14b +bluetooth e1a7 +bluetooth_audio e60f +bluetooth_connected e1a8 +bluetooth_disabled e1a9 +bluetooth_searching e1aa +blur_circular e3a2 +blur_linear e3a3 +blur_off e3a4 +blur_on e3a5 +book e865 +bookmark e866 +bookmark_border e867 +border_all e228 +border_bottom e229 +border_clear e22a +border_color e22b +border_horizontal e22c +border_inner e22d +border_left e22e +border_outer e22f +border_right e230 +border_style e231 +border_top e232 +border_vertical e233 +branding_watermark e06b +brightness_1 e3a6 +brightness_2 e3a7 +brightness_3 e3a8 +brightness_4 e3a9 +brightness_5 e3aa +brightness_6 e3ab +brightness_7 e3ac +brightness_auto e1ab +brightness_high e1ac +brightness_low e1ad +brightness_medium e1ae +broken_image e3ad +brush e3ae +bubble_chart e6dd +bug_report e868 +build e869 +burst_mode e43c +business e0af +business_center eb3f +cached e86a +cake e7e9 +call e0b0 +call_end e0b1 +call_made e0b2 +call_merge e0b3 +call_missed e0b4 +call_missed_outgoing e0e4 +call_received e0b5 +call_split e0b6 +call_to_action e06c +camera e3af +camera_alt e3b0 +camera_enhance e8fc +camera_front e3b1 +camera_rear e3b2 +camera_roll e3b3 +cancel e5c9 +card_giftcard e8f6 +card_membership e8f7 +card_travel e8f8 +casino eb40 +cast e307 +cast_connected e308 +center_focus_strong e3b4 +center_focus_weak e3b5 +change_history e86b +chat e0b7 +chat_bubble e0ca +chat_bubble_outline e0cb +check e5ca +check_box e834 +check_box_outline_blank e835 +check_circle e86c +chevron_left e5cb +chevron_right e5cc +child_care eb41 +child_friendly eb42 +chrome_reader_mode e86d +class e86e +clear e14c +clear_all e0b8 +close e5cd +closed_caption e01c +cloud e2bd +cloud_circle e2be +cloud_done e2bf +cloud_download e2c0 +cloud_off e2c1 +cloud_queue e2c2 +cloud_upload e2c3 +code e86f +collections e3b6 +collections_bookmark e431 +color_lens e3b7 +colorize e3b8 +comment e0b9 +compare e3b9 +compare_arrows e915 +computer e30a +confirmation_number e638 +contact_mail e0d0 +contact_phone e0cf +contacts e0ba +content_copy e14d +content_cut e14e +content_paste e14f +control_point e3ba +control_point_duplicate e3bb +copyright e90c +create e150 +create_new_folder e2cc +credit_card e870 +crop e3be +crop_16_9 e3bc +crop_3_2 e3bd +crop_5_4 e3bf +crop_7_5 e3c0 +crop_din e3c1 +crop_free e3c2 +crop_landscape e3c3 +crop_original e3c4 +crop_portrait e3c5 +crop_rotate e437 +crop_square e3c6 +dashboard e871 +data_usage e1af +date_range e916 +dehaze e3c7 +delete e872 +delete_forever e92b +delete_sweep e16c +description e873 +desktop_mac e30b +desktop_windows e30c +details e3c8 +developer_board e30d +developer_mode e1b0 +device_hub e335 +devices e1b1 +devices_other e337 +dialer_sip e0bb +dialpad e0bc +directions e52e +directions_bike e52f +directions_boat e532 +directions_bus e530 +directions_car e531 +directions_railway e534 +directions_run e566 +directions_subway e533 +directions_transit e535 +directions_walk e536 +disc_full e610 +dns e875 +do_not_disturb e612 +do_not_disturb_alt e611 +do_not_disturb_off e643 +do_not_disturb_on e644 +dock e30e +domain e7ee +done e876 +done_all e877 +donut_large e917 +donut_small e918 +drafts e151 +drag_handle e25d +drive_eta e613 +dvr e1b2 +edit e3c9 +edit_location e568 +eject e8fb +email e0be +enhanced_encryption e63f +equalizer e01d +error e000 +error_outline e001 +euro_symbol e926 +ev_station e56d +event e878 +event_available e614 +event_busy e615 +event_note e616 +event_seat e903 +exit_to_app e879 +expand_less e5ce +expand_more e5cf +explicit e01e +explore e87a +exposure e3ca +exposure_neg_1 e3cb +exposure_neg_2 e3cc +exposure_plus_1 e3cd +exposure_plus_2 e3ce +exposure_zero e3cf +extension e87b +face e87c +fast_forward e01f +fast_rewind e020 +favorite e87d +favorite_border e87e +featured_play_list e06d +featured_video e06e +feedback e87f +fiber_dvr e05d +fiber_manual_record e061 +fiber_new e05e +fiber_pin e06a +fiber_smart_record e062 +file_download e2c4 +file_upload e2c6 +filter e3d3 +filter_1 e3d0 +filter_2 e3d1 +filter_3 e3d2 +filter_4 e3d4 +filter_5 e3d5 +filter_6 e3d6 +filter_7 e3d7 +filter_8 e3d8 +filter_9 e3d9 +filter_9_plus e3da +filter_b_and_w e3db +filter_center_focus e3dc +filter_drama e3dd +filter_frames e3de +filter_hdr e3df +filter_list e152 +filter_none e3e0 +filter_tilt_shift e3e2 +filter_vintage e3e3 +find_in_page e880 +find_replace e881 +fingerprint e90d +first_page e5dc +fitness_center eb43 +flag e153 +flare e3e4 +flash_auto e3e5 +flash_off e3e6 +flash_on e3e7 +flight e539 +flight_land e904 +flight_takeoff e905 +flip e3e8 +flip_to_back e882 +flip_to_front e883 +folder e2c7 +folder_open e2c8 +folder_shared e2c9 +folder_special e617 +font_download e167 +format_align_center e234 +format_align_justify e235 +format_align_left e236 +format_align_right e237 +format_bold e238 +format_clear e239 +format_color_fill e23a +format_color_reset e23b +format_color_text e23c +format_indent_decrease e23d +format_indent_increase e23e +format_italic e23f +format_line_spacing e240 +format_list_bulleted e241 +format_list_numbered e242 +format_paint e243 +format_quote e244 +format_shapes e25e +format_size e245 +format_strikethrough e246 +format_textdirection_l_to_r e247 +format_textdirection_r_to_l e248 +format_underlined e249 +forum e0bf +forward e154 +forward_10 e056 +forward_30 e057 +forward_5 e058 +free_breakfast eb44 +fullscreen e5d0 +fullscreen_exit e5d1 +functions e24a +g_translate e927 +gamepad e30f +games e021 +gavel e90e +gesture e155 +get_app e884 +gif e908 +golf_course eb45 +gps_fixed e1b3 +gps_not_fixed e1b4 +gps_off e1b5 +grade e885 +gradient e3e9 +grain e3ea +graphic_eq e1b8 +grid_off e3eb +grid_on e3ec +group e7ef +group_add e7f0 +group_work e886 +hd e052 +hdr_off e3ed +hdr_on e3ee +hdr_strong e3f1 +hdr_weak e3f2 +headset e310 +headset_mic e311 +healing e3f3 +hearing e023 +help e887 +help_outline e8fd +high_quality e024 +highlight e25f +highlight_off e888 +history e889 +home e88a +hot_tub eb46 +hotel e53a +hourglass_empty e88b +hourglass_full e88c +http e902 +https e88d +image e3f4 +image_aspect_ratio e3f5 +import_contacts e0e0 +import_export e0c3 +important_devices e912 +inbox e156 +indeterminate_check_box e909 +info e88e +info_outline e88f +input e890 +insert_chart e24b +insert_comment e24c +insert_drive_file e24d +insert_emoticon e24e +insert_invitation e24f +insert_link e250 +insert_photo e251 +invert_colors e891 +invert_colors_off e0c4 +iso e3f6 +keyboard e312 +keyboard_arrow_down e313 +keyboard_arrow_left e314 +keyboard_arrow_right e315 +keyboard_arrow_up e316 +keyboard_backspace e317 +keyboard_capslock e318 +keyboard_hide e31a +keyboard_return e31b +keyboard_tab e31c +keyboard_voice e31d +kitchen eb47 +label e892 +label_outline e893 +landscape e3f7 +language e894 +laptop e31e +laptop_chromebook e31f +laptop_mac e320 +laptop_windows e321 +last_page e5dd +launch e895 +layers e53b +layers_clear e53c +leak_add e3f8 +leak_remove e3f9 +lens e3fa +library_add e02e +library_books e02f +library_music e030 +lightbulb_outline e90f +line_style e919 +line_weight e91a +linear_scale e260 +link e157 +linked_camera e438 +list e896 +live_help e0c6 +live_tv e639 +local_activity e53f +local_airport e53d +local_atm e53e +local_bar e540 +local_cafe e541 +local_car_wash e542 +local_convenience_store e543 +local_dining e556 +local_drink e544 +local_florist e545 +local_gas_station e546 +local_grocery_store e547 +local_hospital e548 +local_hotel e549 +local_laundry_service e54a +local_library e54b +local_mall e54c +local_movies e54d +local_offer e54e +local_parking e54f +local_pharmacy e550 +local_phone e551 +local_pizza e552 +local_play e553 +local_post_office e554 +local_printshop e555 +local_see e557 +local_shipping e558 +local_taxi e559 +location_city e7f1 +location_disabled e1b6 +location_off e0c7 +location_on e0c8 +location_searching e1b7 +lock e897 +lock_open e898 +lock_outline e899 +looks e3fc +looks_3 e3fb +looks_4 e3fd +looks_5 e3fe +looks_6 e3ff +looks_one e400 +looks_two e401 +loop e028 +loupe e402 +low_priority e16d +loyalty e89a +mail e158 +mail_outline e0e1 +map e55b +markunread e159 +markunread_mailbox e89b +memory e322 +menu e5d2 +merge_type e252 +message e0c9 +mic e029 +mic_none e02a +mic_off e02b +mms e618 +mode_comment e253 +mode_edit e254 +monetization_on e263 +money_off e25c +monochrome_photos e403 +mood e7f2 +mood_bad e7f3 +more e619 +more_horiz e5d3 +more_vert e5d4 +motorcycle e91b +mouse e323 +move_to_inbox e168 +movie e02c +movie_creation e404 +movie_filter e43a +multiline_chart e6df +music_note e405 +music_video e063 +my_location e55c +nature e406 +nature_people e407 +navigate_before e408 +navigate_next e409 +navigation e55d +near_me e569 +network_cell e1b9 +network_check e640 +network_locked e61a +network_wifi e1ba +new_releases e031 +next_week e16a +nfc e1bb +no_encryption e641 +no_sim e0cc +not_interested e033 +note e06f +note_add e89c +notifications e7f4 +notifications_active e7f7 +notifications_none e7f5 +notifications_off e7f6 +notifications_paused e7f8 +offline_pin e90a +ondemand_video e63a +opacity e91c +open_in_browser e89d +open_in_new e89e +open_with e89f +pages e7f9 +pageview e8a0 +palette e40a +pan_tool e925 +panorama e40b +panorama_fish_eye e40c +panorama_horizontal e40d +panorama_vertical e40e +panorama_wide_angle e40f +party_mode e7fa +pause e034 +pause_circle_filled e035 +pause_circle_outline e036 +payment e8a1 +people e7fb +people_outline e7fc +perm_camera_mic e8a2 +perm_contact_calendar e8a3 +perm_data_setting e8a4 +perm_device_information e8a5 +perm_identity e8a6 +perm_media e8a7 +perm_phone_msg e8a8 +perm_scan_wifi e8a9 +person e7fd +person_add e7fe +person_outline e7ff +person_pin e55a +person_pin_circle e56a +personal_video e63b +pets e91d +phone e0cd +phone_android e324 +phone_bluetooth_speaker e61b +phone_forwarded e61c +phone_in_talk e61d +phone_iphone e325 +phone_locked e61e +phone_missed e61f +phone_paused e620 +phonelink e326 +phonelink_erase e0db +phonelink_lock e0dc +phonelink_off e327 +phonelink_ring e0dd +phonelink_setup e0de +photo e410 +photo_album e411 +photo_camera e412 +photo_filter e43b +photo_library e413 +photo_size_select_actual e432 +photo_size_select_large e433 +photo_size_select_small e434 +picture_as_pdf e415 +picture_in_picture e8aa +picture_in_picture_alt e911 +pie_chart e6c4 +pie_chart_outlined e6c5 +pin_drop e55e +place e55f +play_arrow e037 +play_circle_filled e038 +play_circle_outline e039 +play_for_work e906 +playlist_add e03b +playlist_add_check e065 +playlist_play e05f +plus_one e800 +poll e801 +polymer e8ab +pool eb48 +portable_wifi_off e0ce +portrait e416 +power e63c +power_input e336 +power_settings_new e8ac +pregnant_woman e91e +present_to_all e0df +print e8ad +priority_high e645 +public e80b +publish e255 +query_builder e8ae +question_answer e8af +queue e03c +queue_music e03d +queue_play_next e066 +radio e03e +radio_button_checked e837 +radio_button_unchecked e836 +rate_review e560 +receipt e8b0 +recent_actors e03f +record_voice_over e91f +redeem e8b1 +redo e15a +refresh e5d5 +remove e15b +remove_circle e15c +remove_circle_outline e15d +remove_from_queue e067 +remove_red_eye e417 +remove_shopping_cart e928 +reorder e8fe +repeat e040 +repeat_one e041 +replay e042 +replay_10 e059 +replay_30 e05a +replay_5 e05b +reply e15e +reply_all e15f +report e160 +report_problem e8b2 +restaurant e56c +restaurant_menu e561 +restore e8b3 +restore_page e929 +ring_volume e0d1 +room e8b4 +room_service eb49 +rotate_90_degrees_ccw e418 +rotate_left e419 +rotate_right e41a +rounded_corner e920 +router e328 +rowing e921 +rss_feed e0e5 +rv_hookup e642 +satellite e562 +save e161 +scanner e329 +schedule e8b5 +school e80c +screen_lock_landscape e1be +screen_lock_portrait e1bf +screen_lock_rotation e1c0 +screen_rotation e1c1 +screen_share e0e2 +sd_card e623 +sd_storage e1c2 +search e8b6 +security e32a +select_all e162 +send e163 +sentiment_dissatisfied e811 +sentiment_neutral e812 +sentiment_satisfied e813 +sentiment_very_dissatisfied e814 +sentiment_very_satisfied e815 +settings e8b8 +settings_applications e8b9 +settings_backup_restore e8ba +settings_bluetooth e8bb +settings_brightness e8bd +settings_cell e8bc +settings_ethernet e8be +settings_input_antenna e8bf +settings_input_component e8c0 +settings_input_composite e8c1 +settings_input_hdmi e8c2 +settings_input_svideo e8c3 +settings_overscan e8c4 +settings_phone e8c5 +settings_power e8c6 +settings_remote e8c7 +settings_system_daydream e1c3 +settings_voice e8c8 +share e80d +shop e8c9 +shop_two e8ca +shopping_basket e8cb +shopping_cart e8cc +short_text e261 +show_chart e6e1 +shuffle e043 +signal_cellular_4_bar e1c8 +signal_cellular_connected_no_internet_4_bar e1cd +signal_cellular_no_sim e1ce +signal_cellular_null e1cf +signal_cellular_off e1d0 +signal_wifi_4_bar e1d8 +signal_wifi_4_bar_lock e1d9 +signal_wifi_off e1da +sim_card e32b +sim_card_alert e624 +skip_next e044 +skip_previous e045 +slideshow e41b +slow_motion_video e068 +smartphone e32c +smoke_free eb4a +smoking_rooms eb4b +sms e625 +sms_failed e626 +snooze e046 +sort e164 +sort_by_alpha e053 +spa eb4c +space_bar e256 +speaker e32d +speaker_group e32e +speaker_notes e8cd +speaker_notes_off e92a +speaker_phone e0d2 +spellcheck e8ce +star e838 +star_border e83a +star_half e839 +stars e8d0 +stay_current_landscape e0d3 +stay_current_portrait e0d4 +stay_primary_landscape e0d5 +stay_primary_portrait e0d6 +stop e047 +stop_screen_share e0e3 +storage e1db +store e8d1 +store_mall_directory e563 +straighten e41c +streetview e56e +strikethrough_s e257 +style e41d +subdirectory_arrow_left e5d9 +subdirectory_arrow_right e5da +subject e8d2 +subscriptions e064 +subtitles e048 +subway e56f +supervisor_account e8d3 +surround_sound e049 +swap_calls e0d7 +swap_horiz e8d4 +swap_vert e8d5 +swap_vertical_circle e8d6 +switch_camera e41e +switch_video e41f +sync e627 +sync_disabled e628 +sync_problem e629 +system_update e62a +system_update_alt e8d7 +tab e8d8 +tab_unselected e8d9 +tablet e32f +tablet_android e330 +tablet_mac e331 +tag_faces e420 +tap_and_play e62b +terrain e564 +text_fields e262 +text_format e165 +textsms e0d8 +texture e421 +theaters e8da +thumb_down e8db +thumb_up e8dc +thumbs_up_down e8dd +time_to_leave e62c +timelapse e422 +timeline e922 +timer e425 +timer_10 e423 +timer_3 e424 +timer_off e426 +title e264 +toc e8de +today e8df +toll e8e0 +tonality e427 +touch_app e913 +toys e332 +track_changes e8e1 +traffic e565 +train e570 +tram e571 +transfer_within_a_station e572 +transform e428 +translate e8e2 +trending_down e8e3 +trending_flat e8e4 +trending_up e8e5 +tune e429 +turned_in e8e6 +turned_in_not e8e7 +tv e333 +unarchive e169 +undo e166 +unfold_less e5d6 +unfold_more e5d7 +update e923 +usb e1e0 +verified_user e8e8 +vertical_align_bottom e258 +vertical_align_center e259 +vertical_align_top e25a +vibration e62d +video_call e070 +video_label e071 +video_library e04a +videocam e04b +videocam_off e04c +videogame_asset e338 +view_agenda e8e9 +view_array e8ea +view_carousel e8eb +view_column e8ec +view_comfy e42a +view_compact e42b +view_day e8ed +view_headline e8ee +view_list e8ef +view_module e8f0 +view_quilt e8f1 +view_stream e8f2 +view_week e8f3 +vignette e435 +visibility e8f4 +visibility_off e8f5 +voice_chat e62e +voicemail e0d9 +volume_down e04d +volume_mute e04e +volume_off e04f +volume_up e050 +vpn_key e0da +vpn_lock e62f +wallpaper e1bc +warning e002 +watch e334 +watch_later e924 +wb_auto e42c +wb_cloudy e42d +wb_incandescent e42e +wb_iridescent e436 +wb_sunny e430 +wc e63d +web e051 +web_asset e069 +weekend e16b +whatshot e80e +widgets e1bd +wifi e63e +wifi_lock e1e1 +wifi_tethering e1e2 +work e8f9 +wrap_text e25b +youtube_searched_for e8fa +zoom_in e8ff +zoom_out e900 +zoom_out_map e56b diff --git a/src/assets/fonts/material-icons/material-icons.css b/src/assets/fonts/material-icons/material-icons.css new file mode 100755 index 000000000..2270c09d0 --- /dev/null +++ b/src/assets/fonts/material-icons/material-icons.css @@ -0,0 +1,36 @@ +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url(MaterialIcons-Regular.eot); /* For IE6-8 */ + src: local('Material Icons'), + local('MaterialIcons-Regular'), + url(MaterialIcons-Regular.woff2) format('woff2'), + url(MaterialIcons-Regular.woff) format('woff'), + url(MaterialIcons-Regular.ttf) format('truetype'); +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; +} diff --git a/src/assets/fonts/muli/Muli-Black.ttf b/src/assets/fonts/muli/Muli-Black.ttf new file mode 100755 index 000000000..76825b817 Binary files /dev/null and b/src/assets/fonts/muli/Muli-Black.ttf differ diff --git a/src/assets/fonts/muli/Muli-BlackItalic.ttf b/src/assets/fonts/muli/Muli-BlackItalic.ttf new file mode 100755 index 000000000..70762c09d Binary files /dev/null and b/src/assets/fonts/muli/Muli-BlackItalic.ttf differ diff --git a/src/assets/fonts/muli/Muli-Bold.ttf b/src/assets/fonts/muli/Muli-Bold.ttf new file mode 100755 index 000000000..732c3ec02 Binary files /dev/null and b/src/assets/fonts/muli/Muli-Bold.ttf differ diff --git a/src/assets/fonts/muli/Muli-BoldItalic.ttf b/src/assets/fonts/muli/Muli-BoldItalic.ttf new file mode 100755 index 000000000..1dac1c9cb Binary files /dev/null and b/src/assets/fonts/muli/Muli-BoldItalic.ttf differ diff --git a/src/assets/fonts/muli/Muli-ExtraBold.ttf b/src/assets/fonts/muli/Muli-ExtraBold.ttf new file mode 100755 index 000000000..a8ef44cec Binary files /dev/null and b/src/assets/fonts/muli/Muli-ExtraBold.ttf differ diff --git a/src/assets/fonts/muli/Muli-ExtraBoldItalic.ttf b/src/assets/fonts/muli/Muli-ExtraBoldItalic.ttf new file mode 100755 index 000000000..b99e68d46 Binary files /dev/null and b/src/assets/fonts/muli/Muli-ExtraBoldItalic.ttf differ diff --git a/src/assets/fonts/muli/Muli-ExtraLight.ttf b/src/assets/fonts/muli/Muli-ExtraLight.ttf new file mode 100755 index 000000000..ffe7b29de Binary files /dev/null and b/src/assets/fonts/muli/Muli-ExtraLight.ttf differ diff --git a/src/assets/fonts/muli/Muli-ExtraLightItalic.ttf b/src/assets/fonts/muli/Muli-ExtraLightItalic.ttf new file mode 100755 index 000000000..eb8b36a0a Binary files /dev/null and b/src/assets/fonts/muli/Muli-ExtraLightItalic.ttf differ diff --git a/src/assets/fonts/muli/Muli-Italic.ttf b/src/assets/fonts/muli/Muli-Italic.ttf new file mode 100755 index 000000000..e1599293f Binary files /dev/null and b/src/assets/fonts/muli/Muli-Italic.ttf differ diff --git a/src/assets/fonts/muli/Muli-Light.ttf b/src/assets/fonts/muli/Muli-Light.ttf new file mode 100755 index 000000000..4e66b6979 Binary files /dev/null and b/src/assets/fonts/muli/Muli-Light.ttf differ diff --git a/src/assets/fonts/muli/Muli-LightItalic.ttf b/src/assets/fonts/muli/Muli-LightItalic.ttf new file mode 100755 index 000000000..85ac25132 Binary files /dev/null and b/src/assets/fonts/muli/Muli-LightItalic.ttf differ diff --git a/src/assets/fonts/muli/Muli-Regular.ttf b/src/assets/fonts/muli/Muli-Regular.ttf new file mode 100755 index 000000000..1dfd64318 Binary files /dev/null and b/src/assets/fonts/muli/Muli-Regular.ttf differ diff --git a/src/assets/fonts/muli/Muli-SemiBold.ttf b/src/assets/fonts/muli/Muli-SemiBold.ttf new file mode 100755 index 000000000..096a15e42 Binary files /dev/null and b/src/assets/fonts/muli/Muli-SemiBold.ttf differ diff --git a/src/assets/fonts/muli/Muli-SemiBoldItalic.ttf b/src/assets/fonts/muli/Muli-SemiBoldItalic.ttf new file mode 100755 index 000000000..6d7bcc856 Binary files /dev/null and b/src/assets/fonts/muli/Muli-SemiBoldItalic.ttf differ diff --git a/src/assets/fonts/muli/OFL.txt b/src/assets/fonts/muli/OFL.txt new file mode 100755 index 000000000..1016891d2 --- /dev/null +++ b/src/assets/fonts/muli/OFL.txt @@ -0,0 +1,93 @@ +Copyright (c) 2016 The Muli Project Authors (contact@sansoxygen.com) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/src/assets/fonts/muli/muli.css b/src/assets/fonts/muli/muli.css new file mode 100644 index 000000000..358f89bc1 --- /dev/null +++ b/src/assets/fonts/muli/muli.css @@ -0,0 +1,30 @@ +/* vietnamese */ +@font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 400; + src: local('Muli Regular'), + local('Muli-Regular'), + url(Muli-Regular.ttf) format('truetype'); + unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; + } + /* latin-ext */ + @font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 400; + src: local('Muli Regular'), + local('Muli-Regular'), + url(Muli-Regular.ttf) format('truetype'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; + } + /* latin */ + @font-face { + font-family: 'Muli'; + font-style: normal; + font-weight: 400; + src: local('Muli Regular'), + local('Muli-Regular'), + url(Muli-Regular.ttf) format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; + } diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 9e6753071..3942d6c57 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "Sprache", "SIGN_IN": "Anmelden", "SIGN_OUT": "Abmelden", + "PREVIEW": { + "TITLE": "Vorschau" + }, "NEW_MENU": { "LABEL": "Neu", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "Dateibibliotheken", "TOOLTIP": "Auf Dateibibliotheken zugreifen" + }, + "EMPTY_STATE": { + "TITLE": "Sie sind noch kein Mitglied von Dateibibliotheken", + "TEXT": "Treten Sie Sites bei, um Dateien hochladen, anzeigen und freigeben zu können." } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "Freigegeben", "TOOLTIP": "Dateien anzeigen, die freigegeben wurden" + }, + "EMPTY_STATE": { + "TITLE": "Keine freigegebenen Dateien oder Ordner", + "TEXT": "Elemente, die Sie mit der Freigabeoption freigeben, werden hier angezeigt." } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "Kürzlich bearbeitete Dateien", "TOOLTIP": "Dateien anzeigen, die Sie kürzlich bearbeitet haben" + }, + "EMPTY_STATE": { + "TITLE": "Keine aktuellen Dateien", + "TEXT": "Elemente, die Sie in den letzten 30 Tagen hochgeladen oder bearbeitet haben, werden hier angezeigt." } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "Favoriten", "TOOLTIP": "Dateien und Ordner anzeigen, die Sie zu Ihren Favoriten hinzugefügt haben" + }, + "EMPTY_STATE": { + "TITLE": "Keine Dateien oder Ordner als Favoriten markiert", + "TEXT": "Sie können Elemente als Favoriten markieren, um sie später leichter wiederzufinden." } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "Papierkorb", "TOOLTIP": "Gelöschte Dateien im Papierkorb anzeigen" + }, + "EMPTY_STATE": { + "TITLE": "Papierkorb ist leer", + "FIRST_TEXT": "Elemente, die Sie löschen, werden in den Papierkorb verschoben.", + "SECOND_TEXT": "Leeren Sie den Papierkorb, um Elemente dauerhaft zu löschen." } + }, + "ABOUT": { + "TITLE": "Info" } }, "ACTIONS": { "VIEW": "Anzeigen", - "SHARE": "Freigeben", "EDIT": "Bearbeiten", "DOWNLOAD": "Herunterladen", "COPY": "Kopieren", "MOVE": "Verschieben", "DELETE": "Löschen", + "DELETE_PERMANENT": "Dauerhaft löschen", "MORE": "Weitere Aktionen", "UNDO": "Rückgängig machen", "RESTORE": "Wiederherstellen", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} Elemente konnten nicht gelöscht werden", - "SINGULAR": "Element '{{ name }}' konnte nicht gelöscht werden" + "SINGULAR": "{{ name }} konnte nicht gelöscht werden" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "{{ number }} Elemente wurden nicht wiederhergestellt, weil es Probleme mit dem Speicherort für die Wiederherstellung gab", - "NODE_EXISTS": "Wiederherstellung nicht möglich, Element '{{ name }}' gibt es bereits", - "LOCATION_MISSING": "Element '{{ name }}' kann nicht wiederhergestellt werden, weil es den ursprünglichen Speicherort nicht mehr gibt", - "GENERIC": "Beim Wiederherstellen des Elements '{{ name }}' ist ein Problem aufgetreten" + "NODE_EXISTS": "Wiederherstellung nicht möglich, {{ name }} gibt es bereits", + "LOCATION_MISSING": "{{ name }} kann nicht wiederhergestellt werden, weil es den ursprünglichen Speicherort nicht mehr gibt", + "GENERIC": "Beim Wiederherstellen von {{ name }} ist ein Problem aufgetreten" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} Elemente gelöscht", - "SINGULAR": "Element '{{ name }}' gelöscht", - "PARTIAL_SINGULAR": "Element '{{ name }}' gelöscht, '{{ failed }}' konnte nicht gelöscht werden", + "SINGULAR": "{{ name }} gelöscht", + "PARTIAL_SINGULAR": "{{ name }} gelöscht, {{ failed }} konnte nicht gelöscht werden", "PARTIAL_PLURAL": "{{ number }} Elemente gelöscht, {{ failed }} konnte(n) nicht gelöscht werden" }, "NODES_RESTORE": { "PLURAL": "Wiederherstellung erfolgreich", - "SINGULAR": "Element '{{ name }}' wiederhergestellt" + "SINGULAR": "{{ name }} wiederhergestellt" } }, "NODE_DELETION": { @@ -184,8 +212,12 @@ "PARTIAL_PLURAL": "{{ success }} Elemente gelöscht, {{ failed }} konnte(n) nicht gelöscht werden" }, "NODE_COPY": { - "SINGULAR": "{{ success }} Element kopiert.", - "PLURAL": "{{ success }} Elemente kopiert." + "SINGULAR": "{{ success }} Element kopiert", + "PLURAL": "{{ success }} Elemente kopiert", + "PARTIAL_SINGULAR": "{{ success }} Element kopiert, {{ failed }} konnte(n) nicht kopiert werden.", + "PARTIAL_PLURAL": "{{ success }} Elemente kopiert, {{ failed }} konnte(n) nicht kopiert werden.", + "FAIL_SINGULAR": "{{ failed }} konnte nicht kopiert werden.", + "FAIL_PLURAL": "{{ failed }} Elemente konnten nicht kopiert werden." }, "NODE_MOVE": { "SINGULAR": "{{ success }} Element verschoben.", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 78d406d63..150c942bb 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -59,7 +59,7 @@ "TOOLTIP": "View files you recently edited" }, "EMPTY_STATE": { - "TITLE": "No recent files or folders", + "TITLE": "No recent files", "TEXT": "Items you upload or edit in the last 30 days are shown here." } }, diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 804d7221d..9f6cf62f9 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "Idioma", "SIGN_IN": "Iniciar sesión", "SIGN_OUT": "Cerrar sesión", + "PREVIEW": { + "TITLE": "Vista previa" + }, "NEW_MENU": { "LABEL": "Nuevo", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "Bibliotecas de ficheros", "TOOLTIP": "Acceder a las bibliotecas de ficheros" + }, + "EMPTY_STATE": { + "TITLE": "No es miembro de ninguna biblioteca de ficheros todavía", + "TEXT": "Únase a los sitios para cargar, ver y compartir ficheros." } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "Compartido", "TOOLTIP": "Ver ficheros que se hayan compartido" + }, + "EMPTY_STATE": { + "TITLE": "No hay carpetas ni ficheros compartidos", + "TEXT": "Los elementos que comparta con la opción Compartir se muestran aquí." } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "Ficheros recientes", "TOOLTIP": "Ver ficheros que ha editado recientemente" + }, + "EMPTY_STATE": { + "TITLE": "No hay ficheros recientes", + "TEXT": "Los elementos que cargue o edite en los últimos 30 días se muestran aquí." } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "Favoritos", "TOOLTIP": "Ver sus ficheros y carpetas favoritos" + }, + "EMPTY_STATE": { + "TITLE": "No hay ficheros ni carpetas favoritos", + "TEXT": "Lo elementos favoritos que quiera encontrar fácilmente después." } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "Papelera", "TOOLTIP": "Ver ficheros eliminados en la papelera" + }, + "EMPTY_STATE": { + "TITLE": "La papelera está vacía", + "FIRST_TEXT": "Los elementos que elimine se mueven a la papelera.", + "SECOND_TEXT": "Vacíe la papelera para eliminar los elementos permanentemente." } + }, + "ABOUT": { + "TITLE": "Acerca de" } }, "ACTIONS": { "VIEW": "Ver", - "SHARE": "Compartir", "EDIT": "Editar", "DOWNLOAD": "Descargar", "COPY": "Copiar", "MOVE": "Mover", "DELETE": "Eliminar", + "DELETE_PERMANENT": "Eliminar permanentemente", "MORE": "Más acciones", "UNDO": "Deshacer", "RESTORE": "Restaurar", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} elementos no se han podido eliminar", - "SINGULAR": "El elemento {{ name }} no se ha podido eliminar" + "SINGULAR": "{{ name }} no se ha podido eliminar" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "{{ number }} elementos no se han restaurado debido a problemas con la ubicación de restauración", - "NODE_EXISTS": "Error en la restauración, el elemento {{ name }} ya existe", - "LOCATION_MISSING": "No se ha podido restaurar el elemento {{ name }}, la ubicación original ya no existe", - "GENERIC": "Error al restaurar el elemento {{ name }}" + "NODE_EXISTS": "Error en la restauración, {{ name }} ya existe", + "LOCATION_MISSING": "No se ha podido restaurar {{ name }}, la ubicación original ya no existe", + "GENERIC": "Error al restaurar {{ name }}" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} elementos eliminados", - "SINGULAR": "Elemento {{ name }} eliminado", - "PARTIAL_SINGULAR": "Elemento {{ name }} eliminado, {{ failed }} no se ha podido eliminar", + "SINGULAR": "{{ name }} eliminado", + "PARTIAL_SINGULAR": "{{ name }} eliminado, {{ failed }} no se ha podido eliminar", "PARTIAL_PLURAL": "{{ number }} elementos eliminados, {{ failed }} no se ha podido eliminar" }, "NODES_RESTORE": { "PLURAL": "Restauración satisfactoria", - "SINGULAR": "Elemento {{ name }} restaurado" + "SINGULAR": "{{ name }} restaurado" } }, "NODE_DELETION": { @@ -184,8 +212,12 @@ "PARTIAL_PLURAL": "Se han eliminado {{ success }} elementos, {{ failed }} no se han podido eliminar" }, "NODE_COPY": { - "SINGULAR": "Se ha copiado {{ success }} elemento", - "PLURAL": "Se han copiado {{ success }} elementos" + "SINGULAR": "Se ha copiado el elemento {{ success }}", + "PLURAL": "Se han copiado los elementos {{ success }}", + "PARTIAL_SINGULAR": "Se ha copiado el elemento {{ success }}, {{ failed }} no se ha podido copiar.", + "PARTIAL_PLURAL": "Se han copiado los elementos {{ success }}, {{ failed }} no se han podido copiar.", + "FAIL_SINGULAR": "El elemento {{ failed }} no se ha podido copiar.", + "FAIL_PLURAL": "Los elementos {{ failed }} no se han podido copiar." }, "NODE_MOVE": { "SINGULAR": "Se ha movido {{ success }} elemento.", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index d4bdfb7de..4fafb0de5 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "Langue", "SIGN_IN": "Connexion", "SIGN_OUT": "Déconnexion", + "PREVIEW": { + "TITLE": "Aperçu" + }, "NEW_MENU": { "LABEL": "Nouveau", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "Bibliothèques de fichiers", "TOOLTIP": "Accéder aux bibliothèques de fichiers" + }, + "EMPTY_STATE": { + "TITLE": "Vous n'êtes actuellement membre d'aucune Bibliothèque de fichiers", + "TEXT": "Rejoignez des sites pour importer, consulter et partager des fichiers." } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "Partagé", "TOOLTIP": "Afficher les fichiers qui ont été partagés" + }, + "EMPTY_STATE": { + "TITLE": "Aucun fichier ou dossier partagé", + "TEXT": "Les éléments que vous partagez avec l'option Partager s'affichent ici." } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "Fichiers récents", "TOOLTIP": "Afficher les fichiers modifiés récemment" + }, + "EMPTY_STATE": { + "TITLE": "Aucun fichier récent", + "TEXT": "Les éléments importés ou modifiés au cours des 30 derniers jours s'affichent ici." } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "Favoris", "TOOLTIP": "Afficher vos fichiers et dossiers favoris" + }, + "EMPTY_STATE": { + "TITLE": "Aucun fichier ou dossier favori", + "TEXT": "Eléments favoris que vous souhaitez retrouver facilement par la suite." } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "Corbeille", "TOOLTIP": "Afficher les fichiers placés dans la corbeille" + }, + "EMPTY_STATE": { + "TITLE": "La corbeille est vide", + "FIRST_TEXT": "Les éléments que vous supprimez sont placés dans la corbeille.", + "SECOND_TEXT": "Videz la corbeille pour supprimer définitivement les éléments qu'elle contient." } + }, + "ABOUT": { + "TITLE": "A propos de" } }, "ACTIONS": { "VIEW": "Afficher", - "SHARE": "Partager", "EDIT": "Modifier", "DOWNLOAD": "Télécharger", "COPY": "Copier", "MOVE": "Déplacer", "DELETE": "Supprimer", + "DELETE_PERMANENT": "Supprimer définitivement", "MORE": "Plus d'actions", "UNDO": "Annuler", "RESTORE": "Restaurer", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} éléments n'ont pas pu être supprimés", - "SINGULAR": "L'élément {{ name }} n'a pas pu être supprimé" + "SINGULAR": "{{ name }} n'a pas pu être supprimé" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "{{ number }} éléments n'ont pas été restaurés en raison de problèmes avec l'emplacement de restauration", - "NODE_EXISTS": "Restauration impossible, l'élément {{ name }} existe déjà", - "LOCATION_MISSING": "Impossible de restaurer l'élément {{ name }}, l'emplacement d'origine n'existe plus", - "GENERIC": "Un problème est survenu pendant la restauration de l'élément {{ name }}" + "NODE_EXISTS": "Restauration impossible, {{ name }} existe déjà", + "LOCATION_MISSING": "Impossible de restaurer {{ name }}, l'emplacement d'origine n'existe plus", + "GENERIC": "Un problème est survenu pendant la restauration de {{ name }}" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} éléments supprimés", - "SINGULAR": "Elément {{ name }} supprimé", - "PARTIAL_SINGULAR": "Elément {{ name }} supprimé, {{ failed }} n'a/n'ont pas pu être supprimé(s)", + "SINGULAR": "{{ name }} supprimé", + "PARTIAL_SINGULAR": "{{ name }} supprimé, {{ failed }} n'a/n'ont pas pu être supprimé(s)", "PARTIAL_PLURAL": "{{ number }} éléments supprimés, {{ failed }} n'a/n'ont pas pu être supprimé(s)" }, "NODES_RESTORE": { "PLURAL": "Restauration réussie", - "SINGULAR": "Elément {{ name }} restauré" + "SINGULAR": "{{ name }} restauré" } }, "NODE_DELETION": { @@ -185,7 +213,11 @@ }, "NODE_COPY": { "SINGULAR": "{{ success }} élément copié", - "PLURAL": "{{ success }} éléments copiés" + "PLURAL": "{{ success }} éléments copiés", + "PARTIAL_SINGULAR": "{{ success }} élément copié, {{ failed }} n'a/n'ont pas pu être copié(s).", + "PARTIAL_PLURAL": "{{ success }} éléments copiés, {{ failed }} n'a/n'ont pas pu être copié(s).", + "FAIL_SINGULAR": "{{ failed }} élément n'a pas pu être copié.", + "FAIL_PLURAL": "{{ failed }} éléments n'ont pas pu être copiés." }, "NODE_MOVE": { "SINGULAR": "{{ success }} élément déplacé.", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/it.json b/src/assets/i18n/it.json index a6ba1541e..8d01b77d8 100644 --- a/src/assets/i18n/it.json +++ b/src/assets/i18n/it.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "Lingua", "SIGN_IN": "Accedi", "SIGN_OUT": "Disconnetti", + "PREVIEW": { + "TITLE": "Anteprima" + }, "NEW_MENU": { "LABEL": "Nuovo", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "Raccolte file", "TOOLTIP": "Accedi alle raccolte file" + }, + "EMPTY_STATE": { + "TITLE": "L'utente non è ancora membro di alcuna Raccolta file", + "TEXT": "Iscriversi ai siti per caricare, visualizzare e condividere file." } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "Condiviso", "TOOLTIP": "Visualizza file condivisi" + }, + "EMPTY_STATE": { + "TITLE": "Nessun file o cartella condivisi", + "TEXT": "Gli elementi condivisi con l'opzione Condividi vengono mostrati qui." } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "File recenti", "TOOLTIP": "Visualizza i file modificati di recente" + }, + "EMPTY_STATE": { + "TITLE": "Nessun file recente", + "TEXT": "Gli elementi caricati o modificati negli ultimi 30 giorni vengono mostrati qui." } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "Preferiti", "TOOLTIP": "Visualizza file e cartelle preferite" + }, + "EMPTY_STATE": { + "TITLE": "Nessun file o cartella preferiti", + "TEXT": "Elementi preferiti da recuperare facilmente in un altro momento." } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "Cestino", "TOOLTIP": "Visualizza i file eliminati nel cestino" + }, + "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." } + }, + "ABOUT": { + "TITLE": "Informazioni su" } }, "ACTIONS": { "VIEW": "Visualizza", - "SHARE": "Condividi", "EDIT": "Modifica", "DOWNLOAD": "Scarica", "COPY": "Copia", "MOVE": "Sposta", "DELETE": "Elimina", + "DELETE_PERMANENT": "Elimina definitivamente", "MORE": "Altre azioni", "UNDO": "Annulla", "RESTORE": "Ripristina", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "Impossibile eliminare {{ number }} elementi", - "SINGULAR": "Impossibile eliminare l'elemento {{ name }}" + "SINGULAR": "Impossibile eliminare {{ name }}" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "{{ number }} elementi non ripristinati a causa dei problemi con il percorso di ripristino", - "NODE_EXISTS": "Impossibile ripristinare, elemento {{ name }} già esistente", - "LOCATION_MISSING": "Impossibile ripristinare l'elemento {{ name }}, il percorso originale non esiste più", - "GENERIC": "Si è verificato un problema nel ripristino dell'elemento {{ name }}" + "NODE_EXISTS": "Impossibile eseguire il ripristino. {{ name }} è già esistente.", + "LOCATION_MISSING": "Impossibile ripristinare {{ name }}. Il percorso originale non esiste più.", + "GENERIC": "Si è verificato un problema durante il ripristino di {{ name }}" } } }, @@ -169,7 +197,7 @@ "NODES_PURGE": { "PLURAL": "{{ number }} elementi eliminati", "SINGULAR": "Elemento {{ name }} eliminato", - "PARTIAL_SINGULAR": "Elemento {{ name }} eliminato, impossibile eliminare {{ failed }}", + "PARTIAL_SINGULAR": "Elemento {{ name }} eliminato. Impossibile eliminare l'elemento {{ failed }}.", "PARTIAL_PLURAL": "{{ number }} elementi eliminati, impossibile eliminare {{ failed }}" }, "NODES_RESTORE": { @@ -184,8 +212,12 @@ "PARTIAL_PLURAL": "Elementi {{ success }} eliminati, impossibile eliminare {{ failed }}" }, "NODE_COPY": { - "SINGULAR": "Copiato {{ success }} elemento", - "PLURAL": "Copiati {{ success }} elementi" + "SINGULAR": "Elemento {{ success }} copiato", + "PLURAL": "Elementi {{ success }} copiati", + "PARTIAL_SINGULAR": "Elemento {{ success }} copiato. Impossibile copiare l'elemento {{ failed }}.", + "PARTIAL_PLURAL": "Elementi {{ success }} copiati. Impossibile copiare {{ failed }}.", + "FAIL_SINGULAR": "Impossibile copiare l'elemento {{ failed }}.", + "FAIL_PLURAL": "Impossibile copiare gli elementi {{ failed }}." }, "NODE_MOVE": { "SINGULAR": "Spostato {{ success }} elemento.", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/ja.json b/src/assets/i18n/ja.json index e15849443..54ea2f8c7 100644 --- a/src/assets/i18n/ja.json +++ b/src/assets/i18n/ja.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "言語", "SIGN_IN": "サインイン", "SIGN_OUT": "サインアウト", + "PREVIEW": { + "TITLE": "プレビュー" + }, "NEW_MENU": { "LABEL": "新規", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "ファイルライブラリ", "TOOLTIP": "ファイルライブラリにアクセスします" + }, + "EMPTY_STATE": { + "TITLE": "あなたはまだファイルライブラリのメンバーではありません", + "TEXT": "ファイルをアップロード、表示、共有するサイトに参加してください。" } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "共有", "TOOLTIP": "共有されているファイルを表示します" + }, + "EMPTY_STATE": { + "TITLE": "共有しているファイルまたはフォルダはありません", + "TEXT": "Share オプションを使って共有しているアイテムがここに表示されます。" } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "最近使用したファイル", "TOOLTIP": "最近編集したファイルを表示します" + }, + "EMPTY_STATE": { + "TITLE": "最近使ったファイルはありません", + "TEXT": "過去 30 日間にアップロードまたは編集したアイテムがここに表示されます。" } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "お気に入り", "TOOLTIP": "お気に入りのファイルやフォルダを表示します" + }, + "EMPTY_STATE": { + "TITLE": "お気に入りのファイルまたはフォルダはありません", + "TEXT": "後で簡単に見つけたいお気に入りのアイテム。" } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "ごみ箱", "TOOLTIP": "ごみ箱にある削除済みのファイルを表示します" + }, + "EMPTY_STATE": { + "TITLE": "ごみ箱は空です", + "FIRST_TEXT": "削除したアイテムはごみ箱に移動されます。", + "SECOND_TEXT": "アイテムを完全に削除するには、ごみ箱を空にします。" } + }, + "ABOUT": { + "TITLE": "バージョン情報" } }, "ACTIONS": { "VIEW": "表示", - "SHARE": "共有", "EDIT": "編集", "DOWNLOAD": "ダウンロード", "COPY": "コピー", "MOVE": "移動", "DELETE": "削除", + "DELETE_PERMANENT": "完全に削除する", "MORE": "その他の処理", "UNDO": "元に戻す", "RESTORE": "復元", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} 件のアイテムを削除できませんでした", - "SINGULAR": "''{{ name }}'' アイテムを削除できませんでした" + "SINGULAR": "{{ name }} を削除できませんでした" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "{{ number }} 件のアイテムが復元されませんでした。復元先の場所に問題があります。", - "NODE_EXISTS": "復元できません。''{{ name }}'' アイテムは既に存在します。", - "LOCATION_MISSING": "''{{ name }}'' アイテムを復元できません。アイテムの元の場所が削除されています。", - "GENERIC": "''{{ name }}'' アイテムの復元中に問題が発生しました" + "NODE_EXISTS": "復元できません。{{ name }} は既に存在します。", + "LOCATION_MISSING": "{{ name }} を復元できません。元の場所が削除されています。", + "GENERIC": "{{ name }} の復元中に問題が発生しました" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} 件のアイテムを削除しました", - "SINGULAR": "''{{ name }}'' アイテムを削除しました", - "PARTIAL_SINGULAR": "''{{ name }}'' アイテムを削除しましたが、{{ failed }} 件は削除できませんでした。", + "SINGULAR": "{{ name }} を削除しました", + "PARTIAL_SINGULAR": "{{ name }} を削除しましたが、{{ failed }} 件は削除できませんでした", "PARTIAL_PLURAL": "{{ number }} 件のアイテムを削除しましたが、{{ failed }} 件は削除できませんでした" }, "NODES_RESTORE": { "PLURAL": "正常に復元されました", - "SINGULAR": "''{{ name }}'' アイテムを復元しました" + "SINGULAR": "{{ name }} を復元しました" } }, "NODE_DELETION": { @@ -185,7 +213,11 @@ }, "NODE_COPY": { "SINGULAR": "{{ success }} 件のアイテムをコピーしました", - "PLURAL": "{{ success }} 件のアイテムをコピーしました" + "PLURAL": "{{ success }} 件のアイテムをコピーしました", + "PARTIAL_SINGULAR": "{{ success }} 件のアイテムをコピーしましたが、{{ failed }} 件はコピーできませんでした。", + "PARTIAL_PLURAL": "{{ success }} 件のアイテムをコピーしましたが、{{ failed }} 件はコピーできませんでした。", + "FAIL_SINGULAR": "{{ failed }} 件のアイテムをコピーできませんでした。", + "FAIL_PLURAL": "{{ failed }} 件のアイテムをコピーできませんでした。" }, "NODE_MOVE": { "SINGULAR": "{{ success }} 件のアイテムを移動しました。", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/nb.json b/src/assets/i18n/nb.json index cc43b70ad..c5a141c13 100644 --- a/src/assets/i18n/nb.json +++ b/src/assets/i18n/nb.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "Språk", "SIGN_IN": "Logg på", "SIGN_OUT": "Logg ut", + "PREVIEW": { + "TITLE": "Forhåndsvis" + }, "NEW_MENU": { "LABEL": "Ny", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "Filbiblioteker", "TOOLTIP": "Gå til filbiblioteker" + }, + "EMPTY_STATE": { + "TITLE": "Du er ikke medlem av noen filbiblioteker ennå", + "TEXT": "Bli med i områder for å laste opp, vise og dele filer." } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "Delt", "TOOLTIP": "Vis filer som er blitt delt" + }, + "EMPTY_STATE": { + "TITLE": "Ingen delte filer eller mapper", + "TEXT": "Elementer du deler via Del-alternativet, vises her." } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "Nyere filer", "TOOLTIP": "Vis filer som nylig er redigert" + }, + "EMPTY_STATE": { + "TITLE": "Ingen nylige filer", + "TEXT": "Elementer du har lastet opp eller redigert i løpet av de siste 30 dagene, vises her." } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "Favoritter", "TOOLTIP": "Vis dine favorittfiler og mapper" + }, + "EMPTY_STATE": { + "TITLE": "Ingen favorittfiler eller -mapper", + "TEXT": "Merk elementer som du enkelt ønsker å finne senere, som favorittelementer." } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "Søppel", "TOOLTIP": "Vis slettede filer i søppelen" + }, + "EMPTY_STATE": { + "TITLE": "Søppel er tomt", + "FIRST_TEXT": "Elementer du sletter, flyttes til Søppel.", + "SECOND_TEXT": "Tøm Søppel for å slette elementer permanent." } + }, + "ABOUT": { + "TITLE": "Om" } }, "ACTIONS": { "VIEW": "Vis", - "SHARE": "Del", "EDIT": "Rediger", "DOWNLOAD": "Last ned", "COPY": "Kopier", "MOVE": "Flytt", "DELETE": "Slett", + "DELETE_PERMANENT": "Slett permanent", "MORE": "Flere handlinger", "UNDO": "Angre", "RESTORE": "Gjenopprett", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} elementer kan ikke slettes", - "SINGULAR": "Elementet {{ name }} kan ikke slettes" + "SINGULAR": "{{ name }} kunne ikke slettes" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "{{ number }} elementer kan ikke gjenopprettes fordi det finnes problemer med gjenoppretingsstedet", - "NODE_EXISTS": "Kan ikke gjenopprette, {{ name }} item already exists", - "LOCATION_MISSING": "Kan ikke gjenopprette elementet {{ name }}, det opprinnelige stedet finnes ikke lenger", - "GENERIC": "Problem med å gjenopprette elementet {{ name }}" + "NODE_EXISTS": "Kan ikke gjenopprette, {{ name }} finnes allerede", + "LOCATION_MISSING": "Kan ikke gjenopprette {{ name }}, det opprinnelige stedet finnes ikke lenger", + "GENERIC": "Problem med å gjenopprette {{ name }}" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} elementer slettet", - "SINGULAR": "Elementet {{ name }} slettet", - "PARTIAL_SINGULAR": "Elementet {{ name }} slettet, {{ failed }} kan ikke slettes", + "SINGULAR": "{{ name }} slettet", + "PARTIAL_SINGULAR": "{{ name }} slettet, {{ failed }} kunne ikke slettes", "PARTIAL_PLURAL": "{{ number }} elementer slettet, {{ failed }} kan ikke slettes" }, "NODES_RESTORE": { "PLURAL": "Er nå gjenopprettet", - "SINGULAR": "Elementet {{ name }} gjenopprettet" + "SINGULAR": "{{ name }} gjenopprettet" } }, "NODE_DELETION": { @@ -185,7 +213,11 @@ }, "NODE_COPY": { "SINGULAR": "Kopierte {{ success }} element", - "PLURAL": "Kopierte {{ success }} elementer" + "PLURAL": "Kopierte {{ success }} elementer", + "PARTIAL_SINGULAR": "Kopierte {{ success }} element, {{ failed }} kunne ikke kopieres.", + "PARTIAL_PLURAL": "Kopierte {{ success }} elementer, {{ failed }} kunne ikke kopieres.", + "FAIL_SINGULAR": "{{ failed }} element kunne ikke kopieres.", + "FAIL_PLURAL": "{{ failed }} elementer kunne ikke kopieres." }, "NODE_MOVE": { "SINGULAR": "Flyttet {{ success }} element.", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index 95fab1cd9..0e94a53e3 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "Taal", "SIGN_IN": "Aanmelden", "SIGN_OUT": "Afmelden", + "PREVIEW": { + "TITLE": "Preview" + }, "NEW_MENU": { "LABEL": "Nieuw", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "Bestandsbibliotheken", "TOOLTIP": "Toegang krijgen tot bestandsbibliotheken" + }, + "EMPTY_STATE": { + "TITLE": "U bent nog geen lid van een bestandsbibliotheek", + "TEXT": "Word lid van sites om bestanden te kunnen uploaden, weergeven en delen." } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "Gedeeld", "TOOLTIP": "Bestanden weergeven die zijn gedeeld" + }, + "EMPTY_STATE": { + "TITLE": "Geen gedeelde bestanden of mappen", + "TEXT": "Items die u deelt met de optie Delen worden hier weergegeven." } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "Recente bestanden", "TOOLTIP": "Bestand weergeven die u onlangs hebt bewerkt" + }, + "EMPTY_STATE": { + "TITLE": "Geen recente bestanden", + "TEXT": "Items die u de afgelopen 30 dagen hebt geüpload of bewerkt worden hier weergegeven." } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "Favorieten", "TOOLTIP": "Uw favoriete bestanden en mappen weergeven" + }, + "EMPTY_STATE": { + "TITLE": "Geen favoriete bestanden of mappen", + "TEXT": "Favoriete items die u later gemakkelijk wilt kunnen vinden." } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "Prullenbak", "TOOLTIP": "Verwijderde bestanden in de prullenbak weergeven" + }, + "EMPTY_STATE": { + "TITLE": "Prullenbak is leeg", + "FIRST_TEXT": "Items die u verwijdert worden verplaatst naar de prullenbak.", + "SECOND_TEXT": "Maak de prullenmand leeg om items definitief te verwijderen." } + }, + "ABOUT": { + "TITLE": "Info" } }, "ACTIONS": { "VIEW": "Weergeven", - "SHARE": "Delen", "EDIT": "Bewerken", "DOWNLOAD": "Downloaden", "COPY": "Kopiëren", "MOVE": "Verplaatsen", "DELETE": "Verwijderen", + "DELETE_PERMANENT": "Definitief verwijderen", "MORE": "Meer acties", "UNDO": "Ongedaan maken", "RESTORE": "Herstellen", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "Kan {{ number }} items niet verwijderen", - "SINGULAR": "Kan item {{ name }} niet verwijderen" + "SINGULAR": "Kan {{ name }} niet verwijderen" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "Kan {{ number }} items niet herstellen vanwege problemen met de herstellocatie", - "NODE_EXISTS": "Herstellen niet mogelijk, het item {{ name }} bestaat al", - "LOCATION_MISSING": "Kan het item {{ name }} niet herstellen, de oorspronkelijke locatie bestaat niet meer", - "GENERIC": "Er is een probleem opgetreden bij het herstellen van het item {{ name }}" + "NODE_EXISTS": "Herstellen niet mogelijk, {{ name }} bestaat al", + "LOCATION_MISSING": "Kan {{ name }} niet herstellen, de oorspronkelijke locatie bestaat niet meer", + "GENERIC": "Er is een probleem opgetreden bij het herstellen van {{ name }}" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} items verwijderd", - "SINGULAR": "Item {{ name }} verwijderd", - "PARTIAL_SINGULAR": "Item {{ name }} verwijderd, kan {{ failed }} niet verwijderen", + "SINGULAR": "{{ name }} verwijderd", + "PARTIAL_SINGULAR": "{{ name }} verwijderd, kan {{ failed }} niet verwijderen", "PARTIAL_PLURAL": "{{ number }} items verwijderd, kan {{ failed }} niet verwijderen" }, "NODES_RESTORE": { "PLURAL": "Herstellen geslaagd", - "SINGULAR": "Item {{ name }} hersteld" + "SINGULAR": "{{ name }} hersteld" } }, "NODE_DELETION": { @@ -185,7 +213,11 @@ }, "NODE_COPY": { "SINGULAR": "{{ success }} item gekopieerd", - "PLURAL": "{{ success }} items gekopieerd" + "PLURAL": "{{ success }} items gekopieerd", + "PARTIAL_SINGULAR": "{{ success }} item gekopieerd, kan {{ failed }} niet kopiëren.", + "PARTIAL_PLURAL": "{{ success }} items gekopieerd, kan {{ failed }} niet kopiëren.", + "FAIL_SINGULAR": "Kan {{ failed }} item niet kopiëren.", + "FAIL_PLURAL": "Kan {{ failed }} items niet kopiëren." }, "NODE_MOVE": { "SINGULAR": "{{ success }} item verplaatst.", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/pt-BR.json b/src/assets/i18n/pt-BR.json index 351eedb79..4b2d280d8 100644 --- a/src/assets/i18n/pt-BR.json +++ b/src/assets/i18n/pt-BR.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "Idioma", "SIGN_IN": "Entrar", "SIGN_OUT": "Sair", + "PREVIEW": { + "TITLE": "Visualizar" + }, "NEW_MENU": { "LABEL": "Novo", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "Bibliotecas de arquivos", "TOOLTIP": "Acessar bibliotecas de arquivos" + }, + "EMPTY_STATE": { + "TITLE": "Você ainda não é membro de nenhuma biblioteca de arquivos", + "TEXT": "Entre em sites para carregar, visualizar e compartilhar arquivos." } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "Compartilhado", "TOOLTIP": "Visualize arquivos que foram compartilhados" + }, + "EMPTY_STATE": { + "TITLE": "Não há nenhum arquivo ou pasta compartilhados", + "TEXT": "Os itens que você compartilhar usando a opção Compartilhar são exibidos aqui." } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "Arquivos recentes", "TOOLTIP": "Visualize arquivos que você editou recentemente" + }, + "EMPTY_STATE": { + "TITLE": "Não há nenhum arquivo recente", + "TEXT": "Os itens que você carregar ou editar nos últimos 30 dias são exibidos aqui." } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "Favoritos", "TOOLTIP": "Visualize seus arquivos e pastas favoritos" + }, + "EMPTY_STATE": { + "TITLE": "Não há nenhum arquivo ou pasta favoritos", + "TEXT": "Itens favoritos que você queira encontrar facilmente depois." } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "Lixeira", "TOOLTIP": "Visualize arquivos excluídos na lixeira" + }, + "EMPTY_STATE": { + "TITLE": "A lixeira está vazia", + "FIRST_TEXT": "Os itens que você excluir são movidos para a lixeira.", + "SECOND_TEXT": "Esvazie a lixeira para excluir itens permanentemente." } + }, + "ABOUT": { + "TITLE": "Sobre" } }, "ACTIONS": { "VIEW": "Visualizar", - "SHARE": "Compartilhar", "EDIT": "Editar", "DOWNLOAD": "Download", "COPY": "Copiar", "MOVE": "Mover", "DELETE": "Excluir", + "DELETE_PERMANENT": "Excluir permanentemente", "MORE": "Mais ações", "UNDO": "Desfazer", "RESTORE": "Restaurar", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "Não foi possível excluir {{ number }} itens", - "SINGULAR": "Não foi possível excluir o item {{ name }}" + "SINGULAR": "Não foi possível excluir {{ name }}" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "{{ number }} itens não restaurados devido a problemas com o local da restauração", - "NODE_EXISTS": "Não foi possível restaurar, o item {{ name }} já existe", - "LOCATION_MISSING": "Não foi possível restaurar o item {{ name }}, o local original não existe mais", - "GENERIC": "Houve um problema ao restaurar o item {{ name }}" + "NODE_EXISTS": "Não foi possível restaurar, {{ name }} já existe", + "LOCATION_MISSING": "Não foi possível restaurar {{ name }}, o local original não existe mais", + "GENERIC": "Houve um problema ao restaurar {{ name }}" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} itens excluídos", - "SINGULAR": "Item {{ name }} excluído", - "PARTIAL_SINGULAR": "Item {{ name }} excluído, não foi possível excluir {{ failed }}", + "SINGULAR": "{{ name }} excluído", + "PARTIAL_SINGULAR": "{{ name }} excluído, não foi possível excluir {{ failed }}", "PARTIAL_PLURAL": "{{ number }} itens excluídos, não foi possível excluir {{ failed }}" }, "NODES_RESTORE": { "PLURAL": "Restauração bem-sucedida", - "SINGULAR": "Item {{ name }} restaurado" + "SINGULAR": "{{ name }} restaurado" } }, "NODE_DELETION": { @@ -185,7 +213,11 @@ }, "NODE_COPY": { "SINGULAR": "Item {{ success }} copiado", - "PLURAL": "Itens {{ success }} copiados" + "PLURAL": "Itens {{ success }} copiados", + "PARTIAL_SINGULAR": "Item {{ success }} copiado, não foi possível copiar {{ failed }}.", + "PARTIAL_PLURAL": "Itens {{ success }} copiados, não foi possível copiar {{ failed }}.", + "FAIL_SINGULAR": "Não foi possível copiar o item {{ failed }}.", + "FAIL_PLURAL": "Não foi possível copiar os itens {{ failed }}." }, "NODE_MOVE": { "SINGULAR": "Item {{ success }} movido.", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/ru.json b/src/assets/i18n/ru.json index ad6f834ca..8eb811cb7 100644 --- a/src/assets/i18n/ru.json +++ b/src/assets/i18n/ru.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "Язык", "SIGN_IN": "Войти", "SIGN_OUT": "Выйти", + "PREVIEW": { + "TITLE": "Предварительный просмотр" + }, "NEW_MENU": { "LABEL": "Создать", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "Библиотеки файлов", "TOOLTIP": "Получить доступ к библиотекам файлов" + }, + "EMPTY_STATE": { + "TITLE": "Вы пока не являетесь участником ни одной файловой библиотеки", + "TEXT": "Используйте сайты для отправки, просмотра файлов и обмена содержимым." } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "Общие", "TOOLTIP": "Посмотреть файлы, к которым предоставлен общий доступ" + }, + "EMPTY_STATE": { + "TITLE": "Нет файлов или папок с открытым доступом", + "TEXT": "Здесь показаны элементы, к которым вы открыли доступ с помощью параметра Открыть доступ." } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "Недавние файлы", "TOOLTIP": "Посмотреть недавно отредактированные вами файлы" + }, + "EMPTY_STATE": { + "TITLE": "Нет недавних файлов", + "TEXT": "Здесь показаны элементы, которые вы отправляли или редактировали за последние 30 дней." } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "Избранное", "TOOLTIP": "Посмотреть ваши избранные файлы и папки" + }, + "EMPTY_STATE": { + "TITLE": "Нет избранных файлов или папок", + "TEXT": "Избранные элементы, которые вам может понадобиться быстро найти в будущем." } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "Корзина", "TOOLTIP": "Посмотреть удаленные файлы в корзине" + }, + "EMPTY_STATE": { + "TITLE": "Корзина пуста", + "FIRST_TEXT": "Элементы, которые вы удаляете, перемещаются в корзину.", + "SECOND_TEXT": "Очистить корзину, чтобы навсегда удалить эти элементы." } + }, + "ABOUT": { + "TITLE": "Информация" } }, "ACTIONS": { "VIEW": "Посмотреть", - "SHARE": "Открыть доступ", "EDIT": "Редактировать", "DOWNLOAD": "Скачать", "COPY": "Копировать", "MOVE": "Переместить", "DELETE": "Удалить", + "DELETE_PERMANENT": "Удалить навсегда", "MORE": "Больше действий", "UNDO": "Отменить", "RESTORE": "Восстановить", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "Не удалось удалить элементов: {{ number }}", - "SINGULAR": "Не удалось удалить элемент {{ name }}" + "SINGULAR": "Не удалось удалить {{ name }}" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "Из-за проблем с местоположением восстановления не восстановлено элементов: {{ number }}", - "NODE_EXISTS": "Невозможно восстановить, элемент {{ name }} уже существует", - "LOCATION_MISSING": "Невозможно восстановить элемент {{ name }}, исходное местоположение больше не существует", - "GENERIC": "Возникла проблема с восстановлением элемента {{ name }}" + "NODE_EXISTS": "Невозможно восстановить, {{ name }} уже существует", + "LOCATION_MISSING": "Невозможно восстановить {{ name }}, исходное местоположение больше не существует", + "GENERIC": "Возникла проблема с восстановлением {{ name }}" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "Удалено элементов: {{ number }}", - "SINGULAR": "Элемент {{ name }} удален", - "PARTIAL_SINGULAR": "Элемент {{ name }} удален, не удалось удалить: {{ failed }}", + "SINGULAR": "{{ name }} удален", + "PARTIAL_SINGULAR": "{{ name }} удален, не удалось удалить {{ failed }}", "PARTIAL_PLURAL": "Элементов удалено: {{ number }}, не удалось удалить: {{ failed }}" }, "NODES_RESTORE": { "PLURAL": "Восстановлено", - "SINGULAR": "Элемент {{ name }} восстановлен" + "SINGULAR": "{{ name }} восстановлен" } }, "NODE_DELETION": { @@ -185,7 +213,11 @@ }, "NODE_COPY": { "SINGULAR": "Скопирован {{ success }} элемент", - "PLURAL": "Скопировано элементов: {{ success }}" + "PLURAL": "Скопировано элементов: {{ success }}", + "PARTIAL_SINGULAR": "Скопирован {{ success }} элемент, не удалось скопировать {{ failed }}.", + "PARTIAL_PLURAL": "Скопировано элементов: {{ success }}, не удалось скопировать {{ failed }}.", + "FAIL_SINGULAR": "Не удалось скопировать {{ failed }} элемент.", + "FAIL_PLURAL": "Не удалось скопировать элементов: {{ failed }}." }, "NODE_MOVE": { "SINGULAR": "Перемещен {{ success }} элемент.", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/i18n/zh-CN.json b/src/assets/i18n/zh-CN.json index 069508a25..a66d4f8db 100644 --- a/src/assets/i18n/zh-CN.json +++ b/src/assets/i18n/zh-CN.json @@ -1,7 +1,11 @@ { "APP": { + "LANGUAGE": "语言", "SIGN_IN": "登录", "SIGN_OUT": "退出", + "PREVIEW": { + "TITLE": "预览" + }, "NEW_MENU": { "LABEL": "新建", "MENU_ITEMS": { @@ -31,6 +35,10 @@ "SIDENAV_LINK": { "LABEL": "文件库", "TOOLTIP": "访问文件库" + }, + "EMPTY_STATE": { + "TITLE": "您还不是任何文件库的成员", + "TEXT": "加入站点以上传、查看和共享文件。" } }, "SHARED": { @@ -38,6 +46,10 @@ "SIDENAV_LINK": { "LABEL": "已共享", "TOOLTIP": "查看已共享的文件" + }, + "EMPTY_STATE": { + "TITLE": "无共享文件或文件夹", + "TEXT": "此处显示了您使用“共享”选项所共享的项目。" } }, "RECENT": { @@ -45,6 +57,10 @@ "SIDENAV_LINK": { "LABEL": "最近的文件", "TOOLTIP": "查看最近编辑的文件" + }, + "EMPTY_STATE": { + "TITLE": "无最近的文件", + "TEXT": "此处显示了您过去 30 天上传或编辑的项目。" } }, "FAVORITES": { @@ -52,6 +68,10 @@ "SIDENAV_LINK": { "LABEL": "收藏夹", "TOOLTIP": "查看您收藏的文件和文件夹" + }, + "EMPTY_STATE": { + "TITLE": "无收藏夹文件或文件夹", + "TEXT": "您想要在以后轻松查找的收藏夹项目。" } }, "TRASHCAN": { @@ -59,17 +79,25 @@ "SIDENAV_LINK": { "LABEL": "回收站", "TOOLTIP": "查看回收站中的已删除文件" + }, + "EMPTY_STATE": { + "TITLE": "回收站为空", + "FIRST_TEXT": "您删除的项目已移至回收站。", + "SECOND_TEXT": "清空回收站以永久删除项目。" } + }, + "ABOUT": { + "TITLE": "关于" } }, "ACTIONS": { "VIEW": "查看", - "SHARE": "共享", "EDIT": "编辑", "DOWNLOAD": "下载", "COPY": "复制", "MOVE": "移动", "DELETE": "删除", + "DELETE_PERMANENT": "永久删除", "MORE": "更多操作", "UNDO": "撤消", "RESTORE": "恢复", @@ -154,13 +182,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} 个项目无法删除", - "SINGULAR": "{{ name }} 项目无法删除" + "SINGULAR": "{{ name }} 无法删除" }, "NODES_RESTORE": { "PARTIAL_PLURAL": "{{ number }} 个项目无法恢复,因为恢复位置存在问题", - "NODE_EXISTS": "无法恢复,{{ name }} 项目已存在", - "LOCATION_MISSING": "无法恢复 {{ name }} 项目,原位置不存在", - "GENERIC": "恢复 {{ name }} 项目时出现问题" + "NODE_EXISTS": "无法恢复,{{ name }} 已存在", + "LOCATION_MISSING": "无法恢复 {{ name }},原位置不复存在", + "GENERIC": "恢复 {{ name }} 时出现问题" } } }, @@ -168,13 +196,13 @@ "TRASH": { "NODES_PURGE": { "PLURAL": "{{ number }} 个项目已删除", - "SINGULAR": "{{ name }} 项目已删除", - "PARTIAL_SINGULAR": "{{ name }} 项目已删除,{{ failed }} 无法删除", + "SINGULAR": "{{ name }} 已删除", + "PARTIAL_SINGULAR": "{{ name }} 已删除,{{ failed }} 无法删除", "PARTIAL_PLURAL": "{{ number }} 个项目已删除,{{ failed }} 无法删除" }, "NODES_RESTORE": { "PLURAL": "成功恢复", - "SINGULAR": "{{ name }} 项目已恢复" + "SINGULAR": "{{ name }} 已恢复" } }, "NODE_DELETION": { @@ -184,8 +212,12 @@ "PARTIAL_PLURAL": "已删除 {{ success }} 项目,{{ failed }} 无法删除" }, "NODE_COPY": { - "SINGULAR": "已复制 {{ success }} 个项目", - "PLURAL": "已复制 {{ success }} 个项目" + "SINGULAR": "已复制 {{ success }} 项目", + "PLURAL": "已复制 {{ success }} 个项目", + "PARTIAL_SINGULAR": "已复制 {{ success }} 项目,{{ failed }} 无法复制。", + "PARTIAL_PLURAL": "已复制 {{ success }} 个项目,{{ failed }} 无法复制。", + "FAIL_SINGULAR": "{{ failed }} 项目无法复制。", + "FAIL_PLURAL": "{{ failed }} 个项目无法复制。" }, "NODE_MOVE": { "SINGULAR": "已移动 {{ success }} 项目。", @@ -199,4 +231,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/assets/images/ic_lock_black_24dp_1x.png b/src/assets/images/ic_lock_black_24dp_1x.png new file mode 100644 index 000000000..3a4a1586e Binary files /dev/null and b/src/assets/images/ic_lock_black_24dp_1x.png differ diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index eaeb69dab..9ada67c8b 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ export const environment = { diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 79529630e..fb927c5a3 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ // The file contents for the current environment will overwrite these during build. diff --git a/src/index.html b/src/index.html index 73d53f5cc..688fda628 100644 --- a/src/index.html +++ b/src/index.html @@ -7,8 +7,6 @@ - - diff --git a/src/main.ts b/src/main.ts index c7340b910..4bbe7b1b2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ import { enableProdMode } from '@angular/core'; diff --git a/src/polyfills.ts b/src/polyfills.ts index 82c008f12..01d4bfcc9 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ /** @@ -63,7 +71,7 @@ import 'core-js/es7/reflect'; * Required to support Web Animations `@angular/platform-browser/animations`. * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. +import 'web-animations-js'; // Run `npm install --save web-animations-js`. diff --git a/src/styles.scss b/src/styles.scss index d71979366..6bbb805c3 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1,6 +1,6 @@ /* You can add global styles to this file, and also import other style files */ @import '~@angular/material/prebuilt-themes/deeppurple-amber.css'; -@import '~ng2-alfresco-core/prebuilt-themes/adf-blue-orange.css'; +@import '~@alfresco/adf-core/prebuilt-themes/adf-blue-orange.css'; @import 'app/ui/application'; body, html { diff --git a/src/test.ts b/src/test.ts index cadfaa6be..8ff73f8c9 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ // This file is required by karma.conf.js and loads recursively all the .spec and framework files diff --git a/src/typings.d.ts b/src/typings.d.ts index 5d0b0835f..47f677ed8 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -1,18 +1,26 @@ /*! * @license - * Copyright 2017 Alfresco Software, Ltd. + * Alfresco Example Content Application * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2005 - 2017 Alfresco Software Limited * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of the Alfresco Example Content Application. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * The Alfresco Example Content Application is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * The Alfresco Example Content Application is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . */ /* SystemJS module definition */ diff --git a/yarn.lock b/yarn.lock index fed4f32ca..58008d198 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,53 +2,118 @@ # yarn lockfile v1 -"@angular-devkit/build-optimizer@~0.0.23": - version "0.0.32" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.0.32.tgz#1bf32332d8a7c84043059e3d265a52f9d11726fd" +"@alfresco/adf-content-services@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@alfresco/adf-content-services/-/adf-content-services-2.0.0.tgz#9e9b14549f1c4b9fda47441442f0f90a5763408c" + dependencies: + "@alfresco/adf-core" "2.0.0" + "@angular/animations" "5.0.0" + "@angular/cdk" "5.0.0-rc0" + "@angular/common" "5.0.0" + "@angular/compiler" "5.0.0" + "@angular/core" "5.0.0" + "@angular/flex-layout" "2.0.0-beta.10" + "@angular/forms" "5.0.0" + "@angular/http" "5.0.0" + "@angular/material" "5.0.0-rc0" + "@angular/material-moment-adapter" "^5.0.0-rc0" + "@angular/platform-browser" "5.0.0" + "@angular/platform-browser-dynamic" "5.0.0" + "@angular/router" "5.0.0" + "@ngx-translate/core" "8.0.0" + alfresco-js-api "2.0.0" + chart.js "2.5.0" + core-js "2.4.1" + hammerjs "2.0.8" + minimatch "3.0.4" + moment "2.15.2" + ng2-charts "1.6.0" + pdfjs-dist "1.5.404" + raphael "2.2.7" + reflect-metadata "0.1.10" + rxjs "5.5.2" + systemjs "0.19.27" + zone.js "0.8.14" + +"@alfresco/adf-core@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@alfresco/adf-core/-/adf-core-2.0.0.tgz#7ad6c756cd5f8f44b0a1f31e6f8114d7c8f67101" + dependencies: + "@angular/animations" "5.0.0" + "@angular/cdk" "5.0.0-rc0" + "@angular/common" "5.0.0" + "@angular/compiler" "5.0.0" + "@angular/core" "5.0.0" + "@angular/flex-layout" "2.0.0-beta.10" + "@angular/forms" "5.0.0" + "@angular/http" "5.0.0" + "@angular/material" "5.0.0-rc0" + "@angular/material-moment-adapter" "^5.0.0-rc0" + "@angular/platform-browser" "5.0.0" + "@angular/platform-browser-dynamic" "5.0.0" + "@angular/router" "5.0.0" + "@ngx-translate/core" "8.0.0" + alfresco-js-api "2.0.0" + chart.js "2.5.0" + core-js "2.4.1" + hammerjs "2.0.8" + minimatch "3.0.4" + moment "2.15.2" + ng2-charts "1.6.0" + pdfjs-dist "1.5.404" + raphael "2.2.7" + reflect-metadata "0.1.10" + rxjs "5.5.2" + systemjs "0.19.27" + zone.js "0.8.14" + +"@angular-devkit/build-optimizer@~0.0.31": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.0.33.tgz#d040f283ed7300b5be8bc970228b835ed02df42f" dependencies: loader-utils "^1.1.0" source-map "^0.5.6" typescript "^2.3.3" webpack-sources "^1.0.1" -"@angular-devkit/core@0.0.20": - version "0.0.20" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-0.0.20.tgz#2ad36dd210fccd0e156d01c6499082ad4cd8c2af" +"@angular-devkit/core@0.0.21": + version "0.0.21" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-0.0.21.tgz#e2ba4ac0a4e1156f884c083b15eb1c26ddfb2ba8" dependencies: source-map "^0.5.6" -"@angular-devkit/schematics@~0.0.25": - version "0.0.35" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-0.0.35.tgz#23dbe2c8dd430114a903a7995d6eefcf1f0f648d" +"@angular-devkit/schematics@~0.0.34": + version "0.0.37" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-0.0.37.tgz#d86ff93b14a44b766e72bcea1569b5d36063210e" dependencies: - "@angular-devkit/core" "0.0.20" + "@angular-devkit/core" "0.0.21" "@ngtools/json-schema" "^1.1.0" minimist "^1.2.0" rxjs "^5.5.2" -"@angular/animations@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-4.4.5.tgz#5a5a551d757e5a5560098f6f8535c102d93954d7" +"@angular/animations@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-5.0.0.tgz#b5ad199c67f93f759544477effe6679e154991fb" dependencies: tslib "^1.7.1" -"@angular/cdk@2.0.0-beta.12": - version "2.0.0-beta.12" - resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-2.0.0-beta.12.tgz#3a243cb62b93f4e039120ba70f900dc9e235622e" +"@angular/cdk@5.0.0-rc0": + version "5.0.0-rc0" + resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-5.0.0-rc0.tgz#b7225af1d8d23c13ac14bbd3fe1c6b427eb71368" dependencies: tslib "^1.7.1" -"@angular/cli@1.4.7": - version "1.4.7" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-1.4.7.tgz#56bc32db264b9e6666d7628c7d4018a02c23e4ff" +"@angular/cli@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-1.5.0.tgz#2abc3ff1648d54ad4a14f82f9d517f371370406c" dependencies: - "@angular-devkit/build-optimizer" "~0.0.23" - "@angular-devkit/schematics" "~0.0.25" + "@angular-devkit/build-optimizer" "~0.0.31" + "@angular-devkit/schematics" "~0.0.34" "@ngtools/json-schema" "1.1.0" - "@ngtools/webpack" "1.7.4" - "@schematics/angular" "~0.0.38" + "@ngtools/webpack" "1.8.0" + "@schematics/angular" "~0.1.0" autoprefixer "^6.5.3" - chalk "^2.0.1" + chalk "~2.2.0" circular-dependency-plugin "^3.0.0" common-tags "^1.3.1" copy-webpack-plugin "^4.1.1" @@ -59,7 +124,7 @@ ember-cli-string-utils "^1.0.0" exports-loader "^0.6.3" extract-text-webpack-plugin "3.0.0" - file-loader "^0.10.0" + file-loader "^1.1.5" fs-extra "^4.0.0" glob "^7.0.3" html-webpack-plugin "^2.29.0" @@ -74,11 +139,12 @@ nopt "^4.0.1" opn "~5.1.0" portfinder "~1.0.12" + postcss-custom-properties "^6.1.0" postcss-loader "^1.3.3" postcss-url "^5.1.2" raw-loader "^0.5.1" resolve "^1.1.7" - rxjs "^5.4.2" + rxjs "^5.5.2" sass-loader "^6.0.3" semver "^5.1.0" silent-error "^1.0.0" @@ -87,58 +153,61 @@ style-loader "^0.13.1" stylus "^0.54.5" stylus-loader "^3.0.1" - typescript ">=2.0.0 <2.6.0" - url-loader "^0.6.0" - webpack "~3.6.0" + uglifyjs-webpack-plugin "1.0.0" + url-loader "^0.6.2" + webpack "~3.8.1" webpack-concat-plugin "1.4.0" webpack-dev-middleware "~1.12.0" - webpack-dev-server "~2.7.1" + webpack-dev-server "~2.9.3" webpack-merge "^4.1.0" + webpack-sources "^1.0.0" + webpack-subresource-integrity "^1.0.1" zone.js "^0.8.14" optionalDependencies: node-sass "^4.3.0" -"@angular/common@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-4.4.5.tgz#bd5179dc922adbf4c3ea6dfb19e73cb849ffdc37" +"@angular/common@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.0.0.tgz#f96d66a517b995d1ba9b28309f15c2e359675825" dependencies: tslib "^1.7.1" -"@angular/compiler-cli@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.4.5.tgz#61fa0336acd1a208c5f1c5c6d4df679e99953248" +"@angular/compiler-cli@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-5.0.0.tgz#0ecbb937d84a4f8dd94f0c2a47b07d2e4694c853" dependencies: - "@angular/tsc-wrapped" "4.4.5" + chokidar "^1.4.2" minimist "^1.2.0" reflect-metadata "^0.1.2" + tsickle "^0.24.0" -"@angular/compiler@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.4.5.tgz#8721a5910f2bb52f09e2d404cad264f35ede5902" +"@angular/compiler@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-5.0.0.tgz#b9ffbf18c8a39d8b7dacec473193a90e24cc2bc9" dependencies: tslib "^1.7.1" -"@angular/core@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.4.5.tgz#54acbcbda11719f883c786a906974abeb132f1a0" +"@angular/core@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.0.0.tgz#4f976a225f7dddf34992f2cad824c9543a46f4c8" dependencies: tslib "^1.7.1" -"@angular/flex-layout@2.0.0-beta.9": - version "2.0.0-beta.9" - resolved "https://registry.yarnpkg.com/@angular/flex-layout/-/flex-layout-2.0.0-beta.9.tgz#3e54f898e805d0b1426d15e6139db415d04ee75f" +"@angular/flex-layout@2.0.0-beta.10": + version "2.0.0-beta.10" + resolved "https://registry.yarnpkg.com/@angular/flex-layout/-/flex-layout-2.0.0-beta.10.tgz#704e0626d6a92defbef2434e138e30f801fb2ad6" dependencies: tslib "^1.7.1" -"@angular/forms@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-4.4.5.tgz#e9552086232aab2ce1d08ef198b62204ea13c43b" +"@angular/forms@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-5.0.0.tgz#c7fddfa35396759ae9852920a30cdda8c41ed1de" dependencies: tslib "^1.7.1" -"@angular/http@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/http/-/http-4.4.5.tgz#2c735ed842401fc2356419268e288dcf2396e84f" +"@angular/http@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/http/-/http-5.0.0.tgz#0728a2be0cfbb078727c5eb87d4c85d53fec9a51" dependencies: tslib "^1.7.1" @@ -146,64 +215,63 @@ version "4.4.5" resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-4.4.5.tgz#ccef139b8d3e1684b01afa35c6fbf2172e2bb676" -"@angular/material@2.0.0-beta.12": - version "2.0.0-beta.12" - resolved "https://registry.yarnpkg.com/@angular/material/-/material-2.0.0-beta.12.tgz#71b6d0b7b021891e5d0e3688c1d4bd78c7457f58" +"@angular/material-moment-adapter@^5.0.0-rc0": + version "5.0.0-rc0" + resolved "https://registry.yarnpkg.com/@angular/material-moment-adapter/-/material-moment-adapter-5.0.0-rc0.tgz#d0357aae1fef9e9181ee80ee444c2dfe9ce1df08" dependencies: tslib "^1.7.1" -"@angular/platform-browser-dynamic@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.4.5.tgz#774dbdc1d90f775dbf1e319f6ed42b260623b61f" +"@angular/material@5.0.0-rc0": + version "5.0.0-rc0" + resolved "https://registry.yarnpkg.com/@angular/material/-/material-5.0.0-rc0.tgz#d37e104a284b41084f91e7613ac119cfb627c56d" dependencies: tslib "^1.7.1" -"@angular/platform-browser@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.4.5.tgz#74eb91c0b758126f26d53ee56c7cf4668bd9cac5" +"@angular/platform-browser-dynamic@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.0.0.tgz#887e106c8b103b0415cf6156a425da6d83f4c89d" dependencies: tslib "^1.7.1" -"@angular/router@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-4.4.5.tgz#f73130cf487d9a32cc1988afda59665f44a28a89" +"@angular/platform-browser@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-5.0.0.tgz#c7038f7cde80705b62014897231e182eec976fed" dependencies: tslib "^1.7.1" -"@angular/tsc-wrapped@4.4.5": - version "4.4.5" - resolved "https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.4.5.tgz#30a0cbb43a663aa75dca984894be4813778ddc9c" +"@angular/router@5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-5.0.0.tgz#fe4b521a6738408bce30f93a53499140c93a4f76" dependencies: - tsickle "^0.21.0" + tslib "^1.7.1" "@ngtools/json-schema@1.1.0", "@ngtools/json-schema@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@ngtools/json-schema/-/json-schema-1.1.0.tgz#c3a0c544d62392acc2813a42c8a0dc6f58f86922" -"@ngtools/webpack@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-1.7.4.tgz#5015c47ebd339045dd89a1bef0497f4524d2c8ed" +"@ngtools/webpack@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-1.8.0.tgz#443204e016aa3a287544eacadb4c95964ae6e2c4" dependencies: + chalk "~2.2.0" enhanced-resolve "^3.1.0" loader-utils "^1.0.2" magic-string "^0.22.3" + semver "^5.3.0" source-map "^0.5.6" + tree-kill "^1.0.0" "@ngx-translate/core@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@ngx-translate/core/-/core-8.0.0.tgz#751fd6b512d80f3a748d2de8dfc96dfefa29afe0" -"@schematics/angular@~0.0.38": - version "0.0.49" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-0.0.49.tgz#c00ca573756d6a79ee518b05eab5fe6e7b73f341" +"@schematics/angular@~0.1.0": + version "0.1.7" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-0.1.7.tgz#2306aeec118ca185e180882eff54f5116de4ef05" dependencies: - "@angular-devkit/core" "0.0.20" + "@angular-devkit/core" "0.0.21" -"@types/jasmine@*": - version "2.6.2" - resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.6.2.tgz#6e6d4cb183cd55c7a1ad6270bced10fdd5367a3c" - -"@types/jasmine@^2.5.53": +"@types/jasmine@*", "@types/jasmine@^2.5.53": version "2.8.2" resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.2.tgz#6ae4d8740c0da5d5a627df725b4eed71b8e36668" @@ -214,16 +282,16 @@ "@types/jasmine" "*" "@types/node@^6.0.46", "@types/node@~6.0.60": - version "6.0.90" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.90.tgz#0ed74833fa1b73dcdb9409dcb1c97ec0a8b13b02" + version "6.0.92" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.92.tgz#e7f721ae282772e12ba2579968c00d9cce422c5d" "@types/q@^0.0.32": version "0.0.32" resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" "@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": - version "2.53.42" - resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.42.tgz#74cb77fb6052edaff2a8984ddafd88d419f25cac" + version "2.53.43" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.43.tgz#2de3d718819bc20165754c4a59afb7e9833f6707" abbrev@1: version "1.1.1" @@ -288,20 +356,20 @@ ajv@^4.9.1: json-stable-stringify "^1.0.1" ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5: - version "5.3.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.3.0.tgz#4414ff74a50879c208ee5fdc826e32c303549eda" + version "5.5.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.0.tgz#eb2840746e9dc48bd5e063a36e3fd400c5eab5a9" dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -alfresco-js-api@1.10.0-beta6: - version "1.10.0-beta6" - resolved "https://registry.yarnpkg.com/alfresco-js-api/-/alfresco-js-api-1.10.0-beta6.tgz#c988a46f81ce17c70edd053d03b95d61ce5447f5" +alfresco-js-api@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/alfresco-js-api/-/alfresco-js-api-2.0.0.tgz#a019b01d48200c36f8a0ea229c416260365eed49" dependencies: event-emitter "0.3.4" - superagent "3.7.0" + superagent "3.4.1" align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" @@ -358,7 +426,7 @@ append-transform@^0.4.0: dependencies: default-require-extensions "^1.0.0" -aproba@^1.0.3: +aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -397,6 +465,13 @@ array-flatten@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296" +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + array-slice@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" @@ -466,8 +541,8 @@ async@^1.4.0, async@^1.5.2: resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" async@^2.1.2, async@^2.1.4, async@^2.1.5, async@^2.4.1, async@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.5.0.tgz#843190fd6b7357a0b9e1c956edddd5ec8462b54d" + version "2.6.0" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" dependencies: lodash "^4.14.0" @@ -529,7 +604,7 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: +babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: @@ -618,8 +693,8 @@ big.js@^3.1.3: resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" binary-extensions@^1.0.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" blob@0.0.4: version "0.0.4" @@ -637,7 +712,7 @@ blocking-proxy@0.0.5: dependencies: minimist "^1.2.0" -bluebird@^3.3.0, bluebird@^3.4.7, bluebird@^3.5.1: +bluebird@^3.3.0, bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" @@ -764,11 +839,11 @@ browserify-sign@^4.0.0: inherits "^2.0.1" parse-asn1 "^5.0.0" -browserify-zlib@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" dependencies: - pako "~0.2.0" + pako "~1.0.5" browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.7" @@ -805,6 +880,24 @@ bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" +cacache@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.1.tgz#3e05f6e616117d9b54665b1b20c8aeb93ea5d36f" + dependencies: + bluebird "^3.5.0" + chownr "^1.0.1" + glob "^7.1.2" + graceful-fs "^4.1.11" + lru-cache "^4.1.1" + mississippi "^1.3.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.1" + ssri "^5.0.0" + unique-filename "^1.1.0" + y18n "^3.2.1" + callsite@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" @@ -849,8 +942,12 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000758" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000758.tgz#a235627b1922e878b63164942c991b84de92c810" + version "1.0.30000775" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000775.tgz#04bccdd0214edf25b97f61a096609f7ad6904333" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" caseless@~0.12.0: version "0.12.0" @@ -873,7 +970,7 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0: +chalk@^2.0.0, chalk@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" dependencies: @@ -881,11 +978,46 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" +chalk@~2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.2.2.tgz#4403f5cf18f35c05f51fbdf152bf588f956cf7cb" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + charenc@~0.0.1: version "0.0.2" resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" -chokidar@^1.4.1, chokidar@^1.6.0, chokidar@^1.7.0: +chart.js@2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.5.0.tgz#fe6e751a893769f56e72bee5ad91207e1c592957" + dependencies: + chartjs-color "^2.0.0" + moment "^2.10.6" + +chart.js@^2.6.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-2.7.1.tgz#ae90b4aa4ff1f02decd6b1a2a8dabfd73c9f9886" + dependencies: + chartjs-color "~2.2.0" + moment "~2.18.0" + +chartjs-color-string@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/chartjs-color-string/-/chartjs-color-string-0.5.0.tgz#8d3752d8581d86687c35bfe2cb80ac5213ceb8c1" + dependencies: + color-name "^1.0.0" + +chartjs-color@^2.0.0, chartjs-color@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/chartjs-color/-/chartjs-color-2.2.0.tgz#84a2fb755787ed85c39dd6dd8c7b1d88429baeae" + dependencies: + chartjs-color-string "^0.5.0" + color-convert "^0.5.3" + +chokidar@^1.4.1, chokidar@^1.4.2, chokidar@^1.6.0, chokidar@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" dependencies: @@ -900,6 +1032,10 @@ chokidar@^1.4.1, chokidar@^1.6.0, chokidar@^1.7.0: optionalDependencies: fsevents "^1.0.0" +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -949,8 +1085,8 @@ clone-deep@^0.3.0: shallow-clone "^0.1.2" clone@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + version "1.0.3" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.3.tgz#298d7e2231660f40c003c2ed3140decf3f53085f" clone@^2.1.1: version "2.1.1" @@ -981,9 +1117,13 @@ codelyzer@~3.2.0: source-map "^0.5.6" sprintf-js "^1.0.3" +color-convert@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd" + color-convert@^1.3.0, color-convert@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: color-name "^1.1.1" @@ -1029,15 +1169,19 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@2.11.x, commander@^2.9.0, commander@~2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" +commander@2.12.x, commander@^2.9.0, commander@~2.12.1: + version "2.12.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" common-tags@^1.3.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.4.0.tgz#1187be4f3d4cf0c0427d43f74eef1f73501614c0" + version "1.5.1" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.5.1.tgz#e2e39931a013cd02253defeed89a1ad615a27f07" dependencies: - babel-runtime "^6.18.0" + babel-runtime "^6.26.0" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" component-bind@1.0.0: version "1.0.0" @@ -1077,9 +1221,17 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" +concat-stream@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + connect-history-api-fallback@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.4.0.tgz#3db24f973f4b923b0e82f619ce0df02411ca623d" + version "1.5.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" connect@^3.6.0: version "3.6.5" @@ -1113,8 +1265,8 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" convert-source-map@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" cookie-signature@1.0.6: version "1.0.6" @@ -1124,28 +1276,37 @@ cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" -cookiejar@^2.1.0: +cookiejar@^2.0.6: version "2.1.1" resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.1.tgz#41ad57b1b555951ec171412a81942b1e8200d34a" +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + copy-webpack-plugin@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.2.0.tgz#252bb94597f96399d23d7fad355f8d3a661ac096" + version "4.2.3" + resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.2.3.tgz#4a3c61089f3b635777f0f0af346c338b39d63755" dependencies: bluebird "^3.5.1" - fs-extra "^4.0.2" glob "^7.1.2" is-glob "^4.0.0" loader-utils "^0.2.15" lodash "^4.3.0" minimatch "^3.0.4" - node-dir "^0.1.10" core-js@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" -core-js@^2.2.0, core-js@^2.4.0, core-js@^2.4.1: +core-js@^2.2.0, core-js@^2.4.0: version "2.5.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" @@ -1361,6 +1522,10 @@ custom-event@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" +cyclist@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + d@1: version "1.0.0" resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" @@ -1389,7 +1554,7 @@ debug@*, debug@^3.1.0: dependencies: ms "2.0.0" -debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: +debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.6.6, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -1425,6 +1590,13 @@ default-require-extensions@^1.0.0: dependencies: strip-bom "^2.0.0" +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + defined@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" @@ -1486,8 +1658,8 @@ detect-indent@^4.0.0: repeating "^2.0.0" detect-libc@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.2.tgz#71ad5d204bf17a6a6ca8f450c61454066ef461e1" + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" detect-node@^2.0.3: version "2.0.3" @@ -1587,6 +1759,15 @@ domutils@1.5.1: dom-serializer "0" domelementtype "1" +duplexify@^3.1.2, duplexify@^3.4.2: + version "3.5.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.1.tgz#4e1516be68838bc90a49994f0b39a6e5960befcd" + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -1629,6 +1810,12 @@ encodeurl@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206" + dependencies: + once "^1.4.0" + engine.io-client@1.8.3: version "1.8.3" resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-1.8.3.tgz#1798ed93451246453d4c6f635d7a201fe940d5ab" @@ -1685,7 +1872,7 @@ entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" -errno@^0.1.1, errno@^0.1.3: +errno@^0.1.1, errno@^0.1.3, errno@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" dependencies: @@ -1697,9 +1884,27 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.7.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.1" + has "^1.0.1" + is-callable "^1.1.3" + is-regex "^1.0.4" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.7: - version "0.10.35" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.35.tgz#18ee858ce6a3c45c7d79e91c15fcca9ec568494f" + version "0.10.37" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.37.tgz#0ee741d148b80069ba27d020393756af257defc3" dependencies: es6-iterator "~2.0.1" es6-symbol "~3.1.1" @@ -1797,6 +2002,10 @@ etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" +eve-raphael@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/eve-raphael/-/eve-raphael-0.5.0.tgz#17c754b792beef3fa6684d79cf5a47c63c4cda30" + event-emitter@0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" @@ -1882,7 +2091,7 @@ exports-loader@^0.6.3: loader-utils "^1.0.2" source-map "0.5.x" -express@^4.13.3: +express@^4.16.2: version "4.16.2" resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c" dependencies: @@ -1964,11 +2173,12 @@ faye-websocket@~0.11.0: dependencies: websocket-driver ">=0.5.1" -file-loader@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-0.10.1.tgz#815034119891fc6441fb5a64c11bc93c22ddd842" +file-loader@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.5.tgz#91c25b6b6fbe56dae99f10a425fd64933b5c9daa" dependencies: loader-utils "^1.0.2" + schema-utils "^0.3.0" filename-regex@^2.0.0: version "2.0.1" @@ -2015,6 +2225,14 @@ finalhandler@1.1.0: statuses "~1.3.1" unpipe "~1.0.0" +find-cache-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + dependencies: + commondir "^1.0.1" + make-dir "^1.0.0" + pkg-dir "^2.0.0" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -2022,7 +2240,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.0.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -2032,11 +2250,18 @@ flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" -follow-redirects@>=1.2.0: - version "1.2.5" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.2.5.tgz#ffd3e14cbdd5eaa72f61b6368c1f68516c2a26cc" +flush-write-stream@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.2.tgz#c81b90d8746766f1a609a46809946c45dd8ae417" dependencies: - debug "^2.6.9" + inherits "^2.0.1" + readable-stream "^2.0.4" + +follow-redirects@>=1.2.0: + version "1.2.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.2.6.tgz#4dcdc7e4ab3dd6765a97ff89c3b4c258117c79bf" + dependencies: + debug "^3.1.0" for-in@^0.1.3: version "0.1.8" @@ -2058,11 +2283,15 @@ for-own@^1.0.0: dependencies: for-in "^1.0.1" +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" -form-data@^2.3.1, form-data@~2.3.1: +form-data@^2.1.1, form-data@~2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.1.tgz#6fb94fbd71885306d73d15cc497fe4cc4ecd44bf" dependencies: @@ -2078,7 +2307,7 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -formidable@^1.1.1: +formidable@^1.0.17: version "1.1.1" resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.1.1.tgz#96b8886f7c3c3508b932d6bd70c4d3a88f35f1a9" @@ -2090,6 +2319,13 @@ fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + fs-access@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/fs-access/-/fs-access-1.0.1.tgz#d6a87f262271cefebec30c553407fb995da8777a" @@ -2115,7 +2351,7 @@ fs-extra@^0.26.5: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^4.0.0, fs-extra@^4.0.2: +fs-extra@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b" dependencies: @@ -2123,16 +2359,25 @@ fs-extra@^4.0.0, fs-extra@^4.0.2: jsonfile "^4.0.0" universalify "^0.1.0" +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" fsevents@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.2.tgz#3282b713fb3ad80ede0e9fcf4611b5aa6fc033f4" + version "1.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" dependencies: nan "^2.3.0" - node-pre-gyp "^0.6.36" + node-pre-gyp "^0.6.39" fstream-ignore@^1.0.5: version "1.0.5" @@ -2151,7 +2396,7 @@ fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.0.2: +function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -2174,6 +2419,16 @@ gaze@^1.0.0: dependencies: globule "^1.0.0" +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" @@ -2216,6 +2471,16 @@ glob@7.0.x: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -2260,7 +2525,7 @@ globule@^1.0.0: lodash "~4.17.4" minimatch "~3.0.2" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -2298,6 +2563,15 @@ har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + har-validator@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" @@ -2432,17 +2706,17 @@ html-entities@^1.2.0: resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" html-minifier@^3.2.3: - version "3.5.6" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.6.tgz#7e4e661a09999599c7d8e8a2b8d7fb7430bb5c3e" + version "3.5.7" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.7.tgz#511e69bb5a8e7677d1012ebe03819aa02ca06208" dependencies: camel-case "3.0.x" clean-css "4.1.x" - commander "2.11.x" + commander "2.12.x" he "1.1.x" ncname "1.0.x" param-case "2.1.x" relateurl "0.2.x" - uglify-js "3.1.x" + uglify-js "3.2.x" html-webpack-plugin@^2.29.0: version "2.30.1" @@ -2513,9 +2787,9 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" https-proxy-agent@^1.0.0: version "1.0.0" @@ -2543,6 +2817,10 @@ ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + image-size@~0.5.0: version "0.5.5" resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" @@ -2557,6 +2835,17 @@ immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" +import-local@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-0.1.1.tgz#b1179572aacdc11c6a91009fb430dbcab5f668a8" + dependencies: + pkg-dir "^2.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + in-publish@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51" @@ -2591,18 +2880,18 @@ inherits@2.0.1: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" ini@^1.3.4, ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" -internal-ip@^1.2.0: +internal-ip@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" dependencies: meow "^3.3.0" interpret@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0" + version "1.1.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" invariant@^2.2.2: version "2.2.2" @@ -2646,6 +2935,14 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" @@ -2706,6 +3003,15 @@ is-glob@^4.0.0: dependencies: is-extglob "^2.1.1" +is-my-json-valid@^2.12.4: + version "2.16.1" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + is-number@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-number/-/is-number-0.1.1.tgz#69a7af116963d47206ec9bd9b48a14216f1e3806" @@ -2756,6 +3062,16 @@ is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-regex@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -2766,6 +3082,10 @@ is-svg@^2.0.0: dependencies: html-comment-regex "^1.1.0" +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -2997,6 +3317,10 @@ jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -3084,6 +3408,10 @@ karma@~1.7.0: tmp "0.0.31" useragent "^2.1.12" +killable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" + kind-of@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-2.0.1.tgz#018ec7a4ce7e3a86cb9141be519d24c8faa981b5" @@ -3246,8 +3574,8 @@ log4js@^0.6.31: semver "~4.3.3" loglevel@^1.4.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.5.1.tgz#189078c94ab9053ee215a0acdbf24244ea0f6502" + version "1.6.0" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.0.tgz#ae0caa561111498c5ba13723d6fb631d24003934" longest@^1.0.1: version "1.0.1" @@ -3274,7 +3602,7 @@ lru-cache@2.2.x: version "2.2.4" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d" -lru-cache@^4.0.1: +lru-cache@^4.0.1, lru-cache@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" dependencies: @@ -3291,6 +3619,12 @@ magic-string@^0.22.3: dependencies: vlq "^0.2.1" +make-dir@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.1.0.tgz#19b4369fe48c116f53c2af95ad102c0e39e85d51" + dependencies: + pify "^3.0.0" + make-error@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.0.tgz#52ad3a339ccf10ce62b4040b708fe707244b8b96" @@ -3397,10 +3731,14 @@ mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.16, dependencies: mime-db "~1.30.0" -mime@1.4.1, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1: +mime@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" +mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + mimic-fn@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" @@ -3413,7 +3751,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -3431,6 +3769,21 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" +mississippi@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-1.3.0.tgz#d201583eb12327e3c5c1642a404a9cacf94e34f5" + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^1.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + mixin-object@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/mixin-object/-/mixin-object-2.0.1.tgz#4fb949441dab182540f1fe035ba60e1947a5e57e" @@ -3444,10 +3797,35 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd dependencies: minimist "0.0.8" +moment-es6@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/moment-es6/-/moment-es6-1.0.0.tgz#552fcf405d62565b0a1fe84e6c1e697ac79332df" + dependencies: + moment "*" + +moment@*, moment@^2.10.6: + version "2.19.3" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.3.tgz#bdb99d270d6d7fda78cc0fbace855e27fe7da69f" + moment@2.15.2: version "2.15.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.15.2.tgz#1bfdedf6a6e345f322fe956d5df5bd08a8ce84dc" +moment@~2.18.0: + version "2.18.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -3465,15 +3843,15 @@ multicast-dns-service-types@^1.1.0: resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" multicast-dns@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.1.1.tgz#6e7de86a570872ab17058adea7160bbeca814dde" + version "6.2.1" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.1.tgz#c5035defa9219d30640558a49298067352098060" dependencies: dns-packet "^1.0.1" thunky "^0.1.0" nan@^2.3.0, nan@^2.3.2: - version "2.7.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" + version "2.8.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" ncname@1.0.x: version "1.0.0" @@ -3485,187 +3863,11 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" -ng2-alfresco-core@1.10.0-beta6: - version "1.10.0-beta6" - resolved "https://registry.yarnpkg.com/ng2-alfresco-core/-/ng2-alfresco-core-1.10.0-beta6.tgz#d1ed5028f3bb4e9c063e338290dfba9a9cb44992" +ng2-charts@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ng2-charts/-/ng2-charts-1.6.0.tgz#108a2133ff62a8623895240fadbddbea2951f29d" dependencies: - "@angular/animations" "4.4.5" - "@angular/cdk" "2.0.0-beta.12" - "@angular/common" "4.4.5" - "@angular/compiler" "4.4.5" - "@angular/compiler-cli" "4.4.5" - "@angular/core" "4.4.5" - "@angular/forms" "4.4.5" - "@angular/http" "4.4.5" - "@angular/material" "2.0.0-beta.12" - "@angular/platform-browser" "4.4.5" - "@angular/platform-browser-dynamic" "4.4.5" - "@angular/router" "4.4.5" - "@ngx-translate/core" "8.0.0" - alfresco-js-api "1.10.0-beta6" - core-js "2.4.1" - hammerjs "2.0.8" - moment "2.15.2" - reflect-metadata "0.1.10" - rxjs "5.1.0" - systemjs "0.19.27" - zone.js "0.8.12" - -ng2-alfresco-datatable@1.10.0-beta6: - version "1.10.0-beta6" - resolved "https://registry.yarnpkg.com/ng2-alfresco-datatable/-/ng2-alfresco-datatable-1.10.0-beta6.tgz#37312c3be022b7eb893e4fa278c0177c77b9130f" - dependencies: - "@angular/animations" "4.4.5" - "@angular/cdk" "2.0.0-beta.12" - "@angular/common" "4.4.5" - "@angular/compiler" "4.4.5" - "@angular/core" "4.4.5" - "@angular/forms" "4.4.5" - "@angular/http" "4.4.5" - "@angular/material" "2.0.0-beta.12" - "@angular/platform-browser" "4.4.5" - "@angular/platform-browser-dynamic" "4.4.5" - "@angular/router" "4.4.5" - "@ngx-translate/core" "8.0.0" - alfresco-js-api "1.10.0-beta6" - core-js "2.4.1" - hammerjs "2.0.8" - ng2-alfresco-core "1.10.0-beta6" - reflect-metadata "0.1.10" - rxjs "5.1.0" - systemjs "0.19.27" - zone.js "0.8.12" - -ng2-alfresco-documentlist@1.10.0-beta6: - version "1.10.0-beta6" - resolved "https://registry.yarnpkg.com/ng2-alfresco-documentlist/-/ng2-alfresco-documentlist-1.10.0-beta6.tgz#512dd75fbef9df43949fa74665ccb831c3346b23" - dependencies: - "@angular/animations" "4.4.5" - "@angular/cdk" "2.0.0-beta.12" - "@angular/common" "4.4.5" - "@angular/compiler" "4.4.5" - "@angular/core" "4.4.5" - "@angular/flex-layout" "2.0.0-beta.9" - "@angular/forms" "4.4.5" - "@angular/http" "4.4.5" - "@angular/material" "2.0.0-beta.12" - "@angular/platform-browser" "4.4.5" - "@angular/platform-browser-dynamic" "4.4.5" - "@angular/router" "4.4.5" - "@ngx-translate/core" "8.0.0" - alfresco-js-api "1.10.0-beta6" - core-js "2.4.1" - hammerjs "2.0.8" - ng2-alfresco-core "1.10.0-beta6" - ng2-alfresco-datatable "1.10.0-beta6" - ng2-alfresco-upload "1.10.0-beta6" - reflect-metadata "0.1.10" - rxjs "5.1.0" - systemjs "0.19.27" - zone.js "0.8.12" - -ng2-alfresco-login@1.10.0-beta6: - version "1.10.0-beta6" - resolved "https://registry.yarnpkg.com/ng2-alfresco-login/-/ng2-alfresco-login-1.10.0-beta6.tgz#db18061d219362cf8533a49099b8aafa17c648d8" - dependencies: - "@angular/animations" "4.4.5" - "@angular/cdk" "2.0.0-beta.12" - "@angular/common" "4.4.5" - "@angular/compiler" "4.4.5" - "@angular/core" "4.4.5" - "@angular/forms" "4.4.5" - "@angular/http" "4.4.5" - "@angular/material" "2.0.0-beta.12" - "@angular/platform-browser" "4.4.5" - "@angular/platform-browser-dynamic" "4.4.5" - "@angular/router" "4.4.5" - "@ngx-translate/core" "8.0.0" - alfresco-js-api "1.10.0-beta6" - hammerjs "2.0.8" - ng2-alfresco-core "1.10.0-beta6" - reflect-metadata "0.1.10" - rxjs "5.1.0" - systemjs "0.19.27" - zone.js "0.8.12" - -ng2-alfresco-search@1.10.0-beta6: - version "1.10.0-beta6" - resolved "https://registry.yarnpkg.com/ng2-alfresco-search/-/ng2-alfresco-search-1.10.0-beta6.tgz#6257100b8f52e5d812d4b8dae065b84124b636bb" - dependencies: - "@angular/animations" "4.4.5" - "@angular/cdk" "2.0.0-beta.12" - "@angular/common" "4.4.5" - "@angular/compiler" "4.4.5" - "@angular/core" "4.4.5" - "@angular/forms" "4.4.5" - "@angular/http" "4.4.5" - "@angular/material" "2.0.0-beta.12" - "@angular/platform-browser" "4.4.5" - "@angular/platform-browser-dynamic" "4.4.5" - "@angular/router" "4.4.5" - "@ngx-translate/core" "8.0.0" - alfresco-js-api "1.10.0-beta6" - core-js "2.4.1" - hammerjs "2.0.8" - ng2-alfresco-core "1.10.0-beta6" - ng2-alfresco-datatable "1.10.0-beta6" - ng2-alfresco-documentlist "1.10.0-beta6" - reflect-metadata "0.1.10" - rxjs "5.1.0" - systemjs "0.19.27" - zone.js "0.8.12" - -ng2-alfresco-upload@1.10.0-beta6: - version "1.10.0-beta6" - resolved "https://registry.yarnpkg.com/ng2-alfresco-upload/-/ng2-alfresco-upload-1.10.0-beta6.tgz#7da94739cee61125dae4a4aa9c23573a414aa23e" - dependencies: - "@angular/animations" "4.4.5" - "@angular/cdk" "2.0.0-beta.12" - "@angular/common" "4.4.5" - "@angular/compiler" "4.4.5" - "@angular/core" "4.4.5" - "@angular/forms" "4.4.5" - "@angular/http" "4.4.5" - "@angular/material" "2.0.0-beta.12" - "@angular/platform-browser" "4.4.5" - "@angular/platform-browser-dynamic" "4.4.5" - "@angular/router" "4.4.5" - "@ngx-translate/core" "8.0.0" - alfresco-js-api "1.10.0-beta6" - core-js "2.4.1" - hammerjs "2.0.8" - minimatch "3.0.4" - ng2-alfresco-core "1.10.0-beta6" - reflect-metadata "0.1.10" - rxjs "5.1.0" - systemjs "0.19.27" - zone.js "0.8.12" - -ng2-alfresco-viewer@1.10.0-beta6: - version "1.10.0-beta6" - resolved "https://registry.yarnpkg.com/ng2-alfresco-viewer/-/ng2-alfresco-viewer-1.10.0-beta6.tgz#04f9c400869e9e603acc47fc88b3ab3f5db2657b" - dependencies: - "@angular/animations" "4.4.5" - "@angular/cdk" "2.0.0-beta.12" - "@angular/common" "4.4.5" - "@angular/compiler" "4.4.5" - "@angular/core" "4.4.5" - "@angular/forms" "4.4.5" - "@angular/http" "4.4.5" - "@angular/material" "2.0.0-beta.12" - "@angular/platform-browser" "4.4.5" - "@angular/platform-browser-dynamic" "4.4.5" - "@angular/router" "4.4.5" - "@ngx-translate/core" "8.0.0" - alfresco-js-api "1.10.0-beta6" - core-js "2.4.1" - hammerjs "2.0.8" - ng2-alfresco-core "1.10.0-beta6" - pdfjs-dist "1.5.404" - reflect-metadata "0.1.10" - rxjs "5.1.0" - systemjs "0.19.27" - zone.js "0.8.12" + chart.js "^2.6.0" no-case@^2.2.0: version "2.3.2" @@ -3673,12 +3875,6 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" -node-dir@^0.1.10: - version "0.1.17" - resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" - dependencies: - minimatch "^3.0.2" - node-ensure@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/node-ensure/-/node-ensure-0.0.0.tgz#ecae764150de99861ec5c810fd5d096b183932a7" @@ -3706,28 +3902,28 @@ node-gyp@^3.3.1: which "1" node-libs-browser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" + version "2.1.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" dependencies: assert "^1.1.1" - browserify-zlib "^0.1.4" + browserify-zlib "^0.2.0" buffer "^4.3.0" console-browserify "^1.1.0" constants-browserify "^1.0.0" crypto-browserify "^3.11.0" domain-browser "^1.1.1" events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" path-browserify "0.0.0" - process "^0.11.0" + process "^0.11.10" punycode "^1.2.4" querystring-es3 "^0.2.0" - readable-stream "^2.0.5" + readable-stream "^2.3.3" stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" tty-browserify "0.0.0" url "^0.11.0" util "^0.10.3" @@ -3737,7 +3933,7 @@ node-modules-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/node-modules-path/-/node-modules-path-1.0.1.tgz#40096b08ce7ad0ea14680863af449c7c75a5d1c8" -node-pre-gyp@^0.6.36: +node-pre-gyp@^0.6.39: version "0.6.39" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" dependencies: @@ -3762,8 +3958,8 @@ node-rest-client@^3.1.0: xml2js ">=0.2.4" node-sass@^4.3.0: - version "4.5.3" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.5.3.tgz#d09c9d1179641239d1b97ffc6231fdcec53e1568" + version "4.7.2" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.7.2.tgz#9366778ba1469eb01438a9e8592f4262bcb6794e" dependencies: async-foreach "^0.1.3" chalk "^1.1.1" @@ -3780,9 +3976,10 @@ node-sass@^4.3.0: nan "^2.3.2" node-gyp "^3.3.1" npmlog "^4.0.0" - request "^2.79.0" - sass-graph "^2.1.1" + request "~2.79.0" + sass-graph "^2.2.4" stdout-stream "^1.4.0" + "true-case-path" "^1.0.2" "nopt@2 || 3": version "3.0.6" @@ -3874,6 +4071,10 @@ object-component@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" +object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -3895,20 +4096,13 @@ on-headers@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" -once@^1.3.0, once@^1.3.3, once@^1.4.0: +once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: wrappy "1" -opn@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" - dependencies: - object-assign "^4.0.1" - pinkie-promise "^2.0.0" - -opn@~5.1.0: +opn@^5.1.0, opn@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.1.0.tgz#72ce2306a17dbea58ff1041853352b4a8fc77519" dependencies: @@ -3937,9 +4131,9 @@ original@>=0.0.5: dependencies: url-parse "1.0.x" -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" @@ -3988,14 +4182,18 @@ p-map@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - -pako@~1.0.2: +pako@~1.0.2, pako@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" +parallel-transform@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + dependencies: + cyclist "~0.2.2" + inherits "^2.0.3" + readable-stream "^2.1.5" + param-case@2.1.x: version "2.1.1" resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" @@ -4117,13 +4315,6 @@ pdfjs-dist@1.5.404: dependencies: node-ensure "^0.0.0" -pdfjs-dist@1.8.557: - version "1.8.557" - resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-1.8.557.tgz#97bb9ba73a29d3939e7aaaa66346df83091a5606" - dependencies: - node-ensure "^0.0.0" - worker-loader "^0.8.0" - performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" @@ -4150,6 +4341,12 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + dependencies: + find-up "^2.1.0" + portfinder@^1.0.9, portfinder@~1.0.12: version "1.0.13" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" @@ -4181,6 +4378,13 @@ postcss-convert-values@^2.3.4: postcss "^5.0.11" postcss-value-parser "^3.1.2" +postcss-custom-properties@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-6.2.0.tgz#5d929a7f06e9b84e0f11334194c0ba9a30acfbe9" + dependencies: + balanced-match "^1.0.0" + postcss "^6.0.13" + postcss-discard-comments@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" @@ -4440,7 +4644,7 @@ postcss@^5.0.0, postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0. source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.1: +postcss@^6.0.1, postcss@^6.0.13: version "6.0.14" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.14.tgz#5534c72114739e75d0afcf017db853099f562885" dependencies: @@ -4467,10 +4671,14 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -process@^0.11.0: +process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + promise@^7.1.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" @@ -4522,6 +4730,21 @@ public-encrypt@^4.0.0: parse-asn1 "^5.0.0" randombytes "^2.0.1" +pump@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.3.5" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.3.5.tgz#1b671c619940abcaeac0ad0e3a3c164be760993b" + dependencies: + duplexify "^3.1.2" + inherits "^2.0.1" + pump "^1.0.0" + punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" @@ -4542,10 +4765,14 @@ qjobs@^1.1.4: version "1.1.5" resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73" -qs@6.5.1, qs@^6.5.1, qs@~6.5.1: +qs@6.5.1, qs@^6.1.0, qs@~6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" @@ -4597,6 +4824,12 @@ range-parser@^1.0.3, range-parser@^1.2.0, range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" +raphael@2.2.7: + version "2.2.7" + resolved "https://registry.yarnpkg.com/raphael/-/raphael-2.2.7.tgz#231b19141f8d086986d8faceb66f8b562ee2c810" + dependencies: + eve-raphael "0.5.0" + raw-body@2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89" @@ -4649,16 +4882,7 @@ read-pkg@^2.0.0: normalize-package-data "^2.3.2" path-type "^2.0.0" -readable-stream@1.0, readable-stream@~1.0.2: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.6, readable-stream@^2.2.9: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9, readable-stream@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: @@ -4670,6 +4894,15 @@ readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable string_decoder "~1.0.3" util-deprecate "~1.0.1" +readable-stream@1.0, readable-stream@~1.0.2: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readable-stream@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" @@ -4783,7 +5016,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@2, request@^2.78.0, request@^2.79.0: +request@2, request@^2.78.0: version "2.83.0" resolved "https://registry.yarnpkg.com/request/-/request-2.83.0.tgz#ca0b65da02ed62935887808e6f510381034e3356" dependencies: @@ -4837,6 +5070,31 @@ request@2.81.0: tunnel-agent "^0.6.0" uuid "^3.0.0" +request@~2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -4853,6 +5111,16 @@ requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + dependencies: + resolve-from "^3.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2: version "1.5.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" @@ -4878,13 +5146,13 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^2.0.0" inherits "^2.0.1" -rxjs@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.1.0.tgz#0aa9018b7f440b505fa42bd742b6738be550e720" +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" dependencies: - symbol-observable "^1.0.1" + aproba "^1.1.1" -rxjs@^5.4.2, rxjs@^5.5.2: +rxjs@5.5.2, rxjs@^5.5.2: version "5.5.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.2.tgz#28d403f0071121967f18ad665563255d54236ac3" dependencies: @@ -4894,7 +5162,7 @@ safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" -sass-graph@^2.1.1: +sass-graph@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49" dependencies: @@ -5174,6 +5442,10 @@ source-list-map@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" +source-list-map@~0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" + source-map-loader@^0.2.0: version "0.2.3" resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.3.tgz#d4b0c8cd47d54edce3e6bfa0f523f452b5b0e521" @@ -5194,11 +5466,11 @@ source-map@0.1.x, source-map@~0.1.7: dependencies: amdefine ">=0.0.4" -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.3: +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" -source-map@^0.4.2, source-map@^0.4.4: +source-map@^0.4.2, source-map@^0.4.4, source-map@~0.4.1: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" dependencies: @@ -5267,6 +5539,12 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +ssri@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.0.0.tgz#13c19390b606c821f2a10d02b351c1729b94d8cf" + dependencies: + safe-buffer "^5.1.0" + "statuses@>= 1.3.1 < 2": version "1.4.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" @@ -5288,7 +5566,14 @@ stream-browserify@^2.0.1: inherits "~2.0.1" readable-stream "^2.0.2" -stream-http@^2.3.1: +stream-each@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd" + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: version "2.7.2" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" dependencies: @@ -5298,6 +5583,10 @@ stream-http@^2.3.1: to-arraybuffer "^1.0.0" xtend "^4.0.0" +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -5317,16 +5606,16 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -string_decoder@~1.0.3: +string_decoder@^1.0.0, string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: safe-buffer "~5.1.0" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringstream@~0.0.4, stringstream@~0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -5392,26 +5681,26 @@ stylus@^0.54.5: sax "0.5.x" source-map "0.1.x" -superagent@3.7.0: - version "3.7.0" - resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.7.0.tgz#bd58bfde2cbc5305adb9ccbb6dacba18408629d6" +superagent@3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/superagent/-/superagent-3.4.1.tgz#4bd12741224d0ece6d9f757f1c3becbe7f24c115" dependencies: component-emitter "^1.2.0" - cookiejar "^2.1.0" - debug "^3.1.0" + cookiejar "^2.0.6" + debug "^2.2.0" extend "^3.0.0" - form-data "^2.3.1" - formidable "^1.1.1" + form-data "^2.1.1" + formidable "^1.0.17" methods "^1.1.1" - mime "^1.4.1" - qs "^6.5.1" + mime "^1.3.4" + qs "^6.1.0" readable-stream "^2.0.5" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.1.1, supports-color@^3.1.2, supports-color@^3.2.3: +supports-color@^3.1.2, supports-color@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" dependencies: @@ -5436,8 +5725,8 @@ svgo@^0.7.0: whet.extend "~0.9.9" symbol-observable@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" + version "1.1.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.1.0.tgz#5c68fd8d54115d9dfb72a84720549222e8db9b32" systemjs@0.19.27: version "0.19.27" @@ -5470,6 +5759,13 @@ tar@^2.0.0, tar@^2.2.1: fstream "^1.0.2" inherits "2" +through2@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + through@X.X.X: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -5482,7 +5778,7 @@ time-stamp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357" -timers-browserify@^2.0.2: +timers-browserify@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" dependencies: @@ -5532,6 +5828,10 @@ tough-cookie@~2.3.0, tough-cookie@~2.3.3: dependencies: punycode "^1.4.1" +tree-kill@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.0.tgz#5846786237b4239014f05db156b643212d4c6f36" + trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" @@ -5540,6 +5840,12 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +"true-case-path@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.2.tgz#7ec91130924766c7f573be3020c34f8fdfd00d62" + dependencies: + glob "^6.0.4" + ts-node@~3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-3.2.2.tgz#bbd28e38af4aaa3e96076c466e1b220197c1a3ce" @@ -5562,9 +5868,9 @@ tsconfig@^6.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" -tsickle@^0.21.0: - version "0.21.6" - resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.21.6.tgz#53b01b979c5c13fdb13afb3fb958177e5991588d" +tsickle@^0.24.0: + version "0.24.1" + resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.24.1.tgz#039343b205bf517a333b0703978892f80a7d848e" dependencies: minimist "^1.2.0" mkdirp "^0.5.1" @@ -5591,8 +5897,8 @@ tslint@~5.7.0: tsutils "^2.8.1" tsutils@^2.8.1: - version "2.12.2" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.12.2.tgz#ad58a4865d17ec3ddb6631b6ca53be14a5656ff3" + version "2.13.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.13.0.tgz#0f52b6aabbc4216e72796b66db028c6cf173e144" dependencies: tslib "^1.7.1" @@ -5606,6 +5912,10 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -5617,23 +5927,30 @@ type-is@~1.6.15: media-typer "0.3.0" mime-types "~2.1.15" -"typescript@>=2.0.0 <2.6.0": - version "2.5.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.3.tgz#df3dcdc38f3beb800d4bc322646b04a3f6ca7f0d" +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" typescript@^2.3.3: - version "2.6.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631" + version "2.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" -typescript@~2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.3.4.tgz#3d38321828231e434f287514959c37a82b629f42" +typescript@~2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" -uglify-js@3.1.x: - version "3.1.6" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.6.tgz#918832602036e95d2318e11f27ee8461a8592c5d" +uglify-es@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.2.0.tgz#fbbfb9dc465ec7e5065701b9720d0de977d0bc24" dependencies: - commander "~2.11.0" + commander "~2.12.1" + source-map "~0.6.1" + +uglify-js@3.2.x: + version "3.2.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.0.tgz#cb411ee4ca0e0cadbfe3a4e1a1da97e6fa0d19c1" + dependencies: + commander "~2.12.1" source-map "~0.6.1" uglify-js@^2.6, uglify-js@^2.8.29: @@ -5657,6 +5974,18 @@ uglify-to-browserify@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" +uglifyjs-webpack-plugin@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.0.0.tgz#1c58b5db1ed043e024aef66f8ade25e148206264" + dependencies: + cacache "^10.0.0" + find-cache-dir "^1.0.0" + schema-utils "^0.3.0" + source-map "^0.5.6" + uglify-es "^3.1.3" + webpack-sources "^1.0.1" + worker-farm "^1.4.1" + uglifyjs-webpack-plugin@^0.4.6: version "0.4.6" resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz#b951f4abb6bd617e66f63eb891498e391763e309" @@ -5687,6 +6016,18 @@ uniqs@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" +unique-filename@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3" + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab" + dependencies: + imurmurhash "^0.1.4" + universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" @@ -5699,7 +6040,7 @@ upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" -url-loader@^0.6.0: +url-loader@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-0.6.2.tgz#a007a7109620e9d988d14bce677a1decb9a993f7" dependencies: @@ -5822,6 +6163,10 @@ wbuf@^1.1.0, wbuf@^1.7.2: dependencies: minimalistic-assert "^1.0.0" +web-animations-js@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/web-animations-js/-/web-animations-js-2.3.1.tgz#3a6d9bc15196377a90f8e2803fa5262165b04510" + webdriver-js-extender@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-1.0.0.tgz#81c533a9e33d5bfb597b4e63e2cdb25b54777515" @@ -5852,43 +6197,54 @@ webpack-concat-plugin@1.4.0: md5 "^2.2.1" uglify-js "^2.8.29" +webpack-core@^0.6.8: + version "0.6.9" + resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" + dependencies: + source-list-map "~0.1.7" + source-map "~0.4.1" + webpack-dev-middleware@^1.11.0, webpack-dev-middleware@~1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.0.tgz#d34efefb2edda7e1d3b5dbe07289513219651709" + version "1.12.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" dependencies: memory-fs "~0.4.1" - mime "^1.3.4" + mime "^1.5.0" path-is-absolute "^1.0.0" range-parser "^1.0.3" time-stamp "^2.0.0" -webpack-dev-server@~2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.7.1.tgz#21580f5a08cd065c71144cf6f61c345bca59a8b8" +webpack-dev-server@~2.9.3: + version "2.9.5" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.5.tgz#79336fba0087a66ae491f4869f6545775b18daa8" dependencies: ansi-html "0.0.7" + array-includes "^3.0.3" bonjour "^3.5.0" chokidar "^1.6.0" compression "^1.5.2" connect-history-api-fallback "^1.3.0" + debug "^3.1.0" del "^3.0.0" - express "^4.13.3" + express "^4.16.2" html-entities "^1.2.0" http-proxy-middleware "~0.17.4" - internal-ip "^1.2.0" + import-local "^0.1.1" + internal-ip "1.2.0" ip "^1.1.5" + killable "^1.0.0" loglevel "^1.4.1" - opn "4.0.2" + opn "^5.1.0" portfinder "^1.0.9" selfsigned "^1.9.1" serve-index "^1.7.2" sockjs "0.3.18" sockjs-client "1.1.4" spdy "^3.4.1" - strip-ansi "^3.0.0" - supports-color "^3.1.1" + strip-ansi "^3.0.1" + supports-color "^4.2.1" webpack-dev-middleware "^1.11.0" - yargs "^6.0.0" + yargs "^6.6.0" webpack-merge@^4.1.0: version "4.1.1" @@ -5896,16 +6252,22 @@ webpack-merge@^4.1.0: dependencies: lodash "^4.17.4" -webpack-sources@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.1.tgz#c7356436a4d13123be2e2426a05d1dad9cbe65cf" +webpack-sources@^1.0.0, webpack-sources@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" dependencies: source-list-map "^2.0.0" - source-map "~0.5.3" + source-map "~0.6.1" -webpack@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.6.0.tgz#a89a929fbee205d35a4fa2cc487be9cbec8898bc" +webpack-subresource-integrity@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.0.1.tgz#1fc09d46497da66e46743a2a51d2cc385b9cb0ed" + dependencies: + webpack-core "^0.6.8" + +webpack@~3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83" dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" @@ -5938,8 +6300,8 @@ websocket-driver@>=0.5.1: websocket-extensions ">=0.1.1" websocket-extensions@>=0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.2.tgz#0e18781de629a18308ce1481650f67ffa2693a5d" + version "0.1.3" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" when@^3.7.5: version "3.7.8" @@ -5985,12 +6347,12 @@ wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" -worker-loader@^0.8.0: - version "0.8.1" - resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-0.8.1.tgz#e8e995331ea34df5bf68296824bfb7f0ad578d43" +worker-farm@^1.4.1: + version "1.5.2" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.2.tgz#32b312e5dc3d5d45d79ef44acc2587491cd729ae" dependencies: - loader-utils "^1.0.2" - schema-utils "^0.3.0" + errno "^0.1.4" + xtend "^4.0.1" wrap-ansi@^2.0.0: version "2.1.0" @@ -6011,8 +6373,8 @@ ws@1.1.2: ultron "1.0.x" ws@^1.0.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.4.tgz#57f40d036832e5f5055662a397c4de76ed66bf61" + version "1.1.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" dependencies: options ">=0.0.5" ultron "1.0.x" @@ -6051,7 +6413,7 @@ xmlhttprequest-ssl@1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d" -xtend@^4.0.0: +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -6081,7 +6443,7 @@ yargs-parser@^7.0.0: dependencies: camelcase "^4.1.0" -yargs@^6.0.0: +yargs@^6.6.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" dependencies: @@ -6152,9 +6514,9 @@ yn@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" -zone.js@0.8.12: - version "0.8.12" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.12.tgz#86ff5053c98aec291a0bf4bbac501d694a05cfbb" +zone.js@0.8.14: + version "0.8.14" + resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.8.14.tgz#0c4db24b178232274ccb43f78c99db7f3642b6cf" zone.js@^0.8.14: version "0.8.18"