@webex/cc-user-state 1.28.0-wxcc.1 → 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/helper.js CHANGED
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- /*
3
- * UserState helpers
4
- */
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.useUserState = void 0;
7
4
  const useUserState = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEI,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,OAAO,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;AAC7B,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":";;;AAAO,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,OAAO,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC;AAC7B,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
@@ -1,7 +1,4 @@
1
1
  import React from 'react';
2
2
  import { IUserState } from './use-state.types';
3
- /**
4
- * Presentational component for the User State.
5
- */
6
3
  declare const UserStatePresentational: React.FunctionComponent<IUserState>;
7
4
  export default UserStatePresentational;
@@ -4,9 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = __importDefault(require("react"));
7
- /**
8
- * Presentational component for the User State.
9
- */
10
7
  const UserStatePresentational = (props) => {
11
8
  return (react_1.default.createElement(react_1.default.Fragment, null,
12
9
  react_1.default.createElement("h1", { "data-testid": "user-state-heading" }, props.name),
@@ -1 +1 @@
1
- {"version":3,"file":"user-state.presentational.js","sourceRoot":"","sources":["../../src/user-state/user-state.presentational.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAI1B;;GAEG;AACH,MAAM,uBAAuB,GAAwC,CAAC,KAAK,EAAE,EAAE;IAC7E,OAAO,CACL;QACE,qDAAgB,oBAAoB,IAAE,KAAK,CAAC,IAAI,CAAM;QACtD;;YAAiB,KAAK,CAAC,UAAU,CAAM,CACtC,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"user-state.presentational.js","sourceRoot":"","sources":["../../src/user-state/user-state.presentational.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAI1B,MAAM,uBAAuB,GAAwC,CAAC,KAAK,EAAE,EAAE;IAC7E,OAAO,CACL;QACE,qDAAgB,oBAAoB,IAAE,KAAK,CAAC,IAAI,CAAM;QACtD;;YAAiB,KAAK,CAAC,UAAU,CAAM,CACtC,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,22 +1,24 @@
1
1
  {
2
2
  "name": "@webex/cc-user-state",
3
3
  "description": "Webex Contact Center Widgets: User State",
4
- "version": "1.28.0-wxcc.1",
4
+ "version": "1.28.0-wxcc.3",
5
5
  "main": "dist/index.js",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "files": [
10
+ "dist/",
11
+ "package.json"
12
+ ],
6
13
  "scripts": {
7
14
  "build": "yarn run -T tsc",
8
15
  "build:src": "webpack && yarn run build",
9
16
  "build:watch": "webpack --watch",
10
- "test:unit": "jest",
11
- "release": "echo 'Releasing @webex/cc-user-state' && semantic-release --no-ci && echo 'Released @webex/cc-user-state'"
17
+ "test:unit": "jest"
12
18
  },
13
19
  "dependencies": {
14
20
  "@r2wc/react-to-web-component": "2.0.3",
15
- "@semantic-release/changelog": "^6.0.3",
16
- "@semantic-release/exec": "^6.0.3",
17
- "@semantic-release/git": "^10.0.1",
18
- "@semantic-release/github": "^11.0.1",
19
- "@webex/cc-store": "^1.28.0-wxcc.2",
21
+ "@webex/cc-store": "1.28.0-wxcc.3",
20
22
  "mobx-react": "9.1.1",
21
23
  "react": "18.3.1",
22
24
  "react-dom": "18.3.1",
@@ -37,15 +39,15 @@
37
39
  "file-loader": "6.2.0",
38
40
  "jest": "29.7.0",
39
41
  "jest-environment-jsdom": "29.7.0",
40
- "semantic-release": "^24.2.0",
41
- "semantic-release-yarn": "^3.0.2",
42
42
  "ts-loader": "9.5.1",
43
43
  "webpack": "5.94.0",
44
44
  "webpack-cli": "5.1.4",
45
45
  "webpack-merge": "6.0.1"
46
46
  },
47
47
  "jest": {
48
- "testEnvironment": "jsdom"
48
+ "testEnvironment": "jsdom",
49
+ "//": "We can remove this when we have tests",
50
+ "passWithNoTests": true
49
51
  },
50
- "stableVersion": "1.28.0-alpha.20"
52
+ "stableVersion": "1.0.0"
51
53
  }
package/.babelrc.js DELETED
@@ -1,3 +0,0 @@
1
- const baseConfig = require('../../../.babelrc');
2
-
3
- module.exports = baseConfig;
package/CHANGELOG.md DELETED
File without changes
package/src/helper.ts DELETED
@@ -1,7 +0,0 @@
1
- /*
2
- * UserState helpers
3
- */
4
-
5
- export const useUserState = () => {
6
- return {name: 'UserState'};
7
- };
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- import {UserState, WebUserState} from './user-state/index';
2
-
3
- export {UserState, WebUserState};
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import store from '@webex/cc-store';
3
- import {observer} from 'mobx-react';
4
- import r2wc from '@r2wc/react-to-web-component';
5
-
6
- import {useUserState} from '../helper';
7
- import UserStatePresentational from './user-state.presentational';
8
-
9
- const UserState: React.FunctionComponent = observer(() => {
10
- const {loginState, setLoginState, ccSdk, isAvailable} = store;
11
- const result = useUserState();
12
- const props = {
13
- ...result,
14
- loginState,
15
- setLoginState,
16
- ccSdk,
17
- isAvailable,
18
- };
19
-
20
- return <UserStatePresentational {...props} />;
21
- });
22
-
23
- const WebUserState = r2wc(UserState);
24
-
25
- if (!customElements.get('widget-cc-user-state')) {
26
- customElements.define('widget-cc-user-state', WebUserState);
27
- }
28
-
29
- export {UserState, WebUserState};
File without changes
@@ -1,29 +0,0 @@
1
- /**
2
- * Interface representing the state of a user.
3
- */
4
- export interface IUserState {
5
- /**
6
- * The name of the user.
7
- */
8
- name: string;
9
-
10
- /**
11
- * The current login state of the user.
12
- */
13
- loginState: any;
14
-
15
- /**
16
- * Function to set the login state of the user.
17
- */
18
- setLoginState: any;
19
-
20
- /**
21
- * The SDK instance for the contact center.
22
- */
23
- ccSdk: any;
24
-
25
- /**
26
- * Indicates whether the user is available.
27
- */
28
- isAvailable: any;
29
- }
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
-
3
- import {IUserState} from './use-state.types';
4
-
5
- /**
6
- * Presentational component for the User State.
7
- */
8
- const UserStatePresentational: React.FunctionComponent<IUserState> = (props) => {
9
- return (
10
- <>
11
- <h1 data-testid="user-state-heading">{props.name}</h1>
12
- <h4>User State: {props.loginState}</h4>
13
- </>
14
- );
15
- };
16
-
17
- export default UserStatePresentational;
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "include": [
4
- "./src"
5
- ],
6
- "compilerOptions": {
7
- "outDir": "./dist",
8
- "declaration": true,
9
- "declarationDir": "./dist/types"
10
- },
11
- }
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
- });