@webex/cc-station-login 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,9 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useStationLogin = void 0;
4
- /*
5
- * StationLogin helper
6
- */
7
4
  const useStationLogin = () => {
8
5
  return { name: 'StationLogin' };
9
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACI,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,OAAO,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;AAChC,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B"}
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":";;;AAAO,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,OAAO,EAAC,IAAI,EAAE,cAAc,EAAC,CAAC;AAChC,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B"}
@@ -4,7 +4,6 @@
4
4
  export interface IStationLoginProps {
5
5
  /**
6
6
  * The name of the station.
7
- *
8
7
  */
9
8
  name: string;
10
9
  /**
package/package.json CHANGED
@@ -1,25 +1,24 @@
1
1
  {
2
2
  "name": "@webex/cc-station-login",
3
3
  "description": "Webex Contact Center Widgets: Station Login",
4
- "version": "1.28.0-wxcc.1",
4
+ "version": "1.28.0-wxcc.3",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
+ "files": [
10
+ "dist/",
11
+ "package.json"
12
+ ],
9
13
  "scripts": {
10
14
  "build": "yarn run -T tsc",
11
15
  "build:src": "webpack && yarn run build",
12
16
  "build:watch": "webpack --watch",
13
- "test:unit": "jest",
14
- "release": "echo 'Releasing @webex/cc-station-login' && semantic-release --no-ci && echo 'Released @webex/cc-station-login'"
17
+ "test:unit": "jest"
15
18
  },
16
19
  "dependencies": {
17
20
  "@r2wc/react-to-web-component": "2.0.3",
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
- "@webex/cc-store": "^1.28.0-wxcc.1",
21
+ "@webex/cc-store": "1.28.0-wxcc.3",
23
22
  "mobx-react": "9.1.1",
24
23
  "react": "18.3.1",
25
24
  "react-dom": "18.3.1",
@@ -40,8 +39,6 @@
40
39
  "file-loader": "6.2.0",
41
40
  "jest": "29.7.0",
42
41
  "jest-environment-jsdom": "29.7.0",
43
- "semantic-release": "^24.2.0",
44
- "semantic-release-yarn": "^3.0.2",
45
42
  "ts-loader": "9.5.1",
46
43
  "webpack": "5.94.0",
47
44
  "webpack-cli": "5.1.4",
package/.babelrc.js DELETED
@@ -1,3 +0,0 @@
1
- const baseConfig = require('../../../.babelrc');
2
-
3
- module.exports = baseConfig;
package/CHANGELOG.md DELETED
@@ -1,13 +0,0 @@
1
- # [@webex/cc-station-login-v1.28.0-alpha.12](https://github.com/webex/widgets/compare/1.28.0-alpha.11...1.28.0-alpha.12) (2024-11-15)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * **cc-widgets:** test-commit-to-check-release ([#269](https://github.com/webex/widgets/issues/269)) ([49ec94f](https://github.com/webex/widgets/commit/49ec94f2b2ef0758951ce51cc56675390e9d49cc))
7
-
8
- # [@webex/cc-station-login-v1.28.0-alpha.11](https://github.com/webex/widgets/compare/1.28.0-alpha.10...1.28.0-alpha.11) (2024-11-15)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * **cc-widgets:** remove-dry-run ([#268](https://github.com/webex/widgets/issues/268)) ([4e2038c](https://github.com/webex/widgets/commit/4e2038c216cb915a1233667e259be619b92212b1))
package/src/helper.ts DELETED
@@ -1,6 +0,0 @@
1
- /*
2
- * StationLogin helper
3
- */
4
- export const useStationLogin = () => {
5
- return {name: 'StationLogin'};
6
- };
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- import {StationLogin, WebStationLogin} from './station-login';
2
-
3
- export {StationLogin, WebStationLogin};
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import r2wc from '@r2wc/react-to-web-component';
3
- import store from '@webex/cc-store';
4
- import {observer} from 'mobx-react';
5
-
6
- import StationLoginPresentational from './station-login.presentational';
7
- import {useStationLogin} from '../helper';
8
-
9
- const StationLogin: React.FunctionComponent = observer(() => {
10
- const {loginState, setLoginState, ccSdk, isAvailable} = store;
11
- const result = useStationLogin();
12
-
13
- const props = {
14
- ...result,
15
- loginState,
16
- setLoginState,
17
- ccSdk,
18
- isAvailable,
19
- };
20
- return <StationLoginPresentational {...props} />;
21
- });
22
-
23
- const WebStationLogin = r2wc(StationLogin);
24
-
25
- if (!customElements.get('widget-cc-station-login')) {
26
- customElements.define('widget-cc-station-login', WebStationLogin);
27
- }
28
-
29
- export {StationLogin, WebStationLogin};
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
-
3
- import {IStationLoginProps} from './station-login.types';
4
-
5
- const StationLoginPresentational: React.FunctionComponent<IStationLoginProps> = (props) => {
6
- return (
7
- <>
8
- <h1 data-testid="station-login-heading">{props.name}</h1>
9
- <h4>Station Login State: {props.loginState}</h4>
10
- <button onClick={() => props.setLoginState('Logged In')}>Click to change state</button>
11
- </>
12
- );
13
- };
14
-
15
- export default StationLoginPresentational;
@@ -1,30 +0,0 @@
1
- /**
2
- * Interface representing the properties for the Station Login component.
3
- */
4
- export interface IStationLoginProps {
5
- /**
6
- * The name of the station.
7
- *
8
- */
9
- name: string;
10
-
11
- /**
12
- * The current login state of the station.
13
- */
14
- loginState: any;
15
-
16
- /**
17
- * Function to set the login state of the station.
18
- */
19
- setLoginState: any;
20
-
21
- /**
22
- * The Customer Care SDK instance.
23
- */
24
- ccSdk: any;
25
-
26
- /**
27
- * Indicates whether the station is available.
28
- */
29
- isAvailable: any;
30
- }
File without changes
package/tests/helper.ts DELETED
@@ -1,8 +0,0 @@
1
- import {useStationLogin} from '../src/helper';
2
-
3
- describe('Station login helpers', () => {
4
- it('returns the correct component name', () => {
5
- const result = useStationLogin();
6
- expect(result.name).toBe('StationLogin');
7
- });
8
- });
@@ -1,21 +0,0 @@
1
- import '@testing-library/jest-dom';
2
- import React from 'react';
3
- import {render, screen, cleanup} from '@testing-library/react';
4
-
5
- import * as helper from '../../src/helper';
6
- import {StationLogin} from '../../src/station-login/index';
7
-
8
- describe('StationLogin', () => {
9
- afterEach(cleanup);
10
-
11
- it('CheckboxWithLabel changes the text after click', () => {
12
- const stationLoginHelperSpy = jest.spyOn(helper, 'useStationLogin').mockReturnValue({name: 'MockStationLogin'});
13
-
14
- render(<StationLogin />);
15
-
16
- expect(stationLoginHelperSpy).toHaveBeenCalledWith();
17
-
18
- const heading = screen.getByTestId('station-login-heading');
19
- expect(heading).toHaveTextContent('MockStationLogin');
20
- });
21
- });
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import {render, screen, cleanup} from '@testing-library/react';
3
- import StationLoginPresentational from '../../src/station-login/station-login.presentational';
4
- import '@testing-library/jest-dom';
5
-
6
- describe('StationLoginPresentational', () => {
7
- afterEach(cleanup);
8
-
9
- it('renders the component name', () => {
10
- const props = {
11
- name: 'StationLogin',
12
- loginState: 'idle',
13
- setLoginState: jest.fn(),
14
- ccSdk: {},
15
- isAvailable: jest.fn(),
16
- };
17
- render(<StationLoginPresentational {...props} />);
18
- const heading = screen.getByTestId('station-login-heading');
19
- expect(heading).toHaveTextContent('StationLogin');
20
- });
21
- });
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
- });