@knocklabs/react 0.7.25 → 0.7.26

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.26
4
+
5
+ ### Patch Changes
6
+
7
+ - 001690a: Rename `msTeamsBotId` prop of `<MsTeamsAuthButton>` component to `graphApiClientId`
8
+ - Updated dependencies [001690a]
9
+ - @knocklabs/react-core@0.7.4
10
+
3
11
  ## 0.7.25
4
12
 
5
13
  ### Patch Changes
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),u=require("@knocklabs/react-core"),f=require("../../../core/utils.js");;/* empty css */const l=require("../MsTeamsIcon/MsTeamsIcon.js");;/* empty css */const g=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},e=g(b),h=({msTeamsBotId:t,redirectUrl:T,onAuthenticationComplete:s})=>{const{t:n}=u.useTranslations(),i=u.useKnockClient(),{setConnectionStatus:o,connectionStatus:c,setActionLabel:a,actionLabel:d,errorLabel:p}=u.useKnockMsTeamsClient(),{buildMsTeamsAuthUrl:m,disconnectFromMsTeams:E}=u.useMsTeamsAuth(t,T);b.useEffect(()=>{const _=r=>{if(r.origin===i.host)try{r.data==="authComplete"&&o("connected"),r.data==="authFailed"&&o("error"),s==null||s(r.data)}catch{o("error")}};return window.addEventListener("message",_,!1),()=>{window.removeEventListener("message",_)}},[i.host,s,o]);const k=n("msTeamsDisconnect")||null,M=n("msTeamsReconnect")||null;return c==="connecting"||c==="disconnecting"?e.default.createElement("div",{className:"rtk-connect__button rtk-connect__button--loading"},e.default.createElement(l.MsTeamsIcon,{height:"16px",width:"16px"}),e.default.createElement("span",null,n(c==="connecting"?"msTeamsConnecting":"msTeamsDisconnecting"))):c==="error"?e.default.createElement("button",{onClick:()=>f.openPopupWindow(m()),className:"rtk-connect__button rtk-connect__button--error",onMouseEnter:()=>a(M),onMouseLeave:()=>a(null)},e.default.createElement(l.MsTeamsIcon,{height:"16px",width:"16px"}),e.default.createElement("span",{className:"rtk-connect__button__text--error"},d||p||n("msTeamsError"))):c==="disconnected"?e.default.createElement("button",{onClick:()=>f.openPopupWindow(m()),className:"rtk-connect__button rtk-connect__button--disconnected"},e.default.createElement(l.MsTeamsIcon,{height:"16px",width:"16px"}),e.default.createElement("span",null,n("msTeamsConnect"))):e.default.createElement("button",{onClick:E,className:"rtk-connect__button rtk-connect__button--connected",onMouseEnter:()=>a(k),onMouseLeave:()=>a(null)},e.default.createElement(l.MsTeamsIcon,{height:"16px",width:"16px"}),e.default.createElement("span",{className:"rtk-connect__button__text--connected"},d||n("msTeamsConnected")))};exports.MsTeamsAuthButton=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),u=require("@knocklabs/react-core"),b=require("../../../core/utils.js");;/* empty css */const l=require("../MsTeamsIcon/MsTeamsIcon.js");;/* empty css */const M=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},e=M(T),w=({redirectUrl:t,onAuthenticationComplete:s,...i})=>{const p="graphApiClientId"in i?i.graphApiClientId:i.msTeamsBotId,{t:n}=u.useTranslations(),d=u.useKnockClient(),{setConnectionStatus:o,connectionStatus:c,setActionLabel:a,actionLabel:m,errorLabel:g}=u.useKnockMsTeamsClient(),{buildMsTeamsAuthUrl:_,disconnectFromMsTeams:h}=u.useMsTeamsAuth(p,t);T.useEffect(()=>{const f=r=>{if(r.origin===d.host)try{r.data==="authComplete"&&o("connected"),r.data==="authFailed"&&o("error"),s==null||s(r.data)}catch{o("error")}};return window.addEventListener("message",f,!1),()=>{window.removeEventListener("message",f)}},[d.host,s,o]);const E=n("msTeamsDisconnect")||null,k=n("msTeamsReconnect")||null;return c==="connecting"||c==="disconnecting"?e.default.createElement("div",{className:"rtk-connect__button rtk-connect__button--loading"},e.default.createElement(l.MsTeamsIcon,{height:"16px",width:"16px"}),e.default.createElement("span",null,n(c==="connecting"?"msTeamsConnecting":"msTeamsDisconnecting"))):c==="error"?e.default.createElement("button",{onClick:()=>b.openPopupWindow(_()),className:"rtk-connect__button rtk-connect__button--error",onMouseEnter:()=>a(k),onMouseLeave:()=>a(null)},e.default.createElement(l.MsTeamsIcon,{height:"16px",width:"16px"}),e.default.createElement("span",{className:"rtk-connect__button__text--error"},m||g||n("msTeamsError"))):c==="disconnected"?e.default.createElement("button",{onClick:()=>b.openPopupWindow(_()),className:"rtk-connect__button rtk-connect__button--disconnected"},e.default.createElement(l.MsTeamsIcon,{height:"16px",width:"16px"}),e.default.createElement("span",null,n("msTeamsConnect"))):e.default.createElement("button",{onClick:h,className:"rtk-connect__button rtk-connect__button--connected",onMouseEnter:()=>a(E),onMouseLeave:()=>a(null)},e.default.createElement(l.MsTeamsIcon,{height:"16px",width:"16px"}),e.default.createElement("span",{className:"rtk-connect__button__text--connected"},m||n("msTeamsConnected")))};exports.MsTeamsAuthButton=w;
2
2
  //# sourceMappingURL=MsTeamsAuthButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MsTeamsAuthButton.js","sources":["../../../../../../src/modules/ms-teams/components/MsTeamsAuthButton/MsTeamsAuthButton.tsx"],"sourcesContent":["import {\n useKnockClient,\n useKnockMsTeamsClient,\n useMsTeamsAuth,\n useTranslations,\n} from \"@knocklabs/react-core\";\nimport { FunctionComponent, useEffect } from \"react\";\n\nimport { openPopupWindow } from \"../../../core/utils\";\nimport \"../../theme.css\";\nimport { MsTeamsIcon } from \"../MsTeamsIcon\";\n\nimport \"./styles.css\";\n\nexport interface MsTeamsAuthButtonProps {\n msTeamsBotId: string;\n redirectUrl?: string;\n onAuthenticationComplete?: (authenticationResp: string) => void;\n}\n\nexport const MsTeamsAuthButton: FunctionComponent<MsTeamsAuthButtonProps> = ({\n msTeamsBotId,\n redirectUrl,\n onAuthenticationComplete,\n}) => {\n const { t } = useTranslations();\n const knock = useKnockClient();\n\n const {\n setConnectionStatus,\n connectionStatus,\n setActionLabel,\n actionLabel,\n errorLabel,\n } = useKnockMsTeamsClient();\n\n const { buildMsTeamsAuthUrl, disconnectFromMsTeams } = useMsTeamsAuth(\n msTeamsBotId,\n redirectUrl,\n );\n\n useEffect(() => {\n const receiveMessage = (event: MessageEvent) => {\n if (event.origin !== knock.host) {\n return;\n }\n\n try {\n if (event.data === \"authComplete\") {\n setConnectionStatus(\"connected\");\n }\n\n if (event.data === \"authFailed\") {\n setConnectionStatus(\"error\");\n }\n\n onAuthenticationComplete?.(event.data);\n } catch (_error) {\n setConnectionStatus(\"error\");\n }\n };\n\n window.addEventListener(\"message\", receiveMessage, false);\n\n // Cleanup the event listener when the component unmounts\n return () => {\n window.removeEventListener(\"message\", receiveMessage);\n };\n }, [knock.host, onAuthenticationComplete, setConnectionStatus]);\n\n const disconnectLabel = t(\"msTeamsDisconnect\") || null;\n const reconnectLabel = t(\"msTeamsReconnect\") || null;\n\n // Loading states\n if (\n connectionStatus === \"connecting\" ||\n connectionStatus === \"disconnecting\"\n ) {\n return (\n <div className=\"rtk-connect__button rtk-connect__button--loading\">\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span>\n {connectionStatus === \"connecting\"\n ? t(\"msTeamsConnecting\")\n : t(\"msTeamsDisconnecting\")}\n </span>\n </div>\n );\n }\n\n // Error state\n if (connectionStatus === \"error\") {\n return (\n <button\n onClick={() => openPopupWindow(buildMsTeamsAuthUrl())}\n className=\"rtk-connect__button rtk-connect__button--error\"\n onMouseEnter={() => setActionLabel(reconnectLabel)}\n onMouseLeave={() => setActionLabel(null)}\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span className=\"rtk-connect__button__text--error\">\n {actionLabel || errorLabel || t(\"msTeamsError\")}\n </span>\n </button>\n );\n }\n\n // Disconnected state\n if (connectionStatus === \"disconnected\") {\n return (\n <button\n onClick={() => openPopupWindow(buildMsTeamsAuthUrl())}\n className=\"rtk-connect__button rtk-connect__button--disconnected\"\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span>{t(\"msTeamsConnect\")}</span>\n </button>\n );\n }\n\n // Connected state\n return (\n <button\n onClick={disconnectFromMsTeams}\n className=\"rtk-connect__button rtk-connect__button--connected\"\n onMouseEnter={() => setActionLabel(disconnectLabel)}\n onMouseLeave={() => setActionLabel(null)}\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span className=\"rtk-connect__button__text--connected\">\n {actionLabel || t(\"msTeamsConnected\")}\n </span>\n </button>\n );\n};\n"],"names":["MsTeamsAuthButton","msTeamsBotId","redirectUrl","onAuthenticationComplete","t","useTranslations","knock","useKnockClient","setConnectionStatus","connectionStatus","setActionLabel","actionLabel","errorLabel","useKnockMsTeamsClient","buildMsTeamsAuthUrl","disconnectFromMsTeams","useMsTeamsAuth","useEffect","receiveMessage","event","origin","host","data","addEventListener","removeEventListener","disconnectLabel","reconnectLabel","React","MsTeamsIcon","openPopupWindow"],"mappings":"+VAoBaA,EAA+DA,CAAC,CAC3EC,aAAAA,EACAC,YAAAA,EACAC,yBAAAA,CACF,IAAM,CACE,KAAA,CAAEC,EAAAA,GAAMC,kBAAgB,EACxBC,EAAQC,EAAAA,eAAe,EAEvB,CACJC,oBAAAA,EACAC,iBAAAA,EACAC,eAAAA,EACAC,YAAAA,EACAC,WAAAA,GACEC,wBAAsB,EAEpB,CAAEC,oBAAAA,EAAqBC,sBAAAA,CAAAA,EAA0BC,EACrDf,eAAAA,EACAC,CACF,EAEAe,EAAAA,UAAU,IAAM,CACRC,MAAAA,EAAkBC,GAAwB,CAC1CA,GAAAA,EAAMC,SAAWd,EAAMe,KAIvB,GAAA,CACEF,EAAMG,OAAS,gBACjBd,EAAoB,WAAW,EAG7BW,EAAMG,OAAS,cACjBd,EAAoB,OAAO,EAG7BL,GAAAA,MAAAA,EAA2BgB,EAAMG,WAClB,CACfd,EAAoB,OAAO,CAAA,CAE/B,EAEOe,cAAAA,iBAAiB,UAAWL,EAAgB,EAAK,EAGjD,IAAM,CACJ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AuthButton.js","sources":["../../../../../../src/modules/ms-teams/components/MsTeamsAuthButton/MsTeamsAuthButton.tsx"],"sourcesContent":["import {\n useKnockClient,\n useKnockMsTeamsClient,\n useMsTeamsAuth,\n useTranslations,\n} from \"@knocklabs/react-core\";\nimport { FunctionComponent, useEffect } from \"react\";\n\nimport { openPopupWindow } from \"../../../core/utils\";\nimport \"../../theme.css\";\nimport { MsTeamsIcon } from \"../MsTeamsIcon\";\n\nimport \"./styles.css\";\n\nexport type MsTeamsAuthButtonProps = {\n redirectUrl?: string;\n onAuthenticationComplete?: (authenticationResp: string) => void;\n} & (\n | {\n /**\n * The client ID of your Microsoft Graph API-enabled application registered with Microsoft Entra. This should\n * match the \"Graph API client ID\" setting of your Microsoft Teams channel in the Knock dashboard.\n */\n graphApiClientId: string;\n }\n | {\n /**\n * @deprecated Use `graphApiClientId` instead. This field will be removed in a future release.\n */\n msTeamsBotId: string;\n }\n);\n\nexport const MsTeamsAuthButton: FunctionComponent<MsTeamsAuthButtonProps> = ({\n redirectUrl,\n onAuthenticationComplete,\n ...props\n}) => {\n const graphApiClientId =\n \"graphApiClientId\" in props ? props.graphApiClientId : props.msTeamsBotId;\n\n const { t } = useTranslations();\n const knock = useKnockClient();\n\n const {\n setConnectionStatus,\n connectionStatus,\n setActionLabel,\n actionLabel,\n errorLabel,\n } = useKnockMsTeamsClient();\n\n const { buildMsTeamsAuthUrl, disconnectFromMsTeams } = useMsTeamsAuth(\n graphApiClientId,\n redirectUrl,\n );\n\n useEffect(() => {\n const receiveMessage = (event: MessageEvent) => {\n if (event.origin !== knock.host) {\n return;\n }\n\n try {\n if (event.data === \"authComplete\") {\n setConnectionStatus(\"connected\");\n }\n\n if (event.data === \"authFailed\") {\n setConnectionStatus(\"error\");\n }\n\n onAuthenticationComplete?.(event.data);\n } catch (_error) {\n setConnectionStatus(\"error\");\n }\n };\n\n window.addEventListener(\"message\", receiveMessage, false);\n\n // Cleanup the event listener when the component unmounts\n return () => {\n window.removeEventListener(\"message\", receiveMessage);\n };\n }, [knock.host, onAuthenticationComplete, setConnectionStatus]);\n\n const disconnectLabel = t(\"msTeamsDisconnect\") || null;\n const reconnectLabel = t(\"msTeamsReconnect\") || null;\n\n // Loading states\n if (\n connectionStatus === \"connecting\" ||\n connectionStatus === \"disconnecting\"\n ) {\n return (\n <div className=\"rtk-connect__button rtk-connect__button--loading\">\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span>\n {connectionStatus === \"connecting\"\n ? t(\"msTeamsConnecting\")\n : t(\"msTeamsDisconnecting\")}\n </span>\n </div>\n );\n }\n\n // Error state\n if (connectionStatus === \"error\") {\n return (\n <button\n onClick={() => openPopupWindow(buildMsTeamsAuthUrl())}\n className=\"rtk-connect__button rtk-connect__button--error\"\n onMouseEnter={() => setActionLabel(reconnectLabel)}\n onMouseLeave={() => setActionLabel(null)}\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span className=\"rtk-connect__button__text--error\">\n {actionLabel || errorLabel || t(\"msTeamsError\")}\n </span>\n </button>\n );\n }\n\n // Disconnected state\n if (connectionStatus === \"disconnected\") {\n return (\n <button\n onClick={() => openPopupWindow(buildMsTeamsAuthUrl())}\n className=\"rtk-connect__button rtk-connect__button--disconnected\"\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span>{t(\"msTeamsConnect\")}</span>\n </button>\n );\n }\n\n // Connected state\n return (\n <button\n onClick={disconnectFromMsTeams}\n className=\"rtk-connect__button rtk-connect__button--connected\"\n onMouseEnter={() => setActionLabel(disconnectLabel)}\n onMouseLeave={() => setActionLabel(null)}\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span className=\"rtk-connect__button__text--connected\">\n {actionLabel || t(\"msTeamsConnected\")}\n </span>\n </button>\n );\n};\n"],"names":["MsTeamsAuthButton","redirectUrl","onAuthenticationComplete","props","graphApiClientId","msTeamsBotId","t","useTranslations","knock","useKnockClient","setConnectionStatus","connectionStatus","setActionLabel","actionLabel","errorLabel","useKnockMsTeamsClient","buildMsTeamsAuthUrl","disconnectFromMsTeams","useMsTeamsAuth","useEffect","receiveMessage","event","origin","host","data","addEventListener","removeEventListener","disconnectLabel","reconnectLabel","React","MsTeamsIcon","openPopupWindow"],"mappings":"+VAiCaA,EAA+DA,CAAC,CAC3EC,YAAAA,EACAC,yBAAAA,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EACJ,qBAAsBD,EAAQA,EAAMC,iBAAmBD,EAAME,aAEzD,CAAEC,EAAAA,GAAMC,kBAAgB,EACxBC,EAAQC,EAAAA,eAAe,EAEvB,CACJC,oBAAAA,EACAC,iBAAAA,EACAC,eAAAA,EACAC,YAAAA,EACAC,WAAAA,GACEC,wBAAsB,EAEpB,CAAEC,oBAAAA,EAAqBC,sBAAAA,CAAAA,EAA0BC,EACrDd,eAAAA,EACAH,CACF,EAEAkB,EAAAA,UAAU,IAAM,CACRC,MAAAA,EAAkBC,GAAwB,CAC1CA,GAAAA,EAAMC,SAAWd,EAAMe,KAIvB,GAAA,CACEF,EAAMG,OAAS,gBACjBd,EAAoB,WAAW,EAG7BW,EAAMG,OAAS,cACjBd,EAAoB,OAAO,EAG7BR,GAAAA,MAAAA,EAA2BmB,EAAMG,WAClB,CACfd,EAAoB,OAAO,CAAA,CAE/B,EAEOe,cAAAA,iBAAiB,UAAWL,EAAgB,EAAK,EAGjD,IAAM,CACJM,OAAAA,oBAAoB,UAAWN,CAAc,CACtD,GACC,CAACZ,EAAMe,KAAMrB,EAA0BQ,CAAmB,CAAC,EAExDiB,MAAAA,EAAkBrB,EAAE,mBAAmB,GAAK,KAC5CsB,EAAiBtB,EAAE,kBAAkB,GAAK,KAI9CK,OAAAA,IAAqB,cACrBA,IAAqB,gBAGnBkB,EAAA,QAAA,cAAC,OAAI,UAAU,kDAAA,0BACZC,EAAY,YAAA,CAAA,OAAO,OAAO,MAAM,MAAM,CAAA,EACtCD,EAAAA,QAAA,cAAA,OAAA,KAEKvB,EADHK,IAAqB,aAChB,oBACA,sBADmB,CAE3B,CACF,EAKAA,IAAqB,gCAEpB,SACC,CAAA,QAAS,IAAMoB,EAAAA,gBAAgBf,GAAqB,EACpD,UAAU,iDACV,aAAc,IAAMJ,EAAegB,CAAc,EACjD,aAAc,IAAMhB,EAAe,IAAI,CAAA,0BAEtCkB,EAAAA,YAAY,CAAA,OAAO,OAAO,MAAM,OAAM,EACvCD,UAAA,cAAC,OAAK,CAAA,UAAU,oCACbhB,GAAeC,GAAcR,EAAE,cAAc,CAChD,CACF,EAKAK,IAAqB,eAErBkB,EAAA,QAAA,cAAC,UACC,QAAS,IAAME,EAAAA,gBAAgBf,EAAoB,CAAC,EACpD,UAAU,uDAEV,EAAAa,EAAA,QAAA,cAACC,eAAY,OAAO,OAAO,MAAM,MAAM,CAAA,0BACtC,OAAMxB,KAAAA,EAAE,gBAAgB,CAAE,CAC7B,EAMDuB,EAAAA,QAAA,cAAA,SAAA,CACC,QAASZ,EACT,UAAU,qDACV,aAAc,IAAML,EAAee,CAAe,EAClD,aAAc,IAAMf,EAAe,IAAI,GAEvCiB,EAAAA,QAAA,cAACC,EAAAA,YAAY,CAAA,OAAO,OAAO,MAAM,MAAM,CAAA,EACvCD,EAAA,QAAA,cAAC,OAAK,CAAA,UAAU,sCACbhB,EAAAA,GAAeP,EAAE,kBAAkB,CACtC,CACF,CAEJ"}
