@pelcro/react-pelcro-js 4.0.0-alpha.112 → 4.0.0-alpha.113

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.cjs.js CHANGED
@@ -44601,7 +44601,7 @@ var followRedirects = wrap({ http: http__default['default'], https: https__defau
44601
44601
  var wrap_1 = wrap;
44602
44602
  followRedirects.wrap = wrap_1;
44603
44603
 
44604
- const VERSION = "1.2.1";
44604
+ const VERSION = "1.2.0";
44605
44605
 
44606
44606
  function parseProtocol(url) {
44607
44607
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -44734,7 +44734,7 @@ function speedometer(samplesCount, min) {
44734
44734
 
44735
44735
  const passed = startedAt && now - startedAt;
44736
44736
 
44737
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
44737
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
44738
44738
  };
44739
44739
  }
44740
44740
 
@@ -44921,11 +44921,6 @@ class AxiosTransformStream extends stream__default['default'].Transform{
44921
44921
  }
44922
44922
  }
44923
44923
 
44924
- const zlibOptions = {
44925
- flush: zlib__default['default'].constants.Z_SYNC_FLUSH,
44926
- finishFlush: zlib__default['default'].constants.Z_SYNC_FLUSH
44927
- };
44928
-
44929
44924
  const isBrotliSupported = utils.isFunction(zlib__default['default'].createBrotliDecompress);
44930
44925
 
44931
44926
  const {http: httpFollow, https: httpsFollow} = followRedirects;
@@ -45166,7 +45161,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45166
45161
  }
45167
45162
  }
45168
45163
 
45169
- const contentLength = utils.toFiniteNumber(headers.getContentLength());
45164
+ const contentLength = +headers.getContentLength();
45170
45165
 
45171
45166
  if (utils.isArray(maxRate)) {
45172
45167
  maxUploadRate = maxRate[0];
@@ -45181,7 +45176,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45181
45176
  }
45182
45177
 
45183
45178
  data = stream__default['default'].pipeline([data, new AxiosTransformStream({
45184
- length: contentLength,
45179
+ length: utils.toFiniteNumber(contentLength),
45185
45180
  maxRate: utils.toFiniteNumber(maxUploadRate)
45186
45181
  })], utils.noop);
45187
45182
 
@@ -45224,10 +45219,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45224
45219
  return reject(customErr);
45225
45220
  }
45226
45221
 
45227
- headers.set(
45228
- 'Accept-Encoding',
45229
- 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false
45230
- );
45222
+ headers.set('Accept-Encoding', 'gzip, deflate, br', false);
45231
45223
 
45232
45224
  const options = {
45233
45225
  path,
@@ -45299,17 +45291,17 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45299
45291
  streams.push(transformStream);
45300
45292
  }
45301
45293
 
45302
- // decompress the response body transparently if required
45294
+ // uncompress the response body transparently if required
45303
45295
  let responseStream = res;
45304
45296
 
45305
45297
  // return the last request in case of redirects
45306
45298
  const lastRequest = res.req || req;
45307
45299
 
45308
45300
  // if decompress disabled we should not decompress
45309
- if (config.decompress !== false && res.headers['content-encoding']) {
45301
+ if (config.decompress !== false) {
45310
45302
  // if no content, but headers still say that it is encoded,
45311
45303
  // remove the header not confuse downstream operations
45312
- if (method === 'HEAD' || res.statusCode === 204) {
45304
+ if ((!responseLength || res.statusCode === 204) && res.headers['content-encoding']) {
45313
45305
  delete res.headers['content-encoding'];
45314
45306
  }
45315
45307
 
@@ -45319,14 +45311,14 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45319
45311
  case 'compress':
45320
45312
  case 'deflate':
45321
45313
  // add the unzipper to the body stream processing pipeline
45322
- streams.push(zlib__default['default'].createUnzip(zlibOptions));
45314
+ streams.push(zlib__default['default'].createUnzip());
45323
45315
 
45324
45316
  // remove the content-encoding in order to not confuse downstream operations
45325
45317
  delete res.headers['content-encoding'];
45326
45318
  break;
45327
45319
  case 'br':
45328
45320
  if (isBrotliSupported) {
45329
- streams.push(zlib__default['default'].createBrotliDecompress(zlibOptions));
45321
+ streams.push(zlib__default['default'].createBrotliDecompress());
45330
45322
  delete res.headers['content-encoding'];
45331
45323
  }
45332
45324
  }
@@ -45544,7 +45536,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
45544
45536
  }
45545
45537
  }
