datakeen-session-react 1.1.157 → 1.1.159

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.
@@ -8,13 +8,15 @@ var React = require('react');
8
8
  * Hook personnalisé pour injecter des styles CSS globaux qui ciblent spécifiquement
9
9
  * le composant VideoRecorder d'Unissey et éliminent les bords arrondis et les fonds noirs.
10
10
  */
11
- var useVideoRecorderStyles = function () {
11
+ var useVideoRecorderStyles = function (btnBg, btnText) {
12
+ var resolvedBtnBg = "#11E5C5";
13
+ var resolvedBtnText = "#3C3C40";
12
14
  React.useEffect(function () {
13
15
  // Créer un élément style pour injecter des règles CSS
14
16
  var styleElement = document.createElement("style");
15
17
  styleElement.id = "video-recorder-custom-styles";
16
18
  // Définir les règles CSS nécessaires pour éliminer les bords arrondis et les fonds noirs
17
- styleElement.textContent = "\n /* Cibler le composant VideoRecorder et tous ses \u00E9l\u00E9ments internes */\n uni-video-recorder,\n uni-video-recorder::shadow-root,\n uni-video-recorder::part(*),\n uni-video-recorder *,\n uni-video-recorder video,\n uni-video-recorder canvas,\n uni-video-recorder div {\n border-radius: 0 !important;\n -webkit-border-radius: 0 !important;\n -moz-border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n \n /* Assurer que la vid\u00E9o prend tout l'espace disponible */\n uni-video-recorder video,\n uni-video-recorder canvas {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n max-height: none !important;\n }\n\n /* iOS-specific fixes for getUserMedia black screen */\n @supports (-webkit-touch-callout: none) {\n uni-video-recorder video {\n -webkit-playsinline: true !important;\n playsinline: true !important;\n autoplay: true !important;\n muted: true !important;\n }\n }\n \n /* Variables CSS globales que le composant pourrait utiliser */\n :root {\n --uni-video-border-radius: 0 !important;\n --uni-border-radius: 0 !important;\n --uni-component-border-radius: 0 !important;\n --uni-video-background: transparent !important;\n --uni-background: transparent !important;\n }\n \n /* S\u00E9lecteurs tr\u00E8s sp\u00E9cifiques pour garantir que les styles s'appliquent */\n .video-container,\n .video-container > div,\n .video-container > div > uni-video-recorder,\n .video-container uni-video-recorder,\n .selfie .video-container,\n .selfie .video-container > div,\n .selfie .video-container uni-video-recorder {\n border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n \n /* Pr\u00E9server les styles des boutons */\n .selfie button.selfie-button,\n button.selfie-button,\n .selfie-button {\n background-color: #11E5C5 !important;\n color: #3C3C40 !important;\n border-radius: 12px !important;\n }\n \n .selfie button.selfie-button:hover,\n button.selfie-button:hover,\n .selfie-button:hover {\n background-color: #7dffeb !important;\n }\n \n .selfie button.selfie-button:disabled,\n button.selfie-button:disabled,\n .selfie-button:disabled {\n background-color: #e2e8f0 !important;\n opacity: 0.6 !important;\n }\n ";
19
+ styleElement.textContent = "\n /* Cibler le composant VideoRecorder et tous ses \u00E9l\u00E9ments internes */\n uni-video-recorder,\n uni-video-recorder::shadow-root,\n uni-video-recorder::part(*),\n uni-video-recorder *,\n uni-video-recorder video,\n uni-video-recorder canvas,\n uni-video-recorder div {\n border-radius: 0 !important;\n -webkit-border-radius: 0 !important;\n -moz-border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n\n /* Assurer que la vid\u00E9o prend tout l'espace disponible */\n uni-video-recorder video,\n uni-video-recorder canvas {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n max-height: none !important;\n }\n\n /* iOS-specific fixes for getUserMedia black screen */\n @supports (-webkit-touch-callout: none) {\n uni-video-recorder video {\n -webkit-playsinline: true !important;\n playsinline: true !important;\n autoplay: true !important;\n muted: true !important;\n }\n }\n\n /* Variables CSS globales que le composant pourrait utiliser */\n :root {\n --uni-video-border-radius: 0 !important;\n --uni-border-radius: 0 !important;\n --uni-component-border-radius: 0 !important;\n --uni-video-background: transparent !important;\n --uni-background: transparent !important;\n }\n\n /* S\u00E9lecteurs tr\u00E8s sp\u00E9cifiques pour garantir que les styles s'appliquent */\n .video-container,\n .video-container > div,\n .video-container > div > uni-video-recorder,\n .video-container uni-video-recorder,\n .selfie .video-container,\n .selfie .video-container > div,\n .selfie .video-container uni-video-recorder {\n border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n\n /* Pr\u00E9server les styles des boutons */\n .selfie button.selfie-button,\n button.selfie-button,\n .selfie-button {\n background-color: ".concat(resolvedBtnBg, " !important;\n color: ").concat(resolvedBtnText, " !important;\n border-radius: 12px !important;\n }\n\n .selfie button.selfie-button:hover,\n button.selfie-button:hover,\n .selfie-button:hover {\n background-color: ").concat(resolvedBtnBg, " !important;\n filter: brightness(1.1);\n }\n\n .selfie button.selfie-button:disabled,\n button.selfie-button:disabled,\n .selfie-button:disabled {\n background-color: #e2e8f0 !important;\n opacity: 0.6 !important;\n }\n ");
18
20
  // Ajouter l'élément style au head du document
19
21
  document.head.appendChild(styleElement);
20
22
  // Nettoyer en supprimant l'élément style lors du démontage du composant
@@ -24,7 +26,7 @@ var useVideoRecorderStyles = function () {
24
26
  document.head.removeChild(existingStyle);
25
27
  }
26
28
  };
27
- }, [btnBg, btnText]);
29
+ }, [resolvedBtnBg, resolvedBtnText]);
28
30
  };
29
31
 
