@aakash58/chatbot 1.1.21 → 1.1.24

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.
Files changed (351) hide show
  1. package/README.md +22 -298
  2. package/esm2022/aakash58-chatbot.mjs +5 -0
  3. package/esm2022/lib/app/chat/chat-ui-state.service.mjs +170 -0
  4. package/esm2022/lib/app/chat/chat.service.mjs +445 -0
  5. package/esm2022/lib/app/chat/components/chat-button/chat-button.component.mjs +50 -0
  6. package/esm2022/lib/app/chat/components/chat-footer/chat-footer.component.mjs +12 -0
  7. package/esm2022/lib/app/chat/components/chat-header/chat-header.component.mjs +66 -0
  8. package/esm2022/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.mjs +186 -0
  9. package/esm2022/lib/app/chat/components/chat-window/chat-window.component.mjs +312 -0
  10. package/esm2022/lib/app/chat/components/message-input/message-input.component.mjs +36 -0
  11. package/esm2022/lib/app/chat/components/message-list/message-list.component.mjs +115 -0
  12. package/esm2022/lib/app/chat/model/chat-history.model.mjs +2 -0
  13. package/esm2022/lib/app/chat/model/chat-request.model.mjs +2 -0
  14. package/esm2022/lib/app/chat/model/chat-response.model.mjs +2 -0
  15. package/esm2022/lib/app/chat/model/chat-session.model.mjs +2 -0
  16. package/esm2022/lib/app/chat/model/chat-stream-message.model.mjs +2 -0
  17. package/esm2022/lib/app/chat/model/chat-stream-response.model.mjs +2 -0
  18. package/esm2022/lib/app/chat/services/chat-api.service.mjs +61 -0
  19. package/esm2022/lib/app/chat/services/chat-audio.service.mjs +50 -0
  20. package/esm2022/lib/app/chat/services/chat-history.service.mjs +252 -0
  21. package/esm2022/lib/app/login/login-form.component.mjs +46 -0
  22. package/esm2022/lib/app/personalization/personalization-dialog.component.mjs +194 -0
  23. package/esm2022/lib/app/personalization/personalization.service.mjs +149 -0
  24. package/esm2022/lib/app/personalization/sections/account/account-section.component.mjs +122 -0
  25. package/esm2022/lib/app/personalization/sections/preferences/color-picker-dialog.component.mjs +86 -0
  26. package/esm2022/lib/app/personalization/sections/preferences/preferences-section.component.mjs +115 -0
  27. package/esm2022/lib/app/personalization/sections/profile/profile-section.component.mjs +29 -0
  28. package/esm2022/lib/app/personalization/sections/settings/setting-section.component.mjs +30 -0
  29. package/esm2022/lib/app/personalization/sections/terms/terms-section.component.mjs +12 -0
  30. package/esm2022/lib/constant/doohbot-constant.mjs +28 -0
  31. package/esm2022/lib/constant/html-entities.mjs +9 -0
  32. package/esm2022/lib/constant/utf8.mjs +10 -0
  33. package/esm2022/lib/core/app-const.mjs +61 -0
  34. package/esm2022/lib/core/auth/account-api.service.mjs +40 -0
  35. package/esm2022/lib/core/auth/auth.service.mjs +391 -0
  36. package/esm2022/lib/core/auth/models/auth-result.model.mjs +3 -0
  37. package/esm2022/lib/core/auth/models/federated-login-request.model.mjs +6 -0
  38. package/esm2022/lib/core/auth/models/login-request.model.mjs +6 -0
  39. package/esm2022/lib/core/auth/storage.service.mjs +110 -0
  40. package/esm2022/lib/core/directives/draggable/draggable-dialog.directive.mjs +112 -0
  41. package/esm2022/lib/core/directives/fullscreen/fullscreen.directive.mjs +55 -0
  42. package/esm2022/lib/core/directives/resizable/resizable-dialog.directive.mjs +179 -0
  43. package/esm2022/lib/core/environments/environment.mjs +15 -0
  44. package/esm2022/lib/core/environments/environment.prod.mjs +15 -0
  45. package/esm2022/lib/core/helpers/crypto-helper.service.mjs +52 -0
  46. package/esm2022/lib/core/http/http-stream.service.mjs +97 -0
  47. package/esm2022/lib/core/http/http.service.mjs +103 -0
  48. package/esm2022/lib/core/interceptors/auth.interceptor.mjs +96 -0
  49. package/esm2022/lib/core/interceptors/license.interceptor.mjs +44 -0
  50. package/esm2022/lib/core/models/api-config.model.mjs +18 -0
  51. package/esm2022/lib/core/models/api-request.model.mjs +2 -0
  52. package/esm2022/lib/core/models/api-response.model.mjs +8 -0
  53. package/esm2022/lib/core/models/doohbot-config.model.mjs +18 -0
  54. package/esm2022/lib/core/models/license.model.mjs +2 -0
  55. package/esm2022/lib/core/models/message.mjs +2 -0
  56. package/esm2022/lib/core/models/theme-config.model.mjs +2 -0
  57. package/esm2022/lib/core/services/core-config.service.mjs +52 -0
  58. package/esm2022/lib/core/services/license.service.mjs +145 -0
  59. package/esm2022/lib/core/services/markdown.service.mjs +64 -0
  60. package/esm2022/lib/core/services/theme.service.mjs +248 -0
  61. package/esm2022/lib/core/types/auth-mode.type.mjs +2 -0
  62. package/esm2022/lib/core/types/auth-status.type.mjs +5 -0
  63. package/esm2022/lib/core/types/chat-stream.type.mjs +2 -0
  64. package/esm2022/lib/core/types/message-role.type.mjs +2 -0
  65. package/esm2022/lib/core/types/prompt-mode.type.mjs +5 -0
  66. package/esm2022/lib/core/types/snackbar-error.type.mjs +5 -0
  67. package/esm2022/lib/core/types/tenant-resolution-strategy.type.mjs +2 -0
  68. package/esm2022/lib/core/utils/logger.service.mjs +42 -0
  69. package/esm2022/lib/doohbot-input.mjs +20 -0
  70. package/esm2022/lib/doohbot.component.mjs +444 -0
  71. package/esm2022/lib/predefined_messages.mjs +15 -0
  72. package/esm2022/lib/shared/chips/chips.component.mjs +28 -0
  73. package/esm2022/lib/shared/dialog/dialog.component.mjs +36 -0
  74. package/esm2022/lib/shared/dialog/dialog.service.mjs +64 -0
  75. package/esm2022/lib/shared/dialog/dialog.utils.mjs +85 -0
  76. package/esm2022/lib/shared/dropdown-menu/dropdown-menu.component.mjs +29 -0
  77. package/esm2022/lib/shared/input-dialog/input-dialog.component.mjs +38 -0
  78. package/esm2022/lib/shared/menu-item/menu-item.component.mjs +24 -0
  79. package/esm2022/lib/shared/pipes/simple-markdown.pipe.mjs +27 -0
  80. package/esm2022/lib/shared/snackbar/snackbar.component.mjs +43 -0
  81. package/esm2022/lib/shared/snackbar/snackbar.service.mjs +46 -0
  82. package/esm2022/lib/shared/snackbar/snackbar.utils.mjs +43 -0
  83. package/esm2022/public-api.mjs +37 -0
  84. package/fesm2022/aakash58-chatbot.mjs +5193 -0
  85. package/fesm2022/aakash58-chatbot.mjs.map +1 -0
  86. package/index.d.ts +5 -0
  87. package/lib/app/chat/chat-ui-state.service.d.ts +96 -0
  88. package/lib/app/chat/chat.service.d.ts +88 -0
  89. package/lib/app/chat/components/chat-button/chat-button.component.d.ts +16 -0
  90. package/lib/app/chat/components/chat-footer/chat-footer.component.d.ts +5 -0
  91. package/lib/app/chat/components/chat-header/chat-header.component.d.ts +24 -0
  92. package/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.d.ts +49 -0
  93. package/lib/app/chat/components/chat-window/chat-window.component.d.ts +107 -0
  94. package/lib/app/chat/components/message-input/message-input.component.d.ts +12 -0
  95. package/lib/app/chat/components/message-list/message-list.component.d.ts +40 -0
  96. package/lib/app/chat/model/chat-history.model.d.ts +51 -0
  97. package/lib/app/chat/model/chat-request.model.d.ts +10 -0
  98. package/lib/app/chat/model/chat-response.model.d.ts +9 -0
  99. package/lib/app/chat/model/chat-session.model.d.ts +12 -0
  100. 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
  101. package/lib/app/chat/model/chat-stream-response.model.d.ts +10 -0
  102. package/lib/app/chat/services/chat-api.service.d.ts +30 -0
  103. package/lib/app/chat/services/chat-audio.service.d.ts +19 -0
  104. package/lib/app/chat/services/chat-history.service.d.ts +53 -0
  105. package/lib/app/login/login-form.component.d.ts +20 -0
  106. package/lib/app/personalization/personalization-dialog.component.d.ts +53 -0
  107. package/lib/app/personalization/personalization.service.d.ts +66 -0
  108. package/lib/app/personalization/sections/account/account-section.component.d.ts +30 -0
  109. package/lib/app/personalization/sections/preferences/color-picker-dialog.component.d.ts +17 -0
  110. package/lib/app/personalization/sections/preferences/preferences-section.component.d.ts +27 -0
  111. package/lib/app/personalization/sections/profile/profile-section.component.d.ts +17 -0
  112. package/lib/app/personalization/sections/settings/setting-section.component.d.ts +10 -0
  113. package/lib/app/personalization/sections/terms/terms-section.component.d.ts +5 -0
  114. package/lib/constant/doohbot-constant.d.ts +12 -0
  115. package/lib/constant/html-entities.d.ts +8 -0
  116. package/lib/constant/utf8.d.ts +9 -0
  117. package/lib/core/app-const.d.ts +11 -0
  118. package/lib/core/auth/account-api.service.d.ts +20 -0
  119. package/lib/core/auth/auth.service.d.ts +90 -0
  120. package/lib/core/auth/models/auth-result.model.d.ts +4 -0
  121. package/lib/core/auth/models/federated-login-request.model.d.ts +5 -0
  122. package/lib/core/auth/models/login-request.model.d.ts +6 -0
  123. package/lib/core/auth/storage.service.d.ts +21 -0
  124. package/lib/core/directives/draggable/draggable-dialog.directive.d.ts +23 -0
  125. package/lib/core/directives/fullscreen/fullscreen.directive.d.ts +14 -0
  126. package/lib/core/directives/resizable/resizable-dialog.directive.d.ts +30 -0
  127. package/lib/core/environments/environment.d.ts +7 -0
  128. package/lib/core/environments/environment.prod.d.ts +7 -0
  129. package/lib/core/helpers/crypto-helper.service.d.ts +12 -0
  130. package/lib/core/http/http-stream.service.d.ts +18 -0
  131. package/lib/core/http/http.service.d.ts +20 -0
  132. package/lib/core/interceptors/auth.interceptor.d.ts +18 -0
  133. package/lib/core/interceptors/license.interceptor.d.ts +11 -0
  134. package/lib/core/models/api-config.model.d.ts +58 -0
  135. package/lib/core/models/api-request.model.d.ts +77 -0
  136. package/lib/core/models/api-response.model.d.ts +6 -0
  137. package/lib/core/models/doohbot-config.model.d.ts +81 -0
  138. package/{projects/doohbot/src/lib/core/models/license.model.ts → lib/core/models/license.model.d.ts} +23 -27
  139. package/lib/core/models/message.d.ts +16 -0
  140. package/lib/core/models/theme-config.model.d.ts +28 -0
  141. package/lib/core/services/core-config.service.d.ts +23 -0
  142. package/lib/core/services/license.service.d.ts +33 -0
  143. package/lib/core/services/markdown.service.d.ts +8 -0
  144. package/lib/core/services/theme.service.d.ts +40 -0
  145. package/{projects/doohbot/src/lib/core/types/auth-mode.type.ts → lib/core/types/auth-mode.type.d.ts} +4 -4
  146. package/{projects/doohbot/src/lib/core/types/auth-status.type.ts → lib/core/types/auth-status.type.d.ts} +4 -5
  147. package/{projects/doohbot/src/lib/core/types/chat-stream.type.ts → lib/core/types/chat-stream.type.d.ts} +4 -4
  148. package/{projects/doohbot/src/lib/core/types/message-role.type.ts → lib/core/types/message-role.type.d.ts} +4 -4
  149. package/{projects/doohbot/src/lib/core/types/prompt-mode.type.ts → lib/core/types/prompt-mode.type.d.ts} +4 -5
  150. package/{projects/doohbot/src/lib/core/types/snackbar-error.type.ts → lib/core/types/snackbar-error.type.d.ts} +4 -5
  151. package/{projects/doohbot/src/lib/core/types/tenant-resolution-strategy.type.ts → lib/core/types/tenant-resolution-strategy.type.d.ts} +4 -4
  152. package/lib/core/utils/logger.service.d.ts +11 -0
  153. package/lib/doohbot-input.d.ts +19 -0
  154. package/lib/doohbot.component.d.ts +108 -0
  155. package/lib/predefined_messages.d.ts +2 -0
  156. package/lib/shared/chips/chips.component.d.ts +10 -0
  157. package/lib/shared/dialog/dialog.component.d.ts +19 -0
  158. package/lib/shared/dialog/dialog.service.d.ts +29 -0
  159. package/lib/shared/dialog/dialog.utils.d.ts +41 -0
  160. package/lib/shared/dropdown-menu/dropdown-menu.component.d.ts +11 -0
  161. package/lib/shared/input-dialog/input-dialog.component.d.ts +20 -0
  162. package/lib/shared/menu-item/menu-item.component.d.ts +9 -0
  163. package/lib/shared/pipes/simple-markdown.pipe.d.ts +10 -0
  164. package/lib/shared/snackbar/snackbar.component.d.ts +14 -0
  165. package/lib/shared/snackbar/snackbar.service.d.ts +19 -0
  166. package/{projects/doohbot/src/lib/shared/snackbar/snackbar.utils.ts → lib/shared/snackbar/snackbar.utils.d.ts} +33 -49
  167. package/package.json +29 -75
  168. package/public-api.d.ts +11 -0
  169. package/.editorconfig +0 -17
  170. package/.vscode/extensions.json +0 -4
  171. package/.vscode/launch.json +0 -41
  172. package/.vscode/settings.json +0 -14
  173. package/.vscode/tasks.json +0 -60
  174. package/angular.json +0 -132
  175. package/docs/PUBLISHING_GUIDE.md +0 -104
  176. package/projects/app-doohbot/public/assets/const/app-const.json +0 -15
  177. package/projects/app-doohbot/public/assets/const/doohclick_license.json +0 -6
  178. package/projects/app-doohbot/public/favicon.ico +0 -0
  179. package/projects/app-doohbot/src/app/app.config.ts +0 -13
  180. package/projects/app-doohbot/src/app/app.html +0 -31
  181. package/projects/app-doohbot/src/app/app.routes.ts +0 -3
  182. package/projects/app-doohbot/src/app/app.scss +0 -279
  183. package/projects/app-doohbot/src/app/app.spec.ts +0 -23
  184. package/projects/app-doohbot/src/app/app.ts +0 -72
  185. package/projects/app-doohbot/src/index.html +0 -15
  186. package/projects/app-doohbot/src/main.ts +0 -6
  187. package/projects/app-doohbot/src/styles.scss +0 -15
  188. package/projects/app-doohbot/tsconfig.app.json +0 -15
  189. package/projects/app-doohbot/tsconfig.spec.json +0 -14
  190. package/projects/doohbot/README.md +0 -64
  191. package/projects/doohbot/docs/README.md +0 -140
  192. package/projects/doohbot/ng-package.json +0 -10
  193. package/projects/doohbot/package.json +0 -16
  194. package/projects/doohbot/src/lib/app/chat/chat-ui-state.service.ts +0 -194
  195. package/projects/doohbot/src/lib/app/chat/chat.service.ts +0 -547
  196. package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.html +0 -27
  197. package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.scss +0 -115
  198. package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.ts +0 -35
  199. package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.html +0 -3
  200. package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.scss +0 -20
  201. package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.ts +0 -12
  202. package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.html +0 -34
  203. package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.scss +0 -78
  204. package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.ts +0 -52
  205. package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.html +0 -77
  206. package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.scss +0 -346
  207. package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.ts +0 -188
  208. package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.html +0 -146
  209. package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.scss +0 -187
  210. package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.ts +0 -256
  211. package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.html +0 -17
  212. package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.scss +0 -59
  213. package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.ts +0 -28
  214. package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.html +0 -138
  215. package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.scss +0 -436
  216. package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.ts +0 -106
  217. package/projects/doohbot/src/lib/app/chat/model/chat-history.model.ts +0 -57
  218. package/projects/doohbot/src/lib/app/chat/model/chat-request.model.ts +0 -17
  219. package/projects/doohbot/src/lib/app/chat/model/chat-response.model.ts +0 -9
  220. package/projects/doohbot/src/lib/app/chat/model/chat-session.model.ts +0 -14
  221. package/projects/doohbot/src/lib/app/chat/model/chat-stream-response.model.ts +0 -12
  222. package/projects/doohbot/src/lib/app/chat/services/chat-api.service.ts +0 -82
  223. package/projects/doohbot/src/lib/app/chat/services/chat-audio.service.ts +0 -44
  224. package/projects/doohbot/src/lib/app/chat/services/chat-history.service.ts +0 -303
  225. package/projects/doohbot/src/lib/app/login/login-form.component.html +0 -80
  226. package/projects/doohbot/src/lib/app/login/login-form.component.scss +0 -189
  227. package/projects/doohbot/src/lib/app/login/login-form.component.ts +0 -45
  228. package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.html +0 -81
  229. package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.scss +0 -179
  230. package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.ts +0 -217
  231. package/projects/doohbot/src/lib/app/personalization/personalization.service.ts +0 -197
  232. package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.html +0 -111
  233. package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.scss +0 -218
  234. package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.ts +0 -121
  235. package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.html +0 -46
  236. package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.scss +0 -138
  237. package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.ts +0 -28
  238. package/projects/doohbot/src/lib/app/personalization/sections/preferences/color-picker-dialog.component.ts +0 -92
  239. package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.html +0 -198
  240. package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.scss +0 -107
  241. package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.ts +0 -103
  242. package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.html +0 -46
  243. package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.scss +0 -131
  244. package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.ts +0 -23
  245. package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.html +0 -33
  246. package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.scss +0 -61
  247. package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.ts +0 -20
  248. package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.html +0 -30
  249. package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.scss +0 -59
  250. package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.ts +0 -12
  251. package/projects/doohbot/src/lib/constant/doohbot-constant.ts +0 -40
  252. package/projects/doohbot/src/lib/constant/html-entities.ts +0 -8
  253. package/projects/doohbot/src/lib/constant/utf8.ts +0 -9
  254. package/projects/doohbot/src/lib/core/app-const.ts +0 -63
  255. package/projects/doohbot/src/lib/core/auth/account-api.service.ts +0 -53
  256. package/projects/doohbot/src/lib/core/auth/auth.service.ts +0 -478
  257. package/projects/doohbot/src/lib/core/auth/models/auth-result.model.ts +0 -4
  258. package/projects/doohbot/src/lib/core/auth/models/federated-login-request.model.ts +0 -5
  259. package/projects/doohbot/src/lib/core/auth/models/login-request.model.ts +0 -6
  260. package/projects/doohbot/src/lib/core/auth/storage.service.ts +0 -113
  261. package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.directive.ts +0 -123
  262. package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.module.ts +0 -9
  263. package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.directive.ts +0 -58
  264. package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.module.ts +0 -9
  265. package/projects/doohbot/src/lib/core/directives/popout/popout.directive.ts +0 -169
  266. package/projects/doohbot/src/lib/core/directives/popout/popout.module.ts +0 -9
  267. package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.directive.ts +0 -197
  268. package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.module.ts +0 -9
  269. package/projects/doohbot/src/lib/core/enums/api-request-state.enum.ts +0 -9
  270. package/projects/doohbot/src/lib/core/environments/environment.prod.ts +0 -14
  271. package/projects/doohbot/src/lib/core/environments/environment.ts +0 -14
  272. package/projects/doohbot/src/lib/core/helpers/crypto-helper.service.ts +0 -72
  273. package/projects/doohbot/src/lib/core/http/http-stream.service.ts +0 -105
  274. package/projects/doohbot/src/lib/core/http/http.service.ts +0 -148
  275. package/projects/doohbot/src/lib/core/interceptors/auth.interceptor.ts +0 -118
  276. package/projects/doohbot/src/lib/core/interceptors/license.interceptor.ts +0 -50
  277. package/projects/doohbot/src/lib/core/models/api-config.model.ts +0 -82
  278. package/projects/doohbot/src/lib/core/models/api-request.model.ts +0 -92
  279. package/projects/doohbot/src/lib/core/models/api-response.model.ts +0 -13
  280. package/projects/doohbot/src/lib/core/models/doohbot-config.model.ts +0 -109
  281. package/projects/doohbot/src/lib/core/models/message.ts +0 -18
  282. package/projects/doohbot/src/lib/core/models/theme-config.model.ts +0 -48
  283. package/projects/doohbot/src/lib/core/services/core-config.service.ts +0 -53
  284. package/projects/doohbot/src/lib/core/services/doohbot-api.service.ts +0 -207
  285. package/projects/doohbot/src/lib/core/services/license.service.ts +0 -171
  286. package/projects/doohbot/src/lib/core/services/markdown.service.ts +0 -73
  287. package/projects/doohbot/src/lib/core/services/theme.service.ts +0 -305
  288. package/projects/doohbot/src/lib/core/utils/error-handler.util.ts +0 -31
  289. package/projects/doohbot/src/lib/core/utils/logger.service.ts +0 -45
  290. package/projects/doohbot/src/lib/doohbot-input.ts +0 -19
  291. package/projects/doohbot/src/lib/doohbot.component.html +0 -34
  292. package/projects/doohbot/src/lib/doohbot.component.scss +0 -17
  293. package/projects/doohbot/src/lib/doohbot.component.spec.ts +0 -31
  294. package/projects/doohbot/src/lib/doohbot.component.ts +0 -545
  295. package/projects/doohbot/src/lib/elements.ts +0 -25
  296. package/projects/doohbot/src/lib/predefined_messages.ts +0 -14
  297. package/projects/doohbot/src/lib/shared/chips/chips.component.html +0 -9
  298. package/projects/doohbot/src/lib/shared/chips/chips.component.scss +0 -29
  299. package/projects/doohbot/src/lib/shared/chips/chips.component.spec.ts +0 -22
  300. package/projects/doohbot/src/lib/shared/chips/chips.component.ts +0 -20
  301. package/projects/doohbot/src/lib/shared/dialog/dialog.component.html +0 -29
  302. package/projects/doohbot/src/lib/shared/dialog/dialog.component.scss +0 -100
  303. package/projects/doohbot/src/lib/shared/dialog/dialog.component.ts +0 -42
  304. package/projects/doohbot/src/lib/shared/dialog/dialog.service.ts +0 -62
  305. package/projects/doohbot/src/lib/shared/dialog/dialog.utils.ts +0 -102
  306. package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.html +0 -30
  307. package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.scss +0 -53
  308. package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.spec.ts +0 -22
  309. package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.ts +0 -35
  310. package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.html +0 -16
  311. package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.scss +0 -45
  312. package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.ts +0 -46
  313. package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.html +0 -5
  314. package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.scss +0 -0
  315. package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.spec.ts +0 -22
  316. package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.ts +0 -20
  317. package/projects/doohbot/src/lib/shared/pipes/simple-markdown.pipe.ts +0 -19
  318. package/projects/doohbot/src/lib/shared/popout/popout.html +0 -1
  319. package/projects/doohbot/src/lib/shared/popout/popout.scss +0 -0
  320. package/projects/doohbot/src/lib/shared/popout/popout.spec.ts +0 -23
  321. package/projects/doohbot/src/lib/shared/popout/popout.ts +0 -11
  322. package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.html +0 -7
  323. package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.scss +0 -125
  324. package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.spec.ts +0 -21
  325. package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.ts +0 -44
  326. package/projects/doohbot/src/lib/shared/snackbar/snackbar.service.ts +0 -54
  327. package/projects/doohbot/src/lib/styles/_theme.scss +0 -132
  328. package/projects/doohbot/src/lib/styles/material-override.scss +0 -302
  329. package/projects/doohbot/src/lib/styles/utility.scss +0 -588
  330. package/projects/doohbot/src/public-api.ts +0 -42
  331. package/projects/doohbot/tsconfig.lib.json +0 -15
  332. package/projects/doohbot/tsconfig.lib.prod.json +0 -11
  333. package/projects/doohbot/tsconfig.spec.json +0 -10
  334. package/proxy.conf.json +0 -8
  335. package/publish.config.js +0 -25
  336. package/scripts/publishing/index.ts +0 -67
  337. package/scripts/publishing/pipeline/01-clean.ts +0 -11
  338. package/scripts/publishing/pipeline/02-validate-pre.ts +0 -8
  339. package/scripts/publishing/pipeline/03-build.ts +0 -7
  340. package/scripts/publishing/pipeline/04-validate-post.ts +0 -8
  341. package/scripts/publishing/pipeline/05-prepare-package.ts +0 -29
  342. package/scripts/publishing/pipeline/06-version.ts +0 -23
  343. package/scripts/publishing/pipeline/07-publish.ts +0 -14
  344. package/scripts/publishing/pipeline/08-cleanup.ts +0 -5
  345. package/scripts/publishing/types.ts +0 -36
  346. package/scripts/publishing/utils/command.ts +0 -15
  347. package/scripts/publishing/utils/config.ts +0 -17
  348. package/scripts/validate.ts +0 -166
  349. package/tsconfig.json +0 -45
  350. package/tsconfig.scripts.json +0 -15
  351. /package/{projects/doohbot/src → src}/assets/bot.mp3 +0 -0
