@hivegpt/hiveai-angular 0.0.380 → 0.0.382
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/bundles/hivegpt-hiveai-angular.umd.js +3145 -0
- package/bundles/hivegpt-hiveai-angular.umd.js.map +1 -0
- package/bundles/hivegpt-hiveai-angular.umd.min.js +2 -0
- package/bundles/hivegpt-hiveai-angular.umd.min.js.map +1 -0
- package/environments/environment.d.ts +15 -0
- package/environments/environment.d.ts.map +1 -0
- package/esm2015/environments/environment.js +15 -0
- package/esm2015/hivegpt-hiveai-angular.js +13 -0
- package/esm2015/lib/components/NotificationSocket.js +39 -0
- package/esm2015/lib/components/bot-html-editor/bot-html-editor.component.js +112 -0
- package/esm2015/lib/components/bot.service.js +50 -0
- package/esm2015/lib/components/chat-drawer/chat-drawer.component.js +1743 -0
- package/esm2015/lib/components/chatbot/chatbot.component.js +50 -0
- package/esm2015/lib/components/conversation.service.js +49 -0
- package/esm2015/lib/components/socket-service.service.js +72 -0
- package/esm2015/lib/components/translations/translation.service.js +244 -0
- package/esm2015/lib/components/video-player/video-player.component.js +123 -0
- package/esm2015/lib/hivegpt.module.js +21 -0
- package/esm2015/lib/models/video.js +2 -0
- package/esm2015/lib/pipes/safe-html.pipe.js +19 -0
- package/esm2015/lib/utils/utils.js +36 -0
- package/esm2015/public-api.js +7 -0
- package/fesm2015/hivegpt-hiveai-angular.js +2541 -0
- package/fesm2015/hivegpt-hiveai-angular.js.map +1 -0
- package/hivegpt-hiveai-angular.d.ts +13 -0
- package/hivegpt-hiveai-angular.d.ts.map +1 -0
- package/hivegpt-hiveai-angular.metadata.json +1 -0
- package/lib/components/NotificationSocket.d.ts +5 -0
- package/lib/components/NotificationSocket.d.ts.map +1 -0
- package/lib/components/bot-html-editor/bot-html-editor.component.d.ts +36 -0
- package/lib/components/bot-html-editor/bot-html-editor.component.d.ts.map +1 -0
- package/lib/components/bot.service.d.ts +12 -0
- package/lib/components/bot.service.d.ts.map +1 -0
- package/lib/components/chat-drawer/chat-drawer.component.d.ts +255 -0
- package/lib/components/chat-drawer/chat-drawer.component.d.ts.map +1 -0
- package/lib/components/chatbot/chatbot.component.d.ts +36 -0
- package/lib/components/chatbot/chatbot.component.d.ts.map +1 -0
- package/lib/components/conversation.service.d.ts +13 -0
- package/lib/components/conversation.service.d.ts.map +1 -0
- package/lib/components/socket-service.service.d.ts +20 -0
- package/lib/components/socket-service.service.d.ts.map +1 -0
- package/lib/components/translations/translation.service.d.ts +8 -0
- package/lib/components/translations/translation.service.d.ts.map +1 -0
- package/lib/components/video-player/video-player.component.d.ts +36 -0
- package/lib/components/video-player/video-player.component.d.ts.map +1 -0
- package/lib/hivegpt.module.d.ts +3 -0
- package/lib/hivegpt.module.d.ts.map +1 -0
- package/lib/models/video.d.ts +35 -0
- package/lib/models/video.d.ts.map +1 -0
- package/lib/pipes/safe-html.pipe.d.ts +8 -0
- package/lib/pipes/safe-html.pipe.d.ts.map +1 -0
- package/lib/utils/utils.d.ts +3 -0
- package/lib/utils/utils.d.ts.map +1 -0
- package/package.json +20 -20
- package/{src/public-api.ts → public-api.d.ts} +4 -7
- package/public-api.d.ts.map +1 -0
- package/karma.conf.js +0 -32
- package/ng-package.json +0 -7
- package/src/environments/environment.ts +0 -19
- package/src/lib/components/NotificationSocket.ts +0 -38
- package/src/lib/components/bot-html-editor/bot-html-editor.component.css +0 -10
- package/src/lib/components/bot-html-editor/bot-html-editor.component.html +0 -11
- package/src/lib/components/bot-html-editor/bot-html-editor.component.spec.ts +0 -25
- package/src/lib/components/bot-html-editor/bot-html-editor.component.ts +0 -152
- package/src/lib/components/bot.service.ts +0 -52
- package/src/lib/components/chat-drawer/chat-drawer.component.html +0 -1586
- package/src/lib/components/chat-drawer/chat-drawer.component.scss +0 -2907
- package/src/lib/components/chat-drawer/chat-drawer.component.ts +0 -2143
- package/src/lib/components/chatbot/chatbot.component.html +0 -37
- package/src/lib/components/chatbot/chatbot.component.scss +0 -97
- package/src/lib/components/chatbot/chatbot.component.ts +0 -44
- package/src/lib/components/conversation.service.spec.ts +0 -16
- package/src/lib/components/conversation.service.ts +0 -54
- package/src/lib/components/socket-service.service.spec.ts +0 -16
- package/src/lib/components/socket-service.service.ts +0 -77
- package/src/lib/components/translations/translation.service.ts +0 -221
- package/src/lib/components/video-player/video-player.component.html +0 -51
- package/src/lib/components/video-player/video-player.component.scss +0 -262
- package/src/lib/components/video-player/video-player.component.ts +0 -148
- package/src/lib/hivegpt.module.ts +0 -18
- package/src/lib/models/video.ts +0 -36
- package/src/lib/pipes/safe-html.pipe.ts +0 -16
- package/src/lib/utils/utils.ts +0 -37
- package/tsconfig.lib.json +0 -25
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -17
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
.video-wrapper {
|
|
2
|
-
position: relative;
|
|
3
|
-
&:hover {
|
|
4
|
-
video {
|
|
5
|
-
//transform: scale(1.02);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
video {
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 330px;
|
|
11
|
-
outline: 0;
|
|
12
|
-
object-fit: cover;
|
|
13
|
-
border-radius: 5px;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
transition: 0.3s ease-in-out;
|
|
16
|
-
@media only screen and (max-width: 576px) {
|
|
17
|
-
//height: 75vh;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
.video-actions {
|
|
21
|
-
position: absolute;
|
|
22
|
-
right: 10px;
|
|
23
|
-
top: 10px;
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
.action {
|
|
27
|
-
margin-bottom: 5px;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
color: #fff;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
.author-details {
|
|
33
|
-
display: flex;
|
|
34
|
-
position: absolute;
|
|
35
|
-
bottom: 18px;
|
|
36
|
-
left: 12px;
|
|
37
|
-
right: 12px;
|
|
38
|
-
transition: 0.3s ease-in-out;
|
|
39
|
-
justify-content: flex-start;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
|
|
42
|
-
.author-image {
|
|
43
|
-
// margin-bottom: 5px;
|
|
44
|
-
margin-right: 6px;
|
|
45
|
-
width: 34px;
|
|
46
|
-
height: 34px;
|
|
47
|
-
border-radius: 50%;
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
img {
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: 100%;
|
|
52
|
-
object-fit: cover;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
.author-name {
|
|
56
|
-
font-size: 14px;
|
|
57
|
-
mix-blend-mode: hard-light;
|
|
58
|
-
color: #ffffff;
|
|
59
|
-
display: block;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.video-title{
|
|
63
|
-
font-size: 14px;
|
|
64
|
-
mix-blend-mode: hard-light;
|
|
65
|
-
color: #ffffff;
|
|
66
|
-
display: block;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
.connect-btn {
|
|
70
|
-
width: 100%;
|
|
71
|
-
position: absolute;
|
|
72
|
-
bottom: 20px;
|
|
73
|
-
text-align: center;
|
|
74
|
-
outline: 0;
|
|
75
|
-
opacity: 0;
|
|
76
|
-
transition: 0.3s ease-in-out;
|
|
77
|
-
@media only screen and (max-width: 576px) {
|
|
78
|
-
opacity: 1;
|
|
79
|
-
width: unset;
|
|
80
|
-
right: 20px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
button {
|
|
84
|
-
margin: auto;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
&:hover {
|
|
88
|
-
.author-details {
|
|
89
|
-
opacity: 0;
|
|
90
|
-
@media only screen and (max-width: 576px) {
|
|
91
|
-
opacity: 1;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
.connect-btn {
|
|
95
|
-
opacity: 1;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
.half-opacity {
|
|
99
|
-
opacity: 0.2;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.no-opacity {
|
|
103
|
-
background-color: transparent;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.like-btn {
|
|
108
|
-
text-align: center;
|
|
109
|
-
margin-bottom: 20px;
|
|
110
|
-
transition: 0.2s ease-in-out;
|
|
111
|
-
.count {
|
|
112
|
-
font-size: 16px;
|
|
113
|
-
margin-left: 3px;
|
|
114
|
-
}
|
|
115
|
-
span {
|
|
116
|
-
cursor: pointer;
|
|
117
|
-
font-size: 30px;
|
|
118
|
-
}
|
|
119
|
-
&:hover {
|
|
120
|
-
transform: scale(1.1);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&.like {
|
|
124
|
-
color: #025be7;
|
|
125
|
-
}
|
|
126
|
-
&.dislike {
|
|
127
|
-
color: #8d8d8d;
|
|
128
|
-
}
|
|
129
|
-
&.info {
|
|
130
|
-
color: #aeae3f;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.full-screen {
|
|
135
|
-
&.show {
|
|
136
|
-
width: 100%;
|
|
137
|
-
height: 100%;
|
|
138
|
-
position: fixed;
|
|
139
|
-
top: 0;
|
|
140
|
-
left: 0;
|
|
141
|
-
display: flex;
|
|
142
|
-
justify-content: center;
|
|
143
|
-
align-items: center;
|
|
144
|
-
background: #1b1a1af5;
|
|
145
|
-
z-index: 9999;
|
|
146
|
-
.video-wrapper {
|
|
147
|
-
video {
|
|
148
|
-
transition: none;
|
|
149
|
-
transform: none !important;
|
|
150
|
-
width: 300px;
|
|
151
|
-
height: 270px;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
.close-btn {
|
|
156
|
-
position: absolute;
|
|
157
|
-
left: 10px;
|
|
158
|
-
top: 10px;
|
|
159
|
-
cursor: pointer;
|
|
160
|
-
span {
|
|
161
|
-
color: #fff;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.main-controls {
|
|
167
|
-
top: 0;
|
|
168
|
-
left: 0;
|
|
169
|
-
right: 0;
|
|
170
|
-
bottom: 0;
|
|
171
|
-
position: absolute;
|
|
172
|
-
display: flex;
|
|
173
|
-
align-items: center;
|
|
174
|
-
justify-content: center;
|
|
175
|
-
background-color: rgb(0 0 0 / 30%);
|
|
176
|
-
|
|
177
|
-
.play-pause-btn {
|
|
178
|
-
// line-height: 0;
|
|
179
|
-
// color: #fff;
|
|
180
|
-
// display: flex;
|
|
181
|
-
// align-items: center;
|
|
182
|
-
// justify-content: center;
|
|
183
|
-
line-height: 0;
|
|
184
|
-
color: #fff;
|
|
185
|
-
display: flex;
|
|
186
|
-
align-items: center;
|
|
187
|
-
justify-content: center;
|
|
188
|
-
background: none;
|
|
189
|
-
border: none;
|
|
190
|
-
position: absolute;
|
|
191
|
-
top: 34%;
|
|
192
|
-
&.playing {
|
|
193
|
-
position: absolute;
|
|
194
|
-
top: 40%;
|
|
195
|
-
left: 50%;
|
|
196
|
-
transform: translate(-50%, -50%);
|
|
197
|
-
cursor: pointer;
|
|
198
|
-
span {
|
|
199
|
-
//font-size: 65px;
|
|
200
|
-
color: #fff;
|
|
201
|
-
text-shadow: 0px 0px 6px rgb(47 47 47 / 36%);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
&:focus {
|
|
205
|
-
outline: none;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.material-icons {
|
|
209
|
-
font-size: 40px;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.mat-icon {
|
|
213
|
-
height: auto;
|
|
214
|
-
width: auto;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
.half-opacity {
|
|
218
|
-
opacity: 0.2;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.no-opacity {
|
|
222
|
-
background-color: transparent;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
button.transparent-btn {
|
|
227
|
-
background: transparent;
|
|
228
|
-
border: 0 !important;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.pause_btn {
|
|
232
|
-
width: 100%;
|
|
233
|
-
height: 100%;
|
|
234
|
-
|
|
235
|
-
&:hover {
|
|
236
|
-
opacity: 1 !important;
|
|
237
|
-
background-color: #000000bd;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
opacity: 0.02 !important;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.hide-pause-btn {
|
|
244
|
-
opacity: 0 !important;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.no-photo{
|
|
248
|
-
height: 35px;
|
|
249
|
-
width: 35px;
|
|
250
|
-
display: flex;
|
|
251
|
-
align-items: center;
|
|
252
|
-
justify-content: center;
|
|
253
|
-
font-size: 14px;
|
|
254
|
-
}
|
|
255
|
-
.overlymask-video {
|
|
256
|
-
background-image: linear-gradient(#ffffff0f, #0000002e);
|
|
257
|
-
position: absolute;
|
|
258
|
-
width: 100%;
|
|
259
|
-
height: 275px;
|
|
260
|
-
z-index: 0;
|
|
261
|
-
background-position: 0 bottom;
|
|
262
|
-
}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterViewInit,
|
|
3
|
-
ChangeDetectorRef,
|
|
4
|
-
Component,
|
|
5
|
-
ElementRef,
|
|
6
|
-
EventEmitter,
|
|
7
|
-
Inject,
|
|
8
|
-
Input,
|
|
9
|
-
OnInit,
|
|
10
|
-
Output,
|
|
11
|
-
ViewChild,
|
|
12
|
-
} from '@angular/core';
|
|
13
|
-
import { IVideo } from '../../models/video';
|
|
14
|
-
import { DOCUMENT } from '@angular/common';
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'app-video-player',
|
|
18
|
-
templateUrl: './video-player.component.html',
|
|
19
|
-
styleUrls: ['./video-player.component.scss'],
|
|
20
|
-
})
|
|
21
|
-
export class VideoPlayerComponent
|
|
22
|
-
implements OnInit, AfterViewInit {
|
|
23
|
-
@Input() currentUserId: string;
|
|
24
|
-
@Input() user: any;
|
|
25
|
-
@Input() eventId: string;
|
|
26
|
-
@Input() videoObj: IVideo;
|
|
27
|
-
@Input() isDev: boolean;
|
|
28
|
-
myFollowingList: Array<string>;
|
|
29
|
-
myPendingSentRequests: Array<string>;
|
|
30
|
-
@Input() type: string;
|
|
31
|
-
isMuted: boolean = true;
|
|
32
|
-
private observer: IntersectionObserver;
|
|
33
|
-
isFullscreen: boolean = false;
|
|
34
|
-
@ViewChild('video') video: any;
|
|
35
|
-
@ViewChild('fullscreenvideo') fullscreenvideo: any;
|
|
36
|
-
isFullscreenvideoPlaying: boolean = false;
|
|
37
|
-
|
|
38
|
-
@Output() connectWithUser = new EventEmitter<string>();
|
|
39
|
-
@Output() scheduleMeeting = new EventEmitter<any>();
|
|
40
|
-
|
|
41
|
-
constructor(
|
|
42
|
-
@Inject(DOCUMENT) private doc: any,
|
|
43
|
-
private el: ElementRef,
|
|
44
|
-
private cdr: ChangeDetectorRef
|
|
45
|
-
) {
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
ngOnInit(): void {
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
toggleSound(isMuted = null) {
|
|
52
|
-
this.isMuted = isMuted != null ? isMuted : !this.isMuted;
|
|
53
|
-
setTimeout(() => {
|
|
54
|
-
const video: any = this.doc
|
|
55
|
-
.getElementById(this.video.id.toString());
|
|
56
|
-
if (video) {
|
|
57
|
-
video.muted = this.isMuted;
|
|
58
|
-
this.video.isMuted = this.isMuted;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
this.cdr.markForCheck();
|
|
62
|
-
//this.muteToggle.emit(this.isMuted);
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
togglePlay(playState: boolean, videoEl) {
|
|
67
|
-
this.videoObj.isPlaying = !this.videoObj.isPlaying;
|
|
68
|
-
setTimeout(() => {
|
|
69
|
-
if (playState) {
|
|
70
|
-
this.videoObj.isPlaying = true;
|
|
71
|
-
videoEl.play();
|
|
72
|
-
var pauseBtn = document.getElementById('pause-btn');
|
|
73
|
-
pauseBtn.classList.add('hide-pause-btn');
|
|
74
|
-
|
|
75
|
-
this.toggleSound(false);
|
|
76
|
-
}
|
|
77
|
-
else{
|
|
78
|
-
this.videoObj.isPlaying = false;
|
|
79
|
-
videoEl.pause();
|
|
80
|
-
}
|
|
81
|
-
this.cdr.markForCheck();
|
|
82
|
-
})
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
ngAfterViewInit() {
|
|
86
|
-
if (window.innerWidth <= 576) {
|
|
87
|
-
this.observer = new IntersectionObserver(
|
|
88
|
-
(entries) => {
|
|
89
|
-
if (entries[0].isIntersecting === true) {
|
|
90
|
-
this.video.nativeElement.play();
|
|
91
|
-
} else {
|
|
92
|
-
this.video.nativeElement.pause();
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
threshold: 0.75,
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
this.observer.observe(this.el.nativeElement as HTMLElement);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
toggleFullscreen() {
|
|
105
|
-
this.isFullscreen = !this.isFullscreen;
|
|
106
|
-
if (!this.isFullscreen) {
|
|
107
|
-
this.fullscreenvideo.nativeElement.pause();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
toggleFullscreenPlay() {
|
|
112
|
-
this.isFullscreenvideoPlaying = !this.isFullscreenvideoPlaying;
|
|
113
|
-
|
|
114
|
-
if (this.isFullscreenvideoPlaying) {
|
|
115
|
-
this.fullscreenvideo.nativeElement.play();
|
|
116
|
-
} else {
|
|
117
|
-
this.fullscreenvideo.nativeElement.pause();
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
followUser(userId) {
|
|
122
|
-
this.connectWithUser.emit(userId);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
checkPendingSentRequest(userId) {
|
|
126
|
-
return this.myPendingSentRequests?.find(a => a == userId);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
canUnfollowUser() {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
canFollowUser() {
|
|
134
|
-
return true;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
getIniNames(firstName, lastName) {
|
|
138
|
-
if(!firstName && !lastName) {
|
|
139
|
-
return '';
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if (firstName && lastName)
|
|
143
|
-
return (
|
|
144
|
-
firstName.charAt(0).toUpperCase() + lastName.charAt(0).toUpperCase()
|
|
145
|
-
);
|
|
146
|
-
else return firstName.charAt(0).toUpperCase();
|
|
147
|
-
}
|
|
148
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { FormsModule } from '@angular/forms';
|
|
4
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
-
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
6
|
-
import { ChatDrawerComponent } from './components/chat-drawer/chat-drawer.component';
|
|
7
|
-
import { ChatBotComponent } from './components/chatbot/chatbot.component';
|
|
8
|
-
import { SafeHtmlPipe } from './pipes/safe-html.pipe';
|
|
9
|
-
import { VideoPlayerComponent } from './components/video-player/video-player.component';
|
|
10
|
-
import { QuillModule } from 'ngx-quill';
|
|
11
|
-
import { BotHtmlEditorComponent } from './components/bot-html-editor/bot-html-editor.component';
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
declarations: [ChatBotComponent, ChatDrawerComponent, VideoPlayerComponent, SafeHtmlPipe, BotHtmlEditorComponent],
|
|
15
|
-
imports: [CommonModule, MatIconModule, MatSidenavModule, FormsModule, QuillModule],
|
|
16
|
-
exports: [ChatBotComponent, ChatDrawerComponent, VideoPlayerComponent]
|
|
17
|
-
})
|
|
18
|
-
export class HiveGptModule { }
|
package/src/lib/models/video.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export interface IVideo {
|
|
2
|
-
id: string;
|
|
3
|
-
title: string;
|
|
4
|
-
url: string;
|
|
5
|
-
thumbnail: string;
|
|
6
|
-
isPlaying: boolean;
|
|
7
|
-
userId: string;
|
|
8
|
-
eventId: string;
|
|
9
|
-
aoiIds: string[];
|
|
10
|
-
insertTimeStamp: string;
|
|
11
|
-
isDeleted: boolean;
|
|
12
|
-
appropriate: Appropriate[];
|
|
13
|
-
isIntroVideo: boolean;
|
|
14
|
-
videoRating: VideoRating[];
|
|
15
|
-
likes: VideoLike[];
|
|
16
|
-
vttUrl: string;
|
|
17
|
-
processedUrls: string;
|
|
18
|
-
duration: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface VideoRating {
|
|
22
|
-
userId: string;
|
|
23
|
-
rateValue: string;
|
|
24
|
-
insertTimeStamp: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
interface VideoLike {
|
|
28
|
-
userId: string;
|
|
29
|
-
isLiked: boolean;
|
|
30
|
-
insertTimeStamp: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface Appropriate {
|
|
34
|
-
userId: string;
|
|
35
|
-
insertTimeStamp: string;
|
|
36
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
-
|
|
4
|
-
@Pipe({
|
|
5
|
-
name: 'safeHtml',
|
|
6
|
-
})
|
|
7
|
-
export class SafeHtmlPipe implements PipeTransform {
|
|
8
|
-
|
|
9
|
-
constructor(private sanitizer: DomSanitizer) {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
transform(html): unknown {
|
|
13
|
-
return html ? this.sanitizer.bypassSecurityTrustHtml(html) : '';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
}
|
package/src/lib/utils/utils.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const formatHoursAndMinutes = (date: Date) => {
|
|
2
|
-
let hours = date.getHours() % 12;
|
|
3
|
-
const minutes = date.getMinutes();
|
|
4
|
-
const amPm = date.getHours() < 12 ? 'AM' : 'PM';
|
|
5
|
-
if(hours === 0) hours = 12;
|
|
6
|
-
|
|
7
|
-
const formattedHours = hours < 10 ? `0${hours}` : hours;
|
|
8
|
-
const formattedMinutes = minutes < 10 ? `0${minutes}` : minutes;
|
|
9
|
-
|
|
10
|
-
return `${formattedHours}:${formattedMinutes} ${amPm}`;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const formatNow = (timezone?: string) => {
|
|
14
|
-
const now = new Date();
|
|
15
|
-
if (timezone) {
|
|
16
|
-
const options: any = {
|
|
17
|
-
hour12: true,
|
|
18
|
-
hour: 'numeric',
|
|
19
|
-
minute: 'numeric',
|
|
20
|
-
timeZone: timezone,
|
|
21
|
-
};
|
|
22
|
-
return now.toLocaleString('en-US', options);
|
|
23
|
-
}
|
|
24
|
-
return formatHoursAndMinutes(now);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const formatTimeStamps = (timezone: string, timestamps: any) => {
|
|
28
|
-
const date = new Date(timestamps + 'Z');
|
|
29
|
-
|
|
30
|
-
const options: any = {
|
|
31
|
-
hour12: true,
|
|
32
|
-
hour: 'numeric',
|
|
33
|
-
minute: 'numeric',
|
|
34
|
-
timeZone: timezone,
|
|
35
|
-
};
|
|
36
|
-
return date.toLocaleString('en-US', options);
|
|
37
|
-
};
|
package/tsconfig.lib.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../../out-tsc/lib",
|
|
6
|
-
"target": "es2015",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"inlineSources": true,
|
|
10
|
-
"types": [],
|
|
11
|
-
"lib": [
|
|
12
|
-
"dom",
|
|
13
|
-
"es2018"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
"angularCompilerOptions": {
|
|
17
|
-
"skipTemplateCodegen": true,
|
|
18
|
-
"strictMetadataEmit": true,
|
|
19
|
-
"enableResourceInlining": true
|
|
20
|
-
},
|
|
21
|
-
"exclude": [
|
|
22
|
-
"src/test.ts",
|
|
23
|
-
"**/*.spec.ts"
|
|
24
|
-
]
|
|
25
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
-
{
|
|
3
|
-
"extends": "../../../tsconfig.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"outDir": "../../../out-tsc/spec",
|
|
6
|
-
"types": [
|
|
7
|
-
"jasmine"
|
|
8
|
-
]
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"src/test.ts"
|
|
12
|
-
],
|
|
13
|
-
"include": [
|
|
14
|
-
"**/*.spec.ts",
|
|
15
|
-
"**/*.d.ts"
|
|
16
|
-
]
|
|
17
|
-
}
|
package/tslint.json
DELETED