@adzen/doohbot 1.0.0 → 1.0.2

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 (91) hide show
  1. package/README.md +20 -14
  2. package/fesm2022/adzen-doohbot.mjs +4622 -0
  3. package/fesm2022/adzen-doohbot.mjs.map +1 -0
  4. package/index.d.ts +1301 -0
  5. package/index.d.ts.map +1 -0
  6. package/package.json +29 -57
  7. package/src/lib/app/chat/components/chat-button/chat-button.component.scss +115 -0
  8. package/src/lib/app/chat/components/chat-footer/chat-footer.component.scss +14 -0
  9. package/src/lib/app/chat/components/chat-header/chat-header.component.scss +82 -0
  10. package/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.scss +369 -0
  11. package/src/lib/app/chat/components/chat-message/chat-message.component.scss +235 -0
  12. package/src/lib/app/chat/components/chat-window/chat-window.component.scss +194 -0
  13. package/src/lib/app/chat/components/message-input/message-input.component.scss +59 -0
  14. package/src/lib/app/chat/components/message-list/message-list.component.scss +258 -0
  15. package/src/lib/app/login/login-form.component.scss +213 -0
  16. package/src/lib/app/personalization/personalization-dialog.component.scss +177 -0
  17. package/src/lib/app/personalization/sections/account/account-section.component.scss +209 -0
  18. package/src/lib/app/personalization/sections/instruction/instruction-section.component.scss +63 -0
  19. package/src/lib/app/personalization/sections/preferences/preferences-section.component.scss +199 -0
  20. package/src/lib/app/personalization/sections/terms/terms-section.component.scss +74 -0
  21. package/src/lib/doohbot.component.scss +18 -0
  22. package/{projects/doohbot/src/lib/shared/chips/chips.scss → src/lib/shared/chips/chips.component.scss} +3 -1
  23. package/src/lib/shared/dialog/dialog.component.scss +90 -0
  24. package/src/lib/shared/dropdown-menu/dropdown-menu.component.scss +53 -0
  25. package/src/lib/shared/input-dialog/input-dialog.component.scss +71 -0
  26. package/src/lib/shared/popout/popout.scss +0 -0
  27. package/src/lib/shared/snackbar/snackbar.component.scss +125 -0
  28. package/src/lib/styles/_theme.scss +69 -0
  29. package/src/lib/styles/material-override.scss +338 -0
  30. package/{projects/doohbot/src/lib/utils → src/lib/styles}/utility.scss +85 -33
  31. package/src/lib/theme/index.scss +8 -0
  32. package/src/lib/theme/palettes/aqua.scss +88 -0
  33. package/src/lib/theme/palettes/candy.scss +88 -0
  34. package/src/lib/theme/palettes/doohbot.scss +88 -0
  35. package/src/lib/theme/palettes/forest.scss +88 -0
  36. package/src/lib/theme/palettes/midnight.scss +88 -0
  37. package/src/lib/theme/palettes/slate.scss +88 -0
  38. package/src/lib/theme/palettes/sunset.scss +86 -0
  39. package/src/lib/theme/themes.scss +7 -0
  40. package/src/lib/theme/tokens/semantic.scss +102 -0
  41. package/.editorconfig +0 -17
  42. package/.vscode/extensions.json +0 -4
  43. package/.vscode/launch.json +0 -26
  44. package/.vscode/settings.json +0 -13
  45. package/.vscode/tasks.json +0 -42
  46. package/adzen-doohbot-0.0.1.tgz +0 -0
  47. package/adzen-doohbot-1.0.0.tgz +0 -0
  48. package/angular.json +0 -119
  49. package/projects/doohbot/README.md +0 -63
  50. package/projects/doohbot/ng-package.json +0 -16
  51. package/projects/doohbot/package.json +0 -12
  52. package/projects/doohbot/src/lib/directives/draggable/draggable-dialog.directive.ts +0 -62
  53. package/projects/doohbot/src/lib/directives/draggable/draggable-dialog.module.ts +0 -9
  54. package/projects/doohbot/src/lib/directives/resizable/resizable-dialog.directive.ts +0 -163
  55. package/projects/doohbot/src/lib/directives/resizable/resizable-dialog.module.ts +0 -9
  56. package/projects/doohbot/src/lib/doohbot.html +0 -216
  57. package/projects/doohbot/src/lib/doohbot.scss +0 -568
  58. package/projects/doohbot/src/lib/doohbot.spec.ts +0 -21
  59. package/projects/doohbot/src/lib/doohbot.ts +0 -345
  60. package/projects/doohbot/src/lib/elements/elements.ts +0 -25
  61. package/projects/doohbot/src/lib/helpers/predefined_messages.ts +0 -2
  62. package/projects/doohbot/src/lib/inputs/doohbot-input.ts +0 -25
  63. package/projects/doohbot/src/lib/model/doohbot.intents.ts +0 -24
  64. package/projects/doohbot/src/lib/model/message.ts +0 -13
  65. package/projects/doohbot/src/lib/model/token.ts +0 -3
  66. package/projects/doohbot/src/lib/services/messaging.service.ts +0 -76
  67. package/projects/doohbot/src/lib/shared/chips/chips.html +0 -9
  68. package/projects/doohbot/src/lib/shared/chips/chips.spec.ts +0 -23
  69. package/projects/doohbot/src/lib/shared/chips/chips.ts +0 -18
  70. package/projects/doohbot/src/lib/shared/snackbar/snackbar.html +0 -7
  71. package/projects/doohbot/src/lib/shared/snackbar/snackbar.scss +0 -73
  72. package/projects/doohbot/src/lib/shared/snackbar/snackbar.spec.ts +0 -21
  73. package/projects/doohbot/src/lib/shared/snackbar/snackbar.ts +0 -44
  74. package/projects/doohbot/src/lib/utils/material-override.scss +0 -312
  75. package/projects/doohbot/src/public-api.ts +0 -5
  76. package/projects/doohbot/tsconfig.lib.json +0 -19
  77. package/projects/doohbot/tsconfig.lib.prod.json +0 -11
  78. package/projects/doohbot/tsconfig.spec.json +0 -14
  79. package/projects/doohbot-element/public/favicon.ico +0 -0
  80. package/projects/doohbot-element/src/app/app.config.ts +0 -12
  81. package/projects/doohbot-element/src/app/app.html +0 -1
  82. package/projects/doohbot-element/src/app/app.routes.ts +0 -3
  83. package/projects/doohbot-element/src/app/app.spec.ts +0 -23
  84. package/projects/doohbot-element/src/app/app.ts +0 -10
  85. package/projects/doohbot-element/src/index.html +0 -15
  86. package/projects/doohbot-element/src/main.ts +0 -6
  87. package/projects/doohbot-element/src/styles.scss +0 -15
  88. package/projects/doohbot-element/tsconfig.app.json +0 -15
  89. package/projects/doohbot-element/tsconfig.spec.json +0 -14
  90. package/tsconfig.json +0 -43
  91. /package/{projects/doohbot-element/src/app/app.scss → src/lib/shared/menu-item/menu-item.component.scss} +0 -0