@@ -1,123 +0,0 @@
1
- import {
2
- Directive,
3
- ElementRef,
4
- HostListener,
5
- Input,
6
- OnInit,
7
- Renderer2,
8
- OnChanges,
9
- SimpleChanges,
10
- } from '@angular/core';
11
-
12
- @Directive({
13
- selector: '[draggableDialog]',
14
- standalone: true,
15
- })
16
- export class DraggableDialogDirective implements OnInit, OnChanges {
17
- private isDragging = false;
18
- private startX = 0;
19
- private startY = 0;
20
- private offsetX = 0;
21
- private offsetY = 0;
22
-
23
- @Input('dragHandle') dragHandleSelector: string | undefined;
24
- @Input() enableDrag = false;
25
-
26
- private dragHandle: HTMLElement | undefined;
27
-
28
- constructor(
29
- private el: ElementRef,
30
- private renderer: Renderer2,
31
- ) {}
32
-
33
- ngOnInit() {
34
- this.updateDragState();
35
- }
36
-
37
- ngOnChanges(changes: SimpleChanges) {
38
- if (changes['enableDrag']) {
39
- this.updateDragState();
40
- }
41
- }
42
-
43
- private updateDragState() {
44
- if (this.enableDrag) {
45
- if (this.dragHandleSelector) {
46
- this.dragHandle = this.el.nativeElement.querySelector(this.dragHandleSelector);
47
- } else {
48
- this.dragHandle = this.el.nativeElement; // fallback
49
- }
50
- if (this.dragHandle) {
51
- this.renderer.setStyle(this.dragHandle, 'cursor', 'move');
52
- }
53
- } else {
54
- if (this.dragHandle) {
55
- this.renderer.setStyle(this.dragHandle, 'cursor', 'default');
56
- }
57
- // We don't need to unset dragHandle, just ensure the cursor is reset and the mousedown check respects the flag?
58
- // Actually, the mousedown listener is always active. We should check enableDrag inside mousedown.
59
- }
60
- }
61
-
62
- @HostListener('mousedown', ['$event'])
63
- onMouseDown(event: MouseEvent) {
64
- if (!this.enableDrag) return;
65
- if (event.defaultPrevented) return; // Respect other handlers (like resize)
66
-
67
- if (!this.dragHandle) return;
68
-
69
- const target = event.target as HTMLElement;
70
-
71
- // Strict check if handle is explicitly provided via selector, ensuring we only drag when clicking that specific handle
72
- if (
73
- this.dragHandleSelector &&
74
- target !== this.dragHandle &&
75
- !this.dragHandle.contains(target)
76
- ) {
77
- return;
78
- }
79
-
80
- // If using the host element as the handle (no selector), allow dragging from children
81
- // BUT exclude specific interactive elements to ensure usability
82
- if (!this.dragHandleSelector) {
83
- // Check if target is a resize handle (has class or data-dir)
84
- if (target.hasAttribute('data-dir') || target.classList.contains('doohbot-resize-handle'))
85
- return;
86
-
87
- if (!this.dragHandle.contains(target)) return;
88
-
89
- // Prevent dragging when interacting with controls
90
- const tagName = target.tagName;
91
- if (['BUTTON', 'INPUT', 'TEXTAREA', 'A', 'SELECT', 'MAT-ICON'].includes(tagName)) return;
92
-
93
- // Optional: explicit opt-out class
94
- if (target.classList.contains('no-drag')) return;
95
- }
96
-
97
- this.isDragging = true;
98
- this.startX = event.clientX - this.offsetX;
99
- this.startY = event.clientY - this.offsetY;
100
-
101
- event.preventDefault();
102
- event.stopImmediatePropagation();
103
- }
104
-
105
- @HostListener('document:mousemove', ['$event'])
106
- onMouseMove(event: MouseEvent) {
107
- if (!this.isDragging) return;
108
-
109
- this.offsetX = event.clientX - this.startX;
110
- this.offsetY = event.clientY - this.startY;
111
-
112
- this.renderer.setStyle(
113
- this.el.nativeElement,
114
- 'transform',
115
- `translate(${this.offsetX}px, ${this.offsetY}px)`,
116
- );
117
- }
118
-
119
- @HostListener('document:mouseup', [])
120
- onMouseUp() {
121
- this.isDragging = false;
122
- }
123
- }
@@ -1,9 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { DraggableDialogDirective } from './draggable-dialog.directive';
3
-
4
- @NgModule({
5
- declarations: [],
6
- imports: [DraggableDialogDirective],
7
- exports: [DraggableDialogDirective],
8
- })
9
- export default class DraggableDialogModule {}
@@ -1,58 +0,0 @@
1
- import { Directive, ElementRef, Input, Renderer2 } from '@angular/core';
2
-
3
- @Directive({
4
- selector: '[appFullscreen]',
5
- standalone: true,
6
- })
7
- export class FullscreenDirective {
8
- private isFullScreen = false;
9
- private preFullscreenState: {
10
- width: string;
11
- height: string;
12
- left: string;
13
- top: string;
14
- } | null = null;
15
-
16
- @Input() fullscreenTarget: string = '.chat-window';
17
-
18
- constructor(
19
- private el: ElementRef,
20
- private renderer: Renderer2,
21
- ) { }
22
-
23
- public toggle(): void {
24
- const targetEl = this.el.nativeElement.querySelector(this.fullscreenTarget);
25
- if (!targetEl) return;
26
-
27
- if (!this.isFullScreen) {
28
- this.preFullscreenState = {
29
- width: targetEl.style.width,
30
- height: targetEl.style.height,
31
- left: targetEl.style.left,
32
- top: targetEl.style.top,
33
- };
34
-
35
- targetEl.style.width = '';
36
- targetEl.style.height = '';
37
- targetEl.style.left = '';
38
- targetEl.style.top = '';
39
- targetEl.style.transform = '';
40
-
41
- this.isFullScreen = true;
42
- } else {
43
- this.isFullScreen = false;
44
-
45
- if (this.preFullscreenState) {
46
- targetEl.style.width = this.preFullscreenState.width;
47
- targetEl.style.height = this.preFullscreenState.height;
48
- targetEl.style.left = this.preFullscreenState.left;
49
- targetEl.style.top = this.preFullscreenState.top;
50
- targetEl.style.transform = ''; // Clear transform to allow CSS transitions/classes
51
- }
52
- }
53
- }
54
-
55
- public getFullscreenState(): boolean {
56
- return this.isFullScreen;
57
- }
58
- }
@@ -1,9 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { FullscreenDirective } from './fullscreen.directive';
3
-
4
- @NgModule({
5
- declarations: [],
6
- imports: [FullscreenDirective],
7
- exports: [FullscreenDirective],
8
- })
9
- export default class FullscreenModule { }
@@ -1,169 +0,0 @@
1
- import {
2
- Component,
3
- ElementRef,
4
- HostListener,
5
- Input,
6
- EventEmitter,
7
- OnDestroy,
8
- Output,
9
- Renderer2,
10
- ViewChild,
11
- } from '@angular/core';
12
-
13
- @Component({
14
- selector: 'popout-window',
15
- template: `
16
- <div #innerWrapper style="width: 100%; height: 100%; overflow: auto;">
17
- <ng-content></ng-content>
18
- </div>
19
- `,
20
- })
21
- export class PopoutWindowDirective implements OnDestroy {
22
- @ViewChild('innerWrapper') private innerWrapper!: ElementRef;
23
-
24
- @Input() windowWidth: number = 400;
25
- @Input() windowHeight: number = 400;
26
- @Input() windowLeft: number = 200;
27
- @Input() windowTop: number = 200;
28
- @Input() windowTitle: string = 'Popout Window';
29
- @Input() windowStyle: string = '';
30
- @Input() windowStyleUrl: string = '';
31
- @Input() suppressCloneStyles = false;
32
- @Input() get isPoppedOut(): boolean {
33
- return this.isOut;
34
- }
35
- @Output() closed: EventEmitter<boolean> = new EventEmitter();
36
- @Output() shown: EventEmitter<Window> = new EventEmitter();
37
-
38
- private popoutWindow: Window | null = null;
39
- private isOut = false;
40
- private observer: MutationObserver | undefined;
41
-
42
- @HostListener('window:beforeunload')
43
- public beforeunloadHandler(): void {
44
- this.close();
45
- }
46
-
47
- constructor(
48
- private renderer2: Renderer2,
49
- private elementRef: ElementRef,
50
- ) {}
51
-
52
- ngOnDestroy(): void {
53
- this.observer?.disconnect();
54
- this.close();
55
- }
56
-
57
- private close(): void {
58
- if (this.popoutWindow) {
59
- this.popoutWindow.close();
60
- this.popoutWindow = null;
61
- this.isOut = false;
62
- this.closed.next(true);
63
- }
64
- }
65
-
66
- public popIn(): void {
67
- if (this.elementRef.nativeElement && this.innerWrapper.nativeElement) {
68
- this.renderer2.appendChild(this.elementRef.nativeElement, this.innerWrapper.nativeElement);
69
- this.close();
70
- }
71
- }
72
-
73
- public popOut(): void {
74
- if (!this.popoutWindow) {
75
- const elmRect = this.innerWrapper.nativeElement.getBoundingClientRect();
76
-
77
- const navHeight = window.outerHeight - window.innerHeight;
78
- const navWidth = window.outerWidth - window.innerWidth;
79
-
80
- const winLeft = this.windowLeft || window.screenX + navWidth + elmRect.left;
81
- const winTop = this.windowTop || window.screenY + navHeight + elmRect.top - 60;
82
-
83
- this.popoutWindow = window.open(
84
- '',
85
- `popoutWindow${Date.now()}`,
86
- `width=${this.windowWidth > 99 ? this.windowWidth : elmRect.width},
87
- height=${this.windowHeight > 99 ? this.windowHeight : elmRect.height + 1},
88
- left=${winLeft},
89
- top=${winTop}`,
90
- );
91
-
92
- if (!this.popoutWindow) {
93
- console.error('Popup blocked or failed to open');
94
- return;
95
- }
96
-
97
- this.popoutWindow.document.title = this.windowTitle
98
- ? this.windowTitle
99
- : window.document.title;
100
- this.popoutWindow.document.body.style.margin = '0';
101
-
102
- if (!this.suppressCloneStyles) {
103
- document.head.querySelectorAll('style').forEach((node) => {
104
- this.popoutWindow?.document.head.appendChild(node.cloneNode(true));
105
- });
106
-
107
- this.observeStyleChanges();
108
-
109
- document.head.querySelectorAll('link[rel="stylesheet"]').forEach((node) => {
110
- this.popoutWindow?.document.head.insertAdjacentHTML(
111
- 'beforeend',
112
- `<link rel="stylesheet" type="${(node as HTMLLinkElement).type}" href="${(node as HTMLLinkElement).href}">`,
113
- );
114
- });
115
-
116
- // Safe check for document.fonts
117
- const doc: any = document;
118
- const targetDoc: any = this.popoutWindow.document;
119
- if (doc.fonts && targetDoc.fonts) {
120
- doc.fonts.forEach((node: any) => {
121
- targetDoc.fonts.add(node);
122
- });
123
- }
124
- }
125
-
126
- if (this.windowStyleUrl) {
127
- this.popoutWindow.document.head.insertAdjacentHTML(
128
- 'beforeend',
129
- `<link rel="stylesheet" type="text/css" href="${window.location.origin}/${this.windowStyleUrl}">`,
130
- );
131
- }
132
-
133
- if (this.windowStyle) {
134
- this.popoutWindow.document.head.insertAdjacentHTML(
135
- 'beforeend',
136
- `<style>${this.windowStyle}</style>`,
137
- );
138
- }
139
-
140
- this.renderer2.appendChild(this.popoutWindow.document.body, this.innerWrapper.nativeElement);
141
- this.isOut = true;
142
- this.shown.emit(this.popoutWindow);
143
-
144
- this.popoutWindow.addEventListener('unload', () => {
145
- this.popIn();
146
- });
147
- } else {
148
- this.popoutWindow.focus();
149
- }
150
- }
151
-
152
- private observeStyleChanges(): void {
153
- const docHead = document.querySelector('head');
154
- if (!docHead) return;
155
-
156
- this.observer?.disconnect();
157
- this.observer = new MutationObserver((mutations: MutationRecord[]) => {
158
- mutations.forEach((mutation: MutationRecord) => {
159
- mutation.addedNodes.forEach((node: Node) => {
160
- if (node.nodeName === 'STYLE' && this.popoutWindow) {
161
- this.popoutWindow.document.head.appendChild(node.cloneNode(true));
162
- }
163
- });
164
- });
165
- });
166
-
167
- this.observer.observe(docHead, { childList: true });
168
- }
169
- }
@@ -1,9 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { PopoutWindowDirective } from './popout.directive';
3
-
4
- @NgModule({
5
- declarations: [],
6
- imports: [PopoutWindowDirective],
7
- exports: [PopoutWindowDirective],
8
- })
9
- export class PopoutWindowModule {}
@@ -1,197 +0,0 @@
1
- // resizable-dialog.directive.ts
2
- import {
3
- Directive,
4
- ElementRef,
5
- Renderer2,
6
- OnInit,
7
- OnDestroy,
8
- HostListener,
9
- Input,
10
- OnChanges,
11
- SimpleChanges,
12
- } from '@angular/core';
13
-
14
- @Directive({
15
- selector: '[resizableDialog]',
16
- standalone: true,
17
- })
18
- export class ResizableDialogDirective implements OnInit, OnDestroy, OnChanges {
19
- private resizeHandles: HTMLElement[] = [];
20
- private activeHandle: string | null = null;
21
- private startX = 0;
22
- private startY = 0;
23
- private startWidth = 0;
24
- private startHeight = 0;
25
- private startLeft = 0;
26
- private startTop = 0;
27
-
28
- @Input() enableResize = false;
29
-
30
- // Define resize directions
31
- private directions = ['n', 's', 'e', 'w', 'ne', 'nw', 'se', 'sw'];
32
-
33
- constructor(
34
- private el: ElementRef<HTMLElement>,
35
- private renderer: Renderer2,
36
- ) {}
37
-
38
- ngOnInit() {
39
- this.updateResizeState();
40
- }
41
-
42
- ngOnChanges(changes: SimpleChanges) {
43
- if (changes['enableResize']) {
44
- this.updateResizeState();
45
- }
46
- }
47
-
48
- private updateResizeState() {
49
- if (this.enableResize) {
50
- if (this.resizeHandles.length === 0) {
51
- this.setStyle();
52
- this.createResizeHandles();
53
- }
54
- } else {
55
- this.removeResizeHandles();
56
- }
57
- }
58
-
59
- ngOnDestroy() {
60
- this.removeResizeHandles();
61
- }
62
-
63
- private setStyle() {
64
- const element = this.el.nativeElement;
65
- this.renderer.setStyle(element, 'position', 'absolute');
66
- this.renderer.setStyle(element, 'overflow', 'hidden');
67
- this.renderer.setStyle(element, 'boxSizing', 'border-box');
68
- }
69
-
70
- private createResizeHandles() {
71
- this.directions.forEach((dir) => {
72
- const handle = this.renderer.createElement('div');
73
- this.renderer.setAttribute(handle, 'data-dir', dir);
74
- this.renderer.addClass(handle, 'doohbot-resize-handle');
75
- this.renderer.setStyle(handle, 'position', 'absolute');
76
- this.renderer.setStyle(handle, 'background', 'transparent');
77
- this.renderer.setStyle(handle, 'zIndex', '2000'); // High z-index to sit above content
78
- this.renderer.setStyle(handle, 'userSelect', 'none');
79
-
80
- // Set size and position based on direction
81
- if (dir.includes('e') || dir.includes('w')) {
82
- this.renderer.setStyle(handle, 'width', '15px'); // Slightly larger hit area
83
- this.renderer.setStyle(handle, 'cursor', dir.includes('e') ? 'e-resize' : 'w-resize');
84
- this.renderer.setStyle(handle, 'top', '0');
85
- this.renderer.setStyle(handle, 'bottom', '0');
86
- this.renderer.setStyle(handle, 'right', dir.includes('e') ? '-5px' : null); // Extend slightly out
87
- this.renderer.setStyle(handle, 'left', dir.includes('w') ? '-5px' : null);
88
- }
89
- if (dir.includes('n') || dir.includes('s')) {
90
- this.renderer.setStyle(handle, 'height', '15px');
91
- this.renderer.setStyle(handle, 'cursor', dir.includes('s') ? 's-resize' : 'n-resize');
92
- this.renderer.setStyle(handle, 'left', '0');
93
- this.renderer.setStyle(handle, 'right', '0');
94
- this.renderer.setStyle(handle, 'bottom', dir.includes('s') ? '-5px' : null);
95
- this.renderer.setStyle(handle, 'top', dir.includes('n') ? '-5px' : null);
96
- }
97
- if (dir === 'ne' || dir === 'nw' || dir === 'se' || dir === 'sw') {
98
- this.renderer.setStyle(handle, 'width', '20px');
99
- this.renderer.setStyle(handle, 'height', '20px');
100
- this.renderer.setStyle(handle, 'borderRadius', '50%');
101
- this.renderer.setStyle(handle, 'cursor', `${dir}-resize`);
102
- this.renderer.setStyle(handle, 'top', dir.includes('n') ? '-10px' : null);
103
- this.renderer.setStyle(handle, 'bottom', dir.includes('s') ? '-10px' : null);
104
- this.renderer.setStyle(handle, 'left', dir.includes('w') ? '-10px' : null);
105
- this.renderer.setStyle(handle, 'right', dir.includes('e') ? '-10px' : null);
106
- }
107
-
108
- this.renderer.appendChild(this.el.nativeElement, handle);
109
- this.resizeHandles.push(handle);
110
- });
111
- }
112
-
113
- private removeResizeHandles() {
114
- this.resizeHandles.forEach((handle) => {
115
- this.renderer.removeChild(this.el.nativeElement, handle);
116
- });
117
- this.resizeHandles = [];
118
- }
119
-
120
- @HostListener('mousedown', ['$event'])
121
- onMouseDown(event: MouseEvent) {
122
- if (!this.enableResize) return;
123
- if (event.defaultPrevented) return; // Respect other handlers
124
-
125
- const target = event.target as HTMLElement;
126
- const dir = target.getAttribute('data-dir');
127
- if (!dir) return;
128
-
129
- event.preventDefault();
130
- event.stopImmediatePropagation();
131
-
132
- this.activeHandle = dir;
133
- const rect = this.el.nativeElement.getBoundingClientRect();
134
-
135
- this.startX = event.clientX;
136
- this.startY = event.clientY;
137
- this.startWidth = parseFloat(this.getComputedStyleValue('width'));
138
- this.startHeight = parseFloat(this.getComputedStyleValue('height'));
139
- this.startLeft = parseFloat(this.getComputedStyleValue('left'));
140
- this.startTop = parseFloat(this.getComputedStyleValue('top'));
141
-
142
- // Prevent text selection during resize
143
- document.body.classList.add('no-select');
144
- }
145
-
146
- @HostListener('document:mousemove', ['$event'])
147
- onMouseMove(event: MouseEvent) {
148
- if (!this.activeHandle) return;
149
-
150
- const dx = event.clientX - this.startX;
151
- const dy = event.clientY - this.startY;
152
-
153
- let newWidth = this.startWidth;
154
- let newHeight = this.startHeight;
155
- let newLeft = this.startLeft;
156
- let newTop = this.startTop;
157
-
158
- const minWidth = 150;
159
- const minHeight = 100;
160
-
161
- // Horizontal resize
162
- if (this.activeHandle.includes('e')) {
163
- newWidth = Math.max(this.startWidth + dx, minWidth);
164
- }
165
- if (this.activeHandle.includes('w')) {
166
- newWidth = Math.max(this.startWidth - dx, minWidth);
167
- newLeft = this.startLeft + (this.startWidth - newWidth);
168
- }
169
-
170
- // Vertical resize
171
- if (this.activeHandle.includes('s')) {
172
- newHeight = Math.max(this.startHeight + dy, minHeight);
173
- }
174
- if (this.activeHandle.includes('n')) {
175
- newHeight = Math.max(this.startHeight - dy, minHeight);
176
- newTop = this.startTop + (this.startHeight - newHeight);
177
- }
178
-
179
- // Apply changes
180
- this.renderer.setStyle(this.el.nativeElement, 'width', `${newWidth}px`);
181
- this.renderer.setStyle(this.el.nativeElement, 'height', `${newHeight}px`);
182
- this.renderer.setStyle(this.el.nativeElement, 'left', `${newLeft}px`);
183
- this.renderer.setStyle(this.el.nativeElement, 'top', `${newTop}px`);
184
- }
185
-
186
- @HostListener('document:mouseup')
187
- onMouseUp() {
188
- if (this.activeHandle) {
189
- this.activeHandle = null;
190
- document.body.classList.remove('no-select');
191
- }
192
- }
193
-
194
- private getComputedStyleValue(property: string): string {
195
- return getComputedStyle(this.el.nativeElement).getPropertyValue(property) || '0';
196
- }
197
- }
@@ -1,9 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { ResizableDialogDirective } from './resizable-dialog.directive';
3
-
4
- @NgModule({
5
- declarations: [],
6
- imports: [ResizableDialogDirective],
7
- exports: [ResizableDialogDirective],
8
- })
9
- export default class ResizableDialogModule {}
@@ -1,9 +0,0 @@
1
- // /**
2
- // * API request state
3
- // */
4
- // export enum ApiRequestState {
5
- // IDLE = 'idle',
6
- // LOADING = 'loading',
7
- // SUCCESS = 'success',
8
- // ERROR = 'error',
9
- // }
@@ -1,14 +0,0 @@
1
- // export const environment = {
2
- // staging: false,
3
- // development: false,
4
- // production: true,
5
- // chatApiUrl: 'https://api.production.com',
6
- // apiKey: '',
7
- // };
8
- export const environment = {
9
- config: 'const/app-const.prod.json',
10
- production: true,
11
- apiBaseUrl: '',
12
- loginEndpoint: '',
13
- apiSegment: 'api/v1/',
14
- };
@@ -1,14 +0,0 @@
1
- // export const environment = {
2
- // staging: false,
3
- // development: false,
4
- // production: true,
5
- // chatApiUrl: 'https://api.production.com',
6
- // apiKey: '',
7
- // };
8
- export const environment = {
9
- config: 'const/app-const.json',
10
- production: false,
11
- apiBaseUrl: '',
12
- loginEndpoint: '',
13
- apiSegment: 'api/v1/',
14
- };