@bigbinary/neeto-templates-frontend 1.1.16 → 1.1.17

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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useState, useRef, useCallback, useEffect, memo } from 'react';
3
- import { noop, removeBy, renameKeys } from '@bigbinary/neeto-cist';
3
+ import { noop, removeBy, renameKeys } from 'neetocist';
4
4
  import { Typography, Spinner, Button, Modal, Label } from '@bigbinary/neetoui';
5
5
  import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
6
6
  import Search from '@bigbinary/neeto-molecules/Search';
@@ -1855,7 +1855,6 @@ var arrayPrefixGenerators = {
1855
1855
  };
1856
1856
 
1857
1857
  var isArray$1 = Array.isArray;
1858
- var split = String.prototype.split;
1859
1858
  var push = Array.prototype.push;
1860
1859
  var pushToArray = function (arr, valueOrArray) {
1861
1860
  push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
@@ -1957,14 +1956,6 @@ var stringify$1 = function stringify(
1957
1956
  if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
1958
1957
  if (encoder) {
1959
1958
  var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
1960
- if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
1961
- var valuesArray = split.call(String(obj), ',');
1962
- var valuesJoined = '';
1963
- for (var i = 0; i < valuesArray.length; ++i) {
1964
- valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset, 'value', format));
1965
- }
1966
- return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
1967
- }
1968
1959
  return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
1969
1960
  }
1970
1961
  return [formatter(prefix) + '=' + formatter(String(obj))];
@@ -1979,6 +1970,9 @@ var stringify$1 = function stringify(
1979
1970
  var objKeys;
1980
1971
  if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1981
1972
  // we need to join elements in
1973
+ if (encodeValuesOnly && encoder) {
1974
+ obj = utils$1.maybeMap(obj, encoder);
1975
+ }
1982
1976
  objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
1983
1977
  } else if (isArray$1(filter)) {
1984
1978
  objKeys = filter;
@@ -2011,7 +2005,7 @@ var stringify$1 = function stringify(
2011
2005
  commaRoundTrip,
2012
2006
  strictNullHandling,
2013
2007
  skipNulls,
2014
- encoder,
2008
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
2015
2009
  filter,
2016
2010
  sort,
2017
2011
  allowDots,
@@ -2210,7 +2204,8 @@ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2210
2204
  var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2211
2205
 
2212
2206
  var parseValues = function parseQueryStringValues(str, options) {
2213
- var obj = {};
2207
+ var obj = { __proto__: null };
2208
+
2214
2209
  var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2215
2210
  var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2216
2211
  var parts = cleanStr.split(options.delimiter, limit);