@@ -1,28 +1,28 @@
1
- import e, { useEffect as f } from "react";
2
- import { useTranslations as g, useKnockClient as T, useKnockMsTeamsClient as x, useMsTeamsAuth as M } from "@knocklabs/react-core";
3
- import { openPopupWindow as d } from "../../../core/utils.mjs";
1
+ import e, { useEffect as T } from "react";
2
+ import { useTranslations as f, useKnockClient as x, useKnockMsTeamsClient as M, useMsTeamsAuth as w } from "@knocklabs/react-core";
3
+ import { openPopupWindow as _ } from "../../../core/utils.mjs";
4
4
  /* empty css */
5
5
  import { MsTeamsIcon as a } from "../MsTeamsIcon/MsTeamsIcon.mjs";
6
6
  /* empty css */
7
- const K = ({
8
- msTeamsBotId: _,
9
- redirectUrl: b,
10
- onAuthenticationComplete: c
7
+ const D = ({
8
+ redirectUrl: p,
9
+ onAuthenticationComplete: c,
10
+ ...i
11
11
  }) => {
12
- const {
12
+ const b = "graphApiClientId" in i ? i.graphApiClientId : i.msTeamsBotId, {
13
13
  t
14
- } = g(), m = T(), {
14
+ } = f(), m = x(), {
15
15
  setConnectionStatus: o,
16
16
  connectionStatus: n,
17
17
  setActionLabel: s,
18
- actionLabel: i,
19
- errorLabel: p
20
- } = x(), {
21
- buildMsTeamsAuthUrl: l,
18
+ actionLabel: l,
19
+ errorLabel: h
20
+ } = M(), {
21
+ buildMsTeamsAuthUrl: u,
22
22
  disconnectFromMsTeams: E
23
- } = M(_, b);
24
- f(() => {
25
- const u = (r) => {
23
+ } = w(b, p);
24
+ T(() => {
25
+ const d = (r) => {
26
26
  if (r.origin === m.host)
27
27
  try {
28
28
  r.data === "authComplete" && o("connected"), r.data === "authFailed" && o("error"), c == null || c(r.data);
@@ -30,14 +30,14 @@ const K = ({
30
30
  o("error");
31
31
  }
32
32
  };
33
- return window.addEventListener("message", u, !1), () => {
34
- window.removeEventListener("message", u);
33
+ return window.addEventListener("message", d, !1), () => {
34
+ window.removeEventListener("message", d);
35
35
  };
36
36
  }, [m.host, c, o]);
37
- const k = t("msTeamsDisconnect") || null, h = t("msTeamsReconnect") || null;
38
- return n === "connecting" || n === "disconnecting" ? /* @__PURE__ */ e.createElement("div", { className: "rtk-connect__button rtk-connect__button--loading" }, /* @__PURE__ */ e.createElement(a, { height: "16px", width: "16px" }), /* @__PURE__ */ e.createElement("span", null, t(n === "connecting" ? "msTeamsConnecting" : "msTeamsDisconnecting"))) : n === "error" ? /* @__PURE__ */ e.createElement("button", { onClick: () => d(l()), className: "rtk-connect__button rtk-connect__button--error", onMouseEnter: () => s(h), onMouseLeave: () => s(null) }, /* @__PURE__ */ e.createElement(a, { height: "16px", width: "16px" }), /* @__PURE__ */ e.createElement("span", { className: "rtk-connect__button__text--error" }, i || p || t("msTeamsError"))) : n === "disconnected" ? /* @__PURE__ */ e.createElement("button", { onClick: () => d(l()), className: "rtk-connect__button rtk-connect__button--disconnected" }, /* @__PURE__ */ e.createElement(a, { height: "16px", width: "16px" }), /* @__PURE__ */ e.createElement("span", null, t("msTeamsConnect"))) : /* @__PURE__ */ e.createElement("button", { onClick: E, className: "rtk-connect__button rtk-connect__button--connected", onMouseEnter: () => s(k), onMouseLeave: () => s(null) }, /* @__PURE__ */ e.createElement(a, { height: "16px", width: "16px" }), /* @__PURE__ */ e.createElement("span", { className: "rtk-connect__button__text--connected" }, i || t("msTeamsConnected")));
37
+ const g = t("msTeamsDisconnect") || null, k = t("msTeamsReconnect") || null;
38
+ return n === "connecting" || n === "disconnecting" ? /* @__PURE__ */ e.createElement("div", { className: "rtk-connect__button rtk-connect__button--loading" }, /* @__PURE__ */ e.createElement(a, { height: "16px", width: "16px" }), /* @__PURE__ */ e.createElement("span", null, t(n === "connecting" ? "msTeamsConnecting" : "msTeamsDisconnecting"))) : n === "error" ? /* @__PURE__ */ e.createElement("button", { onClick: () => _(u()), className: "rtk-connect__button rtk-connect__button--error", onMouseEnter: () => s(k), onMouseLeave: () => s(null) }, /* @__PURE__ */ e.createElement(a, { height: "16px", width: "16px" }), /* @__PURE__ */ e.createElement("span", { className: "rtk-connect__button__text--error" }, l || h || t("msTeamsError"))) : n === "disconnected" ? /* @__PURE__ */ e.createElement("button", { onClick: () => _(u()), className: "rtk-connect__button rtk-connect__button--disconnected" }, /* @__PURE__ */ e.createElement(a, { height: "16px", width: "16px" }), /* @__PURE__ */ e.createElement("span", null, t("msTeamsConnect"))) : /* @__PURE__ */ e.createElement("button", { onClick: E, className: "rtk-connect__button rtk-connect__button--connected", onMouseEnter: () => s(g), onMouseLeave: () => s(null) }, /* @__PURE__ */ e.createElement(a, { height: "16px", width: "16px" }), /* @__PURE__ */ e.createElement("span", { className: "rtk-connect__button__text--connected" }, l || t("msTeamsConnected")));
39
39
  };
40
40
  export {
41
- K as MsTeamsAuthButton
41
+ D as MsTeamsAuthButton
42
42
  };
43
43
  //# sourceMappingURL=MsTeamsAuthButton.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MsTeamsAuthButton.mjs","sources":["../../../../../../src/modules/ms-teams/components/MsTeamsAuthButton/MsTeamsAuthButton.tsx"],"sourcesContent":["import {\n useKnockClient,\n useKnockMsTeamsClient,\n useMsTeamsAuth,\n useTranslations,\n} from \"@knocklabs/react-core\";\nimport { FunctionComponent, useEffect } from \"react\";\n\nimport { openPopupWindow } from \"../../../core/utils\";\nimport \"../../theme.css\";\nimport { MsTeamsIcon } from \"../MsTeamsIcon\";\n\nimport \"./styles.css\";\n\nexport interface MsTeamsAuthButtonProps {\n msTeamsBotId: string;\n redirectUrl?: string;\n onAuthenticationComplete?: (authenticationResp: string) => void;\n}\n\nexport const MsTeamsAuthButton: FunctionComponent<MsTeamsAuthButtonProps> = ({\n msTeamsBotId,\n redirectUrl,\n onAuthenticationComplete,\n}) => {\n const { t } = useTranslations();\n const knock = useKnockClient();\n\n const {\n setConnectionStatus,\n connectionStatus,\n setActionLabel,\n actionLabel,\n errorLabel,\n } = useKnockMsTeamsClient();\n\n const { buildMsTeamsAuthUrl, disconnectFromMsTeams } = useMsTeamsAuth(\n msTeamsBotId,\n redirectUrl,\n );\n\n useEffect(() => {\n const receiveMessage = (event: MessageEvent) => {\n if (event.origin !== knock.host) {\n return;\n }\n\n try {\n if (event.data === \"authComplete\") {\n setConnectionStatus(\"connected\");\n }\n\n if (event.data === \"authFailed\") {\n setConnectionStatus(\"error\");\n }\n\n onAuthenticationComplete?.(event.data);\n } catch (_error) {\n setConnectionStatus(\"error\");\n }\n };\n\n window.addEventListener(\"message\", receiveMessage, false);\n\n // Cleanup the event listener when the component unmounts\n return () => {\n window.removeEventListener(\"message\", receiveMessage);\n };\n }, [knock.host, onAuthenticationComplete, setConnectionStatus]);\n\n const disconnectLabel = t(\"msTeamsDisconnect\") || null;\n const reconnectLabel = t(\"msTeamsReconnect\") || null;\n\n // Loading states\n if (\n connectionStatus === \"connecting\" ||\n connectionStatus === \"disconnecting\"\n ) {\n return (\n <div className=\"rtk-connect__button rtk-connect__button--loading\">\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span>\n {connectionStatus === \"connecting\"\n ? t(\"msTeamsConnecting\")\n : t(\"msTeamsDisconnecting\")}\n </span>\n </div>\n );\n }\n\n // Error state\n if (connectionStatus === \"error\") {\n return (\n <button\n onClick={() => openPopupWindow(buildMsTeamsAuthUrl())}\n className=\"rtk-connect__button rtk-connect__button--error\"\n onMouseEnter={() => setActionLabel(reconnectLabel)}\n onMouseLeave={() => setActionLabel(null)}\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span className=\"rtk-connect__button__text--error\">\n {actionLabel || errorLabel || t(\"msTeamsError\")}\n </span>\n </button>\n );\n }\n\n // Disconnected state\n if (connectionStatus === \"disconnected\") {\n return (\n <button\n onClick={() => openPopupWindow(buildMsTeamsAuthUrl())}\n className=\"rtk-connect__button rtk-connect__button--disconnected\"\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span>{t(\"msTeamsConnect\")}</span>\n </button>\n );\n }\n\n // Connected state\n return (\n <button\n onClick={disconnectFromMsTeams}\n className=\"rtk-connect__button rtk-connect__button--connected\"\n onMouseEnter={() => setActionLabel(disconnectLabel)}\n onMouseLeave={() => setActionLabel(null)}\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span className=\"rtk-connect__button__text--connected\">\n {actionLabel || t(\"msTeamsConnected\")}\n </span>\n </button>\n );\n};\n"],"names":["MsTeamsAuthButton","msTeamsBotId","redirectUrl","onAuthenticationComplete","t","useTranslations","knock","useKnockClient","setConnectionStatus","connectionStatus","setActionLabel","actionLabel","errorLabel","useKnockMsTeamsClient","buildMsTeamsAuthUrl","disconnectFromMsTeams","useMsTeamsAuth","useEffect","receiveMessage","event","origin","host","data","addEventListener","removeEventListener","disconnectLabel","reconnectLabel","React","MsTeams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EAAA,SAAS,MAAMoB,EAAgBf,GAAqB,GACpD,WAAU,kDACV,cAAc,MAAMJ,EAAegB,CAAc,GACjD,cAAc,MAAMhB,EAAe,IAAI,EAAA,mCAEtCkB,GAAY,EAAA,QAAO,QAAO,OAAM,QAAM,GACvCD,gBAAAA,EAAA,cAAC,QAAK,EAAA,WAAU,sCACbhB,KAAeC,KAAcR,EAAE,cAAc,CAChD,CACF,IAKAK,MAAqB,iBAErBkB,gBAAAA,EAAA,cAAC,YACC,SAAS,MAAME,EAAgBf,EAAoB,CAAC,GACpD,WAAU,wDAEV,GAAAa,gBAAAA,EAAA,cAACC,KAAY,QAAO,QAAO,OAAM,OAAM,CAAA,mCACtC,QAAMxB,MAAAA,EAAE,gBAAgB,CAAE,CAC7B,IAMDuB,gBAAAA,EAAA,cAAA,UAAA,EACC,SAASZ,GACT,WAAU,sDACV,cAAc,MAAML,EAAee,CAAe,GAClD,cAAc,MAAMf,EAAe,IAAI,KAEvCiB,gBAAAA,EAAA,cAACC,GAAY,EAAA,QAAO,QAAO,OAAM,OAAM,CAAA,GACvCD,gBAAAA,EAAA,cAAC,QAAK,EAAA,WAAU,uCACbhB,GAAAA,KAAeP,EAAE,kBAAkB,CACtC,CACF;AAEJ;"}
1
+ {"version":3,"file":"MsTeamsAuthButton.mjs","sources":["../../../../../../src/modules/ms-teams/components/MsTeamsAuthButton/MsTeamsAuthButton.tsx"],"sourcesContent":["import {\n useKnockClient,\n useKnockMsTeamsClient,\n useMsTeamsAuth,\n useTranslations,\n} from \"@knocklabs/react-core\";\nimport { FunctionComponent, useEffect } from \"react\";\n\nimport { openPopupWindow } from \"../../../core/utils\";\nimport \"../../theme.css\";\nimport { MsTeamsIcon } from \"../MsTeamsIcon\";\n\nimport \"./styles.css\";\n\nexport type MsTeamsAuthButtonProps = {\n redirectUrl?: string;\n onAuthenticationComplete?: (authenticationResp: string) => void;\n} & (\n | {\n /**\n * The client ID of your Microsoft Graph API-enabled application registered with Microsoft Entra. This should\n * match the \"Graph API client ID\" setting of your Microsoft Teams channel in the Knock dashboard.\n */\n graphApiClientId: string;\n }\n | {\n /**\n * @deprecated Use `graphApiClientId` instead. This field will be removed in a future release.\n */\n msTeamsBotId: string;\n }\n);\n\nexport const MsTeamsAuthButton: FunctionComponent<MsTeamsAuthButtonProps> = ({\n redirectUrl,\n onAuthenticationComplete,\n ...props\n}) => {\n const graphApiClientId =\n \"graphApiClientId\" in props ? props.graphApiClientId : props.msTeamsBotId;\n\n const { t } = useTranslations();\n const knock = useKnockClient();\n\n const {\n setConnectionStatus,\n connectionStatus,\n setActionLabel,\n actionLabel,\n errorLabel,\n } = useKnockMsTeamsClient();\n\n const { buildMsTeamsAuthUrl, disconnectFromMsTeams } = useMsTeamsAuth(\n graphApiClientId,\n redirectUrl,\n );\n\n useEffect(() => {\n const receiveMessage = (event: MessageEvent) => {\n if (event.origin !== knock.host) {\n return;\n }\n\n try {\n if (event.data === \"authComplete\") {\n setConnectionStatus(\"connected\");\n }\n\n if (event.data === \"authFailed\") {\n setConnectionStatus(\"error\");\n }\n\n onAuthenticationComplete?.(event.data);\n } catch (_error) {\n setConnectionStatus(\"error\");\n }\n };\n\n window.addEventListener(\"message\", receiveMessage, false);\n\n // Cleanup the event listener when the component unmounts\n return () => {\n window.removeEventListener(\"message\", receiveMessage);\n };\n }, [knock.host, onAuthenticationComplete, setConnectionStatus]);\n\n const disconnectLabel = t(\"msTeamsDisconnect\") || null;\n const reconnectLabel = t(\"msTeamsReconnect\") || null;\n\n // Loading states\n if (\n connectionStatus === \"connecting\" ||\n connectionStatus === \"disconnecting\"\n ) {\n return (\n <div className=\"rtk-connect__button rtk-connect__button--loading\">\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span>\n {connectionStatus === \"connecting\"\n ? t(\"msTeamsConnecting\")\n : t(\"msTeamsDisconnecting\")}\n </span>\n </div>\n );\n }\n\n // Error state\n if (connectionStatus === \"error\") {\n return (\n <button\n onClick={() => openPopupWindow(buildMsTeamsAuthUrl())}\n className=\"rtk-connect__button rtk-connect__button--error\"\n onMouseEnter={() => setActionLabel(reconnectLabel)}\n onMouseLeave={() => setActionLabel(null)}\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span className=\"rtk-connect__button__text--error\">\n {actionLabel || errorLabel || t(\"msTeamsError\")}\n </span>\n </button>\n );\n }\n\n // Disconnected state\n if (connectionStatus === \"disconnected\") {\n return (\n <button\n onClick={() => openPopupWindow(buildMsTeamsAuthUrl())}\n className=\"rtk-connect__button rtk-connect__button--disconnected\"\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span>{t(\"msTeamsConnect\")}</span>\n </button>\n );\n }\n\n // Connected state\n return (\n <button\n onClick={disconnectFromMsTeams}\n className=\"rtk-connect__button rtk-connect__button--connected\"\n onMouseEnter={() => setActionLabel(disconnectLabel)}\n onMouseLeave={() => setActionLabel(null)}\n >\n <MsTeamsIcon height=\"16px\" width=\"16px\" />\n <span className=\"rtk-connect__button__text--connected\">\n {actionLabel || t(\"msTeamsConnected\")}\n </span>\n </button>\n );\n};\n"],"names":["MsTeamsAuthButton","redirectUrl","onAuthenticationComplete","props","graphApiClientId","msTeamsBotId","t","useTranslations","knock","useKnockClient","setConnectionStatus","connectionStatus","setActionLabel","actionLabel","errorLabel","useKnockMsTeamsClient","buildMsTeamsAuthUrl","disconnectFromMsTeams","useMsTeamsAuth","useEffect","receiveMessage","event","origin","host","data","addEventListener","removeEventListener","disconnectLabel","reconnectLabel","React","MsTeamsIcon","openPopupWindow"],"mappings":";;;;;;AAiCO,MAAMA,IAA+DA,CAAC;AAAA,EAC3EC,aAAAA;AAAAA,EACAC,0BAAAA;AAAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IACJ,sBAAsBD,IAAQA,EAAMC,mBAAmBD,EAAME,cAEzD;AAAA,IAAEC;AAAAA,MAAMC,EAAgB,GACxBC,IAAQC,EAAe,GAEvB;AAAA,IACJC,qBAAAA;AAAAA,IACAC,kBAAAA;AAA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AChD,CACF,IAKAK,MAAqB,iBAErBkB,gBAAAA,EAAA,cAAC,YACC,SAAS,MAAME,EAAgBf,EAAoB,CAAC,GACpD,WAAU,wDAEV,GAAAa,gBAAAA,EAAA,cAACC,KAAY,QAAO,QAAO,OAAM,OAAM,CAAA,mCACtC,QAAMxB,MAAAA,EAAE,gBAAgB,CAAE,CAC7B,IAMDuB,gBAAAA,EAAA,cAAA,UAAA,EACC,SAASZ,GACT,WAAU,sDACV,cAAc,MAAML,EAAee,CAAe,GAClD,cAAc,MAAMf,EAAe,IAAI,KAEvCiB,gBAAAA,EAAA,cAACC,GAAY,EAAA,QAAO,QAAO,OAAM,OAAM,CAAA,GACvCD,gBAAAA,EAAA,cAAC,QAAK,EAAA,WAAU,uCACbhB,GAAAA,KAAeP,EAAE,kBAAkB,CACtC,CACF;AAEJ;"}
@@ -1,8 +1,18 @@
1
1
  import { FunctionComponent } from 'react';
2
- export interface MsTeamsAuthButtonProps {
3
- msTeamsBotId: string;
2
+ export type MsTeamsAuthButtonProps = {
4
3
  redirectUrl?: string;
5
4
  onAuthenticationComplete?: (authenticationResp: string) => void;
6
- }
5
+ } & ({
6
+ /**
7
+ * The client ID of your Microsoft Graph API-enabled application registered with Microsoft Entra. This should
8
+ * match the "Graph API client ID" setting of your Microsoft Teams channel in the Knock dashboard.
9
+ */
10
+ graphApiClientId: string;
11
+ } | {
12
+ /**
13
+ * @deprecated Use `graphApiClientId` instead. This field will be removed in a future release.
14
+ */
15
+ msTeamsBotId: string;
16
+ });
7
17
  export declare const MsTeamsAuthButton: FunctionComponent<MsTeamsAuthButtonProps>;
8
18
  //# sourceMappingURL=MsTeamsAuthButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MsTeamsAuthButton.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/ms-teams/components/MsTeamsAuthButton/MsTeamsAuthButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAGrD,OAAO,iBAAiB,CAAC;AAGzB,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB,CAAC,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,CAkHvE,CAAC"}
1
+ {"version":3,"file":"MsTeamsAuthButton.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/ms-teams/components/MsTeamsAuthButton/MsTeamsAuthButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAGrD,OAAO,iBAAiB,CAAC;AAGzB,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB,CAAC,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAC;CACjE,GAAG,CACA;IACE;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B,GACD;IACE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CACJ,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,CAqHvE,CAAC"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@knocklabs/react",
3
3
  "description": "A set of React components to build notification experiences powered by Knock",
4
4
  "author": "@knocklabs",
5
- "version": "0.7.25",
5
+ "version": "0.7.26",
6
6
  "license": "MIT",
7
7
  "main": "dist/cjs/index.js",
8
8
  "module": "dist/esm/index.mjs",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@knocklabs/client": "^0.15.1",
54
- "@knocklabs/react-core": "^0.7.3",
54
+ "@knocklabs/react-core": "^0.7.4",
55
55
  "@popperjs/core": "^2.11.8",
56
56
  "@radix-ui/react-dialog": "^1.1.14",
57
57
  "@telegraph/combobox": "^0.1.1",