@chat21/chat21-ionic 3.0.61-rc21 → 3.0.61-rc23

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,13 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+
4
+ ### 3.0.61-rc23
5
+ - Handles the "SupptMode" environment variable if returned as a string (fixes the Docker image bugs: part of the conversation details go under the sidebar in mobile mode, the "add message as canned response" button is not displayed)
6
+ - Fixes the position of the emoji selection window pop up when the canned responses button is not visible
7
+
8
+ ### 3.0.61-rc22
9
+ - Minor improvements
10
+
3
11
  ### 3.0.61-rc21
4
12
  - Removes cordova-plugin-device
5
13
 
package/deploy_pre.sh CHANGED
@@ -32,7 +32,7 @@ ionic cordova build -c=pre browser --prod
32
32
  cp -p src/firebase-messaging-sw.js platforms/browser/www/
33
33
  cp -p src/manifest.json platforms/browser/www/
34
34
  cp -p src/chat-config.json platforms/browser/www/
35
-
35
+ cp -p config.xml platforms/browser/www/
36
36
 
37
37
  ######### chat-ionic5 - the good one - publish in pre
38
38
  # cd platforms/browser/www
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
- "version": "3.0.61-rc21",
3
+ "version": "3.0.61-rc23",
4
4
  "author": "Tiledesk SRL",
5
5
  "homepage": "https://tiledesk.com/",
