iatoolkit 0.50.2__tar.gz → 0.55.0__tar.gz
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.
Potentially problematic release.
This version of iatoolkit might be problematic. Click here for more details.
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/PKG-INFO +1 -1
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/pyproject.toml +1 -1
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/common/routes.py +5 -5
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/iatoolkit.py +7 -1
- iatoolkit-0.55.0/src/iatoolkit/static/js/chat_onboarding.js +98 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/styles/chat_iatoolkit.css +0 -1
- iatoolkit-0.55.0/src/iatoolkit/static/styles/onboarding.css +169 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/_login_widget.html +1 -1
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/base.html +1 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/chat.html +49 -6
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/chat_modals.html +33 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/login_test.html +2 -2
- iatoolkit-0.55.0/src/iatoolkit/templates/onboarding_shell.html +101 -0
- iatoolkit-0.55.0/src/iatoolkit/views/base_login_view.py +68 -0
- iatoolkit-0.55.0/src/iatoolkit/views/external_login_view.py +70 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/login_test_view.py +16 -1
- iatoolkit-0.55.0/src/iatoolkit/views/login_view.py +116 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit.egg-info/PKG-INFO +1 -1
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit.egg-info/SOURCES.txt +3 -0
- iatoolkit-0.50.2/src/iatoolkit/templates/onboarding_shell.html +0 -167
- iatoolkit-0.50.2/src/iatoolkit/views/external_login_view.py +0 -93
- iatoolkit-0.50.2/src/iatoolkit/views/login_view.py +0 -159
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/readme.md +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/requirements.txt +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/setup.cfg +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/__init__.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/base_company.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/cli_commands.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/common/__init__.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/common/exceptions.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/common/session_manager.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/common/util.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/company_registry.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/__init__.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/call_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/connectors/__init__.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/connectors/file_connector.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/connectors/file_connector_factory.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/connectors/google_cloud_storage_connector.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/connectors/google_drive_connector.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/connectors/local_file_connector.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/connectors/s3_connector.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/gemini_adapter.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/google_chat_app.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/llm_client.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/llm_proxy.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/llm_response.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/mail_app.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/openai_adapter.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/infra/redis_session_manager.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/repositories/__init__.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/repositories/database_manager.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/repositories/document_repo.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/repositories/llm_query_repo.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/repositories/models.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/repositories/profile_repo.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/repositories/tasks_repo.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/repositories/vs_repo.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/__init__.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/auth_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/benchmark_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/branding_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/dispatcher_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/document_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/excel_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/file_processor_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/history_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/jwt_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/load_documents_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/mail_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/onboarding_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/profile_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/prompt_manager_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/query_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/search_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/sql_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/tasks_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/user_feedback_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/services/user_session_context_service.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/arrow_up.png +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/diagrama_iatoolkit.jpg +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/logo_clinica.png +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/logo_iatoolkit.png +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/logo_maxxa.png +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/logo_notaria.png +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/logo_tarjeta.png +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/logo_umayor.png +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/images/upload.png +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/js/chat_feedback.js +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/js/chat_filepond.js +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/js/chat_history.js +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/js/chat_main.js +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/styles/chat_info.css +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/styles/chat_modal.css +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/styles/landing_page.css +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/static/styles/llm_output.css +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/system_prompts/format_styles.prompt +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/system_prompts/query_main.prompt +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/system_prompts/sql_rules.prompt +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/_branding_styles.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/_navbar.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/about.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/change_password.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/error.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/forgot_password.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/header.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/index.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/signup.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/templates/test.html +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/__init__.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/change_password_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/chat_token_request_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/file_store_api_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/forgot_password_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/history_api_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/index_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/init_context_api_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/llmquery_api_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/llmquery_web_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/prompt_api_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/signup_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/tasks_review_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/tasks_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/user_feedback_api_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit/views/verify_user_view.py +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit.egg-info/dependency_links.txt +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit.egg-info/requires.txt +0 -0
- {iatoolkit-0.50.2 → iatoolkit-0.55.0}/src/iatoolkit.egg-info/top_level.txt +0 -0
|
@@ -26,8 +26,8 @@ def register_views(injector, app):
|
|
|
26
26
|
from iatoolkit.views.tasks_view import TaskView
|
|
27
27
|
from iatoolkit.views.tasks_review_view import TaskReviewView
|
|
28
28
|
from iatoolkit.views.login_test_view import LoginTest
|
|
29
|
-
from iatoolkit.views.login_view import LoginView,
|
|
30
|
-
from iatoolkit.views.external_login_view import
|
|
29
|
+
from iatoolkit.views.login_view import LoginView, FinalizeContextView
|
|
30
|
+
from iatoolkit.views.external_login_view import ExternalLoginView
|
|
31
31
|
from iatoolkit.views.signup_view import SignupView
|
|
32
32
|
from iatoolkit.views.verify_user_view import VerifyAccountView
|
|
33
33
|
from iatoolkit.views.forgot_password_view import ForgotPasswordView
|
|
@@ -46,8 +46,8 @@ def register_views(injector, app):
|
|
|
46
46
|
|
|
47
47
|
# this functions are for login external users (with api-key)
|
|
48
48
|
# only the first one should be used from an external app
|
|
49
|
-
app.add_url_rule('/<company_short_name>/
|
|
50
|
-
view_func=
|
|
49
|
+
app.add_url_rule('/<company_short_name>/external_login',
|
|
50
|
+
view_func=ExternalLoginView.as_view('external_login'))
|
|
51
51
|
|
|
52
52
|
# this endpoint is for requesting a chat token for external users
|
|
53
53
|
app.add_url_rule('/auth/chat_token',
|
|
@@ -55,8 +55,8 @@ def register_views(injector, app):
|
|
|
55
55
|
|
|
56
56
|
# login for the iatoolkit integrated frontend
|
|
57
57
|
# this is the main login endpoint for the frontend
|
|
58
|
-
app.add_url_rule('/<company_short_name>/chat', view_func=InitiateLoginView.as_view('chat'))
|
|
59
58
|
app.add_url_rule('/<company_short_name>/login', view_func=LoginView.as_view('login'))
|
|
59
|
+
app.add_url_rule('/<company_short_name>/finalize_context_load', view_func=FinalizeContextView.as_view('finalize_context_load'))
|
|
60
60
|
|
|
61
61
|
# register new user, account verification and forgot password
|
|
62
62
|
app.add_url_rule('/<company_short_name>/signup',view_func=SignupView.as_view('signup'))
|
|
@@ -19,7 +19,7 @@ from werkzeug.middleware.proxy_fix import ProxyFix
|
|
|
19
19
|
from injector import Binder, singleton, Injector
|
|
20
20
|
from importlib.metadata import version as _pkg_version, PackageNotFoundError
|
|
21
21
|
|
|
22
|
-
IATOOLKIT_VERSION = "0.
|
|
22
|
+
IATOOLKIT_VERSION = "0.55.0"
|
|
23
23
|
|
|
24
24
|
# global variable for the unique instance of IAToolkit
|
|
25
25
|
_iatoolkit_instance: Optional['IAToolkit'] = None
|
|
@@ -360,6 +360,10 @@ class IAToolkit:
|
|
|
360
360
|
@self.app.context_processor
|
|
361
361
|
def inject_globals():
|
|
362
362
|
from iatoolkit.common.session_manager import SessionManager
|
|
363
|
+
from iatoolkit.services.profile_service import ProfileService
|
|
364
|
+
|
|
365
|
+
profile_service = self._injector.get(ProfileService)
|
|
366
|
+
user_profile = profile_service.get_current_session_info().get('profile', {})
|
|
363
367
|
|
|
364
368
|
return {
|
|
365
369
|
'url_for': url_for,
|
|
@@ -367,6 +371,8 @@ class IAToolkit:
|
|
|
367
371
|
'app_name': 'IAToolkit',
|
|
368
372
|
'user_identifier': SessionManager.get('user_identifier'),
|
|
369
373
|
'company_short_name': SessionManager.get('company_short_name'),
|
|
374
|
+
'user_is_local': user_profile.get('user_is_local'),
|
|
375
|
+
'user_email': user_profile.get('user_email'),
|
|
370
376
|
'iatoolkit_base_url': os.environ.get('IATOOLKIT_BASE_URL', ''),
|
|
371
377
|
}
|
|
372
378
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// static/js/chat_onboarding.js
|
|
2
|
+
(function (global) {
|
|
3
|
+
function qs(root, sel) { return (typeof sel === 'string') ? root.querySelector(sel) : sel; }
|
|
4
|
+
|
|
5
|
+
function createDots(container, count, activeIdx, activeColor) {
|
|
6
|
+
container.innerHTML = '';
|
|
7
|
+
for (let i = 0; i < count; i++) {
|
|
8
|
+
const d = document.createElement('div');
|
|
9
|
+
if (i === activeIdx) d.classList.add('active');
|
|
10
|
+
d.style.width = '10px';
|
|
11
|
+
d.style.height = '10px';
|
|
12
|
+
d.style.borderRadius = '50%';
|
|
13
|
+
d.style.backgroundColor = i === activeIdx ? (activeColor || 'var(--brand-primary-color, #FF5100)') : '#ddd';
|
|
14
|
+
d.style.transition = 'background-color .3s';
|
|
15
|
+
container.appendChild(d);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function initOnboarding(opts) {
|
|
20
|
+
const {
|
|
21
|
+
mode = 'modal',
|
|
22
|
+
cards = [],
|
|
23
|
+
ui = {},
|
|
24
|
+
autoRotateMs = 5000,
|
|
25
|
+
shell = {}
|
|
26
|
+
} = opts;
|
|
27
|
+
|
|
28
|
+
const root = document;
|
|
29
|
+
const elIcon = qs(root, ui.icon);
|
|
30
|
+
const elTitle = qs(root, ui.title);
|
|
31
|
+
const elText = qs(root, ui.text);
|
|
32
|
+
const elDots = qs(root, ui.dots);
|
|
33
|
+
const elPrev = qs(root, ui.prev);
|
|
34
|
+
const elNext = qs(root, ui.next);
|
|
35
|
+
|
|
36
|
+
let idx = 0;
|
|
37
|
+
let autoTimer = null;
|
|
38
|
+
|
|
39
|
+
function hasCards() { return Array.isArray(cards) && cards.length > 0; }
|
|
40
|
+
|
|
41
|
+
function render() {
|
|
42
|
+
if (!hasCards()) return;
|
|
43
|
+
const c = cards[idx] || {};
|
|
44
|
+
if (elIcon) elIcon.innerHTML = `<i class="${c.icon || 'bi bi-lightbulb'}"></i>`;
|
|
45
|
+
if (elTitle) elTitle.textContent = c.title || '';
|
|
46
|
+
if (elText) elText.innerHTML = c.text || '';
|
|
47
|
+
if (elDots) createDots(elDots, cards.length, idx);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function next() { if (!hasCards()) return; idx = (idx + 1) % cards.length; render(); }
|
|
51
|
+
function prev() { if (!hasCards()) return; idx = (idx - 1 + cards.length) % cards.length; render(); }
|
|
52
|
+
|
|
53
|
+
function startAuto() {
|
|
54
|
+
stopAuto();
|
|
55
|
+
if (!hasCards()) return;
|
|
56
|
+
autoTimer = setInterval(next, autoRotateMs);
|
|
57
|
+
}
|
|
58
|
+
function stopAuto() { if (autoTimer) { clearInterval(autoTimer); autoTimer = null; } }
|
|
59
|
+
|
|
60
|
+
function setupShellIfNeeded() {
|
|
61
|
+
if (mode !== 'shell') return;
|
|
62
|
+
const loader = ui.loader ? qs(root, ui.loader) : null;
|
|
63
|
+
const container = ui.container ? qs(root, ui.container) : null;
|
|
64
|
+
if (!container || !shell.iframeSrc) return;
|
|
65
|
+
|
|
66
|
+
const iframe = document.createElement('iframe');
|
|
67
|
+
iframe.src = shell.iframeSrc;
|
|
68
|
+
iframe.style.width = '100%';
|
|
69
|
+
iframe.style.height = '100%';
|
|
70
|
+
iframe.style.border = 'none';
|
|
71
|
+
iframe.style.display = 'none';
|
|
72
|
+
|
|
73
|
+
iframe.onload = function () {
|
|
74
|
+
iframe.style.display = 'block';
|
|
75
|
+
if (loader) {
|
|
76
|
+
loader.style.opacity = '0';
|
|
77
|
+
setTimeout(() => loader.style.display = 'none', 500);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
container.appendChild(iframe);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (elPrev) elPrev.addEventListener('click', () => { prev(); startAuto(); });
|
|
84
|
+
if (elNext) elNext.addEventListener('click', () => { next(); startAuto(); });
|
|
85
|
+
|
|
86
|
+
function start() {
|
|
87
|
+
idx = 0;
|
|
88
|
+
render();
|
|
89
|
+
startAuto();
|
|
90
|
+
if (mode === 'shell') setupShellIfNeeded();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return { start, stop: stopAuto, next, prev, hasCards };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Export global
|
|
97
|
+
global.initOnboarding = initOnboarding;
|
|
98
|
+
})(window);
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/* static/css/onboarding.css */
|
|
2
|
+
|
|
3
|
+
/* Fuente base para ambos contextos */
|
|
4
|
+
.ob-root {
|
|
5
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Tarjeta */
|
|
9
|
+
.ob-card {
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
border-radius: 12px;
|
|
12
|
+
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
|
|
13
|
+
padding: 30px;
|
|
14
|
+
width: 90%;
|
|
15
|
+
max-width: 450px;
|
|
16
|
+
text-align: center;
|
|
17
|
+
transition: opacity 0.3s ease-in-out;
|
|
18
|
+
margin: 0 auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Contenido de tarjeta */
|
|
22
|
+
.ob-icon {
|
|
23
|
+
font-size: 40px;
|
|
24
|
+
color: var(--brand-primary-color, #FF5100);
|
|
25
|
+
margin-bottom: 15px;
|
|
26
|
+
}
|
|
27
|
+
.ob-title {
|
|
28
|
+
font-size: 1.25rem;
|
|
29
|
+
color: #333;
|
|
30
|
+
margin-bottom: 10px;
|
|
31
|
+
}
|
|
32
|
+
.ob-text {
|
|
33
|
+
font-size: 0.95rem;
|
|
34
|
+
color: #666;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
min-height: 60px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Navegación */
|
|
40
|
+
.ob-nav {
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: space-between;
|
|
43
|
+
align-items: center;
|
|
44
|
+
margin-top: 20px;
|
|
45
|
+
}
|
|
46
|
+
.ob-btn {
|
|
47
|
+
background-color: var(--brand-secondary-color, #06326B);
|
|
48
|
+
border: none;
|
|
49
|
+
color: var(--brand-text-on-secondary, #FFFFFF);
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
width: 40px;
|
|
52
|
+
height: 40px;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
transition: opacity 0.2s;
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
}
|
|
59
|
+
.ob-btn:hover { opacity: 0.85; }
|
|
60
|
+
|
|
61
|
+
/* Dots */
|
|
62
|
+
.ob-dots {
|
|
63
|
+
display: flex;
|
|
64
|
+
gap: 8px;
|
|
65
|
+
}
|
|
66
|
+
.ob-dots > div {
|
|
67
|
+
width: 10px;
|
|
68
|
+
height: 10px;
|
|
69
|
+
border-radius: 50%;
|
|
70
|
+
background-color: #ddd;
|
|
71
|
+
transition: background-color 0.3s;
|
|
72
|
+
}
|
|
73
|
+
.ob-dots > div.active {
|
|
74
|
+
background-color: var(--brand-primary-color, #FF5100);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Encabezado reutilizable (si se usa) */
|
|
78
|
+
.ob-brand-header {
|
|
79
|
+
font-size: 2rem;
|
|
80
|
+
font-weight: 700;
|
|
81
|
+
margin-bottom: 24px;
|
|
82
|
+
color: var(--brand-secondary-color, #06326B);
|
|
83
|
+
text-align: center;
|
|
84
|
+
}
|
|
85
|
+
.ob-brand-header .brand-name {
|
|
86
|
+
color: var(--brand-primary-color, #FF5100);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Utilidades */
|
|
90
|
+
.ob-fade {
|
|
91
|
+
transition: opacity 0.5s ease-in-out;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Responsivo */
|
|
95
|
+
@media (max-width: 420px) {
|
|
96
|
+
.ob-card { padding: 24px; }
|
|
97
|
+
.ob-icon { font-size: 34px; }
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Overlay a pantalla completa */
|
|
101
|
+
.onboarding-shell-root {
|
|
102
|
+
position: relative;
|
|
103
|
+
height: calc(100vh - 0px);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Centrado vertical y horizontal del contenido del loader */
|
|
107
|
+
#loader-wrapper {
|
|
108
|
+
position: absolute; inset: 0;
|
|
109
|
+
background-color: #f4f7f6;
|
|
110
|
+
z-index: 1000;
|
|
111
|
+
display: flex; align-items: center; justify-content: center;
|
|
112
|
+
padding: 20px; box-sizing: border-box;
|
|
113
|
+
transition: opacity 0.5s ease-in-out;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Pila vertical: header + tarjeta + banda de carga */
|
|
117
|
+
.ob-stack {
|
|
118
|
+
width: 100%;
|
|
119
|
+
max-width: 520px; /* ligeramente más que la tarjeta para respiración */
|
|
120
|
+
display: flex;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
align-items: stretch; /* la tarjeta ocupa el ancho */
|
|
123
|
+
gap: 16px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Header de marca consistente */
|
|
127
|
+
.ob-brand-header {
|
|
128
|
+
font-size: 2rem;
|
|
129
|
+
font-weight: 700;
|
|
130
|
+
margin: 0;
|
|
131
|
+
color: var(--brand-secondary-color, #06326B);
|
|
132
|
+
text-align: center;
|
|
133
|
+
}
|
|
134
|
+
.ob-brand-header .brand-name {
|
|
135
|
+
color: var(--brand-primary-color, #FF5100);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Banda de estado integrada visualmente con la tarjeta */
|
|
139
|
+
.ob-loading-band {
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
gap: 12px;
|
|
144
|
+
padding: 12px 14px;
|
|
145
|
+
background: #ffffff;
|
|
146
|
+
border-radius: 12px;
|
|
147
|
+
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Spinner */
|
|
151
|
+
.spinner {
|
|
152
|
+
width: 28px; height: 28px;
|
|
153
|
+
border: 4px solid rgba(0,0,0,0.1);
|
|
154
|
+
border-top-color: var(--brand-primary-color, #FF5100);
|
|
155
|
+
border-radius: 50%;
|
|
156
|
+
animation: spin 1s linear infinite;
|
|
157
|
+
}
|
|
158
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
159
|
+
|
|
160
|
+
#loading-status p {
|
|
161
|
+
font-size: 0.95rem;
|
|
162
|
+
font-weight: 500;
|
|
163
|
+
color: #555;
|
|
164
|
+
margin: 0;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Iframe contenedor */
|
|
168
|
+
#content-container { width: 100%; height: 100%; }
|
|
169
|
+
#content-container iframe { width: 100%; height: 100%; border: none; }
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<!-- 2. Formulario de Inicio de Sesión -->
|
|
12
12
|
<form id="login-form"
|
|
13
|
-
action="{{ url_for('
|
|
13
|
+
action="{{ url_for('login', company_short_name=company_short_name) }}"
|
|
14
14
|
method="post">
|
|
15
15
|
<div class="mb-3">
|
|
16
16
|
<label for="email" class="form-label d-block">Correo Electrónico</label>
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/filepond/dist/filepond.min.css">
|
|
11
11
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
|
12
12
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles/chat_iatoolkit.css', _external=True) }}">
|
|
13
|
+
<link rel="stylesheet" href="{{ url_for('static', filename='styles/onboarding.css', _external=True) }}">
|
|
13
14
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles/chat_modal.css', _external=True) }}">
|
|
14
15
|
<link rel="stylesheet" href="{{ url_for('static', filename='styles/llm_output.css', _external=True) }}">
|
|
15
16
|
</head>
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
<style>
|
|
8
8
|
{{ branding.css_variables | safe }}
|
|
9
9
|
</style>
|
|
10
|
+
<link rel="stylesheet" href="{{ url_for('static', filename='css/onboarding.css', _external=True) }}">
|
|
11
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
|
12
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
10
13
|
|
|
11
14
|
<!-- Sección de encabezado con el usuario conectado -->
|
|
12
15
|
<div id="company-section" class="company-section d-flex justify-content-between align-items-center px-3 py-2"
|
|
@@ -49,6 +52,11 @@
|
|
|
49
52
|
class="ms-3 action-icon-style" title="Tu feedback es muy importante" style="color: {{ branding.header_text_color }};">
|
|
50
53
|
<i class="bi bi-emoji-smile"></i>
|
|
51
54
|
</a>
|
|
55
|
+
<a href="javascript:void(0);" id="onboarding-button"
|
|
56
|
+
class="ms-3 action-icon-style" title="Ver onboarding"
|
|
57
|
+
style="color: {{ branding.header_text_color }};">
|
|
58
|
+
<i class="bi bi-lightbulb"></i>
|
|
59
|
+
</a>
|
|
52
60
|
|
|
53
61
|
<!-- Icono de cerrar sesión (al final) -->
|
|
54
62
|
{% if user_is_local %}
|
|
@@ -174,20 +182,16 @@
|
|
|
174
182
|
window.iatoolkit_base_url = "{{ iatoolkit_base_url }}";
|
|
175
183
|
window.availablePrompts = {{ prompts.message | tojson }};
|
|
176
184
|
window.sendButtonColor = "{{ branding.send_button_color }}";
|
|
177
|
-
|
|
178
|
-
{% if auth_method == 'jwt' and session_jwt %}
|
|
179
|
-
// Store session JWT if it exists, defined in the same global scope
|
|
180
|
-
window.sessionJWT = "{{ session_jwt }}";
|
|
181
|
-
{% endif %}
|
|
185
|
+
window.onboardingCards = {{ onboarding_cards | tojson }};
|
|
182
186
|
</script>
|
|
183
187
|
|
|
184
188
|
<!-- Carga de los scripts JS externos después de definir las variables globales -->
|
|
189
|
+
<script src="{{ url_for('static', filename='js/chat_onboarding.js', _external=True) }}"></script>
|
|
185
190
|
<script src="{{ url_for('static', filename='js/chat_filepond.js', _external=True) }}"></script>
|
|
186
191
|
<script src="{{ url_for('static', filename='js/chat_history.js', _external=True) }}"></script>
|
|
187
192
|
<script src="{{ url_for('static', filename='js/chat_feedback.js', _external=True) }}"></script>
|
|
188
193
|
<script src="{{ url_for('static', filename='js/chat_main.js', _external=True) }}"></script>
|
|
189
194
|
|
|
190
|
-
|
|
191
195
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css">
|
|
192
196
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
193
197
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
|
|
@@ -274,5 +278,44 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
274
278
|
});
|
|
275
279
|
});
|
|
276
280
|
});
|
|
281
|
+
|
|
282
|
+
// Inicialización del modal de onboarding
|
|
283
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
284
|
+
const btn = document.getElementById('onboarding-button');
|
|
285
|
+
if (!btn) return;
|
|
286
|
+
|
|
287
|
+
const modalEl = document.getElementById('onboardingModal');
|
|
288
|
+
const modal = new bootstrap.Modal(modalEl);
|
|
289
|
+
|
|
290
|
+
if (!window.initOnboarding) {
|
|
291
|
+
console.error('initOnboarding no disponible. Verifica chat_onboarding.js');
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const onboarding = initOnboarding({
|
|
296
|
+
mode: 'modal',
|
|
297
|
+
cards: Array.isArray(window.onboardingCards) ? window.onboardingCards : [],
|
|
298
|
+
ui: {
|
|
299
|
+
icon: '#ob-icon',
|
|
300
|
+
title: '#ob-title',
|
|
301
|
+
text: '#ob-text',
|
|
302
|
+
dots: '#ob-dots',
|
|
303
|
+
prev: '#ob-prev',
|
|
304
|
+
next: '#ob-next'
|
|
305
|
+
},
|
|
306
|
+
autoRotateMs: 5000
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
modalEl.addEventListener('hidden.bs.modal', () => onboarding.stop());
|
|
310
|
+
|
|
311
|
+
btn.addEventListener('click', () => {
|
|
312
|
+
if (!onboarding.hasCards()) {
|
|
313
|
+
toastr.info('No hay información de onboarding disponible.');
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
onboarding.start();
|
|
317
|
+
modal.show();
|
|
318
|
+
});
|
|
319
|
+
});
|
|
277
320
|
</script>
|
|
278
321
|
{% endblock %}
|
|
@@ -109,4 +109,37 @@
|
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
111
111
|
</div>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
<!-- Modal de Onboarding -->
|
|
115
|
+
<div class="modal fade" id="onboardingModal" tabindex="-1" aria-labelledby="onboardingModalLabel" aria-hidden="true">
|
|
116
|
+
<div class="modal-dialog modal-dialog-centered">
|
|
117
|
+
<div class="modal-content" style="border-radius:12px;">
|
|
118
|
+
<div class="modal-header">
|
|
119
|
+
<h5 class="modal-title w-100 text-center" id="onboardingModalLabel" style="color: var(--brand-primary-color, #FF5100);">
|
|
120
|
+
Bienvenido a {{ branding.name }}
|
|
121
|
+
</h5>
|
|
122
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Cerrar"></button>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<div class="modal-body ob-root">
|
|
126
|
+
<div id="ob-card" class="ob-card">
|
|
127
|
+
<div id="ob-icon" class="ob-icon"><i class="bi bi-lightbulb"></i></div>
|
|
128
|
+
<h6 id="ob-title" class="ob-title"></h6>
|
|
129
|
+
<div id="ob-text" class="ob-text"></div>
|
|
130
|
+
<div class="ob-nav">
|
|
131
|
+
<button id="ob-prev" class="ob-btn" aria-label="Anterior"><i class="bi bi-chevron-left"></i></button>
|
|
132
|
+
<div id="ob-dots" class="ob-dots"></div>
|
|
133
|
+
<button id="ob-next" class="ob-btn" aria-label="Siguiente"><i class="bi bi-chevron-right"></i></button>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div class="modal-footer">
|
|
139
|
+
<button id="ob-close" type="button" class="btn btn-branded-secondary" data-bs-dismiss="modal">
|
|
140
|
+
Cerrar
|
|
141
|
+
</button>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
112
145
|
</div>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
|
|
73
73
|
// Actualizar action del formulario "Iniciar Sesión"
|
|
74
74
|
if (selectedCompany && selectedCompany.trim() !== '') {
|
|
75
|
-
const loginAction = '/' + selectedCompany + '/
|
|
75
|
+
const loginAction = '/' + selectedCompany + '/external_login';
|
|
76
76
|
$('#login-form').attr('action', loginAction); // Actualizamos la URL del form
|
|
77
77
|
} else {
|
|
78
78
|
$('#login-form').attr('action', '#'); // URL genérica si no hay selección
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
fetch(`/${selectedCompany}/
|
|
119
|
+
fetch(`/${selectedCompany}/external_login`, {
|
|
120
120
|
method: 'POST',
|
|
121
121
|
headers: {
|
|
122
122
|
'Content-Type': 'application/json',
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block title %}Iniciando {{ branding.name | default('IAToolkit') }} IA...{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block styles %}
|
|
6
|
+
<link rel="stylesheet" href="{{ url_for('static', filename='styles/llm_output.css', _external=True) }}?v=6">
|
|
7
|
+
<link rel="stylesheet" href="{{ url_for('static', filename='css/onboarding.css', _external=True) }}?v=6">
|
|
8
|
+
<style>
|
|
9
|
+
.onboarding-shell-root { position: relative; height: 100vh; }
|
|
10
|
+
.onboarding-shell-root #loader-wrapper { position: absolute; inset: 0; background: #f4f7f6; z-index: 1000; display:flex; align-items:center; justify-content:center; padding:20px; box-sizing:border-box; transition: opacity .5s; }
|
|
11
|
+
.onboarding-shell-root .ob-stack { width:100%; max-width:520px; display:flex; flex-direction:column; gap:16px; }
|
|
12
|
+
.onboarding-shell-root .ob-loading-band { display:flex; align-items:center; justify-content:center; gap:12px; padding:12px 14px; background:#fff; border-radius:12px; box-shadow:0 4px 20px rgba(0,0,0,.08); }
|
|
13
|
+
.onboarding-shell-root .spinner { width:28px; height:28px; border:4px solid rgba(0,0,0,.1); border-top-color: var(--brand-primary-color, #FF5100); border-radius:50%; animation: spin 1s linear infinite; }
|
|
14
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
15
|
+
.onboarding-shell-root #content-container { width:100%; height:100%; }
|
|
16
|
+
.onboarding-shell-root #content-container iframe { width:100%; height:100%; border:none; }
|
|
17
|
+
|
|
18
|
+
/* Forzar colores de marca (sube especificidad y evita overrides) */
|
|
19
|
+
.onboarding-shell-root .ob-brand-header { color: var(--brand-secondary-color, #06326B) !important; }
|
|
20
|
+
.onboarding-shell-root .ob-brand-header .brand-name { color: var(--brand-primary-color, #FF5100) !important; }
|
|
21
|
+
.onboarding-shell-root .ob-icon { color: var(--brand-primary-color, #FF5100) !important; }
|
|
22
|
+
.onboarding-shell-root .ob-btn { background-color: var(--brand-secondary-color, #06326B) !important; color: var(--brand-text-on-secondary, #FFFFFF) !important; border:none !important; }
|
|
23
|
+
.onboarding-shell-root .ob-dots > div.active { background-color: var(--brand-primary-color, #FF5100) !important; }
|
|
24
|
+
</style>
|
|
25
|
+
{% if branding and branding.css_variables %}
|
|
26
|
+
<style>
|
|
27
|
+
{{ branding.css_variables|safe }}
|
|
28
|
+
</style>
|
|
29
|
+
{% endif %}
|
|
30
|
+
{% endblock %}
|
|
31
|
+
|
|
32
|
+
{% block content %}
|
|
33
|
+
<div class="onboarding-shell-root ob-root">
|
|
34
|
+
<div id="loader-wrapper">
|
|
35
|
+
<div class="ob-stack">
|
|
36
|
+
<h1 id="ob-brand-header" class="ob-brand-header">
|
|
37
|
+
<span class="brand-name text-brand-primary">{{ branding.name | default('IAToolkit') }}</span>
|
|
38
|
+
<span class="brand-rest"> IA</span>
|
|
39
|
+
</h1>
|
|
40
|
+
|
|
41
|
+
<div id="card-container" class="ob-card">
|
|
42
|
+
<div id="card-icon" class="ob-icon"><i class="fas fa-lightbulb"></i></div>
|
|
43
|
+
<h3 id="card-title" class="ob-title">Título de la Tarjeta</h3>
|
|
44
|
+
<p id="card-text" class="ob-text">Descripción de la tarjeta de capacitación.</p>
|
|
45
|
+
<div class="ob-nav">
|
|
46
|
+
<button id="prev-card" class="ob-btn btn-branded-primary" aria-label="Anterior">
|
|
47
|
+
<i class="fas fa-chevron-left"></i>
|
|
48
|
+
</button>
|
|
49
|
+
<div id="progress-dots" class="ob-dots"></div>
|
|
50
|
+
<button id="next-card" class="ob-btn btn-branded-primary" aria-label="Siguiente">
|
|
51
|
+
<i class="fas fa-chevron-right"></i>
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div id="loading-status" class="ob-loading-band">
|
|
57
|
+
<div class="spinner"></div>
|
|
58
|
+
<p>Inicializando el contexto de {{ branding.name }} para la IA...</p>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div id="content-container"></div>
|
|
64
|
+
</div>
|
|
65
|
+
{% endblock %}
|
|
66
|
+
|
|
67
|
+
{% block scripts %}
|
|
68
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
|
69
|
+
|
|
70
|
+
<script src="{{ url_for('static', filename='js/chat_onboarding.js', _external=True) }}"></script>
|
|
71
|
+
<script>
|
|
72
|
+
(function() {
|
|
73
|
+
const cardsData = {{ onboarding_cards | tojson }};
|
|
74
|
+
const iframeSrc = "{{ iframe_src_url }}";
|
|
75
|
+
|
|
76
|
+
if (!window.initOnboarding) {
|
|
77
|
+
console.error('initOnboarding no está disponible. Verifica la carga de chat_onboarding.js');
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const onboarding = initOnboarding({
|
|
82
|
+
mode: 'shell',
|
|
83
|
+
cards: cardsData,
|
|
84
|
+
ui: {
|
|
85
|
+
icon: '#card-icon',
|
|
86
|
+
title: '#card-title',
|
|
87
|
+
text: '#card-text',
|
|
88
|
+
dots: '#progress-dots',
|
|
89
|
+
prev: '#prev-card',
|
|
90
|
+
next: '#next-card',
|
|
91
|
+
loader: '#loader-wrapper',
|
|
92
|
+
container: '#content-container'
|
|
93
|
+
},
|
|
94
|
+
autoRotateMs: 5000,
|
|
95
|
+
shell: { iframeSrc: iframeSrc }
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
onboarding.start();
|
|
99
|
+
})();
|
|
100
|
+
</script>
|
|
101
|
+
{% endblock %}
|