@unbxd-ui/unbxd-react-components 0.3.4-beta.1 → 0.3.4-beta.2
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/components/Table/TableUtils.js +11 -10
- package/package.json +3 -3
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.DefaultNoDataComponent = exports.DefaultLoading = exports.DefaultAPIErrorComponent = void 0;
|
|
8
8
|
var _react = require("motion/react");
|
|
9
|
+
var _react2 = _interopRequireDefault(require("react"));
|
|
9
10
|
var _ = require(".");
|
|
10
11
|
var _NoDataPlaceholder = _interopRequireDefault(require("../NoDataPlaceholder"));
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -27,9 +28,9 @@ var DefaultNoDataComponent = exports.DefaultNoDataComponent = function DefaultNo
|
|
|
27
28
|
heading = _props$heading === void 0 ? "No Data" : _props$heading,
|
|
28
29
|
_props$image = props.image,
|
|
29
30
|
image = _props$image === void 0 ? "" : _props$image;
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/_react2["default"].createElement("div", {
|
|
31
32
|
className: "table-no-data-placeholder-wrapper"
|
|
32
|
-
}, /*#__PURE__*/
|
|
33
|
+
}, /*#__PURE__*/_react2["default"].createElement(_NoDataPlaceholder["default"], {
|
|
33
34
|
title: heading,
|
|
34
35
|
description: description,
|
|
35
36
|
image: image
|
|
@@ -40,9 +41,9 @@ var DefaultAPIErrorComponent = exports.DefaultAPIErrorComponent = function Defau
|
|
|
40
41
|
status = _props$status === void 0 ? "Error" : _props$status,
|
|
41
42
|
_props$image2 = props.image,
|
|
42
43
|
image = _props$image2 === void 0 ? "" : _props$image2;
|
|
43
|
-
return /*#__PURE__*/
|
|
44
|
+
return /*#__PURE__*/_react2["default"].createElement("div", {
|
|
44
45
|
className: "table-no-data-placeholder-wrapper"
|
|
45
|
-
}, /*#__PURE__*/
|
|
46
|
+
}, /*#__PURE__*/_react2["default"].createElement(_NoDataPlaceholder["default"], {
|
|
46
47
|
title: status,
|
|
47
48
|
description: "An error occurred while processing the request",
|
|
48
49
|
image: image
|
|
@@ -62,9 +63,9 @@ var DefaultLoading = exports.DefaultLoading = function DefaultLoading(props) {
|
|
|
62
63
|
}
|
|
63
64
|
var newColumns = columnCopy.map(function (col, i) {
|
|
64
65
|
var cell = function cell(row) {
|
|
65
|
-
return /*#__PURE__*/
|
|
66
|
+
return /*#__PURE__*/_react2["default"].createElement("div", {
|
|
66
67
|
className: "loading-anim-wrap"
|
|
67
|
-
}, /*#__PURE__*/
|
|
68
|
+
}, /*#__PURE__*/_react2["default"].createElement(TableLoadingCell, {
|
|
68
69
|
key: row.id,
|
|
69
70
|
lineCount: col.lineCount
|
|
70
71
|
}));
|
|
@@ -89,7 +90,7 @@ var DefaultLoading = exports.DefaultLoading = function DefaultLoading(props) {
|
|
|
89
90
|
});
|
|
90
91
|
});
|
|
91
92
|
var data = new Array(15).fill({});
|
|
92
|
-
return /*#__PURE__*/
|
|
93
|
+
return /*#__PURE__*/_react2["default"].createElement(_react.AnimatePresence, null, /*#__PURE__*/_react2["default"].createElement(_react.motion.div, {
|
|
93
94
|
className: "table-loader",
|
|
94
95
|
initial: {
|
|
95
96
|
opacity: 0,
|
|
@@ -107,7 +108,7 @@ var DefaultLoading = exports.DefaultLoading = function DefaultLoading(props) {
|
|
|
107
108
|
duration: 0.3,
|
|
108
109
|
ease: "easeInOut"
|
|
109
110
|
}
|
|
110
|
-
}, /*#__PURE__*/
|
|
111
|
+
}, /*#__PURE__*/_react2["default"].createElement(_.Table, {
|
|
111
112
|
columnConfigs: newColumns,
|
|
112
113
|
pagination: false,
|
|
113
114
|
records: data,
|
|
@@ -120,13 +121,13 @@ var TableLoadingCell = function TableLoadingCell(_ref) {
|
|
|
120
121
|
lineCount = _ref$lineCount === void 0 ? 1 : _ref$lineCount;
|
|
121
122
|
return _toConsumableArray(Array(lineCount)).map(function (n, i) {
|
|
122
123
|
var width = Math.random() * (100 - 25) + 25 + '%';
|
|
123
|
-
return /*#__PURE__*/
|
|
124
|
+
return /*#__PURE__*/_react2["default"].createElement("div", {
|
|
124
125
|
className: "loading-default-text",
|
|
125
126
|
style: {
|
|
126
127
|
'width': width
|
|
127
128
|
},
|
|
128
129
|
key: i
|
|
129
|
-
}, /*#__PURE__*/
|
|
130
|
+
}, /*#__PURE__*/_react2["default"].createElement("div", {
|
|
130
131
|
className: "loading-default-background"
|
|
131
132
|
}));
|
|
132
133
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbxd-ui/unbxd-react-components",
|
|
3
|
-
"version": "0.3.4-beta.
|
|
3
|
+
"version": "0.3.4-beta.2",
|
|
4
4
|
"description": "React components library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react components",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"copypackage": "cp -rf package.json README.md lib",
|
|
35
35
|
"copyscss": "cp -rf src/components/core.scss src/components/theme.scss lib/components",
|
|
36
36
|
"link": "npm run build-css && npm run publish-css && npm run build && npm run copypackage && npm run copyscss && cd lib && npm link",
|
|
37
|
-
"publish-prod": "npm run publish-css && npm run build && npm run copypackage && npm run copyscss && cd lib && npm publish
|
|
38
|
-
"publish-beta": "npm run publish-css && npm run build && npm run copypackage && npm run copyscss && cd lib && npm publish --tag beta
|
|
37
|
+
"publish-prod": "npm run publish-css && npm run build && npm run copypackage && npm run copyscss && cd lib && npm publish",
|
|
38
|
+
"publish-beta": "npm run publish-css && npm run build && npm run copypackage && npm run copyscss && cd lib && npm publish --tag beta",
|
|
39
39
|
"storybook": "storybook dev -p 6007",
|
|
40
40
|
"build-storybook": "storybook build -o docs",
|
|
41
41
|
"deploy-storybook": "gh-pages -d storybook-static"
|