Compare commits

...
460 Commits
Author SHA1 Message Date
Eugenio Romano fc044507f8 1.3.0 (#1795) 2017-04-05 11:11:38 +01:00
Eugenio Romano 364e36f857 add test document menu component (#1802) 2017-04-05 11:11:38 +01:00
Eugenio Romano a6c83f9c64 Notification service test (#1801) 2017-04-05 11:11:38 +01:00
Maurizio Vitale e484eef348 Improve activiti content coverage (#1800) 2017-04-05 11:11:38 +01:00
Denys Vuika fb11aae2b6 unit tests (#1798) 2017-04-05 11:11:38 +01:00
Eugenio Romano a0eccd2b6c remove unused phantomjs dep (#1797) 2017-04-05 11:11:38 +01:00
Denys Vuika 8272b08f6a demo app improvements (#1796)
- fix navigation within process details
- fix ‘create task’ button name (was ‘start task’ previously)
- put ‘create task’ and ‘start process’ buttons to proper places in
layout
2017-04-05 11:11:38 +01:00
Denys Vuika d25d070229 use original error message for CORS/offline state in login (#1790)
* use original error message for CORS/offline state in login

* fix tests
2017-04-05 11:11:38 +01:00
Mario Romano 2802765fd6 #1711 fix version package.json 3rd libraries (#1768)
* #1711 fix version package.json 3rd libraries

* fix test
2017-04-05 11:11:38 +01:00
Eugenio Romano 7ac17bcc15 remove unused old travis file (#1793) 2017-04-05 11:11:38 +01:00
Vito f7764a97ee #1657 - Added filter by name when clicking on specific app (#1794) 2017-04-05 11:11:38 +01:00
Maurizio Vitale 2c21eedc69 Activiti form - Dropdown display label in complete form (#1777)
* Dropdown - retrieve the label instead of the id

* Add unit test

* Use find instead of filter
2017-04-05 11:11:38 +01:00
Maurizio Vitale 3c25266bc9 The process filter should not be created twice (#1789) 2017-04-05 11:11:38 +01:00
Maurizio Vitale 548054c05e Close the dialog when the activiti content preview is cliecked (#1792) 2017-04-05 11:11:38 +01:00
Eugenio Romano f75e2b05ea fix dropdown visibility #1593 (#1767)
* fix dropdown visibility #1593

* fix test search workaround material2 issue 1913
2017-04-05 11:11:38 +01:00
Denys Vuika c316fcac18 add custom columns support for process list (#1787) 2017-04-05 11:11:38 +01:00
Denys Vuika c3e38e87ab workaround for tooltips (#1786)
- migrate buttons to angular/material
- move buttons to the left (workaround for tooltips)
2017-04-05 11:11:38 +01:00
Denys Vuika 0a57c640ef fix datatable multi select checkboxes (#1784)
* fix datatable multi select checkboxes

* template cleanup

* fix unit tests
2017-04-05 11:11:38 +01:00
Vito 020952c174 #1517 - ADF-163 - Fixed wrong behaviour when task is created on the s… (#1785)
* #1517 - ADF-163 - Fixed wrong behaviour when task is created on the same selected filter

* 1517 - removed consecutives blank lines
2017-04-05 11:11:38 +01:00
Vito 0b099eff44 #1654 - move download management to content service from core (#1788) 2017-04-05 11:11:38 +01:00
Eugenio Romano ca36f02826 Minification fix #1693 (#1782) 2017-04-05 11:11:38 +01:00
Denys Vuika cedeba9c55 optimise some dependencies (#1781)
- remove “intl” from components (not needed)
- remove “material-design-icons” from core (not needed)
2017-04-05 11:11:38 +01:00
Denys Vuika 49dffb8784 remove hardcoded date format (#1779) 2017-04-05 11:11:38 +01:00
Eugenio Romano b5008fd7b1 add @angular/material dep on demos systemjs conf (#1780) 2017-04-05 11:11:38 +01:00
Eugenio Romano a71dc7e1c8 add hammerjs demo shell (#1778) 2017-04-05 11:11:38 +01:00
Denys Vuika 32603f52e8 bundle improvements (#1774)
- add missing alfresco-js-api to the vendors
- add missing 3D viewer related libs to the vendors (fixes issue with
app bundle having duplicates)
2017-04-05 11:11:38 +01:00
Denys Vuika c9488d32db fix checkboxes (Form) (#1773)
- migrate to angular/material checkboxes
- add required indicator
- various fixes and improvements (caused by migration)
2017-04-05 11:11:38 +01:00
Denys Vuika 99a516249d fix long names in columns (ellipsis-cell class) (#1775) 2017-04-05 11:11:38 +01:00
Maurizio Vitale a1afb728e1 Required filed should have an asterisk inside the label (#1776) 2017-04-05 11:11:38 +01:00
Eugenio Romano 602a46ea66 appveyor fix new build script (#1770) 2017-04-05 11:11:38 +01:00
Maurizio Vitale e9bd279259 Integration beetwen Viewer and Activiti Content (#1765)
* Provide a FormService event when you click on the uploaded content

* Add a formContentClick event to the Form component

* Provide a way to pass Blob to viewer

* Provide a way to use the viewer using a Blob
 - Fix the pdf viewer
 - Fix the image viewer
 - Fix the media viewer

* Update the viewer documentation

* Use the ContentService provided by the core

* Fix and improve unit test

* Add unit test blob viewer
2017-04-05 11:11:38 +01:00
Vito 016f0b3c09 #1517 - Added new behaviour when user create a new task (#1769)
* #1517 - added search task into filters by id feature

* #1517 - added test for tasklist service

* #1517 - Added test for filter component
2017-04-05 11:11:38 +01:00
Maurizio Vitale f323c4be75 Fix dynamic translate parameter (#1772) 2017-04-05 11:11:38 +01:00
Eugenio Romano 41ee867fd7 add timeout increase karma tests (#1771) 2017-04-05 11:11:38 +01:00
Denys Vuika 95b64a0b37 fix build-all script 2017-04-05 11:11:38 +01:00
Eugenio Romano a965a764e0 appveyor fix new build script (#1766) 2017-04-05 11:11:38 +01:00
Eugenio Romano f552720eb6 use mdl input for tag #1506 (#1764) 2017-04-05 11:11:38 +01:00
Denys Vuika 552cbbb273 bug fixes for thumbnails and Safari download (#1763)
- set ‘show thumbnail’ to true by default
- add support for safe downloads in Safari (upcoming 10.1 and TP)
2017-04-05 11:11:38 +01:00
Mario Romano aa87a374dd #1214 use angular 2 mdl input field (#1762) 2017-04-05 11:11:38 +01:00
Eugenio Romano ace279671f increase inactivity timeout test (#1760) 2017-04-05 11:11:38 +01:00
Eugenio Romano 9b36001510 update tag list with refresh event emitter when add or remove a tag #1507 (#1754) 2017-04-05 11:11:38 +01:00
Denys Vuika e2c879409a Form: support for embedded document view (#1748)
* Form: support for embedded document view

* unit tests and improvements

- new ContentService to deal with trusted URL and downloads
- unit tests and improvements for ActivitiContent component
2017-04-05 11:11:38 +01:00
Eugenio Romano 2586fba904 missing event coverage exclude (#1761) 2017-04-05 11:11:38 +01:00
Eugenio Romano 59272e5cfa fix clean script and build all (#1758) 2017-04-05 11:11:38 +01:00
Mario Romano 4916b99744 #1750 add ngOnchange on data input (#1751)
* #1750 add ngOnchange on data input

* Update datatable.component.ts
2017-04-05 11:11:38 +01:00
Eugenio Romano 785db5ca00 fix HammerJS warning #1617 (#1755) 2017-04-05 11:11:38 +01:00
Eugenio Romano 583e152bca remove event model from coverage (#1753) 2017-04-05 11:11:38 +01:00
Eugenio Romano 1661d58765 make the local link build fast and run the test only if asked #1588 (#1671)
* make the local link build fast and run the test only if asked #1588

* demo core doesn't exist

* link after install

* move in after success matrix build and install scripts
2017-04-05 11:11:38 +01:00
Eugenio Romano 2bedae8db5 disable add button when no valid ID is provided #1591 (#1747)
* disable add button when no valid ID is provided #1591

* fix test
2017-04-05 11:11:38 +01:00
Eugenio Romano 05635db985 remove style in html #1678 (#1743) 2017-04-05 11:11:38 +01:00
Denys Vuika 76009fcd46 fix dynamic table validation (#1741)
- dynamic table widget no longer creates a copy of field model, but
uses original one, fixes the problem with validation and state
management
- update unit tests
2017-04-05 11:11:38 +01:00
Eugenio Romano 88da9a181b add test and documentation staticTitle option #1570 (#1744) 2017-04-05 11:11:38 +01:00
Denys Vuika 4ebe1e77b9 upload dialog improvements (#1740)
Various upload dialog improvements

- fix: headers alignment
- fix: Name column alignment
- fix: rename ‘CANCEL’ button to ‘Cancel all’ (as it’s what it does)
- fix: ‘Cancel all’ button still visible after all upload complete
- new: improved layout and api for file upload components
- new: strongly typed methods for UploadService
2017-04-05 11:11:38 +01:00
Denys Vuika 4df72af86d upload: new 'click' mode with file/folder dialog support (#1738)
* new 'click' mode with file/folder dialog support

* fix uploading files to folders via drop on Safari
2017-04-05 11:11:38 +01:00
Denys Vuika 88abad743f support for setting CSS classes in the designer (#1737)
- provides support for `className` field that Angular 1 designer allows
to define for Forms and Form Fields
2017-04-05 11:11:38 +01:00
Denys Vuika 21bfd5eef9 improved uploading of files (#1730)
* improved uploading of files

- new core/UploadDirective to allow dropping files to any html element
- enhanced file dropping for DataTable rows (disabled by default)
- enhanced file dropping for DocumentList rows (disabled by default)
- upload drop area now handles file uploads for child elements (i.e.
rows in the document list)

* fix unit tests

* unit tests and code cleanup

* #1732, fix upload of folders
2017-04-05 11:11:38 +01:00
Denys Vuika f8427e61e1 extra DOM events for DataTable (#1723)
* extra DOM events for DataTable

- support for ‘row-click’ DOM event (bubbling)
- support for ‘row-dblclick’ DOM event (bubbling)
- DataRowEvent exposes ‘sender’ property to simplify access to
component from within handlers
- readme and test updates

* fix unit tests
2017-04-05 11:11:38 +01:00
Denys Vuika 4dc99ae66a form component fixes (#1726)
- fix ‘readonly highlighting when input fields loaded with values
- Start Form raises base ‘FormLoaded’ event (including FormService
emits)
2017-04-05 11:11:38 +01:00
Denys Vuika 2a14679603 migrate from PhantomJS to Chrome (#1716) 2017-04-05 11:11:38 +01:00
Denys Vuika 2fb8ae1b5d support for column definitions in html (#1705)
* support for column definitions in html

- provides generic support for html-based column definitions for
datatable-like controls

* html column definitions for Task List component

* html column definitions for Document List component

* update code and documentation
2017-04-05 11:11:38 +01:00
Denys Vuika e2ced9ff9a fix image paths for components (#1696)
* fix Login image paths

* fix TaskList image paths

* fix DocumentList image paths

* fix Search image paths
2017-04-05 11:11:38 +01:00
Denys Vuika f85d9a5934 DataTable docs and backwards compatibility (#1702)
* example: custom datatable row actions

* update docs, provide backwards compatibility
2017-04-05 11:11:38 +01:00
Maurizio Vitale 0028412451 #11625 (#1703)
Fix ObjectDataRow
Tasklist
Processlist
2017-04-05 11:11:38 +01:00
Denys Vuika b2848a5ca8 user-info component fixes (#1694)
* user-info fixes

- fix image paths to be relative rather than rooted (for user info,
refs #1606)
- fix full name rendering
- fix styling for ‘job title’

* fix unit tests
2017-04-05 11:11:38 +01:00
Mario Romano ed4351a805 #1512 fix text demo shell (#1695) 2017-04-05 11:11:38 +01:00
Mario Romano 3aed7cb37e #1638 fix Incorrect Error message 2017-04-05 11:11:38 +01:00
Denys Vuika aab828c8e9 minor Login improvements (#1685)
- replace inline SVG with the md-icon component
- own validation/error style classes for theming purposes
2017-04-05 11:11:38 +01:00
Denys Vuika 7f7cc074d1 upgrade to latest ng2-charts (#1686) 2017-04-05 11:11:38 +01:00
Denys Vuika 10b9cf70d3 more control over task details header (#1688)
- toggle task details header
- toggle visibility of involve/comments/checklist
- readme updates
2017-04-05 11:11:38 +01:00
Vito 72cd6c6ef3 1454 - fixed spacing in forms (#1687) 2017-04-05 11:11:38 +01:00
Denys Vuika a3cda4d958 support for toggling custom context menu (#1683)
* support for toggling custom context menu

* fix unit tests
2017-04-05 11:11:38 +01:00
Denys Vuika 0f718a56d7 cancellable events for DataTable and DocumentList (#1682)
* cancellable events for DataTable and DocumentList

* more typed events and code fixes

* code fixes
2017-04-05 11:11:38 +01:00
Denys Vuika 418ac90ae9 Update tsconfig.json for demo shell (#1684)
fixes issues with building for Windows
2017-04-05 11:11:38 +01:00
Denys Vuika f8022678d1 Update README.md 2017-04-05 11:11:38 +01:00
enzor a533bad6d9 devops-edit --pipeline=node/CanaryReleaseStageAndApprovePromote/Jenkinsfile 2017-03-12 12:45:41 +00:00
Denys Vuika c290c47229 Date widget: support for display date format (#1710)
* Date widget: support for `display date format`

* unit tests update

* pin js-api version

* Fix Thumbnail preview (#1689)

* Fix Thumbnail preview

* Fix thumbnail unit test

* Remove the fix prexif

* Rollback the pin js api version

* Update package.json

* 1.2.1 tasklist,processlist,form
2017-03-10 18:20:55 +00:00
Mario Romano c13c3aaeeb Merge pull request #1672 from Alfresco/development
1.2.0
2017-02-27 15:35:21 +00:00
Mario Romano cb19ff911c 1.2.0 (#1665)
* bump to 1.2.0

* Update package.json

* Update package.json

* update demo 1.2.0
2017-02-27 12:02:01 +00:00
Mario Romano cbc4518e9c fix style rebranding 2017-02-27 10:46:58 +00:00
Eugenio Romano cd17ac1e6f fix clean placeholder tag actions #1506 (#1662) 2017-02-27 09:52:09 +00:00
Denys Vuika 08b024938b fix travis calls 2017-02-27 09:33:40 +00:00
Denys Vuika 036cce5210 make link script executable 2017-02-27 09:20:58 +00:00
Eugenio Romano 571b7f09c3 refactoring build script #1533 (#1664) 2017-02-27 09:15:52 +00:00
Eugenio Romano 45a37d61f5 copy entire public folder (#1663)
* copy entire public folder

* misspelling in readme
2017-02-27 09:08:28 +00:00
Mario Romano 85adf3c2d9 fix webpack translate dev config 2017-02-24 18:26:59 +00:00
Denys Vuika 618d9e6e0e fix display-value rendering for checkboxes (#1661) 2017-02-24 18:04:34 +00:00
Eugenio Romano 619792e004 add public files js css and images copied in the demo shell dist (#1649) 2017-02-24 14:23:29 +00:00
Denys Vuika 14c7f0409b sequential loading order (#1659) 2017-02-24 13:49:16 +00:00
Denys Vuika 3375a63680 fix compilation errors with latest TS/TSLint (#1651)
latest TS/TSLint libs detect couple of problems related to private apis
used earlier; changing to public in order to fix compilation
2017-02-23 15:46:58 +00:00
Maurizio Vitale c35f948546 #1512 Rebranding fixes (#1650) 2017-02-23 15:44:29 +00:00
Denys Vuika 4479c23de0 Update README.md 2017-02-23 11:51:23 +00:00
Eugenio Romano 20b3835f85 tag validation #1592 (#1646)
add translation
fix placeholder #1506
2017-02-22 19:11:22 +00:00
Eugenio Romano 2a257f7b62 trim username onBlur #1575 (#1644) 2017-02-21 18:25:17 +00:00
Eugenio Romano 866c3f91a1 rendering service header (#1640) 2017-02-20 14:23:28 +00:00
Eugenio Romano 12abac0339 add tslint in demo shell #1641 (#1642) 2017-02-20 14:23:01 +00:00
Eugenio Romano 59cbbcbe4d Dev eromano external viewer (#1636)
* add extensibility point to add a custom viewer

* documentation and tests

* add example in document list
2017-02-16 09:50:12 +00:00
Maurizio Vitale e3ce65880f Analytics - Add a property to hide the analytics parameters component (#1635)
* Add a property to hide the analytics parameters component
Improve the save/delete/export icons

* Add documentations
2017-02-15 14:45:05 +00:00
Mario Romano 7ee97efdca #1173 fix doc documentlist 2017-02-15 13:42:11 +00:00
Mario Romano 427dc0b7fd #1173 fix doc documentlist 2017-02-15 13:41:30 +00:00
Mario Romano f9d7889470 #1539 fix doc nodejs 2017-02-15 13:37:39 +00:00
Mario Romano b614d2d5a5 #1540 fix systemjs links 2017-02-15 13:32:41 +00:00
Mario Romano a3d3fdc0b4 Delete WINDOWS.md 2017-02-15 13:27:31 +00:00
Maurizio Vitale c1493315bf #1631 Should create an empty form when the process definitions are empty (#1633) 2017-02-15 03:42:48 -08:00
Maurizio Vitale e3cbff0e35 Viewer - Accessibility alternative text (#1632)
* #1534 No alternative text for close

* #1536 No alternative text for download

* #1537 no alternative text for options
2017-02-14 16:21:08 +00:00
Maurizio Vitale 69699c337b Fix getProcesses service call (#1629)
* Fix getprocesses service call

* Fix unit test wrong url
2017-02-14 16:18:05 +00:00
Maurizio Vitale 9b2740ff64 ADF Rebranding (#1628)
* #1512 Rebranding

* Fix peer review
2017-02-13 17:20:00 +00:00
Denys Vuika 07bad77547 i18n fixes (#1614)
* i18n fixes

- fix issue with default (fallback) language set to browser language
- fix issue with fallback language loading when browser language set to
non-English locale

* code and UI fixes

- move document list i18n strings into own scope
- replace MDL menu with @angular/material menu (fixes issue with menu
items translation, not supported by MDL)
- minor improvements

* fix unit tests

* improve i18n docs and code

- provide basic documentation for Translation service
- remove custom Login component localisation in favour of documentation
sample
- simplified i18n setup for demo shell (single path for dev/prod env)

* remove unnecessary comments
2017-02-10 11:22:25 +00:00
Ole Hejlskov 8edd2a2d23 Fix spelling in ISSUE_TEMPLATE and PULL_REQUEST_TEMPLATE (#1607) 2017-02-08 10:58:12 +00:00
Eugenio Romano b8c500682c Demo shell build problem with Node 5 #1602 (#1603) 2017-02-07 15:34:08 +00:00
Vito 8bb00fdd00 #1184 - Added option to reports : Save, Delete and Export to CSV (#1600)
* #1184 - adding save export and delete to report

* #1184 - added save button for report

* #1184 - improved export file

* 1184 - fix condition for save and export button

* #1184 - added custom validator for dropdown to avoid wrong selection

* #1184 -start fixing form model

* #1184 - added dynamic build for formBuilder

* #1184 - rebased to development

* #1184 - little test refactoring

* #1184 - added test and some fix

* #1184 - added new events

* #1184 - removed old changes to api service
2017-02-07 15:21:03 +00:00
Eugenio Romano 8cd2dfa9c1 remove double build npm-build-bundle-all.sh (#1601) 2017-02-07 11:04:20 +00:00
Maurizio Vitale d3d67c5934 Create a new activiti content component that provide the file preview (#1516)
* #1236 Add activiti content component

* fix wrong name

* Fix unit test import

* Rollback api changes

* #1236 fix preview using blob

* Fix after review
2017-02-06 19:40:49 +00:00
Maksim 112d7a2d0e Dev kodermax translate (#1580)
* add russian translate for alfresco-login
* add russian translate for documentlist
* add russian translate for alfresco-upload
2017-02-06 12:50:58 +00:00
Denys Vuika 7c54090dea ability to change position of the dropdown menu (left|right) (#1590)
* ability to change position of the dropdown menu (left|right)

* unit tests
2017-02-06 09:55:12 +00:00
Eugenio Romano 5c5911beef Dev eromano tag example (#1596)
* Update README.md

* Readme update with tag example integration document list

* add tag component in the document list demo
2017-02-06 09:54:35 +00:00
Maurizio Vitale 30b4db8161 Analytics - Improve look and feel and user experience (#1585)
* #1583 Improve look and feel and user experience

* #1583
Add layoutType property to report list
Improve unit test
Improve docs

* #1583 Review changes
2017-02-03 16:12:17 +00:00
Mario Romano 6431d7c04f Update README.md 2017-02-03 15:55:54 +00:00
John Sotiropoulos aee2d194b3 Update README.md 2017-02-02 23:33:59 +00:00
Mario Romano c18165caf1 #1576 fix npm build 2017-01-30 19:06:00 +00:00
Denys Vuika a743ad95cb Merge pull request #1573 from Alfresco/development
1.1.0
2017-01-30 16:50:08 +00:00
Mario Romano 3a08a217b8 Merge branch 'master' into development 2017-01-30 12:59:51 +00:00
Mario Romano ffb959d331 1.1.0 (#1562) 2017-01-30 12:57:27 +00:00
Will Abson 5519f9fb00 Fix typos in component properties (#1560)
* Fix typo `fallbackThubnail` -> `fallbackThumbnail`

* Fix typo `showUdoNotificationBar` -> `showNotificationBar`

Update upload mis-spelled properties to 'showNotificationBar' since
showUndoNotificationBar is already a method on the drag area component

Refs #1559

* Fix test cases
2017-01-28 14:52:23 +00:00
Will Abson 09b98e7071 Allow button label to be added via staticTitle input (#1566)
* Allow button label to be added via staticTitle input

Refs #1551

* Minor fix to JSDoc
2017-01-28 14:52:12 +00:00
Mario Romano 3fad45394a #1564 remove unused code (#1565) 2017-01-28 14:51:57 +00:00
Mario Romano e38db7a484 Update ISSUE_TEMPLATE.md 2017-01-28 13:59:14 +00:00
Eugenio Romano 662effea6c add test auth-guard (#1561) 2017-01-28 13:17:50 +00:00
Mario Romano 251f05e421 #1212 add cutom header and footer option, plus custom footer links (#1553) 2017-01-27 10:34:47 -08:00
Will Abson 0ddd245f83 Fix build errors when using latest JS-API (#1555)
Refs #1554
2017-01-27 16:20:59 +00:00
Mario Romano 9d77346aab fix type issue 2017-01-27 15:55:55 +00:00
Maurizio Vitale 537be1e058 #1175 Separate analytics generator and hide analytics parameters (#1546)
* #1175 Separate analytics generator and hide analytics parameters

* Remove unused code
fix unit test

* Rollback mandatory field (appId)

* fix the onChanges problem

* #1175 - rebased branch
2017-01-27 14:35:28 +00:00
Mario Romano b05247dade #1014 use document list to display search results (#1548)
* #1014 use document list to diplay search results

* #1014 refactor pagination

* #1014 documentation and scripts update

* fix random erros on tests executrion

* #1014 fix travis scripts and raise timeout jasmine

* #1014 fix appveyor script

* #1014 type nodeId
2017-01-27 12:22:25 +00:00
Denys Vuika 9e00b1d4f1 documentation updates (#1549)
* documentation updates

refs #1357
refs #400

* Update README.md
2017-01-27 09:50:35 +00:00
Denys Vuika 63a7585922 fix 'change detection crash' when using router multiple times (#1550) 2017-01-26 22:04:27 +00:00
Denys Vuika ab73cc66ee fix special chars in readme 2017-01-25 10:59:14 +00:00
Denys Vuika bd485c730f basic form events hooks and readme updates (#1528)
* basic form events hooks

FormService now exposes the following events:

- formLoaded (formRendered alternative)
- formFieldValueChanged
- taskCompleted
- taskCompletedError
- taskSaved
- taskSavedError

* readme updates
2017-01-25 10:44:41 +00:00
Vito dd753ba890 #1495 - Added no process definition message on start process (#1532) 2017-01-24 18:48:47 +00:00
Mario Romano 1c21875607 #537 snackbar notification system (#1527)
* #537 snackbar notification system

* #537 add test dependencies

* #537 add export material module

* #537 fix demo project
2017-01-24 17:09:13 +00:00
Maurizio Vitale d8c433c055 Filter start form outcomes (#1529)
* #1467 customs outcome

* #1467 Filter the start form outcomes
2017-01-24 14:08:52 +00:00
Maurizio Vitale 89bcdbef24 Fix dynamic value inside the min length error message (#1523) 2017-01-24 10:20:20 +00:00
Will Abson e846a15aa8 Display name and date for process instances if no name present (#1515)
* Display name and date for process instances if no name present

Refs #1461

* Re-work tests for processlist and process details to reflect changes

Refs #1461
2017-01-24 00:56:23 +00:00
Will Abson 82603bbfef Display process instance details after Start Process (#1525)
Refs #1332
2017-01-24 00:53:25 +00:00
Vito 32558da0a7 #1454 - Align element in form (#1524) 2017-01-24 00:51:25 +00:00
Denys Vuika eacdfd7f6a Support for column (cell) templates (#1513)
support for column (cell) templates readme updates and test fixes
2017-01-23 10:28:57 +00:00
Denys Vuika bf5482bf7b documentation updates for DocumentList 2017-01-20 14:06:35 +00:00
Denys Vuika be578c607b readme updates 2017-01-20 11:21:28 +00:00
Denys Vuika e3a94fc2d2 improved focus outline for datatable rows (#1503) 2017-01-19 15:29:01 +00:00
Vito dcee6abc35 #1484 - clean search result when nothing is typed in the search input (#1502) 2017-01-19 11:52:06 +00:00
Vito 4653b9ad23 #1485 - add clean input search on close (#1498) 2017-01-18 14:56:11 +00:00
Eugenio Romano a0ccd6c8b3 Update alfresco tag with the material chips #1499 (#1500)
* Update alfresco tag with the material chips #1499

* remove unused css
2017-01-18 14:42:28 +00:00
Maurizio Vitale 9c0604a6c2 #1429 fix unsupported files margin (#1497) 2017-01-18 13:20:34 +00:00
Maurizio Vitale 4b3c77799e Set default select option (#1496)
* #1479 default select option

* #1479 Fix task dropdown default value
2017-01-18 02:43:31 -08:00
Mario Romano 7ef954139c #1443 improve license error - login component (#1494) 2017-01-17 16:19:25 +00:00
Vito 0fd45a2f88 #1431 - fix tasklist on click process task detail (#1492)
* #1431 - fix tasklist on click process task detail

* Update form-viewer.component.html

#1431 - removed wrong change on form-viewer
2017-01-17 15:00:37 +00:00
Mario Romano 14d399968c #1406 improve CSRF and CORS errors reporting (#1488) 2017-01-17 05:44:39 -08:00
Maurizio Vitale 10a76cc0f6 Login - change required username characters (#1487)
* #1480 Change required username characters

* Fix unit test error
2017-01-17 13:38:51 +00:00
Maurizio Vitale 399b716d82 #1467 customs outcome (#1483) 2017-01-17 13:37:30 +00:00
Will Abson c6126b6be1 Hide the process list when starting and after started new process (#1470)
- Ensures that the newly-started process is *always* shown
- No need to reload the list any more as not shown
- Filter component shows no selected filter when starting process
- User can exit Start Process by clicking a filter again

Refs #1332, #1307
2017-01-16 03:53:18 -08:00
Maurizio Vitale 4b017bd062 #1439 Fix version inside demoshell (#1475) 2017-01-16 11:50:38 +00:00
Maurizio Vitale aba4c8ef3e Wrong grammar with single file uploaded (#1468)
#1449 Wrong grammar with single file upload
2017-01-16 11:50:23 +00:00
Maurizio Vitale f5d2269c2e #1112 Use the mdl-chip (#1466)
* #1112 Use the mdl-chip

* fix unit test
2017-01-16 11:50:14 +00:00
Mario Romano 9655e51943 #1471 rollback className change (#1472) 2017-01-16 11:49:43 +00:00
Denys Vuika 473241f792 improved network settings (#1477) 2017-01-16 11:03:59 +00:00
Vito fdb232cb40 #1455 - added new check to show-hide validation icon next form title (#1463) 2017-01-13 17:56:52 +00:00
Will Abson 0afcc29e37 Load process definitions for Tasks app (#1459)
Refs #1416
2017-01-13 16:57:35 +00:00
Will Abson 6658630eea Process filters should use own model class not task filter (#1458)
Refs #1422
2017-01-13 16:56:35 +00:00
Vito 0a725f00e2 #1441 - clean checklist input after submit or cancel action (#1460) 2017-01-13 14:37:48 +00:00
Mario Romano 6ee34a2e49 #1387 fix rename document-list file (#1462) 2017-01-13 12:54:04 +00:00
Vito f3c690e0d7 #1447 - fixed wording for home page (#1457) 2017-01-13 12:48:22 +00:00
Vito 98523a8fc1 #1431 - reload tasklist when user click on task (#1456) 2017-01-13 12:47:54 +00:00
Vito fcdc628d35 #1432 - Added new system outcome : Start Process (#1453)
* #1432 - Added system outcome for start process

* 1432 - improved condition for system outcome check

* #1432 - fix test for start process system outcome
2017-01-13 12:46:40 +00:00
Denys Vuika 0fa87bb17d selected row highlight (#1448)
* showing selected row

Support for showing selected row for the components:

- DataTable
- DocumentList
- Activiti TaskList
- Activiti ProcessList

fixes #170

* unit test fixes
2017-01-13 12:45:37 +00:00
Maurizio Vitale 01ab948666 #1440 fix version library (#1450) 2017-01-13 01:38:42 -08:00
Denys Vuika 5be659779d Update README.md 2017-01-12 14:41:19 +00:00
Denys Vuika 0ee5c9846a fix error handling and "this" context (#1445)
* fix error handling and "this" context

* fix typo
2017-01-12 06:12:52 -08:00
Eugenio Romano dd6baed74b Merge pull request #1444 from Alfresco/dev-denys-1410
hide titles for start forms
2017-01-12 13:48:58 +00:00
Denys Vuika 8ac8a74ea2 hide titles for start forms
fixes #1410
2017-01-12 12:10:59 +00:00
Eugenio Romano 0df246f7ab Wording for unsupported file could be better #1428 (#1430)
* Wording for unsupported file could be better #1428

* change text
2017-01-11 18:10:29 +00:00
Eugenio Romano 6b5a73cd76 #1297 Loading Bar doesn't appear anymore (#1437) 2017-01-11 10:00:04 -08:00
Maurizio Vitale 82615c9110 #1111 Upgrade MDL 1.3 (#1436) 2017-01-11 07:30:36 -08:00
Vito 9e0536bca9 #1259 - checklist task does not appear on tasklist after creation (#1435)
* #1259 - refresh tasklist when checklist is added

* #1259 - updated readme to reflect changes

* #1259 - fixed wrong rebase import
2017-01-11 14:32:17 +00:00
Denys Vuika 6f24ebd6d4 readme updates 2017-01-11 13:15:26 +00:00
Mario Romano 9fb085eb3a #1387 fix img for systemjs and refactoring apiservice (#1421) 2017-01-10 16:59:08 +00:00
Will Abson c5dca890b7 Better support for long file names in viewer (#1424)
- Display ellipsis
- Use full width of the title div

Refs #1325
2017-01-10 07:27:56 -08:00
Denys Vuika a97c2f4336 quick fix for auth error reporting 2017-01-10 15:18:03 +00:00
Denys Vuika dc28d5b679 #1400 component naming convention fixes (#1418) 2017-01-09 18:57:58 +00:00
Denys Vuika 26fb2374d2 #1411 support 'form refresh' for start forms (#1417) 2017-01-09 15:22:52 +00:00
Denys Vuika 885e0e85aa process details improvements (#1408)
* process details improvements

- new: redirect to task instead of opening a dialog (Activiti parity)
- fixed: task headers for nameless tasks
- fixed: cursor style for task list items
- new: stub for ng-1 directive api (Activiti stencils)
- code cleanup

* error handling fixes
2017-01-09 12:57:03 +00:00
Mario Romano 35d2109f17 Merge pull request #1401 from Alfresco/dev-denys-1152
LogService implementation
2017-01-06 14:39:55 +00:00
Mario Romano 3135c7c75c Merge pull request #1404 from Alfresco/dev-denys-1403
Add missing polyfill for Firefox (date picker)
2017-01-06 14:21:51 +00:00
Denys Vuika c2cb780dd4 Update index.html 2017-01-06 11:43:33 +00:00
Will Abson 8c0048ad7f Prevent live search from being run too soon (#1402)
Refs #1356
2017-01-06 11:00:14 +00:00
Denys Vuika d2cdaff26d fix code after merge 2017-01-06 10:10:54 +00:00
Denys Vuika 1c3e7b6843 Merge branch 'development' into dev-denys-1152 2017-01-06 10:03:40 +00:00
Mario Romano 779d456c63 Merge pull request #1396 from Alfresco/dev-wabson-1307
Fix sorting of processlist list items
2017-01-06 09:57:08 +00:00
Denys Vuika df97a2e24c fix unit tests 2017-01-06 09:55:07 +00:00
Denys Vuika e640cac74f fix AlfrescoTranslateService usage 2017-01-05 21:35:15 +00:00
Denys Vuika d42f41ec00 Migrate from window.console to LogService 2017-01-05 21:06:30 +00:00
Denys Vuika 2d98a04f87 LogService implementation 2017-01-05 16:14:33 +00:00
Vito d972393b72 #1259 - fix assignee for checklist task (#1395)
* #1259 - fix assignee for checklist task

* #1259 - added checklist to tasklist readme
2017-01-05 14:53:39 +00:00
Will Abson 086c789d4d Fix sorting of processlist to match that specified by filter
Refs #1307
2017-01-05 12:04:03 +00:00
Will Abson 560d1bcd7f Fix Start Process button for processes without a start form (#1391)
Refs #1390
2017-01-05 09:54:54 +00:00
Will Abson 099c32c667 Use correct process-related typings for processlist filters
Refs #1307
2017-01-05 09:28:11 +00:00
Mario Romano f89fe8e50a #1393 remove old redirect code (#1394) 2017-01-04 22:29:01 +00:00
Will Abson 94f11a1aae Set default sorting of processes based on started date
Refs #1307
2017-01-04 19:49:24 +00:00
Mario Romano a35c2f7c04 #1385 fix build:w task (#1386) 2017-01-04 19:48:53 +00:00
Mario Romano 9ba2033dd0 Merge pull request #1383 from Alfresco/dev-mvitale-1370
Remove use of deprecated Services
2017-01-04 19:42:41 +00:00
Mario Romano 83fa409aeb improve timeout test for travis 2017-01-04 19:41:58 +00:00
mauriziovitale84 896c57fa53 #1370 Removed deprecated AlfrescoAuthenticationService 2017-01-04 17:28:29 +00:00
mauriziovitale84 58af422d62 #1370 Remove use of AlfrescoSettingsService 2017-01-04 17:27:41 +00:00
Mario Romano 61b94488d8 Merge pull request #1376 from Alfresco/dev-denys-1366
Node ID-based navigation for document list
2017-01-04 17:20:42 +00:00
Mario Romano 6e8bb1d25f Merge pull request #1368 from Alfresco/dev-denys-1333
hide save button from start form
2017-01-04 17:20:28 +00:00
Mario Romano 226077af83 Merge pull request #1375 from Alfresco/dev-valbano-1303
#1303 - fix typeahead show for completed tasks
2017-01-04 17:20:19 +00:00
Maurizio Vitale 05ae1185f2 Detailed Task Statistics - Analytics (#1374)
* #1224 Show the details table

* Fix unit test
2017-01-04 08:15:59 -08:00
Denys Vuika f00decabc5 readme updates, fix license checker 2017-01-04 16:02:14 +00:00
Mario Romano 8a1d372318 #1378 fix test config for webpack (#1384) 2017-01-04 14:22:51 +00:00
Denys Vuika fefe4b6963 update code as per code review
- upgrade demo project
- extend readme
- remove commented out unit tests
2017-01-04 14:20:15 +00:00
Mario Romano 84e32423c5 #1372 appveyor build only master,development and a built test branch in case needed (#1381) 2017-01-04 12:38:18 +00:00
Maurizio Vitale 4c522fabb8 Show long comment (#1354)
* #1324 long comment

* #1324 use different css style

* #1324 Fix long words without space
2017-01-04 10:57:39 +00:00
Vito ccd8f64071 fix module creation for login component in forRoot (#1377) 2017-01-04 09:32:11 +00:00
Denys Vuika 7ecf9f2fc3 readme update 2017-01-03 21:20:16 +00:00
Denys Vuika 71877aa8d0 upgrade 'create folder' action 2017-01-03 21:13:17 +00:00
Denys Vuika 44906157a0 update unit tests 2017-01-03 20:35:26 +00:00
Denys Vuika 82e0a2016d cleanup demo page 2017-01-03 19:47:04 +00:00
Vito Albano dc0187aeab #1303 - fix typeahead show for completed tasks 2017-01-03 17:50:56 +00:00
Denys Vuika 512f6504f2 add missing 'forRoot' implementatitions (#1369) 2017-01-03 09:21:23 -08:00
Maurizio Vitale 4ea3187e7a #1346 fix zero values (#1353) 2017-01-03 09:18:48 -08:00
Denys Vuika 40b9baaa64 id-based navigation (initial implementation) 2017-01-03 16:44:13 +00:00
Denys Vuika 082c997c0d hide save button from start form 2017-01-03 10:55:59 +00:00
Denys Vuika facafbd55c Single naming convention for core services (#1363)
* remove temporary file from repo

* fix: alfresco-api.service

* new: auth.service.ts

- new auth.service.ts implementation
- deprecation warning for AlfrescoAuthenticationService
- fix ‘clean-build’ typo
- extra vscode settings for ‘.d.ts’ files

* use AuthService internally

* new: content.service.ts

- deprecation warning for AlfrescoContentService
- use new ContentService internally

* new: settings.service.ts

- new SettingsService
- deprecation warning for AlfrescoSettingsService
- using new SettingsService internally

* new: translate.service and translate-loader.service

- custom TranslateLoader becomes AlfrescoTranslateLoader
- custom TranslateService becomes AlfrescoTranslateService
- deprecation notices for old service and loader implementations

* fix: document list

* fix: search

* fix: tag

also fixes #1364

* fix: activiti form

* fix: activiti tasklist, improve unit tests

* fix: activiti processlist, unit tests improvements

* fix: diagram component

* fix: analytics component

* fix: upload component

- fix numerous issues with unit tests (hidden by ‘any’ type)
- test improvements

* fix: webscript

* fix: userinfo unit tests

* code fixes

* fix 'beforeAll' issue

* tasklist unit testing improvements

* fix: form unit tests

* fix: unit tests
2017-01-03 10:46:27 +00:00
Maurizio Vitale 92fc7d1df3 #1345 fix material design (#1352) 2016-12-22 10:44:41 +00:00
Mario Romano f5824cb0eb improve travis build (#1340)
* short time travis build

* optimize build

* optimize build

* optimize build
2016-12-22 09:55:27 +00:00
Eugenio Romano bd0fb46639 add dependency in package.json in order to build in node 4 (#1347) 2016-12-22 09:54:58 +00:00
Mario Romano 3915e90c36 Update README.md 2016-12-21 13:09:25 +00:00
Mario Romano 001466ffe2 Update README.md 2016-12-21 13:09:08 +00:00
Mario Romano 51eca7d24c Dev mromano appveyor (#1351)
* Update .travis.yml

* Update .travis.yml

* Update appveyor.yml

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows
2016-12-20 21:16:03 +00:00
Mario Romano da7f3ba564 fix window build (#1350)
* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows

* fix windows
2016-12-20 21:14:16 +00:00
Mario Romano f859d611f6 Update appveyor.yml 2016-12-20 18:45:21 +00:00
Mario Romano 16846d507f Update appveyor.yml 2016-12-20 18:44:56 +00:00
Mario Romano e37711a47c Update .travis.yml 2016-12-20 18:33:44 +00:00
Mario Romano 43589f3668 Update .travis.yml 2016-12-20 18:33:23 +00:00
Mario Romano 25c74c283c Update .travis.yml 2016-12-20 18:25:13 +00:00
Eugenio Romano 74142a1ecb Merge pull request #1341 from Alfresco/development
1.0.0
2016-12-20 17:05:27 +00:00
Mario Romano 82fbfd27d7 update dependencies demo shell 2016-12-20 16:14:25 +00:00
Mario Romano de0ac1e805 1.0.0 (#1337) 2016-12-20 14:07:01 +00:00
Eugenio Romano ccc477619c generate JS sourcemap during the UMD build (#1339) 2016-12-20 13:58:49 +00:00
Maurizio Vitale 94781c370f #1331 Add date required validation (#1338) 2016-12-20 11:46:24 +00:00
Eugenio Romano a6e2c1532d fix angular version dependencies 2016-12-20 09:45:30 +00:00
Mario Romano 11894a9769 Dev mromano improveprocess (#1334)
* fix overload activiti

* fix reload tasklist

* fix process variables

* fix default filter

* improve process list

* fix tests process

* fix tests

* Fix test for form

* fix tests

* fix tests

* #fix activiti bug

* #fix activiti bug (reverted from commit c966395ed1087e1dedaf0af0923a89ba99d6ab9f)

* fix tests

* #fix header test bug

* fix tests

* fix process

* fix tests
2016-12-20 09:37:56 +00:00
Mario Romano 636fa770b4 Merge pull request #1330 from Alfresco/dev-mvitale-1308
Start process - custom outcome
2016-12-19 21:16:18 +00:00
Vito Albano 21d716c8a9 #1308 - fix test for PR 2016-12-19 19:16:59 +00:00
Mario Romano 9abd6cf2a0 Merge pull request #1329 from Alfresco/dev-eromano-minorFix
add header missing app.component and minor clean
2016-12-19 18:50:02 +00:00
Eugenio Romano d3b2108ac2 add header missing app.component and minor clean 2016-12-19 17:38:06 +00:00
mauriziovitale84 8e707e7d9b #fix custom outcome 2016-12-19 17:36:30 +00:00
Mario Romano ea7df8ac22 #1327 do not call server when dropdown are not rest (#1328) 2016-12-19 16:39:05 +00:00
Mario Romano 72ae760b85 improve style demo shell (#1326) 2016-12-19 16:13:07 +00:00
Mario Romano b9c7b60fb6 #1301 fix visibility process variables 2016-12-16 19:26:06 +00:00
Mario Romano cd9a333a94 fix tests async 2016-12-16 18:39:50 +00:00
Mario Romano 167e82b846 Merge pull request #1323 from Alfresco/dev-wabson-1248
Fix uploads from folders opened from search results
2016-12-16 18:01:48 +00:00
Mario Romano 5a2dbbcb67 Update ALFRESCOCORS.md 2016-12-16 18:01:30 +00:00
Mario Romano 55c21fef97 Update PREREQUISITES.md 2016-12-16 17:54:03 +00:00
Mario Romano 4aa5bdff9a Update PREREQUISITES.md 2016-12-16 17:53:48 +00:00
Will Abson fb851271e9 Fix uploads from folders opened from search results
Refs #1248
2016-12-16 17:52:57 +00:00
Mario Romano ff48caf745 Create ALFRESCOCORS.md 2016-12-16 17:52:01 +00:00
Mario Romano c712cc2c82 Merge pull request #1322 from Alfresco/dev-valbano-1301
#1301 - Improve the process variables evaluation
2016-12-16 17:42:10 +00:00
Mario Romano 52e5141612 Merge pull request #1321 from Alfresco/dev-mromano-1319
#1319 regressed external content - transclusion
2016-12-16 17:41:59 +00:00
Mario Romano baed571a4c Merge pull request #1316 from Alfresco/dev-wabson-1315
Fix file viewer from search results the second time
2016-12-16 17:41:52 +00:00
Mario Romano dd73c8d40a Merge pull request #1310 from Alfresco/dev-denys-1304
fix dialog polyfill usage
2016-12-16 17:41:46 +00:00
Mario Romano d675de3d95 Merge pull request #1302 from Alfresco/dev-mromano-1255
#1255 remove onInit, we already add comments with onChange
2016-12-16 17:41:40 +00:00
Mario Romano 4384c291dd #1319 regressed external content - transclusion 2016-12-16 17:34:20 +00:00
Vito Albano 82ab3fc7ca #1301 - fix test for visibility service 2016-12-16 17:34:15 +00:00
Mario Romano 1e4ce68963 #1233 attach form to a task (#1313) 2016-12-16 17:19:39 +00:00
Mario Romano 128d3af54a Merge pull request #1312 from Alfresco/dev-mvitale-1305
Claim a task
2016-12-16 16:37:12 +00:00
Denys Vuika 59582755f4 fixes for IE (#1318) 2016-12-16 16:26:42 +00:00
Vito Albano ad1f3e8102 #1301 - fix test for widgetvisibility service 2016-12-16 16:21:08 +00:00
Vito Albano e92abf99d9 #1301 - fixed test on activiti form 2016-12-16 16:21:08 +00:00
Vito Albano 12c4de2c1e #1031 - Check the value of old forms in process variables 2016-12-16 16:21:08 +00:00
Mario Romano c6c5a39a85 Merge pull request #1311 from Alfresco/dev-wabson-1294
Fix search control after logging out and back in
2016-12-16 16:17:14 +00:00
Will Abson af715c3dd1 Fix file viewer from search results the second time
- Currently it is necessary to destroy the viewer between views

Refs #1315
2016-12-16 15:52:44 +00:00
Mario Romano 1579ab0f46 Merge pull request #1314 from Alfresco/dev-eromano-1299
1299 Internet Explorer Header bar wrong menu button positioning
2016-12-16 15:29:14 +00:00
Eugenio Romano 1fa708ba02 1299 Internet Explorer Header bar wrong menu button positioning 2016-12-16 15:27:43 +00:00
Mario Romano f1c6e3f271 #1255 remove onInit, we already add comments with onChange 2016-12-16 15:02:37 +00:00
Denys Vuika 3297496b2b Merge branch 'development' into dev-denys-1304 2016-12-16 14:49:54 +00:00
Mario Romano 43d3a769a8 Merge pull request #1306 from Alfresco/dev-denys--webpack-performance
exclude various folders from live reload
2016-12-16 14:48:00 +00:00
Mario Romano b31d60066d Merge pull request #1309 from Alfresco/dev-eromano-ie
ie-polyfills fix
2016-12-16 14:47:15 +00:00
mauriziovitale84 778be149a5 #1305 Claim a task 2016-12-16 14:40:56 +00:00
Will Abson 8058b583dc Do not disable FAYT results after previewing file
Refs #1294
2016-12-16 14:34:02 +00:00
Will Abson 5c2145dcf8 Ensure MDL search control input gets activated
Refs #1294
2016-12-16 14:33:05 +00:00
Will Abson b60ad98b34 Prevent FAYT results from re-appearing after login
Refs #1294
2016-12-16 14:32:04 +00:00
Denys Vuika a511c0fd69 fix dialog polyfill usage 2016-12-16 14:25:06 +00:00
Eugenio Romano 1b13e6b4de ie-polyfills fix 2016-12-16 14:19:23 +00:00
Denys Vuika 8dd6dd38d5 remove duplicate entries in package.json 2016-12-16 13:27:58 +00:00
Denys Vuika 8130c29db9 exclude various folders from live reload 2016-12-16 12:59:51 +00:00
Denys Vuika 12b361acc8 fix webpack config formatting 2016-12-16 12:18:32 +00:00
Vito 882b19930e Merge pull request #1295 from Alfresco/dev-mromano-1251
#1251 #1266 fix form visibility and performance
2016-12-16 03:18:24 -08:00
Mario Romano 0760f1e2ad #1251 #1266 fix form visibility and performance 2016-12-16 10:43:41 +00:00
Mario Romano 2bed309023 Merge pull request #1291 from Alfresco/dev-wabson-1287
Fix navigation to example folders
2016-12-15 21:30:38 +00:00
Mario Romano 45b75cd341 Merge pull request #1290 from Alfresco/dev-eromano-1240
Folder search, after clicking on folder in list of suggestions,…
2016-12-15 21:29:58 +00:00
Mario Romano 381675b5ef Merge pull request #1289 from Alfresco/dev-wabson-1269
Ensure MDL upgradeElement() gets called on process name text input
2016-12-15 21:29:31 +00:00
Mario Romano d50845cf4d Merge pull request #1288 from Alfresco/dev-mvitale-1276
Dynamic diagram size
2016-12-15 19:05:24 +00:00
Vito f80a92d11d Merge pull request #1286 from Alfresco/dev-eromano-1281
Cannot login after logging out
2016-12-15 10:22:22 -08:00
Will Abson ea84396c29 Fix navigation to example folders
Refs #1287
2016-12-15 17:05:27 +00:00
Mario Romano d9a4e398dd Merge pull request #1285 from Alfresco/dev-mvitale-1174-focus
Rename report focus
2016-12-15 17:02:36 +00:00
Eugenio Romano cb714bf260 #1240 Folder search, after clicking on folder in list of suggestions, suggestions do not disappear 2016-12-15 16:59:42 +00:00
mauriziovitale84 eb28993fed #1276 dynamic diagram size 2016-12-15 16:37:34 +00:00
Will Abson 037acd9025 Ensure MDL upgradeElement() gets called on process name text input
Refs #1269
2016-12-15 16:18:21 +00:00
Mario Romano d94a31e51e Merge pull request #1278 from Alfresco/dev-valbano-1072
#1072 - reset user details when the user is not logged in
2016-12-15 15:55:09 +00:00
Eugenio Romano 03f805a804 #1281 Cannot login after logging out 2016-12-15 15:55:00 +00:00
mauriziovitale84 1e80980463 #fix focus 2016-12-15 15:45:47 +00:00
Mario Romano 48fa09c56e Merge pull request #1277 from Alfresco/dev-eromano-1265
About page webpack compatible
2016-12-15 15:33:13 +00:00
Vito Albano 5ee86c2cdb #1072 - reset user details when the user is not logged in 2016-12-15 11:53:23 +00:00
Eugenio Romano 5b1a942025 About page not working #1265 2016-12-15 11:50:01 +00:00
Mario Romano ce8b4206c8 Merge pull request #1230 from Alfresco/dev-eromano-bundle
create bundle for all components
2016-12-15 11:44:45 +00:00
Mario Romano e0e5ffb010 Merge branch 'development' into dev-eromano-bundle 2016-12-15 10:40:01 +00:00
Denys Vuika 25d95cf28d start dist command 2016-12-15 10:35:23 +00:00
Mario Romano 5baa124699 Merge pull request #1275 from Alfresco/dev-eromano-1272
Clean the login storage ticket info before to login
2016-12-15 01:08:52 +00:00
Mario Romano 04768f9798 #1026 fix bundles 2016-12-15 01:07:08 +00:00
Eugenio Romano b613f9d226 #1272 Clean the login storage ticket info before to login 2016-12-14 23:43:22 +00:00
Mario Romano c15faeee08 Merge pull request #1271 from Alfresco/dev-mvitale-1245
Create Folder - placeholder
2016-12-14 18:01:10 +00:00
mauriziovitale84 09b494da6f #1245 Use placeholder instead value 2016-12-14 17:27:03 +00:00
Mario Romano b4b008416c Merge pull request #1267 from Alfresco/dev-mvitale-1174
Report rename
2016-12-14 17:06:35 +00:00
mauriziovitale84 4f555ad777 #fix folder name 2016-12-14 16:47:38 +00:00
Eugenio Romano e133fd6408 create bundle for all components 2016-12-14 15:49:08 +00:00
Denys Vuika 394e5bec6c fix blocking issue with bpm controllers 2016-12-14 15:34:12 +00:00
mauriziovitale84 8bfa71bc48 #1174 Refresh the report list after edit report title 2016-12-14 15:14:37 +00:00
Mario Romano 94124c2537 Merge pull request #1261 from Alfresco/dev-wabson-1140
Check that the process has a start form before attempting to display it
2016-12-14 13:35:42 +00:00
Mario Romano dfc8a0814c Merge pull request #1262 from Alfresco/dev-wabson-1258
Add missing router dependency for processlist demo
2016-12-14 13:31:04 +00:00
Mario Romano 957be16bb7 Merge pull request #1256 from Alfresco/dev-mvitale-1219
Analytics default date range
2016-12-14 13:30:51 +00:00
Mario Romano 8388590e70 Merge pull request #1260 from Alfresco/dev-mvitale-1244
Create Folder Fix firefox style
2016-12-14 12:23:55 +00:00
Mario Romano e1a1d8a959 Merge pull request #1254 from Alfresco/dev-wabson-1253
Remove start process dialog
2016-12-14 12:23:40 +00:00
Will Abson 60e4f4607b Add missing router depdency for processlist demo
Refs #1258
2016-12-14 11:40:45 +00:00
Will Abson 3714ef9fb0 Check that the process has a start form before attempting to display it
Refs #1140
2016-12-14 11:36:54 +00:00
mauriziovitale84 a12c370cc7 #1174 Rename report 2016-12-14 11:12:38 +00:00
mauriziovitale84 8993223a62 #1174 Add update report endpoint 2016-12-14 11:12:38 +00:00
Mario Romano 6c7160ccf8 Merge pull request #1242 from Alfresco/dev-mvitale-1220
Analitycs heading
2016-12-14 11:08:09 +00:00
mauriziovitale84 bb9edbf764 #1244 fix firefox style 2016-12-14 11:07:58 +00:00
Will Abson 47c4c8c976 Tidy up quotes in start-process template
Refs #1140
2016-12-14 10:49:34 +00:00
Mario Romano e357e92f29 Merge pull request #1225 from Alfresco/dev-mvitale-992
Move the Report API inside the js API
2016-12-14 10:23:53 +00:00
mauriziovitale84 6714677264 #1220 Fix unit test h4 2016-12-14 09:55:49 +00:00
Will Abson 2083050a10 Remove start process dialog
Refs #1253
2016-12-14 09:55:34 +00:00
mauriziovitale84 98bc7b0f52 #992 Fix unit test 2016-12-14 09:52:52 +00:00
mauriziovitale84 3ffc1bfd91 #992 fix js api method name 2016-12-14 09:32:08 +00:00
mauriziovitale84 a4e54d3d89 #992 Use the js API and fix unit test 2016-12-14 09:32:08 +00:00
Will Abson 499a22f62e Merge pull request #1252 from Alfresco/dev-mromano-1141
#1141 fix process filter creation
2016-12-14 09:31:21 +00:00
Mario Romano d32721f363 #1141 fix process filter creation 2016-12-14 02:23:19 +00:00
Denys Vuika 5ed7add492 fix running tests demo shell(#1246) 2016-12-13 22:54:36 +00:00
Mario Romano 8d619da667 #1146 load right filter on create task (#1250) 2016-12-13 22:53:49 +00:00
mauriziovitale84 29b8b635fa #1219 Default range date 2016-12-13 18:09:57 +00:00
mauriziovitale84 c061cf86d5 #1220 fix heading 2016-12-13 16:37:37 +00:00
Mario Romano 562fa9ec7c Merge pull request #1239 from Alfresco/dev-valbano-1183
#1183 - fix text formatting in diagram tasks
2016-12-13 16:24:53 +00:00
Mario Romano 6c7e28a83f #1176 improve responsiveness task list and process list (#1235) 2016-12-13 15:32:31 +00:00
Denys Vuika 5392fa5452 remove old config setting (webpack) 2016-12-13 15:17:58 +00:00
Vito Albano 9cd2ad8757 #1183 - fix text formatting in diagram tasks 2016-12-13 14:55:25 +00:00
Mario Romano 8e9cab657a #1157 reload process list (#1238) 2016-12-13 14:36:07 +00:00
Mario Romano e1824238f9 Merge pull request #1208 from Alfresco/dev-mvitale-384-style
Document list - Create Folder Docs
2016-12-13 14:33:45 +00:00
Mario Romano 84a782af77 Merge pull request #1237 from Alfresco/dev-denys--webpack
webpack config improvements
2016-12-13 14:31:28 +00:00
Denys Vuika 7267406d33 webpack config improvements
- new ‘debug-loader’ to help debugging webpack rules
- dynamically find and resolve all alfresco libraries
2016-12-13 12:45:37 +00:00
Mario Romano 3fb041bd69 Merge pull request #1234 from Alfresco/dev-denys--home-css
UI polish for Home page
2016-12-13 11:00:19 +00:00
Denys Vuika 5b886d4e60 UI polish for Home page
- improve feature list UI (remove bullet styles, improve icon and text
positioning)
- improve card headers (icons and text positioning)
2016-12-13 10:47:00 +00:00
mauriziovitale84 9b3ab411af Overwrite images 2016-12-13 10:31:57 +00:00
mauriziovitale84 82d29d3bc2 overwrite image 2016-12-13 10:30:14 +00:00
mauriziovitale84 d950612738 #384 Rename event name and improve docs 2016-12-13 10:26:37 +00:00
Will Abson b34a38fcff Allow navigation to folders from search results (#1209)
* Allow navigation to folders from search results

- Uses router to pass ID of the folder
- Modified document list component to accept folder ID without path
- Current limitations
  - Breadcrumb cannot currently be shown when navigating via folder id
  - Clicking between folders does not update the current route

* Allow root folder ID to be changed and have documentlist reload

- e.g switching from Company home to My Files

* New tests for navigating to folders based on ID

Refs #666
2016-12-13 09:30:58 +00:00
Denys Vuika a8ef1f8e4e Merge pull request #1229 from Alfresco/dev-mromano-improvements
improve mobile login,home and settings styles
2016-12-13 09:27:47 +00:00
Denys Vuika 53b23bfd31 Merge pull request #1231 from Alfresco/dev-mromano-1215
#1215 use alfresco-js-api for upload file
2016-12-13 09:24:02 +00:00
Denys Vuika a161827bed Merge pull request #1232 from Alfresco/dev-mromano-1195
#1195 add scroll to completed dynamic table
2016-12-13 09:22:29 +00:00
Mario Romano 359ffd24d2 #1195 add scroll to completed dynamic table 2016-12-13 00:15:25 +00:00
Mario Romano b9b9808dd0 #1215 use alfresco-js-api for upload file 2016-12-12 23:58:31 +00:00
Mario Romano 8b0621f5e1 improve mobile login,home and settings styles 2016-12-12 22:02:00 +00:00
Denys Vuika ca77608fa3 fix unit testing configuration (#1227) 2016-12-12 18:36:57 +00:00
Denys Vuika 8d97b0b123 add missing library 2016-12-12 16:59:13 +00:00
Denys Vuika 9432b2aa60 webpack: production settings (#1226)
* vendor libraries

* vendor libraries settings

* additional vendor libs settings

* production settings for i18n

* fix pdfs and favicon paths

* readme update

* code cleanup
2016-12-12 14:20:12 +00:00
Mario Romano d7e6f08448 Merge pull request #1210 from Alfresco/dev-denys-webpack
Webpack integration
2016-12-09 17:07:03 +00:00
Denys Vuika 9338ebe7ab remove old link script 2016-12-09 16:00:09 +00:00
Vito bdf1ae33e5 #1165 - fixed overlay for typeahead (#1218) 2016-12-09 15:13:52 +00:00
Denys Vuika d266d49041 fix issue with symlinks 2016-12-09 14:12:38 +00:00
Denys Vuika f285aec069 enable TypeScript debug and source mapping 2016-12-09 13:23:30 +00:00
Denys Vuika 5432cf69d5 fix document list 2016-12-09 12:21:46 +00:00
Denys Vuika d36a45255d add missing clean script 2016-12-09 11:03:22 +00:00
Denys Vuika cfb4fc71c0 fix document list bundling 2016-12-09 10:41:17 +00:00
Denys Vuika b3b6193006 fix: ng2-alfresco-documentlist 2016-12-08 18:49:52 +00:00
Denys Vuika d973c39462 fix: ng2-alfresco-search 2016-12-08 18:35:29 +00:00
Denys Vuika f954930678 fix: ng2-alfresco-tag 2016-12-08 18:17:23 +00:00
Denys Vuika f0963f5de3 fix: ng2-alfresco-viewer 2016-12-08 16:58:01 +00:00
Denys Vuika 279c627bbb fix: ng2-alfresco-userinfo 2016-12-08 16:56:13 +00:00
Denys Vuika 8e69cf86d6 fix: ng2-alfresco-upload 2016-12-08 16:52:29 +00:00
Denys Vuika cda0d78a7b fix component tests 2016-12-08 16:45:56 +00:00
Denys Vuika 492f03f905 fix: ng2-activiti-form 2016-12-08 16:29:20 +00:00
Denys Vuika 967899cca8 fix: ng2-activiti-analytics 2016-12-08 16:23:40 +00:00
Denys Vuika 29114c24db fix: ng2-activiti-diagrams 2016-12-08 16:17:39 +00:00
Denys Vuika 75ddc36e0a fix: ng2-alfresco-login 2016-12-08 16:04:20 +00:00
Denys Vuika 62d7abcb72 extend system loader with moduleName support 2016-12-08 15:51:46 +00:00
Denys Vuika dd20f6fc78 custom system.js loader
- disables ‘moduleId’ usage when building with webpack
2016-12-08 15:49:19 +00:00
Denys Vuika 067def255e improve link.sh script 2016-12-08 12:33:25 +00:00
Denys Vuika ea035ca25e cleanup 2016-12-07 18:27:11 +00:00
Denys Vuika c7eea3d8f3 freeze typescript version 2016-12-07 17:34:49 +00:00
Denys Vuika 29f426f643 code fixes
- interpolate ng2 components html content
- fix: load images for Login
- fix: load images for User Info
- fix: load images for Document List
- fix: decorator inheritance issue for Form
- fix: load images for Search
2016-12-07 14:55:09 +00:00
Mario Romano 1264a70b70 Update README.md 2016-12-07 12:48:57 +00:00
mauriziovitale84 369ac0d7d6 #384 Change API name, add docs, fix demo 2016-12-07 10:46:22 +00:00
mauriziovitale84 5fa2a8d075 #384 improve style and error messagge 2016-12-07 10:29:47 +00:00
Mario Romano 93036da6a7 Merge pull request #1201 from Alfresco/dev-wabson-775
Process variables component
2016-12-07 09:53:29 +00:00
Mario Romano e334848126 Merge pull request #1207 from Alfresco/dev-mvitale-384
Create Folder in document list
2016-12-07 09:53:15 +00:00
Mario Romano 1f820ebd34 Merge pull request #1206 from Alfresco/dev-valbano-1052
#1052 - Added tooltip for diagram heat map
2016-12-07 09:51:48 +00:00
Denys Vuika 45993793f9 remove core-js dependency 2016-12-06 19:50:12 +00:00
Denys Vuika f48d0c6c00 improve link script 2016-12-06 19:17:33 +00:00
Denys Vuika 705b22d70d enable missed content 2016-12-06 17:02:48 +00:00
Denys Vuika 10423ca985 remove module.id 2016-12-06 17:01:31 +00:00
mauriziovitale84 eba89de1c2 #384 fix compilation problem 2016-12-06 16:57:18 +00:00
mauriziovitale84 8775ec7c31 #384 Provide Create Folder button 2016-12-06 16:55:58 +00:00
Denys Vuika c7167bb812 basic webpack setup 2016-12-06 15:39:22 +00:00
Vito Albano d4895b39b2 #1052 - added header to diagram-tooltip component 2016-12-06 14:27:29 +00:00
Vito Albano 0fc17fbc30 #1052 - fix tests to reflect tooltip changes 2016-12-06 12:30:38 +00:00
Vito Albano 4ed8caf490 #1052 - fixed and improved test with tooltip component 2016-12-06 12:03:43 +00:00
Mario Romano 73b6e1b846 make more general update version script 2016-12-06 11:20:51 +00:00
Mario Romano 79429f5d85 Merge pull request #1194 from Alfresco/dev-eromano-73
Move the ecm-model service methods of the form component inside the js api
2016-12-06 10:12:04 +00:00
Vito Albano 089507b131 #1052 - add tooltip to heatmap 2016-12-05 18:02:17 +00:00
Mario Romano 604d4142c2 Merge pull request #1203 from Alfresco/dev-valbano-1134
#1134 - Fix Scrolling on completed process task
2016-12-05 16:56:13 +00:00
Vito Albano ef2c03cec5 #1052 - added tooltip for diagram elements 2016-12-05 15:33:00 +00:00
Vito Albano 2deb8092c3 #1052 - added tooltip component for diagram 2016-12-05 15:33:00 +00:00
Vito Albano 91d9503b37 #1052 - start adding tooltip to diagram elements 2016-12-05 15:33:00 +00:00
Vito Albano e3f8c5448f #1134 - fixed dialog in the middle of scrolled screen 2016-12-05 15:19:16 +00:00
Vito Albano 350b0b2f75 Fixed width for dialog task detail 2016-12-05 13:09:18 +00:00
Vito Albano 2d46444f25 Added scroll for big dialog on process detail 2016-12-05 13:09:18 +00:00
Will Abson a49f7dd7f7 Add edit and delete actions for process variables
Refs #775
2016-12-05 12:32:22 +00:00
Will Abson 676180517e Style fix for tabs header height
Refs #775
2016-12-05 12:32:22 +00:00
Will Abson 9bc63c9473 Use h2 for headings in processlist demo
Refs #775
2016-12-05 12:32:22 +00:00
Will Abson 99298f7066 Change demo app processlist columns to match demo-shell
Refs #775
2016-12-05 12:32:22 +00:00
Will Abson 72fc9a0b5d Add process variables component to demo app
Refs #775
2016-12-05 12:32:22 +00:00
Will Abson 1c4f17f90d Get demo app working again with recent processlist changes
Refs #775
2016-12-05 12:27:18 +00:00
Will Abson 8dd0f0ef81 Add test for getting/adding process vars
Refs #755
2016-12-05 12:27:18 +00:00
Will Abson a0294e29c3 Remove duplicated spy objects in tests
Refs #775
2016-12-05 12:27:18 +00:00
Will Abson d193b56b41 Externalise process comments UI strings
Refs #775
2016-12-05 12:27:18 +00:00
Will Abson f42c08fe10 Initial implementation of listing and setting process vars
Refs #775
2016-12-05 12:27:18 +00:00
Denys Vuika 613384dd90 Merge pull request #1200 from Alfresco/dev-eromano-improveTest
Improve test coverage document list
2016-12-05 11:10:46 +00:00
Eugenio Romano b2cbc72342 improve test coverage document list 2016-12-05 10:09:39 +00:00
Denys Vuika 800a2a6530 Demo shell improvements (#1199)
* #1197 auth guards

* #1197 restore lost router dependency to all libs

* #1197 ecm/bpm auth guards, home page

- ECM auth guard (redirect to Login if ECM auth is missing)
- BPM auth guard (redirect to Login if BPM auth is missing)
- new Home page and route, show details on demo areas

* css improvements

make app text white as per request
2016-12-03 18:57:43 +00:00
Eugenio Romano a95c98326a #649 Move the ecm-model service methods of the form component inside the js api 2016-12-01 19:21:06 +00:00
Maurizio Vitale 3a288c6b1b #1181 Show toast message once (#1189)
* #1181 Show toast once

* #1181 fix unit test

* #1181 Fix unit test compilation problem
2016-12-01 16:28:16 +00:00
Denys Vuika 294f7c0ec1 #1190 routing improvements, bug fixes (#1193)
- split apps view and single app view to reflect Activiti UI
- dedicated route for each app tasks: /activiti/apps/:appId/tasks
- remove performance bottleneck for activiti demo (AfterViewChecked)
- load stencil controllers together with Tasks view (fixes #1190)
2016-12-01 16:27:07 +00:00
Denys Vuika 2f1cd2cc84 #986 fix horizontal scrollbar issue for Safari (#1188)
adding top margin helps solving issue with horizontal scrollbar issue
for Safari when mouse is attached or system scrollbars visibility set
to ‘always’ (macOS)
2016-12-01 12:13:30 +00:00
Denys Vuika 8db6a73cc8 #679 support for additional content (#1187)
- allow custom content within login dialog
- move demo shell login switches inside the dialog
- readme updates and fixes
- fixes #679
2016-12-01 11:51:53 +00:00
Mario Romano d768f84838 fix header options for mobile (#1186)
* #1178 show header bar on mobile and tablet

* #1178 add all options to burger icon on the right
2016-12-01 09:45:36 +00:00
Denys Vuika 7eab89c5ef #159 improved error reporting for document-list (#1180)
- expose ‘error’ event
- change path only on successful navigation
- extend demo shell with error handling and reporting
- additional unit tests for document-list
2016-11-30 14:52:06 +00:00
Denys Vuika da70a72bba Login dialog shows error for Safari with Private Window mode (#1172)
* #958 new StorageService service

abstraction around ‘Storage’ to allow switching to in-memory store
whenever ‘localStorage’ is not available (i.e. private/incognito modes,
etc.)

* fix unit tests

* update unit tests

- disable incorrect auth tests (core)
- simplify widget visibility tests (activiti-form)

* fix unit tests
2016-11-30 11:32:16 +00:00
Mario Romano 94dad585b1 #1178 show header bar on mobile and tablet (#1179) 2016-11-30 11:12:44 +00:00
Will Abson 3f0db4038f Fix failing processlist tests 2016-11-29 18:53:23 +00:00
Will Abson 743eaaef01 Fix failing processlist test 2016-11-29 18:25:51 +00:00
Denys Vuika 5c401007f2 user-info fixes and performance improvements (#1171)
* #1167 document-list improvements

- allow setting custom root path
- document-list module now re-exports datatable module (no need
importing it separately if document-list is already used)
- documentation updates and fixes

* readme updates and unit test

* user-info fixes and performance improvements

- setup live reloads for user-info (demo shell)
- optimise user-info template (single *ngIf, [mdl] directive for
‘user-profile-lists’ instead of CPU-hungry `ngAfterViewChecked`)
2016-11-29 13:26:41 +00:00
Denys Vuika 9066ce49e0 document-list improvements (#1169)
* #1167 document-list improvements

- allow setting custom root path
- document-list module now re-exports datatable module (no need
importing it separately if document-list is already used)
- documentation updates and fixes

* readme updates and unit test
2016-11-29 12:03:24 +00:00
Mario Romano 132e6eac96 update aws image 2016-11-28 14:49:07 -08:00
Mario Romano 50de7ee5ce Update aws image 2016-11-28 14:48:31 -08:00
Denys Vuika 3ca2c28a41 Performance improvements (#1166)
#1166 * Update angular libs
document-list: performance improvements
caching ‘heavy’ cell evaluations (i.e. date pipe)
code/test fixes
document-list: performance improvements
Removed ‘AfterViewChecked’ bottleneck as underlying data-table already
does it.
data-table: performance improvements
2016-11-28 21:36:00 +00:00
Vito 0f563e38bb #1134 - Added scroll for big dialog on process detail (#1168)
#1134  Added scroll for big dialog on process detail , Fixed width for dialog task detail
2016-11-28 21:34:40 +00:00
Denys Vuika 9ed3047857 Merge pull request #1164 from Alfresco/dev-eromano-1094new
Remove deprecated use of getAlfrescoApi() #1094
2016-11-28 15:08:32 +00:00
Eugenio Romano d87a768d20 Remove deprecated use of getAlfrescoApi() #1094
remove getAlfrescoApi from auth #1094
2016-11-28 14:04:58 +00:00
Eugenio Romano 546347b475 Update PULL_REQUEST_TEMPLATE.md 2016-11-28 11:08:27 +00:00
Eugenio Romano eed6902428 Merge pull request #1162 from Alfresco/dev-valbano-1143-fix
#1143 - Fix double element on start process
2016-11-28 10:46:54 +00:00
Vito Albano 9e584925f8 Fixed test due new changes 2016-11-28 10:15:30 +00:00
Vito Albano 8e94e67779 #1143 - fix multiple call to the load service 2016-11-28 10:15:04 +00:00
John Sotiropoulos 7d990472e3 Update README.md 2016-11-27 22:15:52 +00:00
845 changed files with 29122 additions and 11828 deletions
+4 -3
View File
@@ -10,12 +10,13 @@ Please ask before on our gitter channel https://gitter.im/Alfresco/alfresco-ng2-
- [ ] New feature request
- [ ] Bug
- [ ] Support request
- [ ] Documentation
```
**Current behavior:**
<!-- Describe the current behavior. -->
**Current behaviour:**
<!-- Describe the current behaviour. -->
**Expected behavior:**
<!-- Describe the expected behavior. -->
<!-- Describe the expected behaviour. -->
**Steps to reproduce the issue:**
<!-- Describe the steps to reproduce the issue. -->
+8 -7
View File
@@ -1,8 +1,9 @@
**Please check if the PR fulfills these requirements**
- [ ] The commit message follows our [guidelines](https://github.com/Alfresco/alfresco-ng2-components/wiki/Commit-format)
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
```
[ ] The commit message follows our [guidelines](https://github.com/Alfresco/alfresco-ng2-components/wiki/Commit-format)
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
```
<!--
Before submitting your PR, please check that your code follows our contribution guidelines:
https://github.com/Alfresco/alfresco-ng2-components/wiki/Code-contribution-acceptance-criteria
@@ -19,11 +20,11 @@
[ ] Other... Please describe:
```
**What is the current behavior?** (You can also link to an open issue here)
**What is the current behaviour?** (You can also link to an open issue here)
**What is the new behavior?**
**What is the new behaviour?**
@@ -35,4 +36,4 @@
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
**Other information**:
**Other information**:
+2
View File
@@ -8,3 +8,5 @@ demo-shell-ng2/app/components/router/
ng2-components/ng2-alfresco-userinfo-old/demo/src/app/
ng2-components/ng2-alfresco-userinfo-old/src/services/bpm-user.service.spec.ts
ng2-components/ng2-alfresco-userinfo-old/src/services/ecm-user.service.spec.ts
src/environments/
/ng2-components/ng2-example-webpack/
+14 -15
View File
@@ -1,13 +1,9 @@
language: node_js
dist: trusty
sudo: false
node_js:
- "5"
addons:
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
@@ -32,29 +28,32 @@ env:
before_script:
- if ([ "$MODULE" != "ng2-alfresco-core" ]); then
(cd ng2-components/ng2-alfresco-core; if [ ! -d "dist" ]; then npm install; fi; npm link);
(cd ng2-components/ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-alfresco-documentlist" ] || [ "$MODULE" == "ng2-alfresco-webscript" ] || [ "$MODULE" == "ng2-activiti-processlist" ] || [ "$MODULE" == "ng2-activiti-tasklist" ]); then
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "dist" ]; then npm install; fi; npm link);
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-activiti-tasklist" ] || [ "$MODULE" == "ng2-activiti-processlist" ]); then
(cd ng2-components/ng2-activiti-form; npm link ng2-alfresco-core; if [ ! -d "dist" ]; then npm install; fi; npm link);
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
(cd ng2-components/ng2-activiti-form; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-activiti-processlist" ]); then
(cd ng2-components/ng2-activiti-tasklist; npm link ng2-alfresco-core; npm link ng2-alfresco-datatable; npm link ng2-activiti-form; if [ ! -d "dist" ]; then npm install; fi; npm link);
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
(cd ng2-components/ng2-activiti-form; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
(cd ng2-components/ng2-activiti-tasklist; npm link ng2-alfresco-core; npm link ng2-alfresco-datatable; npm link ng2-activiti-form; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-activiti-analytics" ]); then
(cd ng2-components/ng2-activiti-diagrams; npm link ng2-alfresco-core; if [ ! -d "dist" ]; then npm install; fi; npm link);
(cd ng2-components/ng2-activiti-diagrams; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- if ([ "$MODULE" == "ng2-alfresco-search" ]); then
(cd ng2-components/ng2-alfresco-datatable; npm link ng2-alfresco-core; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
(cd ng2-components/ng2-alfresco-documentlist; npm link ng2-alfresco-core; npm link ng2-alfresco-datatable; if [ ! -d "bundles" ]; then npm install && npm run build && npm link; fi);
fi
- cd ng2-components/$MODULE;
- npm run travis;
- npm install;
script: npm run test
script: npm install && npm run travis && npm run test
# Send coverage data to Coveralls
after_success:
- if ([ "$TRAVIS_BRANCH" == "development" ] || [ "$TRAVIS_BRANCH" == "master" ]); then
bash <(curl -s https://codecov.io/bash)
fi
bash <(curl -s https://codecov.io/bash) -X gcov
cache:
directories:
+5 -2
View File
@@ -6,6 +6,9 @@
"**/.hg": true,
"**/.DS_Store": true,
"**/*.js": { "when": "$(basename).ts"},
"**/*.js.map": { "when": "$(basename)"}
}
"**/*.js.map": { "when": "$(basename)"},
"**/*.d.ts": { "when": "$(basename).ts"},
"**/coverage": true
},
"editor.renderIndentGuides": true
}
+67
View File
@@ -0,0 +1,67 @@
### Enable CORS in Alfresco
The web client that we are building with the application development framework will be loaded from a different web server than the Alfresco Platform is running on.
So we need to tell the Alfresco server that any request that comes in from this custom web client should be allowed access
to the Content Repository. This is done by enabling CORS.
To enable CORS in the Alfresco Platform do **one of the following**:
##Recommended - Download and install the enable CORS module
This is the easiest way, add the [enablecors](https://artifacts.alfresco.com/nexus/service/local/repositories/releases/content/org/alfresco/enablecors/1.0/enablecors-1.0.jar)
platform module JAR to the *$ALF_INSTALL_DIR/modules/platform* directory and restart the server.
Note. by default the CORS filter that is enabled will allow any orgin.
##Or - Manually update the web.xml file
Modify *$ALF_INSTALL_DIR/tomcat/webapps/alfresco/WEB-INF/web.xml* and uncomment the following section and update
`cors.allowOrigin` to `http://localhost:3000`:
```
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
<init-param>
<param-name>cors.allowGenericHttpRequests</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>cors.allowOrigin</param-name>
<param-value>http://localhost:3000</param-value>
</init-param>
<init-param>
<param-name>cors.allowSubdomains</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>cors.supportedMethods</param-name>
<param-value>GET, HEAD, POST, PUT, DELETE, OPTIONS</param-value>
</init-param>
<init-param>
<param-name>cors.supportedHeaders</param-name>
<param-value>origin, authorization, x-file-size, x-file-name, content-type, accept, x-file-type</param-value>
</init-param>
<init-param>
<param-name>cors.supportsCredentials</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>cors.maxAge</param-name>
<param-value>3600</param-value>
</init-param>
</filter>
```
When specifying the `cors.allowOrigin` URL make sure to use the URL that will be used by the web client.
Then uncomment filter mappings:
```
<filter-mapping>
<filter-name>CORS</filter-name>
<url-pattern>/api/*</url-pattern>
<url-pattern>/service/*</url-pattern>
<url-pattern>/s/*</url-pattern>
<url-pattern>/cmisbrowser/*</url-pattern>
</filter-mapping>
```
Vendored
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/groovy
@Library('github.com/fabric8io/fabric8-pipeline-library@v2.2.311')
def utils = new io.fabric8.Utils()
clientsNode{
def envStage = utils.environmentNamespace('staging')
def envProd = utils.environmentNamespace('production')
def newVersion = ''
git 'https://github.com/Alfresco/alfresco-ng2-components.git'
stage 'Canary release'
echo 'NOTE: running pipelines for the first time will take longer as build and base docker images are pulled onto the node'
if (!fileExists ('Dockerfile')) {
writeFile file: 'Dockerfile', text: 'FROM node:5.3-onbuild'
}
newVersion = performCanaryRelease {}
def rc = getKubernetesJson {
port = 8080
label = 'node'
icon = 'https://cdn.rawgit.com/fabric8io/fabric8/dc05040/website/src/images/logos/nodejs.svg'
version = newVersion
imageName = clusterImageName
}
stage 'Rollout Staging'
kubernetesApply(file: rc, environment: envStage)
stage 'Approve'
approve{
room = null
version = canaryVersion
console = fabric8Console
environment = envStage
}
stage 'Rollout Production'
kubernetesApply(file: rc, environment: envProd)
}
+2 -1
View File
@@ -2,7 +2,8 @@
The [Angular 2](https://angular.io/) based application development framework requires the following:
- An Alfresco Platform Repository (version [201609 Early Access](https://community.alfresco.com/docs/DOC-6372-alfresco-community-edition-file-list-201609-ea) or newer) to talk to, which has [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) enabled.
- An Alfresco Platform Repository (version [201609 Early Access](https://community.alfresco.com/docs/DOC-6372-alfresco-community-edition-file-list-201609-ea) or newer)
- [Enable cors on Alfresco One](/ALFRESCOCORS.md)
- [Download and install Activiti](https://www.alfresco.com/products/bpm/alfresco-activiti/trial)
- [Node.js](https://nodejs.org/en/) JavaScript runtime.
- [npm](https://www.npmjs.com/) package manager for JavaScript.
+8 -2
View File
@@ -56,6 +56,12 @@ To view the complete list of all the components that you can use to build your c
You can browse all the components at the following [page](http://devproducts.alfresco.com/).
## Demo Application
A separate application showcasing integration of components can be found [here](https://github.com/Alfresco/alfresco-ng2-components/tree/master/demo-shell-ng2).
You will find examples of basic interaction for both BPM and ECM sets of widgets.
## Yeoman generators
To speed up the development of your Alfresco Angular 2 application, or Alfresco Angular 2 component, use one of the Yeoman generators.
@@ -87,7 +93,7 @@ To generate your Alfresco Angular 2 application you can use the following Yeoman
To deploy directly on your AWS instance our demo shell click the button below:
<a title="Deploy to AWS" href="https://console.aws.amazon.com/elasticbeanstalk/home?region=us-west-2#/newApplication?applicationName=Alfresco&solutionStackName=Node.js&tierName=WebServer&sourceBundleUrl=https://s3-us-west-2.amazonaws.com/elasticbeanstalk-us-west-2-677901592050/2016210o6l-Archive-v7.zip" target="_blank"><img src="http://d0.awsstatic.com/product-marketing/Elastic%20Beanstalk/deploy-to-aws.png" height="40"></a>
<a title="Deploy to AWS" href="https://console.aws.amazon.com/elasticbeanstalk/home?region=us-west-2#/newApplication?applicationName=Alfresco&solutionStackName=Node.js&tierName=WebServer&sourceBundleUrl=https://s3-us-west-2.amazonaws.com/elasticbeanstalk-us-west-2-677901592050/ADF_1.0.zip" target="_blank"><img src="http://d0.awsstatic.com/product-marketing/Elastic%20Beanstalk/deploy-to-aws.png" height="40"></a>
## Browser Support
All components are supported in the following browsers:
@@ -100,6 +106,6 @@ All components are supported in the following browsers:
|Edge |13, 14 |
|Internet Explorer |11 |
*Concerning Alfresco Upload Component, folder upload currently not supported [firefox known issue](https://bugzilla.mozilla.org/show_bug.cgi?id=1188880 )
* Due to a [known Firefox issue] (https://bugzilla.mozilla.org/show_bug.cgi?id=1188880),the Alfresco Upload Component does not currently support folder upload functionality on Firefox
Please refer to [Browser Support](BROWSER-SUPPORT.md) article for more details.
+15 -34
View File
@@ -2,6 +2,8 @@
branches:
only:
- master
- development
- dev-build-test
environment:
nodejs_version: "5"
@@ -28,26 +30,23 @@ install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# install module
- IF %COMPONENT_NAME% NEQ ng2-alfresco-core (cd ng2-components/ng2-alfresco-core && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-documentlist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-activiti-form && npm link ng2-alfresco-core && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-activiti-tasklist && npm link ng2-alfresco-core && npm link ng2-alfresco-datatable && npm link ng2-activiti-form && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-tasklist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-tasklist (cd ng2-components/ng2-activiti-form && npm link ng2-alfresco-core && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-webscript (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-analytics (cd ng2-components/ng2-activiti-diagrams && npm link link ng2-alfresco-core && npm install && npm link && cd ../../)
- IF %COMPONENT_NAME% NEQ ng2-alfresco-core (cd ng2-components/ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-documentlist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-search (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-search (cd ng2-components/ng2-alfresco-documentlist && npm link ng2-alfresco-core && npm link ng2-alfresco-datatable && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-activiti-form && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (cd ng2-components/ng2-activiti-tasklist && npm link ng2-alfresco-core && npm link ng2-alfresco-datatable && npm link ng2-activiti-form && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-tasklist (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-tasklist (cd ng2-components/ng2-activiti-form && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-alfresco-webscript (cd ng2-components/ng2-alfresco-datatable && npm link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- IF %COMPONENT_NAME% EQU ng2-activiti-analytics (cd ng2-components/ng2-activiti-diagrams && npm link link ng2-alfresco-core && npm link && npm install && npm run build && cd ../../)
- cd ng2-components/%COMPONENT_NAME%
- IF %COMPONENT_NAME% NEQ ng2-alfresco-core (npm link ng2-alfresco-core)
- IF %COMPONENT_NAME% EQU ng2-alfresco-documentlist (npm link ng2-alfresco-datatable)
- IF %COMPONENT_NAME% EQU ng2-activiti-processlist (npm link ng2-alfresco-datatable && npm link ng2-activiti-form && npm link ng2-activiti-tasklist)
- IF %COMPONENT_NAME% EQU ng2-activiti-tasklist (npm link ng2-alfresco-datatable && npm link ng2-activiti-form)
- IF %COMPONENT_NAME% EQU ng2-alfresco-webscript (npm link ng2-alfresco-datatable)
- IF %COMPONENT_NAME% EQU ng2-activiti-analytics (npm link ng2-activiti-diagrams)
- npm install
- npm run travis
# Post-install test scripts.
test_script:
- npm install
# Output useful info for debugging.
- node --version
- npm --version
@@ -56,21 +55,3 @@ test_script:
# Don't actually build.
build: off
cache:
- node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-activiti-form\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-activiti-processlist\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-activiti-tasklist\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-core\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-datatable\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-documentlist\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-login\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-search\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-upload\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-viewer\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-webscript\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-tag\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-activiti-analytics\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-alfresco-userinfo\node_modules
- C:\projects\alfresco-ng2-components\ng2-components\ng2-activiti-diagrams\node_modules
+2
View File
@@ -5,7 +5,9 @@ app/**/*.js
app/**/*.js.map
!app/js/Polyline.js
.idea
versions.json
dist/
coverage/
# docker files
docker-compose.yml
+47 -11
View File
@@ -10,28 +10,48 @@
</a>
</p>
### Node
To correctly use this demo check that on your machine is running Node version 5.0.0 or higher.
## Installing
#### Local build
1 Install dependencies
To correctly use this demo check that on your machine is running [Node](https://nodejs.org/en/) version 5.x.x or higher.
```sh
git clone https://github.com/Alfresco/alfresco-ng2-components.git
cd alfresco-ng2-components/demo-shell-ng2/
npm install
```
2 Fast build and watch for dev purposes
## Development build
```sh
npm start
```
>`start` script also includes live reload and watchers for all the `.ts` files.
TypeScript watchers are also configured for `node_modules` folder within demo shell
and provide live reload for all the component libraries as well.
This command compiles and starts the project in watch mode.
Browser will automatically reload upon changes.
Upon start you can navigate to `http://localhost:3000` with your preferred browser.
#### Development branch build
### Important notes
This script is recommended for development environment and not suited for headless servers and network access.
## Production build
```sh
npm run build
npm run start:dist
```
This command builds project in `production` mode.
All output is placed to `dist` folder and can be served your preferred web server.
You should need no additional files outside the `dist` folder.
### Important notes
By default demo application is configured to use [wsrv](https://www.npmjs.com/package/wsrv) tool (lightweight web server)
to serve production build output. It will be running at `0.0.0.0` address with port `3000` and allow you accessing your application
via network. However you can use any web server of your choice in production.
## Development branch build
If you want to run the demo shell with the latest change from the development branch, use the following command from the /script folder:
@@ -40,7 +60,7 @@ If you want to run the demo shell with the latest change from the development br
./start-linked.sh -install
```
###Multi-language
## Multi-language
To support a new language you need to create your language file (.json) and add it to `i18n/` folder.
```json
@@ -61,4 +81,20 @@ Directory structure:
│ └── fr.json
```
## Custom-files
If you need to add custom files on your project you can add this files in the folders public
```
.
├── public/
│ ├── images/
│ ├── css/
│ └── js/
```
the public folder above wil be copied in the root of your project and you can refer to them for example as
* './images/custom_image.png'
* './js/custom_script.js'
* './css/custom_style.css'
-3
View File
@@ -1,3 +0,0 @@
#Windows Installation of *Alfresco Angular 2 Components* project
See https://github.com/Alfresco/alfresco-ng2-components/blob/master/Prerequisites.md
+21 -3
View File
@@ -1,6 +1,12 @@
@media only screen and (max-width: 640px) {
.mdl-layout__header.header-search-expanded .mdl-layout-title {
display: none;
@media screen and (max-width: 1024px) {
.mdl-layout__header {
display: block;
}
}
@media screen and (max-width: 1024px) {
.mdl-layout__header {
display: block;
}
}
@@ -15,3 +21,15 @@
.mdl-button-padding {
padding-left: 20px;
}
.hide {
display: none !important;
}
.mdl-navigation__link {
cursor: pointer;
}
.mdl-navigation__link label {
cursor: pointer;
}
+55 -71
View File
@@ -1,82 +1,66 @@
<!-- Always shows a header, even in smaller screens. -->
<div mdl class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<div *ngIf="!isLoginPage()">
<header class="mdl-layout__header">
<div class="mdl-button-padding mdl-layout__header-row">
<header class="mdl-layout__header main_header_adf" [ngClass]="{hide: isAPageWithHeaderBar()}">
<div class="mdl-button-padding mdl-layout__header-row">
<!-- User Info -->
<ng2-alfresco-userinfo class="user-profile" [menuOpenType]="left">
</ng2-alfresco-userinfo>
<ng2-alfresco-userinfo class="user-profile" [menuOpenType]="left">
</ng2-alfresco-userinfo>
<!-- Title -->
<span class="mdl-layout-title">Demo Application</span>
<!-- Add spacer, to align navigation to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Search bar -->
<search-bar (expand)="onToggleSearch($event)"></search-bar>
<!-- Title -->
<span class="mdl-layout-title">Demo Application</span>
<!-- Add spacer, to align navigation to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Search bar -->
<search-bar (expand)="onToggleSearch($event)"></search-bar>
<!-- Navigation. We hide it in small screens. -->
<nav class="mdl-navigation mdl-layout--large-screen-only">
<a class="mdl-navigation__link" data-automation-id="files" href=""
routerLink="/files">DocumentList</a>
<a class="mdl-navigation__link" data-automation-id="datatable" href="" routerLink="/datatable">DataTable</a>
<a class="mdl-navigation__link" data-automation-id="uploader" href="" routerLink="/uploader">Uploader</a>
<a class="mdl-navigation__link" data-automation-id="activiti" href="" routerLink="/activiti">Activiti</a>
<a class="mdl-navigation__link" data-automation-id="webscript" href="" routerLink="/webscript">Webscript</a>
<a class="mdl-navigation__link" data-automation-id="tag" href="" routerLink="/tag">Tag</a>
<a class="mdl-navigation__link" data-automation-id="login" href="" routerLink="/login">Login</a>
<a class="mdl-navigation__link" data-automation-id="settings" href="" routerLink="/settings">Settings</a>
</nav>
<!-- Right aligned menu below button -->
<button id="demo-menu-lower-right" data-automation-id="right-action-menu"
class="mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">more_vert</i>
</button>
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
for="demo-menu-lower-right">
<li class="mdl-menu__item" (click)="changeLanguage('en')">
<span class="flag-icon flag-icon-gb"></span>
<label tabindex="0"> English</label>
</li>
<li class="mdl-menu__item" (click)="changeLanguage('gr')">
<span class="flag-icon flag-icon-gr"></span>
<label tabindex="0"> Greek</label>
</li>
<li class="mdl-menu__item" (click)="changeLanguage('it')">
<span class="flag-icon flag-icon-it"></span>
<label tabindex="0"> Italian</label>
</li>
<a class="mdl-menu__item" routerLink="/about">
<label tabindex="0">About</label>
</a>
<a *ngIf="!isLoggedIn()" class="mdl-menu__item" routerLink="/login">
<label tabindex="0">Login</label>
</a>
<li *ngIf="isLoggedIn()" class="mdl-menu__item" (click)="onLogout($event)">
<label tabindex="0">Logout</label>
</li>
</ul>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Components List</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="" routerLink="/files" (click)="hideDrawer()">DocumentList Demo</a>
<a class="mdl-navigation__link" href="" routerLink="/datatable" (click)="hideDrawer()">DataTable
Demo</a>
<a class="mdl-navigation__link" href="" routerLink="/uploader" (click)="hideDrawer()">Uploader Demo</a>
<a class="mdl-navigation__link" href="" routerLink="/login" (click)="hideDrawer()">Login Demo</a>
<a class="mdl-navigation__link" href="" routerLink="/activiti" (click)="hideDrawer()">Activiti
Components Demo</a>
<a class="mdl-navigation__link" href="" routerLink="/webscript" (click)="hideDrawer()">Webscript</a>
<a class="mdl-navigation__link" href="" routerLink="/tag" (click)="hideDrawer()">Tag</a>
<a class="mdl-navigation__link" href="" routerLink="/settings" (click)="hideDrawer()">Settings</a>
<!-- Navigation. We hide it in small screens. -->
<nav class="mdl-navigation mdl-layout--large-screen-only">
<a class="mdl-navigation__link" data-automation-id="home" href="" routerLink="/">Home</a>
<a class="mdl-navigation__link" data-automation-id="files" href="" routerLink="/files">DocumentList</a>
<a class="mdl-navigation__link" data-automation-id="activiti" href="" routerLink="/activiti">Process Services</a>
<a class="mdl-navigation__link" data-automation-id="login" href="" routerLink="/login">Login</a>
<a class="mdl-navigation__link" data-automation-id="settings" href="" routerLink="/settings">Settings</a>
</nav>
</div>
</header>
<div class="mdl-layout__drawer">
<nav class="mdl-navigation">
<a class="mdl-navigation__link" (click)="onLogout($event)">
<label tabindex="0">Logout</label>
</a>
</nav>
<span class="mdl-layout-title">Languages</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" (click)="changeLanguage('en')">
<span class="flag-icon flag-icon-gb"></span>
<label tabindex="0"> English</label>
</a>
<a class="mdl-navigation__link" (click)="changeLanguage('it')">
<span class="flag-icon flag-icon-it"></span>
<label tabindex="0"> Italian</label>
</a>
<a class="mdl-navigation__link" (click)="changeLanguage('ru')">
<span class="flag-icon flag-icon-ru"></span>
<label tabindex="0"> Russian</label>
</a>
</nav>
<span class="mdl-layout-title">Components</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="" routerLink="/" (click)="hideDrawer()">Home</a>
<a class="mdl-navigation__link" href="" routerLink="/files" (click)="hideDrawer()">DocumentList</a>
<a class="mdl-navigation__link" href="" routerLink="/datatable" (click)="hideDrawer()">DataTable</a>
<a class="mdl-navigation__link" href="" routerLink="/uploader" (click)="hideDrawer()">Uploader</a>
<a class="mdl-navigation__link" href="" routerLink="/login" (click)="hideDrawer()">Login</a>
<a class="mdl-navigation__link" href="" routerLink="/activiti" (click)="hideDrawer()">Process Services</a>
<a class="mdl-navigation__link" href="" routerLink="/webscript" (click)="hideDrawer()">Webscript</a>
<a class="mdl-navigation__link" href="" routerLink="/tag" (click)="hideDrawer()">Tag</a>
<a class="mdl-navigation__link" href="" routerLink="/about" (click)="hideDrawer()">About</a>
<a class="mdl-navigation__link" href="" routerLink="/settings" (click)="hideDrawer()">Settings</a>
</nav>
</div>
<main class="mdl-layout__content">
<div class="page-content">
+37 -45
View File
@@ -17,19 +17,14 @@
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import {
AlfrescoTranslationService,
AlfrescoAuthenticationService,
AlfrescoSettingsService
} from 'ng2-alfresco-core';
import { AlfrescoTranslationService, AlfrescoAuthenticationService, AlfrescoSettingsService, StorageService, LogService } from 'ng2-alfresco-core';
declare var document: any;
@Component({
selector: 'alfresco-app',
templateUrl: 'app/app.component.html',
styleUrls: ['app/app.component.css']
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
searchTerm: string = '';
@@ -37,52 +32,48 @@ export class AppComponent {
ecmHost: string = 'http://' + window.location.hostname + ':8080';
bpmHost: string = 'http://' + window.location.hostname + ':9999';
constructor(public auth: AlfrescoAuthenticationService,
public router: Router,
public alfrescoSettingsService: AlfrescoSettingsService,
private translate: AlfrescoTranslationService) {
constructor(private authService: AlfrescoAuthenticationService,
private router: Router,
private settingsService: AlfrescoSettingsService,
private translateService: AlfrescoTranslationService,
private storage: StorageService,
private logService: LogService) {
this.setEcmHost();
this.setBpmHost();
this.setProvider();
if (translate) {
translate.addTranslationFolder('custom', 'custom-translation/');
translate.addTranslationFolder('ng2-alfresco-login', 'custom-translation/alfresco-login');
if (translateService) {
translateService.addTranslationFolder('app', 'resources');
}
}
isLoggedIn(): boolean {
this.redirectToLoginPageIfNotLoggedIn();
return this.auth.isLoggedIn();
}
redirectToLoginPageIfNotLoggedIn(): void {
if (!this.isLoginPage() && !this.auth.isLoggedIn()) {
this.router.navigate(['/login']);
}
}
isLoginPage(): boolean {
return location.pathname === '/login' || location.pathname === '/' || location.pathname === '/settings';
isAPageWithHeaderBar(): boolean {
return location.pathname === '/login' || location.pathname === '/settings';
}
onLogout(event) {
event.preventDefault();
this.auth.logout()
this.authService.logout()
.subscribe(
() => {
this.router.navigate(['/login']);
this.navigateToLogin();
},
($event: any) => {
if ($event && $event.response && $event.response.status === 401) {
this.router.navigate(['/login']);
(error: any) => {
if (error && error.response && error.response.status === 401) {
this.navigateToLogin();
} else {
console.error('An unknown error occurred while logging out', $event);
this.logService.error('An unknown error occurred while logging out', error);
this.navigateToLogin();
}
}
);
}
navigateToLogin() {
this.router.navigate(['/login']);
this.hideDrawer();
}
onToggleSearch(event) {
let expandedHeaderClass = 'header-search-expanded',
header = document.querySelector('header');
@@ -94,7 +85,8 @@ export class AppComponent {
}
changeLanguage(lang: string) {
this.translate.use(lang);
this.translateService.use(lang);
this.hideDrawer();
}
hideDrawer() {
@@ -103,26 +95,26 @@ export class AppComponent {
}
private setEcmHost() {
if (localStorage.getItem(`ecmHost`)) {
this.alfrescoSettingsService.ecmHost = localStorage.getItem(`ecmHost`);
this.ecmHost = localStorage.getItem(`ecmHost`);
if (this.storage.hasItem(`ecmHost`)) {
this.settingsService.ecmHost = this.storage.getItem(`ecmHost`);
this.ecmHost = this.storage.getItem(`ecmHost`);
} else {
this.alfrescoSettingsService.ecmHost = this.ecmHost;
this.settingsService.ecmHost = this.ecmHost;
}
}
private setBpmHost() {
if (localStorage.getItem(`bpmHost`)) {
this.alfrescoSettingsService.bpmHost = localStorage.getItem(`bpmHost`);
this.bpmHost = localStorage.getItem(`bpmHost`);
if (this.storage.hasItem(`bpmHost`)) {
this.settingsService.bpmHost = this.storage.getItem(`bpmHost`);
this.bpmHost = this.storage.getItem(`bpmHost`);
} else {
this.alfrescoSettingsService.bpmHost = this.bpmHost;
this.settingsService.bpmHost = this.bpmHost;
}
}
private setProvider() {
if (localStorage.getItem(`providers`)) {
this.alfrescoSettingsService.setProviders(localStorage.getItem(`providers`));
if (this.storage.hasItem(`providers`)) {
this.settingsService.setProviders(this.storage.getItem(`providers`));
}
}
}
+14 -7
View File
@@ -32,17 +32,21 @@ import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
import { UserInfoComponentModule } from 'ng2-alfresco-userinfo';
import { AnalyticsModule } from 'ng2-activiti-analytics';
import { AppComponent } from './app.component';
import { routing } from './app.routes';
import { CustomEditorsModule } from './components/activiti/custom-editor/custom-editor.component';
import { Editor3DModule } from 'ng2-3d-editor';
import { MaterialModule } from '@angular/material';
import { ChartsModule } from 'ng2-charts';
import {
HomeComponent,
DataTableDemoComponent,
SearchComponent,
SearchBarComponent,
LoginDemoComponent,
ActivitiDemoComponent,
ActivitiAppsView,
FormViewer,
WebscriptComponent,
TagComponent,
@@ -56,30 +60,34 @@ import {
imports: [
BrowserModule,
routing,
MaterialModule.forRoot(),
CoreModule.forRoot(),
LoginModule,
LoginModule.forRoot(),
SearchModule.forRoot(),
DataTableModule,
DataTableModule.forRoot(),
DocumentListModule.forRoot(),
UploadModule.forRoot(),
TagModule.forRoot(),
WebScriptModule,
WebScriptModule.forRoot(),
ViewerModule.forRoot(),
ActivitiFormModule.forRoot(),
ActivitiTaskListModule.forRoot(),
ActivitiProcessListModule.forRoot(),
UserInfoComponentModule.forRoot(),
AnalyticsModule.forRoot(),
CustomEditorsModule
CustomEditorsModule,
Editor3DModule.forRoot(),
ChartsModule
],
declarations: [
AppComponent,
SearchBarComponent,
HomeComponent,
DataTableDemoComponent,
SearchComponent,
SearchBarComponent,
LoginDemoComponent,
ActivitiDemoComponent,
ActivitiAppsView,
FormViewer,
WebscriptComponent,
TagComponent,
@@ -92,4 +100,3 @@ import {
bootstrap: [ AppComponent ]
})
export class AppModule { }
+81 -12
View File
@@ -17,13 +17,16 @@
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AuthGuard, AuthGuardEcm, AuthGuardBpm } from 'ng2-alfresco-core';
import {
HomeComponent,
FilesComponent,
DataTableDemoComponent,
SearchComponent,
LoginDemoComponent,
ActivitiDemoComponent,
ActivitiAppsView,
WebscriptComponent,
TagComponent,
AboutComponent,
@@ -35,19 +38,85 @@ import {
import { UploadButtonComponent } from 'ng2-alfresco-upload';
export const appRoutes: Routes = [
{ path: 'home', component: FilesComponent },
{ path: 'files', component: FilesComponent },
{ path: 'datatable', component: DataTableDemoComponent },
{ path: '', component: LoginDemoComponent },
{ path: 'uploader', component: UploadButtonComponent },
{ path: 'login', component: LoginDemoComponent },
{ path: 'search', component: SearchComponent },
{ path: 'activiti', component: ActivitiDemoComponent },
{ path: 'activiti/appId/:appId', component: ActivitiDemoComponent },
{ path: 'activiti/tasks/:id', component: FormViewer },
{ path: 'activiti/tasksnode/:id', component: FormNodeViewer },
{ path: 'webscript', component: WebscriptComponent },
{ path: 'tag', component: TagComponent },
{
path: '',
component: HomeComponent,
canActivate: [AuthGuard]
},
{
path: 'home',
component: HomeComponent,
canActivate: [AuthGuard]
},
{
path: 'files',
component: FilesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'files/:id',
component: FilesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'datatable',
component: DataTableDemoComponent,
canActivate: [AuthGuard]
},
{
path: 'uploader',
component: UploadButtonComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'search',
component: SearchComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'activiti',
component: ActivitiAppsView,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps',
component: ActivitiAppsView,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps/:appId/tasks',
component: ActivitiDemoComponent,
canActivate: [AuthGuardBpm]
},
// TODO: check if neeeded
{
path: 'activiti/appId/:appId',
component: ActivitiDemoComponent,
canActivate: [AuthGuardBpm]
},
// TODO: check if needed
{
path: 'activiti/tasks/:id',
component: FormViewer,
canActivate: [AuthGuardBpm]
},
// TODO: check if needed
{
path: 'activiti/tasksnode/:id',
component: FormNodeViewer,
canActivate: [AuthGuardBpm]
},
{
path: 'webscript',
component: WebscriptComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'tag',
component: TagComponent,
canActivate: [AuthGuardEcm]
},
{ path: 'about', component: AboutComponent },
{ path: 'settings', component: SettingComponent }
];
@@ -0,0 +1,3 @@
.about-container {
padding: 10px;
}
@@ -1,4 +1,4 @@
<div style="padding: 10px">
<div class="about-container">
<h3>Packages</h3>
<alfresco-datatable [data]="data"></alfresco-datatable>
</div>
@@ -18,31 +18,42 @@
import { Component, OnInit } from '@angular/core';
import { Http } from '@angular/http';
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
declare let __moduleName: string;
import { LogService } from 'ng2-alfresco-core';
@Component({
moduleId: __moduleName,
selector: 'about-page',
templateUrl: './about.component.html'
templateUrl: './about.component.html',
styleUrls: ['./about.component.css']
})
export class AboutComponent implements OnInit {
data: ObjectDataTableAdapter;
constructor(private http: Http) {}
constructor(private http: Http,
private logService: LogService) {
}
ngOnInit() {
// this.data = new ObjectDataTableAdapter();
this.http.get('/versions').subscribe(response => {
let data = response.json() || {};
let packages = data.packages || [];
this.http.get('/versions.json').subscribe(response => {
let regexp = new RegExp('^(ng2-activiti|ng2-alfresco|alfresco-)', 'g');
this.data = new ObjectDataTableAdapter(packages, [
{ type: 'text', key: 'name', title: 'Name', sortable: true },
{ type: 'text', key: 'version', title: 'Version', sortable: true }
let alfrescoPackages = Object.keys(response.json().dependencies).filter((val) => {
this.logService.log(val);
return regexp.test(val);
});
let alfrescoPackagesTableRappresentation = [];
alfrescoPackages.forEach((val) => {
this.logService.log(response.json().dependencies[val]);
alfrescoPackagesTableRappresentation.push({name: val, version: response.json().dependencies[val].version});
});
this.logService.log(alfrescoPackagesTableRappresentation);
this.data = new ObjectDataTableAdapter(alfrescoPackagesTableRappresentation, [
{type: 'text', key: 'name', title: 'Name', sortable: true},
{type: 'text', key: 'version', title: 'Version', sortable: true}
]);
});
}
}
@@ -10,9 +10,17 @@
.task-column {
background-color: #f5f5f5;
padding: 10px 10px 10px 10px;
border: solid 2px rgb(31,188,210);
}
.list-column {
width: 320px;
}
.mdl-layout__header {
z-index: 1;
}
.list-buttons {
text-align: right;
margin-bottom: 5px;
}
@@ -4,52 +4,65 @@
<!-- TABS -->
<div class="mdl-layout__tab-bar mdl-js-ripple-effect" #tabheader>
<a id="apps-header" href="#apps" class="mdl-layout__tab is-active">APPS</a>
<a id="tasks-header" href="#tasks" class="mdl-layout__tab">TASK LIST</a>
<a id="processes-header" href="#processes" class="mdl-layout__tab">PROCESS LIST</a>
<a id="report-header" href="#report" class="mdl-layout__tab">ANALYTICS</a>
<div class="mdl-layout__tab-bar mdl-js-ripple-effect">
<a id="tasks-header" href="#tasks" class="mdl-layout__tab" [class.is-active]="activeTab === 'tasks'" (click)="activeTab = 'tasks'">TASKS</a>
<a id="processes-header" href="#processes" class="mdl-layout__tab" [class.is-active]="activeTab === 'processes'" (click)="activeTab = 'processes'">PROCESSES</a>
<a id="report-header" href="#report" class="mdl-layout__tab" [class.is-active]="activeTab === 'reports'" (click)="activeTab = 'reports'">REPORTS</a>
</div>
</header>
<main class="mdl-layout__content activiti" #tabmain>
<!-- APPPS COMPONENT -->
<section class="mdl-layout__tab-panel is-active" id="apps">
<div class="page-content">
<activiti-apps [layoutType]="layoutType" (appClick)="onAppClick($event)" #activitiapps></activiti-apps>
</div>
</section>
<main class="mdl-layout__content activiti">
<!-- TASKS COMPONENT -->
<section class="mdl-layout__tab-panel" id="tasks">
<section class="mdl-layout__tab-panel" [class.is-active]="activeTab === 'tasks'" id="tasks">
<div class="page-content">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--2-col task-column mdl-shadow--2dp">
<span>Task Filters</span>
<activiti-start-task [appId]="appId" (onSuccess)="onStartTaskSuccess($event)"></activiti-start-task>
<activiti-filters [appId]="appId" (filterClick)="onTaskFilterClick($event)" (onSuccess)="onSuccessTaskFilterList($event)"
#activitifilter></activiti-filters>
<activiti-filters
[appId]="appId"
(filterClick)="onTaskFilterClick($event)"
(onSuccess)="onSuccessTaskFilterList($event)"
#activitifilter>
</activiti-filters>
</div>
<div class="mdl-cell mdl-cell--3-col task-column mdl-shadow--2dp">
<span>Task List</span>
<activiti-tasklist *ngIf="taskFilter?.hasFilter()" [appId]="taskFilter.appId"
[processDefinitionKey]="taskFilter.filter.processDefinitionKey"
[name]="taskFilter.filter.name"
[assignment]="taskFilter.filter.assignment"
[state]="taskFilter.filter.state"
[sort]="taskFilter.filter.sort"
[data]="dataTasks"
(rowClick)="onTaskRowClick($event)" (onSuccess)="onSuccessTaskList($event)"
#activititasklist></activiti-tasklist>
<div class="mdl-cell mdl-cell--3-col task-column mdl-shadow--2dp list-column">
<div class="list-buttons">
<activiti-start-task
[appId]="appId"
(onSuccess)="onStartTaskSuccess($event)">
</activiti-start-task>
</div>
<activiti-tasklist
[appId]="taskFilter?.appId"
[processDefinitionKey]="taskFilter?.filter?.processDefinitionKey"
[name]="taskFilter?.filter?.name"
[assignment]="taskFilter?.filter?.assignment"
[state]="taskFilter?.filter?.state"
[sort]="taskFilter?.filter?.sort"
[data]="dataTasks"
[landingTaskId]="currentTaskId"
(rowClick)="onTaskRowClick($event)"
(onSuccess)="onSuccessTaskList($event)"
(row-click)="onRowClick($event)"
(row-dblclick)="onRowDblClick($event)"
#activititasklist>
<!-- Custom column definition demo -->
<!--
<data-columns>
<data-column key="name" title="NAME" class="full-width name-column"></data-column>
<data-column key="created" title="Created" class="hidden"></data-column>
</data-columns>
-->
</activiti-tasklist>
</div>
<div class="mdl-cell mdl-cell--7-col task-column mdl-shadow--2dp">
<span>Task Details</span>
<activiti-task-details [taskId]="currentTaskId" (formCompleted)="onFormCompleted($event)"
#activitidetails></activiti-task-details>
<activiti-task-details #activitidetails
[taskId]="currentTaskId"
(formCompleted)="onFormCompleted($event)"
(formContentClicked)="onFormContentClick($event)"
(taskCreated)="onTaskCreated($event)">
</activiti-task-details>
</div>
</div>
</div>
@@ -58,34 +71,55 @@
<!-- PROCESS COMPONENT -->
<section class="mdl-layout__tab-panel" id="processes">
<div class="page-content">
<section class="mdl-layout__tab-panel" [class.is-active]="activeTab === 'processes'" id="processes">
<div class="page-content" *ngIf="activeTab === 'processes'">
<div class="page-content">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--2-col task-column">
<span>Process Filters</span>
<button type="button" (click)="navigateStartProcess()" class="mdl-button" data-automation-id="btn-start-process">Start Process</button>
<activiti-process-instance-filters [appId]="appId"
(filterClick)="onProcessFilterClick($event)" (onSuccess)="onSuccessProcessFilterList($event)"
#activitiprocessfilter></activiti-process-instance-filters>
<div class="mdl-cell mdl-cell--2-col task-column mdl-shadow--2dp">
<activiti-process-instance-filters
[appId]="appId"
(filterClick)="onProcessFilterClick($event)"
(onSuccess)="onSuccessProcessFilterList($event)">
</activiti-process-instance-filters>
</div>
<div class="mdl-cell mdl-cell--3-col task-column">
<span>Process List</span>
<activiti-process-instance-list *ngIf="processFilter?.hasFilter()" [appId]="processFilter.appId"
[processDefinitionKey]="processFilter.filter.processDefinitionKey"
[name]="processFilter.filter.name"
[state]="processFilter.filter.state"
[sort]="processFilter.filter.sort"
[data]="dataProcesses"
(rowClick)="onProcessRowClick($event)" (onSuccess)="onSuccessProcessList($event)"
#activitiprocesslist></activiti-process-instance-list>
<div class="mdl-cell mdl-cell--3-col task-column list-column mdl-shadow--2dp" *ngIf="processFilter && !isStartProcessMode()">
<div class="list-buttons">
<button
md-raised-button
data-automation-id="btn-start-process"
(click)="navigateStartProcess()">
<md-icon>add</md-icon>
<span>START PROCESS</span>
</button>
</div>
<activiti-process-instance-list
*ngIf="processFilter?.hasFilter()" [appId]="processFilter.appId"
[processDefinitionKey]="processFilter.filter.processDefinitionKey"
[name]="processFilter.filter.name"
[state]="processFilter.filter.state"
[sort]="processFilter.filter.sort"
[data]="dataProcesses"
(rowClick)="onProcessRowClick($event)"
(onSuccess)="onSuccessProcessList($event)">
<!-- Custom column definition demo -->
<!--
<data-columns>
<data-column key="name" title="NAME" class="full-width name-column"></data-column>
<data-column key="created" title="Created" class="hidden"></data-column>
</data-columns>
-->
</activiti-process-instance-list>
</div>
<div class="mdl-cell mdl-cell--7-col task-column" *ngIf="!isStartProcessMode()">
<span>Process Details</span>
<activiti-process-instance-details [processInstanceId]="currentProcessInstanceId" (activitiprocesslist)="taskFormCompleted()" (processCancelled)="processCancelled()" #activitiprocessdetails></activiti-process-instance-details>
<div class="mdl-cell task-column mdl-shadow--2dp" *ngIf="!isStartProcessMode()"
[class.mdl-cell--7-col]="processFilter && !isStartProcessMode()"
[class.mdl-cell--10-col]="!processFilter || isStartProcessMode()">
<activiti-process-instance-details
[processInstanceId]="currentProcessInstanceId"
(processCancelled)="processCancelled()"
(taskClick)="onProcessDetailsTaskClick($event)">
</activiti-process-instance-details>
</div>
<div class="mdl-cell mdl-cell--7-col task-column" *ngIf="isStartProcessMode()">
<span>Start Process</span>
<div class="mdl-cell mdl-cell--10-col task-column mdl-shadow--2dp" *ngIf="isStartProcessMode()">
<activiti-start-process [appId]="appId" (start)="onStartProcessInstance($event)"></activiti-start-process>
</div>
</div>
@@ -96,14 +130,28 @@
<!-- ANALYTICS COMPONENT -->
<section class="mdl-layout__tab-panel" id="report">
<div class="page-content">
<section class="mdl-layout__tab-panel" [class.is-active]="activeTab === 'reports'" id="report">
<div class="page-content" *ngIf="activeTab === 'reports'">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col task-column mdl-shadow--2dp">
<analytics-report-list (reportClick)="onReportClick($event)"></analytics-report-list>
<span><h5>Report List</h5></span>
<hr>
<analytics-report-list
[appId]="appId"
(reportClick)="onReportClick($event)"
#analyticsreportlist>
</analytics-report-list>
</div>
<div class="mdl-cell mdl-cell--8-col task-column mdl-shadow--2dp">
<activiti-analytics [appId]="appId" *ngIf="report" [reportId]="report.id"></activiti-analytics>
<activiti-analytics
*ngIf="report"
[appId]="appId"
[reportId]="report.id"
[hideParameters]="false"
(editReport)="onEditReport($event)"
(reportSaved)="onReportSaved()"
(reportDeleted)="onReportDeleted()">
</activiti-analytics>
</div>
</div>
</div>
@@ -111,3 +159,12 @@
</main>
</div>
<div *ngIf="fileShowed">
<alfresco-viewer
[(showViewer)]="fileShowed"
[blobFile]="content"
[displayName]="contentName"
[overlayMode]="true">
</alfresco-viewer>
</div>
@@ -15,73 +15,73 @@
* limitations under the License.
*/
import { Component, AfterViewChecked, ViewChild, Input } from '@angular/core';
import { AfterViewInit, Component, ElementRef, Input, ViewChild } from '@angular/core';
import {
AppDefinitionRepresentationModel,
FilterRepresentationModel,
ActivitiApps,
ActivitiTaskList
ActivitiFilters,
ActivitiTaskList,
FilterRepresentationModel,
TaskDetailsEvent
} from 'ng2-activiti-tasklist';
import {
ActivitiProcessFilters,
ActivitiProcessInstanceDetails,
ActivitiProcessInstanceListComponent,
ActivitiStartProcessInstance,
FilterProcessRepresentationModel,
ProcessInstance
} from 'ng2-activiti-processlist';
import { AnalyticsReportListComponent } from 'ng2-activiti-analytics';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs/Rx';
import {
ObjectDataTableAdapter,
ObjectDataRow,
DataSorting
} from 'ng2-alfresco-datatable';
import { FormRenderingService } from 'ng2-activiti-form';
import { AlfrescoApiService } from 'ng2-alfresco-core';
import { FormService, FormRenderingService, FormEvent, FormFieldEvent } from 'ng2-activiti-form';
import { /*CustomEditorComponent*/ CustomStencil01 } from './custom-editor/custom-editor.component';
declare let __moduleName: string;
declare var componentHandler;
const currentProcessIdNew = '__NEW__';
@Component({
moduleId: __moduleName,
selector: 'activiti-demo',
templateUrl: './activiti-demo.component.html',
styleUrls: ['./activiti-demo.component.css']
})
export class ActivitiDemoComponent implements AfterViewChecked {
export class ActivitiDemoComponent implements AfterViewInit {
@ViewChild('activitiapps')
activitiapps: ActivitiApps;
@ViewChild('activitifilter')
activitifilter: any;
@ViewChild('activitidetails')
activitidetails: any;
@ViewChild(ActivitiFilters)
activitifilter: ActivitiFilters;
@ViewChild(ActivitiTaskList)
activititasklist: ActivitiTaskList;
taskList: ActivitiTaskList;
@ViewChild('activitiprocessfilter')
activitiprocessfilter: any;
@ViewChild(ActivitiProcessFilters)
activitiprocessfilter: ActivitiProcessFilters;
@ViewChild(ActivitiProcessInstanceListComponent)
activitiprocesslist: ActivitiProcessInstanceListComponent;
processList: ActivitiProcessInstanceListComponent;
@ViewChild('activitiprocessdetails')
activitiprocessdetails: any;
@ViewChild(ActivitiProcessInstanceDetails)
activitiprocessdetails: ActivitiProcessInstanceDetails;
@ViewChild(ActivitiStartProcessInstance)
activitiStartProcess: ActivitiStartProcessInstance;
@ViewChild('tabmain')
tabMain: any;
@ViewChild('tabheader')
tabHeader: any;
@ViewChild(AnalyticsReportListComponent)
analyticsreportlist: AnalyticsReportListComponent;
@Input()
appId: number;
appId: number = null;
fileShowed: boolean = false;
content: Blob;
contentName: string;
layoutType: string;
currentTaskId: string;
@@ -90,43 +90,63 @@ export class ActivitiDemoComponent implements AfterViewChecked {
taskSchemaColumns: any [] = [];
processSchemaColumns: any [] = [];
activeTab: string = 'tasks'; // tasks|processes|reports
taskFilter: FilterRepresentationModel;
report: any;
processFilter: FilterRepresentationModel;
processFilter: FilterProcessRepresentationModel;
sub: Subscription;
blobFile: any;
flag: boolean = true;
dataTasks: ObjectDataTableAdapter;
dataProcesses: ObjectDataTableAdapter;
constructor(private route: ActivatedRoute, private formRenderingService: FormRenderingService) {
this.dataTasks = new ObjectDataTableAdapter(
[],
[
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
{type: 'text', key: 'created', title: 'Created', cssClass: 'hidden', sortable: true}
]
);
constructor(private elementRef: ElementRef,
private route: ActivatedRoute,
private apiService: AlfrescoApiService,
private formRenderingService: FormRenderingService,
private formService: FormService) {
this.dataTasks = new ObjectDataTableAdapter();
this.dataTasks.setSorting(new DataSorting('created', 'desc'));
this.dataProcesses = new ObjectDataTableAdapter(
[],
[
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column'},
{type: 'text', key: 'started', title: 'Started', cssClass: 'hidden'}
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
{type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true}
]
);
this.dataProcesses.setSorting(new DataSorting('started', 'desc'));
// Uncomment this line to replace all 'text' field editors with custom component
// formRenderingService.setComponentTypeResolver('text', () => CustomEditorComponent, true);
// Uncomment this line to map 'custom_stencil_01' to local editor component
formRenderingService.setComponentTypeResolver('custom_stencil_01', () => CustomStencil01, true);
formService.formLoaded.subscribe((e: FormEvent) => {
console.log(`Form loaded: ${e.form.id}`);
});
formService.formFieldValueChanged.subscribe((e: FormFieldEvent) => {
console.log(`Field value changed. Form: ${e.form.id}, Field: ${e.field.id}, Value: ${e.field.value}`);
});
}
ngOnInit() {
this.sub = this.route.params.subscribe(params => {
this.appId = params['appId'];
let applicationId = params['appId'];
if (applicationId && applicationId !== '0') {
this.appId = params['appId'];
}
this.taskFilter = null;
this.currentTaskId = null;
this.processFilter = null;
this.currentProcessInstanceId = null;
});
this.layoutType = ActivitiApps.LAYOUT_GRID;
}
@@ -135,27 +155,8 @@ export class ActivitiDemoComponent implements AfterViewChecked {
this.sub.unsubscribe();
}
onAppClick(app: AppDefinitionRepresentationModel) {
this.appId = app.id;
this.taskFilter = null;
this.currentTaskId = null;
this.processFilter = null;
this.currentProcessInstanceId = null;
this.changeTab('apps', 'tasks');
}
changeTab(origin: string, destination: string) {
this.tabMain.nativeElement.children[origin].classList.remove('is-active');
this.tabMain.nativeElement.children[destination].classList.add('is-active');
this.tabHeader.nativeElement.children[`${origin}-header`].classList.remove('is-active');
this.tabHeader.nativeElement.children[`${destination}-header`].classList.add('is-active');
}
onTaskFilterClick(event: FilterRepresentationModel) {
this.taskFilter = event;
onTaskFilterClick(filter: FilterRepresentationModel) {
this.applyTaskFilter(filter);
}
onReportClick(event: any) {
@@ -163,27 +164,36 @@ export class ActivitiDemoComponent implements AfterViewChecked {
}
onSuccessTaskFilterList(event: any) {
this.taskFilter = this.activitifilter.getCurrentFilter();
this.applyTaskFilter(this.activitifilter.getCurrentFilter());
}
applyTaskFilter(filter: FilterRepresentationModel) {
this.taskFilter = filter;
if (filter && this.taskList) {
this.taskList.hasCustomDataSource = false;
}
}
onStartTaskSuccess(event: any) {
this.activititasklist.reload();
this.activitifilter.selectFilterWithTask(event.id);
this.currentTaskId = event.id;
}
onSuccessTaskList(event: FilterRepresentationModel) {
this.currentTaskId = this.activititasklist.getCurrentId();
this.currentTaskId = this.taskList.getCurrentId();
}
onProcessFilterClick(event: FilterRepresentationModel) {
onProcessFilterClick(event: FilterProcessRepresentationModel) {
this.currentProcessInstanceId = null;
this.processFilter = event;
}
onSuccessProcessFilterList(event: any) {
onSuccessProcessFilterList() {
this.processFilter = this.activitiprocessfilter.getCurrentFilter();
}
onSuccessProcessList(event: any) {
this.currentProcessInstanceId = this.activitiprocesslist.getCurrentId();
this.currentProcessInstanceId = this.processList.getCurrentId();
}
onTaskRowClick(taskId) {
@@ -194,13 +204,35 @@ export class ActivitiDemoComponent implements AfterViewChecked {
this.currentProcessInstanceId = processInstanceId;
}
onEditReport(name: string) {
this.analyticsreportlist.reload();
}
onReportSaved() {
this.analyticsreportlist.reload();
}
onReportDeleted() {
this.analyticsreportlist.reload();
this.selectFirstElementInReportList();
}
selectFirstElementInReportList() {
if (!this.analyticsreportlist.isReportsEmpty()) {
this.analyticsreportlist.selectReport(this.analyticsreportlist.reports[0]);
}
}
navigateStartProcess() {
this.resetProcessFilters();
this.reloadProcessFilters();
this.currentProcessInstanceId = currentProcessIdNew;
}
onStartProcessInstance(instance: ProcessInstance) {
this.currentProcessInstanceId = instance.id;
this.activitiStartProcess.reset();
this.resetProcessFilters();
}
isStartProcessMode() {
@@ -209,27 +241,79 @@ export class ActivitiDemoComponent implements AfterViewChecked {
processCancelled(data: any) {
this.currentProcessInstanceId = null;
this.activitiprocesslist.reload();
this.processList.reload();
}
onSuccessNewProcess(data: any) {
this.activitiprocesslist.reload();
}
taskFormCompleted(data: any) {
this.activitiprocesslist.reload();
this.processList.reload();
}
onFormCompleted(form) {
this.activititasklist.reload();
this.taskList.reload();
this.currentTaskId = null;
}
ngAfterViewChecked() {
onFormContentClick(content: any) {
this.fileShowed = true;
this.content = content.contentBlob;
this.contentName = content.name;
}
onTaskCreated(data: any) {
this.currentTaskId = data.parentTaskId;
this.taskList.reload();
}
ngAfterViewInit() {
// workaround for MDL issues with dynamic components
if (componentHandler) {
componentHandler.upgradeAllRegistered();
}
this.loadStencilScriptsInPageFromActiviti();
}
loadStencilScriptsInPageFromActiviti() {
this.apiService.getInstance().activiti.scriptFileApi.getControllers().then(response => {
if (response) {
let s = document.createElement('script');
s.type = 'text/javascript';
s.text = response;
this.elementRef.nativeElement.appendChild(s);
}
});
}
onProcessDetailsTaskClick(event: TaskDetailsEvent) {
event.preventDefault();
this.activeTab = 'tasks';
const taskId = event.value.id;
const processTaskDataRow = new ObjectDataRow({
id: taskId,
name: event.value.name || 'No name',
created: event.value.created
});
this.activitifilter.selectFilter(null);
this.taskList.setCustomDataSource([processTaskDataRow]);
this.taskList.selectTask(taskId);
this.currentTaskId = taskId;
}
private resetProcessFilters() {
this.processFilter = null;
}
private reloadProcessFilters() {
this.activitiprocessfilter.selectFilter(null);
}
onRowClick(event) {
console.log(event);
}
onRowDblClick(event) {
console.log(event);
}
}
@@ -0,0 +1,37 @@
/*!
* @license
* Copyright 2016 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 { Component } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { AppDefinitionRepresentationModel } from 'ng2-activiti-tasklist';
@Component({
selector: 'activiti-apps-view',
template: `
<activiti-apps (appClick)="onAppClicked($event)"></activiti-apps>
`
})
export class ActivitiAppsView {
constructor(private router: Router, private route: ActivatedRoute) {
}
onAppClicked(app: AppDefinitionRepresentationModel) {
this.router.navigate(['/activiti/apps', app.id || 0, 'tasks']);
}
}
@@ -1,3 +1,20 @@
/*!
* @license
* Copyright 2016 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 { NgModule, Component } from '@angular/core';
import { WidgetComponent } from 'ng2-activiti-form';
@@ -19,11 +19,9 @@ import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs/Rx';
declare let __moduleName: string;
declare var componentHandler;
@Component({
moduleId: __moduleName,
selector: 'form-node-viewer',
templateUrl: './form-node-viewer.component.html',
styleUrls: ['./form-node-viewer.component.css']
@@ -19,11 +19,9 @@ import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs/Rx';
declare let __moduleName: string;
declare var componentHandler;
@Component({
moduleId: __moduleName,
selector: 'form-viewer',
templateUrl: './form-viewer.component.html',
styleUrls: ['./form-viewer.component.css']
@@ -1,31 +1,30 @@
<div class="p-10">
<alfresco-datatable [data]="data" [multiselect]="multiselect"></alfresco-datatable>
<alfresco-datatable
[data]="data"
[multiselect]="multiselect"
[actions]="true"
(showRowActionsMenu)="onShowRowActionsMenu($event)"
(executeRowAction)="onExecuteRowAction($event)"
(row-click)="onRowClick($event)"
(row-dblclick)="onRowDblClick($event)">
<!-- HTML column definition demo -->
<!--
<data-columns>
<data-column type="image" key="icon" [sortable]="false"></data-column>
<data-column key="id" title="Id"></data-column>
<data-column key="createdOn" title="Created"></data-column>
<data-column key="name" title="Name" class="full-width name-column"></data-column>
<data-column key="createdBy.name" title="Created By"></data-column>
</data-columns>
-->
</alfresco-datatable>
</div>
<div class="p-10">
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-1">
<input type="checkbox" id="checkbox-1" class="mdl-checkbox__input" [(ngModel)]="multiselect">
<span class="mdl-checkbox__label">Multiselect</span>
</label>
<md-checkbox [(ngModel)]="multiselect">Multiselect</md-checkbox>
</div>
<div class="p-10">
<button
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored"
(click)="reset()">
Reset to default
</button>
<button
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored"
(click)="addRow()">
Add row
</button>
<button
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored"
(click)="replaceRows()">
Replace rows
</button>
<button
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--colored"
(click)="replaceColumns()">
Replace columns
</button>
<button md-raised-button (click)="reset()">Reset to default</button>
<button md-raised-button (click)="addRow()">Add row</button>
<button md-raised-button (click)="replaceRows()">Replace rows</button>
<button md-raised-button (click)="replaceColumns()">Replace columns</button>
</div>
@@ -16,17 +16,9 @@
*/
import { Component } from '@angular/core';
import {
ObjectDataTableAdapter,
DataSorting,
ObjectDataRow,
ObjectDataColumn
} from 'ng2-alfresco-datatable';
declare let __moduleName: string;
import { ObjectDataTableAdapter, DataSorting, ObjectDataRow, ObjectDataColumn, DataCellEvent, DataRowActionEvent } from 'ng2-alfresco-datatable';
@Component({
moduleId: __moduleName,
selector: 'datatable-demo',
templateUrl: './datatable-demo.component.html'
})
@@ -145,4 +137,29 @@ export class DataTableDemoComponent {
let columns = schema.map(col => new ObjectDataColumn(col));
this.data.setColumns(columns);
}
onShowRowActionsMenu(event: DataCellEvent) {
let myAction = {
title: 'Hello'
// you custom metadata needed for onExecuteRowAction
};
event.value.actions = [
myAction
];
}
onExecuteRowAction(event: DataRowActionEvent) {
let args = event.value;
console.log(args.row);
console.log(args.action);
window.alert(`My custom action: ${args.action.title}`);
}
onRowClick(event) {
console.log(event);
}
onRowDblClick(event) {
console.log(event);
}
}
@@ -7,3 +7,16 @@
margin: 0;
}
}
.error-message {
text-align: left;
}
.error-message--text {
color: #d50000;
}
.options-container {
width: 250px;
margin: 20px;
}
@@ -1,196 +1,183 @@
<div *ngIf="!fileShowed">
<div class="container">
<alfresco-upload-drag-area
[currentFolderPath]="currentPath"
[versioning] = "versioning"
(onSuccess)="documentList.reload()">
<alfresco-document-list-breadcrumb
[currentFolderPath]="currentPath"
[target]="documentList">
</alfresco-document-list-breadcrumb>
<alfresco-document-list
#documentList
[currentFolderPath]="currentPath"
[contextMenuActions]="true"
[contentActions]="true"
(preview)="showFile($event)"
(folderChange)="onFolderChanged($event)">
<!--
<empty-folder-content>
<template>
<h1>Sorry, no content here</h1>
</template>
</empty-folder-content>
-->
<content-columns>
<content-column key="$thumbnail" type="image"></content-column>
<content-column
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
key="name"
sortable="true"
class="full-width ellipsis-cell">
</content-column>
<div class="container">
<alfresco-upload-drag-area
[rootFolderId]="documentList.currentFolderId"
[versioning] = "versioning"
(onSuccess)="documentList.reload()">
<alfresco-document-list-breadcrumb
[target]="documentList"
[folderNode]="documentList.folderNode">
</alfresco-document-list-breadcrumb>
<div *ngIf="errorMessage" class="error-message">
<button (click)="resetError()" class="mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">highlight_off</i>
</button>
<span class="error-message--text">{{errorMessage}}</span>
</div>
<alfresco-document-list
#documentList
[currentFolderId]="currentFolderId"
[contextMenuActions]="true"
[contentActions]="true"
[allowDropFiles]="true"
(error)="onNavigationError($event)"
(success)="resetError()"
(preview)="showFile($event)">
<data-columns>
<data-column key="$thumbnail" type="image" [sortable]="false"></data-column>
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
key="name"
class="full-width ellipsis-cell">
<!-- Example of using custom column template -->
<!--
<content-column
title="Type"
source="content.mimeType">
</content-column>
<template let-entry="$implicit">
<span>Hi! {{entry.data.getValue(entry.row, entry.col)}}</span>
</template>
-->
<content-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
key="createdByUser.displayName"
sortable="true"
class="desktop-only">
</content-column>
<content-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_ON' | translate}}"
key="createdAt"
type="date"
format="medium"
sortable="true"
class="desktop-only">
</content-column>
</content-columns>
</data-column>
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.TAG' | translate}}"
key="id"
class="full-width ellipsis-cell">
<template let-entry="$implicit">
<alfresco-tag-node-list [nodeId]="entry.data.getValue(entry.row, entry.col)"></alfresco-tag-node-list>
</template>
</data-column>
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
key="createdByUser.displayName"
class="desktop-only">
</data-column>
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_ON' | translate}}"
key="createdAt"
type="date"
format="medium"
class="desktop-only">
</data-column>
</data-columns>
<content-actions>
<!-- folder actions -->
<content-action
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.SYSTEM_1' | translate}}"
handler="system1">
</content-action>
<content-action
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.CUSTOM' | translate}}"
(execute)="myFolderAction1($event)">
</content-action>
<content-action
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}"
handler="delete">
</content-action>
<!-- document actions -->
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DOWNLOAD' | translate}}"
handler="download">
</content-action>
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.SYSTEM_2' | translate}}"
handler="system2">
</content-action>
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.CUSTOM' | translate}}"
(execute)="myCustomAction1($event)">
</content-action>
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DELETE' | translate}}"
handler="delete">
</content-action>
<content-action
target="folder"
title="Activiti: View Form"
(execute)="viewActivitiForm($event)">
</content-action>
</content-actions>
</alfresco-document-list>
<alfresco-pagination
[provider]="documentList.data"
[supportedPageSizes]="[5, 10, 15, 20]">
</alfresco-pagination>
</alfresco-upload-drag-area>
</div>
<context-menu-holder></context-menu-holder>
<div class="p-10">
<ul>
<li>Current path: {{documentList.currentFolderPath}}</li>
<li>
<button (click)="documentList.currentFolderPath = '/Sites/swsdp/documentLibrary';">Go to Document Library</button>
</li>
<li>
<button (click)="documentList.currentFolderPath = '/Sites/swsdp/documentLibrary/Agency Files/Contracts'">Go to agency contracts</button>
</li>
<li>
<button (click)="documentList.currentFolderPath = '/'">Go to root</button>
</li>
<li>
<button (click)="fileDialog.toggleShowDialog()">Show/Hide File Dialog</button>
</li>
</ul>
</div>
<p style="width:250px;margin: 20px;">
<label for="switch-multiple-file" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch-multiple-file" class="mdl-switch__input" (change)="toggleMultipleFileUpload()" >
<span class="mdl-switch__label">Multiple File Upload</span>
</label>
</p>
<p style="width:250px;margin: 20px;">
<label for="switch-folder-upload" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch-folder-upload" class="mdl-switch__input" (change)="toggleFolder()">
<span class="mdl-switch__label">Folder Upload</span>
</label>
</p>
<p style="width:250px;margin: 20px;">
<label for="switch-accepted-file-type" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch-accepted-file-type" class="mdl-switch__input" (change)="toggleAcceptedFilesType()">
<span class="mdl-switch__label">Filter extension</span>
</label>
</p>
<p style="width:250px;margin: 20px;">
<label for="switch-versioning" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch-versioning" class="mdl-switch__input" (change)="toggleVersioning()">
<span class="mdl-switch__label">Versioning</span>
</label>
</p>
<h5>Upload</h5>
<br>
<div *ngIf="acceptedFilesTypeShow">
<label class="mdl-input__label">Extension accepted
<input type="text" data-automation-id="accepted-files-type" [(ngModel)]="acceptedFilesType">
</label>
<br/>
</div>
<div *ngIf="!acceptedFilesTypeShow">
<alfresco-upload-button data-automation-id="multiple-file-upload"
[currentFolderPath]="currentPath"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[versioning] = "versioning"
(onSuccess)="documentList.reload()">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-upload-button>
</div>
<div *ngIf="acceptedFilesTypeShow">
<alfresco-upload-button data-automation-id="multiple-file-upload"
[currentFolderPath]="currentPath"
acceptedFilesType="{{acceptedFilesType}}"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[versioning] = "versioning"
(onSuccess)="documentList.reload()">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-upload-button>
</div>
<file-uploading-dialog #fileDialog></file-uploading-dialog>
<content-actions>
<!-- folder actions -->
<content-action
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.SYSTEM_1' | translate}}"
handler="system1">
</content-action>
<content-action
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.CUSTOM' | translate}}"
(execute)="myFolderAction1($event)">
</content-action>
<content-action
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}"
handler="delete">
</content-action>
<!-- document actions -->
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DOWNLOAD' | translate}}"
handler="download">
</content-action>
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.SYSTEM_2' | translate}}"
handler="system2">
</content-action>
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.CUSTOM' | translate}}"
(execute)="myCustomAction1($event)">
</content-action>
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DELETE' | translate}}"
handler="delete">
</content-action>
<content-action
target="folder"
title="Activiti: View Form"
(execute)="viewActivitiForm($event)">
</content-action>
</content-actions>
</alfresco-document-list>
</alfresco-upload-drag-area>
</div>
<context-menu-holder></context-menu-holder>
<p class="options-container">
<label for="switch-multiple-file" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch-multiple-file" class="mdl-switch__input" (change)="toggleMultipleFileUpload()" >
<span class="mdl-switch__label">Multiple File Upload</span>
</label>
</p>
<p class="options-container">
<label for="switch-folder-upload" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch-folder-upload" class="mdl-switch__input" (change)="toggleFolder()">
<span class="mdl-switch__label">Folder Upload</span>
</label>
</p>
<p class="options-container">
<label for="switch-accepted-file-type" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch-accepted-file-type" class="mdl-switch__input" (change)="toggleAcceptedFilesType()">
<span class="mdl-switch__label">Filter extension</span>
</label>
</p>
<p style="width:250px;margin: 20px;">
<label for="switch-versioning" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch-versioning" class="mdl-switch__input" (change)="toggleVersioning()">
<span class="mdl-switch__label">Versioning</span>
</label>
</p>
<h5>Upload</h5>
<br>
<div *ngIf="acceptedFilesTypeShow">
<label class="mdl-input__label">Extension accepted
<input type="text" data-automation-id="accepted-files-type" [(ngModel)]="acceptedFilesType">
</label>
<br/>
</div>
<div *ngIf="!acceptedFilesTypeShow">
<alfresco-upload-button data-automation-id="multiple-file-upload"
[rootFolderId]="documentList.currentFolderId"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[versioning] = "versioning"
(onSuccess)="documentList.reload()">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-upload-button>
</div>
<div *ngIf="acceptedFilesTypeShow">
<alfresco-upload-button data-automation-id="multiple-file-upload"
[rootFolderId]="documentList.currentFolderId"
[acceptedFilesType]="acceptedFilesType"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[versioning] = "versioning"
(onSuccess)="documentList.reload()">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-upload-button>
</div>
<file-uploading-dialog #fileDialog></file-uploading-dialog>
<div *ngIf="fileShowed">
<alfresco-viewer [(showViewer)]="fileShowed"
[fileNodeId]="fileNodeId"
[overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
<extension-viewer [supportedExtensions]="['obj','3DS']" #extension>
<template let-urlFileContent="urlFileContent" let-extension="extension" >
<threed-viewer [urlFile]="urlFileContent" [extension]="extension" ></threed-viewer>
</template>
</extension-viewer>
</alfresco-viewer>
</div>
@@ -15,45 +15,40 @@
* limitations under the License.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
import {
DocumentActionsService,
DocumentList,
ContentActionHandler,
DocumentActionModel,
FolderActionModel
} from 'ng2-alfresco-documentlist';
import { Component, OnInit, Optional, ViewChild, ChangeDetectorRef } from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { AlfrescoAuthenticationService, LogService } from 'ng2-alfresco-core';
import { DocumentActionsService, DocumentListComponent, ContentActionHandler, DocumentActionModel, FolderActionModel } from 'ng2-alfresco-documentlist';
import { FormService } from 'ng2-activiti-form';
declare let __moduleName: string;
@Component({
moduleId: __moduleName,
selector: 'files-component',
templateUrl: './files.component.html',
styleUrls: ['./files.component.css']
})
export class FilesComponent implements OnInit {
currentPath: string = '/Sites/swsdp/documentLibrary';
// The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root-
currentFolderId: string = '-my-';
errorMessage: string = null;
fileNodeId: any;
fileShowed: boolean = false;
multipleFileUpload: boolean = false;
folderUpload: boolean = false;
acceptedFilesTypeShow: boolean = false;
versioning: boolean = false;
acceptedFilesType: string = '.jpg,.pdf,.js';
@ViewChild(DocumentList)
documentList: DocumentList;
@ViewChild(DocumentListComponent)
documentList: DocumentListComponent;
constructor(private documentActions: DocumentActionsService,
public auth: AlfrescoAuthenticationService,
private authService: AlfrescoAuthenticationService,
private formService: FormService,
private router: Router) {
private logService: LogService,
private changeDetector: ChangeDetectorRef,
private router: Router,
@Optional() private route: ActivatedRoute) {
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
}
@@ -78,12 +73,6 @@ export class FilesComponent implements OnInit {
}
}
onFolderChanged(event?: any) {
if (event) {
this.currentPath = event.path;
}
}
toggleMultipleFileUpload() {
this.multipleFileUpload = !this.multipleFileUpload;
return this.multipleFileUpload;
@@ -106,20 +95,38 @@ export class FilesComponent implements OnInit {
}
ngOnInit() {
if ( this.auth.isBpmLoggedIn() ) {
this.formService.getProcessDefinitions().subscribe(
defs => this.setupBpmActions(defs || []),
err => console.log(err)
);
} else {
console.log('You are not logged in');
}
if (this.route) {
this.route.params.forEach((params: Params) => {
if (params['id']) {
this.currentFolderId = params['id'];
this.changeDetector.detectChanges();
}
});
}
if (this.authService.isBpmLoggedIn()) {
this.formService.getProcessDefinitions().subscribe(
defs => this.setupBpmActions(defs || []),
err => this.logService.error(err)
);
} else {
this.logService.warn('You are not logged in to BPM');
}
}
viewActivitiForm(event?: any) {
this.router.navigate(['/activiti/tasksnode', event.value.entry.id]);
}
onNavigationError(err: any) {
if (err) {
this.errorMessage = err.message || 'Navigation error';
}
}
resetError() {
this.errorMessage = null;
}
private setupBpmActions(actions: any[]) {
actions.map(def => {
let documentAction = new DocumentActionModel();
@@ -0,0 +1,53 @@
.home-cards {
float: left;
margin: 10px 10px 10px 10px;
}
.mdl-card__supporting-text {
display: block;
overflow-y: auto;
height: 400px;
}
.demo-card-square.mdl-card {
width: 320px;
height: 380px;
}
.demo-card-square > .mdl-card__title {
color: #fff;
background-color: rgb(158, 158, 158);
}
.mdl-card__title {
cursor: pointer;
height: 70px;
}
.home--card__icon {
padding-top: 2px;
margin-right: 4px;
}
.home--card__text {
font-size: 16px;
line-height: 18px;
}
.home--feature-list {
list-style: none;
padding-left: 0;
}
.home--feature-list__icon {
float: left;
}
.home--feature-list__text {
padding-top: 2px;
}
span.home--feature-list__text:before {
content: '';
padding-left: 4px;
}
@@ -0,0 +1,187 @@
<!-- DOCUMENT LIST-->
<div class="demo-card-square mdl-card mdl-shadow--2dp home-cards">
<div class="mdl-card__title mdl-card--expand" routerLink="/files">
<h2 class="mdl-card__title-text">
<i class="material-icons home--card__icon">dvr</i>
<span class="home--card__text">DocumentList - Content Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
Demonstrates multiple Alfresco Content Services components used together to display the files of your Content Services instance:
<ul class="home--feature-list">
<li>
<i class="material-icons home--feature-list__icon">brightness_1</i>
<span class="home--feature-list__text">Communication with the Rest Api and core services</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-core" target="_blank">ng2-alfresco-core</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">dvr</i>
<span class="home--feature-list__text">Document List</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-documentlist" target="_blank">ng2-alfresco-documentlist</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">file_upload</i>
<span class="home--feature-list__text">Upload</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-upload" target="_blank">ng2-alfresco-upload</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">view_module</i>
<span class="home--feature-list__text">DataTable</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-datatable" target="_blank">ng2-alfresco-datatable</a>
</li>
</ul>
</div>
</div>
<!-- Process Services-->
<div class="demo-card-square mdl-card mdl-shadow--2dp home-cards">
<div class="mdl-card__title mdl-card--expand" routerLink="/activiti">
<h2 class="mdl-card__title-text">
<i class="material-icons home--card__icon">apps</i>
<span class="home--card__text">Process Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
Demonstrates multiple Alfresco Process Services components used together to show your Process Services process and tasks:
<ul class="home--feature-list">
<li>
<i class="material-icons home--feature-list__icon">brightness_1</i>
<span class="home--feature-list__text">Communication with the Rest Api and core services</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-core" target="_blank">ng2-alfresco-core</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">view_module</i>
<span class="home--feature-list__text">App List</span>
<a href="https://www.npmjs.com/package/ng2-activiti-tasklist" target="_blank">ng2-activiti-apps</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">view_headline</i>
<span class="home--feature-list__text">Task List</span>
<a href="https://www.npmjs.com/package/ng2-activiti-tasklist" target="_blank">ng2-activiti-tasklist</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">view_headline</i>
<span class="home--feature-list__text">Process List</span>
<a href="https://www.npmjs.com/package/ng2-activiti-processlist" target="_blank">ng2-activiti-processlist</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">view_quilt</i>
<span class="home--feature-list__text">Form</span>
<a href="https://www.npmjs.com/package/ng2-activiti-form" target="_blank">ng2-activiti-form</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">pie_chart</i>
<span class="home--feature-list__text">Analytics</span>
<a href="https://www.npmjs.com/package/ng2-activiti-analytics" target="_blank">ng2-activiti-analytics</a>,
<a href="https://www.npmjs.com/package/ng2-activiti-diagrams" target="_blank">ng2-activiti-diagrams</a>
</li>
<li>
<i class="material-icons home--feature-list__icon">view_module</i>
<span class="home--feature-list__text">DataTable</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-datatable" target="_blank">ng2-alfresco-datatable</a>
</li>
</ul>
</div>
</div>
<!-- DATATABLE-->
<div class="demo-card-square mdl-card mdl-shadow--2dp home-cards">
<div class="mdl-card__title mdl-card--expand" routerLink="/datatable">
<h2 class="mdl-card__title-text">
<i class="material-icons home--card__icon">view_module</i>
<span class="home--card__text">DataTable - Content Services & Process Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
Basic table component:
<ul class="home--feature-list">
<li>
<i class="material-icons home--feature-list__icon">brightness_1</i>
<span class="home--feature-list__text">Communication with the Rest Api and core services</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-core" target="_blank">ng2-alfresco-core</a>
</li>
</ul>
</div>
</div>
<!-- UPLOADER-->
<div class="demo-card-square mdl-card mdl-shadow--2dp home-cards">
<div class="mdl-card__title mdl-card--expand" routerLink="/uploader">
<h2 class="mdl-card__title-text">
<i class="material-icons home--card__icon">file_upload</i>
<span class="home--card__text">Uploader - Content Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
Basic table uploader component for the Content Services & Process Services:
<ul class="home--feature-list">
<li>
<i class="material-icons home--feature-list__icon">brightness_1</i>
<span class="home--feature-list__text">Communication with the Rest Api and core services</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-core" target="_blank">ng2-alfresco-core</a>
</li>
</ul>
</div>
</div>
<!-- LOGIN-->
<div class="demo-card-square mdl-card mdl-shadow--2dp home-cards">
<div class="mdl-card__title mdl-card--expand" routerLink="/login">
<h2 class="mdl-card__title-text">
<i class="material-icons home--card__icon">account_circle</i>
<span class="home--card__text">Login - Content Services & Process Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
Login component for the Content Services and Process Services:
<ul class="home--feature-list">
<li>
<i class="material-icons home--feature-list__icon">brightness_1</i>
<span class="home--feature-list__text">Communication with the Rest Api and core services</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-core" target="_blank">ng2-alfresco-core</a>
</li>
</ul>
</div>
</div>
<!-- WEBSCRIPT-->
<div class="demo-card-square mdl-card mdl-shadow--2dp home-cards">
<div class="mdl-card__title mdl-card--expand" routerLink="/webscript">
<h2 class="mdl-card__title-text">
<i class="material-icons home--card__icon">extension</i>
<span class="home--card__text">Webscript - Content Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
Displays and creates webscripts in your Content Services instance:
<ul class="home--feature-list">
<li>
<i class="material-icons home--feature-list__icon">brightness_1</i>
<span class="home--feature-list__text">Communication with the Rest Api and core services</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-core" target="_blank">ng2-alfresco-core</a>
</li>
</ul>
</div>
</div>
<!-- TAG-->
<div class="demo-card-square mdl-card mdl-shadow--2dp home-cards">
<div class="mdl-card__title mdl-card--expand" routerLink="/tag">
<h2 class="mdl-card__title-text">
<i class="material-icons home--card__icon">local_offer</i>
<span class="home--card__text">Tag - Content Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
Displays and adds tags to the node of your Content Services instance:
<ul class="home--feature-list">
<li>
<i class="material-icons home--feature-list__icon">brightness_1</i>
<span class="home--feature-list__text">Communication with Rest</span>
<a href="https://www.npmjs.com/package/ng2-alfresco-core" target="_blank">ng2-alfresco-core</a>
</li>
</ul>
</div>
</div>
@@ -0,0 +1,36 @@
/*!
* @license
* Copyright 2016 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 { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
import { CoreModule } from 'ng2-alfresco-core';
describe('HomeComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [CoreModule],
declarations: [HomeComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
});
});
it ('should work', () => {
let fixture = TestBed.createComponent(HomeComponent);
expect(fixture.componentInstance instanceof HomeComponent).toBe(true, 'should create HomeComponent');
});
});
@@ -15,9 +15,11 @@
* limitations under the License.
*/
declare let moment: any;
declare let mdDateTimePicker: any;
import { Component } from '@angular/core';
// MDL
declare let componentHandler: any;
declare let dialogPolyfill: any;
@Component({
selector: 'home-view',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent {}
+2
View File
@@ -15,6 +15,7 @@
* limitations under the License.
*/
export { HomeComponent } from './home/home.component';
export { DataTableDemoComponent } from './datatable/datatable-demo.component';
export { SearchComponent } from './search/search.component';
export { SearchBarComponent } from './search/search-bar.component';
@@ -27,3 +28,4 @@ export { AboutComponent } from './about/about.component';
export { FilesComponent } from './files/files.component';
export { FormNodeViewer } from './activiti/form-node-viewer.component';
export { SettingComponent } from './setting/setting.component';
export { ActivitiAppsView } from './activiti/apps.view';
@@ -1,14 +1,40 @@
.setting {
border-radius: 8px; position: absolute; background-color: papayawhip; color: cadetblue; left: 10px; top: 10px; z-index: 1;
.setting-button {
position: absolute;
right: 10px;
top: 10px;
z-index: 1;
}
.banned{
width:130px;margin: 10px;
.settings {
border-radius: 8px;
position: absolute;
background-color: papayawhip;
color: cadetblue;
left: 10px;
top: 10px;
z-index: 1;
}
.banned {
width: 130px;
margin: 10px;
}
.toggle {
width:120px;margin: 20px;
width: 120px;
margin: 20px;
padding: 5px;
}
.setting-button {
position: absolute; right: 10px; top: 10px; z-index: 1;
@media (min-width: 721px) {
.mobile-settings {
display: none;
}
}
@media (max-width: 720px) {
.settings {
display: none;
}
}
@@ -1,21 +1,23 @@
<div class="setting">
<!--BPM, ECN AND CSRF TOGGLE-->
<div class="settings">
<p class="toggle">
<label for="switch1" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch1" [checked]="isECM" class="mdl-switch__input"
(click)="toggleECM(ecm.checked)" #ecm>
<span class="mdl-switch__label">ECM</span>
(click)="toggleECM()">
<span class="mdl-switch__label">Content Services</span>
</label>
</p>
<p class="toggle">
<label for="switch2" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch2" [checked]="isBPM" class="mdl-switch__input"
(click)="toggleBPM(bpm.checked)" #bpm>
<span class="mdl-switch__label">BPM</span>
(click)="toggleBPM()">
<span class="mdl-switch__label">Process Services</span>
</label>
</p>
<p class="toggle">
<label for="switch3" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch3" class="mdl-switch__input" checked (click)="toggleCSRF()" #csrf>
<input type="checkbox" id="switch3" class="mdl-switch__input" [checked]="!disableCsrf" (click)="toggleCSRF()">
<span class="mdl-switch__label">CSRF</span>
</label>
</p>
@@ -25,12 +27,47 @@
</p>
</div>
<!--SETTING BUTTON-->
<a class="mdl-navigation__link setting-button" data-automation-id="settings" href="" routerLink="/settings">
<button class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored">
<i class="material-icons">settings</i>
</button>
</a>
<alfresco-login [providers]="providers" [fieldsValidation]="customValidation" [disableCsrf]="disableCsrf"
<!--LOGIN-->
<alfresco-login #alfrescologin
[providers]="providers"
[fieldsValidation]="customValidation"
[disableCsrf]="disableCsrf"
(executeSubmit)="validateForm($event)"
(onSuccess)="onLogin($event)"
(onError)="onError($event)" #alfrescologin></alfresco-login>
(onError)="onError($event)">
<div class="mobile-settings">
<p>
<label for="switch1-mobile" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch1-mobile" [checked]="isECM" class="mdl-switch__input"
(click)="toggleECM()">
<span class="mdl-switch__label">Content Services</span>
</label>
</p>
<p>
<label for="switch2-mobile" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch2-mobile" [checked]="isBPM" class="mdl-switch__input"
(click)="toggleBPM()">
<span class="mdl-switch__label">Process Services</span>
</label>
</p>
<p>
<label for="switch3-mobile" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch3-mobile" class="mdl-switch__input" [checked]="!disableCsrf" (click)="toggleCSRF()">
<span class="mdl-switch__label">CSRF</span>
</label>
</p>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" [(ngModel)]="blackListUsername" id="blacklistusername"/>
<label class="mdl-textfield__label" for="blacklistusername">Banned username</label>
</div>
</div>
</alfresco-login>
@@ -18,11 +18,9 @@
import { Component, ViewChild, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Validators } from '@angular/forms';
declare let __moduleName: string;
import { StorageService, LogService } from 'ng2-alfresco-core';
@Component({
moduleId: __moduleName,
selector: 'login-demo',
templateUrl: './login-demo.component.html',
styleUrls: ['./login-demo.component.css']
@@ -33,33 +31,36 @@ export class LoginDemoComponent implements OnInit {
alfrescologin: any;
providers: string = 'ECM';
disableCsrf: boolean = false;
blackListUsername: string;
customValidation: any;
disableCsrf: boolean = false;
isECM: boolean = true;
isBPM: boolean = false;
customMinLenght: number = 2;
constructor(public router: Router) {
constructor(private router: Router,
private storage: StorageService,
private logService: LogService) {
this.customValidation = {
username: ['', Validators.compose([Validators.required, Validators.minLength(4)])],
username: ['', Validators.compose([Validators.required, Validators.minLength(this.customMinLenght)])],
password: ['', Validators.required]
};
}
ngOnInit() {
this.alfrescologin.addCustomValidationError('username', 'required', 'LOGIN.MESSAGES.USERNAME-REQUIRED');
this.alfrescologin.addCustomValidationError('username', 'minlength', 'LOGIN.MESSAGES.USERNAME-MIN');
this.alfrescologin.addCustomValidationError('username', 'minlength', 'LOGIN.MESSAGES.USERNAME-MIN', {minLenght: this.customMinLenght});
this.alfrescologin.addCustomValidationError('password', 'required', 'LOGIN.MESSAGES.PASSWORD-REQUIRED');
if (localStorage.getItem('providers')) {
this.providers = localStorage.getItem('providers');
if (this.storage.hasItem('providers')) {
this.providers = this.storage.getItem('providers');
}
this.setProviders();
this.initProviders();
}
setProviders() {
initProviders() {
if (this.providers === 'BPM') {
this.isECM = false;
this.isBPM = true;
@@ -77,41 +78,43 @@ export class LoginDemoComponent implements OnInit {
}
onError($event) {
console.log($event);
this.logService.error($event);
}
toggleECM(checked) {
if (checked && this.providers === 'BPM') {
this.providers = 'ALL';
} else if (checked) {
this.providers = 'ECM';
} else if (!checked && this.providers === 'ALL') {
this.providers = 'BPM';
} else if (!checked && this.providers === 'ECM') {
this.providers = '';
}
localStorage.setItem('providers', this.providers);
toggleECM() {
this.isECM = !this.isECM;
this.storage.setItem('providers', this.updateProvider());
}
toggleBPM(checked) {
if (checked && this.providers === 'ECM') {
this.providers = 'ALL';
} else if (checked) {
this.providers = 'BPM';
} else if (!checked && this.providers === 'ALL') {
this.providers = 'ECM';
} else if (!checked && this.providers === 'BPM') {
this.providers = '';
}
localStorage.setItem('providers', this.providers);
toggleBPM() {
this.isBPM = !this.isBPM;
this.storage.setItem('providers', this.updateProvider());
}
toggleCSRF() {
this.disableCsrf = !this.disableCsrf;
}
updateProvider() {
if (this.isBPM && this.isECM) {
this.providers = 'ALL';
return this.providers;
}
if (this.isECM) {
this.providers = 'ECM';
return this.providers;
}
if (this.isBPM) {
this.providers = 'BPM';
return this.providers;
}
this.providers = '';
return this.providers;
};
validateForm(event: any) {
let values = event.values;
if (values.controls['username'].value === this.blackListUsername) {
@@ -1,14 +1,13 @@
<alfresco-search-control *ngIf="isLoggedIn()"
[searchTerm]="searchTerm"
[autocomplete]="false"
[liveSearchResultType]="'cm:content'"
(searchSubmit)="onSearchSubmit($event);"
(searchChange)="onSearchTermChange($event);"
(expand)="onExpandToggle($event);"
(fileSelect)="onFileClicked($event)">
(fileSelect)="onItemClicked($event)">
</alfresco-search-control>
<alfresco-viewer [(showViewer)]="fileShowed"
<alfresco-viewer *ngIf="fileShowed" [(showViewer)]="fileShowed"
[fileNodeId]="fileNodeId"
[overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
@@ -18,11 +18,9 @@
import { Component, EventEmitter, Output } from '@angular/core';
import { Router } from '@angular/router';
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
declare let __moduleName: string;
import { MinimalNodeEntity } from 'alfresco-js-api';
@Component({
moduleId: __moduleName,
selector: 'search-bar',
templateUrl: './search-bar.component.html'
})
@@ -36,11 +34,11 @@ export class SearchBarComponent {
expand = new EventEmitter();
constructor(public router: Router,
public auth: AlfrescoAuthenticationService) {
public authService: AlfrescoAuthenticationService) {
}
isLoggedIn(): boolean {
return this.auth.isLoggedIn();
return this.authService.isLoggedIn();
}
/**
@@ -54,10 +52,12 @@ export class SearchBarComponent {
}]);
}
onFileClicked(event) {
if (event.value.entry.isFile) {
this.fileNodeId = event.value.entry.id;
onItemClicked(event: MinimalNodeEntity) {
if (event.entry.isFile) {
this.fileNodeId = event.entry.id;
this.fileShowed = true;
} else if (event.entry.isFolder) {
this.router.navigate(['/files', event.entry.id]);
}
}
@@ -1,8 +1,12 @@
<div class="search-results-container">
<h1>Search results</h1>
<alfresco-search [resultType]="'cm:content'" (preview)="onFileClicked($event)"></alfresco-search>
<alfresco-search (preview)="showFile($event)"></alfresco-search>
</div>
<alfresco-viewer [(showViewer)]="fileShowed" [fileNodeId]="fileNodeId" [overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>
<div *ngIf="fileShowed">
<alfresco-viewer [(showViewer)]="fileShowed"
[fileNodeId]="fileNodeId"
[overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>
</div>
@@ -16,11 +16,9 @@
*/
import { Component } from '@angular/core';
declare let __moduleName: string;
import { Router } from '@angular/router';
@Component({
moduleId: __moduleName,
selector: 'search-component',
templateUrl: './search.component.html',
styles: [`
@@ -48,13 +46,18 @@ declare let __moduleName: string;
})
export class SearchComponent {
fileShowed: boolean = false;
fileNodeId: string;
fileShowed: boolean = false;
onFileClicked(event) {
constructor(public router: Router) {
}
showFile(event) {
if (event.value.entry.isFile) {
this.fileNodeId = event.value.entry.id;
this.fileShowed = true;
} else {
this.fileShowed = false;
}
}
}
@@ -2,6 +2,7 @@
width: 320px;
height: 320px;
}
.setting-card > .mdl-card__title {
color: #fff;
background: bottom right 15% no-repeat #1fbcd2;
@@ -22,5 +23,9 @@
}
.icon-margin {
margin-right: 9px;
}
margin-right: 9px;
}
.table-row {
display: table-row;
}
@@ -1,5 +1,5 @@
<div class="setting-container">
<div style="display: table-row">
<div class="table-row">
<div class="setting-card-padding"></div>
<div class="setting-card mdl-card mdl-shadow--2dp">
<div class="mdl-card__title mdl-card--expand">
@@ -7,7 +7,7 @@
</div>
<div class="mdl-card__actions mdl-card--border">
<div class="mdl-card__supporting-text">
ECM host URL configuration
Content Services host URL configuration
</div>
<nav class="mdl-navigation">
<div class="icon material-icons icon-margin">link</div>
@@ -16,7 +16,7 @@
</nav>
<div class="mdl-card__supporting-text">
BPM host URL configuration
Process Services host URL configuration
</div>
<nav class="mdl-navigation">
<div class="icon material-icons icon-margin">link</div>
@@ -24,6 +24,11 @@
tabindex="1" (change)="onChangeBPMHost($event)" value="{{bpmHost}}"/>
</nav>
</div>
<div class="mdl-card__actions mdl-card--border">
<a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect" onclick="window.history.back()" >
Back
</a>
</div>
</div>
<div class="setting-card-padding"></div>
</div>
@@ -16,14 +16,9 @@
*/
import { Component } from '@angular/core';
import {
AlfrescoSettingsService
} from 'ng2-alfresco-core';
declare let __moduleName: string;
import { AlfrescoSettingsService, StorageService, LogService } from 'ng2-alfresco-core';
@Component({
moduleId: __moduleName,
selector: 'alfresco-setting-demo',
templateUrl: './setting.component.html',
styleUrls: ['./setting.component.css']
@@ -33,23 +28,31 @@ export class SettingComponent {
ecmHost: string;
bpmHost: string;
constructor(public alfrescoSettingsService: AlfrescoSettingsService) {
this.ecmHost = this.alfrescoSettingsService.ecmHost;
this.bpmHost = this.alfrescoSettingsService.bpmHost;
constructor(private settingsService: AlfrescoSettingsService,
private storage: StorageService,
private logService: LogService) {
this.ecmHost = this.settingsService.ecmHost;
this.bpmHost = this.settingsService.bpmHost;
}
public onChangeECMHost(event: KeyboardEvent): void {
console.log((<HTMLInputElement>event.target).value);
this.ecmHost = (<HTMLInputElement>event.target).value;
this.alfrescoSettingsService.ecmHost = this.ecmHost;
localStorage.setItem(`ecmHost`, this.ecmHost);
let value = (<HTMLInputElement>event.target).value.trim();
if (value) {
this.logService.info(`ECM host: ${value}`);
this.ecmHost = value;
this.settingsService.ecmHost = value;
this.storage.setItem(`ecmHost`, value);
}
}
public onChangeBPMHost(event: KeyboardEvent): void {
console.log((<HTMLInputElement>event.target).value);
this.bpmHost = (<HTMLInputElement>event.target).value;
this.alfrescoSettingsService.bpmHost = this.bpmHost;
localStorage.setItem(`bpmHost`, this.bpmHost);
let value = (<HTMLInputElement>event.target).value.trim();
if (value) {
this.logService.info(`BPM host: ${value}`);
this.bpmHost = value;
this.settingsService.bpmHost = value;
this.storage.setItem(`bpmHost`, value);
}
}
}
@@ -24,9 +24,9 @@ import { Component } from '@angular/core';
<input id="nodeId" type="text" size="48" [(ngModel)]="nodeId"><br>
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col"><alfresco-tag-node-actions-list [nodeId]="nodeId"></alfresco-tag-node-actions-list></div>
<div class="mdl-cell mdl-cell--4-col">List Tags ECM <alfresco-tag-list></alfresco-tag-list></div>
<div class="mdl-cell mdl-cell--4-col">List Tags Content Services <alfresco-tag-list></alfresco-tag-list></div>
<div class="mdl-cell mdl-cell--4-col">
Tag list By Node ID
Tag list By Node ID
<alfresco-tag-node-list [nodeId]="nodeId"></alfresco-tag-node-list>
</div>
</div>
@@ -16,42 +16,41 @@
*/
import { Component } from '@angular/core';
import { LogService } from 'ng2-alfresco-core';
@Component({
selector: 'alfresco-webscript-demo',
template: `
<label for="script-path"><b>Insert a scriptPath</b></label><br>
<input id="script-path" type="text" size="48" [(ngModel)]="scriptPath"><br>
<label for="context-root"><b>Insert a contextRoot</b></label><br>
<input id="context-root" type="text" size="48" [(ngModel)]="contextRoot"><br>
<label for="service-path"><b>Insert a servicePath</b></label><br>
<input id="service-path" type="text" size="48" [(ngModel)]="servicePath"><br>
<alfresco-webscript-get [scriptPath]="scriptPath"
[scriptArgs]="scriptArgs"
[contextRoot]="contextRoot"
[servicePath]="servicePath"
[contentType]="'HTML'"
(onSuccess)= "logData($event)"></alfresco-webscript-get>
<label for="script-path"><b>Insert a scriptPath</b></label><br>
<input id="script-path" type="text" size="48" [(ngModel)]="scriptPath"><br>
<label for="context-root"><b>Insert a contextRoot</b></label><br>
<input id="context-root" type="text" size="48" [(ngModel)]="contextRoot"><br>
<label for="service-path"><b>Insert a servicePath</b></label><br>
<input id="service-path" type="text" size="48" [(ngModel)]="servicePath"><br>
<alfresco-webscript-get
[scriptPath]="scriptPath"
[scriptArgs]="scriptArgs"
[contextRoot]="contextRoot"
[servicePath]="servicePath"
[contentType]="'HTML'"
(onSuccess)= "logData($event)">
</alfresco-webscript-get>
`
})
export class WebscriptComponent {
currentPath: string = '/';
authenticated: boolean;
host: string = 'http://127.0.0.1:8080';
scriptPath: string = 'sample/folder/Company%20Home';
contextRoot: string = 'alfresco';
servicePath: string = 'service';
scriptArgs: string = '';
constructor(private logService: LogService) {
}
logData(data) {
console.log(data);
this.logService.log(data);
}
}
-41
View File
@@ -1,41 +0,0 @@
/* Utils */
body, html {
height: 100%;
}
.p-10 {
padding: 10px;
}
.m-10 {
margin: 10px;
}
.loader-container {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
-webkit-box-flex-direction: row;
-moz-box-flex-direction: row;
-webkit-flex-direction: row;
flex-direction: row;
height:100%;
}
.loader-item {
margin: auto;
max-height:100px;
max-width:300px;
}
.loader-text{
white-space: nowrap;
text-align: center;
position: relative;
}
._dialog_overlay {
position: static !important;
}
-372
View File
@@ -1,372 +0,0 @@
/**
* Class to generate polyline
*
* @author Dmitry Farafonov
*/
var ANCHOR_TYPE= {
main: "main",
middle: "middle",
first: "first",
last: "last"
};
function Anchor(uuid, type, x, y) {
this.uuid = uuid;
this.x = x;
this.y = y;
this.type = (type == ANCHOR_TYPE.middle) ? ANCHOR_TYPE.middle : ANCHOR_TYPE.main;
};
Anchor.prototype = {
uuid: null,
x: 0,
y: 0,
type: ANCHOR_TYPE.main,
isFirst: false,
isLast: false,
ndex: 0,
typeIndex: 0
};
function Polyline(uuid, points, strokeWidth, paper) {
/* Array on coordinates:
* points: [{x: 410, y: 110}, 1
* {x: 570, y: 110}, 1 2
* {x: 620, y: 240}, 2 3
* {x: 750, y: 270}, 3 4
* {x: 650, y: 370}]; 4
*/
this.points = points;
/*
* path for graph
* [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]]
*/
this.path = [];
this.anchors = [];
if (strokeWidth) this.strokeWidth = strokeWidth;
this.paper = paper;
this.closePath = false;
this.init();
};
Polyline.prototype = {
id: null,
points: [],
path: [],
anchors: [],
strokeWidth: 1,
radius: 1,
showDetails: false,
paper: null,
element: null,
isDefaultConditionAvailable: false,
closePath: false,
init: function(points){
var linesCount = this.getLinesCount();
if (linesCount < 1)
return;
this.normalizeCoordinates();
// create anchors
this.pushAnchor(ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1);
for (var i = 1; i < linesCount; i++)
{
var line1 = this.getLine(i-1);
this.pushAnchor(ANCHOR_TYPE.main, line1.x2, line1.y2);
}
this.pushAnchor(ANCHOR_TYPE.last, this.getLine(linesCount-1).x2, this.getLine(linesCount-1).y2);
this.rebuildPath();
},
normalizeCoordinates: function(){
for(var i=0; i < this.points.length; i++){
this.points[i].x = parseFloat(this.points[i].x);
this.points[i].y = parseFloat(this.points[i].y);
}
},
getLinesCount: function(){
return this.points.length-1;
},
_getLine: function(i){
if (this.points.length > i && this.points[i]) {
return {x1: this.points[i].x, y1: this.points[i].y, x2: this.points[i+1].x, y2: this.points[i+1].y};
} else {
return undefined;
}
},
getLine: function(i){
var line = this._getLine(i);
if (line != undefined) {
line.angle = this.getLineAngle(i);
}
return line;
},
getLineAngle: function(i){
var line = this._getLine(i);
return Math.atan2(line.y2 - line.y1, line.x2 - line.x1);
},
getLineLengthX: function(i){
var line = this.getLine(i);
return (line.x2 - line.x1);
},
getLineLengthY: function(i){
var line = this.getLine(i);
return (line.y2 - line.y1);
},
getLineLength: function(i){
return Math.sqrt(Math.pow(this.getLineLengthX(i), 2) + Math.pow(this.getLineLengthY(i), 2));
},
getAnchors: function(){
return this.anchors;
},
getAnchorsCount: function(type){
if (!type)
return this.anchors.length;
else {
var count = 0;
for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i];
if (anchor.getType() == type) {
count++;
}
}
return count;
}
},
pushAnchor: function(type, x, y, index){
if (type == ANCHOR_TYPE.first) {
index = 0;
typeIndex = 0;
} else if (type == ANCHOR_TYPE.last) {
index = this.getAnchorsCount();
typeIndex = 0;
} else if (!index) {
index = this.anchors.length;
} else {
for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i];
if (anchor.index > index) {
anchor.index++;
anchor.typeIndex++;
}
}
}
var anchor = new Anchor(this.id, ANCHOR_TYPE.main, x, y, index, typeIndex);
this.anchors.push(anchor);
},
getAnchor: function(position){
return this.anchors[position];
},
getAnchorByType: function(type, position){
if (type == ANCHOR_TYPE.first)
return this.anchors[0];
if (type == ANCHOR_TYPE.last)
return this.anchors[this.getAnchorsCount()-1];
for(var i=0; i < this.getAnchorsCount(); i++){
var anchor = this.anchors[i];
if (anchor.type == type) {
if( position == anchor.position)
return anchor;
}
}
return null;
},
addNewPoint: function(position, x, y){
//
for(var i = 0; i < this.getLinesCount(); i++){
var line = this.getLine(i);
if (x > line.x1 && x < line.x2 && y > line.y1 && y < line.y2) {
this.points.splice(i+1,0,{x: x, y: y});
break;
}
}
this.rebuildPath();
},
rebuildPath: function(){
var path = [];
for(var i = 0; i < this.getAnchorsCount(); i++){
var anchor = this.getAnchor(i);
var pathType = "";
if (i == 0)
pathType = "M";
else
pathType = "L";
// TODO: save previous points and calculate new path just if points are updated, and then save currents values as previous
var targetX = anchor.x, targetY = anchor.y;
if (i>0 && i < this.getAnchorsCount()-1) {
// get new x,y
var cx = anchor.x, cy = anchor.y;
// pivot point of prev line
var AO = this.getLineLength(i-1);
if (AO < this.radius) {
AO = this.radius;
}
this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10));
var ED = this.getLineLengthY(i-1) * this.radius / AO;
var OD = this.getLineLengthX(i-1) * this.radius / AO;
targetX = anchor.x - OD;
targetY = anchor.y - ED;
if (AO < 2*this.radius && i>1) {
targetX = anchor.x - this.getLineLengthX(i-1)/2;
targetY = anchor.y - this.getLineLengthY(i-1)/2;;
}
// pivot point of next line
var AO = this.getLineLength(i);
if (AO < this.radius) {
AO = this.radius;
}
var ED = this.getLineLengthY(i) * this.radius / AO;
var OD = this.getLineLengthX(i) * this.radius / AO;
var nextSrcX = anchor.x + OD;
var nextSrcY = anchor.y + ED;
if (AO < 2*this.radius && i<this.getAnchorsCount()-2) {
nextSrcX = anchor.x + this.getLineLengthX(i)/2;
nextSrcY = anchor.y + this.getLineLengthY(i)/2;;
}
var dx0 = (cx - targetX) / 3,
dy0 = (cy - targetY) / 3,
ax = cx - dx0,
ay = cy - dy0,
dx1 = (cx - nextSrcX) / 3,
dy1 = (cy - nextSrcY) / 3,
bx = cx - dx1,
by = cy - dy1,
zx=nextSrcX, zy=nextSrcY;
} else if (i==1 && this.getAnchorsCount() == 2){
var AO = this.getLineLength(i-1);
if (AO < this.radius) {
AO = this.radius;
}
this.isDefaultConditionAvailable = (this.isDefaultConditionAvailable || (i == 1 && AO > 10));
}
// anti smoothing
if (this.strokeWidth%2 == 1) {
targetX += 0.5;
targetY += 0.5;
}
path.push([pathType, targetX, targetY]);
if (i>0 && i < this.getAnchorsCount()-1) {
path.push(["C", ax, ay, bx, by, zx, zy]);
}
}
if (this.closePath)
{
path.push(["Z"]);
}
this.path = path;
},
transform: function(transformation)
{
this.element.transform(transformation);
},
attr: function(attrs)
{
// TODO: foreach and set each
this.element.attr(attrs);
}
};
function Polygone(points, strokeWidth) {
/* Array on coordinates:
* points: [{x: 410, y: 110}, 1
* {x: 570, y: 110}, 1 2
* {x: 620, y: 240}, 2 3
* {x: 750, y: 270}, 3 4
* {x: 650, y: 370}]; 4
*/
this.points = points;
/*
* path for graph
* [["M", x1, y1], ["L", x2, y2], ["C", ax, ay, bx, by, x3, y3], ["L", x3, y3]]
*/
this.path = [];
this.anchors = [];
if (strokeWidth) this.strokeWidth = strokeWidth;
this.closePath = true;
this.init();
};
/*
* Poligone is inherited from Poliline: draws closedPath of polyline
*/
var Foo = function () { };
Foo.prototype = Polyline.prototype;
Polygone.prototype = new Foo();
Polygone.prototype.rebuildPath = function(){
var path = [];
for(var i = 0; i < this.getAnchorsCount(); i++){
var anchor = this.getAnchor(i);
var pathType = "";
if (i == 0)
pathType = "M";
else
pathType = "L";
var targetX = anchor.x, targetY = anchor.y;
// anti smoothing
if (this.strokeWidth%2 == 1) {
targetX += 0.5;
targetY += 0.5;
}
path.push([pathType, targetX, targetY]);
}
if (this.closePath)
path.push(["Z"]);
this.path = path;
};
+5
View File
@@ -16,7 +16,12 @@
*/
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';
if (process.env.ENV === 'production') {
enableProdMode();
}
const platform = platformBrowserDynamic();
platform.bootstrapModule(AppModule);
+16
View File
@@ -0,0 +1,16 @@
import 'core-js/es6';
import 'core-js/es7/reflect';
// IE 8-11
require('zone.js/dist/zone');
if (process.env.ENV === 'production') {
// Production
} else {
// Development
Error['stackTraceLimit'] = Infinity;
require('zone.js/dist/long-stack-trace-zone');
}
+74
View File
@@ -0,0 +1,74 @@
// Angular
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/core';
import '@angular/common';
import '@angular/http';
import '@angular/router';
// RxJS
import 'rxjs';
// hammerjs
import 'hammerjs';
// Alfresco
import 'alfresco-js-api';
import 'ng2-alfresco-core';
import 'ng2-alfresco-datatable';
import 'ng2-activiti-diagrams';
import 'ng2-activiti-analytics';
import 'ng2-activiti-form';
import 'ng2-activiti-processlist';
import 'ng2-activiti-tasklist';
import 'ng2-alfresco-documentlist';
import 'ng2-alfresco-login';
import 'ng2-alfresco-search';
import 'ng2-alfresco-tag';
import 'ng2-alfresco-upload';
import 'ng2-alfresco-viewer';
import 'ng2-alfresco-webscript';
import 'ng2-alfresco-userinfo';
// Polyfill(s) for dialogs
require('script!dialog-polyfill/dialog-polyfill');
import 'dialog-polyfill/dialog-polyfill.css';
// Flags
import 'flag-icon-css/css/flag-icon.min.css';
import '../public/css/app.css';
import '../public/css/muli-font.css';
// Load the Angular Material 2 stylesheet
import '../public/css/angular-material.css';
import 'ng2-activiti-form/stencils/runtime.ng1';
import 'ng2-activiti-form/stencils/runtime.adf';
import 'ng2-charts';
import 'chart.js';
require('script!raphael/raphael.min.js');
require('script!moment/min/moment.min.js');
import 'md-date-time-picker/dist/css/mdDateTimePicker.css';
require('script!md-date-time-picker/dist/js/mdDateTimePicker.min.js');
require('script!md-date-time-picker/dist/js/draggabilly.pkgd.min.js');
require('pdfjs-dist/web/compatibility.js');
// Setting worker path to worker bundle.
let pdfjsLib = require('pdfjs-dist');
if (process.env.ENV === 'production') {
pdfjsLib.PDFJS.workerSrc = './pdf.worker.js';
} else {
pdfjsLib.PDFJS.workerSrc = '../../node_modules/pdfjs-dist/build/pdf.worker.js';
}
require('pdfjs-dist/web/pdf_viewer.js');
require('three/build/three.min.js');
// 3D viewer
import 'three';
import 'ng2-3d-editor';
File diff suppressed because one or more lines are too long
+7
View File
@@ -0,0 +1,7 @@
var path = require('path');
var _root = path.resolve(__dirname, '..');
function root(args) {
args = Array.prototype.slice.call(arguments, 0);
return path.join.apply(path, [_root].concat(args));
}
exports.root = root;
+21
View File
@@ -0,0 +1,21 @@
Error.stackTraceLimit = Infinity;
require('core-js/es6');
require('core-js/es7/reflect');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/proxy');
require('zone.js/dist/sync-test');
require('zone.js/dist/jasmine-patch');
require('zone.js/dist/async-test');
require('zone.js/dist/fake-async-test');
var appContext = require.context('../app', true, /\.spec\.ts/);
appContext.keys().forEach(appContext);
var testing = require('@angular/core/testing');
var browser = require('@angular/platform-browser-dynamic/testing');
testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
+37
View File
@@ -0,0 +1,37 @@
var webpackConfig = require('./webpack.test');
module.exports = function (config) {
var _config = {
basePath: '',
frameworks: ['jasmine'],
files: [
{ pattern: './config/karma-test-shim.js', watched: false }
],
preprocessors: {
'./config/karma-test-shim.js': ['webpack', 'sourcemap']
},
webpack: webpackConfig,
webpackMiddleware: {
stats: 'errors-only'
},
webpackServer: {
noInfo: true
},
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['Chrome'],
singleRun: true
};
config.set(_config);
};
+5
View File
@@ -0,0 +1,5 @@
module.exports = function(source) {
this.cacheable();
console.log(this.resource);
return source;
}
+27
View File
@@ -0,0 +1,27 @@
const moduleIdRegex = /moduleId: module.id,/g;
const moduleNameRegex = /moduleId: __moduleName,/g;
const moduleIdPath = /module.id.replace/g;
module.exports = function(source) {
this.cacheable();
if (moduleIdRegex.test(source)) {
source = source.replace(moduleIdRegex, (match) => {
return `// ${match}`;
});
}
if (moduleNameRegex.test(source)) {
source = source.replace(moduleNameRegex, (match) => {
return `// ${match}`;
});
}
if (moduleIdPath.test(source)) {
source = source.replace(moduleIdPath, (match) => {
return `''.replace`;
});
}
return source;
}
+186
View File
@@ -0,0 +1,186 @@
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var helpers = require('./helpers');
var path = require('path');
var fs = require('fs');
var glob = require('glob');
var CopyWebpackPlugin = require('copy-webpack-plugin');
const rootPath = helpers.root('node_modules');
var pattern = '+(alfresco-js-api|ng2-alfresco|ng2-activiti)*';
var options = {
cwd: rootPath,
realpath: true
};
var alfrescoLibs = glob.sync(pattern, options);
// console.dir(alfrescoLibs);
module.exports = {
entry: {
'polyfills': './app/polyfills.ts',
'vendor': './app/vendor.ts',
'app': './app/main.ts'
},
resolve: {
extensions: ['', '.ts', '.js'],
modules: [
helpers.root('app'),
helpers.root('node_modules')
],
root: rootPath,
fallback: rootPath
},
resolveLoader: {
alias: {
'systemjs-loader': helpers.root('config', 'loaders', 'system.js'),
'debug-loader': helpers.root('config', 'loaders', 'debug.js')
},
fallback: rootPath
},
module: {
preLoaders: [
{
test: /\.js$/,
include: [
...alfrescoLibs
],
loader: 'source-map-loader'
}
],
loaders: [
{
test: /\.ts$/,
loaders: ['awesome-typescript-loader', 'angular2-template-loader', 'systemjs-loader'],
exclude: ['node_modules','public']
},
{
test: /\.js$/,
include: [
...alfrescoLibs
],
loaders: ['angular2-template-loader', 'source-map-loader', 'systemjs-loader']
},
{
test: /\.html$/,
exclude: alfrescoLibs,
loader: 'html'
},
{
test: /\.html$/,
include: alfrescoLibs,
loader: 'html',
query: {
interpolate: true
}
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'file?name=assets/[name].[hash].[ext]'
},
{
test: /\.css$/,
exclude: [
helpers.root('app'),
...alfrescoLibs
],
loader: ExtractTextPlugin.extract('style', 'css?sourceMap')
},
{
test: /\.css$/,
include: [
helpers.root('app'),
...alfrescoLibs
],
loader: 'raw'
}
]
},
plugins: [
new webpack.WatchIgnorePlugin([ new RegExp('^((?!(ng2-activiti|ng2-alfresco|demo-shell-ng2)).)((?!(src|app)).)*$')]),
new CopyWebpackPlugin([
{
from: 'versions.json'
},{
context: 'node_modules',
from: 'element.scrollintoviewifneeded-polyfill/index.js',
to: 'js/element.scrollintoviewifneeded-polyfill.js',
flatten: true
},{
context: 'node_modules',
from: 'classlist-polyfill/src/index.js',
to: 'js/classlist-polyfill.js',
flatten: true
}, {
context: 'node_modules',
from: 'intl/dist/Intl.min.js',
to: 'js/Intl.min.js',
flatten: true
}, {
context: 'node_modules',
from: 'web-animations-js/web-animations.min.js',
to: 'js/web-animations.min.js',
flatten: true
}, {
context: 'node_modules',
from: 'core-js/client/shim.min.js',
to: 'js/shim.min.js',
flatten: true
}, {
context: 'node_modules',
from: 'es6-shim/es6-shim.min.js',
to: 'js/es6-shim.min.js',
flatten: true
}, {
context: 'node_modules',
from: 'es5-shim/es5-shim.min.js',
to: 'js/es5-shim.min.js',
flatten: true
}, {
context: 'node_modules',
from: 'systemjs/dist/system-polyfills.js',
to: 'js/system-polyfills.js',
flatten: true
}, {
context: 'node_modules',
from: 'material-design-lite/material.min.js',
to: 'js/material.min.js',
flatten: true
}, {
context: 'node_modules',
from: 'material-design-lite/material.min.js',
to: 'js/material.min.js',
flatten: true
}, {
context: 'node_modules',
from: 'material-design-icons/iconfont/',
to: 'css/iconfont/',
flatten: true
}, {
context: 'public',
from: '',
to: ''
}
]),
new webpack.optimize.CommonsChunkPlugin({
name: ['app', 'vendor', 'polyfills']
}),
new HtmlWebpackPlugin({
template: 'index.html'
})
],
node: {
fs: 'empty',
module: false
}
};
+68
View File
@@ -0,0 +1,68 @@
var webpackMerge = require('webpack-merge');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var commonConfig = require('./webpack.common.js');
var helpers = require('./helpers');
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = webpackMerge(commonConfig, {
devtool: 'cheap-module-eval-source-map',
output: {
path: helpers.root('dist'),
filename: '[name].js',
chunkFilename: '[id].chunk.js'
},
plugins: [
new ExtractTextPlugin('[name].css'),
new CopyWebpackPlugin([
{
from: 'favicon-96x96.png'
},
{
from: 'node_modules/pdfjs-dist/build/pdf.worker.js',
to: 'pdf.worker.js'
},
{
context: 'resources/i18n',
from: '**/*.json',
to: 'resources/i18n'
},
// Copy i18n folders for all modules with ng2-alfresco- prefix
{
context: 'node_modules',
from: 'ng2-alfresco-*/src/i18n/*.json',
to: 'node_modules'
},
// Copy i18n folders for all modules with ng2-activiti- prefix
{
context: 'node_modules',
from: 'ng2-activiti-*/src/i18n/*.json',
to: 'node_modules'
},
// Copy asstes folders for all modules with ng2-activiti- prefix
{
context: 'node_modules',
from: 'ng2-activiti-*/src/assets/images/*.*',
to: 'assets/images',
flatten: true
},
// Copy asstes folders for all modules with ng2-alfresco- prefix
{
context: 'node_modules',
from: 'ng2-alfresco-*/src/assets/images/*.*',
to: 'assets/images',
flatten: true
}
])
],
devServer: {
host: '0.0.0.0',
port: 3000,
inline: true,
historyApiFallback: true,
stats: 'minimal'
}
});
+104
View File
@@ -0,0 +1,104 @@
var webpack = require('webpack');
var webpackMerge = require('webpack-merge');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var commonConfig = require('./webpack.common.js');
var helpers = require('./helpers');
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
module.exports = webpackMerge(commonConfig, {
devtool: 'source-map',
output: {
path: helpers.root('dist'),
publicPath: '/',
filename: '[name].[hash].js',
chunkFilename: '[id].[hash].chunk.js'
},
htmlLoader: {
minimize: false // workaround for ng2
},
plugins: [
// Define env variables to help with builds
// Reference: https://webpack.github.io/docs/list-of-plugins.html#defineplugin
new webpack.DefinePlugin({
'process.env': {
'ENV': JSON.stringify(ENV)
}
}),
// Reference: http://webpack.github.io/docs/list-of-plugins.html#noerrorsplugin
// Only emit files when there are no errors
new webpack.NoErrorsPlugin(),
// Reference: http://webpack.github.io/docs/list-of-plugins.html#dedupeplugin
// Dedupe modules in the output
new webpack.optimize.DedupePlugin(),
// Reference: http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
// Minify all javascript, switch loaders to minimizing mode
new webpack.optimize.UglifyJsPlugin({
output:{
comments: false
},
mangle: {
keep_fnames: true
},
compressor: {
screw_ie8: true,
warnings: false
}
}),
// Extract css files
// Reference: https://github.com/webpack/extract-text-webpack-plugin
// Disabled when in test mode or not in build mode
new ExtractTextPlugin('[name].[hash].css'),
// Copy assets from the public folder
// Reference: https://github.com/kevlened/copy-webpack-plugin
new CopyWebpackPlugin([
{
from: 'favicon-96x96.png'
},
{
from: 'node_modules/pdfjs-dist/build/pdf.worker.js',
to: 'pdf.worker.js'
},
{
context: 'resources/i18n',
from: '**/*.json',
to: 'resources/i18n'
},
// Copy i18n folders for all modules with ng2-alfresco- prefix
{
context: 'node_modules',
from: 'ng2-alfresco-*/src/i18n/*.json',
to: 'node_modules'
},
// Copy i18n folders for all modules with ng2-activiti- prefix
{
context: 'node_modules',
from: 'ng2-activiti-*/src/i18n/*.json',
to: 'node_modules'
},
// Copy asstes folders for all modules with ng2-activiti- prefix
{
context: 'node_modules',
from: 'ng2-activiti-*/src/assets/images/*.*',
to: 'assets/images',
flatten : true
},
// Copy asstes folders for all modules with ng2-alfresco- prefix
{
context: 'node_modules',
from: 'ng2-alfresco-*/src/assets/images/*.*',
to: 'assets/images',
flatten : true
}
])
]
});
+78
View File
@@ -0,0 +1,78 @@
var helpers = require('./helpers');
var fs = require('fs');
var glob = require('glob');
const rootPath = helpers.root('node_modules');
var pattern = '+(alfresco-js-api|ng2-alfresco|ng2-activiti)*';
var options = {
cwd: rootPath,
realpath: true
};
var alfrescoLibs = glob.sync(pattern, options);
module.exports = {
devtool: 'inline-source-map',
resolve: {
extensions: ['', '.ts', '.js'],
modules: [
helpers.root('app'),
helpers.root('node_modules')
],
root: rootPath,
fallback: rootPath
},
resolveLoader: {
alias: {
'systemjs-loader': helpers.root('config', 'loaders', 'system.js')
},
fallback: rootPath
},
module: {
preLoaders: [
{
test: /\.js$/,
include: [
...alfrescoLibs
],
loader: 'source-map-loader'
}
],
loaders: [
{
test: /\.ts$/,
loaders: ['awesome-typescript-loader', 'angular2-template-loader', 'systemjs-loader'],
exclude: ['node_modules','public']
},
{
test: /\.js$/,
include: [
...alfrescoLibs
],
loaders: ['angular2-template-loader', 'source-map-loader', 'systemjs-loader']
},
{
test: /\.html$/,
loader: 'html'
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'null'
},
{
test: /\.css$/,
loader: 'raw'
}
]
},
node: {
fs: 'empty',
module: false
}
}
@@ -1,26 +0,0 @@
{
"LOGIN": {
"LOGO": "Alfresco",
"LABEL": {
"LOGIN": "Login",
"USERNAME": "Username",
"PASSWORD": "Password",
"REMEMBER": "Remember"
},
"MESSAGES": {
"USERNAME-REQUIRED": "Required",
"USERNAME-MIN": "Your username needs to be at least 4 characters.",
"PASSWORD-REQUIRED": "Enter your password to sign in",
"LOGIN-ERROR-CREDENTIALS": "You have entered an invalid username or password",
"LOGIN-ERROR-PROVIDERS": "Providers cannot be undefined",
"LOGIN-SUCCESS": "Login successful"
},
"BUTTON": {
"LOGIN": "SIGN IN"
},
"ACTION": {
"HELP": "NEED HELP?",
"REGISTER": "REGISTER"
}
}
}
@@ -1,25 +0,0 @@
{
"LOGIN": {
"LABEL": {
"LOGIN": "Autenticazione",
"USERNAME": "Nome utente",
"PASSWORD": "Password",
"REMEMBER": "Ricordami"
},
"MESSAGES": {
"USERNAME-REQUIRED": "Campo obbligatorio",
"USERNAME-MIN": "Inserire un nome utente di minimo 4 caratteri.",
"PASSWORD-REQUIRED": "Campo obbligatorio",
"LOGIN-ERROR-CREDENTIALS": "Nome utente o password non validi",
"LOGIN-ERROR-PROVIDERS": "Providers non può essere nullo",
"LOGIN-SUCCESS": "Login effettuata con successo"
},
"BUTTON": {
"LOGIN": "Accedi"
},
"ACTION": {
"HELP": "BISOGNO DI AIUTO?",
"REGISTER": "REGISTRATI"
}
}
}
+57 -50
View File
@@ -5,69 +5,76 @@
<title>Demo Application - Angular 2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="app/css/app.css" rel="stylesheet">
<link href="app/css/muli-font.css" rel="stylesheet">
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96">
<!-- Google Material Design Lite -->
<link href="./assets/material.orange-blue.min.css" rel="stylesheet">
<script src="node_modules/material-design-lite/material.min.js"></script>
<link href="node_modules/material-design-icons/iconfont/material-icons.css" rel="stylesheet">
<link href="node_modules/flag-icon-css/css/flag-icon.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&amp;lang=en" rel="stylesheet" type="text/css">
<link href="node_modules/md-date-time-picker/dist/css/mdDateTimePicker.css" media="all" rel="stylesheet">
<!-- 1. Load libraries -->
<!-- Polyfill(s) for Safari (pre-10.x) -->
<script src="node_modules/intl/dist/Intl.min.js"></script>
<script src="node_modules/intl/locale-data/jsonp/en.js"></script>
<script src=js/Intl.min.js></script>
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/dom4/1.8.3/dom4.js"></script>
<script src="node_modules/element.scrollintoviewifneeded-polyfill/index.js"></script>
<!-- IE/FF -->
<script src=js/element.scrollintoviewifneeded-polyfill.js></script>
<!-- Polyfill(s) for dialogs -->
<script src="node_modules/dialog-polyfill/dialog-polyfill.js"></script>
<link href="node_modules/dialog-polyfill/dialog-polyfill.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<script src=js/shim.min.js></script>
<script src=//cdnjs.cloudflare.com/ajax/libs/dom4/1.8.3/dom4.js></script>
<script src=js/classlist-polyfill.js></script>
<script src=js/web-animations.min.js></script>
<script src=js/typedarray.js></script>
<script src=js/Blob.js></script>
<script src=js/formdata.js></script>
<script src=https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js></script>
<script src=js/es5-shim.min.js></script>
<script src=js/es6-shim.min.js></script>
<script src=js/system-polyfills.js></script>
<![endif]-->
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- Google Material Design Lite -->
<link href="css/material.orange-blue.min.css" rel="stylesheet">
<script src="js/material.min.js"></script>
<link href="css/iconfont/material-icons.css" rel="stylesheet">
<script src="node_modules/moment/min/moment.min.js"></script>
<script src="/app/js/Polyline.js"></script>
<script src="node_modules/pdfjs-dist/web/compatibility.js"></script>
<script src="node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="node_modules/pdfjs-dist/build/pdf.worker.js"></script>
<script src="node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
<script src="node_modules/chart.js/dist/Chart.bundle.min.js"></script>
<script src="node_modules/raphael/raphael.min.js"></script>
<script src="node_modules/md-date-time-picker/dist/js/mdDateTimePicker.min.js"></script>
<script src="node_modules/md-date-time-picker/dist/js/draggabilly.pkgd.min.js"></script>
<style>
.loader-container {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
-webkit-box-flex-direction: row;
-moz-box-flex-direction: row;
-webkit-flex-direction: row;
flex-direction: row;
height:100%;
}
<!-- Stencils integration -->
<script src="node_modules/ng2-activiti-form/stencils/runtime.ng1.js"></script>
<script src="node_modules/ng2-activiti-form/stencils/runtime.adf.js"></script>
<script src="http://localhost:9999/activiti-app/app/rest/script-files/controllers"></script>
.loader-item {
margin: auto;
max-height:100px;
max-width:300px;
}
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
.loader-text{
white-space: nowrap;
text-align: center;
position: relative;
}
</style>
</head>
<!-- 3. Display the application -->
<body>
<alfresco-app>
<div id="loader-container" class="loader-container">
<div class="loader-item">
<div id="loader-spin" class="mdl-progress mdl-js-progress mdl-progress__indeterminate"></div>
<div id="loader-text" class="loader-text">Loading Demo Shell..</div>
</div >
<alfresco-app>
<div id="loader-container" class="loader-container">
<div class="loader-item">
<div id="loader-spin" class="mdl-progress mdl-js-progress mdl-progress__indeterminate is-upgraded"
data-upgraded=",MaterialProgress">
<div class="progressbar bar bar1" style="width: 0%;"></div>
<div class="bufferbar bar bar2" style="width: 100%;"></div>
<div class="auxbar bar bar3" style="width: 0%;"></div>
</div>
<div id="loader-text" class="loader-text">Loading Demo Shell..</div>
</div>
</alfresco-app>
</div>
</alfresco-app>
</body>
</html>
+1
View File
@@ -0,0 +1 @@
module.exports = require('./config/karma.conf.js');
+85 -56
View File
@@ -1,19 +1,18 @@
{
"name": "Alfresco-Angular2-Demo",
"description": "Demo shell for Alfresco Angular2 components",
"version": "0.5.0",
"version": "1.3.0",
"author": "Alfresco Software, Ltd.",
"scripts": {
"clean": "npm install rimraf && rimraf dist node_modules typings",
"build": "npm run tslint && npm run tsc && npm run licensecheck",
"start": "npm run build && npm run serve",
"start:dev": "npm run build && concurrently \"npm run tsc:w\" \"npm run serve:dev\" ",
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings dist",
"start": "npm run server-versions && webpack-dev-server --progress --max_old_space_size=4096 --max_new_space_size=4096",
"start:dist": "wsrv -s dist/ -p 3000 -a 0.0.0.0",
"clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'",
"test": "karma start",
"build": "npm run tslint && npm run server-versions && rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
"server-versions": "rimraf versions.json && npm list --depth=0 --json=true --prod=true > versions.json || exit 0",
"aws": "node app.js",
"tsc": "tsc",
"tsc:w": "tsc -w",
"serve": "wsrv -O http://localhost:3000 -s -p 3000 -a 0.0.0.0 -x ./server/versions.js",
"serve:dev": "wsrv -O http://localhost:3000 -s -l -p 3000 -a 0.0.0.0 -x ./server/versions.js",
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'app/{,**/}**.ts'",
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'app/{,**/}**.ts' -e 'app/vendor.ts' -e 'app/polyfills.ts' ",
"licensecheck": "license-check"
},
"repository": {
@@ -53,61 +52,91 @@
"alfresco"
],
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.27",
"zone.js": "^0.6.23",
"rimraf": "2.5.2",
"@angular/common": "2.2.2",
"@angular/compiler": "2.2.2",
"@angular/compiler-cli": "2.2.2",
"@angular/core": "2.2.2",
"@angular/forms": "2.2.2",
"@angular/http": "2.2.2",
"@angular/material": "2.0.0-beta.1",
"@angular/platform-browser": "2.2.2",
"@angular/platform-browser-dynamic": "2.2.2",
"@angular/router": "3.2.2",
"@angular/upgrade": "2.2.2",
"alfresco-js-api": "~1.3.0",
"chart.js": "2.5.0",
"core-js": "2.4.1",
"dialog-polyfill": "0.4.7",
"element.scrollintoviewifneeded-polyfill": "1.0.1",
"flag-icon-css": "2.3.0",
"hammerjs": "2.0.8",
"material-design-icons": "2.2.3",
"material-design-lite": "1.2.1",
"md-date-time-picker": "2.2.0",
"moment": "2.15.1",
"ng2-3d-editor": "0.0.15",
"ng2-activiti-analytics": "1.3.0",
"ng2-activiti-form": "1.3.0",
"ng2-activiti-processlist": "1.3.0",
"ng2-activiti-tasklist": "1.3.0",
"ng2-alfresco-core": "1.3.0",
"ng2-alfresco-datatable": "1.3.0",
"ng2-alfresco-documentlist": "1.3.0",
"ng2-alfresco-login": "1.3.0",
"ng2-alfresco-search": "1.3.0",
"ng2-alfresco-tag": "1.3.0",
"ng2-alfresco-upload": "1.3.0",
"ng2-alfresco-userinfo": "1.3.0",
"ng2-alfresco-viewer": "1.3.0",
"ng2-alfresco-webscript": "1.3.0",
"ng2-charts": "1.5.0",
"ng2-translate": "2.5.0",
"pdfjs-dist": "1.5.404",
"flag-icon-css": "2.3.0",
"intl": "1.2.4",
"moment": "2.15.1",
"chart.js": "^2.1.4",
"ng2-charts": "1.1.0",
"raphael": "^2.2.6",
"md-date-time-picker": "^2.2.0",
"alfresco-js-api": "^0.5.0",
"ng2-activiti-analytics": "0.5.0",
"ng2-alfresco-core": "0.5.0",
"ng2-alfresco-datatable": "0.5.0",
"ng2-alfresco-documentlist": "0.5.0",
"ng2-alfresco-login": "0.5.0",
"ng2-alfresco-search": "0.5.0",
"ng2-alfresco-upload": "0.5.0",
"ng2-alfresco-viewer": "0.5.0",
"ng2-activiti-form": "0.5.0",
"ng2-activiti-tasklist": "0.5.0",
"ng2-alfresco-userinfo": "0.5.0",
"ng2-activiti-processlist": "0.5.0",
"ng2-alfresco-webscript": "0.5.0",
"ng2-alfresco-tag": "0.5.0",
"dialog-polyfill": "^0.4.3",
"element.scrollintoviewifneeded-polyfill": "^1.0.1"
"raphael": "2.2.7",
"reflect-metadata": "0.1.10",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.27",
"zone.js": "0.6.26"
},
"devDependencies": {
"@types/core-js": "^0.9.32",
"@types/jasmine": "^2.2.33",
"concurrently": "^2.2.0",
"@types/hammerjs": "^2.0.34",
"@types/jasmine": "2.5.35",
"@types/node": "6.0.45",
"angular2-template-loader": "^0.6.0",
"awesome-typescript-loader": "^2.2.4",
"classlist-polyfill": "^1.0.3",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.23.1",
"es5-shim": "^4.5.9",
"es6-shim": "^0.35.2",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"glob": "^7.1.1",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.15.0",
"intl": "^1.2.5",
"jasmine-core": "^2.4.1",
"karma": "^1.2.0",
"karma-chrome-launcher": "2.0.0",
"karma-jasmine": "^1.0.2",
"karma-mocha-reporter": "^2.2.1",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"license-check": "1.1.5",
"mime": "^1.3.4",
"null-loader": "^0.1.1",
"raw-loader": "^0.5.1",
"rimraf": "^2.5.2",
"script-loader": "^0.7.0",
"source-map-loader": "^0.1.5",
"style-loader": "^0.13.1",
"tslint": "3.15.1",
"typescript": "^2.0.3",
"wsrv": "^0.1.5"
"typescript": "2.0.3",
"web-animations-js": "^2.2.2",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1",
"webpack-merge": "^0.14.0",
"wsrv": "^0.1.6"
},
"license-check-config": {
"src": [
File diff suppressed because one or more lines are too long
+64
View File
@@ -0,0 +1,64 @@
/* Utils */
body, html {
height: 100%;
}
.p-10 {
padding: 10px;
}
.m-10 {
margin: 10px;
}
.loader-container {
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */
display: -webkit-flex; /* NEW - Chrome */
display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */
-webkit-box-flex-direction: row;
-moz-box-flex-direction: row;
-webkit-flex-direction: row;
flex-direction: row;
height: 100%;
}
.loader-item {
margin: auto;
max-height: 100px;
max-width: 300px;
}
.loader-text {
white-space: nowrap;
text-align: center;
position: relative;
}
._dialog_overlay {
position: static !important;
}
.main_header_adf .mdl-layout__drawer-button {
right: 0 !important;
left: initial !important;
left: auto;
}
.mdl-layout__header {
color: rgb(255, 255, 255);
background-color: rgb(31, 188, 210);
}
.mdl-layout__header .material-icons {
color: rgb(255, 255, 255);
}
.mdl-layout__header-row .mdl-navigation__link {
color: rgb(255, 255, 255);
}
.md-simple-snackbar-action {
border: 0px;
cursor: pointer;
}
File diff suppressed because one or more lines are too long
+211
View File
@@ -0,0 +1,211 @@
/* Blob.js
* A Blob implementation.
* 2014-07-24
*
* By Eli Grey, http://eligrey.com
* By Devin Samarin, https://github.com/dsamarin
* License: MIT
* See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
*/
/*global self, unescape */
/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
plusplus: true */
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
(function (view) {
"use strict";
view.URL = view.URL || view.webkitURL;
if (view.Blob && view.URL) {
try {
new Blob;
return;
} catch (e) {}
}
// Internally we use a BlobBuilder implementation to base Blob off of
// in order to support older browsers that only have BlobBuilder
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) {
var
get_class = function(object) {
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
}
, FakeBlobBuilder = function BlobBuilder() {
this.data = [];
}
, FakeBlob = function Blob(data, type, encoding) {
this.data = data;
this.size = data.length;
this.type = type;
this.encoding = encoding;
}
, FBB_proto = FakeBlobBuilder.prototype
, FB_proto = FakeBlob.prototype
, FileReaderSync = view.FileReaderSync
, FileException = function(type) {
this.code = this[this.name = type];
}
, file_ex_codes = (
"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR "
+ "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR"
).split(" ")
, file_ex_code = file_ex_codes.length
, real_URL = view.URL || view.webkitURL || view
, real_create_object_URL = real_URL.createObjectURL
, real_revoke_object_URL = real_URL.revokeObjectURL
, URL = real_URL
, btoa = view.btoa
, atob = view.atob
, ArrayBuffer = view.ArrayBuffer
, Uint8Array = view.Uint8Array
, origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/
;
FakeBlob.fake = FB_proto.fake = true;
while (file_ex_code--) {
FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
}
// Polyfill URL
if (!real_URL.createObjectURL) {
URL = view.URL = function(uri) {
var
uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a")
, uri_origin
;
uri_info.href = uri;
if (!("origin" in uri_info)) {
if (uri_info.protocol.toLowerCase() === "data:") {
uri_info.origin = null;
} else {
uri_origin = uri.match(origin);
uri_info.origin = uri_origin && uri_origin[1];
}
}
return uri_info;
};
}
URL.createObjectURL = function(blob) {
var
type = blob.type
, data_URI_header
;
if (type === null) {
type = "application/octet-stream";
}
if (blob instanceof FakeBlob) {
data_URI_header = "data:" + type;
if (blob.encoding === "base64") {
return data_URI_header + ";base64," + blob.data;
} else if (blob.encoding === "URI") {
return data_URI_header + "," + decodeURIComponent(blob.data);
} if (btoa) {
return data_URI_header + ";base64," + btoa(blob.data);
} else {
return data_URI_header + "," + encodeURIComponent(blob.data);
}
} else if (real_create_object_URL) {
return real_create_object_URL.call(real_URL, blob);
}
};
URL.revokeObjectURL = function(object_URL) {
if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
real_revoke_object_URL.call(real_URL, object_URL);
}
};
FBB_proto.append = function(data/*, endings*/) {
var bb = this.data;
// decode data to a binary string
if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
var
str = ""
, buf = new Uint8Array(data)
, i = 0
, buf_len = buf.length
;
for (; i < buf_len; i++) {
str += String.fromCharCode(buf[i]);
}
bb.push(str);
} else if (get_class(data) === "Blob" || get_class(data) === "File") {
if (FileReaderSync) {
var fr = new FileReaderSync;
bb.push(fr.readAsBinaryString(data));
} else {
// async FileReader won't work as BlobBuilder is sync
throw new FileException("NOT_READABLE_ERR");
}
} else if (data instanceof FakeBlob) {
if (data.encoding === "base64" && atob) {
bb.push(atob(data.data));
} else if (data.encoding === "URI") {
bb.push(decodeURIComponent(data.data));
} else if (data.encoding === "raw") {
bb.push(data.data);
}
} else {
if (typeof data !== "string") {
data += ""; // convert unsupported types to strings
}
// decode UTF-16 to binary string
bb.push(unescape(encodeURIComponent(data)));
}
};
FBB_proto.getBlob = function(type) {
if (!arguments.length) {
type = null;
}
return new FakeBlob(this.data.join(""), type, "raw");
};
FBB_proto.toString = function() {
return "[object BlobBuilder]";
};
FB_proto.slice = function(start, end, type) {
var args = arguments.length;
if (args < 3) {
type = null;
}
return new FakeBlob(
this.data.slice(start, args > 1 ? end : this.data.length)
, type
, this.encoding
);
};
FB_proto.toString = function() {
return "[object Blob]";
};
FB_proto.close = function() {
this.size = 0;
delete this.data;
};
return FakeBlobBuilder;
}(view));
view.Blob = function(blobParts, options) {
var type = options ? (options.type || "") : "";
var builder = new BlobBuilder();
if (blobParts) {
for (var i = 0, len = blobParts.length; i < len; i++) {
if (Uint8Array && blobParts[i] instanceof Uint8Array) {
builder.append(blobParts[i].buffer);
}
else {
builder.append(blobParts[i]);
}
}
}
var blob = builder.getBlob(type);
if (!blob.slice && blob.webkitSlice) {
blob.slice = blob.webkitSlice;
}
return blob;
};
var getPrototypeOf = Object.getPrototypeOf || function(object) {
return object.__proto__;
};
view.Blob.prototype = getPrototypeOf(new view.Blob());
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
+37
View File
@@ -0,0 +1,37 @@
/**
* Emulate FormData for some browsers
* MIT License
* (c) 2010 François de Metz
*/
(function(w) {
if (w.FormData)
return;
function FormData() {
this.fake = true;
this.boundary = "--------FormData" + Math.random();
this._fields = [];
}
FormData.prototype.append = function(key, value) {
this._fields.push([key, value]);
}
FormData.prototype.toString = function() {
var boundary = this.boundary;
var body = "";
this._fields.forEach(function(field) {
body += "--" + boundary + "\r\n";
// file upload
if (field[1].name) {
var file = field[1];
body += "Content-Disposition: form-data; name=\""+ field[0] +"\"; filename=\""+ file.name +"\"\r\n";
body += "Content-Type: "+ file.type +"\r\n\r\n";
body += file.getAsBinary() + "\r\n";
} else {
body += "Content-Disposition: form-data; name=\""+ field[0] +"\";\r\n\r\n";
body += field[1] + "\r\n";
}
});
body += "--" + boundary +"--";
return body;
}
w.FormData = FormData;
})(window);
@@ -0,0 +1,3 @@
/* Disable minification (remove `.min` from URL path) for more info */
(function(undefined) {if (!('Symbol' in this && 'iterator' in this.Symbol && !!Array.prototype[Symbol.iterator] && !!Array.prototype.values && (Array.prototype[Symbol.iterator] === Array.prototype.values))) {Object.defineProperty(Array.prototype,"values",{value:Array.prototype[Symbol.iterator],enumerable:!1,writable:!1});}if (!('contains' in String.prototype)) {String.prototype.contains=String.prototype.includes;}var ArrayIterator=function(){var e=function(){var e=function(){return this.length=0,this},t=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},_=function(e,n){return this instanceof _?(Object.defineProperties(this,{__list__:{writable:!0,value:e},__context__:{writable:!0,value:n},__nextIndex__:{writable:!0,value:0}}),void(n&&(t(n.on),n.on("_add",this._onAdd.bind(this)),n.on("_delete",this._onDelete.bind(this)),n.on("_clear",this._onClear.bind(this))))):new _(e,n)};return Object.defineProperties(_.prototype,Object.assign({constructor:{value:_,configurable:!0,enumerable:!1,writable:!0},_next:{value:function(){var e;if(this.__list__)return this.__redo__&&(e=this.__redo__.shift(),void 0!==e)?e:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()},configurable:!0,enumerable:!1,writable:!0},next:{value:function(){return this._createResult(this._next())},configurable:!0,enumerable:!1,writable:!0},_createResult:{value:function(e){return void 0===e?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}},configurable:!0,enumerable:!1,writable:!0},_resolve:{value:function(e){return this.__list__[e]},configurable:!0,enumerable:!1,writable:!0},_unBind:{value:function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd.bind(this)),this.__context__.off("_delete",this._onDelete.bind(this)),this.__context__.off("_clear",this._onClear.bind(this)),this.__context__=null)},configurable:!0,enumerable:!1,writable:!0},toString:{value:function(){return"[object Iterator]"},configurable:!0,enumerable:!1,writable:!0}},{_onAdd:{value:function(e){if(!(e>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void Object.defineProperty(this,"__redo__",{value:[e],configurable:!0,enumerable:!1,writable:!1});this.__redo__.forEach(function(t,_){t>=e&&(this.__redo__[_]=++t)},this),this.__redo__.push(e)}},configurable:!0,enumerable:!1,writable:!0},_onDelete:{value:function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,_){t>e&&(this.__redo__[_]=--t)},this)))},configurable:!0,enumerable:!1,writable:!0},_onClear:{value:function(){this.__redo__&&e.call(this.__redo__),this.__nextIndex__=0},configurable:!0,enumerable:!1,writable:!0}})),Object.defineProperty(_.prototype,Symbol.iterator,{value:function(){return this},configurable:!0,enumerable:!1,writable:!0}),Object.defineProperty(_.prototype,Symbol.toStringTag,{value:"Iterator",configurable:!1,enumerable:!1,writable:!1}),_}(),t=function(_,n){return this instanceof t?(e.call(this,_),n=n?String.prototype.contains.call(n,"key+value")?"key+value":String.prototype.contains.call(n,"key")?"key":"value":"value",void Object.defineProperty(this,"__kind__",{value:n,configurable:!1,enumerable:!1,writable:!1})):new t(_,n)};return Object.setPrototypeOf&&Object.setPrototypeOf(t,e.prototype),t.prototype=Object.create(e.prototype,{constructor:{value:t,configurable:!0,enumerable:!1,writable:!0},_resolve:{value:function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e},configurable:!0,enumerable:!1,writable:!0},toString:{value:function(){return"[object Array Iterator]"},configurable:!0,enumerable:!1,writable:!0}}),t}();}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
File diff suppressed because it is too large Load Diff
@@ -4,6 +4,7 @@
"DOCUMENT_LIST": {
"COLUMNS": {
"DISPLAY_NAME": "Display name",
"TAG": "Tag",
"CREATED_BY": "Created by",
"CREATED_ON": "Created on"
},
@@ -4,6 +4,7 @@
"DOCUMENT_LIST": {
"COLUMNS": {
"DISPLAY_NAME": "Mostra name",
"TAG": "Tag",
"CREATED_BY": "Creato da",
"CREATED_ON": "Creato il"
},
-42
View File
@@ -1,42 +0,0 @@
'use strict';
// wsrv extension that provides dynamic '/versions' route
exports.register = function (server, options, next) {
var packages = [
'ng2-activiti-form',
'ng2-alfresco-core',
'ng2-alfresco-datatable',
'ng2-alfresco-documentlist',
'ng2-alfresco-login',
'ng2-alfresco-search',
'ng2-alfresco-upload',
'ng2-alfresco-viewer',
'ng2-alfresco-webscript'
];
server.route({
method: 'GET',
path: '/versions',
handler: function (request, reply) {
var result = {
packages: packages.map(function (packageName) {
return {
name: packageName,
version: require('./../node_modules/' + packageName + '/package.json').version
}
})
};
return reply(result).type('application/json');
}
});
next();
};
exports.register.attributes = {
name: 'ng2-module-versions',
version: '1.0.0'
};
-76
View File
@@ -1,76 +0,0 @@
/**
* System configuration for Angular 2 samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
// other libraries
'rxjs': 'npm:rxjs',
'moment': 'npm:moment/min/moment.min.js',
'ng2-charts' : 'npm:ng2-charts',
'ng2-translate': 'npm:ng2-translate',
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist',
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
'ng2-alfresco-userinfo': 'npm:ng2-alfresco-userinfo/dist',
'ng2-activiti-analytics': 'npm:ng2-activiti-analytics/dist',
'ng2-activiti-diagrams': 'npm:ng2-activiti-diagrams/dist'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
app: {
main: './main.js',
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
},
'ng2-translate': { defaultExtension: 'js' },
'ng2-charts': { defaultExtension: 'js' },
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'ng2-alfresco-userinfo': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-analytics': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-diagrams': { main: './index.js', defaultExtension: 'js'}
}
});
})(this);
+5 -7
View File
@@ -1,19 +1,17 @@
{
"compilerOptions": {
"target": "es5",
"module": "system",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"lib": ["es2015", "dom"],
"noImplicitAny": false,
"types": ["core-js", "jasmine"]
"suppressImplicitAnyIndexErrors": true,
"noResolve": true
},
"exclude": [
"dist",
"node_modules",
"typings/main",
"typings/main.d.ts"
"node_modules"
]
}
+4 -6
View File
@@ -3,7 +3,6 @@
"align": [
true,
"parameters",
"arguments",
"statements"
],
"ban": false,
@@ -29,15 +28,14 @@
],
"member-ordering": [
true,
"public-before-private",
"static-before-instance",
"variables-before-functions"
],
"no-any": false,
"no-arg": true,
"no-bitwise": true,
"no-bitwise": false,
"no-conditional-assignment": true,
"no-consecutive-blank-lines": false,
"no-consecutive-blank-lines": true,
"no-console": [
true,
"debug",
@@ -51,11 +49,11 @@
"no-debugger": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-empty": false,
"no-eval": true,
"no-inferrable-types": false,
"no-internal-module": true,
"no-require-imports": true,
"no-require-imports": false,
"no-shadowed-variable": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
+1
View File
@@ -0,0 +1 @@
module.exports = require('./config/webpack.dev.js');
-14
View File
@@ -1,14 +0,0 @@
{
"watch": [
"node_modules/ng2-alfresco-core/dist/**/*.{html,css,js}",
"node_modules/ng2-alfresco-datatable/dist/**/*.{html,css,js}",
"node_modules/ng2-alfresco-documentlist/dist/**/*.{html,css,js}",
"node_modules/ng2-alfresco-login/dist/**/*.{html,css,js}",
"node_modules/ng2-alfresco-search/dist/**/*.{html,css,js}",
"node_modules/ng2-alfresco-upload/dist/**/*.{html,css,js}",
"node_modules/ng2-alfresco-viewer/dist/**/*.{html,css,js}",
"node_modules/ng2-alfresco-webscript/dist/**/*.{html,css,js}",
"node_modules/ng2-activiti-form/dist/**/*.{html,css,js}",
"node_modules/ng2-activiti-tasklist/dist/**/*.{html,css,js}"
]
}
+11
View File
@@ -0,0 +1,11 @@
---
buildName: "adf2"
links:
Git: "https://github.com/Alfresco/alfresco-ng2-components.git"
Job: "http://192.168.64.3:31752/job/adf2"
Production: "http://10.0.0.114:80/kubernetes/pods?namespace=default-production"
Staging: "http://10.0.0.114:80/kubernetes/pods?namespace=default-staging"
environments:
Staging: "default-staging"
Production: "default-production"
useLocalFlow: true
@@ -6,10 +6,14 @@ coverage
dist
src/**/*.js
src/**/*.js.map
src/**/*.d.ts
demo/**/*.js
demo/**/*.js.map
demo/**/*.d.ts
index.js
index.js.map
!systemjs.config.js
*.tgz
/package/
/bundles/
index.d.ts
@@ -2,14 +2,15 @@ npm-debug.log
.idea
coverage/
demo/
node_modules
typings/
fonts/
/.editorconfig
/.travis.yml
/*.js
/*.json
/*.ts
/*.js.map
/karma-test-shim.js
/karma.conf.js
/gulpfile.ts
/.npmignore
@@ -69,6 +69,9 @@ Follow the 3 steps below:
<script src="node_modules/material-design-lite/material.min.js"></script>
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
<!-- Load the Angular Material 2 stylesheet -->
<link href="node_modules/@angular/material/core/theming/prebuilt/deeppurple-amber.css" rel="stylesheet">
<!-- Polyfill(s) for Safari (pre-10.x) -->
<script src="node_modules/intl/dist/Intl.min.js"></script>
<script src="node_modules/intl/locale-data/jsonp/en.js"></script>
@@ -101,15 +104,14 @@ Follow the 3 steps below:
- ng2-activiti-diagrams
- ng2-activiti-analytics
Please refer to the following example file: [systemjs.config.js](demo/systemjs
.config.js) .
Please refer to the following example file: [systemjs.config.js](demo/systemjs.config.js) .
## Basic usage example Activiti Analytics List
The component shows the list of all the available reports
```html
<analytics-report-list></analytics-report-list>
<analytics-report-list [layoutType]="'LIST'"></analytics-report-list>
```
Usage example of this component :
@@ -129,7 +131,7 @@ import { AnalyticsModule } from 'ng2-activiti-analytics';
<div class="page-content">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--8-col task-column mdl-shadow--2dp">
<analytics-report-list></analytics-report-list>
<analytics-report-list [layoutType]="'LIST'"></analytics-report-list>
</div>
</div>
</div>`
@@ -176,7 +178,9 @@ platformBrowserDynamic().bootstrapModule(AppModule);
#### Options
No options.
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `layoutType` | {string} | required | Define the layout of the apps. There are two possible values: GRID or LIST. LIST is the default value|
## Basic usage example Activiti Analytics
@@ -203,7 +207,7 @@ import { AnalyticsModule } from 'ng2-activiti-analytics';
<div class="page-content">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--8-col task-column mdl-shadow--2dp">
<activiti-analytics [appId]="1001" [reportId]="2006"></activiti-analytics>
<activiti-analytics [appId]="1001" [reportId]="2006" [hideParameters]="false"></activiti-analytics>
</div>
</div>
</div>`
@@ -246,6 +250,8 @@ platformBrowserDynamic().bootstrapModule(AppModule);
| --- | --- |
|`onSuccess` | The event is emitted when the report parameters are loaded |
|`onError` | The event is emitted when an error occur during the loading |
|`reportSaved` | The event is emitted when a report is saved |
|`reportDeleted` | The event is emitted when a report is deleted |
#### Options
@@ -253,8 +259,40 @@ platformBrowserDynamic().bootstrapModule(AppModule);
| --- | --- |
|`appId` | The application id |
|`reportId` | The report id |
|`hideParameters` | Boolean to hide or show the analytics parameters |
|`debug` | Flag to enable or disable the Form values in the console log |
You can also use the activiti analytic component to show straight away the charts without show the parameters setting the hideParameters to true
```html
<activiti-analytics [appId]="appId" [reportId]="reportId" [hideParameters]="true"></activiti-analytics>
```
![Analytics-without-parameters](docs/assets/analytics-without-parameters.png)
## Basic usage example Analytics Generator
The component generate and show the charts
```html
<activiti-analytics-generator [reportId]="reportId" [reportParamQuery]="reportParamQuery"></activiti-analytics>
```
#### Events
| Name | Description |
| --- | --- |
|`onSuccess` | The event is emitted when the charts are loaded |
|`onError` | The event is emitted when an error occur during the loading |
#### Options
| Name | Description |
| --- | --- |
|`reportId` | The report id |
|`reportParamQuery` | The object contains all the parameters that the report needs |
## Build from sources
Alternatively you can build component from sources with the following commands:
@@ -0,0 +1,23 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[package.json]
indent_style = space
indent_size = 2
[karma.conf.js]
indent_style = space
indent_size = 2
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
@@ -5,15 +5,17 @@
"author": "Alfresco Software, Ltd.",
"main": "index.js",
"scripts": {
"clean": "npm install rimraf && rimraf dist node_modules typings dist",
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings dist",
"clean-build" : "rimraf 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts'",
"postinstall": "npm run build",
"start": "npm run build && concurrently \"npm run tsc:w\" \"npm run server\" ",
"server": "wsrv -o -s -l",
"build": "npm run tslint && rimraf dist && tsc",
"build:w": "npm run tslint && rimraf dist && tsc -w",
"build": "npm run tslint && npm run clean-build && npm run tsc",
"build:w": "npm run tslint && rimraf dist && npm run tsc:w",
"travis": "npm link ng2-alfresco-core ng2-activiti-diagrams",
"tsc": "tsc",
"tsc:w": "tsc -w",
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts"
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts -e '{,**/}**.d.ts'"
},
"license": "Apache-2.0",
"contributors": [
@@ -30,41 +32,41 @@
"activiti-diagrams"
],
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"@angular/common": "2.2.2",
"@angular/compiler": "2.2.2",
"@angular/compiler-cli": "2.2.2",
"@angular/core": "2.2.2",
"@angular/forms": "2.2.2",
"@angular/http": "2.2.2",
"@angular/platform-browser": "2.2.2",
"@angular/platform-browser-dynamic": "2.2.2",
"@angular/material": "2.0.0-beta.1",
"@angular/router": "3.2.2",
"@angular/upgrade": "2.2.2",
"core-js": "2.4.1",
"reflect-metadata": "0.1.10",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.27",
"zone.js": "^0.6.23",
"zone.js": "0.6.26",
"intl": "1.2.4",
"dialog-polyfill": "^0.4.3",
"element.scrollintoviewifneeded-polyfill": "^1.0.1",
"dialog-polyfill": "0.4.7",
"element.scrollintoviewifneeded-polyfill": "1.0.1",
"material-design-icons": "2.2.3",
"material-design-lite": "1.2.1",
"chart.js": "^2.1.4",
"md-date-time-picker": "^2.2.0",
"chart.js": "2.5.0",
"md-date-time-picker": "2.2.0",
"ng2-charts": "1.1.0",
"moment": "2.15.1",
"raphael": "^2.2.6",
"ng2-translate": "2.5.0",
"alfresco-js-api": "^0.5.0",
"ng2-alfresco-core": "0.5.0",
"ng2-activiti-diagrams": "0.5.0",
"ng2-activiti-analytics": "^0.5.0"
"alfresco-js-api": "~1.3.0",
"ng2-alfresco-core": "1.3.0",
"ng2-activiti-diagrams": "1.3.0",
"ng2-activiti-analytics": "1.3.0"
},
"devDependencies": {
"@types/node": "^6.0.42",
"@types/core-js": "^0.9.32",
"@types/jasmine": "^2.2.33",
"@types/node": "^6.0.42",
"concurrently": "^2.2.0",
"rimraf": "2.5.2",
"tslint": "^3.8.1",
@@ -18,49 +18,49 @@
import { NgModule, Component, OnInit } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService, StorageService, LogService } from 'ng2-alfresco-core';
import { AnalyticsModule } from 'ng2-activiti-analytics';
@Component({
selector: 'alfresco-app-demo',
template: `
<label for="ticket"><b>Insert a valid ticket:</b></label><br>
<input id="ticket" type="text" size="48" (change)="updateTicket()" [(ngModel)]="ticket"><br>
<label for="host"><b>Insert the ip of your Activiti instance:</b></label><br>
<input id="host" type="text" size="48" (change)="updateHost()" [(ngModel)]="host"><br><br>
<div *ngIf="!authenticated" style="color:#FF2323">
Authentication failed to ip {{ host }} with user: admin, admin, you can still try to add a valid ticket to perform
operations.
</div>
<hr>
<label for="ticket"><b>Insert a valid ticket:</b></label><br>
<input id="ticket" type="text" size="48" (change)="updateTicket()" [(ngModel)]="ticket"><br>
<label for="host"><b>Insert the ip of your Activiti instance:</b></label><br>
<input id="host" type="text" size="48" (change)="updateHost()" [(ngModel)]="host"><br><br>
<div *ngIf="!authenticated" style="color:#FF2323">
Authentication failed to ip {{ host }} with user: admin, admin, you can still try to add a valid ticket to perform
operations.
</div>
<hr>
<div class="page-content">
<label for="appId"><b>Insert the appId:</b></label><br>
<input id="appId" size="10" type="text" [(ngModel)]="appId">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col task-column mdl-shadow--2dp">
<analytics-report-list (reportClick)="onReportClick($event)"></analytics-report-list>
</div>
<div class="mdl-cell mdl-cell--8-col task-column mdl-shadow--2dp">
<activiti-analytics [appId]="appId" *ngIf="report" [reportId]="report.id"></activiti-analytics>
<div class="page-content">
<label for="appId"><b>Insert the appId:</b></label><br>
<input id="appId" size="10" type="text" [(ngModel)]="appId">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col task-column mdl-shadow--2dp">
<analytics-report-list (reportClick)="onReportClick($event)"></analytics-report-list>
</div>
<div class="mdl-cell mdl-cell--8-col task-column mdl-shadow--2dp">
<activiti-analytics [appId]="appId" *ngIf="report" [reportId]="report.id"></activiti-analytics>
</div>
</div>
</div>
</div>`
`
})
export class AnalyticsDemoComponent implements OnInit {
appId: number;
report: any;
authenticated: boolean;
host: string = 'http://localhost:9999';
ticket: string;
constructor(private authService: AlfrescoAuthenticationService, private settingsService: AlfrescoSettingsService) {
constructor(private authService: AlfrescoAuthenticationService,
private settingsService: AlfrescoSettingsService,
private storage: StorageService,
private logService: LogService) {
settingsService.bpmHost = this.host;
settingsService.setProviders('BPM');
@@ -74,7 +74,7 @@ export class AnalyticsDemoComponent implements OnInit {
}
public updateTicket(): void {
localStorage.setItem('ticket-BPM', this.ticket);
this.storage.setItem('ticket-BPM', this.ticket);
}
public updateHost(): void {
@@ -89,12 +89,12 @@ export class AnalyticsDemoComponent implements OnInit {
login() {
this.authService.login('admin', 'admin').subscribe(
ticket => {
console.log(ticket);
this.logService.log(ticket);
this.ticket = this.authService.getTicketBpm();
this.authenticated = true;
},
error => {
console.log(error);
this.logService.error(error);
this.authenticated = false;
});
}
@@ -11,7 +11,7 @@
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'dist',
app: 'src',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
@@ -21,15 +21,17 @@
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
'@angular/material': 'npm:@angular/material/bundles/material.umd.js',
// other libraries
'rxjs': 'npm:rxjs',
'moment': 'npm:moment/min/moment.min.js',
'ng2-charts': 'npm:ng2-charts',
'ng2-translate': 'npm:ng2-translate',
'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
'ng2-activiti-diagrams': 'npm:ng2-activiti-diagrams/dist',
'ng2-activiti-analytics': 'npm:ng2-activiti-analytics/dist'
'ng2-alfresco-core': 'npm:ng2-alfresco-core',
'ng2-activiti-diagrams': 'npm:ng2-activiti-diagrams',
'ng2-activiti-analytics': 'npm:ng2-activiti-analytics'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
@@ -40,6 +42,7 @@
rxjs: {
defaultExtension: 'js'
},
'moment': 'npm:moment/min/moment.min.js',
'ng2-translate': { defaultExtension: 'js' },
'ng2-charts': { main: 'ng2-charts.js', defaultExtension: 'js'},
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
@@ -3,11 +3,10 @@
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"removeComments": true,
"declaration": true,
"skipLibCheck": true,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
@@ -15,12 +14,19 @@
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"outDir": "dist",
"types": ["core-js", "jasmine", "node"]
"removeComments": true,
"declaration": true,
"lib": [
"es2015",
"dom"
],
"suppressImplicitAnyIndexErrors": true
},
"exclude": [
"demo",
"node_modules",
"dist"
]
"node_modules"
],
"angularCompilerOptions": {
"strictMetadataEmit": false,
"skipTemplateCodegen": true
}
}

Some files were not shown because too many files have changed in this diff Show More