30
32
  exports.default = useVideoRecorderStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"useVideoRecorderStyles.js","sources":["../../../../../../src/components/selfie/hooks/useVideoRecorderStyles.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Hook personnalisé pour injecter des styles CSS globaux qui ciblent spécifiquement\n * le composant VideoRecorder d'Unissey et éliminent les bords arrondis et les fonds noirs.\n */\nconst useVideoRecorderStyles = () => {\n useEffect(() => {\n // Créer un élément style pour injecter des règles CSS\n const styleElement = document.createElement(\"style\");\n styleElement.id = \"video-recorder-custom-styles\";\n\n // Définir les règles CSS nécessaires pour éliminer les bords arrondis et les fonds noirs\n styleElement.textContent = `\n /* Cibler le composant VideoRecorder et tous ses éléments internes */\n uni-video-recorder,\n uni-video-recorder::shadow-root,\n uni-video-recorder::part(*),\n uni-video-recorder *,\n uni-video-recorder video,\n uni-video-recorder canvas,\n uni-video-recorder div {\n border-radius: 0 !important;\n -webkit-border-radius: 0 !important;\n -moz-border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n \n /* Assurer que la vidéo prend tout l'espace disponible */\n uni-video-recorder video,\n uni-video-recorder canvas {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n max-height: none !important;\n }\n\n /* iOS-specific fixes for getUserMedia black screen */\n @supports (-webkit-touch-callout: none) {\n uni-video-recorder video {\n -webkit-playsinline: true !important;\n playsinline: true !important;\n autoplay: true !important;\n muted: true !important;\n }\n }\n \n /* Variables CSS globales que le composant pourrait utiliser */\n :root {\n --uni-video-border-radius: 0 !important;\n --uni-border-radius: 0 !important;\n --uni-component-border-radius: 0 !important;\n --uni-video-background: transparent !important;\n --uni-background: transparent !important;\n }\n \n /* Sélecteurs très spécifiques pour garantir que les styles s'appliquent */\n .video-container,\n .video-container > div,\n .video-container > div > uni-video-recorder,\n .video-container uni-video-recorder,\n .selfie .video-container,\n .selfie .video-container > div,\n .selfie .video-container uni-video-recorder {\n border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n \n /* Préserver les styles des boutons */\n .selfie button.selfie-button,\n button.selfie-button,\n .selfie-button {\n background-color: #11E5C5 !important;\n color: #3C3C40 !important;\n border-radius: 12px !important;\n }\n \n .selfie button.selfie-button:hover,\n button.selfie-button:hover,\n .selfie-button:hover {\n background-color: #7dffeb !important;\n }\n \n .selfie button.selfie-button:disabled,\n button.selfie-button:disabled,\n .selfie-button:disabled {\n background-color: #e2e8f0 !important;\n opacity: 0.6 !important;\n }\n `;\n\n // Ajouter l'élément style au head du document\n document.head.appendChild(styleElement);\n\n // Nettoyer en supprimant l'élément style lors du démontage du composant\n return () => {\n const existingStyle = document.getElementById(\n \"video-recorder-custom-styles\"\n );\n if (existingStyle) {\n document.head.removeChild(existingStyle);\n }\n };\n }, [btnBg, btnText]);\n};\n\nexport default useVideoRecorderStyles;\n"],"names":["useEffect"],"mappings":";;;;;;AAEA;;;AAGG;AACH,IAAM,sBAAsB,GAAG,YAAA;AAC7B,IAAAA,eAAS,CAAC,YAAA;;QAER,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AACpD,QAAA,YAAY,CAAC,EAAE,GAAG,8BAA8B;;AAGhD,QAAA,YAAY,CAAC,WAAW,GAAG,6pFA8E1B;;AAGD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;;QAGvC,OAAO,YAAA;YACL,IAAM,aAAa,GAAG,QAAQ,CAAC,cAAc,CAC3C,8BAA8B,CAC/B;YACD,IAAI,aAAa,EAAE;AACjB,gBAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;YAC1C;AACF,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACtB;;;;"}
1
+ {"version":3,"file":"useVideoRecorderStyles.js","sources":["../../../../../../src/components/selfie/hooks/useVideoRecorderStyles.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Hook personnalisé pour injecter des styles CSS globaux qui ciblent spécifiquement\n * le composant VideoRecorder d'Unissey et éliminent les bords arrondis et les fonds noirs.\n */\nconst useVideoRecorderStyles = (btnBg?: string, btnText?: string) => {\n const resolvedBtnBg = btnBg ?? \"#11E5C5\";\n const resolvedBtnText = btnText ?? \"#3C3C40\";\n\n useEffect(() => {\n // Créer un élément style pour injecter des règles CSS\n const styleElement = document.createElement(\"style\");\n styleElement.id = \"video-recorder-custom-styles\";\n\n // Définir les règles CSS nécessaires pour éliminer les bords arrondis et les fonds noirs\n styleElement.textContent = `\n /* Cibler le composant VideoRecorder et tous ses éléments internes */\n uni-video-recorder,\n uni-video-recorder::shadow-root,\n uni-video-recorder::part(*),\n uni-video-recorder *,\n uni-video-recorder video,\n uni-video-recorder canvas,\n uni-video-recorder div {\n border-radius: 0 !important;\n -webkit-border-radius: 0 !important;\n -moz-border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n\n /* Assurer que la vidéo prend tout l'espace disponible */\n uni-video-recorder video,\n uni-video-recorder canvas {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n max-height: none !important;\n }\n\n /* iOS-specific fixes for getUserMedia black screen */\n @supports (-webkit-touch-callout: none) {\n uni-video-recorder video {\n -webkit-playsinline: true !important;\n playsinline: true !important;\n autoplay: true !important;\n muted: true !important;\n }\n }\n\n /* Variables CSS globales que le composant pourrait utiliser */\n :root {\n --uni-video-border-radius: 0 !important;\n --uni-border-radius: 0 !important;\n --uni-component-border-radius: 0 !important;\n --uni-video-background: transparent !important;\n --uni-background: transparent !important;\n }\n\n /* Sélecteurs très spécifiques pour garantir que les styles s'appliquent */\n .video-container,\n .video-container > div,\n .video-container > div > uni-video-recorder,\n .video-container uni-video-recorder,\n .selfie .video-container,\n .selfie .video-container > div,\n .selfie .video-container uni-video-recorder {\n border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n\n /* Préserver les styles des boutons */\n .selfie button.selfie-button,\n button.selfie-button,\n .selfie-button {\n background-color: ${resolvedBtnBg} !important;\n color: ${resolvedBtnText} !important;\n border-radius: 12px !important;\n }\n\n .selfie button.selfie-button:hover,\n button.selfie-button:hover,\n .selfie-button:hover {\n background-color: ${resolvedBtnBg} !important;\n filter: brightness(1.1);\n }\n\n .selfie button.selfie-button:disabled,\n button.selfie-button:disabled,\n .selfie-button:disabled {\n background-color: #e2e8f0 !important;\n opacity: 0.6 !important;\n }\n `;\n\n // Ajouter l'élément style au head du document\n document.head.appendChild(styleElement);\n\n // Nettoyer en supprimant l'élément style lors du démontage du composant\n return () => {\n const existingStyle = document.getElementById(\n \"video-recorder-custom-styles\"\n );\n if (existingStyle) {\n document.head.removeChild(existingStyle);\n }\n };\n }, [resolvedBtnBg, resolvedBtnText]);\n};\n\nexport default useVideoRecorderStyles;\n"],"names":["useEffect"],"mappings":";;;;;;AAEA;;;AAGG;AACH,IAAM,sBAAsB,GAAG,UAAC,KAAc,EAAE,OAAgB,EAAA;IAC9D,IAAM,aAAa,GAAY,SAAS;IACxC,IAAM,eAAe,GAAc,SAAS;AAE5C,IAAAA,eAAS,CAAC,YAAA;;QAER,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AACpD,QAAA,YAAY,CAAC,EAAE,GAAG,8BAA8B;;QAGhD,YAAY,CAAC,WAAW,GAAG,mpEAAA,CAAA,MAAA,CA6DH,aAAa,0CACxB,eAAe,EAAA,0MAAA,CAAA,CAAA,MAAA,CAOJ,aAAa,EAAA,gRAAA,CAUpC;;AAGD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;;QAGvC,OAAO,YAAA;YACL,IAAM,aAAa,GAAG,QAAQ,CAAC,cAAc,CAC3C,8BAA8B,CAC/B;YACD,IAAI,aAAa,EAAE;AACjB,gBAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;YAC1C;AACF,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;AACtC;;;;"}
@@ -56,10 +56,6 @@ var SessionContent = function (_a) {
56
56
  }
57
57
  }
58
58
  };
59
- // Special check: If session is ended, display EndFlow directly
60
- if ((session === null || session === void 0 ? void 0 : session.status) === "ended") {
61
- return (jsxRuntime.jsx(EndFlow.default, { sessionId: sessionId, sessionStatus: session.status, callbackURL: session === null || session === void 0 ? void 0 : session.callbackURL }));
62
- }
63
59
  // Change languages dynamically based on session template
