From c098e88cc96c017d8c858a613898b503ec2b30e9 Mon Sep 17 00:00:00 2001 From: leejh Date: Thu, 10 Oct 2019 15:50:50 +0900 Subject: [PATCH] add chat room UI, modify ucap-profile-user-list-item, add group-expension-panel in ucap-profile-user-list-item. --- angular.json | 38 ++++++++++++++ .../left-sidenav/chat.component.html | 8 ++- .../components/left-sidenav/chat.component.ts | 31 ++--------- .../messenger/messenger.layout.module.ts | 3 ++ .../components/template.page.component.html | 38 +++++--------- .../components/template.page.component.scss | 4 ++ .../components/template.page.component.ts | 27 +++++++++- .../pages/template/template.page.module.ts | 2 + .../src/assets/images/img_nophoto_30.png | Bin 0 -> 1331 bytes .../src/assets/images/img_nophoto_36.png | Bin 0 -> 1628 bytes .../src/assets/images/img_nophoto_50.png | Bin 0 -> 2348 bytes .../src/assets/images/img_nophoto_70.png | Bin 0 -> 3501 bytes .../src/assets/images/img_nophoto_88.png | Bin 0 -> 4573 bytes .../src/lib/protocols/room.ts | 2 +- .../components/expansion-panel.component.html | 48 +++++------------- .../src/lib/ucap-ui-group.module.ts | 2 + .../components/user-list-item.component.html | 9 ++-- .../components/user-list-item.component.ts | 35 ++++++++++--- .../src/public-api.ts | 1 + projects/ucap-webmessenger-ui-room/README.md | 24 +++++++++ .../ucap-webmessenger-ui-room/karma.conf.js | 32 ++++++++++++ .../ucap-webmessenger-ui-room/ng-package.json | 7 +++ .../ucap-webmessenger-ui-room/package.json | 8 +++ .../lib/components/list-item.component.html | 5 ++ .../lib/components/list-item.component.scss | 46 +++++++++++++++++ .../components/list-item.component.spec.ts | 24 +++++++++ .../src/lib/components/list-item.component.ts | 44 ++++++++++++++++ .../src/lib/ucap-ui-room.module.ts | 35 +++++++++++++ .../src/public-api.ts | 7 +++ .../ucap-webmessenger-ui-room/src/test.ts | 21 ++++++++ .../tsconfig.lib.json | 26 ++++++++++ .../tsconfig.spec.json | 17 +++++++ .../ucap-webmessenger-ui-room/tslint.json | 17 +++++++ tsconfig.json | 3 ++ 34 files changed, 453 insertions(+), 111 deletions(-) create mode 100644 projects/ucap-webmessenger-app/src/assets/images/img_nophoto_30.png create mode 100644 projects/ucap-webmessenger-app/src/assets/images/img_nophoto_36.png create mode 100644 projects/ucap-webmessenger-app/src/assets/images/img_nophoto_50.png create mode 100644 projects/ucap-webmessenger-app/src/assets/images/img_nophoto_70.png create mode 100644 projects/ucap-webmessenger-app/src/assets/images/img_nophoto_88.png create mode 100644 projects/ucap-webmessenger-ui-room/README.md create mode 100644 projects/ucap-webmessenger-ui-room/karma.conf.js create mode 100644 projects/ucap-webmessenger-ui-room/ng-package.json create mode 100644 projects/ucap-webmessenger-ui-room/package.json create mode 100644 projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html create mode 100644 projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.scss create mode 100644 projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.spec.ts create mode 100644 projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts create mode 100644 projects/ucap-webmessenger-ui-room/src/lib/ucap-ui-room.module.ts create mode 100644 projects/ucap-webmessenger-ui-room/src/public-api.ts create mode 100644 projects/ucap-webmessenger-ui-room/src/test.ts create mode 100644 projects/ucap-webmessenger-ui-room/tsconfig.lib.json create mode 100644 projects/ucap-webmessenger-ui-room/tsconfig.spec.json create mode 100644 projects/ucap-webmessenger-ui-room/tslint.json diff --git a/angular.json b/angular.json index f0912c14..2438b1fd 100644 --- a/angular.json +++ b/angular.json @@ -436,6 +436,44 @@ } } }, + "ucap-webmessenger-ui-room": { + "projectType": "library", + "schematics": { + "@schematics/angular:component": { + "style": "scss" + } + }, + "root": "projects/ucap-webmessenger-ui-room", + "sourceRoot": "projects/ucap-webmessenger-ui-room/src", + "prefix": "ucap-room", + "architect": { + "build": { + "builder": "@angular-devkit/build-ng-packagr:build", + "options": { + "tsConfig": "projects/ucap-webmessenger-ui-room/tsconfig.lib.json", + "project": "projects/ucap-webmessenger-ui-room/ng-package.json" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "projects/ucap-webmessenger-ui-room/src/test.ts", + "tsConfig": "projects/ucap-webmessenger-ui-room/tsconfig.spec.json", + "karmaConfig": "projects/ucap-webmessenger-ui-room/karma.conf.js" + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "projects/ucap-webmessenger-ui-room/tsconfig.lib.json", + "projects/ucap-webmessenger-ui-room/tsconfig.spec.json" + ], + "exclude": ["**/node_modules/**"] + } + } + } + }, "ucap-webmessenger-ui-messenger": { "projectType": "library", "schematics": { diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html index 505bbd7b..2e6712f0 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.html @@ -1,5 +1,3 @@ -
-
{{ getRoomName(room) }}
-
{{ room.finalEventDate }}
-
{{ room.finalEventMessage }}
-
+ + diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts index 7e78be66..08bf7caa 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/chat.component.ts @@ -53,43 +53,18 @@ export class ChatComponent implements OnInit, OnDestroy { this.store.dispatch(ChatStore.selectedRoom({ roomSeq: roomInfo.roomSeq })); } - getRoomName(roomInfo: RoomInfo): string { - if (!!roomInfo.roomName && '' !== roomInfo.roomName.trim()) { - return roomInfo.roomName; - } - + getRoomUserList(roomInfo: RoomInfo): RoomUserInfo[] | UserInfoShort[] { if ( !!this.roomUserInfoMap[roomInfo.roomSeq].userInfoList && 0 < this.roomUserInfoMap[roomInfo.roomSeq].userInfoList.length ) { - let roomName = ''; - this.roomUserInfoMap[roomInfo.roomSeq].userInfoList.forEach( - (roomUserInfo, index) => { - if (0 === index) { - roomName = roomName.concat('', roomUserInfo.name); - } else { - roomName = roomName.concat(',', roomUserInfo.name); - } - } - ); - return roomName; + return this.roomUserInfoMap[roomInfo.roomSeq].userInfoList; } - if ( !!this.roomUserInfoMap[roomInfo.roomSeq].userInfoShortList && 0 < this.roomUserInfoMap[roomInfo.roomSeq].userInfoShortList.length ) { - let roomName = ''; - this.roomUserInfoMap[roomInfo.roomSeq].userInfoShortList.forEach( - (roomUserInfo, index) => { - if (0 === index) { - roomName = roomName.concat('', roomUserInfo.name); - } else { - roomName = roomName.concat(',', roomUserInfo.name); - } - } - ); - return roomName; + return this.roomUserInfoMap[roomInfo.roomSeq].userInfoShortList; } } } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/messenger.layout.module.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/messenger.layout.module.ts index 7d77dee7..433e2d78 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/messenger.layout.module.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/messenger.layout.module.ts @@ -16,6 +16,8 @@ import { DragDropModule } from '@angular/cdk/drag-drop'; import { UCapUiModule } from '@ucap-webmessenger/ui'; import { UCapUiChatModule } from '@ucap-webmessenger/ui-chat'; +import { UCapUiRoomModule } from '@ucap-webmessenger/ui-room'; + import { UCapUiGroupModule } from '@ucap-webmessenger/ui-group'; import { UCapUiOrganizationModule } from '@ucap-webmessenger/ui-organization'; @@ -37,6 +39,7 @@ import { DIALOGS } from './dialogs'; MatToolbarModule, UCapUiModule, UCapUiChatModule, + UCapUiRoomModule, UCapUiGroupModule, UCapUiOrganizationModule ], diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html index 2503b6e1..c8724501 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.html @@ -1,32 +1,15 @@ -
-

User-list-item

- + - + - +

Organization

@@ -36,13 +19,16 @@ Tenant Search
- + +
+

Chat

+
+ + +

Chat::MessageBox

diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.scss b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.scss index e69de29b..f1e29a98 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.scss +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.scss @@ -0,0 +1,4 @@ +div.template { + height: 100%; + overflow-y: auto; +} diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts index b1738f70..407db74b 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts @@ -1,6 +1,10 @@ import { Component, OnInit } from '@angular/core'; import { UserInfo } from '@ucap-webmessenger/protocol-sync'; -import { EmployeeType } from '@ucap-webmessenger/protocol-room'; +import { + EmployeeType, + RoomInfo, + RoomType +} from '@ucap-webmessenger/protocol-room'; import { RoleCode } from '@ucap-webmessenger/protocol-authentication'; import { StatusBulkInfo, @@ -10,6 +14,7 @@ import { import { StatusCode } from '@ucap-webmessenger/core'; import { Router } from '@angular/router'; import { Company } from '@ucap-webmessenger/api-external'; +import { EventType } from '@ucap-webmessenger/protocol-event'; @Component({ selector: 'app-template.page', @@ -17,7 +22,7 @@ import { Company } from '@ucap-webmessenger/api-external'; styleUrls: ['./template.page.component.scss'] }) export class TemplatePageComponent implements OnInit { - profileImageRoot: string = 'http://27.122.224.170:8011/ProfileImage'; + profileImageRoot = 'http://27.122.224.170:8011/ProfileImage'; userInfo: UserInfo = buddyData; @@ -27,6 +32,8 @@ export class TemplatePageComponent implements OnInit { companyCode: string = 'GUC006'; + roomInfo: RoomInfo = roomInfo; + constructor(private router: Router) {} ngOnInit() {} @@ -90,6 +97,22 @@ export const buddyData: UserInfo = { nickName: '채책임(닉)' }; +const roomInfo: RoomInfo = { + roomSeq: '2530', + roomType: RoomType.Single, + roomName: ' ', + finalEventType: EventType.Character, + finalEventMessage: '비밀 대화방입니다', + finalEventDate: '2019-09-30 13:57:06', + joinUserCount: 2, + noReadCnt: 0, + isAlarm: true, + isJoinRoom: true, + expiredFileStdSeq: 0, + isTimeRoom: true, + timeRoomInterval: 5 +}; + const companyList: Company[] = [ { companyCode: 'GUC002', diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts b/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts index 3c543f3e..2b8b8834 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts @@ -6,6 +6,7 @@ import { FlexLayoutModule } from '@angular/flex-layout'; import { MatButtonModule } from '@angular/material/button'; import { UCapUiChatModule } from '@ucap-webmessenger/ui-chat'; +import { UCapUiRoomModule } from '@ucap-webmessenger/ui-room'; import { UCapUiGroupModule } from '@ucap-webmessenger/ui-group'; import { UCapUiOrganizationModule } from '@ucap-webmessenger/ui-organization'; import { UCapUiProfileModule } from '@ucap-webmessenger/ui-profile'; @@ -21,6 +22,7 @@ import { COMPONENTS, MET_MODULES } from './components'; FlexLayoutModule, MatButtonModule, UCapUiChatModule, + UCapUiRoomModule, UCapUiGroupModule, UCapUiOrganizationModule, UCapUiProfileModule, diff --git a/projects/ucap-webmessenger-app/src/assets/images/img_nophoto_30.png b/projects/ucap-webmessenger-app/src/assets/images/img_nophoto_30.png new file mode 100644 index 0000000000000000000000000000000000000000..0db06d250496395181e27a3578df96c985fff196 GIT binary patch literal 1331 zcmV-31lppW|1(gy0kSsGAW0vXsv4~|7 z0?FdE8{lR%LqHSA7%@xzAmEfz!dGfXp`~9?ptq&wTy9J6?d^y0NeJBcd_3=Y&w0;# zkZf#hAO;))a00+f0Glk+wJEdVlN*&zTk05yP% z+@}6B@#~!N{V@^>Vd6G@RZJ)qS(E|j0-*UHq~L5doG+PB7$-v751>-0xVpNE@$qrU z<#I@+Qb;5ccsw5L?ChYhun^hV+2JfAd~So z@ALW4-`|h4v@{eH6ht}!b+GT?qplGnU0Pa#-EK#HeSHWiyK{*IH8nL@TwKKF=4K?~ zcQ_6nF;(y9Le0IsJ&cWwp{lAX#EaAEJ|Oo{*3biI}*` zsjBJR-xJfIh`YPH+30d|a*&soCt6^B*lafR_V%K&u`ycIUr@yP;iOcl?d|Qz%F2r7 zhy~@D?lYw+DJdzEYCh%oXgFzZZZ3w0huNc#1rCP;%gf79C=}7OA0=XCIB9x%I@^`H zy1Js$&dtrCr>6%M6%`@3KmyJ-}u?tSxik$p{S@RR#JkVh<}Skla9Qk zqy(LvoxJrcSFWJ4GUPFfhTn;JG!{*V-44yb0GgVbcGyO=kYdSJ2^dK=b7w&b|B$ zj%Gh3jFz|p&mv8OttYqG=8^|>pPu}jmj`hNm?1IF-!~PI9z2bM6Kv&G}+kZTyTMoeMVgI%~@)SC5jQQ2n z!4oI1bFHkdot{d3;JW`?W;MYl+s}q8E-~ywPlJIiWq%;`$z+h(%>mgRq{7K~$>-@{ z8y@kQYd?COdBrphUScEObpaglrd$QH*$gol4FABAyg$JB5)_bb9t;nz@Ek9fsw#hxNih!%JlvLRbGr;f*;!};%i=Gg>> zq(2QNWZu2S6Z#B#o5bUy`~5N8yC*caZ#r*{U{{n{r+EnS6W844$002ovPDHLkV1kOsg!upf literal 0 HcmV?d00001 diff --git a/projects/ucap-webmessenger-app/src/assets/images/img_nophoto_36.png b/projects/ucap-webmessenger-app/src/assets/images/img_nophoto_36.png new file mode 100644 index 0000000000000000000000000000000000000000..f4feed19afa1bbe3d31296bb0acd52f67b423e1c GIT binary patch literal 1628 zcmV-i2BZ0jP)a zc}!GS6vlrugNT3_L@;2Ks3}ryX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%BV!Qf@VaUB%e5Jr>v`jM!muWjwr#t~x=a#7LiDAA8)y!ip!-uZe@y`8 z-gg+gidJEJMkD5~#1T_oDjeJqG0NHwQ?-`2F+tzZwmtg-&gA@LGI81@F{{?5p)Fu6 zVBblfrNiD&cUV5OwF;J_arK0%+;Z)fQtF%TH$dYokX))z=s%bPJcVwbq3ddcU&W5S z##cQ?iJ{H-?|;cdQ`l=lmlX3?7|=O{0)<*wfYP{lqO!{JsYEf1gSTOiq=TZhxqzPs zh&Hyv+7b|jFApCzDs&koW@CCf)V@QYbv1dKgkCh^kJjcHd-;0sZT@@_Y#jCusQG;WPMkU|c$pwE6n-B$mxKE+O&8ntHbu*W?Tn!R22h9j%WoLS zUDruiFVTo;?ijYu*ElrIU>$D{*73$r6%K2+q;&|B;cwJ2XQ?v>mqwWN)n>X$} z;?2%A7=mDIzw7YdQ9p*>rX&u^n!C_+j$z16Y~vq=ovX)F)z#I*yLazSY}3hqI-o=^ z(x9l2Sfx=w?t;7>B{WgO0iCSRzgb*zvBh(!(U*78;!;^(&Fq;N+zWpl>$dMk#+nr! bF9+}+*e)T6t;=!000000NkvXXu0mjfqzH+< literal 0 HcmV?d00001 diff --git a/projects/ucap-webmessenger-app/src/assets/images/img_nophoto_88.png b/projects/ucap-webmessenger-app/src/assets/images/img_nophoto_88.png new file mode 100644 index 0000000000000000000000000000000000000000..73205f6b232db73b5e87599a8c125d50c8de0278 GIT binary patch literal 4573 zcmV<35hCu1P)3 z2Xs``y8bdLv;7}w z8cPDz07?H9zz+b90JsRi?2$=&fZ(bC`T^)G|LqRk2CxOdm-63kgS!a!0nih`NC3^` z>h%P;ilYIn2CxHwLF+MSO|Tz;0RSesakVN1SMmY?o26XW1Ue1d9V{oYE+3K$Ii_`T zjDxk}LW>pL2*6qZ4b*N}W1I&t9KcyMyHWG5`N~Hw`rnXT$T4&53*}r?fm$n=I_pjV ze^YB<9tKx&4*+*u9fle!xU+n`{;!Y=Ddx`0xw!;a2&Sqv3&2+Z0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~tuWaS`a2XaQq{6H#ur0hAh2(Bg4+km*5-+q`g1VuzbxI4kyPrMDVt4+mK=~ z!%$Cz(@AWEEY_UoZsC=cXIV!9lYbx*RTdG{AiQ)s7z0b#yv~mJ;+(q3IhutmE*y;G zCmc&5QA{w+*_E53klE=&mN&`y)qeR73ab{Mm);J+^hZ2Wcaw{ai-T`SDW03Pd7TaM zbym)4f6fmniL^uB3oI(204dj){F>a-DZeQN)a}IQYa#rt9R9gO~`872k^=BP&d;fS!JUs zfD8OUmy`fg5!5yAhpYBfxa+QRIw_(Qf!?rG2UU_HnVjv>_70eqJ6_I!OWIH zxvDUgbG#@VWw80V3^vGY7j7QarEZyh1m75-o;AnHQt2tra=Gr;>kPF zaSg^?G#Kf%n&PVi2kc&JlVC=8&)oP8Y3-d$XY$HShxz4A@wU`0t4mdAYF3fJV~-y{ zR^>PugQGl}W(q2OOgd#6$i5xVC*w%JWBuoW^ARs2j|-Y|qY zmk46VOy@BnV7#`=&NcF?=+TWPC zxVS66fg#t;zJ7Ln2Ic~V6nWIFf&SvBg^G&fVtf;gRRH)G9mMLtXJsnT00000NkvXX Hu0mjf{!zw5 literal 0 HcmV?d00001 diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/room.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/room.ts index 44d59952..90249964 100644 --- a/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/room.ts +++ b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/room.ts @@ -88,7 +88,7 @@ export const decodeRoomData: ProtocolDecoder = ( isJoinRoom: info[9] === 'Y' ? true : false, expiredFileStdSeq: Number(info[10]), isTimeRoom: info[11] === 'Y' ? true : false, - timeRoomInterval: info[11] !== 'Y' ? 0 : info[12] || 0 + timeRoomInterval: info[11] !== 'Y' ? 0 : Number(info[12]) || 0 }); } } diff --git a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html index 08c94fba..8c186d51 100644 --- a/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html +++ b/projects/ucap-webmessenger-ui-group/src/lib/components/expansion-panel.component.html @@ -1,44 +1,22 @@ + + + 즐겨찾기 + + + + {{ groupBuddy.group.name }} - + + + diff --git a/projects/ucap-webmessenger-ui-group/src/lib/ucap-ui-group.module.ts b/projects/ucap-webmessenger-ui-group/src/lib/ucap-ui-group.module.ts index bbbddf15..2130fef3 100644 --- a/projects/ucap-webmessenger-ui-group/src/lib/ucap-ui-group.module.ts +++ b/projects/ucap-webmessenger-ui-group/src/lib/ucap-ui-group.module.ts @@ -8,6 +8,7 @@ import { MatExpansionModule } from '@angular/material/expansion'; import { ExpansionPanelComponent } from './components/expansion-panel.component'; import { ExpansionPanelItemDirective } from './directives/expansion-panel-item.directive'; +import { UCapUiProfileModule } from '@ucap-webmessenger/ui-profile'; const COMPONENTS = [ExpansionPanelComponent]; const DIRECTIVES = [ExpansionPanelItemDirective]; @@ -16,6 +17,7 @@ const SERVICES = []; @NgModule({ imports: [ CommonModule, + UCapUiProfileModule, ReactiveFormsModule, FlexLayoutModule, MatExpansionModule diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html index 207d53c4..f9edff1a 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.html @@ -4,10 +4,8 @@ {{ presence.pcStatus }}
- +
@@ -17,11 +15,10 @@ {{ userInfo.deptName }} - 가나다라마바사아자차카파하가나다라마바사아자차카파하하가나다
- {{ userInfo.intro }}상태메시지 상태메시지 상태메시지 + {{ userInfo.intro }}
diff --git a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts index c67c3263..4b2ff2ea 100644 --- a/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts +++ b/projects/ucap-webmessenger-ui-profile/src/lib/components/user-list-item.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, Input } from '@angular/core'; +import { Component, OnInit, Input, OnDestroy } from '@angular/core'; import { UserInfo } from '@ucap-webmessenger/protocol-sync'; import { UserInfoSS, @@ -6,28 +6,47 @@ import { UserInfoDN } from '@ucap-webmessenger/protocol-query'; import { StatusBulkInfo, StatusInfo } from '@ucap-webmessenger/protocol-status'; +import { Store, select } from '@ngrx/store'; +import * as AppStore from '@app/store'; +import { Subscription } from 'rxjs'; +import { NGXLogger } from 'ngx-logger'; +import { tap } from 'rxjs/operators'; @Component({ selector: 'ucap-profile-user-list-item', templateUrl: './user-list-item.component.html', styleUrls: ['./user-list-item.component.scss'] }) -export class UserListItemComponent implements OnInit { +export class UserListItemComponent implements OnInit, OnDestroy { @Input() userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; - @Input() - profileImageRoot: string; - + profileImageRoot?: string; @Input() presence?: StatusBulkInfo | StatusInfo; - @Input() checkable = false; @Input() compactable = false; - constructor() {} + private profileImageRootSubscription: Subscription; - ngOnInit() {} + constructor(private store: Store, private logger: NGXLogger) {} + + ngOnInit() { + this.profileImageRootSubscription = this.store + .pipe( + select(AppStore.SettingSelector.VersionInfoSelector.profileImageRoot), + tap(profileImageRoot => { + this.profileImageRoot = this.profileImageRoot || profileImageRoot; + }) + ) + .subscribe(); + } + + ngOnDestroy(): void { + if (!!this.profileImageRootSubscription) { + this.profileImageRootSubscription.unsubscribe(); + } + } } diff --git a/projects/ucap-webmessenger-ui-profile/src/public-api.ts b/projects/ucap-webmessenger-ui-profile/src/public-api.ts index 75d7174e..2f183b98 100644 --- a/projects/ucap-webmessenger-ui-profile/src/public-api.ts +++ b/projects/ucap-webmessenger-ui-profile/src/public-api.ts @@ -3,5 +3,6 @@ */ export * from './lib/components/list-item.component'; +export * from './lib/components/user-list-item.component'; export * from './lib/ucap-ui-profile.module'; diff --git a/projects/ucap-webmessenger-ui-room/README.md b/projects/ucap-webmessenger-ui-room/README.md new file mode 100644 index 00000000..8c7a62b4 --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/README.md @@ -0,0 +1,24 @@ +# UcapWebmessengerUiChat + +This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.2.5. + +## Code scaffolding + +Run `ng generate component component-name --project ucap-webmessenger-ui-room` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ucap-webmessenger-ui-room`. +> Note: Don't forget to add `--project ucap-webmessenger-ui-room` or else it will be added to the default project in your `angular.json` file. + +## Build + +Run `ng build ucap-webmessenger-ui-room` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Publishing + +After building your library with `ng build ucap-webmessenger-ui-room`, go to the dist folder `cd dist/ucap-webmessenger-ui-room` and run `npm publish`. + +## Running unit tests + +Run `ng test ucap-webmessenger-ui-room` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/projects/ucap-webmessenger-ui-room/karma.conf.js b/projects/ucap-webmessenger-ui-room/karma.conf.js new file mode 100644 index 00000000..bf190341 --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/karma.conf.js @@ -0,0 +1,32 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, '../../coverage/ucap-webmessenger-ui-room'), + reports: ['html', 'lcovonly', 'text-summary'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false, + restartOnFileChange: true + }); +}; diff --git a/projects/ucap-webmessenger-ui-room/ng-package.json b/projects/ucap-webmessenger-ui-room/ng-package.json new file mode 100644 index 00000000..22596c3c --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/ucap-webmessenger-ui-room", + "lib": { + "entryFile": "src/public-api.ts" + } +} \ No newline at end of file diff --git a/projects/ucap-webmessenger-ui-room/package.json b/projects/ucap-webmessenger-ui-room/package.json new file mode 100644 index 00000000..30a0842a --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/package.json @@ -0,0 +1,8 @@ +{ + "name": "@ucap-webmessenger/ui-room", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^8.2.5", + "@angular/core": "^8.2.5" + } +} diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html new file mode 100644 index 00000000..5d48007e --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.html @@ -0,0 +1,5 @@ +
+
{{ getRoomName(roomInfo) }}
+
{{ roomInfo.finalEventDate }}
+
{{ roomInfo.finalEventMessage }}
+
diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.scss b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.scss new file mode 100644 index 00000000..358a7c6a --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.scss @@ -0,0 +1,46 @@ +.profile { + white-space: normal; + text-align: left; + letter-spacing: 0.01em; + min-height: 88px; + border-bottom: 1px solid; + padding: 16px; + font-weight: 400; + border-radius: 0; + + .avatar-wrapper { + .avatar { + margin-right: 16px; + } + } + + .profile-name { + font-size: 16px; + white-space: nowrap; + text-overflow: ellipsis; + } + + .profile-last-message { + line-height: normal; + margin-top: 0; + } + + .profile-last-message-time { + font-size: 12px; + margin-top: 4px; + } + + .profile-mood { + line-height: normal; + margin: 0; + } + + .unread-message-count { + font-size: 12px; + border-radius: 50%; + text-align: center; + width: 20px; + height: 20px; + line-height: 20px; + } +} diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.spec.ts b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.spec.ts new file mode 100644 index 00000000..8c516af5 --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListItemComponent } from './list-item.component'; + +describe('ListItemComponent', () => { + let component: ListItemComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ListItemComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListItemComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts new file mode 100644 index 00000000..19e94f31 --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/src/lib/components/list-item.component.ts @@ -0,0 +1,44 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { + RoomInfo, + UserInfoShort, + UserInfo as RoomUserInfo +} from '@ucap-webmessenger/protocol-room'; +import { NGXLogger } from 'ngx-logger'; + +@Component({ + selector: 'ucap-room-list-item', + templateUrl: './list-item.component.html', + styleUrls: ['./list-item.component.scss'] +}) +export class ListItemComponent implements OnInit { + @Input() + roomInfo: RoomInfo; + + @Input() + roomUserInfo: RoomUserInfo[] | UserInfoShort[]; + + constructor(private logger: NGXLogger) {} + + ngOnInit() { + // this.logger.debug(this.roomInfo); + } + + getRoomName(roomInfo: RoomInfo): string { + if (!!roomInfo.roomName && '' !== roomInfo.roomName.trim()) { + return roomInfo.roomName; + } + + if (!!this.roomUserInfo && 0 < this.roomUserInfo.length) { + let roomName = ''; + this.roomUserInfo.forEach((roomUserInfo, index) => { + if (0 === index) { + roomName = roomName.concat('', roomUserInfo.name); + } else { + roomName = roomName.concat(',', roomUserInfo.name); + } + }); + return roomName; + } + } +} diff --git a/projects/ucap-webmessenger-ui-room/src/lib/ucap-ui-room.module.ts b/projects/ucap-webmessenger-ui-room/src/lib/ucap-ui-room.module.ts new file mode 100644 index 00000000..8d3d1690 --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/src/lib/ucap-ui-room.module.ts @@ -0,0 +1,35 @@ +import { NgModule, ModuleWithProviders } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; + +import { FlexLayoutModule } from '@angular/flex-layout'; + +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; +import { ListItemComponent } from './components/list-item.component'; + +const COMPONENTS = [ListItemComponent]; +const SERVICES = []; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + ReactiveFormsModule, + FlexLayoutModule, + MatFormFieldModule, + MatIconModule, + MatInputModule + ], + exports: [...COMPONENTS], + declarations: [...COMPONENTS] +}) +export class UCapUiRoomModule { + public static forRoot(): ModuleWithProviders { + return { + ngModule: UCapUiRoomModule, + providers: [...SERVICES] + }; + } +} diff --git a/projects/ucap-webmessenger-ui-room/src/public-api.ts b/projects/ucap-webmessenger-ui-room/src/public-api.ts new file mode 100644 index 00000000..86ea1aa6 --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/src/public-api.ts @@ -0,0 +1,7 @@ +/* + * Public API Surface of ucap-webmessenger-ui-room + */ + +export * from './lib/components/list-item.component'; + +export * from './lib/ucap-ui-room.module'; diff --git a/projects/ucap-webmessenger-ui-room/src/test.ts b/projects/ucap-webmessenger-ui-room/src/test.ts new file mode 100644 index 00000000..978c64fb --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/src/test.ts @@ -0,0 +1,21 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/zone'; +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().map(context); diff --git a/projects/ucap-webmessenger-ui-room/tsconfig.lib.json b/projects/ucap-webmessenger-ui-room/tsconfig.lib.json new file mode 100644 index 00000000..bd23948e --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/tsconfig.lib.json @@ -0,0 +1,26 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/lib", + "target": "es2015", + "declaration": true, + "inlineSources": true, + "types": [], + "lib": [ + "dom", + "es2018" + ] + }, + "angularCompilerOptions": { + "annotateForClosureCompiler": true, + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true, + "enableResourceInlining": true + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/projects/ucap-webmessenger-ui-room/tsconfig.spec.json b/projects/ucap-webmessenger-ui-room/tsconfig.spec.json new file mode 100644 index 00000000..16da33db --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/tsconfig.spec.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "src/test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/projects/ucap-webmessenger-ui-room/tslint.json b/projects/ucap-webmessenger-ui-room/tslint.json new file mode 100644 index 00000000..0526d2a3 --- /dev/null +++ b/projects/ucap-webmessenger-ui-room/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "ucapChat", + "camelCase" + ], + "component-selector": [ + true, + "element", + "ucap-room", + "kebab-case" + ] + } +} diff --git a/tsconfig.json b/tsconfig.json index ee295a3c..f79668c2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -39,6 +39,9 @@ "@ucap-webmessenger/ui-chat": [ "projects/ucap-webmessenger-ui-chat/src/public-api" ], + "@ucap-webmessenger/ui-room": [ + "projects/ucap-webmessenger-ui-room/src/public-api" + ], "@ucap-webmessenger/ui-group": [ "projects/ucap-webmessenger-ui-group/src/public-api" ],