@chat21/chat21-ionic 3.2.0-rc.1 → 3.2.1

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,11 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.2.1 in PROD
4
+ - bug-fixed: cannot read property of undefined reading logger.error into brand-service.ts
5
+
6
+ ### 3.2.0 in PROD
7
+ - changed: API_URL template key in favour of SERVER_BASE_URL
8
+
3
9
  ### 3.2.0-rc.1
4
10
  - added: CONV_TYPE enum for all channel_type
5
11
  - bug-fixed: do not sent automatic offline message if channel_type is messanger
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.2.0-rc.1",
4
+ "version": "3.2.1",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -62,7 +62,6 @@ export class CannedResponseComponent implements OnInit {
62
62
  if(this.currentString !== undefined){
63
63
  this.loadTagsCanned(this.currentString, this.conversationWith)
64
64
  }
65
- console.log('can show canneddddddd', this.canShowCanned)
66
65
  }
67
66
 
68
67
  // getProjectIdSelectedConversation(conversationWith: string): string{
@@ -78,7 +78,8 @@ export class BrandService {
78
78
  COMPANY_SITE_NAME:"tiledesk.com",
79
79
  COMPANY_SITE_URL:"https://www.tiledesk.com",
80
80
  CONTACT_US_EMAIL: "support@tiledesk.com",
81
- COMPANY_PRIMARY_COLOR:""
81
+ COMPANY_PRIMARY_COLOR:"",
82
+ DOCS:false
82
83
  }
83
84
  }
84
85
 
@@ -203,7 +204,7 @@ export class BrandService {
203
204
  }
204
205
 
205
206
  getBrand() {
206
- console.log('BrandService getBrand has been called - brand: ', this.brand);
207
+ //this.logger.log('BrandService getBrand has been called - brand: ', this.brand);
207
208
  return { ...this.brand['CHAT'], ...this.brand['COMMON'] }
208
209
  }
209
210
 
@@ -34,7 +34,7 @@ export class TriggerEvents {
34
34
  const windowContext = this.windowContext;
35
35
  if (windowContext){
36
36
  // window.parent.dispatchEvent(onAuthStateChanged);
37
- window.parent.postMessage({type: "onAuthStateChanged", detail: detailObj}, '*')
37
+ windowContext.postMessage({type: "onAuthStateChanged", detail: detailObj}, '*')
38
38
  // this.el.nativeElement.dispatchEvent(onAuthStateChanged);
39
39
  }
40
40
  } catch (e) {
@@ -49,7 +49,7 @@ export class TriggerEvents {
49
49
  const windowContext = this.windowContext;
50
50
  if (windowContext){
51
51
  // windowContext.document.dispatchEvent(onAfterMessageSend);
52
- window.parent.postMessage({type: "onAfterMessageSend", detail: { message: messageSent }}, '*')
52
+ windowContext.postMessage({type: "onAfterMessageSend", detail: { message: messageSent }}, '*')
53
53
  }
54
54
  } catch (e) {
55
55
  this.logger.error('[TRIGGER-HANDLER] > Error:' + e);
@@ -65,7 +65,7 @@ export class TriggerEvents {
65
65
  const windowContext = this.windowContext;
66
66
  if (windowContext){
67
67
  // windowContext.document.dispatchEvent(onAfterMessageReceived);
68
- window.parent.postMessage({type: "onAfterMessageReceived", detail: { message: message }}, '*')
68
+ windowContext.postMessage({type: "onAfterMessageReceived", detail: { message: message }}, '*')
69
69
  }
70
70
  } catch (e) {
71
71
  this.logger.error('[TRIGGER-HANDLER] > Error:' + e);
@@ -80,7 +80,7 @@ export class TriggerEvents {
80
80
  const windowContext = this.windowContext;
81
81
  if (windowContext){
82
82
  // windowContext.document.dispatchEvent(onNewConversation);
83
- window.parent.postMessage({type: "onNewConversation", detail: { conversation: conversation}}, '*')
83
+ windowContext.postMessage({type: "onNewConversation", detail: { conversation: conversation}}, '*')
84
84
  }
85
85
  } catch (e) {
86
86
  this.logger.error('[TRIGGER-HANDLER] > Error:' + e);
@@ -27,7 +27,7 @@
27
27
  "MQTTendpoint": "${MQTT_ENDPOINT}",
28
28
  "APIendpoint": "${MQTT_APIENDPOINT}"
29
29
  },
30
- "apiUrl": "${API_URL}",
30
+ "apiUrl": "${SERVER_BASE_URL}",
31
31
  "brandSrc": "${BRAND_SRC}",
32
32
  "whatsappTemplatesBaseUrl":"${WHATSAPP_TEMPLATES_BASE_URL}",
33
33
  "baseImageUrl": "${API_BASEIMAGE_URL}",