@sawport/react-sdk 0.9.9-beta.7 → 0.9.9-beta.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/index.js CHANGED
@@ -123074,7 +123074,7 @@ function WidgetInitForm({
123074
123074
  async ({ name, email: email2, reason: reason2, ...emptyFields2 }) => {
123075
123075
  var _a2, _b;
123076
123076
  try {
123077
- setState({ isLoading: true, isError: true });
123077
+ setState({ isLoading: true, isError: false });
123078
123078
  const phoneNumberRegex = /^\+?[1-9]\d{1,14}$/;
123079
123079
  if (((_a2 = fields == null ? void 0 : fields.mobile) == null ? void 0 : _a2.show) || ((_b = fields == null ? void 0 : fields.mobile) == null ? void 0 : _b.show) === void 0) {
123080
123080
  if (emptyFields2.mobile === "") {
@@ -123455,15 +123455,8 @@ const SenderMessage = ({
123455
123455
  togglePDFView,
123456
123456
  toggleVideoView
123457
123457
  }) => {
123458
- var _a;
123459
123458
  const fileType = (file == null ? void 0 : file.ext) ? isFileType(file.ext) : null;
123460
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "chat-send-container flex flex-col my-2", children: ((_a = msg.message) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
123461
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "widget-chat-send", children: msg.message }),
123462
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "flex items-center ml-auto", children: [
123463
- /* @__PURE__ */ jsxRuntimeExports.jsx("small", { style: { marginRight: "12px", marginBottom: "1px" }, children: hooks(msg.createdAt).calendar() }),
123464
- /* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: msg.message_seen_status ? /* @__PURE__ */ jsxRuntimeExports.jsx(SvgDoubleTick, { style: { fill: companyColor } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(SvgTick, { style: { fill: companyColor } }) })
123465
- ] })
123466
- ] }) : attachment ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
123459
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "chat-send-container flex flex-col my-2", children: attachment ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
123467
123460
  fileType === "image" ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "widget-chat-send widget-chat-file", children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { target: "_blank", rel: "noreferrer", href: attachment, download: file == null ? void 0 : file.name, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: attachment, height: 60 }) }) }) : fileType === "document" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "my-2 ml-auto widget-chat-file px-2 py-2", children: [
123468
123461
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-black", children: attachment == null ? void 0 : attachment.split("/").pop() }),
123469
123462
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -123482,7 +123475,13 @@ const SenderMessage = ({
123482
123475
  /* @__PURE__ */ jsxRuntimeExports.jsx("small", { style: { marginRight: "12px", marginBottom: "5px" }, children: hooks(msg.createdAt).calendar() }),
123483
123476
  /* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: msg.message_seen_status ? /* @__PURE__ */ jsxRuntimeExports.jsx(SvgDoubleTick, { style: { fill: companyColor } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(SvgTick, { style: { fill: companyColor } }) })
123484
123477
  ] })
123485
- ] }) : null }, msg.id);
123478
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
123479
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "widget-chat-send", children: msg.message }),
123480
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "flex items-center ml-auto", children: [
123481
+ /* @__PURE__ */ jsxRuntimeExports.jsx("small", { style: { marginRight: "12px", marginBottom: "1px" }, children: hooks(msg.createdAt).calendar() }),
123482
+ /* @__PURE__ */ jsxRuntimeExports.jsx("small", { children: msg.message_seen_status ? /* @__PURE__ */ jsxRuntimeExports.jsx(SvgDoubleTick, { style: { fill: companyColor } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(SvgTick, { style: { fill: companyColor } }) })
123483
+ ] })
123484
+ ] }) }, msg.id);
123486
123485
  };
123487
123486
  const OtherUserMessage = ({
123488
123487
  msg,