@chat21/chat21-ionic 3.0.97-rc.4 → 3.0.97-rc.5
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 +9 -0
- package/README.md +6 -0
- package/package.json +1 -1
- package/src/app/app-routing.module.ts +5 -0
- package/src/app/app.module.ts +2 -0
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +16 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +42 -1
- package/src/app/modals/send-email/send-email.module.ts +0 -10
- package/src/app/modals/send-email/send-email.page.html +5 -5
- package/src/app/modals/send-email/send-email.page.scss +18 -2
- package/src/app/modals/send-email/send-email.page.ts +15 -2
- package/src/app/modals/send-whatsapp-template/send-whatsapp-template-routing.module.ts +17 -0
- package/src/app/modals/send-whatsapp-template/send-whatsapp-template.module.ts +28 -0
- package/src/app/modals/send-whatsapp-template/send-whatsapp-template.page.html +139 -0
- package/src/app/modals/send-whatsapp-template/send-whatsapp-template.page.scss +340 -0
- package/src/app/modals/send-whatsapp-template/send-whatsapp-template.page.spec.ts +24 -0
- package/src/app/modals/send-whatsapp-template/send-whatsapp-template.page.ts +183 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.html +8 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +80 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +1 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +3 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +209 -200
- package/src/app/services/templates/templates.service.spec.ts +12 -0
- package/src/app/services/templates/templates.service.ts +42 -0
- package/src/assets/i18n/ar.json +20 -11
- package/src/assets/i18n/az.json +296 -287
- package/src/assets/i18n/de.json +20 -11
- package/src/assets/i18n/en.json +20 -11
- package/src/assets/i18n/es.json +20 -11
- package/src/assets/i18n/fr.json +20 -11
- package/src/assets/i18n/it.json +20 -11
- package/src/assets/i18n/kk.json +296 -287
- package/src/assets/i18n/pt.json +20 -11
- package/src/assets/i18n/ru.json +20 -11
- package/src/assets/i18n/sr.json +20 -11
- package/src/assets/i18n/sv.json +296 -287
- package/src/assets/i18n/tr.json +27 -18
- package/src/assets/i18n/uk.json +296 -287
- package/src/assets/i18n/uz.json +296 -287
- package/src/assets/images/whatsapp_background.png +0 -0
- package/src/chat-config-template.json +3 -1
- package/src/chat-config.json +3 -1
- package/src/chat-config-mqtt-localhost.json +0 -35
- package/src/chat-config-mqtt.json +0 -26
- package/src/chat-config-native-mqtt.json +0 -36
- package/src/chat-config-native-prod.json +0 -36
- package/src/chat-config-pre.json +0 -34
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { TemplatesService } from './templates.service';
|
|
4
|
+
|
|
5
|
+
describe('TemplatesService', () => {
|
|
6
|
+
beforeEach(() => TestBed.configureTestingModule({}));
|
|
7
|
+
|
|
8
|
+
it('should be created', () => {
|
|
9
|
+
const service: TemplatesService = TestBed.get(TemplatesService);
|
|
10
|
+
expect(service).toBeTruthy();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { AppConfigProvider } from '../app-config';
|
|
4
|
+
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
5
|
+
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
6
|
+
import { map } from 'rxjs/operators';
|
|
7
|
+
|
|
8
|
+
@Injectable({
|
|
9
|
+
providedIn: 'root'
|
|
10
|
+
})
|
|
11
|
+
export class TemplatesService {
|
|
12
|
+
|
|
13
|
+
private apiUrl: string;
|
|
14
|
+
private logger: LoggerService = LoggerInstance.getInstance();
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
public http: HttpClient,
|
|
18
|
+
public appConfigProvider: AppConfigProvider
|
|
19
|
+
) {
|
|
20
|
+
// johnny
|
|
21
|
+
this.apiUrl = appConfigProvider.getConfig().whatsappTemplatesBaseUrl;
|
|
22
|
+
this.logger.log("[TEMPLATE SERVICE] apiUrl: ", this.apiUrl);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// ---------------------------------------------
|
|
26
|
+
// @ GET templates list by project id
|
|
27
|
+
// ---------------------------------------------
|
|
28
|
+
getTemplatesList(project_id: string) {
|
|
29
|
+
const httpOptions = {
|
|
30
|
+
headers: new HttpHeaders({
|
|
31
|
+
'Content-Type': 'application/json'
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const url = this.apiUrl + "ext/templates/" + project_id;
|
|
36
|
+
this.logger.log('[TEMPLATES SERVICE] - getTemplatesList URL ', url);
|
|
37
|
+
return this.http.get(url, httpOptions).pipe(map((res: any) => {
|
|
38
|
+
this.logger.log('[TEMPLATES SERVICE] - getTemplatesList RES ', res);
|
|
39
|
+
return res;
|
|
40
|
+
}))
|
|
41
|
+
}
|
|
42
|
+
}
|
package/src/assets/i18n/ar.json
CHANGED
|
@@ -23,16 +23,6 @@
|
|
|
23
23
|
],
|
|
24
24
|
"LABEL_SEND": "إرسال",
|
|
25
25
|
"LABEL_CHAT":"دردشة",
|
|
26
|
-
"EMAIL_OFFLINE_TIP":"تحذير: المستخدم غير متصل! سيتم إرسال الرسالة عبر البريد الإلكتروني",
|
|
27
|
-
"EMAIL_PLACEHOLDER":"المسودة متاحة هنا - انقر للتعديل",
|
|
28
|
-
"EMAIL_NOT_FOUND_PLACEHOLDER":"لم يقدم هذا المستخدم عنوان بريد إلكتروني. قم بتحديث عنوان الزائر لإرسال بريد إلكتروني",
|
|
29
|
-
"SUBJECT":"موضوعات",
|
|
30
|
-
"MESSAGE":"رسالة",
|
|
31
|
-
"MESSAGE_PLACEHOLDER":"...اكتب رسالتك",
|
|
32
|
-
"SEND_EMAIL_SUCCESS":"تم إرسال البريد الإلكتروني بنجاح ✌🏻",
|
|
33
|
-
"SEND_EMAIL_ERROR":"⚠️ تنبيه ⚠️ حدث خطأ أثناء إرسال البريد الإلكتروني. يرجى المحاولة مرة أخرى",
|
|
34
|
-
"SUBJECT_OFFLINE_MESSAGE":"رسالة Tiledesk غير متصل 💬",
|
|
35
|
-
"SEND_EMAIL_SUCCESS_OFFLINE_MESSAGE":"تم إرسال الرسالة أيضًا عبر البريد الإلكتروني 📩",
|
|
36
26
|
"ID_CONVERSATION": "معرف محادثة",
|
|
37
27
|
"LABEL_CREATED_THE": "تم إنشاء المجموعة في",
|
|
38
28
|
"LABEL_INFO_ATTRIBUTE": "صفات",
|
|
@@ -294,5 +284,24 @@
|
|
|
294
284
|
"OTHER_PROJECTS":"مشاريع أخرى"
|
|
295
285
|
},
|
|
296
286
|
"JSON_RESPONSE":"استجابة JSON",
|
|
297
|
-
"LIVE":"حاليا"
|
|
287
|
+
"LIVE":"حاليا",
|
|
288
|
+
"WHATSAPP": {
|
|
289
|
+
"LABEL_TEMPLATES":"القوالب",
|
|
290
|
+
"LABEL_WA_TEMPLATES":"قوالب WhatsApp",
|
|
291
|
+
"SELECT_MESSAGE_TEMPLATE":"حدد قالب رسالة",
|
|
292
|
+
"ERROR_WHATSAPP_NOT_INSTALLED":"قم بتثبيت Whatsapp من App Store لاستخدام القوالب",
|
|
293
|
+
"ERROR_WHATSAPP_GENERIC_ERROR":"حدثت مشكلة أثناء الحصول على القوالب من whatsapp. أعد المحاولة لاحقًا!"
|
|
294
|
+
},
|
|
295
|
+
"EMAIL":{
|
|
296
|
+
"EMAIL_OFFLINE_TIP":"تحذير: المستخدم غير متصل! سيتم إرسال الرسالة عبر البريد الإلكتروني",
|
|
297
|
+
"EMAIL_PLACEHOLDER":"المسودة متاحة هنا - انقر للتعديل",
|
|
298
|
+
"EMAIL_NOT_FOUND_PLACEHOLDER":"لم يقدم هذا المستخدم عنوان بريد إلكتروني. قم بتحديث عنوان الزائر لإرسال بريد إلكتروني",
|
|
299
|
+
"SUBJECT":"موضوعات",
|
|
300
|
+
"MESSAGE":"رسالة",
|
|
301
|
+
"MESSAGE_PLACEHOLDER":"...اكتب رسالتك",
|
|
302
|
+
"SEND_EMAIL_SUCCESS":"تم إرسال البريد الإلكتروني بنجاح ✌🏻",
|
|
303
|
+
"SEND_EMAIL_ERROR":"⚠️ تنبيه ⚠️ حدث خطأ أثناء إرسال البريد الإلكتروني. يرجى المحاولة مرة أخرى",
|
|
304
|
+
"SUBJECT_OFFLINE_MESSAGE":"رسالة Tiledesk غير متصل 💬",
|
|
305
|
+
"SEND_EMAIL_SUCCESS_OFFLINE_MESSAGE":"تم إرسال الرسالة أيضًا عبر البريد الإلكتروني 📩"
|
|
306
|
+
}
|
|
298
307
|
}
|