@webex/cc-store 1.28.0-wxcc.2 → 1.28.0-wxcc.3
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.map +1 -1
- package/package.json +9 -10
- package/.babelrc.js +0 -3
- package/CHANGELOG.md +0 -113
- package/src/index.ts +0 -2
- package/src/sdk.ts +0 -80
- package/src/store.ts +0 -30
- package/tsconfig.json +0 -11
- package/webpack.config.js +0 -12
package/dist/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;AAAA,+BAAoD;AAEpD,gDAAwB;AACxB;;GAEG;
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;AAAA,+BAAoD;AAEpD,gDAAwB;AACxB;;GAEG;AAEH,MAAM,KAAK;IAKT;QAJA,eAAU,GAAG,EAAE,CAAC;QAChB,gBAAW,GAAG,KAAK,CAAC;QACpB,UAAK,GAAG,aAAG,CAAC;QAUZ,kBAAa,GAAG,CAAC,KAAK,EAAE,EAAE;YACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QAC1B,CAAC,CAAC;QAEF,mBAAc,GAAG,CAAC,KAAK,EAAE,EAAE;YACzB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QAC3B,CAAC,CAAC;QAbA,IAAA,yBAAkB,EAAC,IAAI,EAAE,EAAC,KAAK,EAAE,iBAAU,CAAC,GAAG,EAAC,CAAC,CAAC;QAElD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,EAAE;YAC1C,IAAI,CAAC,cAAc,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;CASF;AAED,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;AAC1B,kBAAe,KAAK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/cc-store",
|
|
3
3
|
"description": "Webex Contact Center Widgets: Widgets Store",
|
|
4
|
-
"version": "1.28.0-wxcc.
|
|
4
|
+
"version": "1.28.0-wxcc.3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/",
|
|
12
|
+
"package.json"
|
|
13
|
+
],
|
|
10
14
|
"scripts": {
|
|
11
15
|
"build": "yarn run -T tsc",
|
|
12
16
|
"build:src": "webpack && yarn run build",
|
|
13
17
|
"build:watch": "webpack --watch",
|
|
14
|
-
"test:unit": "jest"
|
|
15
|
-
"release": "echo 'Releasing @webex/cc-store' && semantic-release --no-ci && echo 'Released @webex/cc-store'"
|
|
18
|
+
"test:unit": "jest"
|
|
16
19
|
},
|
|
17
20
|
"dependencies": {
|
|
18
|
-
"@semantic-release/changelog": "^6.0.3",
|
|
19
|
-
"@semantic-release/exec": "^6.0.3",
|
|
20
|
-
"@semantic-release/git": "^10.0.1",
|
|
21
|
-
"@semantic-release/github": "^11.0.1",
|
|
22
21
|
"mobx": "6.13.5",
|
|
23
22
|
"react": "18.3.1",
|
|
24
23
|
"react-dom": "18.3.1",
|
|
@@ -39,15 +38,15 @@
|
|
|
39
38
|
"file-loader": "6.2.0",
|
|
40
39
|
"jest": "29.7.0",
|
|
41
40
|
"jest-environment-jsdom": "29.7.0",
|
|
42
|
-
"semantic-release": "^24.2.0",
|
|
43
|
-
"semantic-release-yarn": "^3.0.2",
|
|
44
41
|
"ts-loader": "9.5.1",
|
|
45
42
|
"webpack": "5.94.0",
|
|
46
43
|
"webpack-cli": "5.1.4",
|
|
47
44
|
"webpack-merge": "6.0.1"
|
|
48
45
|
},
|
|
49
46
|
"jest": {
|
|
50
|
-
"testEnvironment": "jsdom"
|
|
47
|
+
"testEnvironment": "jsdom",
|
|
48
|
+
"//": "We can remove this when we have tests",
|
|
49
|
+
"passWithNoTests": true
|
|
51
50
|
},
|
|
52
51
|
"stableVersion": "1.0.0"
|
|
53
52
|
}
|
package/.babelrc.js
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# [@webex/cc-store-v1.28.0-alpha.16](https://github.com/webex/widgets/compare/1.28.0-alpha.15...1.28.0-alpha.16) (2024-11-15)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
### Bug Fixes
|
|
5
|
-
|
|
6
|
-
* **cc-widgets:** update-docs-in-user-state ([#275](https://github.com/webex/widgets/issues/275)) ([b59f0c4](https://github.com/webex/widgets/commit/b59f0c45ef64e847588b31a512452b317c296331))
|
|
7
|
-
|
|
8
|
-
# [@webex/cc-store-v1.28.0-alpha.15](https://github.com/webex/widgets/compare/1.28.0-alpha.14...1.28.0-alpha.15) (2024-11-15)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Bug Fixes
|
|
12
|
-
|
|
13
|
-
* **release:** add-central-releaserc ([#273](https://github.com/webex/widgets/issues/273)) ([fe4dc35](https://github.com/webex/widgets/commit/fe4dc35447c405ffe2eb2b80d65adb5093c7eed5))
|
|
14
|
-
|
|
15
|
-
# [@webex/cc-store-v1.28.0-alpha.14](https://github.com/webex/widgets/compare/1.28.0-alpha.13...1.28.0-alpha.14) (2024-11-15)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Bug Fixes
|
|
19
|
-
|
|
20
|
-
* **cc-widgets:** add-logs-for-release ([#272](https://github.com/webex/widgets/issues/272)) ([1864d7a](https://github.com/webex/widgets/commit/1864d7ad2827ccbf780b103cc785235214a5676c))
|
|
21
|
-
|
|
22
|
-
# [@webex/cc-store-v1.28.0-alpha.13](https://github.com/webex/widgets/compare/1.28.0-alpha.12...1.28.0-alpha.13) (2024-11-15)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Bug Fixes
|
|
26
|
-
|
|
27
|
-
* **release:** update-commit-analyzer-rules ([#271](https://github.com/webex/widgets/issues/271)) ([45451c0](https://github.com/webex/widgets/commit/45451c09c02645a6563b593f262196aee2f02173))
|
|
28
|
-
|
|
29
|
-
# [@webex/cc-store-v1.28.0-alpha.10](https://github.com/webex/widgets/compare/1.28.0-alpha.9...1.28.0-alpha.10) (2024-11-15)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Bug Fixes
|
|
33
|
-
|
|
34
|
-
* **cc-widgets:** trigger-a-release ([#266](https://github.com/webex/widgets/issues/266)) ([7dffb95](https://github.com/webex/widgets/commit/7dffb957db894d7d7892a602feb50a6074b59f2c))
|
|
35
|
-
|
|
36
|
-
# [@webex/cc-store-v1.28.0-alpha.9](https://github.com/webex/widgets/compare/1.28.0-alpha.8...1.28.0-alpha.9) (2024-11-15)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
### Features
|
|
40
|
-
|
|
41
|
-
* **release:** release-all-cc-widgets ([#265](https://github.com/webex/widgets/issues/265)) ([ca4d845](https://github.com/webex/widgets/commit/ca4d8454865be8a7e86c247c6769f25a08380636))
|
|
42
|
-
|
|
43
|
-
# [@webex/cc-store-v1.28.0-alpha.8](https://github.com/webex/widgets/compare/1.28.0-alpha.7...1.28.0-alpha.8) (2024-11-15)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### Bug Fixes
|
|
47
|
-
|
|
48
|
-
* **release:** fix-add-channel-in-releaserc ([#264](https://github.com/webex/widgets/issues/264)) ([f47d2b1](https://github.com/webex/widgets/commit/f47d2b1d054d8e071360090254edae7de3503509))
|
|
49
|
-
|
|
50
|
-
# [@webex/cc-store-v1.28.0-alpha.7](https://github.com/webex/widgets/compare/1.28.0-alpha.6...1.28.0-alpha.7) (2024-11-15)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### Bug Fixes
|
|
54
|
-
|
|
55
|
-
* **release:** add-chanel-in-smeantic-release-yarn ([#263](https://github.com/webex/widgets/issues/263)) ([837d974](https://github.com/webex/widgets/commit/837d974e576cc8fdecfa3ba4a200aa9bdc9666a3))
|
|
56
|
-
|
|
57
|
-
# [@webex/cc-store-v1.28.0-alpha.6](https://github.com/webex/widgets/compare/1.28.0-alpha.5...1.28.0-alpha.6) (2024-11-15)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
### Bug Fixes
|
|
61
|
-
|
|
62
|
-
* **release:** fix-npm-tag ([#256](https://github.com/webex/widgets/issues/256)) ([9ac693a](https://github.com/webex/widgets/commit/9ac693aff72e152c383a4d373f87239f593d4b20))
|
|
63
|
-
* **cc-store:** trigger-a-release ([#259](https://github.com/webex/widgets/issues/259)) ([b5bd817](https://github.com/webex/widgets/commit/b5bd8173d55ef7cad496208f5ee2fb1264777520))
|
|
64
|
-
* **cc-store:** trigger-a-release ([#261](https://github.com/webex/widgets/issues/261)) ([f15ba04](https://github.com/webex/widgets/commit/f15ba0456c372cf4a70756c301053cd74b836d1b))
|
|
65
|
-
* **cc-store:** trigger-a-release-2 ([#262](https://github.com/webex/widgets/issues/262)) ([bfc5a15](https://github.com/webex/widgets/commit/bfc5a15d90cc5cfefe5ae4d92826ba32005843c4))
|
|
66
|
-
* **cc-store:** trigger-npm-release ([#257](https://github.com/webex/widgets/issues/257)) ([b6f8a56](https://github.com/webex/widgets/commit/b6f8a56469580b26d7f5e78dbef2a91093e802f8))
|
|
67
|
-
* **release:** update-release-rs ([#258](https://github.com/webex/widgets/issues/258)) ([b58d02f](https://github.com/webex/widgets/commit/b58d02f9238319f0a87c00f6fc0404995f7fe0a8))
|
|
68
|
-
|
|
69
|
-
# [@webex/cc-store-v1.28.0-alpha.5](https://github.com/webex/widgets/compare/v1.28.0-alpha.4...1.28.0-alpha.5) (2024-11-14)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
### Bug Fixes
|
|
73
|
-
|
|
74
|
-
* **release:** add-monorepo-semantic-release-support ([#253](https://github.com/webex/widgets/issues/253)) ([a4cb745](https://github.com/webex/widgets/commit/a4cb74587029ae11aeb0fda65d0362fc346e4d8a))
|
|
75
|
-
* **release:** sync-packgejson-and-npm-version ([#254](https://github.com/webex/widgets/issues/254)) ([a7b2793](https://github.com/webex/widgets/commit/a7b2793e6dd51ba32762c204e04ab204d1bcf96e))
|
|
76
|
-
|
|
77
|
-
# [1.28.0-alpha.4](https://github.com/webex/widgets/compare/v1.28.0-alpha.3...v1.28.0-alpha.4) (2024-11-14)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
### Bug Fixes
|
|
81
|
-
|
|
82
|
-
* **store:** add-documentation ([#252](https://github.com/webex/widgets/issues/252)) ([f754731](https://github.com/webex/widgets/commit/f7547314196af9ceb1185ab23da6a2df030f3d2c))
|
|
83
|
-
|
|
84
|
-
# [1.28.0-alpha.3](https://github.com/webex/widgets/compare/v1.28.0-alpha.2...v1.28.0-alpha.3) (2024-11-14)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
### Features
|
|
88
|
-
|
|
89
|
-
* **release:** add-publishconfig ([#250](https://github.com/webex/widgets/issues/250)) ([2ee17f6](https://github.com/webex/widgets/commit/2ee17f64f13d51340347dfeb492fd37a2dc40501))
|
|
90
|
-
|
|
91
|
-
# [1.28.0-alpha.2](https://github.com/webex/widgets/compare/v1.28.0-alpha.1...v1.28.0-alpha.2) (2024-11-14)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
### Bug Fixes
|
|
95
|
-
|
|
96
|
-
* **station-login:** test-commit ([#249](https://github.com/webex/widgets/issues/249)) ([706d3d4](https://github.com/webex/widgets/commit/706d3d412574987a9f84079a24697879dc6dba33))
|
|
97
|
-
|
|
98
|
-
# [1.28.0-alpha.1](https://github.com/webex/widgets/compare/v1.27.5...v1.28.0-alpha.1) (2024-11-14)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Bug Fixes
|
|
102
|
-
|
|
103
|
-
* **release:** add-mono-repo-support-for-scemantic-release ([#246](https://github.com/webex/widgets/issues/246)) ([4d2a572](https://github.com/webex/widgets/commit/4d2a57280eed3ef3caf5efb8a58c6cea433e1f53))
|
|
104
|
-
* convert npm to yarn ([#234](https://github.com/webex/widgets/issues/234)) ([432ed3c](https://github.com/webex/widgets/commit/432ed3cc1b2521f69cd9383cd0dbefad8f0a2eee))
|
|
105
|
-
* **circleci:** fix-caching-path-in-ci ([#243](https://github.com/webex/widgets/issues/243)) ([77f40f0](https://github.com/webex/widgets/commit/77f40f098a2f51620bc7af294ec429feeaf8caf1))
|
|
106
|
-
* **circleci:** fix-test-branch-name ([#242](https://github.com/webex/widgets/issues/242)) ([d60859a](https://github.com/webex/widgets/commit/d60859ad562a93d2f1fecd1cfe207729c475edd2))
|
|
107
|
-
* **release:** remove-semantic-release-npm ([#248](https://github.com/webex/widgets/issues/248)) ([c4e7bb1](https://github.com/webex/widgets/commit/c4e7bb18133fd1500f53ce686076868e00e15ec0))
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
### Features
|
|
111
|
-
|
|
112
|
-
* **release:** add-release-script-and-config ([#241](https://github.com/webex/widgets/issues/241)) ([376e348](https://github.com/webex/widgets/commit/376e34835a11ccf55d43b207a3777aeeb442aaba))
|
|
113
|
-
* **pipeline:** run-npm-publish-for-cc-store ([#245](https://github.com/webex/widgets/issues/245)) ([d9ef7ae](https://github.com/webex/widgets/commit/d9ef7ae064f334478391637b9b70359edf0b40de))
|
package/src/index.ts
DELETED
package/src/sdk.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
const sdk = {
|
|
2
|
-
accessToken: '',
|
|
3
|
-
callbacks: {},
|
|
4
|
-
init: async function({accessToken}) {
|
|
5
|
-
this.accessToken = accessToken;
|
|
6
|
-
},
|
|
7
|
-
logout: function() {
|
|
8
|
-
this.accessToken = '';
|
|
9
|
-
this.callControls.unmute();
|
|
10
|
-
this.presence.set('busy');
|
|
11
|
-
},
|
|
12
|
-
presence: {
|
|
13
|
-
currentState: 'busy',
|
|
14
|
-
set: function(state) {
|
|
15
|
-
this.currentState = state;
|
|
16
|
-
console.log(
|
|
17
|
-
`%cWxCCSDK\t\t\t%cpresence.set:%c Received`,
|
|
18
|
-
'background: red; color: white;',
|
|
19
|
-
'background: lightgreen; color: black;',
|
|
20
|
-
'background: transparent; color: grey;'
|
|
21
|
-
);
|
|
22
|
-
setTimeout(() => {
|
|
23
|
-
sdk.emit('presence:state', this.currentState);
|
|
24
|
-
}, 1500);
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
callControls: {
|
|
28
|
-
currentState: 'unmuted',
|
|
29
|
-
mute: function() {
|
|
30
|
-
this.currentState = 'muted';
|
|
31
|
-
console.log(
|
|
32
|
-
`%cWxCCSDK\t\t\t%ccallControls.mute:%c Received`,
|
|
33
|
-
'background: red; color: white;',
|
|
34
|
-
'background: lightgreen; color: black;',
|
|
35
|
-
'background: transparent; color: grey;'
|
|
36
|
-
);
|
|
37
|
-
setTimeout(() => {
|
|
38
|
-
sdk.emit('callControls:muteState', this.currentState);
|
|
39
|
-
}, 1500);
|
|
40
|
-
},
|
|
41
|
-
unmute: function() {
|
|
42
|
-
this.currentState = 'unmuted';
|
|
43
|
-
console.log(
|
|
44
|
-
`%cWxCCSDK\t\t\t%ccallControls.unmute:%c Received`,
|
|
45
|
-
'background: red; color: white;',
|
|
46
|
-
'background: lightgreen; color: black;',
|
|
47
|
-
'background: transparent; color: grey;'
|
|
48
|
-
);
|
|
49
|
-
setTimeout(() => {
|
|
50
|
-
sdk.emit('callControls:muteState', this.currentState);
|
|
51
|
-
}, 3000);
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
on: function(eventName, callback) {
|
|
55
|
-
if (this.callbacks[eventName] === undefined) {
|
|
56
|
-
this.callbacks[eventName] = [];
|
|
57
|
-
}
|
|
58
|
-
this.callbacks[eventName].push(callback);
|
|
59
|
-
return {
|
|
60
|
-
eventName,
|
|
61
|
-
callback,
|
|
62
|
-
};
|
|
63
|
-
},
|
|
64
|
-
off: function(eventName, callback) {
|
|
65
|
-
this.callbacks[eventName] = this.callbacks[eventName].filter((cb) => cb !== callback);
|
|
66
|
-
},
|
|
67
|
-
emit: function(eventName, payload) {
|
|
68
|
-
console.log(
|
|
69
|
-
`%cWxCCSDK\t\t\t%cEmitEvent:%c ${eventName}\t\t%cPayload:%c ${payload}`,
|
|
70
|
-
'background: red; color: white;',
|
|
71
|
-
'background: lightgreen; color: black;',
|
|
72
|
-
'background: transparent; color: grey;',
|
|
73
|
-
'background: lightgreen; color: black;',
|
|
74
|
-
'background: transparent; color: grey;'
|
|
75
|
-
);
|
|
76
|
-
this.callbacks[eventName].forEach((cb) => cb(payload));
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export default sdk;
|
package/src/store.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {makeAutoObservable, observable} from 'mobx';
|
|
2
|
-
|
|
3
|
-
import sdk from './sdk';
|
|
4
|
-
/*
|
|
5
|
-
* Store class
|
|
6
|
-
*/
|
|
7
|
-
class Store {
|
|
8
|
-
loginState = '';
|
|
9
|
-
isAvailable = false;
|
|
10
|
-
ccSdk = sdk;
|
|
11
|
-
|
|
12
|
-
constructor() {
|
|
13
|
-
makeAutoObservable(this, {ccSdk: observable.ref});
|
|
14
|
-
|
|
15
|
-
this.ccSdk.on('presence:state', (payload) => {
|
|
16
|
-
this.setIsAvailable(payload === 'available');
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
setLoginState = (state) => {
|
|
21
|
-
this.loginState = state;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
setIsAvailable = (state) => {
|
|
25
|
-
this.isAvailable = state;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const store = new Store();
|
|
30
|
-
export default store;
|
package/tsconfig.json
DELETED
package/webpack.config.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const {merge} = require('webpack-merge');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const baseConfig = require('../../../webpack.config');
|
|
5
|
-
|
|
6
|
-
module.exports = merge(baseConfig, {
|
|
7
|
-
output: {
|
|
8
|
-
path: path.resolve(__dirname, 'dist'),
|
|
9
|
-
filename: 'index.js', // Set the output filename to index.js
|
|
10
|
-
libraryTarget: 'commonjs2',
|
|
11
|
-
},
|
|
12
|
-
});
|