@myinterview/chatbot 0.1.81-experimental-afbb187 → 0.1.82-beta-0762d4c
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-BOozyEzr.js → index-B10LOTjr.js} +2 -2
- package/dist/{index-BOozyEzr.js.map → index-B10LOTjr.js.map} +1 -1
- package/dist/{index-C_D458N7.js → index-BD2W6RCp.js} +2 -2
- package/dist/{index-C_D458N7.js.map → index-BD2W6RCp.js.map} +1 -1
- package/dist/{index-2FDR5VzW.js → index-B_-G4jgy.js} +2 -2
- package/dist/{index-2FDR5VzW.js.map → index-B_-G4jgy.js.map} +1 -1
- package/dist/{index-dRsDwbgI.js → index-BzUKFIKY.js} +2 -2
- package/dist/{index-dRsDwbgI.js.map → index-BzUKFIKY.js.map} +1 -1
- package/dist/{index-B1K6Mkln.js → index-C7Sft0Xz.js} +2 -2
- package/dist/{index-B1K6Mkln.js.map → index-C7Sft0Xz.js.map} +1 -1
- package/dist/{index-BArft6ED.js → index-DGABM1LB.js} +2 -2
- package/dist/{index-BArft6ED.js.map → index-DGABM1LB.js.map} +1 -1
- package/dist/{index-CIsLXob8.js → index-DXV0IzpS.js} +2 -2
- package/dist/{index-CIsLXob8.js.map → index-DXV0IzpS.js.map} +1 -1
- package/dist/{index-CSt-qgjO.js → index-fuTujKuF.js} +2 -2
- package/dist/{index-CSt-qgjO.js.map → index-fuTujKuF.js.map} +1 -1
- package/dist/{index-BDmZ9zl3.js → index-vthXw1kz.js} +2 -2
- package/dist/{index-BDmZ9zl3.js.map → index-vthXw1kz.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{main.react-D8G5RcVc.js → main.react-WidsPlcm.js} +6 -6
- package/dist/{main.react-D8G5RcVc.js.map → main.react-WidsPlcm.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { P as l } from "./main.react-
|
|
2
|
+
import { P as l } from "./main.react-WidsPlcm.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-
|
|
10
|
+
//# sourceMappingURL=index-fuTujKuF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-fuTujKuF.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,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as b, jsx as e, Fragment as X } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as i, useState as S, useCallback as d, useEffect as j, useMemo as $ } from "react";
|
|
3
|
-
import { i as k, B as O, c as P, t as B, P as U, A as F } from "./main.react-
|
|
3
|
+
import { i as k, B as O, c as P, t as B, P as U, A as F } from "./main.react-WidsPlcm.js";
|
|
4
4
|
const H = 300, J = 0.25, L = 2, V = 30, G = ({ children: c, sliderHeight: o, currentIndex: a = 0, itemSize: p = 1 / 0, gap: m = 0, onIndexChanged: _ }) => {
|
|
5
5
|
const n = i(), h = i(null), u = i(a), [N, y] = S(0), w = i(null), r = i(0), s = i(0), x = i(0), g = i(0), v = Math.min(p, N) + m, R = d(() => {
|
|
6
6
|
n.current && (n.current.style.transform = `translate3d(${s.current}px, 0px, 0px)`);
|
|
@@ -75,4 +75,4 @@ const H = 300, J = 0.25, L = 2, V = 30, G = ({ children: c, sliderHeight: o, cur
|
|
|
75
75
|
export {
|
|
76
76
|
Y as default
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=index-
|
|
78
|
+
//# sourceMappingURL=index-vthXw1kz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-BDmZ9zl3.js","sources":["../src/components/ui/Slider/index.tsx","../src/components/ui/PageDotsIndicator/index.tsx","../src/components/modules/Jobs/index.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport BackButton from '../../common/BackButton';\nimport { isMobile } from '../../../utils/device.utils';\n\ninterface ISlider {\n children: JSX.Element[];\n sliderHeight: number;\n currentIndex: number;\n itemSize?: number;\n gap?: number;\n onIndexChanged: (index: number) => void;\n}\n\nconst TRANSITION_DURATION = 300; // ms\nconst EDGE_TRANFORM_RATIO = 0.25;\nconst PREDICTION_DISTANCE = 2;\nconst PREDICTION_TIMEOUT = 30; // ms\n\nconst Slider = ({ children, sliderHeight, currentIndex = 0, itemSize = Infinity, gap = 0, onIndexChanged }: ISlider) => {\n const listRef = useRef<HTMLDivElement>();\n const resizeObserver = useRef<ResizeObserver | null>(null);\n const indexRef = useRef<number>(currentIndex);\n const [viewSize, setViewSize] = useState<number>(0);\n const lastTouchX = useRef<number | null>(null);\n const lastTouchTime = useRef<number>(0);\n const transformX = useRef<number>(0);\n const maxOffsetX = useRef<number>(0);\n const predictionValue = useRef<-1 | 0 | 1>(0);\n const itemWidth = Math.min(itemSize, viewSize) + gap;\n\n const updatePosition = useCallback(() => {\n if (!listRef.current) return;\n listRef.current.style.transform = `translate3d(${transformX.current}px, 0px, 0px)`;\n }, []);\n\n const adjustTransform = useCallback(() => {\n if (!listRef.current) return;\n const idx = Math.min(Math.max(Math.round(-transformX.current / (itemWidth)) + predictionValue.current, 0), children.length - 1);\n indexRef.current = Math.min(Math.max(idx, indexRef.current - 1), indexRef.current + 1);\n transformX.current = -indexRef.current * (itemWidth);\n listRef.current.style.transitionDuration = `${TRANSITION_DURATION}ms`;\n onIndexChanged(indexRef.current);\n updatePosition();\n }, [itemWidth]);\n\n useEffect(() => {\n maxOffsetX.current = itemWidth * (children.length - 1) - gap;\n adjustTransform();\n }, [itemWidth]);\n\n const handleListRef = useCallback((node: HTMLDivElement) => {\n listRef.current = node;\n if (!listRef.current) {\n resizeObserver.current?.disconnect();\n return;\n }\n resizeObserver.current = new ResizeObserver(([entry]) => {\n setViewSize(entry.contentRect.width);\n });\n resizeObserver.current.observe(listRef.current);\n }, []);\n\n const handleTouchStart = useCallback((e: React.TouchEvent<HTMLDivElement>) => {\n e.currentTarget.style.transitionDuration = '0ms';\n lastTouchX.current = e.touches[0].pageX;\n }, []);\n\n const handleTouchMove = useCallback((e: React.TouchEvent<HTMLDivElement>) => {\n const { pageX } = e.touches[0];\n const movmentX = pageX - lastTouchX.current!;\n lastTouchX.current = pageX;\n lastTouchTime.current = e.timeStamp;\n const posX = transformX.current + movmentX;\n const movementRatio = (posX > 0) || (-posX > maxOffsetX.current) ? EDGE_TRANFORM_RATIO : 1;\n transformX.current += movmentX * movementRatio;\n predictionValue.current = Math.abs(movmentX) < PREDICTION_DISTANCE ? 0 : movmentX < 0 ? 1 : -1;\n updatePosition();\n }, []);\n\n const handleTouchEnd = useCallback((e: React.TouchEvent<HTMLDivElement>) => {\n e.preventDefault();\n const { timeStamp } = e;\n if (timeStamp - lastTouchTime.current > PREDICTION_TIMEOUT) {\n predictionValue.current = 0;\n }\n adjustTransform();\n }, [adjustTransform]);\n\n const onNavigate = (value: 1 | -1) => {\n predictionValue.current = value;\n adjustTransform();\n };\n\n return (\n <div className=\"myinterview-chatbot-slider\">\n {!isMobile\n && (\n <>\n {currentIndex !== 0 && <BackButton size={20} classNames=\"myinterview-chatbot-slider__navigation-button\" onClick={() => onNavigate(-1)} />}\n {currentIndex !== children.length - 1 && <BackButton size={20} classNames=\"myinterview-chatbot-slider__navigation-button myinterview-chatbot-slider__navigation-button--next\" onClick={() => onNavigate(1)} />}\n </>\n )}\n <div\n ref={handleListRef}\n className=\"myinterview-chatbot-slider__list\"\n style={{ height: `${sliderHeight}px` }}\n /* TODO: check passive optimization */\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n >\n {children.map((c, idx) => (\n <div\n key={c.key}\n className=\"myinterview-chatbot-slider__item\"\n style={{\n transform: `translate3d(${idx * (itemWidth)}px, 0px, 0px)`,\n width: `${itemWidth - gap}px`,\n }}\n >\n {c}\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Slider;\n","import classNames from 'classnames';\nimport { CSSProperties, useCallback, useEffect, useMemo, useRef } from 'react';\n\ninterface IPageDotsIndicator {\n totalDots: number;\n currentDotIndex: number;\n dotSize?: number;\n gap?: number;\n}\n\nconst PageDotsIndicator = ({ totalDots, currentDotIndex, dotSize = 8, gap = 4 }: IPageDotsIndicator) => {\n const dots = useMemo(() => [...Array(totalDots)].map((_, idx) => idx), [totalDots]);\n const mainRef = useRef<HTMLDivElement>();\n const dotsRef = useRef<HTMLDivElement>(null);\n const resizeObserver = useRef<ResizeObserver | null>(null);\n const viewSize = useRef<number>(0);\n const itemSize = dotSize + gap;\n\n const adjustDots = useCallback(() => {\n if (!dotsRef.current) return;\n const offset = Math.min(dotsRef.current.offsetLeft, 0);\n const transformX = Math.min(Math.max(-currentDotIndex * itemSize - offset + viewSize.current / 2, offset), -offset);\n dotsRef.current.style.transform = `translate3d(${transformX}px, 0px, 0px)`;\n }, [currentDotIndex, itemSize]);\n\n useEffect(adjustDots, [currentDotIndex, adjustDots]);\n\n const handleMainRef = useCallback((node: HTMLDivElement) => {\n mainRef.current = node;\n if (!mainRef.current) {\n resizeObserver.current?.disconnect();\n return;\n }\n\n resizeObserver.current = new ResizeObserver(([entry]) => {\n viewSize.current = entry.contentRect.width;\n adjustDots();\n });\n resizeObserver.current.observe(mainRef.current);\n }, []);\n\n return (\n <div ref={handleMainRef} className=\"myinterview-chatbot-page-dots-indicator\">\n <div\n ref={dotsRef}\n className=\"myinterview-chatbot-page-dots-indicator__wrapper\"\n style={{ gap: `${gap}px`, '--myinterview-chatbot-dot-size': `${dotSize}px` } as CSSProperties}\n >\n {dots.map((dot) => (\n <span\n key={dot}\n className={classNames(\n 'myinterview-chatbot-page-dots-indicator__item',\n { 'myinterview-chatbot-page-dots-indicator__item--selected': dot === currentDotIndex },\n )}\n />\n ))}\n </div>\n </div>\n );\n};\n\nexport default PageDotsIndicator;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useState } from 'react';\nimport { Button, Text } from '@myinterview/component-library';\nimport { MessageModuleProps } from '../../../interfaces/modules';\nimport { ModuleType } from '../../../interfaces/modules/generic';\nimport Slider from '../../ui/Slider';\nimport ArrowIcon from '../../ui/icons/ArrowIcon';\nimport PageDotsIndicator from '../../ui/PageDotsIndicator';\n\nconst Jobs = ({ completed, data }: MessageModuleProps<ModuleType.JOBS>) => {\n const [currentIndex, setCorrentIndex] = useState<number>(0);\n console.log('JOBS::completed', completed);\n\n return (\n <div className=\"myinterview-chatbot-jobs\">\n <div className=\"myinterview-chatbot-jobs__main\">\n <Slider\n sliderHeight={230}\n currentIndex={currentIndex}\n gap={20}\n onIndexChanged={setCorrentIndex}\n >\n {data.jobs.map((job) => (\n <div\n key={job.job_id ?? (job as any).id}\n className=\"myinterview-chatbot-jobs__item\"\n >\n <Text size=\"H5\" className=\"myinterview-chatbot-jobs__item-header\">\n {job.title}\n </Text>\n <div className=\"myinterview-chatbot-jobs__item-info\">\n <span>USA</span>\n <span>2 Days ago</span>\n </div>\n <div className=\"myinterview-chatbot-jobs__item-actions\">\n <Button size=\"small\">I'm interested</Button>\n <div className=\"myinterview-chatbot-jobs__item-read-more\">\n <span>Read more</span>\n <ArrowIcon />\n </div>\n </div>\n </div>\n ))}\n </Slider>\n\n <PageDotsIndicator totalDots={data.jobs.length} currentDotIndex={currentIndex} />\n </div>\n </div>\n );\n};\n\nexport default Jobs;\n"],"names":["TRANSITION_DURATION","EDGE_TRANFORM_RATIO","PREDICTION_DISTANCE","PREDICTION_TIMEOUT","Slider","children","sliderHeight","currentIndex","itemSize","gap","onIndexChanged","listRef","useRef","resizeObserver","indexRef","viewSize","setViewSize","useState","lastTouchX","lastTouchTime","transformX","maxOffsetX","predictionValue","itemWidth","updatePosition","useCallback","adjustTransform","idx","useEffect","handleListRef","node","_a","entry","handleTouchStart","e","handleTouchMove","pageX","movmentX","posX","movementRatio","handleTouchEnd","timeStamp","onNavigate","value","_jsxs","isMobile","_jsx","BackButton","c","PageDotsIndicator","totalDots","currentDotIndex","dotSize","dots","useMemo","_","mainRef","dotsRef","adjustDots","offset","handleMainRef","dot","classNames","Jobs","completed","data","setCorrentIndex","job","Text","Button","ArrowIcon"],"mappings":";;;AAaA,MAAMA,IAAsB,KACtBC,IAAsB,MACtBC,IAAsB,GACtBC,IAAqB,IAErBC,IAAS,CAAC,EAAE,UAAAC,GAAU,cAAAC,GAAc,cAAAC,IAAe,GAAG,UAAAC,IAAW,OAAU,KAAAC,IAAM,GAAG,gBAAAC,EAAA,MAA6B;AACrH,QAAMC,IAAUC,EAAA,GACVC,IAAiBD,EAA8B,IAAI,GACnDE,IAAWF,EAAeL,CAAY,GACtC,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AAA,CAAA,GACAA,EAAA,QAAA,EAAA,UAAA,cAAA,CAAuB,EAAA,CAAA,GAEzBF,EAAA,OAAA,EAAK,WAAU,0CAAwC,UAAA,CACrDE,EAACuB,GAAM,EAAC,MAAK,SAAO,UAAA,iBAAA,CAAA,GACpBzB,EAAA,OAAA,EAAK,WAAU,4CAA0C,UAAA,CACvDE,EAAA,QAAA,EAAA,UAAA,YAAA,CAAA,GACAA,EAACwB,GAAS,CAAA,CAAA,CAAG,EAAA,CAAA,CACT,EAAA,CAAA,CACF,EAAA,GAhBDH,EAAI,UAAWA,EAAY,EAAE,CAkBrC,EAAA,CAAC,GAGJrB,EAACG,GAAiB,EAAC,WAAWgB,EAAK,KAAK,QAAQ,iBAAiB1D,EAAA,CAAY,CAAI,EAAA,CAAA,GAC7E;AAGZ;"}
|
|
1
|
+
{"version":3,"file":"index-vthXw1kz.js","sources":["../src/components/ui/Slider/index.tsx","../src/components/ui/PageDotsIndicator/index.tsx","../src/components/modules/Jobs/index.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport BackButton from '../../common/BackButton';\nimport { isMobile } from '../../../utils/device.utils';\n\ninterface ISlider {\n children: JSX.Element[];\n sliderHeight: number;\n currentIndex: number;\n itemSize?: number;\n gap?: number;\n onIndexChanged: (index: number) => void;\n}\n\nconst TRANSITION_DURATION = 300; // ms\nconst EDGE_TRANFORM_RATIO = 0.25;\nconst PREDICTION_DISTANCE = 2;\nconst PREDICTION_TIMEOUT = 30; // ms\n\nconst Slider = ({ children, sliderHeight, currentIndex = 0, itemSize = Infinity, gap = 0, onIndexChanged }: ISlider) => {\n const listRef = useRef<HTMLDivElement>();\n const resizeObserver = useRef<ResizeObserver | null>(null);\n const indexRef = useRef<number>(currentIndex);\n const [viewSize, setViewSize] = useState<number>(0);\n const lastTouchX = useRef<number | null>(null);\n const lastTouchTime = useRef<number>(0);\n const transformX = useRef<number>(0);\n const maxOffsetX = useRef<number>(0);\n const predictionValue = useRef<-1 | 0 | 1>(0);\n const itemWidth = Math.min(itemSize, viewSize) + gap;\n\n const updatePosition = useCallback(() => {\n if (!listRef.current) return;\n listRef.current.style.transform = `translate3d(${transformX.current}px, 0px, 0px)`;\n }, []);\n\n const adjustTransform = useCallback(() => {\n if (!listRef.current) return;\n const idx = Math.min(Math.max(Math.round(-transformX.current / (itemWidth)) + predictionValue.current, 0), children.length - 1);\n indexRef.current = Math.min(Math.max(idx, indexRef.current - 1), indexRef.current + 1);\n transformX.current = -indexRef.current * (itemWidth);\n listRef.current.style.transitionDuration = `${TRANSITION_DURATION}ms`;\n onIndexChanged(indexRef.current);\n updatePosition();\n }, [itemWidth]);\n\n useEffect(() => {\n maxOffsetX.current = itemWidth * (children.length - 1) - gap;\n adjustTransform();\n }, [itemWidth]);\n\n const handleListRef = useCallback((node: HTMLDivElement) => {\n listRef.current = node;\n if (!listRef.current) {\n resizeObserver.current?.disconnect();\n return;\n }\n resizeObserver.current = new ResizeObserver(([entry]) => {\n setViewSize(entry.contentRect.width);\n });\n resizeObserver.current.observe(listRef.current);\n }, []);\n\n const handleTouchStart = useCallback((e: React.TouchEvent<HTMLDivElement>) => {\n e.currentTarget.style.transitionDuration = '0ms';\n lastTouchX.current = e.touches[0].pageX;\n }, []);\n\n const handleTouchMove = useCallback((e: React.TouchEvent<HTMLDivElement>) => {\n const { pageX } = e.touches[0];\n const movmentX = pageX - lastTouchX.current!;\n lastTouchX.current = pageX;\n lastTouchTime.current = e.timeStamp;\n const posX = transformX.current + movmentX;\n const movementRatio = (posX > 0) || (-posX > maxOffsetX.current) ? EDGE_TRANFORM_RATIO : 1;\n transformX.current += movmentX * movementRatio;\n predictionValue.current = Math.abs(movmentX) < PREDICTION_DISTANCE ? 0 : movmentX < 0 ? 1 : -1;\n updatePosition();\n }, []);\n\n const handleTouchEnd = useCallback((e: React.TouchEvent<HTMLDivElement>) => {\n e.preventDefault();\n const { timeStamp } = e;\n if (timeStamp - lastTouchTime.current > PREDICTION_TIMEOUT) {\n predictionValue.current = 0;\n }\n adjustTransform();\n }, [adjustTransform]);\n\n const onNavigate = (value: 1 | -1) => {\n predictionValue.current = value;\n adjustTransform();\n };\n\n return (\n <div className=\"myinterview-chatbot-slider\">\n {!isMobile\n && (\n <>\n {currentIndex !== 0 && <BackButton size={20} classNames=\"myinterview-chatbot-slider__navigation-button\" onClick={() => onNavigate(-1)} />}\n {currentIndex !== children.length - 1 && <BackButton size={20} classNames=\"myinterview-chatbot-slider__navigation-button myinterview-chatbot-slider__navigation-button--next\" onClick={() => onNavigate(1)} />}\n </>\n )}\n <div\n ref={handleListRef}\n className=\"myinterview-chatbot-slider__list\"\n style={{ height: `${sliderHeight}px` }}\n /* TODO: check passive optimization */\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n >\n {children.map((c, idx) => (\n <div\n key={c.key}\n className=\"myinterview-chatbot-slider__item\"\n style={{\n transform: `translate3d(${idx * (itemWidth)}px, 0px, 0px)`,\n width: `${itemWidth - gap}px`,\n }}\n >\n {c}\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Slider;\n","import classNames from 'classnames';\nimport { CSSProperties, useCallback, useEffect, useMemo, useRef } from 'react';\n\ninterface IPageDotsIndicator {\n totalDots: number;\n currentDotIndex: number;\n dotSize?: number;\n gap?: number;\n}\n\nconst PageDotsIndicator = ({ totalDots, currentDotIndex, dotSize = 8, gap = 4 }: IPageDotsIndicator) => {\n const dots = useMemo(() => [...Array(totalDots)].map((_, idx) => idx), [totalDots]);\n const mainRef = useRef<HTMLDivElement>();\n const dotsRef = useRef<HTMLDivElement>(null);\n const resizeObserver = useRef<ResizeObserver | null>(null);\n const viewSize = useRef<number>(0);\n const itemSize = dotSize + gap;\n\n const adjustDots = useCallback(() => {\n if (!dotsRef.current) return;\n const offset = Math.min(dotsRef.current.offsetLeft, 0);\n const transformX = Math.min(Math.max(-currentDotIndex * itemSize - offset + viewSize.current / 2, offset), -offset);\n dotsRef.current.style.transform = `translate3d(${transformX}px, 0px, 0px)`;\n }, [currentDotIndex, itemSize]);\n\n useEffect(adjustDots, [currentDotIndex, adjustDots]);\n\n const handleMainRef = useCallback((node: HTMLDivElement) => {\n mainRef.current = node;\n if (!mainRef.current) {\n resizeObserver.current?.disconnect();\n return;\n }\n\n resizeObserver.current = new ResizeObserver(([entry]) => {\n viewSize.current = entry.contentRect.width;\n adjustDots();\n });\n resizeObserver.current.observe(mainRef.current);\n }, []);\n\n return (\n <div ref={handleMainRef} className=\"myinterview-chatbot-page-dots-indicator\">\n <div\n ref={dotsRef}\n className=\"myinterview-chatbot-page-dots-indicator__wrapper\"\n style={{ gap: `${gap}px`, '--myinterview-chatbot-dot-size': `${dotSize}px` } as CSSProperties}\n >\n {dots.map((dot) => (\n <span\n key={dot}\n className={classNames(\n 'myinterview-chatbot-page-dots-indicator__item',\n { 'myinterview-chatbot-page-dots-indicator__item--selected': dot === currentDotIndex },\n )}\n />\n ))}\n </div>\n </div>\n );\n};\n\nexport default PageDotsIndicator;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { useState } from 'react';\nimport { Button, Text } from '@myinterview/component-library';\nimport { MessageModuleProps } from '../../../interfaces/modules';\nimport { ModuleType } from '../../../interfaces/modules/generic';\nimport Slider from '../../ui/Slider';\nimport ArrowIcon from '../../ui/icons/ArrowIcon';\nimport PageDotsIndicator from '../../ui/PageDotsIndicator';\n\nconst Jobs = ({ completed, data }: MessageModuleProps<ModuleType.JOBS>) => {\n const [currentIndex, setCorrentIndex] = useState<number>(0);\n console.log('JOBS::completed', completed);\n\n return (\n <div className=\"myinterview-chatbot-jobs\">\n <div className=\"myinterview-chatbot-jobs__main\">\n <Slider\n sliderHeight={230}\n currentIndex={currentIndex}\n gap={20}\n onIndexChanged={setCorrentIndex}\n >\n {data.jobs.map((job) => (\n <div\n key={job.job_id ?? (job as any).id}\n className=\"myinterview-chatbot-jobs__item\"\n >\n <Text size=\"H5\" className=\"myinterview-chatbot-jobs__item-header\">\n {job.title}\n </Text>\n <div className=\"myinterview-chatbot-jobs__item-info\">\n <span>USA</span>\n <span>2 Days ago</span>\n </div>\n <div className=\"myinterview-chatbot-jobs__item-actions\">\n <Button size=\"small\">I'm interested</Button>\n <div className=\"myinterview-chatbot-jobs__item-read-more\">\n <span>Read more</span>\n <ArrowIcon />\n </div>\n </div>\n </div>\n ))}\n </Slider>\n\n <PageDotsIndicator totalDots={data.jobs.length} currentDotIndex={currentIndex} />\n </div>\n </div>\n );\n};\n\nexport default Jobs;\n"],"names":["TRANSITION_DURATION","EDGE_TRANFORM_RATIO","PREDICTION_DISTANCE","PREDICTION_TIMEOUT","Slider","children","sliderHeight","currentIndex","itemSize","gap","onIndexChanged","listRef","useRef","resizeObserver","indexRef","viewSize","setViewSize","useState","lastTouchX","lastTouchTime","transformX","maxOffsetX","predictionValue","itemWidth","updatePosition","useCallback","adjustTransform","idx","useEffect","handleListRef","node","_a","entry","handleTouchStart","e","handleTouchMove","pageX","movmentX","posX","movementRatio","handleTouchEnd","timeStamp","onNavigate","value","_jsxs","isMobile","_jsx","BackButton","c","PageDotsIndicator","totalDots","currentDotIndex","dotSize","dots","useMemo","_","mainRef","dotsRef","adjustDots","offset","handleMainRef","dot","classNames","Jobs","completed","data","setCorrentIndex","job","Text","Button","ArrowIcon"],"mappings":";;;AAaA,MAAMA,IAAsB,KACtBC,IAAsB,MACtBC,IAAsB,GACtBC,IAAqB,IAErBC,IAAS,CAAC,EAAE,UAAAC,GAAU,cAAAC,GAAc,cAAAC,IAAe,GAAG,UAAAC,IAAW,OAAU,KAAAC,IAAM,GAAG,gBAAAC,EAAA,MAA6B;AACrH,QAAMC,IAAUC,EAAA,GACVC,IAAiBD,EAA8B,IAAI,GACnDE,IAAWF,EAAeL,CAAY,GACtC,CAACQ,GAAUC,CAAW,IAAIC,EAAiB,CAAC,GAC5CC,IAAaN,EAAsB,IAAI,GACvCO,IAAgBP,EAAe,CAAC,GAChCQ,IAAaR,EAAe,CAAC,GAC7BS,IAA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C,MAAK,SAAO,UAAA,iBAAA,CAAA,GACpBzB,EAAA,OAAA,EAAK,WAAU,4CAA0C,UAAA,CACvDE,EAAA,QAAA,EAAA,UAAA,YAAA,CAAA,GACAA,EAACwB,GAAS,CAAA,CAAA,CAAG,EAAA,CAAA,CACT,EAAA,CAAA,CACF,EAAA,GAhBDH,EAAI,UAAWA,EAAY,EAAE,CAkBrC,EAAA,CAAC,GAGJrB,EAACG,GAAiB,EAAC,WAAWgB,EAAK,KAAK,QAAQ,iBAAiB1D,EAAA,CAAY,CAAI,EAAA,CAAA,GAC7E;AAGZ;"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._myinterview-chatbot--component-mode_1hygk_1{width:100%;height:100%}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { d as a, e } from "./main.react-
|
|
2
|
+
import { d as a, e } from "./main.react-WidsPlcm.js";
|
|
3
3
|
export {
|
|
4
4
|
a as ChatbotClient,
|
|
5
5
|
e as usePopupChatbot
|
|
@@ -43634,7 +43634,7 @@ let xl = MN;
|
|
|
43634
43634
|
const kwe = (e) => {
|
|
43635
43635
|
let t = e;
|
|
43636
43636
|
try {
|
|
43637
|
-
t ?? (t = "
|
|
43637
|
+
t ?? (t = "staging");
|
|
43638
43638
|
} catch {
|
|
43639
43639
|
}
|
|
43640
43640
|
xl = (() => {
|
|
@@ -82070,7 +82070,7 @@ var Pc;
|
|
|
82070
82070
|
const q2 = {
|
|
82071
82071
|
tnc: () => {
|
|
82072
82072
|
}
|
|
82073
|
-
}, u8e = ia(() => import("./index-
|
|
82073
|
+
}, u8e = ia(() => import("./index-fuTujKuF.js")), l8e = ia(() => import("./index-vthXw1kz.js")), d8e = ia(() => import("./index-B_-G4jgy.js")), f8e = ia(() => import("./index-BzUKFIKY.js")), p8e = ia(() => import("./index-C7Sft0Xz.js")), h8e = ia(() => import("./index-DGABM1LB.js")), m8e = ia(() => import("./index-DXV0IzpS.js")), g8e = ia(() => import("./index-B10LOTjr.js")), v8e = ia(() => import("./index-BD2W6RCp.js")), DT = {
|
|
82074
82074
|
[Go.TNC]: {
|
|
82075
82075
|
component: u8e,
|
|
82076
82076
|
customAction: Pc.SHOW_TNC
|
|
@@ -83393,7 +83393,7 @@ const a$e = ({ markdownText: e }) => pe("div", { dangerouslySetInnerHTML: (Lr.se
|
|
|
83393
83393
|
// Render <br> tags for newlines
|
|
83394
83394
|
renderer: n4
|
|
83395
83395
|
}), { __html: Lr.parse(e) }) }), c$e = ({ company: e, url: t, header: r, body: n, buttonText: i, onAgree: o, onDisagree: s, onClose: a = () => {
|
|
83396
|
-
}, closeButton: c = !1 }) => wt("div", { className: "myinterview-chatbot-tnc", children: [wt("div", { className: "myinterview-chatbot-tnc__top", children: [pe(_n, { className: "myinterview-chatbot-tnc__title", size: "H4", children: r || "Do you agree with our terms and conditions?" }), c && pe(ud, { classNames: "myinterview-chatbot-tnc__close-button", onClick: a })] }), pe("div", { className: "myinterview-chatbot-tnc__body", children: n ? pe(a$e, { markdownText: n }) : wt(Qc, { children: [wt("p", { children: ["By agreeing to these terms, you permit", " ", e, " ", "to collect personal information, including your name, phone number, email, job interests, answers to screening questions, and location."] }), pe("br", {}), pe("p", { children: "All information you provide will be processed in line with our privacy policy." }), pe("br", {}), wt("p", { children: ["For more details, please refer to our", " ", pe("a", { href: t || "https://myinterview.com/privacy#privacy", target: "_blank", rel: "noreferrer", children: "Privacy Policy" }), "."] }), wt("p", { children: ["If you have any
|
|
83396
|
+
}, closeButton: c = !1 }) => wt("div", { className: "myinterview-chatbot-tnc", children: [wt("div", { className: "myinterview-chatbot-tnc__top", children: [pe(_n, { className: "myinterview-chatbot-tnc__title", size: "H4", children: r || "Do you agree with our terms and conditions?" }), c && pe(ud, { classNames: "myinterview-chatbot-tnc__close-button", onClick: a })] }), pe("div", { className: "myinterview-chatbot-tnc__body", children: n ? pe(a$e, { markdownText: n }) : wt(Qc, { children: [wt("p", { children: ["By agreeing to these terms, you permit", " ", e, " ", "to collect personal information, including your name, phone number, email, job interests, answers to screening questions, and location."] }), pe("br", {}), pe("p", { children: "All information you provide will be processed in line with our privacy policy." }), pe("br", {}), wt("p", { children: ["For more details, please refer to our", " ", pe("a", { href: t || "https://myinterview.com/privacy#privacy", target: "_blank", rel: "noreferrer", children: "Privacy Policy" }), "."] }), wt("p", { children: ["If you have any issues, feel free to email support at", " ", pe("a", { href: "mailto:customer-support@radancy.com", target: "_blank", rel: "noreferrer", children: "customer-support@radancy.com" })] })] }) }), wt("div", { className: "myinterview-chatbot-tnc__actions", children: [pe($8e, { className: "myinterview-chatbot-tnc__disagree-button", onClick: s, children: (i == null ? void 0 : i.disagree) || "Disagree" }), pe(uM, { size: "small", onClick: o, children: (i == null ? void 0 : i.agree) || "Yes, I agree" })] })] }), u$e = ({ children: e, closeButton: t = !1, onClose: r }) => wt("div", { className: "myinterview-chatbot-modal", children: [pe("div", { className: "myinterview-chatbot-modal__background", onClick: r, role: "presentation" }), wt("div", { className: "myinterview-chatbot-modal__main", onClick: (n) => n.stopPropagation(), role: "presentation", children: [t && pe(ud, { classNames: "myinterview-chatbot-modal__close-button", onClick: r }), e] })] }), l$e = [...Array(100)].map((e, t) => t / 100), d$e = -10, f$e = ({ children: e, onClose: t }) => {
|
|
83397
83397
|
const [r, n] = _r(1), i = Kt(), o = Kt(!1), s = Kt(null), a = Er(() => {
|
|
83398
83398
|
o.current && t();
|
|
83399
83399
|
}, []), c = Er((h) => {
|
|
@@ -83536,8 +83536,8 @@ const a$e = ({ markdownText: e }) => pe("div", { dangerouslySetInnerHTML: (Lr.se
|
|
|
83536
83536
|
}, b$e = () => {
|
|
83537
83537
|
AU() && IU(), fY({
|
|
83538
83538
|
dsn: xl.SENTRY_DSN,
|
|
83539
|
-
environment: "
|
|
83540
|
-
release: "0.1.
|
|
83539
|
+
environment: "staging",
|
|
83540
|
+
release: "0.1.82",
|
|
83541
83541
|
integrations: [
|
|
83542
83542
|
cY(),
|
|
83543
83543
|
JK()
|
|
@@ -83725,4 +83725,4 @@ export {
|
|
|
83725
83725
|
_n as t,
|
|
83726
83726
|
Vr as u
|
|
83727
83727
|
};
|
|
83728
|
-
//# sourceMappingURL=main.react-
|
|
83728
|
+
//# sourceMappingURL=main.react-WidsPlcm.js.map
|