@chatsystem/client 1.1.37 → 1.1.38

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.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ReactPortal } from 'react';
2
2
 
3
- export declare function App({ cssHref, ...contentProps }: AppProps): ReactPortal | null;
3
+ export declare function App({ cssHref, appToken, agentId, displayMode, ...contentProps }: AppProps): ReactPortal | null;
4
4
 
5
5
  declare type AppContentProps = {
6
6
  appToken: string;
package/dist/index.mjs CHANGED
@@ -22906,7 +22906,7 @@ const f2 = ({
22906
22906
  agentId: n
22907
22907
  }) => {
22908
22908
  var r = navigator.language;
22909
- console.log("App boot"), console.log("Brower language", r);
22909
+ console.log("Brower language", r);
22910
22910
  const a = a2(r), { appCurrentLang: i, handleSetContextCurrentLang: s } = n2(
22911
22911
  sa,
22912
22912
  a
@@ -22938,21 +22938,21 @@ const f2 = ({
22938
22938
  !1,
22939
22939
  {
22940
22940
  fileName: "/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",
22941
- lineNumber: 74,
22941
+ lineNumber: 72,
22942
22942
  columnNumber: 15
22943
22943
  },
22944
22944
  void 0
22945
22945
  ) }, void 0, !1, {
22946
22946
  fileName: "/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",
22947
- lineNumber: 73,
22947
+ lineNumber: 71,
22948
22948
  columnNumber: 13
22949
22949
  }, void 0) }, void 0, !1, {
22950
22950
  fileName: "/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",
22951
- lineNumber: 72,
22951
+ lineNumber: 70,
22952
22952
  columnNumber: 11
22953
22953
  }, void 0) }, void 0, !1, {
22954
22954
  fileName: "/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",
22955
- lineNumber: 71,
22955
+ lineNumber: 69,
22956
22956
  columnNumber: 9
22957
22957
  }, void 0)
22958
22958
  },
@@ -22960,13 +22960,13 @@ const f2 = ({
22960
22960
  !1,
22961
22961
  {
22962
22962
  fileName: "/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",
22963
- lineNumber: 67,
22963
+ lineNumber: 65,
22964
22964
  columnNumber: 7
22965
22965
  },
22966
22966
  void 0
22967
22967
  ) }, void 0, !1, {
22968
22968
  fileName: "/home/yoann/dev/aibot-client/lib/src/components/Context/ContextWrapper/ContextWrapper.tsx",
22969
- lineNumber: 66,
22969
+ lineNumber: 64,
22970
22970
  columnNumber: 5
22971
22971
  }, void 0);
22972
22972
  };
