@sawport/react-sdk 0.1.0-alpha.43 → 0.1.0-alpha.44

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
@@ -41651,7 +41651,6 @@ const useRequest = ({ asyncRequest, params, ...props }, dep) => {
41651
41651
  );
41652
41652
  return { setState, next, ...rest };
41653
41653
  };
41654
- const maximizeIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAEAQAAAA5p3UDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAAAGAAAABgAPBrQs8AAAAHdElNRQflCh0XODE9tr5GAAACo0lEQVR42u3dTU7jQBBA4TaaHacJKJgkErDlSFnB7TgNGCPWLhYlIcEMY/ePqXTX+9btVpl+RAgpdggAAAAAAMCLbm6BiMivDtR1szOhnDPrAWCLAJwjAOcIwDkCcI4AnCMA51YKYByD9H2XwPoHgm8k2eurTH1vPT8ypQdABE3IC4AIqpcfABFUbf5wh2FZBMMg03ZrfT+INH+wm43I8zOfBI2aO1JdQwTNWhKAriOCJi0NQNcSQXNiAtD1RNCU2AD0mouLqAjk+tr6PvGDlAD0OiJoQmoAei0RVC8nAL2eCKqWG4DuERPBOBLBCSkRgO5DBFUqFYDuRQTVKRmA7kcEVSkdgO5JBO5pBC8vROCYyOXl4gim93eZbm6sZ0ZhRAAiQEIEcntrPTMKIwIQAYgAgQgQQhDZ7fSfQETgFhEgIYK7O+uZURgRrKOaJ4R03dNTCPf3Iby9zS8+Pw9ht7OeGStY9knw8GA9J1b0/wg4fBf+HQGH78rXCDh8l0QOB5Hj0XoOAAAAAAAAAAAAAAAAAEC1RI5HkcPBeg4YEHl85LuITn0ePl9I9eevwycCP348fCJon/7Bt8Q4iuz31vOiMJH9nodUOEcEiH9IBU80bQ8RgAhABAhEgBAZAW8+aRMRIO7ZxkTQJiIAEYAIEGIjSH9r+tzO1j8H134jAgI4cdERTH0ftz8BnLw1IyCASqwVAQFURCNY+tb0ZREQQGX0renlIiCACpWMgAAqVSoCAqhYiQgIoHK5ERBAA3IiIIBGxEdwdaXXEUAzUiIggMbItN2KDMOyCObXWd8PEsR9EhBAk0Q2mxIRWN8HMpSIwPoekCk3Auv5UUBOBHN7/7G+OW9O7bfyzHoA2CIA5wjAOQJwjgCcIwDnCAAAAAAAAMCJD8ZQvP1zR7rXAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTEwLTI5VDIzOjU2OjQ5KzAwOjAwRquYIgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMC0yOVQyMzo1Njo0OSswMDowMDf2IJ4AAAAASUVORK5CYII=";
41655
41654
  var RECURRENCE = {
41656
41655
  FREQUENCY: {
41657
41656
  DAILY: "DAILY",
@@ -42919,19 +42918,16 @@ Step 4: Click the blue "Join" button to join meeting.`,
42919
42918
  }), /* @__PURE__ */ jsx("h1", {
42920
42919
  className: "text-alt my-0 py-2 font-weight-bold",
42921
42920
  children: "Thank You"
42922
- }), /* @__PURE__ */ jsx("h6", {
42921
+ }), /* @__PURE__ */ jsx("p", {
42923
42922
  className: "text-center my-0 py-2 text-lg text-alt",
42924
42923
  children: "Callback request was scheduled successfully."
42925
- }), /* @__PURE__ */ jsx("h6", {
42926
- className: "text-center my-0 py-2 text-lg text-alt",
42927
- children: "Join the Video Banking"
42928
- }), /* @__PURE__ */ jsx("h1", {
42924
+ }), /* @__PURE__ */ jsx("h3", {
42929
42925
  className: "mt-4 text-alt my-0 py-2 font-weight-bold",
42930
42926
  children: "Date & Time"
42931
- }), /* @__PURE__ */ jsx("h6", {
42927
+ }), /* @__PURE__ */ jsx("p", {
42932
42928
  className: "text-center my-0 py-2 text-lg text-alt",
42933
42929
  children: hooks(date2).format("dddd, MMMM Do YYYY").toString()
42934
- }), /* @__PURE__ */ jsx("h6", {
42930
+ }), /* @__PURE__ */ jsx("p", {
42935
42931
  className: "text-center my-0 py-2 text-lg text-alt",
42936
42932
  children: hooks(`${date2}:${time2}`).format("hh:mm A").toString()
42937
42933
  }), /* @__PURE__ */ jsx(c$2, {
@@ -43014,9 +43010,7 @@ const SubTitle = ({
43014
43010
  })]
43015
43011
  });
43016
43012
  function WidgetOfflineHeader({
43017
- company,
43018
- setIsWidgetLaunched,
43019
- setShowTip
43013
+ company
43020
43014
  }) {
43021
43015
  return /* @__PURE__ */ jsx(Fragment, {
43022
43016
  children: /* @__PURE__ */ jsxs("div", {
@@ -43025,36 +43019,16 @@ function WidgetOfflineHeader({
43025
43019
  fontSize: 16,
43026
43020
  color: "#fff"
43027
43021
  },
43028
- children: [/* @__PURE__ */ jsxs("div", {
43022
+ children: [/* @__PURE__ */ jsx("div", {
43029
43023
  className: "d-flex",
43030
- children: [/* @__PURE__ */ jsx("p", {
43024
+ children: /* @__PURE__ */ jsx("p", {
43031
43025
  className: "my-0 pb-0",
43032
43026
  style: {
43033
43027
  fontSize: 24,
43034
43028
  fontWeight: "bold"
43035
43029
  },
43036
43030
  children: "Video Banking Offline"
43037
- }), /* @__PURE__ */ jsx("div", {
43038
- className: "widget-option-btn ml-3 d-flex justify-content-between align-items-center",
43039
- children: /* @__PURE__ */ jsx("span", {
43040
- onClick: () => {
43041
- setShowTip(true);
43042
- setIsWidgetLaunched(false);
43043
- },
43044
- className: "border-left border-right",
43045
- style: {
43046
- width: 25,
43047
- paddingLeft: 2,
43048
- paddingRight: 2
43049
- },
43050
- children: /* @__PURE__ */ jsx("img", {
43051
- src: maximizeIcon,
43052
- alt: "maximize",
43053
- width: "20px",
43054
- className: ""
43055
- })
43056
- })
43057
- })]
43031
+ })
43058
43032
  }), /* @__PURE__ */ jsx(SubTitle, {
43059
43033
  from_day: company == null ? void 0 : company.from_day,
43060
43034
  to_day: company == null ? void 0 : company.to_day,
@@ -43082,7 +43056,8 @@ function WidgetInitForm({
43082
43056
  latitude,
43083
43057
  location: location2,
43084
43058
  country_code,
43085
- continent
43059
+ continent,
43060
+ timezone: timezone2
43086
43061
  }, setState] = useState({
43087
43062
  ipAddress: void 0,
43088
43063
  country: void 0,
@@ -43090,7 +43065,8 @@ function WidgetInitForm({
43090
43065
  latitude: void 0,
43091
43066
  location: void 0,
43092
43067
  country_code: void 0,
43093
- continent: void 0
43068
+ continent: void 0,
43069
+ timezone: void 0
43094
43070
  });
43095
43071
  const [mobile, setMobile] = useState("");
43096
43072
  const validSchema = react.exports.useMemo(() => {
@@ -43121,9 +43097,9 @@ function WidgetInitForm({
43121
43097
  longitude: longitude2,
43122
43098
  latitude: latitude2,
43123
43099
  country_code: country_code2,
43124
- timezone: timezone2
43100
+ timezone: timezone22
43125
43101
  } = data2.data;
43126
- const continent2 = timezone2.split("/")[0];
43102
+ const continent2 = timezone22.split("/")[0];
43127
43103
  setState({
43128
43104
  ipAddress: ip,
43129
43105
  country: country_name,
@@ -43131,7 +43107,8 @@ function WidgetInitForm({
43131
43107
  latitude: latitude2,
43132
43108
  location: region,
43133
43109
  country_code: country_code2,
43134
- continent: continent2
43110
+ continent: continent2,
43111
+ timezone: timezone22
43135
43112
  });
43136
43113
  createVisitor({
43137
43114
  ip_address: ip,
@@ -43173,7 +43150,8 @@ function WidgetInitForm({
43173
43150
  longitude,
43174
43151
  location: location2,
43175
43152
  source_url,
43176
- continent
43153
+ continent,
43154
+ timezone: timezone2
43177
43155
  }, "post"), {
43178
43156
  onError: (err) => {
43179
43157
  toast.error("Error occured, try again", {
@@ -47015,6 +46993,7 @@ const Interval = react.exports.memo(({
47015
46993
  }, [interval]);
47016
46994
  return /* @__PURE__ */ jsx(Render, {});
47017
46995
  });
46996
+ const maximizeIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAEAQAAAA5p3UDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJ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yOVQyMzo1Njo0OSswMDowMDf2IJ4AAAAASUVORK5CYII=";
47018
46997
  const iceServers = [
47019
46998
  {
47020
46999
  url: "stun:global.stun.twilio.com:3478?transport=udp",
@@ -48096,7 +48075,9 @@ function VideoChat({
48096
48075
  display: isVisible ? "block" : "none",
48097
48076
  overflow: "hidden",
48098
48077
  ...recording ? {
48099
- border: "4px solid #db3814"
48078
+ border: "4px solid #db3814",
48079
+ width: "98%",
48080
+ height: "248px"
48100
48081
  } : {},
48101
48082
  ...style2
48102
48083
  },
@@ -49845,8 +49826,7 @@ function UnwrapWidget({
49845
49826
  company,
49846
49827
  companyUser,
49847
49828
  setIsWidgetLaunched,
49848
- isWidgetLaunched,
49849
- setShowTip
49829
+ isWidgetLaunched
49850
49830
  }), /* @__PURE__ */ jsxs("div", {
49851
49831
  style: {
49852
49832
  position: "relative"
@@ -49880,7 +49860,7 @@ function UnwrapWidget({
49880
49860
  width: 240,
49881
49861
  fontWeight: 600
49882
49862
  },
49883
- children: "For Diaspora Banking, click here to start Video Banking with the next available agent."
49863
+ children: "For Diaspora Banking, click here to start Video Banking."
49884
49864
  })]
49885
49865
  })]
49886
49866
  });
@@ -49894,8 +49874,7 @@ const Header = react.exports.memo(function({
49894
49874
  agent,
49895
49875
  quickStopChat,
49896
49876
  company,
49897
- videoRef,
49898
- setShowTip
49877
+ videoRef
49899
49878
  }) {
49900
49879
  return /* @__PURE__ */ jsx("div", {
49901
49880
  id: "widget-header-container",
@@ -49911,9 +49890,7 @@ const Header = react.exports.memo(function({
49911
49890
  quickStopChat,
49912
49891
  videoRef
49913
49892
  }) : /* @__PURE__ */ jsx(WidgetOnlineHeader, {}) : /* @__PURE__ */ jsx(WidgetOfflineHeader, {
49914
- company,
49915
- setIsWidgetLaunched,
49916
- setShowTip
49893
+ company
49917
49894
  })
49918
49895
  });
49919
49896
  });
@@ -49923,8 +49900,7 @@ const WidgetFormDisplay = react.exports.memo(({
49923
49900
  company,
49924
49901
  companyUser,
49925
49902
  setIsWidgetLaunched,
49926
- isWidgetLaunched,
49927
- setShowTip
49903
+ isWidgetLaunched
49928
49904
  }) => {
49929
49905
  var _a, _b, _c, _d;
49930
49906
  const {
@@ -50040,8 +50016,7 @@ const WidgetFormDisplay = react.exports.memo(({
50040
50016
  agent,
50041
50017
  quickStopChat,
50042
50018
  company,
50043
- videoRef,
50044
- setShowTip
50019
+ videoRef
50045
50020
  }), !!((_c = (_b = dataRef == null ? void 0 : dataRef.current) == null ? void 0 : _b.wait) == null ? void 0 : _c.createdAt) && !stateRef.current.agent && /* @__PURE__ */ jsx(LongestWaitime, {}), /* @__PURE__ */ jsx("div", {
50046
50021
  className: `widget-body-container py-1 px-3 ${companyClosed && "widget-body-container-offline"} `,
50047
50022
  children: isLoadingCustomer || isLoadingCustomer === void 0 ? /* @__PURE__ */ jsx(Spinner$2, {
@@ -50088,6 +50063,9 @@ const WidgetFormDisplay = react.exports.memo(({
50088
50063
  const Footer = () => /* @__PURE__ */ jsx("div", {
50089
50064
  className: "widget-footer-container",
50090
50065
  children: /* @__PURE__ */ jsxs("div", {
50066
+ style: {
50067
+ fontSize: 12
50068
+ },
50091
50069
  className: "d-flex justify-content-center align-items-center",
50092
50070
  children: [/* @__PURE__ */ jsx("span", {
50093
50071
  className: "mr-2",