redux-paginator-immutable 17.0.4 → 17.0.5
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/lib/Info.js +7 -3
- package/package.json +1 -1
- package/src/Info.jsx +4 -2
package/lib/Info.js
CHANGED
|
@@ -10,6 +10,10 @@ var _react2 = _interopRequireDefault(_react);
|
|
|
10
10
|
|
|
11
11
|
var _utility = require("x25/utility");
|
|
12
12
|
|
|
13
|
+
var _words = require("./words");
|
|
14
|
+
|
|
15
|
+
var _words2 = _interopRequireDefault(_words);
|
|
16
|
+
|
|
13
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
18
|
|
|
15
19
|
var getNumberForm = function getNumberForm(value, one, all) {
|
|
@@ -17,7 +21,7 @@ var getNumberForm = function getNumberForm(value, one, all) {
|
|
|
17
21
|
return "1 " + one;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
|
-
return
|
|
24
|
+
return _words2.default.getNumberTense(value) + " " + all;
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
var Info = function Info(_ref) {
|
|
@@ -28,8 +32,8 @@ var Info = function Info(_ref) {
|
|
|
28
32
|
return _react2.default.createElement(
|
|
29
33
|
"div",
|
|
30
34
|
{ className: "text-muted" },
|
|
31
|
-
|
|
32
|
-
shown === total ? _utility.words.All + " - " : shown + " " +
|
|
35
|
+
_words2.default.Showing + " ",
|
|
36
|
+
shown === total ? _utility.words.All + " - " : shown + " " + _words2.default.Of,
|
|
33
37
|
" " + getNumberForm(total, one, all)
|
|
34
38
|
);
|
|
35
39
|
};
|
package/package.json
CHANGED
package/src/Info.jsx
CHANGED
|
@@ -9,7 +9,9 @@ type InfoPropTypes = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
import React from "react";
|
|
12
|
-
import { words } from "x25/utility";
|
|
12
|
+
import { words as x25Words } from "x25/utility";
|
|
13
|
+
|
|
14
|
+
import words from "./words";
|
|
13
15
|
|
|
14
16
|
const getNumberForm = (value : number, one : string, all : string) : string => {
|
|
15
17
|
if (value === 1) {
|
|
@@ -23,7 +25,7 @@ const Info = ({ shown, total, one, all } : InfoPropTypes) => (
|
|
|
23
25
|
<div className="text-muted">
|
|
24
26
|
{`${words.Showing} `}
|
|
25
27
|
{
|
|
26
|
-
(shown === total) ? `${
|
|
28
|
+
(shown === total) ? `${x25Words.All} - ` : `${shown} ${words.Of}`
|
|
27
29
|
}
|
|
28
30
|
{` ${getNumberForm(total, one, all)}`}
|
|
29
31
|
</div>
|