@aakash58/chatbot 1.1.21 → 1.1.22
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/README.md +22 -298
- package/esm2022/aakash58-chatbot.mjs +5 -0
- package/esm2022/lib/app/chat/chat-ui-state.service.mjs +170 -0
- package/esm2022/lib/app/chat/chat.service.mjs +445 -0
- package/esm2022/lib/app/chat/components/chat-button/chat-button.component.mjs +50 -0
- package/esm2022/lib/app/chat/components/chat-footer/chat-footer.component.mjs +12 -0
- package/esm2022/lib/app/chat/components/chat-header/chat-header.component.mjs +66 -0
- package/esm2022/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.mjs +186 -0
- package/esm2022/lib/app/chat/components/chat-window/chat-window.component.mjs +312 -0
- package/esm2022/lib/app/chat/components/message-input/message-input.component.mjs +36 -0
- package/esm2022/lib/app/chat/components/message-list/message-list.component.mjs +115 -0
- package/esm2022/lib/app/chat/model/chat-history.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-request.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-response.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-session.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-stream-message.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-stream-response.model.mjs +2 -0
- package/esm2022/lib/app/chat/services/chat-api.service.mjs +61 -0
- package/esm2022/lib/app/chat/services/chat-audio.service.mjs +50 -0
- package/esm2022/lib/app/chat/services/chat-history.service.mjs +252 -0
- package/esm2022/lib/app/login/login-form.component.mjs +46 -0
- package/esm2022/lib/app/personalization/personalization-dialog.component.mjs +194 -0
- package/esm2022/lib/app/personalization/personalization.service.mjs +149 -0
- package/esm2022/lib/app/personalization/sections/account/account-section.component.mjs +122 -0
- package/esm2022/lib/app/personalization/sections/preferences/color-picker-dialog.component.mjs +86 -0
- package/esm2022/lib/app/personalization/sections/preferences/preferences-section.component.mjs +115 -0
- package/esm2022/lib/app/personalization/sections/profile/profile-section.component.mjs +29 -0
- package/esm2022/lib/app/personalization/sections/settings/setting-section.component.mjs +30 -0
- package/esm2022/lib/app/personalization/sections/terms/terms-section.component.mjs +12 -0
- package/esm2022/lib/constant/doohbot-constant.mjs +28 -0
- package/esm2022/lib/constant/html-entities.mjs +9 -0
- package/esm2022/lib/constant/utf8.mjs +10 -0
- package/esm2022/lib/core/app-const.mjs +61 -0
- package/esm2022/lib/core/auth/account-api.service.mjs +40 -0
- package/esm2022/lib/core/auth/auth.service.mjs +391 -0
- package/esm2022/lib/core/auth/models/auth-result.model.mjs +3 -0
- package/esm2022/lib/core/auth/models/federated-login-request.model.mjs +6 -0
- package/esm2022/lib/core/auth/models/login-request.model.mjs +6 -0
- package/esm2022/lib/core/auth/storage.service.mjs +110 -0
- package/esm2022/lib/core/directives/draggable/draggable-dialog.directive.mjs +112 -0
- package/esm2022/lib/core/directives/fullscreen/fullscreen.directive.mjs +55 -0
- package/esm2022/lib/core/directives/resizable/resizable-dialog.directive.mjs +179 -0
- package/esm2022/lib/core/environments/environment.mjs +15 -0
- package/esm2022/lib/core/environments/environment.prod.mjs +15 -0
- package/esm2022/lib/core/helpers/crypto-helper.service.mjs +52 -0
- package/esm2022/lib/core/http/http-stream.service.mjs +97 -0
- package/esm2022/lib/core/http/http.service.mjs +103 -0
- package/esm2022/lib/core/interceptors/auth.interceptor.mjs +96 -0
- package/esm2022/lib/core/interceptors/license.interceptor.mjs +44 -0
- package/esm2022/lib/core/models/api-config.model.mjs +18 -0
- package/esm2022/lib/core/models/api-request.model.mjs +2 -0
- package/esm2022/lib/core/models/api-response.model.mjs +8 -0
- package/esm2022/lib/core/models/doohbot-config.model.mjs +18 -0
- package/esm2022/lib/core/models/license.model.mjs +2 -0
- package/esm2022/lib/core/models/message.mjs +2 -0
- package/esm2022/lib/core/models/theme-config.model.mjs +2 -0
- package/esm2022/lib/core/services/core-config.service.mjs +52 -0
- package/esm2022/lib/core/services/license.service.mjs +145 -0
- package/esm2022/lib/core/services/markdown.service.mjs +64 -0
- package/esm2022/lib/core/services/theme.service.mjs +248 -0
- package/esm2022/lib/core/types/auth-mode.type.mjs +2 -0
- package/esm2022/lib/core/types/auth-status.type.mjs +5 -0
- package/esm2022/lib/core/types/chat-stream.type.mjs +2 -0
- package/esm2022/lib/core/types/message-role.type.mjs +2 -0
- package/esm2022/lib/core/types/prompt-mode.type.mjs +5 -0
- package/esm2022/lib/core/types/snackbar-error.type.mjs +5 -0
- package/esm2022/lib/core/types/tenant-resolution-strategy.type.mjs +2 -0
- package/esm2022/lib/core/utils/logger.service.mjs +42 -0
- package/esm2022/lib/doohbot-input.mjs +20 -0
- package/esm2022/lib/doohbot.component.mjs +444 -0
- package/esm2022/lib/predefined_messages.mjs +15 -0
- package/esm2022/lib/shared/chips/chips.component.mjs +28 -0
- package/esm2022/lib/shared/dialog/dialog.component.mjs +36 -0
- package/esm2022/lib/shared/dialog/dialog.service.mjs +64 -0
- package/esm2022/lib/shared/dialog/dialog.utils.mjs +85 -0
- package/esm2022/lib/shared/dropdown-menu/dropdown-menu.component.mjs +29 -0
- package/esm2022/lib/shared/input-dialog/input-dialog.component.mjs +38 -0
- package/esm2022/lib/shared/menu-item/menu-item.component.mjs +24 -0
- package/esm2022/lib/shared/pipes/simple-markdown.pipe.mjs +27 -0
- package/esm2022/lib/shared/snackbar/snackbar.component.mjs +43 -0
- package/esm2022/lib/shared/snackbar/snackbar.service.mjs +46 -0
- package/esm2022/lib/shared/snackbar/snackbar.utils.mjs +43 -0
- package/esm2022/public-api.mjs +37 -0
- package/fesm2022/aakash58-chatbot.mjs +5193 -0
- package/fesm2022/aakash58-chatbot.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/app/chat/chat-ui-state.service.d.ts +96 -0
- package/lib/app/chat/chat.service.d.ts +88 -0
- package/lib/app/chat/components/chat-button/chat-button.component.d.ts +16 -0
- package/lib/app/chat/components/chat-footer/chat-footer.component.d.ts +5 -0
- package/lib/app/chat/components/chat-header/chat-header.component.d.ts +24 -0
- package/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.d.ts +49 -0
- package/lib/app/chat/components/chat-window/chat-window.component.d.ts +107 -0
- package/lib/app/chat/components/message-input/message-input.component.d.ts +12 -0
- package/lib/app/chat/components/message-list/message-list.component.d.ts +40 -0
- package/lib/app/chat/model/chat-history.model.d.ts +51 -0
- package/lib/app/chat/model/chat-request.model.d.ts +10 -0
- package/lib/app/chat/model/chat-response.model.d.ts +9 -0
- package/lib/app/chat/model/chat-session.model.d.ts +12 -0
- package/{projects/doohbot/src/lib/app/chat/model/chat-stream-message.model.ts → lib/app/chat/model/chat-stream-message.model.d.ts} +5 -6
- package/lib/app/chat/model/chat-stream-response.model.d.ts +10 -0
- package/lib/app/chat/services/chat-api.service.d.ts +30 -0
- package/lib/app/chat/services/chat-audio.service.d.ts +19 -0
- package/lib/app/chat/services/chat-history.service.d.ts +53 -0
- package/lib/app/login/login-form.component.d.ts +20 -0
- package/lib/app/personalization/personalization-dialog.component.d.ts +53 -0
- package/lib/app/personalization/personalization.service.d.ts +66 -0
- package/lib/app/personalization/sections/account/account-section.component.d.ts +30 -0
- package/lib/app/personalization/sections/preferences/color-picker-dialog.component.d.ts +17 -0
- package/lib/app/personalization/sections/preferences/preferences-section.component.d.ts +27 -0
- package/lib/app/personalization/sections/profile/profile-section.component.d.ts +17 -0
- package/lib/app/personalization/sections/settings/setting-section.component.d.ts +10 -0
- package/lib/app/personalization/sections/terms/terms-section.component.d.ts +5 -0
- package/lib/constant/doohbot-constant.d.ts +12 -0
- package/lib/constant/html-entities.d.ts +8 -0
- package/lib/constant/utf8.d.ts +9 -0
- package/lib/core/app-const.d.ts +11 -0
- package/lib/core/auth/account-api.service.d.ts +20 -0
- package/lib/core/auth/auth.service.d.ts +90 -0
- package/lib/core/auth/models/auth-result.model.d.ts +4 -0
- package/lib/core/auth/models/federated-login-request.model.d.ts +5 -0
- package/lib/core/auth/models/login-request.model.d.ts +6 -0
- package/lib/core/auth/storage.service.d.ts +21 -0
- package/lib/core/directives/draggable/draggable-dialog.directive.d.ts +23 -0
- package/lib/core/directives/fullscreen/fullscreen.directive.d.ts +14 -0
- package/lib/core/directives/resizable/resizable-dialog.directive.d.ts +30 -0
- package/lib/core/environments/environment.d.ts +7 -0
- package/lib/core/environments/environment.prod.d.ts +7 -0
- package/lib/core/helpers/crypto-helper.service.d.ts +12 -0
- package/lib/core/http/http-stream.service.d.ts +18 -0
- package/lib/core/http/http.service.d.ts +20 -0
- package/lib/core/interceptors/auth.interceptor.d.ts +18 -0
- package/lib/core/interceptors/license.interceptor.d.ts +11 -0
- package/lib/core/models/api-config.model.d.ts +58 -0
- package/lib/core/models/api-request.model.d.ts +77 -0
- package/lib/core/models/api-response.model.d.ts +6 -0
- package/lib/core/models/doohbot-config.model.d.ts +81 -0
- package/{projects/doohbot/src/lib/core/models/license.model.ts → lib/core/models/license.model.d.ts} +23 -27
- package/lib/core/models/message.d.ts +16 -0
- package/lib/core/models/theme-config.model.d.ts +28 -0
- package/lib/core/services/core-config.service.d.ts +23 -0
- package/lib/core/services/license.service.d.ts +33 -0
- package/lib/core/services/markdown.service.d.ts +8 -0
- package/lib/core/services/theme.service.d.ts +40 -0
- package/{projects/doohbot/src/lib/core/types/auth-mode.type.ts → lib/core/types/auth-mode.type.d.ts} +4 -4
- package/{projects/doohbot/src/lib/core/types/auth-status.type.ts → lib/core/types/auth-status.type.d.ts} +4 -5
- package/{projects/doohbot/src/lib/core/types/chat-stream.type.ts → lib/core/types/chat-stream.type.d.ts} +4 -4
- package/{projects/doohbot/src/lib/core/types/message-role.type.ts → lib/core/types/message-role.type.d.ts} +4 -4
- package/{projects/doohbot/src/lib/core/types/prompt-mode.type.ts → lib/core/types/prompt-mode.type.d.ts} +4 -5
- package/{projects/doohbot/src/lib/core/types/snackbar-error.type.ts → lib/core/types/snackbar-error.type.d.ts} +4 -5
- package/{projects/doohbot/src/lib/core/types/tenant-resolution-strategy.type.ts → lib/core/types/tenant-resolution-strategy.type.d.ts} +4 -4
- package/lib/core/utils/logger.service.d.ts +11 -0
- package/lib/doohbot-input.d.ts +19 -0
- package/lib/doohbot.component.d.ts +108 -0
- package/lib/predefined_messages.d.ts +2 -0
- package/lib/shared/chips/chips.component.d.ts +10 -0
- package/lib/shared/dialog/dialog.component.d.ts +19 -0
- package/lib/shared/dialog/dialog.service.d.ts +29 -0
- package/lib/shared/dialog/dialog.utils.d.ts +41 -0
- package/lib/shared/dropdown-menu/dropdown-menu.component.d.ts +11 -0
- package/lib/shared/input-dialog/input-dialog.component.d.ts +20 -0
- package/lib/shared/menu-item/menu-item.component.d.ts +9 -0
- package/lib/shared/pipes/simple-markdown.pipe.d.ts +10 -0
- package/lib/shared/snackbar/snackbar.component.d.ts +14 -0
- package/lib/shared/snackbar/snackbar.service.d.ts +19 -0
- package/{projects/doohbot/src/lib/shared/snackbar/snackbar.utils.ts → lib/shared/snackbar/snackbar.utils.d.ts} +33 -49
- package/package.json +29 -75
- package/public-api.d.ts +11 -0
- package/.editorconfig +0 -17
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -41
- package/.vscode/settings.json +0 -14
- package/.vscode/tasks.json +0 -60
- package/angular.json +0 -132
- package/docs/PUBLISHING_GUIDE.md +0 -104
- package/projects/app-doohbot/public/assets/const/app-const.json +0 -15
- package/projects/app-doohbot/public/assets/const/doohclick_license.json +0 -6
- package/projects/app-doohbot/public/favicon.ico +0 -0
- package/projects/app-doohbot/src/app/app.config.ts +0 -13
- package/projects/app-doohbot/src/app/app.html +0 -31
- package/projects/app-doohbot/src/app/app.routes.ts +0 -3
- package/projects/app-doohbot/src/app/app.scss +0 -279
- package/projects/app-doohbot/src/app/app.spec.ts +0 -23
- package/projects/app-doohbot/src/app/app.ts +0 -72
- package/projects/app-doohbot/src/index.html +0 -15
- package/projects/app-doohbot/src/main.ts +0 -6
- package/projects/app-doohbot/src/styles.scss +0 -15
- package/projects/app-doohbot/tsconfig.app.json +0 -15
- package/projects/app-doohbot/tsconfig.spec.json +0 -14
- package/projects/doohbot/README.md +0 -64
- package/projects/doohbot/docs/README.md +0 -140
- package/projects/doohbot/ng-package.json +0 -10
- package/projects/doohbot/package.json +0 -16
- package/projects/doohbot/src/lib/app/chat/chat-ui-state.service.ts +0 -194
- package/projects/doohbot/src/lib/app/chat/chat.service.ts +0 -547
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.html +0 -27
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.scss +0 -115
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.ts +0 -35
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.html +0 -3
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.scss +0 -20
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.ts +0 -12
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.html +0 -34
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.scss +0 -78
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.ts +0 -52
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.html +0 -77
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.scss +0 -346
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.ts +0 -188
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.html +0 -146
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.scss +0 -187
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.ts +0 -256
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.html +0 -17
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.scss +0 -59
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.ts +0 -28
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.html +0 -138
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.scss +0 -436
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.ts +0 -106
- package/projects/doohbot/src/lib/app/chat/model/chat-history.model.ts +0 -57
- package/projects/doohbot/src/lib/app/chat/model/chat-request.model.ts +0 -17
- package/projects/doohbot/src/lib/app/chat/model/chat-response.model.ts +0 -9
- package/projects/doohbot/src/lib/app/chat/model/chat-session.model.ts +0 -14
- package/projects/doohbot/src/lib/app/chat/model/chat-stream-response.model.ts +0 -12
- package/projects/doohbot/src/lib/app/chat/services/chat-api.service.ts +0 -82
- package/projects/doohbot/src/lib/app/chat/services/chat-audio.service.ts +0 -44
- package/projects/doohbot/src/lib/app/chat/services/chat-history.service.ts +0 -303
- package/projects/doohbot/src/lib/app/login/login-form.component.html +0 -80
- package/projects/doohbot/src/lib/app/login/login-form.component.scss +0 -189
- package/projects/doohbot/src/lib/app/login/login-form.component.ts +0 -45
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.html +0 -81
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.scss +0 -179
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.ts +0 -217
- package/projects/doohbot/src/lib/app/personalization/personalization.service.ts +0 -197
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.html +0 -111
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.scss +0 -218
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.ts +0 -121
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.html +0 -46
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.scss +0 -138
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.ts +0 -28
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/color-picker-dialog.component.ts +0 -92
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.html +0 -198
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.scss +0 -107
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.ts +0 -103
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.html +0 -46
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.scss +0 -131
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.ts +0 -23
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.html +0 -33
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.scss +0 -61
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.ts +0 -20
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.html +0 -30
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.scss +0 -59
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.ts +0 -12
- package/projects/doohbot/src/lib/constant/doohbot-constant.ts +0 -40
- package/projects/doohbot/src/lib/constant/html-entities.ts +0 -8
- package/projects/doohbot/src/lib/constant/utf8.ts +0 -9
- package/projects/doohbot/src/lib/core/app-const.ts +0 -63
- package/projects/doohbot/src/lib/core/auth/account-api.service.ts +0 -53
- package/projects/doohbot/src/lib/core/auth/auth.service.ts +0 -478
- package/projects/doohbot/src/lib/core/auth/models/auth-result.model.ts +0 -4
- package/projects/doohbot/src/lib/core/auth/models/federated-login-request.model.ts +0 -5
- package/projects/doohbot/src/lib/core/auth/models/login-request.model.ts +0 -6
- package/projects/doohbot/src/lib/core/auth/storage.service.ts +0 -113
- package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.directive.ts +0 -123
- package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.module.ts +0 -9
- package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.directive.ts +0 -58
- package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.module.ts +0 -9
- package/projects/doohbot/src/lib/core/directives/popout/popout.directive.ts +0 -169
- package/projects/doohbot/src/lib/core/directives/popout/popout.module.ts +0 -9
- package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.directive.ts +0 -197
- package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.module.ts +0 -9
- package/projects/doohbot/src/lib/core/enums/api-request-state.enum.ts +0 -9
- package/projects/doohbot/src/lib/core/environments/environment.prod.ts +0 -14
- package/projects/doohbot/src/lib/core/environments/environment.ts +0 -14
- package/projects/doohbot/src/lib/core/helpers/crypto-helper.service.ts +0 -72
- package/projects/doohbot/src/lib/core/http/http-stream.service.ts +0 -105
- package/projects/doohbot/src/lib/core/http/http.service.ts +0 -148
- package/projects/doohbot/src/lib/core/interceptors/auth.interceptor.ts +0 -118
- package/projects/doohbot/src/lib/core/interceptors/license.interceptor.ts +0 -50
- package/projects/doohbot/src/lib/core/models/api-config.model.ts +0 -82
- package/projects/doohbot/src/lib/core/models/api-request.model.ts +0 -92
- package/projects/doohbot/src/lib/core/models/api-response.model.ts +0 -13
- package/projects/doohbot/src/lib/core/models/doohbot-config.model.ts +0 -109
- package/projects/doohbot/src/lib/core/models/message.ts +0 -18
- package/projects/doohbot/src/lib/core/models/theme-config.model.ts +0 -48
- package/projects/doohbot/src/lib/core/services/core-config.service.ts +0 -53
- package/projects/doohbot/src/lib/core/services/doohbot-api.service.ts +0 -207
- package/projects/doohbot/src/lib/core/services/license.service.ts +0 -171
- package/projects/doohbot/src/lib/core/services/markdown.service.ts +0 -73
- package/projects/doohbot/src/lib/core/services/theme.service.ts +0 -305
- package/projects/doohbot/src/lib/core/utils/error-handler.util.ts +0 -31
- package/projects/doohbot/src/lib/core/utils/logger.service.ts +0 -45
- package/projects/doohbot/src/lib/doohbot-input.ts +0 -19
- package/projects/doohbot/src/lib/doohbot.component.html +0 -34
- package/projects/doohbot/src/lib/doohbot.component.scss +0 -17
- package/projects/doohbot/src/lib/doohbot.component.spec.ts +0 -31
- package/projects/doohbot/src/lib/doohbot.component.ts +0 -545
- package/projects/doohbot/src/lib/elements.ts +0 -25
- package/projects/doohbot/src/lib/predefined_messages.ts +0 -14
- package/projects/doohbot/src/lib/shared/chips/chips.component.html +0 -9
- package/projects/doohbot/src/lib/shared/chips/chips.component.scss +0 -29
- package/projects/doohbot/src/lib/shared/chips/chips.component.spec.ts +0 -22
- package/projects/doohbot/src/lib/shared/chips/chips.component.ts +0 -20
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.html +0 -29
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.scss +0 -100
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.ts +0 -42
- package/projects/doohbot/src/lib/shared/dialog/dialog.service.ts +0 -62
- package/projects/doohbot/src/lib/shared/dialog/dialog.utils.ts +0 -102
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.html +0 -30
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.scss +0 -53
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.spec.ts +0 -22
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.ts +0 -35
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.html +0 -16
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.scss +0 -45
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.ts +0 -46
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.html +0 -5
- 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 +0 -22
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.ts +0 -20
- package/projects/doohbot/src/lib/shared/pipes/simple-markdown.pipe.ts +0 -19
- package/projects/doohbot/src/lib/shared/popout/popout.html +0 -1
- package/projects/doohbot/src/lib/shared/popout/popout.scss +0 -0
- package/projects/doohbot/src/lib/shared/popout/popout.spec.ts +0 -23
- package/projects/doohbot/src/lib/shared/popout/popout.ts +0 -11
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.html +0 -7
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.scss +0 -125
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.spec.ts +0 -21
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.ts +0 -44
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.service.ts +0 -54
- package/projects/doohbot/src/lib/styles/_theme.scss +0 -132
- package/projects/doohbot/src/lib/styles/material-override.scss +0 -302
- package/projects/doohbot/src/lib/styles/utility.scss +0 -588
- package/projects/doohbot/src/public-api.ts +0 -42
- package/projects/doohbot/tsconfig.lib.json +0 -15
- package/projects/doohbot/tsconfig.lib.prod.json +0 -11
- package/projects/doohbot/tsconfig.spec.json +0 -10
- package/proxy.conf.json +0 -8
- package/publish.config.js +0 -25
- package/scripts/publishing/index.ts +0 -67
- package/scripts/publishing/pipeline/01-clean.ts +0 -11
- package/scripts/publishing/pipeline/02-validate-pre.ts +0 -8
- package/scripts/publishing/pipeline/03-build.ts +0 -7
- package/scripts/publishing/pipeline/04-validate-post.ts +0 -8
- package/scripts/publishing/pipeline/05-prepare-package.ts +0 -29
- package/scripts/publishing/pipeline/06-version.ts +0 -23
- package/scripts/publishing/pipeline/07-publish.ts +0 -14
- package/scripts/publishing/pipeline/08-cleanup.ts +0 -5
- package/scripts/publishing/types.ts +0 -36
- package/scripts/publishing/utils/command.ts +0 -15
- package/scripts/publishing/utils/config.ts +0 -17
- package/scripts/validate.ts +0 -166
- package/tsconfig.json +0 -45
- package/tsconfig.scripts.json +0 -15
- /package/{projects/doohbot/src → src}/assets/bot.mp3 +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormsModule } from '@angular/forms';
|
|
4
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'app-login-form',
|
|
8
|
-
standalone: true,
|
|
9
|
-
imports: [CommonModule, FormsModule, MatIconModule],
|
|
10
|
-
templateUrl: './login-form.component.html',
|
|
11
|
-
styleUrls: ['./login-form.component.scss'],
|
|
12
|
-
})
|
|
13
|
-
export class LoginFormComponent {
|
|
14
|
-
@Input() isLoggingIn: boolean = false;
|
|
15
|
-
|
|
16
|
-
@Output() loginSubmit = new EventEmitter<{
|
|
17
|
-
username: string;
|
|
18
|
-
password: string;
|
|
19
|
-
rememberMe: boolean;
|
|
20
|
-
}>();
|
|
21
|
-
@Output() cancel = new EventEmitter<void>();
|
|
22
|
-
|
|
23
|
-
public loginUsername = '';
|
|
24
|
-
public loginPassword = '';
|
|
25
|
-
public showPassword = false;
|
|
26
|
-
public rememberMe = false;
|
|
27
|
-
|
|
28
|
-
togglePasswordVisibility() {
|
|
29
|
-
this.showPassword = !this.showPassword;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
onLoginSubmit() {
|
|
33
|
-
if (this.loginUsername && this.loginPassword) {
|
|
34
|
-
this.loginSubmit.emit({
|
|
35
|
-
username: this.loginUsername,
|
|
36
|
-
password: this.loginPassword,
|
|
37
|
-
rememberMe: this.rememberMe,
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
onCancel() {
|
|
43
|
-
this.cancel.emit();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
<div class="personalization-container">
|
|
2
|
-
<div class="header">
|
|
3
|
-
<div class="title-section">
|
|
4
|
-
<mat-icon class="header-icon">settings_suggest</mat-icon>
|
|
5
|
-
<h2>Personalization</h2>
|
|
6
|
-
</div>
|
|
7
|
-
<button mat-icon-button (click)="onCancel()" matTooltip="Close">
|
|
8
|
-
<mat-icon>close</mat-icon>
|
|
9
|
-
</button>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<mat-dialog-content class="dialog-layout no-padding">
|
|
13
|
-
<!-- Sidebar Navigation -->
|
|
14
|
-
<aside class="sidebar">
|
|
15
|
-
@for (section of sections; track section.id) {
|
|
16
|
-
@if (section.type === 'header') {
|
|
17
|
-
<div class="nav-header">{{ section.label }}</div>
|
|
18
|
-
} @else {
|
|
19
|
-
<div
|
|
20
|
-
class="nav-item"
|
|
21
|
-
[class.active]="activeSection === section.id"
|
|
22
|
-
(click)="selectSection(section.id)"
|
|
23
|
-
>
|
|
24
|
-
<mat-icon>{{ section.icon }}</mat-icon>
|
|
25
|
-
<span>{{ section.label }}</span>
|
|
26
|
-
</div>
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
</aside>
|
|
30
|
-
|
|
31
|
-
<!-- Main Content Area -->
|
|
32
|
-
<main class="main-content">
|
|
33
|
-
<!-- Appearance / Preferences Section -->
|
|
34
|
-
@if (activeSection === 'preferences') {
|
|
35
|
-
<app-preferences-section
|
|
36
|
-
[settings]="settings"
|
|
37
|
-
[colorTokens]="colorTokens"
|
|
38
|
-
[isCustomColorSelected]="isCustomColorSelected()"
|
|
39
|
-
[defaultColor]="personalization.developerDefaults().primaryColor || 'default'"
|
|
40
|
-
(onThemeSelect)="selectTheme($event)"
|
|
41
|
-
(onColorSelect)="selectColor($event)"
|
|
42
|
-
(onButtonStyleSelect)="selectButtonStyle($event)"
|
|
43
|
-
(onSave)="onSave()"
|
|
44
|
-
(onReset)="onReset()"
|
|
45
|
-
>
|
|
46
|
-
</app-preferences-section>
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
<!-- Account / Profile Section -->
|
|
50
|
-
@if (activeSection === 'account_settings') {
|
|
51
|
-
<app-account-section
|
|
52
|
-
(onDeleteAllHistory)="deleteAllHistory()"
|
|
53
|
-
(onLogoutAll)="logoutAllDevices()"
|
|
54
|
-
(onDeleteAccount)="deleteAccount()"
|
|
55
|
-
></app-account-section>
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@if (activeSection === 'profile') {
|
|
59
|
-
<app-profile-section
|
|
60
|
-
[username]="username"
|
|
61
|
-
[userImageUrl]="userImageUrl"
|
|
62
|
-
[userRole]="userRole"
|
|
63
|
-
></app-profile-section>
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
<!-- General Section -->
|
|
67
|
-
@if (activeSection === 'general') {
|
|
68
|
-
<app-setting-section
|
|
69
|
-
[settings]="settings"
|
|
70
|
-
[hasChanges]="hasChanges"
|
|
71
|
-
(onSave)="onSave()"
|
|
72
|
-
></app-setting-section>
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
<!-- Terms and Conditions Section -->
|
|
76
|
-
@if (activeSection === 'terms') {
|
|
77
|
-
<app-terms-section></app-terms-section>
|
|
78
|
-
}
|
|
79
|
-
</main>
|
|
80
|
-
</mat-dialog-content>
|
|
81
|
-
</div>
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
@use '@angular/material' as mat;
|
|
2
|
-
|
|
3
|
-
.personalization-container {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
max-width: none;
|
|
9
|
-
max-height: none;
|
|
10
|
-
max-height: 90vh;
|
|
11
|
-
background: var(--background-color);
|
|
12
|
-
color: var(--text-color);
|
|
13
|
-
border-radius: 12px;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
box-shadow: var(--border-shadow-color);
|
|
16
|
-
|
|
17
|
-
.header {
|
|
18
|
-
flex: 0 0 auto;
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: space-between;
|
|
21
|
-
align-items: center;
|
|
22
|
-
padding: 12px 20px;
|
|
23
|
-
border-bottom: 1px solid var(--border-color);
|
|
24
|
-
background: var(--background-color);
|
|
25
|
-
|
|
26
|
-
.title-section {
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
gap: 10px;
|
|
30
|
-
|
|
31
|
-
.header-icon {
|
|
32
|
-
color: var(--secondary-text-color);
|
|
33
|
-
font-size: 20px;
|
|
34
|
-
width: 20px;
|
|
35
|
-
height: 20px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
h2 {
|
|
39
|
-
margin: 0;
|
|
40
|
-
font-size: 0.95rem;
|
|
41
|
-
font-weight: 500;
|
|
42
|
-
color: var(--secondary-text-color);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.dialog-layout {
|
|
48
|
-
display: flex;
|
|
49
|
-
padding: 0;
|
|
50
|
-
margin: 0;
|
|
51
|
-
flex: 1;
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// --- Sidebar ---
|
|
56
|
-
.sidebar {
|
|
57
|
-
width: 240px;
|
|
58
|
-
background: rgba(var(--black-rgb), 0.02);
|
|
59
|
-
border-right: 1px solid var(--border-color);
|
|
60
|
-
padding: 16px 8px;
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: column;
|
|
63
|
-
gap: 2px;
|
|
64
|
-
overflow-y: auto;
|
|
65
|
-
scrollbar-gutter: stable;
|
|
66
|
-
|
|
67
|
-
&::-webkit-scrollbar {
|
|
68
|
-
width: 4px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&::-webkit-scrollbar-track {
|
|
72
|
-
background: transparent;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&::-webkit-scrollbar-thumb {
|
|
76
|
-
background: rgba(var(--black-rgb), 0.1);
|
|
77
|
-
border-radius: 10px;
|
|
78
|
-
|
|
79
|
-
&:hover {
|
|
80
|
-
background: rgba(var(--black-rgb), 0.2);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.nav-header {
|
|
85
|
-
padding: 12px 12px 6px;
|
|
86
|
-
font-size: 0.75rem;
|
|
87
|
-
font-weight: 600;
|
|
88
|
-
text-transform: uppercase;
|
|
89
|
-
color: var(--secondary-text-color);
|
|
90
|
-
letter-spacing: 0.5px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.nav-item {
|
|
94
|
-
display: flex;
|
|
95
|
-
align-items: center;
|
|
96
|
-
gap: 12px;
|
|
97
|
-
padding: 8px 12px;
|
|
98
|
-
border-radius: 6px;
|
|
99
|
-
cursor: pointer;
|
|
100
|
-
transition: all 0.2s ease;
|
|
101
|
-
color: var(--text-color);
|
|
102
|
-
|
|
103
|
-
mat-icon {
|
|
104
|
-
font-size: 18px;
|
|
105
|
-
width: 18px;
|
|
106
|
-
height: 18px;
|
|
107
|
-
color: var(--secondary-text-color);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
span {
|
|
111
|
-
font-size: 0.9rem;
|
|
112
|
-
font-weight: 400;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&:hover {
|
|
116
|
-
background: rgba(var(--black-rgb), 0.05);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&.active {
|
|
120
|
-
background: rgba(var(--primary-color-rgb), 0.1);
|
|
121
|
-
font-weight: 500;
|
|
122
|
-
color: var(--primary-color);
|
|
123
|
-
|
|
124
|
-
mat-icon {
|
|
125
|
-
color: var(--primary-color);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// --- Main Content ---
|
|
132
|
-
.main-content {
|
|
133
|
-
flex: 1;
|
|
134
|
-
overflow-y: auto;
|
|
135
|
-
background: var(--background-color);
|
|
136
|
-
position: relative;
|
|
137
|
-
|
|
138
|
-
&::-webkit-scrollbar {
|
|
139
|
-
width: 6px;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&::-webkit-scrollbar-track {
|
|
143
|
-
background: transparent;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&::-webkit-scrollbar-thumb {
|
|
147
|
-
background: rgba(var(--black-rgb), 0.1);
|
|
148
|
-
border-radius: 10px;
|
|
149
|
-
|
|
150
|
-
&:hover {
|
|
151
|
-
background: rgba(var(--black-rgb), 0.2);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.full-width {
|
|
159
|
-
width: 100%;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@keyframes slideIn {
|
|
163
|
-
from {
|
|
164
|
-
opacity: 0;
|
|
165
|
-
transform: translateY(4px);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
to {
|
|
169
|
-
opacity: 1;
|
|
170
|
-
transform: translateY(0);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Dark mode overrides
|
|
175
|
-
:host-context(.dark-theme) {
|
|
176
|
-
.personalization-container .sidebar {
|
|
177
|
-
background: var(--background-color);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { Component, inject, OnDestroy } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FormsModule } from '@angular/forms';
|
|
4
|
-
import { MatDialogModule, MatDialogRef } from '@angular/material/dialog';
|
|
5
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
6
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
7
|
-
import { MatTabsModule } from '@angular/material/tabs';
|
|
8
|
-
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
9
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
10
|
-
import { MatInputModule } from '@angular/material/input';
|
|
11
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
12
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
13
|
-
import { PreferencesSectionComponent } from './sections/preferences/preferences-section.component';
|
|
14
|
-
import { ProfileSectionComponent } from './sections/profile/profile-section.component';
|
|
15
|
-
import { TermsSectionComponent } from './sections/terms/terms-section.component';
|
|
16
|
-
import { SettingSectionComponent } from './sections/settings/setting-section.component';
|
|
17
|
-
import { AccountSectionComponent } from './sections/account/account-section.component';
|
|
18
|
-
import { ChatHistoryService } from '../chat/services/chat-history.service';
|
|
19
|
-
import { AuthService } from '../../core/auth/auth.service';
|
|
20
|
-
import { PersonalizationService, PersonalizationSettings } from './personalization.service';
|
|
21
|
-
import { DialogService } from '../../shared/dialog/dialog.service';
|
|
22
|
-
import { DialogUtils } from '../../shared/dialog/dialog.utils';
|
|
23
|
-
import { SnackbarService } from '../../shared/snackbar/snackbar.service';
|
|
24
|
-
import { ThemeService } from '../../core/services/theme.service';
|
|
25
|
-
|
|
26
|
-
@Component({
|
|
27
|
-
selector: 'app-personalization-dialog',
|
|
28
|
-
standalone: true,
|
|
29
|
-
imports: [
|
|
30
|
-
CommonModule,
|
|
31
|
-
FormsModule,
|
|
32
|
-
MatDialogModule,
|
|
33
|
-
MatButtonModule,
|
|
34
|
-
MatIconModule,
|
|
35
|
-
MatTabsModule,
|
|
36
|
-
MatSlideToggleModule,
|
|
37
|
-
MatFormFieldModule,
|
|
38
|
-
MatInputModule,
|
|
39
|
-
MatSelectModule,
|
|
40
|
-
MatTooltipModule,
|
|
41
|
-
PreferencesSectionComponent,
|
|
42
|
-
ProfileSectionComponent,
|
|
43
|
-
SettingSectionComponent,
|
|
44
|
-
TermsSectionComponent,
|
|
45
|
-
AccountSectionComponent,
|
|
46
|
-
],
|
|
47
|
-
templateUrl: './personalization-dialog.component.html',
|
|
48
|
-
styleUrls: ['./personalization-dialog.component.scss'],
|
|
49
|
-
})
|
|
50
|
-
export class PersonalizationDialogComponent implements OnDestroy {
|
|
51
|
-
private dialogRef = inject(MatDialogRef<PersonalizationDialogComponent>);
|
|
52
|
-
private dialogService = inject(DialogService);
|
|
53
|
-
public personalization = inject(PersonalizationService);
|
|
54
|
-
private authService = inject(AuthService);
|
|
55
|
-
private chatHistory = inject(ChatHistoryService);
|
|
56
|
-
private snackbar = inject(SnackbarService);
|
|
57
|
-
|
|
58
|
-
// Local copy of settings for editing
|
|
59
|
-
public settings: PersonalizationSettings = JSON.parse(
|
|
60
|
-
JSON.stringify(this.personalization.settings()),
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
public activeSection = 'profile';
|
|
64
|
-
|
|
65
|
-
public sections = [
|
|
66
|
-
{ id: 'account', label: 'Account', type: 'header' },
|
|
67
|
-
{ id: 'profile', label: 'My profile', icon: 'person_outline', type: 'item' },
|
|
68
|
-
{ id: 'account_settings', label: 'Manage Account', icon: 'manage_accounts', type: 'item' },
|
|
69
|
-
{ id: 'preferences', label: 'Preferences', icon: 'tune', type: 'item' },
|
|
70
|
-
{ id: 'workspace', label: 'Workspace', type: 'header' },
|
|
71
|
-
{ id: 'general', label: 'Settings', icon: 'settings', type: 'item' },
|
|
72
|
-
{ id: 'info', label: 'Support', type: 'header' },
|
|
73
|
-
{ id: 'terms', label: 'Terms & Conditions', icon: 'description', type: 'item' },
|
|
74
|
-
];
|
|
75
|
-
|
|
76
|
-
public colorTokens = [
|
|
77
|
-
{
|
|
78
|
-
name: 'Standard',
|
|
79
|
-
value: 'default',
|
|
80
|
-
},
|
|
81
|
-
{ name: 'Purple', value: '#7c3aed' },
|
|
82
|
-
{ name: 'Pink', value: '#db2777' },
|
|
83
|
-
{ name: 'Red', value: '#dc2626' },
|
|
84
|
-
{ name: 'Orange', value: '#ea580c' },
|
|
85
|
-
{ name: 'Green', value: '#16a34a' },
|
|
86
|
-
{ name: 'Teal', value: '#0d9488' },
|
|
87
|
-
{ name: 'Blue', value: '#2563eb' },
|
|
88
|
-
];
|
|
89
|
-
|
|
90
|
-
private themeService = inject(ThemeService);
|
|
91
|
-
private originalColor: string = '';
|
|
92
|
-
private isSaved = false;
|
|
93
|
-
|
|
94
|
-
constructor() {
|
|
95
|
-
this.originalColor = this.personalization.settings().appearance.primaryColor;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
onSave() {
|
|
99
|
-
if (this.activeSection === 'preferences') {
|
|
100
|
-
this.isSaved = true;
|
|
101
|
-
this.personalization.updateAppearance(this.settings.appearance);
|
|
102
|
-
// Re-apply to ensure consistency (effect handles it, but just in case)
|
|
103
|
-
this.snackbar.success('Appearance settings saved');
|
|
104
|
-
} else if (this.activeSection === 'general') {
|
|
105
|
-
this.personalization.updateInstructions(this.settings.customInstructions);
|
|
106
|
-
this.snackbar.success('Settings saved');
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
onCancel() {
|
|
111
|
-
this.dialogRef.close(false);
|
|
112
|
-
// ngOnDestroy will handle revert
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
ngOnDestroy() {
|
|
116
|
-
if (!this.isSaved) {
|
|
117
|
-
// Revert to original color if not saved
|
|
118
|
-
this.themeService.applyPrimaryColorToGlobal(this.originalColor);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
onReset() {
|
|
123
|
-
DialogUtils.confirmReset(this.dialogService).subscribe((confirmed) => {
|
|
124
|
-
if (confirmed) {
|
|
125
|
-
// Only reset the current section
|
|
126
|
-
if (this.activeSection === 'preferences') {
|
|
127
|
-
// Reset only appearance settings to defaults
|
|
128
|
-
this.personalization.resetToDefaults();
|
|
129
|
-
// Re-clone settings to update UI
|
|
130
|
-
this.settings = JSON.parse(JSON.stringify(this.personalization.settings()));
|
|
131
|
-
|
|
132
|
-
// Live preview the reset
|
|
133
|
-
this.themeService.applyPrimaryColorToGlobal(this.settings.appearance.primaryColor);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
selectTheme(theme: 'light' | 'dark' | 'auto') {
|
|
140
|
-
this.settings.appearance.theme = theme;
|
|
141
|
-
// Optional: Preview theme? User only asked for color.
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
selectColor(color: string) {
|
|
145
|
-
this.settings.appearance.primaryColor = color;
|
|
146
|
-
//! Live Preview for changed color
|
|
147
|
-
// this.themeService.applyPrimaryColorToGlobal(color);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
selectButtonStyle(style: 'fab' | 'sidebar' | 'sidebar-top' | 'sidebar-bottom') {
|
|
151
|
-
this.settings.appearance.buttonStyle = style;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
selectSection(sectionId: string) {
|
|
155
|
-
if (this.sections.find((s) => s.id === sectionId && s.type === 'item')) {
|
|
156
|
-
this.activeSection = sectionId;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
get hasChanges(): boolean {
|
|
161
|
-
if (this.activeSection === 'preferences') return this.hasPreferencesChanges();
|
|
162
|
-
if (this.activeSection === 'general') return this.hasInstructionChanges();
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
hasPreferencesChanges(): boolean {
|
|
167
|
-
const original = this.personalization.settings().appearance;
|
|
168
|
-
const current = this.settings.appearance;
|
|
169
|
-
return JSON.stringify(original) !== JSON.stringify(current);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
hasInstructionChanges(): boolean {
|
|
173
|
-
const original = this.personalization.settings().customInstructions;
|
|
174
|
-
const current = this.settings.customInstructions;
|
|
175
|
-
return JSON.stringify(original) !== JSON.stringify(current);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
get username(): string {
|
|
179
|
-
return this.authService.getLoggedInUserName();
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
get userImageUrl(): string | null {
|
|
183
|
-
return this.authService.getLoggedInUserImageUrl();
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
get userRole(): string {
|
|
187
|
-
return this.authService.getLoggedInUserRole();
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
isCustomColorSelected(): boolean {
|
|
191
|
-
return !this.colorTokens.some(
|
|
192
|
-
(token) => token.value.toLowerCase() === this.settings.appearance.primaryColor.toLowerCase(),
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
onCustomColorChange(event: Event) {
|
|
197
|
-
const color = (event.target as HTMLInputElement).value;
|
|
198
|
-
this.selectColor(color);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
deleteAllHistory() {
|
|
202
|
-
const userId = this.authService.getUserId() || '';
|
|
203
|
-
this.chatHistory.deleteAllHistory(userId.toString()).subscribe(() => {
|
|
204
|
-
// History cleared
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
logoutAllDevices() {
|
|
209
|
-
console.log('Logging out of all devices...');
|
|
210
|
-
// Implement service call when API is ready
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
deleteAccount() {
|
|
214
|
-
console.log('Deleting account...');
|
|
215
|
-
// Implement service call when API is ready
|
|
216
|
-
}
|
|
217
|
-
}
|