@chat21/chat21-ionic 3.0.82-rc.7 → 3.0.83

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.
Files changed (156) hide show
  1. package/CHANGELOG.md +9 -99
  2. package/README.md +2 -2
  3. package/package.json +3 -4
  4. package/src/app/app.component.html +1 -7
  5. package/src/app/app.component.scss +2 -20
  6. package/src/app/app.component.ts +18 -129
  7. package/src/app/app.module.ts +1 -3
  8. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -77
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +88 -171
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -40
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +24 -11
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
  15. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
  16. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
  17. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
  18. package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
  19. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
  20. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
  21. package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
  22. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
  23. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
  24. package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
  25. package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +2 -8
  26. package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +0 -36
  27. package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
  28. package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
  29. package/src/app/chatlib/conversation-detail/message/image/image.component.html +2 -3
  30. package/src/app/chatlib/conversation-detail/message/image/image.component.scss +5 -17
  31. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
  32. package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -3
  33. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
  34. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
  35. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
  36. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
  37. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -63
  38. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
  39. package/src/app/components/canned-response/canned-response.component.html +9 -9
  40. package/src/app/components/canned-response/canned-response.component.scss +7 -14
  41. package/src/app/components/canned-response/canned-response.component.ts +6 -1
  42. package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
  43. package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
  44. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
  45. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
  46. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
  47. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
  48. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
  49. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
  50. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.spec.ts → conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts} +6 -6
  51. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
  52. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
  53. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
  54. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
  55. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
  56. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
  57. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
  58. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
  59. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
  60. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
  61. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
  62. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
  63. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -17
  64. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
  65. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +90 -24
  66. package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
  67. package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
  68. package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts → conversation-detail/option-header/option-header.component.spec.ts} +5 -5
  69. package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts → conversation-detail/option-header/option-header.component.ts} +4 -5
  70. package/src/app/components/conversation-info/info-content/info-content.component.html +4 -8
  71. package/src/app/components/conversation-info/info-content/info-content.component.ts +6 -3
  72. package/src/app/components/conversation-info/info-direct/info-direct.component.html +13 -7
  73. package/src/app/components/conversation-info/info-direct/info-direct.component.scss +0 -23
  74. package/src/app/components/conversation-info/info-direct/info-direct.component.ts +6 -1
  75. package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
  76. package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
  77. package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
  78. package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +1 -2
  79. package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +1 -0
  80. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
  81. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
  82. package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
  83. package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
  84. package/src/app/components/project-item/project-item.component.html +149 -98
  85. package/src/app/components/project-item/project-item.component.scss +35 -43
  86. package/src/app/components/project-item/project-item.component.ts +4 -16
  87. package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +5 -5
  88. package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +10 -23
  89. package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
  90. package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
  91. package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
  92. package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
  93. package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -47
  94. package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
  95. package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
  96. package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -41
  97. package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
  98. package/src/app/pages/conversation-detail/conversation-detail.page.ts +112 -186
  99. package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
  100. package/src/app/pages/conversations-list/conversations-list.page.scss +2 -18
  101. package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
  102. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  103. package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
  104. package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
  105. package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
  106. package/src/app/pages/profile-info/profile-info.page.html +4 -2
  107. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  108. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
  109. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
  110. package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
  111. package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
  112. package/src/app/services/websocket/websocket.service.ts +1 -1
  113. package/src/app/shared/shared.module.ts +33 -24
  114. package/src/assets/i18n/ar.json +265 -278
  115. package/src/assets/i18n/az.json +1 -14
  116. package/src/assets/i18n/de.json +2 -15
  117. package/src/assets/i18n/en.json +2 -15
  118. package/src/assets/i18n/es.json +2 -15
  119. package/src/assets/i18n/fr.json +1 -14
  120. package/src/assets/i18n/it.json +1 -14
  121. package/src/assets/i18n/kk.json +2 -15
  122. package/src/assets/i18n/pt.json +2 -15
  123. package/src/assets/i18n/ru.json +1 -14
  124. package/src/assets/i18n/sr.json +264 -277
  125. package/src/assets/i18n/sv.json +2 -15
  126. package/src/assets/i18n/tr.json +2 -15
  127. package/src/assets/i18n/uk.json +2 -15
  128. package/src/assets/i18n/uz.json +1 -14
  129. package/src/assets/js/chat21client.js +148 -175
  130. package/src/chat-config-mqtt-localhost.json +2 -2
  131. package/src/chat-config-native-mqtt.json +0 -3
  132. package/src/chat21-core/models/conversation.ts +1 -0
  133. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
  134. package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +8 -7
  135. package/src/chat21-core/utils/constants.ts +1 -6
  136. package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
  137. package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
  138. package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
  139. package/src/chat21-core/utils/utils.ts +10 -38
  140. package/src/global.scss +255 -52
  141. package/src/index.html +9 -0
  142. package/src/variables.scss +10 -30
  143. package/deploy_amazon_beta.sh +0 -29
  144. package/deploy_amazon_prod.sh +0 -30
  145. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
  146. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
  147. package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
  148. package/src/app/components/navbar/navbar.component.html +0 -103
  149. package/src/app/components/navbar/navbar.component.scss +0 -249
  150. package/src/app/components/navbar/navbar.component.ts +0 -190
  151. package/src/app/services/projects/projects.service.spec.ts +0 -12
  152. package/src/app/services/projects/projects.service.ts +0 -43
  153. package/src/assets/sounds/interface-start.mp3 +0 -0
  154. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  155. package/src/chat21-core/models/projects.ts +0 -27
  156. package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