45546
45538
 
45547
- if (utils.isFormData(requestData) && (platform.isStandardBrowserWebWorkerEnv)) {
45539
+ if (utils.isFormData(requestData) && platform.isStandardBrowserEnv) {
45548
45540
  requestHeaders.setContentType(false); // Let the browser set it
45549
45541
  }
45550
45542
 
@@ -45572,7 +45564,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
45572
45564
  const responseHeaders = AxiosHeaders.from(
45573
45565
  'getAllResponseHeaders' in request && request.getAllResponseHeaders()
45574
45566
  );
45575
- const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
45567
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
45576
45568
  request.responseText : request.response;
45577
45569
  const response = {
45578
45570
  data: responseData,
@@ -45786,7 +45778,7 @@ function throwIfCancellationRequested(config) {
45786
45778
  }
45787
45779
 
45788
45780
  if (config.signal && config.signal.aborted) {
45789
- throw new CanceledError(null, config);
45781
+ throw new CanceledError();
45790
45782
  }
45791
45783
  }
45792
45784
 
@@ -46427,9 +46419,6 @@ axios.spread = spread;
46427
46419
  // Expose isAxiosError
46428
46420
  axios.isAxiosError = isAxiosError;
46429
46421
 
46430
- // Expose mergeConfig
46431
- axios.mergeConfig = mergeConfig;
46432
-
46433
46422
  axios.AxiosHeaders = AxiosHeaders;
46434
46423
 
46435
46424
  axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
package/dist/index.esm.js CHANGED
@@ -44559,7 +44559,7 @@ var followRedirects = wrap({ http: http, https: https });
44559
44559
  var wrap_1 = wrap;
44560
44560
  followRedirects.wrap = wrap_1;
44561
44561
 
44562
- const VERSION = "1.2.1";
44562
+ const VERSION = "1.2.0";
44563
44563
 
44564
44564
  function parseProtocol(url) {
44565
44565
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -44692,7 +44692,7 @@ function speedometer(samplesCount, min) {
44692
44692
 
44693
44693
  const passed = startedAt && now - startedAt;
44694
44694
 
44695
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
44695
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
44696
44696
  };
44697
44697
  }
44698
44698
 
@@ -44879,11 +44879,6 @@ class AxiosTransformStream extends stream.Transform{
44879
44879
  }
44880
44880
  }
44881
44881
 
44882
- const zlibOptions = {
44883
- flush: zlib.constants.Z_SYNC_FLUSH,
44884
- finishFlush: zlib.constants.Z_SYNC_FLUSH
44885
- };
44886
-
44887
44882
  const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
44888
44883
 
44889
44884
  const {http: httpFollow, https: httpsFollow} = followRedirects;
@@ -45124,7 +45119,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45124
45119
  }
45125
45120
  }
45126
45121
 
45127
- const contentLength = utils.toFiniteNumber(headers.getContentLength());
45122
+ const contentLength = +headers.getContentLength();
45128
45123
 
45129
45124
  if (utils.isArray(maxRate)) {
45130
45125
  maxUploadRate = maxRate[0];
@@ -45139,7 +45134,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45139
45134
  }
45140
45135
 
45141
45136
  data = stream.pipeline([data, new AxiosTransformStream({
45142
- length: contentLength,
45137
+ length: utils.toFiniteNumber(contentLength),
45143
45138
  maxRate: utils.toFiniteNumber(maxUploadRate)
45144
45139
  })], utils.noop);
45145
45140
 
@@ -45182,10 +45177,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45182
45177
  return reject(customErr);
45183
45178
  }
45184
45179
 
