@osimatic/helpers-js 1.1.5 → 1.1.7

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/date_time.js CHANGED
@@ -39,7 +39,7 @@ class DateTimeFormatter {
39
39
  static getTimeSqlFormatter(timeZone) {
40
40
  this.timeSqlFormatter = this.timeSqlFormatter || {};
41
41
  if (typeof this.timeSqlFormatter[timeZone] == 'undefined') {
42
- console.log('init getTimeSqlFormatter avec timezone', timeZone);
42
+ //console.log('init getTimeSqlFormatter avec timezone', timeZone);
43
43
  this.timeSqlFormatter[timeZone] = new Intl.DateTimeFormat('en-GB', { hour: 'numeric', minute: 'numeric', second: 'numeric', hour12: false, timeZone: timeZone }); //hour12: false = 24h format
44
44
  }
45
45
 
package/http_client.js CHANGED
@@ -187,7 +187,8 @@ class HTTPClient {
187
187
  let headers = HTTPClient.getHeaders();
188
188
  if ('PATCH' === method) {
189
189
  headers.append('Content-Type', 'application/x-www-form-urlencoded');
190
- body = new URLSearchParams(HTTPClient.formatFormData(data)).toString();
190
+ // 30/01/2023 : ajout encodeURIComponent() sinon les valeurs contenant des "+" pose pb (signe "+" retiré)
191
+ body = encodeURIComponent(new URLSearchParams(HTTPClient.formatFormData(data)).toString());
191
192
  }
192
193
  else if ('POST' === method) {
193
194
  body = HTTPClient.formatFormData(data);
@@ -268,7 +269,7 @@ class HTTPClient {
268
269
  let headers = HTTPClient.getHeaders();
269
270
  if ('PATCH' === method) {
270
271
  headers.append('Content-Type', 'application/x-www-form-urlencoded');
271
- body = new URLSearchParams(HTTPClient.formatFormData(data)).toString();
272
+ body = encodeURIComponent(new URLSearchParams(HTTPClient.formatFormData(data)).toString());
272
273
  }
273
274
  else if ('POST' === method) {
274
275
  body = HTTPClient.formatFormData(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -8,5 +8,8 @@
8
8
  "keywords": [],
9
9
  "author": "",
10
10
  "license": "ISC",
11
- "description": ""
11
+ "description": "",
12
+ "dependencies": {
13
+ "ilib": "^14.16.0"
14
+ }
12
15
  }