6
6
  "scripts": {
@@ -158,7 +158,7 @@ export class AppComponent implements OnInit {
158
158
  if (/Android|iPhone/i.test(window.navigator.userAgent)) {
159
159
  this.IS_ON_MOBILE_DEVICE = true;
160
160
  }
161
- // this.logger.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
161
+ this.logger.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
162
162
  return this.IS_ON_MOBILE_DEVICE;
163
163
  }
164
164
 
@@ -298,12 +298,13 @@ export class AppComponent implements OnInit {
298
298
  */
299
299
  ngOnInit() {
300
300
  const appconfig = this.appConfigProvider.getConfig();
301
- // console.log('[APP-COMP] appconfig', appconfig)
302
- if (appconfig && appconfig.supportMode) {
303
- this.SUPPORT_MODE = appconfig.supportMode
304
- // console.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
301
+ this.logger.log('[APP-COMP] ngOnInit appconfig', appconfig)
302
+ if (appconfig && appconfig.supportMode && (appconfig.supportMode === true || appconfig.supportMode === 'true' )) {
303
+ this.SUPPORT_MODE = true;
304
+ this.logger.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
305
305
  } else {
306
306
  this.SUPPORT_MODE = false;
307
+ this.logger.log('[APP-COMP] appconfig > SUPPORT_MODE', this.SUPPORT_MODE)
307
308
  }
308
309
  this.persistence = appconfig.authPersistence;
309
310
  this.appStorageService.initialize(environment.storage_prefix, this.persistence, '')
@@ -435,7 +436,7 @@ export class AppComponent implements OnInit {
435
436
  // this.logger.log('[APP-COMP] - X - initializeApp !!! CALLED-BY: ', calledby);
436
437
  // console.log('[APP-COMP] appconfig platform is cordova: ', this.platform.is('cordova'))
437
438
 
438
- if (!this.platform.is('cordova')) {
439
+ if (!this.platform.is('desktop')) {
439
440
  this.splashScreen.show();
440
441
  }
441
442
  this.tabTitle = document.title;
@@ -723,6 +724,7 @@ export class AppComponent implements OnInit {
723
724
 
724
725
  this.logger.log('[APP-COMP] checkPlatformIsMobile', checkPlatformIsMobile());
725
726
  this.platformIs = PLATFORM_MOBILE;
727
+ this.logger.log('[APP-COMP] this.platformIs', this.platformIs);
726
728
  const IDConv = this.route.snapshot.firstChild.paramMap.get('IDConv');
727
729
 
728
730
  // console.log('[APP-COMP] platformIs', this.platformIs);
@@ -736,7 +738,7 @@ export class AppComponent implements OnInit {
736
738
  this.chatManager.startApp();
737
739
  this.logger.log('[APP-COMP] checkPlatformIsMobile', checkPlatformIsMobile());
738
740
  this.platformIs = PLATFORM_DESKTOP;
739
- // console.log('[APP-COMP] platformIs', this.platformIs);
741
+ this.logger.log('[APP-COMP] platformIs', this.platformIs);
740
742
  // console.log('[APP-COMP] PLATFORM', PLATFORM_DESKTOP, 'route.snapshot', this.route.snapshot);
741
743
  this.logger.log('[APP-COMP] PLATFORM_DESKTOP ', this.navService);
742
744
 
@@ -1005,6 +1007,7 @@ export class AppComponent implements OnInit {
1005
1007
  let platformIsNow = PLATFORM_DESKTOP;
1006
1008
  if (checkPlatformIsMobile()) {
1007
1009
  platformIsNow = PLATFORM_MOBILE;
1010
+ this.logger.log('onResize platformIsNow ', platformIsNow)
1008
1011
  }
1009
1012
  if (!this.platformIs || this.platformIs === '') {
1010
1013
  this.platformIs = platformIsNow;
@@ -69,7 +69,14 @@ export class IonConversationDetailComponent extends ConversationContentComponent
69
69
  }
70
70
 
71
71
  getOSCODE() {
72
- this.support_mode = this.appConfigProvider.getConfig().supportMode
72
+ this.support_mode = null
73
+ if( this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
74
+ this.support_mode = true
75
+ } else if ( this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
76
+ this.support_mode = false
77
+ } else if ( !this.appConfigProvider.getConfig().supportMode ) {
78
+ this.support_mode = false
79
+ }
73
80
  this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK
74
81
  this.logger.log('[CONVS-DETAIL][ION-CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key)
75
82
 
@@ -109,7 +109,12 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
109
109
 
110
110
  ngOnInit() {
111
111
  // this.setSubscriptions();
112
+
112
113
  this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] HELLO !!!!! ");
114
+ this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] areVisibleCAR ", this.areVisibleCAR);
115
+ if (this.areVisibleCAR === false) {
116
+ this.emojiPerLine = 7
117
+ }
113
118
  // this.events.subscribe((cannedmessage) => {
114
119
  // this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] events.subscribe cannedmessage ", cannedmessage);
115
120
  // })
@@ -236,7 +241,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
236
241
  @HostListener('window:resize', ['$event'])
237
242
  onResize(event) {
238
243
  // this.getIfTexareaIsEmpty('onResize')
239
- // console.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
244
+ // console.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
240
245
 
241
246
 
242
247
 
@@ -598,7 +603,7 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
598
603
  this.addWhiteSpaceBefore = false;
599
604
  // console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI addWhiteSpaceBefore ', this.addWhiteSpaceBefore)
600
605
  } else {
601
- this.addWhiteSpaceBefore = true
606
+ this.addWhiteSpaceBefore = true
602
607
  // console.log('[CONVS-DETAIL][MSG-TEXT-AREA] ADD EMOJI addWhiteSpaceBefore ', this.addWhiteSpaceBefore)
603
608
  }
604
609
  const elTextArea = this.message_text_area['el'];
@@ -607,13 +612,13 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
607
612
  }
608
613
 
609
614
  insertAtCursor(myField, myValue) {
610
- this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - myValue ', myValue );
611
-
615
+ this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - myValue ', myValue);
616
+
612
617
  if (this.addWhiteSpaceBefore === true) {
613
618
  myValue = ' ' + myValue;
614
- this.logger.log('[CANNED-RES-EDIT-CREATE] - GET TEXT AREA - QUI ENTRO myValue ', myValue );
619
+ this.logger.log('[CANNED-RES-EDIT-CREATE] - GET TEXT AREA - QUI ENTRO myValue ', myValue);
615
620
  }
616
-
621
+
617
622
  //IE support
618
623
  if (myField.selection) {
619
624
  myField.focus();
@@ -625,23 +630,23 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
625
630
  else if (myField.selectionStart || myField.selectionStart == '0') {
626
631
  var startPos = myField.selectionStart;
627
632
  this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - startPos ', startPos);
628
-
633
+
629
634
  var endPos = myField.selectionEnd;
630
635
  this.logger.log('[CANNED-RES-EDIT-CREATE] - insertAtCursor - endPos ', endPos);
631
-
636
+
632
637
  myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
633
-
638
+
634
639
  // place cursor at end of text in text input element
635
640
  myField.focus();
636
641
  var val = myField.value; //store the value of the element
637
642
  myField.value = ''; //clear the value of the element
638
643
  myField.value = val + ' '; //set that value back.
639
-
640
-
644
+
645
+
641
646
  // myField.select();
642
647
  } else {
643
648
  myField.value += myValue;
644
-
649
+
645
650
  }
646
651
  }
647
652
 
@@ -259,6 +259,7 @@ button.user-details-btn-close {
259
259
  font-size: 16px;
260
260
  font-weight: 400;
261
261
  // bottom: 50px;
262
+ bottom: 55px;
262
263
  // top:355px
263
264
  }
264
265
 
@@ -307,7 +307,14 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
307
307
  }
308
308
 
309
309
  getOSCODE() {
310
- this.support_mode = this.appConfigProvider.getConfig().supportMode
310
+ this.support_mode = null
311
+ if( this.appConfigProvider.getConfig().supportMode === true || this.appConfigProvider.getConfig().supportMode === 'true') {
312
+ this.support_mode = true
313
+ } else if ( this.appConfigProvider.getConfig().supportMode === false || this.appConfigProvider.getConfig().supportMode === 'false') {
314
+ this.support_mode = false
315
+ } else if ( !this.appConfigProvider.getConfig().supportMode ) {
316
+ this.support_mode = false
317
+ }
311
318
  this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig support_mode', this.support_mode)
312
319
  this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK
313
320
  this.logger.log('[CONVS-DETAIL] AppConfigService getAppConfig public_Key', this.public_Key)