@aslaluroba/help-center-react 3.0.4 → 3.0.5

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.
Files changed (56) hide show
  1. package/README.md +28 -33
  2. package/dist/components/shared/Button/button.d.ts +1 -2
  3. package/dist/components/ui/agent-response/agent-response.d.ts +1 -2
  4. package/dist/components/ui/header.d.ts +1 -2
  5. package/dist/index.css +1 -0
  6. package/dist/index.d.ts +1 -2
  7. package/dist/index.esm.js +36041 -11149
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +36048 -11158
  10. package/dist/index.js.map +1 -1
  11. package/dist/ui/chatbot-popup/chat-window-screen/footer.d.ts +0 -1
  12. package/dist/ui/chatbot-popup/chat-window-screen/header.d.ts +1 -1
  13. package/dist/ui/chatbot-popup/chat-window-screen/index.d.ts +1 -1
  14. package/dist/ui/chatbot-popup/error-screen/index.d.ts +0 -1
  15. package/dist/ui/chatbot-popup/home-screen/card.d.ts +0 -1
  16. package/dist/ui/chatbot-popup/home-screen/chat-now-card.d.ts +0 -1
  17. package/dist/ui/chatbot-popup/home-screen/index.d.ts +0 -1
  18. package/dist/ui/chatbot-popup/loading-screen/index.d.ts +0 -1
  19. package/dist/ui/chatbot-popup/options-list-screen/expanded-option.d.ts +0 -1
  20. package/dist/ui/chatbot-popup/options-list-screen/header.d.ts +0 -1
  21. package/dist/ui/chatbot-popup/options-list-screen/index.d.ts +0 -1
  22. package/dist/ui/chatbot-popup/options-list-screen/option-card.d.ts +0 -1
  23. package/dist/ui/confirmation-modal/index.d.ts +1 -2
  24. package/dist/ui/floating-message.d.ts +1 -2
  25. package/dist/ui/help-button.d.ts +1 -2
  26. package/dist/ui/help-center.d.ts +1 -2
  27. package/dist/ui/help-popup.d.ts +1 -2
  28. package/dist/ui/review-dialog/index.d.ts +0 -1
  29. package/package.json +25 -25
  30. package/src/components/shared/Button/button.tsx +0 -1
  31. package/src/components/ui/agent-response/agent-response.tsx +0 -1
  32. package/src/components/ui/header.tsx +0 -1
  33. package/src/globals.css +1 -1
  34. package/src/index.ts +1 -3
  35. package/src/types/svg.d.ts +4 -4
  36. package/src/ui/chatbot-popup/chat-window-screen/footer.tsx +0 -1
  37. package/src/ui/chatbot-popup/chat-window-screen/header.tsx +42 -26
  38. package/src/ui/chatbot-popup/error-screen/index.tsx +0 -1
  39. package/src/ui/chatbot-popup/home-screen/card.tsx +25 -25
  40. package/src/ui/chatbot-popup/home-screen/chat-now-card.tsx +0 -2
  41. package/src/ui/chatbot-popup/home-screen/index.tsx +0 -1
  42. package/src/ui/chatbot-popup/loading-screen/index.tsx +0 -2
  43. package/src/ui/chatbot-popup/options-list-screen/expanded-option.tsx +0 -1
  44. package/src/ui/chatbot-popup/options-list-screen/header.tsx +14 -12
  45. package/src/ui/chatbot-popup/options-list-screen/index.tsx +0 -1
  46. package/src/ui/chatbot-popup/options-list-screen/option-card.tsx +26 -19
  47. package/src/ui/confirmation-modal/index.tsx +0 -1
  48. package/src/ui/floating-message.tsx +0 -1
  49. package/src/ui/help-button.tsx +0 -1
  50. package/src/ui/help-center.tsx +1 -1
  51. package/src/ui/help-popup.tsx +1 -1
  52. package/src/ui/review-dialog/index.tsx +4 -4
  53. package/src/useLocalTranslation.ts +5 -5
  54. package/tsconfig.json +19 -8
  55. package/src/.DS_Store +0 -0
  56. package/src/styles/tailwind.css +0 -4
@@ -1,4 +1,3 @@
1
- import React from 'react'
2
1
  import CloseIcon from '../assets/icons/close.svg'
