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

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
@@ -42302,7 +42302,9 @@ const Offline = react.exports.memo(({
42302
42302
  country_code,
42303
42303
  mobile,
42304
42304
  isLoading,
42305
- scheduled
42305
+ scheduled,
42306
+ continent,
42307
+ timezone: timezone2
42306
42308
  }, setState] = useState({
42307
42309
  ipAddress: "",
42308
42310
  country: "",
@@ -42312,7 +42314,9 @@ const Offline = react.exports.memo(({
42312
42314
  country_code: "",
42313
42315
  mobile: "",
42314
42316
  isLoading: false,
42315
- scheduled: false
42317
+ scheduled: false,
42318
+ continent: void 0,
42319
+ timezone: void 0
42316
42320
  });
42317
42321
  const saved = react.exports.useRef();
42318
42322
  const offlineSchema = create$1().shape({
@@ -42340,15 +42344,19 @@ const Offline = react.exports.memo(({
42340
42344
  country_name,
42341
42345
  longitude: longitude2,
42342
42346
  latitude: latitude2,
42343
- country_code: country_code2
42347
+ country_code: country_code2,
42348
+ timezone: timezone22
42344
42349
  } = data2.data;
42350
+ const continent2 = timezone22.split("/")[0];
42345
42351
  setState({
42346
42352
  country: country_name,
42347
42353
  longitude: longitude2,
42348
42354
  latitude: latitude2,
42349
42355
  location: region,
42350
42356
  ipAddress: ip,
42351
- country_code: country_code2
42357
+ country_code: country_code2,
42358
+ continent: continent2,
42359
+ timezone: timezone22
42352
42360
  });
42353
42361
  }).catch((error) => toast.error("Error occured, try again", {
42354
42362
  autoClose: 2e3
@@ -42408,7 +42416,10 @@ const Offline = react.exports.memo(({
42408
42416
  latitude,
42409
42417
  longitude,
42410
42418
  location: location2,
42411
- ip_address: ipAddress
42419
+ ip_address: ipAddress,
42420
+ timezone: timezone2,
42421
+ continent,
42422
+ access_platform: "online"
42412
42423
  });
42413
42424
  }
42414
42425
  resetForm({});
@@ -42421,7 +42432,7 @@ const Offline = react.exports.memo(({
42421
42432
  autoClose: 2e3
42422
42433
  });
42423
42434
  }
42424
- }, [country, latitude, longitude, location2, ipAddress, calendar2, mobile]);
42435
+ }, [country, latitude, longitude, location2, ipAddress, calendar2, mobile, timezone2, continent]);
42425
42436
  const {
42426
42437
  handleSubmit,
42427
42438
  handleChange,
@@ -43151,7 +43162,8 @@ function WidgetInitForm({
43151
43162
  location: location2,
43152
43163
  source_url,
43153
43164
  continent,
43154
- timezone: timezone2
43165
+ timezone: timezone2,
43166
+ access_platform: "online"
43155
43167
  }, "post"), {
43156
43168
  onError: (err) => {
43157
43169
  toast.error("Error occured, try again", {
@@ -47947,7 +47959,7 @@ function useVideoCalling({ userId, conversation_id }) {
47947
47959
  useSocketListeners({
47948
47960
  listeners: {
47949
47961
  "Recording.start": () => {
47950
- alert("This call is being recorded");
47962
+ toast.info("This call is being recorded");
47951
47963
  setState({ recording: true });
47952
47964
  },
47953
47965
  "Recording.end": () => setState({ recording: false })
@@ -49749,6 +49761,7 @@ const he = ({ id: e2, className: t2, classNameArrow: n2, variant: o2 = "dark", a
49749
49761
  const G2 = { id: e2, anchorId: t2, className: i2, classNameArrow: l2, content: T2, isHtmlContent: Y2, place: O2, variant: A2, offset: L2, wrapper: H2, events: U2, positionStrategy: V2, delayShow: C2, delayHide: D2, float: W2, noArrow: b2, clickable: x2, style: S2, position: _2, isOpen: R2, setIsOpen: k2 };
49750
49762
  return d2 ? c.exports.jsx(he, { ...G2, children: d2 }) : c.exports.jsx(he, { ...G2 });
49751
49763
  };
49764
+ const ReactToastify = "";
49752
49765
  const reactTooltip = "";
49753
49766
  const days = {
49754
49767
  Monday: 1,
@@ -49818,49 +49831,51 @@ function UnwrapWidget({
49818
49831
  if (isLoadingCompany || isLoadingCompany === void 0) {
49819
49832
  return null;
49820
49833
  }
49821
- return /* @__PURE__ */ jsxs("div", {
49822
- className: `widget-cover mb-2 ${isWidgetLaunched ? "widget-cover-container" : ""}`,
49823
- children: [/* @__PURE__ */ jsx(WidgetFormDisplay, {
49824
- companyIsClosed,
49825
- company_id,
49826
- company,
49827
- companyUser,
49828
- setIsWidgetLaunched,
49829
- isWidgetLaunched
49830
- }), /* @__PURE__ */ jsxs("div", {
49831
- style: {
49832
- position: "relative"
49833
- },
49834
- children: [/* @__PURE__ */ jsx("div", {
49835
- id: "welcomeMessage",
49836
- className: `widget-launcher-container m-5 ${isWidgetLaunched ? "" : "animate"}`,
49837
- onClick: () => {
49838
- setShowTip(false);
49839
- setIsWidgetLaunched(!isWidgetLaunched);
49840
- },
49841
- style: {
49842
- backgroundColor: `${hex_code}`
49843
- },
49844
- children: isWidgetLaunched ? /* @__PURE__ */ jsx("img", {
49845
- alt: "closeIcon",
49846
- src: closeIcon,
49847
- width: 30
49848
- }) : /* @__PURE__ */ jsx("img", {
49849
- alt: "videoIcon",
49850
- src: videoIcon,
49851
- width: 30
49852
- })
49853
- }), /* @__PURE__ */ jsx(ve, {
49854
- place: "left",
49855
- isOpen: showTip,
49856
- anchorId: "welcomeMessage",
49857
- className: "p-3",
49834
+ return /* @__PURE__ */ jsxs(Fragment, {
49835
+ children: [/* @__PURE__ */ jsx(ToastContainer, {}), /* @__PURE__ */ jsxs("div", {
49836
+ className: `widget-cover mb-2 ${isWidgetLaunched ? "widget-cover-container" : ""}`,
49837
+ children: [/* @__PURE__ */ jsx(WidgetFormDisplay, {
49838
+ companyIsClosed,
49839
+ company_id,
49840
+ company,
49841
+ companyUser,
49842
+ setIsWidgetLaunched,
49843
+ isWidgetLaunched
49844
+ }), /* @__PURE__ */ jsxs("div", {
49858
49845
  style: {
49859
- backgroundColor: `${hex_code}`,
49860
- width: 240,
49861
- fontWeight: 600
49846
+ position: "relative"
49862
49847
  },
49863
- children: "For Diaspora Banking, click here to start Video Banking."
49848
+ children: [/* @__PURE__ */ jsx("div", {
49849
+ id: "welcomeMessage",
49850
+ className: `widget-launcher-container m-5 ${isWidgetLaunched ? "" : "animate"}`,
49851
+ onClick: () => {
49852
+ setShowTip(false);
49853
+ setIsWidgetLaunched(!isWidgetLaunched);
49854
+ },
49855
+ style: {
49856
+ backgroundColor: `${hex_code}`
49857
+ },
49858
+ children: isWidgetLaunched ? /* @__PURE__ */ jsx("img", {
49859
+ alt: "closeIcon",
49860
+ src: closeIcon,
49861
+ width: 30
49862
+ }) : /* @__PURE__ */ jsx("img", {
49863
+ alt: "videoIcon",
49864
+ src: videoIcon,
49865
+ width: 30
49866
+ })
49867
+ }), /* @__PURE__ */ jsx(ve, {
49868
+ place: "left",
49869
+ isOpen: showTip,
49870
+ anchorId: "welcomeMessage",
49871
+ className: "p-3",
49872
+ style: {
49873
+ backgroundColor: `${hex_code}`,
49874
+ width: 240,
49875
+ fontWeight: 600
49876
+ },
49877
+ children: "For Diaspora Banking, click here to start Video Banking."
49878
+ })]
49864
49879
  })]
49865
49880
  })]
49866
49881
  });