@sawport/react-sdk 0.1.0-alpha.54 → 0.1.0-alpha.56

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
@@ -27028,14 +27028,12 @@ const SvgMinimize = (props) => /* @__PURE__ */ react.exports.createElement("svg"
27028
27028
  const SvgDoubleTick = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
27029
27029
  id: "Layer_1",
27030
27030
  "data-name": "Layer 1",
27031
- width: "20px",
27032
- height: "20px",
27031
+ width: "10px",
27032
+ height: "10px",
27033
27033
  xmlns: "http://www.w3.org/2000/svg",
27034
27034
  viewBox: "0 0 122.88 74.46",
27035
27035
  ...props
27036
- }, /* @__PURE__ */ react.exports.createElement("defs", null), /* @__PURE__ */ react.exports.createElement("title", null, "double-tick"), /* @__PURE__ */ react.exports.createElement("g", {
27037
- fill: "#0000FF"
27038
- }, /* @__PURE__ */ react.exports.createElement("path", {
27036
+ }, /* @__PURE__ */ react.exports.createElement("defs", null), /* @__PURE__ */ react.exports.createElement("title", null, "double-tick"), /* @__PURE__ */ react.exports.createElement("g", null, /* @__PURE__ */ react.exports.createElement("path", {
27039
27037
  d: "M1.87,47.2a6.33,6.33,0,1,1,8.92-9c8.88,8.85,17.53,17.66,26.53,26.45l-3.76,4.45-.35.37a6.33,6.33,0,0,1-8.95,0L1.87,47.2ZM30,43.55a6.33,6.33,0,1,1,8.82-9.07l25,24.38L111.64,2.29c5.37-6.35,15,1.84,9.66,8.18L69.07,72.22l-.3.33a6.33,6.33,0,0,1-8.95.12L30,43.55Zm28.76-4.21-.31.33-9.07-8.85L71.67,4.42c5.37-6.35,15,1.83,9.67,8.18L58.74,39.34Z"
27040
27038
  })));
27041
27039
  const SvgTick = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
@@ -27044,8 +27042,8 @@ const SvgTick = (props) => /* @__PURE__ */ react.exports.createElement("svg", {
27044
27042
  xmlnsXlink: "http://www.w3.org/1999/xlink",
27045
27043
  x: "0px",
27046
27044
  y: "0px",
27047
- width: "20px",
27048
- height: "20px",
27045
+ width: "10px",
27046
+ height: "10px",
27049
27047
  viewBox: "0 0 122.881 89.842",
27050
27048
  enableBackground: "new 0 0 122.881 89.842",
27051
27049
  xmlSpace: "preserve",
@@ -66319,8 +66317,8 @@ Step 2: Open the video banking widget.
66319
66317
  Step 3: Click on the "Scheduled Meeting" button.
66320
66318
  Step 4: Click the blue "Join" button to join meeting.`,
66321
66319
  location: window.location,
66322
- startTime: hooks(`${date4}:${time2}`),
66323
- endTime: hooks(`${date4}:${time2}`).add(1, "h")
66320
+ startTime: hooks(`${date4}T${time2}`),
66321
+ endTime: hooks(`${date4}T${time2}`).add(1, "h")
66324
66322
  };
66325
66323
  const providersObj = {};
66326
66324
  const objClass = {
@@ -71192,7 +71190,8 @@ function ChatWidgetScreen({
71192
71190
  welcome_message,
71193
71191
  dataRef,
71194
71192
  setChatClose,
71195
- videoRef
71193
+ videoRef,
71194
+ companyColor
71196
71195
  }) {
71197
71196
  var _a, _b, _c, _d, _e, _f;
71198
71197
  const bottomRef = react.exports.useRef();
@@ -71314,7 +71313,8 @@ function ChatWidgetScreen({
71314
71313
  })]
71315
71314
  }), /* @__PURE__ */ jsx(Messages, {
71316
71315
  chatMessages: messages2,
71317
- dataRef
71316
+ dataRef,
71317
+ companyColor
71318
71318
  }), /* @__PURE__ */ jsx("div", {
71319
71319
  ref: bottomRef,
71320
71320
  className: "chat-bottom"
@@ -71464,18 +71464,21 @@ const ChatInput = react.exports.memo(function({
71464
71464
  });
71465
71465
  const Messages = react.exports.memo(function({
71466
71466
  chatMessages,
71467
- dataRef
71467
+ dataRef,
71468
+ companyColor
71468
71469
  }) {
71469
71470
  return chatMessages.slice().reverse().map((msg) => {
71470
71471
  var _a, _b, _c, _d;
71471
71472
  return /* @__PURE__ */ jsx(Message, {
71472
71473
  isSender: ((_c = (_b = (_a = dataRef.current) == null ? void 0 : _a.customer) == null ? void 0 : _b.user) == null ? void 0 : _c.id) === (((_d = msg.user) == null ? void 0 : _d.id) || msg.user),
71473
- ...msg
71474
+ ...msg,
71475
+ companyColor
71474
71476
  }, msg.id);
71475
71477
  });
71476
71478
  });
71477
71479
  const Message = react.exports.memo(function({
71478
71480
  attachment,
71481
+ companyColor,
71479
71482
  ...msg
71480
71483
  }) {
71481
71484
  var _a, _b, _c, _d, _e;
@@ -71492,10 +71495,21 @@ const Message = react.exports.memo(function({
71492
71495
  }), /* @__PURE__ */ jsxs("div", {
71493
71496
  className: "d-flex",
71494
71497
  children: [/* @__PURE__ */ jsx("small", {
71495
- className: "mr-4 pb-1",
71498
+ style: {
71499
+ marginRight: "12px",
71500
+ marginBottom: "1px"
71501
+ },
71496
71502
  children: hooks(msg.createdAt).calendar()
71497
71503
  }), /* @__PURE__ */ jsx("small", {
71498
- children: msg.message_seen_status ? /* @__PURE__ */ jsx(SvgDoubleTick, {}) : /* @__PURE__ */ jsx(SvgTick, {})
71504
+ children: msg.message_seen_status ? /* @__PURE__ */ jsx(SvgDoubleTick, {
71505
+ style: {
71506
+ fill: companyColor
71507
+ }
71508
+ }) : /* @__PURE__ */ jsx(SvgTick, {
71509
+ style: {
71510
+ fill: companyColor
71511
+ }
71512
+ })
71499
71513
  })]
71500
71514
  })]
71501
71515
  }) : !!attachment ? /* @__PURE__ */ jsxs(Fragment, {
@@ -71521,10 +71535,21 @@ const Message = react.exports.memo(function({
71521
71535
  }), /* @__PURE__ */ jsxs("div", {
71522
71536
  className: "d-flex",
71523
71537
  children: [/* @__PURE__ */ jsx("small", {
71524
- className: "mr-4 pb-1",
71538
+ style: {
71539
+ marginRight: "12px",
71540
+ marginBottom: "5px"
71541
+ },
71525
71542
  children: hooks(msg.createdAt).calendar()
71526
71543
  }), /* @__PURE__ */ jsx("small", {
71527
- children: msg.message_seen_status ? /* @__PURE__ */ jsx(SvgDoubleTick, {}) : /* @__PURE__ */ jsx(SvgTick, {})
71544
+ children: msg.message_seen_status ? /* @__PURE__ */ jsx(SvgDoubleTick, {
71545
+ style: {
71546
+ fill: companyColor
71547
+ }
71548
+ }) : /* @__PURE__ */ jsx(SvgTick, {
71549
+ style: {
71550
+ fill: companyColor
71551
+ }
71552
+ })
71528
71553
  })]
71529
71554
  })]
71530
71555
  }) : null
@@ -73622,7 +73647,8 @@ const ChatMode = react.exports.memo(({
73622
73647
  welcome_message: company == null ? void 0 : company.welcome_message,
73623
73648
  dataRef,
73624
73649
  setChatClose,
73625
- videoRef
73650
+ videoRef,
73651
+ companyColor: company == null ? void 0 : company.hex_code
73626
73652
  });
73627
73653
  });
73628
73654
  const OngoingChat = ({
@@ -73674,8 +73700,12 @@ const OngoingChat = ({
73674
73700
  chatClose !== void 0 && (updates.chatClose = chatClose);
73675
73701
  setParentState(updates);
73676
73702
  socket2.emit("customer-joined-conversation", {
73677
- conversation: conversationId,
73678
- customer: customer == null ? void 0 : customer.id
73703
+ conversation: {
73704
+ id: conversationId
73705
+ },
73706
+ customer: {
73707
+ id: customer == null ? void 0 : customer.id
73708
+ }
73679
73709
  });
73680
73710
  } catch (error) {
73681
73711
  console.log(error);