@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,100 +0,0 @@
|
|
|
1
|
-
.dialog-container {
|
|
2
|
-
padding: 0;
|
|
3
|
-
min-width: 320px;
|
|
4
|
-
max-width: 500px;
|
|
5
|
-
|
|
6
|
-
.dialog-header {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
gap: 12px;
|
|
10
|
-
padding: 24px 24px 16px;
|
|
11
|
-
margin-bottom: 0;
|
|
12
|
-
|
|
13
|
-
.dialog-icon {
|
|
14
|
-
font-size: 32px;
|
|
15
|
-
width: 32px;
|
|
16
|
-
height: 32px;
|
|
17
|
-
color: var(--primary-color);
|
|
18
|
-
|
|
19
|
-
&.warn-icon {
|
|
20
|
-
color: var(--red);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
h2 {
|
|
25
|
-
margin: 0;
|
|
26
|
-
font-size: 20px;
|
|
27
|
-
font-weight: 600;
|
|
28
|
-
color: var(--secondary-text-color);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
mat-dialog-content {
|
|
33
|
-
padding: 0 24px 24px;
|
|
34
|
-
margin: 0;
|
|
35
|
-
|
|
36
|
-
.dialog-message {
|
|
37
|
-
margin: 0;
|
|
38
|
-
font-size: 14px;
|
|
39
|
-
line-height: 1.6;
|
|
40
|
-
color: var(--text-color);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
mat-dialog-actions {
|
|
45
|
-
padding: 12px 24px 24px;
|
|
46
|
-
margin: 0;
|
|
47
|
-
gap: 12px;
|
|
48
|
-
|
|
49
|
-
.cancel-btn {
|
|
50
|
-
color: var(--secondary-text-color, var(--grey));
|
|
51
|
-
transition: all 0.2s ease;
|
|
52
|
-
|
|
53
|
-
&:hover {
|
|
54
|
-
background-color: var(--hover-bg);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.confirm-btn {
|
|
59
|
-
font-weight: 500;
|
|
60
|
-
transition: all 0.2s ease;
|
|
61
|
-
|
|
62
|
-
&.warn-btn {
|
|
63
|
-
background-color: var(--red);
|
|
64
|
-
color: var(--white);
|
|
65
|
-
|
|
66
|
-
&:hover {
|
|
67
|
-
background-color: var(--red);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&.primary-btn {
|
|
72
|
-
background-color: var(--primary-color);
|
|
73
|
-
color: var(--white);
|
|
74
|
-
|
|
75
|
-
&:hover {
|
|
76
|
-
background-color: var(--primary-color);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&.accent-btn {
|
|
81
|
-
background-color: var(--light-red);
|
|
82
|
-
color: var(--white);
|
|
83
|
-
|
|
84
|
-
&:hover {
|
|
85
|
-
background-color: var(--light-red);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
//! moved to material-override.scss
|
|
93
|
-
|
|
94
|
-
// ::ng-deep {
|
|
95
|
-
// .cdk-overlay-pane {
|
|
96
|
-
// .mat-mdc-dialog-container {
|
|
97
|
-
// --mdc-dialog-container-color: var(--background-color);
|
|
98
|
-
// }
|
|
99
|
-
// }
|
|
100
|
-
// }
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Component, Inject } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
4
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
6
|
-
|
|
7
|
-
export interface DialogData {
|
|
8
|
-
title: string;
|
|
9
|
-
message: string;
|
|
10
|
-
confirmText?: string;
|
|
11
|
-
cancelText?: string;
|
|
12
|
-
confirmButtonColor?: 'primary' | 'accent' | 'warn';
|
|
13
|
-
icon?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'app-dialog',
|
|
18
|
-
standalone: true,
|
|
19
|
-
imports: [CommonModule, MatDialogModule, MatButtonModule, MatIconModule],
|
|
20
|
-
templateUrl: './dialog.component.html',
|
|
21
|
-
styleUrls: ['./dialog.component.scss'],
|
|
22
|
-
})
|
|
23
|
-
export class DialogComponent {
|
|
24
|
-
constructor(
|
|
25
|
-
public dialogRef: MatDialogRef<DialogComponent>,
|
|
26
|
-
@Inject(MAT_DIALOG_DATA) public data: DialogData,
|
|
27
|
-
) {
|
|
28
|
-
// Set defaults
|
|
29
|
-
this.data.confirmText = this.data.confirmText || 'Confirm';
|
|
30
|
-
this.data.cancelText = this.data.cancelText || 'Cancel';
|
|
31
|
-
this.data.confirmButtonColor = this.data.confirmButtonColor || 'warn';
|
|
32
|
-
this.data.icon = this.data.icon || 'warning';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
onCancel(): void {
|
|
36
|
-
this.dialogRef.close(false);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
onConfirm(): void {
|
|
40
|
-
this.dialogRef.close(true);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import { DialogComponent, DialogData } from './dialog.component';
|
|
5
|
-
import { InputDialogComponent, InputDialogData } from '../input-dialog/input-dialog.component';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root',
|
|
9
|
-
})
|
|
10
|
-
export class DialogService {
|
|
11
|
-
constructor(private dialog: MatDialog) { }
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Opens a confirmation dialog with customizable options
|
|
15
|
-
* @param data Configuration for the dialog
|
|
16
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
17
|
-
*/
|
|
18
|
-
open(data: DialogData): Observable<boolean> {
|
|
19
|
-
const dialogRef = this.dialog.open(DialogComponent, {
|
|
20
|
-
width: '400px',
|
|
21
|
-
data: data,
|
|
22
|
-
disableClose: false,
|
|
23
|
-
autoFocus: true,
|
|
24
|
-
restoreFocus: true,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
return dialogRef.afterClosed();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Convenience method for delete confirmation dialogs
|
|
32
|
-
* @param itemName Name of the item being deleted
|
|
33
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
34
|
-
*/
|
|
35
|
-
confirmDelete(itemName: string = 'this item'): Observable<boolean> {
|
|
36
|
-
return this.open({
|
|
37
|
-
title: 'Confirm Delete',
|
|
38
|
-
message: `Are you sure you want to delete ${itemName}? This action cannot be undone.`,
|
|
39
|
-
confirmText: 'Delete',
|
|
40
|
-
cancelText: 'Cancel',
|
|
41
|
-
confirmButtonColor: 'warn',
|
|
42
|
-
icon: 'delete_forever',
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Opens a dialog with an input field
|
|
48
|
-
* @param data Configuration for the input dialog
|
|
49
|
-
* @returns Observable that emits the input value if confirmed, null if cancelled
|
|
50
|
-
*/
|
|
51
|
-
openInput(data: InputDialogData): Observable<string | null> {
|
|
52
|
-
const dialogRef = this.dialog.open(InputDialogComponent, {
|
|
53
|
-
width: '400px',
|
|
54
|
-
data: data,
|
|
55
|
-
disableClose: false,
|
|
56
|
-
autoFocus: true,
|
|
57
|
-
restoreFocus: true,
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
return dialogRef.afterClosed();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { DialogService } from './dialog.service';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Utility class for common dialog operations
|
|
6
|
-
* Provides reusable dialog configurations for consistency across the application
|
|
7
|
-
*/
|
|
8
|
-
export class DialogUtils {
|
|
9
|
-
/**
|
|
10
|
-
* Show a logout confirmation dialog
|
|
11
|
-
* @param dialogService The DialogService instance
|
|
12
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
13
|
-
*/
|
|
14
|
-
static confirmLogout(dialogService: DialogService): Observable<boolean> {
|
|
15
|
-
return dialogService.open({
|
|
16
|
-
title: 'Logout',
|
|
17
|
-
message: 'Are you sure you want to logout?',
|
|
18
|
-
confirmText: 'Logout',
|
|
19
|
-
cancelText: 'Cancel',
|
|
20
|
-
icon: 'logout',
|
|
21
|
-
confirmButtonColor: 'warn',
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Show a reset confirmation dialog
|
|
27
|
-
* @param dialogService The DialogService instance
|
|
28
|
-
* @param itemName Optional name of what is being reset (default: 'preferences')
|
|
29
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
30
|
-
*/
|
|
31
|
-
static confirmReset(
|
|
32
|
-
dialogService: DialogService,
|
|
33
|
-
itemName: string = 'preferences'
|
|
34
|
-
): Observable<boolean> {
|
|
35
|
-
return dialogService.open({
|
|
36
|
-
title: 'Reset to Defaults',
|
|
37
|
-
message: `Are you sure you want to reset ${itemName} to default settings? This action cannot be undone.`,
|
|
38
|
-
confirmText: 'Reset',
|
|
39
|
-
cancelText: 'Cancel',
|
|
40
|
-
icon: 'restart_alt',
|
|
41
|
-
confirmButtonColor: 'warn',
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Show a delete confirmation dialog
|
|
47
|
-
* @param dialogService The DialogService instance
|
|
48
|
-
* @param itemName Name of the item being deleted
|
|
49
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
50
|
-
*/
|
|
51
|
-
static confirmDelete(
|
|
52
|
-
dialogService: DialogService,
|
|
53
|
-
itemName: string = 'this item'
|
|
54
|
-
): Observable<boolean> {
|
|
55
|
-
return dialogService.open({
|
|
56
|
-
title: 'Confirm Delete',
|
|
57
|
-
message: `Are you sure you want to delete ${itemName}? This action cannot be undone.`,
|
|
58
|
-
confirmText: 'Delete',
|
|
59
|
-
cancelText: 'Cancel',
|
|
60
|
-
confirmButtonColor: 'warn',
|
|
61
|
-
icon: 'delete_forever',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Show a clear all confirmation dialog
|
|
67
|
-
* @param dialogService The DialogService instance
|
|
68
|
-
* @param itemName Name of what is being cleared (e.g., 'chat history', 'all sessions')
|
|
69
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
70
|
-
*/
|
|
71
|
-
static confirmClearAll(
|
|
72
|
-
dialogService: DialogService,
|
|
73
|
-
itemName: string = 'all items'
|
|
74
|
-
): Observable<boolean> {
|
|
75
|
-
return dialogService.open({
|
|
76
|
-
title: 'Clear All',
|
|
77
|
-
message: `Are you sure you want to clear ${itemName}? This action cannot be undone.`,
|
|
78
|
-
confirmText: 'Clear All',
|
|
79
|
-
cancelText: 'Cancel',
|
|
80
|
-
confirmButtonColor: 'warn',
|
|
81
|
-
icon: 'delete_sweep',
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Show a discard changes confirmation dialog
|
|
87
|
-
* @param dialogService The DialogService instance
|
|
88
|
-
* @returns Observable that emits true if confirmed, false if cancelled
|
|
89
|
-
*/
|
|
90
|
-
static confirmDiscardChanges(dialogService: DialogService): Observable<boolean> {
|
|
91
|
-
return dialogService.open({
|
|
92
|
-
title: 'Discard Changes',
|
|
93
|
-
message: 'You have unsaved changes. Are you sure you want to discard them?',
|
|
94
|
-
confirmText: 'Discard',
|
|
95
|
-
cancelText: 'Keep Editing',
|
|
96
|
-
confirmButtonColor: 'warn',
|
|
97
|
-
icon: 'warning',
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<details class="dropdown-menu" #details>
|
|
2
|
-
<summary role="button" class="dropdown-trigger">
|
|
3
|
-
<ng-content select="[trigger]"></ng-content>
|
|
4
|
-
</summary>
|
|
5
|
-
<ul class="dropdown-list">
|
|
6
|
-
<ng-content></ng-content>
|
|
7
|
-
</ul>
|
|
8
|
-
</details>
|
|
9
|
-
|
|
10
|
-
<!-- ussage example:
|
|
11
|
-
<app-dropdown-menu>
|
|
12
|
-
<span trigger>☰ Menu</span>
|
|
13
|
-
|
|
14
|
-
<app-menu-item href="/profile" (selected)="doSomething('profile')">
|
|
15
|
-
My Profile
|
|
16
|
-
</app-menu-item>
|
|
17
|
-
|
|
18
|
-
<app-menu-item href="/settings" (selected)="doSomething('settings')">
|
|
19
|
-
Settings
|
|
20
|
-
</app-menu-item>
|
|
21
|
-
|
|
22
|
-
<app-menu-item href="#" (selected)="logout()">
|
|
23
|
-
Logout
|
|
24
|
-
</app-menu-item>
|
|
25
|
-
</app-dropdown-menu> -->
|
|
26
|
-
|
|
27
|
-
<!--
|
|
28
|
-
Note: The above usage example is commented out to avoid rendering issues.
|
|
29
|
-
It demonstrates how to use the DropdownMenu component with MenuItem components as options.
|
|
30
|
-
-->
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
.dropdown-menu {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: inline-block;
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 0;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.dropdown-menu summary {
|
|
9
|
-
list-style: none;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
outline: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.dropdown-menu summary::-webkit-details-marker {
|
|
15
|
-
display: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.dropdown-list {
|
|
19
|
-
position: absolute;
|
|
20
|
-
top: 100%;
|
|
21
|
-
left: 0;
|
|
22
|
-
margin: 8px 0 0 0;
|
|
23
|
-
padding: 8px 0;
|
|
24
|
-
width: 180px;
|
|
25
|
-
background: var(--background-color);
|
|
26
|
-
border-radius: 6px;
|
|
27
|
-
box-shadow: var(--border-shadow-color);
|
|
28
|
-
z-index: 1000;
|
|
29
|
-
list-style: none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.dropdown-list::before {
|
|
33
|
-
content: '';
|
|
34
|
-
position: absolute;
|
|
35
|
-
top: -6px;
|
|
36
|
-
left: 16px;
|
|
37
|
-
width: 0;
|
|
38
|
-
height: 0;
|
|
39
|
-
border: 6px solid transparent;
|
|
40
|
-
border-bottom-color: var(--background-color);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.dropdown-list li a {
|
|
44
|
-
display: block;
|
|
45
|
-
padding: 8px 16px;
|
|
46
|
-
color: var(--primary-color);
|
|
47
|
-
text-decoration: none;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.dropdown-list li a:hover {
|
|
51
|
-
background: var(--red);
|
|
52
|
-
color: var(--secondary-color);
|
|
53
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { DropdownMenu } from './dropdown-menu.component';
|
|
4
|
-
|
|
5
|
-
describe('DropdownMenu', () => {
|
|
6
|
-
let component: DropdownMenu;
|
|
7
|
-
let fixture: ComponentFixture<DropdownMenu>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [DropdownMenu],
|
|
12
|
-
}).compileComponents();
|
|
13
|
-
|
|
14
|
-
fixture = TestBed.createComponent(DropdownMenu);
|
|
15
|
-
component = fixture.componentInstance;
|
|
16
|
-
fixture.detectChanges();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should create', () => {
|
|
20
|
-
expect(component).toBeTruthy();
|
|
21
|
-
});
|
|
22
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterContentInit,
|
|
3
|
-
Component,
|
|
4
|
-
ContentChildren,
|
|
5
|
-
ElementRef,
|
|
6
|
-
QueryList,
|
|
7
|
-
ViewChild,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import { MenuItem } from '../menu-item/menu-item.component';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'app-dropdown-menu',
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [],
|
|
15
|
-
templateUrl: './dropdown-menu.component.html',
|
|
16
|
-
styleUrl: './dropdown-menu.component.scss',
|
|
17
|
-
})
|
|
18
|
-
export class DropdownMenu implements AfterContentInit {
|
|
19
|
-
@ViewChild('details') detailsRef!: ElementRef<HTMLDetailsElement>;
|
|
20
|
-
|
|
21
|
-
@ContentChildren(MenuItem) menuItems!: QueryList<MenuItem>;
|
|
22
|
-
|
|
23
|
-
ngAfterContentInit() {
|
|
24
|
-
// Subscribe to all menu item selections
|
|
25
|
-
this.menuItems.forEach((item) => {
|
|
26
|
-
item.selected.subscribe(() => {
|
|
27
|
-
this.close();
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
close(): void {
|
|
33
|
-
this.detailsRef.nativeElement.open = false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<div class="dialog-container">
|
|
2
|
-
<h2 mat-dialog-title>{{ data.title }}</h2>
|
|
3
|
-
<mat-dialog-content>
|
|
4
|
-
<p class="dialog-message">{{ data.message }}</p>
|
|
5
|
-
<div class="input-group">
|
|
6
|
-
<input type="text" class="dialog-input" [(ngModel)]="value" [placeholder]="data.placeholder"
|
|
7
|
-
(keyup.enter)="onConfirm()" focus="true" />
|
|
8
|
-
</div>
|
|
9
|
-
</mat-dialog-content>
|
|
10
|
-
<mat-dialog-actions align="end">
|
|
11
|
-
<button mat-button class="cancel-btn" (click)="onCancel()">{{ data.cancelText }}</button>
|
|
12
|
-
<button mat-flat-button color="primary" class="confirm-btn" [disabled]="!value.trim()" (click)="onConfirm()">
|
|
13
|
-
{{ data.confirmText }}
|
|
14
|
-
</button>
|
|
15
|
-
</mat-dialog-actions>
|
|
16
|
-
</div>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
.dialog-container {
|
|
2
|
-
padding: 8px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.dialog-message {
|
|
6
|
-
color: var(--secondary-text-color);
|
|
7
|
-
margin-bottom: 20px;
|
|
8
|
-
font-size: 14px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.input-group {
|
|
12
|
-
margin-bottom: 20px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.dialog-input {
|
|
16
|
-
width: 100%;
|
|
17
|
-
padding: 12px 16px;
|
|
18
|
-
border: 1px solid var(--border-color);
|
|
19
|
-
border-radius: 8px;
|
|
20
|
-
background: var(--input-bg);
|
|
21
|
-
color: var(--text-color);
|
|
22
|
-
font-size: 14px;
|
|
23
|
-
font-family: inherit;
|
|
24
|
-
transition: all 0.2s;
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
|
|
27
|
-
&:focus {
|
|
28
|
-
outline: none;
|
|
29
|
-
border-color: var(--primary-color);
|
|
30
|
-
box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
|
|
31
|
-
background: #fff;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.cancel-btn {
|
|
37
|
-
border-radius: 8px;
|
|
38
|
-
font-weight: 500;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.confirm-btn {
|
|
42
|
-
border-radius: 8px;
|
|
43
|
-
font-weight: 500;
|
|
44
|
-
margin-left: 8px;
|
|
45
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Component, Inject } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
4
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
-
import { FormsModule } from '@angular/forms';
|
|
6
|
-
|
|
7
|
-
export interface InputDialogData {
|
|
8
|
-
title: string;
|
|
9
|
-
message: string;
|
|
10
|
-
initialValue: string;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
confirmText?: string;
|
|
13
|
-
cancelText?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'app-input-dialog',
|
|
18
|
-
standalone: true,
|
|
19
|
-
imports: [CommonModule, MatDialogModule, MatButtonModule, FormsModule],
|
|
20
|
-
templateUrl: './input-dialog.component.html',
|
|
21
|
-
styleUrls: ['./input-dialog.component.scss'],
|
|
22
|
-
})
|
|
23
|
-
export class InputDialogComponent {
|
|
24
|
-
public value: string;
|
|
25
|
-
|
|
26
|
-
constructor(
|
|
27
|
-
public dialogRef: MatDialogRef<InputDialogComponent>,
|
|
28
|
-
@Inject(MAT_DIALOG_DATA) public data: InputDialogData,
|
|
29
|
-
) {
|
|
30
|
-
this.value = data.initialValue;
|
|
31
|
-
// Set defaults
|
|
32
|
-
this.data.confirmText = this.data.confirmText || 'Save';
|
|
33
|
-
this.data.cancelText = this.data.cancelText || 'Cancel';
|
|
34
|
-
this.data.placeholder = this.data.placeholder || 'Enter value...';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
onCancel(): void {
|
|
38
|
-
this.dialogRef.close(null);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
onConfirm(): void {
|
|
42
|
-
if (this.value && this.value.trim()) {
|
|
43
|
-
this.dialogRef.close(this.value.trim());
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
File without changes
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { MenuItem } from './menu-item.component';
|
|
4
|
-
|
|
5
|
-
describe('MenuItem', () => {
|
|
6
|
-
let component: MenuItem;
|
|
7
|
-
let fixture: ComponentFixture<MenuItem>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [MenuItem],
|
|
12
|
-
}).compileComponents();
|
|
13
|
-
|
|
14
|
-
fixture = TestBed.createComponent(MenuItem);
|
|
15
|
-
component = fixture.componentInstance;
|
|
16
|
-
fixture.detectChanges();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should create', () => {
|
|
20
|
-
expect(component).toBeTruthy();
|
|
21
|
-
});
|
|
22
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'app-menu-item',
|
|
5
|
-
standalone: true,
|
|
6
|
-
imports: [],
|
|
7
|
-
templateUrl: './menu-item.component.html',
|
|
8
|
-
styleUrl: './menu-item.component.scss',
|
|
9
|
-
})
|
|
10
|
-
export class MenuItem {
|
|
11
|
-
@Input() href = '#';
|
|
12
|
-
@Output() selected = new EventEmitter<void>();
|
|
13
|
-
|
|
14
|
-
onClick(event: Event): void {
|
|
15
|
-
// Optional: prevent default if used for actions, not navigation
|
|
16
|
-
// event.preventDefault();
|
|
17
|
-
|
|
18
|
-
this.selected.emit();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform, inject } from '@angular/core';
|
|
2
|
-
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
|
-
import { MarkdownService } from '../../core/services/markdown.service';
|
|
4
|
-
|
|
5
|
-
@Pipe({
|
|
6
|
-
name: 'Markdown',
|
|
7
|
-
standalone: true,
|
|
8
|
-
pure: true,
|
|
9
|
-
})
|
|
10
|
-
export class MarkdownPipe implements PipeTransform {
|
|
11
|
-
private markdownService = inject(MarkdownService);
|
|
12
|
-
private sanitizer = inject(DomSanitizer);
|
|
13
|
-
|
|
14
|
-
transform(value: string | undefined | null): SafeHtml {
|
|
15
|
-
if (!value) return '';
|
|
16
|
-
const html = this.markdownService.convert(value);
|
|
17
|
-
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>popout works!</p>
|
|
File without changes
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { Popout } from './popout';
|
|
4
|
-
|
|
5
|
-
describe('Popout', () => {
|
|
6
|
-
let component: Popout;
|
|
7
|
-
let fixture: ComponentFixture<Popout>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [Popout]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(Popout);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<div class="snackbar-message" [ngClass]="'type-' + type">
|
|
2
|
-
<div class="error-content">
|
|
3
|
-
<mat-icon class="alert-icon">{{ icon }}</mat-icon>
|
|
4
|
-
<span class="error-text">{{ message }}</span>
|
|
5
|
-
</div>
|
|
6
|
-
<mat-icon class="close-icon" (click)="close()">close</mat-icon>
|
|
7
|
-
</div>
|