@panneau/data 2.0.2 → 2.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/es/index.js CHANGED
@@ -11,8 +11,8 @@ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized
11
11
  import _inherits from '@babel/runtime/helpers/inherits';
12
12
  import _createSuper from '@babel/runtime/helpers/createSuper';
13
13
  import { getJSON, getCSRFHeaders, postJSON } from '@folklore/fetch';
14
+ import queryString from 'query-string';
14
15
  import { generatePath } from 'react-router';
15
- import { stringify } from 'query-string';
16
16
 
17
17
  var useData = function useData(loadData) {
18
18
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -301,10 +301,10 @@ var Base = /*#__PURE__*/function () {
301
301
  value: function requestGet(path) {
302
302
  var _this = this;
303
303
  var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
304
- var queryString = query !== null ? stringify(query, {
304
+ var finalQuery = query !== null ? queryString.stringify(query, {
305
305
  arrayFormat: 'bracket'
306
306
  }) : null;
307
- return getJSON("".concat(this.getFullUrl(path)).concat(queryString !== null && queryString.length > 0 ? "?".concat(queryString) : ''), {
307
+ return getJSON("".concat(this.getFullUrl(path)).concat(finalQuery !== null && finalQuery.length > 0 ? "?".concat(finalQuery) : ''), {
308
308
  credentials: 'include',
309
309
  headers: getCSRFHeaders()
310
310
  })["catch"](function (error) {
package/lib/index.js CHANGED
@@ -15,8 +15,8 @@ var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitializ
15
15
  var _inherits = require('@babel/runtime/helpers/inherits');
16
16
  var _createSuper = require('@babel/runtime/helpers/createSuper');
17
17
  var fetch$1 = require('@folklore/fetch');
18
- var reactRouter = require('react-router');
19
18
  var queryString = require('query-string');
19
+ var reactRouter = require('react-router');
20
20
 
21
21
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
22
 
@@ -31,6 +31,7 @@ var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallChec
31
31
  var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assertThisInitialized);
32
32
  var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
33
33
  var _createSuper__default = /*#__PURE__*/_interopDefaultLegacy(_createSuper);
34
+ var queryString__default = /*#__PURE__*/_interopDefaultLegacy(queryString);
34
35
 
35
36
  var useData = function useData(loadData) {
36
37
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -319,10 +320,10 @@ var Base = /*#__PURE__*/function () {
319
320
  value: function requestGet(path) {
320
321
  var _this = this;
321
322
  var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
322
- var queryString$1 = query !== null ? queryString.stringify(query, {
323
+ var finalQuery = query !== null ? queryString__default["default"].stringify(query, {
323
324
  arrayFormat: 'bracket'
324
325
  }) : null;
325
- return fetch$1.getJSON("".concat(this.getFullUrl(path)).concat(queryString$1 !== null && queryString$1.length > 0 ? "?".concat(queryString$1) : ''), {
326
+ return fetch$1.getJSON("".concat(this.getFullUrl(path)).concat(finalQuery !== null && finalQuery.length > 0 ? "?".concat(finalQuery) : ''), {
326
327
  credentials: 'include',
327
328
  headers: fetch$1.getCSRFHeaders()
328
329
  })["catch"](function (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/data",
3
- "version": "2.0.2",
3
+ "version": "2.0.5",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -56,11 +56,11 @@
56
56
  "@folklore/fetch": "^0.1.15",
57
57
  "@panneau/core": "^2.0.2",
58
58
  "prop-types": "^15.7.2",
59
- "query-string": "^7.0.0",
59
+ "query-string": "^7.0.0||^8.1.0",
60
60
  "react-router": "^6.2.1"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "0b4b72766d40815f8da33b2c658e20d00f162f34"
65
+ "gitHead": "eb99739fb81a02464eccb6a131b3e36a436de294"
66
66
  }