@devtron-labs/devtron-fe-common-lib 0.0.7-beta-33 → 0.0.7-beta-35

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/index.js CHANGED
@@ -3,7 +3,6 @@
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
4
  var React = require('react');
5
5
  var ReactDOM = require('react-dom');
6
- var reactRouter = require('react-router');
7
6
  var reactRouterDom = require('react-router-dom');
8
7
 
9
8
  function _interopNamespaceDefault(e) {
@@ -1966,9 +1965,9 @@ function GenericEmptyState(_a) {
1966
1965
  }
1967
1966
 
1968
1967
  function ErrorScreenNotFound() {
1969
- var history = reactRouter.useHistory();
1968
+ var push = reactRouterDom.useHistory().push;
1970
1969
  var redirectToHome = function () {
1971
- history.push('app/list');
1970
+ push('/app/list');
1972
1971
  };
1973
1972
  var renderGenerateButton = function () {
1974
1973
  return (jsxRuntime.jsx("button", __assign({ className: "flex cta h-32", onClick: redirectToHome, "data-testid": "empty-screen-take-me-home" }, { children: ERROR_EMPTY_SCREEN.TAKE_BACK_HOME })));
@@ -16415,7 +16414,7 @@ var Checkbox = /** @class */ (function (_super) {
16415
16414
  Checkbox.prototype.render = function () {
16416
16415
  var _a;
16417
16416
  var rootClassName = "".concat(this.props.rootClassName ? this.props.rootClassName : '');
16418
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("label", __assign({ className: "dc__position-rel flex left cursor ".concat(rootClassName), onClick: (_a = this.props) === null || _a === void 0 ? void 0 : _a.onClick }, { children: [jsxRuntime.jsx("input", { type: "checkbox", className: 'form__checkbox', disabled: this.props.disabled, value: this.props.value, onChange: this.props.onChange, tabIndex: this.props.tabIndex, checked: this.props.isChecked, id: this.props.id, "data-testid": this.props.dataTestId }), jsxRuntime.jsx("span", { className: "form__checkbox-container" }), jsxRuntime.jsx("span", __assign({ className: "form__checkbox-label" }, { children: this.props.children }))] })) }));
16417
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("label", __assign({ className: "dc__position-rel flex left cursor ".concat(rootClassName), onClick: (_a = this.props) === null || _a === void 0 ? void 0 : _a.onClick }, { children: [jsxRuntime.jsx("input", { type: "checkbox", className: 'form__checkbox', disabled: this.props.disabled, value: this.props.value, onChange: this.props.onChange, tabIndex: this.props.tabIndex, checked: this.props.isChecked, id: this.props.id, "data-testid": this.props.dataTestId }), jsxRuntime.jsx("span", { className: "form__checkbox-container", "data-testid": "".concat(this.props.dataTestId, "-chk-span") }), jsxRuntime.jsx("span", __assign({ className: "form__checkbox-label" }, { children: this.props.children }))] })) }));
16419
16418
  };
16420
16419
  return Checkbox;
16421
16420
  }(React.Component));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.7-beta-33",
3
+ "version": "0.0.7-beta-35",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -27,7 +27,7 @@ export class Checkbox extends Component<CheckboxProps> {
27
27
  id={this.props.id}
28
28
  data-testid={this.props.dataTestId}
29
29
  />
30
- <span className="form__checkbox-container"></span>
30
+ <span className="form__checkbox-container" data-testid={`${this.props.dataTestId}-chk-span`}></span>
31
31
  <span className={`form__checkbox-label`}>{this.props.children}</span>
32
32
  </label>
33
33
  </>
@@ -1,13 +1,13 @@
1
1
  import React from 'react'
2
2
  import notFound from '../Assets/Img/ic-empty-error@2x.png'
3
- import { useHistory } from 'react-router'
3
+ import { useHistory } from 'react-router-dom'
4
4
  import { ERROR_EMPTY_SCREEN } from './Constants'
5
5
  import GenericEmptyState from './EmptyState/GenericEmptyState'
6
6
 
7
7
  function ErrorScreenNotFound() {
8
- const history = useHistory()
8
+ const {push} = useHistory()
9
9
  const redirectToHome = () => {
10
- history.push('app/list')
10
+ push('/app/list')
11
11
  }
12
12
  const renderGenerateButton = () => {
13
13
  return (