@chat21/chat21-web-widget 5.0.53-rc.1 → 5.0.53-rc.3
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/.github/workflows/docker-community-push-latest.yml +1 -0
- package/.github/workflows/docker-image-tag-community-tag-push.yml +1 -0
- package/CHANGELOG.md +17 -0
- package/Dockerfile +2 -2
- package/angular.json +6 -22
- package/deploy_amazon_beta.sh +1 -1
- package/deploy_amazon_prod.sh +1 -1
- package/karma.conf.js +1 -0
- package/package.json +20 -21
- package/src/app/app-routing.module.ts +1 -1
- package/src/app/app.component.scss +38 -10
- package/src/app/app.module.ts +3 -3
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +0 -10
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +0 -2
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +0 -10
- package/src/app/component/form/form-builder/form-builder.component.ts +1 -1
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +1 -1
- package/src/app/component/form/inputs/form-label/form-label.component.ts +1 -1
- package/src/app/component/form/inputs/form-text/form-text.component.ts +2 -2
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +2 -2
- package/src/app/component/form/prechat-form/prechat-form.component.ts +1 -1
- package/src/app/component/message/bubble-message/bubble-message.component.html +1 -4
- package/src/app/component/message/bubble-message/bubble-message.component.ts +1 -37
- package/src/app/component/message/image/image.component.ts +1 -9
- package/src/app/component/message/info-message/info-message.component.html +3 -3
- package/src/app/component/message/info-message/info-message.component.ts +0 -10
- package/src/app/directives/tooltip.directive.spec.ts +8 -0
- package/src/app/directives/tooltip.directive.ts +46 -0
- package/src/assets/twp/index-dev.html +3 -3
- package/src/assets/twp/index.html +4 -4
- package/src/chat21-core/providers/abstract/archivedconversations-handler.service.ts +5 -5
- package/src/chat21-core/providers/abstract/conversation-handler.service.ts +6 -6
- package/src/chat21-core/providers/abstract/conversations-handler.service.ts +6 -6
- package/src/chat21-core/providers/abstract/groups-handler.service.ts +5 -5
- package/src/chat21-core/providers/abstract/messagingAuth.service.ts +2 -2
- package/src/chat21-core/providers/abstract/notifications.service.ts +1 -1
- package/src/chat21-core/providers/abstract/presence.service.ts +2 -2
- package/src/chat21-core/providers/abstract/typing.service.ts +2 -2
- package/src/chat21-core/providers/abstract/upload.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-groups-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-notifications.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +0 -1
- package/src/chat21-core/providers/mqtt/mqtt-groups-handler.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +1 -1
- package/src/chat21-core/utils/constants.ts +3 -2
- package/src/chat21-core/utils/utils.ts +2 -0
- package/src/launch.js +10 -6
- package/{dist/launch.js → src/launch_old.js} +80 -5
- package/src/main.ts +1 -0
- package/src/polyfills.ts +0 -10
- package/src/test.ts +3 -1
- package/tsconfig.json +5 -3
- package/dist/3rdpartylicenses.txt +0 -942
- package/dist/assets/i18n/en.json +0 -94
- package/dist/assets/i18n/es.json +0 -90
- package/dist/assets/i18n/fr.json +0 -90
- package/dist/assets/i18n/it.json +0 -90
- package/dist/assets/images/avatar_bot_tiledesk.svg +0 -1
- package/dist/assets/images/chat_human_avatar.svg +0 -12
- package/dist/assets/images/f21ico-done.svg +0 -1
- package/dist/assets/images/f21ico-done_all.svg +0 -1
- package/dist/assets/images/f21ico-schedule.svg +0 -1
- package/dist/assets/images/file-alt-solid.png +0 -0
- package/dist/assets/images/light_avatar_placeholder.svg +0 -1
- package/dist/assets/images/tommy_bot_tiledesk.svg +0 -48
- package/dist/assets/images/website_mockup.jpg +0 -0
- package/dist/assets/js/chat21client.js +0 -1066
- package/dist/assets/js/mqtt/4.1.0/mqtt.min.js +0 -1
- package/dist/assets/js/mqtt/4.2.6/mqtt.min.js +0 -1
- package/dist/assets/js/mqtt/4.2.8/mqtt.min.js +0 -1
- package/dist/assets/sounds/Carme.mp3 +0 -0
- package/dist/assets/sounds/justsaying.mp3 +0 -0
- package/dist/assets/sounds/pling.mp3 +0 -0
- package/dist/assets/styles/tiledesk_v1.scss +0 -22
- package/dist/assets/twp/chatbot-panel.html +0 -424
- package/dist/assets/twp/index-dev.html +0 -2430
- package/dist/assets/twp/index.html +0 -603
- package/dist/assets/twp/tiledesk_widget_files/bootstrap.min.css +0 -5
- package/dist/assets/twp/tiledesk_widget_files/bootstrap.min.js +0 -7
- package/dist/assets/twp/tiledesk_widget_files/facebook.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/font-awesome.min.css +0 -4
- package/dist/assets/twp/tiledesk_widget_files/icon +0 -23
- package/dist/assets/twp/tiledesk_widget_files/jquery.min.js +0 -2
- package/dist/assets/twp/tiledesk_widget_files/linkedin.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-black.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-mobile.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-short.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo@2x-black.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/telegram.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/twitter.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/website-poly.min.css +0 -5623
- package/dist/assets/twp/tiledesk_widget_files/whatsapp.png +0 -0
- package/dist/base_script.html +0 -57
- package/dist/environments/real_data/widget-config-docker.json +0 -28
- package/dist/environments/real_data/widget-config-firebase.json +0 -30
- package/dist/environments/real_data/widget-config-mqtt.json +0 -27
- package/dist/environments/real_data/widget-config-native-mqtt.json +0 -28
- package/dist/environments/real_data/widget-config-native-prod.json +0 -27
- package/dist/f21ico-done.svg +0 -1
- package/dist/f21ico-done_all.svg +0 -1
- package/dist/f21ico-schedule.svg +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/iframe-style.css +0 -189
- package/dist/index.html +0 -16
- package/dist/main.js +0 -1
- package/dist/polyfills-es5.js +0 -1
- package/dist/polyfills.js +0 -1
- package/dist/runtime.js +0 -1
- package/dist/scripts.js +0 -1
- package/dist/styles.css +0 -1
- package/dist/styles.js +0 -1
- package/dist/test-custom-auth.html +0 -50
- package/dist/test-new.html +0 -231
- package/dist/test.html +0 -142
- package/dist/tiledesk.js +0 -72
- package/dist/vendor.js +0 -1
- package/dist/widget-config-template.json +0 -29
- package/dist/widget-config.json +0 -29
- package/e2e/protractor.conf.js +0 -32
- package/src/base_script.html +0 -57
- package/src/environments/environment.pre.ts +0 -42
- package/src/environments/environment.prod.ts +0 -40
- package/src/environments/environment.ts +0 -41
- package/src/environments/real_data/widget-config-docker.json +0 -28
- package/src/environments/real_data/widget-config-firebase.json +0 -30
- package/src/environments/real_data/widget-config-mqtt.json +0 -27
- package/src/environments/real_data/widget-config-native-mqtt.json +0 -28
- package/src/environments/real_data/widget-config-native-prod.json +0 -27
|
@@ -383,10 +383,10 @@
|
|
|
383
383
|
}
|
|
384
384
|
</script> -->
|
|
385
385
|
|
|
386
|
-
<meta property="og:title" content="
|
|
387
|
-
<meta property="og:description" content=""
|
|
386
|
+
<meta property="og:title" content="Try Tiledesk now!" />
|
|
387
|
+
<meta property="og:description" content="Qualify your leads to increase your sales faster. It's really easy to do it with the Tiledesk conversational form builder" />
|
|
388
|
+
<meta property="og:image" content="https://tiledesk.com/wp-content/uploads/2022/12/6029654-02-min.png" />
|
|
388
389
|
<meta property="og:locale" content="en">
|
|
389
|
-
<meta property="og:image" content="">
|
|
390
390
|
|
|
391
391
|
<link rel="icon" type="image/png" href="./tiledesk_widget_files/logo-short.png">
|
|
392
392
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
|
@@ -217,10 +217,10 @@
|
|
|
217
217
|
}
|
|
218
218
|
</script> -->
|
|
219
219
|
|
|
220
|
-
<meta property="og:title" content="
|
|
221
|
-
<meta property="og:description" content=""
|
|
220
|
+
<meta property="og:title" content="Try Tiledesk now!" />
|
|
221
|
+
<meta property="og:description" content="Qualify your leads to increase your sales faster. It's really easy to do it with the Tiledesk conversational form builder" />
|
|
222
|
+
<meta property="og:image" content="https://tiledesk.com/wp-content/uploads/2022/12/6029654-02-min.png" />
|
|
222
223
|
<meta property="og:locale" content="en">
|
|
223
|
-
<meta property="og:image" content="">
|
|
224
224
|
|
|
225
225
|
<link rel="icon" type="image/png" href="./tiledesk_widget_files/logo-short.png">
|
|
226
226
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
<div class="b-agent-demo_powered_by">
|
|
564
564
|
<a href="https://console.tiledesk.com/" target="_blank" style="cursor: pointer;text-decoration: none;">
|
|
565
565
|
<span style="position: relative; top: 2px;">Powered by</span>
|
|
566
|
-
<img src="./tiledesk_widget_files/logo@2x-black.png">
|
|
566
|
+
<img src="./tiledesk_widget_files/logo@2x-black.png" alt="Tiledesk">
|
|
567
567
|
</a>
|
|
568
568
|
</div>
|
|
569
569
|
</footer>
|
|
@@ -7,14 +7,14 @@ import { ImageRepoService } from './image-repo.service';
|
|
|
7
7
|
export abstract class ArchivedConversationsHandlerService {
|
|
8
8
|
|
|
9
9
|
// BehaviorSubject
|
|
10
|
-
abstract BSConversationDetail: BehaviorSubject<ConversationModel
|
|
11
|
-
abstract archivedConversationAdded: BehaviorSubject<ConversationModel
|
|
12
|
-
abstract archivedConversationChanged: BehaviorSubject<ConversationModel
|
|
13
|
-
abstract archivedConversationRemoved: BehaviorSubject<ConversationModel
|
|
10
|
+
abstract BSConversationDetail: BehaviorSubject<ConversationModel>;
|
|
11
|
+
abstract archivedConversationAdded: BehaviorSubject<ConversationModel>;
|
|
12
|
+
abstract archivedConversationChanged: BehaviorSubject<ConversationModel>;
|
|
13
|
+
abstract archivedConversationRemoved: BehaviorSubject<ConversationModel>;
|
|
14
14
|
// abstract readAllMessages: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
15
15
|
|
|
16
16
|
// params
|
|
17
|
-
abstract archivedConversations: Array<ConversationModel
|
|
17
|
+
abstract archivedConversations: Array<ConversationModel>;
|
|
18
18
|
abstract uidConvSelected: string;
|
|
19
19
|
//abstract imageRepo: ImageRepoService;
|
|
20
20
|
|
|
@@ -12,15 +12,15 @@ import { UserModel } from 'src/chat21-core/models/user';
|
|
|
12
12
|
export abstract class ConversationHandlerService {
|
|
13
13
|
|
|
14
14
|
// BehaviorSubject
|
|
15
|
-
abstract messageAdded: BehaviorSubject<MessageModel
|
|
16
|
-
abstract messageChanged: BehaviorSubject<MessageModel
|
|
17
|
-
abstract messageRemoved: BehaviorSubject<string
|
|
18
|
-
abstract messageWait: BehaviorSubject<any
|
|
19
|
-
abstract messageInfo: BehaviorSubject<MessageModel
|
|
15
|
+
abstract messageAdded: BehaviorSubject<MessageModel>;
|
|
16
|
+
abstract messageChanged: BehaviorSubject<MessageModel>;
|
|
17
|
+
abstract messageRemoved: BehaviorSubject<string>;
|
|
18
|
+
abstract messageWait: BehaviorSubject<any>;
|
|
19
|
+
abstract messageInfo: BehaviorSubject<MessageModel>;
|
|
20
20
|
|
|
21
21
|
// params
|
|
22
22
|
abstract attributes: any;
|
|
23
|
-
abstract messages: Array<MessageModel
|
|
23
|
+
abstract messages: Array<MessageModel>;
|
|
24
24
|
abstract conversationWith: string;
|
|
25
25
|
|
|
26
26
|
constructor() {}
|
|
@@ -14,15 +14,15 @@ import { ConversationModel } from './../../models/conversation';
|
|
|
14
14
|
export abstract class ConversationsHandlerService {
|
|
15
15
|
|
|
16
16
|
// BehaviorSubject
|
|
17
|
-
abstract BSConversationDetail: BehaviorSubject<ConversationModel
|
|
18
|
-
abstract conversationAdded: BehaviorSubject<ConversationModel
|
|
19
|
-
abstract conversationChanged: BehaviorSubject<ConversationModel
|
|
20
|
-
abstract conversationChangedDetailed: BehaviorSubject<{value: ConversationModel, previousValue: ConversationModel}
|
|
21
|
-
abstract conversationRemoved: BehaviorSubject<ConversationModel
|
|
17
|
+
abstract BSConversationDetail: BehaviorSubject<ConversationModel>;
|
|
18
|
+
abstract conversationAdded: BehaviorSubject<ConversationModel>;
|
|
19
|
+
abstract conversationChanged: BehaviorSubject<ConversationModel>;
|
|
20
|
+
abstract conversationChangedDetailed: BehaviorSubject<{value: ConversationModel, previousValue: ConversationModel}>;
|
|
21
|
+
abstract conversationRemoved: BehaviorSubject<ConversationModel>;
|
|
22
22
|
// abstract readAllMessages: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
23
23
|
|
|
24
24
|
// params
|
|
25
|
-
abstract conversations: Array<ConversationModel
|
|
25
|
+
abstract conversations: Array<ConversationModel>;
|
|
26
26
|
abstract uidConvSelected: string;
|
|
27
27
|
|
|
28
28
|
// functions
|
|
@@ -8,11 +8,11 @@ import { GroupModel } from '../../models/group';
|
|
|
8
8
|
export abstract class GroupsHandlerService {
|
|
9
9
|
|
|
10
10
|
// BehaviorSubject
|
|
11
|
-
abstract BSgroupDetail: BehaviorSubject<GroupModel
|
|
12
|
-
abstract SgroupDetail: Subject<GroupModel
|
|
13
|
-
abstract groupAdded: BehaviorSubject<GroupModel
|
|
14
|
-
abstract groupChanged: BehaviorSubject<GroupModel
|
|
15
|
-
abstract groupRemoved: BehaviorSubject<GroupModel
|
|
11
|
+
abstract BSgroupDetail: BehaviorSubject<GroupModel>;
|
|
12
|
+
abstract SgroupDetail: Subject<GroupModel>;
|
|
13
|
+
abstract groupAdded: BehaviorSubject<GroupModel>;
|
|
14
|
+
abstract groupChanged: BehaviorSubject<GroupModel>;
|
|
15
|
+
abstract groupRemoved: BehaviorSubject<GroupModel>;
|
|
16
16
|
|
|
17
17
|
abstract initialize(tenant: string, loggedUserId: string): void;
|
|
18
18
|
abstract connect(): void;
|
|
@@ -9,8 +9,8 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
9
9
|
export abstract class MessagingAuthService {
|
|
10
10
|
|
|
11
11
|
// BehaviorSubject
|
|
12
|
-
abstract BSAuthStateChanged: BehaviorSubject<any
|
|
13
|
-
abstract BSSignOut: BehaviorSubject<any
|
|
12
|
+
abstract BSAuthStateChanged: BehaviorSubject<any>;
|
|
13
|
+
abstract BSSignOut: BehaviorSubject<any>;
|
|
14
14
|
|
|
15
15
|
// params
|
|
16
16
|
public DEFAULT_PERSISTENCE: string = 'NONE';
|
|
@@ -6,7 +6,7 @@ import { Injectable } from '@angular/core';
|
|
|
6
6
|
export abstract class NotificationsService {
|
|
7
7
|
|
|
8
8
|
private _tenant: string;
|
|
9
|
-
|
|
9
|
+
public BUILD_VERSION = environment.version
|
|
10
10
|
|
|
11
11
|
public setTenant(tenant): void {
|
|
12
12
|
this._tenant = tenant;
|
|
@@ -8,8 +8,8 @@ import { BehaviorSubject, Observable } from 'rxjs';
|
|
|
8
8
|
export abstract class PresenceService {
|
|
9
9
|
|
|
10
10
|
// BehaviorSubject
|
|
11
|
-
abstract BSIsOnline: BehaviorSubject<any
|
|
12
|
-
abstract BSLastOnline: BehaviorSubject<any
|
|
11
|
+
abstract BSIsOnline: BehaviorSubject<any>;
|
|
12
|
+
abstract BSLastOnline: BehaviorSubject<any>;
|
|
13
13
|
|
|
14
14
|
// params
|
|
15
15
|
// private DEFAULT_TENANT: string = environment.firebaseConfig.tenant;
|
|
@@ -9,8 +9,8 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
9
9
|
export abstract class TypingService {
|
|
10
10
|
|
|
11
11
|
// BehaviorSubject
|
|
12
|
-
BSIsTyping: BehaviorSubject<any
|
|
13
|
-
BSSetTyping: BehaviorSubject<any
|
|
12
|
+
BSIsTyping: BehaviorSubject<any>;
|
|
13
|
+
BSSetTyping: BehaviorSubject<any>;
|
|
14
14
|
|
|
15
15
|
// params
|
|
16
16
|
// private DEFAULT_TENANT: string = environment.firebaseConfig.tenant;
|
|
@@ -27,7 +27,7 @@ export class FirebaseArchivedConversationsHandler extends ArchivedConversationsH
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
// BehaviorSubject
|
|
30
|
-
BSConversationDetail: BehaviorSubject<ConversationModel
|
|
30
|
+
BSConversationDetail: BehaviorSubject<ConversationModel>= new BehaviorSubject<ConversationModel>(null);
|
|
31
31
|
archivedConversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
32
32
|
archivedConversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
33
33
|
archivedConversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
@@ -28,7 +28,7 @@ export class FirebaseGroupsHandler extends GroupsHandlerService {
|
|
|
28
28
|
|
|
29
29
|
// BehaviorSubject
|
|
30
30
|
BSgroupDetail: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
31
|
-
SgroupDetail: Subject<GroupModel> = new
|
|
31
|
+
SgroupDetail: Subject<GroupModel> = new Subject<GroupModel>();
|
|
32
32
|
groupAdded: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
33
33
|
groupChanged: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
34
34
|
groupRemoved: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
@@ -14,7 +14,7 @@ import { LoggerService } from '../abstract/logger.service';
|
|
|
14
14
|
@Injectable()
|
|
15
15
|
export class FirebaseNotifications extends NotificationsService {
|
|
16
16
|
|
|
17
|
-
public BUILD_VERSION: string;
|
|
17
|
+
// public BUILD_VERSION: string;
|
|
18
18
|
private FCMcurrentToken: string;
|
|
19
19
|
private userId: string;
|
|
20
20
|
private tenant: string;
|
|
@@ -20,7 +20,7 @@ import { LoggerInstance } from '../logger/loggerInstance';
|
|
|
20
20
|
export class MQTTArchivedConversationsHandler extends ArchivedConversationsHandlerService {
|
|
21
21
|
|
|
22
22
|
// BehaviorSubject
|
|
23
|
-
BSConversationDetail: BehaviorSubject<ConversationModel
|
|
23
|
+
BSConversationDetail: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
24
24
|
archivedConversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
25
25
|
archivedConversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
26
26
|
archivedConversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
@@ -25,7 +25,6 @@ export class MQTTConversationsHandler extends ConversationsHandlerService {
|
|
|
25
25
|
conversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);;
|
|
26
26
|
conversationChangedDetailed: BehaviorSubject<{value: ConversationModel, previousValue: ConversationModel}> = new BehaviorSubject<{value: ConversationModel, previousValue: ConversationModel}>(null);
|
|
27
27
|
conversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
28
|
-
BSConversations: BehaviorSubject<ConversationModel[]>
|
|
29
28
|
// readAllMessages: BehaviorSubject<string>;
|
|
30
29
|
|
|
31
30
|
// public variables
|
|
@@ -14,7 +14,7 @@ export class MQTTGroupsHandler extends GroupsHandlerService {
|
|
|
14
14
|
|
|
15
15
|
// BehaviorSubject
|
|
16
16
|
BSgroupDetail: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
17
|
-
SgroupDetail: Subject<GroupModel> = new
|
|
17
|
+
SgroupDetail: Subject<GroupModel> = new Subject<GroupModel>();
|
|
18
18
|
groupAdded: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
19
19
|
groupChanged: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
20
20
|
groupRemoved: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
@@ -15,7 +15,7 @@ import { Chat21Service } from './chat-service';
|
|
|
15
15
|
@Injectable()
|
|
16
16
|
export class MQTTNotifications extends NotificationsService {
|
|
17
17
|
|
|
18
|
-
public BUILD_VERSION: string;
|
|
18
|
+
// public BUILD_VERSION: string;
|
|
19
19
|
private FCMcurrentToken: string;
|
|
20
20
|
private userId: string;
|
|
21
21
|
private tenant: string;
|
|
@@ -45,7 +45,8 @@ export const TYPE_MSG_IMAGE = 'image';
|
|
|
45
45
|
export const TYPE_MSG_FILE = 'file';
|
|
46
46
|
export const TYPE_MSG_BUTTON = 'button';
|
|
47
47
|
|
|
48
|
-
export const MAX_WIDTH_IMAGES =
|
|
48
|
+
export const MAX_WIDTH_IMAGES = 230;
|
|
49
|
+
export const MIN_WIDTH_IMAGES = 130;
|
|
49
50
|
export const TIME_TYPING_MESSAGE = 2000;
|
|
50
51
|
export const TYPE_DIRECT = 'direct';
|
|
51
52
|
export const TYPE_GROUP = 'group';
|
|
@@ -105,4 +106,4 @@ export const LogLevel = {
|
|
|
105
106
|
'WARN' : 1,
|
|
106
107
|
'INFO' : 2,
|
|
107
108
|
'DEBUG' : 3
|
|
108
|
-
}
|
|
109
|
+
}
|
package/src/launch.js
CHANGED
|
@@ -32,6 +32,7 @@ function loadIframe(tiledeskScriptBaseLocation) {
|
|
|
32
32
|
var ifrm = document.createElement("iframe");
|
|
33
33
|
ifrm.setAttribute("frameborder", "0");
|
|
34
34
|
ifrm.setAttribute("border", "0");
|
|
35
|
+
ifrm.setAttribute("title", "Tiledesk Widget")
|
|
35
36
|
|
|
36
37
|
var srcTileDesk = '<html lang="en">';
|
|
37
38
|
srcTileDesk += '<head>';
|
|
@@ -46,7 +47,7 @@ function loadIframe(tiledeskScriptBaseLocation) {
|
|
|
46
47
|
srcTileDesk += '<chat-root></chat-root>';
|
|
47
48
|
srcTileDesk += '<script type="text/javascript" src="'+tiledeskScriptBaseLocation+'/runtime.js"></script>';
|
|
48
49
|
srcTileDesk += '<script type="text/javascript" src="'+tiledeskScriptBaseLocation+'/polyfills.js"></script>';
|
|
49
|
-
srcTileDesk += '<
|
|
50
|
+
srcTileDesk += '<link type="text/css" rel="stylesheet" href="'+tiledeskScriptBaseLocation+'/styles.css" media="all"></link>';
|
|
50
51
|
srcTileDesk += '<script type="text/javascript" src="'+tiledeskScriptBaseLocation+'/vendor.js"></script>';
|
|
51
52
|
srcTileDesk += '<script type="text/javascript" src="'+tiledeskScriptBaseLocation+'/main.js"></script>';
|
|
52
53
|
srcTileDesk += '</body>';
|
|
@@ -163,11 +164,14 @@ function loadIframe(tiledeskScriptBaseLocation) {
|
|
|
163
164
|
|
|
164
165
|
iDiv.appendChild(ifrm);
|
|
165
166
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
if(tiledeskScriptBaseLocation.includes('localhost')){
|
|
168
|
+
ifrm.contentWindow.document.open();
|
|
169
|
+
ifrm.contentWindow.document.write(srcTileDesk);
|
|
170
|
+
ifrm.contentWindow.document.close();
|
|
171
|
+
}else {
|
|
172
|
+
ifrm.srcdoc = srcTileDesk
|
|
173
|
+
}
|
|
174
|
+
|
|
171
175
|
|
|
172
176
|
}
|
|
173
177
|
|
|
@@ -32,6 +32,7 @@ function loadIframe(tiledeskScriptBaseLocation) {
|
|
|
32
32
|
var ifrm = document.createElement("iframe");
|
|
33
33
|
ifrm.setAttribute("frameborder", "0");
|
|
34
34
|
ifrm.setAttribute("border", "0");
|
|
35
|
+
ifrm.setAttribute("title", "Tiledesk Widget")
|
|
35
36
|
|
|
36
37
|
var srcTileDesk = '<html lang="en">';
|
|
37
38
|
srcTileDesk += '<head>';
|
|
@@ -46,7 +47,7 @@ function loadIframe(tiledeskScriptBaseLocation) {
|
|
|
46
47
|
srcTileDesk += '<chat-root></chat-root>';
|
|
47
48
|
srcTileDesk += '<script type="text/javascript" src="'+tiledeskScriptBaseLocation+'/runtime.js"></script>';
|
|
48
49
|
srcTileDesk += '<script type="text/javascript" src="'+tiledeskScriptBaseLocation+'/polyfills.js"></script>';
|
|
49
|
-
srcTileDesk += '<
|
|
50
|
+
srcTileDesk += '<link type="text/css" rel="stylesheet" href="'+tiledeskScriptBaseLocation+'/styles.css" media="all"></link>';
|
|
50
51
|
srcTileDesk += '<script type="text/javascript" src="'+tiledeskScriptBaseLocation+'/vendor.js"></script>';
|
|
51
52
|
srcTileDesk += '<script type="text/javascript" src="'+tiledeskScriptBaseLocation+'/main.js"></script>';
|
|
52
53
|
srcTileDesk += '</body>';
|
|
@@ -163,12 +164,86 @@ function loadIframe(tiledeskScriptBaseLocation) {
|
|
|
163
164
|
|
|
164
165
|
iDiv.appendChild(ifrm);
|
|
165
166
|
|
|
167
|
+
if(tiledeskScriptBaseLocation.includes('localhost')){
|
|
168
|
+
// ifrm.src = tiledeskScriptBaseLocation + '/base_script.html'
|
|
169
|
+
// buildIframeDOM(ifrm, tiledeskScriptBaseLocation)
|
|
170
|
+
ifrm.contentWindow.document.open();
|
|
171
|
+
ifrm.contentWindow.document.write(srcTileDesk);
|
|
172
|
+
ifrm.contentWindow.document.close();
|
|
173
|
+
}else {
|
|
174
|
+
ifrm.srcdoc = srcTileDesk
|
|
175
|
+
}
|
|
176
|
+
// ifrm.onload = function(ev){
|
|
177
|
+
// const obj = {tiledeskSettings: window.tiledeskSettings}
|
|
178
|
+
// ifrm.contentWindow.postMessage(obj, "*")
|
|
179
|
+
// console.log('iframe contentwindowwww', ifrm.contentWindow)
|
|
180
|
+
// // ifrm.contentWindow.tiledesk = window.tiledesk
|
|
181
|
+
// }
|
|
182
|
+
// ifrm.innerHTML = srcTileDesk
|
|
166
183
|
// ifrm.contentWindow.document.open();
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
// ifrm.contentWindow.document.close();
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
}
|
|
171
187
|
|
|
188
|
+
function buildIframeDOM(iframe, tiledeskScriptBaseLocation){
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
var Idocument = iframe.contentDocument
|
|
193
|
+
console.log('iframeeee', Idocument)
|
|
194
|
+
var meta = Idocument.createElement('meta');
|
|
195
|
+
meta.setAttribute('charset', 'utf-8')
|
|
196
|
+
var meta_2 = Idocument.createElement('meta')
|
|
197
|
+
meta_2.setAttribute('name', 'viewport')
|
|
198
|
+
meta_2.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0')
|
|
199
|
+
var title = Idocument.createElement('title')
|
|
200
|
+
title.title = 'Tilechat Widget'
|
|
201
|
+
var base = Idocument.createElement('base')
|
|
202
|
+
base.setAttribute('href', './')
|
|
203
|
+
var link_1 = Idocument.createElement('link')
|
|
204
|
+
link_1.setAttribute('rel', 'icon')
|
|
205
|
+
link_1.setAttribute('type', 'image/x-icon')
|
|
206
|
+
link_1.setAttribute('href', 'favicon.ico')
|
|
207
|
+
var link_2 = Idocument.createElement('link')
|
|
208
|
+
link_2.setAttribute('rel', 'stylesheet')
|
|
209
|
+
link_2.setAttribute('type', 'text/css')
|
|
210
|
+
link_2.setAttribute('href', tiledeskScriptBaseLocation + '/assets/styles/tiledesk_v1.scss')
|
|
211
|
+
link_2.setAttribute('media','all')
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
let head = Idocument.getElementsByTagName('head')[0]
|
|
215
|
+
head.appendChild(meta)
|
|
216
|
+
head.appendChild(meta_2)
|
|
217
|
+
head.appendChild(title)
|
|
218
|
+
head.appendChild(base)
|
|
219
|
+
head.appendChild(link_1)
|
|
220
|
+
head.appendChild(link_2)
|
|
221
|
+
|
|
222
|
+
var script_1 = Idocument.createElement('script')
|
|
223
|
+
script_1.setAttribute('type','text/javascript')
|
|
224
|
+
script_1.setAttribute('src',tiledeskScriptBaseLocation + '/runtime.js')
|
|
225
|
+
var script_2 = Idocument.createElement('script')
|
|
226
|
+
script_2.setAttribute('type','text/javascript')
|
|
227
|
+
script_2.setAttribute('src',tiledeskScriptBaseLocation + '/polyfills.js')
|
|
228
|
+
var link = Idocument.createElement('link')
|
|
229
|
+
link.setAttribute('type','text/css')
|
|
230
|
+
link.setAttribute('rel','stylesheet')
|
|
231
|
+
link.setAttribute('href',tiledeskScriptBaseLocation + '/styles.css')
|
|
232
|
+
link.setAttribute('media','all')
|
|
233
|
+
var script_4 = Idocument.createElement('script')
|
|
234
|
+
script_4.setAttribute('type','text/javascript')
|
|
235
|
+
script_4.setAttribute('src',tiledeskScriptBaseLocation + '/vendor.js')
|
|
236
|
+
var script_5 = Idocument.createElement('script')
|
|
237
|
+
script_5.setAttribute('type','text/javascript')
|
|
238
|
+
script_5.setAttribute('src',tiledeskScriptBaseLocation + '/main.js')
|
|
239
|
+
|
|
240
|
+
let body= Idocument.getElementsByTagName('body')[0]
|
|
241
|
+
body.appendChild(Idocument.createElement('chat-root'))
|
|
242
|
+
body.appendChild(script_1)
|
|
243
|
+
body.appendChild(script_2)
|
|
244
|
+
body.appendChild(link)
|
|
245
|
+
body.appendChild(script_4)
|
|
246
|
+
body.appendChild(script_5)
|
|
172
247
|
}
|
|
173
248
|
|
|
174
249
|
|
package/src/main.ts
CHANGED
package/src/polyfills.ts
CHANGED
|
@@ -18,16 +18,6 @@
|
|
|
18
18
|
* BROWSER POLYFILLS
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
22
|
-
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Web Animations `@angular/platform-browser/animations`
|
|
26
|
-
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
27
|
-
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
28
|
-
*/
|
|
29
|
-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
30
|
-
|
|
31
21
|
/**
|
|
32
22
|
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
33
23
|
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
package/src/test.ts
CHANGED
|
@@ -11,7 +11,9 @@ declare const require: any;
|
|
|
11
11
|
// First, initialize the Angular testing environment.
|
|
12
12
|
getTestBed().initTestEnvironment(
|
|
13
13
|
BrowserDynamicTestingModule,
|
|
14
|
-
platformBrowserDynamicTesting()
|
|
14
|
+
platformBrowserDynamicTesting(), {
|
|
15
|
+
teardown: { destroyAfterEach: false }
|
|
16
|
+
}
|
|
15
17
|
);
|
|
16
18
|
// Then we find all the tests.
|
|
17
19
|
const context = require.context('./', true, /\.spec\.ts$/);
|
package/tsconfig.json
CHANGED
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
"module": "es2020",
|
|
11
11
|
"moduleResolution": "node",
|
|
12
12
|
"importHelpers": true,
|
|
13
|
-
"target": "
|
|
14
|
-
"types": [
|
|
13
|
+
"target": "ES2022",
|
|
14
|
+
"types": [
|
|
15
|
+
"node",
|
|
16
|
+
"jasmine"
|
|
17
|
+
],
|
|
15
18
|
"typeRoots": [
|
|
16
19
|
"node_modules/@types"
|
|
17
20
|
],
|
|
@@ -24,7 +27,6 @@
|
|
|
24
27
|
},
|
|
25
28
|
"skipLibCheck": true,
|
|
26
29
|
"angularCompilerOptions": {
|
|
27
|
-
"enableIvy": true,
|
|
28
30
|
"fullTemplateTypeCheck": true,
|
|
29
31
|
"strictInjectionParameters": true
|
|
30
32
|
}
|