redux-paginator-immutable 17.1.3 → 17.1.4

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/LoadingButton.js CHANGED
@@ -34,8 +34,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
34
34
  /* eslint-disable class-methods-use-this */
35
35
  /* eslint-disable react/sort-comp */
36
36
  var react_1 = __importDefault(require("react"));
37
- var Messages_1 = require("x25/Messages");
38
37
  var react_intersection_observer_1 = require("react-intersection-observer");
38
+ var Messages_1 = require("x25/Messages");
39
39
  var utility_1 = require("x25/utility");
40
40
  var ErrorBoundary = /** @class */ (function (_super) {
41
41
  __extends(ErrorBoundary, _super);
@@ -53,15 +53,16 @@ var ErrorBoundary = /** @class */ (function (_super) {
53
53
  return ErrorBoundary;
54
54
  }(react_1.default.Component));
55
55
  var LoadingButton = function (props) {
56
- var isFetching = props.isFetching, hasProblems = props.hasProblems, fetchMore = props.fetchMore, _a = (0, react_intersection_observer_1.useInView)({}), ref = _a[0], inView = _a[1];
56
+ var isFetching = props.isFetching, hasProblems = props.hasProblems, fetchMore = props.fetchMore, _a = (0, react_intersection_observer_1.useInView)({}), ref = _a[0], inView = _a[1], _b = react_1.default.useState(false), fetchMoreCalled = _b[0], setFetchMoreCalled = _b[1];
57
57
  react_1.default.useEffect(function () {
58
- if (!isFetching && !hasProblems && inView) {
58
+ if (!isFetching && !hasProblems && inView && !fetchMoreCalled) {
59
59
  fetchMore();
60
+ setFetchMoreCalled(true);
60
61
  }
61
- }, [isFetching, hasProblems, inView]);
62
+ }, [isFetching, hasProblems, inView, fetchMoreCalled, fetchMore]);
62
63
  return (react_1.default.createElement("div", { className: "text-center my-2" },
63
- hasProblems ? react_1.default.createElement(Messages_1.ErrorMessage, { message: utility_1.words.ThereWasAProblem }) : null,
64
- isFetching ? react_1.default.createElement(Messages_1.LoadingMessage, { message: utility_1.words.LoadingData, sm: true }) : (react_1.default.createElement("button", { className: "btn btn-link d-print-none", disabled: isFetching, onClick: fetchMore, ref: ref, type: "button" }, isFetching ? utility_1.words.LoadingData : utility_1.words.LoadMore))));
64
+ hasProblems ? (react_1.default.createElement(Messages_1.ErrorMessage, { message: utility_1.words.ThereWasAProblem })) : null,
65
+ isFetching ? (react_1.default.createElement(Messages_1.LoadingMessage, { message: utility_1.words.LoadingData, sm: true })) : (react_1.default.createElement("button", { className: "btn btn-link d-print-none", disabled: isFetching, onClick: fetchMore, ref: ref, type: "button" }, isFetching ? utility_1.words.LoadingData : utility_1.words.LoadMore))));
65
66
  }, Loading = function (props) { return (react_1.default.createElement(ErrorBoundary, null,
66
67
  react_1.default.createElement(LoadingButton, __assign({}, props)))); };
