@webex/cc-store 1.28.0-ccwidgets.5 → 1.28.0-ccwidgets.7
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/dist/store.js +14 -6
- package/dist/store.js.map +1 -1
- package/dist/types/store.d.ts +2 -0
- package/package.json +3 -3
package/dist/store.js
CHANGED
|
@@ -11,16 +11,23 @@ class Store {
|
|
|
11
11
|
this.loginOptions = [];
|
|
12
12
|
this.idleCodes = [];
|
|
13
13
|
this.agentId = '';
|
|
14
|
+
this.selectedLoginOption = '';
|
|
14
15
|
(0, mobx_1.makeAutoObservable)(this, { cc: mobx_1.observable.ref });
|
|
15
16
|
}
|
|
17
|
+
setSelectedLoginOption(option) {
|
|
18
|
+
this.selectedLoginOption = option;
|
|
19
|
+
}
|
|
16
20
|
registerCC(webex) {
|
|
17
21
|
this.cc = webex.cc;
|
|
18
|
-
return this.cc
|
|
22
|
+
return this.cc
|
|
23
|
+
.register()
|
|
24
|
+
.then((response) => {
|
|
19
25
|
this.teams = response.teams;
|
|
20
26
|
this.loginOptions = response.loginVoiceOptions;
|
|
21
27
|
this.idleCodes = response.idleCodes;
|
|
22
28
|
this.agentId = response.agentId;
|
|
23
|
-
})
|
|
29
|
+
})
|
|
30
|
+
.catch((error) => {
|
|
24
31
|
console.error('Error registering contact center', error);
|
|
25
32
|
return Promise.reject(error);
|
|
26
33
|
});
|
|
@@ -28,7 +35,7 @@ class Store {
|
|
|
28
35
|
init(options) {
|
|
29
36
|
if ('webex' in options) {
|
|
30
37
|
// If devs decide to go with webex, they will have to listen to the ready event before calling init
|
|
31
|
-
// This has to be documented
|
|
38
|
+
// This has to be documented
|
|
32
39
|
return this.registerCC(options.webex);
|
|
33
40
|
}
|
|
34
41
|
return new Promise((resolve, reject) => {
|
|
@@ -38,12 +45,13 @@ class Store {
|
|
|
38
45
|
const webex = webex_1.default.init({
|
|
39
46
|
config: options.webexConfig,
|
|
40
47
|
credentials: {
|
|
41
|
-
access_token: options.access_token
|
|
42
|
-
}
|
|
48
|
+
access_token: options.access_token,
|
|
49
|
+
},
|
|
43
50
|
});
|
|
44
51
|
webex.once('ready', () => {
|
|
45
52
|
clearTimeout(timer);
|
|
46
|
-
this.registerCC(webex)
|
|
53
|
+
this.registerCC(webex)
|
|
54
|
+
.then(() => {
|
|
47
55
|
resolve();
|
|
48
56
|
})
|
|
49
57
|
.catch((error) => {
|
package/dist/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;AAAA,+BAAoD;AACpD,kDAA0B;
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;AAAA,+BAAoD;AACpD,kDAA0B;AAG1B,MAAM,KAAK;IAQT;QAPA,UAAK,GAAW,EAAE,CAAC;QACnB,iBAAY,GAAa,EAAE,CAAC;QAE5B,cAAS,GAAe,EAAE,CAAC;QAC3B,YAAO,GAAW,EAAE,CAAC;QACrB,wBAAmB,GAAW,EAAE,CAAC;QAG/B,IAAA,yBAAkB,EAAC,IAAI,EAAE,EAAC,EAAE,EAAE,iBAAU,CAAC,GAAG,EAAC,CAAC,CAAC;IACjD,CAAC;IAED,sBAAsB,CAAC,MAAc;QACnC,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC;IACpC,CAAC;IAED,UAAU,CAAC,KAAyB;QAClC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC,EAAE;aACX,QAAQ,EAAE;aACV,IAAI,CAAC,CAAC,QAAiB,EAAE,EAAE;YAC1B,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;YAC5B,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,iBAAiB,CAAC;YAC/C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC;YACpC,IAAI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C1B,kBAAe,KAAK,CAAC"}
|
package/dist/types/store.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ declare class Store implements IStore {
|
|
|
5
5
|
cc: IContactCenter;
|
|
6
6
|
idleCodes: IdleCode[];
|
|
7
7
|
agentId: string;
|
|
8
|
+
selectedLoginOption: string;
|
|
8
9
|
constructor();
|
|
10
|
+
setSelectedLoginOption(option: string): void;
|
|
9
11
|
registerCC(webex: WithWebex['webex']): Promise<void>;
|
|
10
12
|
init(options: InitParams): Promise<void>;
|
|
11
13
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/cc-store",
|
|
3
3
|
"description": "Webex Contact Center Widgets: Widgets Store",
|
|
4
|
-
"version": "1.28.0-ccwidgets.
|
|
4
|
+
"version": "1.28.0-ccwidgets.7",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publishConfig": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react": "18.3.1",
|
|
23
23
|
"react-dom": "18.3.1",
|
|
24
24
|
"typescript": "5.6.3",
|
|
25
|
-
"webex": "3.7.0-wxcc.
|
|
25
|
+
"webex": "3.7.0-wxcc.5"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/core": "7.25.2",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"**/tests/**/*.tsx"
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
-
"stableVersion": "1.28.0-ccwidgets.
|
|
54
|
+
"stableVersion": "1.28.0-ccwidgets.6"
|
|
55
55
|
}
|