@aslaluroba/help-center-react 2.0.4 → 2.0.6

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 (38) hide show
  1. package/dist/core/api.d.ts +4 -1
  2. package/dist/index.d.ts +3 -2
  3. package/dist/index.esm.js +994 -25294
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.js +995 -25295
  6. package/dist/index.js.map +1 -1
  7. package/dist/lib/config.d.ts +1 -1
  8. package/dist/lib/types.d.ts +4 -0
  9. package/dist/ui/chatbot-popup/chat-window-screen/footer.d.ts +1 -0
  10. package/dist/ui/chatbot-popup/chat-window-screen/index.d.ts +1 -1
  11. package/dist/ui/help-center.d.ts +1 -1
  12. package/dist/ui/help-popup.d.ts +9 -3
  13. package/dist/ui/review-dialog/index.d.ts +8 -0
  14. package/dist/ui/review-dialog/rating.d.ts +12 -0
  15. package/package.json +26 -5
  16. package/src/assets/icons/arrowRight.svg +1 -1
  17. package/src/assets/icons/closeCircle.svg +1 -1
  18. package/src/components/ui/agent-response/agent-response.tsx +36 -34
  19. package/src/components/ui/header.tsx +2 -3
  20. package/src/core/SignalRService.ts +25 -25
  21. package/src/core/api.ts +180 -44
  22. package/src/globals.css +0 -9
  23. package/src/index.ts +3 -2
  24. package/src/lib/config.ts +25 -25
  25. package/src/lib/types.ts +5 -0
  26. package/src/locales/ar.json +18 -1
  27. package/src/locales/en.json +26 -8
  28. package/src/ui/chatbot-popup/chat-window-screen/footer.tsx +31 -33
  29. package/src/ui/chatbot-popup/chat-window-screen/header.tsx +47 -53
  30. package/src/ui/chatbot-popup/chat-window-screen/index.tsx +182 -88
  31. package/src/ui/chatbot-popup/options-list-screen/header.tsx +24 -20
  32. package/src/ui/chatbot-popup/options-list-screen/index.tsx +24 -24
  33. package/src/ui/chatbot-popup/options-list-screen/option-card.tsx +9 -4
  34. package/src/ui/help-center.tsx +189 -159
  35. package/src/ui/help-popup.tsx +241 -165
  36. package/src/ui/review-dialog/index.tsx +106 -0
  37. package/src/ui/review-dialog/rating.tsx +78 -0
  38. package/tsconfig.json +48 -0
@@ -1,4 +1,7 @@
1
1
  import { TokenResponse } from '../lib/types';
2
2
  export declare function initializeAPI(url: string, getToken: () => Promise<TokenResponse>): void;
3
3
  export declare function getValidToken(forceRefresh?: boolean): Promise<string>;
4
- export declare function apiRequest(endpoint: string, method?: string, body?: any): Promise<Response>;
4
+ export declare function apiRequest(endpoint: string, method?: string, body?: any, options?: {
5
+ cache?: boolean;
6
+ timeout?: number;
7
+ }): Promise<any>;
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import { HelpCenter } from './ui/help-center';
2
+ import { TokenResponse } from './lib/types';
2
3
  export type HelpCenterConfig = {
3
- baseUrl: string;
4
+ baseUrl?: string;
4
5
  hubUrl?: string;
6
+ getToken?: () => Promise<TokenResponse>;
5
7
  };
6
8
  export declare function initializeHelpCenter(config: HelpCenterConfig): void;
7
9
  export { HelpCenter };
@@ -9,4 +11,3 @@ export * from './lib/types';
9
11
  export * from './core/ApiService';
10
12
  export * from './core/SignalRService';
11
13
  export { TokenService } from './core/token-service';
12
- export { initializeAPI } from './core/api';