@@ -0,0 +1,88 @@
1
+ /*
2
+ Slate Palette (Light Mode)
3
+ */
4
+ .db-theme-slate {
5
+ /* Fonts */
6
+ --db-font: 'Roboto', Arial, sans-serif;
7
+
8
+ /* Brand Colors */
9
+ --db-primary: #455a64;
10
+ --db-primary-rgb: 69, 90, 100;
11
+ --db-secondary: #90a4ae;
12
+
13
+ /* Backgrounds */
14
+ --db-bg-app: #ffffff;
15
+ --db-bg-chat-input: #ffffff;
16
+ --db-bg-user-msg: #e2e8f0;
17
+ --db-bg-bot-msg: #e2e8f0;
18
+
19
+ /* Text Colors */
20
+ --db-text-primary: #263238;
21
+ --db-text-secondary: #607d8b;
22
+ --db-text-tertiary: #263238;
23
+ --db-text-hint: #90a4ae;
24
+ --db-text-user-msg: #263238;
25
+ --db-text-bot-msg: #263238;
26
+
27
+ /* UI Elements */
28
+ --db-border-color: #cfd8dc;
29
+ --db-border-shadow: 0 4px 12px rgba(38, 50, 56, .12);
30
+ --db-border-top: #ffffff00;
31
+
32
+ /* Interaction */
33
+ --db-color-button: var(--db-primary);
34
+ --db-color-typing: #cfd8dc;
35
+
36
+ /* Colors */
37
+ --db-white-rgb: 255, 255, 255;
38
+ --db-black-rgb: 0, 0, 0;
39
+
40
+ /* Media/Filters */
41
+ --db-avatar-filter: none;
42
+ }
43
+
44
+ /*
45
+ Slate Palette (Dark Mode)
46
+ */
47
+ .dark-theme.db-theme-slate,
48
+ .dark-theme .db-theme-slate,
49
+ .dark-theme.cdk-overlay-container .db-theme-slate,
50
+ .dark-theme .cdk-overlay-container .db-theme-slate {
51
+ /* Fonts */
52
+ --db-font: 'Roboto', Arial, sans-serif;
53
+
54
+ /* Brand Colors */
55
+ --db-primary: #90a4ae;
56
+ --db-primary-rgb: 144, 164, 174;
57
+ --db-secondary: #90a4ae;
58
+
59
+ /* Backgrounds */
60
+ --db-bg-app: #12181b;
61
+ --db-bg-chat-input: #1e272c;
62
+ --db-bg-user-msg: #2f3e46;
63
+ --db-bg-bot-msg: #2f3e46;
64
+
65
+ /* Text Colors */
66
+ --db-text-primary: #eceff1;
67
+ --db-text-secondary: #b0bec5;
68
+ --db-text-tertiary: #eceff1;
69
+ --db-text-hint: #78909c;
70
+ --db-text-user-msg: #eceff1;
71
+ --db-text-bot-msg: #eceff1;
72
+
73
+ /* UI Elements */
74
+ --db-border-color: #2f3e46;
75
+ --db-border-shadow: 0 4px 20px rgba(0, 0, 0, .4);
76
+ --db-border-top: #ffffff00;
77
+
78
+ /* Interaction */
79
+ --db-color-button: var(--db-primary);
80
+ --db-color-typing: #2f3e46;
81
+
82
+ /* Colors */
83
+ --db-white-rgb: 0, 0, 0;
84
+ --db-black-rgb: 255, 255, 255;
85
+
86
+ /* Media/Filters */
87
+ --db-avatar-filter: brightness(1.1);
88
+ }
@@ -0,0 +1,86 @@
1
+ /*
2
+ Sunset Palette (Light Mode)
3
+ */
4
+ .db-theme-sunset {
5
+ /* Fonts */
6
+ --db-font: 'Roboto', Arial, sans-serif;
7
+
8
+ /* Brand Colors */
9
+ --db-primary: #ff7043;
10
+ --db-primary-rgb: 255, 112, 67;
11
+ --db-secondary: #ffb74d;
12
+
13
+ /* Backgrounds */
14
+ --db-bg-app: #ffffff;
15
+ --db-bg-chat-input: #ffffff;
16
+ --db-bg-user-msg: #ffe0b2;
17
+ --db-bg-bot-msg: #ffe0b2;
18
+
19
+ /* Text Colors */
20
+ --db-text-primary: #4e342e;
21
+ --db-text-secondary: #8d6e63;
22
+ --db-text-tertiary: #4e342e;
23
+ --db-text-hint: #a1887f;
24
+ --db-text-user-msg: #4e342e;
25
+ --db-text-bot-msg: #4e342e;
26
+
27
+ /* UI Elements */
28
+ --db-border-color: #ffccbc;
29
+ --db-border-shadow: 0 4px 12px rgba(78, 52, 46, .12);
30
+ --db-border-top: #ffffff00;
31
+
32
+ /* Interaction */
33
+ --db-color-button: var(--db-primary);
34
+ --db-color-typing: #ffccbc;
35
+
36
+ /* Colors */
37
+ --db-white-rgb: 255, 255, 255;
38
+ --db-black-rgb: 0, 0, 0;
39
+
40
+ /* Media/Filters */
41
+ --db-avatar-filter: none;
42
+ }
43
+
44
+ /*
45
+ Sunset Palette (Dark Mode)
46
+ */
47
+ .dark-theme.db-theme-sunset,
48
+ .dark-theme .db-theme-sunset,
49
+ .dark-theme.cdk-overlay-container .db-theme-sunset,
50
+ .dark-theme .cdk-overlay-container .db-theme-sunset {
51
+ /* Brand Colors */
52
+ --db-primary: #ff8a65;
53
+ --db-primary-rgb: 255, 138, 101;
54
+ --db-secondary: #ffb74d;
55
+
56
+ /* Backgrounds */
57
+ --db-bg-app: #2b1b16;
58
+ --db-bg-chat-input: #3e2723;
59
+ --db-bg-user-msg: #4e342e;
60
+ --db-bg-bot-msg: #4e342e;
61
+
62
+ /* Text Colors */
63
+ --db-text-primary: #fff3e0;
64
+ --db-text-secondary: #ffccbc;
65
+ --db-text-tertiary: #fff3e0;
66
+ --db-text-hint: #d7ccc8;
67
+ --db-text-user-msg: #fff3e0;
68
+ --db-text-bot-msg: #fff3e0;
69
+
70
+ /* UI Elements */
71
+ --db-border-color: #5d4037;
72
+ --db-border-shadow: 0 4px 20px rgba(0, 0, 0, .4);
73
+ --db-border-top: #3e2723;
74
+ --db-border-top: #ffffff00;
75
+
76
+ /* Interaction */
77
+ --db-color-button: var(--db-primary);
78
+ --db-color-typing: #5d4037;
79
+
80
+ /* Colors */
81
+ --db-white-rgb: 0, 0, 0;
82
+ --db-black-rgb: 255, 255, 255;
83
+
84
+ /* Media/Filters */
85
+ --db-avatar-filter: brightness(1.1);
86
+ }
@@ -0,0 +1,7 @@
1
+ @use './palettes/aqua.scss';
2
+ @use './palettes/doohbot.scss';
3
+ @use './palettes/candy.scss';
4
+ @use './palettes/forest.scss';
5
+ @use './palettes/sunset.scss';
6
+ @use './palettes/midnight.scss';
7
+ @use './palettes/slate.scss';
@@ -0,0 +1,102 @@
1
+ /*
2
+ Semantic Tokens & Logic
3
+ Bridges palette-specific variables to functional tokens used by components.
4
+ */
5
+
6
+ .db-theme-doohbot,
7
+ .db-theme-aqua,
8
+ .db-theme-candy,
9
+ .db-theme-forest,
10
+ .db-theme-midnight,
11
+ .db-theme-sunset,
12
+ .db-theme-slate,
13
+ app-doohbot {
14
+ /* Fonts */
15
+ --db-font: var(--db-font);
16
+
17
+ /* Brand */
18
+ --db-primary: var(--db-primary);
19
+ --db-primary-rgb: var(--db-primary-rgb);
20
+ --db-secondary: var(--db-secondary);
21
+
22
+ /* Backgrounds */
23
+ --db-bg-app: var(--db-bg-app);
24
+ --db-bg-chat-input: var(--db-bg-chat-input);
25
+ --db-bg-user-msg: var(--db-bg-user-msg);
26
+ --db-bg-bot-msg: var(--db-bg-bot-msg);
27
+
28
+ /* Text */
29
+ --db-text-primary: var(--db-text-primary);
30
+ --db-text-secondary: var(--db-text-secondary);
31
+ --db-text-tertiary: var(--db-text-tertiary);
32
+ --db-text-hint: var(--db-text-hint);
33
+ --db-text-user-msg: var(--db-text-primary);
34
+ --db-text-bot-msg: var(--db-text-bot-msg);
35
+
36
+ /* UI Elements */
37
+ --db-border-color: var(--db-border-color);
38
+ --db-border-shadow: var(--db-border-shadow);
39
+ --db-border-top: var(--db-transparent);
40
+
41
+ /* Interaction */
42
+ --db-button-color: var(--db-primary);
43
+ --db-typing-indicator-color: var(--db-color-typing);
44
+
45
+ /* Media/Filters */
46
+ --db-avatar-filter: var(--db-avatar-filter);
47
+
48
+ /* Colors */
49
+ --db-white-rgb: var(--db-white-rgb);
50
+ --db-black-rgb: var(--db-black-rgb);
51
+
52
+
53
+ /* ===============================
54
+ Bridge to Legacy / Public Variables
55
+ =============================== */
56
+
57
+ /* Fonts */
58
+ --font-family: var(--db-font);
59
+
60
+ /* Brand */
61
+ --primary-color: var(--db-primary);
62
+ --primary-color-rgb: var(--db-primary-rgb);
63
+ --secondary-color: var(--db-secondary);
64
+
65
+ /* Backgrounds */
66
+ --background-color: var(--db-bg-app);
67
+ --chat-input-color: var(--db-bg-chat-input);
68
+ --user-message-color: var(--db-bg-user-msg);
69
+ --bot-message-color: var(--db-bg-bot-msg);
70
+
71
+ /* Text */
72
+ --text-color: var(--db-text-primary);
73
+ --secondary-text-color: var(--db-text-secondary);
74
+ --text-alt-color: var(--db-text-tertiary);
75
+ --hint-text-color: var(--db-text-hint);
76
+ --user-text-color: var(--db-text-primary);
77
+ --bot-text-color: var(--db-text-bot-msg);
78
+
79
+ /* UI Elements */
80
+ --border-color: var(--db-border-color);
81
+ --border-shadow-color: var(--db-border-shadow);
82
+ --border-top-color: var(--db-transparent);
83
+
84
+ /* Interaction */
85
+ --button-color: var(--db-primary);
86
+ --typing-indicator-color: var(--db-color-typing);
87
+
88
+ /* Media/Filters */
89
+ --avatar-filter: var(--db-avatar-filter, none);
90
+
91
+ /* Colors */
92
+ --white: var(--db-color-white, #ffffff);
93
+ --black: var(--db-color-black, #000000);
94
+ --grey: var(--db-color-grey, #6b7280);
95
+ --red: var(--db-color-error, #fe0000);
96
+ --green: var(--db-color-success, #00ce4b);
97
+ --orange: var(--db-color-warning, #ff6a00);
98
+ --blue: var(--db-color-info, #0062ff);
99
+ --white-rgb: var(--db-white-rgb);
100
+ --black-rgb: var(--db-black-rgb);
101
+ }
102
+
package/.editorconfig DELETED
@@ -1,17 +0,0 @@
1
- # Editor configuration, see https://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- indent_style = space
7
- indent_size = 2
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
10
-
11
- [*.ts]
12
- quote_type = single
13
- ij_typescript_use_double_quotes = false
14
-
15
- [*.md]
16
- max_line_length = off
17
- trim_trailing_whitespace = false
@@ -1,4 +0,0 @@
1
- {
2
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3
- "recommendations": ["angular.ng-template"]
4
- }
@@ -1,26 +0,0 @@
1
- {
2
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3
- "version": "0.2.0",
4
- "configurations": [
5
- {
6
- "name": "ng serve",
7
- "type": "chrome",
8
- "request": "launch",
9
- "preLaunchTask": "npm: start",
10
- "url": "http://localhost:4200/",
11
- "webRoot": "${workspaceFolder}",
12
- "sourceMaps": true,
13
- "sourceMapPathOverrides": {
14
- "webpack:///src/*": "${webRoot}/src/*"
15
- }
16
- },
17
- {
18
- "name": "ng test",
19
- "type": "chrome",
20
- "request": "launch",
21
- "preLaunchTask": "npm: test",
22
- "url": "http://localhost:9876/debug.html",
23
- "webRoot": "${workspaceFolder}"
24
- }
25
- ]
26
- }
@@ -1,13 +0,0 @@
1
- {
2
- "cSpell.words": [
3
- "adzen",
4
- "Bottomsheet",
5
- "conditons",
6
- "contenteditable",
7
- "Doohbot",
8
- "packagr",
9
- "Pannel",
10
- "spinbutton",
11
- "thum"
12
- ]
13
- }
@@ -1,42 +0,0 @@
1
- {
2
- // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3
- "version": "2.0.0",
4
- "tasks": [
5
- {
6
- "type": "npm",
7
- "script": "start",
8
- "isBackground": true,
9
- "problemMatcher": {
10
- "owner": "typescript",
11
- "pattern": "$tsc",
12
- "background": {
13
- "activeOnStart": true,
14
- "beginsPattern": {
15
- "regexp": "(.*?)"
16
- },
17
- "endsPattern": {
18
- "regexp": "bundle generation complete"
19
- }
20
- }
21
- }
22
- },
23
- {
24
- "type": "npm",
25
- "script": "test",
26
- "isBackground": true,
27
- "problemMatcher": {
28
- "owner": "typescript",
29
- "pattern": "$tsc",
30
- "background": {
31
- "activeOnStart": true,
32
- "beginsPattern": {
33
- "regexp": "(.*?)"
34
- },
35
- "endsPattern": {
36
- "regexp": "bundle generation complete"
37
- }
38
- }
39
- }
40
- }
41
- ]
42
- }
Binary file
Binary file
package/angular.json DELETED
@@ -1,119 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "doohbot": {
7
- "projectType": "library",
8
- "root": "projects/doohbot",
9
- "sourceRoot": "projects/doohbot/src",
10
- "prefix": "lib",
11
- "architect": {
12
- "build": {
13
- "builder": "@angular/build:ng-packagr",
14
- "configurations": {
15
- "production": {
16
- "tsConfig": "projects/doohbot/tsconfig.lib.prod.json"
17
- },
18
- "development": {
19
- "tsConfig": "projects/doohbot/tsconfig.lib.json"
20
- }
21
- },
22
- "defaultConfiguration": "production"
23
- },
24
- "test": {
25
- "builder": "@angular/build:karma",
26
- "options": {
27
- "tsConfig": "projects/doohbot/tsconfig.spec.json"
28
- }
29
- }
30
- }
31
- },
32
-
33
- "doohbot-element": {
34
- "projectType": "application",
35
- "schematics": {
36
- "@schematics/angular:component": {
37
- "style": "scss"
38
- }
39
- },
40
- "root": "projects/doohbot-element",
41
- "sourceRoot": "projects/doohbot-element/src",
42
- "prefix": "app",
43
- "architect": {
44
- "build": {
45
- "builder": "@angular/build:application",
46
- "options": {
47
- "browser": "projects/doohbot-element/src/main.ts",
48
- "polyfills": ["zone.js"],
49
- "tsConfig": "projects/doohbot-element/tsconfig.app.json",
50
- "inlineStyleLanguage": "scss",
51
- "assets": [
52
- {
53
- "glob": "**/*",
54
- "input": "projects/doohbot-element/public"
55
- }
56
- ],
57
- "styles": ["projects/doohbot-element/src/styles.scss"]
58
- },
59
- "configurations": {
60
- "production": {
61
- "budgets": [
62
- {
63
- "type": "initial",
64
- "maximumWarning": "500kB",
65
- "maximumError": "1MB"
66
- },
67
- {
68
- "type": "anyComponentStyle",
69
- "maximumWarning": "4kB",
70
- "maximumError": "8kB"
71
- }
72
- ],
73
- "outputHashing": "all"
74
- },
75
- "development": {
76
- "optimization": false,
77
- "extractLicenses": false,
78
- "sourceMap": true
79
- }
80
- },
81
- "defaultConfiguration": "production"
82
- },
83
- "serve": {
84
- "builder": "@angular/build:dev-server",
85
- "configurations": {
86
- "production": {
87
- "buildTarget": "doohbot-element:build:production"
88
- },
89
- "development": {
90
- "buildTarget": "doohbot-element:build:development"
91
- }
92
- },
93
- "defaultConfiguration": "development"
94
- },
95
- "extract-i18n": {
96
- "builder": "@angular/build:extract-i18n"
97
- },
98
- "test": {
99
- "builder": "@angular/build:karma",
100
- "options": {
101
- "polyfills": ["zone.js", "zone.js/testing"],
102
- "tsConfig": "projects/doohbot-element/tsconfig.spec.json",
103
- "inlineStyleLanguage": "scss",
104
- "assets": [
105
- {
106
- "glob": "**/*",
107
- "input": "projects/doohbot-element/public"
108
- }
109
- ],
110
- "styles": ["projects/doohbot-element/src/styles.scss"]
111
- }
112
- }
113
- }
114
- }
115
- },
116
- "cli": {
117
- "analytics": false
118
- }
119
- }
@@ -1,63 +0,0 @@
1
- # Chatbot
2
-
3
- This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
4
-
5
- ## Code scaffolding
6
-
7
- Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
8
-
9
- ```bash
10
- ng generate component component-name
11
- ```
12
-
13
- For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
14
-
15
- ```bash
16
- ng generate --help
17
- ```
18
-
19
- ## Building
20
-
21
- To build the library, run:
22
-
23
- ```bash
24
- ng build chatbot
25
- ```
26
-
27
- This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
28
-
29
- ### Publishing the Library
30
-
31
- Once the project is built, you can publish your library by following these steps:
32
-
33
- 1. Navigate to the `dist` directory:
34
- ```bash
35
- cd dist/chatbot
36
- ```
37
-
38
- 2. Run the `npm publish` command to publish your library to the npm registry:
39
- ```bash
40
- npm publish
41
- ```
42
-
43
- ## Running unit tests
44
-
45
- To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
46
-
47
- ```bash
48
- ng test
49
- ```
50
-
51
- ## Running end-to-end tests
52
-
53
- For end-to-end (e2e) testing, run:
54
-
55
- ```bash
56
- ng e2e
57
- ```
58
-
59
- Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
60
-
61
- ## Additional Resources
62
-
63
- For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/doohbot",
4
- "lib": {
5
- "entryFile": "src/public-api.ts",
6
- "styleIncludePaths": ["src/lib"]
7
- },
8
- "assets": [
9
- "src/assets",
10
- {
11
- "glob": "**/*",
12
- "input": "node_modules/doohbot/assets/",
13
- "output": "/assets/"
14
- }
15
- ]
16
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "doohbot",
3
- "version": "0.0.1",
4
- "peerDependencies": {
5
- "@angular/common": "^20.3.0",
6
- "@angular/core": "^20.3.0"
7
- },
8
- "dependencies": {
9
- "tslib": "^2.3.0"
10
- },
11
- "sideEffects": false
12
- }
@@ -1,62 +0,0 @@
1
- import { Directive, ElementRef, HostListener, Input, OnInit, Renderer2 } from '@angular/core';
2
-
3
- @Directive({
4
- selector: '[draggableDialog]',
5
- })
6
- export class DraggableDialogDirective implements OnInit {
7
- private isDragging = false;
8
- private startX = 0;
9
- private startY = 0;
10
- private offsetX = 0;
11
- private offsetY = 0;
12
-
13
- @Input('dragHandle') dragHandleSelector: string | undefined;
14
-
15
- private dragHandle: HTMLElement | undefined;
16
-
17
- constructor(
18
- private el: ElementRef,
19
- private renderer: Renderer2,
20
- ) {}
21
-
22
- ngOnInit() {
23
- if (this.dragHandleSelector) {
24
- this.dragHandle = this.el.nativeElement.querySelector(this.dragHandleSelector);
25
- } else {
26
- this.dragHandle = this.el.nativeElement; // fallback
27
- }
28
- if (this.dragHandle) {
29
- this.renderer.setStyle(this.dragHandle, 'cursor', 'move');
30
- }
31
- }
32
-
33
- @HostListener('mousedown', ['$event'])
34
- onMouseDown(event: MouseEvent) {
35
- if (!this.dragHandle || event.target !== this.dragHandle) return;
36
-
37
- this.isDragging = true;
38
- this.startX = event.clientX - this.offsetX;
39
- this.startY = event.clientY - this.offsetY;
40
-
41
- event.preventDefault();
42
- }
43
-
44
- @HostListener('document:mousemove', ['$event'])
45
- onMouseMove(event: MouseEvent) {
46
- if (!this.isDragging) return;
47
-
48
- this.offsetX = event.clientX - this.startX;
49
- this.offsetY = event.clientY - this.startY;
50
-
51
- this.renderer.setStyle(
52
- this.el.nativeElement,
53
- 'transform',
54
- `translate(${this.offsetX}px, ${this.offsetY}px)`,
55
- );
56
- }
57
-
58
- @HostListener('document:mouseup', [])
59
- onMouseUp() {
60
- this.isDragging = false;
61
- }
62
- }
@@ -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 {}