@@ -22980,17 +22980,17 @@ function h2({
22980
22980
  "appToken not defined in ai-client. Please see the documentation at URL_ERROR_IN_DOC"
22981
22981
  );
22982
22982
  const r = e2(t);
22983
- return /* @__PURE__ */ M.jsxDEV("div", { className: "chatSystemWidget", id: "chatSystemWidget", children: /* @__PURE__ */ M.jsxDEV(f2, { appToken: e, agentId: n, children: /* @__PURE__ */ M.jsxDEV(JT, { displayMode: r, appToken: e }, void 0, !1, {
22983
+ return console.log(`App boot in ${r} mode.`), /* @__PURE__ */ M.jsxDEV("div", { className: "chatSystemWidget", id: "chatSystemWidget", children: /* @__PURE__ */ M.jsxDEV(f2, { appToken: e, agentId: n, children: /* @__PURE__ */ M.jsxDEV(JT, { displayMode: r, appToken: e }, void 0, !1, {
22984
22984
  fileName: "/home/yoann/dev/aibot-client/lib/src/modules/app/AppContent.tsx",
22985
- lineNumber: 47,
22985
+ lineNumber: 49,
22986
22986
  columnNumber: 9
22987
22987
  }, this) }, void 0, !1, {
22988
22988
  fileName: "/home/yoann/dev/aibot-client/lib/src/modules/app/AppContent.tsx",
22989
- lineNumber: 46,
22989
+ lineNumber: 48,
22990
22990
  columnNumber: 7
22991
22991
  }, this) }, void 0, !1, {
22992
22992
  fileName: "/home/yoann/dev/aibot-client/lib/src/modules/app/AppContent.tsx",
22993
- lineNumber: 45,
22993
+ lineNumber: 47,
22994
22994
  columnNumber: 5
22995
22995
  }, this);
22996
22996
  }
@@ -24494,43 +24494,64 @@ textarea::placeholder {
24494
24494
  }`, Ko = `${m2}
24495
24495
  ${p2}
24496
24496
  ${b2}`;
24497
- function C2({ cssHref: e, ...t }) {
24498
- const n = Ve(null), [r, a] = Oe(null);
24497
+ function C2({
24498
+ cssHref: e,
24499
+ appToken: t,
24500
+ agentId: n,
24501
+ displayMode: r,
24502
+ ...a
24503
+ }) {
24504
+ const i = Ve(null), [s, u] = Oe(null);
24499
24505
  return Zo(() => {
24500
24506
  if (typeof document > "u") return;
24501
- const i = document.createElement("div");
24502
- document.body.appendChild(i), n.current = i;
24503
- const s = i.attachShadow({ mode: "open", delegatesFocus: !0 });
24504
- let u = !1;
24507
+ const c = document.createElement("div");
24508
+ document.body.appendChild(c), i.current = c;
24509
+ const l = c.attachShadow({ mode: "open", delegatesFocus: !0 });
24510
+ let d = !1;
24505
24511
  try {
24506
24512
  if ("adoptedStyleSheets" in Document.prototype && !e) {
24507
- const l = new CSSStyleSheet();
24508
- l.replaceSync(Ko), s.adoptedStyleSheets = [
24509
- ...s.adoptedStyleSheets ?? [],
24510
- l
24511
- ], u = !0;
24513
+ const h = new CSSStyleSheet();
24514
+ h.replaceSync(Ko), l.adoptedStyleSheets = [
24515
+ ...l.adoptedStyleSheets ?? [],
24516
+ h
24517
+ ], d = !0;
24512
24518
  }
24513
24519
  } catch {
24514
24520
  }
24515
- if (!u)
24521
+ if (!d)
24516
24522
  if (e) {
24517
- const l = document.createElement("link");
24518
- l.rel = "stylesheet", l.href = e, s.appendChild(l);
24523
+ const h = document.createElement("link");
24524
+ h.rel = "stylesheet", h.href = e, l.appendChild(h);
24519
24525
  } else {
24520
- const l = document.createElement("style");
24521
- l.textContent = Ko, s.appendChild(l);
24526
+ const h = document.createElement("style");
24527
+ h.textContent = Ko, l.appendChild(h);
24522
24528
  }
24523
- const c = document.createElement("div");
24524
- return s.appendChild(c), a(c), () => {
24525
- i.remove(), n.current = null, a(null);
24529
+ const f = document.createElement("div");
24530
+ return l.appendChild(f), u(f), () => {
24531
+ c.remove(), i.current = null, u(null);
24526
24532
  };
24527
24533
  }, []), $e(() => {
24528
- n.current;
24529
- }, []), r ? kl(/* @__PURE__ */ M.jsxDEV(h2, { ...t }, void 0, !1, {
24530
- fileName: "/home/yoann/dev/aibot-client/lib/src/modules/app/App.tsx",
24531
- lineNumber: 77,
24532
- columnNumber: 23
24533
- }, this), r) : null;
24534
+ i.current;
24535
+ }, []), s ? kl(
24536
+ /* @__PURE__ */ M.jsxDEV(
24537
+ h2,
24538
+ {
24539
+ ...a,
24540
+ appToken: t,
24541
+ agentId: n,
24542
+ displayMode: r
24543
+ },
24544
+ void 0,
24545
+ !1,
24546
+ {
24547
+ fileName: "/home/yoann/dev/aibot-client/lib/src/modules/app/App.tsx",
24548
+ lineNumber: 84,
24549
+ columnNumber: 5
24550
+ },
24551
+ this
24552
+ ),
24553
+ s
24554
+ ) : null;
24534
24555
  }
24535
24556
  export {
24536
24557
  C2 as App