@chat21/chat21-ionic 3.0.88-rc.1 → 3.0.88

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.88 in PROD
4
+
5
+ ### 3.0.88-rc.2
6
+ - added: enable email only if active by env parameter
7
+ - added: emailSection env variable
8
+ - added: CHAT_STORAGE_PREFIX, EMAIL_SECTION env parameters
9
+
3
10
  ### 3.0.88-rc.1
4
11
  - bug-fixed: projectId is undefined
5
12
  - bug-fixed: typing subscription block UI on first conversation click
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.0.88-rc.1",
4
+ "version": "3.0.88",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -8,7 +8,7 @@
8
8
  </ion-button>
9
9
  </div>
10
10
  <!-- EMAIL-OPTION -->
11
- <div class="section-option" id="email" tooltip="{{translationMap?.get('LABEL_EMAIL')}}" [options]="tooltipOptions" placement="top">
11
+ <div *ngIf="emailSection" class="section-option" id="email" tooltip="{{translationMap?.get('LABEL_EMAIL')}}" [options]="tooltipOptions" placement="top">
12
12
  <ion-button fill="clear" [class.active]="section==='email'" (click)="onOpenSection('email')" [disabled]="channelType === 'direct'">
13
13
  <ion-icon name="mail-open"></ion-icon>
14
14
  {{translationMap.get('LABEL_EMAIL')}}
@@ -49,7 +49,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
49
49
  @Input() areVisibleCAR: boolean;
50
50
  @Input() supportMode: boolean;
51
51
  @Input() leadInfo: {lead_id: string, hasEmail: boolean, email: string, projectId: string};
52
- @Input() fileUploadAccept: string
52
+ @Input() fileUploadAccept: string;
53
+ @Input() emailSection: boolean;
53
54
  @Input() isOpenInfoConversation: boolean;
54
55
  @Input() translationMap: Map<string, string>;
55
56
  @Input() dropEvent: any;
@@ -8,7 +8,7 @@
8
8
  <ng-container *ngIf="project">
9
9
  <button class="btn simulate-visitor-btn btn-success-no-boxshadow " (click)="testWidgetPage()">
10
10
  <i class="material-icons" style="padding-top: 0px;font-size: 24px;">play_arrow</i>
11
- {{translationsMap.get('NAVBAR.SIMULATE_VISITOR')}}
11
+ {{translationsMap?.get('NAVBAR.SIMULATE_VISITOR')}}
12
12
  </button>
13
13
  </ng-container>
14
14
 
@@ -42,9 +42,9 @@ export class NavbarComponent implements OnInit {
42
42
  ) { }
43
43
 
44
44
  ngOnInit() {
45
+ this.initTranslations();
45
46
  this.listenToUserGoOnline();
46
47
  this.getStoredProjectAndUserRole();
47
- this.initTranslations();
48
48
  this.getOSCODE();
49
49
  }
50
50
 
@@ -231,6 +231,7 @@
231
231
  [supportMode]="supportMode"
232
232
  [leadInfo]="leadInfo"
233
233
  [fileUploadAccept]="appConfigProvider.getConfig().fileUploadAccept"
234
+ [emailSection]="appConfigProvider.getConfig().emailSection"
234
235
  [isOpenInfoConversation]="openInfoConversation"
235
236
  [translationMap]="translationsMap"
236
237
  [dropEvent]="dropEvent"
@@ -247,12 +247,11 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
247
247
  ngOnInit() {
248
248
  this.logger.log('[CONVS-DETAIL] > ngOnInit - window.location: ', window.location);
249
249
 
250
- // this.getConversations();
251
- // this.watchToConnectionStatus();
252
- // this.getOSCODE();
253
- // this.getStoredProjectAndUserRole();
254
- // this.listenToDsbrdPostMsgs();
255
-
250
+ this.getConversations();
251
+ this.watchToConnectionStatus();
252
+ this.getOSCODE();
253
+ this.getStoredProjectAndUserRole();
254
+ this.listenToDsbrdPostMsgs();
256
255
  }
257
256
 
258
257
  listenToDsbrdPostMsgs() {
@@ -1021,7 +1020,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
1021
1020
  attributes,
1022
1021
  )
1023
1022
 
1024
- if(!this.leadIsOnline && this.leadInfo && this.leadInfo.email){
1023
+ let emailEnabled = this.appConfigProvider.getConfig().emailSection
1024
+ if(emailEnabled && !this.leadIsOnline && this.leadInfo && this.leadInfo.email){
1025
1025
  this.logger.log('[CONVS-DETAIL] - SEND MESSAGE --> SENDING EMAIL', msg, this.leadInfo.email)
1026
1026
  this.sendEmail(msg)
1027
1027
  }
@@ -30,6 +30,7 @@
30
30
  "supportMode": true,
31
31
  "archivedButton": true,
32
32
  "writeToButton": true,
33
+ "emailSection":true,
33
34
  "wsUrl": "ws://localhost:8081/ws/",
34
35
  "showInfoMessage":"MEMBER_JOINED_GROUP,TOUCHING_OPERATOR"
35
36
  }
@@ -31,5 +31,6 @@
31
31
  "supportMode": true,
32
32
  "archivedButton": true,
33
33
  "writeToButton": true,
34
+ "emailSection":true,
34
35
  "wsUrl":"wss://console.native.tiledesk.com/mqws/ws"
35
36
  }
@@ -30,5 +30,6 @@
30
30
  "supportMode": true,
31
31
  "archivedButton": true,
32
32
  "writeToButton": true,
33
+ "emailSection":true,
33
34
  "wsUrl": "wss://tiledesk-server-pre.herokuapp.com/"
34
35
  }
@@ -31,5 +31,7 @@
31
31
  "dashboardUrl": "${DASHBOARD_URL}",
32
32
  "testsiteBaseUrl":"${WIDGET_TEST_LOCATION}",
33
33
  "wsUrl": "${WS_URL}",
34
- "wsUrlRel": "${WS_URL_RELATIVE}"
34
+ "wsUrlRel": "${WS_URL_RELATIVE}",
35
+ "storage_prefix": "${CHAT_STORAGE_PREFIX}",
36
+ "emailSection": "${EMAIL_SECTION}"
35
37
  }
@@ -29,7 +29,9 @@
29
29
  "testsiteBaseUrl": "https://widget-pre.tiledesk.com/v5/assets/twp/index.html",
30
30
  "wsUrl": "ws://localhost:3000/",
31
31
  "wsUrlRel": "${WS_URL_RELATIVE}",
32
+ "storage_prefix": "chat_sv5",
32
33
  "supportMode": false,
33
34
  "writeToButton": false,
34
- "archivedButton": false
35
+ "archivedButton": false,
36
+ "emailSection": true
35
37
  }