64
60
  React.useEffect(function () {
65
61
  var _a;
@@ -71,6 +67,10 @@ var SessionContent = function (_a) {
71
67
  }
72
68
  }
73
69
  }, []);
70
+ // Special check: If session is ended, display EndFlow directly
71
+ if ((session === null || session === void 0 ? void 0 : session.status) === "ended") {
72
+ return (jsxRuntime.jsx(EndFlow.default, { sessionId: sessionId, sessionStatus: session.status, callbackURL: session === null || session === void 0 ? void 0 : session.callbackURL }));
73
+ }
74
74
  // Render step content
75
75
  switch (step) {
76
76
  case 0:
@@ -1 +1 @@
1
- {"version":3,"file":"SessionContent.js","sources":["../../../../../src/components/session/SessionContent.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport StartSession from \"../session/StartSession\";\nimport MobileRedirect from \"../session/MobileRedirect\";\nimport EndFlow from \"../session/EndFlow\";\nimport LoadingState from \"../states/LoadingState\";\nimport TemplateNodeRenderer from \"../template/TemplateNodeRenderer\";\nimport { getOrderedJourneySteps } from \"../../services/sessionService\";\nimport type { SessionData, stepObject } from \"../../types/session\";\nimport type { UserInput } from \"../../types/userInput\";\nimport type { ContactInfo } from \"../../types/contactInfo\";\nimport { useI18n } from \"../../hooks/useI18n\";\n\ninterface SessionContentProps {\n step: number;\n loading: boolean;\n session: SessionData | null;\n sessionId: string;\n stepObject: stepObject;\n stepHistory: number[];\n userInput: UserInput;\n setUserInput: React.Dispatch<React.SetStateAction<UserInput>>;\n contactInfo: ContactInfo;\n setContactInfo: React.Dispatch<React.SetStateAction<ContactInfo>>;\n}\n\nconst SessionContent: React.FC<SessionContentProps> = ({\n step,\n loading,\n session,\n sessionId,\n stepObject,\n stepHistory,\n userInput,\n setUserInput,\n contactInfo,\n setContactInfo,\n}) => {\n const { setLanguage, currentLanguage, t } = useI18n();\n // If is mobile template, isMobileCapture should be true for document-selection nodes\n const isMobileTemplate = session?.template?.platforms?.mobile === true;\n const showQRCodeInstructions =\n isMobileTemplate && session?.template?.showQRCode === true;\n const isDesktopAllowed = session?.template?.platforms?.desktop === true;\n\n // Get QR code title and description from Start node\n const startNode = session?.template?.nodes?.find(\n (node: any) => node.type === \"start\"\n );\n const qrCodeTitle = startNode?.qrCodeTitle;\n const qrCodeDescription = startNode?.qrCodeDescription;\n\n // Handle template step progression\n const handleContinueOnPC = () => {\n if (!session?.template) return;\n\n const templateNodes = getOrderedJourneySteps(session.template);\n // When user clicks \"Continue on PC\" from MobileRedirect (step 0.5), go to step 1\n // For other steps, calculate templateIndex normally\n const templateIndex =\n step === 0.5 ? 0 : showQRCodeInstructions ? step - 1.5 : step - 1;\n\n if (templateIndex < templateNodes.length - 1) {\n const nextStep =\n step === 0.5\n ? 1\n : showQRCodeInstructions\n ? templateIndex + 2.5\n : templateIndex + 2;\n stepObject.setStep(nextStep);\n } else {\n // Last step, finish the process\n const endNode = session.template.nodes.find(\n (node: { type: string }) => node.type === \"end\"\n );\n if (endNode) {\n // Continue to the next node which will be the \"end\" node\n stepObject.setStep(\n step === 0.5\n ? 1\n : showQRCodeInstructions\n ? templateIndex + 2.5\n : templateIndex + 2\n );\n } else {\n stepObject.setStep(0);\n }\n }\n };\n\n // Special check: If session is ended, display EndFlow directly\n if (session?.status === \"ended\") {\n return (\n <EndFlow\n sessionId={sessionId}\n sessionStatus={session.status}\n callbackURL={session?.callbackURL}\n />\n );\n }\n\n // Change languages dynamically based on session template\n useEffect(() => {\n if (session?.template?.languages && session.template.languages.length > 0) {\n const language = session.template.languages[0]; // Use the first language\n\n // Check if language is different from current\n if (language !== currentLanguage) {\n setLanguage(language);\n }\n }\n }, []);\n\n // Render step content\n switch (step) {\n case 0:\n return (\n <StartSession\n stepObject={stepObject}\n session={session}\n showQRCodeInstructions={showQRCodeInstructions}\n />\n );\n\n case 0.5:\n // MobileRedirect step - only shown if showQRCodeInstructions is true\n return (\n <MobileRedirect\n sessionId={sessionId}\n onBack={() => stepObject.setStep(0)}\n onContinueOnPC={handleContinueOnPC}\n isDesktopAllowed={isDesktopAllowed}\n title={qrCodeTitle}\n subtitle={qrCodeDescription}\n />\n );\n\n default:\n // From step 1 onwards, use dynamic logic based on template\n if (step >= 1) {\n if (loading) {\n return (\n <LoadingState\n message={t(\"loading.document\")}\n subtitle={t(\"loading.preparing_document\")}\n />\n );\n }\n\n if (session?.template) {\n return (\n <TemplateNodeRenderer\n session={session}\n sessionId={sessionId}\n stepObject={stepObject}\n stepHistory={stepHistory}\n templateIndex={step - 1}\n onContinueOnPC={handleContinueOnPC}\n userInput={userInput}\n setUserInput={setUserInput}\n contactInfo={contactInfo}\n setContactInfo={setContactInfo}\n isMobileTemplate={isMobileTemplate}\n />\n );\n } else {\n console.log(\n \"❌ SessionContent - No template found, showing fallback\"\n );\n // Fallback if template is not available\n return (\n <div className=\"flex flex-col items-center justify-center h-full p-4 text-center\">\n <div className=\"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary mb-4\"></div>\n <h2 className=\"text-xl font-bold text-gray-700 mb-2\">\n {t(\"session_content.preparing_verification\")}\n </h2>\n <p className=\"text-gray-600 mb-4\">\n {t(\"session_content.please_wait\")}\n </p>\n <div className=\"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-4 max-w-xs mx-auto\">\n <p className=\"text-sm text-blue-600\">\n {t(\"session_content.configuring_steps\")}\n </p>\n <button\n onClick={() => window.location.reload()}\n className=\"mt-2 px-3 py-1 bg-blue-600 text-white text-xs rounded\"\n >\n Actualiser si nécessaire\n </button>\n </div>\n </div>\n );\n }\n }\n\n return null;\n }\n};\n\nexport default SessionContent;\n"],"names":["useI18n","getOrderedJourneySteps","_jsx","EndFlow","useEffect","StartSession","MobileRedirect","LoadingState","TemplateNodeRenderer","_jsxs"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAM,cAAc,GAAkC,UAAC,EAWtD,EAAA;;QAVC,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,cAAc,GAAA,EAAA,CAAA,cAAA;AAER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E,OAAO,EAAE,YAAA,EAAM,OAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA,CAAxB,CAAwB,EACvC,SAAS,EAAC,uDAAuD,EAAA,QAAA,EAAA,+BAAA,EAAA,CAG1D,CAAA,EAAA,CACL,CAAA,EAAA,CACF;gBAEV;YACF;AAEA,YAAA,OAAO,IAAI;;AAEjB;;;;"}
1
+ {"version":3,"file":"SessionContent.js","sources":["../../../../../src/components/session/SessionContent.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport StartSession from \"../session/StartSession\";\nimport MobileRedirect from \"../session/MobileRedirect\";\nimport EndFlow from \"../session/EndFlow\";\nimport LoadingState from \"../states/LoadingState\";\nimport TemplateNodeRenderer from \"../template/TemplateNodeRenderer\";\nimport { getOrderedJourneySteps } from \"../../services/sessionService\";\nimport type { SessionData, stepObject } from \"../../types/session\";\nimport type { UserInput } from \"../../types/userInput\";\nimport type { ContactInfo } from \"../../types/contactInfo\";\nimport { useI18n } from \"../../hooks/useI18n\";\n\ninterface SessionContentProps {\n step: number;\n loading: boolean;\n session: SessionData | null;\n sessionId: string;\n stepObject: stepObject;\n stepHistory: number[];\n userInput: UserInput;\n setUserInput: React.Dispatch<React.SetStateAction<UserInput>>;\n contactInfo: ContactInfo;\n setContactInfo: React.Dispatch<React.SetStateAction<ContactInfo>>;\n}\n\nconst SessionContent: React.FC<SessionContentProps> = ({\n step,\n loading,\n session,\n sessionId,\n stepObject,\n stepHistory,\n userInput,\n setUserInput,\n contactInfo,\n setContactInfo,\n}) => {\n const { setLanguage, currentLanguage, t } = useI18n();\n // If is mobile template, isMobileCapture should be true for document-selection nodes\n const isMobileTemplate = session?.template?.platforms?.mobile === true;\n const showQRCodeInstructions =\n isMobileTemplate && session?.template?.showQRCode === true;\n const isDesktopAllowed = session?.template?.platforms?.desktop === true;\n\n // Get QR code title and description from Start node\n const startNode = session?.template?.nodes?.find(\n (node: any) => node.type === \"start\"\n );\n const qrCodeTitle = startNode?.qrCodeTitle;\n const qrCodeDescription = startNode?.qrCodeDescription;\n\n // Handle template step progression\n const handleContinueOnPC = () => {\n if (!session?.template) return;\n\n const templateNodes = getOrderedJourneySteps(session.template);\n // When user clicks \"Continue on PC\" from MobileRedirect (step 0.5), go to step 1\n // For other steps, calculate templateIndex normally\n const templateIndex =\n step === 0.5 ? 0 : showQRCodeInstructions ? step - 1.5 : step - 1;\n\n if (templateIndex < templateNodes.length - 1) {\n const nextStep =\n step === 0.5\n ? 1\n : showQRCodeInstructions\n ? templateIndex + 2.5\n : templateIndex + 2;\n stepObject.setStep(nextStep);\n } else {\n // Last step, finish the process\n const endNode = session.template.nodes.find(\n (node: { type: string }) => node.type === \"end\"\n );\n if (endNode) {\n // Continue to the next node which will be the \"end\" node\n stepObject.setStep(\n step === 0.5\n ? 1\n : showQRCodeInstructions\n ? templateIndex + 2.5\n : templateIndex + 2\n );\n } else {\n stepObject.setStep(0);\n }\n }\n };\n\n // Change languages dynamically based on session template\n useEffect(() => {\n if (session?.template?.languages && session.template.languages.length > 0) {\n const language = session.template.languages[0]; // Use the first language\n\n // Check if language is different from current\n if (language !== currentLanguage) {\n setLanguage(language);\n }\n }\n }, []);\n\n // Special check: If session is ended, display EndFlow directly\n if (session?.status === \"ended\") {\n return (\n <EndFlow\n sessionId={sessionId}\n sessionStatus={session.status}\n callbackURL={session?.callbackURL}\n />\n );\n }\n\n // Render step content\n switch (step) {\n case 0:\n return (\n <StartSession\n stepObject={stepObject}\n session={session}\n showQRCodeInstructions={showQRCodeInstructions}\n />\n );\n\n case 0.5:\n // MobileRedirect step - only shown if showQRCodeInstructions is true\n return (\n <MobileRedirect\n sessionId={sessionId}\n onBack={() => stepObject.setStep(0)}\n onContinueOnPC={handleContinueOnPC}\n isDesktopAllowed={isDesktopAllowed}\n title={qrCodeTitle}\n subtitle={qrCodeDescription}\n />\n );\n\n default:\n // From step 1 onwards, use dynamic logic based on template\n if (step >= 1) {\n if (loading) {\n return (\n <LoadingState\n message={t(\"loading.document\")}\n subtitle={t(\"loading.preparing_document\")}\n />\n );\n }\n\n if (session?.template) {\n return (\n <TemplateNodeRenderer\n session={session}\n sessionId={sessionId}\n stepObject={stepObject}\n stepHistory={stepHistory}\n templateIndex={step - 1}\n onContinueOnPC={handleContinueOnPC}\n userInput={userInput}\n setUserInput={setUserInput}\n contactInfo={contactInfo}\n setContactInfo={setContactInfo}\n isMobileTemplate={isMobileTemplate}\n />\n );\n } else {\n console.log(\n \"❌ SessionContent - No template found, showing fallback\"\n );\n // Fallback if template is not available\n return (\n <div className=\"flex flex-col items-center justify-center h-full p-4 text-center\">\n <div className=\"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary mb-4\"></div>\n <h2 className=\"text-xl font-bold text-gray-700 mb-2\">\n {t(\"session_content.preparing_verification\")}\n </h2>\n <p className=\"text-gray-600 mb-4\">\n {t(\"session_content.please_wait\")}\n </p>\n <div className=\"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-4 max-w-xs mx-auto\">\n <p className=\"text-sm text-blue-600\">\n {t(\"session_content.configuring_steps\")}\n </p>\n <button\n onClick={() => window.location.reload()}\n className=\"mt-2 px-3 py-1 bg-blue-600 text-white text-xs rounded\"\n >\n Actualiser si nécessaire\n </button>\n </div>\n </div>\n );\n }\n }\n\n return null;\n }\n};\n\nexport default SessionContent;\n"],"names":["useI18n","getOrderedJourneySteps","useEffect","_jsx","EndFlow","StartSession","MobileRedirect","LoadingState","TemplateNodeRenderer","_jsxs"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAM,cAAc,GAAkC,UAAC,EAWtD,EAAA;;QAVC,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,SAAS,GAAA,EAAA,CAAA,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AAG,SAAS,EAAC,uBAAuB,EAAA,QAAA,EACjC,CAAC,CAAC,mCAAmC,CAAC,EAAA,CACrC,EACJA,cAAA,CAAA,QAAA,EAAA,EACE,OAAO,EAAE,YAAA,EAAM,OAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA,CAAxB,CAAwB,EACvC,SAAS,EAAC,uDAAuD,EAAA,QAAA,EAAA,+BAAA,EAAA,CAG1D,CAAA,EAAA,CACL,CAAA,EAAA,CACF;gBAEV;YACF;AAEA,YAAA,OAAO,IAAI;;AAEjB;;;;"}
@@ -4,13 +4,15 @@ import { useEffect } from 'react';
4
4
  * Hook personnalisé pour injecter des styles CSS globaux qui ciblent spécifiquement
5
5
  * le composant VideoRecorder d'Unissey et éliminent les bords arrondis et les fonds noirs.
6
6
  */
7
- var useVideoRecorderStyles = function () {
7
+ var useVideoRecorderStyles = function (btnBg, btnText) {
8
+ var resolvedBtnBg = "#11E5C5";
9
+ var resolvedBtnText = "#3C3C40";
8
10
  useEffect(function () {
9
11
  // Créer un élément style pour injecter des règles CSS
10
12
  var styleElement = document.createElement("style");
11
13
  styleElement.id = "video-recorder-custom-styles";
12
14
  // Définir les règles CSS nécessaires pour éliminer les bords arrondis et les fonds noirs
13
- styleElement.textContent = "\n /* Cibler le composant VideoRecorder et tous ses \u00E9l\u00E9ments internes */\n uni-video-recorder,\n uni-video-recorder::shadow-root,\n uni-video-recorder::part(*),\n uni-video-recorder *,\n uni-video-recorder video,\n uni-video-recorder canvas,\n uni-video-recorder div {\n border-radius: 0 !important;\n -webkit-border-radius: 0 !important;\n -moz-border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n \n /* Assurer que la vid\u00E9o prend tout l'espace disponible */\n uni-video-recorder video,\n uni-video-recorder canvas {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n max-height: none !important;\n }\n\n /* iOS-specific fixes for getUserMedia black screen */\n @supports (-webkit-touch-callout: none) {\n uni-video-recorder video {\n -webkit-playsinline: true !important;\n playsinline: true !important;\n autoplay: true !important;\n muted: true !important;\n }\n }\n \n /* Variables CSS globales que le composant pourrait utiliser */\n :root {\n --uni-video-border-radius: 0 !important;\n --uni-border-radius: 0 !important;\n --uni-component-border-radius: 0 !important;\n --uni-video-background: transparent !important;\n --uni-background: transparent !important;\n }\n \n /* S\u00E9lecteurs tr\u00E8s sp\u00E9cifiques pour garantir que les styles s'appliquent */\n .video-container,\n .video-container > div,\n .video-container > div > uni-video-recorder,\n .video-container uni-video-recorder,\n .selfie .video-container,\n .selfie .video-container > div,\n .selfie .video-container uni-video-recorder {\n border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n \n /* Pr\u00E9server les styles des boutons */\n .selfie button.selfie-button,\n button.selfie-button,\n .selfie-button {\n background-color: #11E5C5 !important;\n color: #3C3C40 !important;\n border-radius: 12px !important;\n }\n \n .selfie button.selfie-button:hover,\n button.selfie-button:hover,\n .selfie-button:hover {\n background-color: #7dffeb !important;\n }\n \n .selfie button.selfie-button:disabled,\n button.selfie-button:disabled,\n .selfie-button:disabled {\n background-color: #e2e8f0 !important;\n opacity: 0.6 !important;\n }\n ";
15
+ styleElement.textContent = "\n /* Cibler le composant VideoRecorder et tous ses \u00E9l\u00E9ments internes */\n uni-video-recorder,\n uni-video-recorder::shadow-root,\n uni-video-recorder::part(*),\n uni-video-recorder *,\n uni-video-recorder video,\n uni-video-recorder canvas,\n uni-video-recorder div {\n border-radius: 0 !important;\n -webkit-border-radius: 0 !important;\n -moz-border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n\n /* Assurer que la vid\u00E9o prend tout l'espace disponible */\n uni-video-recorder video,\n uni-video-recorder canvas {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n max-height: none !important;\n }\n\n /* iOS-specific fixes for getUserMedia black screen */\n @supports (-webkit-touch-callout: none) {\n uni-video-recorder video {\n -webkit-playsinline: true !important;\n playsinline: true !important;\n autoplay: true !important;\n muted: true !important;\n }\n }\n\n /* Variables CSS globales que le composant pourrait utiliser */\n :root {\n --uni-video-border-radius: 0 !important;\n --uni-border-radius: 0 !important;\n --uni-component-border-radius: 0 !important;\n --uni-video-background: transparent !important;\n --uni-background: transparent !important;\n }\n\n /* S\u00E9lecteurs tr\u00E8s sp\u00E9cifiques pour garantir que les styles s'appliquent */\n .video-container,\n .video-container > div,\n .video-container > div > uni-video-recorder,\n .video-container uni-video-recorder,\n .selfie .video-container,\n .selfie .video-container > div,\n .selfie .video-container uni-video-recorder {\n border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n\n /* Pr\u00E9server les styles des boutons */\n .selfie button.selfie-button,\n button.selfie-button,\n .selfie-button {\n background-color: ".concat(resolvedBtnBg, " !important;\n color: ").concat(resolvedBtnText, " !important;\n border-radius: 12px !important;\n }\n\n .selfie button.selfie-button:hover,\n button.selfie-button:hover,\n .selfie-button:hover {\n background-color: ").concat(resolvedBtnBg, " !important;\n filter: brightness(1.1);\n }\n\n .selfie button.selfie-button:disabled,\n button.selfie-button:disabled,\n .selfie-button:disabled {\n background-color: #e2e8f0 !important;\n opacity: 0.6 !important;\n }\n ");
14
16
  // Ajouter l'élément style au head du document
15
17
  document.head.appendChild(styleElement);
16
18
  // Nettoyer en supprimant l'élément style lors du démontage du composant
@@ -20,7 +22,7 @@ var useVideoRecorderStyles = function () {
20
22
  document.head.removeChild(existingStyle);
21
23
  }
22
24
  };
23
- }, [btnBg, btnText]);
25
+ }, [resolvedBtnBg, resolvedBtnText]);
24
26
  };
25
27
 
26
28
  export { useVideoRecorderStyles as default };
@@ -1 +1 @@
1
- {"version":3,"file":"useVideoRecorderStyles.js","sources":["../../../../../../src/components/selfie/hooks/useVideoRecorderStyles.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Hook personnalisé pour injecter des styles CSS globaux qui ciblent spécifiquement\n * le composant VideoRecorder d'Unissey et éliminent les bords arrondis et les fonds noirs.\n */\nconst useVideoRecorderStyles = () => {\n useEffect(() => {\n // Créer un élément style pour injecter des règles CSS\n const styleElement = document.createElement(\"style\");\n styleElement.id = \"video-recorder-custom-styles\";\n\n // Définir les règles CSS nécessaires pour éliminer les bords arrondis et les fonds noirs\n styleElement.textContent = `\n /* Cibler le composant VideoRecorder et tous ses éléments internes */\n uni-video-recorder,\n uni-video-recorder::shadow-root,\n uni-video-recorder::part(*),\n uni-video-recorder *,\n uni-video-recorder video,\n uni-video-recorder canvas,\n uni-video-recorder div {\n border-radius: 0 !important;\n -webkit-border-radius: 0 !important;\n -moz-border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n \n /* Assurer que la vidéo prend tout l'espace disponible */\n uni-video-recorder video,\n uni-video-recorder canvas {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n max-height: none !important;\n }\n\n /* iOS-specific fixes for getUserMedia black screen */\n @supports (-webkit-touch-callout: none) {\n uni-video-recorder video {\n -webkit-playsinline: true !important;\n playsinline: true !important;\n autoplay: true !important;\n muted: true !important;\n }\n }\n \n /* Variables CSS globales que le composant pourrait utiliser */\n :root {\n --uni-video-border-radius: 0 !important;\n --uni-border-radius: 0 !important;\n --uni-component-border-radius: 0 !important;\n --uni-video-background: transparent !important;\n --uni-background: transparent !important;\n }\n \n /* Sélecteurs très spécifiques pour garantir que les styles s'appliquent */\n .video-container,\n .video-container > div,\n .video-container > div > uni-video-recorder,\n .video-container uni-video-recorder,\n .selfie .video-container,\n .selfie .video-container > div,\n .selfie .video-container uni-video-recorder {\n border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n \n /* Préserver les styles des boutons */\n .selfie button.selfie-button,\n button.selfie-button,\n .selfie-button {\n background-color: #11E5C5 !important;\n color: #3C3C40 !important;\n border-radius: 12px !important;\n }\n \n .selfie button.selfie-button:hover,\n button.selfie-button:hover,\n .selfie-button:hover {\n background-color: #7dffeb !important;\n }\n \n .selfie button.selfie-button:disabled,\n button.selfie-button:disabled,\n .selfie-button:disabled {\n background-color: #e2e8f0 !important;\n opacity: 0.6 !important;\n }\n `;\n\n // Ajouter l'élément style au head du document\n document.head.appendChild(styleElement);\n\n // Nettoyer en supprimant l'élément style lors du démontage du composant\n return () => {\n const existingStyle = document.getElementById(\n \"video-recorder-custom-styles\"\n );\n if (existingStyle) {\n document.head.removeChild(existingStyle);\n }\n };\n }, [btnBg, btnText]);\n};\n\nexport default useVideoRecorderStyles;\n"],"names":[],"mappings":";;AAEA;;;AAGG;AACH,IAAM,sBAAsB,GAAG,YAAA;AAC7B,IAAA,SAAS,CAAC,YAAA;;QAER,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AACpD,QAAA,YAAY,CAAC,EAAE,GAAG,8BAA8B;;AAGhD,QAAA,YAAY,CAAC,WAAW,GAAG,6pFA8E1B;;AAGD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;;QAGvC,OAAO,YAAA;YACL,IAAM,aAAa,GAAG,QAAQ,CAAC,cAAc,CAC3C,8BAA8B,CAC/B;YACD,IAAI,aAAa,EAAE;AACjB,gBAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;YAC1C;AACF,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACtB;;;;"}
1
+ {"version":3,"file":"useVideoRecorderStyles.js","sources":["../../../../../../src/components/selfie/hooks/useVideoRecorderStyles.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\n/**\n * Hook personnalisé pour injecter des styles CSS globaux qui ciblent spécifiquement\n * le composant VideoRecorder d'Unissey et éliminent les bords arrondis et les fonds noirs.\n */\nconst useVideoRecorderStyles = (btnBg?: string, btnText?: string) => {\n const resolvedBtnBg = btnBg ?? \"#11E5C5\";\n const resolvedBtnText = btnText ?? \"#3C3C40\";\n\n useEffect(() => {\n // Créer un élément style pour injecter des règles CSS\n const styleElement = document.createElement(\"style\");\n styleElement.id = \"video-recorder-custom-styles\";\n\n // Définir les règles CSS nécessaires pour éliminer les bords arrondis et les fonds noirs\n styleElement.textContent = `\n /* Cibler le composant VideoRecorder et tous ses éléments internes */\n uni-video-recorder,\n uni-video-recorder::shadow-root,\n uni-video-recorder::part(*),\n uni-video-recorder *,\n uni-video-recorder video,\n uni-video-recorder canvas,\n uni-video-recorder div {\n border-radius: 0 !important;\n -webkit-border-radius: 0 !important;\n -moz-border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n\n /* Assurer que la vidéo prend tout l'espace disponible */\n uni-video-recorder video,\n uni-video-recorder canvas {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n max-height: none !important;\n }\n\n /* iOS-specific fixes for getUserMedia black screen */\n @supports (-webkit-touch-callout: none) {\n uni-video-recorder video {\n -webkit-playsinline: true !important;\n playsinline: true !important;\n autoplay: true !important;\n muted: true !important;\n }\n }\n\n /* Variables CSS globales que le composant pourrait utiliser */\n :root {\n --uni-video-border-radius: 0 !important;\n --uni-border-radius: 0 !important;\n --uni-component-border-radius: 0 !important;\n --uni-video-background: transparent !important;\n --uni-background: transparent !important;\n }\n\n /* Sélecteurs très spécifiques pour garantir que les styles s'appliquent */\n .video-container,\n .video-container > div,\n .video-container > div > uni-video-recorder,\n .video-container uni-video-recorder,\n .selfie .video-container,\n .selfie .video-container > div,\n .selfie .video-container uni-video-recorder {\n border-radius: 0 !important;\n background: transparent !important;\n overflow: hidden !important;\n }\n\n /* Préserver les styles des boutons */\n .selfie button.selfie-button,\n button.selfie-button,\n .selfie-button {\n background-color: ${resolvedBtnBg} !important;\n color: ${resolvedBtnText} !important;\n border-radius: 12px !important;\n }\n\n .selfie button.selfie-button:hover,\n button.selfie-button:hover,\n .selfie-button:hover {\n background-color: ${resolvedBtnBg} !important;\n filter: brightness(1.1);\n }\n\n .selfie button.selfie-button:disabled,\n button.selfie-button:disabled,\n .selfie-button:disabled {\n background-color: #e2e8f0 !important;\n opacity: 0.6 !important;\n }\n `;\n\n // Ajouter l'élément style au head du document\n document.head.appendChild(styleElement);\n\n // Nettoyer en supprimant l'élément style lors du démontage du composant\n return () => {\n const existingStyle = document.getElementById(\n \"video-recorder-custom-styles\"\n );\n if (existingStyle) {\n document.head.removeChild(existingStyle);\n }\n };\n }, [resolvedBtnBg, resolvedBtnText]);\n};\n\nexport default useVideoRecorderStyles;\n"],"names":[],"mappings":";;AAEA;;;AAGG;AACH,IAAM,sBAAsB,GAAG,UAAC,KAAc,EAAE,OAAgB,EAAA;IAC9D,IAAM,aAAa,GAAY,SAAS;IACxC,IAAM,eAAe,GAAc,SAAS;AAE5C,IAAA,SAAS,CAAC,YAAA;;QAER,IAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AACpD,QAAA,YAAY,CAAC,EAAE,GAAG,8BAA8B;;QAGhD,YAAY,CAAC,WAAW,GAAG,mpEAAA,CAAA,MAAA,CA6DH,aAAa,0CACxB,eAAe,EAAA,0MAAA,CAAA,CAAA,MAAA,CAOJ,aAAa,EAAA,gRAAA,CAUpC;;AAGD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;;QAGvC,OAAO,YAAA;YACL,IAAM,aAAa,GAAG,QAAQ,CAAC,cAAc,CAC3C,8BAA8B,CAC/B;YACD,IAAI,aAAa,EAAE;AACjB,gBAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;YAC1C;AACF,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;AACtC;;;;"}
@@ -52,10 +52,6 @@ var SessionContent = function (_a) {
52
52
  }
53
53
  }
54
54
  };
55
- // Special check: If session is ended, display EndFlow directly
56
- if ((session === null || session === void 0 ? void 0 : session.status) === "ended") {
57
- return (jsx(EndFlow, { sessionId: sessionId, sessionStatus: session.status, callbackURL: session === null || session === void 0 ? void 0 : session.callbackURL }));
58
- }
59
55
  // Change languages dynamically based on session template
60
56
  useEffect(function () {
61
57
  var _a;
@@ -67,6 +63,10 @@ var SessionContent = function (_a) {
67
63
  }
68
64
  }
69
65
  }, []);
