2 |
3 |
4 |
5 |
6 | android
7 |
8 |
9 |
10 | {{msg.text}}
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{msg.text}}
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/chat-bot/src/app/chat-msg/chat-msg.component.js:
--------------------------------------------------------------------------------
1 | "use strict";
2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6 | return c > 3 && r && Object.defineProperty(target, key, r), r;
7 | };
8 | exports.__esModule = true;
9 | var core_1 = require("@angular/core");
10 | var ChatMsgComponent = /** @class */ (function () {
11 | function ChatMsgComponent() {
12 | this.isVisible = false;
13 | }
14 | ChatMsgComponent.prototype.ngOnInit = function () {
15 | var _this = this;
16 | setTimeout(function () { _this.isVisible = true; }, 0);
17 | };
18 | __decorate([
19 | core_1.Input()
20 | ], ChatMsgComponent.prototype, "msg");
21 | ChatMsgComponent = __decorate([
22 | core_1.Component({
23 | selector: 'chat-msg',
24 | templateUrl: './chat-msg.component.html',
25 | styleUrls: ['./chat-msg.component.css']
26 | })
27 | ], ChatMsgComponent);
28 | return ChatMsgComponent;
29 | }());
30 | exports.ChatMsgComponent = ChatMsgComponent;
31 |
--------------------------------------------------------------------------------
/chat-bot/src/app/chat-msg/chat-msg.component.ts:
--------------------------------------------------------------------------------
1 | import {Component, Input, OnInit} from '@angular/core';
2 |
3 | @Component({
4 | selector: 'chat-msg',
5 | templateUrl: './chat-msg.component.html',
6 | styleUrls: ['./chat-msg.component.css'],
7 | })
8 | export class ChatMsgComponent implements OnInit {
9 | @Input() msg: object;
10 | public isVisible = false;
11 | constructor() { }
12 |
13 | ngOnInit() {
14 | setTimeout(() => {this.isVisible = true}, 0)
15 | }
16 |
17 |
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/chat-bot/src/app/chat-window/chat-window.component.css:
--------------------------------------------------------------------------------
1 | .chat-window {
2 | display: flex;
3 | flex-direction: column;
4 | justify-content: space-between;
5 | width: 100%;
6 | background-color: #d219192e;
7 | padding: 5px;
8 | }
9 |
10 | .msgArea {
11 | display: flex;
12 | flex-direction: column;
13 | overflow: auto;
14 | height: 100%;
15 | }
16 | .input-area {
17 | display: flex;
18 | width: 100%;
19 | }
20 |
--------------------------------------------------------------------------------
/chat-bot/src/app/chat-window/chat-window.component.html:
--------------------------------------------------------------------------------
1 |