@webex/cc-store 1.28.0-ccwidgets.3 → 1.28.0-ccwidgets.31

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/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.3",
4
+ "version": "1.28.0-ccwidgets.31",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
@@ -12,23 +12,25 @@
12
12
  "package.json"
13
13
  ],
14
14
  "scripts": {
15
+ "clean": "rm -rf dist && rm -rf node_modules",
16
+ "clean:dist": "rm -rf dist",
15
17
  "build": "yarn run -T tsc",
16
- "build:src": "webpack && yarn run build",
18
+ "build:src": "yarn run clean:dist && webpack",
17
19
  "build:watch": "webpack --watch",
18
- "test:unit": "jest"
20
+ "test:unit": "jest --coverage",
21
+ "test:styles": "eslint"
19
22
  },
20
23
  "dependencies": {
21
24
  "mobx": "6.13.5",
22
- "react": "18.3.1",
23
- "react-dom": "18.3.1",
24
25
  "typescript": "5.6.3",
25
- "webex": "3.6.0-wxcc.5"
26
+ "webex": "3.7.0-wxcc.18"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@babel/core": "7.25.2",
29
30
  "@babel/preset-env": "7.25.4",
30
31
  "@babel/preset-react": "7.24.7",
31
32
  "@babel/preset-typescript": "7.25.9",
33
+ "@eslint/js": "^9.20.0",
32
34
  "@testing-library/dom": "10.4.0",
33
35
  "@testing-library/jest-dom": "6.6.2",
34
36
  "@testing-library/react": "16.0.1",
@@ -36,10 +38,21 @@
36
38
  "@types/react-test-renderer": "18",
37
39
  "babel-jest": "29.7.0",
38
40
  "babel-loader": "9.2.1",
41
+ "eslint": "^9.20.1",
42
+ "eslint-config-prettier": "^10.0.1",
43
+ "eslint-config-standard": "^17.1.0",
44
+ "eslint-plugin-import": "^2.25.2",
45
+ "eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
46
+ "eslint-plugin-prettier": "^5.2.3",
47
+ "eslint-plugin-promise": "^6.0.0",
48
+ "eslint-plugin-react": "^7.37.4",
39
49
  "file-loader": "6.2.0",
50
+ "globals": "^16.0.0",
40
51
  "jest": "29.7.0",
41
52
  "jest-environment-jsdom": "29.7.0",
53
+ "prettier": "^3.5.1",
42
54
  "ts-loader": "9.5.1",
55
+ "typescript-eslint": "^8.24.1",
43
56
  "webpack": "5.94.0",
44
57
  "webpack-cli": "5.1.4",
45
58
  "webpack-merge": "6.0.1"
@@ -50,6 +63,5 @@
50
63
  "**/tests/**/*.ts",
51
64
  "**/tests/**/*.tsx"
52
65
  ]
53
- },
54
- "stableVersion": "1.28.0-ccwidgets.2"
66
+ }
55
67
  }
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,oDAA4B;AAC5B,gDAA8B;AAC9B,kBAAe,eAAK,CAAC"}
package/dist/store.js DELETED
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mobx_1 = require("mobx");
7
- const webex_1 = __importDefault(require("webex"));
8
- class Store {
9
- constructor() {
10
- this.teams = [];
11
- this.loginOptions = [];
12
- this.idleCodes = [];
13
- this.agentId = '';
14
- (0, mobx_1.makeAutoObservable)(this, { cc: mobx_1.observable.ref });
15
- }
16
- registerCC(webex) {
17
- this.cc = webex.cc;
18
- return this.cc.register().then((response) => {
19
- this.teams = response.teams;
20
- this.loginOptions = response.loginVoiceOptions;
21
- this.idleCodes = response.idleCodes;
22
- this.agentId = response.agentId;
23
- }).catch((error) => {
24
- console.error('Error registering contact center', error);
25
- return Promise.reject(error);
26
- });
27
- }
28
- init(options) {
29
- if ('webex' in options) {
30
- // 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
32
- return this.registerCC(options.webex);
33
- }
34
- return new Promise((resolve, reject) => {
35
- const timer = setTimeout(() => {
36
- reject(new Error('Webex SDK failed to initialize'));
37
- }, 6000);
38
- const webex = webex_1.default.init({
39
- config: options.webexConfig,
40
- credentials: {
41
- access_token: options.access_token
42
- }
43
- });
44
- webex.once('ready', () => {
45
- clearTimeout(timer);
46
- this.registerCC(webex).then(() => {
47
- resolve();
48
- })
49
- .catch((error) => {
50
- reject(error);
51
- });
52
- });
53
- });
54
- }
55
- }
56
- const store = new Store();
57
- exports.default = store;
58
- //# sourceMappingURL=store.js.map
package/dist/store.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;AAAA,+BAAoD;AACpD,kDAA0B;AAW1B,MAAM,KAAK;IAOT;QANA,UAAK,GAAW,EAAE,CAAC;QACnB,iBAAY,GAAa,EAAE,CAAC;QAE5B,cAAS,GAAe,EAAE,CAAC;QAC3B,YAAO,GAAW,EAAE,CAAC;QAGnB,IAAA,yBAAkB,EAAC,IAAI,EAAE,EAAC,EAAE,EAAE,iBAAU,CAAC,GAAG,EAAC,CAAC,CAAC;IACjD,CAAC;IAED,UAAU,CAAC,KAAyB;QAClC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,QAAiB,EAAE,EAAE;YACnD,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,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QAClC,CAAC,CAAC,C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
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=store.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.types.js","sourceRoot":"","sources":["../src/store.types.ts"],"names":[],"mappings":""}