@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
|
|
1968
|
+
var push = reactRouterDom.useHistory().push;
|
|
1970
1969
|
var redirectToHome = function () {
|
|
1971
|
-
|
|
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
package/src/Common/Checkbox.tsx
CHANGED
|
@@ -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
|
|
8
|
+
const {push} = useHistory()
|
|
9
9
|
const redirectToHome = () => {
|
|
10
|
-
|
|
10
|
+
push('/app/list')
|
|
11
11
|
}
|
|
12
12
|
const renderGenerateButton = () => {
|
|
13
13
|
return (
|