@hpcc-js/marshaller 2.23.107 → 2.24.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/dist/index.es6.js +562 -640
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +607 -687
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +19 -35
- package/src/__package__.ts +2 -2
- package/src/dashy.ts +2 -1
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types/dashy.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hpcc-js/comms'), require('@hpcc-js/common'), require('@hpcc-js/util'), require('@hpcc-js/chart'), require('@hpcc-js/dgrid'), require('@hpcc-js/form'), require('@hpcc-js/graph'), require('@hpcc-js/map'), require('@hpcc-js/layout'), require('@hpcc-js/phosphor'), require('@hpcc-js/codemirror'), require('@hpcc-js/other')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', '@hpcc-js/comms', '@hpcc-js/common', '@hpcc-js/util', '@hpcc-js/chart', '@hpcc-js/dgrid', '@hpcc-js/form', '@hpcc-js/graph', '@hpcc-js/map', '@hpcc-js/layout', '@hpcc-js/phosphor', '@hpcc-js/codemirror', '@hpcc-js/other'], factory) :
|
|
4
|
-
(global = global || self, factory(global[
|
|
5
|
-
}(this, (function (exports, comms, common, util$
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/marshaller"] = {}, global["@hpcc-js/comms"], global["@hpcc-js/common"], global["@hpcc-js/util"], global["@hpcc-js/chart"], global["@hpcc-js/dgrid"], global["@hpcc-js/form"], global["@hpcc-js/graph"], global["@hpcc-js/map"], global["@hpcc-js/layout"], global["@hpcc-js/phosphor"], global["@hpcc-js/codemirror"], global["@hpcc-js/other"]));
|
|
5
|
+
})(this, (function (exports, comms, common, util$6, chart, dgrid, form, graph, map, layout, phosphor, codemirror, other) { 'use strict';
|
|
6
6
|
|
|
7
|
-
var PKG_NAME = "@hpcc-js/marshaller";
|
|
8
|
-
var PKG_VERSION = "2.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
7
|
+
var PKG_NAME$1 = "@hpcc-js/marshaller";
|
|
8
|
+
var PKG_VERSION$1 = "2.24.5";
|
|
9
|
+
var BUILD_VERSION = "2.102.7";
|
|
10
10
|
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
var __assign = function() {
|
|
43
|
-
__assign = Object.assign || function __assign(t) {
|
|
42
|
+
var __assign$1 = function() {
|
|
43
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
44
44
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
45
45
|
s = arguments[i];
|
|
46
46
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
47
47
|
}
|
|
48
48
|
return t;
|
|
49
49
|
};
|
|
50
|
-
return __assign.apply(this, arguments);
|
|
50
|
+
return __assign$1.apply(this, arguments);
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
function __spreadArray(to, from, pack) {
|
|
102
|
+
function __spreadArray$1(to, from, pack) {
|
|
103
103
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
104
104
|
if (ar || !(i in from)) {
|
|
105
105
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
106
106
|
ar[i] = from[i];
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
return to.concat(ar || from);
|
|
109
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
function stringify(obj_from_json) {
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
// but without quotes around the keys.
|
|
123
123
|
var props = Object
|
|
124
124
|
.keys(obj_from_json)
|
|
125
|
-
.map(function (key) { return key
|
|
125
|
+
.map(function (key) { return "".concat(key, ": ").concat(stringify(obj_from_json[key])); })
|
|
126
126
|
.join(", ");
|
|
127
|
-
return "{ "
|
|
127
|
+
return "{ ".concat(props, " }");
|
|
128
128
|
}
|
|
129
129
|
function schemaType2IFieldType(type) {
|
|
130
130
|
switch (type) {
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
};
|
|
224
224
|
Activity.prototype.hash = function (more) {
|
|
225
225
|
if (more === void 0) { more = {}; }
|
|
226
|
-
return util$
|
|
226
|
+
return util$6.hashSum(__assign$1({}, more));
|
|
227
227
|
};
|
|
228
228
|
Activity.prototype.refreshMeta = function () {
|
|
229
229
|
return this._sourceActivity ? this._sourceActivity.refreshMeta() : Promise.resolve();
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
if (this._prevDataHash !== hash || this._prevInData !== inData) {
|
|
297
297
|
this._prevDataHash = hash;
|
|
298
298
|
this._prevInData = inData;
|
|
299
|
-
this._prevData = util$
|
|
299
|
+
this._prevData = util$6.update(this._prevData, this.computeData());
|
|
300
300
|
}
|
|
301
301
|
return this._prevData;
|
|
302
302
|
};
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
// Activity overrides ---
|
|
380
380
|
ActivityPipeline.prototype.hash = function (more) {
|
|
381
381
|
if (more === void 0) { more = {}; }
|
|
382
|
-
return util$
|
|
382
|
+
return util$6.hashSum(__assign$1({ activities: [this.activities().map(function (activity) { return activity.hash(); })] }, more));
|
|
383
383
|
};
|
|
384
384
|
ActivityPipeline.prototype.refreshMeta = function () {
|
|
385
385
|
return this.last().refreshMeta();
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
// Activity overrides ---
|
|
444
444
|
ActivitySelection.prototype.hash = function (more) {
|
|
445
445
|
if (more === void 0) { more = {}; }
|
|
446
|
-
return util$
|
|
446
|
+
return util$6.hashSum(__assign$1({ selection: this.selection().hash() }, more));
|
|
447
447
|
};
|
|
448
448
|
ActivitySelection.prototype.label = function () {
|
|
449
449
|
return this.selection().label();
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
__extends(Datasource, _super);
|
|
491
491
|
function Datasource() {
|
|
492
492
|
var _this = _super.call(this) || this;
|
|
493
|
-
_this._id = "ds_"
|
|
493
|
+
_this._id = "ds_".concat(++datasourceID);
|
|
494
494
|
return _this;
|
|
495
495
|
}
|
|
496
496
|
return Datasource;
|
|
@@ -509,7 +509,7 @@
|
|
|
509
509
|
};
|
|
510
510
|
DatasourceRef.prototype.hash = function (more) {
|
|
511
511
|
if (more === void 0) { more = {}; }
|
|
512
|
-
return _super.prototype.hash.call(this, __assign({ datasource: this._datasource ? this._datasource.hash(more) : undefined }, more));
|
|
512
|
+
return _super.prototype.hash.call(this, __assign$1({ datasource: this._datasource ? this._datasource.hash(more) : undefined }, more));
|
|
513
513
|
};
|
|
514
514
|
DatasourceRef.prototype.toDDL = function () {
|
|
515
515
|
return {
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
};
|
|
623
623
|
Form.prototype.hash = function (more) {
|
|
624
624
|
if (more === void 0) { more = {}; }
|
|
625
|
-
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL() }, more));
|
|
625
|
+
return _super.prototype.hash.call(this, __assign$1({ ddl: this.toDDL() }, more));
|
|
626
626
|
};
|
|
627
627
|
Form.prototype.refreshMeta = function () {
|
|
628
628
|
return Promise.resolve();
|
|
@@ -657,7 +657,7 @@
|
|
|
657
657
|
Form.prototype._class += " Form";
|
|
658
658
|
|
|
659
659
|
function fieldType(field) {
|
|
660
|
-
if (util$
|
|
660
|
+
if (util$6.isArray(field)) {
|
|
661
661
|
return "dataset";
|
|
662
662
|
}
|
|
663
663
|
var type = typeof field;
|
|
@@ -767,7 +767,7 @@
|
|
|
767
767
|
}
|
|
768
768
|
};
|
|
769
769
|
Databomb.prototype.hash = function (more) {
|
|
770
|
-
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL(true) }, more)) + this.payload();
|
|
770
|
+
return _super.prototype.hash.call(this, __assign$1({ ddl: this.toDDL(true) }, more)) + this.payload();
|
|
771
771
|
};
|
|
772
772
|
Databomb.prototype.refreshMeta = function () {
|
|
773
773
|
return Promise.resolve();
|
|
@@ -874,7 +874,7 @@
|
|
|
874
874
|
_this._schema = [];
|
|
875
875
|
_this._meta = [];
|
|
876
876
|
_this._data = [];
|
|
877
|
-
_this._exec = util$
|
|
877
|
+
_this._exec = util$6.debounce(function () {
|
|
878
878
|
if (_this._prevExecHash !== _this.hash()) {
|
|
879
879
|
_this._prevExecHash = _this.hash();
|
|
880
880
|
return _super.prototype.exec.call(_this).then(function () {
|
|
@@ -889,8 +889,8 @@
|
|
|
889
889
|
return Promise.resolve();
|
|
890
890
|
}
|
|
891
891
|
});
|
|
892
|
-
_this._fetchQ = new util$
|
|
893
|
-
_this.sample = util$
|
|
892
|
+
_this._fetchQ = new util$6.AsyncOrderedQueue();
|
|
893
|
+
_this.sample = util$6.debounce(function (samples, sampleSize) {
|
|
894
894
|
if (samples === void 0) { samples = _this.samples(); }
|
|
895
895
|
if (sampleSize === void 0) { sampleSize = _this.sampleSize(); }
|
|
896
896
|
var pages = [];
|
|
@@ -919,7 +919,7 @@
|
|
|
919
919
|
}
|
|
920
920
|
ESPResult.prototype.hash = function (more) {
|
|
921
921
|
if (more === void 0) { more = {}; }
|
|
922
|
-
return util$
|
|
922
|
+
return util$6.hashSum(__assign$1({ samples: this.samples(), sampleSize: this.sampleSize() }, more));
|
|
923
923
|
};
|
|
924
924
|
ESPResult.prototype.refreshMeta = function () {
|
|
925
925
|
var _this = this;
|
|
@@ -1071,7 +1071,7 @@
|
|
|
1071
1071
|
});
|
|
1072
1072
|
};
|
|
1073
1073
|
WUResult.prototype.label = function () {
|
|
1074
|
-
return this.wuid()
|
|
1074
|
+
return "".concat(this.wuid(), "\n").concat(this.resultName());
|
|
1075
1075
|
};
|
|
1076
1076
|
__decorate([
|
|
1077
1077
|
common.publish(null, "widget", "Workunit"),
|
|
@@ -1141,7 +1141,7 @@
|
|
|
1141
1141
|
return new WU(elementContainer).fromDDL(ddl, skipID);
|
|
1142
1142
|
};
|
|
1143
1143
|
WU.prototype.hash = function () {
|
|
1144
|
-
return util$
|
|
1144
|
+
return util$6.hashSum({
|
|
1145
1145
|
url: this.url(),
|
|
1146
1146
|
wuid: this.wuid()
|
|
1147
1147
|
});
|
|
@@ -1265,7 +1265,7 @@
|
|
|
1265
1265
|
});
|
|
1266
1266
|
};
|
|
1267
1267
|
LogicalFile.prototype.label = function () {
|
|
1268
|
-
return ""
|
|
1268
|
+
return "".concat(this.logicalFile());
|
|
1269
1269
|
};
|
|
1270
1270
|
__decorate([
|
|
1271
1271
|
common.publish("", "string", "ESP Url (http://x.x.x.x:8010)"),
|
|
@@ -1322,7 +1322,7 @@
|
|
|
1322
1322
|
var _this = _super.call(this) || this;
|
|
1323
1323
|
_this._ec = _ec;
|
|
1324
1324
|
_this._responseFields = {};
|
|
1325
|
-
_this._submitQ = new util$
|
|
1325
|
+
_this._submitQ = new util$6.AsyncOrderedQueue();
|
|
1326
1326
|
return _this;
|
|
1327
1327
|
}
|
|
1328
1328
|
RestService.prototype.toDDL = function () {
|
|
@@ -1354,7 +1354,7 @@
|
|
|
1354
1354
|
};
|
|
1355
1355
|
RestService.prototype.hash = function (more) {
|
|
1356
1356
|
if (more === void 0) { more = {}; }
|
|
1357
|
-
return util$
|
|
1357
|
+
return util$6.hashSum(__assign$1({ url: this.url(), action: this.action(), mode: this.mode() }, more));
|
|
1358
1358
|
};
|
|
1359
1359
|
RestService.prototype.label = function () {
|
|
1360
1360
|
return this.action();
|
|
@@ -1369,7 +1369,7 @@
|
|
|
1369
1369
|
return this.requestFields().filter(function (f) { return f.valid(); });
|
|
1370
1370
|
};
|
|
1371
1371
|
RestService.prototype.submit = function (request) {
|
|
1372
|
-
var requestHash = util$
|
|
1372
|
+
var requestHash = util$6.hashSum(request);
|
|
1373
1373
|
if (!this._prevPromise || this._prevRequestHash !== requestHash) {
|
|
1374
1374
|
this._prevRequestHash = requestHash;
|
|
1375
1375
|
var conn = comms.createConnection({ baseUrl: this.url(), type: this.mode() });
|
|
@@ -1441,12 +1441,12 @@
|
|
|
1441
1441
|
};
|
|
1442
1442
|
RestResult.fromDDL = function (ec, rs, resultName) {
|
|
1443
1443
|
return new RestResult(ec)
|
|
1444
|
-
.id(rs.id()
|
|
1444
|
+
.id("".concat(rs.id(), "_").concat(resultName))
|
|
1445
1445
|
.service(rs)
|
|
1446
1446
|
.resultName(resultName);
|
|
1447
1447
|
};
|
|
1448
1448
|
RestResult.prototype.serviceID = function () {
|
|
1449
|
-
return this.service().url()
|
|
1449
|
+
return "".concat(this.service().url(), "/").concat(this.service().action(), "}");
|
|
1450
1450
|
};
|
|
1451
1451
|
RestResult.prototype.sourceHash = function () {
|
|
1452
1452
|
return this.service().hash();
|
|
@@ -1462,10 +1462,10 @@
|
|
|
1462
1462
|
};
|
|
1463
1463
|
RestResult.prototype.hash = function (more) {
|
|
1464
1464
|
if (more === void 0) { more = {}; }
|
|
1465
|
-
return util$
|
|
1465
|
+
return util$6.hashSum(__assign$1({ source: this.sourceHash(), resultName: this.resultName() }, more));
|
|
1466
1466
|
};
|
|
1467
1467
|
RestResult.prototype.label = function () {
|
|
1468
|
-
return this.service().label()
|
|
1468
|
+
return "".concat(this.service().label(), "\n").concat(this.resultName());
|
|
1469
1469
|
};
|
|
1470
1470
|
RestResult.prototype.jsonDataFields = function () {
|
|
1471
1471
|
if (!this._jsonData || !this._jsonData.length)
|
|
@@ -1526,22 +1526,22 @@
|
|
|
1526
1526
|
var retVal = [];
|
|
1527
1527
|
if (!this.source_valid()) {
|
|
1528
1528
|
retVal.push({
|
|
1529
|
-
source: prefix
|
|
1530
|
-
msg: "Invalid source: \""
|
|
1531
|
-
hint: "expected: "
|
|
1529
|
+
source: "".concat(prefix, ".source.").concat(this.source()),
|
|
1530
|
+
msg: "Invalid source: \"".concat(this.source(), "\""),
|
|
1531
|
+
hint: "expected: ".concat(JSON.stringify(this.visualizationIDs()))
|
|
1532
1532
|
});
|
|
1533
1533
|
}
|
|
1534
1534
|
if (!this.remoteField_valid()) {
|
|
1535
1535
|
retVal.push({
|
|
1536
|
-
source: prefix
|
|
1537
|
-
msg: "Invalid remoteField: \""
|
|
1538
|
-
hint: "expected: "
|
|
1536
|
+
source: "".concat(prefix, ".remoteField"),
|
|
1537
|
+
msg: "Invalid remoteField: \"".concat(this.remoteField(), "\""),
|
|
1538
|
+
hint: "expected: ".concat(JSON.stringify(this.sourceOutFields()))
|
|
1539
1539
|
});
|
|
1540
1540
|
}
|
|
1541
1541
|
if (!this.value_valid()) {
|
|
1542
1542
|
retVal.push({
|
|
1543
|
-
source: prefix
|
|
1544
|
-
msg: "Invalid value: \""
|
|
1543
|
+
source: "".concat(prefix, ".value"),
|
|
1544
|
+
msg: "Invalid value: \"".concat(this.value(), "\""),
|
|
1545
1545
|
hint: "expected: any value."
|
|
1546
1546
|
});
|
|
1547
1547
|
}
|
|
@@ -1566,7 +1566,7 @@
|
|
|
1566
1566
|
return new Param(ec).fromDDL(ddl);
|
|
1567
1567
|
};
|
|
1568
1568
|
Param.prototype.hash = function () {
|
|
1569
|
-
return util$
|
|
1569
|
+
return util$6.hashSum({
|
|
1570
1570
|
label: this.localField(),
|
|
1571
1571
|
source: this.source(),
|
|
1572
1572
|
sourceField: this.remoteField()
|
|
@@ -1707,7 +1707,7 @@
|
|
|
1707
1707
|
});
|
|
1708
1708
|
};
|
|
1709
1709
|
RestResultRef.prototype.label = function () {
|
|
1710
|
-
return this.datasource().label()
|
|
1710
|
+
return "".concat(this.datasource().label(), "\n").concat(this.datasource().resultName());
|
|
1711
1711
|
};
|
|
1712
1712
|
RestResultRef.prototype.elementIDs = function () {
|
|
1713
1713
|
return this._ec.elementIDs();
|
|
@@ -1736,7 +1736,7 @@
|
|
|
1736
1736
|
var _this = this;
|
|
1737
1737
|
return this.datasource().refreshMeta().then(function () {
|
|
1738
1738
|
var oldParams = _this.request();
|
|
1739
|
-
var diffs = util$
|
|
1739
|
+
var diffs = util$6.compare(oldParams.map(function (p) { return p.localField(); }), _this.datasource().validRequestFields().map(function (ff) { return ff.fieldID(); }));
|
|
1740
1740
|
var newParams = oldParams.filter(function (op) { return diffs.update.indexOf(op.localField()) >= 0; });
|
|
1741
1741
|
_this.request(newParams.concat(diffs.enter.map(function (label) { return new Param(_this._ec).localField(label); })));
|
|
1742
1742
|
});
|
|
@@ -1759,7 +1759,7 @@
|
|
|
1759
1759
|
RestResultRef.prototype.exec = function () {
|
|
1760
1760
|
var _this = this;
|
|
1761
1761
|
var request = this.formatRequest();
|
|
1762
|
-
var requestHash = util$
|
|
1762
|
+
var requestHash = util$6.hashSum({ hash: this.hash(), request: request });
|
|
1763
1763
|
if (this._prevRequestHash !== requestHash) {
|
|
1764
1764
|
this._prevRequestHash = requestHash;
|
|
1765
1765
|
this._prevRequestPromise = this.datasource().submit(request).then(function (response) {
|
|
@@ -1787,15 +1787,15 @@
|
|
|
1787
1787
|
// "http://10.241.100.157:8002/WsEcl/submit/query/roxie/carmigjx_govbisgsavi.Ins4621360_Service_00000006/json",
|
|
1788
1788
|
var parts = _.split("/WsEcl/submit/query/");
|
|
1789
1789
|
if (parts.length < 2)
|
|
1790
|
-
throw new Error("Invalid roxie URL: "
|
|
1790
|
+
throw new Error("Invalid roxie URL: ".concat(_));
|
|
1791
1791
|
var urlParts = parts[0].split(":");
|
|
1792
1792
|
if (urlParts.length < 3)
|
|
1793
|
-
throw new Error("Invalid roxie URL: "
|
|
1793
|
+
throw new Error("Invalid roxie URL: ".concat(_));
|
|
1794
1794
|
var roxieParts = parts[1].split("/");
|
|
1795
1795
|
if (roxieParts.length < 2)
|
|
1796
|
-
throw new Error("Invalid roxie URL: "
|
|
1796
|
+
throw new Error("Invalid roxie URL: ".concat(_));
|
|
1797
1797
|
return {
|
|
1798
|
-
url: urlParts[0]
|
|
1798
|
+
url: "".concat(urlParts[0], ":").concat(urlParts[1], ":").concat(urlParts[2] === "18002" ? "18010" : "8010"),
|
|
1799
1799
|
querySet: roxieParts[0],
|
|
1800
1800
|
queryID: roxieParts[1]
|
|
1801
1801
|
};
|
|
@@ -1814,7 +1814,7 @@
|
|
|
1814
1814
|
_this._ec = _ec;
|
|
1815
1815
|
_this._responseFields = {};
|
|
1816
1816
|
_this._type = "roxie";
|
|
1817
|
-
_this._submitQ = new util$
|
|
1817
|
+
_this._submitQ = new util$6.AsyncOrderedQueue();
|
|
1818
1818
|
return _this;
|
|
1819
1819
|
}
|
|
1820
1820
|
RoxieService.prototype.toDDL = function () {
|
|
@@ -1849,7 +1849,7 @@
|
|
|
1849
1849
|
};
|
|
1850
1850
|
RoxieService.prototype.hash = function (more) {
|
|
1851
1851
|
if (more === void 0) { more = {}; }
|
|
1852
|
-
return util$
|
|
1852
|
+
return util$6.hashSum(__assign$1({ url: this.url(), querySet: this.querySet(), queryId: this.queryID(), ignoreHipieRequest: this.ignoreHipieRequest(), ignoreHipieResponse: this.ignoreHipieResponse() }, more));
|
|
1853
1853
|
};
|
|
1854
1854
|
RoxieService.prototype.label = function () {
|
|
1855
1855
|
return this.queryID();
|
|
@@ -1895,7 +1895,7 @@
|
|
|
1895
1895
|
return this;
|
|
1896
1896
|
};
|
|
1897
1897
|
RoxieService.prototype.submit = function (request) {
|
|
1898
|
-
var requestHash = util$
|
|
1898
|
+
var requestHash = util$6.hashSum(request);
|
|
1899
1899
|
if (!this._prevPromise || this._prevRequestHash !== requestHash) {
|
|
1900
1900
|
this._prevRequestHash = requestHash;
|
|
1901
1901
|
this._prevPromise = this._submitQ.push(this._query.submit(request));
|
|
@@ -1966,12 +1966,12 @@
|
|
|
1966
1966
|
};
|
|
1967
1967
|
RoxieResult.fromDDL = function (ec, rs, resultName) {
|
|
1968
1968
|
return new RoxieResult(ec)
|
|
1969
|
-
.id(rs.id()
|
|
1969
|
+
.id("".concat(rs.id(), "_").concat(resultName))
|
|
1970
1970
|
.service(rs)
|
|
1971
1971
|
.resultName(resultName);
|
|
1972
1972
|
};
|
|
1973
1973
|
RoxieResult.prototype.serviceID = function () {
|
|
1974
|
-
return this.service().url()
|
|
1974
|
+
return "".concat(this.service().url(), "/").concat(this.service().querySet(), "/").concat(this.service().queryID());
|
|
1975
1975
|
};
|
|
1976
1976
|
RoxieResult.prototype.sourceHash = function () {
|
|
1977
1977
|
return this.service().hash();
|
|
@@ -1987,10 +1987,10 @@
|
|
|
1987
1987
|
};
|
|
1988
1988
|
RoxieResult.prototype.hash = function (more) {
|
|
1989
1989
|
if (more === void 0) { more = {}; }
|
|
1990
|
-
return util$
|
|
1990
|
+
return util$6.hashSum(__assign$1({ source: this.sourceHash(), resultName: this.resultName() }, more));
|
|
1991
1991
|
};
|
|
1992
1992
|
RoxieResult.prototype.label = function () {
|
|
1993
|
-
return this.service().label()
|
|
1993
|
+
return "".concat(this.service().label(), "\n").concat(this.resultName());
|
|
1994
1994
|
};
|
|
1995
1995
|
RoxieResult.prototype.computeFields = function (inFields) {
|
|
1996
1996
|
var _this = this;
|
|
@@ -2093,7 +2093,7 @@
|
|
|
2093
2093
|
});
|
|
2094
2094
|
};
|
|
2095
2095
|
RoxieResultRef.prototype.label = function () {
|
|
2096
|
-
return this.datasource().label()
|
|
2096
|
+
return "".concat(this.datasource().label(), "\n").concat(this.datasource().resultName());
|
|
2097
2097
|
};
|
|
2098
2098
|
RoxieResultRef.prototype.elementIDs = function () {
|
|
2099
2099
|
return this._ec.elementIDs();
|
|
@@ -2123,7 +2123,7 @@
|
|
|
2123
2123
|
var _this = this;
|
|
2124
2124
|
return this.datasource().refreshMeta().then(function () {
|
|
2125
2125
|
var oldParams = _this.request();
|
|
2126
|
-
var diffs = util$
|
|
2126
|
+
var diffs = util$6.compare(oldParams.map(function (p) { return p.localField(); }), _this.datasource().requestFields().map(function (ff) { return ff.id; }));
|
|
2127
2127
|
var newParams = oldParams.filter(function (op) { return diffs.update.indexOf(op.localField()) >= 0; });
|
|
2128
2128
|
_this.request(newParams.concat(diffs.enter.map(function (label) { return new Param(_this._ec).localField(label); })));
|
|
2129
2129
|
});
|
|
@@ -2169,7 +2169,7 @@
|
|
|
2169
2169
|
var _this = this;
|
|
2170
2170
|
return _super.prototype.exec.call(this).then(function () {
|
|
2171
2171
|
var request = _this.formatRequest();
|
|
2172
|
-
var requestHash = util$
|
|
2172
|
+
var requestHash = util$6.hashSum({ hash: _this.hash(), request: request });
|
|
2173
2173
|
if (_this._prevRequestHash !== requestHash) {
|
|
2174
2174
|
_this._prevRequestHash = requestHash;
|
|
2175
2175
|
_this._prevRequestPromise = _this.datasource().submit(request).then(function (response) {
|
|
@@ -2218,7 +2218,7 @@
|
|
|
2218
2218
|
var request = {};
|
|
2219
2219
|
for (var key in _request) {
|
|
2220
2220
|
request[key] = _request[key];
|
|
2221
|
-
request[key
|
|
2221
|
+
request["".concat(key, "_changed")] = true;
|
|
2222
2222
|
}
|
|
2223
2223
|
return request;
|
|
2224
2224
|
};
|
|
@@ -2233,7 +2233,7 @@
|
|
|
2233
2233
|
var _this = _super.call(this) || this;
|
|
2234
2234
|
_this._ec = _ec;
|
|
2235
2235
|
_this._nullDatasource = emptyDatabomb;
|
|
2236
|
-
_this._id = "ds_"
|
|
2236
|
+
_this._id = "ds_".concat(++dsPickerID);
|
|
2237
2237
|
var ds = _this._ec.datasources()[0];
|
|
2238
2238
|
_this.datasourceID(ds.id());
|
|
2239
2239
|
return _this;
|
|
@@ -2290,18 +2290,18 @@
|
|
|
2290
2290
|
return this.selection().validate();
|
|
2291
2291
|
};
|
|
2292
2292
|
DSPicker.prototype.toDDL = function () {
|
|
2293
|
-
return __assign(__assign({}, this.datasourceRef().toDDL()), { id: this.datasourceID() });
|
|
2293
|
+
return __assign$1(__assign$1({}, this.datasourceRef().toDDL()), { id: this.datasourceID() });
|
|
2294
2294
|
};
|
|
2295
2295
|
// Activity overrides ---
|
|
2296
2296
|
DSPicker.prototype.hash = function (more) {
|
|
2297
2297
|
if (more === void 0) { more = {}; }
|
|
2298
|
-
return _super.prototype.hash.call(this, __assign({}, more));
|
|
2298
|
+
return _super.prototype.hash.call(this, __assign$1({}, more));
|
|
2299
2299
|
};
|
|
2300
2300
|
DSPicker.prototype.datasourceIDs = function () {
|
|
2301
2301
|
return this._ec.datasources().map(function (ds) {
|
|
2302
2302
|
return {
|
|
2303
2303
|
value: ds.id(),
|
|
2304
|
-
text: ds.label()
|
|
2304
|
+
text: "".concat(ds.label(), " ").concat(ds.id() !== ds.label() ? " (".concat(ds.id(), ")") : "")
|
|
2305
2305
|
};
|
|
2306
2306
|
});
|
|
2307
2307
|
};
|
|
@@ -2317,8 +2317,23 @@
|
|
|
2317
2317
|
}(ActivitySelection));
|
|
2318
2318
|
DSPicker.prototype._class += " DSPicker";
|
|
2319
2319
|
|
|
2320
|
-
|
|
2321
|
-
|
|
2320
|
+
function _mergeNamespaces$1(n, m) {
|
|
2321
|
+
m.forEach(function (e) {
|
|
2322
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
2323
|
+
if (k !== 'default' && !(k in n)) {
|
|
2324
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
2325
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
2326
|
+
enumerable: true,
|
|
2327
|
+
get: function () { return e[k]; }
|
|
2328
|
+
});
|
|
2329
|
+
}
|
|
2330
|
+
});
|
|
2331
|
+
});
|
|
2332
|
+
return Object.freeze(n);
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
var PKG_NAME = "@hpcc-js/ddl-shim";
|
|
2336
|
+
var PKG_VERSION = "2.19.0";
|
|
2322
2337
|
|
|
2323
2338
|
function isWorkunitDatasource(ref) {
|
|
2324
2339
|
return ref.WUID !== undefined;
|
|
@@ -2383,7 +2398,7 @@
|
|
|
2383
2398
|
}
|
|
2384
2399
|
var VisibilitySet = ["normal", "flyout"];
|
|
2385
2400
|
|
|
2386
|
-
var v2 = /*#__PURE__*/Object.freeze({
|
|
2401
|
+
var v2$1 = /*#__PURE__*/Object.freeze({
|
|
2387
2402
|
__proto__: null,
|
|
2388
2403
|
isDatabombRef: isDatabombRef,
|
|
2389
2404
|
isWUResultRef: isWUResultRef,
|
|
@@ -2413,25 +2428,25 @@
|
|
|
2413
2428
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2414
2429
|
***************************************************************************** */
|
|
2415
2430
|
|
|
2416
|
-
var __assign
|
|
2417
|
-
__assign
|
|
2431
|
+
var __assign = function() {
|
|
2432
|
+
__assign = Object.assign || function __assign(t) {
|
|
2418
2433
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2419
2434
|
s = arguments[i];
|
|
2420
2435
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
2421
2436
|
}
|
|
2422
2437
|
return t;
|
|
2423
2438
|
};
|
|
2424
|
-
return __assign
|
|
2439
|
+
return __assign.apply(this, arguments);
|
|
2425
2440
|
};
|
|
2426
2441
|
|
|
2427
|
-
function __spreadArray
|
|
2442
|
+
function __spreadArray(to, from, pack) {
|
|
2428
2443
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2429
2444
|
if (ar || !(i in from)) {
|
|
2430
2445
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2431
2446
|
ar[i] = from[i];
|
|
2432
2447
|
}
|
|
2433
2448
|
}
|
|
2434
|
-
return to.concat(ar || from);
|
|
2449
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2435
2450
|
}
|
|
2436
2451
|
|
|
2437
2452
|
var classMappings = {
|
|
@@ -2647,7 +2662,7 @@
|
|
|
2647
2662
|
});
|
|
2648
2663
|
return retVal;
|
|
2649
2664
|
}
|
|
2650
|
-
function upgrade(ddl2, dermObj) {
|
|
2665
|
+
function upgrade$1(ddl2, dermObj) {
|
|
2651
2666
|
apply_to_dataviews(ddl2, dermObj);
|
|
2652
2667
|
return apply_to_properties_layout(ddl2, dermObj);
|
|
2653
2668
|
}
|
|
@@ -2867,7 +2882,7 @@
|
|
|
2867
2882
|
break;
|
|
2868
2883
|
default:
|
|
2869
2884
|
groupByColumns.push(this.toLowerCase(field.id));
|
|
2870
|
-
throw new Error("Unhandled field function: "
|
|
2885
|
+
throw new Error("Unhandled field function: ".concat(field.properties.function));
|
|
2871
2886
|
}
|
|
2872
2887
|
}
|
|
2873
2888
|
else {
|
|
@@ -2878,7 +2893,7 @@
|
|
|
2878
2893
|
this._ddl2DataviewActivities[viz.id].project.transformations = projectTransformations;
|
|
2879
2894
|
}
|
|
2880
2895
|
if (aggrFields.length) {
|
|
2881
|
-
this._ddl2DataviewActivities[viz.id].groupBy.groupByIDs = __spreadArray
|
|
2896
|
+
this._ddl2DataviewActivities[viz.id].groupBy.groupByIDs = __spreadArray([], groupByColumns, true);
|
|
2882
2897
|
this._ddl2DataviewActivities[viz.id].groupBy.aggregates = aggrFields;
|
|
2883
2898
|
}
|
|
2884
2899
|
}
|
|
@@ -2896,7 +2911,7 @@
|
|
|
2896
2911
|
case "MAX":
|
|
2897
2912
|
return "max";
|
|
2898
2913
|
}
|
|
2899
|
-
throw new Error("Unknown DDL1 Function Type: "
|
|
2914
|
+
throw new Error("Unknown DDL1 Function Type: ".concat(func));
|
|
2900
2915
|
};
|
|
2901
2916
|
DDLUpgrade.prototype.readMappings = function () {
|
|
2902
2917
|
for (var _i = 0, _a = this._ddl.dashboards; _i < _a.length; _i++) {
|
|
@@ -2923,7 +2938,7 @@
|
|
|
2923
2938
|
this.readSliderMappings(viz);
|
|
2924
2939
|
}
|
|
2925
2940
|
else {
|
|
2926
|
-
throw new Error("Unkown DDL1 mapping type: "
|
|
2941
|
+
throw new Error("Unkown DDL1 mapping type: ".concat(viz.type));
|
|
2927
2942
|
}
|
|
2928
2943
|
}
|
|
2929
2944
|
}
|
|
@@ -3038,7 +3053,7 @@
|
|
|
3038
3053
|
var flag = _a[_i];
|
|
3039
3054
|
if (flag.fieldid) {
|
|
3040
3055
|
mappings.transformations.push({
|
|
3041
|
-
fieldID: "annotation_"
|
|
3056
|
+
fieldID: "annotation_".concat(idx++),
|
|
3042
3057
|
type: "map",
|
|
3043
3058
|
sourceFieldID: this.toLowerCase(flag.fieldid),
|
|
3044
3059
|
default: {},
|
|
@@ -3097,7 +3112,7 @@
|
|
|
3097
3112
|
var mapping = update.mappings[key];
|
|
3098
3113
|
var dsFilter = (mapping && dsFilters[mapping]) ? dsFilters[mapping].filter : undefined;
|
|
3099
3114
|
if (!dsFilter) {
|
|
3100
|
-
console.warn("Select Mapping \""
|
|
3115
|
+
console.warn("Select Mapping \"".concat(mapping, "\" in viz \"").concat(viz.id, "\" not found in filters for \"").concat(otherViz.id, "\""));
|
|
3101
3116
|
}
|
|
3102
3117
|
else {
|
|
3103
3118
|
condition.mappings.push({
|
|
@@ -3208,7 +3223,7 @@
|
|
|
3208
3223
|
groupBy,
|
|
3209
3224
|
limit
|
|
3210
3225
|
],
|
|
3211
|
-
visualization: __assign
|
|
3226
|
+
visualization: __assign(__assign({ id: viz.id, title: viz.title || "", description: "", visibility: viz.properties && viz.properties.flyout === true ? "flyout" : "normal" }, this.type2chartType(viz.type)), { mappings: mappings, properties: (viz.properties || {}) })
|
|
3212
3227
|
};
|
|
3213
3228
|
};
|
|
3214
3229
|
DDLUpgrade.prototype.type2chartType = function (chartType) {
|
|
@@ -3338,8 +3353,8 @@
|
|
|
3338
3353
|
return {
|
|
3339
3354
|
version: "2.2.1",
|
|
3340
3355
|
createdBy: {
|
|
3341
|
-
name: PKG_NAME
|
|
3342
|
-
version: PKG_VERSION
|
|
3356
|
+
name: PKG_NAME,
|
|
3357
|
+
version: PKG_VERSION
|
|
3343
3358
|
},
|
|
3344
3359
|
datasources: this.writeDatasources(),
|
|
3345
3360
|
dataviews: this.writeDataviews(),
|
|
@@ -3348,43 +3363,24 @@
|
|
|
3348
3363
|
};
|
|
3349
3364
|
return DDLUpgrade;
|
|
3350
3365
|
}());
|
|
3351
|
-
function upgrade
|
|
3366
|
+
function upgrade(ddl, baseUrl, wuid, toLowerCase, dermatologyJson) {
|
|
3352
3367
|
if (toLowerCase === void 0) { toLowerCase = true; }
|
|
3353
3368
|
if (dermatologyJson === void 0) { dermatologyJson = {}; }
|
|
3354
3369
|
var ddlUp = new DDLUpgrade(ddl, baseUrl, wuid, toLowerCase);
|
|
3355
3370
|
var retVal = ddlUp.write();
|
|
3356
|
-
retVal.properties = upgrade(retVal, dermatologyJson);
|
|
3371
|
+
retVal.properties = upgrade$1(retVal, dermatologyJson);
|
|
3357
3372
|
return retVal;
|
|
3358
3373
|
}
|
|
3359
3374
|
|
|
3360
3375
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
3361
3376
|
|
|
3362
|
-
|
|
3363
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3364
|
-
}
|
|
3365
|
-
|
|
3366
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
3367
|
-
return module = {
|
|
3368
|
-
path: basedir,
|
|
3369
|
-
exports: {},
|
|
3370
|
-
require: function (path, base) {
|
|
3371
|
-
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
3372
|
-
}
|
|
3373
|
-
}, fn(module, module.exports), module.exports;
|
|
3374
|
-
}
|
|
3375
|
-
|
|
3376
|
-
function getCjsExportFromNamespace (n) {
|
|
3377
|
-
return n && n['default'] || n;
|
|
3378
|
-
}
|
|
3379
|
-
|
|
3380
|
-
function commonjsRequire () {
|
|
3381
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
3382
|
-
}
|
|
3377
|
+
var uri_all = {exports: {}};
|
|
3383
3378
|
|
|
3384
|
-
var uri_all = createCommonjsModule(function (module, exports) {
|
|
3385
3379
|
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
3380
|
+
|
|
3381
|
+
(function (module, exports) {
|
|
3386
3382
|
(function (global, factory) {
|
|
3387
|
-
|
|
3383
|
+
factory(exports) ;
|
|
3388
3384
|
}(commonjsGlobal, (function (exports) {
|
|
3389
3385
|
function merge() {
|
|
3390
3386
|
for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -3438,10 +3434,10 @@
|
|
|
3438
3434
|
//subset, excludes bidi control characters
|
|
3439
3435
|
IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
|
|
3440
3436
|
//subset
|
|
3441
|
-
UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$)
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
|
|
3437
|
+
UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$);
|
|
3438
|
+
subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*");
|
|
3439
|
+
subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*");
|
|
3440
|
+
var DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
|
|
3445
3441
|
//relaxed parsing rules
|
|
3446
3442
|
IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
|
|
3447
3443
|
H16$ = subexp(HEXDIG$$ + "{1,4}"),
|
|
@@ -3465,14 +3461,14 @@
|
|
|
3465
3461
|
IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
|
|
3466
3462
|
//[ *6( h16 ":" ) h16 ] "::"
|
|
3467
3463
|
IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
|
|
3468
|
-
ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+")
|
|
3464
|
+
ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+");
|
|
3469
3465
|
//RFC 6874, with relaxed parsing rules
|
|
3470
|
-
|
|
3466
|
+
subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+");
|
|
3471
3467
|
//RFC 6874
|
|
3472
|
-
|
|
3473
|
-
PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]"))
|
|
3474
|
-
|
|
3475
|
-
|
|
3468
|
+
subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*");
|
|
3469
|
+
var PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]"));
|
|
3470
|
+
subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+");
|
|
3471
|
+
subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*");
|
|
3476
3472
|
return {
|
|
3477
3473
|
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
|
3478
3474
|
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
@@ -4586,7 +4582,7 @@
|
|
|
4586
4582
|
|
|
4587
4583
|
var O = {};
|
|
4588
4584
|
//RFC 3986
|
|
4589
|
-
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (
|
|
4585
|
+
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ("\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]";
|
|
4590
4586
|
var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
|
|
4591
4587
|
var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
|
|
4592
4588
|
//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
|
|
@@ -4784,9 +4780,7 @@
|
|
|
4784
4780
|
|
|
4785
4781
|
})));
|
|
4786
4782
|
|
|
4787
|
-
});
|
|
4788
|
-
|
|
4789
|
-
unwrapExports(uri_all);
|
|
4783
|
+
}(uri_all, uri_all.exports));
|
|
4790
4784
|
|
|
4791
4785
|
// do not edit .js files directly - edit src/index.jst
|
|
4792
4786
|
|
|
@@ -4835,7 +4829,7 @@
|
|
|
4835
4829
|
|
|
4836
4830
|
// https://mathiasbynens.be/notes/javascript-encoding
|
|
4837
4831
|
// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
|
|
4838
|
-
var ucs2length = function ucs2length(str) {
|
|
4832
|
+
var ucs2length$1 = function ucs2length(str) {
|
|
4839
4833
|
var length = 0
|
|
4840
4834
|
, len = str.length
|
|
4841
4835
|
, pos = 0
|
|
@@ -4852,16 +4846,16 @@
|
|
|
4852
4846
|
return length;
|
|
4853
4847
|
};
|
|
4854
4848
|
|
|
4855
|
-
var util = {
|
|
4849
|
+
var util$5 = {
|
|
4856
4850
|
copy: copy,
|
|
4857
4851
|
checkDataType: checkDataType,
|
|
4858
4852
|
checkDataTypes: checkDataTypes,
|
|
4859
4853
|
coerceToTypes: coerceToTypes,
|
|
4860
|
-
toHash: toHash,
|
|
4854
|
+
toHash: toHash$1,
|
|
4861
4855
|
getProperty: getProperty,
|
|
4862
4856
|
escapeQuotes: escapeQuotes,
|
|
4863
4857
|
equal: fastDeepEqual,
|
|
4864
|
-
ucs2length: ucs2length,
|
|
4858
|
+
ucs2length: ucs2length$1,
|
|
4865
4859
|
varOccurences: varOccurences,
|
|
4866
4860
|
varReplace: varReplace,
|
|
4867
4861
|
schemaHasRules: schemaHasRules,
|
|
@@ -4912,7 +4906,7 @@
|
|
|
4912
4906
|
case 1: return checkDataType(dataTypes[0], data, strictNumbers, true);
|
|
4913
4907
|
default:
|
|
4914
4908
|
var code = '';
|
|
4915
|
-
var types = toHash(dataTypes);
|
|
4909
|
+
var types = toHash$1(dataTypes);
|
|
4916
4910
|
if (types.array && types.object) {
|
|
4917
4911
|
code = types.null ? '(': '(!' + data + ' || ';
|
|
4918
4912
|
code += 'typeof ' + data + ' !== "object")';
|
|
@@ -4929,7 +4923,7 @@
|
|
|
4929
4923
|
}
|
|
4930
4924
|
|
|
4931
4925
|
|
|
4932
|
-
var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
|
|
4926
|
+
var COERCE_TO_TYPES = toHash$1([ 'string', 'number', 'integer', 'boolean', 'null' ]);
|
|
4933
4927
|
function coerceToTypes(optionCoerceTypes, dataTypes) {
|
|
4934
4928
|
if (Array.isArray(dataTypes)) {
|
|
4935
4929
|
var types = [];
|
|
@@ -4947,19 +4941,19 @@
|
|
|
4947
4941
|
}
|
|
4948
4942
|
|
|
4949
4943
|
|
|
4950
|
-
function toHash(arr) {
|
|
4944
|
+
function toHash$1(arr) {
|
|
4951
4945
|
var hash = {};
|
|
4952
4946
|
for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
|
|
4953
4947
|
return hash;
|
|
4954
4948
|
}
|
|
4955
4949
|
|
|
4956
4950
|
|
|
4957
|
-
var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
4951
|
+
var IDENTIFIER$1 = /^[a-z$_][a-z$_0-9]*$/i;
|
|
4958
4952
|
var SINGLE_QUOTE = /'|\\/g;
|
|
4959
4953
|
function getProperty(key) {
|
|
4960
4954
|
return typeof key == 'number'
|
|
4961
4955
|
? '[' + key + ']'
|
|
4962
|
-
: IDENTIFIER.test(key)
|
|
4956
|
+
: IDENTIFIER$1.test(key)
|
|
4963
4957
|
? '.' + key
|
|
4964
4958
|
: "['" + escapeQuotes(key) + "']";
|
|
4965
4959
|
}
|
|
@@ -5027,17 +5021,17 @@
|
|
|
5027
5021
|
}
|
|
5028
5022
|
|
|
5029
5023
|
|
|
5030
|
-
var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
|
|
5031
|
-
var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
5024
|
+
var JSON_POINTER$1 = /^\/(?:[^~]|~0|~1)*$/;
|
|
5025
|
+
var RELATIVE_JSON_POINTER$1 = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
5032
5026
|
function getData($data, lvl, paths) {
|
|
5033
5027
|
var up, jsonPointer, data, matches;
|
|
5034
5028
|
if ($data === '') return 'rootData';
|
|
5035
5029
|
if ($data[0] == '/') {
|
|
5036
|
-
if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
|
|
5030
|
+
if (!JSON_POINTER$1.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
|
|
5037
5031
|
jsonPointer = $data;
|
|
5038
5032
|
data = 'rootData';
|
|
5039
5033
|
} else {
|
|
5040
|
-
matches = $data.match(RELATIVE_JSON_POINTER);
|
|
5034
|
+
matches = $data.match(RELATIVE_JSON_POINTER$1);
|
|
5041
5035
|
if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
|
|
5042
5036
|
up = +matches[1];
|
|
5043
5037
|
jsonPointer = matches[2];
|
|
@@ -5089,15 +5083,17 @@
|
|
|
5089
5083
|
return str.replace(/~1/g, '/').replace(/~0/g, '~');
|
|
5090
5084
|
}
|
|
5091
5085
|
|
|
5092
|
-
var
|
|
5086
|
+
var util$4 = util$5;
|
|
5087
|
+
|
|
5088
|
+
var schema_obj = SchemaObject$2;
|
|
5093
5089
|
|
|
5094
|
-
function SchemaObject(obj) {
|
|
5095
|
-
util.copy(obj, this);
|
|
5090
|
+
function SchemaObject$2(obj) {
|
|
5091
|
+
util$4.copy(obj, this);
|
|
5096
5092
|
}
|
|
5097
5093
|
|
|
5098
|
-
var jsonSchemaTraverse =
|
|
5094
|
+
var jsonSchemaTraverse = {exports: {}};
|
|
5099
5095
|
|
|
5100
|
-
var traverse =
|
|
5096
|
+
var traverse$1 = jsonSchemaTraverse.exports = function (schema, opts, cb) {
|
|
5101
5097
|
// Legacy support for v0.3.1 and earlier.
|
|
5102
5098
|
if (typeof opts == 'function') {
|
|
5103
5099
|
cb = opts;
|
|
@@ -5112,7 +5108,7 @@
|
|
|
5112
5108
|
};
|
|
5113
5109
|
|
|
5114
5110
|
|
|
5115
|
-
traverse.keywords = {
|
|
5111
|
+
traverse$1.keywords = {
|
|
5116
5112
|
additionalItems: true,
|
|
5117
5113
|
items: true,
|
|
5118
5114
|
contains: true,
|
|
@@ -5121,21 +5117,21 @@
|
|
|
5121
5117
|
not: true
|
|
5122
5118
|
};
|
|
5123
5119
|
|
|
5124
|
-
traverse.arrayKeywords = {
|
|
5120
|
+
traverse$1.arrayKeywords = {
|
|
5125
5121
|
items: true,
|
|
5126
5122
|
allOf: true,
|
|
5127
5123
|
anyOf: true,
|
|
5128
5124
|
oneOf: true
|
|
5129
5125
|
};
|
|
5130
5126
|
|
|
5131
|
-
traverse.propsKeywords = {
|
|
5127
|
+
traverse$1.propsKeywords = {
|
|
5132
5128
|
definitions: true,
|
|
5133
5129
|
properties: true,
|
|
5134
5130
|
patternProperties: true,
|
|
5135
5131
|
dependencies: true
|
|
5136
5132
|
};
|
|
5137
5133
|
|
|
5138
|
-
traverse.skipKeywords = {
|
|
5134
|
+
traverse$1.skipKeywords = {
|
|
5139
5135
|
default: true,
|
|
5140
5136
|
enum: true,
|
|
5141
5137
|
const: true,
|
|
@@ -5163,16 +5159,16 @@
|
|
|
5163
5159
|
for (var key in schema) {
|
|
5164
5160
|
var sch = schema[key];
|
|
5165
5161
|
if (Array.isArray(sch)) {
|
|
5166
|
-
if (key in traverse.arrayKeywords) {
|
|
5162
|
+
if (key in traverse$1.arrayKeywords) {
|
|
5167
5163
|
for (var i=0; i<sch.length; i++)
|
|
5168
5164
|
_traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
|
|
5169
5165
|
}
|
|
5170
|
-
} else if (key in traverse.propsKeywords) {
|
|
5166
|
+
} else if (key in traverse$1.propsKeywords) {
|
|
5171
5167
|
if (sch && typeof sch == 'object') {
|
|
5172
5168
|
for (var prop in sch)
|
|
5173
5169
|
_traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
|
|
5174
5170
|
}
|
|
5175
|
-
} else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
|
|
5171
|
+
} else if (key in traverse$1.keywords || (opts.allKeys && !(key in traverse$1.skipKeywords))) {
|
|
5176
5172
|
_traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
|
|
5177
5173
|
}
|
|
5178
5174
|
}
|
|
@@ -5184,16 +5180,21 @@
|
|
|
5184
5180
|
function escapeJsonPtr(str) {
|
|
5185
5181
|
return str.replace(/~/g, '~0').replace(/\//g, '~1');
|
|
5186
5182
|
}
|
|
5187
|
-
});
|
|
5188
5183
|
|
|
5189
|
-
var
|
|
5184
|
+
var URI$1 = uri_all.exports
|
|
5185
|
+
, equal$1 = fastDeepEqual
|
|
5186
|
+
, util$3 = util$5
|
|
5187
|
+
, SchemaObject$1 = schema_obj
|
|
5188
|
+
, traverse = jsonSchemaTraverse.exports;
|
|
5189
|
+
|
|
5190
|
+
var resolve_1 = resolve$3;
|
|
5190
5191
|
|
|
5191
|
-
resolve.normalizeId = normalizeId;
|
|
5192
|
-
resolve.fullPath = getFullPath;
|
|
5193
|
-
resolve.url = resolveUrl;
|
|
5194
|
-
resolve.ids = resolveIds;
|
|
5195
|
-
resolve.inlineRef = inlineRef;
|
|
5196
|
-
resolve.schema = resolveSchema;
|
|
5192
|
+
resolve$3.normalizeId = normalizeId;
|
|
5193
|
+
resolve$3.fullPath = getFullPath;
|
|
5194
|
+
resolve$3.url = resolveUrl;
|
|
5195
|
+
resolve$3.ids = resolveIds;
|
|
5196
|
+
resolve$3.inlineRef = inlineRef;
|
|
5197
|
+
resolve$3.schema = resolveSchema;
|
|
5197
5198
|
|
|
5198
5199
|
/**
|
|
5199
5200
|
* [resolve and compile the references ($ref)]
|
|
@@ -5203,16 +5204,16 @@
|
|
|
5203
5204
|
* @param {String} ref reference to resolve
|
|
5204
5205
|
* @return {Object|Function} schema object (if the schema can be inlined) or validation function
|
|
5205
5206
|
*/
|
|
5206
|
-
function resolve(compile, root, ref) {
|
|
5207
|
+
function resolve$3(compile, root, ref) {
|
|
5207
5208
|
/* jshint validthis: true */
|
|
5208
5209
|
var refVal = this._refs[ref];
|
|
5209
5210
|
if (typeof refVal == 'string') {
|
|
5210
5211
|
if (this._refs[refVal]) refVal = this._refs[refVal];
|
|
5211
|
-
else return resolve.call(this, compile, root, refVal);
|
|
5212
|
+
else return resolve$3.call(this, compile, root, refVal);
|
|
5212
5213
|
}
|
|
5213
5214
|
|
|
5214
5215
|
refVal = refVal || this._schemas[ref];
|
|
5215
|
-
if (refVal instanceof
|
|
5216
|
+
if (refVal instanceof SchemaObject$1) {
|
|
5216
5217
|
return inlineRef(refVal.schema, this._opts.inlineRefs)
|
|
5217
5218
|
? refVal.schema
|
|
5218
5219
|
: refVal.validate || this._compile(refVal);
|
|
@@ -5226,7 +5227,7 @@
|
|
|
5226
5227
|
baseId = res.baseId;
|
|
5227
5228
|
}
|
|
5228
5229
|
|
|
5229
|
-
if (schema instanceof
|
|
5230
|
+
if (schema instanceof SchemaObject$1) {
|
|
5230
5231
|
v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
|
|
5231
5232
|
} else if (schema !== undefined) {
|
|
5232
5233
|
v = inlineRef(schema, this._opts.inlineRefs)
|
|
@@ -5247,7 +5248,7 @@
|
|
|
5247
5248
|
*/
|
|
5248
5249
|
function resolveSchema(root, ref) {
|
|
5249
5250
|
/* jshint validthis: true */
|
|
5250
|
-
var p =
|
|
5251
|
+
var p = URI$1.parse(ref)
|
|
5251
5252
|
, refPath = _getFullPath(p)
|
|
5252
5253
|
, baseId = getFullPath(this._getId(root.schema));
|
|
5253
5254
|
if (Object.keys(root.schema).length === 0 || refPath !== baseId) {
|
|
@@ -5255,12 +5256,12 @@
|
|
|
5255
5256
|
var refVal = this._refs[id];
|
|
5256
5257
|
if (typeof refVal == 'string') {
|
|
5257
5258
|
return resolveRecursive.call(this, root, refVal, p);
|
|
5258
|
-
} else if (refVal instanceof
|
|
5259
|
+
} else if (refVal instanceof SchemaObject$1) {
|
|
5259
5260
|
if (!refVal.validate) this._compile(refVal);
|
|
5260
5261
|
root = refVal;
|
|
5261
5262
|
} else {
|
|
5262
5263
|
refVal = this._schemas[id];
|
|
5263
|
-
if (refVal instanceof
|
|
5264
|
+
if (refVal instanceof SchemaObject$1) {
|
|
5264
5265
|
if (!refVal.validate) this._compile(refVal);
|
|
5265
5266
|
if (id == normalizeId(ref))
|
|
5266
5267
|
return { schema: refVal, root: root, baseId: baseId };
|
|
@@ -5291,7 +5292,7 @@
|
|
|
5291
5292
|
}
|
|
5292
5293
|
|
|
5293
5294
|
|
|
5294
|
-
var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
|
|
5295
|
+
var PREVENT_SCOPE_CHANGE = util$3.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
|
|
5295
5296
|
/* @this Ajv */
|
|
5296
5297
|
function getJsonPointer(parsedRef, baseId, schema, root) {
|
|
5297
5298
|
/* jshint validthis: true */
|
|
@@ -5302,7 +5303,7 @@
|
|
|
5302
5303
|
for (var i = 1; i < parts.length; i++) {
|
|
5303
5304
|
var part = parts[i];
|
|
5304
5305
|
if (part) {
|
|
5305
|
-
part = util.unescapeFragment(part);
|
|
5306
|
+
part = util$3.unescapeFragment(part);
|
|
5306
5307
|
schema = schema[part];
|
|
5307
5308
|
if (schema === undefined) break;
|
|
5308
5309
|
var id;
|
|
@@ -5326,7 +5327,7 @@
|
|
|
5326
5327
|
}
|
|
5327
5328
|
|
|
5328
5329
|
|
|
5329
|
-
var SIMPLE_INLINED = util.toHash([
|
|
5330
|
+
var SIMPLE_INLINED = util$3.toHash([
|
|
5330
5331
|
'type', 'format', 'pattern',
|
|
5331
5332
|
'maxLength', 'minLength',
|
|
5332
5333
|
'maxProperties', 'minProperties',
|
|
@@ -5386,13 +5387,13 @@
|
|
|
5386
5387
|
|
|
5387
5388
|
function getFullPath(id, normalize) {
|
|
5388
5389
|
if (normalize !== false) id = normalizeId(id);
|
|
5389
|
-
var p =
|
|
5390
|
+
var p = URI$1.parse(id);
|
|
5390
5391
|
return _getFullPath(p);
|
|
5391
5392
|
}
|
|
5392
5393
|
|
|
5393
5394
|
|
|
5394
5395
|
function _getFullPath(p) {
|
|
5395
|
-
return
|
|
5396
|
+
return URI$1.serialize(p).split('#')[0] + '#';
|
|
5396
5397
|
}
|
|
5397
5398
|
|
|
5398
5399
|
|
|
@@ -5404,7 +5405,7 @@
|
|
|
5404
5405
|
|
|
5405
5406
|
function resolveUrl(baseId, id) {
|
|
5406
5407
|
id = normalizeId(id);
|
|
5407
|
-
return
|
|
5408
|
+
return URI$1.resolve(baseId, id);
|
|
5408
5409
|
}
|
|
5409
5410
|
|
|
5410
5411
|
|
|
@@ -5416,25 +5417,25 @@
|
|
|
5416
5417
|
var localRefs = {};
|
|
5417
5418
|
var self = this;
|
|
5418
5419
|
|
|
5419
|
-
|
|
5420
|
+
traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
|
|
5420
5421
|
if (jsonPtr === '') return;
|
|
5421
5422
|
var id = self._getId(sch);
|
|
5422
5423
|
var baseId = baseIds[parentJsonPtr];
|
|
5423
5424
|
var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
|
|
5424
5425
|
if (keyIndex !== undefined)
|
|
5425
|
-
fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
|
|
5426
|
+
fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util$3.escapeFragment(keyIndex));
|
|
5426
5427
|
|
|
5427
5428
|
if (typeof id == 'string') {
|
|
5428
|
-
id = baseId = normalizeId(baseId ?
|
|
5429
|
+
id = baseId = normalizeId(baseId ? URI$1.resolve(baseId, id) : id);
|
|
5429
5430
|
|
|
5430
5431
|
var refVal = self._refs[id];
|
|
5431
5432
|
if (typeof refVal == 'string') refVal = self._refs[refVal];
|
|
5432
5433
|
if (refVal && refVal.schema) {
|
|
5433
|
-
if (!
|
|
5434
|
+
if (!equal$1(sch, refVal.schema))
|
|
5434
5435
|
throw new Error('id "' + id + '" resolves to more than one schema');
|
|
5435
5436
|
} else if (id != normalizeId(fullPath)) {
|
|
5436
5437
|
if (id[0] == '#') {
|
|
5437
|
-
if (localRefs[id] && !
|
|
5438
|
+
if (localRefs[id] && !equal$1(sch, localRefs[id]))
|
|
5438
5439
|
throw new Error('id "' + id + '" resolves to more than one schema');
|
|
5439
5440
|
localRefs[id] = sch;
|
|
5440
5441
|
} else {
|
|
@@ -5449,28 +5450,30 @@
|
|
|
5449
5450
|
return localRefs;
|
|
5450
5451
|
}
|
|
5451
5452
|
|
|
5453
|
+
var resolve$2 = resolve_1;
|
|
5454
|
+
|
|
5452
5455
|
var error_classes = {
|
|
5453
|
-
Validation: errorSubclass(ValidationError),
|
|
5454
|
-
MissingRef: errorSubclass(MissingRefError)
|
|
5456
|
+
Validation: errorSubclass(ValidationError$1),
|
|
5457
|
+
MissingRef: errorSubclass(MissingRefError$1)
|
|
5455
5458
|
};
|
|
5456
5459
|
|
|
5457
5460
|
|
|
5458
|
-
function ValidationError(errors) {
|
|
5461
|
+
function ValidationError$1(errors) {
|
|
5459
5462
|
this.message = 'validation failed';
|
|
5460
5463
|
this.errors = errors;
|
|
5461
5464
|
this.ajv = this.validation = true;
|
|
5462
5465
|
}
|
|
5463
5466
|
|
|
5464
5467
|
|
|
5465
|
-
MissingRefError.message = function (baseId, ref) {
|
|
5468
|
+
MissingRefError$1.message = function (baseId, ref) {
|
|
5466
5469
|
return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
|
|
5467
5470
|
};
|
|
5468
5471
|
|
|
5469
5472
|
|
|
5470
|
-
function MissingRefError(baseId, ref, message) {
|
|
5471
|
-
this.message = message || MissingRefError.message(baseId, ref);
|
|
5472
|
-
this.missingRef =
|
|
5473
|
-
this.missingSchema =
|
|
5473
|
+
function MissingRefError$1(baseId, ref, message) {
|
|
5474
|
+
this.message = message || MissingRefError$1.message(baseId, ref);
|
|
5475
|
+
this.missingRef = resolve$2.url(baseId, ref);
|
|
5476
|
+
this.missingSchema = resolve$2.normalizeId(resolve$2.fullPath(this.missingRef));
|
|
5474
5477
|
}
|
|
5475
5478
|
|
|
5476
5479
|
|
|
@@ -5538,7 +5541,7 @@
|
|
|
5538
5541
|
})(data);
|
|
5539
5542
|
};
|
|
5540
5543
|
|
|
5541
|
-
var validate = function generate_validate(it, $keyword, $ruleType) {
|
|
5544
|
+
var validate$1 = function generate_validate(it, $keyword, $ruleType) {
|
|
5542
5545
|
var out = '';
|
|
5543
5546
|
var $async = it.schema.$async === true,
|
|
5544
5547
|
$refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
|
|
@@ -6020,17 +6023,24 @@
|
|
|
6020
6023
|
return out;
|
|
6021
6024
|
};
|
|
6022
6025
|
|
|
6026
|
+
var resolve$1 = resolve_1
|
|
6027
|
+
, util$2 = util$5
|
|
6028
|
+
, errorClasses$1 = error_classes
|
|
6029
|
+
, stableStringify$1 = fastJsonStableStringify;
|
|
6030
|
+
|
|
6031
|
+
var validateGenerator = validate$1;
|
|
6032
|
+
|
|
6023
6033
|
/**
|
|
6024
6034
|
* Functions below are used inside compiled validations function
|
|
6025
6035
|
*/
|
|
6026
6036
|
|
|
6027
|
-
var ucs2length
|
|
6028
|
-
|
|
6037
|
+
var ucs2length = util$2.ucs2length;
|
|
6038
|
+
var equal = fastDeepEqual;
|
|
6029
6039
|
|
|
6030
6040
|
// this error is thrown by async schemas to return validation errors via exception
|
|
6031
|
-
var ValidationError
|
|
6041
|
+
var ValidationError = errorClasses$1.Validation;
|
|
6032
6042
|
|
|
6033
|
-
var compile_1 = compile;
|
|
6043
|
+
var compile_1 = compile$1;
|
|
6034
6044
|
|
|
6035
6045
|
|
|
6036
6046
|
/**
|
|
@@ -6042,7 +6052,7 @@
|
|
|
6042
6052
|
* @param {String} baseId base ID for IDs in the schema
|
|
6043
6053
|
* @return {Function} validation function
|
|
6044
6054
|
*/
|
|
6045
|
-
function compile(schema, root, localRefs, baseId) {
|
|
6055
|
+
function compile$1(schema, root, localRefs, baseId) {
|
|
6046
6056
|
/* jshint validthis: true, evil: true */
|
|
6047
6057
|
/* eslint no-shadow: 0 */
|
|
6048
6058
|
var self = this
|
|
@@ -6094,11 +6104,11 @@
|
|
|
6094
6104
|
function localCompile(_schema, _root, localRefs, baseId) {
|
|
6095
6105
|
var isRoot = !_root || (_root && _root.schema == _schema);
|
|
6096
6106
|
if (_root.schema != root.schema)
|
|
6097
|
-
return compile.call(self, _schema, _root, localRefs, baseId);
|
|
6107
|
+
return compile$1.call(self, _schema, _root, localRefs, baseId);
|
|
6098
6108
|
|
|
6099
6109
|
var $async = _schema.$async === true;
|
|
6100
6110
|
|
|
6101
|
-
var sourceCode =
|
|
6111
|
+
var sourceCode = validateGenerator({
|
|
6102
6112
|
isTop: true,
|
|
6103
6113
|
schema: _schema,
|
|
6104
6114
|
isRoot: isRoot,
|
|
@@ -6107,11 +6117,11 @@
|
|
|
6107
6117
|
schemaPath: '',
|
|
6108
6118
|
errSchemaPath: '#',
|
|
6109
6119
|
errorPath: '""',
|
|
6110
|
-
MissingRefError:
|
|
6120
|
+
MissingRefError: errorClasses$1.MissingRef,
|
|
6111
6121
|
RULES: RULES,
|
|
6112
|
-
validate:
|
|
6113
|
-
util: util,
|
|
6114
|
-
resolve:
|
|
6122
|
+
validate: validateGenerator,
|
|
6123
|
+
util: util$2,
|
|
6124
|
+
resolve: resolve$1,
|
|
6115
6125
|
resolveRef: resolveRef,
|
|
6116
6126
|
usePattern: usePattern,
|
|
6117
6127
|
useDefault: useDefault,
|
|
@@ -6123,12 +6133,12 @@
|
|
|
6123
6133
|
});
|
|
6124
6134
|
|
|
6125
6135
|
sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
|
|
6126
|
-
+ vars(defaults, defaultCode) + vars(customRules, customRuleCode)
|
|
6136
|
+
+ vars(defaults, defaultCode) + vars(customRules, customRuleCode$1)
|
|
6127
6137
|
+ sourceCode;
|
|
6128
6138
|
|
|
6129
6139
|
if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema);
|
|
6130
6140
|
// console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
|
|
6131
|
-
var validate
|
|
6141
|
+
var validate;
|
|
6132
6142
|
try {
|
|
6133
6143
|
var makeValidate = new Function(
|
|
6134
6144
|
'self',
|
|
@@ -6144,7 +6154,7 @@
|
|
|
6144
6154
|
sourceCode
|
|
6145
6155
|
);
|
|
6146
6156
|
|
|
6147
|
-
validate
|
|
6157
|
+
validate = makeValidate(
|
|
6148
6158
|
self,
|
|
6149
6159
|
RULES,
|
|
6150
6160
|
formats,
|
|
@@ -6152,36 +6162,36 @@
|
|
|
6152
6162
|
refVal,
|
|
6153
6163
|
defaults,
|
|
6154
6164
|
customRules,
|
|
6155
|
-
|
|
6156
|
-
ucs2length
|
|
6157
|
-
ValidationError
|
|
6165
|
+
equal,
|
|
6166
|
+
ucs2length,
|
|
6167
|
+
ValidationError
|
|
6158
6168
|
);
|
|
6159
6169
|
|
|
6160
|
-
refVal[0] = validate
|
|
6170
|
+
refVal[0] = validate;
|
|
6161
6171
|
} catch(e) {
|
|
6162
6172
|
self.logger.error('Error compiling schema, function code:', sourceCode);
|
|
6163
6173
|
throw e;
|
|
6164
6174
|
}
|
|
6165
6175
|
|
|
6166
|
-
validate
|
|
6167
|
-
validate
|
|
6168
|
-
validate
|
|
6169
|
-
validate
|
|
6170
|
-
validate
|
|
6171
|
-
if ($async) validate
|
|
6176
|
+
validate.schema = _schema;
|
|
6177
|
+
validate.errors = null;
|
|
6178
|
+
validate.refs = refs;
|
|
6179
|
+
validate.refVal = refVal;
|
|
6180
|
+
validate.root = isRoot ? validate : _root;
|
|
6181
|
+
if ($async) validate.$async = true;
|
|
6172
6182
|
if (opts.sourceCode === true) {
|
|
6173
|
-
validate
|
|
6183
|
+
validate.source = {
|
|
6174
6184
|
code: sourceCode,
|
|
6175
6185
|
patterns: patterns,
|
|
6176
6186
|
defaults: defaults
|
|
6177
6187
|
};
|
|
6178
6188
|
}
|
|
6179
6189
|
|
|
6180
|
-
return validate
|
|
6190
|
+
return validate;
|
|
6181
6191
|
}
|
|
6182
6192
|
|
|
6183
6193
|
function resolveRef(baseId, ref, isRoot) {
|
|
6184
|
-
ref =
|
|
6194
|
+
ref = resolve$1.url(baseId, ref);
|
|
6185
6195
|
var refIndex = refs[ref];
|
|
6186
6196
|
var _refVal, refCode;
|
|
6187
6197
|
if (refIndex !== undefined) {
|
|
@@ -6199,13 +6209,13 @@
|
|
|
6199
6209
|
}
|
|
6200
6210
|
|
|
6201
6211
|
refCode = addLocalRef(ref);
|
|
6202
|
-
var v =
|
|
6212
|
+
var v = resolve$1.call(self, localCompile, root, ref);
|
|
6203
6213
|
if (v === undefined) {
|
|
6204
6214
|
var localSchema = localRefs && localRefs[ref];
|
|
6205
6215
|
if (localSchema) {
|
|
6206
|
-
v =
|
|
6216
|
+
v = resolve$1.inlineRef(localSchema, opts.inlineRefs)
|
|
6207
6217
|
? localSchema
|
|
6208
|
-
: compile.call(self, localSchema, root, localRefs, baseId);
|
|
6218
|
+
: compile$1.call(self, localSchema, root, localRefs, baseId);
|
|
6209
6219
|
}
|
|
6210
6220
|
}
|
|
6211
6221
|
|
|
@@ -6254,10 +6264,10 @@
|
|
|
6254
6264
|
case 'number':
|
|
6255
6265
|
return '' + value;
|
|
6256
6266
|
case 'string':
|
|
6257
|
-
return util.toQuotedString(value);
|
|
6267
|
+
return util$2.toQuotedString(value);
|
|
6258
6268
|
case 'object':
|
|
6259
6269
|
if (value === null) return 'null';
|
|
6260
|
-
var valueStr =
|
|
6270
|
+
var valueStr = stableStringify$1(value);
|
|
6261
6271
|
var index = defaultsHash[valueStr];
|
|
6262
6272
|
if (index === undefined) {
|
|
6263
6273
|
index = defaultsHash[valueStr] = defaults.length;
|
|
@@ -6372,7 +6382,7 @@
|
|
|
6372
6382
|
|
|
6373
6383
|
|
|
6374
6384
|
function patternCode(i, patterns) {
|
|
6375
|
-
return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
|
|
6385
|
+
return 'var pattern' + i + ' = new RegExp(' + util$2.toQuotedString(patterns[i]) + ');';
|
|
6376
6386
|
}
|
|
6377
6387
|
|
|
6378
6388
|
|
|
@@ -6386,7 +6396,7 @@
|
|
|
6386
6396
|
}
|
|
6387
6397
|
|
|
6388
6398
|
|
|
6389
|
-
function customRuleCode(i) {
|
|
6399
|
+
function customRuleCode$1(i) {
|
|
6390
6400
|
return 'var customRule' + i + ' = customRules[' + i + '];';
|
|
6391
6401
|
}
|
|
6392
6402
|
|
|
@@ -6399,33 +6409,33 @@
|
|
|
6399
6409
|
return code;
|
|
6400
6410
|
}
|
|
6401
6411
|
|
|
6402
|
-
var cache =
|
|
6403
|
-
|
|
6412
|
+
var cache = {exports: {}};
|
|
6404
6413
|
|
|
6405
|
-
var Cache =
|
|
6414
|
+
var Cache$1 = cache.exports = function Cache() {
|
|
6406
6415
|
this._cache = {};
|
|
6407
6416
|
};
|
|
6408
6417
|
|
|
6409
6418
|
|
|
6410
|
-
Cache.prototype.put = function Cache_put(key, value) {
|
|
6419
|
+
Cache$1.prototype.put = function Cache_put(key, value) {
|
|
6411
6420
|
this._cache[key] = value;
|
|
6412
6421
|
};
|
|
6413
6422
|
|
|
6414
6423
|
|
|
6415
|
-
Cache.prototype.get = function Cache_get(key) {
|
|
6424
|
+
Cache$1.prototype.get = function Cache_get(key) {
|
|
6416
6425
|
return this._cache[key];
|
|
6417
6426
|
};
|
|
6418
6427
|
|
|
6419
6428
|
|
|
6420
|
-
Cache.prototype.del = function Cache_del(key) {
|
|
6429
|
+
Cache$1.prototype.del = function Cache_del(key) {
|
|
6421
6430
|
delete this._cache[key];
|
|
6422
6431
|
};
|
|
6423
6432
|
|
|
6424
6433
|
|
|
6425
|
-
Cache.prototype.clear = function Cache_clear() {
|
|
6434
|
+
Cache$1.prototype.clear = function Cache_clear() {
|
|
6426
6435
|
this._cache = {};
|
|
6427
6436
|
};
|
|
6428
|
-
|
|
6437
|
+
|
|
6438
|
+
var util$1 = util$5;
|
|
6429
6439
|
|
|
6430
6440
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
6431
6441
|
var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
|
|
@@ -6441,20 +6451,20 @@
|
|
|
6441
6451
|
// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu;
|
|
6442
6452
|
var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i;
|
|
6443
6453
|
var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
6444
|
-
var JSON_POINTER
|
|
6454
|
+
var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
|
|
6445
6455
|
var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
|
|
6446
|
-
var RELATIVE_JSON_POINTER
|
|
6456
|
+
var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
|
|
6447
6457
|
|
|
6448
6458
|
|
|
6449
|
-
var formats_1 = formats;
|
|
6459
|
+
var formats_1 = formats$1;
|
|
6450
6460
|
|
|
6451
|
-
function formats(mode) {
|
|
6461
|
+
function formats$1(mode) {
|
|
6452
6462
|
mode = mode == 'full' ? 'full' : 'fast';
|
|
6453
|
-
return util.copy(formats[mode]);
|
|
6463
|
+
return util$1.copy(formats$1[mode]);
|
|
6454
6464
|
}
|
|
6455
6465
|
|
|
6456
6466
|
|
|
6457
|
-
formats.fast = {
|
|
6467
|
+
formats$1.fast = {
|
|
6458
6468
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
6459
6469
|
date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
|
|
6460
6470
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -6479,14 +6489,14 @@
|
|
|
6479
6489
|
uuid: UUID,
|
|
6480
6490
|
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
6481
6491
|
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
|
6482
|
-
'json-pointer': JSON_POINTER
|
|
6492
|
+
'json-pointer': JSON_POINTER,
|
|
6483
6493
|
'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
|
|
6484
6494
|
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
|
6485
|
-
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6495
|
+
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6486
6496
|
};
|
|
6487
6497
|
|
|
6488
6498
|
|
|
6489
|
-
formats.full = {
|
|
6499
|
+
formats$1.full = {
|
|
6490
6500
|
date: date,
|
|
6491
6501
|
time: time,
|
|
6492
6502
|
'date-time': date_time,
|
|
@@ -6500,9 +6510,9 @@
|
|
|
6500
6510
|
ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,
|
|
6501
6511
|
regex: regex,
|
|
6502
6512
|
uuid: UUID,
|
|
6503
|
-
'json-pointer': JSON_POINTER
|
|
6513
|
+
'json-pointer': JSON_POINTER,
|
|
6504
6514
|
'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
|
|
6505
|
-
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6515
|
+
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6506
6516
|
};
|
|
6507
6517
|
|
|
6508
6518
|
|
|
@@ -6809,7 +6819,7 @@
|
|
|
6809
6819
|
var out = ' ';
|
|
6810
6820
|
var $schema = it.schema[$keyword];
|
|
6811
6821
|
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
|
|
6812
|
-
|
|
6822
|
+
!it.opts.allErrors;
|
|
6813
6823
|
var $comment = it.util.toQuotedString($schema);
|
|
6814
6824
|
if (it.opts.$comment === true) {
|
|
6815
6825
|
out += ' console.log(' + ($comment) + ');';
|
|
@@ -8295,7 +8305,7 @@
|
|
|
8295
8305
|
return out;
|
|
8296
8306
|
};
|
|
8297
8307
|
|
|
8298
|
-
var properties = function generate_properties(it, $keyword, $ruleType) {
|
|
8308
|
+
var properties$2 = function generate_properties(it, $keyword, $ruleType) {
|
|
8299
8309
|
var out = ' ';
|
|
8300
8310
|
var $lvl = it.level;
|
|
8301
8311
|
var $dataLvl = it.dataLevel;
|
|
@@ -8711,7 +8721,7 @@
|
|
|
8711
8721
|
return out;
|
|
8712
8722
|
};
|
|
8713
8723
|
|
|
8714
|
-
var required = function generate_required(it, $keyword, $ruleType) {
|
|
8724
|
+
var required$1 = function generate_required(it, $keyword, $ruleType) {
|
|
8715
8725
|
var out = ' ';
|
|
8716
8726
|
var $lvl = it.level;
|
|
8717
8727
|
var $dataLvl = it.dataLevel;
|
|
@@ -9088,16 +9098,17 @@
|
|
|
9088
9098
|
not: not,
|
|
9089
9099
|
oneOf: oneOf,
|
|
9090
9100
|
pattern: pattern,
|
|
9091
|
-
properties: properties,
|
|
9101
|
+
properties: properties$2,
|
|
9092
9102
|
propertyNames: propertyNames,
|
|
9093
|
-
required: required,
|
|
9103
|
+
required: required$1,
|
|
9094
9104
|
uniqueItems: uniqueItems,
|
|
9095
|
-
validate: validate
|
|
9105
|
+
validate: validate$1
|
|
9096
9106
|
};
|
|
9097
9107
|
|
|
9098
|
-
var
|
|
9108
|
+
var ruleModules = dotjs
|
|
9109
|
+
, toHash = util$5.toHash;
|
|
9099
9110
|
|
|
9100
|
-
var rules = function rules() {
|
|
9111
|
+
var rules$1 = function rules() {
|
|
9101
9112
|
var RULES = [
|
|
9102
9113
|
{ type: 'number',
|
|
9103
9114
|
rules: [ { 'maximum': ['exclusiveMaximum'] },
|
|
@@ -9121,8 +9132,8 @@
|
|
|
9121
9132
|
'additionalItems', 'then', 'else'
|
|
9122
9133
|
];
|
|
9123
9134
|
var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
|
|
9124
|
-
RULES.all = toHash
|
|
9125
|
-
RULES.types = toHash
|
|
9135
|
+
RULES.all = toHash(ALL);
|
|
9136
|
+
RULES.types = toHash(TYPES);
|
|
9126
9137
|
|
|
9127
9138
|
RULES.forEach(function (group) {
|
|
9128
9139
|
group.rules = group.rules.map(function (keyword) {
|
|
@@ -9139,7 +9150,7 @@
|
|
|
9139
9150
|
ALL.push(keyword);
|
|
9140
9151
|
var rule = RULES.all[keyword] = {
|
|
9141
9152
|
keyword: keyword,
|
|
9142
|
-
code:
|
|
9153
|
+
code: ruleModules[keyword],
|
|
9143
9154
|
implements: implKeywords
|
|
9144
9155
|
};
|
|
9145
9156
|
return rule;
|
|
@@ -9147,13 +9158,13 @@
|
|
|
9147
9158
|
|
|
9148
9159
|
RULES.all.$comment = {
|
|
9149
9160
|
keyword: '$comment',
|
|
9150
|
-
code:
|
|
9161
|
+
code: ruleModules.$comment
|
|
9151
9162
|
};
|
|
9152
9163
|
|
|
9153
9164
|
if (group.type) RULES.types[group.type] = group;
|
|
9154
9165
|
});
|
|
9155
9166
|
|
|
9156
|
-
RULES.keywords = toHash
|
|
9167
|
+
RULES.keywords = toHash(ALL.concat(KEYWORDS));
|
|
9157
9168
|
RULES.custom = {};
|
|
9158
9169
|
|
|
9159
9170
|
return RULES;
|
|
@@ -9207,7 +9218,7 @@
|
|
|
9207
9218
|
return metaSchema;
|
|
9208
9219
|
};
|
|
9209
9220
|
|
|
9210
|
-
var MissingRefError
|
|
9221
|
+
var MissingRefError = error_classes.MissingRef;
|
|
9211
9222
|
|
|
9212
9223
|
var async = compileAsync;
|
|
9213
9224
|
|
|
@@ -9260,7 +9271,7 @@
|
|
|
9260
9271
|
function _compileAsync(schemaObj) {
|
|
9261
9272
|
try { return self._compile(schemaObj); }
|
|
9262
9273
|
catch(e) {
|
|
9263
|
-
if (e instanceof MissingRefError
|
|
9274
|
+
if (e instanceof MissingRefError) return loadMissingSchema(e);
|
|
9264
9275
|
throw e;
|
|
9265
9276
|
}
|
|
9266
9277
|
|
|
@@ -9524,10 +9535,10 @@
|
|
|
9524
9535
|
return out;
|
|
9525
9536
|
};
|
|
9526
9537
|
|
|
9527
|
-
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
9528
|
-
var $id = "http://json-schema.org/draft-07/schema#";
|
|
9538
|
+
var $schema$2 = "http://json-schema.org/draft-07/schema#";
|
|
9539
|
+
var $id$1 = "http://json-schema.org/draft-07/schema#";
|
|
9529
9540
|
var title = "Core schema meta-schema";
|
|
9530
|
-
var definitions = {
|
|
9541
|
+
var definitions$1 = {
|
|
9531
9542
|
schemaArray: {
|
|
9532
9543
|
type: "array",
|
|
9533
9544
|
minItems: 1,
|
|
@@ -9570,7 +9581,7 @@
|
|
|
9570
9581
|
]
|
|
9571
9582
|
}
|
|
9572
9583
|
};
|
|
9573
|
-
var type = [
|
|
9584
|
+
var type$1 = [
|
|
9574
9585
|
"object",
|
|
9575
9586
|
"boolean"
|
|
9576
9587
|
];
|
|
@@ -9766,33 +9777,22 @@
|
|
|
9766
9777
|
$ref: "#"
|
|
9767
9778
|
}
|
|
9768
9779
|
};
|
|
9769
|
-
var
|
|
9770
|
-
$schema: $schema,
|
|
9771
|
-
$id: $id,
|
|
9780
|
+
var require$$13 = {
|
|
9781
|
+
$schema: $schema$2,
|
|
9782
|
+
$id: $id$1,
|
|
9772
9783
|
title: title,
|
|
9773
|
-
definitions: definitions,
|
|
9774
|
-
type: type,
|
|
9784
|
+
definitions: definitions$1,
|
|
9785
|
+
type: type$1,
|
|
9775
9786
|
properties: properties$1,
|
|
9776
9787
|
"default": true
|
|
9777
9788
|
};
|
|
9778
9789
|
|
|
9779
|
-
var
|
|
9780
|
-
__proto__: null,
|
|
9781
|
-
$schema: $schema,
|
|
9782
|
-
$id: $id,
|
|
9783
|
-
title: title,
|
|
9784
|
-
definitions: definitions,
|
|
9785
|
-
type: type,
|
|
9786
|
-
properties: properties$1,
|
|
9787
|
-
'default': jsonSchemaDraft07
|
|
9788
|
-
});
|
|
9789
|
-
|
|
9790
|
-
var require$$2 = getCjsExportFromNamespace(jsonSchemaDraft07$1);
|
|
9790
|
+
var metaSchema = require$$13;
|
|
9791
9791
|
|
|
9792
9792
|
var definition_schema = {
|
|
9793
9793
|
$id: 'https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js',
|
|
9794
9794
|
definitions: {
|
|
9795
|
-
simpleTypes:
|
|
9795
|
+
simpleTypes: metaSchema.definitions.simpleTypes
|
|
9796
9796
|
},
|
|
9797
9797
|
type: 'object',
|
|
9798
9798
|
dependencies: {
|
|
@@ -9802,7 +9802,7 @@
|
|
|
9802
9802
|
valid: {not: {required: ['macro']}}
|
|
9803
9803
|
},
|
|
9804
9804
|
properties: {
|
|
9805
|
-
type:
|
|
9805
|
+
type: metaSchema.properties.type,
|
|
9806
9806
|
schema: {type: 'boolean'},
|
|
9807
9807
|
statements: {type: 'boolean'},
|
|
9808
9808
|
dependencies: {
|
|
@@ -9823,9 +9823,9 @@
|
|
|
9823
9823
|
}
|
|
9824
9824
|
};
|
|
9825
9825
|
|
|
9826
|
-
var IDENTIFIER
|
|
9827
|
-
|
|
9828
|
-
|
|
9826
|
+
var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
|
|
9827
|
+
var customRuleCode = custom;
|
|
9828
|
+
var definitionSchema = definition_schema;
|
|
9829
9829
|
|
|
9830
9830
|
var keyword = {
|
|
9831
9831
|
add: addKeyword,
|
|
@@ -9849,7 +9849,7 @@
|
|
|
9849
9849
|
if (RULES.keywords[keyword])
|
|
9850
9850
|
throw new Error('Keyword ' + keyword + ' is already defined');
|
|
9851
9851
|
|
|
9852
|
-
if (!IDENTIFIER
|
|
9852
|
+
if (!IDENTIFIER.test(keyword))
|
|
9853
9853
|
throw new Error('Keyword ' + keyword + ' is not a valid identifier');
|
|
9854
9854
|
|
|
9855
9855
|
if (definition) {
|
|
@@ -9899,7 +9899,7 @@
|
|
|
9899
9899
|
keyword: keyword,
|
|
9900
9900
|
definition: definition,
|
|
9901
9901
|
custom: true,
|
|
9902
|
-
code:
|
|
9902
|
+
code: customRuleCode,
|
|
9903
9903
|
implements: definition.implements
|
|
9904
9904
|
};
|
|
9905
9905
|
ruleGroup.rules.push(rule);
|
|
@@ -9958,7 +9958,7 @@
|
|
|
9958
9958
|
function validateKeyword(definition, throwError) {
|
|
9959
9959
|
validateKeyword.errors = null;
|
|
9960
9960
|
var v = this._validateKeyword = this._validateKeyword
|
|
9961
|
-
|| this.compile(
|
|
9961
|
+
|| this.compile(definitionSchema, true);
|
|
9962
9962
|
|
|
9963
9963
|
if (v(definition)) return true;
|
|
9964
9964
|
validateKeyword.errors = v.errors;
|
|
@@ -9969,13 +9969,13 @@
|
|
|
9969
9969
|
}
|
|
9970
9970
|
|
|
9971
9971
|
var $schema$1 = "http://json-schema.org/draft-07/schema#";
|
|
9972
|
-
var $id
|
|
9972
|
+
var $id = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
|
|
9973
9973
|
var description = "Meta-schema for $data reference (JSON Schema extension proposal)";
|
|
9974
|
-
var type
|
|
9975
|
-
var required
|
|
9974
|
+
var type = "object";
|
|
9975
|
+
var required = [
|
|
9976
9976
|
"$data"
|
|
9977
9977
|
];
|
|
9978
|
-
var properties
|
|
9978
|
+
var properties = {
|
|
9979
9979
|
$data: {
|
|
9980
9980
|
type: "string",
|
|
9981
9981
|
anyOf: [
|
|
@@ -9989,56 +9989,52 @@
|
|
|
9989
9989
|
}
|
|
9990
9990
|
};
|
|
9991
9991
|
var additionalProperties = false;
|
|
9992
|
-
var
|
|
9992
|
+
var require$$12 = {
|
|
9993
9993
|
$schema: $schema$1,
|
|
9994
|
-
$id: $id
|
|
9994
|
+
$id: $id,
|
|
9995
9995
|
description: description,
|
|
9996
|
-
type: type
|
|
9997
|
-
required: required
|
|
9998
|
-
properties: properties
|
|
9996
|
+
type: type,
|
|
9997
|
+
required: required,
|
|
9998
|
+
properties: properties,
|
|
9999
9999
|
additionalProperties: additionalProperties
|
|
10000
10000
|
};
|
|
10001
10001
|
|
|
10002
|
-
var
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
Ajv.prototype.
|
|
10019
|
-
Ajv.prototype.
|
|
10020
|
-
Ajv.prototype.
|
|
10021
|
-
Ajv.prototype.
|
|
10022
|
-
Ajv.prototype.
|
|
10023
|
-
|
|
10024
|
-
Ajv.prototype.
|
|
10025
|
-
Ajv.prototype.
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
Ajv.prototype.
|
|
10030
|
-
|
|
10031
|
-
Ajv.prototype.
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
Ajv.
|
|
10036
|
-
Ajv.
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
Ajv.ValidationError = error_classes.Validation;
|
|
10040
|
-
Ajv.MissingRefError = error_classes.MissingRef;
|
|
10041
|
-
Ajv.$dataMetaSchema = data;
|
|
10002
|
+
var compileSchema = compile_1
|
|
10003
|
+
, resolve = resolve_1
|
|
10004
|
+
, Cache = cache.exports
|
|
10005
|
+
, SchemaObject = schema_obj
|
|
10006
|
+
, stableStringify = fastJsonStableStringify
|
|
10007
|
+
, formats = formats_1
|
|
10008
|
+
, rules = rules$1
|
|
10009
|
+
, $dataMetaSchema = data
|
|
10010
|
+
, util = util$5;
|
|
10011
|
+
|
|
10012
|
+
var ajv = Ajv$1;
|
|
10013
|
+
|
|
10014
|
+
Ajv$1.prototype.validate = validate;
|
|
10015
|
+
Ajv$1.prototype.compile = compile;
|
|
10016
|
+
Ajv$1.prototype.addSchema = addSchema;
|
|
10017
|
+
Ajv$1.prototype.addMetaSchema = addMetaSchema;
|
|
10018
|
+
Ajv$1.prototype.validateSchema = validateSchema;
|
|
10019
|
+
Ajv$1.prototype.getSchema = getSchema;
|
|
10020
|
+
Ajv$1.prototype.removeSchema = removeSchema;
|
|
10021
|
+
Ajv$1.prototype.addFormat = addFormat;
|
|
10022
|
+
Ajv$1.prototype.errorsText = errorsText;
|
|
10023
|
+
|
|
10024
|
+
Ajv$1.prototype._addSchema = _addSchema;
|
|
10025
|
+
Ajv$1.prototype._compile = _compile;
|
|
10026
|
+
|
|
10027
|
+
Ajv$1.prototype.compileAsync = async;
|
|
10028
|
+
var customKeyword = keyword;
|
|
10029
|
+
Ajv$1.prototype.addKeyword = customKeyword.add;
|
|
10030
|
+
Ajv$1.prototype.getKeyword = customKeyword.get;
|
|
10031
|
+
Ajv$1.prototype.removeKeyword = customKeyword.remove;
|
|
10032
|
+
Ajv$1.prototype.validateKeyword = customKeyword.validate;
|
|
10033
|
+
|
|
10034
|
+
var errorClasses = error_classes;
|
|
10035
|
+
Ajv$1.ValidationError = errorClasses.Validation;
|
|
10036
|
+
Ajv$1.MissingRefError = errorClasses.MissingRef;
|
|
10037
|
+
Ajv$1.$dataMetaSchema = $dataMetaSchema;
|
|
10042
10038
|
|
|
10043
10039
|
var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
|
|
10044
10040
|
|
|
@@ -10051,16 +10047,16 @@
|
|
|
10051
10047
|
* @param {Object} opts optional options
|
|
10052
10048
|
* @return {Object} ajv instance
|
|
10053
10049
|
*/
|
|
10054
|
-
function Ajv(opts) {
|
|
10055
|
-
if (!(this instanceof Ajv)) return new Ajv(opts);
|
|
10050
|
+
function Ajv$1(opts) {
|
|
10051
|
+
if (!(this instanceof Ajv$1)) return new Ajv$1(opts);
|
|
10056
10052
|
opts = this._opts = util.copy(opts) || {};
|
|
10057
10053
|
setLogger(this);
|
|
10058
10054
|
this._schemas = {};
|
|
10059
10055
|
this._refs = {};
|
|
10060
10056
|
this._fragments = {};
|
|
10061
|
-
this._formats =
|
|
10057
|
+
this._formats = formats(opts.format);
|
|
10062
10058
|
|
|
10063
|
-
this._cache = opts.cache || new
|
|
10059
|
+
this._cache = opts.cache || new Cache;
|
|
10064
10060
|
this._loadingSchemas = {};
|
|
10065
10061
|
this._compilations = [];
|
|
10066
10062
|
this.RULES = rules();
|
|
@@ -10068,7 +10064,7 @@
|
|
|
10068
10064
|
|
|
10069
10065
|
opts.loopRequired = opts.loopRequired || Infinity;
|
|
10070
10066
|
if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
|
|
10071
|
-
if (opts.serialize === undefined) opts.serialize =
|
|
10067
|
+
if (opts.serialize === undefined) opts.serialize = stableStringify;
|
|
10072
10068
|
this._metaOpts = getMetaSchemaOptions(this);
|
|
10073
10069
|
|
|
10074
10070
|
if (opts.formats) addInitialFormats(this);
|
|
@@ -10089,7 +10085,7 @@
|
|
|
10089
10085
|
* @param {Any} data to be validated
|
|
10090
10086
|
* @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
|
|
10091
10087
|
*/
|
|
10092
|
-
function validate
|
|
10088
|
+
function validate(schemaKeyRef, data) {
|
|
10093
10089
|
var v;
|
|
10094
10090
|
if (typeof schemaKeyRef == 'string') {
|
|
10095
10091
|
v = this.getSchema(schemaKeyRef);
|
|
@@ -10112,7 +10108,7 @@
|
|
|
10112
10108
|
* @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
|
|
10113
10109
|
* @return {Function} validating function
|
|
10114
10110
|
*/
|
|
10115
|
-
function compile
|
|
10111
|
+
function compile(schema, _meta) {
|
|
10116
10112
|
var schemaObj = this._addSchema(schema, undefined, _meta);
|
|
10117
10113
|
return schemaObj.validate || this._compile(schemaObj);
|
|
10118
10114
|
}
|
|
@@ -10135,7 +10131,7 @@
|
|
|
10135
10131
|
var id = this._getId(schema);
|
|
10136
10132
|
if (id !== undefined && typeof id != 'string')
|
|
10137
10133
|
throw new Error('schema id must be string');
|
|
10138
|
-
key =
|
|
10134
|
+
key = resolve.normalizeId(key || id);
|
|
10139
10135
|
checkUnique(this, key);
|
|
10140
10136
|
this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
|
|
10141
10137
|
return this;
|
|
@@ -10212,13 +10208,13 @@
|
|
|
10212
10208
|
|
|
10213
10209
|
|
|
10214
10210
|
function _getSchemaFragment(self, ref) {
|
|
10215
|
-
var res =
|
|
10211
|
+
var res = resolve.schema.call(self, { schema: {} }, ref);
|
|
10216
10212
|
if (res) {
|
|
10217
10213
|
var schema = res.schema
|
|
10218
10214
|
, root = res.root
|
|
10219
10215
|
, baseId = res.baseId;
|
|
10220
|
-
var v =
|
|
10221
|
-
self._fragments[ref] = new
|
|
10216
|
+
var v = compileSchema.call(self, schema, root, undefined, baseId);
|
|
10217
|
+
self._fragments[ref] = new SchemaObject({
|
|
10222
10218
|
ref: ref,
|
|
10223
10219
|
fragment: true,
|
|
10224
10220
|
schema: schema,
|
|
@@ -10232,7 +10228,7 @@
|
|
|
10232
10228
|
|
|
10233
10229
|
|
|
10234
10230
|
function _getSchemaObj(self, keyRef) {
|
|
10235
|
-
keyRef =
|
|
10231
|
+
keyRef = resolve.normalizeId(keyRef);
|
|
10236
10232
|
return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
|
|
10237
10233
|
}
|
|
10238
10234
|
|
|
@@ -10270,7 +10266,7 @@
|
|
|
10270
10266
|
this._cache.del(cacheKey);
|
|
10271
10267
|
var id = this._getId(schemaKeyRef);
|
|
10272
10268
|
if (id) {
|
|
10273
|
-
id =
|
|
10269
|
+
id = resolve.normalizeId(id);
|
|
10274
10270
|
delete this._schemas[id];
|
|
10275
10271
|
delete this._refs[id];
|
|
10276
10272
|
}
|
|
@@ -10301,17 +10297,17 @@
|
|
|
10301
10297
|
|
|
10302
10298
|
shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
|
|
10303
10299
|
|
|
10304
|
-
var id =
|
|
10300
|
+
var id = resolve.normalizeId(this._getId(schema));
|
|
10305
10301
|
if (id && shouldAddSchema) checkUnique(this, id);
|
|
10306
10302
|
|
|
10307
10303
|
var willValidate = this._opts.validateSchema !== false && !skipValidation;
|
|
10308
10304
|
var recursiveMeta;
|
|
10309
|
-
if (willValidate && !(recursiveMeta = id && id ==
|
|
10305
|
+
if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
|
|
10310
10306
|
this.validateSchema(schema, true);
|
|
10311
10307
|
|
|
10312
|
-
var localRefs =
|
|
10308
|
+
var localRefs = resolve.ids.call(this, schema);
|
|
10313
10309
|
|
|
10314
|
-
var schemaObj = new
|
|
10310
|
+
var schemaObj = new SchemaObject({
|
|
10315
10311
|
id: id,
|
|
10316
10312
|
schema: schema,
|
|
10317
10313
|
localRefs: localRefs,
|
|
@@ -10348,7 +10344,7 @@
|
|
|
10348
10344
|
}
|
|
10349
10345
|
|
|
10350
10346
|
var v;
|
|
10351
|
-
try { v =
|
|
10347
|
+
try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
|
|
10352
10348
|
catch(e) {
|
|
10353
10349
|
delete schemaObj.validate;
|
|
10354
10350
|
throw e;
|
|
@@ -10444,12 +10440,12 @@
|
|
|
10444
10440
|
function addDefaultMetaSchema(self) {
|
|
10445
10441
|
var $dataSchema;
|
|
10446
10442
|
if (self._opts.$data) {
|
|
10447
|
-
$dataSchema = require$$
|
|
10443
|
+
$dataSchema = require$$12;
|
|
10448
10444
|
self.addMetaSchema($dataSchema, $dataSchema.$id, true);
|
|
10449
10445
|
}
|
|
10450
10446
|
if (self._opts.meta === false) return;
|
|
10451
|
-
var metaSchema = require$$
|
|
10452
|
-
if (self._opts.$data) metaSchema =
|
|
10447
|
+
var metaSchema = require$$13;
|
|
10448
|
+
if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
|
|
10453
10449
|
self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
|
|
10454
10450
|
self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
|
|
10455
10451
|
}
|
|
@@ -10508,14 +10504,14 @@
|
|
|
10508
10504
|
|
|
10509
10505
|
function noop() {}
|
|
10510
10506
|
|
|
10511
|
-
var _Ajv = /*#__PURE__*/
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
})
|
|
10507
|
+
var _Ajv = /*#__PURE__*/_mergeNamespaces$1({
|
|
10508
|
+
__proto__: null,
|
|
10509
|
+
'default': ajv
|
|
10510
|
+
}, [ajv]);
|
|
10515
10511
|
|
|
10516
10512
|
var $ref = "#/definitions/Schema";
|
|
10517
|
-
var $schema
|
|
10518
|
-
var definitions
|
|
10513
|
+
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
10514
|
+
var definitions = {
|
|
10519
10515
|
ActivityType: {
|
|
10520
10516
|
anyOf: [
|
|
10521
10517
|
{
|
|
@@ -10588,17 +10584,6 @@
|
|
|
10588
10584
|
}
|
|
10589
10585
|
]
|
|
10590
10586
|
},
|
|
10591
|
-
IActivityType: {
|
|
10592
|
-
"enum": [
|
|
10593
|
-
"filter",
|
|
10594
|
-
"project",
|
|
10595
|
-
"groupby",
|
|
10596
|
-
"sort",
|
|
10597
|
-
"limit",
|
|
10598
|
-
"mappings"
|
|
10599
|
-
],
|
|
10600
|
-
type: "string"
|
|
10601
|
-
},
|
|
10602
10587
|
IAggregate: {
|
|
10603
10588
|
additionalProperties: false,
|
|
10604
10589
|
properties: {
|
|
@@ -10673,9 +10658,7 @@
|
|
|
10673
10658
|
type: "string"
|
|
10674
10659
|
},
|
|
10675
10660
|
type: {
|
|
10676
|
-
"
|
|
10677
|
-
"count"
|
|
10678
|
-
],
|
|
10661
|
+
"const": "count",
|
|
10679
10662
|
type: "string"
|
|
10680
10663
|
}
|
|
10681
10664
|
},
|
|
@@ -10704,9 +10687,7 @@
|
|
|
10704
10687
|
type: "string"
|
|
10705
10688
|
},
|
|
10706
10689
|
type: {
|
|
10707
|
-
"
|
|
10708
|
-
"databomb"
|
|
10709
|
-
],
|
|
10690
|
+
"const": "databomb",
|
|
10710
10691
|
type: "string"
|
|
10711
10692
|
}
|
|
10712
10693
|
},
|
|
@@ -10798,9 +10779,7 @@
|
|
|
10798
10779
|
type: "array"
|
|
10799
10780
|
},
|
|
10800
10781
|
type: {
|
|
10801
|
-
"
|
|
10802
|
-
"="
|
|
10803
|
-
],
|
|
10782
|
+
"const": "=",
|
|
10804
10783
|
type: "string"
|
|
10805
10784
|
}
|
|
10806
10785
|
},
|
|
@@ -10849,9 +10828,7 @@
|
|
|
10849
10828
|
type: "string"
|
|
10850
10829
|
},
|
|
10851
10830
|
type: {
|
|
10852
|
-
"
|
|
10853
|
-
"boolean"
|
|
10854
|
-
],
|
|
10831
|
+
"const": "boolean",
|
|
10855
10832
|
type: "string"
|
|
10856
10833
|
}
|
|
10857
10834
|
},
|
|
@@ -10877,9 +10854,7 @@
|
|
|
10877
10854
|
type: "string"
|
|
10878
10855
|
},
|
|
10879
10856
|
type: {
|
|
10880
|
-
"
|
|
10881
|
-
"dataset"
|
|
10882
|
-
],
|
|
10857
|
+
"const": "dataset",
|
|
10883
10858
|
type: "string"
|
|
10884
10859
|
}
|
|
10885
10860
|
},
|
|
@@ -10900,9 +10875,7 @@
|
|
|
10900
10875
|
type: "string"
|
|
10901
10876
|
},
|
|
10902
10877
|
type: {
|
|
10903
|
-
"
|
|
10904
|
-
"number"
|
|
10905
|
-
],
|
|
10878
|
+
"const": "number",
|
|
10906
10879
|
type: "string"
|
|
10907
10880
|
}
|
|
10908
10881
|
},
|
|
@@ -10922,9 +10895,7 @@
|
|
|
10922
10895
|
type: "string"
|
|
10923
10896
|
},
|
|
10924
10897
|
type: {
|
|
10925
|
-
"
|
|
10926
|
-
"number64"
|
|
10927
|
-
],
|
|
10898
|
+
"const": "number64",
|
|
10928
10899
|
type: "string"
|
|
10929
10900
|
}
|
|
10930
10901
|
},
|
|
@@ -10950,9 +10921,7 @@
|
|
|
10950
10921
|
type: "string"
|
|
10951
10922
|
},
|
|
10952
10923
|
type: {
|
|
10953
|
-
"
|
|
10954
|
-
"object"
|
|
10955
|
-
],
|
|
10924
|
+
"const": "object",
|
|
10956
10925
|
type: "string"
|
|
10957
10926
|
}
|
|
10958
10927
|
},
|
|
@@ -10973,9 +10942,7 @@
|
|
|
10973
10942
|
type: "string"
|
|
10974
10943
|
},
|
|
10975
10944
|
type: {
|
|
10976
|
-
"
|
|
10977
|
-
"range"
|
|
10978
|
-
],
|
|
10945
|
+
"const": "range",
|
|
10979
10946
|
type: "string"
|
|
10980
10947
|
}
|
|
10981
10948
|
},
|
|
@@ -11008,9 +10975,7 @@
|
|
|
11008
10975
|
type: "string"
|
|
11009
10976
|
},
|
|
11010
10977
|
type: {
|
|
11011
|
-
"
|
|
11012
|
-
"set"
|
|
11013
|
-
],
|
|
10978
|
+
"const": "set",
|
|
11014
10979
|
type: "string"
|
|
11015
10980
|
}
|
|
11016
10981
|
},
|
|
@@ -11031,9 +10996,7 @@
|
|
|
11031
10996
|
type: "string"
|
|
11032
10997
|
},
|
|
11033
10998
|
type: {
|
|
11034
|
-
"
|
|
11035
|
-
"string"
|
|
11036
|
-
],
|
|
10999
|
+
"const": "string",
|
|
11037
11000
|
type: "string"
|
|
11038
11001
|
}
|
|
11039
11002
|
},
|
|
@@ -11066,9 +11029,7 @@
|
|
|
11066
11029
|
type: "array"
|
|
11067
11030
|
},
|
|
11068
11031
|
type: {
|
|
11069
|
-
"
|
|
11070
|
-
"filter"
|
|
11071
|
-
],
|
|
11032
|
+
"const": "filter",
|
|
11072
11033
|
type: "string"
|
|
11073
11034
|
}
|
|
11074
11035
|
},
|
|
@@ -11133,9 +11094,7 @@
|
|
|
11133
11094
|
type: "string"
|
|
11134
11095
|
},
|
|
11135
11096
|
type: {
|
|
11136
|
-
"
|
|
11137
|
-
"form"
|
|
11138
|
-
],
|
|
11097
|
+
"const": "form",
|
|
11139
11098
|
type: "string"
|
|
11140
11099
|
}
|
|
11141
11100
|
},
|
|
@@ -11162,9 +11121,7 @@
|
|
|
11162
11121
|
type: "array"
|
|
11163
11122
|
},
|
|
11164
11123
|
type: {
|
|
11165
|
-
"
|
|
11166
|
-
"groupby"
|
|
11167
|
-
],
|
|
11124
|
+
"const": "groupby",
|
|
11168
11125
|
type: "string"
|
|
11169
11126
|
}
|
|
11170
11127
|
},
|
|
@@ -11197,9 +11154,7 @@
|
|
|
11197
11154
|
type: "string"
|
|
11198
11155
|
},
|
|
11199
11156
|
type: {
|
|
11200
|
-
"
|
|
11201
|
-
"hipie"
|
|
11202
|
-
],
|
|
11157
|
+
"const": "hipie",
|
|
11203
11158
|
type: "string"
|
|
11204
11159
|
},
|
|
11205
11160
|
url: {
|
|
@@ -11236,9 +11191,7 @@
|
|
|
11236
11191
|
type: "number"
|
|
11237
11192
|
},
|
|
11238
11193
|
type: {
|
|
11239
|
-
"
|
|
11240
|
-
"limit"
|
|
11241
|
-
],
|
|
11194
|
+
"const": "limit",
|
|
11242
11195
|
type: "string"
|
|
11243
11196
|
}
|
|
11244
11197
|
},
|
|
@@ -11264,9 +11217,7 @@
|
|
|
11264
11217
|
type: "string"
|
|
11265
11218
|
},
|
|
11266
11219
|
type: {
|
|
11267
|
-
"
|
|
11268
|
-
"logicalfile"
|
|
11269
|
-
],
|
|
11220
|
+
"const": "logicalfile",
|
|
11270
11221
|
type: "string"
|
|
11271
11222
|
},
|
|
11272
11223
|
url: {
|
|
@@ -11300,9 +11251,7 @@
|
|
|
11300
11251
|
type: "string"
|
|
11301
11252
|
},
|
|
11302
11253
|
type: {
|
|
11303
|
-
"
|
|
11304
|
-
"map"
|
|
11305
|
-
],
|
|
11254
|
+
"const": "map",
|
|
11306
11255
|
type: "string"
|
|
11307
11256
|
}
|
|
11308
11257
|
},
|
|
@@ -11376,9 +11325,7 @@
|
|
|
11376
11325
|
type: "array"
|
|
11377
11326
|
},
|
|
11378
11327
|
type: {
|
|
11379
|
-
"
|
|
11380
|
-
"mappings"
|
|
11381
|
-
],
|
|
11328
|
+
"const": "mappings",
|
|
11382
11329
|
type: "string"
|
|
11383
11330
|
}
|
|
11384
11331
|
},
|
|
@@ -11401,9 +11348,7 @@
|
|
|
11401
11348
|
type: "array"
|
|
11402
11349
|
},
|
|
11403
11350
|
type: {
|
|
11404
|
-
"
|
|
11405
|
-
"multi"
|
|
11406
|
-
],
|
|
11351
|
+
"const": "multi",
|
|
11407
11352
|
type: "string"
|
|
11408
11353
|
}
|
|
11409
11354
|
},
|
|
@@ -11439,9 +11384,7 @@
|
|
|
11439
11384
|
type: "array"
|
|
11440
11385
|
},
|
|
11441
11386
|
type: {
|
|
11442
|
-
"
|
|
11443
|
-
"project"
|
|
11444
|
-
],
|
|
11387
|
+
"const": "project",
|
|
11445
11388
|
type: "string"
|
|
11446
11389
|
}
|
|
11447
11390
|
},
|
|
@@ -11504,9 +11447,7 @@
|
|
|
11504
11447
|
$ref: "#/definitions/OutputDict"
|
|
11505
11448
|
},
|
|
11506
11449
|
type: {
|
|
11507
|
-
"
|
|
11508
|
-
"rest"
|
|
11509
|
-
],
|
|
11450
|
+
"const": "rest",
|
|
11510
11451
|
type: "string"
|
|
11511
11452
|
},
|
|
11512
11453
|
url: {
|
|
@@ -11545,9 +11486,7 @@
|
|
|
11545
11486
|
type: "string"
|
|
11546
11487
|
},
|
|
11547
11488
|
type: {
|
|
11548
|
-
"
|
|
11549
|
-
"roxie"
|
|
11550
|
-
],
|
|
11489
|
+
"const": "roxie",
|
|
11551
11490
|
type: "string"
|
|
11552
11491
|
},
|
|
11553
11492
|
url: {
|
|
@@ -11601,9 +11540,7 @@
|
|
|
11601
11540
|
type: "string"
|
|
11602
11541
|
},
|
|
11603
11542
|
type: {
|
|
11604
|
-
"
|
|
11605
|
-
"scale"
|
|
11606
|
-
],
|
|
11543
|
+
"const": "scale",
|
|
11607
11544
|
type: "string"
|
|
11608
11545
|
}
|
|
11609
11546
|
},
|
|
@@ -11625,9 +11562,7 @@
|
|
|
11625
11562
|
type: "array"
|
|
11626
11563
|
},
|
|
11627
11564
|
type: {
|
|
11628
|
-
"
|
|
11629
|
-
"sort"
|
|
11630
|
-
],
|
|
11565
|
+
"const": "sort",
|
|
11631
11566
|
type: "string"
|
|
11632
11567
|
}
|
|
11633
11568
|
},
|
|
@@ -11663,9 +11598,7 @@
|
|
|
11663
11598
|
type: "string"
|
|
11664
11599
|
},
|
|
11665
11600
|
type: {
|
|
11666
|
-
"
|
|
11667
|
-
"template"
|
|
11668
|
-
],
|
|
11601
|
+
"const": "template",
|
|
11669
11602
|
type: "string"
|
|
11670
11603
|
}
|
|
11671
11604
|
},
|
|
@@ -11755,9 +11688,7 @@
|
|
|
11755
11688
|
$ref: "#/definitions/OutputDict"
|
|
11756
11689
|
},
|
|
11757
11690
|
type: {
|
|
11758
|
-
"
|
|
11759
|
-
"wuresult"
|
|
11760
|
-
],
|
|
11691
|
+
"const": "wuresult",
|
|
11761
11692
|
type: "string"
|
|
11762
11693
|
},
|
|
11763
11694
|
url: {
|
|
@@ -11874,20 +11805,12 @@
|
|
|
11874
11805
|
]
|
|
11875
11806
|
},
|
|
11876
11807
|
Range: {
|
|
11877
|
-
items:
|
|
11878
|
-
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
},
|
|
11884
|
-
{
|
|
11885
|
-
type: [
|
|
11886
|
-
"number",
|
|
11887
|
-
"string"
|
|
11888
|
-
]
|
|
11889
|
-
}
|
|
11890
|
-
],
|
|
11808
|
+
items: {
|
|
11809
|
+
type: [
|
|
11810
|
+
"number",
|
|
11811
|
+
"string"
|
|
11812
|
+
]
|
|
11813
|
+
},
|
|
11891
11814
|
maxItems: 2,
|
|
11892
11815
|
minItems: 2,
|
|
11893
11816
|
type: "array"
|
|
@@ -12136,9 +12059,7 @@
|
|
|
12136
12059
|
$ref: "#/definitions/IProperties"
|
|
12137
12060
|
},
|
|
12138
12061
|
version: {
|
|
12139
|
-
"
|
|
12140
|
-
"2.2.1"
|
|
12141
|
-
],
|
|
12062
|
+
"const": "2.2.1",
|
|
12142
12063
|
type: "string"
|
|
12143
12064
|
}
|
|
12144
12065
|
},
|
|
@@ -12158,21 +12079,21 @@
|
|
|
12158
12079
|
type: "string"
|
|
12159
12080
|
}
|
|
12160
12081
|
};
|
|
12161
|
-
var v2
|
|
12082
|
+
var v2 = {
|
|
12162
12083
|
$ref: $ref,
|
|
12163
|
-
$schema: $schema
|
|
12164
|
-
definitions: definitions
|
|
12084
|
+
$schema: $schema,
|
|
12085
|
+
definitions: definitions
|
|
12165
12086
|
};
|
|
12166
12087
|
|
|
12167
12088
|
var _ddl2Schema = /*#__PURE__*/Object.freeze({
|
|
12168
12089
|
__proto__: null,
|
|
12169
12090
|
$ref: $ref,
|
|
12170
|
-
$schema: $schema
|
|
12171
|
-
definitions: definitions
|
|
12172
|
-
'default': v2
|
|
12091
|
+
$schema: $schema,
|
|
12092
|
+
definitions: definitions,
|
|
12093
|
+
'default': v2
|
|
12173
12094
|
});
|
|
12174
12095
|
|
|
12175
|
-
var Ajv
|
|
12096
|
+
var Ajv = ajv || _Ajv;
|
|
12176
12097
|
var ddl2Schema = _ddl2Schema;
|
|
12177
12098
|
var options = {
|
|
12178
12099
|
allErrors: false,
|
|
@@ -12180,7 +12101,7 @@
|
|
|
12180
12101
|
jsonPointers: false
|
|
12181
12102
|
};
|
|
12182
12103
|
function doValidate(ddl, schema) {
|
|
12183
|
-
var ajv = new Ajv
|
|
12104
|
+
var ajv = new Ajv(options);
|
|
12184
12105
|
var validate = ajv.compile(schema);
|
|
12185
12106
|
var success = validate(ddl);
|
|
12186
12107
|
return {
|
|
@@ -12212,7 +12133,7 @@
|
|
|
12212
12133
|
case ">=":
|
|
12213
12134
|
return function (localRow) { return localRow[lf] >= val; };
|
|
12214
12135
|
default:
|
|
12215
|
-
throw new Error("Unknown filter condition: "
|
|
12136
|
+
throw new Error("Unknown filter condition: ".concat(condition));
|
|
12216
12137
|
}
|
|
12217
12138
|
}
|
|
12218
12139
|
var ColumnMapping = /** @class */ (function (_super) {
|
|
@@ -12224,16 +12145,16 @@
|
|
|
12224
12145
|
var retVal = [];
|
|
12225
12146
|
if (!this.remoteField_valid()) {
|
|
12226
12147
|
retVal.push({
|
|
12227
|
-
source: prefix
|
|
12228
|
-
msg: "Invalid remoteField: \""
|
|
12229
|
-
hint: "expected: "
|
|
12148
|
+
source: "".concat(prefix, ".remoteField"),
|
|
12149
|
+
msg: "Invalid remoteField: \"".concat(this.remoteField(), "\""),
|
|
12150
|
+
hint: "expected: ".concat(JSON.stringify(this.sourceOutFields()))
|
|
12230
12151
|
});
|
|
12231
12152
|
}
|
|
12232
12153
|
if (!this.localField_valid()) {
|
|
12233
12154
|
retVal.push({
|
|
12234
|
-
source: prefix
|
|
12235
|
-
msg: "Invalid localField: \""
|
|
12236
|
-
hint: "expected: "
|
|
12155
|
+
source: "".concat(prefix, ".localField"),
|
|
12156
|
+
msg: "Invalid localField: \"".concat(this.localField(), "\""),
|
|
12157
|
+
hint: "expected: ".concat(JSON.stringify(this.localFields()))
|
|
12237
12158
|
});
|
|
12238
12159
|
}
|
|
12239
12160
|
return retVal;
|
|
@@ -12266,7 +12187,7 @@
|
|
|
12266
12187
|
return new ColumnMapping().fromDDL(ddl);
|
|
12267
12188
|
};
|
|
12268
12189
|
ColumnMapping.prototype.hash = function () {
|
|
12269
|
-
return util$
|
|
12190
|
+
return util$6.hashSum({
|
|
12270
12191
|
remoteField: this.remoteField(),
|
|
12271
12192
|
localField: this.localField(),
|
|
12272
12193
|
condition: this.condition(),
|
|
@@ -12293,9 +12214,9 @@
|
|
|
12293
12214
|
switch (this.condition()) {
|
|
12294
12215
|
case "in":
|
|
12295
12216
|
case "range":
|
|
12296
|
-
return this.localField()
|
|
12217
|
+
return "".concat(this.localField(), " ").concat(this.condition(), " [").concat(this.remoteValues(filterSelection).join(", "), "]");
|
|
12297
12218
|
default:
|
|
12298
|
-
return this.localField()
|
|
12219
|
+
return "".concat(this.localField(), " ").concat(this.condition(), " ").concat(this.remoteValues(filterSelection)[0]);
|
|
12299
12220
|
}
|
|
12300
12221
|
};
|
|
12301
12222
|
ColumnMapping.prototype.createFilter = function (filterSelection) {
|
|
@@ -12356,21 +12277,21 @@
|
|
|
12356
12277
|
var retVal = [];
|
|
12357
12278
|
if (!this.source_valid()) {
|
|
12358
12279
|
retVal.push({
|
|
12359
|
-
source: prefix
|
|
12360
|
-
msg: "Invalid source: \""
|
|
12361
|
-
hint: "expected: "
|
|
12280
|
+
source: "".concat(prefix, ".source.").concat(this.source()),
|
|
12281
|
+
msg: "Invalid source: \"".concat(this.source(), "\""),
|
|
12282
|
+
hint: "expected: ".concat(JSON.stringify(this.visualizationIDs()))
|
|
12362
12283
|
});
|
|
12363
12284
|
}
|
|
12364
12285
|
if (this.source_exists() && this.validMappings().length === 0) {
|
|
12365
12286
|
retVal.push({
|
|
12366
|
-
source: prefix
|
|
12367
|
-
msg: "Invalid mappings: \""
|
|
12287
|
+
source: "".concat(prefix, ".source.").concat(this.source()),
|
|
12288
|
+
msg: "Invalid mappings: \"".concat(this.source(), "\""),
|
|
12368
12289
|
hint: "expected minimum of 1 mapping"
|
|
12369
12290
|
});
|
|
12370
12291
|
}
|
|
12371
12292
|
for (var _i = 0, _a = this.validMappings(); _i < _a.length; _i++) {
|
|
12372
12293
|
var mapping = _a[_i];
|
|
12373
|
-
retVal = retVal.concat(mapping.validate(prefix
|
|
12294
|
+
retVal = retVal.concat(mapping.validate("".concat(prefix, ".").concat(this.source(), ".mappings")));
|
|
12374
12295
|
}
|
|
12375
12296
|
return retVal;
|
|
12376
12297
|
};
|
|
@@ -12407,7 +12328,7 @@
|
|
|
12407
12328
|
return this._owner.visualizationIDs();
|
|
12408
12329
|
};
|
|
12409
12330
|
RemoteFilter.prototype.hash = function () {
|
|
12410
|
-
return util$
|
|
12331
|
+
return util$6.hashSum({
|
|
12411
12332
|
source: this.source(),
|
|
12412
12333
|
mappings: this.validMappings().map(function (mapping) { return mapping.hash(); }),
|
|
12413
12334
|
selection: this.sourceSelection()
|
|
@@ -12472,9 +12393,9 @@
|
|
|
12472
12393
|
var retVal = [];
|
|
12473
12394
|
if (!this.localField_valid()) {
|
|
12474
12395
|
retVal.push({
|
|
12475
|
-
source: prefix
|
|
12476
|
-
msg: "Invalid localField: \""
|
|
12477
|
-
hint: "expected: "
|
|
12396
|
+
source: "".concat(prefix, ".localField"),
|
|
12397
|
+
msg: "Invalid localField: \"".concat(this.localField(), "\""),
|
|
12398
|
+
hint: "expected: ".concat(JSON.stringify(this.localFields()))
|
|
12478
12399
|
});
|
|
12479
12400
|
}
|
|
12480
12401
|
return retVal;
|
|
@@ -12524,7 +12445,7 @@
|
|
|
12524
12445
|
return new StaticFilter().fromDDL(ddl);
|
|
12525
12446
|
};
|
|
12526
12447
|
StaticFilter.prototype.hash = function () {
|
|
12527
|
-
return util$
|
|
12448
|
+
return util$6.hashSum({
|
|
12528
12449
|
localField: this.localField(),
|
|
12529
12450
|
condition: this.condition(),
|
|
12530
12451
|
value: this.value(),
|
|
@@ -12535,7 +12456,7 @@
|
|
|
12535
12456
|
return this._owner.inFields().map(function (field) { return field.id; });
|
|
12536
12457
|
};
|
|
12537
12458
|
StaticFilter.prototype.createFilterDescription = function () {
|
|
12538
|
-
return this.localField()
|
|
12459
|
+
return "".concat(this.localField(), " ").concat(this.condition(), " ").concat(this.coerceValue());
|
|
12539
12460
|
};
|
|
12540
12461
|
StaticFilter.prototype.createFilter = function () {
|
|
12541
12462
|
return createFilter(this.condition(), this.localField(), this.coerceValue());
|
|
@@ -12596,7 +12517,7 @@
|
|
|
12596
12517
|
var remoteFilters = [];
|
|
12597
12518
|
var staticFilters = [];
|
|
12598
12519
|
_.forEach(function (fc) {
|
|
12599
|
-
if (v2.isIFilterCondition(fc)) {
|
|
12520
|
+
if (v2$1.isIFilterCondition(fc)) {
|
|
12600
12521
|
remoteFilters.push(RemoteFilter.fromDDL(fc));
|
|
12601
12522
|
}
|
|
12602
12523
|
else {
|
|
@@ -12615,7 +12536,7 @@
|
|
|
12615
12536
|
};
|
|
12616
12537
|
// Activity overrides ---
|
|
12617
12538
|
Filters.prototype.hash = function () {
|
|
12618
|
-
return util$
|
|
12539
|
+
return util$6.hashSum(this.validFilters().map(function (f) {
|
|
12619
12540
|
return {
|
|
12620
12541
|
filter: f.hash()
|
|
12621
12542
|
};
|
|
@@ -12663,7 +12584,7 @@
|
|
|
12663
12584
|
return this.staticFilter().filter(function (filter) { return filter.valid(); });
|
|
12664
12585
|
};
|
|
12665
12586
|
Filters.prototype.validFilters = function () {
|
|
12666
|
-
return __spreadArray(__spreadArray([], this.validRemoteFilters()), this.validStaticFilters());
|
|
12587
|
+
return __spreadArray$1(__spreadArray$1([], this.validRemoteFilters(), true), this.validStaticFilters(), true);
|
|
12667
12588
|
};
|
|
12668
12589
|
Filters.Filter = RemoteFilter;
|
|
12669
12590
|
Filters.Mapping = ColumnMapping;
|
|
@@ -12688,9 +12609,9 @@
|
|
|
12688
12609
|
var retVal = [];
|
|
12689
12610
|
if (!this.label_valid()) {
|
|
12690
12611
|
retVal.push({
|
|
12691
|
-
source: prefix
|
|
12692
|
-
msg: "Invalid label: \""
|
|
12693
|
-
hint: "expected "
|
|
12612
|
+
source: "".concat(prefix, ".label"),
|
|
12613
|
+
msg: "Invalid label: \"".concat(this.label(), "\""),
|
|
12614
|
+
hint: "expected ".concat(JSON.stringify(this.columns()))
|
|
12694
12615
|
});
|
|
12695
12616
|
}
|
|
12696
12617
|
return retVal;
|
|
@@ -12715,7 +12636,7 @@
|
|
|
12715
12636
|
return new GroupByColumn().fromDDL(label);
|
|
12716
12637
|
};
|
|
12717
12638
|
GroupByColumn.prototype.hash = function () {
|
|
12718
|
-
return util$
|
|
12639
|
+
return util$6.hashSum(this.label());
|
|
12719
12640
|
};
|
|
12720
12641
|
GroupByColumn.prototype.columns = function () {
|
|
12721
12642
|
return this._owner.inFieldIDs();
|
|
@@ -12758,16 +12679,16 @@
|
|
|
12758
12679
|
var retVal = [];
|
|
12759
12680
|
if (!this.aggrColumn_valid()) {
|
|
12760
12681
|
retVal.push({
|
|
12761
|
-
source: prefix
|
|
12762
|
-
msg: "Invalid aggrColumn: \""
|
|
12763
|
-
hint: "expected "
|
|
12682
|
+
source: "".concat(prefix, ".").concat(this.fieldID(), ".aggrColumn"),
|
|
12683
|
+
msg: "Invalid aggrColumn: \"".concat(this.aggrColumn(), "\""),
|
|
12684
|
+
hint: "expected ".concat(JSON.stringify(this.columns()))
|
|
12764
12685
|
});
|
|
12765
12686
|
}
|
|
12766
12687
|
if (!this.baseCountColumn_valid()) {
|
|
12767
12688
|
retVal.push({
|
|
12768
|
-
source: prefix
|
|
12769
|
-
msg: "Invalid baseCountColumn: \""
|
|
12770
|
-
hint: "expected "
|
|
12689
|
+
source: "".concat(prefix, ".").concat(this.fieldID(), ".aggrColumn"),
|
|
12690
|
+
msg: "Invalid baseCountColumn: \"".concat(this.baseCountColumn(), "\""),
|
|
12691
|
+
hint: "expected ".concat(JSON.stringify(this.columns()))
|
|
12771
12692
|
});
|
|
12772
12693
|
}
|
|
12773
12694
|
return retVal;
|
|
@@ -12809,7 +12730,7 @@
|
|
|
12809
12730
|
return new AggregateField().fromDDL(ddl);
|
|
12810
12731
|
};
|
|
12811
12732
|
AggregateField.prototype.hash = function () {
|
|
12812
|
-
return util$
|
|
12733
|
+
return util$6.hashSum({
|
|
12813
12734
|
label: this.fieldID(),
|
|
12814
12735
|
aggrType: this.aggrType(),
|
|
12815
12736
|
aggrColumn: this.aggrColumn()
|
|
@@ -12914,7 +12835,7 @@
|
|
|
12914
12835
|
};
|
|
12915
12836
|
// Activity
|
|
12916
12837
|
GroupBy.prototype.hash = function () {
|
|
12917
|
-
return util$
|
|
12838
|
+
return util$6.hashSum({
|
|
12918
12839
|
groupBy: this.column().map(function (gb) { return gb.hash(); }),
|
|
12919
12840
|
computedFields: this.computedFields().map(function (cf) { return cf.hash(); })
|
|
12920
12841
|
});
|
|
@@ -13103,7 +13024,7 @@
|
|
|
13103
13024
|
return new Limit().fromDDL(ddl);
|
|
13104
13025
|
};
|
|
13105
13026
|
Limit.prototype.hash = function () {
|
|
13106
|
-
return util$
|
|
13027
|
+
return util$6.hashSum({
|
|
13107
13028
|
limit: this.rows()
|
|
13108
13029
|
});
|
|
13109
13030
|
};
|
|
@@ -13133,15 +13054,15 @@
|
|
|
13133
13054
|
var retVal = [];
|
|
13134
13055
|
if (!this.value_valid()) {
|
|
13135
13056
|
retVal.push({
|
|
13136
|
-
source: prefix
|
|
13137
|
-
msg: "Invalid value: \""
|
|
13057
|
+
source: "".concat(prefix, ".value"),
|
|
13058
|
+
msg: "Invalid value: \"".concat(this.value(), "\""),
|
|
13138
13059
|
hint: 'expected: "any"'
|
|
13139
13060
|
});
|
|
13140
13061
|
}
|
|
13141
13062
|
if (!this.newValue_valid()) {
|
|
13142
13063
|
retVal.push({
|
|
13143
|
-
source: prefix
|
|
13144
|
-
msg: "Invalid value: \""
|
|
13064
|
+
source: "".concat(prefix, ".newValue"),
|
|
13065
|
+
msg: "Invalid value: \"".concat(this.newValue(), "\""),
|
|
13145
13066
|
hint: 'expected: "any"'
|
|
13146
13067
|
});
|
|
13147
13068
|
}
|
|
@@ -13206,23 +13127,23 @@
|
|
|
13206
13127
|
var retVal = [];
|
|
13207
13128
|
if (!this.column1_valid()) {
|
|
13208
13129
|
retVal.push({
|
|
13209
|
-
source: prefix
|
|
13210
|
-
msg: "Invalid column1: \""
|
|
13211
|
-
hint: "expected: "
|
|
13130
|
+
source: "".concat(prefix, ".").concat(this.label()),
|
|
13131
|
+
msg: "Invalid column1: \"".concat(this.column1(), "\""),
|
|
13132
|
+
hint: "expected: ".concat(JSON.stringify(this.columns()))
|
|
13212
13133
|
});
|
|
13213
13134
|
}
|
|
13214
13135
|
if (!this.column2_valid()) {
|
|
13215
13136
|
retVal.push({
|
|
13216
|
-
source: prefix
|
|
13217
|
-
msg: "Invalid column2: \""
|
|
13218
|
-
hint: "expected: "
|
|
13137
|
+
source: "".concat(prefix, ".").concat(this.label()),
|
|
13138
|
+
msg: "Invalid column2: \"".concat(this.column2(), "\""),
|
|
13139
|
+
hint: "expected: ".concat(JSON.stringify(this.columns()))
|
|
13219
13140
|
});
|
|
13220
13141
|
}
|
|
13221
13142
|
if (!this.disableMapping()) {
|
|
13222
|
-
this.validComputedMappings().forEach(function (cm) { return cm.validate(prefix
|
|
13143
|
+
this.validComputedMappings().forEach(function (cm) { return cm.validate("".concat(prefix, ".mapping")); });
|
|
13223
13144
|
}
|
|
13224
13145
|
if (!this.disableChildField()) {
|
|
13225
|
-
this.validChildFields().forEach(function (cf) { return cf.validate(prefix
|
|
13146
|
+
this.validChildFields().forEach(function (cf) { return cf.validate("".concat(prefix, ".childField")); });
|
|
13226
13147
|
}
|
|
13227
13148
|
return retVal;
|
|
13228
13149
|
};
|
|
@@ -13340,7 +13261,7 @@
|
|
|
13340
13261
|
return new ComputedField().fromDDL(ddl);
|
|
13341
13262
|
};
|
|
13342
13263
|
ComputedField.prototype.hash = function () {
|
|
13343
|
-
return util$
|
|
13264
|
+
return util$6.hashSum(this.toDDL());
|
|
13344
13265
|
};
|
|
13345
13266
|
ComputedField.prototype.columns = function () {
|
|
13346
13267
|
return this._owner.fieldIDs();
|
|
@@ -13360,7 +13281,7 @@
|
|
|
13360
13281
|
.column1(child.id);
|
|
13361
13282
|
});
|
|
13362
13283
|
}
|
|
13363
|
-
return __assign(__assign({}, this._owner.field(this.column1())), { id: this.label(), children: validChildFields.length ? validChildFields.map(function (cf) { return cf.computedField(); }) : undefined });
|
|
13284
|
+
return __assign$1(__assign$1({}, this._owner.field(this.column1())), { id: this.label(), children: validChildFields.length ? validChildFields.map(function (cf) { return cf.computedField(); }) : undefined });
|
|
13364
13285
|
case "*":
|
|
13365
13286
|
case "/":
|
|
13366
13287
|
case "+":
|
|
@@ -13383,7 +13304,7 @@
|
|
|
13383
13304
|
};
|
|
13384
13305
|
});
|
|
13385
13306
|
return function (row) {
|
|
13386
|
-
var retVal = trim && hasComputedFields ? {} : __assign({}, row);
|
|
13307
|
+
var retVal = trim && hasComputedFields ? {} : __assign$1({}, row);
|
|
13387
13308
|
for (var _i = 0, computedFields_1 = computedFields; _i < computedFields_1.length; _i++) {
|
|
13388
13309
|
var cf = computedFields_1[_i];
|
|
13389
13310
|
retVal[cf.label] = cf.func(row);
|
|
@@ -13403,7 +13324,7 @@
|
|
|
13403
13324
|
if (this.hasChildFields()) {
|
|
13404
13325
|
return function (row) {
|
|
13405
13326
|
// TODO Move to function factory ---
|
|
13406
|
-
var r = row[column1].Row && util$
|
|
13327
|
+
var r = row[column1].Row && util$6.isArray(row[column1].Row) ? row[column1].Row : row[column1];
|
|
13407
13328
|
return r.map(_this.projection(trim));
|
|
13408
13329
|
};
|
|
13409
13330
|
}
|
|
@@ -13537,7 +13458,7 @@
|
|
|
13537
13458
|
return _super.call(this) || this;
|
|
13538
13459
|
}
|
|
13539
13460
|
MultiField.prototype.hash = function () {
|
|
13540
|
-
return util$
|
|
13461
|
+
return util$6.hashSum(this.toDDL());
|
|
13541
13462
|
};
|
|
13542
13463
|
MultiField.prototype.owner = function (_) {
|
|
13543
13464
|
if (!arguments.length)
|
|
@@ -13552,7 +13473,7 @@
|
|
|
13552
13473
|
var retVal = [];
|
|
13553
13474
|
for (var _i = 0, _a = this.validMultiFields(); _i < _a.length; _i++) {
|
|
13554
13475
|
var cf = _a[_i];
|
|
13555
|
-
retVal = retVal.concat(cf.validate(prefix
|
|
13476
|
+
retVal = retVal.concat(cf.validate("".concat(prefix, ".computedFields")));
|
|
13556
13477
|
}
|
|
13557
13478
|
return retVal;
|
|
13558
13479
|
};
|
|
@@ -13611,7 +13532,7 @@
|
|
|
13611
13532
|
var retVal = [];
|
|
13612
13533
|
for (var _i = 0, _a = this.validComputedFields(); _i < _a.length; _i++) {
|
|
13613
13534
|
var cf = _a[_i];
|
|
13614
|
-
retVal = retVal.concat(cf.validate(this.classID()
|
|
13535
|
+
retVal = retVal.concat(cf.validate("".concat(this.classID(), ".computedFields")));
|
|
13615
13536
|
}
|
|
13616
13537
|
return retVal;
|
|
13617
13538
|
};
|
|
@@ -13759,7 +13680,7 @@
|
|
|
13759
13680
|
}
|
|
13760
13681
|
}
|
|
13761
13682
|
return function (row) {
|
|
13762
|
-
var retVal = trim && hasComputedFields ? {} : __assign({}, row);
|
|
13683
|
+
var retVal = trim && hasComputedFields ? {} : __assign$1({}, row);
|
|
13763
13684
|
for (var _i = 0, computedFields_3 = computedFields; _i < computedFields_3.length; _i++) {
|
|
13764
13685
|
var cf = computedFields_3[_i];
|
|
13765
13686
|
retVal[cf.label] = cf.func(row);
|
|
@@ -13804,7 +13725,7 @@
|
|
|
13804
13725
|
};
|
|
13805
13726
|
Project.prototype.hash = function (more) {
|
|
13806
13727
|
if (more === void 0) { more = {}; }
|
|
13807
|
-
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL() }, more));
|
|
13728
|
+
return _super.prototype.hash.call(this, __assign$1({ ddl: this.toDDL() }, more));
|
|
13808
13729
|
};
|
|
13809
13730
|
return Project;
|
|
13810
13731
|
}(ProjectBase));
|
|
@@ -13833,7 +13754,7 @@
|
|
|
13833
13754
|
};
|
|
13834
13755
|
Mappings.prototype.hash = function (more) {
|
|
13835
13756
|
if (more === void 0) { more = {}; }
|
|
13836
|
-
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL() }, more));
|
|
13757
|
+
return _super.prototype.hash.call(this, __assign$1({ ddl: this.toDDL() }, more));
|
|
13837
13758
|
};
|
|
13838
13759
|
Mappings.prototype.referencedFields = function (refs) {
|
|
13839
13760
|
if (this.hasComputedFields()) {
|
|
@@ -13854,9 +13775,9 @@
|
|
|
13854
13775
|
var retVal = [];
|
|
13855
13776
|
if (!this.fieldID_valid()) {
|
|
13856
13777
|
retVal.push({
|
|
13857
|
-
source: prefix
|
|
13858
|
-
msg: "Invalid fieldID: "
|
|
13859
|
-
hint: "expected "
|
|
13778
|
+
source: "".concat(prefix, ".fieldID"),
|
|
13779
|
+
msg: "Invalid fieldID: ".concat(this.fieldID()),
|
|
13780
|
+
hint: "expected ".concat(JSON.stringify(this.fieldIDs()))
|
|
13860
13781
|
});
|
|
13861
13782
|
}
|
|
13862
13783
|
return retVal;
|
|
@@ -13885,7 +13806,7 @@
|
|
|
13885
13806
|
return new SortColumn().fromDDL(ddl);
|
|
13886
13807
|
};
|
|
13887
13808
|
SortColumn.prototype.hash = function () {
|
|
13888
|
-
return util$
|
|
13809
|
+
return util$6.hashSum({
|
|
13889
13810
|
sortColumn: this.fieldID(),
|
|
13890
13811
|
descending: this.descending()
|
|
13891
13812
|
});
|
|
@@ -13947,7 +13868,7 @@
|
|
|
13947
13868
|
};
|
|
13948
13869
|
// Activitiy ---
|
|
13949
13870
|
Sort.prototype.hash = function () {
|
|
13950
|
-
return util$
|
|
13871
|
+
return util$6.hashSum({
|
|
13951
13872
|
Sort: this.column().map(function (sb) { return sb.hash(); })
|
|
13952
13873
|
});
|
|
13953
13874
|
};
|
|
@@ -13975,7 +13896,7 @@
|
|
|
13975
13896
|
});
|
|
13976
13897
|
}
|
|
13977
13898
|
if (sortByArr.length) {
|
|
13978
|
-
return __spreadArray([], data).sort(function (l, r) {
|
|
13899
|
+
return __spreadArray$1([], data, true).sort(function (l, r) {
|
|
13979
13900
|
for (var _i = 0, sortByArr_1 = sortByArr; _i < sortByArr_1.length; _i++) {
|
|
13980
13901
|
var item = sortByArr_1[_i];
|
|
13981
13902
|
var retVal2 = item.compare(l[item.id], r[item.id]);
|
|
@@ -14198,7 +14119,7 @@
|
|
|
14198
14119
|
});
|
|
14199
14120
|
});
|
|
14200
14121
|
_this._origButtons = _this.buttons();
|
|
14201
|
-
_this._filterButtons = __spreadArray([_this._togglePopup, new common.Spacer()], _this._origButtons);
|
|
14122
|
+
_this._filterButtons = __spreadArray$1([_this._togglePopup, new common.Spacer()], _this._origButtons, true);
|
|
14202
14123
|
return _this;
|
|
14203
14124
|
}
|
|
14204
14125
|
VizChartPanel.prototype.popup = function (_) {
|
|
@@ -14420,7 +14341,7 @@
|
|
|
14420
14341
|
}
|
|
14421
14342
|
}
|
|
14422
14343
|
else {
|
|
14423
|
-
console.log("***"
|
|
14344
|
+
console.log("***".concat(this.id(), " Immutable Fields***"));
|
|
14424
14345
|
}
|
|
14425
14346
|
var data = mappings.outData();
|
|
14426
14347
|
var dataChanged = this._prevData !== data;
|
|
@@ -14441,7 +14362,7 @@
|
|
|
14441
14362
|
}
|
|
14442
14363
|
}
|
|
14443
14364
|
else {
|
|
14444
|
-
console.log(this.id()
|
|
14365
|
+
console.log("".concat(this.id(), " Immutable Data!"));
|
|
14445
14366
|
}
|
|
14446
14367
|
if (fieldsChanged || dataChanged) {
|
|
14447
14368
|
return this.chartPanel().renderPromise().then(function () { });
|
|
@@ -14480,7 +14401,7 @@
|
|
|
14480
14401
|
};
|
|
14481
14402
|
Visualization.prototype.toDBData = function (fields, data) {
|
|
14482
14403
|
var _this = this;
|
|
14483
|
-
var _data = util$
|
|
14404
|
+
var _data = util$6.isArray(data) ? data : [data];
|
|
14484
14405
|
return _data.map(function (row) {
|
|
14485
14406
|
var retVal = [];
|
|
14486
14407
|
for (var _i = 0, fields_1 = fields; _i < fields_1.length; _i++) {
|
|
@@ -14533,7 +14454,7 @@
|
|
|
14533
14454
|
__metadata("design:type", Function)
|
|
14534
14455
|
], Visualization.prototype, "description", void 0);
|
|
14535
14456
|
__decorate([
|
|
14536
|
-
common.publish(v2.VisibilitySet[0], "set", "Type", v2.VisibilitySet),
|
|
14457
|
+
common.publish(v2$1.VisibilitySet[0], "set", "Type", v2$1.VisibilitySet),
|
|
14537
14458
|
__metadata("design:type", String)
|
|
14538
14459
|
], Visualization.prototype, "_visibility", void 0);
|
|
14539
14460
|
__decorate([
|
|
@@ -14564,8 +14485,8 @@
|
|
|
14564
14485
|
return _this;
|
|
14565
14486
|
}
|
|
14566
14487
|
State.prototype.set = function (_) {
|
|
14567
|
-
var currSelHash = util$
|
|
14568
|
-
var newSelHash = util$
|
|
14488
|
+
var currSelHash = util$6.hashSum(this.selection());
|
|
14489
|
+
var newSelHash = util$6.hashSum(_);
|
|
14569
14490
|
if (currSelHash !== newSelHash) {
|
|
14570
14491
|
this.selection(_);
|
|
14571
14492
|
return true;
|
|
@@ -14576,7 +14497,7 @@
|
|
|
14576
14497
|
var currSelection = this.selection();
|
|
14577
14498
|
var newSelection = [];
|
|
14578
14499
|
var _loop_1 = function (selRow) {
|
|
14579
|
-
if (util$
|
|
14500
|
+
if (util$6.find(data, function (row, index) {
|
|
14580
14501
|
for (var column in selRow) {
|
|
14581
14502
|
if (selRow[column] !== row[column]) {
|
|
14582
14503
|
return false;
|
|
@@ -14611,7 +14532,7 @@
|
|
|
14611
14532
|
_this._initialized = false;
|
|
14612
14533
|
while (true) {
|
|
14613
14534
|
vizID++;
|
|
14614
|
-
_this._id = "e_"
|
|
14535
|
+
_this._id = "e_".concat(vizID);
|
|
14615
14536
|
if (!_this._ec.elementExists(_this._id)) {
|
|
14616
14537
|
break;
|
|
14617
14538
|
}
|
|
@@ -14619,9 +14540,9 @@
|
|
|
14619
14540
|
var view = new HipiePipeline(_this._ec, _this._id);
|
|
14620
14541
|
_this.hipiePipeline(view);
|
|
14621
14542
|
_this._vizChartPanel = new Visualization(_this._ec, _this.hipiePipeline())
|
|
14622
|
-
.id("viz_"
|
|
14623
|
-
.title("Element "
|
|
14624
|
-
_this._vizChartPanel.chartPanel().id("cp_"
|
|
14543
|
+
.id("viz_".concat(vizID))
|
|
14544
|
+
.title("Element ".concat(vizID));
|
|
14545
|
+
_this._vizChartPanel.chartPanel().id("cp_".concat(vizID));
|
|
14625
14546
|
_this.visualization(_this._vizChartPanel);
|
|
14626
14547
|
_this.state(new State());
|
|
14627
14548
|
return _this;
|
|
@@ -14637,12 +14558,12 @@
|
|
|
14637
14558
|
_this.selection(sel ? more.selection.map(function (r) { return r.__lparam || r; }) : []);
|
|
14638
14559
|
}
|
|
14639
14560
|
else {
|
|
14640
|
-
var row = util$
|
|
14561
|
+
var row = util$6.isArray(_row) ? _row : [_row];
|
|
14641
14562
|
_this.selection(sel ? row.map(function (r) { return r.__lparam || r; }) : []);
|
|
14642
14563
|
}
|
|
14643
14564
|
})
|
|
14644
14565
|
.on("vertex_click", function (_row, col, sel) {
|
|
14645
|
-
var row = util$
|
|
14566
|
+
var row = util$6.isArray(_row) ? _row : [_row];
|
|
14646
14567
|
_this.selection(sel ? row.map(function (r) { return r.__lparam || r; }) : []);
|
|
14647
14568
|
});
|
|
14648
14569
|
return this;
|
|
@@ -14702,11 +14623,11 @@
|
|
|
14702
14623
|
}
|
|
14703
14624
|
this._errors = [];
|
|
14704
14625
|
var pipeline = this.hipiePipeline();
|
|
14705
|
-
for (var _i = 0, _a = __spreadArray(__spreadArray([], pipeline.activities()), [this.mappings()]); _i < _a.length; _i++) {
|
|
14626
|
+
for (var _i = 0, _a = __spreadArray$1(__spreadArray$1([], pipeline.activities(), true), [this.mappings()], false); _i < _a.length; _i++) {
|
|
14706
14627
|
var activity = _a[_i];
|
|
14707
14628
|
for (var _b = 0, _c = activity.validate(); _b < _c.length; _b++) {
|
|
14708
14629
|
var error = _c[_b];
|
|
14709
|
-
this._errors.push(__assign({ elementID: this.id() }, error));
|
|
14630
|
+
this._errors.push(__assign$1({ elementID: this.id() }, error));
|
|
14710
14631
|
}
|
|
14711
14632
|
}
|
|
14712
14633
|
return this._errors;
|
|
@@ -14720,7 +14641,7 @@
|
|
|
14720
14641
|
_this._initialized = true;
|
|
14721
14642
|
var data = _this.hipiePipeline().outData();
|
|
14722
14643
|
if (_this.visualization().chartType() === "FieldForm") {
|
|
14723
|
-
if (_this.state().set(__spreadArray([], data))) {
|
|
14644
|
+
if (_this.state().set(__spreadArray$1([], data, true))) {
|
|
14724
14645
|
_this.selectionChanged();
|
|
14725
14646
|
}
|
|
14726
14647
|
}
|
|
@@ -14806,7 +14727,7 @@
|
|
|
14806
14727
|
return this;
|
|
14807
14728
|
};
|
|
14808
14729
|
ElementContainer.prototype.elements = function () {
|
|
14809
|
-
return __spreadArray([], this._elements);
|
|
14730
|
+
return __spreadArray$1([], this._elements, true);
|
|
14810
14731
|
};
|
|
14811
14732
|
ElementContainer.prototype.element = function (w) {
|
|
14812
14733
|
var retVal;
|
|
@@ -14969,7 +14890,7 @@
|
|
|
14969
14890
|
};
|
|
14970
14891
|
PopupManager.prototype.syncPopups = function () {
|
|
14971
14892
|
var prevPopups = this.popupChartPanels();
|
|
14972
|
-
var diffPopups = util$
|
|
14893
|
+
var diffPopups = util$6.compare(prevPopups, this._ec.elements()
|
|
14973
14894
|
.filter(function (e) { return e.visualization().visibility() === "flyout"; })
|
|
14974
14895
|
.map(function (elem) { return elem.visualization().chartPanel(); }));
|
|
14975
14896
|
for (var _i = 0, _a = diffPopups.exit; _i < _a.length; _i++) {
|
|
@@ -15016,7 +14937,7 @@
|
|
|
15016
14937
|
var errors = element.validate();
|
|
15017
14938
|
wa.title.label = this.tabTitle(element);
|
|
15018
14939
|
this.titleClassed(wa, "error", errors.length > 0);
|
|
15019
|
-
wa.title.caption = errors.map(function (err) { return err.source
|
|
14940
|
+
wa.title.caption = errors.map(function (err) { return "".concat(err.source, ": ").concat(err.msg); }).join("\n");
|
|
15020
14941
|
};
|
|
15021
14942
|
DashboardDockPanel.prototype.activate = function (element) {
|
|
15022
14943
|
var wa = this.getWidgetAdapter(element.visualization().chartPanel());
|
|
@@ -15028,15 +14949,15 @@
|
|
|
15028
14949
|
if (w.minWidth_exists() || w.minHeight_exists()) {
|
|
15029
14950
|
var wa = this.getWidgetAdapter(w);
|
|
15030
14951
|
common.select(wa.node)
|
|
15031
|
-
.style("min-width", w.minWidth()
|
|
15032
|
-
.style("min-height", w.minHeight()
|
|
14952
|
+
.style("min-width", "".concat(w.minWidth(), "px"))
|
|
14953
|
+
.style("min-height", "".concat(w.minHeight(), "px"));
|
|
15033
14954
|
return true;
|
|
15034
14955
|
}
|
|
15035
14956
|
return false;
|
|
15036
14957
|
};
|
|
15037
14958
|
DashboardDockPanel.prototype.syncWidgets = function () {
|
|
15038
14959
|
var prevWidgets = this.widgets();
|
|
15039
|
-
var diffWidgets = util$
|
|
14960
|
+
var diffWidgets = util$6.compare(prevWidgets, this._ec.elements().filter(function (e) { return e.visualization().visibility() === "normal"; }).map(function (viz) { return viz.visualization().chartPanel(); }));
|
|
15040
14961
|
var refit = false;
|
|
15041
14962
|
for (var _i = 0, _a = diffWidgets.exit; _i < _a.length; _i++) {
|
|
15042
14963
|
var w = _a[_i];
|
|
@@ -15081,7 +15002,7 @@
|
|
|
15081
15002
|
// IClosable ---
|
|
15082
15003
|
DashboardDockPanel.prototype.canClose = function (w, wa) {
|
|
15083
15004
|
var id = this._ec.element(w).id();
|
|
15084
|
-
var retVal = window.confirm("Remove Widget \""
|
|
15005
|
+
var retVal = window.confirm("Remove Widget \"".concat(id, "\"?"));
|
|
15085
15006
|
if (retVal) {
|
|
15086
15007
|
this._ec.clear(id);
|
|
15087
15008
|
this.syncWidgets();
|
|
@@ -15212,8 +15133,8 @@
|
|
|
15212
15133
|
if (w.minWidth_exists() || w.minHeight_exists()) {
|
|
15213
15134
|
var cell = this.getWidgetCell(w.id());
|
|
15214
15135
|
cell.element()
|
|
15215
|
-
.style("min-width", w.minWidth()
|
|
15216
|
-
.style("min-height", w.minHeight()
|
|
15136
|
+
.style("min-width", "".concat(w.minWidth(), "px"))
|
|
15137
|
+
.style("min-height", "".concat(w.minHeight(), "px"));
|
|
15217
15138
|
return true;
|
|
15218
15139
|
}
|
|
15219
15140
|
return false;
|
|
@@ -15221,7 +15142,7 @@
|
|
|
15221
15142
|
DashboardGrid.prototype.syncWidgets = function () {
|
|
15222
15143
|
var _this = this;
|
|
15223
15144
|
var prevWidgets = this.widgets();
|
|
15224
|
-
var diffWidgets = util$
|
|
15145
|
+
var diffWidgets = util$6.compare(prevWidgets, this._ec.elements().filter(function (e) { return e.visualization().visibility() === "normal"; }).map(function (viz) { return viz.visualization().chartPanel(); }));
|
|
15225
15146
|
for (var _i = 0, _a = diffWidgets.exit; _i < _a.length; _i++) {
|
|
15226
15147
|
var w = _a[_i];
|
|
15227
15148
|
this.removeWidget(w);
|
|
@@ -15276,7 +15197,7 @@
|
|
|
15276
15197
|
// IClosable ---
|
|
15277
15198
|
DashboardGrid.prototype.canClose = function (w, wa) {
|
|
15278
15199
|
var id = this._ec.element(w).id();
|
|
15279
|
-
var retVal = window.confirm("Remove Widget \""
|
|
15200
|
+
var retVal = window.confirm("Remove Widget \"".concat(id, "\"?"));
|
|
15280
15201
|
if (retVal) {
|
|
15281
15202
|
this._ec.clear(id);
|
|
15282
15203
|
this.syncWidgets();
|
|
@@ -15290,7 +15211,7 @@
|
|
|
15290
15211
|
DashboardGrid.prototype._class += " marshaller_DashboardGrid";
|
|
15291
15212
|
DashboardGrid.prototype.mixin(PopupManager);
|
|
15292
15213
|
|
|
15293
|
-
var logger = util$
|
|
15214
|
+
var logger$1 = util$6.scopedLogger("marshaller/ddl2/ddl");
|
|
15294
15215
|
var DDLDatasourceAdapter = /** @class */ (function () {
|
|
15295
15216
|
function DDLDatasourceAdapter() {
|
|
15296
15217
|
}
|
|
@@ -15299,13 +15220,13 @@
|
|
|
15299
15220
|
};
|
|
15300
15221
|
DDLDatasourceAdapter.prototype.id = function (dsT) {
|
|
15301
15222
|
if (dsT instanceof WU) {
|
|
15302
|
-
return dsT.url()
|
|
15223
|
+
return "".concat(dsT.url(), "/").concat(dsT.wuid());
|
|
15303
15224
|
}
|
|
15304
15225
|
else if (dsT instanceof RoxieService) {
|
|
15305
|
-
return dsT.url()
|
|
15226
|
+
return "".concat(dsT.url(), "/").concat(dsT.querySet(), "/").concat(dsT.queryID());
|
|
15306
15227
|
}
|
|
15307
15228
|
else if (dsT instanceof RestService) {
|
|
15308
|
-
return dsT.url()
|
|
15229
|
+
return "".concat(dsT.url(), "/").concat(dsT.action());
|
|
15309
15230
|
}
|
|
15310
15231
|
return dsT.id();
|
|
15311
15232
|
};
|
|
@@ -15463,12 +15384,12 @@
|
|
|
15463
15384
|
};
|
|
15464
15385
|
DDLAdapter.prototype.readDatasourceRef = function (ddlDSRef, dsPicker, elementContainer) {
|
|
15465
15386
|
var _this = this;
|
|
15466
|
-
if (v2.isWUResultRef(ddlDSRef)) {
|
|
15387
|
+
if (v2$1.isWUResultRef(ddlDSRef)) {
|
|
15467
15388
|
var wu = this._dsReadDedup[ddlDSRef.id];
|
|
15468
15389
|
dsPicker.datasourceID(wu.output(ddlDSRef.output).id());
|
|
15469
15390
|
}
|
|
15470
|
-
else if (v2.isRoxieServiceRef(ddlDSRef)) {
|
|
15471
|
-
dsPicker.datasourceID(ddlDSRef.id
|
|
15391
|
+
else if (v2$1.isRoxieServiceRef(ddlDSRef)) {
|
|
15392
|
+
dsPicker.datasourceID("".concat(ddlDSRef.id, "_").concat(ddlDSRef.output));
|
|
15472
15393
|
var dsRef = dsPicker.datasourceRef();
|
|
15473
15394
|
dsRef
|
|
15474
15395
|
.request(ddlDSRef.request.map(function (rf) {
|
|
@@ -15503,7 +15424,7 @@
|
|
|
15503
15424
|
}
|
|
15504
15425
|
else if (activity instanceof DSPicker) ;
|
|
15505
15426
|
else {
|
|
15506
|
-
logger.warning("Unknown activity type: "
|
|
15427
|
+
logger$1.warning("Unknown activity type: ".concat(activity.classID()));
|
|
15507
15428
|
}
|
|
15508
15429
|
}).filter(function (activity) { return !!activity; });
|
|
15509
15430
|
};
|
|
@@ -15564,8 +15485,8 @@
|
|
|
15564
15485
|
};
|
|
15565
15486
|
DDLAdapter.prototype.writeProperties = function () {
|
|
15566
15487
|
return {
|
|
15567
|
-
name: PKG_NAME,
|
|
15568
|
-
version: PKG_VERSION,
|
|
15488
|
+
name: PKG_NAME$1,
|
|
15489
|
+
version: PKG_VERSION$1,
|
|
15569
15490
|
buildVersion: BUILD_VERSION,
|
|
15570
15491
|
layout: this._dashboard.layout()
|
|
15571
15492
|
};
|
|
@@ -15579,23 +15500,23 @@
|
|
|
15579
15500
|
this.readDatasourceRef(ddlView.datasource, hipiePipeline.datasource(), this._ec);
|
|
15580
15501
|
for (var _a = 0, _b = ddlView.activities; _a < _b.length; _a++) {
|
|
15581
15502
|
var activity = _b[_a];
|
|
15582
|
-
if (v2.isProjectActivity(activity)) {
|
|
15503
|
+
if (v2$1.isProjectActivity(activity)) {
|
|
15583
15504
|
var project = this.readProject(activity);
|
|
15584
15505
|
hipiePipeline.project(project);
|
|
15585
15506
|
}
|
|
15586
|
-
if (v2.isFilterActivity(activity)) {
|
|
15507
|
+
if (v2$1.isFilterActivity(activity)) {
|
|
15587
15508
|
var filters = this.readFilters(activity, this._ec);
|
|
15588
15509
|
hipiePipeline.filters(filters);
|
|
15589
15510
|
}
|
|
15590
|
-
if (v2.isGroupByActivity(activity)) {
|
|
15511
|
+
if (v2$1.isGroupByActivity(activity)) {
|
|
15591
15512
|
var groupBy = this.readGroupBy(activity);
|
|
15592
15513
|
hipiePipeline.groupBy(groupBy);
|
|
15593
15514
|
}
|
|
15594
|
-
if (v2.isSortActivity(activity)) {
|
|
15515
|
+
if (v2$1.isSortActivity(activity)) {
|
|
15595
15516
|
var sort = this.readSort(activity);
|
|
15596
15517
|
hipiePipeline.sort(sort);
|
|
15597
15518
|
}
|
|
15598
|
-
if (v2.isLimitActivity(activity)) {
|
|
15519
|
+
if (v2$1.isLimitActivity(activity)) {
|
|
15599
15520
|
var limit = this.readLimit(activity);
|
|
15600
15521
|
hipiePipeline.limit(limit);
|
|
15601
15522
|
}
|
|
@@ -15613,8 +15534,8 @@
|
|
|
15613
15534
|
var retVal = {
|
|
15614
15535
|
version: "2.2.1",
|
|
15615
15536
|
createdBy: {
|
|
15616
|
-
name: PKG_NAME,
|
|
15617
|
-
version: PKG_VERSION
|
|
15537
|
+
name: PKG_NAME$1,
|
|
15538
|
+
version: PKG_VERSION$1
|
|
15618
15539
|
},
|
|
15619
15540
|
datasources: this.writeDatasources(),
|
|
15620
15541
|
dataviews: this.writeDDLViews(),
|
|
@@ -15660,7 +15581,7 @@
|
|
|
15660
15581
|
}
|
|
15661
15582
|
break;
|
|
15662
15583
|
default:
|
|
15663
|
-
logger.warning("Unknown ddl datasource type: "
|
|
15584
|
+
logger$1.warning("Unknown ddl datasource type: ".concat(ddlDS.type, " "));
|
|
15664
15585
|
}
|
|
15665
15586
|
}
|
|
15666
15587
|
this.readDDLViews(ddl.dataviews);
|
|
@@ -15688,7 +15609,7 @@
|
|
|
15688
15609
|
classIDs.push(classID);
|
|
15689
15610
|
}
|
|
15690
15611
|
classIDs.sort();
|
|
15691
|
-
importJS.push("import { "
|
|
15612
|
+
importJS.push("import { ".concat(classIDs.join(", "), " } from \"").concat(moduleID, "\";"));
|
|
15692
15613
|
}
|
|
15693
15614
|
return importJS.join("\n");
|
|
15694
15615
|
};
|
|
@@ -15731,18 +15652,18 @@
|
|
|
15731
15652
|
switch (meta.type) {
|
|
15732
15653
|
case "string":
|
|
15733
15654
|
case "set":
|
|
15734
|
-
retVal.push(prefix
|
|
15655
|
+
retVal.push("".concat(prefix, ".").concat(meta.id, "(\"").concat(pe[meta.id](), "\")").concat(postfix, ";"));
|
|
15735
15656
|
break;
|
|
15736
15657
|
case "number":
|
|
15737
15658
|
case "boolean":
|
|
15738
|
-
retVal.push(prefix
|
|
15659
|
+
retVal.push("".concat(prefix, ".").concat(meta.id, "(").concat(pe[meta.id](), ")").concat(postfix, ";"));
|
|
15739
15660
|
break;
|
|
15740
15661
|
case "widget":
|
|
15741
|
-
retVal = retVal.concat(this.createProps(prefix
|
|
15662
|
+
retVal = retVal.concat(this.createProps("".concat(prefix, ".").concat(meta.id, "()"), pe[meta.id]()));
|
|
15742
15663
|
break;
|
|
15743
15664
|
case "propertyArray":
|
|
15744
15665
|
if (meta.ext)
|
|
15745
|
-
retVal.push(prefix
|
|
15666
|
+
retVal.push("".concat(prefix, ".").concat(meta.id, "([").concat(pe[meta.id](), "])").concat(postfix, ";"));
|
|
15746
15667
|
break;
|
|
15747
15668
|
}
|
|
15748
15669
|
}
|
|
@@ -15759,13 +15680,13 @@
|
|
|
15759
15680
|
};
|
|
15760
15681
|
JavaScriptAdapter.prototype.datasourceRefID = function (view) {
|
|
15761
15682
|
var datasourceRef = view.datasource;
|
|
15762
|
-
if (v2.isRoxieServiceRef(datasourceRef)) {
|
|
15763
|
-
return this.safeID(datasourceRef.id)
|
|
15683
|
+
if (v2$1.isRoxieServiceRef(datasourceRef)) {
|
|
15684
|
+
return "".concat(this.safeID(datasourceRef.id), "_").concat(this.safeID(datasourceRef.output), "_").concat(this.safeID(view.id));
|
|
15764
15685
|
}
|
|
15765
|
-
else if (v2.isWUResultRef(datasourceRef)) {
|
|
15766
|
-
return this.safeID(datasourceRef.id)
|
|
15686
|
+
else if (v2$1.isWUResultRef(datasourceRef)) {
|
|
15687
|
+
return "".concat(this.safeID(datasourceRef.id), "_").concat(this.safeID(datasourceRef.output));
|
|
15767
15688
|
}
|
|
15768
|
-
return ""
|
|
15689
|
+
return "".concat(this.safeID(datasourceRef.id));
|
|
15769
15690
|
};
|
|
15770
15691
|
JavaScriptAdapter.prototype.writeDatasource = function (view) {
|
|
15771
15692
|
var datasourceRef = view.datasource;
|
|
@@ -15780,30 +15701,30 @@
|
|
|
15780
15701
|
var wuID = this.safeID(view.datasource.id);
|
|
15781
15702
|
if (!this._dedup[wuID]) {
|
|
15782
15703
|
this._dedup[wuID] = true;
|
|
15783
|
-
retVal.push(" export const "
|
|
15704
|
+
retVal.push(" export const ".concat(wuID, " = new marshaller.WU()\n .url(\"").concat(datasource.url, "\")\n .wuid(\"").concat(datasource.wuid, "\")\n ;"));
|
|
15784
15705
|
}
|
|
15785
|
-
retVal.push(" export const "
|
|
15706
|
+
retVal.push(" export const ".concat(id, " = new marshaller.WUResult()\n .wu(").concat(wuID, ")\n .resultName(\"").concat(outputID, "\")\n .responseFields(").concat(stringify(datasource.outputs[outputID].fields), ")\n ;"));
|
|
15786
15707
|
break;
|
|
15787
15708
|
case "logicalfile":
|
|
15788
|
-
retVal.push(" export const "
|
|
15709
|
+
retVal.push(" export const ".concat(id, " = new marshaller.LogicalFile()\n .url(\"").concat(datasource.url, "\")\n .logicalFile(\"").concat(datasource.logicalFile, "\")\n .responseFields(").concat(stringify(datasource.fields), ")\n ;"));
|
|
15789
15710
|
break;
|
|
15790
15711
|
case "hipie":
|
|
15791
15712
|
case "roxie":
|
|
15792
15713
|
var serviceID = this.safeID(view.datasource.id);
|
|
15793
15714
|
if (!this._dedup[serviceID]) {
|
|
15794
15715
|
this._dedup[serviceID] = true;
|
|
15795
|
-
retVal.push(" export const "
|
|
15716
|
+
retVal.push(" export const ".concat(serviceID, " = new marshaller.RoxieService(ec)\n .url(\"").concat(datasource.url, "\")\n .querySet(\"").concat(datasource.querySet, "\")\n .queryID(\"").concat(datasource.queryID, "\")\n .requestFields(").concat(stringify(datasource.inputs), ")\n ;"));
|
|
15796
15717
|
}
|
|
15797
15718
|
var resultID = serviceID + "_" + this.safeID(outputID);
|
|
15798
15719
|
if (!this._dedup[resultID]) {
|
|
15799
15720
|
this._dedup[resultID] = true;
|
|
15800
|
-
retVal.push(" export const "
|
|
15721
|
+
retVal.push(" export const ".concat(resultID, " = new marshaller.RoxieResult(ec)\n .service(").concat(serviceID, ")\n .resultName(\"").concat(outputID, "\")\n .responseFields(").concat(stringify(datasource.outputs[outputID].fields), ")\n ;"));
|
|
15801
15722
|
}
|
|
15802
|
-
retVal.push(" export const "
|
|
15723
|
+
retVal.push(" export const ".concat(id, " = new marshaller.HipieResultRef(ec)\n .datasource(").concat(resultID, ")\n .requestFieldRefs(").concat(stringify(datasourceRef.request), ")\n ;"));
|
|
15803
15724
|
break;
|
|
15804
15725
|
case "databomb":
|
|
15805
15726
|
{
|
|
15806
|
-
retVal.push(" export const "
|
|
15727
|
+
retVal.push(" export const ".concat(id, " = new marshaller.Databomb()\n .format(\"").concat(datasource.format, "\")\n .payload(").concat(JSON.stringify(datasource.payload), ")\n ;"));
|
|
15807
15728
|
}
|
|
15808
15729
|
break;
|
|
15809
15730
|
case "form":
|
|
@@ -15811,9 +15732,9 @@
|
|
|
15811
15732
|
var fromFields = [];
|
|
15812
15733
|
for (var _i = 0, _a = datasource.fields; _i < _a.length; _i++) {
|
|
15813
15734
|
var field = _a[_i];
|
|
15814
|
-
fromFields.push("new marshaller.FormField().fieldID(\""
|
|
15735
|
+
fromFields.push("new marshaller.FormField().fieldID(\"".concat(field.id, "\").default(\"").concat(field.default || "", "\")"));
|
|
15815
15736
|
}
|
|
15816
|
-
retVal.push(" export const "
|
|
15737
|
+
retVal.push(" export const ".concat(id, " = new marshaller.Form()\n .formFields([\n ").concat(fromFields.join(",\n "), "\n ])\n ;"));
|
|
15817
15738
|
}
|
|
15818
15739
|
break;
|
|
15819
15740
|
}
|
|
@@ -15823,17 +15744,17 @@
|
|
|
15823
15744
|
JavaScriptAdapter.prototype.writeActivity = function (activity) {
|
|
15824
15745
|
switch (activity.type) {
|
|
15825
15746
|
case "filter":
|
|
15826
|
-
return "new marshaller.Filters(ec).conditions("
|
|
15747
|
+
return "new marshaller.Filters(ec).conditions(".concat(stringify(activity.conditions), ")");
|
|
15827
15748
|
case "project":
|
|
15828
|
-
return "new marshaller.Project().transformations("
|
|
15749
|
+
return "new marshaller.Project().transformations(".concat(stringify(activity.transformations), ")");
|
|
15829
15750
|
case "groupby":
|
|
15830
|
-
return "new marshaller.GroupBy().fieldIDs("
|
|
15751
|
+
return "new marshaller.GroupBy().fieldIDs(".concat(JSON.stringify(activity.groupByIDs), ").aggregates(").concat(stringify(activity.aggregates), ")");
|
|
15831
15752
|
case "sort":
|
|
15832
|
-
return "new marshaller.Sort().conditions("
|
|
15753
|
+
return "new marshaller.Sort().conditions(".concat(stringify(activity.conditions), ")");
|
|
15833
15754
|
case "limit":
|
|
15834
|
-
return "new marshaller.Limit().rows("
|
|
15755
|
+
return "new marshaller.Limit().rows(".concat(activity.limit, ")");
|
|
15835
15756
|
case "mappings":
|
|
15836
|
-
return "new marshaller.Mappings().transformations("
|
|
15757
|
+
return "new marshaller.Mappings().transformations(".concat(stringify(activity.transformations), ")");
|
|
15837
15758
|
}
|
|
15838
15759
|
};
|
|
15839
15760
|
JavaScriptAdapter.prototype.writeWidgetProps = function (pe) {
|
|
@@ -15841,7 +15762,7 @@
|
|
|
15841
15762
|
for (var _i = 0, _a = pe.publishedProperties(); _i < _a.length; _i++) {
|
|
15842
15763
|
var meta = _a[_i];
|
|
15843
15764
|
if (pe[meta.id + "_modified"]() && meta.id !== "fields") {
|
|
15844
|
-
retVal.push("."
|
|
15765
|
+
retVal.push(".".concat(meta.id, "(").concat(JSON.stringify(pe[meta.id]()), ")"));
|
|
15845
15766
|
}
|
|
15846
15767
|
}
|
|
15847
15768
|
return retVal;
|
|
@@ -15851,29 +15772,29 @@
|
|
|
15851
15772
|
var retVal = "";
|
|
15852
15773
|
var meta;
|
|
15853
15774
|
if (props.__class) {
|
|
15854
|
-
meta = util$
|
|
15775
|
+
meta = util$6.classID2Meta(props.__class);
|
|
15855
15776
|
imports.append(meta);
|
|
15856
|
-
retVal += "new "
|
|
15777
|
+
retVal += "new ".concat(meta.class, "()");
|
|
15857
15778
|
}
|
|
15858
15779
|
for (var prop in props) {
|
|
15859
15780
|
if (prop === "__class") ;
|
|
15860
|
-
else if (util$
|
|
15861
|
-
var arr = ""
|
|
15781
|
+
else if (util$6.isArray(props[prop])) {
|
|
15782
|
+
var arr = "".concat(props[prop].map(function (item) { return _this.joinWithPrefix(item, imports, joinStr + " ", ""); }).join(",".concat(joinStr, " ")));
|
|
15862
15783
|
if (arr) {
|
|
15863
|
-
retVal += joinStr
|
|
15784
|
+
retVal += "".concat(joinStr, " .").concat(prop, "([").concat(joinStr, " ").concat(arr).concat(joinStr, " ])").concat(postFix);
|
|
15864
15785
|
}
|
|
15865
15786
|
}
|
|
15866
15787
|
else {
|
|
15867
|
-
retVal += joinStr
|
|
15788
|
+
retVal += "".concat(joinStr, " .").concat(prop, "(").concat(JSON.stringify(props[prop]), ")").concat(postFix);
|
|
15868
15789
|
}
|
|
15869
15790
|
}
|
|
15870
15791
|
return retVal;
|
|
15871
15792
|
};
|
|
15872
15793
|
JavaScriptAdapter.prototype.writeWidget = function (dataview, imports) {
|
|
15873
|
-
return " export const "
|
|
15794
|
+
return " export const ".concat(dataview.visualization.id, " = new marshaller.VizChartPanel()\n .id(\"").concat(dataview.visualization.id, "\")\n .title(\"").concat(dataview.visualization.title, "\")\n .widget(").concat(this.joinWithPrefix(dataview.visualization.properties["widget"], imports, "\n ", ""), ")\n ;");
|
|
15874
15795
|
};
|
|
15875
15796
|
JavaScriptAdapter.prototype.writeElement = function (dataview) {
|
|
15876
|
-
var activities = ["data."
|
|
15797
|
+
var activities = ["data.".concat(this.datasourceRefID(dataview))];
|
|
15877
15798
|
for (var _i = 0, _a = dataview.activities; _i < _a.length; _i++) {
|
|
15878
15799
|
var activity = _a[_i];
|
|
15879
15800
|
activities.push(this.writeActivity(activity));
|
|
@@ -15881,9 +15802,9 @@
|
|
|
15881
15802
|
var updates = [];
|
|
15882
15803
|
for (var _b = 0, _c = this._ec.filteredBy(dataview.id); _b < _c.length; _b++) {
|
|
15883
15804
|
var filteredViz = _c[_b];
|
|
15884
|
-
updates.push(filteredViz.id()
|
|
15805
|
+
updates.push("".concat(filteredViz.id(), ".refresh();"));
|
|
15885
15806
|
}
|
|
15886
|
-
return "\nconst "
|
|
15807
|
+
return "\nconst ".concat(dataview.id, " = new marshaller.Element(ec)\n .id(\"").concat(dataview.id, "\")\n .pipeline([\n ").concat(activities.join(",\n "), "\n ])\n .mappings(new marshaller.Mappings().transformations(").concat(stringify(dataview.visualization.mappings.transformations), "))\n .chartPanel(viz.").concat(dataview.visualization.id, ")\n .on(\"selectionChanged\", () => {\n ").concat(updates.join("\n "), "\n }, true)\n ;\n").concat(dataview.id, ".visualization()\n .visibility(\"").concat(dataview.visualization.visibility, "\")\n .secondaryDataviewID(\"").concat(dataview.visualization.secondaryDataviewID || "", "\")\n ;\nec.append(").concat(dataview.id, ");\n");
|
|
15887
15808
|
};
|
|
15888
15809
|
JavaScriptAdapter.prototype.writeDatasources = function () {
|
|
15889
15810
|
var retVal = [];
|
|
@@ -15915,7 +15836,7 @@
|
|
|
15915
15836
|
};
|
|
15916
15837
|
JavaScriptAdapter.prototype.createJavaScript = function () {
|
|
15917
15838
|
var widgets = this.writeWidgets();
|
|
15918
|
-
return widgets.widgetImports
|
|
15839
|
+
return "".concat(widgets.widgetImports, "\nimport * as marshaller from \"@hpcc-js/marshaller\";\n\n// Dashboard Element Container (Model) ---\nconst ec = new marshaller.ElementContainer();\n\nnamespace data {\n").concat(this.writeDatasources().join("\n"), "\n}\n\nnamespace viz {\n").concat(widgets.widgetDefs, "\n}\n\n// Dashboard Elements (Controller) ---\n").concat(this.writeElements().trim(), "\n\nec.refresh();\n\n// Optional ---\nconst errors = ec.validate();\nfor (const error of errors) {\n console.error(error.elementID + \" (\" + error.source + \"): \" + error.msg);\n}\n\nexport const dashboard = new marshaller.Dashboard(ec)\n .target(\"placeholder\")\n .titleVisible(false)\n .hideSingleTabs(true)\n .layoutObj(").concat(stringify(this._dashboard.layout()), ")\n .render()\n ;\n\n// @ts-ignore\nconst ddl = ").concat(JSON.stringify(this._ddlSchema), ";\n");
|
|
15919
15840
|
};
|
|
15920
15841
|
return JavaScriptAdapter;
|
|
15921
15842
|
}());
|
|
@@ -15947,8 +15868,8 @@
|
|
|
15947
15868
|
}
|
|
15948
15869
|
}
|
|
15949
15870
|
|
|
15950
|
-
var css_248z = ".p-Widget.phosphor_WidgetAdapter.p-DockPanel-widget.active{border-color:#5589ff;box-shadow:0 -1px 0 #5589ff,1px 1px 2px rgba(0,0,0,.2)}.p-TabBar-tab.p-mod-current.active{border-color:#5589ff}.p-TabBar-tab.p-mod-current.error{background:red;background:linear-gradient(180deg,rgba(255,0,0,.5),#fff)}";
|
|
15951
|
-
styleInject(css_248z);
|
|
15871
|
+
var css_248z$3 = ".p-Widget.phosphor_WidgetAdapter.p-DockPanel-widget.active{border-color:#5589ff;box-shadow:0 -1px 0 #5589ff,1px 1px 2px rgba(0,0,0,.2)}.p-TabBar-tab.p-mod-current.active{border-color:#5589ff}.p-TabBar-tab.p-mod-current.error{background:red;background:linear-gradient(180deg,rgba(255,0,0,.5),#fff)}";
|
|
15872
|
+
styleInject(css_248z$3);
|
|
15952
15873
|
|
|
15953
15874
|
var Dashboard = /** @class */ (function (_super) {
|
|
15954
15875
|
__extends(Dashboard, _super);
|
|
@@ -15978,7 +15899,7 @@
|
|
|
15978
15899
|
.enabled(false)
|
|
15979
15900
|
.on("click", function () {
|
|
15980
15901
|
var elem = _this._prevActive;
|
|
15981
|
-
if (elem && window.confirm("Remove Widget \""
|
|
15902
|
+
if (elem && window.confirm("Remove Widget \"".concat(elem.id(), "\"?"))) {
|
|
15982
15903
|
_this._ec.clear(elem.id());
|
|
15983
15904
|
_this.renderPromise().then(function () {
|
|
15984
15905
|
_this.vizActivation(undefined);
|
|
@@ -16174,7 +16095,7 @@
|
|
|
16174
16095
|
};
|
|
16175
16096
|
Dashboard.prototype.importDDL = function (ddl, baseUrl, wuid, dermatologyJson) {
|
|
16176
16097
|
if (dermatologyJson === void 0) { dermatologyJson = {}; }
|
|
16177
|
-
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade
|
|
16098
|
+
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade(ddl, baseUrl, wuid, true, dermatologyJson);
|
|
16178
16099
|
return this.restore(ddl2, true);
|
|
16179
16100
|
};
|
|
16180
16101
|
Dashboard.prototype.javascript = function () {
|
|
@@ -16223,8 +16144,8 @@
|
|
|
16223
16144
|
}(layout.ChartPanel));
|
|
16224
16145
|
Dashboard.prototype._class += " dashboard_dashboard";
|
|
16225
16146
|
|
|
16226
|
-
var css_248z$
|
|
16227
|
-
styleInject(css_248z$
|
|
16147
|
+
var css_248z$2 = "";
|
|
16148
|
+
styleInject(css_248z$2);
|
|
16228
16149
|
|
|
16229
16150
|
var DDLEditor = /** @class */ (function (_super) {
|
|
16230
16151
|
__extends(DDLEditor, _super);
|
|
@@ -16310,7 +16231,7 @@
|
|
|
16310
16231
|
this.subgraphMap[id] = retVal;
|
|
16311
16232
|
}
|
|
16312
16233
|
this.vertices.push(retVal);
|
|
16313
|
-
retVal.title(""
|
|
16234
|
+
retVal.title("".concat(label));
|
|
16314
16235
|
retVal.getBBox(true);
|
|
16315
16236
|
return retVal;
|
|
16316
16237
|
};
|
|
@@ -16328,13 +16249,13 @@
|
|
|
16328
16249
|
this.vertices.push(retVal);
|
|
16329
16250
|
retVal
|
|
16330
16251
|
.textbox_shape_colorFill(fillColor)
|
|
16331
|
-
.text(tooltip ? label
|
|
16252
|
+
.text(tooltip ? "".concat(label, "\n").concat(tooltip) : "".concat(label))
|
|
16332
16253
|
.tooltip(tooltip);
|
|
16333
16254
|
retVal.getBBox(true);
|
|
16334
16255
|
return retVal;
|
|
16335
16256
|
};
|
|
16336
16257
|
GraphAdapter.prototype.createEdge = function (sourceID, targetID) {
|
|
16337
|
-
var edgeID = sourceID
|
|
16258
|
+
var edgeID = "".concat(sourceID, "->").concat(targetID);
|
|
16338
16259
|
var retVal = this.edgeMap[edgeID];
|
|
16339
16260
|
if (!retVal) {
|
|
16340
16261
|
retVal = new graph.Edge()
|
|
@@ -16350,27 +16271,27 @@
|
|
|
16350
16271
|
dsDetails = dsDetails.selection().datasource();
|
|
16351
16272
|
}
|
|
16352
16273
|
if (dsDetails instanceof WUResult) {
|
|
16353
|
-
var serverID = ""
|
|
16354
|
-
var server = this.createSubgraph(serverID, ""
|
|
16355
|
-
var wuID = dsDetails.url()
|
|
16356
|
-
var wu = this.createSubgraph(wuID, ""
|
|
16274
|
+
var serverID = "".concat(dsDetails.url());
|
|
16275
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16276
|
+
var wuID = "".concat(dsDetails.url(), "/").concat(dsDetails.wuid());
|
|
16277
|
+
var wu = this.createSubgraph(wuID, "".concat(dsDetails.wuid()));
|
|
16357
16278
|
this.hierarchy.push({ parent: server, child: wu });
|
|
16358
|
-
var resultID = wuID
|
|
16279
|
+
var resultID = "".concat(wuID, "/").concat(dsDetails.resultName());
|
|
16359
16280
|
var result = this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails });
|
|
16360
16281
|
this.hierarchy.push({ parent: wu, child: result });
|
|
16361
16282
|
return resultID;
|
|
16362
16283
|
}
|
|
16363
16284
|
else if (dsDetails instanceof LogicalFile) {
|
|
16364
|
-
var serverID = ""
|
|
16365
|
-
var server = this.createSubgraph(serverID, ""
|
|
16366
|
-
var lfID = serverID
|
|
16285
|
+
var serverID = "".concat(dsDetails.url());
|
|
16286
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16287
|
+
var lfID = "".concat(serverID, "/").concat(dsDetails.logicalFile());
|
|
16367
16288
|
var lf = this.createVertex(lfID, dsDetails.logicalFile(), { activity: dsDetails });
|
|
16368
16289
|
this.hierarchy.push({ parent: server, child: lf });
|
|
16369
16290
|
return lfID;
|
|
16370
16291
|
}
|
|
16371
16292
|
else if (dsDetails instanceof RoxieResultRef) {
|
|
16372
|
-
var serverID = ""
|
|
16373
|
-
var server = this.createSubgraph(serverID, ""
|
|
16293
|
+
var serverID = "".concat(dsDetails.url());
|
|
16294
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16374
16295
|
var surfaceID = dsDetails.serviceID(); // `${dsDetails.url()}/${dsDetails.querySet()}`;
|
|
16375
16296
|
var surface = this.createSubgraph(surfaceID, dsDetails.querySet());
|
|
16376
16297
|
this.hierarchy.push({ parent: server, child: surface });
|
|
@@ -16379,7 +16300,7 @@
|
|
|
16379
16300
|
parent: surface,
|
|
16380
16301
|
child: this.createVertex(roxieID, dsDetails.queryID())
|
|
16381
16302
|
});
|
|
16382
|
-
var roxieResultID = surfaceID
|
|
16303
|
+
var roxieResultID = "".concat(surfaceID, "/").concat(dsDetails.resultName());
|
|
16383
16304
|
this.hierarchy.push({
|
|
16384
16305
|
parent: surface,
|
|
16385
16306
|
child: this.createVertex(roxieResultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16388,15 +16309,15 @@
|
|
|
16388
16309
|
return roxieResultID;
|
|
16389
16310
|
}
|
|
16390
16311
|
else if (dsDetails instanceof RoxieResult) {
|
|
16391
|
-
var serverID = ""
|
|
16392
|
-
var server = this.createSubgraph(serverID, ""
|
|
16312
|
+
var serverID = "".concat(dsDetails.service().url());
|
|
16313
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16393
16314
|
var querySetID = dsDetails.serviceID();
|
|
16394
16315
|
var querySet = this.createSubgraph(querySetID, dsDetails.service().querySet());
|
|
16395
16316
|
this.hierarchy.push({ parent: server, child: querySet });
|
|
16396
|
-
var queryID = querySetID
|
|
16317
|
+
var queryID = "".concat(querySetID, "/").concat(dsDetails.service().queryID());
|
|
16397
16318
|
var query = this.createSubgraph(queryID, dsDetails.service().queryID());
|
|
16398
16319
|
this.hierarchy.push({ parent: querySet, child: query });
|
|
16399
|
-
var resultID = queryID
|
|
16320
|
+
var resultID = "".concat(queryID, "/").concat(dsDetails.resultName());
|
|
16400
16321
|
this.hierarchy.push({
|
|
16401
16322
|
parent: query,
|
|
16402
16323
|
child: this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16405,8 +16326,8 @@
|
|
|
16405
16326
|
return resultID;
|
|
16406
16327
|
}
|
|
16407
16328
|
else if (dsDetails instanceof RestResultRef) {
|
|
16408
|
-
var serverID = ""
|
|
16409
|
-
var server = this.createSubgraph(serverID, ""
|
|
16329
|
+
var serverID = "".concat(dsDetails.url());
|
|
16330
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16410
16331
|
var surfaceID = dsDetails.serviceID();
|
|
16411
16332
|
var surface = this.createSubgraph(surfaceID, dsDetails.action());
|
|
16412
16333
|
this.hierarchy.push({ parent: server, child: surface });
|
|
@@ -16415,7 +16336,7 @@
|
|
|
16415
16336
|
parent: surface,
|
|
16416
16337
|
child: this.createVertex(roxieID, dsDetails.action())
|
|
16417
16338
|
});
|
|
16418
|
-
var roxieResultID = surfaceID
|
|
16339
|
+
var roxieResultID = "".concat(surfaceID, "/").concat(dsDetails.resultName());
|
|
16419
16340
|
this.hierarchy.push({
|
|
16420
16341
|
parent: surface,
|
|
16421
16342
|
child: this.createVertex(roxieResultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16424,13 +16345,13 @@
|
|
|
16424
16345
|
return roxieResultID;
|
|
16425
16346
|
}
|
|
16426
16347
|
else if (dsDetails instanceof RestResult) {
|
|
16427
|
-
var serverID = ""
|
|
16428
|
-
var server = this.createSubgraph(serverID, ""
|
|
16348
|
+
var serverID = "".concat(dsDetails.service().url());
|
|
16349
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16429
16350
|
var serviceID = dsDetails.serviceID();
|
|
16430
|
-
var actionID = serverID
|
|
16351
|
+
var actionID = "".concat(serverID, "/").concat(dsDetails.service().action());
|
|
16431
16352
|
var action = this.createSubgraph(serviceID, dsDetails.service().action());
|
|
16432
16353
|
this.hierarchy.push({ parent: server, child: action });
|
|
16433
|
-
var resultID = actionID
|
|
16354
|
+
var resultID = "".concat(actionID, "/").concat(dsDetails.resultName());
|
|
16434
16355
|
this.hierarchy.push({
|
|
16435
16356
|
parent: action,
|
|
16436
16357
|
child: this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16455,20 +16376,20 @@
|
|
|
16455
16376
|
}
|
|
16456
16377
|
};
|
|
16457
16378
|
GraphAdapter.prototype.createActivity = function (sourceID, view, activity, label) {
|
|
16458
|
-
var surface = this.createSubgraph(view.id(), ""
|
|
16379
|
+
var surface = this.createSubgraph(view.id(), "".concat(view.id()), { view: view });
|
|
16459
16380
|
var fillColor = null;
|
|
16460
16381
|
var tooltip = "";
|
|
16461
16382
|
if (activity.exists()) {
|
|
16462
16383
|
var errors = activity.validate();
|
|
16463
16384
|
if (errors.length) {
|
|
16464
16385
|
fillColor = "pink";
|
|
16465
|
-
tooltip = errors.map(function (error) { return error.source
|
|
16386
|
+
tooltip = errors.map(function (error) { return "".concat(error.source, ": ").concat(error.msg); }).join("\n");
|
|
16466
16387
|
}
|
|
16467
16388
|
}
|
|
16468
16389
|
else {
|
|
16469
16390
|
fillColor = "lightgrey";
|
|
16470
16391
|
}
|
|
16471
|
-
var vertex = this.createVertex(activity.id(), label || ""
|
|
16392
|
+
var vertex = this.createVertex(activity.id(), label || "".concat(activity.classID()), { view: view, activity: activity }, tooltip, fillColor);
|
|
16472
16393
|
if (sourceID) {
|
|
16473
16394
|
this.createEdge(sourceID, activity.id());
|
|
16474
16395
|
}
|
|
@@ -16495,7 +16416,7 @@
|
|
|
16495
16416
|
var visualization = view.visualization();
|
|
16496
16417
|
var mappings = visualization.mappings();
|
|
16497
16418
|
var mappingVertexID = this.createActivity(prevID, view, mappings, "Mappings");
|
|
16498
|
-
var vizSubgraphID = visualization.id()
|
|
16419
|
+
var vizSubgraphID = "".concat(visualization.id(), "-sg");
|
|
16499
16420
|
var surface = this.createSubgraph(vizSubgraphID, "Visualization", { visualization: visualization });
|
|
16500
16421
|
this.hierarchy.push({
|
|
16501
16422
|
parent: this.subgraphMap[view.id()],
|
|
@@ -16505,14 +16426,14 @@
|
|
|
16505
16426
|
parent: surface,
|
|
16506
16427
|
child: this.vertexMap[mappings.id()]
|
|
16507
16428
|
});
|
|
16508
|
-
var vizVertexID = visualization.id()
|
|
16429
|
+
var vizVertexID = "".concat(visualization.id(), "-viz");
|
|
16509
16430
|
var widgetVertex = this.createVertex(vizVertexID, visualization.chartPanel().widget().classID(), { view: view, chartPanel: visualization.chartPanel() });
|
|
16510
16431
|
this.createEdge(mappingVertexID, vizVertexID);
|
|
16511
16432
|
this.hierarchy.push({
|
|
16512
16433
|
parent: surface,
|
|
16513
16434
|
child: widgetVertex
|
|
16514
16435
|
});
|
|
16515
|
-
var stateVertexID = visualization.id()
|
|
16436
|
+
var stateVertexID = "".concat(visualization.id(), "-state");
|
|
16516
16437
|
var stateVertex = this.createVertex(stateVertexID, "Selection", { view: view, state: view.state() });
|
|
16517
16438
|
this.createEdge(vizVertexID, stateVertexID)
|
|
16518
16439
|
.weight(10)
|
|
@@ -16533,7 +16454,7 @@
|
|
|
16533
16454
|
var secondaryElement = this._ec.element(visualization.secondaryDataviewID());
|
|
16534
16455
|
if (secondaryElement) {
|
|
16535
16456
|
var mappings = secondaryElement.visualization().mappings();
|
|
16536
|
-
this.createEdge(mappings.id(), visualization.id()
|
|
16457
|
+
this.createEdge(mappings.id(), "".concat(visualization.id(), "-viz"));
|
|
16537
16458
|
}
|
|
16538
16459
|
}
|
|
16539
16460
|
for (var _f = 0, _g = this._ec.elements(); _f < _g.length; _f++) {
|
|
@@ -16774,7 +16695,7 @@
|
|
|
16774
16695
|
var data = this._ec.elements().map(function (elem) {
|
|
16775
16696
|
return [elem.id(), elem.visualization().title(), elem];
|
|
16776
16697
|
});
|
|
16777
|
-
var dataID = util$
|
|
16698
|
+
var dataID = util$6.hashSum(data.map(function (row) { return row[0]; }));
|
|
16778
16699
|
if (this._prevDataID !== dataID) {
|
|
16779
16700
|
this._prevDataID = dataID;
|
|
16780
16701
|
this.data(data);
|
|
@@ -16784,8 +16705,8 @@
|
|
|
16784
16705
|
return DVTable;
|
|
16785
16706
|
}(layout.ChartPanel));
|
|
16786
16707
|
|
|
16787
|
-
var css_248z$
|
|
16788
|
-
styleInject(css_248z$
|
|
16708
|
+
var css_248z$1 = ".common_SelectionButton.error{background:red;background:linear-gradient(180deg,rgba(255,0,0,.5),hsla(0,0%,100%,0) 80%)}";
|
|
16709
|
+
styleInject(css_248z$1);
|
|
16789
16710
|
|
|
16790
16711
|
var PipelineSelectionButton = /** @class */ (function (_super) {
|
|
16791
16712
|
__extends(PipelineSelectionButton, _super);
|
|
@@ -16811,7 +16732,7 @@
|
|
|
16811
16732
|
this.tooltip(_.map(function (err) {
|
|
16812
16733
|
var errSourceParts = err.source.split(".");
|
|
16813
16734
|
errSourceParts.splice(0, 1);
|
|
16814
|
-
return errSourceParts.join(".")
|
|
16735
|
+
return "".concat(errSourceParts.join("."), ": ").concat(err.msg);
|
|
16815
16736
|
}).join("\n"));
|
|
16816
16737
|
}
|
|
16817
16738
|
else {
|
|
@@ -17090,7 +17011,7 @@
|
|
|
17090
17011
|
return PipelinePanel;
|
|
17091
17012
|
}(layout.ChartPanel));
|
|
17092
17013
|
PipelinePanel.prototype._class += " marshaller_PipelinePanel";
|
|
17093
|
-
var DDLPreview = /** @class */ (function (_super) {
|
|
17014
|
+
var DDLPreview$1 = /** @class */ (function (_super) {
|
|
17094
17015
|
__extends(DDLPreview, _super);
|
|
17095
17016
|
function DDLPreview() {
|
|
17096
17017
|
var _this = _super.call(this) || this;
|
|
@@ -17157,7 +17078,7 @@
|
|
|
17157
17078
|
_this.propChanged(id, newValue, oldValue, source);
|
|
17158
17079
|
});
|
|
17159
17080
|
_this._previewPanel = new phosphor.TabPanel();
|
|
17160
|
-
_this._rhsDDLPreview = new DDLPreview();
|
|
17081
|
+
_this._rhsDDLPreview = new DDLPreview$1();
|
|
17161
17082
|
_this._rhsDataPreview = new dgrid.DatasourceTable().pagination(true);
|
|
17162
17083
|
_this._previewPanel
|
|
17163
17084
|
.addWidget(_this._rhsDataPreview, "Data")
|
|
@@ -17208,11 +17129,11 @@
|
|
|
17208
17129
|
return PipelineSplitPanel;
|
|
17209
17130
|
}(phosphor.SplitPanel));
|
|
17210
17131
|
|
|
17211
|
-
var css_248z
|
|
17212
|
-
styleInject(css_248z
|
|
17132
|
+
var css_248z = ".graph_Graph .graphVertex>.subgraph .title rect{fill:#dcf1ff;border-bottom-width:0}.graph_Graph .graphVertex>.subgraph .title text{fill:#000}.graph_Graph .graphVertex>.subgraph rect{fill:none}.graph_Graph .graphVertex .graph_Vertex.selected .common_Shape,.graph_Graph .graphVertex>.subgraph.selected rect{stroke:red!important}.graph_Graph .common_Surface .common_Menu{visibility:hidden}.p-MenuBar{background:#fafafa;border-bottom:1px solid #ddd;color:rgba(0,0,0,.87);font:13px Helvetica,Arial,sans-serif;padding-left:5px}.p-MenuBar-menu{transform:translateY(-1px)}.p-MenuBar-item{border-left:1px solid transparent;border-right:1px solid transparent;padding:4px 8px}.p-MenuBar-item.p-mod-active{background:#e5e5e5}.p-MenuBar.p-mod-active .p-MenuBar-item.p-mod-active{background:#fff;border-left:1px solid silver;border-right:1px solid silver;box-shadow:0 0 6px rgba(0,0,0,.2);z-index:10001}.p-Menu{background:#fff;border:1px solid silver;box-shadow:0 1px 6px rgba(0,0,0,.2);color:rgba(0,0,0,.87);font:12px Helvetica,Arial,sans-serif;padding:3px 0}.p-Menu-item.p-mod-active{background:#e5e5e5}.p-Menu-item.p-mod-disabled{color:rgba(0,0,0,.25)}.p-Menu-itemIcon{padding:4px 2px;width:21px}.p-Menu-itemLabel{padding:4px 35px 4px 2px}.p-Menu-itemMnemonic{text-decoration:underline}.p-Menu-itemShortcut{padding:4px 0}.p-Menu-itemSubmenuIcon{padding:4px 0;width:16px}.p-Menu-item[data-type=separator]>div{height:9px;padding:0}.p-Menu-item[data-type=separator]>div:after{border-top:1px solid #ddd;content:\"\";display:block;position:relative;top:4px}.p-Menu-itemIcon:before,.p-Menu-itemSubmenuIcon:before{font-family:FontAwesome}.p-Menu-item.p-mod-toggled>.p-Menu-itemIcon:before{content:\"\\f00c\"}.p-Menu-item[data-type=submenu]>.p-Menu-itemSubmenuIcon:before{content:\"\\f0da\"}.p-CommandPalette{background:#f5f5f5;font-family:sans-serif}.p-CommandPalette-search{padding:8px}.p-CommandPalette-wrapper{background:#fff;border:1px solid #e0e0e0;padding:4px 6px}.p-CommandPalette-input{border:none;font-size:16px;outline:none;width:100%}.p-CommandPalette-header{background:#e1e1e1;color:#757575;cursor:pointer;font-size:12px;font-weight:600;padding:4px}.p-CommandPalette-header:hover:before{content:\"\\2026\";float:right;margin-right:4px}.p-CommandPalette-header>mark{background-color:transparent;font-weight:700}.p-CommandPalette-item{color:#757575;font-size:13px;font-weight:500;padding:4px 8px}.p-CommandPalette-emptyMessage{color:#757575;font-size:12px;font-weight:600;padding:4px;text-align:center}.p-CommandPalette-item.p-mod-disabled{color:rgba(0,0,0,.25)}.p-CommandPalette-item.p-mod-active{background:#7fdbff}.p-CommandPalette-item:hover:not(.p-mod-active):not(.p-mod-disabled){background:#e5e5e5}.p-CommandPalette-itemLabel>mark{background-color:transparent;font-weight:700}.p-CommandPalette-item.p-mod-disabled mark{color:rgba(0,0,0,.4)}.p-CommandPalette-itemCaption{color:#9e9e9e;font-size:11px;font-weight:400}";
|
|
17133
|
+
styleInject(css_248z);
|
|
17213
17134
|
|
|
17214
|
-
var logger
|
|
17215
|
-
var DDLPreview
|
|
17135
|
+
var logger = util$6.scopedLogger("marshaller/dashy");
|
|
17136
|
+
var DDLPreview = /** @class */ (function (_super) {
|
|
17216
17137
|
__extends(DDLPreview, _super);
|
|
17217
17138
|
function DDLPreview(_dashy) {
|
|
17218
17139
|
var _this = _super.call(this) || this;
|
|
@@ -17297,7 +17218,7 @@
|
|
|
17297
17218
|
.on("vertex_contextmenu", function (row, col, sel, ext) {
|
|
17298
17219
|
});
|
|
17299
17220
|
_this._lhsDebugSheet = new phosphor.TabPanel();
|
|
17300
|
-
_this._lhsDebugDDLEditor = new DDLPreview
|
|
17221
|
+
_this._lhsDebugDDLEditor = new DDLPreview(_this);
|
|
17301
17222
|
_this._lhsDebugDDLSchema = new codemirror.JSONEditor().json(ddl2Schema);
|
|
17302
17223
|
_this._lhsDebugJSEditor = new codemirror.JSEditor();
|
|
17303
17224
|
_this._lhsDebugCloneEC = new ElementContainer();
|
|
@@ -17361,7 +17282,7 @@
|
|
|
17361
17282
|
for (var _i = 0, _a = _this._elementContainer.validate(); _i < _a.length; _i++) {
|
|
17362
17283
|
var error = _a[_i];
|
|
17363
17284
|
hasError = true;
|
|
17364
|
-
logger
|
|
17285
|
+
logger.warning(error.elementID + " (" + error.source + "): " + error.msg);
|
|
17365
17286
|
}
|
|
17366
17287
|
if (hasError) {
|
|
17367
17288
|
// Re-render to highlight errrors ---
|
|
@@ -17372,7 +17293,7 @@
|
|
|
17372
17293
|
};
|
|
17373
17294
|
Dashy.prototype.importDDL = function (ddl, baseUrl, wuid, dermatologyJson) {
|
|
17374
17295
|
if (dermatologyJson === void 0) { dermatologyJson = {}; }
|
|
17375
|
-
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade
|
|
17296
|
+
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade(ddl, baseUrl, wuid, true, dermatologyJson);
|
|
17376
17297
|
var retVal = this.restore(ddl2);
|
|
17377
17298
|
if (isDDL2Schema(ddl)) {
|
|
17378
17299
|
this._lhsDebugDDLv2.json(ddl2);
|
|
@@ -17435,7 +17356,7 @@
|
|
|
17435
17356
|
};
|
|
17436
17357
|
Dashy.prototype.loadGraph = function () {
|
|
17437
17358
|
this._lhsPipeline
|
|
17438
|
-
.data(__assign({}, this._graphAdapter.createGraph()), true);
|
|
17359
|
+
.data(__assign$1({}, this._graphAdapter.createGraph()), true);
|
|
17439
17360
|
if (this.activeLHS() === this._lhsPipeline) {
|
|
17440
17361
|
this._lhsPipeline
|
|
17441
17362
|
.lazyRender();
|
|
@@ -17468,7 +17389,7 @@
|
|
|
17468
17389
|
}).then(function () {
|
|
17469
17390
|
for (var _i = 0, _a = _this._lhsDebugCloneEC.validate(); _i < _a.length; _i++) {
|
|
17470
17391
|
var error = _a[_i];
|
|
17471
|
-
logger
|
|
17392
|
+
logger.warning(error.elementID + " (" + error.source + "): " + error.msg);
|
|
17472
17393
|
}
|
|
17473
17394
|
});
|
|
17474
17395
|
});
|
|
@@ -17516,11 +17437,11 @@
|
|
|
17516
17437
|
palette.addItem({ command: "remove", category: "Notebook" });
|
|
17517
17438
|
palette.id = "palette";
|
|
17518
17439
|
var contextMenu = new phosphor.ContextMenu({ commands: commands });
|
|
17519
|
-
contextMenu.addItem({ command: "dash_add", selector: "#"
|
|
17520
|
-
contextMenu.addItem({ command: "dash_clear", selector: "#"
|
|
17521
|
-
contextMenu.addItem({ type: "separator", selector: "#"
|
|
17522
|
-
contextMenu.addItem({ command: "dash_load", selector: "#"
|
|
17523
|
-
contextMenu.addItem({ command: "dash_save", selector: "#"
|
|
17440
|
+
contextMenu.addItem({ command: "dash_add", selector: "#".concat(this._lhsDashboard.id()) });
|
|
17441
|
+
contextMenu.addItem({ command: "dash_clear", selector: "#".concat(this._lhsDashboard.id()) });
|
|
17442
|
+
contextMenu.addItem({ type: "separator", selector: "#".concat(this._lhsDashboard.id()) });
|
|
17443
|
+
contextMenu.addItem({ command: "dash_load", selector: "#".concat(this.id()) });
|
|
17444
|
+
contextMenu.addItem({ command: "dash_save", selector: "#".concat(this.id()) });
|
|
17524
17445
|
document.addEventListener("contextmenu", function (event) {
|
|
17525
17446
|
if (contextMenu.open(event)) {
|
|
17526
17447
|
event.preventDefault();
|
|
@@ -17637,7 +17558,8 @@
|
|
|
17637
17558
|
reader.onload = (function (theFile) {
|
|
17638
17559
|
return function (e) {
|
|
17639
17560
|
try {
|
|
17640
|
-
var
|
|
17561
|
+
var result = Array.isArray(e.target.result) ? e.target.result[0] : e.target.result;
|
|
17562
|
+
var json = JSON.parse(result);
|
|
17641
17563
|
context.importDDL(json);
|
|
17642
17564
|
}
|
|
17643
17565
|
catch (ex) {
|
|
@@ -17664,9 +17586,7 @@
|
|
|
17664
17586
|
|
|
17665
17587
|
Object.defineProperty(exports, 'hookSend', {
|
|
17666
17588
|
enumerable: true,
|
|
17667
|
-
get: function () {
|
|
17668
|
-
return comms.hookSend;
|
|
17669
|
-
}
|
|
17589
|
+
get: function () { return comms.hookSend; }
|
|
17670
17590
|
});
|
|
17671
17591
|
exports.Activity = Activity;
|
|
17672
17592
|
exports.ActivityArray = ActivityArray;
|
|
@@ -17703,8 +17623,8 @@
|
|
|
17703
17623
|
exports.Mappings = Mappings;
|
|
17704
17624
|
exports.MultiField = MultiField;
|
|
17705
17625
|
exports.NullView = NullView;
|
|
17706
|
-
exports.PKG_NAME = PKG_NAME;
|
|
17707
|
-
exports.PKG_VERSION = PKG_VERSION;
|
|
17626
|
+
exports.PKG_NAME = PKG_NAME$1;
|
|
17627
|
+
exports.PKG_VERSION = PKG_VERSION$1;
|
|
17708
17628
|
exports.Project = Project;
|
|
17709
17629
|
exports.ProjectBase = ProjectBase;
|
|
17710
17630
|
exports.RemoteFilter = RemoteFilter;
|
|
@@ -17732,5 +17652,5 @@
|
|
|
17732
17652
|
|
|
17733
17653
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
17734
17654
|
|
|
17735
|
-
}))
|
|
17655
|
+
}));
|
|
17736
17656
|
//# sourceMappingURL=index.js.map
|