67
68
  exports.default = Loading;
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingButton.js","sourceRoot":"","sources":["../src/LoadingButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAyD;AACzD,2CAA2C;AAC3C,2CAA2C;AAC3C,oCAAoC;AACpC,gDAA0B;AAC1B,yCAA4D;AAC5D,2EAAwD;AAOxD,uCAAoC;AAEpC;IAA4B,iCAAe;IACzC,uBAAa,KAAW;eACtB,kBAAM,KAAK,CAAC;IACd,CAAC;IAED,yCAAiB,GAAjB;IACA,CAAC;IAEM,sCAAwB,GAA/B;QACE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,8BAAM,GAAN;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;IACH,oBAAC;AAAD,CAAC,AAfD,CAA4B,eAAK,CAAC,SAAS,GAe1C;AAED,IACE,aAAa,GAAG,UAAC,KAA8B;IAEzC,IAAA,UAAU,GAA6B,KAAK,WAAlC,EAAE,WAAW,GAAgB,KAAK,YAArB,EAAE,SAAS,GAAK,KAAK,UAAV,EACpC,KAAgB,IAAA,uCAAS,EAAC,EAAG,CAAC,EAA7B,GAAG,QAAA,EAAE,MAAM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AC,QAAQ,IACZ,UAAU,CAAC,CAAC,CAAC,eAAK,CAAC,WAAW,CAAC,CAAC,CAAC,eAAK,CAAC,QAAQ,CACzC,CACV,CACG,CACP,CAAC;AACJ,CAAC,EACD,OAAO,GAAG,UAAC,KAA8B,IAAK,OAAA,CAC5C,8BAAC,aAAa;IACZ,8BAAC,aAAa,eAAK,KAAK,EAAI,CACd,CACjB,EAJ6C,CAI7C,CAAC;AAEJ,kBAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,127 +1,127 @@
1
- {
2
- "name": "redux-paginator-immutable",
3
- "version": "17.1.3",
4
- "description": "redux-paginator-immutable",
5
- "types": "./dist/index.d.ts",
6
- "main": "./dist/index.js",
7
- "scripts": {
8
- "load": "npm run intern-pre && cd dist && npm run ts && npm run intern-copy && npm publish",
9
- "load-beta": "npm run intern-pre && cd dist && npm run ts && npm run intern-copy && npm publish --tag beta",
10
- "eslint": "eslint --ext .tsx,.ts src --fix",
11
- "intern-pre": "npm run eslint && npm run intern-clean && npm run intern-build",
12
- "intern-build-scss": "node-sass --output-style compressed src -o dist",
13
- "intern-copy": " copy package.json dist",
14
- "intern-build": "npm run intern-build-scss",
15
- "intern-clean": "rimraf dist dist",
16
- "intern-test": "jest",
17
- "check": "node script/check & npm run depcheck & npm run check:npm-check",
18
- "check:npm-check": "npm-check -u -i \"{babel-jest,jest}\" --specials=bin,eslint,babel,webpack",
19
- "depcheck": "depcheck --ignores=@types/jest,@docusaurus/react-loadable,webpack-cli,@hot-loader/react-dom --ignore-patterns=server,node_modules,tmp,fonts",
20
- "check:global": "npm-check -gu",
21
- "ts:check": "tsc --noEmit",
22
- "ts": "tsc --declaration"
23
- },
24
- "repository": {
25
- "type": "git",
26
- "url": "git+https://github.com/cristian-sima/redux-paginator-immutable.git"
27
- },
28
- "keywords": [],
29
- "author": "SC SIDEWORK SRL",
30
- "license": "MIT",
31
- "bugs": {
32
- "url": "https://github.com/cristian-sima/redux-paginator-immutable/issues"
33
- },
34
- "homepage": "https://github.com/cristian-sima/redux-paginator-immutable#readme",
35
- "babel": {
36
- "presets": [
37
- "@babel/env",
38
- "@babel/preset-typescript",
39
- "@babel/preset-react"
40
- ],
41
- "env": {
42
- "production": {
43
- "plugins": [
44
- "@babel/plugin-syntax-dynamic-import",
45
- "@babel/plugin-proposal-class-properties",
46
- "@babel/plugin-proposal-export-default-from",
47
- "@babel/plugin-transform-modules-commonjs",
48
- "@babel/plugin-transform-react-constant-elements",
49
- "@babel/plugin-transform-react-inline-elements",
50
- "@babel/plugin-transform-typescript",
51
- "transform-react-remove-prop-types"
52
- ]
53
- },
54
- "development": {
55
- "plugins": [
56
- "@babel/plugin-syntax-dynamic-import",
57
- "@babel/plugin-proposal-class-properties",
58
- "@babel/plugin-proposal-export-default-from",
59
- "@babel/plugin-transform-modules-commonjs"
60
- ]
61
- }
62
- }
63
- },
64
- "engines": {
65
- "node": "^17.0.0"
66
- },
67
- "jest": {
68
- "transform": {
69
- "^.+\\.tsx?$": "babel-jest"
70
- },
71
- "testRegex": "src/.*-test.ts$",
72
- "modulePaths": [
73
- "src"
74
- ]
75
- },
76
- "devDependencies": {
77
- "@babel/plugin-proposal-class-properties": "^7.18.6",
78
- "@babel/plugin-proposal-export-default-from": "^7.18.10",
79
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
80
- "@babel/plugin-transform-modules-commonjs": "^7.19.6",
81
- "@babel/plugin-transform-react-constant-elements": "^7.18.12",
82
- "@babel/plugin-transform-react-inline-elements": "^7.18.6",
83
- "@babel/plugin-transform-typescript": "^7.20.0",
84
- "@babel/preset-env": "^7.19.4",
85
- "@babel/preset-react": "^7.18.6",
86
- "@babel/preset-typescript": "^7.18.6",
87
- "@types/jest": "^29.2.0",
88
- "@types/superagent": "^4.1.15",
89
- "@typescript-eslint/eslint-plugin": "^5.41.0",
90
- "@typescript-eslint/parser": "^5.41.0",
91
- "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
92
- "copy": "^0.3.2",
93
- "css-loader": "^6.7.1",
94
- "depcheck": "^1.4.3",
95
- "eslint": "^8.26.0",
96
- "eslint-plugin-import": "^2.27.5",
97
- "eslint-plugin-react": "^7.31.10",
98
- "jest-cli": "^29.2.2",
99
- "jest-immutable-matchers": "^3.0.0",
100
- "npm-check": "^6.0.1",
101
- "style-loader": "^3.3.1",
102
- "ts-loader": "^9.4.1",
103
- "webpack": "^5.74.0"
104
- },
105
- "dependencies": {
106
- "@docusaurus/react-loadable": "^5.5.2",
107
- "@reduxjs/toolkit": "^1.8.6",
108
- "classnames": "^2.3.2",
109
- "eslint-import-resolver-typescript": "^3.5.3",
110
- "immutable": "^4.2.2",
111
- "jest": "^27.5.1",
112
- "moment": "^2.29.4",
113
- "node-sass": "^7.0.3",
114
- "query-string": "^8.1.0",
115
- "react": "^17.0.2",
116
- "react-final-form": "^6.5.9",
117
- "react-intersection-observer": "^9.4.1",
118
- "react-notification-system-redux2": "^3.0.4",
119
- "react-redux": "^8.0.4",
120
- "react-simple-tooltip": "^2.6.3",
121
- "redux": "^4.2.0",
122
- "reselect": "^4.1.6",
123
- "superagent": "^8.0.3",
124
- "typescript": "^4.8.4",
125
- "x25": "^17.3.17"
126
- }
1
+ {
2
+ "name": "redux-paginator-immutable",
3
+ "version": "17.1.4",
4
+ "description": "redux-paginator-immutable",
5
+ "types": "./dist/index.d.ts",
6
+ "main": "./dist/index.js",
7
+ "scripts": {
8
+ "load": "npm run intern-pre && cd dist && npm run ts && npm run intern-copy && npm publish",
9
+ "load-beta": "npm run intern-pre && cd dist && npm run ts && npm run intern-copy && npm publish --tag beta",
10
+ "eslint": "eslint --ext .tsx,.ts src --fix",
11
+ "intern-pre": "npm run eslint && npm run intern-clean && npm run intern-build",
12
+ "intern-build-scss": "node-sass --output-style compressed src -o dist",
13
+ "intern-copy": " copy package.json dist",
14
+ "intern-build": "npm run intern-build-scss",
15
+ "intern-clean": "rimraf dist dist",
16
+ "intern-test": "jest",
17
+ "check": "node script/check & npm run depcheck & npm run check:npm-check",
18
+ "check:npm-check": "npm-check -u -i \"{babel-jest,jest}\" --specials=bin,eslint,babel,webpack",
19
+ "depcheck": "depcheck --ignores=@types/jest,@docusaurus/react-loadable,webpack-cli,@hot-loader/react-dom --ignore-patterns=server,node_modules,tmp,fonts",
20
+ "check:global": "npm-check -gu",
21
+ "ts:check": "tsc --noEmit",
22
+ "ts": "tsc --declaration"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/cristian-sima/redux-paginator-immutable.git"
27
+ },
28
+ "keywords": [],
29
+ "author": "SC SIDEWORK SRL",
30
+ "license": "MIT",
31
+ "bugs": {
32
+ "url": "https://github.com/cristian-sima/redux-paginator-immutable/issues"
33
+ },
34
+ "homepage": "https://github.com/cristian-sima/redux-paginator-immutable#readme",
35
+ "babel": {
36
+ "presets": [
37
+ "@babel/env",
38
+ "@babel/preset-typescript",
39
+ "@babel/preset-react"
40
+ ],
41
+ "env": {
42
+ "production": {
43
+ "plugins": [
44
+ "@babel/plugin-syntax-dynamic-import",
45
+ "@babel/plugin-proposal-class-properties",
46
+ "@babel/plugin-proposal-export-default-from",
47
+ "@babel/plugin-transform-modules-commonjs",
48
+ "@babel/plugin-transform-react-constant-elements",
49
+ "@babel/plugin-transform-react-inline-elements",
50
+ "@babel/plugin-transform-typescript",
51
+ "transform-react-remove-prop-types"
52
+ ]
53
+ },
54
+ "development": {
55
+ "plugins": [
56
+ "@babel/plugin-syntax-dynamic-import",
57
+ "@babel/plugin-proposal-class-properties",
58
+ "@babel/plugin-proposal-export-default-from",
59
+ "@babel/plugin-transform-modules-commonjs"
60
+ ]
61
+ }
62
+ }
63
+ },
64
+ "engines": {
65
+ "node": "^17.0.0"
66
+ },
67
+ "jest": {
68
+ "transform": {
69
+ "^.+\\.tsx?$": "babel-jest"
70
+ },
71
+ "testRegex": "src/.*-test.ts$",
72
+ "modulePaths": [
73
+ "src"
74
+ ]
75
+ },
76
+ "devDependencies": {
77
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
78
+ "@babel/plugin-proposal-export-default-from": "^7.18.10",
79
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
80
+ "@babel/plugin-transform-modules-commonjs": "^7.19.6",
81
+ "@babel/plugin-transform-react-constant-elements": "^7.18.12",
82
+ "@babel/plugin-transform-react-inline-elements": "^7.18.6",
83
+ "@babel/plugin-transform-typescript": "^7.20.0",
84
+ "@babel/preset-env": "^7.19.4",
85
+ "@babel/preset-react": "^7.18.6",
86
+ "@babel/preset-typescript": "^7.18.6",
87
+ "@types/jest": "^29.2.0",
88
+ "@types/superagent": "^4.1.15",
89
+ "@typescript-eslint/eslint-plugin": "^5.41.0",
90
+ "@typescript-eslint/parser": "^5.41.0",
91
+ "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
92
+ "copy": "^0.3.2",
93
+ "css-loader": "^6.7.1",
94
+ "depcheck": "^1.4.3",
95
+ "eslint": "^8.26.0",
96
+ "eslint-plugin-import": "^2.27.5",
97
+ "eslint-plugin-react": "^7.31.10",
98
+ "jest-cli": "^29.2.2",
99
+ "jest-immutable-matchers": "^3.0.0",
100
+ "npm-check": "^6.0.1",
101
+ "style-loader": "^3.3.1",
102
+ "ts-loader": "^9.4.1",
103
+ "webpack": "^5.74.0"
104
+ },
105
+ "dependencies": {
106
+ "@docusaurus/react-loadable": "^5.5.2",
107
+ "@reduxjs/toolkit": "^1.8.6",
108
+ "classnames": "^2.3.2",
109
+ "eslint-import-resolver-typescript": "^3.5.3",
110
+ "immutable": "^4.2.2",
111
+ "jest": "^27.5.1",
112
+ "moment": "^2.29.4",
113
+ "node-sass": "^7.0.3",
114
+ "query-string": "^8.1.0",
115
+ "react": "^17.0.2",
116
+ "react-final-form": "^6.5.9",
117
+ "react-intersection-observer": "^9.4.1",
118
+ "react-notification-system-redux2": "^3.0.4",
119
+ "react-redux": "^8.0.4",
120
+ "react-simple-tooltip": "^2.6.3",
121
+ "redux": "^4.2.0",
122
+ "reselect": "^4.1.6",
123
+ "superagent": "^8.0.3",
124
+ "typescript": "^4.8.4",
125
+ "x25": "^17.3.17"
126
+ }
127
127
  }