@slavmak2486/bx24ts 1.1.3 → 1.1.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/BX24.ts +1 -2
- package/BX24Dev.ts +1 -2
- package/base/BX24.ts +4 -4
- package/dist/base/BX24.js +4 -4
- package/dist/index.js +3 -1
- package/index.ts +1 -0
- package/package.json +1 -1
package/BX24.ts
CHANGED
|
@@ -126,8 +126,7 @@ export class BX24 extends baseBX24{
|
|
|
126
126
|
parent.postMessage(cmd, 'http'+(this.PROTOCOL?'s':'')+'://' + this.DOMAIN);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
openApplication(cb?:(params:any)=>void, settings?:any):void
|
|
130
|
-
openApplication(params?:any, cb?:(params:any)=>void, settings?:any):void{
|
|
129
|
+
openApplication(params?:Record<string, string|number>, cb?:(params:any)=>void, settings?:any):void{
|
|
131
130
|
if (!params){
|
|
132
131
|
params={};
|
|
133
132
|
}
|
package/BX24Dev.ts
CHANGED
|
@@ -121,8 +121,7 @@ export class BX24Dev extends BX24Server{
|
|
|
121
121
|
this.PLACEMENT_OPTIONS=result;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
openApplication(cb?:(params:any)=>void, settings?:any):void
|
|
125
|
-
openApplication(params?:any, cb?:(params:any)=>void, settings?:any):void{
|
|
124
|
+
openApplication(params?:Record<string, string|number>, cb?:(params:any)=>void, settings?:any):void{
|
|
126
125
|
if (!params){
|
|
127
126
|
params={};
|
|
128
127
|
}
|
package/base/BX24.ts
CHANGED
|
@@ -58,7 +58,7 @@ export abstract class baseBX24{
|
|
|
58
58
|
|
|
59
59
|
getHttpString(value:any, prefix=''):string{
|
|
60
60
|
if (value instanceof Date){
|
|
61
|
-
return prefix+'='+value.toISOString();
|
|
61
|
+
return prefix+'='+encodeURIComponent(value.toISOString());
|
|
62
62
|
}
|
|
63
63
|
else if (typeof value=='object'){
|
|
64
64
|
const resultObj=[];
|
|
@@ -68,9 +68,9 @@ export abstract class baseBX24{
|
|
|
68
68
|
return resultObj.join('&');
|
|
69
69
|
}
|
|
70
70
|
else if (prefix!=''){
|
|
71
|
-
return prefix+'='+value;
|
|
71
|
+
return prefix+'='+encodeURIComponent(value);
|
|
72
72
|
}
|
|
73
|
-
return value;
|
|
73
|
+
return encodeURIComponent(value);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
|
|
@@ -306,7 +306,7 @@ export abstract class baseBX24{
|
|
|
306
306
|
if(method)
|
|
307
307
|
{
|
|
308
308
|
cnt++;
|
|
309
|
-
comands[idx] = `${method}?${
|
|
309
|
+
comands[idx] = `${method}?${this.getHttpString(params)}`;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
|
package/dist/base/BX24.js
CHANGED
|
@@ -97,7 +97,7 @@ class baseBX24 {
|
|
|
97
97
|
}
|
|
98
98
|
getHttpString(value, prefix = '') {
|
|
99
99
|
if (value instanceof Date) {
|
|
100
|
-
return prefix + '=' + value.toISOString();
|
|
100
|
+
return prefix + '=' + encodeURIComponent(value.toISOString());
|
|
101
101
|
}
|
|
102
102
|
else if (typeof value == 'object') {
|
|
103
103
|
const resultObj = [];
|
|
@@ -107,9 +107,9 @@ class baseBX24 {
|
|
|
107
107
|
return resultObj.join('&');
|
|
108
108
|
}
|
|
109
109
|
else if (prefix != '') {
|
|
110
|
-
return prefix + '=' + value;
|
|
110
|
+
return prefix + '=' + encodeURIComponent(value);
|
|
111
111
|
}
|
|
112
|
-
return value;
|
|
112
|
+
return encodeURIComponent(value);
|
|
113
113
|
}
|
|
114
114
|
isFunction(item) {
|
|
115
115
|
return item === null ? false : (typeof (item) == "function" || item instanceof Function);
|
|
@@ -252,7 +252,7 @@ class baseBX24 {
|
|
|
252
252
|
const params = Array.isArray(row) ? row[1] : row.params;
|
|
253
253
|
if (method) {
|
|
254
254
|
cnt++;
|
|
255
|
-
comands[idx] = `${method}?${
|
|
255
|
+
comands[idx] = `${method}?${this.getHttpString(params)}`;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
if (cnt > 0) {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BatchHelper = exports.BX24Dev = exports.BX24Server = exports.BX24 = void 0;
|
|
3
|
+
exports.baseBX24 = exports.BatchHelper = exports.BX24Dev = exports.BX24Server = exports.BX24 = void 0;
|
|
4
4
|
var BX24_1 = require("./BX24");
|
|
5
5
|
Object.defineProperty(exports, "BX24", { enumerable: true, get: function () { return BX24_1.BX24; } });
|
|
6
6
|
var BX24Server_1 = require("./BX24Server");
|
|
@@ -9,3 +9,5 @@ var BX24Dev_1 = require("./BX24Dev");
|
|
|
9
9
|
Object.defineProperty(exports, "BX24Dev", { enumerable: true, get: function () { return BX24Dev_1.BX24Dev; } });
|
|
10
10
|
var BatchHelper_1 = require("./BatchHelper");
|
|
11
11
|
Object.defineProperty(exports, "BatchHelper", { enumerable: true, get: function () { return BatchHelper_1.BatchHelper; } });
|
|
12
|
+
var BX24_2 = require("./base/BX24");
|
|
13
|
+
Object.defineProperty(exports, "baseBX24", { enumerable: true, get: function () { return BX24_2.baseBX24; } });
|
package/index.ts
CHANGED