northdata-viz 1.373.11 → 1.375.11
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/package.json +1 -1
- package/viz.esm.js +34 -8
- package/viz.esm.js.map +1 -1
- package/viz.min.js +2 -2
- package/viz.min.js.map +1 -1
package/package.json
CHANGED
package/viz.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! northdata-viz V1.
|
|
1
|
+
/*! northdata-viz V1.375.11 */
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
4
|
/***/ 100:
|
|
@@ -464,8 +464,8 @@ module.exports = debounce;
|
|
|
464
464
|
var __webpack_exports__ = {};
|
|
465
465
|
|
|
466
466
|
;// ./src/ts/env.ts
|
|
467
|
-
var VERSION = "1.
|
|
468
|
-
var VERSION_PREFIX = (/* unused pure expression or super */ null && ("/ui/v1-
|
|
467
|
+
var VERSION = "1.375.11";
|
|
468
|
+
var VERSION_PREFIX = (/* unused pure expression or super */ null && ("/ui/v1-375-11"));
|
|
469
469
|
|
|
470
470
|
;// ./src/ts/util/params.ts
|
|
471
471
|
function clone(object) {
|
|
@@ -2078,6 +2078,9 @@ function string_unescape(s) {
|
|
|
2078
2078
|
}
|
|
2079
2079
|
return s;
|
|
2080
2080
|
}
|
|
2081
|
+
function unhyphenate(s) {
|
|
2082
|
+
return s.replace(/\xAD/g, "");
|
|
2083
|
+
}
|
|
2081
2084
|
function encode(s) {
|
|
2082
2085
|
if (s) {
|
|
2083
2086
|
s = encodeURIComponent(s).replace(/%20/g, "+");
|
|
@@ -2180,6 +2183,28 @@ var dataSource = (function () {
|
|
|
2180
2183
|
var baseUrl = (window["dataDomain"] /* undocumented: for CORS testing!*/ ||
|
|
2181
2184
|
domain) + "/data.json";
|
|
2182
2185
|
var headers = __assign({ "Content-Type": "application/json; charset=UTF-8" }, (apiKey && { "X-Api-Key": apiKey }));
|
|
2186
|
+
if (params.options.length === 1 && params.options[0]["useGet"] === "true") {
|
|
2187
|
+
var urlParams = new URLSearchParams();
|
|
2188
|
+
Object.keys(params.options[0])
|
|
2189
|
+
.filter(function (key) { return key !== "useGet"; })
|
|
2190
|
+
.filter(function (key) { return key !== "apiKey"; })
|
|
2191
|
+
.filter(function (key) {
|
|
2192
|
+
var value = params.options[0][key];
|
|
2193
|
+
return (typeof value === "string" ||
|
|
2194
|
+
typeof value === "boolean" ||
|
|
2195
|
+
typeof value === "number");
|
|
2196
|
+
})
|
|
2197
|
+
.forEach(function (key) {
|
|
2198
|
+
urlParams.set(key, params.options[0][key]);
|
|
2199
|
+
});
|
|
2200
|
+
json("".concat(baseUrl, "?").concat(urlParams.toString()), {
|
|
2201
|
+
headers: headers,
|
|
2202
|
+
method: "GET",
|
|
2203
|
+
})
|
|
2204
|
+
.then(function (data) { return callback(null, data); })
|
|
2205
|
+
.catch(function (error) { return callback(error, undefined); });
|
|
2206
|
+
return;
|
|
2207
|
+
}
|
|
2183
2208
|
json(baseUrl, {
|
|
2184
2209
|
headers: headers,
|
|
2185
2210
|
method: "POST",
|
|
@@ -2190,7 +2215,6 @@ var dataSource = (function () {
|
|
|
2190
2215
|
}
|
|
2191
2216
|
function executeRequests(requests) {
|
|
2192
2217
|
var options = [];
|
|
2193
|
-
var params = {};
|
|
2194
2218
|
var apiKey = undefined;
|
|
2195
2219
|
for (var _i = 0, requests_1 = requests; _i < requests_1.length; _i++) {
|
|
2196
2220
|
var request = requests_1[_i];
|
|
@@ -2198,9 +2222,11 @@ var dataSource = (function () {
|
|
|
2198
2222
|
apiKey = apiKey !== null && apiKey !== void 0 ? apiKey : request.options["apiKey"];
|
|
2199
2223
|
}
|
|
2200
2224
|
if (options.length > 0) {
|
|
2201
|
-
params
|
|
2202
|
-
|
|
2203
|
-
|
|
2225
|
+
var params = {
|
|
2226
|
+
options: options,
|
|
2227
|
+
origin: document.location.hostname,
|
|
2228
|
+
v: NorthData.version,
|
|
2229
|
+
};
|
|
2204
2230
|
submit(apiKey, params, function (error, response) {
|
|
2205
2231
|
if (error) {
|
|
2206
2232
|
for (var _i = 0, requests_2 = requests; _i < requests_2.length; _i++) {
|
|
@@ -2217,7 +2243,7 @@ var dataSource = (function () {
|
|
|
2217
2243
|
request.error(error.message);
|
|
2218
2244
|
}
|
|
2219
2245
|
else {
|
|
2220
|
-
request.success(
|
|
2246
|
+
request.success(result);
|
|
2221
2247
|
}
|
|
2222
2248
|
});
|
|
2223
2249
|
}
|