From 020be18b57104e1c74c2d0d0cb33d8ab9685595b Mon Sep 17 00:00:00 2001 From: Andy Stark <30621568+therealandeeee@users.noreply.github.com> Date: Tue, 24 Oct 2017 13:39:14 +0100 Subject: [PATCH] [ADF-1586] Added docs for Thumbnail and Mime type (#2537) --- docs/README.md | 15 ++---- docs/docassets/images/ft_ic_archive.png | Bin 0 -> 315 bytes docs/docassets/images/ft_ic_document.png | Bin 0 -> 239 bytes docs/docassets/images/ft_ic_folder.png | Bin 0 -> 264 bytes .../docassets/images/ft_ic_folder_disable.png | Bin 0 -> 228 bytes docs/docassets/images/ft_ic_ms_excel.png | Bin 0 -> 720 bytes docs/docassets/images/ft_ic_ms_powerpoint.png | Bin 0 -> 578 bytes docs/docassets/images/ft_ic_ms_word.png | Bin 0 -> 632 bytes docs/docassets/images/ft_ic_pdf.png | Bin 0 -> 382 bytes docs/docassets/images/ft_ic_presentation.png | Bin 0 -> 265 bytes docs/docassets/images/ft_ic_raster_image.png | Bin 0 -> 422 bytes docs/docassets/images/ft_ic_spreadsheet.png | Bin 0 -> 252 bytes docs/docassets/images/ft_ic_vector_image.png | Bin 0 -> 381 bytes docs/docassets/images/ft_ic_video.png | Bin 0 -> 219 bytes docs/docassets/images/ft_ic_website.png | Bin 0 -> 360 bytes docs/mime-type-icon.pipe.md | 23 +++++++++ docs/seeAlsoGraph.json | 2 + docs/thumbnail.service.md | 47 ++++++++++++++++++ docs/undocStoplist.json | 6 ++- 19 files changed, 82 insertions(+), 11 deletions(-) create mode 100644 docs/docassets/images/ft_ic_archive.png create mode 100644 docs/docassets/images/ft_ic_document.png create mode 100644 docs/docassets/images/ft_ic_folder.png create mode 100644 docs/docassets/images/ft_ic_folder_disable.png create mode 100644 docs/docassets/images/ft_ic_ms_excel.png create mode 100644 docs/docassets/images/ft_ic_ms_powerpoint.png create mode 100644 docs/docassets/images/ft_ic_ms_word.png create mode 100644 docs/docassets/images/ft_ic_pdf.png create mode 100644 docs/docassets/images/ft_ic_presentation.png create mode 100644 docs/docassets/images/ft_ic_raster_image.png create mode 100644 docs/docassets/images/ft_ic_spreadsheet.png create mode 100644 docs/docassets/images/ft_ic_vector_image.png create mode 100644 docs/docassets/images/ft_ic_video.png create mode 100644 docs/docassets/images/ft_ic_website.png create mode 100644 docs/mime-type-icon.pipe.md create mode 100644 docs/thumbnail.service.md diff --git a/docs/README.md b/docs/README.md index 84ee8f29c7..2fb4ffb54a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -194,9 +194,9 @@ for more information about installing and using the source code. - [Form rendering service](form-rendering.service.md) - [Form service](form.service.md) -- [*Process content service](../ng2-components/ng2-activiti-form/src/services/process-content.service.ts) - [*Activiti alfresco service](../ng2-components/ng2-activiti-form/src/services/activiti-alfresco.service.ts) - [*Node service](../ng2-components/ng2-activiti-form/src/services/node.service.ts) +- [*Process content service](../ng2-components/ng2-activiti-form/src/services/process-content.service.ts) - [*Widget visibility service](../ng2-components/ng2-activiti-form/src/services/widget-visibility.service.ts) ### Widgets @@ -289,7 +289,6 @@ for more information about installing and using the source code. ### Directives - [Task audit directive](task-audit.directive.md) -- [*No task detail template directive](../ng2-components/ng2-activiti-tasklist/src/components/no-task-detail-template.directive.ts) ### Models @@ -335,14 +334,13 @@ for more information about installing and using the source code. - [Node permission directive](node-permission.directive.md) - [Node restore directive](node-restore.directive.md) - [Upload directive](upload.directive.md) -- [*Card view content proxy directive](../ng2-components/ng2-alfresco-core/src/components/view/card-view-content-proxy.directive.ts) ### Pipes +- [Mime type icon pipe](mime-type-icon.pipe.md) - [Node name tooltip pipe](node-name-tooltip.pipe.md) - [Text highlight pipe](text-highlight.pipe.md) - [*File size pipe](../ng2-components/ng2-alfresco-core/src/pipes/file-size.pipe.ts) -- [*Mime type icon pipe](../ng2-components/ng2-alfresco-core/src/pipes/mime-type-icon.pipe.ts) - [*Time ago pipe](../ng2-components/ng2-alfresco-core/src/pipes/time-ago.pipe.ts) - [*User initial pipe](../ng2-components/ng2-alfresco-core/src/pipes/user-initial.pipe.ts) @@ -356,6 +354,7 @@ for more information about installing and using the source code. - [Log service](log.service.md) - [Notification service](notification.service.md) - [Renditions service](renditions.service.md) +- [Thumbnail service](thumbnail.service.md) - [Translation service](translation.service.md) - [Upload service](upload.service.md) - [User preferences service](user-preferences.service.md) @@ -381,7 +380,6 @@ for more information about installing and using the source code. - [*Shared links api service](../ng2-components/ng2-alfresco-core/src/services/shared-links-api.service.ts) - [*Sites api service](../ng2-components/ng2-alfresco-core/src/services/sites-api.service.ts) - [*Storage service](../ng2-components/ng2-alfresco-core/src/services/storage.service.ts) -- [*Thumbnail service](../ng2-components/ng2-alfresco-core/src/services/thumbnail.service.ts) - [*Translate loader service](../ng2-components/ng2-alfresco-core/src/services/translate-loader.service.ts) @@ -450,11 +448,6 @@ for more information about installing and using the source code. ### Components - [Login component](login.component.md) - -### Directives - -- [*Login footer directive](../ng2-components/ng2-alfresco-login/src/directives/login-footer.directive.ts) -- [*Login header directive](../ng2-components/ng2-alfresco-login/src/directives/login-header.directive.ts) [(Back to Contents)](#contents) @@ -571,6 +564,8 @@ for more information about installing and using the source code. - [*TxtViewer component](../ng2-components/ng2-alfresco-viewer/src/components/txtViewer.component.ts) - [*Unknown format component](../ng2-components/ng2-alfresco-viewer/src/components/unknown-format/unknown-format.component.ts) - [*Viewer info drawer component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-info-drawer.component.ts) +- [*Viewer more actions component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-more-actions.component.ts) +- [*Viewer open with component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-open-with.component.ts) - [*Viewer toolbar component](../ng2-components/ng2-alfresco-viewer/src/components/viewer-toolbar.component.ts) ### Directives diff --git a/docs/docassets/images/ft_ic_archive.png b/docs/docassets/images/ft_ic_archive.png new file mode 100644 index 0000000000000000000000000000000000000000..85f47c838b46dddda14be03f9217717f5b2f0b3f GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1Tcc)B=- zcyzv{kfk5ki<|7OplbTd-G|7v12yS9q9iYz2Hf^`J?zf--?8%Bo~%l(a0+v|XSVDNPHb6Mw< G&;$U`dvwkK literal 0 HcmV?d00001 diff --git a/docs/docassets/images/ft_ic_document.png b/docs/docassets/images/ft_ic_document.png new file mode 100644 index 0000000000000000000000000000000000000000..c9cf6bb52e3f7ee24936453c93492ae9ee936661 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1TYJY5_^ zJUWvTBv_ewB`&gV(fa@X_xS@4JeE~fuitLGOM%;9;pznk3fO=ky@Zj6dj)Ss9wWEi z$=7dtBnn%2Gs6D;_n*f4!$gSNt=8d!V)JG8B@sTw@;ra%_|$VtNJ@MQPPiAx^`(zV bijkq|oAQPiV$~ag_A+?7`njxgN@xNAu?9=v literal 0 HcmV?d00001 diff --git a/docs/docassets/images/ft_ic_folder.png b/docs/docassets/images/ft_ic_folder.png new file mode 100644 index 0000000000000000000000000000000000000000..752d073cfdd34270dd8561109ed5c69d01862a90 GIT binary patch literal 264 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1TAJzX3_ zJUZX@@8)eb5OBC}$nMeD7HiaTT|u(h(}jRB`mKlPuF_CZ*Kg`MlGY5(~K_dnJ*_XUu0XmtZv@{=Yqe$3E?Wk<4M0Yjz;qw=GxH9RrZ73 RhZ|@agQu&X%Q~loCIIKaNiF~Y literal 0 HcmV?d00001 diff --git a/docs/docassets/images/ft_ic_ms_excel.png b/docs/docassets/images/ft_ic_ms_excel.png new file mode 100644 index 0000000000000000000000000000000000000000..caf9fc16233cdc3fc7bf25d9bb1b304fad2090c3 GIT binary patch literal 720 zcmV;>0x$iEP)LoK~zYI)s@Xllu;DMf9E~vTo!LiBvdrDS1A?U@_YtSj#YeJu6iT7+7c^2G({d+p_tXK*hGN;6!HE%P436M|E$s2oM zx>$2fB`^}J*IX4nW#@7dhf zY%EP|?TCMYnpkRKrM0oKFd;F(Kw}{kXktP_jEN-LQIVO=@{WZ8WHU26%U0ZKGUwj& z&3W(T4V?F~ZVmc0G(x#Ofi!`14YP6Jhc%<6Jb>b{(HBY_l&g4G$7vc-2W~)X6#f4> z0&KJA1PX%~DCeB}4fZx&_WRasJw2762XnyovX)3;@Zsp$){&C?>r;nb#8z{Z9(fJABZoj)A>DI<_|3O5F5rd$0^zr5)VL>@vMcld=J` z@dEgZI9_!q2f!Zi2ed>Zewk*Gy+rH5VX|P~tr^W^&gKH7mTC%v-30JMYep-109A$M zd+7lC)^CCaSR;L`{{&sC{{&r1gW4$FOqD$sB+Lw*5x^yUVKGrLV(_oc{{2Nx04^S; zJurpSBxnj_5-|;2PH@S*u21taO2SyHj8jw%uNt`Pz*XdTY_9bn58(XQU$SzP9+PBa Q+5i9m07*qoM6N<$f@y^JPXGV_ literal 0 HcmV?d00001 diff --git a/docs/docassets/images/ft_ic_ms_word.png b/docs/docassets/images/ft_ic_ms_word.png new file mode 100644 index 0000000000000000000000000000000000000000..2d292883a0efa87a20ed46f412be40e23fa94f78 GIT binary patch literal 632 zcmV-;0*C#HP)Sriroze*wav72O$#qPShliit#sdC`K)5tO)kIaW0L&pihWG7S7J^)Fa_OFOU;l8*aVa|@kO&M)+fYED z;bZ0YmP%1jyrUN2W!;!kbv>-xMPTS8`zii9T(Jw|7K_Vz(wk?N8pG^-P1pBC9X>Vc z_8j#)`o9F8ITYeSiB@+S^*M*pGH3z_J|i9hJHT6vTR^*;*H%O`J}|y__l_Yjw%)JU zY2X|1uzM9lgJ(EArSFqx4u$wY9PgCr6AZUV%oOh`uZR$MapI;XfepkvA{GZS+lo3$ zhv0M+K!OK~2!PF~&C8=cS7p30V^eTrAT6^8qf8FWShY!}w993Q2S0rp6D<}8KKn!k z<2~pEg3x2l-C+p`8a}W5UmP*0#1-t{gAV)o!f&SJvV_RbZ87coR3+Sjv@{PATQuuC z{OH-_dTdBc#BvfnPzpgDCr88*6(qJOBMx+nvfxWtx7xTxvxEPO3dLnT9=E9IpOQX7 zPE1Flyla#&$_6EjbBLJ{HJV}Fu4Fk$%9AOZuaU>702K$$3eF%tWPLIZKmG!fw83k( S=`N=L00004nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1Tkd%8G= zcyzv<;^=qCL8NUz`;LN_t2jMuJEHj?h%Wiavm=!~+(7L7gQ)(8w~nlwbU<{?AH7*^ z3&lL5Z!EZ<_wVQZ-_KQzng72z@aL$FObq92sV}chgjL#H8>=hMZN0W@VO?>-SAtc6!5##$GL!6rDpEH)?m6r`i0B%KtV) z#Pq?YqJ{@N37T7Nb9odZcfGru`LyA{(en9sXWJF*J}_J((AJ?4sQkW>$_#wqI)QOC)486!6ZfZ@6o=;(zxa Z2GOLju#Yva?}5R<;OXk;vd$@?2>`E{o}B;y literal 0 HcmV?d00001 diff --git a/docs/docassets/images/ft_ic_presentation.png b/docs/docassets/images/ft_ic_presentation.png new file mode 100644 index 0000000000000000000000000000000000000000..18b98b423a47596dca5569c33f2a9b788ceb532a GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1UrJY5_^ zJUZV_I>_6gz~gFvtVQ)o=!Z87Z=R^ko5?!uL6YrE2^WVe0>bw;>i%zC=CIV{jP8U- z!VQuR<;JHQ6mDirpW%?+@;*cDO@WTdyoGlP7+&0M^8cWfyW(Vv?b-|MnttJX&({aA zK4m?q%@yme^*=sPu(5K&^2ba~UwGA8*H4gquO+{kai_gx#e}?cR-lU*JYD@<);T3K F0RY|TU1mb%r8x$d#Y17S|?Vfku`FQU_ravU%q1Zjz z2WbL@CHp*4YW=cvH8+e1FHJc>L4{`6FrtAJ<#TQR23WZ=Kn6(EyQ*5icol%V$gGM~ z2jxabMD26{;rhvc-U2Q{raLg}mjL}zqm9yD7BI}iAy#KLSqrMbtqM2m{>Di-G@gnL z+%F3F6sSCu93Q~jc0azRxq~1#tMshXNjUhnS05V$iTj8JsEFM+ogaTc+C6(2?wr5I zN()S`h!%SD1(iu?aj-}SOunoyXe Qng9R*07*qoM6N<$f+fDKvj6}9 literal 0 HcmV?d00001 diff --git a/docs/docassets/images/ft_ic_spreadsheet.png b/docs/docassets/images/ft_ic_spreadsheet.png new file mode 100644 index 0000000000000000000000000000000000000000..686b3b9842e6b5702b2cfcec56b916c5266317e3 GIT binary patch literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1SlJzX3_ zJUZV_zR264z~jRISS3ekmte7h&<4)c5A=hYIE3nc+4X;0x09tIviAh*%dO5wF1}1} zHVW6uNm+7VhT&Yy0!I7I*X5dxmK+kg^zw%21U>dtmy<8vc5D@8JkK4i{afUKXrXH| r<5u}wr@nM$G&IP6*v!29j7r`T1H)-qPp-WOI)cH|)z4*}Q$iB}LVj3l literal 0 HcmV?d00001 diff --git a/docs/docassets/images/ft_ic_vector_image.png b/docs/docassets/images/ft_ic_vector_image.png new file mode 100644 index 0000000000000000000000000000000000000000..d646f42dabd1a3e41cc2b2554542237925528a05 GIT binary patch literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjEX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1TkdAc}; zcyzvC7JM#4p2;=aA?q;@@>- zQtJ8}TPM06eqCnr&wumgHtX$ft61mm^9z{Ee7G%=Jw&-Oe(BRiE4OatW|vShS}*px zsq7)Evb^I|euMLW3=W*&-jI=0Q_yyPnlR&E`+Ciu&SnvgT9!UepCB%F2M5DRKU#LP z_Aj5i^`3oxE$j648n5jcUq4z=_`%%wne_WRj{lY!=*3SyGwo~rashL30U`F4Ql3Aq z^)9~Nb>5iw4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1SdJY5_^ zJUWvTBv@G(ly@EY-~8skqy!MWtv6EoTqxDBjPF=GqgvKZk>$)6SUGmiSkU<88>1gL zNPf}oHks1Jg$@Ee#~7D20vTEoz0HmN&4CUA3=F9^^$(nrk+22Y!QkoY=d#Wzp$P!F C54nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1T^db&7< zcyzvfgNW<-ZjZX7EDPl?h2Guq(R$U~-a_G^{YQLXZs&OP#ed0^FS|02-ttLm zdRG+AJiVMRzpc@(_T8*2n%;A|*4Z{(<@MHST<>`Da9-}eJ@WS2n(R4^3nf?A=0%FC zXEiA=n_kdx_m<5u;SZV{d2&DHH+%2Ue`C8v)#1^Xjtb_ap78m%l{7NA_q!Ddm9(0B z`sFXk=d(ZF(XoS9#zE=d)43b}#RYD + + +``` + +## Details + +The pipe takes a MIME type as input and returns the URL of an SVG file that +symbolizes that type (see the [Thumbnail service](thumbnail.service.md) for the mapping between types and icons). The pipe will return a "miscellaneous" icon when no specific mapping is defined. + + + +## See also + +- [Thumbnail service](thumbnail.service.md) + \ No newline at end of file diff --git a/docs/seeAlsoGraph.json b/docs/seeAlsoGraph.json index cf11eb8a56..fc963cd44e 100644 --- a/docs/seeAlsoGraph.json +++ b/docs/seeAlsoGraph.json @@ -57,6 +57,7 @@ "login.component": ["logout.directive"], "logout.directive": [], "metadata-indicators": [], + "mime-type-icon.pipe": [], "node-permission.directive": [], "notification.service": [], "pagination.component": [], @@ -91,6 +92,7 @@ "task-list.component": [], "text-highlight.pipe": [], "theming": [], + "thumbnail.service": ["mime-type-icon.pipe"], "toolbar-divider.component": [], "toolbar-title.component": [], "toolbar.component": ["toolbar-divider.component", "toolbar-title.component"], diff --git a/docs/thumbnail.service.md b/docs/thumbnail.service.md new file mode 100644 index 0000000000..4ff009632a --- /dev/null +++ b/docs/thumbnail.service.md @@ -0,0 +1,47 @@ +# Thumbnail service + +Retrieves an SVG thumbnail image to represent a document type. + +## Methods + +`public getDocumentThumbnailUrl(document: any): string`
+Gets a thumbnail URL for a document node. + +`public getMimeTypeIcon(mimeType: string): string`
+Gets a thumbnail URL for a MIME type. + +`public getDefaultMimeTypeIcon(): string`
+Gets a "miscellaneous" thumbnail URL for types with no other icon defined. + +## Details + +The service can locate a thumbnail icon (in SVG format) for either +a document node or a MIME type. The default mapping between types +and icons is shown in the table below: + +| Document | Icon | Types | +| --- | --- | --- | +| Compressed archive | ![Archive thumbnail](docassets/images/ft_ic_archive.png) | 'application/x-compressed', 'application/x-zip-compressed', 'application/zip' | +| Text | ![Text thumbnail](docassets/images/ft_ic_document.png) | 'text/plain', 'application/json', 'application/x-javascript', 'application/vnd.apple.pages' | +| Bitmap/raster image | ![Bitmap thumbnail](docassets/images/ft_ic_raster_image.png) | 'image/png', 'image/jpeg', 'image/gif' | +| MP4 video | ![MP4 thumbnail](docassets/images/ft_ic_video.png) | 'video/mp4' | +| SVG vector image| ![SVG thumbnail](docassets/images/ft_ic_vector_image.png) | 'image/svg+xml' | +| HTML file | ![HTML thumbnail](docassets/images/ft_ic_website.png) | 'text/html' | +| PDF file | ![PDF thumbnail](docassets/images/ft_ic_pdf.png) | 'application/pdf' | +| Folder | ![Folder thumbnail](docassets/images/ft_ic_folder.png) | | +| Disabled folder | ![Disabled folder thumbnail](docassets/images/ft_ic_folder_disable.png) | | +| Excel spreadsheet | ![Spreadsheet thumbnail](docassets/images/ft_ic_ms_excel.png) | 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' | +| PowerPoint slideshow | ![PowerPoint thumbnail](docassets/images/ft_ic_ms_powerpoint.png) | 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.presentationml.template', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' | +| Word document | ![Word thumbnail](docassets/images/ft_ic_ms_word.png) | 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' | +| Keynote presentation | ![Keynote thumbnail](docassets/images/ft_ic_presentation.png) | 'application/vnd.apple.keynote' | +| Numbers spreadsheet | ![Numbers thumbnail](docassets/images/ft_ic_spreadsheet.png) | 'application/vnd.apple.numbers' | + + + +## See also + +- [Mime type icon pipe](mime-type-icon.pipe.md) + + + + diff --git a/docs/undocStoplist.json b/docs/undocStoplist.json index 6ff1b496a7..1ffb1306e5 100644 --- a/docs/undocStoplist.json +++ b/docs/undocStoplist.json @@ -9,5 +9,9 @@ "empty-folder-content", "empty-list", "loading-template", - "no-content-template" + "no-content-template", + "card-view-content-proxy", + "login-footer.directive", + "login-header.directive", + "no-task-detail-template" ] \ No newline at end of file