@aakash58/chatbot 1.1.20 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +17 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +41 -0
- package/.vscode/settings.json +14 -0
- package/.vscode/tasks.json +60 -0
- package/README.md +298 -22
- package/angular.json +132 -0
- package/docs/PUBLISHING_GUIDE.md +104 -0
- package/package.json +75 -29
- package/projects/app-doohbot/public/assets/const/app-const.json +15 -0
- package/projects/app-doohbot/public/assets/const/doohclick_license.json +6 -0
- package/projects/app-doohbot/public/favicon.ico +0 -0
- package/projects/app-doohbot/src/app/app.config.ts +13 -0
- package/projects/app-doohbot/src/app/app.html +31 -0
- package/projects/app-doohbot/src/app/app.routes.ts +3 -0
- package/projects/app-doohbot/src/app/app.scss +279 -0
- package/projects/app-doohbot/src/app/app.spec.ts +23 -0
- package/projects/app-doohbot/src/app/app.ts +72 -0
- package/projects/app-doohbot/src/index.html +15 -0
- package/projects/app-doohbot/src/main.ts +6 -0
- package/projects/app-doohbot/src/styles.scss +15 -0
- package/projects/app-doohbot/tsconfig.app.json +15 -0
- package/projects/app-doohbot/tsconfig.spec.json +14 -0
- package/projects/doohbot/README.md +64 -0
- package/projects/doohbot/docs/README.md +140 -0
- package/projects/doohbot/ng-package.json +10 -0
- package/projects/doohbot/package.json +16 -0
- package/projects/doohbot/src/lib/app/chat/chat-ui-state.service.ts +194 -0
- package/projects/doohbot/src/lib/app/chat/chat.service.ts +547 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.html +27 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.scss +115 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.ts +35 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.html +3 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.scss +20 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.ts +12 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.html +34 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.scss +78 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.ts +52 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.html +77 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.scss +346 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.ts +188 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.html +146 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.scss +187 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.ts +256 -0
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.html +17 -0
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.scss +59 -0
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.ts +28 -0
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.html +138 -0
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.scss +436 -0
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.ts +106 -0
- package/projects/doohbot/src/lib/app/chat/model/chat-history.model.ts +57 -0
- package/projects/doohbot/src/lib/app/chat/model/chat-request.model.ts +17 -0
- package/projects/doohbot/src/lib/app/chat/model/chat-response.model.ts +9 -0
- package/projects/doohbot/src/lib/app/chat/model/chat-session.model.ts +14 -0
- package/{lib/app/chat/model/chat-stream-message.model.d.ts → projects/doohbot/src/lib/app/chat/model/chat-stream-message.model.ts} +6 -5
- package/projects/doohbot/src/lib/app/chat/model/chat-stream-response.model.ts +12 -0
- package/projects/doohbot/src/lib/app/chat/services/chat-api.service.ts +82 -0
- package/projects/doohbot/src/lib/app/chat/services/chat-audio.service.ts +44 -0
- package/projects/doohbot/src/lib/app/chat/services/chat-history.service.ts +303 -0
- package/projects/doohbot/src/lib/app/login/login-form.component.html +80 -0
- package/projects/doohbot/src/lib/app/login/login-form.component.scss +189 -0
- package/projects/doohbot/src/lib/app/login/login-form.component.ts +45 -0
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.html +81 -0
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.scss +179 -0
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.ts +217 -0
- package/projects/doohbot/src/lib/app/personalization/personalization.service.ts +197 -0
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.html +111 -0
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.scss +218 -0
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.ts +121 -0
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.html +46 -0
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.scss +138 -0
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.ts +28 -0
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/color-picker-dialog.component.ts +92 -0
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.html +198 -0
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.scss +107 -0
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.ts +103 -0
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.html +46 -0
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.scss +131 -0
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.ts +23 -0
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.html +33 -0
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.scss +61 -0
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.ts +20 -0
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.html +30 -0
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.scss +59 -0
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.ts +12 -0
- package/projects/doohbot/src/lib/constant/doohbot-constant.ts +40 -0
- package/projects/doohbot/src/lib/constant/html-entities.ts +8 -0
- package/projects/doohbot/src/lib/constant/utf8.ts +9 -0
- package/projects/doohbot/src/lib/core/app-const.ts +63 -0
- package/projects/doohbot/src/lib/core/auth/account-api.service.ts +53 -0
- package/projects/doohbot/src/lib/core/auth/auth.service.ts +478 -0
- package/projects/doohbot/src/lib/core/auth/models/auth-result.model.ts +4 -0
- package/projects/doohbot/src/lib/core/auth/models/federated-login-request.model.ts +5 -0
- package/projects/doohbot/src/lib/core/auth/models/login-request.model.ts +6 -0
- package/projects/doohbot/src/lib/core/auth/storage.service.ts +113 -0
- package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.directive.ts +123 -0
- package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.module.ts +9 -0
- package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.directive.ts +58 -0
- package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.module.ts +9 -0
- package/projects/doohbot/src/lib/core/directives/popout/popout.directive.ts +169 -0
- package/projects/doohbot/src/lib/core/directives/popout/popout.module.ts +9 -0
- package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.directive.ts +197 -0
- package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.module.ts +9 -0
- package/projects/doohbot/src/lib/core/enums/api-request-state.enum.ts +9 -0
- package/projects/doohbot/src/lib/core/environments/environment.prod.ts +14 -0
- package/projects/doohbot/src/lib/core/environments/environment.ts +14 -0
- package/projects/doohbot/src/lib/core/helpers/crypto-helper.service.ts +72 -0
- package/projects/doohbot/src/lib/core/http/http-stream.service.ts +105 -0
- package/projects/doohbot/src/lib/core/http/http.service.ts +148 -0
- package/projects/doohbot/src/lib/core/interceptors/auth.interceptor.ts +118 -0
- package/projects/doohbot/src/lib/core/interceptors/license.interceptor.ts +50 -0
- package/projects/doohbot/src/lib/core/models/api-config.model.ts +82 -0
- package/projects/doohbot/src/lib/core/models/api-request.model.ts +92 -0
- package/projects/doohbot/src/lib/core/models/api-response.model.ts +13 -0
- package/projects/doohbot/src/lib/core/models/doohbot-config.model.ts +109 -0
- package/{lib/core/models/license.model.d.ts → projects/doohbot/src/lib/core/models/license.model.ts} +27 -23
- package/projects/doohbot/src/lib/core/models/message.ts +18 -0
- package/projects/doohbot/src/lib/core/models/theme-config.model.ts +48 -0
- package/projects/doohbot/src/lib/core/services/core-config.service.ts +53 -0
- package/projects/doohbot/src/lib/core/services/doohbot-api.service.ts +207 -0
- package/projects/doohbot/src/lib/core/services/license.service.ts +171 -0
- package/projects/doohbot/src/lib/core/services/markdown.service.ts +73 -0
- package/projects/doohbot/src/lib/core/services/theme.service.ts +305 -0
- package/{lib/core/types/auth-mode.type.d.ts → projects/doohbot/src/lib/core/types/auth-mode.type.ts} +4 -4
- package/{lib/core/types/auth-status.type.d.ts → projects/doohbot/src/lib/core/types/auth-status.type.ts} +5 -4
- package/{lib/core/types/chat-stream.type.d.ts → projects/doohbot/src/lib/core/types/chat-stream.type.ts} +4 -4
- package/{lib/core/types/message-role.type.d.ts → projects/doohbot/src/lib/core/types/message-role.type.ts} +4 -4
- package/{lib/core/types/prompt-mode.type.d.ts → projects/doohbot/src/lib/core/types/prompt-mode.type.ts} +5 -4
- package/{lib/core/types/snackbar-error.type.d.ts → projects/doohbot/src/lib/core/types/snackbar-error.type.ts} +5 -4
- package/{lib/core/types/tenant-resolution-strategy.type.d.ts → projects/doohbot/src/lib/core/types/tenant-resolution-strategy.type.ts} +4 -4
- package/projects/doohbot/src/lib/core/utils/error-handler.util.ts +31 -0
- package/projects/doohbot/src/lib/core/utils/logger.service.ts +45 -0
- package/projects/doohbot/src/lib/doohbot-input.ts +19 -0
- package/projects/doohbot/src/lib/doohbot.component.html +34 -0
- package/projects/doohbot/src/lib/doohbot.component.scss +17 -0
- package/projects/doohbot/src/lib/doohbot.component.spec.ts +31 -0
- package/projects/doohbot/src/lib/doohbot.component.ts +545 -0
- package/projects/doohbot/src/lib/elements.ts +25 -0
- package/projects/doohbot/src/lib/predefined_messages.ts +14 -0
- package/projects/doohbot/src/lib/shared/chips/chips.component.html +9 -0
- package/projects/doohbot/src/lib/shared/chips/chips.component.scss +29 -0
- package/projects/doohbot/src/lib/shared/chips/chips.component.spec.ts +22 -0
- package/projects/doohbot/src/lib/shared/chips/chips.component.ts +20 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.html +29 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.scss +100 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.ts +42 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.service.ts +62 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.utils.ts +102 -0
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.html +30 -0
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.scss +53 -0
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.spec.ts +22 -0
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.ts +35 -0
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.html +16 -0
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.scss +45 -0
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.ts +46 -0
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.html +5 -0
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.scss +0 -0
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.spec.ts +22 -0
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.ts +20 -0
- package/projects/doohbot/src/lib/shared/pipes/simple-markdown.pipe.ts +19 -0
- package/projects/doohbot/src/lib/shared/popout/popout.html +1 -0
- package/projects/doohbot/src/lib/shared/popout/popout.scss +0 -0
- package/projects/doohbot/src/lib/shared/popout/popout.spec.ts +23 -0
- package/projects/doohbot/src/lib/shared/popout/popout.ts +11 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.html +7 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.scss +125 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.spec.ts +21 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.ts +44 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.service.ts +54 -0
- package/{lib/shared/snackbar/snackbar.utils.d.ts → projects/doohbot/src/lib/shared/snackbar/snackbar.utils.ts} +49 -33
- package/projects/doohbot/src/lib/styles/_theme.scss +132 -0
- package/projects/doohbot/src/lib/styles/material-override.scss +302 -0
- package/projects/doohbot/src/lib/styles/utility.scss +588 -0
- package/projects/doohbot/src/public-api.ts +42 -0
- package/projects/doohbot/tsconfig.lib.json +15 -0
- package/projects/doohbot/tsconfig.lib.prod.json +11 -0
- package/projects/doohbot/tsconfig.spec.json +10 -0
- package/proxy.conf.json +8 -0
- package/publish.config.js +25 -0
- package/scripts/publishing/index.ts +67 -0
- package/scripts/publishing/pipeline/01-clean.ts +11 -0
- package/scripts/publishing/pipeline/02-validate-pre.ts +8 -0
- package/scripts/publishing/pipeline/03-build.ts +7 -0
- package/scripts/publishing/pipeline/04-validate-post.ts +8 -0
- package/scripts/publishing/pipeline/05-prepare-package.ts +29 -0
- package/scripts/publishing/pipeline/06-version.ts +23 -0
- package/scripts/publishing/pipeline/07-publish.ts +14 -0
- package/scripts/publishing/pipeline/08-cleanup.ts +5 -0
- package/scripts/publishing/types.ts +36 -0
- package/scripts/publishing/utils/command.ts +15 -0
- package/scripts/publishing/utils/config.ts +17 -0
- package/scripts/validate.ts +166 -0
- package/tsconfig.json +45 -0
- package/tsconfig.scripts.json +15 -0
- package/esm2022/aakash58-chatbot.mjs +0 -5
- package/esm2022/lib/app/chat/chat-ui-state.service.mjs +0 -170
- package/esm2022/lib/app/chat/chat.service.mjs +0 -445
- package/esm2022/lib/app/chat/components/chat-button/chat-button.component.mjs +0 -50
- package/esm2022/lib/app/chat/components/chat-footer/chat-footer.component.mjs +0 -12
- package/esm2022/lib/app/chat/components/chat-header/chat-header.component.mjs +0 -66
- package/esm2022/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.mjs +0 -186
- package/esm2022/lib/app/chat/components/chat-window/chat-window.component.mjs +0 -312
- package/esm2022/lib/app/chat/components/message-input/message-input.component.mjs +0 -36
- package/esm2022/lib/app/chat/components/message-list/message-list.component.mjs +0 -115
- package/esm2022/lib/app/chat/model/chat-history.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-request.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-response.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-session.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-stream-message.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-stream-response.model.mjs +0 -2
- package/esm2022/lib/app/chat/services/chat-api.service.mjs +0 -61
- package/esm2022/lib/app/chat/services/chat-audio.service.mjs +0 -50
- package/esm2022/lib/app/chat/services/chat-history.service.mjs +0 -252
- package/esm2022/lib/app/login/login-form.component.mjs +0 -46
- package/esm2022/lib/app/personalization/personalization-dialog.component.mjs +0 -194
- package/esm2022/lib/app/personalization/personalization.service.mjs +0 -149
- package/esm2022/lib/app/personalization/sections/account/account-section.component.mjs +0 -122
- package/esm2022/lib/app/personalization/sections/preferences/color-picker-dialog.component.mjs +0 -86
- package/esm2022/lib/app/personalization/sections/preferences/preferences-section.component.mjs +0 -115
- package/esm2022/lib/app/personalization/sections/profile/profile-section.component.mjs +0 -29
- package/esm2022/lib/app/personalization/sections/settings/setting-section.component.mjs +0 -30
- package/esm2022/lib/app/personalization/sections/terms/terms-section.component.mjs +0 -12
- package/esm2022/lib/constant/doohbot-constant.mjs +0 -28
- package/esm2022/lib/constant/html-entities.mjs +0 -9
- package/esm2022/lib/constant/utf8.mjs +0 -10
- package/esm2022/lib/core/app-const.mjs +0 -61
- package/esm2022/lib/core/auth/account-api.service.mjs +0 -40
- package/esm2022/lib/core/auth/auth.service.mjs +0 -391
- package/esm2022/lib/core/auth/models/auth-result.model.mjs +0 -3
- package/esm2022/lib/core/auth/models/federated-login-request.model.mjs +0 -6
- package/esm2022/lib/core/auth/models/login-request.model.mjs +0 -6
- package/esm2022/lib/core/auth/storage.service.mjs +0 -110
- package/esm2022/lib/core/directives/draggable/draggable-dialog.directive.mjs +0 -112
- package/esm2022/lib/core/directives/fullscreen/fullscreen.directive.mjs +0 -55
- package/esm2022/lib/core/directives/resizable/resizable-dialog.directive.mjs +0 -179
- package/esm2022/lib/core/environments/environment.mjs +0 -15
- package/esm2022/lib/core/environments/environment.prod.mjs +0 -15
- package/esm2022/lib/core/helpers/crypto-helper.service.mjs +0 -52
- package/esm2022/lib/core/http/http-stream.service.mjs +0 -97
- package/esm2022/lib/core/http/http.service.mjs +0 -103
- package/esm2022/lib/core/interceptors/auth.interceptor.mjs +0 -96
- package/esm2022/lib/core/interceptors/license.interceptor.mjs +0 -44
- package/esm2022/lib/core/models/api-config.model.mjs +0 -18
- package/esm2022/lib/core/models/api-request.model.mjs +0 -2
- package/esm2022/lib/core/models/api-response.model.mjs +0 -8
- package/esm2022/lib/core/models/doohbot-config.model.mjs +0 -18
- package/esm2022/lib/core/models/license.model.mjs +0 -2
- package/esm2022/lib/core/models/message.mjs +0 -2
- package/esm2022/lib/core/models/theme-config.model.mjs +0 -2
- package/esm2022/lib/core/services/core-config.service.mjs +0 -52
- package/esm2022/lib/core/services/license.service.mjs +0 -145
- package/esm2022/lib/core/services/markdown.service.mjs +0 -64
- package/esm2022/lib/core/services/theme.service.mjs +0 -248
- package/esm2022/lib/core/types/auth-mode.type.mjs +0 -2
- package/esm2022/lib/core/types/auth-status.type.mjs +0 -5
- package/esm2022/lib/core/types/chat-stream.type.mjs +0 -2
- package/esm2022/lib/core/types/message-role.type.mjs +0 -2
- package/esm2022/lib/core/types/prompt-mode.type.mjs +0 -5
- package/esm2022/lib/core/types/snackbar-error.type.mjs +0 -5
- package/esm2022/lib/core/types/tenant-resolution-strategy.type.mjs +0 -2
- package/esm2022/lib/core/utils/logger.service.mjs +0 -42
- package/esm2022/lib/doohbot-input.mjs +0 -20
- package/esm2022/lib/doohbot.component.mjs +0 -444
- package/esm2022/lib/predefined_messages.mjs +0 -15
- package/esm2022/lib/shared/chips/chips.component.mjs +0 -28
- package/esm2022/lib/shared/dialog/dialog.component.mjs +0 -36
- package/esm2022/lib/shared/dialog/dialog.service.mjs +0 -64
- package/esm2022/lib/shared/dialog/dialog.utils.mjs +0 -85
- package/esm2022/lib/shared/dropdown-menu/dropdown-menu.component.mjs +0 -29
- package/esm2022/lib/shared/input-dialog/input-dialog.component.mjs +0 -38
- package/esm2022/lib/shared/menu-item/menu-item.component.mjs +0 -24
- package/esm2022/lib/shared/pipes/simple-markdown.pipe.mjs +0 -27
- package/esm2022/lib/shared/snackbar/snackbar.component.mjs +0 -43
- package/esm2022/lib/shared/snackbar/snackbar.service.mjs +0 -46
- package/esm2022/lib/shared/snackbar/snackbar.utils.mjs +0 -43
- package/esm2022/public-api.mjs +0 -37
- package/fesm2022/aakash58-chatbot.mjs +0 -5193
- package/fesm2022/aakash58-chatbot.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/app/chat/chat-ui-state.service.d.ts +0 -96
- package/lib/app/chat/chat.service.d.ts +0 -88
- package/lib/app/chat/components/chat-button/chat-button.component.d.ts +0 -16
- package/lib/app/chat/components/chat-footer/chat-footer.component.d.ts +0 -5
- package/lib/app/chat/components/chat-header/chat-header.component.d.ts +0 -24
- package/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.d.ts +0 -49
- package/lib/app/chat/components/chat-window/chat-window.component.d.ts +0 -107
- package/lib/app/chat/components/message-input/message-input.component.d.ts +0 -12
- package/lib/app/chat/components/message-list/message-list.component.d.ts +0 -40
- package/lib/app/chat/model/chat-history.model.d.ts +0 -51
- package/lib/app/chat/model/chat-request.model.d.ts +0 -10
- package/lib/app/chat/model/chat-response.model.d.ts +0 -9
- package/lib/app/chat/model/chat-session.model.d.ts +0 -12
- package/lib/app/chat/model/chat-stream-response.model.d.ts +0 -10
- package/lib/app/chat/services/chat-api.service.d.ts +0 -30
- package/lib/app/chat/services/chat-audio.service.d.ts +0 -19
- package/lib/app/chat/services/chat-history.service.d.ts +0 -53
- package/lib/app/login/login-form.component.d.ts +0 -20
- package/lib/app/personalization/personalization-dialog.component.d.ts +0 -53
- package/lib/app/personalization/personalization.service.d.ts +0 -66
- package/lib/app/personalization/sections/account/account-section.component.d.ts +0 -30
- package/lib/app/personalization/sections/preferences/color-picker-dialog.component.d.ts +0 -17
- package/lib/app/personalization/sections/preferences/preferences-section.component.d.ts +0 -27
- package/lib/app/personalization/sections/profile/profile-section.component.d.ts +0 -17
- package/lib/app/personalization/sections/settings/setting-section.component.d.ts +0 -10
- package/lib/app/personalization/sections/terms/terms-section.component.d.ts +0 -5
- package/lib/constant/doohbot-constant.d.ts +0 -12
- package/lib/constant/html-entities.d.ts +0 -8
- package/lib/constant/utf8.d.ts +0 -9
- package/lib/core/app-const.d.ts +0 -11
- package/lib/core/auth/account-api.service.d.ts +0 -20
- package/lib/core/auth/auth.service.d.ts +0 -90
- package/lib/core/auth/models/auth-result.model.d.ts +0 -4
- package/lib/core/auth/models/federated-login-request.model.d.ts +0 -5
- package/lib/core/auth/models/login-request.model.d.ts +0 -6
- package/lib/core/auth/storage.service.d.ts +0 -21
- package/lib/core/directives/draggable/draggable-dialog.directive.d.ts +0 -23
- package/lib/core/directives/fullscreen/fullscreen.directive.d.ts +0 -14
- package/lib/core/directives/resizable/resizable-dialog.directive.d.ts +0 -30
- package/lib/core/environments/environment.d.ts +0 -7
- package/lib/core/environments/environment.prod.d.ts +0 -7
- package/lib/core/helpers/crypto-helper.service.d.ts +0 -12
- package/lib/core/http/http-stream.service.d.ts +0 -18
- package/lib/core/http/http.service.d.ts +0 -20
- package/lib/core/interceptors/auth.interceptor.d.ts +0 -18
- package/lib/core/interceptors/license.interceptor.d.ts +0 -11
- package/lib/core/models/api-config.model.d.ts +0 -58
- package/lib/core/models/api-request.model.d.ts +0 -77
- package/lib/core/models/api-response.model.d.ts +0 -6
- package/lib/core/models/doohbot-config.model.d.ts +0 -81
- package/lib/core/models/message.d.ts +0 -16
- package/lib/core/models/theme-config.model.d.ts +0 -28
- package/lib/core/services/core-config.service.d.ts +0 -23
- package/lib/core/services/license.service.d.ts +0 -33
- package/lib/core/services/markdown.service.d.ts +0 -8
- package/lib/core/services/theme.service.d.ts +0 -40
- package/lib/core/utils/logger.service.d.ts +0 -11
- package/lib/doohbot-input.d.ts +0 -19
- package/lib/doohbot.component.d.ts +0 -108
- package/lib/predefined_messages.d.ts +0 -2
- package/lib/shared/chips/chips.component.d.ts +0 -10
- package/lib/shared/dialog/dialog.component.d.ts +0 -19
- package/lib/shared/dialog/dialog.service.d.ts +0 -29
- package/lib/shared/dialog/dialog.utils.d.ts +0 -41
- package/lib/shared/dropdown-menu/dropdown-menu.component.d.ts +0 -11
- package/lib/shared/input-dialog/input-dialog.component.d.ts +0 -20
- package/lib/shared/menu-item/menu-item.component.d.ts +0 -9
- package/lib/shared/pipes/simple-markdown.pipe.d.ts +0 -10
- package/lib/shared/snackbar/snackbar.component.d.ts +0 -14
- package/lib/shared/snackbar/snackbar.service.d.ts +0 -19
- package/public-api.d.ts +0 -11
- /package/{src → projects/doohbot/src}/assets/bot.mp3 +0 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# 📦 Advanced Library Publishing System
|
|
2
|
+
|
|
3
|
+
This system is designed to provide a robust, modular, and safe way to publish Angular libraries while preventing **NG0400** (Dual Angular Runtime) errors.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🚀 Workflows
|
|
8
|
+
|
|
9
|
+
### 1. Version Management
|
|
10
|
+
|
|
11
|
+
We use explicit commands to manage library versions. These commands update the `projects/doohbot/package.json` file.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Bump patch version (1.1.20 -> 1.1.21)
|
|
15
|
+
npm run version-patch
|
|
16
|
+
|
|
17
|
+
# Bump minor version (1.1.20 -> 1.2.0)
|
|
18
|
+
npm run version-minor
|
|
19
|
+
|
|
20
|
+
# Bump major version (1.1.20 -> 2.0.0)
|
|
21
|
+
npm run version-major
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. Validation & Publishing
|
|
25
|
+
|
|
26
|
+
After bumping the version, use the modular publishing pipeline.
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Recommended: Run a dry-run first
|
|
30
|
+
npm run publish -- doohbot --dry-run
|
|
31
|
+
|
|
32
|
+
# Final Publish
|
|
33
|
+
npm run publish -- doohbot
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🏗️ Modular Architecture
|
|
39
|
+
|
|
40
|
+
The publishing system is located in `scripts/publishing/` and is broken down into a multi-step pipeline for maximum reliability and easier debugging.
|
|
41
|
+
|
|
42
|
+
### Pipeline Directory Structure
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
scripts/publishing/
|
|
46
|
+
├── index.ts # Main Entry Point & Orchestrator
|
|
47
|
+
├── pipeline/ # Individual Step Logic
|
|
48
|
+
│ ├── 01-clean.ts # Cleans previous dist artifacts
|
|
49
|
+
│ ├── 02-validate-pre.ts # Runs NG0400 checks on source/config
|
|
50
|
+
│ ├── 03-build.ts # Compiles the library in Ivy mode
|
|
51
|
+
│ ├── 04-validate-post.ts# Analyzes dist binaries for runtime leaks
|
|
52
|
+
│ ├── 05-prepare-package.ts # Verifies package integrity (npm pack)
|
|
53
|
+
│ ├── 06-version.ts # Verifies the version to be published
|
|
54
|
+
│ ├── 07-publish.ts # Registry push (skipped in dry-run)
|
|
55
|
+
│ └── 08-cleanup.ts # Final cleanup tasks
|
|
56
|
+
└── utils/ # Shared utilities (Config, CLI, Types)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### The 8-Step Safety Guard
|
|
60
|
+
|
|
61
|
+
1. **Clean**: Removes `dist/doohbot` to ensure no "ghost" files from previous builds remain.
|
|
62
|
+
2. **Version Check**: Confirms the version in `package.json` matches your expectations.
|
|
63
|
+
3. **Pre-Validation**: Scans for Angular packages in `dependencies` and `platformBrowserDynamic` calls.
|
|
64
|
+
4. **Ivy Build**: Compiles using `ng-packagr` in production mode.
|
|
65
|
+
5. **Post-Validation**: Scans `.mjs` files in `dist/` for signs of the Angular Core runtime being bundled.
|
|
66
|
+
6. **Pack Check**: Simulates an `npm pack` to list exactly which files will be sent to the registry.
|
|
67
|
+
7. **Registry Push**: Navigates into `dist/doohbot` and executes the internal `npm publish`.
|
|
68
|
+
8. **Git Tag**: Creates a local Git tag for the specific project and version.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## ⚙️ Configuration (`publish.config.js`)
|
|
73
|
+
|
|
74
|
+
You can customize the validation rules for each project:
|
|
75
|
+
|
|
76
|
+
```javascript
|
|
77
|
+
module.exports = {
|
|
78
|
+
projects: {
|
|
79
|
+
doohbot: {
|
|
80
|
+
validate: {
|
|
81
|
+
peerDependencies: ['@angular/core', ...], // Required to be in peer
|
|
82
|
+
forbiddenDependencies: ['@angular/core'], // Forbidden in 'dependencies'
|
|
83
|
+
checkRuntimeInDist: true, // Scan binaries
|
|
84
|
+
checkPlatformCreation: true // Scan source
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## ❓ Troubleshooting
|
|
94
|
+
|
|
95
|
+
### NG0400 Detection
|
|
96
|
+
|
|
97
|
+
If the script says **"Angular runtime code detected in bundle"**, it means your library is accidentally including its own copy of Angular.
|
|
98
|
+
|
|
99
|
+
* **Fix**: Ensure all `@angular` packages are listed in `peerDependencies` and NOT in `dependencies`.
|
|
100
|
+
|
|
101
|
+
### Module Not Found Errors
|
|
102
|
+
|
|
103
|
+
The system uses ESM (ECMAScript Modules). If running manually, ensure you use:
|
|
104
|
+
`npx ts-node --esm scripts/publishing/index.ts`
|
package/package.json
CHANGED
|
@@ -1,30 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@aakash58/chatbot",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@aakash58/chatbot",
|
|
3
|
+
"version": "1.1.21",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"ng": "ng",
|
|
6
|
+
"start": "ng serve",
|
|
7
|
+
"build": "ng build",
|
|
8
|
+
"watch": "ng build --watch --configuration development",
|
|
9
|
+
"test": "ng test",
|
|
10
|
+
"dev": "ng build doohbot && ng serve app-doohbot",
|
|
11
|
+
"version-patch": "npm --prefix projects/doohbot version patch",
|
|
12
|
+
"version-minor": "npm --prefix projects/doohbot version minor",
|
|
13
|
+
"version-major": "npm --prefix projects/doohbot version major",
|
|
14
|
+
"build-lib": "ng build doohbot --doohbot",
|
|
15
|
+
"validate": "ts-node -P tsconfig.scripts.json scripts/validate.ts",
|
|
16
|
+
"validate:root": "ts-node -P tsconfig.scripts.json scripts/validate.ts --root",
|
|
17
|
+
"publish": "ts-node -P tsconfig.scripts.json scripts/publishing/index.ts",
|
|
18
|
+
"publish:root": "ts-node -P tsconfig.scripts.json scripts/publishing/index.ts --root"
|
|
19
|
+
},
|
|
20
|
+
"prettier": {
|
|
21
|
+
"printWidth": 100,
|
|
22
|
+
"singleQuote": true,
|
|
23
|
+
"overrides": [
|
|
24
|
+
{
|
|
25
|
+
"files": "*.html",
|
|
26
|
+
"options": {
|
|
27
|
+
"parser": "angular"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"private": false,
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@angular/animations": "^17.0.0",
|
|
35
|
+
"@angular/cdk": "^17.0.0",
|
|
36
|
+
"@angular/common": "^17.0.0",
|
|
37
|
+
"@angular/compiler": "^17.0.0",
|
|
38
|
+
"@angular/core": "^17.0.0",
|
|
39
|
+
"@angular/elements": "^17.0.0",
|
|
40
|
+
"@angular/forms": "^17.0.0",
|
|
41
|
+
"@angular/material": "^17.0.0",
|
|
42
|
+
"@angular/platform-browser": "^17.0.0",
|
|
43
|
+
"@angular/router": "^17.0.0",
|
|
44
|
+
"@auth0/angular-jwt": "^5.2.0",
|
|
45
|
+
"@webcomponents/custom-elements": "^1.6.0",
|
|
46
|
+
"crypto-js": "^4.2.0",
|
|
47
|
+
"rxjs": "~7.8.0",
|
|
48
|
+
"tslib": "^2.3.0",
|
|
49
|
+
"zone.js": "~0.15.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@angular-devkit/build-angular": "^17.0.0",
|
|
53
|
+
"@angular/cli": "^17.0.0",
|
|
54
|
+
"@angular/compiler": "^17.0.0",
|
|
55
|
+
"@angular/compiler-cli": "^17.0.0",
|
|
56
|
+
"@types/crypto-js": "^4.2.2",
|
|
57
|
+
"@types/jasmine": "~5.1.0",
|
|
58
|
+
"@types/node": "^24.10.0",
|
|
59
|
+
"jasmine-core": "~5.9.0",
|
|
60
|
+
"karma": "~6.4.0",
|
|
61
|
+
"karma-chrome-launcher": "~3.2.0",
|
|
62
|
+
"karma-coverage": "~2.2.0",
|
|
63
|
+
"karma-jasmine": "~5.1.0",
|
|
64
|
+
"karma-jasmine-html-reporter": "~2.1.0",
|
|
65
|
+
"ng-packagr": "^20.3.0",
|
|
66
|
+
"prettier": "^3.6.2",
|
|
67
|
+
"ts-node": "^10.9.2",
|
|
68
|
+
"typescript": "~5.9.2"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"@angular/common": ">=17.0.0",
|
|
72
|
+
"@angular/core": ">=17.0.0",
|
|
73
|
+
"@angular/material": ">=17.0.0",
|
|
74
|
+
"@angular/cdk": ">=17.0.0"
|
|
75
|
+
}
|
|
30
76
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"username": "aakashrajbanshi58@gmail.com",
|
|
3
|
+
"password": "Aakash.r@123",
|
|
4
|
+
"apiBaseUrl": "",
|
|
5
|
+
"apiSegment": "/api/",
|
|
6
|
+
"storageKey": "doohbot-storage",
|
|
7
|
+
"secretKey": "my-secret-encryption-key-2024",
|
|
8
|
+
"companyCode": "TEST",
|
|
9
|
+
"webUrl": "http://localhost:4200",
|
|
10
|
+
"licenseKey": "doohbot_lic_6X5vqgpT9dL48Oqi-2F0w9CU8I3dyV6kdLx1B8Uyt-Q",
|
|
11
|
+
"licenseKeys": {
|
|
12
|
+
"adcity": "doohbot_pk_9RrPUPpg58tSbjmYChtZWFXK3oyqhMaGgD7kl5gmOik",
|
|
13
|
+
"tractor": "doohbot_pk_9RrPUPpg58tSbjmYChtZWFXK3oyqhMaGgD7kl5gmOik"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"aakash": "doohbot_lic_aakash-cxcxcgbfhhjh485fgfdgdg",
|
|
3
|
+
"doohbot": "doohbot_lic_6X5vqgpT9dL48Oqi-2F0w9CU8I3dyV6kdLx1B8Uyt-Q",
|
|
4
|
+
"adcity": "doohbot_lic_bqwBpABoYvnRfsYTuYCRQQKpc_06k4Uh1kYpyaFqZV8",
|
|
5
|
+
"tractor": "doohbot_lic_u52FaSiUyV6R8GPASACusbWe_p6vOaJXkElTa8P4t5U"
|
|
6
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
|
|
2
|
+
import { provideRouter } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
import { routes } from './app.routes';
|
|
5
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
6
|
+
|
|
7
|
+
export const appConfig: ApplicationConfig = {
|
|
8
|
+
providers: [
|
|
9
|
+
provideZoneChangeDetection({ eventCoalescing: true }),
|
|
10
|
+
provideRouter(routes),
|
|
11
|
+
provideHttpClient(),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div class="theme-demo-container">
|
|
2
|
+
<div class="controls-panel">
|
|
3
|
+
<h1>🎨 Chatbot Theme Auto-Detection Demo</h1>
|
|
4
|
+
<p>
|
|
5
|
+
Click the buttons below to change the parent application's theme. The chatbot will
|
|
6
|
+
automatically detect and match the theme!
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<div class="theme-buttons">
|
|
10
|
+
<button class="btn btn-light" (click)="setLightTheme()">☀️ Light Theme</button>
|
|
11
|
+
<button class="btn btn-dark" (click)="setDarkTheme()">🌙 Dark Theme</button>
|
|
12
|
+
<button class="btn btn-toggle" (click)="toggleTheme()">🔄 Toggle Theme</button>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="status-panel">
|
|
16
|
+
<strong>Current Parent Theme:</strong> <span class="theme-badge">{{ currentTheme }}</span>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<app-doohbot
|
|
22
|
+
[themeConfig]=""
|
|
23
|
+
[config]="chatConfig"
|
|
24
|
+
[buttonStyle]="'fab'"
|
|
25
|
+
[enableDrag]="true"
|
|
26
|
+
[enableResize]="true"
|
|
27
|
+
[themeConfig]="{
|
|
28
|
+
primaryColor: '#74c2bb',
|
|
29
|
+
backgroundColor: 'white, #151521',
|
|
30
|
+
}"
|
|
31
|
+
></app-doohbot>
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
.theme-demo-container {
|
|
2
|
+
padding: 20px;
|
|
3
|
+
max-width: 800px;
|
|
4
|
+
margin: 0 auto;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.controls-panel {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
background: white;
|
|
11
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
12
|
+
border-radius: 12px;
|
|
13
|
+
padding: 30px;
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
body.dark-theme .controls-panel {
|
|
19
|
+
background: grey;
|
|
20
|
+
border-color: grey;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
h1 {
|
|
24
|
+
margin: 0 0 15px 0;
|
|
25
|
+
font-size: 24px;
|
|
26
|
+
color: black;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
body.dark-theme h1 {
|
|
30
|
+
color: whitesmoke;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
p {
|
|
34
|
+
color: #666;
|
|
35
|
+
margin-bottom: 20px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
body.dark-theme p {
|
|
39
|
+
color: #aaa;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.theme-buttons {
|
|
43
|
+
display: flex;
|
|
44
|
+
gap: 10px;
|
|
45
|
+
margin-bottom: 20px;
|
|
46
|
+
flex-wrap: wrap;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.btn {
|
|
50
|
+
padding: 12px 24px;
|
|
51
|
+
border: none;
|
|
52
|
+
border-radius: 8px;
|
|
53
|
+
font-size: 16px;
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
transition: all 0.3s ease;
|
|
57
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.btn:hover {
|
|
61
|
+
transform: translateY(-2px);
|
|
62
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.btn:active {
|
|
66
|
+
transform: translateY(0);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.btn-light {
|
|
70
|
+
background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
|
|
71
|
+
color: #fff;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.btn-dark {
|
|
75
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
76
|
+
color: #fff;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.btn-toggle {
|
|
80
|
+
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
|
81
|
+
color: #fff;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.status-panel {
|
|
85
|
+
background: rgba(0, 123, 255, 0.1);
|
|
86
|
+
border-left: 4px solid #007bff;
|
|
87
|
+
padding: 15px;
|
|
88
|
+
border-radius: 4px;
|
|
89
|
+
margin-bottom: 20px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
body.dark-theme .status-panel {
|
|
93
|
+
background: rgba(0, 123, 255, 0.2);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.theme-badge {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
padding: 4px 12px;
|
|
99
|
+
background: #007bff;
|
|
100
|
+
color: white;
|
|
101
|
+
border-radius: 12px;
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.info-panel {
|
|
107
|
+
background: red;
|
|
108
|
+
border-left: 4px solid #ffc107;
|
|
109
|
+
padding: 15px;
|
|
110
|
+
border-radius: 4px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
body.dark-theme .info-panel {
|
|
114
|
+
background: rgba(255, 193, 7, 0.15);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.info-panel strong {
|
|
118
|
+
color: #333;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
body.dark-theme .info-panel strong {
|
|
122
|
+
color: #fff;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.info-panel ul {
|
|
126
|
+
margin: 10px 0 0 0;
|
|
127
|
+
padding-left: 20px;
|
|
128
|
+
color: #666;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
body.dark-theme .info-panel ul {
|
|
132
|
+
color: #aaa;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.info-panel li {
|
|
136
|
+
margin-bottom: 8px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.info-panel code {
|
|
140
|
+
background: rgba(0, 0, 0, 0.05);
|
|
141
|
+
padding: 2px 6px;
|
|
142
|
+
border-radius: 3px;
|
|
143
|
+
font-family: 'Courier New', monospace;
|
|
144
|
+
font-size: 13px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
body.dark-theme .info-panel code {
|
|
148
|
+
background: rgba(255, 255, 255, 0.1);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Global theme styles */
|
|
152
|
+
body {
|
|
153
|
+
transition:
|
|
154
|
+
background-color 0.3s ease,
|
|
155
|
+
color 0.3s ease;
|
|
156
|
+
font-family:
|
|
157
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
body.light-theme {
|
|
161
|
+
background-color: #bfbfbf;
|
|
162
|
+
color: #333;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
body.dark-theme {
|
|
166
|
+
background-color: #ff0000;
|
|
167
|
+
color: #fff;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Tenant Switcher Styles */
|
|
171
|
+
.tenant-switcher-container {
|
|
172
|
+
position: fixed;
|
|
173
|
+
bottom: 100px;
|
|
174
|
+
right: 20px;
|
|
175
|
+
z-index: 10000;
|
|
176
|
+
background: rgba(255, 255, 255, 0.9);
|
|
177
|
+
backdrop-filter: blur(10px);
|
|
178
|
+
padding: 15px;
|
|
179
|
+
border-radius: 12px;
|
|
180
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
181
|
+
border: 1px solid rgba(0, 0, 0, 0.05);
|
|
182
|
+
transition: all 0.3s ease;
|
|
183
|
+
min-width: 200px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
body.dark-theme .tenant-switcher-container {
|
|
187
|
+
background: rgba(30, 30, 30, 0.9);
|
|
188
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
189
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.tenant-switcher-label {
|
|
193
|
+
display: block;
|
|
194
|
+
margin-bottom: 8px;
|
|
195
|
+
font-size: 12px;
|
|
196
|
+
font-weight: 700;
|
|
197
|
+
text-transform: uppercase;
|
|
198
|
+
letter-spacing: 0.5px;
|
|
199
|
+
color: #666;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
body.dark-theme .tenant-switcher-label {
|
|
203
|
+
color: #aaa;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.tenant-switcher-select {
|
|
207
|
+
width: 100%;
|
|
208
|
+
padding: 8px 12px;
|
|
209
|
+
border-radius: 8px;
|
|
210
|
+
border: 1px solid #ddd;
|
|
211
|
+
background-color: #fff;
|
|
212
|
+
color: #333;
|
|
213
|
+
font-size: 14px;
|
|
214
|
+
outline: none;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
transition: border-color 0.2s;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.tenant-switcher-select:focus {
|
|
220
|
+
border-color: #007bff;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
body.dark-theme .tenant-switcher-select {
|
|
224
|
+
background-color: #333;
|
|
225
|
+
border-color: #444;
|
|
226
|
+
color: #fff;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
body.dark-theme .tenant-switcher-select:focus {
|
|
230
|
+
border-color: #007bff;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* Logout Buttons */
|
|
234
|
+
.logout-buttons {
|
|
235
|
+
margin-top: 12px;
|
|
236
|
+
display: flex;
|
|
237
|
+
gap: 8px;
|
|
238
|
+
flex-direction: column;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.btn-logout,
|
|
242
|
+
.btn-logout-all {
|
|
243
|
+
padding: 10px 16px;
|
|
244
|
+
border: none;
|
|
245
|
+
border-radius: 8px;
|
|
246
|
+
font-size: 14px;
|
|
247
|
+
font-weight: 500;
|
|
248
|
+
cursor: pointer;
|
|
249
|
+
transition: all 0.2s ease;
|
|
250
|
+
width: 100%;
|
|
251
|
+
text-align: left;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.btn-logout {
|
|
255
|
+
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
|
|
256
|
+
color: #fff;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.btn-logout:hover {
|
|
260
|
+
background: linear-gradient(135deg, #ff5252 0%, #e84a5f 100%);
|
|
261
|
+
transform: translateY(-1px);
|
|
262
|
+
box-shadow: 0 3px 8px rgba(255, 107, 107, 0.3);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.btn-logout-all {
|
|
266
|
+
background: linear-gradient(135deg, #fc5c7d 0%, #6a82fb 100%);
|
|
267
|
+
color: #fff;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.btn-logout-all:hover {
|
|
271
|
+
background: linear-gradient(135deg, #fb4570 0%, #5a72ea 100%);
|
|
272
|
+
transform: translateY(-1px);
|
|
273
|
+
box-shadow: 0 3px 8px rgba(252, 92, 125, 0.3);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.btn-logout:active,
|
|
277
|
+
.btn-logout-all:active {
|
|
278
|
+
transform: translateY(0);
|
|
279
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { App } from './app';
|
|
3
|
+
|
|
4
|
+
describe('App', () => {
|
|
5
|
+
beforeEach(async () => {
|
|
6
|
+
await TestBed.configureTestingModule({
|
|
7
|
+
imports: [App],
|
|
8
|
+
}).compileComponents();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('should create the app', () => {
|
|
12
|
+
const fixture = TestBed.createComponent(App);
|
|
13
|
+
const app = fixture.componentInstance;
|
|
14
|
+
expect(app).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('should render title', () => {
|
|
18
|
+
const fixture = TestBed.createComponent(App);
|
|
19
|
+
fixture.detectChanges();
|
|
20
|
+
const compiled = fixture.nativeElement as HTMLElement;
|
|
21
|
+
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, chatbot-element');
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { Component, OnInit } from '@angular/core';
|
|
4
|
+
import { Doohbot, DoohbotInput } from 'doohbot';
|
|
5
|
+
import { AppConst } from './../../../doohbot/src/lib/core/app-const';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'app-root',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [CommonModule, Doohbot],
|
|
11
|
+
templateUrl: './app.html',
|
|
12
|
+
styleUrl: './app.scss',
|
|
13
|
+
})
|
|
14
|
+
export class App implements OnInit {
|
|
15
|
+
// Mock authentication mode - no backend needed
|
|
16
|
+
chatConfig: DoohbotInput = {
|
|
17
|
+
apiBaseUrl: 'http://localhost:4000/', // Replace with your actual backend URL
|
|
18
|
+
apiSegment: 'api/', // Replace with your actual API path
|
|
19
|
+
username: '',
|
|
20
|
+
password: '',
|
|
21
|
+
tenancyName: '',
|
|
22
|
+
licenseKey: '',
|
|
23
|
+
licenseFilePath: 'assets/const/doohclick_license.json',
|
|
24
|
+
authToken: 'aakash-token-mock-1234567890',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
currentTheme = 'Light';
|
|
28
|
+
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
// Ensure body has a theme class
|
|
31
|
+
if (
|
|
32
|
+
!document.body.classList.contains('dark-theme') &&
|
|
33
|
+
!document.body.classList.contains('light-theme')
|
|
34
|
+
) {
|
|
35
|
+
document.body.classList.add('light-theme');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
setLightTheme() {
|
|
40
|
+
document.body.classList.remove('dark-theme');
|
|
41
|
+
document.body.classList.add('light-theme');
|
|
42
|
+
this.currentTheme = 'Light';
|
|
43
|
+
console.log(' Parent theme changed to: Light');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
setDarkTheme() {
|
|
47
|
+
document.body.classList.remove('light-theme');
|
|
48
|
+
document.body.classList.add('dark-theme');
|
|
49
|
+
this.currentTheme = 'Dark';
|
|
50
|
+
console.log(' Parent theme changed to: Dark');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
toggleTheme() {
|
|
54
|
+
if (document.body.classList.contains('dark-theme')) {
|
|
55
|
+
this.setLightTheme();
|
|
56
|
+
} else {
|
|
57
|
+
this.setDarkTheme();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
resetDemo() {
|
|
62
|
+
localStorage.clear();
|
|
63
|
+
window.location.reload();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
constructor(private http: HttpClient) {}
|
|
67
|
+
|
|
68
|
+
// Current state
|
|
69
|
+
platformTenant = '';
|
|
70
|
+
subTenant = '';
|
|
71
|
+
agent = '';
|
|
72
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>ChatbotElement</title>
|
|
6
|
+
<base href="/">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
9
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
10
|
+
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<app-root></app-root>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|