Files
doneit-web/.angular/cache/14.2.12/babel-webpack/1c6d6c378db283beed27336650e3706a.json
T

1 line
9.8 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { __decorate } from \"tslib\";\nimport __NG_CLI_RESOURCE__0 from \"./contacts.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./contacts.page.scss?ngResource\";\nimport { HttpClient } from '@angular/common/http';\nimport { Component } from '@angular/core';\nimport { ModalController } from '@ionic/angular';\nimport { AuthService } from 'src/app/services/auth.service';\nimport { ChatService } from 'src/app/services/chat.service';\nimport { MessagesPage } from '../messages.page';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { ChatSystemService } from 'src/app/services/chat/chat-system.service';\nimport { SessionStore } from 'src/app/store/session.service';\nlet ContactsPage = class ContactsPage {\n constructor(modalController, http, chatService, authService, ThemeService, ChatSystemService) {\n this.modalController = modalController;\n this.http = http;\n this.chatService = chatService;\n this.authService = authService;\n this.ThemeService = ThemeService;\n this.ChatSystemService = ChatSystemService;\n this.users = [];\n this.sessionStore = SessionStore;\n this.userList = this.ChatSystemService.users;\n this.loggedUser = SessionStore.user.ChatData['data'];\n this.textSearch = \"\";\n this.dm = null;\n this.room = null;\n }\n ngOnInit() {\n // this.chatService.refreshtoken();\n // this.loadUsers();\n }\n onChange(event) {\n this.textSearch = event.detail.value.toLowerCase();\n this.userList = this.ChatSystemService.users.filter(e => {\n const username = e.name.toLowerCase();\n return username.includes(this.textSearch);\n });\n }\n separateLetter(record, recordIndex, records) {\n if (recordIndex == 0) {\n return record.name[0];\n }\n let first_prev = records[recordIndex - 1].name[0];\n let first_current = record.name[0];\n if (first_prev != first_current) {\n return first_current;\n }\n return null;\n }\n doRefresh(event) {}\n close() {\n this.modalController.dismiss({});\n }\n clicked() {}\n createRoom(username) {\n var _this = this;\n let body = {\n username: username\n };\n this.chatService.createRoom(body).subscribe( /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (res) {\n _this.room = res['room'];\n yield _this.ChatSystemService.getAllRooms();\n _this.getDirectMessage(_this.room._id);\n });\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n }\n getDirectMessage(roomId) {\n this.openModal(roomId);\n }\n openModal(roomId) {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n _this2.close();\n const modal = yield _this2.modalController.create({\n component: MessagesPage,\n cssClass: 'group-messages',\n componentProps: {\n roomId: roomId\n }\n });\n yield modal.present();\n modal.onDidDismiss();\n })();\n }\n};\nContactsPage.ctorParameters = () => [{\n type: ModalController\n}, {\n type: HttpClient\n}, {\n type: ChatService\n}, {\n type: AuthService\n}, {\n type: ThemeService\n}, {\n type: ChatSystemService\n}];\nContactsPage = __decorate([Component({\n selector: 'app-contacts',\n template: __NG_CLI_RESOURCE__0,\n styles: [__NG_CLI_RESOURCE__1]\n})], ContactsPage);\nexport { ContactsPage };","map":{"version":3,"mappings":";;;;AAAA,SAASA,UAAU,QAAwC,sBAAsB;AACjF,SAASC,SAAS,QAAgB,eAAe;AACjD,SAASC,eAAe,QAAQ,gBAAgB;AAChD,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,WAAW,QAAQ,+BAA+B;AAC3D,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,iBAAiB,QAAO,2CAA2C;AAC5E,SAASC,YAAY,QAAQ,+BAA+B;AAOrD,IAAMC,YAAY,GAAlB,MAAMA,YAAY;EAYvBC,YACUC,eAAgC,EAChCC,IAAgB,EAChBC,WAAwB,EACxBC,WAAwB,EACzBR,YAA0B,EAC1BC,iBAAoC;IALnC,oBAAe,GAAfI,eAAe;IACf,SAAI,GAAJC,IAAI;IACJ,gBAAW,GAAXC,WAAW;IACX,gBAAW,GAAXC,WAAW;