@messenger-box/chat-ui 10.0.3-alpha.17 → 10.0.3-alpha.171
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/lib/components/CustomerSupportChat/Chat.d.ts.map +1 -1
- package/lib/components/CustomerSupportChat/Chat.js.map +1 -1
- package/lib/components/CustomerSupportChat/CustomerSupportChat.js.map +1 -1
- package/lib/compute.js +0 -1
- package/lib/compute.js.map +1 -1
- package/lib/config/env-config.js.map +1 -1
- package/lib/container/chatBoxWithLoader.d.ts.map +1 -1
- package/lib/container/chatBoxWithLoader.js +1 -1
- package/lib/container/chatBoxWithLoader.js.map +1 -1
- package/lib/module.js.map +1 -1
- package/lib/routes.json +0 -1
- package/package.json +4 -4
- package/CHANGELOG.md +0 -108
- package/jest.config.js +0 -9
- package/rollup.config.mjs +0 -36
- package/src/components/CustomerSupportChat/Chat.tsx +0 -88
- package/src/components/CustomerSupportChat/CustomerSupportChat.tsx +0 -233
- package/src/components/CustomerSupportChat/index.ts +0 -2
- package/src/components/index.ts +0 -1
- package/src/compute.ts +0 -18
- package/src/config/env-config.ts +0 -8
- package/src/config/index.ts +0 -1
- package/src/container/chatBoxWithLoader.tsx +0 -35
- package/src/index.ts +0 -6
- package/src/module.tsx +0 -7
- package/tsconfig.json +0 -14
- package/webpack.config.js +0 -92
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/CustomerSupportChat/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAiBjF,eAAO,MAAM,IAAI;;;;;
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/CustomerSupportChat/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAiBjF,eAAO,MAAM,IAAI,GAAI;;;;;CAAwD,sBAsE5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.js","sources":["../../../src/components/CustomerSupportChat/Chat.tsx"],"sourcesContent":[null],"names":[],"mappings":"kSAiBO,MAAM,IAAI,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"Chat.js","sources":["../../../src/components/CustomerSupportChat/Chat.tsx"],"sourcesContent":[null],"names":[],"mappings":"kSAiBO,MAAM,IAAI,GAAG,CAAC;MACjB;WACO;iBACA;AAEP,EAAA;AAEA,CAAA,KAAA;AAEA;AAKI,EAAA,MAAA,CAAA,KAAA,EAAA,QAAW,CAAA,GAAA,QAAA,CAAA,EAAA,CAAA;AACP,EAAA,MAAA,CAAA,UAAA,EAAS,aAAa,CAAA,GAAA,QAAU,CAAA,CAAA,CAAA;AACnC,EAAA,MAAA,CAAA,OAAA,CAAA,GAAA,4BAAA,EAAA;AACJ,EAAA,MAAE,gBAAA,GAAA,MAAA,CAAA,IAAA,CAAA;AAEH,EAAA,MAAA;AACI,IAAA,IAAA,EAAA,YAAc;aACV,mBAAO;SACV,EAAA;AAED,GAAA,GAAA,gCAAc,CAAA;AACV,IAAA,SAAA,EAAA;AACI,MAAA,SAAA,EAAA,SAAS,EAAE,QAAS;AACpB;AACI,GAAA,CAAA;AACH,EAAA,MAAA,UAAA,GAAA,MAAA,IAAA,IAAA;AACJ,IAAA,IAAA,EAAA,IAAA,IAAA,SAAA,CAAA,EAAA;AACJ,MAAA;AACL,IAAA;AACA,IAAA,MAAM,OAAA,CAAA;eACE,EAAA;AACA,QAAA,SAAA,EAAM,SAAM,EAAA,QAAc;oBAC1B,EAAA;iBACA,EAAA,IAAA,EAAA,QAAoB;;AAGpB;;;gBAGL,CAAA,SAAI,CAAA,MAAA;IAEP,IAAA;AAEQ,MAAA,MAAA,GAAA,GAAA,YAAC,EAAA,eAAa;mBACV,CAAA,QAAA,IAAC,QAAA,GAAW,CAAA,CAAA;wBAGA,CAAA,WAAC,IAAA,MAAA,CAAA,CAAY,GAAC,WAAQ,EAAA,GAAA,CAAA,EAAA,CAAA;;AAKN,OAAA,KAAA,EAAA,CAAA,CAAA;;AAEI,MAAA,MAAA,aAAA,GAEd,gBAIJ,CAAA,OAAA;AAEd,MAAA,aAAA,CAAA,cAAC,EAAA;AAIjB,IAAE;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomerSupportChat.js","sources":["../../../src/components/CustomerSupportChat/CustomerSupportChat.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"quBAcO,MAAM,mBAAmB,GAAG,MAAK;
|
|
1
|
+
{"version":3,"file":"CustomerSupportChat.js","sources":["../../../src/components/CustomerSupportChat/CustomerSupportChat.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"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"}
|
package/lib/compute.js
CHANGED
package/lib/compute.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute.js","sources":["../src/compute.ts"],"sourcesContent":[null],"names":[],"mappings":"uFACA,MAAM,GAAG,GAAG,UAAU;AAEtB,MAAM,OAAO,GAAU,CAAA;AACnB,EAAA,IAAA,EAAA,OAAA;AACI,EAAA,GAAA,EAAA,GAAA;AACA,EAAA,KAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"compute.js","sources":["../src/compute.ts"],"sourcesContent":[null],"names":[],"mappings":"uFACA,MAAM,GAAG,GAAG,UAAU;AAEtB,MAAM,OAAO,GAAU,CAAA;AACnB,EAAA,IAAA,EAAA,OAAA;AACI,EAAA,GAAA,EAAA,GAAA;AACA,EAAA,KAAA,EAAA,KAAK;AACL,EAAA,IAAA,EAAA,UAAO;AACP,EAAA,gBAAM,EAAA,CAAA,GAAU,CAAA;WAChB,EAAA,MAAA,OAAkB,kCAAK;AACvB,CAAA,CAAA;AACH;AACH,MAAA,cAAA,GAAA,iBAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-config.js","sources":["../../src/config/env-config.ts"],"sourcesContent":[null],"names":[],"mappings":"mFAGA,MAAM,GAAG,GAAG,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"env-config.js","sources":["../../src/config/env-config.ts"],"sourcesContent":[null],"names":[],"mappings":"mFAGA,MAAM,GAAG,GAAG,cAAc,EAAE;AAErB,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE;AAChC,EAAA,WAAA,EAAW,GAAE,CAAA;AAChB,IAAE,OAAA,EAAA,GAAA;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatBoxWithLoader.d.ts","sourceRoot":"","sources":["../../src/container/chatBoxWithLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"chatBoxWithLoader.d.ts","sourceRoot":"","sources":["../../src/container/chatBoxWithLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,iBAAiB,GAAI,UAAK,sBAE/B,CAAC;AACF,eAAe,iBAAiB,CAAC;AAEjC,eAAO,MAAM,MAAM,GAAI;;;CAAoB;;CAM1C,CAAC;AAEF,wBAAsB,YAAY,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE;;;;CAAA,gBAenE"}
|
|
@@ -17,7 +17,7 @@ const loader = ({
|
|
|
17
17
|
routeConfig
|
|
18
18
|
} = context;
|
|
19
19
|
const parentRoute = matchParentRoute(routeConfig, config.LAYOUT_ROOT);
|
|
20
|
-
// returnInfo: {"
|
|
20
|
+
// returnInfo: {"keys":["parentRoute"],"hasOptions":false}
|
|
21
21
|
return {
|
|
22
22
|
data: [parentRoute]
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatBoxWithLoader.js","sources":["../../src/container/chatBoxWithLoader.tsx"],"sourcesContent":[null],"names":[],"mappings":"yXAMA,MAAM,iBAAiB,GAAG,KAAC,
|
|
1
|
+
{"version":3,"file":"chatBoxWithLoader.js","sources":["../../src/container/chatBoxWithLoader.tsx"],"sourcesContent":[null],"names":[],"mappings":"yXAMA,MAAM,iBAAiB,GAAG,KAAC,IAAO;SAC9B,KAAO,CAAA,aAAA,CAAA,mBAAC,EAAmB,IAAA,CAAA;AAC/B;AAGO,MAAM,MAAM,GAAG,CAAC;AACnB,EAAA,OAAA;;MAIA;AACJ,EAAE,MAAA;AAEF,IAAA;MACI,OAAA;AACA,EAAA,MAAA,WAAM,GAAU,gBAAS,CAAA,WAAe,EAAA,MAAA,CAAA,WAAA,CAAA;AACxC,EAAA,OAAA;AAEA,IAAA;AACI,GAAA;;AAEA,eAAA,YAAoB,CAAO;SAC9B;QAAC;AACE,EAAA;AACA,CAAA,EAAA;;AAGJ,EAAA,MAAA,aAAiB,MAAC,YAAA,EAAA;AACtB,EAAC,MAAA;;;;;;;;;;;;;;"}
|
package/lib/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/module.tsx"],"sourcesContent":[null],"names":[],"mappings":"2FAGA,cAAe,IAAI,OAAO,CAAC;AACvB,EAAA,WAAA,EAAW,
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/module.tsx"],"sourcesContent":[null],"names":[],"mappings":"2FAGA,cAAe,IAAI,OAAO,CAAC;AACvB,EAAA,WAAA,EAAW,cAAE;cACb,EAAY,CAAA,2DAAG;AAClB,CAAA,CAAC"}
|
package/lib/routes.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messenger-box/chat-ui",
|
|
3
|
-
"version": "10.0.3-alpha.
|
|
3
|
+
"version": "10.0.3-alpha.171",
|
|
4
4
|
"description": "Account browser",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@chatscope/chat-ui-kit-react": "^1.10.1",
|
|
44
44
|
"@chatscope/chat-ui-kit-styles": "^1.4.0",
|
|
45
45
|
"@chatscope/use-chat": "^3.1.1",
|
|
46
|
-
"@messenger-box/core": "10.0.3-alpha.
|
|
47
|
-
"@messenger-box/platform-client": "10.0.3-alpha.
|
|
46
|
+
"@messenger-box/core": "10.0.3-alpha.165",
|
|
47
|
+
"@messenger-box/platform-client": "10.0.3-alpha.171",
|
|
48
48
|
"date-fns": "^4.1.0",
|
|
49
49
|
"date-fns-tz": "^3.2.0",
|
|
50
50
|
"emoji-mart": "^3.0.1",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"typescript": {
|
|
77
77
|
"definition": "lib/index.d.ts"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "c1244ee70b3e40dec9916c2ef7e801695ecc7b5a"
|
|
80
80
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [10.0.3-alpha.17](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.16...v10.0.3-alpha.17) (2025-04-08)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
9
|
-
|
|
10
|
-
## [10.0.3-alpha.16](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.15...v10.0.3-alpha.16) (2025-03-28)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
13
|
-
|
|
14
|
-
## [10.0.3-alpha.14](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.13...v10.0.3-alpha.14) (2025-03-27)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
17
|
-
|
|
18
|
-
## [10.0.3-alpha.7](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.6...v10.0.3-alpha.7) (2025-02-27)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
21
|
-
|
|
22
|
-
## [10.0.3-alpha.5](https://github.com/CDEBase/messenger-box/compare/v10.0.3-alpha.4...v10.0.3-alpha.5) (2025-02-25)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
25
|
-
|
|
26
|
-
## [10.0.3-alpha.2](https://github.com/cdmbase/messenger-box/compare/v10.0.3-alpha.1...v10.0.3-alpha.2) (2025-02-24)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
29
|
-
|
|
30
|
-
## [10.0.3-alpha.0](https://github.com/cdmbase/messenger-box/compare/v10.0.2-alpha.6...v10.0.3-alpha.0) (2025-02-24)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
33
|
-
|
|
34
|
-
## [10.0.2-alpha.5](https://github.com/CDEBase/messenger-box/compare/v10.0.2-alpha.4...v10.0.2-alpha.5) (2025-02-24)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
37
|
-
|
|
38
|
-
## [10.0.2-alpha.4](https://github.com/CDEBase/messenger-box/compare/v10.0.2-alpha.3...v10.0.2-alpha.4) (2025-02-10)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
41
|
-
|
|
42
|
-
## [10.0.2-alpha.3](https://github.com/CDEBase/messenger-box/compare/v10.0.2-alpha.2...v10.0.2-alpha.3) (2025-02-10)
|
|
43
|
-
|
|
44
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
45
|
-
|
|
46
|
-
## [10.0.2-alpha.2](https://github.com/CDEBase/messenger-box/compare/v10.0.2-alpha.1...v10.0.2-alpha.2) (2025-02-10)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
49
|
-
|
|
50
|
-
## [10.0.2-alpha.0](https://github.com/cdmbase/messenger-box/compare/v9.0.4-alpha.23...v10.0.2-alpha.0) (2025-02-04)
|
|
51
|
-
|
|
52
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
53
|
-
|
|
54
|
-
## [10.0.1-alpha.0](https://github.com/cdmbase/messenger-box/compare/v9.0.4-alpha.23...v10.0.1-alpha.0) (2025-02-04)
|
|
55
|
-
|
|
56
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
57
|
-
|
|
58
|
-
## [9.0.4-alpha.23](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.22...v9.0.4-alpha.23) (2025-02-01)
|
|
59
|
-
|
|
60
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
61
|
-
|
|
62
|
-
## [9.0.4-alpha.22](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.21...v9.0.4-alpha.22) (2025-01-31)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
65
|
-
|
|
66
|
-
## [9.0.4-alpha.17](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.16...v9.0.4-alpha.17) (2024-10-17)
|
|
67
|
-
|
|
68
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
69
|
-
|
|
70
|
-
## [9.0.4-alpha.16](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.15...v9.0.4-alpha.16) (2024-10-08)
|
|
71
|
-
|
|
72
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
73
|
-
|
|
74
|
-
## [9.0.4-alpha.15](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.14...v9.0.4-alpha.15) (2024-09-30)
|
|
75
|
-
|
|
76
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
77
|
-
|
|
78
|
-
## [9.0.4-alpha.7](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.6...v9.0.4-alpha.7) (2024-09-20)
|
|
79
|
-
|
|
80
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
81
|
-
|
|
82
|
-
## [9.0.4-alpha.1](https://github.com/CDEBase/messenger-box/compare/v9.0.4-alpha.0...v9.0.4-alpha.1) (2024-09-12)
|
|
83
|
-
|
|
84
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
85
|
-
|
|
86
|
-
## [9.0.2-alpha.0](https://github.com/CDEBase/messenger-box/compare/v7.2.6-alpha.10...v9.0.2-alpha.0) (2024-09-06)
|
|
87
|
-
|
|
88
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
89
|
-
|
|
90
|
-
## [7.2.6-alpha.4](https://github.com/CDEBase/messenger-box/compare/v7.2.6-alpha.3...v7.2.6-alpha.4) (2024-08-12)
|
|
91
|
-
|
|
92
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
93
|
-
|
|
94
|
-
## 7.2.6-alpha.0 (2024-08-11)
|
|
95
|
-
|
|
96
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
97
|
-
|
|
98
|
-
## 7.2.4-alpha.0 (2024-07-19)
|
|
99
|
-
|
|
100
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
101
|
-
|
|
102
|
-
## [7.2.1-alpha.2](https://github.com/CDEBase/messenger-box/compare/v7.2.1-alpha.1...v7.2.1-alpha.2) (2024-07-16)
|
|
103
|
-
|
|
104
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
|
105
|
-
|
|
106
|
-
## 7.2.1-alpha.0 (2024-07-15)
|
|
107
|
-
|
|
108
|
-
**Note:** Version bump only for package @messenger-box/chat-ui
|
package/jest.config.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const base = require('../../../jest.config.base');
|
|
2
|
-
const packageJson = require('./package');
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
...base,
|
|
6
|
-
testEnvironment: 'jsdom', // This is overriden, from the base testEnvironment
|
|
7
|
-
name: packageJson.name,
|
|
8
|
-
displayName: packageJson.name,
|
|
9
|
-
};
|
package/rollup.config.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { createRollupConfig } from '../../../rollup.config.base.mjs';
|
|
3
|
-
|
|
4
|
-
const additionalPlugins = [];
|
|
5
|
-
// Use the createRollupConfig function to merge the base and specific configurations
|
|
6
|
-
export default (commandLineArgs) => {
|
|
7
|
-
const isWatchMode = commandLineArgs.watch;
|
|
8
|
-
return [
|
|
9
|
-
createRollupConfig(
|
|
10
|
-
{
|
|
11
|
-
input: ['src/index.ts'],
|
|
12
|
-
plugins: [
|
|
13
|
-
// Spread in additional plugins specific to this config
|
|
14
|
-
...additionalPlugins,
|
|
15
|
-
],
|
|
16
|
-
output: [
|
|
17
|
-
{
|
|
18
|
-
dir: 'lib',
|
|
19
|
-
format: 'es',
|
|
20
|
-
name: 'chat-ui',
|
|
21
|
-
compact: true,
|
|
22
|
-
exports: 'named',
|
|
23
|
-
sourcemap: true,
|
|
24
|
-
preserveModules: true,
|
|
25
|
-
chunkFileNames: '[name]-[hash].[format].js',
|
|
26
|
-
globals: { react: 'React' },
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
isWatchMode,
|
|
32
|
-
generateRoutesJSON: true,
|
|
33
|
-
},
|
|
34
|
-
),
|
|
35
|
-
];
|
|
36
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import React, { useState, useMemo, useEffect, useCallback, useRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
MainContainer,
|
|
4
|
-
Sidebar,
|
|
5
|
-
ConversationList,
|
|
6
|
-
Conversation,
|
|
7
|
-
Avatar,
|
|
8
|
-
MessageGroup,
|
|
9
|
-
Message,
|
|
10
|
-
ChatContainer,
|
|
11
|
-
ConversationHeader,
|
|
12
|
-
MessageList,
|
|
13
|
-
MessageInput,
|
|
14
|
-
} from '@chatscope/chat-ui-kit-react';
|
|
15
|
-
import { useOnPublicPostAddedSubscription, useSendPublicMessageMutation } from 'common/graphql';
|
|
16
|
-
import { uniqBy } from 'lodash-es';
|
|
17
|
-
|
|
18
|
-
export const Chat = ({ user, channelId, channelMessages, setChannelMessages }) => {
|
|
19
|
-
// Message input value
|
|
20
|
-
const [value, setValue] = useState('');
|
|
21
|
-
const [totalCount, setTotalCount] = useState(0);
|
|
22
|
-
|
|
23
|
-
const [sendMsg] = useSendPublicMessageMutation();
|
|
24
|
-
|
|
25
|
-
const chatContainerRef = useRef(null);
|
|
26
|
-
|
|
27
|
-
const {
|
|
28
|
-
data: newThreadMsg,
|
|
29
|
-
loading: newThreadMsgLoading,
|
|
30
|
-
error: newThreadMsgError,
|
|
31
|
-
} = useOnPublicPostAddedSubscription({
|
|
32
|
-
variables: {
|
|
33
|
-
channelId: channelId?.toString(),
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const handleSend = async (text: any) => {
|
|
38
|
-
if (!(text && channelId)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
await sendMsg({
|
|
43
|
-
variables: {
|
|
44
|
-
channelId: channelId?.toString(),
|
|
45
|
-
messageInput: {
|
|
46
|
-
content: text?.toString(),
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
React.useEffect(() => {
|
|
52
|
-
if (newThreadMsg) {
|
|
53
|
-
const msg = newThreadMsg?.publicPostAdded;
|
|
54
|
-
setTotalCount((preCount: any) => preCount + 1);
|
|
55
|
-
setChannelMessages((oldMessages: any) => uniqBy([...oldMessages, msg], ({ id }) => id));
|
|
56
|
-
|
|
57
|
-
// Scroll to the bottom after adding a new message
|
|
58
|
-
const chatContainer = chatContainerRef.current;
|
|
59
|
-
chatContainer.scrollToBottom();
|
|
60
|
-
}
|
|
61
|
-
}, []);
|
|
62
|
-
|
|
63
|
-
return (
|
|
64
|
-
<MainContainer>
|
|
65
|
-
<ChatContainer>
|
|
66
|
-
<MessageList ref={chatContainerRef}>
|
|
67
|
-
{channelMessages.map((g) => (
|
|
68
|
-
<MessageGroup key={g.id} direction={'outgoing'}>
|
|
69
|
-
<MessageGroup.Messages>
|
|
70
|
-
<Message
|
|
71
|
-
key={g.id}
|
|
72
|
-
model={
|
|
73
|
-
{
|
|
74
|
-
type: 'text',
|
|
75
|
-
payload: g.message,
|
|
76
|
-
} as any
|
|
77
|
-
}
|
|
78
|
-
/>
|
|
79
|
-
</MessageGroup.Messages>
|
|
80
|
-
</MessageGroup>
|
|
81
|
-
))}
|
|
82
|
-
</MessageList>
|
|
83
|
-
|
|
84
|
-
<MessageInput placeholder="Type message here" onSend={handleSend} />
|
|
85
|
-
</ChatContainer>
|
|
86
|
-
</MainContainer>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Box, Button, Image, useMediaQuery } from '@chakra-ui/react';
|
|
3
|
-
import { BiConversation } from '@react-icons/all-files/bi/BiConversation.js';
|
|
4
|
-
import { BiMessageDetail } from '@react-icons/all-files/bi/BiMessageDetail.js';
|
|
5
|
-
import { MdKeyboardArrowDown } from '@react-icons/all-files/md/MdKeyboardArrowDown.js';
|
|
6
|
-
import { BsCardText } from '@react-icons/all-files/bs/BsCardText.js';
|
|
7
|
-
import { nanoid } from 'nanoid';
|
|
8
|
-
import { AutoDraft, BasicStorage, ChatProvider } from '@chatscope/use-chat';
|
|
9
|
-
import { ExampleChatService } from '@chatscope/use-chat/dist/examples/index.js';
|
|
10
|
-
import { usePublicMessagesQuery } from 'common/graphql';
|
|
11
|
-
import { uniqBy } from 'lodash-es';
|
|
12
|
-
import { Chat } from './Chat';
|
|
13
|
-
import { objectId } from '@messenger-box/core';
|
|
14
|
-
|
|
15
|
-
export const CustomerSupportChat = () => {
|
|
16
|
-
const [isChat, setIsChat] = useState(false);
|
|
17
|
-
const [isChatOpen, setIsChatOpen] = useState(false);
|
|
18
|
-
const [channelMessages, setChannelMessages] = useState([]);
|
|
19
|
-
const [channelId, setChannelId] = useState<string | null>(null);
|
|
20
|
-
const [isMobileView, isNonMobileView] = useMediaQuery(['(max-width: 480px)', '(min-width: 480px)']);
|
|
21
|
-
|
|
22
|
-
// Storage needs to generate id for messages and groups
|
|
23
|
-
const messageIdGenerator = () => nanoid();
|
|
24
|
-
const groupIdGenerator = () => nanoid();
|
|
25
|
-
|
|
26
|
-
// Create serviceFactory
|
|
27
|
-
const serviceFactory = (storage, updateState) => {
|
|
28
|
-
return new ExampleChatService(storage, updateState);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
const storeChannelId = localStorage.getItem('channelId');
|
|
33
|
-
|
|
34
|
-
if (!storeChannelId || storeChannelId === 'undefined') {
|
|
35
|
-
// ID is undefined or not present in localStorage
|
|
36
|
-
const newId = objectId();
|
|
37
|
-
localStorage.setItem('channelId', newId);
|
|
38
|
-
setChannelId(newId);
|
|
39
|
-
} else {
|
|
40
|
-
setChannelId(storeChannelId.toString());
|
|
41
|
-
}
|
|
42
|
-
}, []);
|
|
43
|
-
|
|
44
|
-
const { data, loading, error } = usePublicMessagesQuery({
|
|
45
|
-
variables: {
|
|
46
|
-
channelId: channelId?.toString(),
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
React.useEffect(() => {
|
|
51
|
-
if (data?.publicMessages?.data) {
|
|
52
|
-
const currentConversaion = data?.publicMessages?.data?.slice().reverse();
|
|
53
|
-
currentConversaion.map((msg) => {
|
|
54
|
-
setChannelMessages((oldMessages: any) => uniqBy([...oldMessages, msg], ({ id }) => id));
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}, [data, isChat]);
|
|
58
|
-
const handleChat = () => {
|
|
59
|
-
setIsChatOpen(true);
|
|
60
|
-
};
|
|
61
|
-
const handleChatClick = () => {
|
|
62
|
-
setIsChat(true);
|
|
63
|
-
};
|
|
64
|
-
const chatStorage = new BasicStorage({ groupIdGenerator, messageIdGenerator });
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<>
|
|
68
|
-
{!isChat ? (
|
|
69
|
-
<Box style={{ position: 'fixed', bottom: '20px', right: '30px', zIndex: '2' }}>
|
|
70
|
-
{/* @ts-ignore */}
|
|
71
|
-
<Button
|
|
72
|
-
background={'#3182ce'}
|
|
73
|
-
fontSize={'38px'}
|
|
74
|
-
padding={'16px'}
|
|
75
|
-
width={'72px'}
|
|
76
|
-
height={'72px'}
|
|
77
|
-
borderRadius={'50%'}
|
|
78
|
-
display={'flex'}
|
|
79
|
-
alignItems={'center'}
|
|
80
|
-
justifyContent={'center'}
|
|
81
|
-
onClick={handleChatClick}
|
|
82
|
-
>
|
|
83
|
-
<BiConversation />
|
|
84
|
-
</Button>
|
|
85
|
-
</Box>
|
|
86
|
-
) : (
|
|
87
|
-
<Box
|
|
88
|
-
style={{
|
|
89
|
-
position: 'fixed',
|
|
90
|
-
bottom: '20px',
|
|
91
|
-
right: '30px',
|
|
92
|
-
zIndex: '2',
|
|
93
|
-
width: isMobileView ? '80vw' : '25vw',
|
|
94
|
-
}}
|
|
95
|
-
>
|
|
96
|
-
<Box textAlign={'left'} marginBottom={'10px'}>
|
|
97
|
-
{/* @ts-ignore */}
|
|
98
|
-
<Button
|
|
99
|
-
background={'#3182ce'}
|
|
100
|
-
fontSize={'42px'}
|
|
101
|
-
width={'62px'}
|
|
102
|
-
height={'62px'}
|
|
103
|
-
borderRadius={'50%'}
|
|
104
|
-
display={'flex'}
|
|
105
|
-
alignItems={'center'}
|
|
106
|
-
justifyContent={'center'}
|
|
107
|
-
onClick={() => setIsChat(false)}
|
|
108
|
-
>
|
|
109
|
-
<MdKeyboardArrowDown />
|
|
110
|
-
</Button>
|
|
111
|
-
</Box>
|
|
112
|
-
|
|
113
|
-
<Box style={{ borderRadius: '20px', background: 'white' }}>
|
|
114
|
-
<Box
|
|
115
|
-
style={{
|
|
116
|
-
display: 'flex',
|
|
117
|
-
backgroundColor: '#3182ce',
|
|
118
|
-
padding: '20px 30px',
|
|
119
|
-
lineHeight: '7vh',
|
|
120
|
-
alignItems: 'center',
|
|
121
|
-
}}
|
|
122
|
-
>
|
|
123
|
-
<Box
|
|
124
|
-
style={{
|
|
125
|
-
background: '#366c96',
|
|
126
|
-
padding: '10px',
|
|
127
|
-
borderRadius: '54px',
|
|
128
|
-
fontSize: '25px',
|
|
129
|
-
}}
|
|
130
|
-
>
|
|
131
|
-
<BiMessageDetail />
|
|
132
|
-
</Box>
|
|
133
|
-
<Box style={{ fontWeight: '700', fontSize: '18px', marginLeft: '30px' }}>
|
|
134
|
-
Conversation(s)
|
|
135
|
-
</Box>
|
|
136
|
-
</Box>
|
|
137
|
-
<Box
|
|
138
|
-
style={{
|
|
139
|
-
height: '50vh',
|
|
140
|
-
background: '#fafafa',
|
|
141
|
-
color: 'black',
|
|
142
|
-
display: 'flex',
|
|
143
|
-
flexDirection: 'column',
|
|
144
|
-
alignContent: 'stretch',
|
|
145
|
-
justifyContent: 'space-evenly',
|
|
146
|
-
alignItems: 'center',
|
|
147
|
-
}}
|
|
148
|
-
>
|
|
149
|
-
{!isChatOpen && !channelMessages.length ? (
|
|
150
|
-
<Box textAlign={'center'}>
|
|
151
|
-
{/* @ts-ignore */}
|
|
152
|
-
<Image
|
|
153
|
-
width={'50%'}
|
|
154
|
-
margin={'auto'}
|
|
155
|
-
src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcThpk_KxVKIRa0_fxwaVgIFcRvTgUem0LbkaA&usqp=CAU"
|
|
156
|
-
/>
|
|
157
|
-
<Box textAlign={'center'}> No ongoing Conversation</Box>
|
|
158
|
-
{/* @ts-ignore */}
|
|
159
|
-
<Button
|
|
160
|
-
style={{
|
|
161
|
-
backgroundColor: '#3182ce',
|
|
162
|
-
padding: '22px 26px',
|
|
163
|
-
marginTop: '20px',
|
|
164
|
-
borderRadius: '8px',
|
|
165
|
-
color: 'whitesmoke',
|
|
166
|
-
}}
|
|
167
|
-
leftIcon={<BiMessageDetail fontSize={'22px'} />}
|
|
168
|
-
onClick={handleChat}
|
|
169
|
-
>
|
|
170
|
-
Chat now
|
|
171
|
-
</Button>
|
|
172
|
-
</Box>
|
|
173
|
-
) : (
|
|
174
|
-
<Box w={'100%'} h={'50vh'}>
|
|
175
|
-
<ChatProvider
|
|
176
|
-
serviceFactory={serviceFactory}
|
|
177
|
-
storage={chatStorage}
|
|
178
|
-
config={{
|
|
179
|
-
typingThrottleTime: 250,
|
|
180
|
-
typingDebounceTime: 900,
|
|
181
|
-
debounceTyping: true,
|
|
182
|
-
autoDraft: AutoDraft.Save | AutoDraft.Restore,
|
|
183
|
-
}}
|
|
184
|
-
>
|
|
185
|
-
<Chat
|
|
186
|
-
user={{ name: 'beeena', avatar: '' }}
|
|
187
|
-
channelId={channelId}
|
|
188
|
-
setChannelMessages={setChannelMessages}
|
|
189
|
-
channelMessages={channelMessages}
|
|
190
|
-
/>
|
|
191
|
-
</ChatProvider>
|
|
192
|
-
</Box>
|
|
193
|
-
)}
|
|
194
|
-
</Box>
|
|
195
|
-
<Box
|
|
196
|
-
style={{
|
|
197
|
-
height: '7vh',
|
|
198
|
-
background: 'white',
|
|
199
|
-
color: 'black',
|
|
200
|
-
display: 'flex',
|
|
201
|
-
alignContent: 'center',
|
|
202
|
-
alignItems: 'center',
|
|
203
|
-
padding: '30px 0px',
|
|
204
|
-
justifyContent: 'space-evenly',
|
|
205
|
-
boxShadow: '0 0 5px rgba(0, 0, 0, 0.9)',
|
|
206
|
-
outline: '1px solid transparent',
|
|
207
|
-
}}
|
|
208
|
-
>
|
|
209
|
-
<Box
|
|
210
|
-
style={{
|
|
211
|
-
display: 'flex',
|
|
212
|
-
flexDirection: 'column',
|
|
213
|
-
alignItems: 'center',
|
|
214
|
-
}}
|
|
215
|
-
>
|
|
216
|
-
<BiMessageDetail /> Conversation
|
|
217
|
-
</Box>
|
|
218
|
-
<Box
|
|
219
|
-
style={{
|
|
220
|
-
display: 'flex',
|
|
221
|
-
flexDirection: 'column',
|
|
222
|
-
alignItems: 'center',
|
|
223
|
-
}}
|
|
224
|
-
>
|
|
225
|
-
<BsCardText /> Articles{' '}
|
|
226
|
-
</Box>
|
|
227
|
-
</Box>
|
|
228
|
-
</Box>
|
|
229
|
-
</Box>
|
|
230
|
-
)}
|
|
231
|
-
</>
|
|
232
|
-
);
|
|
233
|
-
};
|
package/src/components/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Chat, CustomerSupportChat } from './CustomerSupportChat';
|
package/src/compute.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { getFilteredRoutes } from '@common-stack/client-react/lib/utils/filteredRoutes.js';
|
|
2
|
-
const key = 'chat-box';
|
|
3
|
-
|
|
4
|
-
const chatBox: any[] = [
|
|
5
|
-
{
|
|
6
|
-
path: '/chat',
|
|
7
|
-
key: key,
|
|
8
|
-
exact: false,
|
|
9
|
-
auth: 'optional',
|
|
10
|
-
extraPermissions: ['*'],
|
|
11
|
-
component: () => import('./container/chatBoxWithLoader'),
|
|
12
|
-
},
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
// get routes
|
|
16
|
-
const filteredRoutes = getFilteredRoutes(chatBox);
|
|
17
|
-
|
|
18
|
-
export { filteredRoutes };
|
package/src/config/env-config.ts
DELETED
package/src/config/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { config } from './env-config';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ClientContainerService } from '@adminide-stack/core';
|
|
3
|
-
import { matchParentRoute } from '@admin-layout/client/lib/utils/parentRoute.js';
|
|
4
|
-
import { config } from '../config';
|
|
5
|
-
import { CustomerSupportChat } from '../components';
|
|
6
|
-
|
|
7
|
-
const ChatBoxWithLoader = (props) => {
|
|
8
|
-
return <CustomerSupportChat />;
|
|
9
|
-
};
|
|
10
|
-
export default ChatBoxWithLoader;
|
|
11
|
-
|
|
12
|
-
export const loader = ({ context, request }) => {
|
|
13
|
-
const { routeConfig } = context;
|
|
14
|
-
|
|
15
|
-
const parentRoute = matchParentRoute(routeConfig, config.LAYOUT_ROOT);
|
|
16
|
-
|
|
17
|
-
return { parentRoute };
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export async function clientLoader({ request, params, serverLoader }) {
|
|
21
|
-
// During client-side navigations, we hit our exposed API endpoints directly
|
|
22
|
-
const loaderData = await serverLoader();
|
|
23
|
-
const { apolloState } = loaderData;
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
const { container } = (window as any).__CLIENT_SERVICE__;
|
|
27
|
-
const organizationContext = container.get(ClientContainerService.ApolloErrorHandler);
|
|
28
|
-
organizationContext.hydrate(apolloState);
|
|
29
|
-
} catch (e) {
|
|
30
|
-
console.error('Error in client hydrate');
|
|
31
|
-
console.error(e);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return loaderData;
|
|
35
|
-
}
|
package/src/index.ts
DELETED
package/src/module.tsx
DELETED
package/tsconfig.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": "./src",
|
|
5
|
-
"outDir": "lib",
|
|
6
|
-
"declarationDir": "lib",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"types": ["@types/node", "@types/jest", "../../../typings"]
|
|
11
|
-
},
|
|
12
|
-
"exclude": ["../../../node_modules", "node_modules", "lib", "dist", "webpack.config.js", "rollup.config.mjs"],
|
|
13
|
-
"include": ["src", "./typings/*.d.ts", "type.d.ts"],
|
|
14
|
-
}
|
package/webpack.config.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
|
-
const nodeExternals = require('webpack-node-externals');
|
|
3
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
4
|
-
const webpack = require('webpack');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
|
|
7
|
-
const webpackOpts = {
|
|
8
|
-
mode: 'development',
|
|
9
|
-
entry: {
|
|
10
|
-
index: './src/index.ts',
|
|
11
|
-
},
|
|
12
|
-
target: 'node',
|
|
13
|
-
output: {
|
|
14
|
-
path: path.join(__dirname, 'lib'),
|
|
15
|
-
filename: '[name].js',
|
|
16
|
-
libraryTarget: 'commonjs2',
|
|
17
|
-
},
|
|
18
|
-
resolve: {
|
|
19
|
-
extensions: [
|
|
20
|
-
'.js',
|
|
21
|
-
'.jsx',
|
|
22
|
-
'.ts',
|
|
23
|
-
'.tsx',
|
|
24
|
-
'.graphql',
|
|
25
|
-
'.graphqls',
|
|
26
|
-
'.gql',
|
|
27
|
-
'.native.tsx',
|
|
28
|
-
'.native.ts',
|
|
29
|
-
'.json',
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
plugins: [
|
|
33
|
-
new webpack.LoaderOptionsPlugin({
|
|
34
|
-
options: {
|
|
35
|
-
test: /\.tsx?$/,
|
|
36
|
-
ts: {
|
|
37
|
-
compiler: 'typescript',
|
|
38
|
-
configFile: 'tsconfig.json',
|
|
39
|
-
},
|
|
40
|
-
tslint: {
|
|
41
|
-
emitErrors: true,
|
|
42
|
-
failOnHint: true,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
],
|
|
47
|
-
devtool: 'source-map',
|
|
48
|
-
module: {
|
|
49
|
-
rules: [
|
|
50
|
-
{
|
|
51
|
-
test: /\.(tsx)?$/,
|
|
52
|
-
use: 'ts-loader',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
test: /\.mjs$/,
|
|
56
|
-
include: /node_modules/,
|
|
57
|
-
type: 'javascript/auto',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
test: /\.(gql)$/,
|
|
61
|
-
exclude: /node_modules/,
|
|
62
|
-
use: ['graphql-tag/loader'],
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
test: /\.graphql?/,
|
|
66
|
-
exclude: /node_modules/,
|
|
67
|
-
use: 'raw-loader',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
test: /\.(png|jpg|gif|webp)$/i,
|
|
71
|
-
use: {
|
|
72
|
-
loader: 'url-loader',
|
|
73
|
-
options: {
|
|
74
|
-
limit: 8192,
|
|
75
|
-
name: 'static/media/[name].[hash:8].[ext]',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
test: /\.svg$/,
|
|
81
|
-
use: ['@svgr/webpack'],
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
test: /\.json$/,
|
|
85
|
-
loader: 'json-loader',
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
},
|
|
89
|
-
externals: [nodeExternals({ modulesDir: '../../../node_modules' }), nodeExternals()],
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
module.exports = webpackOpts;
|