@chat21/chat21-ionic 3.0.61-rc19 → 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,19 @@
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
+
11
+ ### 3.0.61-rc21
12
+ - Removes cordova-plugin-device
13
+
14
+ ### 3.0.61-rc20
15
+ - Updates dependencies
16
+
3
17
  ### 3.0.61-rc19
4
18
  - Merge branch 'features/new-sidebar'
5
19
 
package/config.xml CHANGED
@@ -106,7 +106,6 @@
106
106
  <variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
107
107
  </plugin>
108
108
  <plugin name="cordova-plugin-chooser" spec="^1.3.2" />
109
- <plugin name="cordova-plugin-device" spec="^2.0.3" />
110
109
  <plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
111
110
  <plugin name="cordova-plugin-ionic-webview" spec="^4.2.1">
112
111
  <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
package/deploy_pre.sh CHANGED
@@ -27,18 +27,57 @@ sed -i -e "s/$URL_VER/g" src/utils/constants.ts
27
27
 
28
28
  ionic cordova platform add browser --save
29
29
  #ionic cordova build browser --prod --release
30
- ionic cordova build --env=pre browser #--prod --verbose
31
-
30
+ # ionic cordova build --env=pre browser --prod #--verbose
31
+ 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
+ cp -p config.xml platforms/browser/www/
36
+
37
+ ######### chat-ionic5 - the good one - publish in pre
38
+ # cd platforms/browser/www
39
+ # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/$version/
40
+ # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/
41
+ # cd ../../../
35
42
 
36
- cd platforms/browser/www
37
- aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/$version/
38
- aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/
39
- cd ../../../
43
+ # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
44
+
45
+ # echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5/$version/
46
+ # echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5/$version/index.html
47
+ # echo available on https://support-pre.tiledesk.com/chat-ionic5/$version/index.html
48
+ # echo available on https://support-pre.tiledesk.com/chat-ionic5/index.html
49
+
50
+ ######### chat-ionic5-panel - publish in pre with the projects right panel
51
+ # cd platforms/browser/www
52
+ # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-panel/$version/
53
+ # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-panel/
54
+ # cd ../../../
55
+
56
+ # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
40
57
 
41
- #aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
58
+ # echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5-panel/$version/
59
+ # echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5-panel/$version/index.html
60
+ # echo available on https://support-pre.tiledesk.com/chat-ionic5-panel/$version/index.html
61
+ # echo available on https://support-pre.tiledesk.com/chat-ionic5-panel/index.html
42
62
 
43
- echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5/$version/
44
- echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5/$version/index.html
63
+
64
+ ####### chat ionic MQTT in pre da aggiungere in deploy_pre.sh
65
+ # cd platforms/browser/www
66
+ # aws s3 sync . s3://tiledesk-dashboard-pre/native-mqtt/chat-ionic5/
67
+ # aws s3 sync . s3://tiledesk-dashboard-pre/native-mqtt/chat-ionic5/$version
68
+ # cd ../../../
69
+ # echo new version deployed on s3://tiledesk-dashboard-pre/native-mqtt/chat-ionic5/
70
+ # echo new version deployed on s3://tiledesk-dashboard-pre/native-mqtt/chat-ionic5/$version
71
+ # echo http://tiledesk-dashboard-pre.s3-eu-west-1.amazonaws.com/native-mqtt/chat-ionic5/index.html
72
+ # echo http://tiledesk-dashboard-pre.s3-eu-west-1.amazonaws.com/native-mqtt/chat-ionic5/$version/index.html
73
+
74
+
75
+ ####### chat ionic FIREBASE in pre da aggiungere in deploy_pre.sh
76
+ cd platforms/browser/www
77
+ aws s3 sync . s3://tiledesk-dashboard-pre/chat5/
78
+ aws s3 sync . s3://tiledesk-dashboard-pre/chat5/$version
79
+ cd ../../../
80
+ echo new version deployed on s3://tiledesk-dashboard-pre/chat5/$version
81
+ echo new version deployed on s3://tiledesk-dashboard-pre/chat5/
82
+ echo available on http://support-pre.tiledesk.com/chat5/index.html
83
+ echo available on http://support-pre.tiledesk.com/chat5/$version/index.html
package/deploy_prod.sh CHANGED
@@ -1,4 +1,4 @@
1
- npm version patch
1
+ # npm version patch
2
2
  version=`node -e 'console.log(require("./package.json").version)'`
3
3
  echo "version $version"
4
4
 
