@qiwi/pijma-desktop-extra 0.2.12 → 0.2.13
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/package.json +22 -22
- package/target/es5/amount/index.js +7 -7
- package/target/es5/checkbox/index.js +15 -15
- package/target/es5/chip/index.js +14 -14
- package/target/es5/date-picker/index.js +31 -31
- package/target/es5/date-picker/locale.js +5 -5
- package/target/es5/date-picker/wrap.js +4 -4
- package/target/es5/date-range-picker/index.js +46 -44
- package/target/es5/divider/index.js +9 -9
- package/target/es5/dropdown/Container.js +23 -23
- package/target/es5/dropdown/index.js +18 -18
- package/target/es5/empty-page/index.js +19 -19
- package/target/es5/error-message/index.js +18 -18
- package/target/es5/file-uploader/FileUploaderStyles.js +6 -6
- package/target/es5/file-uploader/index.js +26 -26
- package/target/es5/footer/index.js +23 -23
- package/target/es5/header/index.js +28 -28
- package/target/es5/icon/index.js +13 -13
- package/target/es5/index.js +30 -30
- package/target/es5/logo/index.js +23 -23
- package/target/es5/menu/index.js +24 -24
- package/target/es5/navigation-menu/index.js +13 -13
- package/target/es5/obfuscatedPan/index.js +5 -5
- package/target/es5/offset/index.js +4 -4
- package/target/es5/paginator/index.js +9 -9
- package/target/es5/product/index.js +30 -30
- package/target/es5/select/index.js +23 -23
- package/target/es5/spinner/index.js +5 -5
- package/target/es5/spreader/index.js +4 -4
- package/target/es5/step/StepStyle.js +4 -4
- package/target/es5/step/index.js +14 -14
- package/target/es5/stepper/StepperControl.js +4 -4
- package/target/es5/stepper/index.js +14 -14
- package/target/es5/table/column.js +3 -3
- package/target/es5/table/constants.js +2 -2
- package/target/es5/table/index.js +24 -24
- package/target/es5/theme/index.js +4 -4
- package/target/es5/trinary-check-icon/index.js +9 -9
- package/target/es5/user-profile/index.js +19 -19
- package/target/es6/date-range-picker/index.js +6 -4
- package/target/es6/file-uploader/FileUploaderControl.js +1 -1
- package/target/es6/header/index.js +1 -1
- package/target/es6/select/index.js +1 -1
- package/target/es6/stepper/index.js +1 -1
|
@@ -16,18 +16,18 @@ _export(exports, {
|
|
|
16
16
|
return _column.columnFactory;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
var _extends = require("@swc/helpers/
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var _react = /*#__PURE__*/
|
|
26
|
-
var
|
|
19
|
+
var _extends = require("@swc/helpers/_/_extends");
|
|
20
|
+
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
21
|
+
var _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
|
22
|
+
var _type_of = require("@swc/helpers/_/_type_of");
|
|
23
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
var _pijmacore = require("@qiwi/pijma-core");
|
|
25
|
+
var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
|
26
|
+
var _reacttable = require("react-table");
|
|
27
27
|
var _constants = require("./constants.js");
|
|
28
28
|
var _column = require("./column.js");
|
|
29
29
|
function _templateObject() {
|
|
30
|
-
var data =
|
|
30
|
+
var data = _tagged_template_literal_loose._([
|
|
31
31
|
"\n background-color: ",
|
|
32
32
|
";\n ",
|
|
33
33
|
";\n"
|
|
@@ -38,7 +38,7 @@ function _templateObject() {
|
|
|
38
38
|
return data;
|
|
39
39
|
}
|
|
40
40
|
function _templateObject1() {
|
|
41
|
-
var data =
|
|
41
|
+
var data = _tagged_template_literal_loose._([
|
|
42
42
|
"\n width: 100%;\n table {\n width: 100%;\n border-spacing: 0;\n font-family: 'Museo Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-size: 10pt;\n text-overflow: ellipsis;\n\n overflow: hidden;\n overflow-wrap: break-word;\n thead {\n tr th {\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n font-size: 10pt;\n font-weight: 150;\n color: rgb(102, 102, 102);\n text-align: start;\n user-select: none;\n :first-child {\n padding-left: 44px;\n }\n :last-child {\n padding-right: 44px;\n }\n }\n font-weight: 300;\n border-bottom: 1px solid ",
|
|
43
43
|
";\n }\n\n tbody {\n tr {\n :hover {\n background-color: ",
|
|
44
44
|
";\n cursor: pointer;\n }\n :last-child {\n td {\n border-bottom: 0;\n }\n }\n td {\n :first-child {\n padding-left: 44px;\n }\n :last-child {\n padding-right: 44px;\n }\n }\n }\n }\n\n th,\n td {\n margin: 0;\n padding: 0.25rem 12px;\n\n :last-child {\n border-right: 0;\n }\n }\n }\n"
|
|
@@ -48,32 +48,32 @@ function _templateObject1() {
|
|
|
48
48
|
};
|
|
49
49
|
return data;
|
|
50
50
|
}
|
|
51
|
-
var TrWrapper = (0,
|
|
51
|
+
var TrWrapper = (0, _pijmacore.styled)("tr")(_templateObject(), function(props) {
|
|
52
52
|
return props.active ? _constants.activeBackground : "none";
|
|
53
53
|
}, function(props) {
|
|
54
54
|
return props.cursor ? "cursor: " + props.cursor + ";" : "";
|
|
55
55
|
});
|
|
56
|
-
var TableWrapper =
|
|
56
|
+
var TableWrapper = _pijmacore.styled.div(_templateObject1(), _constants.borderColor, _constants.tableHoverColor);
|
|
57
57
|
var Table = function(param) {
|
|
58
58
|
var columns = param.columns, data = param.data, onSelect = param.onSelect, rowCursor = param.rowCursor, isActive = param.isActive;
|
|
59
59
|
// Use the state and functions returned from useTable to build your UI
|
|
60
|
-
var
|
|
60
|
+
var _useTable = (0, _reacttable.useTable)({
|
|
61
61
|
columns: columns,
|
|
62
62
|
data: data
|
|
63
|
-
}), getTableProps =
|
|
63
|
+
}), getTableProps = _useTable.getTableProps, getTableBodyProps = _useTable.getTableBodyProps, headerGroups = _useTable.headerGroups, rows = _useTable.rows, prepareRow = _useTable.prepareRow;
|
|
64
64
|
// Render the UI for your table
|
|
65
65
|
var headers = [];
|
|
66
66
|
var thead = headerGroups.map(function(headerGroup) {
|
|
67
67
|
return(// headerGroup.getHeaderGroupProps() returns a key
|
|
68
68
|
// eslint-disable-next-line react/jsx-key
|
|
69
|
-
/*#__PURE__*/ (0,
|
|
69
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("tr", _extends._({}, headerGroup.getHeaderGroupProps(), {
|
|
70
70
|
children: headerGroup.headers.map(function(column) {
|
|
71
71
|
var header = column.render("Header");
|
|
72
|
-
var typeofHeader = typeof header === "undefined" ? "undefined" :
|
|
72
|
+
var typeofHeader = typeof header === "undefined" ? "undefined" : _type_of._(header);
|
|
73
73
|
if (typeofHeader === "string" || typeofHeader === "object" && /*#__PURE__*/ _react.default.isValidElement(header) && header.props.children) {
|
|
74
74
|
headers.push(header);
|
|
75
75
|
// eslint-disable-next-line react/jsx-key
|
|
76
|
-
return /*#__PURE__*/ (0,
|
|
76
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("th", _extends._({}, column.getHeaderProps(), {
|
|
77
77
|
children: header
|
|
78
78
|
}));
|
|
79
79
|
}
|
|
@@ -81,24 +81,24 @@ var Table = function(param) {
|
|
|
81
81
|
})
|
|
82
82
|
})));
|
|
83
83
|
});
|
|
84
|
-
return /*#__PURE__*/ (0,
|
|
85
|
-
children: /*#__PURE__*/ (0,
|
|
84
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(TableWrapper, {
|
|
85
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("table", _extends._({}, getTableProps(), {
|
|
86
86
|
children: [
|
|
87
|
-
headerGroups && headerGroups.length > 0 ? /*#__PURE__*/ (0,
|
|
87
|
+
headerGroups && headerGroups.length > 0 ? /*#__PURE__*/ (0, _jsxruntime.jsx)("thead", {
|
|
88
88
|
children: headers.length > 0 ? thead : null
|
|
89
|
-
}) : /*#__PURE__*/ (0,
|
|
90
|
-
/*#__PURE__*/ (0,
|
|
89
|
+
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {}),
|
|
90
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("tbody", _extends._({}, getTableBodyProps(), {
|
|
91
91
|
children: rows.map(function(row) {
|
|
92
92
|
prepareRow(row);
|
|
93
93
|
return(// row.getRowProps() returns a key
|
|
94
94
|
// eslint-disable-next-line react/jsx-key
|
|
95
|
-
/*#__PURE__*/ (0,
|
|
95
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(TrWrapper, _extends._({
|
|
96
96
|
"data-cy": "table-row"
|
|
97
97
|
}, row.getRowProps(), {
|
|
98
98
|
active: isActive ? isActive(row.original) : false,
|
|
99
99
|
cursor: rowCursor,
|
|
100
100
|
children: row.cells.map(function(cell, i) {
|
|
101
|
-
return /*#__PURE__*/ (0,
|
|
101
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("td", _extends._({
|
|
102
102
|
onClick: function() {
|
|
103
103
|
return typeof onSelect === "function" && onSelect(row.original);
|
|
104
104
|
}
|
|
@@ -19,7 +19,7 @@ _export(exports, {
|
|
|
19
19
|
return _dimen;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
var
|
|
23
|
-
var _color = /*#__PURE__*/
|
|
24
|
-
var _text = /*#__PURE__*/
|
|
25
|
-
var _dimen = /*#__PURE__*/
|
|
22
|
+
var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
23
|
+
var _color = /*#__PURE__*/ _interop_require_wildcard._(require("./color.js"));
|
|
24
|
+
var _text = /*#__PURE__*/ _interop_require_wildcard._(require("./text.js"));
|
|
25
|
+
var _dimen = /*#__PURE__*/ _interop_require_wildcard._(require("./dimen.js"));
|
|
@@ -16,18 +16,18 @@ _export(exports, {
|
|
|
16
16
|
return _default;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var _react = /*#__PURE__*/
|
|
19
|
+
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
21
|
+
var _pijmacore = require("@qiwi/pijma-core");
|
|
22
|
+
var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
|
|
23
23
|
var TrinaryCheckIcon = function(param) {
|
|
24
24
|
var focused = param.focused, disabled = param.disabled, value = param.value;
|
|
25
|
-
return /*#__PURE__*/ (0,
|
|
25
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_pijmacore.Svg, {
|
|
26
26
|
viewBox: "0 0 24 24",
|
|
27
27
|
width: "24px",
|
|
28
28
|
height: "24px",
|
|
29
29
|
children: [
|
|
30
|
-
/*#__PURE__*/ (0,
|
|
30
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pijmacore.Rect, {
|
|
31
31
|
width: "18",
|
|
32
32
|
height: "18",
|
|
33
33
|
x: "3",
|
|
@@ -37,12 +37,12 @@ var TrinaryCheckIcon = function(param) {
|
|
|
37
37
|
fill: "#e6e6e6",
|
|
38
38
|
transition: "all 100ms cubic-bezier(0.4, 0.0, 0.2, 1)"
|
|
39
39
|
}),
|
|
40
|
-
/*#__PURE__*/ (0,
|
|
40
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pijmacore.Path, {
|
|
41
41
|
d: "M6 3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3zm1 2a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H7z",
|
|
42
42
|
fill: focused && !disabled ? "#ff8c00" : "transparent",
|
|
43
43
|
transition: "all 100ms cubic-bezier(0.4, 0.0, 0.2, 1)"
|
|
44
44
|
}),
|
|
45
|
-
/*#__PURE__*/ (0,
|
|
45
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pijmacore.Rect, {
|
|
46
46
|
width: "10",
|
|
47
47
|
height: "3",
|
|
48
48
|
x: "7",
|
|
@@ -52,7 +52,7 @@ var TrinaryCheckIcon = function(param) {
|
|
|
52
52
|
fill: value === 1 ? disabled ? "#ccc" : "#000" : "transparent",
|
|
53
53
|
transition: "all 100ms cubic-bezier(0.4, 0.0, 0.2, 1)"
|
|
54
54
|
}),
|
|
55
|
-
/*#__PURE__*/ (0,
|
|
55
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_pijmacore.Path, {
|
|
56
56
|
d: "M7.553 8.732a1.5 1.5 0 1 0-2.106 2.136l4.565 4.5a1.5 1.5 0 0 0 2.156-.051l9.957-10.8a1.5 1.5 0 1 0-2.206-2.034l-8.905 9.66-3.461-3.411z",
|
|
57
57
|
fill: value === 2 || value === true ? disabled ? "#ccc" : "#000" : "transparent",
|
|
58
58
|
transition: "all 100ms cubic-bezier(0.4, 0.0, 0.2, 1)"
|
|
@@ -8,14 +8,14 @@ Object.defineProperty(exports, "UserProfile", {
|
|
|
8
8
|
return UserProfile;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
var _inherits = require("@swc/helpers/
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var _react = /*#__PURE__*/
|
|
11
|
+
var _inherits = require("@swc/helpers/_/_inherits");
|
|
12
|
+
var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
13
|
+
var _tagged_template_literal_loose = require("@swc/helpers/_/_tagged_template_literal_loose");
|
|
14
|
+
var _jsxruntime = require("react/jsx-runtime");
|
|
15
|
+
var _pijmacore = require("@qiwi/pijma-core");
|
|
16
|
+
var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
17
17
|
function _templateObject() {
|
|
18
|
-
var data =
|
|
18
|
+
var data = _tagged_template_literal_loose._([
|
|
19
19
|
"\n width: 24px;\n height: 24px;\n float: left;\n margin-left: 20px;\n cursor: pointer;\n"
|
|
20
20
|
]);
|
|
21
21
|
_templateObject = function _templateObject() {
|
|
@@ -24,7 +24,7 @@ function _templateObject() {
|
|
|
24
24
|
return data;
|
|
25
25
|
}
|
|
26
26
|
function _templateObject1() {
|
|
27
|
-
var data =
|
|
27
|
+
var data = _tagged_template_literal_loose._([
|
|
28
28
|
""
|
|
29
29
|
]);
|
|
30
30
|
_templateObject1 = function _templateObject1() {
|
|
@@ -33,7 +33,7 @@ function _templateObject1() {
|
|
|
33
33
|
return data;
|
|
34
34
|
}
|
|
35
35
|
function _templateObject2() {
|
|
36
|
-
var data =
|
|
36
|
+
var data = _tagged_template_literal_loose._([
|
|
37
37
|
""
|
|
38
38
|
]);
|
|
39
39
|
_templateObject2 = function _templateObject2() {
|
|
@@ -41,27 +41,27 @@ function _templateObject2() {
|
|
|
41
41
|
};
|
|
42
42
|
return data;
|
|
43
43
|
}
|
|
44
|
-
var IconWrapper = (0,
|
|
45
|
-
var ProfileWrapper = (0,
|
|
46
|
-
var Username = (0,
|
|
44
|
+
var IconWrapper = (0, _pijmacore.styled)("div")(_templateObject());
|
|
45
|
+
var ProfileWrapper = (0, _pijmacore.styled)("div")(_templateObject1());
|
|
46
|
+
var Username = (0, _pijmacore.styled)("div")(_templateObject2());
|
|
47
47
|
var UserProfile = /*#__PURE__*/ function(Component) {
|
|
48
48
|
"use strict";
|
|
49
|
-
_inherits(UserProfile, Component);
|
|
49
|
+
_inherits._(UserProfile, Component);
|
|
50
50
|
function UserProfile() {
|
|
51
51
|
return Component.apply(this, arguments);
|
|
52
52
|
}
|
|
53
53
|
var _proto = UserProfile.prototype;
|
|
54
54
|
_proto.render = function render() {
|
|
55
|
-
var
|
|
56
|
-
return /*#__PURE__*/ (0,
|
|
57
|
-
children: /*#__PURE__*/ (0,
|
|
55
|
+
var _this_props = this.props, onClick = _this_props.onClick, userName = _this_props.userName;
|
|
56
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ProfileWrapper, {
|
|
57
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_pijmacore.Flex, {
|
|
58
58
|
children: [
|
|
59
|
-
/*#__PURE__*/ (0,
|
|
59
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(Username, {
|
|
60
60
|
children: userName
|
|
61
61
|
}),
|
|
62
|
-
/*#__PURE__*/ (0,
|
|
62
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(IconWrapper, {
|
|
63
63
|
onClick: onClick,
|
|
64
|
-
children: /*#__PURE__*/ (0,
|
|
64
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_pijmacore.Icon, {
|
|
65
65
|
name: "logout"
|
|
66
66
|
})
|
|
67
67
|
})
|
|
@@ -131,7 +131,7 @@ class DisabledInputDateRangePicker extends Component {
|
|
|
131
131
|
render() {
|
|
132
132
|
const { t , i18n } = this.props;
|
|
133
133
|
const { errorDate , helpText , showPicker } = this.state;
|
|
134
|
-
const { minDate , maxDate , dayPickerProps , title , numberOfMonths , dateTo , dateFrom , inputValue
|
|
134
|
+
const { minDate , maxDate , dayPickerProps , title , numberOfMonths , dateTo , dateFrom , inputValue } = this.props;
|
|
135
135
|
const modifiers = {
|
|
136
136
|
start: dateFrom,
|
|
137
137
|
end: dateTo
|
|
@@ -271,8 +271,10 @@ class DisabledInputDateRangePicker extends Component {
|
|
|
271
271
|
this._timeoutID = -1;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
(()=>{
|
|
275
|
+
DisabledInputDateRangePicker.defaultProps = {
|
|
276
|
+
numberOfMonths: 2
|
|
277
|
+
};
|
|
278
|
+
})();
|
|
277
279
|
const DateRangePicker = withTranslation()(DisabledInputDateRangePicker);
|
|
278
280
|
export { DateRangePicker };
|
|
@@ -26,7 +26,7 @@ const HeaderContent = styled('div')`
|
|
|
26
26
|
`;
|
|
27
27
|
export class Header extends Component {
|
|
28
28
|
render() {
|
|
29
|
-
const { isLoading , title , selectorData , navItems , userName , onItemChange , onLogout
|
|
29
|
+
const { isLoading , title , selectorData , navItems , userName , onItemChange , onLogout } = this.props;
|
|
30
30
|
const menuItems = navItems.map(({ name , path })=>{
|
|
31
31
|
const href = typeof path === 'string' ? path : path.value;
|
|
32
32
|
return {
|
|
@@ -58,7 +58,7 @@ export class Select extends Component {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
render() {
|
|
61
|
-
const { items , title , defaultItem , value , error , multiSelect , mapping , emptyValue , renderItem
|
|
61
|
+
const { items , title , defaultItem , value , error , multiSelect , mapping , emptyValue , renderItem } = this.props;
|
|
62
62
|
const currentItem = items.find((el)=>el.value === value) || {
|
|
63
63
|
name: '',
|
|
64
64
|
value: ''
|
|
@@ -4,7 +4,7 @@ import React, { Fragment } from 'react';
|
|
|
4
4
|
import { Divider } from '../divider/index.js';
|
|
5
5
|
import { Step } from '../step/index.js';
|
|
6
6
|
import StepperControl from './StepperControl.js';
|
|
7
|
-
const Stepper = ({ step =1 , steps , dividerWidth =25 , onChange
|
|
7
|
+
const Stepper = ({ step =1 , steps , dividerWidth =25 , onChange })=>{
|
|
8
8
|
if (!steps || steps <= 1) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|