contactstudiocstools 1.0.241 → 1.0.243
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/dist/module.json
CHANGED
|
@@ -32,7 +32,7 @@ function initSnapshot(): void {
|
|
|
32
32
|
snapshot.onmessage = ({ data }) => {
|
|
33
33
|
if (data.error) {
|
|
34
34
|
console.log(JSON.stringify(data))
|
|
35
|
-
logout(JSON.stringify(data) || "defaultLongpollingError");
|
|
35
|
+
logout(JSON.stringify(data) || "defaultLongpollingError", true);
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
</template>
|
|
150
150
|
|
|
151
151
|
<script setup lang="ts">
|
|
152
|
-
import { ref, computed, watch } from "vue";
|
|
152
|
+
import { ref, computed, watch, onUpdated } from "vue";
|
|
153
153
|
import { IChatContact, IChatMessages, sleep } from "./types";
|
|
154
154
|
import { marked } from "marked";
|
|
155
155
|
import { useNuxtApp } from "#app";
|
|
@@ -205,6 +205,13 @@ const OrganismChatMessagesRef = ref<HTMLElement>();
|
|
|
205
205
|
const lastTyping = ref<boolean>(false);
|
|
206
206
|
|
|
207
207
|
// methods
|
|
208
|
+
|
|
209
|
+
onUpdated(() => {
|
|
210
|
+
// Resolver problema, que ao carregar um novo contato, o cursor seleciona o começo do texto
|
|
211
|
+
// Com isso, o cursor volta par o final do texto, não fazendo errar a digitação
|
|
212
|
+
setEndOfContenteditable(textareaRef.value)
|
|
213
|
+
})
|
|
214
|
+
|
|
208
215
|
async function verifyPaste(): Promise<void> {
|
|
209
216
|
const clipboard = await navigator.clipboard.readText();
|
|
210
217
|
|
|
@@ -9,7 +9,7 @@ export declare function getDDI(phone: string): Promise<any>;
|
|
|
9
9
|
export declare function deepEqual(obj1: any, obj2: any): boolean;
|
|
10
10
|
export declare function getAccessControl(access: string[], key: string): string;
|
|
11
11
|
export declare function searchZipCode({ models, field }: any): Promise<void>;
|
|
12
|
-
export declare function logout(reason?: string): Promise<void>;
|
|
12
|
+
export declare function logout(reason?: string, forced?: boolean): Promise<void>;
|
|
13
13
|
export declare function getMinutesBetweenDates(start: Date, end: Date): number;
|
|
14
14
|
export declare function randomID(): string;
|
|
15
15
|
export declare function getTokenProgressData(token: string): Promise<any>;
|
|
@@ -93,10 +93,13 @@ export async function searchZipCode({ models, field }) {
|
|
|
93
93
|
models.UF = "";
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
export async function logout(reason) {
|
|
96
|
+
export async function logout(reason, forced) {
|
|
97
97
|
setCookie("logoff_reason", reason, { path: "/", expires: 1 / 720 });
|
|
98
|
+
if (forced) {
|
|
99
|
+
setCookie("logoff_force", 1, { path: "/", expires: 1 / 720 });
|
|
100
|
+
}
|
|
98
101
|
if (!process.dev) {
|
|
99
|
-
location.assign("/csapi/iam/ui/logoff");
|
|
102
|
+
setTimeout(() => location.assign("/csapi/iam/ui/logoff"), 1e3);
|
|
100
103
|
}
|
|
101
104
|
}
|
|
102
105
|
export function getMinutesBetweenDates(start, end) {
|