@myinterview/chatbot 0.1.80-experimental-dbdaf0e → 0.1.80-experimental-4e4a841

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { P as l } from "./main.react-BrHBHisx.js";
2
+ import { P as l } from "./main.react-Coa4thde.js";
3
3
  const s = ({ data: i, completed: o, customAction: c }) => {
4
4
  var e;
5
5
  return t("div", { className: "myinterview-chatbot-tnc-module", children: t(l, { size: "small", onClick: c, disabled: o, children: ((e = i.buttonText) == null ? void 0 : e.cta) ?? "Review Terms" }) });
@@ -7,4 +7,4 @@ const s = ({ data: i, completed: o, customAction: c }) => {
7
7
  export {
8
8
  s as default
9
9
  };
10
- //# sourceMappingURL=index-B3qvOjlP.js.map
10
+ //# sourceMappingURL=index-7c5Z-ekf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-B3qvOjlP.js","sources":["../src/components/modules/Tnc/index.tsx"],"sourcesContent":["import { Button } from '@myinterview/component-library';\nimport { MessageModuleProps } from '../../../interfaces/modules';\nimport { ModuleType } from '../../../interfaces/modules/generic';\n\nconst Tnc = ({ data, completed, customAction }: MessageModuleProps<ModuleType.TNC>) => (\n <div className=\"myinterview-chatbot-tnc-module\">\n <Button\n size=\"small\"\n onClick={customAction}\n disabled={completed}\n >\n {data.buttonText?.cta ?? 'Review Terms'}\n </Button>\n </div>\n);\n\nexport default Tnc;\n"],"names":["Tnc","data","completed","customAction","_jsx","Button","_a"],"mappings":";;AAIA,MAAMA,IAAM,CAAC,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,EAAA,MAAY;;AAC1CC,SAAAA,EAAA,OAAA,EAAK,WAAU,kCAAgC,UAC7CA,EAACC,GAAM,EACL,MAAK,SACL,SAASF,GACT,UAAUD,GAAS,YAElBI,IAAAL,EAAK,eAAL,gBAAAK,EAAiB,QAAO,eAAA,CAAc,GAChC;AAAA;"}
1
+ {"version":3,"file":"index-7c5Z-ekf.js","sources":["../src/components/modules/Tnc/index.tsx"],"sourcesContent":["import { Button } from '@myinterview/component-library';\nimport { MessageModuleProps } from '../../../interfaces/modules';\nimport { ModuleType } from '../../../interfaces/modules/generic';\n\nconst Tnc = ({ data, completed, customAction }: MessageModuleProps<ModuleType.TNC>) => (\n <div className=\"myinterview-chatbot-tnc-module\">\n <Button\n size=\"small\"\n onClick={customAction}\n disabled={completed}\n >\n {data.buttonText?.cta ?? 'Review Terms'}\n </Button>\n </div>\n);\n\nexport default Tnc;\n"],"names":["Tnc","data","completed","customAction","_jsx","Button","_a"],"mappings":";;AAIA,MAAMA,IAAM,CAAC,EAAE,MAAAC,GAAM,WAAAC,GAAW,cAAAC,EAAA,MAAY;;AAC1CC,SAAAA,EAAA,OAAA,EAAK,WAAU,kCAAgC,UAC7CA,EAACC,GAAM,EACL,MAAK,SACL,SAASF,GACT,UAAUD,GAAS,YAElBI,IAAAL,EAAK,eAAL,gBAAAK,EAAiB,QAAO,eAAA,CAAc,GAChC;AAAA;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
- import { c as n, d as _, J as v, P as g } from "./main.react-BrHBHisx.js";
2
+ import { c as n, d as _, J as v, P as g } from "./main.react-Coa4thde.js";
3
3
  import { useState as a } from "react";
4
4
  const S = ({ data: s, completed: r, onSubmitAnswer: d }) => {
5
5
  const [l, m] = a(r), [t, o] = a(), h = (e) => {
@@ -16,4 +16,4 @@ const S = ({ data: s, completed: r, onSubmitAnswer: d }) => {
16
16
  export {
17
17
  S as default
18
18
  };
19
- //# sourceMappingURL=index-Bi4zhAvw.js.map
19
+ //# sourceMappingURL=index-BPSJMihG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-Bi4zhAvw.js","sources":["../src/components/modules/SingleSelect/index.tsx"],"sourcesContent":["import { Button, Check, Text } from '@myinterview/component-library';\nimport { useState } from 'react';\nimport classNames from 'classnames';\nimport { MessageModuleProps } from '../../../interfaces/modules';\nimport { ModuleType } from '../../../interfaces/modules/generic';\n\nconst SingleSelect = ({ data, completed, onSubmitAnswer }: MessageModuleProps<ModuleType.SINGLE_SELECT>) => {\n const [isDisabled, setIsDisabled] = useState<boolean>(completed);\n const [selectedOption, setSelectedOption] = useState<typeof data['options'][number] | null>();\n\n const handleChange = (option: typeof data['options'][number]) => {\n if (isDisabled) return;\n setSelectedOption(option);\n };\n\n const handleSubmit = () => {\n if (!selectedOption) return;\n onSubmitAnswer(\n {\n ...data,\n options: data.options.map((option) => ({ ...option, selected: option.id === selectedOption.id })),\n selected_id: selectedOption.id,\n },\n selectedOption.title,\n );\n setIsDisabled(true);\n };\n\n return (\n <div className=\"myinterview-chatbot-single-select\">\n <div className={classNames('myinterview-chatbot-single-select__list', { 'myinterview-chatbot-single-select__list--disabled': isDisabled })}>\n {data.options.map((option) => (\n <div\n key={option.id}\n className=\"myinterview-chatbot-single-select__item\"\n onClick={() => handleChange(option)}\n role=\"presentation\"\n >\n <div className={classNames('myinterview-chatbot-single-select__checkmark', { 'myinterview-chatbot-single-select__checkmark--selected': option.id === selectedOption?.id })}>\n <Check />\n </div>\n <Text className=\"myinterview-chatbot-single-select__title\">{option.title}</Text>\n </div>\n ))}\n </div>\n\n <Button\n size=\"small\"\n onClick={handleSubmit}\n disabled={isDisabled || !selectedOption}\n >\n {data.buttonText || 'Submit'}\n </Button>\n </div>\n );\n};\n\nexport default SingleSelect;\n"],"names":["SingleSelect","data","completed","onSubmitAnswer","isDisabled","setIsDisabled","useState","selectedOption","setSelectedOption","handleChange","option","handleSubmit","_jsxs","_jsx","classNames","Check","Text","Button"],"mappings":";;;AAMA,MAAMA,IAAe,CAAC,EAAE,MAAAC,GAAM,WAAAC,GAAW,gBAAAC,QAAkE;AACzG,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAkBJ,CAAS,GACzD,CAACK,GAAgBC,CAAiB,IAAIF,EAAA,GAEtCG,IAAe,CAACC,MAA0C;AAC9D,IAAIN,KACJI,EAAkBE,CAAM;AAAA,EAC1B,GAEMC,IAAe,MAAK;AACxB,IAAKJ,MACLJ,EACE;AAAA,MACE,GAAGF;AAAA,MACH,SAASA,EAAK,QAAQ,IAAI,CAACS,OAAY,EAAE,GAAGA,GAAQ,UAAUA,EAAO,OAAOH,EAAe,KAAK;AAAA,MAChG,aAAaA,EAAe;AAAA,IAAA,GAE9BA,EAAe,KAAK,GAEtBF,EAAc,EAAI;AAAA,EACpB;AAEA,SACEO,EAAA,OAAA,EAAK,WAAU,qCAAmC,UAAA,CAChDC,EAAA,OAAA,EAAK,WAAWC,EAAW,2CAA2C,EAAE,qDAAqDV,EAAA,CAAY,GAAC,UACvIH,EAAK,QAAQ,IAAI,CAACS,MACjBE,EAAA,OAAA,EAEE,WAAU,2CACV,SAAS,MAAMH,EAAaC,CAAM,GAClC,MAAK,gBAAc,UAAA,CAEnBG,EAAA,OAAA,EAAK,WAAWC,EAAW,gDAAgD,EAAE,0DAA0DJ,EAAO,QAAOH,KAAA,gBAAAA,EAAgB,IAAA,CAAI,GAAC,UACxKM,EAACE,GAAK,EAAA,GAAG,GAEXF,EAACG,GAAI,EAAC,WAAU,4CAA0C,UAAEN,EAAO,MAAA,CAAK,CAAQ,EAAA,GAR3EA,EAAO,EAAE,CAUjB,EAAA,CAAC,GAGJG,EAACI,GAAM,EACL,MAAK,SACL,SAASN,GACT,UAAUP,KAAc,CAACG,GAAc,UAEtCN,EAAK,cAAc,UAAQ,CACrB,GAAA;AAGf;"}
1
+ {"version":3,"file":"index-BPSJMihG.js","sources":["../src/components/modules/SingleSelect/index.tsx"],"sourcesContent":["import { Button, Check, Text } from '@myinterview/component-library';\nimport { useState } from 'react';\nimport classNames from 'classnames';\nimport { MessageModuleProps } from '../../../interfaces/modules';\nimport { ModuleType } from '../../../interfaces/modules/generic';\n\nconst SingleSelect = ({ data, completed, onSubmitAnswer }: MessageModuleProps<ModuleType.SINGLE_SELECT>) => {\n const [isDisabled, setIsDisabled] = useState<boolean>(completed);\n const [selectedOption, setSelectedOption] = useState<typeof data['options'][number] | null>();\n\n const handleChange = (option: typeof data['options'][number]) => {\n if (isDisabled) return;\n setSelectedOption(option);\n };\n\n const handleSubmit = () => {\n if (!selectedOption) return;\n onSubmitAnswer(\n {\n ...data,\n options: data.options.map((option) => ({ ...option, selected: option.id === selectedOption.id })),\n selected_id: selectedOption.id,\n },\n selectedOption.title,\n );\n setIsDisabled(true);\n };\n\n return (\n <div className=\"myinterview-chatbot-single-select\">\n <div className={classNames('myinterview-chatbot-single-select__list', { 'myinterview-chatbot-single-select__list--disabled': isDisabled })}>\n {data.options.map((option) => (\n <div\n key={option.id}\n className=\"myinterview-chatbot-single-select__item\"\n onClick={() => handleChange(option)}\n role=\"presentation\"\n >\n <div className={classNames('myinterview-chatbot-single-select__checkmark', { 'myinterview-chatbot-single-select__checkmark--selected': option.id === selectedOption?.id })}>\n <Check />\n </div>\n <Text className=\"myinterview-chatbot-single-select__title\">{option.title}</Text>\n </div>\n ))}\n </div>\n\n <Button\n size=\"small\"\n onClick={handleSubmit}\n disabled={isDisabled || !selectedOption}\n >\n {data.buttonText || 'Submit'}\n </Button>\n </div>\n );\n};\n\nexport default SingleSelect;\n"],"names":["SingleSelect","data","completed","onSubmitAnswer","isDisabled","setIsDisabled","useState","selectedOption","setSelectedOption","handleChange","option","handleSubmit","_jsxs","_jsx","classNames","Check","Text","Button"],"mappings":";;;AAMA,MAAMA,IAAe,CAAC,EAAE,MAAAC,GAAM,WAAAC,GAAW,gBAAAC,QAAkE;AACzG,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAkBJ,CAAS,GACzD,CAACK,GAAgBC,CAAiB,IAAIF,EAAA,GAEtCG,IAAe,CAACC,MAA0C;AAC9D,IAAIN,KACJI,EAAkBE,CAAM;AAAA,EAC1B,GAEMC,IAAe,MAAK;AACxB,IAAKJ,MACLJ,EACE;AAAA,MACE,GAAGF;AAAA,MACH,SAASA,EAAK,QAAQ,IAAI,CAACS,OAAY,EAAE,GAAGA,GAAQ,UAAUA,EAAO,OAAOH,EAAe,KAAK;AAAA,MAChG,aAAaA,EAAe;AAAA,IAAA,GAE9BA,EAAe,KAAK,GAEtBF,EAAc,EAAI;AAAA,EACpB;AAEA,SACEO,EAAA,OAAA,EAAK,WAAU,qCAAmC,UAAA,CAChDC,EAAA,OAAA,EAAK,WAAWC,EAAW,2CAA2C,EAAE,qDAAqDV,EAAA,CAAY,GAAC,UACvIH,EAAK,QAAQ,IAAI,CAACS,MACjBE,EAAA,OAAA,EAEE,WAAU,2CACV,SAAS,MAAMH,EAAaC,CAAM,GAClC,MAAK,gBAAc,UAAA,CAEnBG,EAAA,OAAA,EAAK,WAAWC,EAAW,gDAAgD,EAAE,0DAA0DJ,EAAO,QAAOH,KAAA,gBAAAA,EAAgB,IAAA,CAAI,GAAC,UACxKM,EAACE,GAAK,EAAA,GAAG,GAEXF,EAACG,GAAI,EAAC,WAAU,4CAA0C,UAAEN,EAAO,MAAA,CAAK,CAAQ,EAAA,GAR3EA,EAAO,EAAE,CAUjB,EAAA,CAAC,GAGJG,EAACI,GAAM,EACL,MAAK,SACL,SAASN,GACT,UAAUP,KAAc,CAACG,GAAc,UAEtCN,EAAK,cAAc,UAAQ,CACrB,GAAA;AAGf;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { P as r } from "./main.react-BrHBHisx.js";
2
+ import { P as r } from "./main.react-Coa4thde.js";
3
3
  import { useState as h } from "react";
4
4
  const p = ({ data: i, completed: c, onSubmitAnswer: a }) => {
5
5
  const [d, m] = h(c), n = (e) => {
@@ -15,4 +15,4 @@ const p = ({ data: i, completed: c, onSubmitAnswer: a }) => {
15
15
  export {
16
16
  p as default
17
17
  };
18
- //# sourceMappingURL=index-wcX8ELvS.js.map
18
+ //# sourceMappingURL=index-BahvES_S.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-wcX8ELvS.js","sources":["../src/components/modules/YesNo/index.tsx"],"sourcesContent":["import { Button } from '@myinterview/component-library';\nimport { useState } from 'react';\nimport { MessageModuleProps } from '../../../interfaces/modules';\nimport { ModuleType } from '../../../interfaces/modules/generic';\n\nconst SingleSelect = ({ data, completed, onSubmitAnswer }: MessageModuleProps<ModuleType.YES_NO>) => { // TODO: Disable buttons after seleted / completed: true\n const [isDisabled, setIsDisabled] = useState<boolean>(completed);\n\n const handleClick = (selectedOption: typeof data.options[number]) => {\n const { id, title } = selectedOption;\n onSubmitAnswer({\n ...data,\n options: data.options.map((option) => ({ ...option, selected: option.id === id })),\n selected_id: id,\n }, title);\n setIsDisabled(true);\n };\n\n return (\n <div className=\"myinterview-chatbot-yes-no\">\n <div className=\"myinterview-chatbot-yes-no__list\">\n {data.options.map((option) => (\n <Button\n key={option.id}\n size=\"small\"\n className=\"myinterview-chatbot-yes-no__item\"\n onClick={() => handleClick(option)}\n value={option.id}\n disabled={isDisabled}\n >\n {option.title}\n </Button>\n ))}\n </div>\n </div>\n );\n};\n\nexport default SingleSelect;\n"],"names":["SingleSelect","data","completed","onSubmitAnswer","isDisabled","setIsDisabled","useState","handleClick","selectedOption","id","title","option","_jsx","Button"],"mappings":";;;AAKA,MAAMA,IAAe,CAAC,EAAE,MAAAC,GAAM,WAAAC,GAAW,gBAAAC,QAA2D;AAClG,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAkBJ,CAAS,GAEzDK,IAAc,CAACC,MAA+C;AAClE,UAAM,EAAE,IAAAC,GAAI,OAAAC,EAAA,IAAUF;AACtB,IAAAL,EAAe;AAAA,MACb,GAAGF;AAAA,MACH,SAASA,EAAK,QAAQ,IAAI,CAACU,OAAY,EAAE,GAAGA,GAAQ,UAAUA,EAAO,OAAOF,IAAK;AAAA,MACjF,aAAaA;AAAA,IAAA,GACZC,CAAK,GACRL,EAAc,EAAI;AAAA,EACpB;AAEA,SACEO,EAAA,OAAA,EAAK,WAAU,8BAA4B,UACzCA,EAAA,OAAA,EAAK,WAAU,oCAAkC,UAC9CX,EAAK,QAAQ,IAAI,CAACU,MACjBC,EAACC,GAAM,EAEL,MAAK,SACL,WAAU,oCACV,SAAS,MAAMN,EAAYI,CAAM,GACjC,OAAOA,EAAO,IACd,UAAUP,GAAU,UAEnBO,EAAO,MAAA,GAPHA,EAAO,EAAE,CASjB,EAAA,CAAC,GACE;AAGZ;"}
1
+ {"version":3,"file":"index-BahvES_S.js","sources":["../src/components/modules/YesNo/index.tsx"],"sourcesContent":["import { Button } from '@myinterview/component-library';\nimport { useState } from 'react';\nimport { MessageModuleProps } from '../../../interfaces/modules';\nimport { ModuleType } from '../../../interfaces/modules/generic';\n\nconst SingleSelect = ({ data, completed, onSubmitAnswer }: MessageModuleProps<ModuleType.YES_NO>) => { // TODO: Disable buttons after seleted / completed: true\n const [isDisabled, setIsDisabled] = useState<boolean>(completed);\n\n const handleClick = (selectedOption: typeof data.options[number]) => {\n const { id, title } = selectedOption;\n onSubmitAnswer({\n ...data,\n options: data.options.map((option) => ({ ...option, selected: option.id === id })),\n selected_id: id,\n }, title);\n setIsDisabled(true);\n };\n\n return (\n <div className=\"myinterview-chatbot-yes-no\">\n <div className=\"myinterview-chatbot-yes-no__list\">\n {data.options.map((option) => (\n <Button\n key={option.id}\n size=\"small\"\n className=\"myinterview-chatbot-yes-no__item\"\n onClick={() => handleClick(option)}\n value={option.id}\n disabled={isDisabled}\n >\n {option.title}\n </Button>\n ))}\n </div>\n </div>\n );\n};\n\nexport default SingleSelect;\n"],"names":["SingleSelect","data","completed","onSubmitAnswer","isDisabled","setIsDisabled","useState","handleClick","selectedOption","id","title","option","_jsx","Button"],"mappings":";;;AAKA,MAAMA,IAAe,CAAC,EAAE,MAAAC,GAAM,WAAAC,GAAW,gBAAAC,QAA2D;AAClG,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAkBJ,CAAS,GAEzDK,IAAc,CAACC,MAA+C;AAClE,UAAM,EAAE,IAAAC,GAAI,OAAAC,EAAA,IAAUF;AACtB,IAAAL,EAAe;AAAA,MACb,GAAGF;AAAA,MACH,SAASA,EAAK,QAAQ,IAAI,CAACU,OAAY,EAAE,GAAGA,GAAQ,UAAUA,EAAO,OAAOF,IAAK;AAAA,MACjF,aAAaA;AAAA,IAAA,GACZC,CAAK,GACRL,EAAc,EAAI;AAAA,EACpB;AAEA,SACEO,EAAA,OAAA,EAAK,WAAU,8BAA4B,UACzCA,EAAA,OAAA,EAAK,WAAU,oCAAkC,UAC9CX,EAAK,QAAQ,IAAI,CAACU,MACjBC,EAACC,GAAM,EAEL,MAAK,SACL,WAAU,oCACV,SAAS,MAAMN,EAAYI,CAAM,GACjC,OAAOA,EAAO,IACd,UAAUP,GAAU,UAEnBO,EAAO,MAAA,GAPHA,EAAO,EAAE,CASjB,EAAA,CAAC,GACE;AAGZ;"}
@@ -3,7 +3,7 @@ import * as Kv from "react";
3
3
  import $, { forwardRef as Yv, useState as Be, useRef as Ne, useEffect as Fe, useMemo as Fr, useImperativeHandle as Qv, useLayoutEffect as Np, createContext as Xv, useContext as md, useCallback as ar, useDebugValue as y1, createElement as Vw } from "react";
4
4
  import { createPortal as Jv, flushSync as Bw } from "react-dom";
5
5
  import { renderToString as Ww } from "react-dom/server";
6
- import { u as Ec, b as Hw, P as zw } from "./main.react-BrHBHisx.js";
6
+ import { u as Ec, b as Hw, P as zw } from "./main.react-Coa4thde.js";
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
9
9
 
@@ -40705,4 +40705,4 @@ const OU = ({ messageType: e }) => {
40705
40705
  export {
40706
40706
  kU as default
40707
40707
  };
40708
- //# sourceMappingURL=index-BBC5IpJ-.js.map
40708
+ //# sourceMappingURL=index-By_7G0yE.js.map