@@ -12,22 +12,51 @@ echo 'URL_VER: ---->'$URL_VER
12
12
  # npm publish
13
13
  # fi
14
14
 
15
- # sed -i -e "s/$start$ver.$build/$start$NEW_VER.$NEW_BUILD/g" src/utils/constants.ts
16
15
  sed -i -e "s/$URL_VER/g" src/utils/constants.ts
16
+
17
17
  ionic cordova platform add browser --save
18
18
  #ionic cordova build --env=prod browser -- --base-href /www/ --prod
19
19
  ionic cordova build --env=prod browser --prod
20
20
  cp -p src/firebase-messaging-sw.js platforms/browser/www/
21
21
  cp -p src/manifest.json platforms/browser/www/
22
22
  cp -p src/chat-config.json platforms/browser/www/
23
+ cp -p config.xml platforms/browser/www/
24
+
23
25
 
26
+ ###### CHAT in prod
24
27
  cd platforms/browser/www
25
- #aws s3 sync . s3://tiledesk-dashboard/chat/
26
- aws s3 sync . s3://tiledesk-console/v2/chat-ionic5/
27
- aws s3 sync . s3://tiledesk-console/v2/chat-ionic5/$version/
28
+ aws s3 sync . s3://tiledesk-dashboard/v2/chat/
29
+ aws s3 sync . s3://tiledesk-console/v2/chat/$version/
28
30
  cd ../../../
29
31
  # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
30
32
 
31
33
  # echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
32
- echo new version deployed on s3://tiledesk-console/v2/chat-ionic5/$version/
33
- echo available on https://console.tiledesk.com/v2/chat-ionic5/$version/index.html
34
+ echo new version deployed on s3://tiledesk-console/v2/chat/$version/
35
+ echo new version deployed on s3://tiledesk-console/v2/chat/
36
+ echo available on https://console.tiledesk.com/v2/chat/$version/index.html
37
+ echo available on https://console.tiledesk.com/v2/chat/index.html
38
+
39
+
40
+ ###### CHAT-IONIC5
41
+ # cd platforms/browser/www
42
+ # #aws s3 sync . s3://tiledesk-dashboard/chat/
43
+ # aws s3 sync . s3://tiledesk-console/v2/chat-ionic5/
44
+ # aws s3 sync . s3://tiledesk-console/v2/chat-ionic5/$version/
45
+ # cd ../../../
46
+ # # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
47
+
48
+ # # echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
49
+ # echo new version deployed on s3://tiledesk-console/v2/chat-ionic5/$version/
50
+ # echo available on https://console.tiledesk.com/v2/chat-ionic5/$version/index.html
51
+
52
+
53
+
54
+ ####### chat ionic FIREBASE in PROD IN SUBFOLDER
55
+ # cd platforms/browser/www
56
+ # aws s3 sync . s3://tiledesk-console/v2/chat5-dev/
57
+ # aws s3 sync . s3://tiledesk-console/v2/chat5-dev/$version
58
+ # cd ../../../
59
+ # echo new version deployed on s3://console.tiledesk.com/v2/chat5-dev/$version
60
+ # echo new version deployed on s3://console.tiledesk.com/v2/chat5-dev/
61
+ # echo available on http://console.tiledesk.com/v2/chat5-dev/index.html
62
+ # echo available on http://console.tiledesk.com/v2/chat5-dev/$version/index.html
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
- "version": "3.0.61-rc19",
3
+ "version": "3.0.61-rc23",
4
4
  "author": "Tiledesk SRL",
5
5
  "homepage": "https://tiledesk.com/",
6
6
  "scripts": {
@@ -44,7 +44,6 @@
44
44
  "cordova-browser": "^5.0.4",
45
45
  "cordova-ios": "6.1.1",
46
46
  "cordova-plugin-chooser": "^1.3.2",
47
- "cordova-plugin-device": "^2.0.3",
48
47
  "cordova-plugin-ionic-keyboard": "^2.2.0",
49
48
  "cordova-plugin-ionic-webview": "^4.2.1",
50
49
  "cordova-plugin-network-information": "^2.0.2",
@@ -97,7 +96,6 @@
97
96
  "plugins": {
98
97
  "cordova-plugin-whitelist": {},
99
98
  "cordova-plugin-statusbar": {},
100
- "cordova-plugin-device": {},
101
99
  "cordova-plugin-splashscreen": {},
102
100
  "cordova-plugin-ionic-webview": {
103
101
  "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
@@ -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)