@chat21/chat21-ionic 3.0.107-rc.8 → 3.0.107

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.107 in PROD
4
+
5
+ ### 3.0.107.rc.9
6
+ - changed: whatsapp api url
7
+ - changed: whatsapp template params removed if array is empty
8
+ - changed: whatsapp template UI
9
+
3
10
  ### 3.0.107.rc.8
4
11
  - bug-fixed: form icon into conversation-list and header conversation-detail not change color
5
12
 
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.107-rc.8",
4
+ "version": "3.0.107",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -142,6 +142,7 @@
142
142
  min-height: 37px; // NK edited
143
143
  max-height: 184px;
144
144
  background-color: var(--textarea-background);
145
+ color: var(--textarea-color);
145
146
  // --padding-top: 5px; // NK edited
146
147
  --padding-top: 8px;
147
148
  --padding-bottom: 5px;
@@ -33,7 +33,7 @@ export class InfoSupportGroupComponent implements OnInit {
33
33
 
34
34
  onLoad(iframe){
35
35
  let styleData = this.appStorageService.getItem('style')
36
- console.log('[InfoSupportGroupComponent] styleeeeee', styleData)
36
+ this.logger.log('[InfoSupportGroupComponent] styleeeeee', styleData)
37
37
  if(styleData && styleData !== 'undefined'){
38
38
  this.loadStyle(JSON.parse(styleData))
39
39
  }
@@ -244,7 +244,7 @@
244
244
  <span>{{</span> {{ i + 1 }} <span>}}</span>
245
245
  </div>
246
246
  <div class="field-wrapper">
247
- <input type="text" placeholder="{{bp}}" (input)="onParamBodyChange($event.target.value, i+1)">
247
+ <ion-input type="text" placeholder="{{bp}}" (input)="onParamBodyChange($event.target.value, i+1)"></ion-input>
248
248
  </div>
249
249
  </div>
250
250
  </div>
@@ -70,7 +70,13 @@ ion-content{
70
70
  // height: 100px;
71
71
  }
72
72
 
73
+ ion-input{
74
+ background-color: var(--textarea-background);
75
+ color: var(--textarea-color);
76
+ }
77
+
73
78
  ion-footer {
79
+ background: var(--modal-content-background);
74
80
  display: flex;
75
81
  flex-direction: row;
76
82
  justify-content: flex-end;
@@ -8,6 +8,7 @@ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service
8
8
  import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
9
9
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
10
10
  import { MapsPage } from '../maps/maps.page';
11
+ import { isObjectEmpty } from 'src/chat21-core/utils/utils';
11
12
 
12
13
  @Component({
13
14
  selector: 'send-whatsapp-template-modal',
@@ -264,6 +265,21 @@ export class SendWhatsappTemplateModal implements OnInit {
264
265
  }
265
266
  }
266
267
 
268
+ /** REMOVE EMPTY PROPERTY BEFORE SEND */
269
+ if(new_header_params.length === 0){
270
+ delete attachment.template.params.header
271
+ }
272
+ if(new_body_params.length === 0){
273
+ delete attachment.template.params.body
274
+ }
275
+ if(new_buttons_param.length === 0){
276
+ delete attachment.template.params.buttons
277
+ }
278
+ if(isObjectEmpty(attachment.template.params)){
279
+ delete attachment.template.params
280
+ }
281
+
282
+
267
283
  let data = {
268
284
  attachment: attachment,
269
285
  text: this.body_component.text
@@ -445,8 +445,9 @@ export function replaceEndOfLine(text) {
445
445
 
446
446
 
447
447
 
448
-
449
-
448
+ export function isObjectEmpty(objectName){
449
+ return Object.keys(objectName).length === 0
450
+ }
450
451
 
451
452
  export function isExistInArray(members, currentUid) {
452
453
  return members.includes(currentUid);
@@ -198,162 +198,162 @@ body {
198
198
  */
199
199
 
200
200
  .md body {
201
- --ion-background-color: #121212;
202
- --ion-background-color-rgb: 18,18,18;
203
-
204
- --ion-text-color: #ffffff;
205
- --ion-text-color-rgb: 255,255,255;
206
-
207
- --ion-border-color: #222222;
208
-
209
- --ion-color-step-50: #1e1e1e;
210
- --ion-color-step-100: #2a2a2a;
211
- --ion-color-step-150: #363636;
212
- --ion-color-step-200: #414141;
213
- --ion-color-step-250: #4d4d4d;
214
- --ion-color-step-300: #595959;
215
- --ion-color-step-350: #656565;
216
- --ion-color-step-400: #717171;
217
- --ion-color-step-450: #7d7d7d;
218
- --ion-color-step-500: #898989;
219
- --ion-color-step-550: #949494;
220
- --ion-color-step-600: #a0a0a0;
221
- --ion-color-step-650: #acacac;
222
- --ion-color-step-700: #b8b8b8;
223
- --ion-color-step-750: #c4c4c4;
224
- --ion-color-step-800: #d0d0d0;
225
- --ion-color-step-850: #dbdbdb;
226
- --ion-color-step-900: #e7e7e7;
227
- --ion-color-step-950: #f3f3f3;
228
-
229
- --ion-item-background: #1e1e1e;
230
- --ion-toolbar-background: #1f1f1f;
231
- --ion-tab-bar-background: #1f1f1f;
232
-
233
-
234
- /* ----- NEW -----*/
235
- --icon-color: rgb(135, 150, 175);
236
- --basic-blue: rgb(33,150,243);
237
- --basic-red: #EB1E23;
238
- --basic-blue-02: rgb(51, 65, 85);
239
- --basic-blue-03: rgb(27,37,51);
240
-
241
- // ***** Conversation-list: start ***** //
242
- --list-bkg-color: rgb(16,23,37);
243
- --list-bkg-color-selected: rgba(24, 119, 242, 0.12); //rgba(24, 119, 242, 0.04);
244
- --list-bkg-color-selected-border: var(--basic-blue);
245
- --item-backgroud-hover: rgba(255, 255, 255, 1);
246
- --archive-button-background: rgb(16,23,37);
247
- --avatar-placeholder-color: #ffffff;
248
- --conversation-project-color: rgb(135, 150, 175);
249
-
250
- --list-conversation-with-color: white;
251
- --list-conversation-with-color-not-read: var(--basic-blue);
252
- --list-conversation-message-color-not-read: var(--basic-blue);
253
- --list-notification-point-color: var(--basic-blue);
254
- --list-timestamp-color: hsl(228, 2%, 44%);
255
- --last-message-color: rgb(148, 163, 184);
256
-
257
- --contact-directory-searchbar-background: var(--basic-blue-03);
258
- // ***** Conversation-list: end ***** //
259
-
260
- // ***** Conversation-detail: start ***** //
261
- --conversation-detail-background: var(--basic-blue-03);
262
- --conversation-detail-header-color: white;
263
- --conversation-detail-header-typing-color: var(--basic-blue);
264
- --border-color-base: rgba(241, 245, 249, 0.12);
265
- --date-divider-color: rgba(241, 245, 249, 0.12);
266
- --date-divider-text-color: #64748b;
267
- --message-date-color: #647491;
268
- --textarea-background: var(--basic-blue-02);
269
- --textarea-color: var(--icon-color);
270
- // ***** Conversation-detail: end ***** //
271
-
272
- // ***** Conversation-detail: INFO-MESSAGE: start ***** //
273
- --info-message-background: #C9E4F6;
274
- --info-message-color: var(--basic-blue-03);
275
- --info-message-bounce-color: #C9E4F6;
276
- // ***** Conversation-detail: INFO-MESSAGE: end ***** //
277
-
278
- // ***** Conversation-detail: BUBBLE-MESSAGE: start ***** //
279
- --bck-msg-received: rgb(100, 116, 139);
280
- --col-msg-received: rgb(248, 250, 252);
281
- --bck-msg-sent: rgb(59, 130, 246);
282
- --col-msg-sent: rgb(239, 246, 255);
283
- --return-receipt-color: rgb(59, 130, 246);
284
- --button-in-msg-font-size: 15px;
285
- --buttonBackgroundColor: #ffffff;
286
- --buttonTextColor: #2a6ac1;
287
- --buttonHoverBackgroundColor: #2a6ac1;
288
- --buttonHoverTextColor: #ffffff;
289
- // ***** Conversation-detail: BUBBLE-MESSAGE: end ***** //
290
-
291
- // ***** Conversation-detail EMOJI-MART: start ***** //
292
- --emojii-mart-background: var(--basic-blue-02);
293
- --emoji-mart-color: var(--icon-color);
294
- // ***** Conversation-detail EMOJI-MART: end ***** //
295
-
296
- // ***** Conversation-detail: INFO-DIRECT: start ***** //
297
- --info-text-color: #f0f2f7;
298
- --info-direct-detail-accordion-background: var(--basic-blue-02);
299
- --info-direct-color-accordion-hover: rgba(255, 255, 255, .05);
300
- --info-direct-color-accordion-color-title: #fff;
301
- --info-direct-color-accordion-color-subtitle: #a9afbb;
302
- // ***** Conversation-detail: INFO-DIRECT: end ***** //
303
-
304
- // ***** MODALS: start ***** //
305
- --modal-header-background: rgb(59, 130, 246);
306
- --modal-icon-color: rgb(239, 246, 255);
307
- --modal-content-background: var(--basic-blue-03);
308
- --title-focus-color: rgb(239, 246, 255);
309
- --border-focus-color: rgb(59, 130, 246);
310
- --button-no-background-text-color: rgb(98, 112, 139);
311
- --button-background-color: rgb(59, 130, 246);
312
- --button-text-color: rgb(239, 246, 255);
313
- --label-color: #64748b;
314
- --preview-background: var(--basic-blue-02);
315
- // ***** MODALS: end ***** //
316
-
317
- // ***** CANNED-RESPONSES: start ***** //
318
- --canned-hover-background: #1877f2;
319
- --canned-hover-color: rgb(135, 150, 175);
320
- // ***** CANNED-RESPONSES: end ***** //
321
-
322
-
323
- // ***** Navbar: start ***** //
324
- --text-base-color: #ffffff;
325
- --navbar-background: var(--basic-blue-03);
326
- --nav-bar-heigth: 60px;
327
- --simulate-btn-background: #216d4b;
328
- --simulate-btn-color: #fff;
329
-
330
- --dropdown-menu-background: var(--basic-blue-03);
331
- --dropdown-menu-color: rgb(148, 163, 184);
332
- --dropdown-menu-item-color: rgb(226, 232, 240);
333
- --dropdown-menu-selected-background: rgba(255, 255, 255, .05);
334
- --dropdown-menu-selected-color: #eee;
335
- --dropdown-menu-hover-background: rgba(255, 255, 255, .05);
336
- --dropdown-menu-hover-color: #fff;
337
- --dropdown-divider-color: rgba(241, 245, 249, 0.12);
338
- --dropdown-section-title: #eee;
339
- // ***** Navbar: end ***** //
340
-
341
- // ***** Sidebar: start ***** //
342
- --sidebar-background-color: #2d323e;
343
- --sidebar-header-background: rgb(59, 130, 246);
344
- --sidebar-color: #fff;
345
- --sidebar-icon-color: #647491;
346
- --sidebar-hover-icon-color: #a9afbb;
347
- --sidebar-active-icon: #fff;
348
- --sidebar-user-detail-color: #a9afbb;
349
- --sidebar-user-detail-profile-color: var(--basic-blue);
350
- --sidebar-user-detail-select-background: var(--basic-blue-02);
351
- --sidebar-user-profile-select-background: var(--basic-blue-02);
352
- --sidebar-user-detail-select-hover-background: rgba(255, 255, 255, .05);
353
- --sidebar-user-detail-select-color: #fff;
354
- --tooltip-bckground: rgb(151,163, 182);
355
- --tooltip-color: var(--basic-blue-03);
356
- // ***** Sidebar: end ***** //
201
+ // --ion-background-color: #121212;
202
+ // --ion-background-color-rgb: 18,18,18;
203
+
204
+ // --ion-text-color: #ffffff;
205
+ // --ion-text-color-rgb: 255,255,255;
206
+
207
+ // --ion-border-color: #222222;
208
+
209
+ // --ion-color-step-50: #1e1e1e;
210
+ // --ion-color-step-100: #2a2a2a;
211
+ // --ion-color-step-150: #363636;
212
+ // --ion-color-step-200: #414141;
213
+ // --ion-color-step-250: #4d4d4d;
214
+ // --ion-color-step-300: #595959;
215
+ // --ion-color-step-350: #656565;
216
+ // --ion-color-step-400: #717171;
217
+ // --ion-color-step-450: #7d7d7d;
218
+ // --ion-color-step-500: #898989;
219
+ // --ion-color-step-550: #949494;
220
+ // --ion-color-step-600: #a0a0a0;
221
+ // --ion-color-step-650: #acacac;
222
+ // --ion-color-step-700: #b8b8b8;
223
+ // --ion-color-step-750: #c4c4c4;
224
+ // --ion-color-step-800: #d0d0d0;
225
+ // --ion-color-step-850: #dbdbdb;
226
+ // --ion-color-step-900: #e7e7e7;
227
+ // --ion-color-step-950: #f3f3f3;
228
+
229
+ // --ion-item-background: #1e1e1e;
230
+ // --ion-toolbar-background: #1f1f1f;
231
+ // --ion-tab-bar-background: #1f1f1f;
232
+
233
+
234
+ // /* ----- NEW -----*/
235
+ // --icon-color: rgb(135, 150, 175);
236
+ // --basic-blue: rgb(33,150,243);
237
+ // --basic-red: #EB1E23;
238
+ // --basic-blue-02: rgb(51, 65, 85);
239
+ // --basic-blue-03: rgb(27,37,51);
240
+
241
+ // // ***** Conversation-list: start ***** //
242
+ // --list-bkg-color: rgb(16,23,37);
243
+ // --list-bkg-color-selected: rgba(24, 119, 242, 0.12); //rgba(24, 119, 242, 0.04);
244
+ // --list-bkg-color-selected-border: var(--basic-blue);
245
+ // --item-backgroud-hover: rgba(255, 255, 255, 1);
246
+ // --archive-button-background: rgb(16,23,37);
247
+ // --avatar-placeholder-color: #ffffff;
248
+ // --conversation-project-color: rgb(135, 150, 175);
249
+
250
+ // --list-conversation-with-color: white;
251
+ // --list-conversation-with-color-not-read: var(--basic-blue);
252
+ // --list-conversation-message-color-not-read: var(--basic-blue);
253
+ // --list-notification-point-color: var(--basic-blue);
254
+ // --list-timestamp-color: hsl(228, 2%, 44%);
255
+ // --last-message-color: rgb(148, 163, 184);
256
+
257
+ // --contact-directory-searchbar-background: var(--basic-blue-03);
258
+ // // ***** Conversation-list: end ***** //
259
+
260
+ // // ***** Conversation-detail: start ***** //
261
+ // --conversation-detail-background: var(--basic-blue-03);
262
+ // --conversation-detail-header-color: white;
263
+ // --conversation-detail-header-typing-color: var(--basic-blue);
264
+ // --border-color-base: rgba(241, 245, 249, 0.12);
265
+ // --date-divider-color: rgba(241, 245, 249, 0.12);
266
+ // --date-divider-text-color: #64748b;
267
+ // --message-date-color: #647491;
268
+ // --textarea-background: var(--basic-blue-02);
269
+ // --textarea-color: var(--icon-color);
270
+ // // ***** Conversation-detail: end ***** //
271
+
272
+ // // ***** Conversation-detail: INFO-MESSAGE: start ***** //
273
+ // --info-message-background: #C9E4F6;
274
+ // --info-message-color: var(--basic-blue-03);
275
+ // --info-message-bounce-color: #C9E4F6;
276
+ // // ***** Conversation-detail: INFO-MESSAGE: end ***** //
277
+
278
+ // // ***** Conversation-detail: BUBBLE-MESSAGE: start ***** //
279
+ // --bck-msg-received: rgb(100, 116, 139);
280
+ // --col-msg-received: rgb(248, 250, 252);
281
+ // --bck-msg-sent: rgb(59, 130, 246);
282
+ // --col-msg-sent: rgb(239, 246, 255);
283
+ // --return-receipt-color: rgb(59, 130, 246);
284
+ // --button-in-msg-font-size: 15px;
285
+ // --buttonBackgroundColor: #ffffff;
286
+ // --buttonTextColor: #2a6ac1;
287
+ // --buttonHoverBackgroundColor: #2a6ac1;
288
+ // --buttonHoverTextColor: #ffffff;
289
+ // // ***** Conversation-detail: BUBBLE-MESSAGE: end ***** //
290
+
291
+ // // ***** Conversation-detail EMOJI-MART: start ***** //
292
+ // --emojii-mart-background: var(--basic-blue-02);
293
+ // --emoji-mart-color: var(--icon-color);
294
+ // // ***** Conversation-detail EMOJI-MART: end ***** //
295
+
296
+ // // ***** Conversation-detail: INFO-DIRECT: start ***** //
297
+ // --info-text-color: #f0f2f7;
298
+ // --info-direct-detail-accordion-background: var(--basic-blue-02);
299
+ // --info-direct-color-accordion-hover: rgba(255, 255, 255, .05);
300
+ // --info-direct-color-accordion-color-title: #fff;
301
+ // --info-direct-color-accordion-color-subtitle: #a9afbb;
302
+ // // ***** Conversation-detail: INFO-DIRECT: end ***** //
303
+
304
+ // // ***** MODALS: start ***** //
305
+ // --modal-header-background: rgb(59, 130, 246);
306
+ // --modal-icon-color: rgb(239, 246, 255);
307
+ // --modal-content-background: var(--basic-blue-03);
308
+ // --title-focus-color: rgb(239, 246, 255);
309
+ // --border-focus-color: rgb(59, 130, 246);
310
+ // --button-no-background-text-color: rgb(98, 112, 139);
311
+ // --button-background-color: rgb(59, 130, 246);
312
+ // --button-text-color: rgb(239, 246, 255);
313
+ // --label-color: #64748b;
314
+ // --preview-background: var(--basic-blue-02);
315
+ // // ***** MODALS: end ***** //
316
+
317
+ // // ***** CANNED-RESPONSES: start ***** //
318
+ // --canned-hover-background: #1877f2;
319
+ // --canned-hover-color: rgb(135, 150, 175);
320
+ // // ***** CANNED-RESPONSES: end ***** //
321
+
322
+
323
+ // // ***** Navbar: start ***** //
324
+ // --text-base-color: #ffffff;
325
+ // --navbar-background: var(--basic-blue-03);
326
+ // --nav-bar-heigth: 60px;
327
+ // --simulate-btn-background: #216d4b;
328
+ // --simulate-btn-color: #fff;
329
+
330
+ // --dropdown-menu-background: var(--basic-blue-03);
331
+ // --dropdown-menu-color: rgb(148, 163, 184);
332
+ // --dropdown-menu-item-color: rgb(226, 232, 240);
333
+ // --dropdown-menu-selected-background: rgba(255, 255, 255, .05);
334
+ // --dropdown-menu-selected-color: #eee;
335
+ // --dropdown-menu-hover-background: rgba(255, 255, 255, .05);
336
+ // --dropdown-menu-hover-color: #fff;
337
+ // --dropdown-divider-color: rgba(241, 245, 249, 0.12);
338
+ // --dropdown-section-title: #eee;
339
+ // // ***** Navbar: end ***** //
340
+
341
+ // // ***** Sidebar: start ***** //
342
+ // --sidebar-background-color: #2d323e;
343
+ // --sidebar-header-background: rgb(59, 130, 246);
344
+ // --sidebar-color: #fff;
345
+ // --sidebar-icon-color: #647491;
346
+ // --sidebar-hover-icon-color: #a9afbb;
347
+ // --sidebar-active-icon: #fff;
348
+ // --sidebar-user-detail-color: #a9afbb;
349
+ // --sidebar-user-detail-profile-color: var(--basic-blue);
350
+ // --sidebar-user-detail-select-background: var(--basic-blue-02);
351
+ // --sidebar-user-profile-select-background: var(--basic-blue-02);
352
+ // --sidebar-user-detail-select-hover-background: rgba(255, 255, 255, .05);
353
+ // --sidebar-user-detail-select-color: #fff;
354
+ // --tooltip-bckground: rgb(151,163, 182);
355
+ // --tooltip-color: var(--basic-blue-03);
356
+ // // ***** Sidebar: end ***** //
357
357
 
358
358
 
359
359
  }
@@ -35,7 +35,7 @@ body {
35
35
  --list-conversation-with-color: rgba(0, 0, 0, 1);
36
36
  --list-conversation-with-color-not-read: #3c4858;
37
37
  --list-conversation-message-color-not-read: #3c4858;
38
- --list-notification-point-color: #3c4858;
38
+ --list-notification-point-color: var(--basic-blue);
39
39
  --list-timestamp-color: #6e6f73;
40
40
  --last-message-color: rgb(60, 72, 88);
41
41