Compare commits

...
542 Commits
Author SHA1 Message Date
Eugenio Romano ee5fe6dab9 1.9.0 (#2451)
* remove lock files

* [ADF-1516] added parsing on date check (#2301)

* Remove MDL from demo shell (#2302)

* [ADF-1492] Document List - Export ContentNodeSelectorComponent and ContentNodeSelectorComponentData (#2297)

* fix wrapped field resolving (#2305)

check for the type property before resolving a wrapped field (addresses issue with empty field objects)

* support redirection on successful login (#2306)

* new "document" widget (#2307)

* [ADF-1090] support custom dynamic table row validation (#2308)

* support custom dynamic table row validation

* test fixes

* export missing models

* allow loading layout presets from app.config (#2310)

* [ADF-1250] Remove MDL from Analytics (#2311)

* Removal of MDL dialog from report parameters

* Futher mdl removal

* Futher mdl removal

* Fixing demo shell icon position issues

* Futher mdl removal

* Futher mdl removal, tests fix

* Remove mdl leftover

* [ADF-1534] Automatic PDF rendering for unsupported types. (#2313)

* move viewer dialog to a separate folder

* make dialog take full screen size

* automatic PDF conversion

* mime type icon in the title

* [ADF-1530] correct plain text viewer resolving

* separate lightweigh pdf view for the dialog

* [ADF-1238] Removed mdl from alfresco search component (#2309)

* [ADF-1328] removed mdl from adf search

* [ADF-11328] removed mdl from search added theme style

* Fix failing tests

* Fix the last bit of stylings

* [ADF-1478] Make the pagination more responsive (#2315)

* [ADF-1444] Fix name display issue (#2317)

* fix memory leaks for pdf viewers (#2316)

* remove unused checkbox from demo shell (#2322)

* allow toggling viwer dialog toolbar elements (#2319)

* [ADF-1537] Fix check property defined (#2320)

* [ADF-1521] Form string type is not rendered (#2318)

* Fix missing string widget and task list loading

* Update tasklist.component.ts

call initStream

* avoid in app list long name are displayed under the logo. (#2323)

* remove max length attribute (#2321)

* remove unused document var

* Fix minimal responsiveness of demo app's activiti section (#2324)

* [ADF-1012] Hide delete checklist button when the checklist is in readonly mode (#2325)

* disable button to delete when the checklist is in readonly mode

* style issues

* fix test

* skipcount 0 after pagesize change (#2327)

* breadcrumb enhancements (#2328)

* [ADF-1247] Remove MDL from processlist package (#2329)

* Removing mdl stuff

* Further mdl removal

* Further mdl removal

* Removing mdl is finished

* unused label in search component

* [ADF-1547] tooltip fixes and enhancements (#2333)

* tooltip enhancements

* fix unit tests

* disable upload content for completed task (#2332)

use primary color for upload button in proccess attachment and task attachment

* doc update

* change name export module userinfo (#2334)

* [ADF-1543] Remove local copy of muli (#2335)

Use http request to load the font
Add the Muli font in all the theme
Remove the overwritten font-family not necessary

* [ADF-1544] app config file management refactoring (#2331)

* application configuration service refactoring

* fix demo shell

* remove logging to console

* [ADF-1515] Internationalization - ADF strings review (#2336)

* Update en.json

ADF-1515
Update to match Content Services terminology

* Update en.json

ADF-1515
Improvements to readability in line with docs.alfresco.com/writing-for-alfresco

* Update en.json

ADF-1515
Improvements to readability and consistency

* Update en.json

* Update en.json

ADF-1515
Fix typo

* Update en.json

ADF-1515
Updated for US spelling and consistency with docs.alfresco.com/writing-for-alfresco

* Update en.json

ADF-1515 - reduced word count

* Update en.json

ADF-1515
Readability improvements

* Update en.json

ADF-1515
Updates for readability and consistency

* Update en.json

ADF-1515
Updated for readability and consistency

* Update en.json

* Update en.json

* Update en.json

ADF-1515 - removed variables section as discussed w. Eugenio

* Update en.json

ADF-1515 - removed search label as discussed with Eugenio

* [ADF-1246] Remove mdl from Tasklist (#2339)

* Remove mdl from app list

* Remove mdl from adf-people

* Update prebuuilt styles

* Remove mdl dialog from task details

* Remove some mdl from checklist

* Further mdl removal

* Last mdl parts removed

* fix toolbar and page port view for size in small devices (#2338)

remove old alfresco and activiti prefix
fix login toggle mobile devices

* move readonly checklist from icon to button

* [ADF-1518] Update material2 beta 10 and angular 4.3.6 (#2304)

* ignore pkg lock

* update pkg json

* date picker update material beta.10

* isDateInstance moment adapter

* style and  datepicker update material2 beta 10

* update test dateitem to beta10

* regenerate style files

* use material icons web font

* fix data range material 2 beta 10

* minors cleaning

* recreate styles

* remove unused componentHandler var

* fix failing test checkbox

* [ADF-1488] reset selection on Document List data change (#2341)

* reset selection on data change

* unit tests

* fix unit tests

* [ADF-1549] Initial files for new doc format (#2342)

* [ADF-1555] add animation on show and hide of results (#2343)

* add animation on show and hide of results
make the style similar to the other material 2 menu
fix issue popup always stays on the screen
fix Search does not collapse if its input is focused

* minor code style issues

* minors fix and test fix

* fix app.config.json error in test

* update beta10 mat-menu-base method

* karma configuration all

* [ADF-1548] deprecate the usage of the "forRoot" methods in modules (#2344)

* remove CoreModule.forRoot

* remove forRoot methods

* fix form issues (lint)

* save js-api version in demo shell

* [ADF-1560] Process fields are not translated when starting a process and on process pag. (#2346)

* Detached extra curly brace in en.json.

* [ADF-1549] Added files for Core library (#2345)

* [ADF-1549] Added files for Core library

* [ADF-1549] Updated md files following checks

* [ADF-1549] Added doc files for Datatable library (#2348)

* fix people widget form component when no images are present (#2349)

* [ADF-1568] Clean polyfills (#2347)

Use msSaveOrOpenBlob in content service for save fiel in IE

* Disable the attachment component when the task/process is completed (#2351)

* [ADF-1549] Added doc files for Tasklist library (#2350)

* [ADF-1549] Added doc files for Processlist library (#2353)

* [ADF-1549] Added doc files for remaining Activiti libraries (#2354)

* Fix start task form (#2356)

* [ADF-1549] Added docs for Login, Search, Social and Tag (#2355)

* Disable drag drop parent component (#2357)

* [ADF-1549] Added docs for Upload, Userinfo, Viewer and Webscript (#2359)

* [ADF-1574] Info Drawer - Add a mechanism to know the current active tab (#2352)

* [ADF-1574] Info Drawer - Add a mechanism to know the current active tab

* Added a output event in adf-info-drawer component to get the currently active tab

* [ADF-1574] Info Drawer - Add a mechanism to know the current active tab

* Added a output event in adf-info-drawer component to get the currently active tab

* Added unit test file

* Updated info-drawer.md

* refactoring autocomplete fields form in order to use the material 2 autocomplete (#2358)

* proxy setup to fix native login dialog (for local runs) (#2363)

* [ADF-1364] Infinite scrolling for Copy & Move (#2362)

* Use infinite pagination for search also
* Fix highlight in copy & move
* Fix highlight and material menu issue
* Update documentation

* [ADF-1549] Improved formatting for doc index (#2365)

* [ADF-1549] Added undoc stoplist feature

* [ADF-1549] Better grouping of items in doc index

* [ADF-1549] Added undoc stoplist feature

* [ADF-1549] Better grouping of items in doc index

* [ADF-226] Add requeue button to task header (#2366)

* Add requeue button to task header

* Fixing typescript declaration

* [ADF-1238] Search debounce click issue fix and minor style clean (#2361)

* fix search issues no result table not shown
minor issues style button

* fix issue animation search input field debouncing toggle search

* fix test search
remove expandable probeprties

* remove test expand

* ripristinate expandable properties

* fix test

* [ADF-1584] remove primary color from user description in userinfo

* [ADF-1549] Moved docassets folder inside docs folder (#2367)

* Update package json typescript version (#2368)

* update package json typescript version

* fix test problem

* fix minor upload type bug

* improved "start:dist" script (#2369)

* Save host only when apply (#2371)

[ADF-1581] Demo shell - Improve host setting configuration check

* [ADF-1582] Revert error widget style modification (#2372)

* Revert error widget style modification

* Fix start form issues

* Fix call start form with processInstance instead of processDefinition (#2373)

* [ADF-1590] Cursor pointer is not displayed on expand/collapse Task and Process Filters (#2370)

* [ADF-1590] Cursor pointer is not displayed on expand/collapse Task and Process Filters

* Added property [cursor: pointer] in accordion-group.component.scss

* [ADF-1590] Cursor pointer is not displayed on expand/collapse Task and Process Filters

* Added property [cursor: pointer] in accordion-group.component.scss

* Added css property for expand/collapse problem on heading click

* Fix styles (#2376)

* Fix check taskList exist (#2375)

* [ADF-1585] - Fix datatable styles (#2374)

* Unify datatable hover and selection color

* Fix prebuilt styles collision

* Show missing list after starting a process (#2379)

* Fix dropdown should show the value in readonly mode (#2380)

* [ADF-1586] Added new Core doc files (#2383)

* Fix datewidget's moment issue (#2384)

* Update to comments for 508 compliance with translation (#2386)

* 508 fixes to bring the comments table into compliance. The <thead> element must be visible to users and <th> must display text that indicates what resides in the columns below.

* Updated to properly use the i18 translation

* fix minor typo: remove spaces from versions

* [ADF-1291] Attachment list is not instantly refreshed after upload (#2387)

* [ADF-1291] Attachment list after upload list is not instantly refreshed

* Implemented NgZone to ensure change detection

* [#2377 Github] Attachments control won't let you add a document you removed

* Reset the value of input after each upload so that change will be detected if the same file is selected repeatedly

* [#2377 Github] Attachments control won't let you add a document you removed

* Added test to make sure the input value is rest after upload

* [ADF-1595] Typeahead - Fetch the value from the process variables (#2388)

* Get the typeahead value from the process variables. We should not use the processDefinition to get again all the values

* Improve the dropdown widget

* Fix running process issue (#2391)

* [ADF-1608] Start Form - Improve the unit test cases. (#2390)

* * Covered more test case scenarios for start-form component

* [ADF-1608] Start Form - Improve the unit test cases.
* Refactored start-form.component.spec.ts
* Covered more test case scenarios for start-form component

* add style builder in demo shell for development purpose (#2385)

remove precompiled css theme from repository

* fix layout issues for report list (#2394)

* configurable 'supportedPageSizes' for document list (#2395)

* [ADF-1616] download zip dialog title (#2397)

* [ADF-1615] Datatable - The ellipsis class doesn't work for a custom template (#2398)

* Added ellipsis property for data-column rendered using custom html template

* [ADF-1613] logout directive (#2393)

* logout directive

* test fixes

* remove prebuilt theme

* Fix shared service design issue (#2399)

* fix build issues

* remove unused scss import

* Provide a multiselection property to select more than one row (#2389)

* [ADF-1583] Fix change detection error (the quick way) (#2396)

* Fix change detection error (the quick way)

* Fix it the second time

* raise keyboard events, improve task list keyboard handling (#2401)

* page title service (#2403)

* improved ecm auth guard (#2402)

* Fix dev build

* Fix input stylings for adf-people-search and modify existing fix for form inputs (#2405)

* 508 compliance fix for upload widget (#2406)

* 508 fixes to bring the comments table into compliance. The <thead> element must be visible to users and <th> must display text that indicates what resides in the columns below.

* Updated to properly use the i18 translation

* This is a 508 Compliance fix to add a keyup.enter, role, and tabindex to both the icon and span associated with the file upload widget. This will allow keyboard-only users the ability to tab to a file loaded with the Upload Widget and select the element using the enter key.

* [ADF-1549] Removed doc content from library README files (#2400)

* [ADF-1549] Removed doc content from library README files

* [ADF-1549] Removed doc content from library README files

* [ADF-1583] Fix change detection error (the quick way) (#2396)

* Fix change detection error (the quick way)

* Fix it the second time

* raise keyboard events, improve task list keyboard handling (#2401)

* [ADF-1549] Removed doc content from library README files

* [ADF-1549] Added doc update from Tasklist readme

* THe login component should check the minLength as default (#2407)

* Adding some responsiveness to demo shell app (#2408)

* Revert "Adding some responsiveness to demo shell app (#2408)" (#2410)

This reverts commit 6fa135faf3.

* [ADF-1623] routing integration for Viewer (#2404)

* routed viewer (demo app)

* toolbar support

* app menu component for demo shell

* navigate back button

* fix unit tests

* improve viewer type detection and rendering

* download button

* automatic pdf rendition, spinners, ui tweaks

* border for pdf pages

* scroll top support

* docs update

* info drawer placeholder

* [ADF-1632] Task Header - The default parent name value should be None (#2409)

* The default parent name should be None

* Fix trim

* add js doc

* Fix selection reset issue (#2414)

* Fix input line-height issue (#2417)

* fix closing search bar has not to trigger search (#2415)

* [ADF-1626] Fix double tabbing issue in datatable (#2416)

* Fix double tabbing issue in datatable

* Fix accessibility issue for process list

* add service suffix page title service (#2418)

* [ADF-1634] floating toolbar for PDF viewer (#2413)

* floating toolbar for PDF viewer

* use routing settings to toggle app menu

* remove dialog viewer

* remove duplicate menu

* fix error message size in login component (#2419)

* remove header duplicated webscript demo and move template in external HTML

* remove template old reference in documentation (#2421)

* remove console log (#2422)

* add presets document list in an external model (#2420)

* [ADF-1629] Fix check the visibility before render the form (#2423)

* support page picker for document list (#2424)

* [ADF-1586] Added new doc files for Document List library (#2427)

* [ADF-1611] Demo shell responsiveness (#2426)

* Reapplying the unreappliable

* Fix buggy search button

* Fix settings

* Last bit of responsive stylings

* Fix breadcrumb responsiveness (#2430)

* fix page size not being saved (#2429)

* [ADF-1640] Start form - Get the variables from the process instance API (#2425)

* Get the variables from the process instance API
/api/enterprise/process-instances/XXX
instead of
/api/enterprise/process-instances/382/variables
because the latest api returns 404 if the process is completed

* Fix unit test

* Add field id

* User info center title (#2432)

* [ADF-1586] Added doc files for Document List library (#2435)

* [ADF-1664] fix color text login for dark theme (#2433)

* fix color text login for dark theme

* fix test

* Update en.json (#2436)

A couple of very minor changes (I'll raise a Jira next time, sorry!)

* fix the menu height issue (#2438)

* Fix Form Service parseForm (#2440)

* [ADF-1636] fix issues with i18n resource composing (#2434)

* fix issues with i18n resource composing

merge resources instead of concatenating, make 'app' resource always load last

refs #2412

* unit tests

* type for style in remote env

* Change task/process on double click (#2439)

* [ADF-1674] align amount prefix widget

* fix user model process service and image loading (#2431)

* remove prebuilt-themes from npmignore

* public peopleProcessService in search component in order to use it in template

* [ADF-1676] hide fake content in the viewer (#2442)

* hide fake content in the viewer

* add missing property

* reset pagination on data source change (#2443)

* [ADF-1625] removed wrong select into typeahed widget, readded validati… (#2411)

* #ADF-1625 removed wrong select into typeahed widget, readded validation on blur

* #ADF-1625 added validator for typeahead fixed tests

* #ADF-1625 removed wrong fdescribe

* [ADF-1625] cleaned behaviour on typeahed

* [ADF-1625] fixed some selection bug on typeahed and start fixing test

* [ADF-1625] fixed typeahead test for autocomplete

* [ADF-1586] Updated Datatable docs (#2445)

* [ADF-1586] Updates to Datatable docs

* [ADF-1586] Fixed broken link in doc index page

* [ADF-1671] visibility fix use id instead of name during comparison (#2441)

* visibility fix use id instead of name during comparison

* fix tslint problems

* [ADF-1677] fix issues with paging (#2446)

* fix issues with paging

* update unit test

* make comments always editable for process (#2447)

make comments editable only when there are users involved

* change indentation task-details

* lint fix demo shell

* [ADF-1685] tasklist is not loading after logout

* pagination fixes (#2448)

* [ADF-1687] pass entire createdBy obj in user process constructor

* [ADF-1653] cleaned user suggestion when input type is an empty string (#2444)

* [ADF-1653] cleaned user suggestion when input type is an empty string

* [ADF-1653] removed wrong fdescribe

* [ADF-1653] improved behaviour of people widget

* Removed fdescribe

* [ADF-1689] fix task comment when the task is running (#2449)

* [ADF-1689] fix task comment when the task is running

* fix test

* reintroduce old name export BC clean postpone in 2.0.0

* [ADF-1688] Update value for the form field when is empty string (#2450)

* 1.9.0

* remove >>>  in favor of ::ng-deep
fix license check
2017-10-09 15:54:37 +01:00
Eugenio Romano 6516b9f0ce remove lock files 2017-09-05 18:38:35 +02:00
Popovics András 1ff9aa8e08 Remove piercing operators from components which lost the encapsulation (#2299) 2017-09-05 15:16:41 +01:00
Vito 233355ffe7 [ADF-1499] fixed validation and value setting on date widget (#2298)
* [ADF-1499] added fix for date widget usage

* [ADF-1499] improved date validator to match new date widget material
2017-09-05 15:16:41 +01:00
Eugenio Romano 50e61a0d08 1.8.0 bump version (#2296) 2017-09-05 15:16:41 +01:00
Popovics András 45bab0ebaf Make the login great again (#2295) 2017-09-05 15:16:41 +01:00
Eugenio Romano 7ba63d7182 fix minor theming issues (#2294) 2017-09-05 15:16:41 +01:00
Eugenio Romano a11fb3afb9 fix tab form service (#2293) 2017-09-05 15:16:41 +01:00
Eugenio Romano f6db06a585 add dynamic color background info drawer (#2292) 2017-09-05 15:16:41 +01:00
Eugenio Romano 2cd3c9c233 clean form name in task header only when change task id (#2291) 2017-09-05 15:16:41 +01:00
Enzo Rivello 0ff268108f Enzor/travis build (#2287)
* removing the directive to remove the node_modules folder

* publishing from travis

* beta and major gets pushed to the beta channel. only major get tagged to latest, in a different job
2017-09-05 15:16:41 +01:00
Popovics András 11cadbb01f Fix translation issues (#2290) 2017-09-05 15:16:41 +01:00
Maurizio Vitale 204ecd9842 Remove MDL from input field and use MD (#2289) 2017-09-05 15:16:41 +01:00
Vito 480b0e0e55 [ADF-1512] fixed required style problem and others minor twitch for form (#2283)
* [ADF-1381] added some fix for style on form

* [ADF-1381] fix some styles for form
2017-09-05 15:16:41 +01:00
Vito 4e50c4e2d6 [ADF-1458] revert changes applied for upload button (#2286)
* [ADF-1458] reverting changes from ADF-1458

* [ADF-1458] reapply default value to disabled

* [ADF-1458] revert changes on README

* [ADF-1458] update readme added more check for node permission checking

* [ADF-1458] reverting changes to tests

* [ADF-1458] revert changes for test directive
2017-09-05 15:16:41 +01:00
Mario Romano 62e50e8fbf [ADF-1498] fix pagination (#2288)
* fix pagination height missalignment ADF-1498

* [ADF-1498] fix pagination tasklist
2017-09-05 15:16:41 +01:00
Maurizio Vitale cd5c8842f2 [ADF-1494] Processlist Filter - Fix padding (#2279)
* Fix processlist padding

* Move css in property above
2017-09-05 15:16:41 +01:00
Popovics András af900ab0af Table header fix (#2285) 2017-09-05 15:16:41 +01:00
Mario Romano 5847ebede9 fix pagination height missalignment ADF-1498 (#2284) 2017-09-05 15:16:41 +01:00
Eugenio Romano ac2390cbdf appveyor fix build 2017-09-05 15:16:41 +01:00
Eugenio Romano f7e14b1028 move mat-input-prefix change only in amount sub class 2017-09-05 15:16:41 +01:00
Denys Vuika ffbfc8b87a [ADF-1502] Fixes for AoT checks in Angular CLI (#2282)
* Fixes for AoT checks in Angular CLI

* login fixes

- aot compatibility
- fix copyright symbol
- fix toggling password (operates within the component instead of the whole document)
- remove old MDL calls on error style check

* Search fixes

* login test fixes

* form fixes

- add WidgetComponent to the module
- remove missing 'focus' property from Hyperlink widget template/style

* task-list fixes

* process-list fixes

* analytics fixes
2017-09-05 15:16:41 +01:00
Popovics András 1ffb4619cb [ADF-1497] Fix missing drag & drop image and message (#2281) 2017-09-05 15:16:41 +01:00
Vito 1f66cf8c56 [ADF-1458] wrongly named input attribute - renamed disabled into disable (#2270)
* [ADF-1458] wrongly named input attribute - renamed disabled into disable

* [ADF 1458] renamed disabled attribute in disable
2017-09-05 15:16:41 +01:00
Deepak Paul 893252dd7a [ADF-1407] Editing a Report title should be aligned (#2278)
* Fixed report title alignment
2017-09-05 15:16:41 +01:00
Vito 53d8aa4a6f [ADF-1442] added selectedIndex managing for tab group on activiti demo (#2275)
* [ADF-1442] added selectedIndex managing for tab group on activiti demo

* [ADF-1442] removed old tab click managing
2017-09-05 15:16:41 +01:00
Maurizio Vitale cbe7db7ed2 [ADF-1487] ADF checklist - fix mdl issue (#2274)
* fix mdl issue in the next release we should redesign this component

* Implement the correct interface
2017-09-05 15:16:41 +01:00
Denys Vuika 7f720fda3a fix issues with the icons column in DT/DL (#2277)
* fix issues with the icons column in DT/DL

- fix issue with screen reader label not being translated
- fix issue with column taking the width of the screen reader label

* fix custom selection icon position
2017-09-05 15:16:41 +01:00
Denys Vuika 480bef7ad9 allow showing viewer based on only node id (#2257) 2017-09-05 15:16:41 +01:00
Denys Vuika 549cb505f8 info drawer integration support (#2259)
provides and toggles placeholder for the info drawer within the dialog
2017-09-05 15:16:41 +01:00
Popovics András 407e11664a [ADF-theming-fix] Fix theming related issues (#2276)
* First steps

* Every package have separate entry points for styling mixins

* Moving to config dir, and using it in demo shell

* Remove webpack config include path magic from activiti-form package

* Fixing all the webpack common configs and using relative paths in the prebuilt themes

* Datatable header fix

* Update documentation
2017-09-05 15:16:41 +01:00
Vito 738290ce37 [ADF-1458] applied custom attribute name to let changes flows into input (#2273) 2017-09-05 15:16:41 +01:00
Denys Vuika 9625484977 accessibility enhancements for datatable (#2266) 2017-09-05 15:16:41 +01:00
Deepak Paul 287630d40f [ADF-1466] Ng2-activiti-tasklist module uses NO_ERRORS_SCHEMA schema, which hides underlying error (#2271)
* [ADF-1466] Ng2-activiti-tasklist module uses NO_ERRORS_SCHEMA schema, which hides underlying error

* Added directives for the custom tags

* Replaced empty list tags with new directives

* Removed CUSTOM_ELEMENTS_SCHEMA document-list, task-list and process-list

* Handled empty attachment list sceeenario in attachment list

* [ADF-1466] Ng2-activiti-tasklist module uses NO_ERRORS_SCHEMA schema, which hides underlying error

* Added tests for disabled and non empty attachments scenario
2017-09-05 15:16:41 +01:00
Denys Vuika c9b7ddff90 update wsrv (#2268)
fixes console warning:
[DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
2017-09-05 15:16:41 +01:00
Deepak Paul d3602a16b1 [ADF-1480] Padding is missing from Task List (#2269)
* Fixed padding
* Migrated from mdl to md
* Removed additonal styles from demo-shell
2017-09-05 15:16:41 +01:00
Andy Stark 477ad3153a [ADF-1453] Restructure README.md files (#2272)
* ADF-1453: Restructured Activiti Diagrams readme

* [ADF-1453] Fixed README indexing script to handle linefeeds and Windows paths

* [ADF-1453] Including changes to readme indexing script
2017-09-05 15:16:41 +01:00
Denys Vuika 5f7d690db5 dynamic column layout support (#2260) 2017-09-05 15:16:41 +01:00
Vito 42ed604349 [ADF-1368] Delete a document onto document list update even the file upload dialog (#2267)
* [ADF-1368] adding success action event even form file deleted on document actions

* [ADF-1368] reflecting delete changes on documentlist

* [ADF-1368] added event on upload service when a file is deleted from external source

* [ADF-1368] pinned version beta8 for material

* [ADF-1368] added test cases for success event on documentlist actions delete
2017-09-05 15:16:41 +01:00
Denys Vuika e0ffeb0ea5 Revert "Added Tabbing to datatable and keyboard functionality (#2262)"
This reverts commit c05c882330.
2017-09-05 15:16:41 +01:00
tdonovancsra 6ccab88fd5 Added Tabbing to datatable and keyboard functionality (#2262) 2017-09-05 15:16:41 +01:00
Maurizio Vitale acbba18e22 Fix demo shell pagination style (#2265)
Add missing properties about the pagination inside the tasklist readme
2017-09-05 15:16:41 +01:00
tdonovancsra 96ad7e4bb0 508 alt tag added for thumbnail preview (#2263) 2017-09-05 15:16:41 +01:00
Denys Vuika 0333daae1c border style fixes for data table rows (#2264) 2017-09-05 15:16:41 +01:00
Vito 58c298fc25 [ADF-1381] improving the style for form reflecting UX spec (#2256)
* [ADF-1381] improving the style for form reflecting UX spec

* [ADF-1381] fix error message icon

* [ADF-1381] added more spec details to form widgets

* [ADF-1381] fixed wrong check

* [ADF-1381] removed wrong added deep into scss

* [ADF-1381] applied changes due the peer review

* [ADF-1381] missed whitespace
2017-09-05 15:16:41 +01:00
Vito a58ced408c [ADF-1454] resolved login switch problem (#2258) 2017-09-05 15:16:41 +01:00
Maurizio Vitale 5d22e78bb7 [ADF-1309] Task List Pagination (#2255)
* Basic version

* Fix pagination errors

* Fix error on complete task

* Add error

* Fix unit test

* Remove the external paginator component

* Rollback unit test about error event
2017-09-05 15:16:41 +01:00
Popovics András 8e3d84504a Fix pagination styling issues in documentlist and copy & move (#2252) 2017-09-05 15:16:41 +01:00
Cilibiu Bogdan e295a05a56 remove import colors (#2254) 2017-09-05 15:16:41 +01:00
Andy Stark 54f4a07f53 [ADF-1453] Restructure README.md files (#2239)
* ADF-1453: Restructured Activiti Analytics readme

* ADF-1453: Restructured Activiti Diagrams readme

* ADF-1453: Restructured Activiti Form readme

* ADF-1453: Restructured Activiti Process List readme

* ADF-1453: Restructured Activiti Task List readme

* ADF-1453: Restructured Alfresco Core readme

* [ADF-1453] Restructured DataTable readme

* [ADF-1453] Restructured Document List readme

* [ADF-1453] Restructured Login readme

* [ADF-1453] Restructured Alfresco Search readme

* [ADF-1453] Restructured Alfresco Social readme

* [ADF-1453] Restructured Alfresco Tag readme

* [ADF-1453] Restructured Alfresco User Info readme

* [ADF-1453] Restructured Alfresco Viewer readme

* [ADF-1453] Restructured Alfresco Webscript readme

* [ADF-1453] Fixed table display glitch

* [ADF-1453] Fixed Markdown lint errors in readme files

* [ADF-1453] Adding missing fileUploadDelete event to table in Upload readme

* [ADF-1453] Resolved merge conflict with Upload readme

* [ADF-1453] Changes from npm run doc
2017-09-05 15:16:41 +01:00
Deepak Paul 541cbcb258 [ADF-1432] Can not create a task (#2247)
* Changed assignee  to assigneeId to avoid script error
* Modified unit tests
2017-09-05 15:16:41 +01:00
Popovics András e852856a24 [ADF-1435] Info drawer (#2249)
* First version of adf-info-drawer with design make-ups for task details page

* Moving tabbing functionality into adf-info-drawer

* Update documentation
2017-09-05 15:16:41 +01:00
Cilibiu Bogdan e199d0cb6d [ADF-1457] Upload Dialog - Cancel all confirmation dialog (#2248)
* cancel all confirmation

* confirmation text
2017-09-05 15:16:41 +01:00
Cilibiu Bogdan 9e0d132353 also export NodeActionsService (#2250) 2017-09-05 15:16:41 +01:00
Enzo Rivello 179eda9d77 removing the directive to remove the node_modules folder (#2246) 2017-09-05 15:16:41 +01:00
jdosti 8a02af8260 Switching data automation id password for show/hide password. (#2245) 2017-09-05 15:16:41 +01:00
siva kumar 9f4739b3c7 [ADF-1456] timeAgo Pipe - Return invalid date when the input is empty. (#2240)
* [ADF-1456]  timeAgo Pipe - Return invalid date when the input is empty.

* Return the empty string instead of an Invalid Date error when  the given date is empty.
* Added test cases.

* [ADF-1456] timeAgo Pipe - Return invalid date when the input is empty.

* Changed test case to handle modified  time zone.
2017-09-05 15:16:41 +01:00
Vito 98cb6de595 [ADF-1237] removed material design lite from userinfo component (#2238)
* [ADF-1083] removing material design lite from userinfo component

* [ADF-1237] - styled userinfo component]

* [ADF-1237] removed material design lite from userinfo component

* [ADF-1237] updated readme with the two new options
2017-09-05 15:16:41 +01:00
Cilibiu Bogdan 07ba8bc15f [ADF-1403] Upload Dialog - Delete files event (#2234)
* remove provisional service

* Error and Delete events

* delete status

* separate upload events

* update demo

* files upload counter and errors

* pendig files icon and action

* remove multiple files error key

* handle cancel files

* fixed component theme

* remove fdescribe

* resolved comments

* throw error
2017-09-05 15:16:41 +01:00
Enzo Rivello 1deaa22570 removing node_modules after every publish will reduce the load on the host disk space. already tested on my travis project (#2232) 2017-09-05 15:16:41 +01:00
Maurizio Vitale 738074ef7c Rollback undescore change (#2237) 2017-09-05 15:16:41 +01:00
Maurizio Vitale 17e6b5eb42 ADF Theme Dev/Prod mode (#2236)
* Add undescore

* Move the scss logic from webpack common to dev/prod
Rollback the change about the color.scss name
2017-09-05 15:16:41 +01:00
Maurizio Vitale c168a88775 Add undescore (#2235) 2017-09-05 15:16:41 +01:00
Maurizio Vitale 4547fbdd99 bug fixes (#2233) 2017-09-05 15:16:41 +01:00
Eugenio Romano 7899b1f714 Update README.md 2017-09-05 15:16:41 +01:00
Eugenio Romano d4e64ac438 [ADF-1434] Theming ADF component (#2228)
* start custom theming adf

* demo shell cleaning

* login mdl cleaning

* uploader mdl cleaning

* prebuilt themes

* theme picker in demo shell

* clean custom colors and mdl

* fix rebase errors

* theming from color style guide

* dev default theme orange purple

* fix color accent inverted in picker

* fix test and add colors classes

* fix tag component theming issues

* fix datatable theming

* add theming guides
2017-09-05 15:16:41 +01:00
Popovics András f6f94fbd0c [ADF-1420] - Fix for 1420, 1425, 1426 and 1428 issues (#2231)
* Fix for ADF-1420 & ADF-1428

* Fix for ADF-1425 & ADF-1426
2017-09-05 15:16:41 +01:00
Denys Vuika 1aeedde442 support for basic mime types (#2229) 2017-09-05 15:16:41 +01:00
Vito 22db7bfc08 [ADF-1096] added cursor strategy to diagram tooltip (#2227)
* [ADF-1096] - added cursor strategy to diagram tooltip

* [ADF-1096] removed wrong console log

* [ADF-1096] removed wrong console log
2017-09-05 15:16:41 +01:00
Denys Vuika def3cbaee8 [ADF-1220] Extra data sources for Document List (#2224)
* initial trashcan support and demo page

* use testbed for unit tests

* support for restricting navigation for special data sources

* shared links mode, thumbnail fixes

* update unit tests

* improve Trashcan/SharedLinks columns

* Sites view for document list

* Favorites support for DL, upgrade to latest js-api (alpha)

* recent files support for document list

* support default presets

* readme updates and code fixes

* code fixes

* breadcrumb fixes

- show custom root node for certain scenarios
- fix css issues
- fix crash related to missing "path" property for certain scenarios

* toolbar style fixes

- addresses the shrinking issues with components embedded into toolbar (i.e. breadcrumb)

* i18n support for column presets

* unit tests
2017-09-05 15:16:41 +01:00
Popovics András 6b1742c5f0 Multiline text fix in form (#2226) 2017-09-05 15:16:41 +01:00
Popovics András f4a8ccc461 [ADF-1327] Fix group form field type to be treated as a container (#2225)
* Add group to container types

* Usage of FormFieldTypes.isReadOnlyType
2017-09-05 15:16:41 +01:00
Popovics András ac55704220 [ADF-1188] Upload related components, unify interfaces, deprecate disableWithNoPermission (#2216)
* Deprecate enabled input property in UploadDragAreaComponent

* Refactoring about disabled property

* using adf-node-permission directive, deprecating disableWithNoPermission

* Parent component access from directive

* Upliad drag area component uses the directive also

* Usage of property instead of helper method in the NodePermissionSubjects

* Fix small issues

* Update readme files
2017-09-05 15:16:41 +01:00
Eugenio Romano 9cd188aa4f restore color awareness in breadcrumbs 2017-09-05 15:16:41 +01:00
Denys Vuika 06e03ad1e9 [ADF-1404] Data Column enhancements for Document List (#2220)
* support 'timeAgo' format for data-column

* file size column type and bug fixes

* readme updates

* location column type

* readme fixes

* update unit tests

* file size pipe tests
2017-09-05 15:16:41 +01:00
Popovics András 9e5b19e34c [ADF-1329] Fix grid style in the activiti form (#2223)
* Fix form grid style

* Tests
2017-09-05 15:16:41 +01:00
Eugenio Romano f797e7df6a [ADF-1384] fix error and amount widget style problem (#2222) 2017-09-05 15:16:41 +01:00
Eugenio Romano 0443c2aed9 [ADF-1240] move from mdl to Material2 from tag component (#2221) 2017-09-05 15:16:41 +01:00
siva kumar 5e17c8e103 [ADF-1346] Attachment list component is shown for completed tasks/processes. (#2194)
* Added ng-content to adf-empty-list compoent.
* Updated css to scss.
* Added 'CUSTOM_ELEMENTS_SCHEMA'  to allow non-angular elements.
* Updated readme.mg file
2017-09-05 15:16:41 +01:00
Eugenio Romano ad75b6aa87 [ADF-1384] fix placeholder overlapping with label in form (#2212)
* fix placeholder overlapping with label in form

* fix import material module
2017-09-05 15:16:41 +01:00
Eugenio Romano 3bbc9d33df replace header analytics with adf-toolbar (#2218) 2017-09-05 15:16:41 +01:00
Eugenio Romano 8f5105d33f remove mdl from social component (#2219) 2017-09-05 15:16:41 +01:00
Maurizio Vitale a742e033d1 [ADF-1316] Add a new service assignByUserId (#2214) 2017-09-05 15:16:41 +01:00
Vito c3ad16bea7 [ADF-662] fix readonly button for upload and added event for show file in viewer (#2215) 2017-09-05 15:16:41 +01:00
Eugenio Romano 4e4c22389c [ADF-1052] remove mdl tab (#2213) 2017-09-05 15:16:41 +01:00
Eugenio Romano 95a881b87a remove debug option (#2211) 2017-09-05 15:16:41 +01:00
Eugenio Romano 56e65cd652 [ADF-1095] Date Range picker remains on screen remove md-data-picker (#2190)
* [ADF-1095] Date Range picker remains on screen

* created date widget component  with md datepicker.

* [ADF-1095] Date Range picker remains on screen.

* Changed mdl date picker to md date picker.
* Updated en.josn with new fields.
* Added md libraires to  spec files .

* [ADF-1095] Date Range picker remains on screen

* Removed old id's for start and end date inputs.

* remove md-date-time-picker

* use local MaterialModule in test

* [activiti-analytics] remove encapsulation and fix test

* remove from vendor md-date-time-picker
2017-09-05 15:16:41 +01:00
Eugenio Romano 6d30752386 [ADF-1169] validation date start task form (#2208)
* validation date start task form

* move mock test in before each of the creation component
2017-09-05 15:16:41 +01:00
Cristi Socea 7aecd13b6f [ADF-1386] If pagination attribute is undefined shows inconsistent range (#2210)
* Add classes to pagination to better style the layout, improve an i18n translation

* Fix default pagination only if there’s no input on init
2017-09-05 15:16:41 +01:00
Denys Vuika bb79190209 remove MDL dependencies and old toolbar (#2207) 2017-09-05 15:16:41 +01:00
Denys Vuika fc46830f7d [ADF-1021] custom tooltip formatter for data columns (#2206)
* custom tooltip formatter for data columns

* readme updates

* unit tests
2017-09-05 15:16:41 +01:00
Denys Vuika 09b213dd04 [ADF-1372] support for tooltips (Upload button) (#2204)
* support for tooltips (Upload button)

* readme update

* update layout to fix the tests

* remove test code
2017-09-05 15:16:41 +01:00
Vito 70ef58e03c [ADF-1083] Added user images profile as background to comment and involved people (#2198)
* [ADF-1083] start added image for user search

* [ADF-1083] - adding user images and style to involved people

* [ADF-1083] added loading of images after page refresh

* [ADF-1083] fixed problem related to memory leak and added scss style

* [ADF-1083] readded changes for user image

* [ADF-1083] start fixing test

* [ADF-1083] added user images to comment and profile

* [ADF-1083] Fixed processlist test

* [ADF-1083] removed mdl unused styles

* [ADF-1083] Applied design style

* [ADF-1083] fixed tests after rebase
2017-09-05 15:16:41 +01:00
Denys Vuika 8b4261acb3 [ADF-1374] Move download and create folder dialogs to ADF (#2205)
* move create folder and download zip dialogs to core

* code cleanup
2017-09-05 15:16:41 +01:00
Denys Vuika f3515ad02b selection management enhancements for DT/DL (#2209) 2017-09-05 15:16:41 +01:00
Denys Vuika 919f2a9fdf quick css fix for breadcrumb 2017-09-05 15:16:41 +01:00
Denys Vuika 10aa771940 fix the pdf.js setup (#2203) 2017-09-05 15:16:41 +01:00
Maurizio Vitale 426464a53c [ADF-1139] People search - Provide an API to reset the search (#2196)
* People search provide a way to reset the search

* Fix readme rules
2017-09-05 15:16:41 +01:00
Denys Vuika 81712d69d6 fix the build 2017-09-05 15:16:41 +01:00
Denys Vuika 003b0c133b [ADF-1356] Single configuration of i18n service per project (#2199)
* rework i18n layer init

* fix unit tests

* fix tests

* test fixes

* remove obsolete tests
2017-09-05 15:16:41 +01:00
Denys Vuika bb53844f92 Viewer enhancements and Viewer Dialog prototype (#2200)
* viewer dialog scaffold

* toolbar divider component

* simple error screen

* material module and tooltips

* show file name in the title

* improved settings, simple image viewer

* flex-based image viewer, minor fixes

* ability to switch between viewers

* single viewer for images

* remove MDL from the Viewer component

* remove hardcoded demo shell layout

remove harcoded assumptions on "header" and "main" elements

* rework text viewer, remove MDL dependency

* upgrade 'unknown format' view, remove MDL

* simplify media viewer layout

* simplify image viewer

* clean pdf viewer

* migrate pdf viewer styles to scss

* rewrite pdf viewer host styles in scss

* fix unit tests and cleanup layout

* file viewer service

* viewer dialog supports downloads if url provided
2017-09-05 15:16:41 +01:00
Cilibiu Bogdan d460824df4 prevent color inheritance (#2202) 2017-09-05 15:16:41 +01:00
Cilibiu Bogdan 4ec188141b [ADF-1358] Upload Dialog - Uploaded indicator should take in consideration cancelled files (#2197)
* indicate the number of files completed over cancelled ones

* changed test names
2017-09-05 15:16:41 +01:00
Denys Vuika f2db536148 fix pagination i18n setup (#2195) 2017-09-05 15:16:41 +01:00
Cilibiu Bogdan 734c1260ca [ADF-1348] Upload Dialog - 'Cancel All' button does not render (#2192)
* refactored isUploadCancelled and isUploadCompleted

* improved checks
2017-09-05 15:16:41 +01:00
Popovics András e6ae21a0bc Files and search component fix with routing support (#2191) 2017-09-05 15:16:41 +01:00
Infad Kachancheri 5ad4fe171a [ADF-1088] Task Header in TaskDetails component shows Assignee but is not editable (#2176)
* added translate keyword for assignee header

* changed people-search component to change the header according to filter type

* changed tash-header component to make assignee clickable

* imlemented people-search component to assign the task to new user

* added handler for assign task to new user

* added testcase for assign task to user

* changed mdl textbox to angular material

* changed button to md and fixed issues in testcase after changed md

* changed property for people-search component

* added ng-content selector to pass header text and action button text  and removed property from people-search component

* added no_error_schema to fix testcase issue in people component

* fixed no-task-details component test case bug

* added people-search component in read me
2017-09-05 15:16:41 +01:00
Deepak Paul ecc6aecd80 [ADF-1116] Task list without any status filter (#2189)
* Added a new service to fetch tasks without state filter

* Added services to fetch tasks with state filter

* Added processInstanceId input for tasklist to filter task for a single process

* Updated README with new processInstanceId input
2017-09-05 15:16:41 +01:00
Maurizio Vitale cfe6cacc8f Add process audit directive (#2188) 2017-09-05 15:16:41 +01:00
Popovics András e93a771366 [ADF-459] Copy & move further features (#2187)
* Adding current folder to list by default

* Fix documentlist component's rowFilter and imageResolver

* Adding rowfilter to not show the current node in the list

* Removing unpermitted nodes from the selectable ones (not visually)

* Restore documentlist original behaviour (rowFilter and imageResolver)

* Select event interface works with array from this point on

* Introducing the one and only, mighty Breadcrumb

* Breadcrumb position fix

* Extract hightlight transform functionality from highlight pipe

* Highlight part I.

* Showing breadcrumb with the new redesigned functionality

* Rebase fix

* Error and success callback for the new content actions

* Tests for HighlightDirective

* Update documentation

* Until proper pagination we use this temporary fix

* Fix node unselection on folder change

* Fix accessibility support in dropdown breadcrumb
2017-09-05 15:16:41 +01:00
Ole Hejlskov a8024bbdf5 Add scripts to help the i18n team extract and import stings (#2186) 2017-09-05 15:16:41 +01:00
Cristi Socea ca2ba3c5c7 [ADF-994] Integrate SFS enhancements for Pagination component (#2119)
* Add pagination module with pagination component

* Update the old pagination to have the old selector

* Add licence headers to ts files

* Update pagination files

* Rename properties for consistency reasons and remove redundant event emitters

* Add PaginationQueryParams interface to reference the query params used for paginated requests

* Add documentation of pagination (work in progress)

* Add i18n translations to pagination component

* Rename some variables used in pagination template

* Update pagination component to be backwards compatible

* Update pagination component specs

* Update pagination’s documentation

* Remove the old pagination code

* Add old alfresco-pagination tag selector

* Update document list component to include the new pagination

* Add adf-pagination in search component

* Update link to pagination component from main readme file

* Update search component specs

* Add a default pagination object in case it’s not provided

* Assign pagination to default one to default the missing properties (if any)

* Remove unused variables

* Add fail hints from expectancies of pagination tests

* Add default onInit and remove the old defaults
2017-09-05 15:16:41 +01:00
Denys Vuika 34ad695a39 fix moment version 2017-09-05 15:16:41 +01:00
Denys Vuika 908777f71c css fix for breadcrumb 2017-09-05 15:16:41 +01:00
Denys Vuika 3741ae1c9e remove mdl from "Files" page (demo shell) (#2185) 2017-09-05 15:16:41 +01:00
Denys Vuika da4bd4f7ea breadcrumb styles (#2183) 2017-09-05 15:16:41 +01:00
Denys Vuika 2955d8ec23 adfTimeAgo pipe and demo (#2182) 2017-09-05 15:16:41 +01:00
Denys Vuika 3d65b49af7 [ADF-1312] form validation enhancements (#2180)
* validation api enhancements

- changing 'required' causes re-validation of the form
- get field by id

* allow binding field validators from html

* demo validator

* documentation updates

* fix after rebase

* markdown fixes

* markdown linter settings for workspace config (vs code)

* restore material theme
2017-09-05 15:16:41 +01:00
Denys Vuika 6c1a758561 breadcrumb fixes (#2181) 2017-09-05 15:16:41 +01:00
Eugenio Romano 083c9da0d4 [ADF-852] Form style Material 2 (#2151)
* mdl2 transition part form 1

* hyperlink

* radio buttons

* label

* people component

* [ADF-852] moved textarea to new angular material

* number widget

* change error multiline

* [ADF-852] added md desgin for dropdown

* [ADF-852] removed unused css file

* functional widget

* error dropdown

* [ADF-852] - changed to new md date

* remove md-date-time-picker dependency in ng2-alfresco-from

* [ADF-852] conversion dynamic table phase 1

* container widget

* remove test unused

* validation change

* [ADF-852] convert dynamic table phase 2

* [ADF-852] improving style and fixing bugs

* move custom style for form in form.scss

* error footer refactor

* fix models and test

* [ADF-852]- fixed minor twitch on dynamic table

* align fields and fix tests dropdown

* disabling button in readonly
clean mdl form start process form

* align dropdown

* [ADF-1048] Upload widget can manage multiple files. (#2134)

* [ADF-1048] improving upload widget

* [ADF-1048] added ability to upload multiple file on upload widget

* [ADF-1048] added multiple upload elements on upload widget

* [ADF-1048] - show all the files on the completed form

* [ADF-1048] fixed wrong selecion on displya upload

* [ADF-1048] removed fdescribe from upload widget

* date validation and custom moment data adapter

* move content widget in the widget folder

* add style fields and theming

* color primary radio and checkbox

* fix amount widget and colors

* change ViewEncapsulation and fix date style button issue

* empty form customization 1736

* focus label style

* [ADF-224] fix the rendering of custom stencils when form is opened in readonly state. (#2161)

* [ADF-224] Fixed rendering of custom stencil in readonly mode

* [ADF-224] improved variable name

* test fix

* container filter in form model creation

* show display value correctly

* fix change date and test

* fix date editor and add some test coverage for date

* style minor issue

* fix new unused local import rule

* fix test date

* strict date check

* fix analytics failing test

* restore null as default in model

* unify model diagrams and analytics
2017-09-05 15:16:41 +01:00
Denys Vuika 47ea517ffb (fix) Bad method signatures on component functions (#2177)
* (aot) Viewer fixes

* (aot) Document List fixes
2017-09-05 15:16:41 +01:00
Denys Vuika a570e480a9 fix build 2017-09-05 15:16:41 +01:00
Denys Vuika 2fe81ceeae fix demo shell issues (lint) 2017-09-05 15:16:41 +01:00
Denys Vuika 9d3962b3b5 [ADF-1287] compatibility with the new noUnusedLocals rule (#2170)
* support for noUnusedLocals rule

* clean diagram components

* code cleanup

* Viewer fixes

* code fixes

* code fixes
2017-09-05 15:16:41 +01:00
Denys Vuika 0f239a1fa3 [ADF-1300] Download as Zip feature and dialog (#2174)
* Download API demo

- download single selected file
- download multiple selected files as ZIP
- download one or multiple selected folders as ZIP
- download all mixed content as ZIP (file + folder)

* download dialog (first cut)

* code cleanup
2017-09-05 15:16:41 +01:00
Maurizio Vitale abe5ed5a67 [ADF-1252] Create a different route for processes (#2171)
Change the current route for diagram process
2017-09-05 15:16:41 +01:00
Maurizio Vitale f50c9d8b5c Hide the task audit button when there is no taskId (#2172) 2017-09-05 15:16:41 +01:00
Maurizio Vitale 10b7bdbfaa Fix unit tests (#2173) 2017-09-05 15:16:41 +01:00
Maurizio Vitale cc192d7dc4 [ADF-1261] Task audit log directive (#2162)
* Create task audit directive

* Remove fit

* Add services

* Add adf-task-audit documentation
2017-09-05 15:16:41 +01:00
Denys Vuika 123ae3618a [ADF-1091] Validation layer enhancements for Form component (#2168)
* form/field validation events

* code cleanup

* unit tests

* improve validator management

- form now owns field validators
- readme updates
- unit test updates
2017-09-05 15:16:41 +01:00
siva kumar 1d9564a58c [ADF-1265] Task Header - Datapicker is not showed in the middle. (#2155)
* Added touchUi property to md-datePicker.
2017-09-05 15:16:41 +01:00
Eugenio Romano 8d49988acb [ADF-1281] Update CONTRIBUTING.md (#2169) 2017-09-05 15:16:41 +01:00
Denys Vuika 91ef0b6947 [ASF-1227] new adf-node-permission directive (#2154)
* directive implementation

* update docs

* unit tests and api docs

* code improvements

* simplify code

* update type def and docs
2017-09-05 15:16:41 +01:00
Deepak Paul 152e7805bc [ADF-1143] [TaskList] - Not able to start a task when changing the assignee from the 'Start Task' form (#2164)
* [ADF-1143] [TaskList] - Not able to start a task when changing the assignee from the 'Start Task' form

* Create task has been split into three diffrent service calls to replicate the ecxact behaviour of APS

* Current API call sequence is create-task -> attach-form -> assign-user

* Added a new service assign task

* Modified tests according to the API calls

* [ADF-1143] [TaskList] - Not able to start a task when changing the assignee from the 'Start Task' form

* Added responsive behaviour for APIs

* [ADF-1143] [TaskList] - Not able to start a task when changing the assignee from the 'Start Task' form

*Code refactoring
2017-09-05 15:16:41 +01:00
Denys Vuika c85bf05cb2 replace 'template' with 'ng-template' (#2167) 2017-09-05 15:16:41 +01:00
Denys Vuika d9bacff0de remove useless date conversion (#2165)
fixes the bug for Safari whent dates get corrupted on double conversion (createdAt/modifiedAt are already dates)
2017-09-05 15:16:41 +01:00
Denys Vuika 4addf0fb73 Optional automatic translation of column headers (#2166) 2017-09-05 15:16:41 +01:00
Denys Vuika 0824a0c325 fix local build (#2163)
fixes local builds with 'start.sh -dev'
2017-09-05 15:16:41 +01:00
Eugenio Romano b639cf38b2 remove duplication 2017-08-01 11:25:32 +01:00
Eugenio Romano cfa8a222f0 revert modify after rebase 2017-08-01 11:25:32 +01:00
Eugenio Romano e1d1e647c6 update script modify 2017-08-01 11:25:32 +01:00
Eugenio Romano 5baf0c3087 update 1.7.0 versions (#2158) 2017-08-01 11:25:32 +01:00
Eugenio Romano 5ecc4cfc96 sites dropdown select documentation change 2017-08-01 11:25:32 +01:00
Maurizio Vitale 0cdeb3647c [ADF-1229] Task Filter - Wrong task filter is selected when a new task is created (#2147)
* Select the correct task filter after a new task is created

* Fix currentFilter
2017-08-01 11:25:32 +01:00
Maurizio Vitale 8ebd30c286 Reset the margin for the people component (#2148) 2017-08-01 11:25:32 +01:00
Denys Vuika a1bb5b40d9 fix issues with angular cli imports (#2149)
solves issues with "Cannot find name 'require'." errors when linking to Angular CLI.
2017-08-01 11:25:32 +01:00
Eugenio Romano fb838c4252 Custom Material2 Style variables and theming (#2146)
* ADF theming Material2

* login style primary buttons and input

* fix color breadcrumb based on the material color
2017-08-01 11:25:32 +01:00
mauriziovitale84 ee4ada3e2b Reset the margin for the people component (reverted from commit 5a37d8566a) 2017-08-01 11:25:32 +01:00
mauriziovitale84 f2ea3c6315 Reset the margin for the people component 2017-08-01 11:25:32 +01:00
Popovics András 004516527e [ADF-1097] Don't upload file if extension is not acceptable (#2143)
* FileModel's extension getter

* Filter out not supported extension from upload
2017-08-01 11:25:32 +01:00
Vito f336aeceac Added platform logged check for about component (#2144) 2017-08-01 11:25:32 +01:00
siva kumar 54779cb38c [ADF-1175] Start Process and Start Task Forms don't close when Cancel button is clicked (#2133)
* [ADF-1175] Start Process and Start Task Forms don't close when Cancel button is clicked.

* Added Start task/process cancel emitter handler to redirect when user clicks on cancel start/process .

* [ADF-1175] Start Process and Start Task Forms don't close when Cancel button is clicked.

* Changed activiti-start-task to adf-start-task
* Changed onSuccess to success and Updated     document.

* [ADF-1175] Start Process and Start Task Forms don't close when Cancel button is clicked

* Refactored  start task component unit testcases
2017-08-01 11:25:32 +01:00
Popovics András 2b92e03a1c [ADF-1200] Error handling for wrong host urls (#2140)
* Make the host errors in settings easier to understand

* Commented proxy settings for testing for the next time

* delete unnecessary proxy rule
2017-08-01 11:25:32 +01:00
siva kumar c3437d54eb [ADF-1168] Tasks header component and Processes header component have different margins (#2139)
* [ADF-1168]  Tasks header component and Processes header component have different margins

*  Removed padding from process header component and used md-card-content .

* [ADF-1168] Tasks header component and Processes header component have different margins

* Removed the external div.
* Added css class to task header component to override default roboto font

* Update process-instance-details.component.css

* Update process-instance-header.component.html

* Update task-header.component.html

* Update process-instance-header.component.html

* Update task-header.component.html
2017-08-01 11:25:32 +01:00
Maurizio Vitale 5b859193a0 Fix date css (#2142) 2017-08-01 11:25:32 +01:00
Vito 8ca2609e43 Added node pagination to SiteModel (#2136) 2017-08-01 11:25:32 +01:00
Maurizio Vitale 16149e8c55 Fix method name (#2135) 2017-08-01 11:25:32 +01:00
Denys Vuika b1e627eedc fix the favorites api (#2129)
- fix the crash related to remapping entities
2017-08-01 11:25:32 +01:00
tdonovancsra c4454e3392 508 Compliance Resolution for the App tiles. (#2131) 2017-08-01 11:25:32 +01:00
Cilibiu Bogdan 1c6ee6e7bf [ADF-924] upload dialog unit tests (#2132) 2017-08-01 11:25:32 +01:00
Deepak Paul 896149acd8 [ADF-1149] 'Remove' involved people of a task button is displayed behind the dialog (#2130)
* Removed mdl dialogs for comments and people
* Removed list-column CSS class from activiti-demo component to show tasks/process list and details in the same row on low resolution screens
2017-08-01 11:25:32 +01:00
Popovics András 64389a5577 Fix styling of card view text item ruined by global material styles :'( (#2128) 2017-08-01 11:25:32 +01:00
Popovics András 79a33b4914 Prevent settings urls to end with / (#2127)
[ADF-978] Prevent settings urls to end with /
2017-08-01 11:25:32 +01:00
Popovics András a17d85adb5 Make the rendition conversion great again (#2126) 2017-08-01 11:25:32 +01:00
Maurizio Vitale df32a49c9e [ADF-1162] Form List - Fix the getForms service response (#2125)
* Fix the getForms service response

* Fix unit test
2017-08-01 11:25:32 +01:00
Adina Parpalita 92e30c2fa3 [ADF-1159] Fix misspellings in .md files (#2124) 2017-08-01 11:25:32 +01:00
Popovics András 4fd8bfb875 [ADF-1041] Node picker, first iteration (#2122)
* First try

* Dialog basic functionality

* Search input

* Hammering it together

* Fist working proto for copy

* Fix the tests and tslint errors for a happier world

* Add more tests (and test shells for the future)

* copyNode and moveNode methods

* Copy and move actions for content type

* Extract common parts in favor of using them in folder content type also

* Small fixes

* Copy and Move actions for folders as well

* Style fixes, ui behaviours and tests needed to be written

* Move duplicated search service from documentlist to core

* Use search service from core within the search component

* Fix dialog width

* Update docs

* Tests for node selector

* Change seletionMade event's name to select
2017-08-01 11:25:32 +01:00
Denys Vuika 952da3ab99 (demo app) Application menu bar enhancements (#2123)
* remove MDL from app component

- new app menu bar based on angular/material

* fix app selector

* improve menu bar labels
2017-08-01 11:25:32 +01:00
Deepak Paul 7983e4df97 [ADF-1147] Form is not rendered properly when starting a new process. (#2120)
* Removed unwanted container div
2017-08-01 11:25:32 +01:00
Denys Vuika 0717563979 Fix upload bug (demo app) 2017-08-01 11:25:32 +01:00
Maurizio Vitale 211a7f22b3 Add the show diagram button (#2121) 2017-08-01 11:25:32 +01:00
Cilibiu Bogdan aad7164042 [ADF-924] Upload Component enhancements (#2115)
* changed logic/design

* restored dialog component spec

* revert changes

* update upload dialog documentation

* public over private

* component close method
2017-08-01 11:25:32 +01:00
siva kumar 4d0d0b3457 [ADF-1138] Start Task Form Assignee dropdown show null value inside (#2118)
* [ADF-1138] Start Task Form Assignee dropdown show null value inside

* Changed Form Assignee dropdown show null value.

* [ADF-1138] Start Task Form Assignee dropdown show null value inside

* Refactored unit testcases.
2017-08-01 11:25:32 +01:00
Deepak Paul a997c87596 [ADF-1081] Scroll bar is missing in comments component (#2117)
* Minor css improvement for Comments component

* Added max-height property to show scroll in dialog
2017-08-01 11:25:32 +01:00
Maurizio Vitale b8da5bf45b [ADF-1142] Process instance details - should show the comment componen (#2116)
* Add a comment button in the process details component has we have for the task details

* Update process-instance-details.component.css

* Update process-instance-details.component.html
2017-08-01 11:25:32 +01:00
dmonteiro-alfresco 3d2e764d3d updated the prepublish script with registry option (#2114) 2017-08-01 11:25:32 +01:00
Eugenio Romano d4ca8ec3a0 Update README.md 2017-08-01 11:25:32 +01:00
Eugenio Romano d573f32640 style permissions fix and add in hasPermission possibility to check t… (#2113)
* style permissions fix and add in hasPermission possibility to check the negate permission
* remove fdescribe in discovery test and add test for negate permissions
2017-08-01 11:25:32 +01:00
Denys Vuika 03f60d910f replace MDL sidebar with material2 menus (#2112)
* replace MDL sidebar with material2 menus

- separate language picker
- separate "more" menu

* toolbar theme picker

* fix toolbar button colors for different themes

* revert the commented out code
2017-08-01 11:25:32 +01:00
Infad Kachancheri 7945757d51 changed parent name key from processDefnitionId to processInstanceId (#2111) 2017-08-01 11:25:32 +01:00
Denys Vuika 4a9b344f4a update readme (#2110) 2017-08-01 11:25:32 +01:00
Denys Vuika 96557e5f6b [ADF-1134] selection management fixes (#2109)
* selection management fixes

* remove dual behaviour
2017-08-01 11:25:32 +01:00
Denys Vuika 0b9ab68f22 basic toolbar docs and screenshots (#2108) 2017-08-01 11:25:32 +01:00
Eugenio Romano d1228e2ac3 exclude update version change in base component package if is only demo shell option 2017-08-01 11:25:32 +01:00
Eugenio Romano e6c500c198 update change version script for alpha js-api 2017-08-01 11:25:32 +01:00
Denys Vuika 6777de1b8e update content apis with extra params (#2107) 2017-08-01 11:25:32 +01:00
Eugenio Romano ae4ce5c97a regenerate lock documentlist 2017-08-01 11:25:32 +01:00
Eugenio Romano df7af049b8 create external package on npm for adf-tslint-rules
create external package on npm for adf-tslint-rules
2017-08-01 11:25:32 +01:00
Infad Kachancheri 83a6f0d425 [ADF - 1114] Process comments - Share the same comment between Task and Process (#2105)
* changed process comment template and used task comment component

* changed getTaskComment, getProcessInstanceComment, addTaskComment and addProcessInstanceComment to getComments and addComment

* removed provider from task comment component

* extended tasklist service and changed comment-list container css

* changed process service methods and associated test cases

* added error emitter and test cases for process-comments component

* fixed process header component test case
2017-08-01 11:25:32 +01:00
Maurizio Vitale 7fbdf4ed8a [ADF-1108] Task header - Show the parent name as a clickable value (#2098)
* Add a MapItem component inside the CardVied
Add a way to define a property clickable

* Fix unit test

* Add basic documentation
Unify css class name

* Fix class name

* remove unused class
2017-08-01 11:25:32 +01:00
siva kumar 8b57b3cff6 [ADF-1117] Activiti Start Process - Migrate to MD (#2104)
* Removed conditional statement from HTML.
2017-08-01 11:25:32 +01:00
Vito 7ea82c0856 [ADF-487] added discovery information to about component (#2102)
* [ADF-487] - added discovery service to core

* [ADF-487]- added activiti about call

* [ADF-487] added discovery info into about component

* [ADF-487] removed wrong console log

* [ADF-487] fixed problem on index
2017-08-01 11:25:32 +01:00
Eugenio Romano 45ee5eebec Fix pipeline (#2103)
* recreate package base
* package lock

* npm run doc command fix
2017-08-01 11:25:32 +01:00
mauriziovitale84 9b651895cf Fix typo 2017-08-01 11:25:32 +01:00
Eugenio Romano de242ea4f1 [ADF-537] Contribution guide start (#2101)
* Contribution guide start

* development rebase

* fix link

* fork sync
2017-08-01 11:25:32 +01:00
Denys Vuika 24bd860d38 [ADF-1115] selection management for DT/DL components (#2100)
* row select/unselect dom events for DT

- new events for datatable
- improved unit tests for empty content placeholders

* improved selection management for DT

* selection management for document list

* fix tests
2017-08-01 11:25:32 +01:00
Maurizio Vitale 6bde12f770 Move the adf start task component in a different zone (#2099) 2017-08-01 11:25:32 +01:00
Vito d8d2dde96c [ADF-968] Added Site Dropdown component to document list (#2093)
* [ADF-968] added demo project and new component

* [ADF-968] added default option choice

* [ADF-968] - moved site dropdown into documentlist

* [ADF-968] fixed test for new component

* [ADF-968] removed fdescribe for single cases

* [ADF-968] fixed test to check rendering

* [ADF-968] added conversion to Boolean forced by alfresco-js-api

* [ADF-968]- moved site service into core

* [ADF-968] reflected changes on js-api index

* [ADF-968] fixed wrongly merged path from rebase

* [ADF-968] fixed wrongly merged path from rebase

* [ADF-968] fixed import problem on demo shell demo

* [ADF-968] revert changes on package.json

* [ADF-968] removed wrong package-lock

* [ADF-968] applied changes from PR

* [ADF-968] reindented file html
2017-08-01 11:25:32 +01:00
siva kumar 3268fdf815 [ADF-1117] Activiti Start Process - Migrate to MD (#2096)
* [ADF-1117] Activiti Start Process - Migrate to MD
2017-08-01 11:25:32 +01:00
Deepak Paul 82e8dfa3b0 [ADF-920] Process Header Component - Refactoring (#2073)
[ADF-920] Process Header Component - Refactoring
2017-08-01 11:25:32 +01:00
Maurizio Vitale 9113170f2c Fix tslint errors (#2097) 2017-08-01 11:25:32 +01:00
Denys Vuika 34c89bd2ba remove old MDL wrapper directives (#2095)
- remove mdl-button directive
- remove mdl-tooltip directive
2017-08-01 11:25:32 +01:00
Denys Vuika 914e2af98d add auto-fixed files 2017-08-01 11:25:32 +01:00
Eugenio Romano a9142e2ca2 [ADF-1040] Change document list style rows based on permissions model (#2085)
* Change document list style rows based on permissions model

* fix test
2017-08-01 11:25:32 +01:00
Popovics András 6947e04208 [ADF-1038] - Dropddown Breadcrumb component (#2092)
* Update material to beta8

* Install @angular/cdk

* DropdownBreadcrumb component

* Style fixes

* Fix styling issues after rebase

* Fix Material issue in processlist

* Update material again, because of rebase errors... :/

* Fix new tslint rule raised errors
2017-08-01 11:25:32 +01:00
Eugenio Romano 3a76027fe3 Services list in readme and in the doc generator (#2091)
* add services list in readme and in the autogenerator

* update tslint 5.5.0
2017-08-01 11:25:32 +01:00
Denys Vuika b1d2ec9e9e [SFSNG-724] content services (#2089)
* content services

* rebase index file
2017-08-01 11:25:32 +01:00
Denys Vuika 4c7baca95c [ADF-993] toolbar improvements (#2090)
* toolbar improvements

- simple "title" property to render toolbar title
- advanced "adf-toolbar-title" element for compound toolbars

* move to SASS and improve styling

* fix divider color
2017-08-01 11:25:32 +01:00
Denys Vuika be3d3d2aa3 [ADF-992] improve datatable styles according to UX guidelines (#2088)
* improve datatable style

* datatable and document list enhancements

- support to toggle header in DataTable
- Document List automatically hides header for empty content
2017-08-01 11:25:32 +01:00
Eugenio Romano 7e357cfbae revert wrong tag name changed 2017-08-01 11:25:32 +01:00
Eugenio Romano a8eac42c05 [ADF-1103] Add custom tslint rules to avoid unwanted Class and File name prefix (#2087)
* custom tslint rules adf project name files

* filename and class prefix rule

* filename process service mock

* fix spec filename

* fix demo shell

* rename mock

* alias deprecated name class

* core rename services

* fix pacakge.json adf-rules

* add exclude in whitelist
2017-08-01 11:25:32 +01:00
Eugenio Romano 77c8ef459f add sass configuration in all the component common webpack configuration (#2086) 2017-08-01 11:25:32 +01:00
Denys Vuika 00fb8d1fad fix datatable sass config (webpack) 2017-08-01 11:25:32 +01:00
Denys Vuika f715361f94 [ADF-1092] independent styles for data-table (#2084)
* independent styles for datatable

- datatable (and all derived components) no longer depend on MDL css/js

* readme update
2017-08-01 11:25:32 +01:00
Denys Vuika fb4ed0209b core sass enhancements (#2083)
- simplify file names
- simpify imports
- placeholder for mixins
2017-08-01 11:25:32 +01:00
Denys Vuika ef518ea822 documentation and example (#2081) 2017-08-01 11:25:32 +01:00
Popovics András f6c3fafe32 [ADF-112] Change task details feature (due date) (#2071)
* Add Assignee to readonly mode

* Style adoption and first steps to editable mode

* Switch between mode coverage

* Rebase fix

* Because of design and requirement changes, revert unnecessary parts

* Small refactoring before the introduction of CardViewDateItem

* Fix AdfCardView tests

* Editable Card date item

* Do not allow edit on task details after the task is completed.

* Update task details request

* Login footer switch fix

* Login customisable copyright text

* Card text item (first sketches)

* Small fix for supported card items' template

* Dynamic component loading for card view items

* Test and linting fixes

* Updating Readme.md

* Update Readme.md

* Fix Readme.md errors

* CardViewTextItemComponent tests

* Rebase fix
2017-08-01 11:25:32 +01:00
Maurizio Vitale 8a1281475c [ADF-1039] Search results highlighting (#2080)
* Provide a way to highlight the searched word

* Add unit test
2017-08-01 11:25:32 +01:00
Eugenio Romano 55cd57b49d Search add wildcard * to match all the (#2079) 2017-08-01 11:25:32 +01:00
Denys Vuika 8fef3b6781 [ADF-1047] preserve login providers between page reloads (#2078)
* preserve csrf and auth type settings between reloads

* update unit tests

* fix prefs issues

* fix tests
2017-08-01 11:25:32 +01:00
Eugenio Romano 8e2b022b6b readme search fix types 2017-08-01 11:25:32 +01:00
Eugenio Romano 8cdb276dc4 [ADF-864] codelyzer form component (#2076) 2017-08-01 11:25:32 +01:00
Vito 6f8e984d75 [ADF-923] Added check for only involved user cannot complete a task (#2068)
* [ADF-923] Added check for only involved user cannot complete a task

* [ADF-923] fix compilation error

* [ADF-923] added review changes

* [ADF-923] corrected mispelling
2017-08-01 11:25:32 +01:00
siva kumar acfe257327 [ADF-918] Activiti Start Task - Refactoring (#2065)
* [#DW-60] Task-create Task

* Updated en.json with new form fields
* Refactored start Button(Disable/Enable)
* Migrated from mdl to md
* Added documentation

* #DW-60 Task- create task

* Changed component name ActivitiStarttaskButton to ActivitiStartTaskComponent
* activiti-start-task to adf-start-task

* [ADF-918]  Activiti Start Task - Refactoring

* Removed unwanted  activiti-start-task.png
* Renamed component name in test
* Refactored CSS

* [ADF-918] Activiti Start Task - Refactoring

* Added condtional parameter passing and added a test case

* [ADF-918] Activiti Start Task - Refactoring

* Removed trailing space.
* Refactored Spec file.

* [ADF-918] Activiti Start Task - Refactoring

* Created  startTaskModel with form feilds.
* Modified testcases  after adding startTaskModel.
* Removed @input property.

* [ADF-918] Activiti Start Task - Refactoring

* Fixed tslint issuse (Exceeds maximum line length)
* Refactored date field.

* [ADF-918] Activiti Start Task - Refactoring

* Changed property name date to dueDate.
2017-08-01 11:25:32 +01:00
Vito 160d73cee3 Fixed wrong referral to core in upload service tests (#2077)
* Fixed wrong referral to core in upload service tests
2017-08-01 11:25:32 +01:00
Maurizio Vitale 8b87ef0a21 Move the comment component inside a dialog as we did for the Involved people (#2070) 2017-08-01 11:25:32 +01:00
Denys Vuika 0262b3426e [ADF-1070] fix issue with user preferences and page reload (#2075)
* user preferences profile storage support

* update unit test
2017-08-01 11:25:32 +01:00
Maurizio Vitale 52ef483216 Replace loadingFlag with isLoading (#2074) 2017-08-01 11:25:32 +01:00
Infad Kachancheri ae3f5078d1 [ADF - 1030] Datatable - enable isLoading to show the spinner in all the components (#2063)
* added spinner module and  translate text for process-list component

* added spinner loader for data-table in processlist-variable component

* added spinner loader for data-table in processlist component

* added spinner loader for data-table in process-attachmentlist component

* added spinner module and translate text for tasklist component

* changed css for adf-datatable: selector changed in component

* added spinner loader for data-table in tasklist component

* added spinner loader for data-table in task-attachmentlist component

* removed no-content template from task/process attachment list

* fixed tasklist testcase issues

* changed imort order for test cases

* fixed testcase issue in processlist component
2017-08-01 11:25:32 +01:00
Eugenio Romano 7772f92e64 remove duplicate social from scripts 2017-08-01 11:25:32 +01:00
Eugenio Romano 8a013b3bd1 [ADF-865] codelyzer diagrams and analytics (#2072)
* fix codelyzer diagrams and analytics

* fix test
2017-08-01 11:25:32 +01:00
Maurizio Vitale 8a509e3c31 [ADF-971] Create task/process attachment should show the new button (#2069)
* Remove the drag and drop
Change the design button
Fix the Event with the name inside the Readme

* Fix unit test

* Rollback id button
2017-08-01 11:25:32 +01:00
Maurizio Vitale 50fef106a8 [ADF-1045] Process Attachments List - Improve the component (#2067)
* Create two different ProcessUpload service on for task one for process because the API are different
Move the attachment task list and process list in different component outside the activiti demo component

* Move the create task/process attachment in the child component
2017-08-01 11:25:32 +01:00
Denys Vuika 2a16bf2f34 [ADF-1026] i18n support for "empty" screen (#2066)
* i18n support for "empty" screen

* fix unit tests

* fix tests

* fix tests
2017-08-01 11:25:32 +01:00
Deepak Paul 403d5cea85 [ADF-497] Improvement to task comment (activiti-comments) component -1829 Github (#2054)
* [ADF-497] Improvement to task comment (activiti-comments) component - 1829 Github

* Added new design
* Removed dialog
* Migrated from mdl to md
* Created a new component to list comments by using data-table

* [ADF-497] Improvement to task comment (activiti-comments) component - 1829 Github

    * Added documentation

* [ADF-497] Improvement to task comment (activiti-comments) component -1829 Github

* Improved css class naming
* Changed component name AdfCommentList to AdfCommentListComponent
* Code refactoring

* [ADF-497] Improvement to task comment (activiti-comments) component -1829 Github

* Removed extra space at the end

* [ADF-497] Improvement to task comment (activiti-comments) component -1829 Github

* Import reordering
2017-08-01 11:25:32 +01:00
Eugenio Romano 58eb56a966 [ADF-863] codelyzer documentlist (#2059)
* codelyzer documentlist

* tslint error after codelizer

* fix import

* fix tag test
2017-08-01 11:25:32 +01:00
Eugenio Romano 12d2224129 add codelyzer in webscript tag and social (#2061) 2017-08-01 11:25:32 +01:00
Vito c974da301d [ADF-858] added multiple attribute to upload widget (#2064) 2017-08-01 11:25:32 +01:00
Vito af63d2e805 Fix error on test into core component (#2062) 2017-08-01 11:25:32 +01:00
Denys Vuika 3b8cf27862 [ADF-770] upgrade to md-menu (#2060)
* upgrade to md-menu

- upgrade to md-menu
- fix issue with missing icons
- extend demo shell to show icons for actions
- fix issue with border problems in Firefox
- remove commented out samples in demo shell (there's readme for that instead)

* fix unit tests

* fix tests
2017-08-01 11:25:32 +01:00
Maurizio Vitale 183dd3c990 [ADF-1002] Move the UploadService from the upload to core component and share it with the Process service (#2055)
* use the same upload component between the content and process service

* Create a BaseUploadServe inside the core
The AlfrescoUpload should extend the BaseUpload

* Improve the code

* Move the process service from the demo shell to form component

* Merge [ADF-917] added exlcluded files into app config to prevent special files

* Remove typo

* Fix import

* Fix FileModel import

* Fix Denys comment

* Fix unit test with the new path of UploadService

* Add missing implementation
2017-08-01 11:25:32 +01:00
Denys Vuika dd61cf7b45 [ADF-1015] make "loading" state two-way bindable (document list) (#2052)
* make "loading" state two-way bindable

* update documentation

- update readme
- move "loading" property up to @Input properties
2017-08-01 11:25:32 +01:00
Denys Vuika 012d62eb55 [ADF-1006] fix 'isEmpty' issue and code cleanup (#2053)
* fix 'isEmpty' issue and code cleanup

* Update tsconfig.json
2017-08-01 11:25:32 +01:00
Eugenio Romano 29ca8b5c5e [ADF-859] add codelyzer in core and datatable (#2056)
* add codelyzer in core and datatable

* add codelyzer in the main build

* order imports

* fix import in test

* fix import test

* import reorder form

* tasklist and processlist import reorder
2017-08-01 11:25:32 +01:00
Denys Vuika 7a034bb217 fix form demo template 2017-08-01 11:25:32 +01:00
Vito c0002217fe [ADF-819] added snackbar to single file drop (#2051) 2017-08-01 11:25:32 +01:00
Vito b9cfa81829 [ADF-917] added exlcluded files into app config to prevent special fi… (#2039)
* [ADF 917] added exlcluded files into app config to prevent special files upload
2017-08-01 11:25:32 +01:00
Maurizio Vitale dac9b21e85 [ADF-970] Create a new Empty list component for the datatable (#2045)
* Create a new empty list component
Share the component between attachment list and document list
Add unit test
Add basic documentation

* Use the adf empty list also in the process attachment component

* Fix unit test

* delete wrong file
2017-08-01 11:25:32 +01:00
Popovics András 843afdbcc6 [ADF-523] Fix delete operation in the search component (#2020)
* Search delete permission notification fix

* Support content deletion inside search results

* Forgotten broken test fix.

* Update alfresco-document-list READDME.md

* Update alfresco-document-list READDME.md II

* Adding TOC to README.md

* Build fix

* Fix the build for now and ever!
2017-08-01 11:25:32 +01:00
Eugenio Romano ee871ba578 [ADF-506] Unify thumbnail service (#2014)
* move thumbnail service in core

* fix folder
2017-08-01 11:25:32 +01:00
Popovics András f07876df7e Responsive height for login component (#2049) 2017-08-01 11:25:32 +01:00
Eugenio Romano cc42169d14 add markdown linter (#2048) 2017-08-01 11:25:32 +01:00
Popovics András 48de045ee3 [ADF-1001] Fix styling issues with tooltip and increase code coverage (#2047)
* Adding tests for diagram tooltips

* Style fixes
2017-08-01 11:25:32 +01:00
Vito 846f3a8069 [ADF-957] removed double call to load form (#2046) 2017-08-01 11:25:32 +01:00
Eugenio Romano b32a023581 fix diagram webpack common file 2017-08-01 11:25:32 +01:00
Eugenio Romano dd48b53b7d revert tsconfig change 2017-08-01 11:25:32 +01:00
Vito 866cb121fb [ADF-966] added the ability to reflect data change on datatable (#2042)
* [ADF - 966] added a setTimeout to test the async loading of datatable

* [ADF-966] added the ability to reflect changes on data change

* [ADF-917] changed due PR
2017-08-01 11:25:32 +01:00
Popovics András 44446b73c4 [ADF-402] Diagram tooltips bug (#2043)
* Getting rid of MDL from dialog tooltips

* Tooltip message body fix and stylings

* Add adf prefix and sass compilation

* build fix
2017-08-01 11:25:32 +01:00
Eugenio Romano 8a3d157cf1 update script publish and change version 2017-08-01 11:25:32 +01:00
Denys Vuika 70a3c863e6 [ADF-983] User Preferences Service (#2044)
* user preferences service

* unit tests and code improvements

* fix tests

* fix tests

* fix tests

* add missing production settings

* readme updates

* integrate with the core module
2017-08-01 11:25:32 +01:00
Denys Vuika ac9b660e83 [ADF-850] example on using in-memory form data (#2037)
* stub for custom form service

* demo polishing

- use in-memory formService only for the corresponding demo page 'Form'
- support for mocking rest field values
- demo of the typeahead data mocked

* load data from app config

* fix lint errors

* separate Form and Form List demos
2017-08-01 11:25:32 +01:00
Eugenio Romano 2d33aaec17 update move and add script 2017-08-01 11:25:32 +01:00
Denys Vuika 26fe9ed694 [ADF-967] evaluate "hostname" and "port" for string settings (#2040)
* evaluate 'hostname' and 'port' in app config strings

* update unit tests

* fix unit tests

* fix unit tests

* update readme
2017-08-01 11:25:32 +01:00
Eugenio Romano c3561510b9 [ADF-868] Use new ADF prefix in all tags (#2035)
* use new ADF prefix in all thr tag

* fix failing test

* fix datatable test
2017-08-01 11:25:32 +01:00
Eugenio Romano 6ac4edde24 [ADF-973] Remove demo folder moved in https://github.com/Alfresco/adf-examples … (#2036)
* remove demo folder moved in https://github.com/Alfresco/adf-examples 1.6.1

* remove analytics demo
2017-08-01 11:25:32 +01:00
Maurizio Vitale e33f6cf670 Fix appId not mandatory (#2038) 2017-08-01 11:25:32 +01:00
Maurizio Vitale 2e03ef3548 [ADF-914] Form List Component (#2023)
Form List Component
2017-08-01 11:25:32 +01:00
Vito 033939615d [ADF - 778] Fixed error on wrong change detection strategy (#2021) 2017-08-01 11:25:32 +01:00
Popovics András 5eeb16b6b6 MDL tooltip not displayed bugfix (#2025) 2017-08-01 11:25:32 +01:00
Vito b0caecdce5 [ADF - 334] Added prefix to amount widget (#2031)
[ADF - 334] added material design prefix to amount widget
2017-08-01 11:25:32 +01:00
Vito 9b5e90c400 [ADF - 950] - disabling date button on readonly form (#2032) 2017-08-01 11:25:32 +01:00
Denys Vuika 98598f03b2 AOT compatibility enhancements (#2015)
* aot compatibility updates

- remove index files where needed
- move material dependencies to a separete module
- use aot compatible lambda functions for module export

* remove unused imports

* re-export Material module

* core module enhancements

- fix AOT issue with providers (use lambda instead of variable)
- move context menu to a separate module

* core module enhancements

* feature modules
2017-08-01 11:25:32 +01:00
Eugenio Romano b0cdd4557d no save development js-api (#2033) 2017-08-01 11:25:32 +01:00
Jean-Pierre Huynh 3e89b58a87 Fix markdown syntax and wording on README.md (#2030) 2017-08-01 11:25:32 +01:00
Eugenio Romano 6ff32fcfef regenerate lock 2017-08-01 11:25:32 +01:00
Eugenio Romano 56ba7e3856 NgZone type passed parameter 2017-08-01 11:25:32 +01:00
Eugenio Romano 5f67db68d0 fix type definition variables 2017-08-01 11:25:32 +01:00
Eugenio Romano cc01e10282 update typescript (#2026) 2017-08-01 11:25:32 +01:00
Maurizio Vitale 7224ccac7b Fix upload related content (#2019) 2017-08-01 11:25:32 +01:00
Eugenio Romano 03d4742f34 SASS version update (#2013)
* sass update

* update sass loader
2017-08-01 11:25:32 +01:00
Popovics András 98bcec219c [ADF-922] Regenerate package-lock.json files for every package and create script for doing that in the future (#2012)
* Updated package-lock.json files

* npm-relock-pkgs.sh

* Update README.md

* Fix ng2-alfresco-search sass problem
2017-08-01 11:25:32 +01:00
Eugenio Romano b921712827 [ADF-845] breadcrumb root option added and style review (#1999)
* breadcrumb root option added and style review

* new breadcrumbs

* split onchange in a method

* update readme with a note for old pefix tag
2017-08-01 11:25:32 +01:00
Eugenio Romano 7a35611ab3 [ADF-843] Form events bus (#1990)
* form events bus

* event test bus fix

* fix test after code review

* fix types errors

* change to public formservice

* make optional formservice
2017-08-01 11:25:32 +01:00
Eugenio Romano 8dc2fe2979 fix type definition (#2002) 2017-08-01 11:25:32 +01:00
Maurizio Vitale 375c014f82 Create task/process attachment Compilation error (#2004) 2017-08-01 11:25:32 +01:00
Maurizio Vitale 908e27a3ae [ADF-897] - ActivitiPeopleList - use the adf prefix (#2001)
* Use the adf as prexif instead of activiti

* Fix typo

* Fix wrong import
2017-08-01 11:25:32 +01:00
Eugenio Romano e7dfe2d9a7 introduce check type definition 2017-08-01 11:25:32 +01:00
mauriziovitale84 e01fa61638 Fix typo error 2017-08-01 11:25:32 +01:00
Infad Kachancheri 58340384fc [ADF-794] Add people assignment component (#1977)
* Add people component

* exported people service

* added people-list component to show the involved user list

* changed people-search component layout

* changed people-list usage in people component

* changed people-list data table from custom template to data adapter

* changes people-search component related to people-list

* changes in activiti-people related to people-list and people-search component

* changed data adapter to direct data column setting to data-table

* removed ngChanges and added User and UserEvent models

* added User and UserEvent model in emitter and other emitter handler

* added user event model

* changed activiti-people component with latest UX changes

* addedand changed translate keys to the components

* added hasUser method to check the condition in html

* fixed tslint issue and test case issue in activiti-people component

* added test case for actviti-people-list component

* test case added for activiti-people-search component

* changed activiti-people test cases according to latest UX changes

* added description for activiti-people component

* changed test case to fix component.upgradeElement issue

* changes requested by Vito Albano #1

* splitted getDisplayUser into getDisplayUser and getInitialUsername
2017-08-01 11:25:32 +01:00
Denys Vuika 5aa5ac9e57 remove flags lib from demo shell (#1983)
* remove flags lib from demo shell

greatly reduce demo shell webpack resources by switching off flags (only 3 icons were displayed in the past)

* merge package.json

* add icons
2017-08-01 11:25:32 +01:00
Denys Vuika 9a005d90e5 app settings page (#1997)
- custom app setttings service to use isolated storage (demo shell)
- restore settings UI
- redirect angular and rxjs to the same version as components use.
2017-08-01 11:25:32 +01:00
Popovics András 9859659298 [ADF-793] Ability to create PDF renditions in case of non supported formats (#1994)
* Style changes and button

* Convert to PDF button

* Convert to PDF button part II.

* Convert within the Not Supported Format component

* Rendition loading skeleton

* Conversion is working.

* Convert button behaviour tests

* Rebasing fix.
2017-08-01 11:25:32 +01:00
Maurizio Vitale 2a629f2071 Fix compilation error (#1993) 2017-08-01 11:25:32 +01:00
Denys Vuika 4e09723481 updated package-lock file and removed duplicates in package.json 2017-08-01 11:25:32 +01:00
Denys Vuika 164c828ee8 [ADF-847] upgrade to use application configuration service (#1986)
* migrate core lib to use server-side app config

* fix unit tests

* update Search tests

- update tests
- upgrade tests to use TestBed

* update UserInfo tests

* update Social tests

* update tests

* update unit tests

* cleanup old code

* update about page

* update demo shell readme

* dev and prod configurations
2017-08-01 11:25:32 +01:00
Maurizio Vitale 5ea19d0b05 [ADF-833] DataTable - improve the single and double click event (#1979)
* Improve the single and double click event

* Fix unit test
2017-08-01 11:25:32 +01:00
Eugenio Romano e5920e7aa7 Table of content automatic creation (#1982) 2017-08-01 11:25:32 +01:00
Eugenio Romano eb4876f582 [ADF-524] Fix empty state after the loading introduction (#1980)
* fix empty state after the loading introduction

* Update document-list.component.spec.ts

remove typo
2017-08-01 11:25:32 +01:00
Denys Vuika 66809bfb30 [ADF-717] upgrade i18n and charting dependencies (#1976)
* remove app-specific polyfill dependencies

remove polyfill dependencies never used by component libraries

* upgrade i18n dependencies

* upgrade ng2-charts dependency

* fix unit tests

* update demo projects
2017-08-01 11:25:32 +01:00
Vito ce56736d22 [ADF-510] Drag&Drop check permission to allow user to upload a file (#1948)
* [ADF-510] added permission check for drag&drop

* Improved code for drag and drop side

* Added test for drag and drop upload area changes

* Added test for document list permissions check

* [ADF-510] rebased branch after changes applied to upload

* [ADF-510] rebased branch and fixed tests
2017-08-01 11:25:32 +01:00
Maurizio Vitale aa2c933427 [ADF-716] Task Header - Use a custom view inside the component (#1967)
* Use a generic custom view inside the task header

* Move the component into core component and change name

* Missing file

* Fix unit test

* fix unit test component name
2017-08-01 11:25:32 +01:00
Denys Vuika 3c7e456909 [ADF-814] application configuration service (#1969)
* app configuration service

* api improvements and readme update

* extend readme and add defaults

* unit tests for app config service
2017-08-01 11:25:32 +01:00
Vito 7926023852 [ADF-494] fixed readonly rendering for forms (#1972)
* [ADF-494] improved disabling for form

* [ADF-494] fixed readonly rendering for forms
2017-08-01 11:25:32 +01:00
Eugenio Romano 5b21af7813 remove brachet 2017-08-01 11:25:32 +01:00
Eugenio Romano 2224308f9b [ADF-78] Update CORS help (#1973) 2017-08-01 11:25:32 +01:00
Eugenio Romano 49d3784893 [ADF-524] Datatable loading state (#1958)
* loading state datatable

* modify readme after review
2017-08-01 11:25:32 +01:00
Eugenio Romano d11d18a1c1 karma conf all single browser 2017-08-01 11:25:32 +01:00
Popovics András 932c4e6bc7 [ADF-578] Remember me functionality (#1962)
* Remember me functionality

* Happy pack to ng2-components' package.json

* Build fix
2017-08-01 11:25:32 +01:00
Denys Vuika c08557cc0d fix builds related to node-sass library (#1966)
* update dependencies and remove old lock files

* update sass loader

* updated lock files
2017-08-01 11:25:32 +01:00
Denys Vuika 0907e67007 [ADF-591] documentation refinements (#1959)
* refine ng2-activiti-analytics

* refine ng2-activiti-diagrams docs

* refine ng2-activiti-form

* refine ng2-activiti-processlist

* refine ng2-activiti-tasklist

* refine ng2-alfresco-core

* refine ng2-alfresco-datatable

* refine ng2-alfresco-datatable

* refine gn2-alfresco-login

* refine ng2-alfresco-search

* refine ng2-alfresco-social

* refine ng2-alfresco-tag

* refine ng2-alfresco-upload

* refine ng2-alfresco-userinfo

* refine ng2-alfresco-viewer

* refine ng2-alfresco-webscript

* various readme cleanups
2017-08-01 11:25:32 +01:00
Eugenio Romano 66c6a97783 package lock update 2017-08-01 11:25:32 +01:00
Vito 847be272ed [ADF-802] fix error on uploading file to attachment list (#1957)
* [ADF-802] fix error on uploading file to attachment list

* [ADF-802] improved for loop
2017-08-01 11:25:32 +01:00
Vito fc33bf6333 [ADF-740] Add button for process attachment list (#1955)
* [ADF-740] adding button to allow user to upload related content on process instance

* [ADF-740] add button for attachment content list for process

* changed locatin for translation

* [ADF-740] added test for add button for process attach

* [ADF-740] added PR request changes
2017-08-01 11:25:32 +01:00
Denys Vuika 5f5da2f631 update npm5 lock files 2017-08-01 11:25:32 +01:00
Eugenio Romano ec090ea1ae [ADF-799] add HappyPack to webpack conf (#1956) 2017-08-01 11:25:32 +01:00
Denys Vuika 8258859359 fix issues with the require keyword (angular cli) (#1954) 2017-08-01 11:25:32 +01:00
Popovics András 10c0a87a06 [ADF-589] Login component different bug fixes (#1953)
* Basic style changes

* Further design changes

* Responsive design fixes

* Different sign in button style for the different login steps
2017-08-01 11:25:32 +01:00
Denys Vuika 6e09b9c550 [ADF-643] upload enhancements (#1949)
* rework folder uploading

- flatterns hierarchy on folder upload
- performs a single traversal for the entire folder heirarchy and ends with a comple file list
- allows now dropping folders on existing folders
- overall code improvements

* fix unit tests

* readme updates

* clean old and unused code

* code cleanup

* limit concurrent uploads

* update code as per review

* fix upload button for Safari

* fixes for Safari

- Safari compatibility
- code updates based on review

* fix code

* fix unit tests
2017-08-01 11:25:32 +01:00
Eugenio Romano 7aa3426c2f fix thumbnail task process list (#1951) 2017-08-01 11:25:32 +01:00
Maurizio Vitale 5f9132fa49 [ADF-741] Add the create task attachment component to the demo shell (#1946)
* Add the create task attachment component to the demo shell

* Add translation keys

* Add return to methods
2017-08-01 11:25:32 +01:00
Maurizio Vitale 872d74efa6 [ADF-773] Fix datatable custom template render (#1947) 2017-08-01 11:25:32 +01:00
Eugenio Romano 9358c24003 fix translation wrong folder creation issue 2017-08-01 11:25:32 +01:00
Eugenio Romano 6bd4b9b548 fix blob input in text viewer (#1942) 2017-08-01 11:25:32 +01:00
Popovics András 0493a8ac8a [ADF-763] Add Chrome default browser for karma chrome launcher for Chrome versi… (#1941)
* Add Chrome default browser for karma chrome launcher for Chrome version<59

* Fixing intermittently failing test in ng2-activiti-analytics component
2017-08-01 11:25:32 +01:00
Denys Vuika 64b1db0997 [ADF-754] toolbar component (#1938)
* toolbar component

- simple toolbar component (core lib)
- readme updates (core lib)
- update demo shell with toolbar component demo (document list)

* update unit tests
2017-08-01 11:25:32 +01:00
Eugenio Romano 762f6a3223 add info and link on current last git commit (#1940) 2017-08-01 11:25:32 +01:00
Denys Vuika ab534215ba support for healdess chrome (#1939) 2017-08-01 11:25:32 +01:00
Maurizio Vitale 4f8bb99bdf [ADF-744] Attachment List is not displayed within Processes. (#1937)
* Use the adf process attachment list indise demo shell

* Change documentation
2017-08-01 11:25:32 +01:00
Maurizio Vitale 6706c1fc3b [ADF-686] add blobFile as input (#1933) 2017-08-01 11:25:32 +01:00
Eugenio Romano 2080bf4e72 rollback demo tag 2017-08-01 11:25:32 +01:00
Eugenio Romano 3590811f34 Source Mapping is not working on test debugging (#1931)
* coverage single components run fix

* remove spec.ts from coverage

* make the coverage and the istanbul-instrumenter-loader works only over the console test because a problem on the remapping for the browser test

* move tslint on the main folder of any component

* remove build:w from readme

* stop build tslint error also in spec files

* clear karma file from unnecessary files

* add set -f for build all script in order to accept *

* fix lint problem and failing tests

* fix failing test search component

* add loader test for viewer

* fix tslint error userinfo

* --max_old_space_size=2048 remove

* fix tslint error uploader unused EventEmitter

* remove spec|index|.*mock|.*model|.*event from coverage
2017-08-01 11:25:32 +01:00
Denys Vuika b815034ef8 [ADF-571] upload feature rework (#1922)
* upload feature rework

lots of improvements for upload dialog and underlying services

* readme update

- readme cleanup
- remove some old comments from code
- update readme with new events for Upload Service

* restore prerequisites section in readme
2017-08-01 11:25:32 +01:00
Infad Kachancheri 0b3a909004 [ADF-713] Process Attachment - Provide a way to attach a new content (#1920)
* added service to get all the related content of the process instance

* added new component to create/upload attachment for process instance

* added unit test cases for create-process-attachment component

* exported create-process-attachment component

* added documentation for create-process-attachment component
2017-08-01 11:25:32 +01:00
Eugenio Romano 1fba805ab8 [ADF-721] Fix translation reference for dev task (#1923)
* move translation files in the bundles folder

* fix after review
ripristinate tslint and remove override tsconfig
2017-08-01 11:25:32 +01:00
Vito faf80375a7 [ADF-707] Ability to select a row on a dynamic table (#1921) 2017-08-01 11:25:32 +01:00
Infad Kachancheri 44939d4ce7 [ADF-712] Task Attachment - Provide a way to attach a new content (#1898)
* create button, download, view functionality added in task attachment list component

* created sevice to attach document to task

* added new component to create/uplaod attachment to task

* added new component to create/uplaod attachment to task

* added test case for create task attachment component

* added test case for create task attachment component

* added input to block upload document  to ECM

* fixed create task attachment spec file issue

* changed alfresco-upload to alfresco-core upload directive

* removed attachCreate button and emitter from task-attachment-list

* removed uploadToEcm input and checkValidity method from alfresco-upload

* added documentation for task-attachment-list and create-task-attachment components
2017-08-01 11:25:32 +01:00
Infad Kachancheri 7ea5a5fb5f [ADF-710] Create an Process Attachment List component (#1919)
* added new component to list the process attachments with view, download and delete functionality

* added unit test cases for activit-process-attachment-list component

* exported new process attachment list component

* added documentation for process-attachment-list component
2017-08-01 11:25:32 +01:00
Denys Vuika 07fe51e96c [ADF-667] selection mode and row styles (#1914)
* selection mode and row styles

- single/multiple/none selection modes for DataTable component (and Document List)
- support for custom row styles (inline and classname values)
- fix karma config (material themes)
- readme updates
- package-lock.json files for NPM5 support
- updated DataTable demo to demonstrate selection modes and row styles

* remove package lock files
2017-08-01 11:25:32 +01:00
Vito 6df1078d09 [ADF-680] Added previous page check when page has no more elements (#1911)
* [ADF-242] - fix for deleting - saving a report

* [ADF - 242] added test for fixed feature on reports save - delete

* [ADF-680] - Fixed behaviour when deleting all files on last page of document list

* Start adding test for documentlist check

* Added test for check double page load

* [ADF-680] - removed commented test code

* [ADF-680] Added changes from peer review

* [ADF-680] added return type
2017-08-01 11:25:32 +01:00
Denys Vuika 99c7bde6b6 [ADF-573] support for toggling enabled state (#1912) 2017-08-01 11:25:32 +01:00
Denys Vuika 6f37612563 [ADF-604] Upgrade @angular/material to latest version (#1909)
* update dependencies and module imports

* fix template warnings and fix import issues

* migrate Activiti Form to MdTabsModule

* fix unit tests

* fix tests

* fix unit tests

* fix unit tests

* disable test that fails only on travis

* upgrade activiti form component to angular/material

* fix test (remove MDL class check)
2017-08-01 11:25:32 +01:00
Denys Vuika 19b96227bd [ADF-640] reload document list on folder upload (#1895)
* reload document list on folder upload

- extend UploadService with 'folderCreated' event to be able reacting on folder uploads globally
- extend Demo Shell to reload document list on UploadService events (folderCreated)

* readme updates
2017-08-01 11:25:32 +01:00
Denys Vuika 865e67ee58 [ADF-610] Upload button and DnD area should not upload hidden files and folders (#1908)
[ADF-610]  upload cleanup
- more strongly typing
- api improvements

* Upload cleanup and api improvements

- remove old unused settings (formFields variable)
- individual options for uploaded files (i.e. versioning)
- upload button and drag-and-drop area now set individual settings for file versioning

* exclude hidden files from upload
2017-08-01 11:25:32 +01:00
Eugenio Romano b7e33d6cbf Update PREREQUISITES.md 2017-07-04 19:08:56 +02:00
Eugenio Romano b30ec26213 no save development js-api (#2033) (#2034) 2017-06-30 18:13:08 +01:00
Eugenio Romano b3ae674f7a regenerate lock 2017-06-30 01:19:47 +01:00
Eugenio Romano 8ead3d8aae 1.6.1 2017-06-29 21:52:06 +01:00
Eugenio Romano b15ab3b988 1.6.0 (#2029)
* fix upload area snackbar behaviour

* SASS support for components

ability to use '.scss' files from within components

* [ADF-610] Upload button and DnD area should not upload hidden files and folders (#1908)

[ADF-610]  upload cleanup
- more strongly typing
- api improvements

* Upload cleanup and api improvements

- remove old unused settings (formFields variable)
- individual options for uploaded files (i.e. versioning)
- upload button and drag-and-drop area now set individual settings for file versioning

* exclude hidden files from upload

* [ADF-640] reload document list on folder upload (#1895)

* reload document list on folder upload

- extend UploadService with 'folderCreated' event to be able reacting on folder uploads globally
- extend Demo Shell to reload document list on UploadService events (folderCreated)

* readme updates

* [ADF-621] show drop effect on folders only (#1897)

* show drop effect on folders only

- fix `hasValue` api for data rows (avoid 'false' value to be evaluated as missing value)
- support for evaluating drop support for rows
- document list enables upload zones for folders only

* api improvements as per code review

* [ADF-242] Fixed behaviour for saving/deleting reports (#1905)

* [ADF-242] - fix for deleting - saving a report

* [ADF - 242] added test for fixed feature on reports save - delete

* Added translation key

* [ADF-604] Upgrade @angular/material to latest version (#1909)

* update dependencies and module imports

* fix template warnings and fix import issues

* migrate Activiti Form to MdTabsModule

* fix unit tests

* fix tests

* fix unit tests

* fix unit tests

* disable test that fails only on travis

* upgrade activiti form component to angular/material

* fix test (remove MDL class check)

* [ADF-613] Add plain text viewer (#1873)

* add plain text viewer

* different devices optimizations

* returns types

* [ADF-573] support for toggling enabled state (#1912)

* [ADF-602] Accordion component - Add basic documentation (#1913)

* Add basic documentation Accordion component

* Update README.md

* [ADF-680] Added previous page check when page has no more elements (#1911)

* [ADF-242] - fix for deleting - saving a report

* [ADF - 242] added test for fixed feature on reports save - delete

* [ADF-680] - Fixed behaviour when deleting all files on last page of document list

* Start adding test for documentlist check

* Added test for check double page load

* [ADF-680] - removed commented test code

* [ADF-680] Added changes from peer review

* [ADF-680] added return type

* [ADF-667] selection mode and row styles (#1914)

* selection mode and row styles

- single/multiple/none selection modes for DataTable component (and Document List)
- support for custom row styles (inline and classname values)
- fix karma config (material themes)
- readme updates
- package-lock.json files for NPM5 support
- updated DataTable demo to demonstrate selection modes and row styles

* remove package lock files

* move demo projects to webpack (#1915)

* wav and Mp3 enabling viewer (#1916)

* add option only demo shell version change for update version script

* ADF-402 add the show diagram button (#1917)

* [ADF-707] Ability to select a row on a dynamic table (#1921)

* [ADF-710] Create an Process Attachment List component (#1919)

* added new component to list the process attachments with view, download and delete functionality

* added unit test cases for activit-process-attachment-list component

* exported new process attachment list component

* added documentation for process-attachment-list component

* [ADF-712] Task Attachment - Provide a way to attach a new content (#1898)

* create button, download, view functionality added in task attachment list component

* created sevice to attach document to task

* added new component to create/uplaod attachment to task

* added new component to create/uplaod attachment to task

* added test case for create task attachment component

* added test case for create task attachment component

* added input to block upload document  to ECM

* fixed create task attachment spec file issue

* changed alfresco-upload to alfresco-core upload directive

* removed attachCreate button and emitter from task-attachment-list

* removed uploadToEcm input and checkValidity method from alfresco-upload

* added documentation for task-attachment-list and create-task-attachment components

* [ADF-696] Entire accordion group header should be clickable (#1918)

* #ADF-696 Added new input to show/hide expand icon, click event is activated for the complete heading

* #ADF-696 tslint fix

* #ADF-696 Added documentation for new input and removed unwanted div

* [ADF-721] Fix translation reference for dev task (#1923)

* move translation files in the bundles folder

* fix after review
ripristinate tslint and remove override tsconfig

* [ADF-709] add autofocus when a new row is added on dynamic table widget (#1927)

* [ADF-709] add autofocus when a new row is added on dynamic table widget

* [ADF-709] removed wrong reference for template

* [ADF-713] Process Attachment - Provide a way to attach a new content (#1920)

* added service to get all the related content of the process instance

* added new component to create/upload attachment for process instance

* added unit test cases for create-process-attachment component

* exported create-process-attachment component

* added documentation for create-process-attachment component

* Add data-automation-id to multi select checkbox (#1924)

* [ADF-571] upload feature rework (#1922)

* upload feature rework

lots of improvements for upload dialog and underlying services

* readme update

- readme cleanup
- remove some old comments from code
- update readme with new events for Upload Service

* restore prerequisites section in readme

* fix i18n issue with webpack

* exported report and chart models (#1925)

* fix file upload bug (#1928)

- proper extraction of File objects from the FileList

* lock files for npm 5 (#1930)

add lock files for npm v5; does nothing for earlier versions, so is not harmful

* Source Mapping is not working on test debugging (#1931)

* coverage single components run fix

* remove spec.ts from coverage

* make the coverage and the istanbul-instrumenter-loader works only over the console test because a problem on the remapping for the browser test

* move tslint on the main folder of any component

* remove build:w from readme

* stop build tslint error also in spec files

* clear karma file from unnecessary files

* add set -f for build all script in order to accept *

* fix lint problem and failing tests

* fix failing test search component

* add loader test for viewer

* fix tslint error userinfo

* --max_old_space_size=2048 remove

* fix tslint error uploader unused EventEmitter

* remove spec|index|.*mock|.*model|.*event from coverage

* move coverage separate file and get component to calculate coverage as input

* remove old 'banned' demo from login screen (#1929)

* add sleep time flag in publish script

* rollback demo tag

* fix pacakge.json tag

* [ADF-686] add blobFile as input (#1933)

* coverage fix (#1934)

* [ADF-702] Task/Process Filter - Provide a way to change the default filter (#1932)

* [ADF-702] Task/Process Filter - Provide a way to change the default filter

* Provide a way to select a custom menu filter

* Improve activiti process filter

* Add internal link

* Change link name

* add link

* [ADF-744] Attachment List is not displayed within Processes. (#1937)

* Use the adf process attachment list indise demo shell

* Change documentation

* support for healdess chrome (#1939)

* #ADF-696 Now accordion opens/closes on click of group header along with emitting heading click event (#1936)

* add info and link on current last git commit (#1940)

* [ADF-754] toolbar component (#1938)

* toolbar component

- simple toolbar component (core lib)
- readme updates (core lib)
- update demo shell with toolbar component demo (document list)

* update unit tests

* [ADF-763] Add Chrome default browser for karma chrome launcher for Chrome versi… (#1941)

* Add Chrome default browser for karma chrome launcher for Chrome version<59

* Fixing intermittently failing test in ng2-activiti-analytics component

* Adding new icon (sent) for Bootstrap to Material icon mapping (#1943)

* fix blob input in text viewer (#1942)

* GitHub issue & pull request template change (#1945)

* Update ISSUE_TEMPLATE.md

* Update PULL_REQUEST_TEMPLATE.md

* [ADF-689] Fix alfresco-document-menu-action styling (z-index) (#1944)

* fix translation wrong folder creation issue

* [ADF-773] Fix datatable custom template render (#1947)

* [ADF-780] centralised call for process filters api (#1950)

* [ADF-780] centralised call for process filters api

* [ADF-780] updated conversion to string

* [ADF-741] Add the create task attachment component to the demo shell (#1946)

* Add the create task attachment component to the demo shell

* Add translation keys

* Add return to methods

* fix thumbnail task process list (#1951)

* [ADF-643] upload enhancements (#1949)

* rework folder uploading

- flatterns hierarchy on folder upload
- performs a single traversal for the entire folder heirarchy and ends with a comple file list
- allows now dropping folders on existing folders
- overall code improvements

* fix unit tests

* readme updates

* clean old and unused code

* code cleanup

* limit concurrent uploads

* update code as per review

* fix upload button for Safari

* fixes for Safari

- Safari compatibility
- code updates based on review

* fix code

* fix unit tests

* [ADF-589] Login component different bug fixes (#1953)

* Basic style changes

* Further design changes

* Responsive design fixes

* Different sign in button style for the different login steps

* #ADF-780 Fixed getProcessFilterByName to get the correct filter for the given appId and name (#1952)

* fix issues with the require keyword (angular cli) (#1954)

* [ADF-799] add HappyPack to webpack conf (#1956)

* update npm5 lock files

* [ADF-740] Add button for process attachment list (#1955)

* [ADF-740] adding button to allow user to upload related content on process instance

* [ADF-740] add button for attachment content list for process

* changed locatin for translation

* [ADF-740] added test for add button for process attach

* [ADF-740] added PR request changes

* [ADF-802] fix error on uploading file to attachment list (#1957)

* [ADF-802] fix error on uploading file to attachment list

* [ADF-802] improved for loop

* [ADF-797] remove dist folder from npm distributed package , leave src and bundles (#1961)

* [ADF-804] webpack proxy setup to avoid CORS problem (#1960)

* package lock update

* update travis to node 8 (#1965)

* upload service exposes created nodes (#1964)

* [ADF-591] documentation refinements (#1959)

* refine ng2-activiti-analytics

* refine ng2-activiti-diagrams docs

* refine ng2-activiti-form

* refine ng2-activiti-processlist

* refine ng2-activiti-tasklist

* refine ng2-alfresco-core

* refine ng2-alfresco-datatable

* refine ng2-alfresco-datatable

* refine gn2-alfresco-login

* refine ng2-alfresco-search

* refine ng2-alfresco-social

* refine ng2-alfresco-tag

* refine ng2-alfresco-upload

* refine ng2-alfresco-userinfo

* refine ng2-alfresco-viewer

* refine ng2-alfresco-webscript

* various readme cleanups

* fix builds related to node-sass library (#1966)

* update dependencies and remove old lock files

* update sass loader

* updated lock files

* [ADF-578] Remember me functionality (#1962)

* Remember me functionality

* Happy pack to ng2-components' package.json

* Build fix

* Adding tabindices to viewer control elements (#1968)

* karma conf all single browser

* Fix current page number issue (#1970)

* [ADF-524] Datatable loading state (#1958)

* loading state datatable

* modify readme after review

* [ADF-78]  Update CORS help (#1973)

* Fix host configuration in demo-shell when no port is present (#1971)

* remove brachet

* [ADF-494] fixed readonly rendering for forms (#1972)

* [ADF-494] improved disabling for form

* [ADF-494] fixed readonly rendering for forms

* [ADF-814] application configuration service (#1969)

* app configuration service

* api improvements and readme update

* extend readme and add defaults

* unit tests for app config service

* [ADF-716] Task Header - Use a custom view inside the component (#1967)

* Use a generic custom view inside the task header

* Move the component into core component and change name

* Missing file

* Fix unit test

* fix unit test component name

* fix issue with shared Code settings

- remove obsolete rules for .js/.ts
- hide .happypack folder in the project tree

* [ADF-810] fix default value radio button (#1975)

* [ADF-510] Drag&Drop check permission to allow user to upload a file (#1948)

* [ADF-510] added permission check for drag&drop

* Improved code for drag and drop side

* Added test for drag and drop upload area changes

* Added test for document list permissions check

* [ADF-510] rebased branch after changes applied to upload

* [ADF-510] rebased branch and fixed tests

* [ADF-717] upgrade i18n and charting dependencies (#1976)

* remove app-specific polyfill dependencies

remove polyfill dependencies never used by component libraries

* upgrade i18n dependencies

* upgrade ng2-charts dependency

* fix unit tests

* update demo projects

* [ADF-524] Fix empty state after the loading introduction (#1980)

* fix empty state after the loading introduction

* Update document-list.component.spec.ts

remove typo

* [ADF-838] Table of content automatic creation (#1981)

* readonly value set

* Table of content automatic creation (#1982)

* add missing intl dependency for demo shell (#1984)

* [ADF-833] DataTable -  improve the single and double click event (#1979)

* Improve the single and double click event

* Fix unit test

* Task header basic documentation (#1985)

* Disable upload attachment when the task is completed (#1987)

* [ADF-847] upgrade to use application configuration service (#1986)

* migrate core lib to use server-side app config

* fix unit tests

* update Search tests

- update tests
- upgrade tests to use TestBed

* update UserInfo tests

* update Social tests

* update tests

* update unit tests

* cleanup old code

* update about page

* update demo shell readme

* dev and prod configurations

* updated package-lock file and removed duplicates in package.json

* [ADF-851] execute-outcome event for form service (#1989)

* execute-outcome event for form service

* readme updates

* fix loading state excluding other state during the loading (#1991)

* Fix compilation error (#1993)

* [ADF-883] Fix build errors (#1992)

* [ADF-793] Ability to create PDF renditions in case of non supported formats (#1994)

* Style changes and button

* Convert to PDF button

* Convert to PDF button part II.

* Convert within the Not Supported Format component

* Rendition loading skeleton

* Conversion is working.

* Convert button behaviour tests

* Rebasing fix.

* app settings page (#1997)

- custom app setttings service to use isolated storage (demo shell)
- restore settings UI
- redirect angular and rxjs to the same version as components use.

* [ADF-822] Added the npm-prepublish script (#1978)

* added the npm prepublish script

* changed permissions to prepublish script

* changed to npm run prepublish

* prepare the pr

* removed useless code to the script

* remove flags lib from demo shell (#1983)

* remove flags lib from demo shell

greatly reduce demo shell webpack resources by switching off flags (only 3 icons were displayed in the past)

* merge package.json

* add icons

* Fix typo error

* [ADF-794] Add people assignment component (#1977)

* Add people component

* exported people service

* added people-list component to show the involved user list

* changed people-search component layout

* changed people-list usage in people component

* changed people-list data table from custom template to data adapter

* changes people-search component related to people-list

* changes in activiti-people related to people-list and people-search component

* changed data adapter to direct data column setting to data-table

* removed ngChanges and added User and UserEvent models

* added User and UserEvent model in emitter and other emitter handler

* added user event model

* changed activiti-people component with latest UX changes

* addedand changed translate keys to the components

* added hasUser method to check the condition in html

* fixed tslint issue and test case issue in activiti-people component

* added test case for actviti-people-list component

* test case added for activiti-people-search component

* changed activiti-people test cases according to latest UX changes

* added description for activiti-people component

* changed test case to fix component.upgradeElement issue

* changes requested by Vito Albano #1

* splitted getDisplayUser into getDisplayUser and getInitialUsername

* introduce check type definition

* [ADF-897] - ActivitiPeopleList - use the adf prefix (#2001)

* Use the adf as prexif instead of activiti

* Fix typo

* Fix wrong import

* support binding [form] data directly (#1996)

- ability to bind [form] data directly inside `<activiti-form>` component
- ability to parse forms with FormService
- demo of the custom form in demo shell

* [ADF-778] cancel window for upload dialog shows only on complete (#2003)

* [ADF-778] Added new behaviour to upload dialog

* [ADF-778] cancel window for upload dialog shows only on complete

* [ADF-778] changed variable name to showCloseButton

* Create task/process attachment Compilation error (#2004)

* fix tslint errors

minor fix for "Unnecessary semicolon" TSLint rule

* [ADF-842] Fixed type for taskdetails (#2009)

* fix type definition (#2002)

* Use the activiti people with the new look and feel inside the demo shell (#2008)

* add rxjs and @angular in tsconfig.json

* [ADF-843] Form events bus (#1990)

* form events bus

* event test bus fix

* fix test after code review

* fix types errors

* change to public formservice

* make optional formservice

* [ADF-915] Add option to change the JS-API with different version in the update package

* Missing keys (#2011)

* [ADF-845] breadcrumb root option added and style review (#1999)

* breadcrumb root option added and style review

* new breadcrumbs

* split onchange in a method

* update readme with a note for old pefix tag

* fix tslint errors

* fix breadcrumb test

* [ADF-922] Regenerate package-lock.json files for every package and create script for doing that in the future (#2012)

* Updated package-lock.json files

* npm-relock-pkgs.sh

* Update README.md

* Fix ng2-alfresco-search sass problem

* SASS version update (#2013)

* sass update

* update sass loader

* vjsapi option prepublish

* prepublish script deprecation in favour of prepublishOnly node 8 (#2010)

* modify prePublish script with preoPublishOnly

* install rimraf globally

* fix clean scripts demo folders

* move appveyor to node 8

* Appveyor test (#1998)

* reduce memory

* remove max-old-space

* remove increase memory

* create new TaskDetailsModel in loadNextTask (#2017)

* Fix readme document list

* [ADF-907] - Form reacts to data added in input (#2016)

* [ADF-907] Enable activiti form to react on value data changes

* [ADF-907] - Form reacts to data added in input]

* [ADF - 907] added mock json for form

* [ADF-907] added new event of the form to the event list

* [ADF - 907] Added return column to README

* [ADF - 907] Added return column to README

* Script add pkg and clean update

* install globally pkg pre build

* Fix upload related content (#2019)

* regeneration TOC and add automatic list component generator (#2022)

* Fix upload process attachment (#2024)

* update typescript (#2026)

* update viewer readme

* fix type definition variables

* NgZone type passed parameter

* fix tslint error in tasklist

* Add screenshot (#2028)

* fix search miss typing

* bump version 1.6.0 (#2027)
2017-06-29 15:57:37 +01:00
Eugenio Romano c6f6227da7 update-version script 2017-05-26 15:12:08 +01:00
Eugenio Romano 9fe6f4b06c split the module runner ts-loader between dev and production in the way that the production runner will override the path during the build (#1907) 2017-05-26 15:11:35 +01:00
Eugenio Romano f835e43e45 Merge pull request #1906 from Alfresco/development
1.5.0
2017-05-25 18:10:11 +01:00
Eugenio Romano 81270d3a32 fix image in dist 2017-05-25 15:12:56 +01:00
Eugenio Romano c751c28bbd update 1.5.0 version (#1903) 2017-05-25 15:12:56 +01:00
Eugenio Romano e376b34341 update version library demo folders (#1901)
* update version library demo folders

* fix demo dependency

* fix upload demo and check permissions

* fix images webpack resolution

* fix update versions script
2017-05-25 15:12:56 +01:00
Denys Vuika 5b4aad5d91 icon type for columns (#1902)
- new 'icon' type for columns to render internal icons
- enable attachment list in the demo shell
2017-05-25 15:12:55 +01:00
Eugenio Romano 0f66ce3472 ADF-656 about component fix (#1899) 2017-05-25 15:12:55 +01:00
Vito 2b755d7ee4 [ADF-673] - text widget value is not updated when the mask is not applied (#1900) 2017-05-25 15:12:55 +01:00
Denys Vuika 10b310288a upgrade zone.js to fix stack trace errors in console 2017-05-25 15:12:55 +01:00
Eugenio Romano 9f96f7ea82 use correct -dev build options appveyor
check for invalid options start.sh and npm-clean.sh
2017-05-25 15:12:55 +01:00
Eugenio Romano 120db7e52c fix prod build demo 2017-05-25 15:12:55 +01:00
Eugenio Romano 545879f090 appveyor split 2017-05-25 15:12:55 +01:00
Eugenio Romano ba9ac5c469 gnu mode change version script for sed incompatibility 2017-05-25 15:12:54 +01:00
Eugenio Romano 95d2219332 update version script refactoring 2017-05-25 15:12:54 +01:00
Eugenio Romano 2ac6439bb4 check bundles script 2017-05-25 15:12:54 +01:00
Denys Vuika 2ea5e8d0e0 Merge branch 'development' of https://github.com/Alfresco/alfresco-ng2-components into development 2017-05-25 15:12:54 +01:00
Eugenio Romano ee77a1c53f set ex update version 2017-05-25 15:12:54 +01:00
Eugenio Romano 92ceb0b867 update version folder 2017-05-25 15:12:54 +01:00
Eugenio Romano 4a753e6aa3 update version script modify 2017-05-25 15:12:54 +01:00
Denys Vuika 6acb8e128f fix demo shell references to components
- fix an issue with demo shell not checking changed code inside the local component folders
2017-05-25 15:12:53 +01:00
Eugenio Romano f9b8e8efc8 fix tag publish 2017-05-25 15:12:53 +01:00
Eugenio Romano c5f0196e71 cahnge label permission button (#1894) 2017-05-25 15:12:53 +01:00
Eugenio Romano 84d0415171 example to not overlay mode viewer (#1893) 2017-05-25 15:12:53 +01:00
Vito 246180925e [ADF-509] - fixed settings window dimension (#1892)
* [ADF-509] - fixed settings window dimension

* [ADF-509] - Changed fixed pixel dimension with percentage values
2017-05-25 15:12:53 +01:00
Eugenio Romano 811e1b3783 invert clean and registry 2017-05-25 15:12:52 +01:00
Denys Vuika da18a21e7c [ADF-551] sorting for document list (#1891)
* table cell component

- table cell component with performance improvements

* permissions and sorting fixes

- fixed ability to set default sorting
- fixed permission evaluation
- new: context menu now also works with permissions
- disabled tags column in demo shell due to performance implications

* fix unit tests

* fix tsconfig for unit testing
2017-05-25 15:12:52 +01:00
Eugenio Romano ef5bb6333c change order publish script install and dev js api 2017-05-25 15:12:52 +01:00
Eugenio Romano 0e153c47ef group test (#1890) 2017-05-25 15:12:52 +01:00
Eugenio Romano 59021ae9d2 activiti-start-process should accept list of process variable in input (#1880) 2017-05-25 15:12:52 +01:00
Eugenio Romano 075ee8a538 relative pointing (#1879)
readme modify
start.sh and nom-build-all refactoring
change travis conf
update version of zone.js (fixes console error)
karma conf remove dist
add alias build
override tsconfig components build
2017-05-25 15:12:52 +01:00
Eugenio Romano d5f90a59f4 List all components in readme (#1889) 2017-05-25 15:12:51 +01:00
Vito 38a04d24fc [ADF-647] Fix retrieving value for dropdown (#1888)
* [ADF-647] Fix retrieving value for dropdown
2017-05-25 15:12:51 +01:00
Vito e8889a5adb [ADF-147] Add input mask to Text Widget on Form (#1885)
* ADF-147 create directive to apply input mask
* ADF-147 - created directive for calculate input mask
* ADF-147 added input mask for text element
2017-05-25 15:12:51 +01:00
Denys Vuika b79ee13d11 [ADF-641] fix upload issues with various file types (#1887)
* fix upload issues with various file types

- removes file type check as most browsers leave this field empty
- allows uploading all types of files

* remove obsolete tests
2017-05-25 15:12:51 +01:00
Denys Vuika e63802ef4f form renderer fixes (#1882)
- provide support for showing generated documents in Display Value widget
2017-05-25 15:12:51 +01:00
Maurizio Vitale a90423aa21 [ADF-491] Task Attachment List Component (#1877)
* Create a new component Task Attachment List
Improve the datatable to get the rows to show

* The component name should follow the guide style
Move the Content calls in a different service file
Show the attach file inside the viewer

* Change method name

* Datatable should get the path and show the icon

* Improve attachment component

* Improve datatable documentation

* Remove console.log
2017-05-25 15:12:51 +01:00
Denys Vuika 608b3639ea auth service enhancements (#1860) 2017-05-25 15:12:51 +01:00
Eugenio Romano af82f83669 Add config files in any components folder (#1878)
* add config files in any components folder
* all test run option ft and option to skip build and run only test
2017-05-25 15:12:50 +01:00
Denys Vuika 130c2e4428 auth service api improvements (#1865)
Rename Auth Service events:
- loginSubject -> onLogin
- logoutSubject -> onLogout
2017-05-25 15:12:50 +01:00
Eugenio Romano 4db98a1d7b Fix Readme scripts 2017-05-25 15:12:50 +01:00
Eugenio Romano 404ea5c852 token option 2017-05-25 15:12:50 +01:00
Eugenio Romano 72704cad57 [ADF-570] Script for Pushing to Registry (#1875)
* change prepublish to build only
add .npmrc in the gitignore and npmignore
clean .npmrc during the clean task
change registry during publish with npmrc file
add rimraf install in npm publish

* add option to link an alfresco-js-api from github

* npm build on develop branch will use the alfresco-js-api from develop

* modify script after review
add -gitjsapi to starts.sh to change jsapi pointing
add -vjsapi to starts.sh to change jsapi pointing

* start dist demo shell script option
2017-05-25 15:12:50 +01:00
Denys Vuika 1fadfa8166 [ADF-615] significant performance improvements for drag and drop (#1874)
* fix uploading to folders

* significant performance improvements for drag and drop

* unit test fixes
2017-05-25 15:12:50 +01:00
Denys Vuika 27ba99d11e disable ADF-551 due to conflicts with Permissions feature 2017-05-25 15:12:50 +01:00
Eugenio Romano be062917b8 start server fix 2017-05-25 15:12:49 +01:00
Mario Romano 6da0eaba37 Fix build problem (#1861)
* fix sourcemap
fix relative path and pre publish build
change travis wait
all test run build and remove unused cpx

* global test task
modify publish script to accept options

* appveyor run

* different approach single test run

* make it work the analytics test
modify start demo shell script to use a different registry

* sourcemap demo shell working

* update readme and add install after any clean
add registry option in start.sh script
add develop and normal mode in demo shell
add -d option in start.sh to point to the local components
add -c option in build script to point to the local components
2017-05-25 15:12:49 +01:00
Denys Vuika b0be88ec37 [ADF-551] allow setting sorting in html (#1857)
* allow setting sorting in html

* readme update

* update readme

* restore permissions code

* - Remove the check permission from the datatable and move inside the documentlist

* Remove commented test
2017-05-25 15:12:49 +01:00
Eugenio Romano 416d8c2a1b reintroduce start:dist task 2017-05-25 15:12:49 +01:00
Denys Vuika 07d898b2aa node-click and node-dblclick DOM events (#1863)
Extra DOM events with bubbling support for DocumentList:
- node-click
- node-dblclick
2017-05-25 15:12:49 +01:00
Denys Vuika 5c7d53230d fix upload directive for Safari (#1871) 2017-05-25 15:12:49 +01:00
Deepak Paul 3482cc57be [ADF-402] Process Diagram Widget - Show the current process state (#1867)
* Fixes for activiti process diagram

Fix to show the current process state. ADF issue no ADF-402

* #ADF-402 fix to show process state and unit tests changes

* fixed test for pipeline to match new angular4 changes on simple change (#1868)

* [DW-50]: New features for accordion-group component (#1851)

[ADF-557] -  Add a new property called showIcon as input to hide/show filter icons.

* [ADF-242] Select the first in the list when the report is deleted (#1862)

* ADF-242 Select the first in the list when the report is deleted

* Update README.md

* Fixes for activiti process diagram

Fix to show the current process state. ADF issue no ADF-402

* #ADF-402 fix to show process state and unit tests changes

* #ADF-402 Removed error logging and modified documentation
2017-05-25 15:12:49 +01:00
Infad Kachancheri bac2a45d18 [ADF- 556] Analytics Service - Add a new method to get the report details by name (#1869)
* added service to get report details by report name

* analytics service tslit fix#1

* added test cases for getReportList and getReportByName
2017-05-25 15:12:48 +01:00
Maurizio Vitale e09d317d1e [ADF-242] Select the first in the list when the report is deleted (#1862)
* ADF-242 Select the first in the list when the report is deleted

* Update README.md
2017-05-25 15:12:48 +01:00
Infad Kachancheri 22bbffdb21 [DW-50]: New features for accordion-group component (#1851)
[ADF-557] -  Add a new property called showIcon as input to hide/show filter icons.
2017-05-25 15:12:48 +01:00
Vito 664565a42a fixed test for pipeline to match new angular4 changes on simple change (#1868) 2017-05-25 15:12:48 +01:00
Denys Vuika e29741d18d [ADF-587] upgrade components to angular 4 (#1866)
[ADF-587]  upgrade components to angular 4
2017-05-25 15:12:48 +01:00
Maurizio Vitale 5ba1202292 Do not reload the tasks when the taskId and currentTask are the same (#1856) 2017-05-25 15:12:48 +01:00
Denys Vuika c07d12261f vs code config fixes 2017-05-25 15:12:48 +01:00
Eugenio Romano f6eeb8e76a fix sourcemap (#1864) 2017-05-25 15:12:47 +01:00
Eugenio Romano 9689097199 Fix table properties readme 2017-05-25 15:12:47 +01:00
Eugenio Romano a57520436c Update readme components list 2017-05-25 15:12:47 +01:00
Eugenio Romano 80d67212b7 [ADF-579] - move license check in webpack (#1859)
* move license check in webpack

* fix exclusion check header

* different headers
2017-05-25 15:12:47 +01:00
Denys Vuika 774017ac62 Merge branch 'development' of https://github.com/Alfresco/alfresco-ng2-components into development 2017-05-25 15:12:47 +01:00
Denys Vuika 0f04bcdcee update shared vs code settings 2017-05-25 15:12:47 +01:00
Eugenio Romano b5ebe5bc47 invert show default properties (#1858)
* invert show default properties

* fix test
2017-05-25 15:12:47 +01:00
Denys Vuika fc728676c0 webpack configuration fix 2017-05-25 15:12:47 +01:00
Infad Kachancheri 31bd24839e [DW-49]: Add new input to process activiti-filters component to show/hide icons (#1849)
[ADF-557]: Add new input to process activiti-filters component to show/hide icons
2017-05-25 15:12:46 +01:00
Eugenio Romano 4188a5aee9 clean rating component (#1854) 2017-05-25 15:12:46 +01:00
Infad Kachancheri 934509c7ba [DW-46] - Process Service - Add a new method to get the application details by Id (#1846)
ADF-555 - Process Service - Add a new method to get the application details by Id
2017-05-25 15:12:46 +01:00
eromano b47a5e49c0 fix pacakge json social and add force option publish script 2017-05-25 15:12:46 +01:00
Eugenio Romano 0b246b8211 Speed up build (#1852)
* single build webpack

* fix demo shell test
2017-05-25 15:12:46 +01:00
Infad Kachancheri 8959476941 [DW-45] Process Service - Fix the input type from string to number (#1845)
Process Service - Fix the input type from string to number
2017-05-25 15:12:46 +01:00
Infad Kachancheri 0fa56dff23 [DW-43] Task Service - Fix the input type from string to number (#1842)
ADF-554 Process Service - Fix the input type from string to number
2017-05-25 15:12:45 +01:00
Infad Kachancheri f89a0eafd9 [DW-44] - Task Service - Add a new method to get the application details by Id (#1843)
ADF-555 New service that returns application details for a given appId
2017-05-25 15:12:45 +01:00
Denys Vuika 25cffb1f19 add missing module exports (#1853)
- FileModel
- PermissionModel
2017-05-25 15:12:45 +01:00
Denys Vuika f33b841f9b [ADF-534] Login dialog enhancements (#1844)
* version 1.4.0 social component

* Login dialog enhancements

- ability to toggle ‘Remember me’ (switched off by default now)
- ability to toggle a footer with extra actions (switched off by
default now)
- readme updates

* fix unit tests
2017-05-25 15:12:45 +01:00
Eugenio Romano 6342c34f51 version 1.4.0 social component 2017-04-28 13:01:23 +02:00
Mario Romano bca027ddf0 Merge pull request #1850 from Alfresco/development
1.4.0
2017-04-27 14:18:33 +01:00
Mario Romano ac16f1c3dc 1.4.0 (#1848) 2017-04-27 14:05:12 +01:00
Denys Vuika fb25cd34d0 Update README.md 2017-04-27 14:05:12 +01:00
Mario Romano e065865ad4 revert change to the upgrade script 2017-04-27 14:05:12 +01:00
Maurizio Vitale 50abe09edb Fix bug related to upload button permission (#1838)
* Add the permission check on the activiti button

* Fix code after unit test

* Add basic documentation

* Improve the code and fix the missing file issue

* Fix unit test after refactoring

* remove duplicate log
2017-04-27 14:05:11 +01:00
Eugenio Romano e25b05d991 rating component #521 (#1810)
* rating component #521

* use adf prefix
2017-04-27 14:05:11 +01:00
Maurizio Vitale 1d45089125 #514 (#1840)
Follow the component guide style
The accordion should be open by default
2017-04-27 14:05:11 +01:00
Vito 93b8d3742f Added permission check on documentlist action menu (#1832)
* #ADF-166 - add permissin check on folder creation

* #ADF-166 - removed wrong pushed change

* #ADF-166 - improved permission check

* #ADF-166 - added test for menu action permission check

* #ADF-166 upgraded disabled attribute to match all the browsers

* #ADF-166 added peer review changes

* #ADF-166 added some little code improvements
2017-04-27 14:05:11 +01:00
Denys Vuika dad7a575f7 disable debug button by default (#1836)
- debug button is now disabled by default for the Form and Task Details
- debug mode now enabled by the demo shell explicitly
2017-04-27 14:05:11 +01:00
Denys Vuika 1dd283b0d8 Form renderer enhancements (#1839)
- readonly mode for “Dynamic Table”
- “Display Value” now just uses “Dynamic Table” if needed (previously
rendered the table itself)
- support for “tableEditable” settings
2017-04-27 14:05:11 +01:00
Denys Vuika 95711616ca upload button enhancements (#1835)
- add support for [disabled] attribute
- move to angular/material icons
- improve demo shell layout (files.component)
2017-04-27 14:05:11 +01:00
Denys Vuika 39ffd515d9 Viewer readme cleanup (#1837) 2017-04-27 14:05:10 +01:00
Denys Vuika 554e0d79db documentation updates (#1831)
- new walkthrough on metadata-driven UI
2017-04-27 14:05:10 +01:00
Vito 806874cdca #ADF-498 added check for valid settings addresses (#1834)
* #ADF-498 added check for valid settings addresses

* #ADF-498 added adf prefix to the new style class
2017-04-27 14:05:10 +01:00
Maurizio Vitale 1de625d960 Custom Filter Component (#1823)
* Add Accordion component

* Add property to hide icon

* Use accordion component in demo shell

* Add basic doc

* Add adf prefix

* Add element id and change unit test
2017-04-27 14:05:10 +01:00
Maurizio Vitale 0e4dab8b66 Disable upload button with no permission (#1820)
* Add the permission check on the activiti button

* Fix code after unit test

* Add basic documentation
2017-04-27 14:05:10 +01:00
Denys Vuika 721e96c01b fix checklist buttons (#1824) 2017-04-27 14:05:10 +01:00
Eugenio Romano 397c49810f Delete Jenkinsfile 2017-04-27 14:05:10 +01:00
Eugenio Romano 34439b0022 Delete fabric8.yml 2017-04-27 14:05:09 +01:00
Denys Vuika 87b479e720 datatable improvements (#1822)
- move ngSwitch outside of the ngFor directive (to avoid issues)
- improved template maintainance (without ngFor template hack)
- readme updates to reflect new features
2017-04-27 14:05:09 +01:00
Denys Vuika 6c2e56296f readme updates for Form component 2017-04-27 14:05:09 +01:00
Denys Vuika 82b32cde25 fix pagination styles (#1821) 2017-04-27 14:05:09 +01:00
Maurizio Vitale 87d889e8af Provide a way to retrieve the task filter by Id or by name (#1815)
* Provide a way to retrieve the task filter by Id or by name

* Update activiti-tasklist.service.ts

* Update activiti-tasklist.service.spec.ts

* Removed space
2017-04-27 14:05:09 +01:00
Maurizio Vitale 88edb1697a Provide a way to retrieve the process filter by id or name (#1817)
* Provide a way to retrieve the process filter by id or name

* Update activiti-process.service.ts
2017-04-27 14:05:09 +01:00
Eugenio Romano d4cc54d561 hide Pagination in empty folder #1595 (#1811)
* hide Pagination in empty folder #1595

* unify isPaginationEnabled condition in template #1595
2017-04-27 14:05:09 +01:00
Vito 09f3a6e30f fix userinfo test (#1819)
* fix userinfo test

* Added changes from review
2017-04-27 14:05:09 +01:00
Eugenio Romano 0fcd40b7f0 revert update ng2-translate-version #1397 (#1818) 2017-04-27 14:05:08 +01:00
Vito 26da797398 #ADF-452-userinfo show full name on the banner (#1814)
* #ADF-452-userinfo show full name on the banner

* #ADF-452 - added improvement from PR
2017-04-27 14:05:08 +01:00
Vito 1eea3c2983 #ADF-440 move start task and start process button on respective filters list (#1816) 2017-04-27 14:05:08 +01:00
Eugenio Romano 6af0f10fa8 demo shell remove unused import and add tslint on start dev 2017-04-27 14:05:08 +01:00
Maurizio Vitale f6102dfc07 DocumentList - Check permissions on delete folder/file (#1808)
* Add check permission on delete folder/file

* Provide a way to disable the action when if there is no permission

* Improve the code using the external permission inside the folder/document action service

* Add basic documentation.
 - How disable the button when the permission is missing
 - How to show a notification message when the permission is missing

* Resize the image

* Change the value to true for demo purpose

* Update folder-actions.service.ts

* Update document-actions.service.ts
2017-04-27 14:05:08 +01:00
Eugenio Romano ab3d18e5c1 update ng2-translate-version #1397 (#1805)
* update ng2-translate-version #1397

* change karma.conf and build for ng2-translate 4.0.0
2017-04-27 14:05:08 +01:00
Eugenio Romano dba5d5a037 reload folder after success upload event only if is the event is related to the current folder #1637 (#1813) 2017-04-27 14:05:08 +01:00
Vito 4bee113e36 #1426 - Checklist task delete action (#1812)
* #1426 - added remove checklist feature on task details
* #1426 - Improved test for tasklist service
* 426 - added component test for deleting a checklist
2017-04-27 14:05:07 +01:00
Maurizio Vitale d2f7a6858f Activiti form - Custom date format (#1806)
* Fix format date|
#1704

* Add unit tests on custom format date
#1704

* Update form-field.model.ts

* Update display-value.widget.ts
2017-04-27 14:05:07 +01:00
Vito 02052c3ea9 #1652 - Save and Export should appear on saved reports (#1807)
* #1652 - Save and Export should appear on saved reports

* #1652 - added some test and upgraded condition on html
2017-04-27 14:05:07 +01:00
Maurizio Vitale 7239b37dac Activtiti apps - Provide a way to filter the apps (#1804)
* Provide a way to filter the apps
#1389

* Add unit test
#1389

* Add documentation
#1389

* Improve docs
#1389

* Correct image

* Add parameter filtersAppId to docs
2017-04-27 14:05:07 +01:00
Vito 25a430c933 #1712 - Removed old private api call for wokflows users and groups (#1799)
* #1712 - changed workflow api call from private to enterprise

* #1712 - removed Testbed added injector
2017-04-27 14:05:07 +01:00
Eugenio Romano b3e2c28582 Merge branch 'master' into development 2017-04-27 14:05:07 +01:00
Eugenio Romano a68b80390f Update README.md 2017-04-23 22:54:54 +01:00
Eugenio Romano 8725a745c2 1.3.0 (#1795) 2017-04-04 12:27:58 +01:00
Eugenio Romano 6ac9d45bcf add test document menu component (#1802) 2017-04-03 06:22:34 -07:00
Eugenio Romano 53c1af445e Notification service test (#1801) 2017-04-02 13:44:12 +01:00
Maurizio Vitale 64a66e676b Improve activiti content coverage (#1800) 2017-04-02 13:44:05 +01:00
Denys Vuika afa21dcc42 unit tests (#1798) 2017-03-31 19:53:40 +01:00
Eugenio Romano 955f8759e3 remove unused phantomjs dep (#1797) 2017-03-31 18:08:40 +01:00
Denys Vuika 73b1ed6040 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-03-31 15:44:54 +01:00
Denys Vuika 5a692f28f5 use original error message for CORS/offline state in login (#1790)
* use original error message for CORS/offline state in login

* fix tests
2017-03-30 19:26:28 +01:00
Mario Romano 2651ec46d6 #1711 fix version package.json 3rd libraries (#1768)
* #1711 fix version package.json 3rd libraries

* fix test
2017-03-30 19:06:01 +01:00
Eugenio Romano 3f007ce464 remove unused old travis file (#1793) 2017-03-30 18:54:32 +01:00
Vito 2cc124bb87 #1657 - Added filter by name when clicking on specific app (#1794) 2017-03-30 18:15:32 +01:00
Maurizio Vitale 952df8d81c 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-03-30 18:14:22 +01:00
Maurizio Vitale 406d96d5bf The process filter should not be created twice (#1789) 2017-03-30 18:12:35 +01:00
Maurizio Vitale a608bc40a4 Close the dialog when the activiti content preview is cliecked (#1792) 2017-03-30 18:10:26 +01:00
Eugenio Romano 04f343b28f fix dropdown visibility #1593 (#1767)
* fix dropdown visibility #1593

* fix test search workaround material2 issue 1913
2017-03-30 10:26:18 +01:00
Denys Vuika 4814e95e30 add custom columns support for process list (#1787) 2017-03-30 02:02:08 -07:00
Denys Vuika cbadbdec35 workaround for tooltips (#1786)
- migrate buttons to angular/material
- move buttons to the left (workaround for tooltips)
2017-03-30 09:51:20 +01:00
Denys Vuika fa448374a9 fix datatable multi select checkboxes (#1784)
* fix datatable multi select checkboxes

* template cleanup

* fix unit tests
2017-03-30 01:44:34 -07:00
Vito 4ef560e7f5 #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-03-30 09:16:52 +01:00
Vito 0dd8878b45 #1654 - move download management to content service from core (#1788) 2017-03-30 09:15:59 +01:00
Eugenio Romano 3a300c20d4 Minification fix #1693 (#1782) 2017-03-28 20:47:57 +01:00
Denys Vuika 4c62409e8c optimise some dependencies (#1781)
- remove “intl” from components (not needed)
- remove “material-design-icons” from core (not needed)
2017-03-28 17:27:37 +01:00
Denys Vuika aa9269291a remove hardcoded date format (#1779) 2017-03-28 17:25:44 +01:00
Eugenio Romano 7657c1e633 add @angular/material dep on demos systemjs conf (#1780) 2017-03-28 16:26:19 +01:00
Eugenio Romano c65d271c9c add hammerjs demo shell (#1778) 2017-03-28 11:07:25 +01:00
Denys Vuika 8f62a28096 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-03-28 09:48:23 +01:00
Denys Vuika 88acf9d3c1 fix checkboxes (Form) (#1773)
- migrate to angular/material checkboxes
- add required indicator
- various fixes and improvements (caused by migration)
2017-03-28 09:47:41 +01:00
Denys Vuika 2f2513ced9 fix long names in columns (ellipsis-cell class) (#1775) 2017-03-28 09:47:01 +01:00
Maurizio Vitale a58dcca269 Required filed should have an asterisk inside the label (#1776) 2017-03-28 09:07:26 +01:00
Eugenio Romano 6888164f83 appveyor fix new build script (#1770) 2017-03-27 18:43:10 +01:00
Maurizio Vitale fde08bb573 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-03-27 14:33:07 +01:00
Vito 8132f79e97 #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-03-27 14:32:22 +01:00
Maurizio Vitale cbd827ab51 Fix dynamic translate parameter (#1772) 2017-03-27 14:32:18 +01:00
Eugenio Romano 36c76bf10c add timeout increase karma tests (#1771) 2017-03-27 12:51:14 +01:00
Denys Vuika 73e2058e38 fix build-all script 2017-03-27 11:17:00 +01:00
Eugenio Romano 7a73d0ce60 appveyor fix new build script (#1766) 2017-03-24 17:53:17 +00:00
Eugenio Romano 1f536d2db8 use mdl input for tag #1506 (#1764) 2017-03-24 15:40:57 +00:00
Denys Vuika cf67a0c1b5 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-03-24 13:27:51 +00:00
Mario Romano fab8866d0c #1214 use angular 2 mdl input field (#1762) 2017-03-24 10:32:09 +00:00
Eugenio Romano 5072cb3aa0 increase inactivity timeout test (#1760) 2017-03-23 17:55:50 +00:00
Eugenio Romano 16258a3e9e update tag list with refresh event emitter when add or remove a tag #1507 (#1754) 2017-03-23 17:51:50 +00:00
Denys Vuika 4f154f8bca 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-03-23 17:51:20 +00:00
Eugenio Romano a06138136b missing event coverage exclude (#1761) 2017-03-23 16:46:39 +00:00
Eugenio Romano e8c524176e fix clean script and build all (#1758) 2017-03-23 15:51:28 +00:00
Mario Romano 59ed4ee65d #1750 add ngOnchange on data input (#1751)
* #1750 add ngOnchange on data input

* Update datatable.component.ts
2017-03-23 15:49:58 +00:00
Eugenio Romano 707851ce85 fix HammerJS warning #1617 (#1755) 2017-03-23 15:44:52 +00:00
Eugenio Romano 96c72eeef1 remove event model from coverage (#1753) 2017-03-23 12:00:15 +00:00
Eugenio Romano d739526517 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-03-23 10:54:49 +00:00
Eugenio Romano 2f3aeb84a1 disable add button when no valid ID is provided #1591 (#1747)
* disable add button when no valid ID is provided #1591

* fix test
2017-03-23 09:56:10 +00:00
Eugenio Romano f3c9ffab8d remove style in html #1678 (#1743) 2017-03-22 10:50:24 +00:00
Denys Vuika 44808a31a3 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-03-22 09:58:12 +00:00
Eugenio Romano d32ed969a7 add test and documentation staticTitle option #1570 (#1744) 2017-03-22 09:57:52 +00:00
Denys Vuika 62915aff93 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-03-21 14:45:48 +00:00
Denys Vuika c846556e28 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-03-21 11:26:07 +00:00
Denys Vuika 0afc6affb6 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-03-17 14:33:05 +00:00
Denys Vuika 3fee3b5002 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-03-16 16:28:18 +00:00
Denys Vuika f3de023ab3 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-03-14 10:17:33 +00:00
Denys Vuika 55137917bd form component fixes (#1726)
- fix ‘readonly highlighting when input fields loaded with values
- Start Form raises base ‘FormLoaded’ event (including FormService
emits)
2017-03-14 10:14:14 +00:00
Denys Vuika 64565c44f4 migrate from PhantomJS to Chrome (#1716) 2017-03-13 11:25:47 +00:00
Denys Vuika 57557a991e 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-03-13 11:05:52 +00:00
Denys Vuika 5b5916bfb1 fix image paths for components (#1696)
* fix Login image paths

* fix TaskList image paths

* fix DocumentList image paths

* fix Search image paths
2017-03-13 10:42:18 +00:00
Mario Romano cf85840350 Dev denys 1704 hotfix (#1717)
* Update README.md

* #1173 fix doc documentlist

* 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:46:22 +00:00
Denys Vuika facd6e0458 DataTable docs and backwards compatibility (#1702)
* example: custom datatable row actions

* update docs, provide backwards compatibility
2017-03-10 09:50:02 +00:00
Maurizio Vitale 5e4e8c759c #11625 (#1703)
Fix ObjectDataRow
Tasklist
Processlist
2017-03-08 20:05:05 +00:00
Denys Vuika e45069be13 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-03-08 12:04:27 +00:00
Maurizio Vitale a0b8781209 Fix Thumbnail preview (#1689)
* Fix Thumbnail preview

* Fix thumbnail unit test

* Remove the fix prexif
2017-03-06 16:50:28 +00:00
Mario Romano 122469c7fe #1512 fix text demo shell (#1695) 2017-03-06 15:36:18 +00:00
Mario Romano fdb8cb6758 #1638 fix Incorrect Error message 2017-03-06 15:09:38 +00:00
Denys Vuika 796d9b0e9d minor Login improvements (#1685)
- replace inline SVG with the md-icon component
- own validation/error style classes for theming purposes
2017-03-05 18:50:52 +00:00
Denys Vuika 9c07262657 upgrade to latest ng2-charts (#1686) 2017-03-04 17:30:22 +00:00
Denys Vuika 861393de60 more control over task details header (#1688)
- toggle task details header
- toggle visibility of involve/comments/checklist
- readme updates
2017-03-04 17:29:48 +00:00
Vito 4d8abee892 1454 - fixed spacing in forms (#1687) 2017-03-03 15:32:37 +00:00
Denys Vuika 2e44550d7f support for toggling custom context menu (#1683)
* support for toggling custom context menu

* fix unit tests
2017-03-03 09:25:08 +00:00
Denys Vuika 4ca18bc8f9 cancellable events for DataTable and DocumentList (#1682)
* cancellable events for DataTable and DocumentList

* more typed events and code fixes

* code fixes
2017-03-02 14:49:55 +00:00
Denys Vuika 3e342863fd Update tsconfig.json for demo shell (#1684)
fixes issues with building for Windows
2017-03-02 14:48:58 +00:00
Denys Vuika fd6433027a Update README.md 2017-02-28 13:56:48 +00:00
1959 changed files with 83876 additions and 46100 deletions
+6 -6
View File
@@ -6,12 +6,12 @@ Please ask before on our gitter channel https://gitter.im/Alfresco/alfresco-ng2-
-->
**Type of issue:** (check with "[x]")
```
- [ ] New feature request
- [ ] Bug
- [ ] Support request
- [ ] Documentation
```
> - [ ] New feature request
> - [ ] Bug
> - [ ] Support request
> - [ ] Documentation
**Current behaviour:**
<!-- Describe the current behaviour. -->
+18 -18
View File
@@ -1,24 +1,24 @@
**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
-->
**What kind of change does this PR introduce?** (check one with "x")
```
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] Documentation
[ ] Other... Please describe:
```
> - [ ] Bugfix
> - [ ] Feature
> - [ ] Code style update (formatting, local variables)
> - [ ] Refactoring (no functional changes, no api changes)
> - [ ] Build related changes
> - [ ] Documentation
> - [ ] Other... Please describe:
**What is the current behaviour?** (You can also link to an open issue here)
@@ -29,10 +29,10 @@
**Does this PR introduce a breaking change?** (check one with "x")
```
[ ] Yes
[ ] No
```
> - [ ] Yes
> - [ ] No
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
+9
View File
@@ -3,6 +3,7 @@ node_modules
workspace.xml
.idea/
dist/
ng2-components/coverage/
!systemjs.config.js
demo-shell-ng2/app/components/router/
ng2-components/ng2-alfresco-userinfo-old/demo/src/app/
@@ -10,3 +11,11 @@ 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/
/ng2-components/config/coverage/
*.npmrc
/demo-shell-ng2/ng2-components/
.happypack/
.happypack/
.history
package-lock.*
/ng2-components/ng2-alfresco-core/prebuilt-themes/
+54 -57
View File
@@ -2,7 +2,7 @@ language: node_js
dist: trusty
sudo: false
node_js:
- "5"
- "8"
before_install:
- "export DISPLAY=:99.0"
@@ -10,48 +10,59 @@ before_install:
env:
matrix:
- MODULE=ng2-alfresco-core
- MODULE=ng2-alfresco-datatable
- MODULE=ng2-alfresco-documentlist
- MODULE=ng2-alfresco-login
- MODULE=ng2-alfresco-search
- MODULE=ng2-alfresco-upload
- MODULE=ng2-alfresco-viewer
- MODULE=ng2-alfresco-webscript
- MODULE=ng2-alfresco-tag
- MODULE=ng2-activiti-form
- MODULE=ng2-activiti-tasklist
- MODULE=ng2-activiti-processlist
- MODULE=ng2-activiti-diagrams
- MODULE=ng2-activiti-analytics
- MODULE=ng2-alfresco-userinfo
- MODULE=ng2-components-alfresco
- MODULE=ng2-components-activiti
- MODULE=ng2-demo-shell
before_script:
- if ([ "$MODULE" != "ng2-alfresco-core" ]); then
(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 "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-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-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 "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;
script: npm install && npm run travis && npm run test
# Send coverage data to Coveralls
install:
- if ([ "$MODULE" == "ng2-components-alfresco" -o "$MODULE" == "ng2-components-activiti" ]); then
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/npm-build-all.sh || exit 1;);
else
(./scripts/npm-build-all.sh -vjsapi alpha || exit 1;);
fi
fi
script:
- if ([ "$MODULE" == "ng2-components-activiti" ]); then
(./scripts/npm-build-all.sh -si -sb -t "ng2-activiti*" || exit 1;);
fi
- if ([ "$MODULE" == "ng2-components-alfresco" ]); then
(./scripts/npm-build-all.sh -si -sb -t "ng2-alfresco*" || exit 1;);
fi
- if ([ "$MODULE" == "ng2-demo-shell" ]); then
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/start.sh -t -ss || exit 1;);
else
(./scripts/start.sh -dev -t -ss -vjsapi alpha || exit 1;);
fi
fi
# jobs:
# include:
# - stage: Publish alpha to NPM
# before_install: skip
# install: skip
# script: skip
# deploy:
# provider: script
# script: (./scripts/update-version.sh -v $(./scripts/next_version.sh)-$(git rev-parse HEAD) -vj $(npm view alfresco-js-api@alpha version) -gnu) && (./scripts/npm-publish.sh -r $NPM_REGISTRY_ADDRESS -token $NPM_REGISTRY_TOKEN -t alpha --sleep 20 || exit 1;);
# on:
# branch: development
# skip_cleanup: true
# - stage: Publish beta to NPM
# before_install: skip
# install: skip
# script: skip
# deploy:
# provider: script
# script: (./scripts/update-version.sh -v $TRAVIS_TAG -gnu) && (./scripts/npm-publish.sh -r $NPM_REGISTRY_ADDRESS -token $NPM_REGISTRY_TOKEN -t beta --sleep 20 || exit 1;);
# on:
# tags: true
# skip_cleanup: true
# Send coverage data to codecov
after_success:
bash <(curl -s https://codecov.io/bash) -X gcov
@@ -60,18 +71,4 @@ cache:
- ./node_modules/material-design-lite
- ./node_modules/material-design-icons
- demo-shell-ng2/node_modules
- ng2-components/ng2-activiti-form/node_modules
- ng2-components/ng2-activiti-processlist/node_modules
- ng2-components/ng2-activiti-tasklist/node_modules
- ng2-components/ng2-alfresco-core/node_modules
- ng2-components/ng2-alfresco-datatable/node_modules
- ng2-components/ng2-alfresco-documentlist/node_modules
- ng2-components/ng2-alfresco-login/node_modules
- ng2-components/ng2-alfresco-search/node_modules
- ng2-components/ng2-alfresco-upload/node_modules
- ng2-components/ng2-alfresco-viewer/node_modules
- ng2-components/ng2-alfresco-webscript/node_modules
- ng2-components/ng2-alfresco-tag/node_modules
- ng2-components/ng2-activiti-analytics/node_modules
- ng2-components/ng2-alfresco-userinfo/node_modules
- ng2-components/ng2-activiti-diagrams/node_modules
- ng2-components/node_modules
+14 -5
View File
@@ -5,10 +5,19 @@
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/*.js": { "when": "$(basename).ts"},
"**/*.js.map": { "when": "$(basename)"},
"**/*.d.ts": { "when": "$(basename).ts"},
"**/coverage": true
"**/coverage": true,
"**/.happypack": true
},
"editor.renderIndentGuides": true
"editor.renderIndentGuides": true,
"tslint.configFile": "ng2-components/tslint.json",
"markdownlint.config": {
"MD032": false,
"MD004": false,
"MD024": false,
"MD009": false,
"MD013": false,
"MD036": false,
"MD033" : false,
"MD031" : false
}
}
+143 -6
View File
@@ -1,22 +1,159 @@
### Enable CORS in Alfresco
### CORS solving strategies
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**:
If you are experiencing this kind of problem, see **one of the following**:
##Recommended - Download and install the enable CORS module
1. [Configure Webpack Proxy](#configure-webpack-proxy)
2. [Configure angular-cli Proxy](#configure-angular-cli-proxy)
3. [Configure nginx proxy](#configure-nginx-proxy)
4. [Enable CORS in CS and PS](#configure-webpack-proxy)
# Configure Webpack Proxy
If you are using a project created with the [Yeoman Generator](https://github.com/Alfresco/generator-ng2-alfresco-app) or the demo shell >=1.6.0, you have already out of the box in your `config/webpack.common.js` the following configuration.
Say we have an app running on http://localhost:3000/ and we want to redirect all calls with the following strategy:
* Content Service http://localhost:8080/ redirect to -> http://localhost:3000/ecm/
* Process Service http://localhost:9999/ redirect to -> http://localhost:3000/bpm/
Open the `config/webpack.common.js` file, find the `devServer` section and add the content:
```javascript
devServer: {
contentBase: helpers.root('dist'),
compress: true,
port: 3000,
historyApiFallback: true,
host: '0.0.0.0',
inline: true,
proxy: {
'/ecm': {
target: {
host: "0.0.0.0",
protocol: 'http:',
port: 8080
},
pathRewrite: {
'^/ecm': ''
}
},
'/bpm': {
target: {
host: "0.0.0.0",
protocol: 'http:',
port: 9999
},
pathRewrite: {
'^/bpm': ''
}
}
}
},
```
Notes:
- With different configuration of webpack the `devServer` properties could be in other webpack files. Search in your configuration files
- If you are running the App, Content Service or Process Service on different ports change the ports accordingly in your local configuration.
For further details about how to configure a webpack proxy please refer to the [official documentation](https://webpack.js.org/configuration/dev-server/#devserver-proxy).
# Configure angular-cli Proxy
Say we have an app running on http://localhost:3000/ and we want to redirect all the calls with the following strategy:
* Content Service http://localhost:8080/ redirect to -> http://localhost:3000/ecm/
* Process Service http://localhost:9999/ redirect to -> http://localhost:3000/bpm/
Create a file next to project's `package.json`, call it `proxy.conf.json` and add the following content:
```javascript
{
'/ecm': {
target: {
host: "0.0.0.0",
protocol: 'http:',
port: 8080
},
pathRewrite: {
'^/ecm': ''
}
},
'/bpm': {
target: {
host: "0.0.0.0",
protocol: 'http:',
port: 9999
},
pathRewrite: {
'^/bpm': ''
}
}
}
```
Note if you are running the App, Content Service or Process Service on different ports change the ports accordingly in your local configuration.
For further details about how to configure a webpack proxy please refer to the [official documentation](https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/proxy.md).
# Configure nginx proxy
## Installing nginx
Most Linux distributions will come with nginx available to install via your
package manager and on Mac OS you can use [Homebrew](http://brew.sh/).
If you want to install manually however, you can follow the instructions on the
[download page](http://nginx.org/en/download.html). See also the specific information for
[windows users](http://nginx.org/en/docs/windows.html).
### Start nginx
Start nginx using the supplied configuration in [nginx.conf](nginx.conf)
nginx -c nginx.conf
### Review nginx configuration
To correctly configure nginx use the following file [nginx.conf](/nginx.conf).
This will host Activiti, Alfresco and the app dev framework under the same origin.
* ECM : http://localhost:8888/alfresco/
* BPM : http://localhost:8888/activiti/
To make everything work, you should change the address of the ECM and BPM. In the demo app you can do that by clicking on the top right settings menu and change the bottom left options: *ECM host* and *BPM host*.
This configuration assumes a few things:
* Port mapping:
* nginx entry point: 0.0.0.0:8888
* Demo Shell: localhost:3000
* Alfresco: localhost:8080
* Activiti: localhost:9999
All those values can be modified at their respective `location` directive on the [nginx.conf](/nginx.conf) file.
If you want to know more on how to install and configure nginx to work with the Application Development Framework, information can be found [here](https://community.alfresco.com/community/application-development-framework/blog/2016/09/28/adf-development-set-up-with-nginx-proxy)
# Enable CORS in CS and PS
If you want to completely enable CORS calls on your Content Service and Process Service, please refer to the following Alfresco documents:
* [Enable Cross Origin Resource Sharing (CORS) in Alfresco Process Services](http://docs.alfresco.com/process-services1.6/topics/enabling-cors.html)
* Enable Cross Origin Resource Sharing (CORS) in Alfresco Content Services
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.
Note. by default, the CORS filter that is enabled will allow any origin.
##Or - Manually update the web.xml file
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`:
`cors.allowOrigin` to `http://localhost:3000` :
```
<filter>
+1 -1
View File
@@ -1,7 +1,7 @@
# Browser Support
Browser support and polyfills guide.
Browser compatibility and support depends on targeted browsers and 3rd party libraries. ADF framework is based on the following libraries and components:
Browser compatibility and support depends on targeted browsers and 3rd party libraries. ADF is based on the following libraries and components:
- Angular 2 (all ADF components)
- Material Design Lite (all ADF components)
+78
View File
@@ -0,0 +1,78 @@
# Contributing to ADF
- [Library Contents](#submitting-a-pull-request-pr)
- [Code style](#code-style)
- [Test guide](#test-guide)
## Submitting a Pull Request (PR)
Before you submit please follow the steps below:
* Search in [GitHub PR](https://github.com/Alfresco/alfresco-ng2-components/pulls) for an open or closed PR
that could solve or already solves your issue.
* Search in the [GitHub release history](https://github.com/Alfresco/alfresco-ng2-components/releases) if your
issue has already been solved in a new version of ADF.
* Fork our repository - [if you don't know how to do it read this GitHub document](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
* Make your changes in a new git branch starting from development and following the [naming convention](https://github.com/Alfresco/alfresco-ng2-components/wiki/Branching-Strategy)
```shell
git checkout -b dev-{developerName}-{GitIssuedId/JiraIssueId} development
```
* Create your PR **including appropriate test cases** following the [code contribution acceptance criteria](https://github.com/Alfresco/alfresco-ng2-components/wiki/Code-contribution-acceptance-criteria)
* Run the tests and make sure they are green. Please don't comment out or exclude the already existing tests
* Commit your change using the [commit format message good practice](https://github.com/Alfresco/alfresco-ng2-components/wiki/Commit-format)
* Push your branch to GitHub:
```shell
git push origin dev-{developerName}-{GitIssuedId/JiraIssueId}
```
* In GitHub, send a pull request to `development`.
* If we suggest changes then:
* Make the required updates.
* Re-run the tests.
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
```shell
git fetch development
git checkout dev-my-branch
git rebase development -i
git push -f
```
Note: If you need more information about how to sync your fork, see [here](https://help.github.com/articles/syncing-a-fork/)
## Code style
The code style in the ADF code follows the [Angular style guide](https://angular.io/guide/styleguide) plus some internal rules.
You dont have to worry too much about those rules because they are automatically checked by tslint/codelyzer/adf-rules.
If your code is not compliant to one of these rules you will receive an error when you build the project with some help on how to fix it.
The ADF-Rules :
* File name component/directive cannot start with Alfresco/Activiti/adf - this rule is to help developers find files easily
* Class names cannot start with Alfresco/Activiti/adf for the same reason as above
* scss is mandatory. All the classes need to have the adf- prefix
## Test guide
In ADF we are encouraging the use of behavior-driven development (BDD)
### General guidelines
* Class selector in all the tests is not suggested. Use of the element ID is preferred
* Any test case should test only one behavior
* Use of the Angular [testBed](https://angular.io/guide/testing#testbed) is highly recommended
### File name
* The file name specification as to be the same of the component/service/pipe it test plus the .spec. suffix
* The specification file has to be in the same folder of the component/service/pipe it test
### Describer Name
* The Main describer of the test should be the name of the class under test
* The sub describe is used for grouping related behavior test. Do not over use it
### Test Name
Any test should follow the naming convetion:
[Should] [ ***Expected Behavior** ] [when/after/before] [ ***State Under Test*** ].
+2 -2
View File
@@ -18,7 +18,7 @@ However, there are use-cases that Share does not fit very well, such as:
This is where this application development framework comes into play, it can be used to create exactly the user interface
(i.e. web client) that the requirements demand.
The framework consists of a number of components that can be combined together to form a customized content management application.
The framework consists of several components that can be combined to form a customized content management application.
Here is a list of some of the available web components:
- [Core library](ng2-components/ng2-alfresco-core/README.md)
@@ -36,6 +36,6 @@ An architecture overview looks like this:
<img title="alfresco-ng2-components-architecture" alt='alfresco' src='assets/alfresco-app-dev-framework-architecture.png'></img>
</p>
Here we can also see that there is an Alfresco JavaScript framework in use that wraps the Alfresco REST API. To make things easier for the client developer.
Here we can also see that there is an Alfresco JavaScript framework in use that wraps the Alfresco REST API, to make things easier for the client developer.
Vendored
-41
View File
@@ -1,41 +0,0 @@
#!/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)
}
+3 -41
View File
@@ -3,12 +3,11 @@
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)
- [Enable cors on Alfresco One](/ALFRESCOCORS.md)
- [Download and install Activiti](https://www.alfresco.com/products/bpm/alfresco-activiti/trial)
- [Download and install the process service](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.
- local nginx proxy to avoid cross-origin browser restrictions (see below)
- (If you use ECM and BPM together) Make sure your user has the same username and password in both system
- (If you use CS and PS together) Make sure your user has the same username and password in both system
- [If you are experiencing CORS problem read this guide](/ALFRESCOCORS.md)
*Note: Default username for activiti is "admin@app.activiti.com" and "admin" for Alfresco, and also the default password are different. Change them to be equal.*
@@ -26,40 +25,3 @@ Make sure the Node.js version is > 5:
$ node -v
v5.12.0
```
## Installing nginx
Most Linux distributions will come with nginx available to install via your
package manager and on Mac OS you can use [Homebrew](http://brew.sh/).
If you want to install manually however you can follow the instructions on the
[download page](http://nginx.org/en/download.html). See also the specific information for
[windows users](http://nginx.org/en/docs/windows.html).
### Start nginx
Start nginx using the supplied configuration in [nginx.conf](nginx.conf)
nginx -c nginx.conf
### Review nginx configuration
To correctly configure nginx use the following file [nginx.conf](/nginx.conf).
This will host Activiti, Alfresco and the app dev framework under the same origin.
* ECM : http://localhost:8888/alfresco/
* BPM : http://localhost:8888/activiti/
To make everything work, you have to change the address of the ECM and BPM. In the demo app you can do that clicking on the top right settings menu and changing the bottom left options: *ECM host* and *BPM host*.
This configuration assumes few things:
* Port mapping:
* nginx entry point: 0.0.0.0:8888
* Demo Shell: locathost:3000
* Alfresco: locathost:8080
* Activiti: locathost:9999
All those values can be modified at their respective `location` directive on the [nginx.conf](/nginx.conf) file.
If you want to know more on how to install and configure nginx to work with the Application Development Framework can be found [here](https://community.alfresco.com/community/application-development-framework/blog/2016/09/28/adf-development-set-up-with-nginx-proxy)
+3 -24
View File
@@ -1,4 +1,4 @@
# ALFRESCO ANGULAR 2 COMPONENTS
# ALFRESCO ANGULAR COMPONENTS
[![Join the chat at https://gitter.im/Alfresco/alfresco-ng2-components](https://badges.gitter.im/Alfresco/alfresco-ng2-components.svg)](https://gitter.im/Alfresco/alfresco-ng2-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -17,27 +17,6 @@
<a href='https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE'>
<img src='https://img.shields.io/hexpm/l/plug.svg' alt='license' />
</a>
<a href='https://www.alfresco.com/'>
<img src='https://img.shields.io/badge/style-component-green.svg?label=alfresco' alt='alfresco component' />
</a>
<a href='https://angular.io/'>
<img src='https://img.shields.io/badge/style-2-red.svg?label=angular' alt='angular 2' />
</a>
<a href='https://www.typescriptlang.org/docs/tutorial.html'>
<img src='https://img.shields.io/badge/style-lang-blue.svg?label=typescript' alt='typescript' />
</a>
<a href='https://www.alfresco.com/'>
<img src='https://img.shields.io/badge/style-%3E5.0.0-blue.svg?label=node%20version' alt='node version' />
</a>
</p>
<p align="center">
<img title="alfresco" alt='alfresco' src='assets/alfresco.png' width="280px" height="150px"></img>
<img title="angular2" alt='angular2' src='assets/angular2.png' width="150px" height="150px"></img>
</p>
<p align="center">
<img title="browser stack" alt='browser stack' src='assets/browserstack.png' width="350px" height="225px"></img>
</p>
## Introduction
@@ -106,6 +85,6 @@ All components are supported in the following browsers:
|Edge |13, 14 |
|Internet Explorer |11 |
* 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
* Due to a [Firefox known 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.
Please refer to the [Browser Support](BROWSER-SUPPORT.md) article for more details.
+44
View File
@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Lint = require("tslint");
const sprintf_js_1 = require("sprintf-js");
const walkerFactory_1 = require("codelyzer/walkerFactory/walkerFactory");
const walkerFn_1 = require("codelyzer/walkerFactory/walkerFn");
const function_1 = require("codelyzer/util/function");
class Rule extends Lint.Rules.AbstractRule {
static invalidName(className) {
var whiteList = ['ActivitiContentComponent', 'ActivitiForm'];
var classNameReg = /^(alfresco|activiti|adf|activity)/ig;
var classNameMatch = classNameReg.exec(className);
var isWhiteListName = whiteList.find((currentWhiteListName) => {
return currentWhiteListName === className;
});
if (classNameMatch && !isWhiteListName) {
return true;
}
return false;
}
apply(sourceFile) {
return this.applyWithWalker(Rule.walkerBuilder(sourceFile, this.getOptions()));
}
}
Rule.metadata = {
ruleName: 'adf-class-name',
type: 'maintainability',
description: `Enforce consistent name avoid prefix`,
descriptionDetails: `See more at https://angular.io/styleguide#style-05-13.`,
rationale: `Consistent conventions make it easy to quickly identify class when you search with autocomplete.`,
options: null,
optionsDescription: "Not configurable.",
typescriptOnly: true,
};
Rule.FAILURE_STRING = 'The name of the class should not start with ADF Alfresco or Activiti prefix ';
Rule.walkerBuilder = walkerFn_1.all(walkerFn_1.validateComponent((meta, suffixList) => function_1.Maybe.lift(meta.controller)
.fmap(controller => controller.name)
.fmap(name => {
const className = name.text;
if (Rule.invalidName(className)) {
return [new walkerFactory_1.Failure(name, sprintf_js_1.sprintf(Rule.FAILURE_STRING + className, className, suffixList))];
}
})));
exports.Rule = Rule;
+61
View File
@@ -0,0 +1,61 @@
import * as Lint from 'tslint';
import * as ts from 'typescript';
import {sprintf} from 'sprintf-js';
import {ComponentMetadata} from 'codelyzer/angular/metadata';
import {Failure} from 'codelyzer/walkerFactory/walkerFactory';
import {all, validateComponent} from 'codelyzer/walkerFactory/walkerFn';
import {Maybe, F2} from 'codelyzer/util/function';
import {IOptions} from 'tslint';
import {NgWalker} from 'codelyzer/angular/ngWalker';
export class Rule extends Lint.Rules.AbstractRule {
public static metadata: Lint.IRuleMetadata = {
ruleName: 'adf-class-name',
type: 'maintainability',
description: `Enforce consistent name avoid prefix`,
descriptionDetails: `See more at https://angular.io/styleguide#style-05-13.`,
rationale: `Consistent conventions make it easy to quickly identify class when you search with autocomplete.`,
options: null,
optionsDescription: "Not configurable.",
typescriptOnly: true,
};
public static FAILURE_STRING = 'The name of the class should not start with ADF Alfresco or Activiti prefix ';
static walkerBuilder: F2<ts.SourceFile, IOptions, NgWalker> =
all(
validateComponent((meta: ComponentMetadata, suffixList?: string[]) =>
Maybe.lift(meta.controller)
.fmap(controller => controller.name)
.fmap(name => {
const className = name.text;
if (Rule.invalidName(className)) {
return [new Failure(name, sprintf(Rule.FAILURE_STRING + className , className, suffixList))];
}
})
));
static invalidName(className: string): boolean {
var whiteList = ['ActivitiContentComponent', 'ActivitiForm'];
var classNameReg = /^(alfresco|activiti|adf|activity)/ig;
var classNameMatch = classNameReg.exec(className);
var isWhiteListName = whiteList.find((currentWhiteListName)=>{
return currentWhiteListName === className;
});
if (classNameMatch && !isWhiteListName) {
return true;
}
return false;
}
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return this.applyWithWalker(
Rule.walkerBuilder(sourceFile, this.getOptions())
);
}
}
+47
View File
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Lint = require("tslint");
class Rule extends Lint.Rules.AbstractRule {
apply(sourceFile) {
return this.applyWithWalker(new AdfFileName(sourceFile, this.getOptions()));
}
}
Rule.metadata = {
ruleName: 'adf-file-name',
type: 'maintainability',
description: `Enforce consistent name avoid prefix`,
descriptionDetails: `See more at https://angular.io/styleguide#style-05-13.`,
rationale: `Consistent conventions make it easy to quickly identify files when you search with autocomplete.`,
options: null,
optionsDescription: "Not configurable.",
typescriptOnly: true,
};
Rule.FAILURE_STRING = 'The name of the File should not start with ADF Alfresco or Activiti prefix ';
exports.Rule = Rule;
class AdfFileName extends Lint.RuleWalker {
visitSourceFile(node) {
var whiteList = ['activiti-content.component.ts', 'activiti-alfresco.service.ts', 'activiti-content-service.ts',
'alfresco-api.service.ts', 'alfresco-settings.service.ts', 'alfresco-content.service.ts',
'activiti-content.component.spec.ts', 'activiti-alfresco.service.spec.ts', 'activiti-content-service.spec.ts',
'alfresco-api.service.spec.ts', 'alfresco-settings.service.spec.ts', 'alfresco-content.service.spec.ts',
'activiti-content.service.spec.ts', 'activiti-content.service.ts'];
var fileName = this.getFilename();
var fileNameReg = /^(alfresco|activiti|adf|activity)/ig;
var filenameMatch = fileNameReg.exec(fileName);
var isWhiteListName = whiteList.find((currentWhiteListName) => {
return currentWhiteListName === fileName;
});
if (filenameMatch && !isWhiteListName) {
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.FAILURE_STRING + fileName));
super.visitSourceFile(node);
}
}
getFilename() {
const filename = this.getSourceFile().fileName;
const lastSlash = filename.lastIndexOf('/');
if (lastSlash > -1) {
return filename.substring(lastSlash + 1);
}
return filename;
}
}
+56
View File
@@ -0,0 +1,56 @@
import * as ts from "typescript";
import * as Lint from "tslint";
export class Rule extends Lint.Rules.AbstractRule {
public static metadata: Lint.IRuleMetadata = {
ruleName: 'adf-file-name',
type: 'maintainability',
description: `Enforce consistent name avoid prefix`,
descriptionDetails: `See more at https://angular.io/styleguide#style-05-13.`,
rationale: `Consistent conventions make it easy to quickly identify files when you search with autocomplete.`,
options: null,
optionsDescription: "Not configurable.",
typescriptOnly: true,
};
public static FAILURE_STRING = 'The name of the File should not start with ADF Alfresco or Activiti prefix ';
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return this.applyWithWalker(new AdfFileName(sourceFile, this.getOptions()));
}
}
// The walker takes care of all the work.
class AdfFileName extends Lint.RuleWalker {
public visitSourceFile(node: ts.SourceFile) {
var whiteList = ['activiti-content.component.ts', 'activiti-alfresco.service.ts', 'activiti-content-service.ts',
'alfresco-api.service.ts', 'alfresco-settings.service.ts', 'alfresco-content.service.ts',
'activiti-content.component.spec.ts', 'activiti-alfresco.service.spec.ts', 'activiti-content-service.spec.ts',
'alfresco-api.service.spec.ts', 'alfresco-settings.service.spec.ts', 'alfresco-content.service.spec.ts',
'activiti-content.service.spec.ts', 'activiti-content.service.ts'];
var fileName = this.getFilename();
var fileNameReg = /^(alfresco|activiti|adf|activity)/ig;
var filenameMatch = fileNameReg.exec(fileName);
var isWhiteListName = whiteList.find((currentWhiteListName)=>{
return currentWhiteListName === fileName;
});
if (filenameMatch && !isWhiteListName) {
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), Rule.FAILURE_STRING + fileName));
super.visitSourceFile(node);
}
}
private getFilename(): string {
const filename = this.getSourceFile().fileName;
const lastSlash = filename.lastIndexOf('/');
if (lastSlash > -1) {
return filename.substring(lastSlash + 1);
}
return filename;
}
}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var adfClassNameRule_1 = require("./adfClassNameRule");
exports.ADFClassNameRule = adfClassNameRule_1.Rule;
var adfFileNameRule_1 = require("./adfFileNameRule");
exports.ComponentSelectorRule = adfFileNameRule_1.Rule;
+2
View File
@@ -0,0 +1,2 @@
export { Rule as ADFClassNameRule } from './adfClassNameRule';
export { Rule as ComponentSelectorRule } from './adfFileNameRule';
+2141
View File
File diff suppressed because it is too large Load Diff
+56
View File
@@ -0,0 +1,56 @@
{
"name": "adf-tslint-rules",
"description": "Custom Rules for the ADF project",
"version": "0.0.3",
"author": "Alfresco Software, Ltd.",
"scripts": {
"build": "tsc",
"tscv": "tsc --version",
"tsc": "tsc",
"tsc:watch": "tsc --w"
},
"contributors": [
{
"name": "Eugenio Romano",
"email": "eugenio.romano@alfresco.com"
}
],
"devDependencies": {
"@angular/compiler": "^4.2.3",
"@angular/core": "^4.2.3",
"@types/chai": "^3.4.33",
"@types/less": "0.0.31",
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.41",
"@types/node-sass": "^3.10.31",
"@types/source-map": "^0.5.0",
"@types/sprintf-js": "0.0.27",
"chai": "^3.5.0",
"chai-spies": "^0.7.1",
"minimalist": "1.0.0",
"mocha": "3.0.2",
"node-sass": "^3.13.0",
"rimraf": "^2.5.2",
"rxjs": "5.4.1",
"ts-node": "1.2.2",
"tslint": "^5.0.0",
"typescript": "2.4.0",
"zone.js": "^0.8.4",
"js-yaml": "^3.8.4",
"json-stringify-pretty-compact": "^1.0.4",
"@types/js-yaml": "^3.5.31"
},
"peerDependencies": {
"tslint": "^5.0.0"
},
"dependencies": {
"app-root-path": "^2.0.1",
"css-selector-tokenizer": "^0.7.0",
"cssauron": "^1.4.0",
"semver-dsl": "^1.0.1",
"source-map": "^0.5.6",
"sprintf-js": "^1.0.3",
"codelyzer": "3.1.2"
},
"license": "Apache-2.0"
}
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"target": "es6",
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"lib": ["es6", "es2015", "dom"],
"noLib": false,
"typeRoots": [
"./node_modules/@types",
"./node_modules"
],
"types": [
"mocha",
"chai",
"node",
"sprintf-js"
]
}
}
+5
View File
@@ -0,0 +1,5 @@
{
"rules": {
"adf-file-naming": true
}
}
+22 -38
View File
@@ -6,52 +6,36 @@ branches:
- dev-build-test
environment:
nodejs_version: "5"
nodejs_version: "8"
matrix:
- COMPONENT_NAME: ng2-alfresco-core
- COMPONENT_NAME: ng2-alfresco-datatable
- COMPONENT_NAME: ng2-alfresco-documentlist
- COMPONENT_NAME: ng2-alfresco-login
- COMPONENT_NAME: ng2-alfresco-search
- COMPONENT_NAME: ng2-alfresco-upload
- COMPONENT_NAME: ng2-alfresco-viewer
- COMPONENT_NAME: ng2-alfresco-tag
- COMPONENT_NAME: ng2-alfresco-webscript
- COMPONENT_NAME: ng2-activiti-form
- COMPONENT_NAME: ng2-activiti-tasklist
- COMPONENT_NAME: ng2-activiti-processlist
- COMPONENT_NAME: ng2-activiti-diagrams
- COMPONENT_NAME: ng2-activiti-analytics
- COMPONENT_NAME: ng2-alfresco-userinfo
- COMPONENT_NAME: ng2-components-activiti
- COMPONENT_NAME: ng2-components-alfresco
# - COMPONENT_NAME: ng2-demo-shell
# Install scripts. (runs after repo cloning)
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 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%
- npm run travis
# Post-install test scripts.
test_script:
- npm install
# Output useful info for debugging.
- node --version
- npm --version
# run tests
- npm test
- if %COMPONENT_NAME% EQU ng2-components-activiti (
if %APPVEYOR_REPO_BRANCH EQU master
(cd scripts && sh npm-build-all.sh -t "ng2-activiti*" || exit 1)
else
(cd scripts && sh npm-build-all.sh -t "ng2-activiti*" -vjsapi alpha|| exit 1)
)
- if %COMPONENT_NAME% EQU ng2-components-alfresco (
if %APPVEYOR_REPO_BRANCH EQU master
(cd scripts && sh npm-build-all.sh -t "ng2-alfresco*" || exit 1)
else
(cd scripts && sh npm-build-all.sh -t "ng2-alfresco*" -vjsapi alpha|| exit 1)
)
# - if %COMPONENT_NAME% EQU ng2-demo-shell (
# if %APPVEYOR_REPO_BRANCH EQU master
# (cd scripts && sh start.sh -t -ss || exit 1)
# else
# (cd scripts && sh start.sh -dev -t -ss -vjsapi alpha || exit 1)
# )
# Don't actually build.
build: off
+3
View File
@@ -1,8 +1,11 @@
typings/
node_modules/
bower_components/
ng2-components/
app/**/*.js
app/**/*.js.map
app/**/*.d.ts
!app/js/Polyline.js
.idea
versions.json
+56 -55
View File
@@ -1,18 +1,11 @@
<h1 align="center">Alfresco Angular 2 Components</h1>
<p align="center">
<img title="alfresco" alt='alfresco' src='../assets/alfresco.png' width="280px" height="150px" ></img>
<img title="angular2" alt='angular2' src='../assets/angular2.png' width="150px" height="150px" ></img>
</p>
<p align="center">
<a href='https://github.com/mgechev/angular2-style-guide'>
<img src='https://mgechev.github.io/angular2-style-guide/images/badge.svg' alt='style' />
</a>
</p>
# ADF Demo Application
Please note that this application is not an official product, but a testing and demo application to showcase complex interactions of ADF components.
## Installing
To correctly use this demo check that on your machine is running [Node](https://nodejs.org/en/) version 5.x.x or higher.
To correctly use this demo check that on your machine you have [Node](https://nodejs.org/en/) version 5.x.x or higher.
```sh
git clone https://github.com/Alfresco/alfresco-ng2-components.git
@@ -20,6 +13,53 @@ cd alfresco-ng2-components/demo-shell-ng2/
npm install
```
## Proxy settings and CORS
To simplify development and reduce the time to get the application started, we have the following Proxy settings:
- **http://localhost:3000/ecm** is mapped to **http://localhost:8080**
- **http://localhost:3000/bpm** is mapped to **http://localhost:9999**
The settings above address most common scenarios for running ACS on port 8080 and APS on port 9999 and allow you to skip the CORS configuration.
If you would like to change default proxy settings, please edit the `config/webpack.common.js` file.
## Application settings (server-side)
All server-side application settings are stored in the `app.config-dev.json` and `app.config-prod.json` files.
By default the configuration files have the content similar to the following one:
```json
{
"ecmHost": "http://localhost:3000/ecm",
"bpmHost": "http://localhost:3000/bpm",
"application": {
"name": "Alfresco"
}
}
```
You can add any additional settings to the application configuration file if needed.
Configuration files are picked based on environment settings (see `app.module.ts` for more details).
```ts
let appConfigFile = 'app.config-dev.json';
if (process.env.ENV === 'production') {
appConfigFile = 'app.config-prod.json';
}
@NgModule({
imports: [
...
CoreModule.forRoot({
appConfigFile: appConfigFile
}),
...
]
})
```
## Development build
```sh
@@ -42,59 +82,20 @@ 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.
All output is placed to `dist` folder and can be served to your preferred web server.
You should need no additional files outside the `dist` folder.
### Important notes
By default demo application is configured to use [wsrv](https://www.npmjs.com/package/wsrv) tool (lightweight web server)
to serve production build output. It will be running at `0.0.0.0` address with port `3000` and allow you accessing your application
via network. However you can use any web server of your choice in production.
to serve production build output. It will be running at `0.0.0.0` address with port `3000` and allow you to access your application
via network. However, you can use any web server of your choice in production.
## Development branch build
If you want to run the demo shell with the latest change from the development branch, use the following command from the /script folder:
If you want to run the demo shell with the latest changes from the development branch, use the following command from the /script folder:
```sh
./npm-clean.sh
./start-linked.sh -install
```
## Multi-language
To support a new language you need to create your language file (.json) and add it to `i18n/` folder.
```json
{
"username" : "Username",
"input-required-message": "Required",
"input-min-message": "Your username needs to be at least 4 characters.",
"login-button": "Login"
}
```
Directory structure:
```
.
├── i18n/
│ ├── en.json
│ ├── it.json
│ └── 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'
```
+255
View File
@@ -0,0 +1,255 @@
{
"ecmHost": "http://{hostname}:{port}/ecm",
"bpmHost": "http://{hostname}:{port}/bpm",
"application": {
"name": "Alfresco ADF Appplication"
},
"pagination": {
"size": 25
},
"files": {
"excluded": [".DS_Store", "desktop.ini", ".git"]
},
"activiti": {
"rest": {
"fields": [
{
"processId": "0",
"taskId": "7501",
"fieldId": "label10",
"values": [
{ "id": "f1", "name": "Field 1" },
{ "id": "f2", "name": "Field 2" },
{ "id": "f3", "name": "Field 3" }
]
}
]
}
},
"document-list": {
"supportedPageSizes": [5, 10, 15, 20],
"presets": {
"-trashcan-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "archivedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "archivedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_BY",
"sortable": true
}
],
"-sites-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "title",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "visibility",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.STATUS",
"sortable": true
}
],
"-favorites-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
}
],
"-recent-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"cssClass": "ellipsis-cell",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
}
],
"-sharedlinks-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"cssClass": "ellipsis-cell",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
},
{
"key": "sharedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SHARED_BY",
"sortable": true
}
],
"default": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
}
]
}
}
}
+255
View File
@@ -0,0 +1,255 @@
{
"ecmHost": "http://{hostname}",
"bpmHost": "http://{hostname}",
"application": {
"name": "Alfresco ADF Appplication"
},
"pagination": {
"size": 25
},
"files": {
"excluded": [".DS_Store", "desktop.ini", ".git"]
},
"activiti": {
"rest": {
"fields": [
{
"processId": "0",
"taskId": "7501",
"fieldId": "label10",
"values": [
{ "id": "f1", "name": "Field 1" },
{ "id": "f2", "name": "Field 2" },
{ "id": "f3", "name": "Field 3" }
]
}
]
}
},
"document-list": {
"supportedPageSizes": [5, 10, 15, 20],
"presets": {
"-trashcan-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "archivedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "archivedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_BY",
"sortable": true
}
],
"-sites-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "title",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "visibility",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.STATUS",
"sortable": true
}
],
"-favorites-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
}
],
"-recent-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"cssClass": "ellipsis-cell",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
}
],
"-sharedlinks-": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "path",
"type": "location",
"title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
"cssClass": "ellipsis-cell",
"format": "/files",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
},
{
"key": "sharedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SHARED_BY",
"sortable": true
}
],
"default": [
{
"key": "$thumbnail",
"type": "image",
"srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
"sortable": false
},
{
"key": "name",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
"cssClass": "full-width ellipsis-cell",
"sortable": true
},
{
"key": "content.sizeInBytes",
"type": "fileSize",
"title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
"sortable": true
},
{
"key": "modifiedAt",
"type": "date",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
"format": "timeAgo",
"sortable": true
},
{
"key": "modifiedByUser.displayName",
"type": "text",
"title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
"sortable": true
}
]
}
}
}
-35
View File
@@ -1,35 +0,0 @@
@media screen and (max-width: 1024px) {
.mdl-layout__header {
display: block;
}
}
@media screen and (max-width: 1024px) {
.mdl-layout__header {
display: block;
}
}
.mdl-layout-title {
font-size: 17px;
}
.user-profile {
margin-right: 10px;
}
.mdl-button-padding {
padding-left: 20px;
}
.hide {
display: none !important;
}
.mdl-navigation__link {
cursor: pointer;
}
.mdl-navigation__link label {
cursor: pointer;
}
+1 -70
View File
@@ -1,70 +1 @@
<!-- Always shows a header, even in smaller screens. -->
<div mdl class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<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>
<!-- 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="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">
<router-outlet></router-outlet>
</div>
</main>
</div>
<router-outlet></router-outlet>
+11 -86
View File
@@ -15,101 +15,26 @@
* limitations under the License.
*/
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { AlfrescoTranslationService, AlfrescoAuthenticationService, AlfrescoSettingsService, StorageService, LogService } from 'ng2-alfresco-core';
declare var document: any;
import { Component, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { AlfrescoSettingsService, PageTitleService, StorageService } from 'ng2-alfresco-core';
@Component({
selector: 'alfresco-app',
selector: 'adf-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
styleUrls: ['./theme.scss'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
searchTerm: string = '';
ecmHost: string = 'http://' + window.location.hostname + ':8080';
bpmHost: string = 'http://' + window.location.hostname + ':9999';
constructor(private authService: AlfrescoAuthenticationService,
private router: Router,
private settingsService: AlfrescoSettingsService,
private translateService: AlfrescoTranslationService,
constructor(private settingsService: AlfrescoSettingsService,
private storage: StorageService,
private logService: LogService) {
this.setEcmHost();
this.setBpmHost();
pageTitleService: PageTitleService,
route: ActivatedRoute,
router: Router) {
this.setProvider();
if (translateService) {
translateService.addTranslationFolder('app', 'resources');
}
}
isAPageWithHeaderBar(): boolean {
return location.pathname === '/login' || location.pathname === '/settings';
}
onLogout(event) {
event.preventDefault();
this.authService.logout()
.subscribe(
() => {
this.navigateToLogin();
},
(error: any) => {
if (error && error.response && error.response.status === 401) {
this.navigateToLogin();
} else {
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');
if (event.expanded) {
header.classList.add(expandedHeaderClass);
} else {
header.classList.remove(expandedHeaderClass);
}
}
changeLanguage(lang: string) {
this.translateService.use(lang);
this.hideDrawer();
}
hideDrawer() {
// todo: workaround for drawer closing
document.querySelector('.mdl-layout').MaterialLayout.toggleDrawer();
}
private setEcmHost() {
if (this.storage.hasItem(`ecmHost`)) {
this.settingsService.ecmHost = this.storage.getItem(`ecmHost`);
this.ecmHost = this.storage.getItem(`ecmHost`);
} else {
this.settingsService.ecmHost = this.ecmHost;
}
}
private setBpmHost() {
if (this.storage.hasItem(`bpmHost`)) {
this.settingsService.bpmHost = this.storage.getItem(`bpmHost`);
this.bpmHost = this.storage.getItem(`bpmHost`);
} else {
this.settingsService.bpmHost = this.bpmHost;
}
pageTitleService.setTitle();
}
private setProvider() {
+86 -47
View File
@@ -18,66 +18,86 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { CoreModule } from 'ng2-alfresco-core';
import { SearchModule } from 'ng2-alfresco-search';
import { LoginModule } from 'ng2-alfresco-login';
import { AnalyticsModule } from 'ng2-activiti-analytics';
import { DiagramsModule } from 'ng2-activiti-diagrams';
import { ActivitiFormModule } from 'ng2-activiti-form';
import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
import { ActivitiTaskListModule } from 'ng2-activiti-tasklist';
import { AppConfigService, CoreModule, TRANSLATION_PROVIDER } from 'ng2-alfresco-core';
import { DataTableModule } from 'ng2-alfresco-datatable';
import { DocumentListModule } from 'ng2-alfresco-documentlist';
import { UploadModule } from 'ng2-alfresco-upload';
import { LoginModule } from 'ng2-alfresco-login';
import { SearchModule } from 'ng2-alfresco-search';
import { SocialModule } from 'ng2-alfresco-social';
import { TagModule } from 'ng2-alfresco-tag';
import { WebScriptModule } from 'ng2-alfresco-webscript';
import { UploadModule } from 'ng2-alfresco-upload';
import { UserInfoModule } from 'ng2-alfresco-userinfo';
import { ViewerModule } from 'ng2-alfresco-viewer';
import { ActivitiFormModule } from 'ng2-activiti-form';
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 { WebScriptModule } from 'ng2-alfresco-webscript';
import { FlexLayoutModule } from '@angular/flex-layout';
import { Editor3DModule } from 'ng2-3d-editor';
import { ChartsModule } from 'ng2-charts';
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 { AppLayoutComponent } from './components/app-layout/app-layout.component';
import { FileViewComponent } from './components/file-view/file-view.component';
import { FormListDemoComponent } from './components/form/form-list-demo.component';
import { ThemePickerModule } from './components/theme-picker/theme-picker';
import { MaterialModule } from './material.module';
import { DebugAppConfigService } from './services/debug-app-config.service';
import { CustomSourcesComponent } from './components/files/custom-sources.component';
import {
HomeComponent,
DataTableDemoComponent,
SearchComponent,
SearchBarComponent,
LoginDemoComponent,
ActivitiDemoComponent,
ActivitiAppsView,
FormViewer,
WebscriptComponent,
TagComponent,
AboutComponent,
ActivitiAppsViewComponent,
ActivitiDemoComponent,
ActivitiProcessAttachmentsComponent,
ActivitiShowDiagramComponent,
ActivitiTaskAttachmentsComponent,
DataTableDemoComponent,
FilesComponent,
FormNodeViewer,
SettingComponent
FormDemoComponent,
FormNodeViewerComponent,
FormViewerComponent,
HomeComponent,
LoginDemoComponent,
SearchBarComponent,
SearchComponent,
SettingsComponent,
SocialComponent,
TagComponent,
WebscriptComponent
} from './components/index';
@NgModule({
imports: [
BrowserModule,
routing,
MaterialModule.forRoot(),
CoreModule.forRoot(),
LoginModule.forRoot(),
SearchModule.forRoot(),
DataTableModule.forRoot(),
DocumentListModule.forRoot(),
UploadModule.forRoot(),
TagModule.forRoot(),
WebScriptModule.forRoot(),
ViewerModule.forRoot(),
ActivitiFormModule.forRoot(),
ActivitiTaskListModule.forRoot(),
ActivitiProcessListModule.forRoot(),
UserInfoComponentModule.forRoot(),
AnalyticsModule.forRoot(),
CoreModule,
MaterialModule,
LoginModule,
SearchModule,
DataTableModule,
DocumentListModule,
UploadModule,
TagModule,
SocialModule,
WebScriptModule,
ViewerModule,
ActivitiFormModule,
ActivitiTaskListModule,
ActivitiProcessListModule,
UserInfoModule,
AnalyticsModule,
DiagramsModule,
CustomEditorsModule,
Editor3DModule.forRoot(),
ChartsModule
Editor3DModule,
ChartsModule,
ThemePickerModule,
FlexLayoutModule
],
declarations: [
AppComponent,
@@ -87,16 +107,35 @@ import {
SearchBarComponent,
LoginDemoComponent,
ActivitiDemoComponent,
ActivitiAppsView,
FormViewer,
ActivitiTaskAttachmentsComponent,
ActivitiProcessAttachmentsComponent,
ActivitiShowDiagramComponent,
ActivitiAppsViewComponent,
FormViewerComponent,
WebscriptComponent,
TagComponent,
SocialComponent,
AboutComponent,
FilesComponent,
FormNodeViewer,
SettingComponent
FormNodeViewerComponent,
SettingsComponent,
FormDemoComponent,
FormListDemoComponent,
CustomSourcesComponent,
FileViewComponent,
AppLayoutComponent
],
providers: [
{ provide: AppConfigService, useClass: DebugAppConfigService },
{
provide: TRANSLATION_PROVIDER,
multi: true,
useValue: {
name: 'app',
source: 'resources'
}
}
],
providers: [],
bootstrap: [ AppComponent ]
})
export class AppModule { }
+127 -93
View File
@@ -15,110 +15,144 @@
* limitations under the License.
*/
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AuthGuard, AuthGuardEcm, AuthGuardBpm } from 'ng2-alfresco-core';
import { ModuleWithProviders } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AuthGuard, AuthGuardBpm, AuthGuardEcm } from 'ng2-alfresco-core';
import { AppLayoutComponent } from './components/app-layout/app-layout.component';
import {
HomeComponent,
FilesComponent,
DataTableDemoComponent,
SearchComponent,
LoginDemoComponent,
ActivitiDemoComponent,
ActivitiAppsView,
WebscriptComponent,
TagComponent,
AboutComponent,
FormViewer,
FormNodeViewer,
SettingComponent
ActivitiAppsViewComponent,
ActivitiDemoComponent,
ActivitiShowDiagramComponent,
DataTableDemoComponent,
FilesComponent,
FormDemoComponent,
FormNodeViewerComponent,
FormViewerComponent,
HomeComponent,
LoginDemoComponent,
SearchComponent,
SettingsComponent,
SocialComponent,
TagComponent,
WebscriptComponent
} from './components/index';
import { UploadButtonComponent } from 'ng2-alfresco-upload';
import { FileViewComponent } from './components/file-view/file-view.component';
import { CustomSourcesComponent } from './components/files/custom-sources.component';
import { FormListDemoComponent } from './components/form/form-list-demo.component';
export const appRoutes: Routes = [
{ path: 'login', component: LoginDemoComponent },
{ path: 'settings', component: SettingsComponent },
{ path: 'files/:nodeId/view', component: FileViewComponent, canActivate: [ AuthGuardEcm ] },
{
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 }
component: AppLayoutComponent,
canActivate: [AuthGuard],
children: [
{
path: '',
component: HomeComponent
},
{
path: 'home',
component: HomeComponent
},
{
path: 'files',
component: FilesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'files/:id',
component: FilesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'dl-custom-sources',
component: CustomSourcesComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'datatable',
component: DataTableDemoComponent
},
{
path: 'uploader',
component: UploadButtonComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'search',
component: SearchComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'activiti',
component: ActivitiAppsViewComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps',
component: ActivitiAppsViewComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps/:appId/tasks',
component: ActivitiDemoComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps/:appId/processes',
component: ActivitiDemoComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'activiti/apps/:appId/diagram/:processDefinitionId',
component: ActivitiShowDiagramComponent,
canActivate: [AuthGuardBpm]
},
// TODO: check if neeeded
{
path: 'activiti/appId/:appId',
component: ActivitiDemoComponent,
canActivate: [AuthGuardBpm]
},
// TODO: check if needed
{
path: 'activiti/tasks/:id',
component: FormViewerComponent,
canActivate: [AuthGuardBpm]
},
// TODO: check if needed
{
path: 'activiti/tasksnode/:id',
component: FormNodeViewerComponent,
canActivate: [AuthGuardBpm]
},
{
path: 'webscript',
component: WebscriptComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'tag',
component: TagComponent,
canActivate: [AuthGuardEcm]
},
{
path: 'social',
component: SocialComponent,
canActivate: [AuthGuardEcm]
},
{ path: 'about', component: AboutComponent },
{ path: 'form', component: FormDemoComponent },
{ path: 'form-list', component: FormListDemoComponent }
]
}
];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
@@ -1,3 +1,10 @@
.about-container {
padding: 10px;
}
.adf-table-version {
width: 60%;
border: 0;
border-spacing: 0;
text-align: center;
}
@@ -1,4 +1,49 @@
<div class="about-container">
<h3>Server settings</h3>
<md-list>
<small>The values below are taken from the AppConfigService and loaded from the '{{ configFile }}' file.</small>
<md-list-item>
<h4 md-line> Alfresco Process Services URL: {{ bpmHost }}</h4>
</md-list-item>
<md-divider></md-divider>
<md-list-item>
<h4 md-line>Alfresco Content Services URL: {{ ecmHost }}</h4>
</md-list-item>
</md-list>
<h3>Product Versions</h3>
<div *ngIf="bpmVersion">
<h3>BPM</h3>
<label> Edition </label> {{ bpmVersion.edition }}
<p></p>
<label> Version </label> {{ bpmVersion.majorVersion }}.{{ bpmVersion.minorVersion }}.{{ bpmVersion.revisionVersion }}
</div>
<div *ngIf="ecmVersion">
<h3>ECM</h3>
<label> Edition </label> {{ ecmVersion.edition }}
<p></p>
<label> Version </label> {{ ecmVersion.version.display }}
<p></p>
<h4>License</h4>
<adf-datatable [data]="license"></adf-datatable>
<h4> Status</h4>
<adf-datatable [data]="status"></adf-datatable>
<h4>Modules</h4>
<adf-datatable [data]="modules"></adf-datatable>
</div>
<div *ngIf="githubUrlCommitAlpha">
<h3>Source code</h3>
<small>You are running the project based on the following commit:</small>
<div>
<a [href]="githubUrlCommitAlpha">{{githubUrlCommitAlpha}}</a>
</div>
</div>
<h3>Packages</h3>
<alfresco-datatable [data]="data"></alfresco-datatable>
<small>Current project is using the following ADF libraries:</small>
<adf-datatable [data]="data"></adf-datatable>
</div>
@@ -17,43 +17,116 @@
import { Component, OnInit } from '@angular/core';
import { Http } from '@angular/http';
import { AlfrescoAuthenticationService, AppConfigService, BpmProductVersionModel, DiscoveryApiService, EcmProductVersionModel } from 'ng2-alfresco-core';
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
import { LogService } from 'ng2-alfresco-core';
@Component({
selector: 'about-page',
selector: 'adf-about-page',
templateUrl: './about.component.html',
styleUrls: ['./about.component.css']
})
export class AboutComponent implements OnInit {
data: ObjectDataTableAdapter;
status: ObjectDataTableAdapter;
license: ObjectDataTableAdapter;
modules: ObjectDataTableAdapter;
githubUrlCommitAlpha: string = 'https://github.com/Alfresco/alfresco-ng2-components/commits/';
configFile: string = 'app.config.json';
ecmHost: string = '';
bpmHost: string = '';
ecmVersion: EcmProductVersionModel = null;
bpmVersion: BpmProductVersionModel = null;
constructor(private http: Http,
private logService: LogService) {
private appConfig: AppConfigService,
private authService: AlfrescoAuthenticationService,
private discovery: DiscoveryApiService) {
}
ngOnInit() {
if (this.authService.isEcmLoggedIn()) {
this.discovery.getEcmProductInfo().subscribe((ecmVers) => {
this.ecmVersion = ecmVers;
this.modules = new ObjectDataTableAdapter(this.ecmVersion.modules, [
{type: 'text', key: 'id', title: 'ID', sortable: true},
{type: 'text', key: 'title', title: 'Title', sortable: true},
{type: 'text', key: 'version', title: 'Description', sortable: true},
{type: 'text', key: 'installDate', title: 'Install Date', sortable: true},
{type: 'text', key: 'installState', title: 'Install State', sortable: true},
{type: 'text', key: 'versionMin', title: 'Version Minor', sortable: true},
{type: 'text', key: 'versionMax', title: 'Version Max', sortable: true}
]);
this.status = new ObjectDataTableAdapter([this.ecmVersion.status], [
{type: 'text', key: 'isReadOnly', title: 'ReadOnly', sortable: true},
{type: 'text', key: 'isAuditEnabled', title: 'Is Audit Enable', sortable: true},
{type: 'text', key: 'isQuickShareEnabled', title: 'Is quick shared enable', sortable: true},
{type: 'text', key: 'isThumbnailGenerationEnabled', title: 'Thumbnail Generation', sortable: true}
]);
this.license = new ObjectDataTableAdapter([this.ecmVersion.license], [
{type: 'text', key: 'issuedAt', title: 'Issued At', sortable: true},
{type: 'text', key: 'expiresAt', title: 'Expires At', sortable: true},
{type: 'text', key: 'remainingDays', title: 'Remaining Days', sortable: true},
{type: 'text', key: 'holder', title: 'Holder', sortable: true},
{type: 'text', key: 'mode', title: 'Is Cluster Enabled', sortable: true},
{type: 'text', key: 'isClusterEnabled', title: 'Is Cluster Enabled', sortable: true},
{type: 'text', key: 'isCryptodocEnabled', title: 'Is Cryptodoc Enable', sortable: true}
]);
});
}
if (this.authService.isBpmLoggedIn()) {
this.discovery.getBpmProductInfo().subscribe((bpmVers) => {
this.bpmVersion = bpmVers;
});
}
this.http.get('/versions.json').subscribe(response => {
let regexp = new RegExp('^(ng2-activiti|ng2-alfresco|alfresco-)', 'g');
let regexp = new RegExp('^(ng2-activiti|ng2-alfresco|alfresco-)');
let alfrescoPackages = Object.keys(response.json().dependencies).filter((val) => {
this.logService.log(val);
return regexp.test(val);
});
let alfrescoPackagesTableRappresentation = [];
let alfrescoPackagesTableRepresentation = [];
alfrescoPackages.forEach((val) => {
this.logService.log(response.json().dependencies[val]);
alfrescoPackagesTableRappresentation.push({name: val, version: response.json().dependencies[val].version});
alfrescoPackagesTableRepresentation.push({
name: val,
version: response.json().dependencies[val].version
});
});
this.logService.log(alfrescoPackagesTableRappresentation);
this.gitHubLinkCreation(alfrescoPackagesTableRepresentation);
this.data = new ObjectDataTableAdapter(alfrescoPackagesTableRappresentation, [
this.data = new ObjectDataTableAdapter(alfrescoPackagesTableRepresentation, [
{type: 'text', key: 'name', title: 'Name', sortable: true},
{type: 'text', key: 'version', title: 'Version', sortable: true}
]);
});
this.ecmHost = this.appConfig.get<string>('ecmHost');
this.bpmHost = this.appConfig.get<string>('bpmHost');
}
private gitHubLinkCreation(alfrescoPackagesTableRepresentation): void {
let corePackage = alfrescoPackagesTableRepresentation.find((packageUp) => {
return packageUp.name === 'ng2-alfresco-core';
});
if (corePackage) {
let commitIsh = corePackage.version.split('-');
if (commitIsh.length > 1) {
this.githubUrlCommitAlpha = this.githubUrlCommitAlpha + commitIsh[1];
} else {
this.githubUrlCommitAlpha = this.githubUrlCommitAlpha + corePackage.version;
}
}
}
}
@@ -1,26 +0,0 @@
.activiti-task-list__item:hover {
cursor: pointer;
font-weight: bold;
}
.activiti {
background-color: #f5f5f5;
}
.task-column {
background-color: #f5f5f5;
padding: 10px 10px 10px 10px;
}
.list-column {
width: 320px;
}
.mdl-layout__header {
z-index: 1;
}
.list-buttons {
text-align: right;
margin-bottom: 5px;
}
@@ -1,164 +1,223 @@
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<!-- TABS -->
<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">
<!-- TASKS COMPONENT -->
<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">
<activiti-filters
[appId]="appId"
(filterClick)="onTaskFilterClick($event)"
(onSuccess)="onSuccessTaskFilterList($event)"
#activitifilter>
</activiti-filters>
<md-tab-group [(selectedIndex)]="activeTab">
<md-tab id="tasks-header" href="#tasks" label="{{'PS-TAB.TASKS-TAB' | translate}}">
<div class="page-content">
<div class="activiti-demo-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
<div class="activiti-demo-grid-item activiti-demo-tasks-menu" fxFlex.gt-md="225px">
<div class="activiti-demo-list-buttons">
<button color="primary" md-raised-button data-automation-id="btn-start-task" class="activiti-demo-list-buttons-start" (click)="navigateStartTask()">
<md-icon>add</md-icon>
<span>{{'PS-TAB.START-TASK' | translate}}</span>
</button>
</div>
<div class="mdl-cell mdl-cell--3-col task-column mdl-shadow--2dp list-column">
<div class="list-buttons">
<activiti-start-task
<adf-accordion>
<adf-accordion-group [heading]="'Tasks'" [isSelected]="true" [isOpen]="true"
[headingIcon]="'assignment'">
<adf-filters
[filterParam]="{name:'MY tasks'}"
[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">
<activiti-task-details #activitidetails
[taskId]="currentTaskId"
(formCompleted)="onFormCompleted($event)"
(formContentClicked)="onFormContentClick($event)"
(taskCreated)="onTaskCreated($event)">
</activiti-task-details>
[hasIcon]="false"
(filterClick)="onTaskFilterClick($event)"
(onSuccess)="onSuccessTaskFilterList($event)"
#activitifilter>
</adf-filters>
</adf-accordion-group>
</adf-accordion>
</div>
<div class="activiti-demo-grid-item activiti-demo-tasks-list" fxFlex.gt-md="335px" [ngClass.gt-md]="{'small-pagination': true}"
*ngIf="taskFilter && !isStartTaskMode()">
<adf-tasklist
[appId]="taskFilter?.appId"
[page]="taskPage"
[size]="taskPagination.maxItems"
[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)="onTaskRowDblClick($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>
-->
</adf-tasklist>
<adf-pagination
(changePageNumber)="onChangePageNumber($event)"
(changePageSize)="onChangePageSize($event)"
(nextPage)="onNextPage($event)"
(prevPage)="onPrevPage($event)"
[pagination]="taskPagination"
[supportedPageSizes]="[2, 4, 6, 8, 10, 12]">
</adf-pagination>
</div>
<div class="activiti-demo-grid-item activiti-demo-tasks-details" *ngIf="!isStartTaskMode()" fxFlex.gt-md="1 1 auto">
<adf-task-details #activitidetails
[debugMode]="true"
[taskId]="currentTaskId"
[fieldValidators]="fieldValidators"
(formCompleted)="onFormCompleted($event)"
(formContentClicked)="onFormContentClick($event)"
(taskCreated)="onTaskCreated($event)"
(assignTask)="onAssignTask()"
(taskDeleted)="onTaskDeleted($event)">
</adf-task-details>
<hr>
<div *ngIf="currentTaskId">
{{'PS-TAB.AUDIT-LOG' | translate}}
<button
adf-task-audit
[task-id]="currentTaskId"
[download]="true"
md-icon-button (clicked)="onAuditClick($event)" (error)="onAuditError($event)">
<md-icon>assignment_ind</md-icon>
</button>
<hr>
</div>
<md-card>
<md-card-content>
<activiti-task-attachments
[taskId]="currentTaskId">
</activiti-task-attachments>
</md-card-content>
</md-card>
</div>
<div class="activiti-demo-grid-item activiti-demo-tasks-start" *ngIf="isStartTaskMode()" fxFlex.gt-md="1 1 auto">
<adf-start-task
[appId]="appId"
(success)="onStartTaskSuccess($event)"
(cancel)="onCancelStartTask()">
</adf-start-task>
</div>
</div>
</section>
<!-- PROCESS COMPONENT -->
<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 mdl-shadow--2dp">
<activiti-process-instance-filters
</div>
</md-tab>
<md-tab id="processes-header" href="#processes"
label="{{'PS-TAB.PROCESSES-TAB' | translate}}">
<div class="page-content">
<div class="activiti-demo-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
<div class="activiti-demo-grid-item activiti-demo-processes-menu" fxFlex.gt-md="225px">
<div class="activiti-demo-list-buttons">
<button
color="primary"
md-raised-button
class="activiti-demo-list-buttons-start"
data-automation-id="btn-start-process"
(click)="navigateStartProcess()">
<md-icon>add</md-icon>
<span>{{'PS-TAB.START-PROCESS' | translate}}</span>
</button>
</div>
<adf-accordion>
<adf-accordion-group [heading]="'Processes'" [isSelected]="true" [isOpen]="true"
[headingIcon]="'assessment'">
<adf-process-instance-filters
[filterParam]="{index: 0}"
[appId]="appId"
(filterClick)="onProcessFilterClick($event)"
(onSuccess)="onSuccessProcessFilterList($event)">
</activiti-process-instance-filters>
</div>
<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 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--10-col task-column mdl-shadow--2dp" *ngIf="isStartProcessMode()">
<activiti-start-process [appId]="appId" (start)="onStartProcessInstance($event)"></activiti-start-process>
</div>
</div>
</adf-process-instance-filters>
</adf-accordion-group>
</adf-accordion>
</div>
</div>
</section>
<!-- ANALYTICS COMPONENT -->
<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">
<span><h5>Report List</h5></span>
<div class="activiti-demo-grid-item activiti-demo-processes-list activiti-demo-list" fxFlex.gt-md="335px" [ngClass.gt-md]="{'small-pagination': true}"
*ngIf="processFilter && !isStartProcessMode()">
<adf-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)"
(row-dblclick)="onProcessRowDblClick($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>
-->
</adf-process-instance-list>
</div>
<div class="activiti-demo-grid-item activiti-demo-processes-details" *ngIf="!isStartProcessMode()" fxFlex.gt-md="1 1 auto">
<adf-process-instance-details
[processInstanceId]="currentProcessInstanceId"
(processCancelled)="processCancelled()"
(showProcessDiagram)="onShowProcessDiagram($event)"
(taskClick)="onProcessDetailsTaskClick($event)">
</adf-process-instance-details>
<hr>
<div *ngIf="currentProcessInstanceId">
{{'PS-TAB.AUDIT-LOG' | translate}}
<button adf-process-audit
[process-id]="currentProcessInstanceId"
[download]="true" md-icon-button
[format]="'pdf'"
(clicked)="onAuditClick($event)"
(error)="onAuditError($event)">
<md-icon>assignment_ind</md-icon>
</button>
<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
*ngIf="report"
[appId]="appId"
[reportId]="report.id"
[hideParameters]="false"
(editReport)="onEditReport($event)"
(reportSaved)="onReportSaved()"
(reportDeleted)="onReportDeleted()">
</activiti-analytics>
</div>
<md-card>
<md-card-content>
<activiti-process-attachments
[processId]="currentProcessInstanceId">
</activiti-process-attachments>
</md-card-content>
</md-card>
</div>
<div class="activiti-demo-grid-item activiti-demo-processes-start" fxFlex.gt-md="1 1 auto"
*ngIf="isStartProcessMode()">
<adf-start-process
[appId]="appId"
(start)="onStartProcessInstance($event)"
(cancel)="onCancelProcessInstance()">
</adf-start-process>
</div>
</div>
</section>
</main>
</div>
</div>
</md-tab>
<md-tab id="report-header" href="#report"
label="{{'PS-TAB.REPORTS-TAB' | translate}}">
<div class="activiti-demo-grid" fxLayout="row" fxLayout.lt-lg="column" fxLayoutAlign="stretch">
<div class="activiti-demo-grid-item activiti-demo-reports-menu" fxFlex.gt-md="300px">
<span><h5>Report List</h5></span>
<hr>
<analytics-report-list
[appId]="appId"
[selectFirst]="selectFirstReport"
(reportClick)="onReportClick($event)"
#analyticsreportlist>
</analytics-report-list>
</div>
<div class="activiti-demo-grid-item activiti-demo-reports-details" fxFlex.gt-md="1 1 auto">
<adf-analytics
*ngIf="report"
[appId]="appId"
[reportId]="report.id"
[hideParameters]="false"
(editReport)="onEditReport($event)"
(reportSaved)="onReportSaved($event)"
(reportDeleted)="onReportDeleted()">
</adf-analytics>
<div *ngIf="!report">
<span>{{'ANALYTICS_REPORT.NO_REPORT_MESSAGE' | translate}}</span>
</div>
</div>
</div>
</md-tab>
</md-tab-group>
<div *ngIf="fileShowed">
<alfresco-viewer
@@ -0,0 +1,106 @@
.adf-no-form-container {
text-align: center;
font-weight: 600;
font-size: 18px;
}
.activiti-demo-grid {
.activiti-demo-grid-item {
margin: 4px;
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
padding: 10px;
}
.activiti-demo-list-buttons {
margin-bottom: 24px;
}
.activiti-demo-list-buttons-start {
width: 100%;
}
.activiti-demo-tasks-list.small-pagination,
.activiti-demo-processes-list.small-pagination {
.adf-pagination {
flex-wrap: wrap;
padding-bottom: 24px;
padding-top: 8px;
&__block {
border-right: none;
}
&__range-block.adf-pagination__block:first-child {
order: 1;
width: 60%;
flex: 0 0 auto;
box-sizing: border-box;
padding-left: 2px;
justify-content: flex-start;
}
&__perpage-block {
order: 3;
width: 60%;
box-sizing: border-box;
padding-left: 2px;
justify-content: flex-start;
}
&__actualinfo-block {
order: 2;
width: 40%;
box-sizing: border-box;
padding-right: 2px;
justify-content: flex-end;
}
&__controls-block {
order: 4;
width: 40%;
box-sizing: border-box;
padding-right: 2px;
justify-content: flex-end;
}
}
}
.activiti-demo-list {
.adf-data-table {
border: none;
}
.adf-data-table tr,
.adf-data-table td {
height: 36px;
font-size: 14px;
}
.adf-data-table td {
padding-top: 0;
padding-bottom: 0;
border-bottom: none;
}
.adf-data-table th {
padding-top: 0;
padding-bottom: 0;
height: 40px;
vertical-align: middle;
font-size: 14px;
}
}
@media screen and (max-width: 1279px) {
container-widget .grid-list {
flex-direction: column;
.grid-list-item {
width: 100% !important;
}
}
}
}
@@ -15,62 +15,73 @@
* limitations under the License.
*/
import { AfterViewInit, Component, ElementRef, Input, ViewChild } from '@angular/core';
import {
ActivitiApps,
ActivitiFilters,
ActivitiTaskList,
FilterRepresentationModel,
TaskDetailsEvent
} from 'ng2-activiti-tasklist';
import {
ActivitiProcessFilters,
ActivitiProcessInstanceDetails,
ActivitiProcessInstanceListComponent,
ActivitiStartProcessInstance,
FilterProcessRepresentationModel,
ProcessInstance
} from 'ng2-activiti-processlist';
// tslint:disable-next-line:adf-file-name
import { AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Pagination } from 'alfresco-js-api';
import { AnalyticsReportListComponent } from 'ng2-activiti-analytics';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs/Rx';
import {
ObjectDataTableAdapter,
ObjectDataRow,
DataSorting
} from 'ng2-alfresco-datatable';
DynamicTableRow, FORM_FIELD_VALIDATORS, FormEvent, FormFieldEvent, FormRenderingService,
FormService, ValidateDynamicTableRowEvent
} from 'ng2-activiti-form';
import {
FilterProcessRepresentationModel,
ProcessFiltersComponent,
ProcessInstance,
ProcessInstanceDetailsComponent,
ProcessInstanceListComponent,
StartProcessInstanceComponent
} from 'ng2-activiti-processlist';
import {
AppsListComponent,
FilterRepresentationModel,
TaskDetailsComponent,
TaskDetailsEvent,
TaskFiltersComponent,
TaskListComponent,
TaskListService
} from 'ng2-activiti-tasklist';
import { AlfrescoApiService } from 'ng2-alfresco-core';
import { FormService, FormRenderingService, FormEvent, FormFieldEvent } from 'ng2-activiti-form';
import {
DataSorting,
ObjectDataRow,
ObjectDataTableAdapter
} from 'ng2-alfresco-datatable';
import { Subscription } from 'rxjs/Rx';
import { /*CustomEditorComponent*/ CustomStencil01 } from './custom-editor/custom-editor.component';
declare var componentHandler;
import { DemoFieldValidator } from './demo-field-validator';
const currentProcessIdNew = '__NEW__';
const currentTaskIdNew = '__NEW__';
@Component({
selector: 'activiti-demo',
selector: 'adf-activiti-demo',
templateUrl: './activiti-demo.component.html',
styleUrls: ['./activiti-demo.component.css']
styleUrls: ['./activiti-demo.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class ActivitiDemoComponent implements AfterViewInit {
export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit {
@ViewChild(ActivitiFilters)
activitifilter: ActivitiFilters;
@ViewChild(TaskFiltersComponent)
activitifilter: TaskFiltersComponent;
@ViewChild(ActivitiTaskList)
taskList: ActivitiTaskList;
@ViewChild(TaskListComponent)
taskList: TaskListComponent;
@ViewChild(ActivitiProcessFilters)
activitiprocessfilter: ActivitiProcessFilters;
@ViewChild(ProcessFiltersComponent)
activitiprocessfilter: ProcessFiltersComponent;
@ViewChild(ActivitiProcessInstanceListComponent)
processList: ActivitiProcessInstanceListComponent;
@ViewChild(ProcessInstanceListComponent)
processList: ProcessInstanceListComponent;
@ViewChild(ActivitiProcessInstanceDetails)
activitiprocessdetails: ActivitiProcessInstanceDetails;
@ViewChild(ProcessInstanceDetailsComponent)
activitiprocessdetails: ProcessInstanceDetailsComponent;
@ViewChild(ActivitiStartProcessInstance)
activitiStartProcess: ActivitiStartProcessInstance;
@ViewChild(TaskDetailsComponent)
activitidetails: TaskDetailsComponent;
@ViewChild(StartProcessInstanceComponent)
activitiStartProcess: StartProcessInstanceComponent;
@ViewChild(AnalyticsReportListComponent)
analyticsreportlist: AnalyticsReportListComponent;
@@ -79,6 +90,9 @@ export class ActivitiDemoComponent implements AfterViewInit {
appId: number = null;
fileShowed: boolean = false;
selectFirstReport: boolean = false;
private tabs = { tasks: 0, processes: 1, reports: 2 };
content: Blob;
contentName: string;
@@ -87,10 +101,16 @@ export class ActivitiDemoComponent implements AfterViewInit {
currentTaskId: string;
currentProcessInstanceId: string;
taskSchemaColumns: any [] = [];
processSchemaColumns: any [] = [];
taskSchemaColumns: any[] = [];
taskPagination: Pagination = {
skipCount: 0,
maxItems: 10,
totalItems: 0
};
taskPage: number = 0;
processSchemaColumns: any[] = [];
activeTab: string = 'tasks'; // tasks|processes|reports
activeTab: number = this.tabs.tasks; // tasks|processes|reports
taskFilter: FilterRepresentationModel;
report: any;
@@ -103,19 +123,26 @@ export class ActivitiDemoComponent implements AfterViewInit {
dataTasks: ObjectDataTableAdapter;
dataProcesses: ObjectDataTableAdapter;
fieldValidators = [
...FORM_FIELD_VALIDATORS,
new DemoFieldValidator()
];
constructor(private elementRef: ElementRef,
private route: ActivatedRoute,
private router: Router,
private taskListService: TaskListService,
private apiService: AlfrescoApiService,
private formRenderingService: FormRenderingService,
private formService: FormService) {
formRenderingService: FormRenderingService,
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', sortable: true},
{type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true}
{ 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'));
@@ -134,9 +161,66 @@ export class ActivitiDemoComponent implements AfterViewInit {
console.log(`Field value changed. Form: ${e.form.id}, Field: ${e.field.id}, Value: ${e.field.value}`);
});
formService.validateDynamicTableRow.subscribe(
(e: ValidateDynamicTableRowEvent) => {
const row: DynamicTableRow = e.row;
if (row && row.value && row.value.name === 'admin') {
e.summary.isValid = false;
e.summary.text = 'Sorry, wrong value. You cannot use "admin".';
e.preventDefault();
}
}
);
// Uncomment this block to see form event handling in action
/*
formService.formEvents.subscribe((event: Event) => {
console.log('Event fired:' + event.type);
console.log('Event Target:' + event.target);
});
*/
}
onPrevPage(pagination: Pagination): void {
this.taskPagination.skipCount = pagination.skipCount;
this.taskPage--;
}
onNextPage(pagination: Pagination): void {
this.taskPagination.skipCount = pagination.skipCount;
this.taskPage++;
}
onChangePageSize(pagination: Pagination): void {
const { skipCount, maxItems } = pagination;
this.taskPage = this.currentPage(skipCount, maxItems);
this.taskPagination.maxItems = maxItems;
this.taskPagination.skipCount = skipCount;
}
onChangePageNumber(pagination: Pagination): void {
const { maxItems, skipCount } = pagination;
this.taskPage = this.currentPage(skipCount, maxItems);
this.taskPagination.maxItems = maxItems;
this.taskPagination.skipCount = skipCount;
}
currentPage(skipCount: number, maxItems: number): number {
return (skipCount && maxItems) ? Math.floor(skipCount / maxItems) : 0;
}
ngOnInit() {
this.taskListService.tasksList$.subscribe(
(tasks) => {
this.taskPagination = { count: tasks.data.length, maxItems: this.taskPagination.maxItems, skipCount: this.taskPagination.skipCount, totalItems: tasks.total };
console.log({ count: tasks.data.length, maxItems: this.taskPagination.maxItems, skipCount: this.taskPagination.skipCount, totalItems: tasks.total });
}, (err) => {
console.log('err' + err);
});
if (this.router.url.includes('processes')) {
this.activeTab = this.tabs.processes;
}
this.sub = this.route.params.subscribe(params => {
let applicationId = params['appId'];
if (applicationId && applicationId !== '0') {
@@ -148,22 +232,24 @@ export class ActivitiDemoComponent implements AfterViewInit {
this.processFilter = null;
this.currentProcessInstanceId = null;
});
this.layoutType = ActivitiApps.LAYOUT_GRID;
this.layoutType = AppsListComponent.LAYOUT_GRID;
}
ngOnDestroy() {
this.sub.unsubscribe();
this.taskListService.tasksList$.subscribe();
}
onTaskFilterClick(filter: FilterRepresentationModel) {
onTaskFilterClick(filter: FilterRepresentationModel): void {
this.applyTaskFilter(filter);
}
onReportClick(event: any) {
onReportClick(event: any): void {
this.report = event;
}
onSuccessTaskFilterList(event: any) {
onSuccessTaskFilterList(event: any): void {
this.applyTaskFilter(this.activitifilter.getCurrentFilter());
}
@@ -174,102 +260,139 @@ export class ActivitiDemoComponent implements AfterViewInit {
}
}
onStartTaskSuccess(event: any) {
onStartTaskSuccess(event: any): void {
this.activitifilter.selectFilterWithTask(event.id);
this.currentTaskId = event.id;
}
onCancelStartTask() {
this.currentTaskId = null;
this.reloadTaskFilters();
}
onSuccessTaskList(event: FilterRepresentationModel) {
this.currentTaskId = this.taskList.getCurrentId();
}
onProcessFilterClick(event: FilterProcessRepresentationModel) {
onProcessFilterClick(event: FilterProcessRepresentationModel): void {
this.currentProcessInstanceId = null;
this.processFilter = event;
}
onSuccessProcessFilterList() {
onSuccessProcessFilterList(): void {
this.processFilter = this.activitiprocessfilter.getCurrentFilter();
}
onSuccessProcessList(event: any) {
onSuccessProcessList(event: any): void {
this.currentProcessInstanceId = this.processList.getCurrentId();
}
onTaskRowClick(taskId) {
onTaskRowClick(taskId): void {
this.currentTaskId = taskId;
}
onProcessRowClick(processInstanceId) {
onTaskRowDblClick(event: CustomEvent) {
const taskId = event.detail.value.obj.id;
this.currentTaskId = taskId;
}
onProcessRowDblClick(event: CustomEvent) {
const processInstanceId = event.detail.value.obj.id;
this.currentProcessInstanceId = processInstanceId;
}
onEditReport(name: string) {
onProcessRowClick(processInstanceId): void {
this.currentProcessInstanceId = processInstanceId;
}
onEditReport(name: string): void {
this.analyticsreportlist.reload();
}
onReportSaved() {
onReportSaved(reportId): void {
this.analyticsreportlist.reload(reportId);
}
onReportDeleted(): void {
this.analyticsreportlist.reload();
this.analyticsreportlist.selectReport(null);
}
onReportDeleted() {
this.analyticsreportlist.reload();
this.selectFirstElementInReportList();
}
selectFirstElementInReportList() {
if (!this.analyticsreportlist.isReportsEmpty()) {
this.analyticsreportlist.selectReport(this.analyticsreportlist.reports[0]);
}
}
navigateStartProcess() {
navigateStartProcess(): void {
this.resetProcessFilters();
this.reloadProcessFilters();
this.currentProcessInstanceId = currentProcessIdNew;
}
onStartProcessInstance(instance: ProcessInstance) {
this.currentProcessInstanceId = instance.id;
this.activitiStartProcess.reset();
this.resetProcessFilters();
navigateStartTask(): void {
this.resetTaskFilters();
this.reloadTaskFilters();
this.currentTaskId = currentTaskIdNew;
}
isStartProcessMode() {
onStartProcessInstance(instance: ProcessInstance): void {
this.currentProcessInstanceId = instance.id;
this.activitiStartProcess.reset();
this.activitiprocessfilter.selectRunningFilter();
}
onCancelProcessInstance() {
this.currentProcessInstanceId = null;
this.reloadProcessFilters();
}
isStartProcessMode(): boolean {
return this.currentProcessInstanceId === currentProcessIdNew;
}
processCancelled(data: any) {
isStartTaskMode(): boolean {
return this.currentTaskId === currentTaskIdNew;
}
processCancelled(data: any): void {
this.currentProcessInstanceId = null;
this.processList.reload();
}
onSuccessNewProcess(data: any) {
onSuccessNewProcess(data: any): void {
this.processList.reload();
}
onFormCompleted(form) {
this.taskList.reload();
onFormCompleted(form): void {
this.currentTaskId = null;
this.taskPagination.totalItems--;
const { skipCount, maxItems, totalItems } = this.taskPagination;
if (totalItems > 0 && (skipCount >= totalItems)) {
this.taskPagination.skipCount -= maxItems;
}
this.taskPage = this.currentPage(this.taskPagination.skipCount, maxItems);
this.taskList.reload();
}
onFormContentClick(content: any) {
onFormContentClick(content: any): void {
this.fileShowed = true;
this.content = content.contentBlob;
this.contentName = content.name;
}
onTaskCreated(data: any) {
onAuditClick(event: any) {
console.log(event);
}
onAuditError(event: any): void {
console.error('My custom error message' + event);
}
onTaskCreated(data: any): void {
this.currentTaskId = data.parentTaskId;
this.taskList.reload();
}
ngAfterViewInit() {
// workaround for MDL issues with dynamic components
if (componentHandler) {
componentHandler.upgradeAllRegistered();
}
onTaskDeleted(data: any): void {
this.taskList.reload();
}
ngAfterViewInit() {
this.loadStencilScriptsInPageFromActiviti();
}
@@ -284,9 +407,13 @@ export class ActivitiDemoComponent implements AfterViewInit {
});
}
onProcessDetailsTaskClick(event: TaskDetailsEvent) {
onShowProcessDiagram(event: any): void {
this.router.navigate(['/activiti/apps/' + this.appId + '/diagram/' + event.value]);
}
onProcessDetailsTaskClick(event: TaskDetailsEvent): void {
event.preventDefault();
this.activeTab = 'tasks';
this.activeTab = this.tabs.tasks;
const taskId = event.value.id;
const processTaskDataRow = new ObjectDataRow({
@@ -295,25 +422,43 @@ export class ActivitiDemoComponent implements AfterViewInit {
created: event.value.created
});
this.activitifilter.selectFilter(null);
this.taskList.setCustomDataSource([processTaskDataRow]);
this.taskList.selectTask(taskId);
if (this.taskList) {
this.taskList.setCustomDataSource([processTaskDataRow]);
this.taskList.selectTask(taskId);
}
this.currentTaskId = taskId;
}
private resetProcessFilters() {
private resetProcessFilters(): void {
this.processFilter = null;
}
private reloadProcessFilters() {
this.activitiprocessfilter.selectFilter(null);
private resetTaskFilters(): void {
this.taskFilter = null;
}
onRowClick(event) {
private reloadProcessFilters(): void {
this.activitiprocessfilter.selectFilter(this.activitiprocessfilter.getCurrentFilter());
}
private reloadTaskFilters(): void {
this.activitifilter.selectFilter(this.activitifilter.getCurrentFilter());
}
onRowClick(event): void {
console.log(event);
}
onRowDblClick(event) {
onRowDblClick(event): void {
console.log(event);
}
isTaskCompleted(): boolean {
return this.activitidetails.isCompletedTask();
}
onAssignTask() {
this.taskList.reload();
this.currentTaskId = null;
}
}
@@ -0,0 +1,3 @@
adf-create-process-attachment ::ng-deep button {
float: right;
}
@@ -0,0 +1,32 @@
<div id="attachment-process-list" *ngIf="processId">
<h5>Attachments</h5>
<div class="adf-no-form-container">
<adf-upload-drag-area
[parentId]="processId"
[disabled]="isCompletedProcess()"
[showNotificationBar]="false">
<adf-process-attachment-list #processAttachList
*ngIf="processId"
[disabled]="isCompletedProcess()"
[processInstanceId]="processId"
(attachmentClick)="onAttachmentClick($event)">
</adf-process-attachment-list>
</adf-upload-drag-area>
<adf-create-process-attachment
*ngIf="!isCompletedProcess()"
[processInstanceId]="processId"
(success)="onFileUploadComplete($event)">
</adf-create-process-attachment>
</div>
</div>
<div *ngIf="fileShowed">
<adf-viewer
[(showViewer)]="fileShowed"
[blobFile]="content"
[displayName]="contentName"
[overlayMode]="true">
</adf-viewer>
</div>
@@ -0,0 +1,74 @@
/*!
* @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, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
import { ProcessAttachmentListComponent, ProcessUploadService } from 'ng2-activiti-processlist';
import { ProcessInstance, ProcessService } from 'ng2-activiti-processlist';
import { UploadService } from 'ng2-alfresco-core';
@Component({
selector: 'activiti-process-attachments',
templateUrl: './activiti-process-attachments.component.html',
styleUrls: ['./activiti-process-attachments.component.css'],
providers: [
{provide: UploadService, useClass: ProcessUploadService}
]
})
export class ActivitiProcessAttachmentsComponent implements OnInit, OnChanges {
@Input()
processId: string;
@ViewChild(ProcessAttachmentListComponent)
processAttachList: ProcessAttachmentListComponent;
fileShowed: boolean = false;
content: Blob;
contentName: string;
processInstance: ProcessInstance;
constructor(private uploadService: UploadService, private processService: ProcessService) {
}
ngOnInit() {
this.uploadService.fileUploadComplete.subscribe(value => this.onFileUploadComplete(value.data));
}
ngOnChanges() {
if (this.processId) {
this.processService.getProcess(this.processId).subscribe((processInstance: ProcessInstance) => {
this.processInstance = processInstance;
});
}
}
onFileUploadComplete(content: any) {
this.processAttachList.add(content);
}
onAttachmentClick(content: any): void {
this.fileShowed = true;
this.content = content.contentBlob;
this.contentName = content.name;
}
isCompletedProcess(): boolean {
return this.processInstance && this.processInstance.ended !== undefined && this.processInstance.ended !== null;
}
}
@@ -0,0 +1,4 @@
<div>
<button md-mini-fab (click)="onClickBack()" ><md-icon>keyboard_backspace</md-icon></button>
<adf-diagram [processInstanceId]="processDefinitionId"></adf-diagram>
</div>
@@ -0,0 +1,43 @@
/*!
* @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 { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'activiti-show-diagram',
templateUrl: './activiti-show-diagram.component.html',
styleUrls: ['./activiti-show-diagram.component.css']
})
export class ActivitiShowDiagramComponent {
processDefinitionId: string;
appId: string;
constructor(private route: ActivatedRoute,
private router: Router) {
this.route.params.subscribe(params => {
this.processDefinitionId = params['processDefinitionId'];
this.appId = params['appId'];
});
}
onClickBack() {
this.router.navigate(['/activiti/apps/' + this.appId + '/processes']);
}
}
@@ -0,0 +1,3 @@
adf-create-task-attachment ::ng-deep button {
float: right;
}
@@ -0,0 +1,32 @@
<div id="attachment-task-list" *ngIf="taskId">
<h5>Attachments</h5>
<div class="adf-no-form-container">
<adf-upload-drag-area
[parentId]="taskId"
[disabled]="isCompletedTask()"
[showNotificationBar]="false">
<adf-task-attachment-list #taskAttachList
*ngIf="taskId"
[taskId]="taskId"
[disabled]="isCompletedTask()"
(attachmentClick)="onAttachmentClick($event)">
</adf-task-attachment-list>
</adf-upload-drag-area>
<adf-create-task-attachment
*ngIf="!isCompletedTask()"
[taskId]="taskId"
(success)="onFileUploadComplete($event)">
</adf-create-task-attachment>
</div>
</div>
<div *ngIf="fileShowed">
<adf-viewer
[(showViewer)]="fileShowed"
[blobFile]="content"
[displayName]="contentName"
[overlayMode]="true">
</adf-viewer>
</div>
@@ -0,0 +1,77 @@
/*!
* @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, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
import { ProcessUploadService, TaskAttachmentListComponent } from 'ng2-activiti-tasklist';
import { ActivitiTaskListService } from 'ng2-activiti-tasklist';
import { UploadService } from 'ng2-alfresco-core';
@Component({
selector: 'activiti-task-attachments',
templateUrl: './activiti-task-attachments.component.html',
styleUrls: ['./activiti-task-attachments.component.css'],
providers: [
{ provide: UploadService, useClass: ProcessUploadService }
]
})
export class ActivitiTaskAttachmentsComponent implements OnInit, OnChanges {
@Input()
taskId: string;
@ViewChild(TaskAttachmentListComponent)
taskAttachList: TaskAttachmentListComponent;
fileShowed: boolean = false;
content: Blob;
contentName: string;
taskDetails: any;
constructor(private uploadService: UploadService,
private activitiTaskList: ActivitiTaskListService) {
}
ngOnInit() {
this.uploadService.fileUploadComplete.subscribe(value => this.onFileUploadComplete(value.data));
}
ngOnChanges() {
if (this.taskId) {
this.activitiTaskList.getTaskDetails(this.taskId).map((res) => res).subscribe(
(res: any) => {
this.taskDetails = res;
});
}
}
onFileUploadComplete(content: any) {
this.taskAttachList.add(content);
}
onAttachmentClick(content: any): void {
this.fileShowed = true;
this.content = content.contentBlob;
this.contentName = content.name;
}
isCompletedTask(): boolean {
return this.taskDetails && this.taskDetails.endDate !== undefined && this.taskDetails.endDate !== null;
}
}
@@ -16,7 +16,7 @@
*/
import { Component } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { Router } from '@angular/router';
import { AppDefinitionRepresentationModel } from 'ng2-activiti-tasklist';
@Component({
@@ -25,9 +25,9 @@ import { AppDefinitionRepresentationModel } from 'ng2-activiti-tasklist';
<activiti-apps (appClick)="onAppClicked($event)"></activiti-apps>
`
})
export class ActivitiAppsView {
export class ActivitiAppsViewComponent {
constructor(private router: Router, private route: ActivatedRoute) {
constructor(private router: Router) {
}
onAppClicked(app: AppDefinitionRepresentationModel) {
@@ -15,7 +15,9 @@
* limitations under the License.
*/
import { NgModule, Component } from '@angular/core';
/* tslint:disable */
import { Component, NgModule } from '@angular/core';
import { WidgetComponent } from 'ng2-activiti-form';
@Component({
@@ -24,17 +26,29 @@ import { WidgetComponent } from 'ng2-activiti-form';
<div style="color: red">Look, I'm a custom editor!</div>
`
})
export class CustomEditorComponent extends WidgetComponent {}
export class CustomEditorComponent extends WidgetComponent {
constructor() {
super();
}
}
@Component({
selector: 'custom-stencil-01',
template: `<div style="color: green">ADF version of custom Activiti stencil</div>`
})
export class CustomStencil01 extends WidgetComponent {}
export class CustomStencil01 extends WidgetComponent {
constructor() {
super();
}
}
@NgModule({
declarations: [ CustomEditorComponent, CustomStencil01 ],
exports: [ CustomEditorComponent, CustomStencil01 ],
entryComponents: [ CustomEditorComponent, CustomStencil01 ]
})
export class CustomEditorsModule {}
export class CustomEditorsModule {
}
@@ -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 { FormFieldModel, FormFieldTypes, FormFieldValidator } from 'ng2-activiti-form';
export class DemoFieldValidator implements FormFieldValidator {
isSupported(field: FormFieldModel): boolean {
return field && field.type === FormFieldTypes.TEXT;
}
validate(field: FormFieldModel): boolean {
if (this.isSupported(field)) {
if (field.value && field.value.toLowerCase() === 'admin') {
field.validationSummary = 'Sorry, the value cannot be "admin".';
return false;
}
}
return true;
}
}
@@ -1,6 +1,6 @@
<div class="activiti-form-viewer" *ngIf="nodeId">
<activiti-form [nodeId]="nodeId"
<adf-form [nodeId]="nodeId"
[saveMetadata]="true"
[path]="'/Sites/swsdp/documentLibrary'">
</activiti-form>
</adf-form>
</div>
@@ -15,18 +15,16 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs/Rx';
declare var componentHandler;
@Component({
selector: 'form-node-viewer',
templateUrl: './form-node-viewer.component.html',
styleUrls: ['./form-node-viewer.component.css']
})
export class FormNodeViewer implements OnInit, OnDestroy, AfterViewChecked {
export class FormNodeViewerComponent implements OnInit, OnDestroy {
nodeId: string;
@@ -45,11 +43,4 @@ export class FormNodeViewer implements OnInit, OnDestroy, AfterViewChecked {
this.sub.unsubscribe();
}
ngAfterViewChecked() {
// workaround for MDL issues with dynamic components
if (componentHandler) {
componentHandler.upgradeAllRegistered();
}
}
}
@@ -1,11 +1,11 @@
<div class="activiti-form-viewer" *ngIf="taskId">
<activiti-form [taskId]="taskId"></activiti-form>
<!--<activiti-form [formName]="'activitiForms:patientFolder'"-->
<adf-form [taskId]="taskId"></adf-form>
<!--<adf-form [formName]="'activitiForms:patientFolder'"-->
<!--[saveMetadata]="true"-->
<!--[path]="'/Sites/swsdp/documentLibrary'"-->
<!--[nameNode]="'test'"></activiti-form>-->
<!--<activiti-form [nodeId]="'e280be3a-6584-45a1-8bb5-89bfe070262e'"-->
<!--[nameNode]="'test'"></adf-form>-->
<!--<adf-form [nodeId]="'e280be3a-6584-45a1-8bb5-89bfe070262e'"-->
<!--[saveMetadata]="true"-->
<!--[path]="'/Sites/swsdp/documentLibrary'">-->
<!--</activiti-form>-->
<!--</adf-form>-->
</div>
@@ -15,18 +15,16 @@
* limitations under the License.
*/
import { Component, OnInit, OnDestroy, AfterViewChecked } from '@angular/core';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs/Rx';
declare var componentHandler;
@Component({
selector: 'form-viewer',
templateUrl: './form-viewer.component.html',
styleUrls: ['./form-viewer.component.css']
})
export class FormViewer implements OnInit, OnDestroy, AfterViewChecked {
export class FormViewerComponent implements OnInit, OnDestroy {
taskId: string;
@@ -45,11 +43,4 @@ export class FormViewer implements OnInit, OnDestroy, AfterViewChecked {
this.sub.unsubscribe();
}
ngAfterViewChecked() {
// workaround for MDL issues with dynamic components
if (componentHandler) {
componentHandler.upgradeAllRegistered();
}
}
}
@@ -0,0 +1,49 @@
<md-sidenav-container class="adf-nav-container">
<md-sidenav #sidenav class="adf-sidenav" position="end" mode="push">
<md-nav-list>
<a md-list-item *ngFor="let link of links" [routerLink]="link.href" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }" (click)="sidenav.close()" class="adf-sidenav-link">
<md-icon mdListIcon>{{link.icon}}</md-icon>
<span>{{link.title}}</span>
</a>
<a md-list-item adf-logout (click)="sidenav.close()">
<md-icon mdListIcon>exit_to_app</md-icon>
<span>Logout</span>
</a>
</md-nav-list>
</md-sidenav>
<md-toolbar color="primary" class="adf-app-layout-toolbar" md-no-ink>
<adf-userinfo
class="adf-app-layout-user-profile"
[menuPositionX]="'before'"
[menuPositionY]="'above'">
</adf-userinfo>
<span fxFlex="1 1 auto" fxShow fxHide.lt-sm="true">ADF Demo Application</span>
<div class="adf-app-layout-menu-spacer"></div>
<search-bar fxFlex="0 1 auto"></search-bar>
<a fxFlex="0 0 auto" class="adf-toolbar-link" fxShow fxHide.lt-md="true" md-button data-automation-id="home" href="" routerLink="/home" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }">Home</a>
<a fxFlex="0 0 auto" class="adf-toolbar-link" fxShow fxHide.lt-md="true" md-button data-automation-id="files" href="" routerLink="/files" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }">Content Services</a>
<a fxFlex="0 0 auto" class="adf-toolbar-link" fxShow fxHide.lt-md="true" md-button data-automation-id="activiti" href="" routerLink="/activiti" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }">Process Services</a>
<a fxFlex="0 0 auto" class="adf-toolbar-link" fxShow fxHide.lt-md="true" md-button data-automation-id="login" href="" routerLink="/login">Login</a>
<theme-picker></theme-picker>
<button md-icon-button [mdMenuTriggerFor]="langMenu">
<md-icon>language</md-icon>
</button>
<md-menu #langMenu="mdMenu">
<button md-menu-item (click)="changeLanguage('en')">English</button>
<button md-menu-item (click)="changeLanguage('it')">Italian</button>
<button md-menu-item (click)="changeLanguage('ru')">Russian</button>
</md-menu>
<button md-icon-button (click)="sidenav.open()">
<md-icon>menu</md-icon>
</button>
</md-toolbar>
<router-outlet></router-outlet>
</md-sidenav-container>
@@ -0,0 +1,52 @@
@mixin adf-app-layout-theme($theme) {
$primary: map-get($theme, primary);
$minimumAppWidth: 320px;
$toolbarHeight: 64px;
.adf-app-layout {
display: block;
min-width: $minimumAppWidth;
height: 100%;
.adf-nav-container {
display: block;
min-width: $minimumAppWidth;
height: 100%;
}
.adf-sidenav-link {
&.active {
color: mat-color($primary);
}
}
&-user-profile {
margin-right: 10px;
}
&-menu-spacer {
flex: 1 1 auto;
}
&-toolbar {
height: $toolbarHeight;
line-height: $toolbarHeight;
overflow: hidden;
md-toolbar-row {
height: $toolbarHeight;
align-items: stretch;
justify-content: space-between;
}
.adf-toolbar-link {
min-width: 0;
line-height: $toolbarHeight;
&.active {
background-color: rgba(0,0,0,.12);
}
}
}
}
}
@@ -0,0 +1,53 @@
/*!
* @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, ViewEncapsulation } from '@angular/core';
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
@Component({
templateUrl: 'app-layout.component.html',
styleUrls: ['app-layout.component.scss'],
host: {
'class': 'adf-app-layout'
},
encapsulation: ViewEncapsulation.None
})
export class AppLayoutComponent {
links: Array<any> = [
{ href: '/home', icon: 'home', title: 'Home' },
{ href: '/files', icon: 'folder_open', title: 'Content Services' },
{ href: '/activiti', icon: 'device_hub', title: 'Process Services' },
{ href: '/login', icon: 'vpn_key', title: 'Login' },
{ href: '/dl-custom-sources', icon: 'extension', title: 'DL: Custom Sources' },
{ href: '/datatable', icon: 'view_module', title: 'DataTable' },
{ href: '/form', icon: 'poll', title: 'Form' },
{ href: '/form-list', icon: 'library_books', title: 'Form List' },
{ href: '/uploader', icon: 'file_upload', title: 'Uploader' },
{ href: '/webscript', icon: 'extension', title: 'Webscript' },
{ href: '/tag', icon: 'local_offer', title: 'Tag' },
{ href: '/social', icon: 'thumb_up', title: 'Social' },
{ href: '/settings', icon: 'settings', title: 'Settings' },
{ href: '/about', icon: 'info_outline', title: 'About' }
];
constructor(private translateService: AlfrescoTranslationService) {}
changeLanguage(lang: string) {
this.translateService.use(lang);
}
}
@@ -0,0 +1,10 @@
adf-datatable ::ng-deep .custom-row-style.alfresco-datatable__row:focus {
outline-offset: -1px;
outline-width: 1px;
outline-color: green;
outline-style: solid;
}
adf-datatable ::ng-deep .custom-row-style.alfresco-datatable__row--selected {
color: green;
}
@@ -1,8 +1,10 @@
<div class="p-10">
<alfresco-datatable
[data]="data"
[selectionMode]="selectionMode"
[multiselect]="multiselect"
[actions]="true"
rowStyleClass="custom-row-style"
(showRowActionsMenu)="onShowRowActionsMenu($event)"
(executeRowAction)="onExecuteRowAction($event)"
(row-click)="onRowClick($event)"
@@ -19,12 +21,21 @@
-->
</alfresco-datatable>
</div>
<div class="p-10">
<div class="p-10" data-automation-id="multiselect">
<md-checkbox [(ngModel)]="multiselect">Multiselect</md-checkbox>
</div>
<div class="p-10">
<p>For 'Multiple' selection mode use Cmd (macOS) or Ctrl (Win) to toggle selection of multiple items.</p>
<md-select placeholder="Selection Mode" [(ngModel)]="selectionMode" name="food">
<md-option *ngFor="let mode of selectionModes" [value]="mode.value">
{{mode.viewValue}}
</md-option>
</md-select>
</div>
<div class="p-10">
<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>
<button md-raised-button (click)="getRowForNode()">Load Node</button>
</div>
@@ -15,25 +15,37 @@
* limitations under the License.
*/
import { Component } from '@angular/core';
import { ObjectDataTableAdapter, DataSorting, ObjectDataRow, ObjectDataColumn, DataCellEvent, DataRowActionEvent } from 'ng2-alfresco-datatable';
import { Component, Input } from '@angular/core';
import { AlfrescoApiService } from 'ng2-alfresco-core';
import { DataCellEvent, DataRowActionEvent, DataSorting, ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
import { Observable } from 'rxjs/Rx';
@Component({
selector: 'datatable-demo',
templateUrl: './datatable-demo.component.html'
templateUrl: './datatable-demo.component.html',
styleUrls: ['./datatable-demo.component.css']
})
export class DataTableDemoComponent {
multiselect: boolean = false;
data: ObjectDataTableAdapter;
@Input()
selectionMode = 'single';
selectionModes = [
{ value: 'none', viewValue: 'None' },
{ value: 'single', viewValue: 'Single' },
{ value: 'multiple', viewValue: 'Multiple' }
];
private _imageUrl: string = 'http://placehold.it/140x100';
private _createdBy: any = {
name: 'Denys Vuika',
email: 'denys.vuika@alfresco.com'
};
constructor() {
constructor(private apiService: AlfrescoApiService) {
this.reset();
}
@@ -70,11 +82,11 @@ export class DataTableDemoComponent {
}
],
[
{type: 'image', key: 'icon', title: '', srTitle: 'Thumbnail'},
{type: 'text', key: 'id', title: 'Id', sortable: true},
{type: 'text', key: 'createdOn', title: 'Created On', sortable: true},
{type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true},
{type: 'text', key: 'createdBy.name', title: 'Created By', sortable: true}
{ type: 'image', key: 'icon', title: '', srTitle: 'Thumbnail' },
{ type: 'text', key: 'id', title: 'Id', sortable: true },
{ type: 'text', key: 'createdOn', title: 'Created On', sortable: true },
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true },
{ type: 'text', key: 'createdBy.name', title: 'Created By', sortable: true }
]
);
@@ -162,4 +174,33 @@ export class DataTableDemoComponent {
onRowDblClick(event) {
console.log(event);
}
getRowForNode() {
let opts: any = {
includeSource: true,
include: ['path', 'properties', 'allowableOperations']
};
Observable.fromPromise(this.apiService.getInstance().nodes
.getNodeInfo('-my-', opts)).subscribe((data) => {
console.log('FUnNy');
console.log(data);
let objects = new ObjectDataTableAdapter([
{
id: data.id,
name: data.name,
createdBy: data.createdByUser.displayName,
createdOn: new Date(data.createdAt),
icon: 'material-icons://face'
}],
[
{ type: 'image', key: 'icon', title: '', srTitle: 'Thumbnail' },
{ type: 'text', key: 'id', title: 'Id', sortable: true },
{ type: 'text', key: 'createdOn', title: 'Created On', sortable: true },
{ type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true },
{ type: 'text', key: 'createdBy.name', title: 'Created By', sortable: true }
]);
this.data = objects;
});
}
}
@@ -0,0 +1,9 @@
<ng-container *ngIf="nodeId">
<adf-viewer [fileNodeId]="nodeId">
<extension-viewer [supportedExtensions]="['obj','3DS']" #extension>
<ng-template let-urlFileContent="urlFileContent" let-extension="extension" >
<threed-viewer [urlFile]="urlFileContent" [extension]="extension" ></threed-viewer>
</ng-template>
</extension-viewer>
</adf-viewer>
</ng-container>
@@ -0,0 +1,53 @@
/*!
* @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, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { AlfrescoApiService } from 'ng2-alfresco-core';
@Component({
selector: 'adf-file-view',
templateUrl: 'file-view.component.html'
})
export class FileViewComponent implements OnInit {
nodeId: string = null;
constructor(
private router: Router,
private route: ActivatedRoute,
private apiService: AlfrescoApiService) {}
ngOnInit() {
this.route.params.subscribe(params => {
const id = params.nodeId;
if (id) {
this.apiService.getInstance().nodes.getNodeInfo(id).then(
(node) => {
if (node && node.isFile) {
this.nodeId = id;
return;
}
this.router.navigate(['/files', id]);
},
() => this.router.navigate(['/files', id])
);
}
});
}
}
@@ -0,0 +1,13 @@
<adf-toolbar>
<adf-toolbar-title>
<md-select [(ngModel)]="selectedSource">
<md-option *ngFor="let source of sources" [value]="source.value">
{{ source.title }}
</md-option>
</md-select>
</adf-toolbar-title>
</adf-toolbar>
<adf-document-list
[currentFolderId]="selectedSource"
locationFormat="/files">
</adf-document-list>
@@ -0,0 +1,39 @@
/*!
* @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, Input } from '@angular/core';
@Component({
selector: 'adf-custom-sources-demo',
templateUrl: 'custom-sources.component.html'
})
export class CustomSourcesComponent {
@Input()
selectedSource = '-recent-';
sources = [
{ title: 'Favorites', value: '-favorites-' },
{ title: 'Recent', value: '-recent-' },
{ title: 'Shared Links', value: '-sharedlinks-' },
{ title: 'Sites', value: '-sites-' },
{ title: 'Trashcan', value: '-trashcan-' },
{ title: 'Root', value: '-root-' },
{ title: 'My', value: '-my-' },
{ title: 'Shared', value: '-shared-' }
];
}
@@ -1,22 +0,0 @@
.container {
margin: 10px;
}
@media only screen and (max-width: 640px) {
.container {
margin: 0;
}
}
.error-message {
text-align: left;
}
.error-message--text {
color: #d50000;
}
.options-container {
width: 250px;
margin: 20px;
}
@@ -1,183 +1,310 @@
<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 class="adf-demo-site-container-style" id="demo-container">
<adf-sites-dropdown (change)="getSiteContent($event)">
</adf-sites-dropdown>
</div>
<adf-upload-drag-area
[parentId]="getDocumentListCurrentFolderId()"
[versioning]="versioning"
[adf-node-permission]="'create'"
[adf-nodes]="getCurrentDocumentListNode()">
<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 (click)="resetError()" md-icon-button>
<md-icon>highlight_off</md-icon>
</button>
<span class="error-message--text">{{errorMessage}}</span>
</div>
<alfresco-document-list
<adf-toolbar [color]="toolbarColor" class="adf-files-toolbar">
<adf-toolbar-title fxFlex="0 1 auto">
<adf-breadcrumb fxShow fxHide.lt-sm="true"
class="files-breadcrumb"
root="Personal Files"
[target]="documentList"
[folderNode]="documentList.folderNode">
</adf-breadcrumb>
<adf-dropdown-breadcrumb fxHide fxShow.lt-sm="true"
class="files-breadcrumb"
[target]="documentList"
[folderNode]="documentList.folderNode">
</adf-dropdown-breadcrumb>
</adf-toolbar-title>
<adf-toolbar-divider fxFlex="0 0 auto"></adf-toolbar-divider>
<div fxFlex="0 0 auto" class="adf-document-action-buttons" fxShow fxHide.lt-sm="true">
<button md-icon-button
(click)="onCreateFolderClicked($event)">
<md-icon>create_new_folder</md-icon>
</button>
<button md-icon-button
[disabled]="!hasSelection(documentList.selection)"
title="Download"
(click)="downloadNodes(documentList.selection)">
<md-icon>get_app</md-icon>
</button>
<button md-icon-button
adf-node-permission="delete"
[adf-nodes]="documentList.selection">
<md-icon>delete</md-icon>
</button>
</div>
<button fxFlex="0 0 auto" md-icon-button [mdMenuTriggerFor]="themePicker">
<md-icon>format_color_fill</md-icon>
</button>
<md-menu #themePicker="mdMenu">
<button md-menu-item (click)="toolbarColor = 'default'">Default</button>
<button md-menu-item (click)="toolbarColor = 'primary'">Primary</button>
<button md-menu-item (click)="toolbarColor = 'accent'">Accent</button>
<button md-menu-item (click)="toolbarColor = 'warn'">Warn</button>
</md-menu>
<adf-toolbar-divider fxFlex="0 0 auto" fxHide fxShow.lt-sm="true"></adf-toolbar-divider>
<button fxFlex="0 0 auto" md-icon-button [mdMenuTriggerFor]="menu" fxHide fxShow.lt-sm="true">
<md-icon>more_vert</md-icon>
</button>
<md-menu #menu="mdMenu">
<button md-menu-item
(click)="onCreateFolderClicked($event)">
<md-icon>create_new_folder</md-icon>
<span>New folder</span>
</button>
<button md-menu-item
[disabled]="!hasSelection(documentList.selection)"
title="Download"
(click)="downloadNodes(documentList.selection)">
<md-icon>get_app</md-icon>
<span>Download</span>
</button>
<button md-menu-item
adf-node-permission="delete"
[adf-nodes]="documentList.selection">
<md-icon>delete</md-icon>
<span>Delete</span>
</button>
</md-menu>
</adf-toolbar>
<adf-document-list
#documentList
[permissionsStyle]="permissionsStyle"
[currentFolderId]="currentFolderId"
[contextMenuActions]="true"
[contentActions]="true"
[allowDropFiles]="true"
[selectionMode]="selectionMode"
[multiselect]="multiselect"
(error)="onNavigationError($event)"
(success)="resetError()"
(preview)="showFile($event)">
(preview)="showFile($event)"
(folderChange)="onFolderChange($event)"
(permissionError)="handlePermissionError($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 -->
<!--
<template let-entry="$implicit">
<span>Hi! {{entry.data.getValue(entry.row, entry.col)}}</span>
</template>
-->
key="$thumbnail"
type="image"
[sortable]="false"
class="image-table-cell">
</data-column>
<data-column
key="name"
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
[formatTooltip]="getNodeNameTooltip"
class="full-width ellipsis-cell">
</data-column>
<!-- Location column demo -->
<!--
<data-column
key="path"
type="location"
format="/files"
title="Location">
</data-column>
-->
<data-column
key="content.sizeInBytes"
title="Size"
type="fileSize">
</data-column>
<!-- Notes: has performance overhead due to multiple files/folders causing separate HTTP calls to get tags -->
<!--
<data-column
title="{{'DOCUMENT_LIST.COLUMNS.TAG' | translate}}"
key="id"
class="full-width ellipsis-cell">
<template let-entry="$implicit">
<ng-template let-entry="$implicit">
<alfresco-tag-node-list [nodeId]="entry.data.getValue(entry.row, entry.col)"></alfresco-tag-node-list>
</template>
</ng-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_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">
title="{{'DOCUMENT_LIST.COLUMNS.CREATED' | translate}}"
key="createdAt"
type="date"
format="timeAgo"
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">
icon="content_copy"
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.COPY' | translate}}"
permission="update"
[disableWithNoPermission]="true"
(error)="onContentActionError($event)"
(success)="onContentActionSuccess($event)"
handler="copy">
</content-action>
<content-action
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.CUSTOM' | translate}}"
(execute)="myFolderAction1($event)">
icon="redo"
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.MOVE' | translate}}"
permission="update"
[disableWithNoPermission]="true"
(error)="onContentActionError($event)"
(success)="onContentActionSuccess($event)"
handler="move">
</content-action>
<content-action
target="folder"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}"
handler="delete">
icon="delete"
target="folder"
permission="delete"
[disableWithNoPermission]="true"
title="{{'DOCUMENT_LIST.ACTIONS.FOLDER.DELETE' | translate}}"
(permissionEvent)="handlePermissionError($event)"
handler="delete">
</content-action>
<!-- document actions -->
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DOWNLOAD' | translate}}"
handler="download">
icon="content_copy"
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.COPY' | translate}}"
permission="update"
[disableWithNoPermission]="true"
(error)="onContentActionError($event)"
(success)="onContentActionSuccess($event)"
handler="copy">
</content-action>
<content-action
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.SYSTEM_2' | translate}}"
handler="system2">
icon="redo"
target="document"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.MOVE' | translate}}"
permission="update"
[disableWithNoPermission]="true"
(error)="onContentActionError($event)"
(success)="onContentActionSuccess($event)"
handler="move">
</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)">
icon="delete"
target="document"
permission="delete"
[disableWithNoPermission]="true"
(permissionEvent)="handlePermissionError($event)"
title="{{'DOCUMENT_LIST.ACTIONS.DOCUMENT.DELETE' | translate}}"
(success)="onDeleteActionSuccess($event)"
handler="delete">
</content-action>
</content-actions>
</alfresco-document-list>
</alfresco-upload-drag-area>
</adf-document-list>
</adf-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>
<div class="adf-content-service-settings">
<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>
<p>Current folder ID: {{ documentList.currentFolderId }}</p>
<div class="p-10">
Selected Nodes:
<ul>
<li *ngFor="let node of documentList.selection">
{{ node.entry.name }}
</li>
</ul>
</div>
<div class="container">
<section>
<md-slide-toggle [color]="'primary'" [(ngModel)]="multiselect">Multiselect (with checkboxes)</md-slide-toggle>
</section>
<section>
<md-slide-toggle [color]="'primary'" [(ngModel)]="multipleFileUpload">Multiple File Upload</md-slide-toggle>
</section>
<section>
<md-slide-toggle [color]="'primary'" [(ngModel)]="folderUpload">Folder upload</md-slide-toggle>
</section>
<section>
<md-slide-toggle [color]="'primary'" [(ngModel)]="acceptedFilesTypeShow">Custom extensions filter</md-slide-toggle>
</section>
<section>
<md-slide-toggle [color]="'primary'" [(ngModel)]="versioning">Enable versioning</md-slide-toggle>
</section>
<h5>Upload</h5>
<section *ngIf="acceptedFilesTypeShow">
<md-input-container>
<input mdInput placeholder="Extension accepted" [(ngModel)]="acceptedFilesType" data-automation-id="accepted-files-type">
</md-input-container>
</section>
<div *ngIf="!acceptedFilesTypeShow">
<adf-upload-button
#uploadButton
tooltip="Custom tooltip"
[disabled]="!enableUpload"
data-automation-id="multiple-file-upload"
[rootFolderId]="documentList.currentFolderId"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[versioning]="versioning"
[adf-node-permission]="'create'"
[adf-nodes]="getCurrentDocumentListNode()"
(permissionEvent)="handlePermissionError($event)">
</adf-upload-button>
</div>
<div *ngIf="acceptedFilesTypeShow">
<adf-upload-button
#uploadButton
tooltip="Custom tooltip"
[disabled]="!enableUpload"
data-automation-id="multiple-file-upload"
[rootFolderId]="documentList.currentFolderId"
[acceptedFilesType]="acceptedFilesType"
[multipleFiles]="multipleFileUpload"
[uploadFolders]="folderUpload"
[versioning]="versioning"
[adf-node-permission]="'create'"
[adf-nodes]="getCurrentDocumentListNode()"
(permissionEvent)="handlePermissionError($event)">
</adf-upload-button>
</div>
<section>
<md-checkbox [(ngModel)]="enableUpload">Enable upload (demoing enabled/disabled state only if the permission are not checked dynamically)</md-checkbox>
</section>
</div>
<div class="p-10">
<p>For 'Multiple' selection mode use Cmd (macOS) or Ctrl (Win) to toggle selection of multiple items.</p>
<md-select placeholder="Selection Mode" [(ngModel)]="selectionMode" name="food">
<md-option *ngFor="let mode of selectionModes" [value]="mode.value">
{{mode.viewValue}}
</md-option>
</md-select>
</div>
</div>
<file-uploading-dialog #fileDialog></file-uploading-dialog>
<div *ngIf="fileShowed">
<alfresco-viewer [(showViewer)]="fileShowed"
[fileNodeId]="fileNodeId"
[overlayMode]="true">
<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>
@@ -0,0 +1,93 @@
$minimumDocumentListWidth: 425px;
.container {
margin: 10px;
}
@media only screen and (max-width: 640px) {
.container {
margin: 0;
}
}
.error-message {
text-align: left;
}
.error-message--text {
color: #d50000;
}
.adf-not-overlay-viewer {
height:900px;
}
adf-document-list ::ng-deep adf-datatable tr.is-selected .image-table-cell {
position: relative;
}
adf-document-list ::ng-deep adf-datatable tr.document-list__create {
background: green !important;
}
adf-document-list ::ng-deep adf-datatable tr.document-list__disable {
background: red !important;
}
adf-document-list ::ng-deep adf-datatable tr.is-selected .image-table-cell::before {
content: "\E876"; /* "done" */
font-family: "Material Icons";
font-size: 24px;
line-height: 32px;
text-align: center;
color: white;
position: absolute;
width: 32px;
height: 32px;
top: 50%;
left: 50%;
margin-top: -16px;
margin-left: -12px;
border-radius: 100%;
background: #00bcd4;
}
.adf-demo-site-container-style {
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
min-width: 200px;
}
.adf-content-service-settings {
padding: 16px;
}
.adf-files-toolbar {
& /deep/ md-toolbar-row {
white-space: initial;
& /deep/ a.adf-breadcrumb-item-anchor {
white-space: initial;
}
}
}
@media (max-width: $minimumDocumentListWidth) {
adf-document-list /deep/ adf-datatable {
& /deep/ .adf-data-table-cell--fileSize {
display: none;
}
}
.adf-demo-site-container-style {
width: 100%;
display: block;
& /deep/ .adf-site-dropdown-list-element {
width: 100%;
}
}
}
@@ -15,67 +15,91 @@
* limitations under the License.
*/
import { Component, OnInit, Optional, ViewChild, ChangeDetectorRef } from '@angular/core';
import { ChangeDetectorRef, Component, Input, OnInit, Optional, ViewChild } from '@angular/core';
import { MdDialog } from '@angular/material';
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';
import { MinimalNodeEntity } from 'alfresco-js-api';
import {
AlfrescoApiService, AlfrescoContentService, AlfrescoTranslationService, CreateFolderDialogComponent,
DownloadZipDialogComponent, FileUploadEvent, FolderCreatedEvent, NotificationService,
SiteModel, UploadService
} from 'ng2-alfresco-core';
import { DataColumn, DataRow } from 'ng2-alfresco-datatable';
import { DocumentListComponent, PermissionStyleModel } from 'ng2-alfresco-documentlist';
const DEFAULT_FOLDER_TO_SHOW = '-my-';
@Component({
selector: 'files-component',
selector: 'adf-files-component',
templateUrl: './files.component.html',
styleUrls: ['./files.component.css']
styleUrls: ['./files.component.scss']
})
export class FilesComponent implements OnInit {
// The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root-
currentFolderId: string = '-my-';
currentFolderId: string = DEFAULT_FOLDER_TO_SHOW;
errorMessage: string = null;
fileNodeId: any;
fileShowed: boolean = false;
showViewer: boolean = false;
toolbarColor = 'default';
selectionModes = [
{ value: 'none', viewValue: 'None' },
{ value: 'single', viewValue: 'Single' },
{ value: 'multiple', viewValue: 'Multiple' }
];
@Input()
selectionMode = 'multiple';
@Input()
multiselect = false;
@Input()
multipleFileUpload: boolean = false;
@Input()
folderUpload: boolean = false;
@Input()
acceptedFilesTypeShow: boolean = false;
@Input()
versioning: boolean = false;
@Input()
acceptedFilesType: string = '.jpg,.pdf,.js';
@Input()
enableUpload: boolean = true;
@ViewChild(DocumentListComponent)
documentList: DocumentListComponent;
constructor(private documentActions: DocumentActionsService,
private authService: AlfrescoAuthenticationService,
private formService: FormService,
private logService: LogService,
private changeDetector: ChangeDetectorRef,
permissionsStyle: PermissionStyleModel[] = [];
constructor(private changeDetector: ChangeDetectorRef,
private apiService: AlfrescoApiService,
private notificationService: NotificationService,
private uploadService: UploadService,
private contentService: AlfrescoContentService,
private dialog: MdDialog,
private translateService: AlfrescoTranslationService,
private router: Router,
@Optional() private route: ActivatedRoute) {
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
}
myDocumentActionHandler(obj: any) {
window.alert('my custom action handler');
}
myCustomAction1(event) {
alert('Custom document action for ' + event.value.entry.name);
}
myFolderAction1(event) {
alert('Custom folder action for ' + event.value.entry.name);
}
showFile(event) {
if (event.value.entry.isFile) {
this.fileNodeId = event.value.entry.id;
this.fileShowed = true;
} else {
this.fileShowed = false;
const entry = event.value.entry;
if (entry && entry.isFile) {
this.router.navigate(['/files', entry.id, 'view']);
}
}
toggleMultipleFileUpload() {
this.multipleFileUpload = !this.multipleFileUpload;
return this.multipleFileUpload;
onFolderChange($event) {
this.currentFolderId = $event.value.id;
this.router.navigate(['/files', $event.value.id]);
}
toggleFolder() {
@@ -84,16 +108,6 @@ export class FilesComponent implements OnInit {
return this.folderUpload;
}
toggleAcceptedFilesType() {
this.acceptedFilesTypeShow = !this.acceptedFilesTypeShow;
return this.acceptedFilesTypeShow;
}
toggleVersioning() {
this.versioning = !this.versioning;
return this.versioning;
}
ngOnInit() {
if (this.route) {
this.route.params.forEach((params: Params) => {
@@ -103,18 +117,21 @@ export class FilesComponent implements OnInit {
}
});
}
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');
}
this.uploadService.fileUploadComplete.asObservable().debounceTime(300).subscribe(value => this.onFileUploadEvent(value));
this.uploadService.fileUploadDeleted.subscribe((value) => this.onFileUploadEvent(value));
this.contentService.folderCreated.subscribe(value => this.onFolderCreated(value));
// this.permissionsStyle.push(new PermissionStyleModel('document-list__create', PermissionsEnum.CREATE));
// this.permissionsStyle.push(new PermissionStyleModel('document-list__disable', PermissionsEnum.NOT_CREATE, false, true));
}
viewActivitiForm(event?: any) {
this.router.navigate(['/activiti/tasksnode', event.value.entry.id]);
getCurrentDocumentListNode(): MinimalNodeEntity[] {
if (this.documentList.folderNode) {
return [ { entry: this.documentList.folderNode } ];
} else {
return [];
}
}
onNavigationError(err: any) {
@@ -127,23 +144,149 @@ export class FilesComponent implements OnInit {
this.errorMessage = null;
}
private setupBpmActions(actions: any[]) {
actions.map(def => {
let documentAction = new DocumentActionModel();
documentAction.title = 'Activiti: ' + (def.name || 'Unknown process');
documentAction.handler = this.getBpmActionHandler(def);
this.documentList.actions.push(documentAction);
onFileUploadEvent(event: FileUploadEvent) {
if (event && event.file.options.parentId === this.documentList.currentFolderId) {
this.documentList.reload();
}
}
let folderAction = new FolderActionModel();
folderAction.title = 'Activiti: ' + (def.name || 'Unknown process');
folderAction.handler = this.getBpmActionHandler(def);
this.documentList.actions.push(folderAction);
onFolderCreated(event: FolderCreatedEvent) {
console.log('FOLDER CREATED');
console.log(event);
if (event && event.parentId === this.documentList.currentFolderId) {
this.documentList.reload();
}
}
handlePermissionError(event: any) {
this.notificationService.openSnackMessage(
`You don't have the ${event.permission} permission to ${event.action} the ${event.type} `,
4000
);
}
onContentActionError(errors) {
const errorStatusCode = JSON.parse(errors.message).error.statusCode;
let translatedErrorMessage: any;
switch (errorStatusCode) {
case 403:
translatedErrorMessage = this.translateService.get('OPERATION.ERROR.PERMISSION');
break;
case 409:
translatedErrorMessage = this.translateService.get('OPERATION.ERROR.CONFLICT');
break;
default:
translatedErrorMessage = this.translateService.get('OPERATION.ERROR.UNKNOWN');
}
this.notificationService.openSnackMessage(translatedErrorMessage.value, 4000);
}
onContentActionSuccess(message) {
let translatedMessage: any = this.translateService.get(message);
this.notificationService.openSnackMessage(translatedMessage.value, 4000);
}
onDeleteActionSuccess(message) {
this.uploadService.fileDeleted.next(message);
}
onCreateFolderClicked(event: Event) {
let dialogRef = this.dialog.open(CreateFolderDialogComponent);
dialogRef.afterClosed().subscribe(folderName => {
if (folderName) {
this.contentService.createFolder('', folderName, this.documentList.currentFolderId).subscribe(
node => console.log(node),
err => console.log(err)
);
}
});
}
private getBpmActionHandler(processDefinition: any): ContentActionHandler {
return function (obj: any, target?: any) {
window.alert(`Starting BPM process: ${processDefinition.id}`);
}.bind(this);
getSiteContent(site: SiteModel) {
this.currentFolderId = site && site.guid ? site.guid : DEFAULT_FOLDER_TO_SHOW;
}
getDocumentListCurrentFolderId() {
return this.documentList.currentFolderId || DEFAULT_FOLDER_TO_SHOW;
}
hasSelection(selection: Array<MinimalNodeEntity>): boolean {
return selection && selection.length > 0;
}
downloadNodes(selection: Array<MinimalNodeEntity>) {
if (!selection || selection.length === 0) {
return;
}
if (selection.length === 1) {
this.downloadNode(selection[0]);
} else {
this.downloadZip(selection);
}
}
downloadNode(node: MinimalNodeEntity) {
if (node && node.entry) {
const entry = node.entry;
if (entry.isFile) {
this.downloadFile(node);
}
if (entry.isFolder) {
this.downloadZip([node]);
}
}
}
downloadFile(node: MinimalNodeEntity) {
if (node && node.entry) {
const contentApi = this.apiService.getInstance().content;
const url = contentApi.getContentUrl(node.entry.id, true);
const fileName = node.entry.name;
this.download(url, fileName);
}
}
downloadZip(selection: Array<MinimalNodeEntity>) {
if (selection && selection.length > 0) {
const nodeIds = selection.map(node => node.entry.id);
const dialogRef = this.dialog.open(DownloadZipDialogComponent, {
width: '600px',
data: {
nodeIds: nodeIds
}
});
dialogRef.afterClosed().subscribe(result => {
console.log(result);
});
}
}
download(url: string, fileName: string) {
if (url && fileName) {
const link = document.createElement('a');
link.style.display = 'none';
link.download = fileName;
link.href = url;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
}
getNodeNameTooltip(row: DataRow, col: DataColumn): string {
if (row) {
return row.getValue('name');
}
return null;
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,3 @@
.form-container {
padding: 10px;
}
@@ -0,0 +1,4 @@
<div class="form-container">
<adf-form [form]="form">
</adf-form>
</div>
@@ -0,0 +1,48 @@
/*!
* @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, Inject, OnInit } from '@angular/core';
import { FormModel, FormService } from 'ng2-activiti-form';
import { InMemoryFormService } from '../../services/in-memory-form.service';
import { DemoForm } from './demo-form';
@Component({
selector: 'form-demo',
templateUrl: 'form-demo.component.html',
styleUrls: [ 'form-demo.component.css' ],
providers: [
{ provide: FormService, useClass: InMemoryFormService }
]
})
export class FormDemoComponent implements OnInit {
form: FormModel;
constructor(@Inject(FormService) private formService: InMemoryFormService) {
// Prevent default outcome actions
formService.executeOutcome.subscribe(e => {
e.preventDefault();
console.log(e.outcome);
});
}
ngOnInit() {
let formDefinitionJSON: any = DemoForm.getDefinition();
this.form = this.formService.parseForm(formDefinitionJSON);
}
}
@@ -0,0 +1,103 @@
/*!
* @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, ViewChild } from '@angular/core';
import { FormModel, FormService } from 'ng2-activiti-form';
import { ActivitiForm } from 'ng2-activiti-form';
@Component({
selector: 'form-list-demo',
template: `
<adf-form-list [forms]="formList" (row-dblclick)="onRowDblClick($event)">
</adf-form-list>
<div class="form-container" *ngIf="!isEmptyForm()">
<adf-form [form]="form" [data]="restoredData">
</adf-form>
</div>
<button md-button (click)="store()" color="primary">{{'FORM-LIST.STORE' | translate }}</button>
<button md-button (click)="restore()" color="primary">{{'FORM-LIST.RESTORE' | translate }}</button>
`,
styles: [`
.form-container {
padding: 10px;
}
.store-form-container{
width: 80%;
height: 80%;
}
`]
})
export class FormListDemoComponent {
@ViewChild(ActivitiForm)
activitiForm: ActivitiForm;
formList: any [] = [];
form: FormModel;
formId: string;
storedData: any = {};
restoredData: any = {};
constructor(private formService: FormService) {
// Prevent default outcome actions
formService.executeOutcome.subscribe(e => {
e.preventDefault();
console.log(e.outcome);
});
}
onRowDblClick(event: CustomEvent) {
let rowForm = event.detail.value.obj;
this.formService.getFormDefinitionById(rowForm.id).subscribe((formModel) => {
let form = this.formService.parseForm(formModel.formDefinition);
this.form = form;
});
console.log(rowForm);
}
isEmptyForm() {
return this.form === null || this.form === undefined;
}
store() {
this.clone(this.activitiForm.form.values, this.storedData);
console.log('DATA SAVED');
console.log(this.storedData);
console.log('DATA SAVED');
this.restoredData = null;
}
clone(objToCopyFrom, objToCopyTo) {
for (let attribute in objToCopyFrom) {
if (objToCopyFrom.hasOwnProperty(attribute)) {
objToCopyTo[attribute] = objToCopyFrom[attribute];
}
}
return objToCopyTo;
}
restore() {
this.restoredData = this.storedData;
this.storedData = {};
}
}
@@ -1,53 +0,0 @@
.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;
}
@@ -1,187 +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>
<md-card class="adf-home-card">
<md-card-title class="adf-home-card-title adf-primary-background-color" routerLink="/files">
<h2 >
<md-icon>dvr</md-icon>
<span class="adf-home-card__text">DocumentList - Content Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
</md-card-title>
<md-card-content>
Demonstrates multiple Alfresco Content Services components used together to display the files of your Content Services instance:
<ul class="home--feature-list">
<ul class="adf-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>
<md-icon>brightness_1</md-icon>
<span class="adf-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>
<md-icon>dvr</md-icon>
<span class="adf-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>
<md-icon>file_upload</md-icon>
<span class="adf-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>
<md-icon>view_module</md-icon>
<span class="adf-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>
</md-card-content>
</md-card>
<!-- 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>
<md-card class="adf-home-card">
<md-card-title class="adf-home-card-title adf-primary-background-color" routerLink="/activiti">
<h2 >
<md-icon>apps</md-icon>
<span class="adf-home-card__text">Process Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
</md-card-title>
<md-card-content>
Demonstrates multiple Alfresco Process Services components used together to show your Process Services process and tasks:
<ul class="home--feature-list">
<ul class="adf-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>
<md-icon>brightness_1</md-icon>
<span class="adf-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>
<md-icon>view_module</md-icon>
<span class="adf-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>
<md-icon>view_headline</md-icon>
<span class="adf-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>
<md-icon>view_headline</md-icon>
<span class="adf-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>
<md-icon>view_quilt</md-icon>
<span class="adf-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>
<md-icon>pie_chart</md-icon>
<span class="adf-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>
<md-icon>view_module</md-icon>
<span class="adf-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>
</md-card-content>
</md-card>
<!-- 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>
<md-card class="adf-home-card">
<md-card-title class="adf-home-card-title adf-primary-background-color" routerLink="/datatable">
<h2 >
<md-icon>view_module</md-icon>
<span class="adf-home-card__text">DataTable - Content Services & Process Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
</md-card-title>
<md-card-content>
Basic table component:
<ul class="home--feature-list">
<ul class="adf-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>
<md-icon>brightness_1</md-icon>
<span class="adf-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>
</md-card-content>
</md-card>
<!-- 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>
<md-card class="adf-home-card">
<md-card-title class="adf-home-card-title adf-primary-background-color" routerLink="/uploader">
<h2 >
<md-icon>file_upload</md-icon>
<span class="adf-home-card__text">Uploader - Content Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
</md-card-title>
<md-card-content>
Basic table uploader component for the Content Services & Process Services:
<ul class="home--feature-list">
<ul class="adf-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>
<md-icon>brightness_1</md-icon>
<span class="adf-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>
</md-card-content>
</md-card>
<!-- 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>
<md-card class="adf-home-card">
<md-card-title class="adf-home-card-title adf-primary-background-color" routerLink="/login">
<h2 >
<md-icon>account_circle</md-icon>
<span class="adf-home-card__text">Login - Content Services & Process Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
</md-card-title>
<md-card-content>
Login component for the Content Services and Process Services:
<ul class="home--feature-list">
<ul class="adf-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>
<md-icon>brightness_1</md-icon>
<span class="adf-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>
</md-card-content>
</md-card>
<!-- 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>
<md-card class="adf-home-card">
<md-card-title class="adf-home-card-title adf-primary-background-color" routerLink="/webscript">
<h2 >
<md-icon>extension</md-icon>
<span class="adf-home-card__text">Webscript - Content Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
</md-card-title>
<md-card-content>
Displays and creates webscripts in your Content Services instance:
<ul class="home--feature-list">
<ul class="adf-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>
<md-icon>brightness_1</md-icon>
<span class="adf-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>
</md-card-content>
</md-card>
<!-- 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>
<md-card class="adf-home-card">
<md-card-title class="adf-home-card-title adf-primary-background-color" routerLink="/tag">
<h2 >
<md-icon>local_offer</md-icon>
<span class="adf-home-card__text">Tag - Content Services</span>
</h2>
</div>
<div class="mdl-card__supporting-text">
</md-card-title>
<md-card-content>
Displays and adds tags to the node of your Content Services instance:
<ul class="home--feature-list">
<ul class="adf-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>
<md-icon>brightness_1</md-icon>
<span class="adf-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>
</md-card-content>
</md-card>
@@ -0,0 +1,42 @@
.adf-home-card {
float: left;
margin: 10px 10px 10px 10px;
width: 290px;
display: block;
overflow-y: auto;
height: 400px;
h2 {
line-height: 30px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.material-icons {
position: relative;
top: 6px;
}
}
.adf-home-card-title {
padding: 24px;
cursor: pointer;
height: 55px;
margin: -63px -24px 18px -25px !important;
}
.adf-home-card__text {
font-size: 16px;
line-height: 18px;
}
.adf-home-feature-list {
list-style: none;
padding-left: 0;
}
span.home--feature-list__text:before {
content: '';
padding-left: 4px;
}
@@ -20,6 +20,6 @@ import { Component } from '@angular/core';
@Component({
selector: 'home-view',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
styleUrls: ['./home.component.scss']
})
export class HomeComponent {}
+9 -4
View File
@@ -21,11 +21,16 @@ export { SearchComponent } from './search/search.component';
export { SearchBarComponent } from './search/search-bar.component';
export { LoginDemoComponent } from './login/login-demo.component';
export { ActivitiDemoComponent } from './activiti/activiti-demo.component';
export { FormViewer } from './activiti/form-viewer.component';
export { ActivitiTaskAttachmentsComponent } from './activiti/activiti-task-attachments.component';
export { ActivitiProcessAttachmentsComponent } from './activiti/activiti-process-attachments.component';
export { ActivitiShowDiagramComponent } from './activiti/activiti-show-diagram.component';
export { FormViewerComponent } from './activiti/form-viewer.component';
export { WebscriptComponent } from './webscript/webscript.component';
export { TagComponent } from './tag/tag.component';
export { SocialComponent } from './social/social.component';
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';
export { FormNodeViewerComponent } from './activiti/form-node-viewer.component';
export { ActivitiAppsViewComponent } from './activiti/apps.view';
export { SettingsComponent } from './settings/settings.component';
export { FormDemoComponent } from './form/form-demo.component';
@@ -3,6 +3,8 @@
right: 10px;
top: 10px;
z-index: 1;
background-color: rgb(68,138,255);
color: rgb(255,255,255);
}
.settings {
@@ -15,14 +17,9 @@
z-index: 1;
}
.banned {
width: 130px;
margin: 10px;
}
.toggle {
width: 120px;
margin: 20px;
width: 190px;
margin: 5px;
padding: 5px;
}
@@ -38,3 +35,6 @@
}
}
.settings ::ng-deep .mat-slide-toggle-thumb-container {
cursor: pointer;
}
@@ -2,72 +2,95 @@
<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()">
<span class="mdl-switch__label">Content Services</span>
</label>
<md-slide-toggle
id="switch1"
[color]="'primary'"
(change)="toggleECM()"
[checked]="isECM">
Content Services
</md-slide-toggle>
</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()">
<span class="mdl-switch__label">Process Services</span>
</label>
<md-slide-toggle
id="switch2"
[color]="'primary'"
(change)="toggleBPM()"
[checked]="isBPM">
Process Services
</md-slide-toggle>
</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]="!disableCsrf" (click)="toggleCSRF()">
<span class="mdl-switch__label">CSRF</span>
</label>
<md-slide-toggle
id="switch3"
[color]="'primary'"
(change)="toggleCSRF()"
[checked]="!disableCsrf">
CSRF
</md-slide-toggle>
</p>
<p class="banned">
<label for="blacklistusername">Banned username</label><br>
<input id="blacklistusername" type="text" placeholder="banned username" [(ngModel)]="blackListUsername"/>
<p class="toggle">
<md-slide-toggle
id="switch4"
[color]="'primary'"
(change)="toggleFooter()"
[checked]="showFooter">
Login footer
</md-slide-toggle>
</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 md-fab class="setting-button" data-automation-id="settings" href="" routerLink="/settings" >
<md-icon>settings</md-icon>
</a>
<!--LOGIN-->
<alfresco-login #alfrescologin
[providers]="providers"
[fieldsValidation]="customValidation"
[disableCsrf]="disableCsrf"
(executeSubmit)="validateForm($event)"
(onSuccess)="onLogin($event)"
(onError)="onError($event)">
<alfresco-login
#alfrescologin
[providers]="providers"
[fieldsValidation]="customValidation"
[disableCsrf]="disableCsrf"
[showLoginActions]="showFooter"
[showRememberMe]="showFooter"
copyrightText="© 2016 Alfresco Software, Inc. All Rights Reserved. (customised text)"
(onSuccess)="onLogin($event)"
(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>
<md-slide-toggle
id="switch1-mobile"
[color]="'primary'"
(change)="toggleECM()"
[checked]="isECM">
Content Services
</md-slide-toggle>
</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>
<md-slide-toggle
id="switch2-mobile"
[color]="'primary'"
(change)="toggleBPM()"
[checked]="isBPM">
Process Services
</md-slide-toggle>
</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>
<md-slide-toggle
id="switch3-mobile"
[color]="'primary'"
(change)="toggleCSRF()"
[checked]="!disableCsrf">
CSRF
</md-slide-toggle>
</p>
<p>
<md-slide-toggle
id="switch4-mobile"
[color]="'primary'"
(change)="toggleFooter()"
[checked]="showFooter">
Login footer
</md-slide-toggle>
</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>
@@ -15,10 +15,10 @@
* limitations under the License.
*/
import { Component, ViewChild, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Component, OnInit, ViewChild } from '@angular/core';
import { Validators } from '@angular/forms';
import { StorageService, LogService } from 'ng2-alfresco-core';
import { Router } from '@angular/router';
import { LogService, StorageService } from 'ng2-alfresco-core';
@Component({
selector: 'login-demo',
@@ -31,12 +31,12 @@ export class LoginDemoComponent implements OnInit {
alfrescologin: any;
providers: string = 'ECM';
blackListUsername: string;
customValidation: any;
disableCsrf: boolean = false;
isECM: boolean = true;
isBPM: boolean = false;
showFooter: boolean = true;
customMinLenght: number = 2;
constructor(private router: Router,
@@ -95,6 +95,10 @@ export class LoginDemoComponent implements OnInit {
this.disableCsrf = !this.disableCsrf;
}
toggleFooter() {
this.showFooter = !this.showFooter;
}
updateProvider() {
if (this.isBPM && this.isECM) {
this.providers = 'ALL';
@@ -113,14 +117,5 @@ export class LoginDemoComponent implements OnInit {
this.providers = '';
return this.providers;
};
validateForm(event: any) {
let values = event.values;
if (values.controls['username'].value === this.blackListUsername) {
this.alfrescologin.addCustomFormError('username', 'This particular username has been blocked');
event.preventDefault();
}
}
}
@@ -1,14 +1,14 @@
<alfresco-search-control *ngIf="isLoggedIn()"
<adf-search-control *ngIf="isLoggedIn()"
[searchTerm]="searchTerm"
[autocomplete]="false"
[highlight]="true"
(searchSubmit)="onSearchSubmit($event);"
(searchChange)="onSearchTermChange($event);"
(expand)="onExpandToggle($event);"
(fileSelect)="onItemClicked($event)">
</alfresco-search-control>
</adf-search-control>
<alfresco-viewer *ngIf="fileShowed" [(showViewer)]="fileShowed"
<adf-viewer *ngIf="fileShowed" [(showViewer)]="fileShowed"
[fileNodeId]="fileNodeId"
[overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>
<md-spinner></md-spinner>
</adf-viewer>
@@ -17,8 +17,8 @@
import { Component, EventEmitter, Output } from '@angular/core';
import { Router } from '@angular/router';
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
import { MinimalNodeEntity } from 'alfresco-js-api';
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
@Component({
selector: 'search-bar',
@@ -64,8 +64,4 @@ export class SearchBarComponent {
onSearchTermChange(event) {
this.searchTerm = event.value;
}
onExpandToggle(event) {
this.expand.emit(event);
}
}
@@ -1,12 +1,14 @@
<div class="search-results-container">
<h1>Search results</h1>
<alfresco-search (preview)="showFile($event)"></alfresco-search>
<div class="adf-search-title">Search results</div>
<adf-search
[navigate]="false"
(nodeDbClick)="nodeDbClick($event)"></adf-search>
</div>
<div *ngIf="fileShowed">
<alfresco-viewer [(showViewer)]="fileShowed"
<adf-viewer [(showViewer)]="fileShowed"
[fileNodeId]="fileNodeId"
[overlayMode]="true">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</alfresco-viewer>
<md-spinner></md-spinner>
</adf-viewer>
</div>
@@ -0,0 +1,20 @@
div.search-results-container {
padding: 0 20px 20px 20px;
}
.adf-search-title {
font-size: 22px;
padding: 15px 0 15px 0;
}
@media screen and (max-width: 600px) {
:host .col-display-name {
min-width: 100px;
}
:host .col-modified-at, :host .col-modified-by {
display: none;
}
:host div.search-results-container table {
width: 100%;
}
}
@@ -21,28 +21,7 @@ import { Router } from '@angular/router';
@Component({
selector: 'search-component',
templateUrl: './search.component.html',
styles: [`
:host div.search-results-container {
padding: 0 20px 20px 20px;
}
:host h1 {
font-size: 22px;
}
:host tbody tr {
cursor: pointer;
}
@media screen and (max-width: 600px) {
:host .col-display-name {
min-width: 100px;
}
:host .col-modified-at, :host .col-modified-by {
display: none;
}
:host div.search-results-container table {
width: 100%;
}
}
`]
styleUrls: ['./search.component.scss']
})
export class SearchComponent {
@@ -52,9 +31,17 @@ export class SearchComponent {
constructor(public router: Router) {
}
showFile(event) {
if (event.value.entry.isFile) {
this.fileNodeId = event.value.entry.id;
nodeDbClick($event: any) {
if ($event.value.entry.isFolder) {
this.router.navigate(['/files', $event.value.entry.id]);
} else {
this.showFile($event);
}
}
showFile($event) {
if ($event.value.entry.isFile) {
this.fileNodeId = $event.value.entry.id;
this.fileShowed = true;
} else {
this.fileShowed = false;
@@ -1,31 +0,0 @@
.setting-card.mdl-card {
width: 320px;
height: 320px;
}
.setting-card > .mdl-card__title {
color: #fff;
background: bottom right 15% no-repeat #1fbcd2;
}
.setting-card-padding {
width: 50%;
display: table-cell;
vertical-align: middle;
margin: 0;
}
.setting-container {
display: table;
border-collapse: collapse;
border-spacing: 0;
width: 100%;
}
.icon-margin {
margin-right: 9px;
}
.table-row {
display: table-row;
}
@@ -1,35 +0,0 @@
<div class="setting-container">
<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">
<h2 class="mdl-card__title-text">SETTINGS</h2>
</div>
<div class="mdl-card__actions mdl-card--border">
<div class="mdl-card__supporting-text">
Content Services host URL configuration
</div>
<nav class="mdl-navigation">
<div class="icon material-icons icon-margin">link</div>
<input type="text" class="mdl-textfield__input" id="ecmHost" data-automation-id="ecmHost"
tabindex="1" (change)="onChangeECMHost($event)" value="{{ecmHost}}"/>
</nav>
<div class="mdl-card__supporting-text">
Process Services host URL configuration
</div>
<nav class="mdl-navigation">
<div class="icon material-icons icon-margin">link</div>
<input type="text" class="mdl-textfield__input" id="bpmHost" data-automation-id="bpmHost"
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>
</div>
@@ -1,58 +0,0 @@
/*!
* @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 { AlfrescoSettingsService, StorageService, LogService } from 'ng2-alfresco-core';
@Component({
selector: 'alfresco-setting-demo',
templateUrl: './setting.component.html',
styleUrls: ['./setting.component.css']
})
export class SettingComponent {
ecmHost: string;
bpmHost: string;
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 {
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 {
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);
}
}
}
@@ -0,0 +1,61 @@
<div class="adf-setting-container">
<div class="adf-setting-card-padding"></div>
<md-toolbar color="primary" >
<h3>{{'SETTINGS.TITLE' | translate}}</h3>
</md-toolbar>
<md-card class="adf-setting-card">
<md-card-content>
<md-card-subtitle>{{'SETTINGS.CS-HOST' | translate }}</md-card-subtitle>
<md-input-container class="full-width">
<md-icon class="adf-settings-link-icon" mdPrefix>link</md-icon>
<input mdInput
[formControl]="urlFormControlEcm"
data-automation-id="ecmHost"
type="text"
(change)="onChangeECMHost($event)"
tabindex="2"
id="ecmHost"
value="{{ecmHost}}"
placeholder="http(s)://host|ip:port(/path)">
<md-error *ngIf="urlFormControlEcm.hasError('pattern')">
ECM host is not valid! http(s)://host|ip:port(/path)
</md-error>
</md-input-container>
<p>
<p>
<md-card-subtitle>{{'SETTINGS.BP-HOST' | translate }}</md-card-subtitle>
<md-input-container class="full-width">
<md-icon class="adf-settings-link-icon" mdPrefix>link</md-icon>
<input mdInput
[formControl]="urlFormControlBpm"
data-automation-id="bpmHost"
type="text"
(change)="onChangeBPMHost($event)"
tabindex="2"
id="bpmHost"
value="{{bpmHost}}"
placeholder="http(s)://host|ip:port(/path)">
<md-error *ngIf="urlFormControlBpm.hasError('pattern')">
BPM host is not valid! http(s)://host|ip:port(/path)
</md-error>
</md-input-container>
</md-card-content>
<md-card-actions class="adf-settings-actions">
<button md-button onclick="window.history.back()" color="primary">
{{'SETTINGS.BACK' | translate }}
</button>
<button md-raised-button (click)="save($event)" [disabled]="urlFormControlBpm.hasError('pattern') || urlFormControlEcm.hasError('pattern')" color="primary">
{{'SETTINGS.APPLY' | translate }}
</button>
</md-card-actions>
</md-card>
<div class="adf-setting-card-padding"></div>
</div>
@@ -0,0 +1,37 @@
.adf-app-settings {
display: flex;
height: 100%;
align-items: center;
.adf-setting-container {
display: table;
border-collapse: collapse;
border-spacing: 0;
}
.adf-setting-card {
width: 400px;
}
.full-width {
width: 100%;
}
.adf-setting-card-padding {
width: 50%;
display: table-cell;
vertical-align: middle;
margin: 0;
}
.adf-settings-link-icon {
position: relative;
top: 6px;
margin-right: 10px;
}
.adf-settings-actions {
display: flex;
justify-content: flex-end;
}
}
@@ -0,0 +1,83 @@
/*!
* @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, ViewEncapsulation } from '@angular/core';
import { FormControl, Validators } from '@angular/forms';
import { AlfrescoSettingsService, LogService, StorageService } from 'ng2-alfresco-core';
@Component({
selector: 'app-settings',
templateUrl: 'settings.component.html',
host: {
'class': 'adf-app-settings'
},
styleUrls: ['settings.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class SettingsComponent {
HOST_REGEX: string = '^(http|https):\/\/.*[^/]$';
ecmHost: string;
ecmHostTmp: string;
bpmHost: string;
bpmHostTmp: string;
urlFormControlEcm = new FormControl('', [Validators.required, Validators.pattern(this.HOST_REGEX)]);
urlFormControlBpm = new FormControl('', [Validators.required, Validators.pattern(this.HOST_REGEX)]);
constructor(private settingsService: AlfrescoSettingsService,
private storage: StorageService,
private logService: LogService) {
this.ecmHostTmp = this.ecmHost = storage.getItem('ecmHost') || this.settingsService.ecmHost;
this.bpmHostTmp = this.bpmHost = storage.getItem('bpmHost') || this.settingsService.bpmHost;
}
public onChangeECMHost(event: KeyboardEvent): void {
let value = (<HTMLInputElement> event.target).value.trim();
if (value && this.isValidUrl(value)) {
this.logService.info(`ECM host: ${value}`);
this.ecmHostTmp = value;
} else {
console.error('Ecm address does not match the pattern');
}
}
public onChangeBPMHost(event: KeyboardEvent): void {
let value = (<HTMLInputElement> event.target).value.trim();
if (value && this.isValidUrl(value)) {
this.logService.info(`BPM host: ${value}`);
this.bpmHostTmp = value;
} else {
console.error('Bpm address does not match the pattern');
}
}
public save(event: KeyboardEvent): void {
if (this.bpmHost !== this.bpmHostTmp) {
this.storage.setItem(`bpmHost`, this.bpmHostTmp);
}
if (this.ecmHost !== this.ecmHostTmp) {
this.storage.setItem(`ecmHost`, this.ecmHostTmp);
}
window.location.href = '/';
}
isValidUrl(url: string) {
return /^(http|https):\/\/.*/.test(url);
}
}
@@ -0,0 +1,16 @@
<label for="nodeId"><b>Insert Node Id</b></label><br>
<input id="nodeId" type="text" size="48" [(ngModel)]="nodeId"><br>
<md-grid-list cols="2" rowHeight="100px">
<md-grid-tile>
<md-list>
<md-list-item> <div class="adf-social-title" >Like component</div> </md-list-item>
<md-list-item> <adf-like [nodeId]="nodeId"></adf-like></md-list-item>
</md-list>
</md-grid-tile>
<md-grid-tile>
<md-list>
<md-list-item> <div class="adf-social-title" >Rating component</div> </md-list-item>
<md-list-item> <adf-rating [nodeId]="nodeId"></adf-rating></md-list-item>
</md-list>
</md-grid-tile>
</md-grid-list>
@@ -0,0 +1,3 @@
.adf-social-title{
}
@@ -0,0 +1,28 @@
/*!
* @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';
@Component({
selector: 'alfresco-social-demo',
templateUrl: 'social.component.html',
styleUrls: ['social.component.scss']
})
export class SocialComponent {
nodeId: string = '74cd8a96-8a21-47e5-9b3b-a1b3e296787d';
}
@@ -0,0 +1,19 @@
<label for="nodeId"><b>Insert Node Id</b></label><br>
<input id="nodeId" type="text" size="48" [(ngModel)]="nodeId"><br>
<div class="adf-tag-example-area">
<md-card>
<adf-tag-node-actions-list [nodeId]="nodeId"></adf-tag-node-actions-list>
</md-card>
</div>
<div class="adf-tag-example-area">
<md-card>
<div class="adf-tag-example-title">List Tags Content Services</div>
<adf-tag-list></adf-tag-list>
</md-card>
</div>
<div class="adf-tag-example-area">
<md-card>
<div class="adf-tag-example-title">Tag list By Node ID</div>
<adf-tag-node-list [nodeId]="nodeId"></adf-tag-node-list>
</md-card>
</div>
@@ -0,0 +1,9 @@
.adf-tag-example-area {
width: calc(33.3333333333% - 16px);
margin: 8px;
float: left;
}
.adf-tag-example-title {
padding-bottom: 12px;
}
@@ -19,18 +19,8 @@ import { Component } from '@angular/core';
@Component({
selector: 'alfresco-tag-demo',
template: `
<label for="nodeId"><b>Insert Node Id</b></label><br>
<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 Content Services <alfresco-tag-list></alfresco-tag-list></div>
<div class="mdl-cell mdl-cell--4-col">
Tag list By Node ID
<alfresco-tag-node-list [nodeId]="nodeId"></alfresco-tag-node-list>
</div>
</div>
`
templateUrl: 'tag.component.html',
styleUrls: ['tag.component.scss']
})
export class TagComponent {
@@ -0,0 +1,46 @@
import { Injectable } from '@angular/core';
/**
* Class for managing stylesheets. Stylesheets are loaded into named slots so that they can be
* removed or changed later.
*/
@Injectable()
export class StyleManager {
/**
* Set the stylesheet with the specified key.
*/
setStyle(key: string, href: string) {
getLinkElementForKey(key).setAttribute('href', href);
}
/**
* Remove the stylesheet with the specified key.
*/
removeStyle(key: string) {
const existingLinkElement = getExistingLinkElementByKey(key);
if (existingLinkElement) {
document.head.removeChild(existingLinkElement);
}
}
}
function getLinkElementForKey(key: string) {
return getExistingLinkElementByKey(key) || createLinkElementWithKey(key);
}
function getExistingLinkElementByKey(key: string) {
return document.head.querySelector(`link[rel="stylesheet"].${getClassNameForKey(key)}`);
}
function createLinkElementWithKey(key: string) {
const linkEl = document.createElement('link');
linkEl.setAttribute('rel', 'stylesheet');
linkEl.setAttribute('type', 'text/css');
linkEl.classList.add(getClassNameForKey(key));
document.head.appendChild(linkEl);
return linkEl;
}
function getClassNameForKey(key: string) {
return `style-manager-${key}`;
}

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