widget-chatbot 2.0.0-alpha.7 → 2.0.0-alpha.8
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/widget-chatbot.es.js +192 -191
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import es from "react-markdown";
|
|
|
7
7
|
import ns from "remark-gfm";
|
|
8
8
|
import { Prism as ts } from "react-syntax-highlighter";
|
|
9
9
|
import ss from "@ant-design/icons";
|
|
10
|
-
import { Pie as rs } from "@ant-design/
|
|
10
|
+
import { Pie as rs } from "@ant-design/charts";
|
|
11
11
|
import pe from "crypto-js";
|
|
12
12
|
import os from "@emoji-mart/react";
|
|
13
13
|
var Je = { exports: {} }, _e = {};
|
|
@@ -35,22 +35,22 @@ function Pn() {
|
|
|
35
35
|
return !1;
|
|
36
36
|
for (var o = {}, a = 0; a < 10; a++)
|
|
37
37
|
o["_" + String.fromCharCode(a)] = a;
|
|
38
|
-
var d = Object.getOwnPropertyNames(o).map(function(
|
|
39
|
-
return o[
|
|
38
|
+
var d = Object.getOwnPropertyNames(o).map(function(f) {
|
|
39
|
+
return o[f];
|
|
40
40
|
});
|
|
41
41
|
if (d.join("") !== "0123456789")
|
|
42
42
|
return !1;
|
|
43
43
|
var u = {};
|
|
44
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
45
|
-
u[
|
|
44
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(f) {
|
|
45
|
+
u[f] = f;
|
|
46
46
|
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
47
47
|
} catch {
|
|
48
48
|
return !1;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
return ln = c() ? Object.assign : function(l, o) {
|
|
52
|
-
for (var a, d = r(l), u,
|
|
53
|
-
a = Object(arguments[
|
|
52
|
+
for (var a, d = r(l), u, f = 1; f < arguments.length; f++) {
|
|
53
|
+
a = Object(arguments[f]);
|
|
54
54
|
for (var g in a)
|
|
55
55
|
t.call(a, g) && (d[g] = a[g]);
|
|
56
56
|
if (e) {
|
|
@@ -81,10 +81,10 @@ function cs() {
|
|
|
81
81
|
}
|
|
82
82
|
var r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = Object.prototype.hasOwnProperty, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
83
83
|
function o(a, d, u) {
|
|
84
|
-
var
|
|
84
|
+
var f, g = {}, m = null, v = null;
|
|
85
85
|
u !== void 0 && (m = "" + u), d.key !== void 0 && (m = "" + d.key), d.ref !== void 0 && (v = d.ref);
|
|
86
|
-
for (
|
|
87
|
-
if (a && a.defaultProps) for (
|
|
86
|
+
for (f in d) c.call(d, f) && !l.hasOwnProperty(f) && (g[f] = d[f]);
|
|
87
|
+
if (a && a.defaultProps) for (f in d = a.defaultProps, d) g[f] === void 0 && (g[f] = d[f]);
|
|
88
88
|
return { $$typeof: t, type: a, key: m, ref: v, props: g, _owner: r.current };
|
|
89
89
|
}
|
|
90
90
|
return _e.jsx = o, _e.jsxs = o, _e;
|
|
@@ -104,10 +104,10 @@ function is() {
|
|
|
104
104
|
process.env.NODE_ENV !== "production" && function() {
|
|
105
105
|
var t = Jn, s = Pn(), r = 60103, c = 60106;
|
|
106
106
|
e.Fragment = 60107;
|
|
107
|
-
var l = 60108, o = 60114, a = 60109, d = 60110, u = 60112,
|
|
107
|
+
var l = 60108, o = 60114, a = 60109, d = 60110, u = 60112, f = 60113, g = 60120, m = 60115, v = 60116, E = 60121, k = 60122, w = 60117, y = 60129, C = 60131;
|
|
108
108
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
109
|
-
var
|
|
110
|
-
r =
|
|
109
|
+
var x = Symbol.for;
|
|
110
|
+
r = x("react.element"), c = x("react.portal"), e.Fragment = x("react.fragment"), l = x("react.strict_mode"), o = x("react.profiler"), a = x("react.provider"), d = x("react.context"), u = x("react.forward_ref"), f = x("react.suspense"), g = x("react.suspense_list"), m = x("react.memo"), v = x("react.lazy"), E = x("react.block"), k = x("react.server.block"), w = x("react.fundamental"), x("react.scope"), x("react.opaque.id"), y = x("react.debug_trace_mode"), x("react.offscreen"), C = x("react.legacy_hidden");
|
|
111
111
|
}
|
|
112
112
|
var b = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
|
|
113
113
|
function D(i) {
|
|
@@ -136,7 +136,7 @@ function is() {
|
|
|
136
136
|
}
|
|
137
137
|
var Y = !1;
|
|
138
138
|
function B(i) {
|
|
139
|
-
return !!(typeof i == "string" || typeof i == "function" || i === e.Fragment || i === o || i === y || i === l || i ===
|
|
139
|
+
return !!(typeof i == "string" || typeof i == "function" || i === e.Fragment || i === o || i === y || i === l || i === f || i === g || i === C || Y || typeof i == "object" && i !== null && (i.$$typeof === v || i.$$typeof === m || i.$$typeof === a || i.$$typeof === d || i.$$typeof === u || i.$$typeof === w || i.$$typeof === E || i[0] === k));
|
|
140
140
|
}
|
|
141
141
|
function S(i, T, p) {
|
|
142
142
|
var R = T.displayName || T.name || "";
|
|
@@ -161,7 +161,7 @@ function is() {
|
|
|
161
161
|
return "Profiler";
|
|
162
162
|
case l:
|
|
163
163
|
return "StrictMode";
|
|
164
|
-
case
|
|
164
|
+
case f:
|
|
165
165
|
return "Suspense";
|
|
166
166
|
case g:
|
|
167
167
|
return "SuspenseList";
|
|
@@ -358,7 +358,7 @@ function is() {
|
|
|
358
358
|
if (typeof i == "string")
|
|
359
359
|
return Ye(i);
|
|
360
360
|
switch (i) {
|
|
361
|
-
case
|
|
361
|
+
case f:
|
|
362
362
|
return Ye("Suspense");
|
|
363
363
|
case g:
|
|
364
364
|
return Ye("SuspenseList");
|
|
@@ -658,7 +658,7 @@ function ls() {
|
|
|
658
658
|
return Yn || (Yn = 1, process.env.NODE_ENV === "production" ? Je.exports = cs() : Je.exports = is()), Je.exports;
|
|
659
659
|
}
|
|
660
660
|
var n = ls();
|
|
661
|
-
const as = "2.0.0-alpha.
|
|
661
|
+
const as = "2.0.0-alpha.7", et = "chat_session", ds = "user_uttered", us = "bot_uttered", fs = "ehelp_bot_uttered", xs = "https://sfchatbot.dataon.com", gs = [
|
|
662
662
|
{
|
|
663
663
|
label: "Didn’t address my question",
|
|
664
664
|
value: "Didn’t address my question"
|
|
@@ -765,7 +765,7 @@ const as = "2.0.0-alpha.3", et = "chat_session", ds = "user_uttered", us = "bot_
|
|
|
765
765
|
r == null || r.push(a);
|
|
766
766
|
}) : r == null || r.push(l);
|
|
767
767
|
}), r == null || r.forEach((l, o) => {
|
|
768
|
-
var d, u,
|
|
768
|
+
var d, u, f;
|
|
769
769
|
const a = l == null ? void 0 : l.generated_id;
|
|
770
770
|
a ? (t[a] || (t[a] = []), (u = t[a]) == null || u.push({
|
|
771
771
|
...l,
|
|
@@ -785,7 +785,7 @@ const as = "2.0.0-alpha.3", et = "chat_session", ds = "user_uttered", us = "bot_
|
|
|
785
785
|
...l,
|
|
786
786
|
keyItem: o,
|
|
787
787
|
...!(l != null && l.timestamp) && {
|
|
788
|
-
timestamp: (
|
|
788
|
+
timestamp: (f = le()) == null ? void 0 : f.format("hh:mm A")
|
|
789
789
|
}
|
|
790
790
|
});
|
|
791
791
|
});
|
|
@@ -877,7 +877,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
877
877
|
history: d,
|
|
878
878
|
isSF: u
|
|
879
879
|
}) => {
|
|
880
|
-
const [
|
|
880
|
+
const [f, g] = N(!1), [m, v] = N("va"), [E, k] = N(!1), [w, y] = N({}), [C, x] = N(!1), [b, h] = N(!1), D = K(!1), O = L(() => ({
|
|
881
881
|
getStartedPayload: t,
|
|
882
882
|
socketURL: s,
|
|
883
883
|
socketPath: r,
|
|
@@ -908,7 +908,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
908
908
|
value: {
|
|
909
909
|
objInitPayload: w,
|
|
910
910
|
setOpenWidget: g,
|
|
911
|
-
isOpenWidget:
|
|
911
|
+
isOpenWidget: f,
|
|
912
912
|
activeTab: m,
|
|
913
913
|
setActiveTab: v,
|
|
914
914
|
isExpand: E,
|
|
@@ -917,7 +917,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
917
917
|
parsedJWT: _,
|
|
918
918
|
widgetProps: O,
|
|
919
919
|
isFirstOpenWidget: C,
|
|
920
|
-
setFirstOpenWidget:
|
|
920
|
+
setFirstOpenWidget: x,
|
|
921
921
|
isFirstRenderHelpdesk: D,
|
|
922
922
|
history: d,
|
|
923
923
|
showReadyWSHD: b,
|
|
@@ -934,14 +934,14 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
934
934
|
)) == null || o.then(({ data: a }) => {
|
|
935
935
|
var d;
|
|
936
936
|
if (a) {
|
|
937
|
-
const u = Object.keys((d = Object.values(a)) == null ? void 0 : d[0]),
|
|
937
|
+
const u = Object.keys((d = Object.values(a)) == null ? void 0 : d[0]), f = {};
|
|
938
938
|
u == null || u.forEach((g) => {
|
|
939
939
|
var m;
|
|
940
940
|
(m = Object.keys(a)) == null || m.forEach((v) => {
|
|
941
941
|
var E;
|
|
942
|
-
|
|
942
|
+
f[g == null ? void 0 : g.toLowerCase()] = (E = a == null ? void 0 : a[v]) == null ? void 0 : E[g];
|
|
943
943
|
});
|
|
944
|
-
}), r(
|
|
944
|
+
}), r(f);
|
|
945
945
|
}
|
|
946
946
|
});
|
|
947
947
|
}, l = () => {
|
|
@@ -968,13 +968,13 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
968
968
|
}, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(it.Provider, { value: { langDatas: s }, children: e });
|
|
969
969
|
}, lt = Ee({}), ue = () => ye(lt), Ls = ({ children: e }) => {
|
|
970
970
|
var B;
|
|
971
|
-
const [t, s] = N([]), [r, c] = N(!1), [l, o] = N(!1), [a, d] = N({}), [u,
|
|
971
|
+
const [t, s] = N([]), [r, c] = N(!1), [l, o] = N(!1), [a, d] = N({}), [u, f] = N(!1), [g, m] = N(!1), {
|
|
972
972
|
objInitPayload: v,
|
|
973
973
|
widgetProps: E,
|
|
974
974
|
setOpenWidget: k,
|
|
975
975
|
setFirstOpenWidget: w,
|
|
976
976
|
isFirstRenderHelpdesk: y
|
|
977
|
-
} = Q(), C = K(null),
|
|
977
|
+
} = Q(), C = K(null), x = K(""), b = K(""), h = (S) => {
|
|
978
978
|
const M = ie(S, "text_feedback_link") && ie(S, "text");
|
|
979
979
|
s((I) => {
|
|
980
980
|
const F = [
|
|
@@ -992,13 +992,13 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
992
992
|
}, D = () => {
|
|
993
993
|
var S, M, I, F;
|
|
994
994
|
(S = C == null ? void 0 : C.current) == null || S.emit("session_request", { session_id: null }), (M = C == null ? void 0 : C.current) == null || M.on("session_confirm", (U) => {
|
|
995
|
-
|
|
995
|
+
x.current = U, Pe({
|
|
996
996
|
session_id: U == null ? void 0 : U.session_id
|
|
997
997
|
});
|
|
998
998
|
}), (I = C == null ? void 0 : C.current) == null || I.on(us, h), (F = C == null ? void 0 : C.current) == null || F.on(fs, (U) => {
|
|
999
999
|
const J = JSON.parse(U || "{}");
|
|
1000
1000
|
ie(J, "iswidget") && m(J == null ? void 0 : J.iswidget);
|
|
1001
|
-
}), u ||
|
|
1001
|
+
}), u || f(!0), w(!1);
|
|
1002
1002
|
}, O = ({
|
|
1003
1003
|
msg: S,
|
|
1004
1004
|
additionalConfig: M = {},
|
|
@@ -1010,7 +1010,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1010
1010
|
language: v == null ? void 0 : v.lang
|
|
1011
1011
|
},
|
|
1012
1012
|
message: S,
|
|
1013
|
-
session_id:
|
|
1013
|
+
session_id: x == null ? void 0 : x.current,
|
|
1014
1014
|
...M
|
|
1015
1015
|
}), I ? c(!0) : o(!0);
|
|
1016
1016
|
}, _ = () => {
|
|
@@ -1032,18 +1032,18 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1032
1032
|
err: F,
|
|
1033
1033
|
socketURL: E == null ? void 0 : E.socketURL,
|
|
1034
1034
|
socketPath: E == null ? void 0 : E.widgetProps
|
|
1035
|
-
});
|
|
1035
|
+
}), f(!1);
|
|
1036
1036
|
}), S.io.on("reconnect", () => {
|
|
1037
1037
|
console.error("reconnect widget-chatbot : ", {
|
|
1038
1038
|
socketURL: E == null ? void 0 : E.socketURL,
|
|
1039
1039
|
socketPath: E == null ? void 0 : E.widgetProps
|
|
1040
|
-
});
|
|
1040
|
+
}), f(!1);
|
|
1041
1041
|
}), C.current = S;
|
|
1042
1042
|
}, q = () => {
|
|
1043
1043
|
var S;
|
|
1044
1044
|
(!((S = C == null ? void 0 : C.current) != null && S.connected) || !u) && (_(), k(!1));
|
|
1045
1045
|
}, Y = () => {
|
|
1046
|
-
|
|
1046
|
+
f(!1);
|
|
1047
1047
|
};
|
|
1048
1048
|
return X(() => (k(!1), _(), window.addEventListener("online", q), window.addEventListener("offline", Y), () => {
|
|
1049
1049
|
var S, M;
|
|
@@ -1061,7 +1061,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1061
1061
|
onSendMsg: O,
|
|
1062
1062
|
isWaitResponse: r,
|
|
1063
1063
|
socket: C == null ? void 0 : C.current,
|
|
1064
|
-
sessionId: (B =
|
|
1064
|
+
sessionId: (B = x == null ? void 0 : x.current) == null ? void 0 : B.session_id,
|
|
1065
1065
|
loadingRegenerate: l,
|
|
1066
1066
|
file: a,
|
|
1067
1067
|
setFile: d,
|
|
@@ -1491,13 +1491,13 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1491
1491
|
)
|
|
1492
1492
|
] }),
|
|
1493
1493
|
code: ({ ...o }) => {
|
|
1494
|
-
const { children: a, className: d, ...u } = o,
|
|
1495
|
-
return
|
|
1494
|
+
const { children: a, className: d, ...u } = o, f = /language-(\w+)/.exec(d || "");
|
|
1495
|
+
return f ? /* @__PURE__ */ n.jsx(
|
|
1496
1496
|
ts,
|
|
1497
1497
|
{
|
|
1498
1498
|
...u,
|
|
1499
1499
|
PreTag: "div",
|
|
1500
|
-
language:
|
|
1500
|
+
language: f[1],
|
|
1501
1501
|
style: Os,
|
|
1502
1502
|
children: String(a).replace(/\n$/, "")
|
|
1503
1503
|
}
|
|
@@ -1843,14 +1843,14 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1843
1843
|
), l = j(
|
|
1844
1844
|
"AdditionalFeedback",
|
|
1845
1845
|
"Additional Feedback"
|
|
1846
|
-
), [o] = oe.useForm(), [a, d] = N(!1), [u,
|
|
1847
|
-
var
|
|
1846
|
+
), [o] = oe.useForm(), [a, d] = N(!1), [u, f] = N(""), { setChats: g } = ue(), { objInitPayload: m } = Q(), { activeTab: v } = ve(), E = L(() => {
|
|
1847
|
+
var x;
|
|
1848
1848
|
const C = ie(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
1849
|
-
return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((
|
|
1849
|
+
return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((x = e == null ? void 0 : e.text_thumbsup_link) == null ? void 0 : x.trim()) !== "" && C;
|
|
1850
1850
|
}, [e]), k = L(() => {
|
|
1851
|
-
var
|
|
1851
|
+
var x;
|
|
1852
1852
|
const C = ie(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
1853
|
-
return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((
|
|
1853
|
+
return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((x = e == null ? void 0 : e.text_thumbsdown_link) == null ? void 0 : x.trim()) !== "" && C;
|
|
1854
1854
|
}, [e]), w = L(() => {
|
|
1855
1855
|
if (m != null && m.uriBackend)
|
|
1856
1856
|
try {
|
|
@@ -1861,7 +1861,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1861
1861
|
return "";
|
|
1862
1862
|
}, [m == null ? void 0 : m.uriBackend]), y = (C) => {
|
|
1863
1863
|
var B;
|
|
1864
|
-
const
|
|
1864
|
+
const x = C === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
|
|
1865
1865
|
access_token: b = "",
|
|
1866
1866
|
companycode: h = "",
|
|
1867
1867
|
companyid: D = "",
|
|
@@ -1871,7 +1871,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1871
1871
|
} = m || {}, Y = u === "another" ? o == null ? void 0 : o.getFieldValue("ADDITIONAL_FEEDBACK") : u;
|
|
1872
1872
|
(B = Re({
|
|
1873
1873
|
method: "POST",
|
|
1874
|
-
url:
|
|
1874
|
+
url: x,
|
|
1875
1875
|
data: {
|
|
1876
1876
|
message_id: e == null ? void 0 : e.id,
|
|
1877
1877
|
response_type: C === "like" ? "up" : "down",
|
|
@@ -1970,8 +1970,8 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1970
1970
|
optionType: "button",
|
|
1971
1971
|
buttonStyle: "solid",
|
|
1972
1972
|
onChange: (C) => {
|
|
1973
|
-
var
|
|
1974
|
-
|
|
1973
|
+
var x;
|
|
1974
|
+
f((x = C == null ? void 0 : C.target) == null ? void 0 : x.value);
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
1977
|
),
|
|
@@ -1989,7 +1989,7 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
1989
1989
|
position: s = "left",
|
|
1990
1990
|
...r
|
|
1991
1991
|
}) => {
|
|
1992
|
-
const c = ys(), { chats: l, onSendMsg: o, setChats: a, loadingRegenerate: d, currRegenerateId: u } = ue(),
|
|
1992
|
+
const c = ys(), { chats: l, onSendMsg: o, setChats: a, loadingRegenerate: d, currRegenerateId: u } = ue(), f = L(() => r == null ? void 0 : r.sender, [r]), g = L(() => l == null ? void 0 : l.filter((w) => (w == null ? void 0 : w.sender) === "client"), [l]), m = L(() => t && f === "response" && (g == null ? void 0 : g.length) > 0 && (r == null ? void 0 : r.indexChat) === (l == null ? void 0 : l.length) - 1, [f, g, l, r == null ? void 0 : r.indexChat, t]), v = L(() => {
|
|
1993
1993
|
switch (s) {
|
|
1994
1994
|
case "left":
|
|
1995
1995
|
return "flex-start";
|
|
@@ -2001,11 +2001,11 @@ const be = (e = ".w-wrapper-body") => {
|
|
|
2001
2001
|
}, [s]), E = L(() => e && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [r, e]), k = () => {
|
|
2002
2002
|
const w = g == null ? void 0 : g[(g == null ? void 0 : g.length) - 1], y = l == null ? void 0 : l[(l == null ? void 0 : l.length) - 1];
|
|
2003
2003
|
a(
|
|
2004
|
-
(C = []) => C == null ? void 0 : C.map((
|
|
2005
|
-
...
|
|
2004
|
+
(C = []) => C == null ? void 0 : C.map((x, b) => b === (C == null ? void 0 : C.length) - 1 && (x == null ? void 0 : x.sender) === "response" ? {
|
|
2005
|
+
...x,
|
|
2006
2006
|
generated_id: (y == null ? void 0 : y.generated_id) ?? c
|
|
2007
2007
|
// adjust with response
|
|
2008
|
-
} :
|
|
2008
|
+
} : x)
|
|
2009
2009
|
), u.current = (y == null ? void 0 : y.generated_id) ?? c, o({
|
|
2010
2010
|
msg: w == null ? void 0 : w.text,
|
|
2011
2011
|
additionalConfig: {
|
|
@@ -2083,7 +2083,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2083
2083
|
/* @__PURE__ */ n.jsx(he, { src: e, preview: !1, nameFallback: t }),
|
|
2084
2084
|
/* @__PURE__ */ n.jsx(V.Text, { children: t })
|
|
2085
2085
|
] }), Ue = A(lr), ar = ({ ...e }) => {
|
|
2086
|
-
var
|
|
2086
|
+
var f, g;
|
|
2087
2087
|
const [t, s] = N(1), { loadingRegenerate: r, currRegenerateId: c } = ue(), { isExpand: l, widgetProps: o } = Q(), a = L(() => e == null ? void 0 : e.sender, [e]), d = L(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), u = L(() => {
|
|
2088
2088
|
const m = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1];
|
|
2089
2089
|
return (m == null ? void 0 : m.generated_id) === c.current;
|
|
@@ -2161,7 +2161,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2161
2161
|
/* @__PURE__ */ n.jsxs(V.Text, { children: [
|
|
2162
2162
|
t,
|
|
2163
2163
|
" / ",
|
|
2164
|
-
(
|
|
2164
|
+
(f = e == null ? void 0 : e.chats) == null ? void 0 : f.length
|
|
2165
2165
|
] }),
|
|
2166
2166
|
/* @__PURE__ */ n.jsx(
|
|
2167
2167
|
W,
|
|
@@ -2253,12 +2253,12 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2253
2253
|
}
|
|
2254
2254
|
);
|
|
2255
2255
|
}, gr = A(xr), Cr = () => {
|
|
2256
|
-
const [e, t] = N(!1), [s, r] = N(!1), [c, l] = N(!1), [o, a] = N(3), [d, u] = N(!1), [
|
|
2256
|
+
const [e, t] = N(!1), [s, r] = N(!1), [c, l] = N(!1), [o, a] = N(3), [d, u] = N(!1), [f, g] = N(""), { widgetProps: m } = Q(), { onSendMsg: v, chats: E } = ue(), { onSubmitPYPwd: k = () => {
|
|
2257
2257
|
}, onCheckPYAccess: w = () => {
|
|
2258
2258
|
} } = (m == null ? void 0 : m.onPayslipFn) || {}, y = j(
|
|
2259
2259
|
"ProvidePasswordPayslip",
|
|
2260
2260
|
"Please provide your password account to access the download"
|
|
2261
|
-
), C = j("Cancel", "Cancel"),
|
|
2261
|
+
), C = j("Cancel", "Cancel"), x = j("Submit", "Submit"), b = j("Password", "Password"), h = j("IsRequired", "Is Required"), D = j(
|
|
2262
2262
|
"PasswordPayslipValid",
|
|
2263
2263
|
"Your password is valid. Please download the payslip file"
|
|
2264
2264
|
), O = j(
|
|
@@ -2314,7 +2314,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2314
2314
|
var U;
|
|
2315
2315
|
const F = E == null ? void 0 : E[(E == null ? void 0 : E.length) - 1];
|
|
2316
2316
|
((U = F == null ? void 0 : F.attachment) == null ? void 0 : U.type) === "show_password_wp" && S();
|
|
2317
|
-
}, []), c ? d ? /* @__PURE__ */ n.jsx(Ie, { sender: "response", text: `${_}...` }) : o === 0 ? /* @__PURE__ */ n.jsx(Ie, { sender: "response", text: O }) :
|
|
2317
|
+
}, []), c ? d ? /* @__PURE__ */ n.jsx(Ie, { sender: "response", text: `${_}...` }) : o === 0 ? /* @__PURE__ */ n.jsx(Ie, { sender: "response", text: O }) : f ? /* @__PURE__ */ n.jsx(Ie, { sender: "response", text: f }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
2318
2318
|
/* @__PURE__ */ n.jsx(oe, { form: B, layout: "vertical", children: /* @__PURE__ */ n.jsx(
|
|
2319
2319
|
oe.Item,
|
|
2320
2320
|
{
|
|
@@ -2341,7 +2341,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2341
2341
|
) }),
|
|
2342
2342
|
!e && /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
2343
2343
|
/* @__PURE__ */ n.jsx(W, { disabled: s, onClick: M, children: C }),
|
|
2344
|
-
/* @__PURE__ */ n.jsx(W, { type: "primary", onClick: I, loading: s, children:
|
|
2344
|
+
/* @__PURE__ */ n.jsx(W, { type: "primary", onClick: I, loading: s, children: x })
|
|
2345
2345
|
] })
|
|
2346
2346
|
] }) : null;
|
|
2347
2347
|
}, mr = A(Cr), br = ({ ...e }) => {
|
|
@@ -2362,7 +2362,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2362
2362
|
responseType: "blob"
|
|
2363
2363
|
})) == null || o.then((a) => {
|
|
2364
2364
|
var m;
|
|
2365
|
-
const d = (m = c == null ? void 0 : c.body) == null ? void 0 : m.media, u = `${c == null ? void 0 : c.filename}.${d}`,
|
|
2365
|
+
const d = (m = c == null ? void 0 : c.body) == null ? void 0 : m.media, u = `${c == null ? void 0 : c.filename}.${d}`, f = new Blob([a == null ? void 0 : a.data]), g = URL == null ? void 0 : URL.createObjectURL(f);
|
|
2366
2366
|
Tn({ downloadURL: g, fileName: u }), URL.revokeObjectURL(g);
|
|
2367
2367
|
});
|
|
2368
2368
|
};
|
|
@@ -2371,11 +2371,11 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2371
2371
|
const t = K(), s = j("DownloadChart", "Download Chart"), r = L(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), c = L(() => {
|
|
2372
2372
|
var o;
|
|
2373
2373
|
return (o = r == null ? void 0 : r.data) == null ? void 0 : o.map((a, d) => {
|
|
2374
|
-
var u,
|
|
2374
|
+
var u, f;
|
|
2375
2375
|
return {
|
|
2376
2376
|
label: (u = r == null ? void 0 : r.labels) == null ? void 0 : u[d],
|
|
2377
2377
|
value: a,
|
|
2378
|
-
color: (
|
|
2378
|
+
color: (f = r == null ? void 0 : r.colors) == null ? void 0 : f[d]
|
|
2379
2379
|
};
|
|
2380
2380
|
});
|
|
2381
2381
|
}, [r]), l = () => {
|
|
@@ -2455,7 +2455,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2455
2455
|
r && /* @__PURE__ */ n.jsx(wn, {})
|
|
2456
2456
|
] }) : null;
|
|
2457
2457
|
}, wr = A(jr), pr = () => {
|
|
2458
|
-
var
|
|
2458
|
+
var x;
|
|
2459
2459
|
const e = j(
|
|
2460
2460
|
"ContinueWithoutUpload",
|
|
2461
2461
|
"Continue without Upload"
|
|
@@ -2468,7 +2468,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2468
2468
|
setFile: o,
|
|
2469
2469
|
chats: a,
|
|
2470
2470
|
connected: d
|
|
2471
|
-
} = ue(), { isActiveTabVA: u } = ve(),
|
|
2471
|
+
} = ue(), { isActiveTabVA: u } = ve(), f = L(() => {
|
|
2472
2472
|
var h;
|
|
2473
2473
|
const b = a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1];
|
|
2474
2474
|
return (b == null ? void 0 : b.sender) === "response" && ((h = b == null ? void 0 : b.attachment) == null ? void 0 : h.type) === "fileuploader";
|
|
@@ -2490,9 +2490,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2490
2490
|
return X(() => {
|
|
2491
2491
|
var b;
|
|
2492
2492
|
g != null && g.current && u && ((b = g == null ? void 0 : g.current) == null || b.focus());
|
|
2493
|
-
}, [u]),
|
|
2493
|
+
}, [u]), f ? /* @__PURE__ */ n.jsxs("div", { className: "w-input-container", style: { alignItems: "center" }, children: [
|
|
2494
2494
|
/* @__PURE__ */ n.jsx(V.Text, { children: l == null ? void 0 : l.name }),
|
|
2495
|
-
((
|
|
2495
|
+
((x = Object == null ? void 0 : Object.keys(l || {})) == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2496
2496
|
/* @__PURE__ */ n.jsx(
|
|
2497
2497
|
W,
|
|
2498
2498
|
{
|
|
@@ -2646,9 +2646,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2646
2646
|
};
|
|
2647
2647
|
}, [e]);
|
|
2648
2648
|
return async (l) => {
|
|
2649
|
-
var u,
|
|
2649
|
+
var u, f, g;
|
|
2650
2650
|
const { onSuccess: o, onError: a, onFinally: d } = l ?? {};
|
|
2651
|
-
(g = (
|
|
2651
|
+
(g = (f = (u = Re({
|
|
2652
2652
|
url: e == null ? void 0 : e.uriBackend,
|
|
2653
2653
|
params: {
|
|
2654
2654
|
ofid: "sfsystem.RefreshToken",
|
|
@@ -2675,7 +2675,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2675
2675
|
config: e == null ? void 0 : e.config
|
|
2676
2676
|
};
|
|
2677
2677
|
t(E), typeof o == "function" && o(m);
|
|
2678
|
-
})) == null ? void 0 :
|
|
2678
|
+
})) == null ? void 0 : f.catch((m) => {
|
|
2679
2679
|
typeof a == "function" && a(m);
|
|
2680
2680
|
})) == null || g.finally(() => {
|
|
2681
2681
|
typeof d == "function" && d();
|
|
@@ -2693,10 +2693,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2693
2693
|
url: a,
|
|
2694
2694
|
endpoint: d,
|
|
2695
2695
|
method: u = "POST",
|
|
2696
|
-
headers:
|
|
2696
|
+
headers: f,
|
|
2697
2697
|
...g
|
|
2698
2698
|
}) => {
|
|
2699
|
-
var k, w, y, C,
|
|
2699
|
+
var k, w, y, C, x, b;
|
|
2700
2700
|
const m = {
|
|
2701
2701
|
url: a || `${t == null ? void 0 : t.uriBackendHRMGO}${d}`,
|
|
2702
2702
|
...e.current && {
|
|
@@ -2704,7 +2704,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2704
2704
|
},
|
|
2705
2705
|
headers: {
|
|
2706
2706
|
...c,
|
|
2707
|
-
...
|
|
2707
|
+
...f,
|
|
2708
2708
|
"Company-Code": t == null ? void 0 : t.companycode
|
|
2709
2709
|
},
|
|
2710
2710
|
method: u,
|
|
@@ -2715,7 +2715,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2715
2715
|
(h) => {
|
|
2716
2716
|
Promise.reject(h);
|
|
2717
2717
|
}
|
|
2718
|
-
), (b = (
|
|
2718
|
+
), (b = (x = v == null ? void 0 : v.interceptors) == null ? void 0 : x.response) == null || b.use(
|
|
2719
2719
|
(h) => h,
|
|
2720
2720
|
async (h) => {
|
|
2721
2721
|
var O;
|
|
@@ -2733,7 +2733,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2733
2733
|
e != null && e.current && ((a = e == null ? void 0 : e.current) == null || a.abort(), e.current = new AbortController());
|
|
2734
2734
|
}, X(() => () => l.abort(), []), l;
|
|
2735
2735
|
}, Ct = Ee({}), Ce = () => ye(Ct), Lr = ({ children: e }) => {
|
|
2736
|
-
const t = en(), [s, r] = N([]), [c, l] = N(""), [o, a] = N(!1), [d, u] = N(!0), [
|
|
2736
|
+
const t = en(), [s, r] = N([]), [c, l] = N(""), [o, a] = N(!1), [d, u] = N(!0), [f, g] = N(0), m = (v) => {
|
|
2737
2737
|
var E, k, w, y;
|
|
2738
2738
|
u(!0), (y = (w = t({
|
|
2739
2739
|
endpoint: "/helpdesk/myticket/ticket-list",
|
|
@@ -2757,8 +2757,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2757
2757
|
}
|
|
2758
2758
|
}
|
|
2759
2759
|
})) == null ? void 0 : w.then((C) => {
|
|
2760
|
-
var
|
|
2761
|
-
(
|
|
2760
|
+
var x, b, h;
|
|
2761
|
+
(x = C == null ? void 0 : C.data) != null && x.DATA && r((h = (b = C == null ? void 0 : C.data) == null ? void 0 : b.DATA) == null ? void 0 : h.LIST);
|
|
2762
2762
|
})) == null || y.finally(() => {
|
|
2763
2763
|
u(!1);
|
|
2764
2764
|
});
|
|
@@ -2776,7 +2776,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2776
2776
|
openFilter: o,
|
|
2777
2777
|
setOpenFilter: a,
|
|
2778
2778
|
loadingListTicket: d,
|
|
2779
|
-
countFilters:
|
|
2779
|
+
countFilters: f,
|
|
2780
2780
|
setCountFilters: g
|
|
2781
2781
|
},
|
|
2782
2782
|
children: e
|
|
@@ -2811,39 +2811,39 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2811
2811
|
) }) })
|
|
2812
2812
|
] }) });
|
|
2813
2813
|
}, Rr = A(Or), mt = Ee({}), Te = () => ye(mt), Dr = ({ children: e }) => {
|
|
2814
|
-
const t = K(null), s = K(0), r = K(!1), c = K(null), [l, o] = N([]), [a, d] = N(0), { objInitPayload: u, parsedJWT:
|
|
2815
|
-
const
|
|
2816
|
-
|
|
2814
|
+
const t = K(null), s = K(0), r = K(!1), c = K(null), [l, o] = N([]), [a, d] = N(0), { objInitPayload: u, parsedJWT: f, isFirstRenderHelpdesk: g, setShowReadyWSHD: m } = Q(), v = gt(), E = (C) => {
|
|
2815
|
+
const x = new WebSocket(C);
|
|
2816
|
+
x.onopen = () => {
|
|
2817
2817
|
r.current = !0, s.current = 0, d(0), m(!0);
|
|
2818
|
-
},
|
|
2818
|
+
}, x.onerror = (b) => {
|
|
2819
2819
|
m(!1), console.error(`${ke} - WebSocket error:`, b);
|
|
2820
|
-
},
|
|
2820
|
+
}, x.onclose = (b) => {
|
|
2821
2821
|
console.warn(
|
|
2822
2822
|
`${ke} - WebSocket disconnected:`,
|
|
2823
2823
|
b
|
|
2824
2824
|
), r.current = !1, m(!1), !(b != null && b.wasClean) && (s == null ? void 0 : s.current) < $e && (s.current += 1, d((h) => h + 1), clearTimeout(c.current), c.current = setTimeout(k, 2e3));
|
|
2825
|
-
},
|
|
2825
|
+
}, x.onmessage = w(x), t.current = x;
|
|
2826
2826
|
}, k = async () => {
|
|
2827
2827
|
var Y, B, S;
|
|
2828
2828
|
if (((Y = t.current) == null ? void 0 : Y.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
|
|
2829
2829
|
const {
|
|
2830
2830
|
access_token: C,
|
|
2831
|
-
companyid:
|
|
2831
|
+
companyid: x = "",
|
|
2832
2832
|
companycode: b = "",
|
|
2833
2833
|
lang: h = "",
|
|
2834
2834
|
uriBackendHRMGO: D = ""
|
|
2835
2835
|
} = u ?? {};
|
|
2836
|
-
if (!C || !
|
|
2836
|
+
if (!C || !x || !b) {
|
|
2837
2837
|
console.warn(
|
|
2838
2838
|
`${ke} - Missing required WebSocket credentials.`
|
|
2839
2839
|
);
|
|
2840
2840
|
return;
|
|
2841
2841
|
}
|
|
2842
2842
|
const O = `Bearer ${C}`, _ = (B = `${D}/ws`) == null ? void 0 : B.replace("https://", "wss://"), q = {
|
|
2843
|
-
COMPANY_ID:
|
|
2843
|
+
COMPANY_ID: x.toString(),
|
|
2844
2844
|
COMPANY_CODE: b.toLowerCase(),
|
|
2845
2845
|
LANGUAGE: h,
|
|
2846
|
-
ACC_NAME: (S =
|
|
2846
|
+
ACC_NAME: (S = f == null ? void 0 : f.INSTANCE) == null ? void 0 : S.toLowerCase(),
|
|
2847
2847
|
TOKEN: O
|
|
2848
2848
|
};
|
|
2849
2849
|
try {
|
|
@@ -2864,13 +2864,13 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2864
2864
|
M
|
|
2865
2865
|
);
|
|
2866
2866
|
}
|
|
2867
|
-
}, w = (C) => (
|
|
2867
|
+
}, w = (C) => (x) => {
|
|
2868
2868
|
var b;
|
|
2869
2869
|
try {
|
|
2870
|
-
if ((
|
|
2870
|
+
if ((x == null ? void 0 : x.data) === "PING")
|
|
2871
2871
|
C.send("PONG");
|
|
2872
2872
|
else {
|
|
2873
|
-
const { DATA: h, EVENT: D } = JSON.parse(
|
|
2873
|
+
const { DATA: h, EVENT: D } = JSON.parse(x.data || "{}");
|
|
2874
2874
|
!g.current && D === "USER_ONLINE_NOTIF" && Array.isArray(h == null ? void 0 : h.EMPLOYEES) && (o((b = h == null ? void 0 : h.EMPLOYEES) == null ? void 0 : b.filter(Boolean)), g.current = !0), D === "TOKEN_EXPIRED" && v({
|
|
2875
2875
|
onSuccess: () => {
|
|
2876
2876
|
k();
|
|
@@ -2880,15 +2880,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2880
2880
|
} catch {
|
|
2881
2881
|
console.error(
|
|
2882
2882
|
`${ke} - Invalid WebSocket message:`,
|
|
2883
|
-
|
|
2883
|
+
x.data
|
|
2884
2884
|
);
|
|
2885
2885
|
}
|
|
2886
|
-
}, y = ({ event: C, data:
|
|
2886
|
+
}, y = ({ event: C, data: x, module: b = "HELPDESK_CHAT" }) => {
|
|
2887
2887
|
var h;
|
|
2888
2888
|
(h = t == null ? void 0 : t.current) == null || h.send(
|
|
2889
2889
|
JSON.stringify({
|
|
2890
2890
|
EVENT: C,
|
|
2891
|
-
DATA:
|
|
2891
|
+
DATA: x,
|
|
2892
2892
|
MODULE: b
|
|
2893
2893
|
})
|
|
2894
2894
|
);
|
|
@@ -2959,7 +2959,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2959
2959
|
] });
|
|
2960
2960
|
}, Mr = A(Nr), Fr = ({ children: e, open: t, onClose: s, footer: r, styleContainer: c }) => {
|
|
2961
2961
|
var m;
|
|
2962
|
-
const [l, o] = N(!1), a = K(), d = K(null), u = K(),
|
|
2962
|
+
const [l, o] = N(!1), a = K(), d = K(null), u = K(), f = L(() => t ? "w-fade-in-animate" : "w-fade-out-animate", [t]), g = (v) => {
|
|
2963
2963
|
v.code === "Escape" && !v.shiftKey && !v.altKey && !v.ctrlKey && v.key === "Escape" && (v.stopPropagation(), typeof s == "function" && s());
|
|
2964
2964
|
};
|
|
2965
2965
|
return X(() => {
|
|
@@ -2974,7 +2974,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2974
2974
|
}, [t]), /* @__PURE__ */ n.jsxs(
|
|
2975
2975
|
"div",
|
|
2976
2976
|
{
|
|
2977
|
-
className: `${
|
|
2977
|
+
className: `${f}`,
|
|
2978
2978
|
tabIndex: 1,
|
|
2979
2979
|
ref: u,
|
|
2980
2980
|
style: {
|
|
@@ -2991,15 +2991,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2991
2991
|
}
|
|
2992
2992
|
);
|
|
2993
2993
|
}, bt = A(Fr), vt = Ee({}), De = () => ye(vt), Hr = ({ children: e }) => {
|
|
2994
|
-
const [t, s] = N([]), [r, c] = N({}), [l, o] = N(!0), a = K(!1), d = en(), { ticketId: u } = Ce(), { ws:
|
|
2994
|
+
const [t, s] = N([]), [r, c] = N({}), [l, o] = N(!0), a = K(!1), d = en(), { ticketId: u } = Ce(), { ws: f } = Te(), g = L(() => {
|
|
2995
2995
|
var b;
|
|
2996
|
-
const w = (r == null ? void 0 : r.CREATED_BY) ?? {}, y = (r == null ? void 0 : r.ASSIGNEE) ?? {}, C = (r == null ? void 0 : r.OTHER_ASSIGNEE) ?? [],
|
|
2996
|
+
const w = (r == null ? void 0 : r.CREATED_BY) ?? {}, y = (r == null ? void 0 : r.ASSIGNEE) ?? {}, C = (r == null ? void 0 : r.OTHER_ASSIGNEE) ?? [], x = (b = [w, y, ...C].map((h) => ({
|
|
2997
2997
|
...h
|
|
2998
2998
|
}))) == null ? void 0 : b.filter((h) => {
|
|
2999
2999
|
var D;
|
|
3000
3000
|
return ((D = Object.keys(h || {})) == null ? void 0 : D.length) > 0;
|
|
3001
3001
|
});
|
|
3002
|
-
return hn({ ArrObj:
|
|
3002
|
+
return hn({ ArrObj: x, key: "EMP_ID" });
|
|
3003
3003
|
}, [r]), m = () => {
|
|
3004
3004
|
var w, y;
|
|
3005
3005
|
o(!0), (y = (w = d({
|
|
@@ -3011,8 +3011,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3011
3011
|
TASK_ID: u
|
|
3012
3012
|
}
|
|
3013
3013
|
})) == null ? void 0 : w.then((C) => {
|
|
3014
|
-
var
|
|
3015
|
-
if (((h = (b = (
|
|
3014
|
+
var x, b, h, D, O, _;
|
|
3015
|
+
if (((h = (b = (x = C == null ? void 0 : C.data) == null ? void 0 : x.DATA) == null ? void 0 : b.LIST) == null ? void 0 : h.length) > 0) {
|
|
3016
3016
|
const q = (_ = (O = (D = C == null ? void 0 : C.data) == null ? void 0 : D.DATA) == null ? void 0 : O.LIST) == null ? void 0 : _.map((Y) => ({
|
|
3017
3017
|
...Y,
|
|
3018
3018
|
ACTOR: {
|
|
@@ -3034,26 +3034,26 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3034
3034
|
TASK_ID: u
|
|
3035
3035
|
}
|
|
3036
3036
|
})) == null || w.then((y) => {
|
|
3037
|
-
var C,
|
|
3037
|
+
var C, x, b;
|
|
3038
3038
|
if ((C = y == null ? void 0 : y.data) != null && C.DATA) {
|
|
3039
|
-
const h = (b = (
|
|
3039
|
+
const h = (b = (x = y == null ? void 0 : y.data) == null ? void 0 : x.DATA) == null ? void 0 : b.LIST;
|
|
3040
3040
|
c(h);
|
|
3041
3041
|
} else
|
|
3042
3042
|
c({});
|
|
3043
3043
|
});
|
|
3044
3044
|
}, E = (w) => {
|
|
3045
3045
|
a.current || s((y) => {
|
|
3046
|
-
const
|
|
3047
|
-
return Qe(
|
|
3046
|
+
const x = [...En(y), { ...w, CHAT_ALIGN: "from" }];
|
|
3047
|
+
return Qe(x);
|
|
3048
3048
|
}), a.current = !1;
|
|
3049
3049
|
}, k = (w) => {
|
|
3050
3050
|
if ((w == null ? void 0 : w.data) !== "PING") {
|
|
3051
|
-
const y = JSON.parse((w == null ? void 0 : w.data) || "{}"), { DATA: C = {}, EVENT:
|
|
3052
|
-
(
|
|
3051
|
+
const y = JSON.parse((w == null ? void 0 : w.data) || "{}"), { DATA: C = {}, EVENT: x = "" } = y ?? {};
|
|
3052
|
+
(x === "RECEIVE_MESSAGE" || x === "RECEIVE_ANOTHER_MESSAGE") && E(C);
|
|
3053
3053
|
}
|
|
3054
3054
|
};
|
|
3055
|
-
return X(() => (u && (m(), v()),
|
|
3056
|
-
|
|
3055
|
+
return X(() => (u && (m(), v()), f && u && (f == null || f.addEventListener("message", k)), () => {
|
|
3056
|
+
f && u && (f == null || f.removeEventListener("message", k));
|
|
3057
3057
|
}), [u]), /* @__PURE__ */ n.jsx(
|
|
3058
3058
|
vt.Provider,
|
|
3059
3059
|
{
|
|
@@ -3103,11 +3103,11 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3103
3103
|
cursor: "pointer"
|
|
3104
3104
|
},
|
|
3105
3105
|
children: t == null ? void 0 : t.map((d, u) => {
|
|
3106
|
-
const
|
|
3106
|
+
const f = l == null ? void 0 : l.includes(d == null ? void 0 : d.EMP_ID);
|
|
3107
3107
|
return /* @__PURE__ */ n.jsx(Se, { title: d == null ? void 0 : d.FULL_NAME, trigger: a, children: /* @__PURE__ */ mn(
|
|
3108
3108
|
he,
|
|
3109
3109
|
{
|
|
3110
|
-
...
|
|
3110
|
+
...f && {
|
|
3111
3111
|
style: {
|
|
3112
3112
|
border: "2px solid green",
|
|
3113
3113
|
borderRadius: "50%"
|
|
@@ -3175,8 +3175,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3175
3175
|
const a = e == null ? void 0 : e.ATTACHMENT;
|
|
3176
3176
|
if (a)
|
|
3177
3177
|
try {
|
|
3178
|
-
const u = new URL(a),
|
|
3179
|
-
return
|
|
3178
|
+
const u = new URL(a), f = (d = u == null ? void 0 : u.pathname) == null ? void 0 : d.split("/");
|
|
3179
|
+
return f == null ? void 0 : f[(f == null ? void 0 : f.length) - 1];
|
|
3180
3180
|
} catch {
|
|
3181
3181
|
return a;
|
|
3182
3182
|
}
|
|
@@ -3270,9 +3270,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3270
3270
|
};
|
|
3271
3271
|
return {
|
|
3272
3272
|
paramsEncrypt: (o) => {
|
|
3273
|
-
const [a, d = null] = o.split("?"), u = a.split("/").map((
|
|
3274
|
-
const [, g = null] =
|
|
3275
|
-
return g && (e != null && e.keyEncrypt) ? c(g) :
|
|
3273
|
+
const [a, d = null] = o.split("?"), u = a.split("/").map((f) => {
|
|
3274
|
+
const [, g = null] = f.split(":");
|
|
3275
|
+
return g && (e != null && e.keyEncrypt) ? c(g) : f;
|
|
3276
3276
|
}).join("/");
|
|
3277
3277
|
return d ? `${u}?${d}` : u;
|
|
3278
3278
|
},
|
|
@@ -3335,15 +3335,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3335
3335
|
}
|
|
3336
3336
|
}, Jr = A(qr), Qr = () => {
|
|
3337
3337
|
const { employees: e } = De(), [t, s] = N([]), r = j("And", "and"), c = j("IsTyping", "Is Typing"), l = j("People", "People"), { ws: o } = Te(), a = L(() => {
|
|
3338
|
-
const u = t == null ? void 0 : t.map((
|
|
3338
|
+
const u = t == null ? void 0 : t.map((f) => f == null ? void 0 : f.FULL_NAME);
|
|
3339
3339
|
if ((t == null ? void 0 : t.length) > 2) {
|
|
3340
|
-
const
|
|
3341
|
-
return `${
|
|
3340
|
+
const f = u == null ? void 0 : u.filter((m, v) => v <= 1), g = u == null ? void 0 : u.filter((m, v) => v > 1);
|
|
3341
|
+
return `${f == null ? void 0 : f.join(", ")}, ${r} ${g == null ? void 0 : g.length} ${l} ${c}`;
|
|
3342
3342
|
}
|
|
3343
3343
|
return `${u == null ? void 0 : u.join(", ")} ${c}`;
|
|
3344
3344
|
}, [t]), d = (u) => {
|
|
3345
3345
|
if ((u == null ? void 0 : u.data) !== "PING") {
|
|
3346
|
-
const
|
|
3346
|
+
const f = JSON.parse((u == null ? void 0 : u.data) || "{}"), { DATA: g = {}, EVENT: m = "" } = f ?? {};
|
|
3347
3347
|
if (m === "TYPING") {
|
|
3348
3348
|
const v = e == null ? void 0 : e.find(
|
|
3349
3349
|
(k) => (k == null ? void 0 : k.EMP_ID) === (g == null ? void 0 : g.EMPLOYEE_ID)
|
|
@@ -3382,7 +3382,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3382
3382
|
backgroundColor: "#fde3cf",
|
|
3383
3383
|
cursor: "pointer"
|
|
3384
3384
|
},
|
|
3385
|
-
children: t == null ? void 0 : t.map((u,
|
|
3385
|
+
children: t == null ? void 0 : t.map((u, f) => /* @__PURE__ */ n.jsx(Se, { title: u == null ? void 0 : u.FULL_NAME, children: /* @__PURE__ */ n.jsx(he, { src: u == null ? void 0 : u.PHOTO, nameFallback: u == null ? void 0 : u.FULL_NAME }) }, f))
|
|
3386
3386
|
}
|
|
3387
3387
|
),
|
|
3388
3388
|
/* @__PURE__ */ n.jsx(V.Text, { children: a }),
|
|
@@ -3407,18 +3407,18 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3407
3407
|
const a = e == null ? void 0 : e[o];
|
|
3408
3408
|
return /* @__PURE__ */ n.jsxs(gn, { children: [
|
|
3409
3409
|
/* @__PURE__ */ n.jsx("div", { className: "w-datekey-chats", children: (d = le(o)) == null ? void 0 : d.format("ddd, DD MMMM YYYY") }),
|
|
3410
|
-
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = rt(a)) == null ? void 0 : u.map((
|
|
3410
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = rt(a)) == null ? void 0 : u.map((f, g) => {
|
|
3411
3411
|
var E, k;
|
|
3412
|
-
const m = (
|
|
3412
|
+
const m = (f == null ? void 0 : f.CHAT_ALIGN) === "to" ? "client" : "response", v = f == null ? void 0 : f.CHAT_TYPE;
|
|
3413
3413
|
return /* @__PURE__ */ n.jsxs(gn, { children: [
|
|
3414
3414
|
m === "response" && v !== "info" && /* @__PURE__ */ n.jsx(
|
|
3415
3415
|
Ue,
|
|
3416
3416
|
{
|
|
3417
|
-
src: (E =
|
|
3418
|
-
name: (k =
|
|
3417
|
+
src: (E = f == null ? void 0 : f.ACTOR) == null ? void 0 : E.PHOTO,
|
|
3418
|
+
name: (k = f == null ? void 0 : f.ACTOR) == null ? void 0 : k.FULL_NAME
|
|
3419
3419
|
}
|
|
3420
3420
|
),
|
|
3421
|
-
/* @__PURE__ */ n.jsx(Jr, { ...
|
|
3421
|
+
/* @__PURE__ */ n.jsx(Jr, { ...f })
|
|
3422
3422
|
] }, g);
|
|
3423
3423
|
}) })
|
|
3424
3424
|
] }, o);
|
|
@@ -3534,9 +3534,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3534
3534
|
), a = j(
|
|
3535
3535
|
"MaximumFileSizeExceeded",
|
|
3536
3536
|
"Maximum file size exceeded"
|
|
3537
|
-
), { onSendMsg: d } = Te(), { employees: u, setChats:
|
|
3538
|
-
var
|
|
3539
|
-
(
|
|
3537
|
+
), { onSendMsg: d } = Te(), { employees: u, setChats: f, isFromSelf: g } = De(), { ticketId: m } = Ce(), { activeTab: v } = ve(), E = () => {
|
|
3538
|
+
var x;
|
|
3539
|
+
(x = s({
|
|
3540
3540
|
endpoint: "/upload/get-upload-config",
|
|
3541
3541
|
data: {
|
|
3542
3542
|
LIMIT: 1,
|
|
@@ -3545,14 +3545,14 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3545
3545
|
UPLOAD_CODE: "helpdesk"
|
|
3546
3546
|
}
|
|
3547
3547
|
}
|
|
3548
|
-
})) == null ||
|
|
3548
|
+
})) == null || x.then((b) => {
|
|
3549
3549
|
var D, O;
|
|
3550
3550
|
const h = (O = (D = b == null ? void 0 : b.data) == null ? void 0 : D.DATA) == null ? void 0 : O.LIST;
|
|
3551
3551
|
(h == null ? void 0 : h.length) > 0 && c(h == null ? void 0 : h[0]);
|
|
3552
3552
|
});
|
|
3553
|
-
}, k = (
|
|
3553
|
+
}, k = (x) => {
|
|
3554
3554
|
var D, O, _;
|
|
3555
|
-
const b =
|
|
3555
|
+
const b = x.size / 1024 / 1024, h = (r == null ? void 0 : r.MAXFILESIZE) / 1024;
|
|
3556
3556
|
return b > h && ((D = me) == null || D.destroy(), (O = me) == null || O.config({
|
|
3557
3557
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
3558
3558
|
top: 28,
|
|
@@ -3565,11 +3565,11 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3565
3565
|
className: "w-notification-content",
|
|
3566
3566
|
duration: 3
|
|
3567
3567
|
})), !1;
|
|
3568
|
-
}, w = (
|
|
3568
|
+
}, w = (x) => {
|
|
3569
3569
|
var h, D;
|
|
3570
3570
|
e(!0);
|
|
3571
3571
|
const b = new FormData();
|
|
3572
|
-
b.append("UPLOAD_CODE", r == null ? void 0 : r.UPLOAD_CODE), b.append("UPLOAD_TYPE", r == null ? void 0 : r.UPLOAD_TYPE), b.append("FILE",
|
|
3572
|
+
b.append("UPLOAD_CODE", r == null ? void 0 : r.UPLOAD_CODE), b.append("UPLOAD_TYPE", r == null ? void 0 : r.UPLOAD_TYPE), b.append("FILE", x), (D = (h = s({
|
|
3573
3573
|
endpoint: "/upload/temp",
|
|
3574
3574
|
data: b,
|
|
3575
3575
|
headers: {
|
|
@@ -3586,7 +3586,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3586
3586
|
CHAT_ALIGN: "to",
|
|
3587
3587
|
CHAT_TYPE: "chat"
|
|
3588
3588
|
};
|
|
3589
|
-
|
|
3589
|
+
f((F) => {
|
|
3590
3590
|
const J = [...En(F), I];
|
|
3591
3591
|
return Qe(J);
|
|
3592
3592
|
}), g.current = !0, d({
|
|
@@ -3609,16 +3609,16 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3609
3609
|
return X(() => {
|
|
3610
3610
|
E();
|
|
3611
3611
|
}, []), X(() => {
|
|
3612
|
-
var
|
|
3613
|
-
(
|
|
3612
|
+
var x;
|
|
3613
|
+
(x = me) == null || x.destroy();
|
|
3614
3614
|
}, [v]), /* @__PURE__ */ n.jsx(
|
|
3615
3615
|
Zn,
|
|
3616
3616
|
{
|
|
3617
3617
|
beforeUpload: k,
|
|
3618
3618
|
fileList: [],
|
|
3619
|
-
accept: (C = (y = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : y.split(",")) == null ? void 0 : C.map((
|
|
3620
|
-
onChange: (
|
|
3621
|
-
w(
|
|
3619
|
+
accept: (C = (y = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : y.split(",")) == null ? void 0 : C.map((x) => `.${x}`),
|
|
3620
|
+
onChange: (x) => {
|
|
3621
|
+
w(x == null ? void 0 : x.file);
|
|
3622
3622
|
},
|
|
3623
3623
|
children: /* @__PURE__ */ n.jsx(
|
|
3624
3624
|
W,
|
|
@@ -3637,10 +3637,10 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3637
3637
|
const l = (m = e == null ? void 0 : e.current) == null ? void 0 : m.textarea;
|
|
3638
3638
|
if (!l)
|
|
3639
3639
|
return !1;
|
|
3640
|
-
const { selectionStart: o, selectionEnd: a, value: d } = l, u = d == null ? void 0 : d.substring(0, o),
|
|
3640
|
+
const { selectionStart: o, selectionEnd: a, value: d } = l, u = d == null ? void 0 : d.substring(0, o), f = d == null ? void 0 : d.substring(o, a), g = d == null ? void 0 : d.substring(a);
|
|
3641
3641
|
return {
|
|
3642
3642
|
before: u,
|
|
3643
|
-
selectedText:
|
|
3643
|
+
selectedText: f,
|
|
3644
3644
|
after: g,
|
|
3645
3645
|
selectionStart: o,
|
|
3646
3646
|
selectionEnd: a,
|
|
@@ -3651,8 +3651,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3651
3651
|
(g = e == null ? void 0 : e.current) == null || g.focus();
|
|
3652
3652
|
const o = (m = e == null ? void 0 : e.current) == null ? void 0 : m.textarea, a = l == null ? void 0 : l.native;
|
|
3653
3653
|
if (!o) return;
|
|
3654
|
-
const { before: d, after: u } = r(),
|
|
3655
|
-
typeof document.execCommand == "function" ? document.execCommand("insertText", !1, a) : o.value =
|
|
3654
|
+
const { before: d, after: u } = r(), f = `${d}${a}${u}`;
|
|
3655
|
+
typeof document.execCommand == "function" ? document.execCommand("insertText", !1, a) : o.value = f;
|
|
3656
3656
|
};
|
|
3657
3657
|
return /* @__PURE__ */ n.jsx(
|
|
3658
3658
|
bn,
|
|
@@ -3671,29 +3671,29 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3671
3671
|
}
|
|
3672
3672
|
);
|
|
3673
3673
|
}, io = A(co), lo = () => {
|
|
3674
|
-
const [e, t] = N(0), [s, r] = N(!1), c = K(null), l = K(null), o = K(!1), a = K(null), { onSendMsg: d } = Te(), { ticketId: u } = Ce(), { isActiveTabVA:
|
|
3675
|
-
var
|
|
3676
|
-
return ((
|
|
3677
|
-
}, [E == null ? void 0 : E.STATUS]), w = L(() => g == null ? void 0 : g.map((
|
|
3678
|
-
...
|
|
3674
|
+
const [e, t] = N(0), [s, r] = N(!1), c = K(null), l = K(null), o = K(!1), a = K(null), { onSendMsg: d } = Te(), { ticketId: u } = Ce(), { isActiveTabVA: f } = ve(), { employees: g, setChats: m, isFromSelf: v, detailTicket: E } = De(), k = L(() => {
|
|
3675
|
+
var x;
|
|
3676
|
+
return ((x = E == null ? void 0 : E.STATUS) == null ? void 0 : x.toString().toLowerCase()) === "closed";
|
|
3677
|
+
}, [E == null ? void 0 : E.STATUS]), w = L(() => g == null ? void 0 : g.map((x) => ({
|
|
3678
|
+
...x,
|
|
3679
3679
|
label: /* @__PURE__ */ n.jsx(
|
|
3680
3680
|
bn,
|
|
3681
3681
|
{
|
|
3682
3682
|
placement: "left",
|
|
3683
|
-
content: /* @__PURE__ */ n.jsx(so, { ...
|
|
3684
|
-
children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ue, { src:
|
|
3683
|
+
content: /* @__PURE__ */ n.jsx(so, { ...x }),
|
|
3684
|
+
children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ue, { src: x == null ? void 0 : x.PHOTO, name: x == null ? void 0 : x.FULL_NAME }) })
|
|
3685
3685
|
}
|
|
3686
3686
|
),
|
|
3687
|
-
value:
|
|
3687
|
+
value: x == null ? void 0 : x.FULL_NAME
|
|
3688
3688
|
})), [g]), y = () => {
|
|
3689
3689
|
var h, D, O;
|
|
3690
|
-
const
|
|
3690
|
+
const x = (D = (h = c == null ? void 0 : c.current) == null ? void 0 : h.textarea) == null ? void 0 : D.value;
|
|
3691
3691
|
d({
|
|
3692
3692
|
event: "SEND_MESSAGE",
|
|
3693
3693
|
data: {
|
|
3694
3694
|
ATTACHMENT: "",
|
|
3695
3695
|
FAQ_ID: null,
|
|
3696
|
-
MESSAGE:
|
|
3696
|
+
MESSAGE: x,
|
|
3697
3697
|
EMPLOYEES: g == null ? void 0 : g.map((_) => _ == null ? void 0 : _.EMP_ID),
|
|
3698
3698
|
TASK_ID: u
|
|
3699
3699
|
}
|
|
@@ -3701,7 +3701,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3701
3701
|
const b = {
|
|
3702
3702
|
ATTACHMENT: "",
|
|
3703
3703
|
FAQ_ID: null,
|
|
3704
|
-
MESSAGE:
|
|
3704
|
+
MESSAGE: x,
|
|
3705
3705
|
CREATED_DATE: (O = le()) == null ? void 0 : O.format(`${vn} HH:mm:ss`),
|
|
3706
3706
|
CHAT_ALIGN: "to",
|
|
3707
3707
|
CHAT_TYPE: "chat"
|
|
@@ -3728,11 +3728,11 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3728
3728
|
}, 250);
|
|
3729
3729
|
};
|
|
3730
3730
|
return X(() => {
|
|
3731
|
-
c != null && c.current && !
|
|
3732
|
-
var
|
|
3733
|
-
(
|
|
3731
|
+
c != null && c.current && !f && u && (clearTimeout(a.current), a.current = setTimeout(() => {
|
|
3732
|
+
var x;
|
|
3733
|
+
(x = c == null ? void 0 : c.current) == null || x.focus();
|
|
3734
3734
|
}, 500));
|
|
3735
|
-
}, [
|
|
3735
|
+
}, [f, u]), k ? null : /* @__PURE__ */ n.jsxs(
|
|
3736
3736
|
"div",
|
|
3737
3737
|
{
|
|
3738
3738
|
className: "w-input-container",
|
|
@@ -3760,15 +3760,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3760
3760
|
onChange: () => {
|
|
3761
3761
|
C();
|
|
3762
3762
|
},
|
|
3763
|
-
onKeyDown: (
|
|
3764
|
-
((
|
|
3763
|
+
onKeyDown: (x) => {
|
|
3764
|
+
((x == null ? void 0 : x.code) === "Enter" || (x == null ? void 0 : x.key) === "Enter") && !(x != null && x.shiftKey) && y();
|
|
3765
3765
|
},
|
|
3766
|
-
filterOption: (
|
|
3766
|
+
filterOption: (x, b) => {
|
|
3767
3767
|
var O, _, q;
|
|
3768
|
-
const h = (O =
|
|
3768
|
+
const h = (O = x == null ? void 0 : x.toString()) == null ? void 0 : O.toLowerCase(), D = (q = (_ = b == null ? void 0 : b.FULL_NAME) == null ? void 0 : _.toString()) == null ? void 0 : q.toLowerCase();
|
|
3769
3769
|
return D == null ? void 0 : D.includes(h);
|
|
3770
3770
|
},
|
|
3771
|
-
children: w == null ? void 0 : w.map((
|
|
3771
|
+
children: w == null ? void 0 : w.map((x, b) => /* @__PURE__ */ n.jsx(Bn.Option, { ...x, children: x == null ? void 0 : x.label }, b))
|
|
3772
3772
|
},
|
|
3773
3773
|
e
|
|
3774
3774
|
),
|
|
@@ -3850,8 +3850,8 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3850
3850
|
const e = j("AdvanceFilter", "Advance Filter"), t = j("Subject", "Subject"), s = j(
|
|
3851
3851
|
"TicketCategory",
|
|
3852
3852
|
"Ticket Category"
|
|
3853
|
-
), r = j("TicketStatus", "Ticket Status"), c = j("CreatedDate", "Created Date"), l = j("New", "New"), o = j("Open", "Open"), a = j("Reopen", "Reopen"), d = j("InProgress", "In Progress"), u = j("Responded", "Responded"),
|
|
3854
|
-
const B = `${l}/${o}/${a}`, S = `${d}/${u}`, M = `${
|
|
3853
|
+
), r = j("TicketStatus", "Ticket Status"), c = j("CreatedDate", "Created Date"), l = j("New", "New"), o = j("Open", "Open"), a = j("Reopen", "Reopen"), d = j("InProgress", "In Progress"), u = j("Responded", "Responded"), f = j("Fixed", "Fixed"), g = j("Done", "Done"), m = j("Closed", "Closed"), v = j("HDCancelled", "Cancelled"), E = j("Clear", "Clear"), k = j("Filter", "Filter"), w = en(), [y] = oe.useForm(), { openFilter: C, setOpenFilter: x, getListTicket: b, setCountFilters: h } = Ce(), [D, O] = N([]), _ = L(() => {
|
|
3854
|
+
const B = `${l}/${o}/${a}`, S = `${d}/${u}`, M = `${f}/${g}`;
|
|
3855
3855
|
return [
|
|
3856
3856
|
{ value: 3, label: B },
|
|
3857
3857
|
{ value: 1, label: S },
|
|
@@ -3896,7 +3896,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3896
3896
|
styleContainer: { height: "calc(100% - 50px)" },
|
|
3897
3897
|
open: C,
|
|
3898
3898
|
onClose: () => {
|
|
3899
|
-
|
|
3899
|
+
x(!1);
|
|
3900
3900
|
},
|
|
3901
3901
|
footer: /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-list-advance-filter-footer", children: [
|
|
3902
3902
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3914,7 +3914,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3914
3914
|
{
|
|
3915
3915
|
type: "primary",
|
|
3916
3916
|
onClick: () => {
|
|
3917
|
-
Y(),
|
|
3917
|
+
Y(), x(!1);
|
|
3918
3918
|
},
|
|
3919
3919
|
children: k
|
|
3920
3920
|
},
|
|
@@ -4007,21 +4007,22 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4007
4007
|
/* @__PURE__ */ n.jsx("div", { style: { display: !t && !s ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Mr, {}) }),
|
|
4008
4008
|
/* @__PURE__ */ n.jsx(bo, {})
|
|
4009
4009
|
] }) : /* @__PURE__ */ n.jsx(To, {});
|
|
4010
|
-
}, Eo = A(ho), yo = () => {
|
|
4010
|
+
}, Eo = A(ho), yo = ({ children: e, usePopover: t, ...s }) => t ? /* @__PURE__ */ n.jsx(bn, { ...s, visible: s == null ? void 0 : s.open, children: e }) : e, jo = () => {
|
|
4011
4011
|
const e = j("NeedHelp", "Need Help"), t = j(
|
|
4012
4012
|
"WidgetDisconnected",
|
|
4013
4013
|
"Widget Disconnected"
|
|
4014
|
-
), [s, r] = N(!
|
|
4014
|
+
), [s, r] = N(!0), c = K(), { widgetProps: l, setOpenWidget: o, isFirstOpenWidget: a, setFirstOpenWidget: d } = Q(), { onSendMsg: u, connected: f, isHandshakeWidget: g } = ue(), m = () => {
|
|
4015
4015
|
o(!0), u({ msg: l == null ? void 0 : l.getStartedPayload });
|
|
4016
4016
|
};
|
|
4017
4017
|
return X(() => {
|
|
4018
|
-
r(!
|
|
4018
|
+
r(!f), window.clearTimeout(c.current), c.current = setTimeout(() => {
|
|
4019
4019
|
r(!1);
|
|
4020
4020
|
}, 2e3);
|
|
4021
|
-
}, [
|
|
4022
|
-
|
|
4021
|
+
}, [f]), /* @__PURE__ */ n.jsx(
|
|
4022
|
+
yo,
|
|
4023
4023
|
{
|
|
4024
|
-
|
|
4024
|
+
usePopover: s && g === "show",
|
|
4025
|
+
open: s && g === "show",
|
|
4025
4026
|
content: t,
|
|
4026
4027
|
placement: "right",
|
|
4027
4028
|
children: /* @__PURE__ */ n.jsxs(
|
|
@@ -4051,7 +4052,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4051
4052
|
)
|
|
4052
4053
|
}
|
|
4053
4054
|
);
|
|
4054
|
-
},
|
|
4055
|
+
}, wo = A(jo), po = () => {
|
|
4055
4056
|
const e = j("NotConnected", "Not Connected"), t = j(
|
|
4056
4057
|
"CannotAutoReconnect",
|
|
4057
4058
|
"Cannot auto reconnect"
|
|
@@ -4086,18 +4087,18 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4086
4087
|
open: !l && r
|
|
4087
4088
|
}
|
|
4088
4089
|
);
|
|
4089
|
-
},
|
|
4090
|
-
|
|
4091
|
-
),
|
|
4090
|
+
}, _o = A(
|
|
4091
|
+
po
|
|
4092
|
+
), ko = () => {
|
|
4092
4093
|
const { xs: e } = ge.useBreakpoint(), [t, s] = N(!1), { isOpenWidget: r, widgetProps: c } = Q(), { isActiveTabVA: l } = ve(), o = K(null), a = L(() => {
|
|
4093
|
-
var
|
|
4094
|
+
var f;
|
|
4094
4095
|
const u = [un];
|
|
4095
|
-
return e && (c != null && c.isSF ? u == null || u.push(`${un}-sf-mobile`) : u == null || u.push(`${un}-mobile`)), (
|
|
4096
|
+
return e && (c != null && c.isSF ? u == null || u.push(`${un}-sf-mobile`) : u == null || u.push(`${un}-mobile`)), (f = u == null ? void 0 : u.filter(Boolean)) == null ? void 0 : f.join(" ");
|
|
4096
4097
|
}, [e, c == null ? void 0 : c.isSF]), d = zt(
|
|
4097
4098
|
(u) => {
|
|
4098
4099
|
var g;
|
|
4099
|
-
const
|
|
4100
|
-
return c != null && c.isSF && (
|
|
4100
|
+
const f = [u, xn == null ? void 0 : xn.FADE_IN];
|
|
4101
|
+
return c != null && c.isSF && (f == null || f.push(`${u}-sf`)), e && (c != null && c.isSF ? f == null || f.push(`${u}-sf-mobile`) : f == null || f.push(`${u}-mobile`)), (g = f == null ? void 0 : f.filter(Boolean)) == null ? void 0 : g.join(" ");
|
|
4101
4102
|
},
|
|
4102
4103
|
[c == null ? void 0 : c.isSF, e]
|
|
4103
4104
|
);
|
|
@@ -4111,16 +4112,16 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4111
4112
|
/* @__PURE__ */ n.jsx(_r, {})
|
|
4112
4113
|
] }),
|
|
4113
4114
|
/* @__PURE__ */ n.jsx("div", { style: { display: l ? "none" : "block" }, children: /* @__PURE__ */ n.jsx("div", { className: d(vs), children: /* @__PURE__ */ n.jsx(Dr, { children: /* @__PURE__ */ n.jsx(Lr, { children: /* @__PURE__ */ n.jsx(Eo, {}) }) }) }) }),
|
|
4114
|
-
/* @__PURE__ */ n.jsx(
|
|
4115
|
-
] }) : /* @__PURE__ */ n.jsx(
|
|
4116
|
-
},
|
|
4115
|
+
/* @__PURE__ */ n.jsx(_o, {})
|
|
4116
|
+
] }) : /* @__PURE__ */ n.jsx(wo, {});
|
|
4117
|
+
}, Ao = A(ko), So = ({ items: e, ...t }) => Le != null && Le.startsWith("5") || Oe != null && Oe.startsWith("18") ? /* @__PURE__ */ n.jsx(cn, { ...t, items: e }) : /* @__PURE__ */ n.jsx(cn, { ...t, children: e == null ? void 0 : e.map(({ ...s }) => /* @__PURE__ */ mn(
|
|
4117
4118
|
cn.TabPane,
|
|
4118
4119
|
{
|
|
4119
4120
|
...s,
|
|
4120
4121
|
key: s == null ? void 0 : s.key,
|
|
4121
4122
|
tab: s == null ? void 0 : s.label
|
|
4122
4123
|
}
|
|
4123
|
-
)) }),
|
|
4124
|
+
)) }), Lo = A(So), Oo = () => {
|
|
4124
4125
|
const { isOpenWidget: e } = Q(), { setActiveTab: t, activeTab: s } = ve(), r = j(
|
|
4125
4126
|
"VirtualAssistant",
|
|
4126
4127
|
"Virtual Assistant"
|
|
@@ -4138,7 +4139,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4138
4139
|
}
|
|
4139
4140
|
},
|
|
4140
4141
|
children: /* @__PURE__ */ n.jsx(
|
|
4141
|
-
|
|
4142
|
+
Lo,
|
|
4142
4143
|
{
|
|
4143
4144
|
activeKey: s,
|
|
4144
4145
|
onChange: (o) => {
|
|
@@ -4160,7 +4161,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4160
4161
|
)
|
|
4161
4162
|
}
|
|
4162
4163
|
) : null;
|
|
4163
|
-
},
|
|
4164
|
+
}, Ro = A(Oo), Do = () => {
|
|
4164
4165
|
const { isOpenWidget: e, setOpenWidget: t, setExpand: s, isExpand: r, widgetProps: c } = Q(), { xs: l } = ge.useBreakpoint();
|
|
4165
4166
|
return e ? /* @__PURE__ */ n.jsxs(
|
|
4166
4167
|
"div",
|
|
@@ -4203,7 +4204,7 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4203
4204
|
]
|
|
4204
4205
|
}
|
|
4205
4206
|
) : null;
|
|
4206
|
-
},
|
|
4207
|
+
}, No = A(Do), Mo = () => {
|
|
4207
4208
|
const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: s, setOpenWidget: r } = Q(), { xs: c } = ge.useBreakpoint(), l = L(() => {
|
|
4208
4209
|
var a;
|
|
4209
4210
|
const o = [
|
|
@@ -4223,15 +4224,15 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4223
4224
|
},
|
|
4224
4225
|
tabIndex: 0,
|
|
4225
4226
|
children: [
|
|
4226
|
-
/* @__PURE__ */ n.jsx(
|
|
4227
|
+
/* @__PURE__ */ n.jsx(No, {}),
|
|
4227
4228
|
/* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(er, { children: [
|
|
4228
|
-
/* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(
|
|
4229
|
-
/* @__PURE__ */ n.jsx(
|
|
4229
|
+
/* @__PURE__ */ n.jsx(Ls, { children: /* @__PURE__ */ n.jsx(Ao, {}) }),
|
|
4230
|
+
/* @__PURE__ */ n.jsx(Ro, {})
|
|
4230
4231
|
] }) })
|
|
4231
4232
|
]
|
|
4232
4233
|
}
|
|
4233
4234
|
);
|
|
4234
|
-
},
|
|
4235
|
+
}, Fo = A(Mo), Jo = ({
|
|
4235
4236
|
getStartedPayload: e,
|
|
4236
4237
|
socketURL: t,
|
|
4237
4238
|
socketPath: s,
|
|
@@ -4253,9 +4254,9 @@ const cr = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4253
4254
|
keyEncrypt: o,
|
|
4254
4255
|
history: a,
|
|
4255
4256
|
isSF: d,
|
|
4256
|
-
children: /* @__PURE__ */ n.jsx(Ss, { children: /* @__PURE__ */ n.jsx(
|
|
4257
|
+
children: /* @__PURE__ */ n.jsx(Ss, { children: /* @__PURE__ */ n.jsx(Fo, {}) })
|
|
4257
4258
|
}
|
|
4258
4259
|
);
|
|
4259
4260
|
export {
|
|
4260
|
-
|
|
4261
|
+
Jo as default
|
|
4261
4262
|
};
|