45185
- headers.set(
45186
- 'Accept-Encoding',
45187
- 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false
45188
- );
45180
+ headers.set('Accept-Encoding', 'gzip, deflate, br', false);
45189
45181
 
45190
45182
  const options = {
45191
45183
  path,
@@ -45257,17 +45249,17 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45257
45249
  streams.push(transformStream);
45258
45250
  }
45259
45251
 
45260
- // decompress the response body transparently if required
45252
+ // uncompress the response body transparently if required
45261
45253
  let responseStream = res;
45262
45254
 
45263
45255
  // return the last request in case of redirects
45264
45256
  const lastRequest = res.req || req;
45265
45257
 
45266
45258
  // if decompress disabled we should not decompress
45267
- if (config.decompress !== false && res.headers['content-encoding']) {
45259
+ if (config.decompress !== false) {
45268
45260
  // if no content, but headers still say that it is encoded,
45269
45261
  // remove the header not confuse downstream operations
45270
- if (method === 'HEAD' || res.statusCode === 204) {
45262
+ if ((!responseLength || res.statusCode === 204) && res.headers['content-encoding']) {
45271
45263
  delete res.headers['content-encoding'];
45272
45264
  }
45273
45265
 
@@ -45277,14 +45269,14 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
45277
45269
  case 'compress':
45278
45270
  case 'deflate':
45279
45271
  // add the unzipper to the body stream processing pipeline
45280
- streams.push(zlib.createUnzip(zlibOptions));
45272
+ streams.push(zlib.createUnzip());
45281
45273
 
45282
45274
  // remove the content-encoding in order to not confuse downstream operations
45283
45275
  delete res.headers['content-encoding'];
45284
45276
  break;
45285
45277
  case 'br':
45286
45278
  if (isBrotliSupported) {
45287
- streams.push(zlib.createBrotliDecompress(zlibOptions));
45279
+ streams.push(zlib.createBrotliDecompress());
45288
45280
  delete res.headers['content-encoding'];
45289
45281
  }
45290
45282
  }
@@ -45502,7 +45494,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
45502
45494
  }
45503
45495
  }
45504
45496
 
45505
- if (utils.isFormData(requestData) && (platform.isStandardBrowserWebWorkerEnv)) {
45497
+ if (utils.isFormData(requestData) && platform.isStandardBrowserEnv) {
45506
45498
  requestHeaders.setContentType(false); // Let the browser set it
45507
45499
  }
45508
45500
 
@@ -45530,7 +45522,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
45530
45522
  const responseHeaders = AxiosHeaders.from(
45531
45523
  'getAllResponseHeaders' in request && request.getAllResponseHeaders()
45532
45524
  );
45533
- const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
45525
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
45534
45526
  request.responseText : request.response;
45535
45527
  const response = {
45536
45528
  data: responseData,
@@ -45744,7 +45736,7 @@ function throwIfCancellationRequested(config) {
45744
45736
  }
45745
45737
 
45746
45738
  if (config.signal && config.signal.aborted) {
45747
- throw new CanceledError(null, config);
45739
+ throw new CanceledError();
45748
45740
  }
45749
45741
  }
45750
45742
 
@@ -46385,9 +46377,6 @@ axios.spread = spread;
46385
46377
  // Expose isAxiosError
46386
46378
  axios.isAxiosError = isAxiosError;
46387
46379
 
46388
- // Expose mergeConfig
46389
- axios.mergeConfig = mergeConfig;
46390
-
46391
46380
  axios.AxiosHeaders = AxiosHeaders;
46392
46381
 
46393
46382
  axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "4.0.0-alpha.112",
4
+ "version": "4.0.0-alpha.113",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",
@@ -103,7 +103,7 @@
103
103
  "@headlessui/react": "^0.3.0",
104
104
  "@stripe/react-stripe-js": "^2.8.1",
105
105
  "@stripe/stripe-js": "^3.5.0",
106
- "axios": "1.2.1",
106
+ "axios": "1.2.0",
107
107
  "gapi-script": "^1.2.0",
108
108
  "i18next": "^19.1.0",
109
109
  "react-easy-crop": "^3.3.2",