@opencx/widget 2.3.0 → 2.3.1
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/basic.cjs +1 -1
- package/dist/basic.cjs.map +1 -1
- package/dist/basic.js +1 -1
- package/dist/basic.js.map +1 -1
- package/dist/{index-B7LNpE9i.cjs → index-CHWVttUy.cjs} +4 -4
- package/dist/index-CHWVttUy.cjs.map +1 -0
- package/dist/{index-BQfnx4Er.js → index-pl-6K_wU.js} +539 -534
- package/dist/index-pl-6K_wU.js.map +1 -0
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +2 -2
- package/dist/react.js.map +1 -1
- package/dist/src/@components/ChatEvent.component.d.ts +1 -1
- package/dist/src/@components/Fallback.component.d.ts +1 -1
- package/dist/src/@components/Text.component.d.ts +1 -1
- package/dist/src/components/userMessage.d.ts +1 -1
- package/dist/src/designs/basic/index.d.ts +1 -1
- package/dist-embed/script.js +24 -24
- package/dist-embed/script.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-B7LNpE9i.cjs.map +0 -1
- package/dist/index-BQfnx4Er.js.map +0 -1
- /package/dist/{react-lib → react-web}/Root.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/index.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/use-sound.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/use-sound.test.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/use-sync-state.test.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/useAbstractChat.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/useAxiosInstance.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/useScrollTo.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/useSyncState.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/useTimeoutState.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/useUploadFiles.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/useVote.d.ts +0 -0
- /package/dist/{react-lib → react-web}/hooks/useWidgetContentHeight.d.ts +0 -0
- /package/dist/{react-lib → react-web}/index.d.ts +0 -0
- /package/dist/{react-lib → react-web}/locales/ar.locale.d.ts +0 -0
- /package/dist/{react-lib → react-web}/locales/de.locale.d.ts +0 -0
- /package/dist/{react-lib → react-web}/locales/en.locale.d.ts +0 -0
- /package/dist/{react-lib → react-web}/locales/fr.locale.d.ts +0 -0
- /package/dist/{react-lib → react-web}/locales/helper.d.ts +0 -0
- /package/dist/{react-lib → react-web}/locales/index.d.ts +0 -0
- /package/dist/{react-lib → react-web}/locales/nl.locale.d.ts +0 -0
- /package/dist/{react-lib → react-web}/locales/pt.locale.d.ts +0 -0
- /package/dist/{react-lib → react-web}/providers/ChatProvider.d.ts +0 -0
- /package/dist/{react-lib → react-web}/providers/ConfigDataProvider.d.ts +0 -0
- /package/dist/{react-lib → react-web}/providers/ContactProvider.d.ts +0 -0
- /package/dist/{react-lib → react-web}/providers/LocalesProvider.d.ts +0 -0
- /package/dist/{react-lib → react-web}/providers/componentRegistry.d.ts +0 -0
- /package/dist/{react-lib → react-web}/providers/use-widget-sfx.d.ts +0 -0
- /package/dist/{react-lib → react-web}/providers/usePreludeData.d.ts +0 -0
- /package/dist/{react-lib → react-web}/types/components.d.ts +0 -0
- /package/dist/{react-lib → react-web}/types/index.d.ts +0 -0
- /package/dist/{react-lib → react-web}/types/options.d.ts +0 -0
- /package/dist/{react-lib → react-web}/utils/create-safe-context.d.ts +0 -0
- /package/dist/{react-lib → react-web}/utils/debug.d.ts +0 -0
- /package/dist/{react-lib → react-web}/utils/getters.d.ts +0 -0
- /package/dist/{react-lib → react-web}/utils/index.d.ts +0 -0
package/dist/react.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.cjs","sources":["../react-
|
|
1
|
+
{"version":3,"file":"react.cjs","sources":["../react-web/utils/getters.ts","../react-web/hooks/useVote.ts"],"sourcesContent":["import { ChatHistoryMessageType } from \"@core/types\";\r\n\r\ninterface DayOfficeHours {\r\n from: string;\r\n to: string;\r\n}\r\n\r\nexport const workingDays = [\r\n \"monday\",\r\n \"tuesday\",\r\n \"wednesday\",\r\n \"thursday\",\r\n \"friday\",\r\n \"saturday\",\r\n \"sunday\",\r\n \"WeekDays\",\r\n \"Everyday\",\r\n] as const;\r\n\r\nexport type PreludeData = {\r\n initial_questions: string[];\r\n ai_enabled: boolean;\r\n office_hours: WorkingHours;\r\n office_hours_timezone: string;\r\n organization_name: string;\r\n};\r\n\r\ntype Day = (typeof workingDays)[number];\r\n\r\nexport type WorkingHours = {\r\n [K in Day]: DayOfficeHours;\r\n};\r\n\r\nexport type InitialData = {\r\n logo: string;\r\n faq: [];\r\n initial_questions: string[];\r\n history: ChatHistoryMessageType[];\r\n};\r\n","import { useConfigData } from \"@react/providers/ConfigDataProvider\";\r\nimport useAsyncFn from \"react-use/lib/useAsyncFn\";\r\n\r\nexport function useUpvote(id: string, onSuccess?: () => void) {\r\n const { http } = useConfigData();\r\n return useAsyncFn(\r\n async () => http.apis.upvote(id).then(onSuccess),\r\n [http.options, id, onSuccess],\r\n );\r\n}\r\n\r\nexport function useDownvote(id: string, onSuccess?: () => void) {\r\n const { http } = useConfigData();\r\n return useAsyncFn(\r\n async () => http.apis.downvote(id).then(onSuccess),\r\n [http.options, id],\r\n );\r\n}\r\n"],"names":["workingDays","useUpvote","id","onSuccess","http","useConfigData","useAsyncFn","useDownvote"],"mappings":"wHAOaA,EAAc,CACzB,SACA,UACA,YACA,WACA,SACA,WACA,SACA,WACA,UACF,ECdgB,SAAAC,EAAUC,EAAYC,EAAwB,CACtD,KAAA,CAAE,KAAAC,GAASC,EAAAA,gBACV,OAAAC,EAAA,SACL,SAAYF,EAAK,KAAK,OAAOF,CAAE,EAAE,KAAKC,CAAS,EAC/C,CAACC,EAAK,QAASF,EAAIC,CAAS,CAAA,CAEhC,CAEgB,SAAAI,EAAYL,EAAYC,EAAwB,CACxD,KAAA,CAAE,KAAAC,GAASC,EAAAA,gBACV,OAAAC,EAAA,SACL,SAAYF,EAAK,KAAK,SAASF,CAAE,EAAE,KAAKC,CAAS,EACjD,CAACC,EAAK,QAASF,CAAE,CAAA,CAErB"}
|
package/dist/react.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './react-
|
|
1
|
+
export * from './react-web/index'
|
|
2
2
|
export {}
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as e, _ as o } from "./index-
|
|
2
|
-
import { W as i, e as f, a as c, d as h, b as l, h as v, l as D } from "./index-
|
|
1
|
+
import { u as e, _ as o } from "./index-pl-6K_wU.js";
|
|
2
|
+
import { W as i, e as f, a as c, d as h, b as l, h as v, l as D } from "./index-pl-6K_wU.js";
|
|
3
3
|
const u = [
|
|
4
4
|
"monday",
|
|
5
5
|
"tuesday",
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sources":["../react-
|
|
1
|
+
{"version":3,"file":"react.js","sources":["../react-web/utils/getters.ts","../react-web/hooks/useVote.ts"],"sourcesContent":["import { ChatHistoryMessageType } from \"@core/types\";\r\n\r\ninterface DayOfficeHours {\r\n from: string;\r\n to: string;\r\n}\r\n\r\nexport const workingDays = [\r\n \"monday\",\r\n \"tuesday\",\r\n \"wednesday\",\r\n \"thursday\",\r\n \"friday\",\r\n \"saturday\",\r\n \"sunday\",\r\n \"WeekDays\",\r\n \"Everyday\",\r\n] as const;\r\n\r\nexport type PreludeData = {\r\n initial_questions: string[];\r\n ai_enabled: boolean;\r\n office_hours: WorkingHours;\r\n office_hours_timezone: string;\r\n organization_name: string;\r\n};\r\n\r\ntype Day = (typeof workingDays)[number];\r\n\r\nexport type WorkingHours = {\r\n [K in Day]: DayOfficeHours;\r\n};\r\n\r\nexport type InitialData = {\r\n logo: string;\r\n faq: [];\r\n initial_questions: string[];\r\n history: ChatHistoryMessageType[];\r\n};\r\n","import { useConfigData } from \"@react/providers/ConfigDataProvider\";\r\nimport useAsyncFn from \"react-use/lib/useAsyncFn\";\r\n\r\nexport function useUpvote(id: string, onSuccess?: () => void) {\r\n const { http } = useConfigData();\r\n return useAsyncFn(\r\n async () => http.apis.upvote(id).then(onSuccess),\r\n [http.options, id, onSuccess],\r\n );\r\n}\r\n\r\nexport function useDownvote(id: string, onSuccess?: () => void) {\r\n const { http } = useConfigData();\r\n return useAsyncFn(\r\n async () => http.apis.downvote(id).then(onSuccess),\r\n [http.options, id],\r\n );\r\n}\r\n"],"names":["workingDays","useUpvote","id","onSuccess","http","useConfigData","useAsyncFn","useDownvote"],"mappings":";;AAOO,MAAMA,IAAc;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;ACdgB,SAAAC,EAAUC,GAAYC,GAAwB;AACtD,QAAA,EAAE,MAAAC,MAASC;AACV,SAAAC;AAAAA,IACL,YAAYF,EAAK,KAAK,OAAOF,CAAE,EAAE,KAAKC,CAAS;AAAA,IAC/C,CAACC,EAAK,SAASF,GAAIC,CAAS;AAAA,EAAA;AAEhC;AAEgB,SAAAI,EAAYL,GAAYC,GAAwB;AACxD,QAAA,EAAE,MAAAC,MAASC;AACV,SAAAC;AAAAA,IACL,YAAYF,EAAK,KAAK,SAASF,CAAE,EAAE,KAAKC,CAAS;AAAA,IACjD,CAACC,EAAK,SAASF,CAAE;AAAA,EAAA;AAErB;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageTypeEnum } from '../../core/types';
|
|
2
|
-
import { ComponentProps } from '../../react-
|
|
2
|
+
import { ComponentProps } from '../../react-web/types';
|
|
3
3
|
import { default as React } from 'react';
|
|
4
4
|
type ChatEventComponentProps = ComponentProps<{
|
|
5
5
|
event: MessageTypeEnum;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { DefaultTextComponentProps } from '../../react-
|
|
2
|
+
import { DefaultTextComponentProps } from '../../react-web/types';
|
|
3
3
|
export declare function BotTextResponse({ data, id, type, attachments, }: DefaultTextComponentProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { WidgetOptions } from '../../react-
|
|
2
|
+
import { WidgetOptions } from '../../react-web/types';
|
|
3
3
|
import { UserMessageType } from '../../core/types';
|
|
4
4
|
export declare function UserMessage({ children, user, message, }: {
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WidgetOptions } from '../../../react-
|
|
1
|
+
import { WidgetOptions } from '../../../react-web/index';
|
|
2
2
|
import { default as React, ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
3
|
declare function Widget({ className, ...props }: ComponentPropsWithoutRef<"div">): React.JSX.Element;
|
|
4
4
|
declare function WidgetRoot({ options, children, }: {
|