66
+ // Special check: If session is ended, display EndFlow directly
67
+ if ((session === null || session === void 0 ? void 0 : session.status) === "ended") {
68
+ return (jsx(EndFlow, { sessionId: sessionId, sessionStatus: session.status, callbackURL: session === null || session === void 0 ? void 0 : session.callbackURL }));
69
+ }
70
70
  // Render step content
71
71
  switch (step) {
72
72
  case 0:
@@ -1 +1 @@
1
- {"version":3,"file":"SessionContent.js","sources":["../../../../../src/components/session/SessionContent.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport StartSession from \"../session/StartSession\";\nimport MobileRedirect from \"../session/MobileRedirect\";\nimport EndFlow from \"../session/EndFlow\";\nimport LoadingState from \"../states/LoadingState\";\nimport TemplateNodeRenderer from \"../template/TemplateNodeRenderer\";\nimport { getOrderedJourneySteps } from \"../../services/sessionService\";\nimport type { SessionData, stepObject } from \"../../types/session\";\nimport type { UserInput } from \"../../types/userInput\";\nimport type { ContactInfo } from \"../../types/contactInfo\";\nimport { useI18n } from \"../../hooks/useI18n\";\n\ninterface SessionContentProps {\n step: number;\n loading: boolean;\n session: SessionData | null;\n sessionId: string;\n stepObject: stepObject;\n stepHistory: number[];\n userInput: UserInput;\n setUserInput: React.Dispatch<React.SetStateAction<UserInput>>;\n contactInfo: ContactInfo;\n setContactInfo: React.Dispatch<React.SetStateAction<ContactInfo>>;\n}\n\nconst SessionContent: React.FC<SessionContentProps> = ({\n step,\n loading,\n session,\n sessionId,\n stepObject,\n stepHistory,\n userInput,\n setUserInput,\n contactInfo,\n setContactInfo,\n}) => {\n const { setLanguage, currentLanguage, t } = useI18n();\n // If is mobile template, isMobileCapture should be true for document-selection nodes\n const isMobileTemplate = session?.template?.platforms?.mobile === true;\n const showQRCodeInstructions =\n isMobileTemplate && session?.template?.showQRCode === true;\n const isDesktopAllowed = session?.template?.platforms?.desktop === true;\n\n // Get QR code title and description from Start node\n const startNode = session?.template?.nodes?.find(\n (node: any) => node.type === \"start\"\n );\n const qrCodeTitle = startNode?.qrCodeTitle;\n const qrCodeDescription = startNode?.qrCodeDescription;\n\n // Handle template step progression\n const handleContinueOnPC = () => {\n if (!session?.template) return;\n\n const templateNodes = getOrderedJourneySteps(session.template);\n // When user clicks \"Continue on PC\" from MobileRedirect (step 0.5), go to step 1\n // For other steps, calculate templateIndex normally\n const templateIndex =\n step === 0.5 ? 0 : showQRCodeInstructions ? step - 1.5 : step - 1;\n\n if (templateIndex < templateNodes.length - 1) {\n const nextStep =\n step === 0.5\n ? 1\n : showQRCodeInstructions\n ? templateIndex + 2.5\n : templateIndex + 2;\n stepObject.setStep(nextStep);\n } else {\n // Last step, finish the process\n const endNode = session.template.nodes.find(\n (node: { type: string }) => node.type === \"end\"\n );\n if (endNode) {\n // Continue to the next node which will be the \"end\" node\n stepObject.setStep(\n step === 0.5\n ? 1\n : showQRCodeInstructions\n ? templateIndex + 2.5\n : templateIndex + 2\n );\n } else {\n stepObject.setStep(0);\n }\n }\n };\n\n // Special check: If session is ended, display EndFlow directly\n if (session?.status === \"ended\") {\n return (\n <EndFlow\n sessionId={sessionId}\n sessionStatus={session.status}\n callbackURL={session?.callbackURL}\n />\n );\n }\n\n // Change languages dynamically based on session template\n useEffect(() => {\n if (session?.template?.languages && session.template.languages.length > 0) {\n const language = session.template.languages[0]; // Use the first language\n\n // Check if language is different from current\n if (language !== currentLanguage) {\n setLanguage(language);\n }\n }\n }, []);\n\n // Render step content\n switch (step) {\n case 0:\n return (\n <StartSession\n stepObject={stepObject}\n session={session}\n showQRCodeInstructions={showQRCodeInstructions}\n />\n );\n\n case 0.5:\n // MobileRedirect step - only shown if showQRCodeInstructions is true\n return (\n <MobileRedirect\n sessionId={sessionId}\n onBack={() => stepObject.setStep(0)}\n onContinueOnPC={handleContinueOnPC}\n isDesktopAllowed={isDesktopAllowed}\n title={qrCodeTitle}\n subtitle={qrCodeDescription}\n />\n );\n\n default:\n // From step 1 onwards, use dynamic logic based on template\n if (step >= 1) {\n if (loading) {\n return (\n <LoadingState\n message={t(\"loading.document\")}\n subtitle={t(\"loading.preparing_document\")}\n />\n );\n }\n\n if (session?.template) {\n return (\n <TemplateNodeRenderer\n session={session}\n sessionId={sessionId}\n stepObject={stepObject}\n stepHistory={stepHistory}\n templateIndex={step - 1}\n onContinueOnPC={handleContinueOnPC}\n userInput={userInput}\n setUserInput={setUserInput}\n contactInfo={contactInfo}\n setContactInfo={setContactInfo}\n isMobileTemplate={isMobileTemplate}\n />\n );\n } else {\n console.log(\n \"❌ SessionContent - No template found, showing fallback\"\n );\n // Fallback if template is not available\n return (\n <div className=\"flex flex-col items-center justify-center h-full p-4 text-center\">\n <div className=\"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary mb-4\"></div>\n <h2 className=\"text-xl font-bold text-gray-700 mb-2\">\n {t(\"session_content.preparing_verification\")}\n </h2>\n <p className=\"text-gray-600 mb-4\">\n {t(\"session_content.please_wait\")}\n </p>\n <div className=\"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-4 max-w-xs mx-auto\">\n <p className=\"text-sm text-blue-600\">\n {t(\"session_content.configuring_steps\")}\n </p>\n <button\n onClick={() => window.location.reload()}\n className=\"mt-2 px-3 py-1 bg-blue-600 text-white text-xs rounded\"\n >\n Actualiser si nécessaire\n </button>\n </div>\n </div>\n );\n }\n }\n\n return null;\n }\n};\n\nexport default SessionContent;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;AAyBA,IAAM,cAAc,GAAkC,UAAC,EAWtD,EAAA;;QAVC,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,SAAS,GAAA,EAAA,C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G,SAAS,EAAC,uBAAuB,EAAA,QAAA,EACjC,CAAC,CAAC,mCAAmC,CAAC,EAAA,CACrC,EACJA,GAAA,CAAA,QAAA,EAAA,EACE,OAAO,EAAE,YAAA,EAAM,OAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA,CAAxB,CAAwB,EACvC,SAAS,EAAC,uDAAuD,EAAA,QAAA,EAAA,+BAAA,EAAA,CAG1D,CAAA,EAAA,CACL,CAAA,EAAA,CACF;gBAEV;YACF;AAEA,YAAA,OAAO,IAAI;;AAEjB;;;;"}
1
+ {"version":3,"file":"SessionContent.js","sources":["../../../../../src/components/session/SessionContent.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport StartSession from \"../session/StartSession\";\nimport MobileRedirect from \"../session/MobileRedirect\";\nimport EndFlow from \"../session/EndFlow\";\nimport LoadingState from \"../states/LoadingState\";\nimport TemplateNodeRenderer from \"../template/TemplateNodeRenderer\";\nimport { getOrderedJourneySteps } from \"../../services/sessionService\";\nimport type { SessionData, stepObject } from \"../../types/session\";\nimport type { UserInput } from \"../../types/userInput\";\nimport type { ContactInfo } from \"../../types/contactInfo\";\nimport { useI18n } from \"../../hooks/useI18n\";\n\ninterface SessionContentProps {\n step: number;\n loading: boolean;\n session: SessionData | null;\n sessionId: string;\n stepObject: stepObject;\n stepHistory: number[];\n userInput: UserInput;\n setUserInput: React.Dispatch<React.SetStateAction<UserInput>>;\n contactInfo: ContactInfo;\n setContactInfo: React.Dispatch<React.SetStateAction<ContactInfo>>;\n}\n\nconst SessionContent: React.FC<SessionContentProps> = ({\n step,\n loading,\n session,\n sessionId,\n stepObject,\n stepHistory,\n userInput,\n setUserInput,\n contactInfo,\n setContactInfo,\n}) => {\n const { setLanguage, currentLanguage, t } = useI18n();\n // If is mobile template, isMobileCapture should be true for document-selection nodes\n const isMobileTemplate = session?.template?.platforms?.mobile === true;\n const showQRCodeInstructions =\n isMobileTemplate && session?.template?.showQRCode === true;\n const isDesktopAllowed = session?.template?.platforms?.desktop === true;\n\n // Get QR code title and description from Start node\n const startNode = session?.template?.nodes?.find(\n (node: any) => node.type === \"start\"\n );\n const qrCodeTitle = startNode?.qrCodeTitle;\n const qrCodeDescription = startNode?.qrCodeDescription;\n\n // Handle template step progression\n const handleContinueOnPC = () => {\n if (!session?.template) return;\n\n const templateNodes = getOrderedJourneySteps(session.template);\n // When user clicks \"Continue on PC\" from MobileRedirect (step 0.5), go to step 1\n // For other steps, calculate templateIndex normally\n const templateIndex =\n step === 0.5 ? 0 : showQRCodeInstructions ? step - 1.5 : step - 1;\n\n if (templateIndex < templateNodes.length - 1) {\n const nextStep =\n step === 0.5\n ? 1\n : showQRCodeInstructions\n ? templateIndex + 2.5\n : templateIndex + 2;\n stepObject.setStep(nextStep);\n } else {\n // Last step, finish the process\n const endNode = session.template.nodes.find(\n (node: { type: string }) => node.type === \"end\"\n );\n if (endNode) {\n // Continue to the next node which will be the \"end\" node\n stepObject.setStep(\n step === 0.5\n ? 1\n : showQRCodeInstructions\n ? templateIndex + 2.5\n : templateIndex + 2\n );\n } else {\n stepObject.setStep(0);\n }\n }\n };\n\n // Change languages dynamically based on session template\n useEffect(() => {\n if (session?.template?.languages && session.template.languages.length > 0) {\n const language = session.template.languages[0]; // Use the first language\n\n // Check if language is different from current\n if (language !== currentLanguage) {\n setLanguage(language);\n }\n }\n }, []);\n\n // Special check: If session is ended, display EndFlow directly\n if (session?.status === \"ended\") {\n return (\n <EndFlow\n sessionId={sessionId}\n sessionStatus={session.status}\n callbackURL={session?.callbackURL}\n />\n );\n }\n\n // Render step content\n switch (step) {\n case 0:\n return (\n <StartSession\n stepObject={stepObject}\n session={session}\n showQRCodeInstructions={showQRCodeInstructions}\n />\n );\n\n case 0.5:\n // MobileRedirect step - only shown if showQRCodeInstructions is true\n return (\n <MobileRedirect\n sessionId={sessionId}\n onBack={() => stepObject.setStep(0)}\n onContinueOnPC={handleContinueOnPC}\n isDesktopAllowed={isDesktopAllowed}\n title={qrCodeTitle}\n subtitle={qrCodeDescription}\n />\n );\n\n default:\n // From step 1 onwards, use dynamic logic based on template\n if (step >= 1) {\n if (loading) {\n return (\n <LoadingState\n message={t(\"loading.document\")}\n subtitle={t(\"loading.preparing_document\")}\n />\n );\n }\n\n if (session?.template) {\n return (\n <TemplateNodeRenderer\n session={session}\n sessionId={sessionId}\n stepObject={stepObject}\n stepHistory={stepHistory}\n templateIndex={step - 1}\n onContinueOnPC={handleContinueOnPC}\n userInput={userInput}\n setUserInput={setUserInput}\n contactInfo={contactInfo}\n setContactInfo={setContactInfo}\n isMobileTemplate={isMobileTemplate}\n />\n );\n } else {\n console.log(\n \"❌ SessionContent - No template found, showing fallback\"\n );\n // Fallback if template is not available\n return (\n <div className=\"flex flex-col items-center justify-center h-full p-4 text-center\">\n <div className=\"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary mb-4\"></div>\n <h2 className=\"text-xl font-bold text-gray-700 mb-2\">\n {t(\"session_content.preparing_verification\")}\n </h2>\n <p className=\"text-gray-600 mb-4\">\n {t(\"session_content.please_wait\")}\n </p>\n <div className=\"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-4 max-w-xs mx-auto\">\n <p className=\"text-sm text-blue-600\">\n {t(\"session_content.configuring_steps\")}\n </p>\n <button\n onClick={() => window.location.reload()}\n className=\"mt-2 px-3 py-1 bg-blue-600 text-white text-xs rounded\"\n >\n Actualiser si nécessaire\n </button>\n </div>\n </div>\n );\n }\n }\n\n return null;\n }\n};\n\nexport default SessionContent;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;AAyBA,IAAM,cAAc,GAAkC,UAAC,EAWtD,EAAA;;QAVC,IAAI,GAAA,EAAA,CAAA,IAAA,EACJ,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,WAAW,GAAA,EAAA,CAAA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FD,GAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,uBAAuB,EAAA,QAAA,EACjC,CAAC,CAAC,mCAAmC,CAAC,EAAA,CACrC,EACJA,GAAA,CAAA,QAAA,EAAA,EACE,OAAO,EAAE,YAAA,EAAM,OAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA,CAAxB,CAAwB,EACvC,SAAS,EAAC,uDAAuD,EAAA,QAAA,EAAA,+BAAA,EAAA,CAG1D,CAAA,EAAA,CACL,CAAA,EAAA,CACF;gBAEV;YACF;AAEA,YAAA,OAAO,IAAI;;AAEjB;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datakeen-session-react",
3
- "version": "1.1.157",
3
+ "version": "1.1.159",
4
4
  "description": "React SDK component to manage and render Datakeen session experiences easily.",
5
5
  "publishConfig": {
6
6
  "access": "public",