@@ -11,11 +11,6 @@
11
11
  // -webkit-animation: heartbeat 1.5s ease-in-out both;
12
12
  // animation: heartbeat 1.5s ease-in-out both;
13
13
 
14
- .message_sender_fullname{
15
- font-size: 12px;
16
- font-weight: 600;
17
- }
18
-
19
14
  p {
20
15
  font-size: 1.4em;
21
16
  margin: 0;
@@ -53,7 +48,16 @@
53
48
 
54
49
  }
55
50
  // > .button-native
56
-
51
+ .btn-add-msg {
52
+ border-radius: 50%;
53
+ --padding-end: 7px;
54
+ --padding-start: 7px;
55
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.6);
56
+
57
+ ion-icon{
58
+ font-size: 1.2em;
59
+ }
60
+ }
57
61
 
58
62
 
59
63
 
@@ -50,7 +50,7 @@ describe('BubbleMessageComponent', () => {
50
50
  isSender: false
51
51
  }
52
52
  component.message = messages
53
- component.fontColor = 'black'
53
+ component.textColor = 'black'
54
54
  fixture.detectChanges()
55
55
  const textChild = fixture.debugElement.query(By.css('chat-text'))
56
56
  textChild.properties.text
@@ -76,7 +76,7 @@ describe('BubbleMessageComponent', () => {
76
76
  isSender: false
77
77
  }
78
78
  component.message = messages
79
- component.fontColor = 'black'
79
+ component.textColor = 'black'
80
80
  fixture.detectChanges()
81
81
  const textChild = fixture.debugElement.query(By.css('chat-text'))
82
82
  expect(textChild.properties.text).toEqual(messages.text)
@@ -1,16 +1,15 @@
1
1
  import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output } from '@angular/core';
2
2
  import { DomSanitizer } from '@angular/platform-browser';
3
3
  import { MessageModel } from 'src/chat21-core/models/message';
4
- import { MAX_WIDTH_IMAGES, MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS, MIN_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
4
+ import { MAX_WIDTH_IMAGES, MIN_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
5
5
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
6
- import { isFile, isFrame, isImage, messageType } from 'src/chat21-core/utils/utils-message';
6
+ import { isFile, isFrame, isImage } from 'src/chat21-core/utils/utils-message';
7
7
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
8
8
  import { TranslateService } from '@ngx-translate/core';
9
9
  import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
10
10
  import * as moment from 'moment';
11
11
  import { CreateCannedResponsePage } from 'src/app/pages/create-canned-response/create-canned-response.page'
12
12
  import { ModalController } from '@ionic/angular';
13
- import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
14
13
  @Component({
15
14
  selector: 'chat-bubble-message',
16
15
  templateUrl: './bubble-message.component.html',
@@ -19,25 +18,16 @@ import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
19
18
  export class BubbleMessageComponent implements OnInit, OnChanges {
20
19
 
21
20
  @Input() message: MessageModel;
22
- @Input() isSameSender: boolean;
23
- @Input() fontColor: string;
24
- @Input() fontSize: string;
25
- @Input() fontFamily: string;
21
+ @Input() textColor: string;
22
+ @Input() areVisibleCAR: boolean;
23
+ @Input() supportMode: boolean;
26
24
  @Output() onBeforeMessageRender = new EventEmitter();
27
25
  @Output() onAfterMessageRender = new EventEmitter();
28
26
  @Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
29
27
  isImage = isImage;
30
28
  isFile = isFile;
31
29
  isFrame = isFrame;
32
- convertColorToRGBA = convertColorToRGBA
33
-
34
- // ========== begin:: check message type functions ======= //
35
- messageType = messageType;
36
-
37
- MESSAGE_TYPE_MINE = MESSAGE_TYPE_MINE;
38
- MESSAGE_TYPE_OTHERS = MESSAGE_TYPE_OTHERS;
39
- // ========== end:: check message type functions ======= //
40
-
30
+ @Input() addAsCannedResponseTooltipText : string;
41
31
  public browserLang: string;
42
32
 
43
33
  tooltipOptions = {
@@ -204,6 +194,25 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
204
194
  this.onElementRendered.emit({element: event.element, status: event.status})
205
195
  }
206
196
 
197
+ async presentCreateCannedResponseModal(): Promise<any> {
198
+ this.logger.log('[BUBBLE-MESSAGE] PRESENT CREATE CANNED RESPONSE MODAL ')
199
+ const attributes = {
200
+ message: this.message,
201
+ }
202
+ const modal: HTMLIonModalElement = await this.modalController.create({
203
+ component: CreateCannedResponsePage,
204
+ componentProps: attributes,
205
+ swipeToClose: false,
206
+ backdropDismiss: false,
207
+ })
208
+ modal.onDidDismiss().then((dataReturned: any) => {
209
+ //
210
+ this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
211
+ })
212
+
213
+ return await modal.present()
214
+ }
215
+
207
216
 
208
217
  // printMessage(message, messageEl, component) {
209
218
  // const messageOBJ = { message: message, sanitizer: this.sanitizer, messageEl: messageEl, component: component}
@@ -1,7 +1,3 @@
1
- <div #actionButton id="actionButton" class="button-in-msg action"
2
- title="{{button?.value}}"
3
- (click)="actionButtonAction()"
4
- (mouseover)="onMouseOver($event)"
5
- (mouseout)="onMouseOut($event)">
1
+ <div #actionButton id="actionButton" class="button-in-msg action" (click)="actionButtonAction()" title="{{button?.value}}">
6
2
  {{button.value}}
7
3
  </div>
@@ -1,11 +1,12 @@
1
1
  // @import '../../../../../sass/variables';
2
2
 
3
3
  div {
4
- --backgroundColor: --basic-blue;
5
- --textColor: --bck-msg-sent;
6
- --hoverBackgroundColor: --bck-msg-sent;
7
- --hoverTextColor: --basic-blue;
8
- --buttonFontSize: --button-in-msg-font-size;
4
+ --bck-msg-sent: #62a8ea;
5
+ --col-msg-sent:#ffffff;
6
+ --light-white: #f7f7f7;
7
+ --black: #1a1a1a;
8
+ --gray: #aaaaaa;
9
+ --blue: rgb(42, 106, 193);
9
10
  }
10
11
 
11
12
  .button-in-msg {
@@ -14,32 +15,32 @@ div {
14
15
  max-width: 300px;
15
16
  min-width: inherit;
16
17
  cursor: pointer;
17
- border: 1px solid var(--textColor);
18
+ border: 1px solid var(--blue);
18
19
  border-radius: 20px;
19
20
  margin: 3px;
20
- background: var(--backgroundColor);
21
+ background: transparent;
21
22
  overflow: hidden;
22
23
  font-family: 'Muli', sans-serif;
23
- font-size: var(--buttonFontSize);
24
+ font-size: 15px;
24
25
  -o-text-overflow: ellipsis;
25
26
  text-overflow: ellipsis;
26
27
  white-space: nowrap;
27
28
  letter-spacing: -0.24px;
28
29
  -webkit-font-smoothing: antialiased;
29
- color: var(--textColor);
30
+ color: var(--blue);
30
31
  line-height: 16px;
31
32
  }
32
33
 
33
34
  .action {
34
- background: var(--backgroundColor);
35
+ background: white;
35
36
  transition: background-color .6s ease;
36
37
  &:focus,
37
38
  &:hover {
38
- color: var(--hoverTextColor);
39
- background: var(--hoverBackgroundColor);
39
+ color: white;
40
+ background: var(--blue);
40
41
  .icon-button-action {
41
42
  svg {
42
- fill: var(--hoverTextColor);
43
+ fill: white;
43
44
  }
44
45
  }
45
46
  }
@@ -79,12 +80,4 @@ div {
79
80
  // height: 200px;
80
81
  // }
81
82
  // }
82
- }
83
-
84
-
85
- .disabled {
86
- // border: 1px solid #999999;
87
- // background-color: #cccccc;
88
- // color: #666666;
89
- pointer-events: none;
90
- }
83
+ }
@@ -1,4 +1,4 @@
1
- import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core';
1
+ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
2
 
3
3
  @Component({
4
4
  selector: 'chat-action-button-attachment',
@@ -8,36 +8,16 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChang
8
8
  export class ActionButtonComponent implements OnInit {
9
9
 
10
10
  @Input() button: any;
11
- @Input() fontSize: string;
12
- @Input() backgroundColor: string;
13
- @Input() textColor: string;
14
- @Input() hoverBackgroundColor: string;
15
- @Input() hoverTextColor: string;
11
+ @Input() themeColor: string;
12
+ @Input() foregroundColor: string;
16
13
  @Output() onButtonClicked = new EventEmitter();
17
-
18
14
  public type: string = "action"
19
15
  constructor(private elementRef: ElementRef) { }
20
16
 
21
17
  ngOnInit() {
22
- }
23
-
24
- ngOnChanges(changes: SimpleChanges){
25
18
  //decomment if element should have same color of themeColor and fregroundColor
26
- if(this.fontSize) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--buttonFontSize', this.fontSize);
27
- if(this.backgroundColor) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--backgroundColor', this.backgroundColor);
28
- if(this.textColor) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--textColor', this.textColor);
29
- if(this.hoverBackgroundColor) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--hoverBackgroundColor', this.hoverBackgroundColor);
30
- if(this.hoverTextColor) this.elementRef.nativeElement.querySelector('.action').style.setProperty('--hoverTextColor', this.hoverTextColor);
31
- }
32
-
33
- onMouseOver(event){
34
- // if(this.themeColor) this.elementRef.nativeElement.querySelector('.action').style.background = this.themeColor
35
- // if(this.foregroundColor) this.elementRef.nativeElement.querySelector('.action').style.color = this.foregroundColor
36
- }
37
-
38
- onMouseOut(event){
39
- // this.elementRef.nativeElement.querySelector('.action').style.color = '';
40
- // this.elementRef.nativeElement.querySelector('.action').style.background = ''
19
+ // this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
20
+ // this.elementRef.nativeElement.style.setProperty('--foregroundColor', this.foregroundColor);
41
21
  }
42
22
 
43
23
  actionButtonAction(){
@@ -1,5 +1,4 @@
1
- <div class="button-in-msg url" (click)="actionButtonUrl()" title="{{button?.value}}"
2
- (mouseover)="onMouseOver($event)" (mouseout)="onMouseOut($event)">
1
+ <div class="button-in-msg url" (click)="actionButtonUrl()" title="{{button?.value}}">
3
2
  <span *ngIf="button?.target !== 'self'" class="icon-button-action">
4
3
  <!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="12px" height="12px">
5
4
  <path d="M0 0h24v24H0z" fill="none"/>
@@ -1,11 +1,12 @@
1
1
  // @import '../../../../../sass/variables';
2
2
 
3
3
  div {
4
- --backgroundColor: --basic-blue;
5
- --textColor: --bck-msg-sent;
6
- --hoverBackgroundColor: --bck-msg-sent;
7
- --hoverTextColor: --basic-blue;
8
- --buttonFontSize: --button-in-msg-font-size;
4
+ --bck-msg-sent: #62a8ea;
5
+ --col-msg-sent:#ffffff;
6
+ --light-white: #f7f7f7;
7
+ --black: #1a1a1a;
8
+ --gray: #aaaaaa;
9
+ --blue: rgb(42, 106, 193);
9
10
  }
10
11
 
11
12
  .button-in-msg {
@@ -14,19 +15,19 @@ div {
14
15
  max-width: 300px;
15
16
  min-width: inherit;
16
17
  cursor: pointer;
17
- border: 1px solid var(--textColor);
18
+ border: 1px solid var(--blue);
18
19
  border-radius: 20px;
19
20
  margin: 3px;
20
- background: var(--backgroundColor);
21
+ background: transparent;
21
22
  overflow: hidden;
22
23
  font-family: 'Muli', sans-serif;
23
- font-size: var(--buttonFontSize);
24
+ font-size: 15px;
24
25
  -o-text-overflow: ellipsis;
25
26
  text-overflow: ellipsis;
26
27
  white-space: nowrap;
27
28
  letter-spacing: -0.24px;
28
29
  -webkit-font-smoothing: antialiased;
29
- color: var(--textColor);
30
+ color: var(--blue);
30
31
  line-height: 16px;
31
32
  }
32
33
 
@@ -37,23 +38,23 @@ div {
37
38
  top: -1px;
38
39
  right: 1px;
39
40
  svg {
40
- fill: var(--textColor);
41
+ fill: var(--blue);
41
42
  }
42
43
  }
43
44
  .icon-button-action-self{
44
45
  position: absolute;
45
46
  right: 1px;
46
47
  svg {
47
- fill: var(--textColor);
48
+ fill: var(--blue);
48
49
  }
49
50
  }
50
51
  &:focus,
51
52
  &:hover {
52
- color: var(--hoverTextColor);
53
- background: var(--hoverBackgroundColor);
53
+ color: white;
54
+ background: var(--blue);
54
55
  .icon-button-action, .icon-button-action-self {
55
56
  svg {
56
- fill: var(--hoverTextColor);
57
+ fill: white;
57
58
  }
58
59
  }
59
60
  }
@@ -1,4 +1,4 @@
1
- import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core';
1
+ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
2
 
3
3
  @Component({
4
4
  selector: 'chat-link-button-attachment',
@@ -8,35 +8,16 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChang
8
8
  export class LinkButtonComponent implements OnInit {
9
9
 
10
10
  @Input() button: any;
11
- @Input() fontSize: string;
12
- @Input() backgroundColor: string;
13
- @Input() textColor: string;
14
- @Input() hoverBackgroundColor: string;
15
- @Input() hoverTextColor: string;
11
+ @Input() themeColor: string;
12
+ @Input() foregroundColor: string;
16
13
  @Output() onButtonClicked = new EventEmitter();
17
14
  public type: string = "url"
18
15
  constructor(private elementRef: ElementRef) { }
19
16
 
20
17
  ngOnInit() {
21
- }
22
-
23
- ngOnChanges(changes: SimpleChanges){
24
18
  //decomment if element should have same color of themeColor and fregroundColor
25
- if(this.fontSize) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--buttonFontSize', this.fontSize);
26
- if(this.backgroundColor) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--backgroundColor', this.backgroundColor);
27
- if(this.textColor) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--textColor', this.textColor);
28
- if(this.hoverBackgroundColor) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--hoverBackgroundColor', this.hoverBackgroundColor);
29
- if(this.hoverTextColor) this.elementRef.nativeElement.querySelector('.url').style.setProperty('--hoverTextColor', this.hoverTextColor);
30
- }
31
-
32
- onMouseOver(event){
33
- // if(this.themeColor) this.elementRef.nativeElement.querySelector('.url').style.background = this.themeColor
34
- // if(this.foregroundColor) this.elementRef.nativeElement.querySelector('.url').style.color = this.foregroundColor
35
- }
36
-
37
- onMouseOut(event){
38
- // this.elementRef.nativeElement.querySelector('.url').style.color = '';
39
- // this.elementRef.nativeElement.querySelector('.url').style.background = ''
19
+ // this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
20
+ // this.elementRef.nativeElement.style.setProperty('--foregroundColor', this.foregroundColor);
40
21
  }
41
22
 
42
23
  actionButtonUrl(){
@@ -1,8 +1,3 @@
1
- <div class="button-in-msg text"
2
- [ngClass]="{'disabled': isConversationArchived}"
3
- title="{{button?.value}}"
4
- (click)="actionButtonText()"
5
- (mouseover)="onMouseOver($event)"
6
- (mouseout)="onMouseOut($event)">
1
+ <div class="button-in-msg text" (click)="actionButtonText()" title="{{button?.value}}">
7
2
  {{button?.value}}
8
3
  </div>
@@ -1,10 +1,11 @@
1
1
  // @import '../../../../../sass/variables';
2
2
  div {
3
- --backgroundColor: --basic-blue;
4
- --textColor: --bck-msg-sent;
5
- --hoverBackgroundColor: --bck-msg-sent;
6
- --hoverTextColor: --basic-blue;
7
- --buttonFontSize: --button-in-msg-font-size;
3
+ --bck-msg-sent: #62a8ea;
4
+ --col-msg-sent:#ffffff;
5
+ --light-white: #f7f7f7;
6
+ --black: #1a1a1a;
7
+ --gray: #aaaaaa;
8
+ --blue: rgb(42, 106, 193);
8
9
  }
9
10
 
10
11
 
@@ -14,19 +15,19 @@ div {
14
15
  max-width: 300px;
15
16
  min-width: inherit;
16
17
  cursor: pointer;
17
- border: 1px solid var(--textColor); //$blue
18
+ border: 1px solid var(--blue);
18
19
  border-radius: 20px;
19
20
  margin: 3px;
20
- background: var(--backgroundColor);
21
+ background: transparent;
21
22
  overflow: hidden;
22
23
  font-family: 'Muli', sans-serif;
23
- font-size: var(--buttonFontSize);
24
+ font-size: 15px;
24
25
  -o-text-overflow: ellipsis;
25
26
  text-overflow: ellipsis;
26
27
  white-space: nowrap;
27
28
  letter-spacing: -0.24px;
28
29
  -webkit-font-smoothing: antialiased;
29
- color: var(--textColor); //$blue
30
+ color: var(--blue);
30
31
  line-height: 16px;
31
32
  }
32
33
 
@@ -35,11 +36,11 @@ div {
35
36
  transition: background-color .6s ease;
36
37
  &:focus,
37
38
  &:hover {
38
- color: var(--hoverTextColor);
39
- background: var(--hoverBackgroundColor);
39
+ color: white;
40
+ background: var(--blue);
40
41
  .icon-button-action {
41
42
  svg {
42
- fill: --black;
43
+ fill: var(--black);
43
44
  }
44
45
  }
45
46
  }
@@ -1,4 +1,4 @@
1
- import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@angular/core';
1
+ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
2
 
3
3
 
4
4
  @Component({
@@ -9,37 +9,16 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChang
9
9
  export class TextButtonComponent implements OnInit {
10
10
 
11
11
  @Input() button: any;
12
- @Input() isConversationArchived: boolean;
13
- @Input() fontSize: string;
14
- @Input() backgroundColor: string;
15
- @Input() textColor: string;
16
- @Input() hoverBackgroundColor: string;
17
- @Input() hoverTextColor: string;
12
+ @Input() themeColor: string;
13
+ @Input() foregroundColor: string;
18
14
  @Output() onButtonClicked = new EventEmitter();
19
-
20
15
  public type: string = "text"
21
16
  constructor(private elementRef: ElementRef) { }
22
17
 
23
18
  ngOnInit() {
24
- }
25
-
26
- ngOnChanges(changes: SimpleChanges){
27
19
  //decomment if element should have same color of themeColor and fregroundColor
28
- if(this.fontSize) this.elementRef.nativeElement.querySelector('.text').style.setProperty('--buttonFontSize', this.fontSize);
29
- if(this.backgroundColor) this.elementRef.nativeElement.querySelector('.text').style.setProperty('--backgroundColor', this.backgroundColor);
30
- if(this.textColor) this.elementRef.nativeElement.querySelector('.text').style.setProperty('--textColor', this.textColor);
31
- if(this.hoverBackgroundColor) this.elementRef.nativeElement.querySelector('.text').style.setProperty('--hoverBackgroundColor', this.hoverBackgroundColor);
32
- if(this.hoverTextColor) this.elementRef.nativeElement.querySelector('.text').style.setProperty('--hoverTextColor', this.hoverTextColor);
33
- }
34
-
35
- onMouseOver(event){
36
- // if(this.backgroundColor) this.elementRef.nativeElement.querySelector('.text').style.background = this.textColor
37
- // if(this.textColor) this.elementRef.nativeElement.querySelector('.text').style.color = this.backgroundColor
38
- }
39
-
40
- onMouseOut(event){
41
- // this.elementRef.nativeElement.querySelector('.text').style.color = '';
42
- // this.elementRef.nativeElement.querySelector('.text').style.background = ''
20
+ // this.elementRef.nativeElement.style.setProperty('--themeColor', this.themeColor);
21
+ // this.elementRef.nativeElement.style.setProperty('--foregroundColor', this.foregroundColor);
43
22
  }
44
23
 
45
24
  actionButtonText(){
@@ -1,9 +1,3 @@
1
- <div [ngStyle] = "{ 'max-width': '100%', 'width': width, 'height': height }">
2
- <div *ngIf="loading" class="loader" [ngStyle] = "{ 'width': width , 'height': height }"></div>
3
- <iframe allowfullscreen
4
- [ngClass]="{'isLoadingImage': loading}"
5
- width = "100%" height = "100%"
6
- [src]="url"
7
- (load)="onLoaded($event)">
8
- </iframe>
1
+ <div [ngStyle] = "{ 'max-width': '100%', 'width': width, 'height': height + 'px' }">
2
+ <iframe allowfullscreen width = "100%" height = "100%" style= "border:none; border-radius: 8px 8px 0 0 " [src]="url" ></iframe>
9
3
  </div>
@@ -1,36 +0,0 @@
1
-
2
- :host{
3
- // --borderRadius: #{$border-radius-bubble-message};
4
- --borderRadius: 8px 8px 0px 0px;
5
- }
6
-
7
- .loader {
8
- float: left;
9
- // position: absolute;
10
- z-index: 1000;
11
- // background-color: #ccc;
12
- border-radius: var(--borderRadius);
13
- background-image: linear-gradient(90deg, transparent 0px, #e8e8e8 40px, transparent 80px);
14
- background-size: 600px;
15
- animation: shine-loader 1.6s infinite linear;
16
- }
17
-
18
- .isLoadingImage {
19
- // position: relative;
20
- // top: 6px;
21
- display: none;
22
- }
23
-
24
- iframe {
25
- border:none;
26
- border-radius: var(--borderRadius)
27
- }
28
-
29
- @keyframes shine-loader {
30
- 0% {
31
- background-position: -32px;
32
- }
33
- 40%, 100% {
34
- background-position: 208px;
35
- }
36
- }
@@ -9,8 +9,8 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
9
9
  export class FrameComponent implements OnInit {
10
10
 
11
11
  @Input() metadata: any;
12
- @Input() width: number;
13
- @Input() height: number;
12
+ @Input() width: string;
13
+ @Input() height: string;
14
14
  @Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
15
15
 
16
16
  url: any;
@@ -1,3 +1,4 @@
1
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
1
2
  import { Component, ElementRef, Input, OnInit, SimpleChange, SimpleChanges, ViewChild, ViewEncapsulation } from '@angular/core';
2
3
 
3
4
  @Component({
@@ -1,12 +1,11 @@
1
1
  <!-- [ngStyle]="{ 'max-width': width +'px', 'max-height': height +'px' }" style="position: relative; " -->
2
- <div [ngStyle]="{'max-height': height +'px' }" class="c21-img-container">
2
+ <div [ngStyle]="{ 'max-width': width +'px', 'max-height': height +'px' }" class="c21-img-container">
3
3
  <div *ngIf="loading" class="loader" [ngStyle]="{ 'width': width , 'height': height }"></div>
4
4
  <!-- [tooltip]="timeTooltipRight" [options]="tooltipOptions" placement="bottom" content-type="template" -->
5
5
  <img id="myImg"
6
6
  class="message-contentX message-content-imageX"
7
7
  [ngClass]="{'isLoadingImage': loading}"
8
- [width]="width"
9
- [height]="height"
8
+ [ngStyle]="{ 'width': width , 'height': height }"
10
9
  [src]="metadata.src"
11
10
  (load)="onLoaded($event)"
12
11
  (click)="openImageViewerModal(metadata.src, metadata.name)" />
@@ -1,37 +1,26 @@
1
-
2
- :host{
3
- // --borderRadius: #{$border-radius-bubble-message};
4
- --borderRadius: 8px;
5
- }
6
-
7
1
  img {
8
- border-radius: var(--borderRadius);
2
+ border-radius: 8px;
9
3
  //padding: 3px;
10
4
  margin-bottom: 0px;
11
5
  max-width: calc(100% - 6px);
12
6
  width: auto;
13
7
  height: auto;
14
8
  object-fit: cover;
15
-
16
- transition: transform 0.3s ease-in-out 0s;
17
9
  }
18
10
 
19
- .c21-img-container img:hover{
11
+ img:hover{
20
12
  cursor: pointer;
21
- transform: scale(1.05);
22
13
  }
23
14
 
24
15
  .c21-img-container {
25
16
  text-align: center;
26
17
  width: 100%;
27
- overflow: hidden;
28
18
  // background-image: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,.5)), url("https://firebasestorage.googleapis.com/v0/b/chat21-pre-01.appspot.com/o/public%2Fimages%2Fb4361ea5-5e37-433c-b727-9034eb5586fe%2F6d74f795-5873-49a8-9165-38f48642df51%2Ffacebook_like%20(3).png?alt=media&token=79afcfe5-ba0c-4573-9263-0877e0225c84");
29
19
  // background-repeat: no-repeat;
30
20
  // background-position: 50% 0;
31
21
  // background-size: cover;
32
22
  // border-top-left-radius: $border-radius-bubble-message;
33
23
  // border-top-right-radius: $border-radius-bubble-message;
34
- border-radius: var(--borderRadius);
35
24
  }
36
25
 
37
26
  .isLoadingImage {
@@ -43,10 +32,9 @@ img {
43
32
  .loader {
44
33
  float: left;
45
34
  // position: absolute;
46
- z-index: 1000;
47
- // background-color: #ccc;
48
- border-radius: var(--borderRadius);
49
- background-image: linear-gradient(90deg, transparent 0px, #e8e8e8 40px, transparent 80px);
35
+ background-color: #ccc;
36
+ border-radius: 8px;
37
+ background-image: linear-gradient(90deg, #f7f4f4 0px, #e8e8e8 40px, #f7f4f4 80px);
50
38
  background-size: 600px;
51
39
  animation: shine-loader 1.6s infinite linear;
52
40
  }
@@ -8,7 +8,7 @@ import { Component, EventEmitter, Input, OnInit, Output, SimpleChanges } from '@
8
8
  export class ImageComponent implements OnInit {
9
9
 
10
10
  @Input() metadata: any;
11
- @Input() width: number;
11
+ @Input() width: string;
12
12
  @Input() height: number;
13
13
  @Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
14
14