@qiwi/pijma-desktop-extra 0.2.0 → 0.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qiwi/pijma-desktop-extra",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./target/es5/index.js",
|
|
6
6
|
"module": "./target/es6/index.js",
|
|
@@ -35,14 +35,11 @@
|
|
|
35
35
|
"@qiwi/common-formatters": "^1.2.1",
|
|
36
36
|
"@qiwi/pijma-core": "1.158.0",
|
|
37
37
|
"@qiwi/pijma-desktop": "1.157.0",
|
|
38
|
-
"@types/lodash-es": "^4.17.6",
|
|
39
38
|
"@types/react-js-pagination": "^3.0.4",
|
|
40
39
|
"@types/react-table": "^7.7.12",
|
|
41
40
|
"date-fns": "^2.29.2",
|
|
42
|
-
"lodash-es": "^4.17.21",
|
|
43
41
|
"react-day-picker": "^8.2.0",
|
|
44
42
|
"react-dropzone": "^14.2.2",
|
|
45
|
-
"react-i18next": "^11.18.5",
|
|
46
43
|
"react-table": "^7.8.0"
|
|
47
44
|
},
|
|
48
45
|
"devDependencies": {
|
|
@@ -59,6 +56,7 @@
|
|
|
59
56
|
"jest-environment-jsdom": "^29.0.2",
|
|
60
57
|
"prettier": "2.7.1",
|
|
61
58
|
"prettier-config-qiwi": "1.7.2",
|
|
59
|
+
"react-i18next": "^11.18.5",
|
|
62
60
|
"react-router": "^6.3.0",
|
|
63
61
|
"react-router-dom": "^6.3.0",
|
|
64
62
|
"react-test-renderer": "^18.2.0",
|
|
@@ -67,6 +65,9 @@
|
|
|
67
65
|
"typescript": "4.8.2",
|
|
68
66
|
"webpack": "5.74.0"
|
|
69
67
|
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"react-i18next": "^11.18.5"
|
|
70
|
+
},
|
|
70
71
|
"repository": {
|
|
71
72
|
"type": "git",
|
|
72
73
|
"url": "git+https://github.com/qiwi/pijma.git"
|
|
@@ -16,7 +16,6 @@ var _taggedTemplateLiteralLoose = require("@swc/helpers/lib/_tagged_template_lit
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
var _pijmaCore = require("@qiwi/pijma-core");
|
|
18
18
|
var _pijmaDesktop = require("@qiwi/pijma-desktop");
|
|
19
|
-
var _lodashEs = require("lodash-es");
|
|
20
19
|
var _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
21
20
|
var _dropdown = require("../dropdown/index.js");
|
|
22
21
|
function _templateObject() {
|
|
@@ -37,6 +36,13 @@ function _templateObject1() {
|
|
|
37
36
|
};
|
|
38
37
|
return data;
|
|
39
38
|
}
|
|
39
|
+
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isempty
|
|
40
|
+
var isEmpty = function(obj) {
|
|
41
|
+
return [
|
|
42
|
+
Object,
|
|
43
|
+
Array
|
|
44
|
+
].includes((obj || {}).constructor) && !Object.entries(obj || {}).length;
|
|
45
|
+
};
|
|
40
46
|
var Container = (0, _pijmaCore.styled)("div")(_templateObject());
|
|
41
47
|
var IconWrapper = (0, _pijmaCore.styled)("div")(_templateObject1());
|
|
42
48
|
var Select = /*#__PURE__*/ function(Component) {
|
|
@@ -131,7 +137,7 @@ var Select = /*#__PURE__*/ function(Component) {
|
|
|
131
137
|
/* noop */ },
|
|
132
138
|
onBlur: multiSelect ? function() {
|
|
133
139
|
/* noop */ } : this.onBlur,
|
|
134
|
-
value: !
|
|
140
|
+
value: !isEmpty(multiValue) ? [].concat(multiValue).join(", ") : emptyValue || "",
|
|
135
141
|
hint: /*#__PURE__*/ (0, _jsxRuntime.jsx)(IconWrapper, {
|
|
136
142
|
onClick: this.focusOnInput,
|
|
137
143
|
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_pijmaCore.Icon, {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Icon, styled } from '@qiwi/pijma-core';
|
|
3
3
|
import { TextField } from '@qiwi/pijma-desktop';
|
|
4
|
-
import { isEmpty } from 'lodash-es';
|
|
5
4
|
import React, { Component } from 'react';
|
|
6
5
|
import { Dropdown } from '../dropdown/index.js';
|
|
6
|
+
// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isempty
|
|
7
|
+
const isEmpty = (obj)=>[
|
|
8
|
+
Object,
|
|
9
|
+
Array
|
|
10
|
+
].includes((obj || {}).constructor) && !Object.entries(obj || {}).length;
|
|
7
11
|
const Container = styled('div')`
|
|
8
12
|
position: relative;
|
|
9
13
|
outline: none;
|