3
2
  interface FloatingMessageProps {
4
3
  message: string
@@ -1,4 +1,3 @@
1
- import React from 'react'
2
1
  import Logo from '../assets/logo.svg'
3
2
 
4
3
  interface HelpButtonProps {
@@ -1,5 +1,5 @@
1
1
  import ReviewDialog from '@/ui/review-dialog';
2
- import React, { useEffect, useState } from 'react';
2
+ import { useEffect, useState } from 'react';
3
3
  import { apiRequest } from '../core/api';
4
4
  import { ClientAblyService } from '../core/AblyService';
5
5
  import { useLocalTranslation } from '../useLocalTranslation';
@@ -5,7 +5,7 @@ import ChatBotErrorScreen from '@/ui/chatbot-popup/error-screen';
5
5
  import HomeScreen from '@/ui/chatbot-popup/home-screen';
6
6
  import ChatBotLoadingScreen from '@/ui/chatbot-popup/loading-screen';
7
7
  import OptionsListScreen from '@/ui/chatbot-popup/options-list-screen';
8
- import React, { useEffect, useRef, useState, useCallback, useMemo } from 'react';
8
+ import { useEffect, useRef, useState, useCallback, useMemo } from 'react';
9
9
  import ChatIcon from '../assets/icons/chat.svg';
10
10
  import { Button } from '@/components';
11
11
  import { HelpScreenData, Message, Option } from '@/lib/types';
@@ -1,8 +1,8 @@
1
1
  import { ReviewProps } from '@/lib/types'
2
2
  import { Rating } from '@/ui/review-dialog/rating'
3
- import React from 'react'
4
3
  import { useLocalTranslation } from '../../useLocalTranslation'
5
4
  import CloseCircle from '../../assets/icons/closeCircle.svg'
5
+ import { useState } from 'react';
6
6
 
7
7
  interface ReviewDialogProps {
8
8
  handleSubmit: ({ comment, rating }: ReviewProps) => void;
@@ -11,9 +11,9 @@ interface ReviewDialogProps {
11
11
 
12
12
  const ReviewDialog: React.FC<ReviewDialogProps> = (props) => {
13
13
  const { t } = useLocalTranslation()
14
- const [comment, setComment] = React.useState<string>('')
15
- const [rating, setRating] = React.useState<number>(0)
16
- const [error, setError] = React.useState<{ comment?: string; rating?: string }>({})
14
+ const [comment, setComment] = useState<string>('')
15
+ const [rating, setRating] = useState<number>(0)
16
+ const [error, setError] = useState<{ comment?: string; rating?: string }>({})
17
17
 
18
18
  const isCommentValid = comment.length >= 10 && comment.length <= 500
19
19
  const isRatingValid = rating >= 1 && rating <= 5
@@ -1,14 +1,14 @@
1
-
2
- import { useMemo } from 'react';
3
- import { createHelpCenterI18n } from './i18n';
1
+ import { useMemo } from "react";
2
+ import { createHelpCenterI18n } from "./i18n";
4
3
 
5
4
  export const useLocalTranslation = (languageFromProps?: string) => {
6
- const language = languageFromProps || localStorage.getItem('app-language') || 'en';
5
+ const language =
6
+ languageFromProps || localStorage.getItem("app-language") || "en";
7
7
 
8
8
  const i18n = useMemo(() => createHelpCenterI18n(language), [language]);
9
9
 
10
10
  const t = (key: string) => i18n.t(key);
11
11
  const dir = i18n.dir();
12
12
 
13
- return { t, dir , i18n };
13
+ return { t, dir, i18n };
14
14
  };
package/tsconfig.json CHANGED
@@ -22,23 +22,34 @@
22
22
  "noUnusedParameters": true,
23
23
  "noImplicitReturns": true,
24
24
  "noFallthroughCasesInSwitch": true,
25
- "moduleResolution": "node",
26
- "jsx": "react",
25
+ "moduleResolution": "bundler",
26
+ "jsx": "react-jsx",
27
27
  "resolveJsonModule": true,
28
28
  "esModuleInterop": true,
29
29
  "skipLibCheck": true,
30
30
  "forceConsistentCasingInFileNames": true,
31
31
  "baseUrl": ".",
32
- "paths": {
33
- "@/*": ["src/*"],
34
- "@/components/*": ["src/components/*"],
35
- "@/ui/*": ["src/ui/*"],
36
- "@/lib/*": ["src/lib/*"],
37
- "@/assets/*": ["src/assets/*"]
32
+ "paths": {
33
+ "@/*": [
34
+ "src/*"
35
+ ],
36
+ "@/components/*": [
37
+ "src/components/*"
38
+ ],
39
+ "@/ui/*": [
40
+ "src/ui/*"
41
+ ],
42
+ "@/lib/*": [
43
+ "src/lib/*"
44
+ ],
45
+ "@/assets/*": [
46
+ "src/assets/*"
47
+ ]
38
48
  },
39
49
  },
40
50
  "include": [
41
51
  "src",
52
+ "src/types",
42
53
  "assets"
43
54
  ],
44
55
  "exclude": [
package/src/.DS_Store DELETED
Binary file
@@ -1,4 +0,0 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');
2
- @tailwind base;
3
- @tailwind components;
4
- @tailwind utilities;