@webex/cc-station-login 1.28.0-ccwidgets.4 → 1.28.0-ccwidgets.6
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/helper.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.useStationLogin = void 0;
|
|
4
7
|
const react_1 = require("react");
|
|
8
|
+
const cc_store_1 = __importDefault(require("@webex/cc-store")); // we need to import as we are losing the context of this in store
|
|
5
9
|
const useStationLogin = (props) => {
|
|
6
10
|
const cc = props.cc;
|
|
7
11
|
const loginCb = props.onLogin;
|
|
@@ -16,10 +20,12 @@ const useStationLogin = (props) => {
|
|
|
16
20
|
cc.stationLogin({ teamId: team, loginOption: deviceType, dialNumber: dialNumber })
|
|
17
21
|
.then((res) => {
|
|
18
22
|
setLoginSuccess(res);
|
|
23
|
+
cc_store_1.default.setSelectedLoginOption(deviceType);
|
|
19
24
|
if (loginCb) {
|
|
20
25
|
loginCb();
|
|
21
26
|
}
|
|
22
|
-
})
|
|
27
|
+
})
|
|
28
|
+
.catch((error) => {
|
|
23
29
|
console.error(error);
|
|
24
30
|
setLoginFailure(error);
|
|
25
31
|
});
|
|
@@ -31,11 +37,22 @@ const useStationLogin = (props) => {
|
|
|
31
37
|
if (logoutCb) {
|
|
32
38
|
logoutCb();
|
|
33
39
|
}
|
|
34
|
-
})
|
|
40
|
+
})
|
|
41
|
+
.catch((error) => {
|
|
35
42
|
console.error(error);
|
|
36
43
|
});
|
|
37
44
|
};
|
|
38
|
-
return {
|
|
45
|
+
return {
|
|
46
|
+
name: 'StationLogin',
|
|
47
|
+
setDeviceType,
|
|
48
|
+
setDialNumber,
|
|
49
|
+
setTeam,
|
|
50
|
+
login,
|
|
51
|
+
logout,
|
|
52
|
+
loginSuccess,
|
|
53
|
+
loginFailure,
|
|
54
|
+
logoutSuccess,
|
|
55
|
+
};
|
|
39
56
|
};
|
|
40
57
|
exports.useStationLogin = useStationLogin;
|
|
41
58
|
//# sourceMappingURL=helper.js.map
|
package/dist/helper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":";;;;;;AAAA,iCAA+B;AAG/B,+DAAoC,CAAC,kEAAkE;AAEhG,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAE,EAAE;IAC7D,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IACpB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC9B,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IACjD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IACrC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,GAAuB,CAAC;IACxE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,GAAS,CAAC;IAC1D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,GAAwB,CAAC;IAE3E,MAAM,KAAK,GAAG,GAAG,EAAE;QACjB,EAAE,CAAC,YAAY,CAAC,EAAC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAC,CAAC;aAC7E,IAAI,CAAC,CAAC,GAAwB,EAAE,EAAE;YACjC,eAAe,CAAC,GAAG,CAAC,CAAC;YACrB,kBAAK,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;YACzC,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;YACtB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACrB,eAAe,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,GAAG,EAAE;QAClB,EAAE,CAAC,aAAa,CAAC,EAAC,YAAY,EAAE,uBAAuB,EAAC,CAAC;aACtD,IAAI,CAAC,CAAC,GAAyB,EAAE,EAAE;YAClC,gBAAgB,CAAC,GAAG,CAAC,CAAC;YACtB,IAAI,QAAQ,EAAE,CAAC;gBACb,QAAQ,EAAE,CAAC;YACb,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;YACtB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,aAAa;QACb,aAAa;QACb,OAAO;QACP,KAAK;QACL,MAAM;QACN,YAAY;QACZ,YAAY;QACZ,aAAa;KACd,CAAC;AACJ,CAAC,CAAC;AAlDW,QAAA,eAAe,mBAkD1B"}
|
package/dist/types/helper.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseStationLoginProps } from
|
|
1
|
+
import { UseStationLoginProps } from './station-login/station-login.types';
|
|
2
2
|
export declare const useStationLogin: (props: UseStationLoginProps) => {
|
|
3
3
|
name: string;
|
|
4
4
|
setDeviceType: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
@@ -16,8 +16,8 @@ export interface IStationLoginProps {
|
|
|
16
16
|
*/
|
|
17
17
|
teams: Team[];
|
|
18
18
|
/**
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
* Station login options available for the agent
|
|
20
|
+
*/
|
|
21
21
|
loginOptions: string[];
|
|
22
22
|
/**
|
|
23
23
|
* Handler to initiate the agent login
|
|
@@ -36,8 +36,8 @@ export interface IStationLoginProps {
|
|
|
36
36
|
*/
|
|
37
37
|
loginFailure?: Error;
|
|
38
38
|
/**
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
* Response data received on agent login success
|
|
40
|
+
*/
|
|
41
41
|
logoutSuccess?: StationLogoutSuccess;
|
|
42
42
|
/**
|
|
43
43
|
* Callback function to be invoked once the agent login is successful
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/cc-station-login",
|
|
3
3
|
"description": "Webex Contact Center Widgets: Station Login",
|
|
4
|
-
"version": "1.28.0-ccwidgets.
|
|
4
|
+
"version": "1.28.0-ccwidgets.6",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"test:unit": "jest"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@webex/cc-store": "1.28.0-ccwidgets.
|
|
20
|
+
"@webex/cc-store": "1.28.0-ccwidgets.6",
|
|
21
21
|
"mobx-react": "9.1.1",
|
|
22
22
|
"react": "18.3.1",
|
|
23
23
|
"react-dom": "18.3.1"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
],
|
|
52
52
|
"verbose": true
|
|
53
53
|
},
|
|
54
|
-
"stableVersion": "1.28.0-ccwidgets.
|
|
54
|
+
"stableVersion": "1.28.0-ccwidgets.5"
|
|
55
55
|
}
|