@hpcc-js/marshaller 2.23.99 → 2.23.103
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 +522 -529
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +567 -576
- 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 +32 -31
- package/src/__package__.ts +2 -2
- package/src/dashy.ts +1 -1
- package/src/ddl2/model/visualization.ts +0 -1
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types/ddl2/model/visualization.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.23.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
7
|
+
var PKG_NAME$1 = "@hpcc-js/marshaller";
|
|
8
|
+
var PKG_VERSION$1 = "2.23.103";
|
|
9
|
+
var BUILD_VERSION = "2.97.0";
|
|
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.17.21";
|
|
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
|
-
}
|
|
3377
|
+
var uri_all = {exports: {}};
|
|
3365
3378
|
|
|
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
|
-
}
|
|
3383
|
-
|
|
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
|
var isArray = Array.isArray;
|
|
4792
4786
|
var keyList = Object.keys;
|
|
@@ -4844,7 +4838,7 @@
|
|
|
4844
4838
|
|
|
4845
4839
|
// https://mathiasbynens.be/notes/javascript-encoding
|
|
4846
4840
|
// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
|
|
4847
|
-
var ucs2length = function ucs2length(str) {
|
|
4841
|
+
var ucs2length$1 = function ucs2length(str) {
|
|
4848
4842
|
var length = 0
|
|
4849
4843
|
, len = str.length
|
|
4850
4844
|
, pos = 0
|
|
@@ -4861,16 +4855,16 @@
|
|
|
4861
4855
|
return length;
|
|
4862
4856
|
};
|
|
4863
4857
|
|
|
4864
|
-
var util = {
|
|
4858
|
+
var util$5 = {
|
|
4865
4859
|
copy: copy,
|
|
4866
4860
|
checkDataType: checkDataType,
|
|
4867
4861
|
checkDataTypes: checkDataTypes,
|
|
4868
4862
|
coerceToTypes: coerceToTypes,
|
|
4869
|
-
toHash: toHash,
|
|
4863
|
+
toHash: toHash$1,
|
|
4870
4864
|
getProperty: getProperty,
|
|
4871
4865
|
escapeQuotes: escapeQuotes,
|
|
4872
4866
|
equal: fastDeepEqual,
|
|
4873
|
-
ucs2length: ucs2length,
|
|
4867
|
+
ucs2length: ucs2length$1,
|
|
4874
4868
|
varOccurences: varOccurences,
|
|
4875
4869
|
varReplace: varReplace,
|
|
4876
4870
|
cleanUpCode: cleanUpCode,
|
|
@@ -4920,7 +4914,7 @@
|
|
|
4920
4914
|
case 1: return checkDataType(dataTypes[0], data, true);
|
|
4921
4915
|
default:
|
|
4922
4916
|
var code = '';
|
|
4923
|
-
var types = toHash(dataTypes);
|
|
4917
|
+
var types = toHash$1(dataTypes);
|
|
4924
4918
|
if (types.array && types.object) {
|
|
4925
4919
|
code = types.null ? '(': '(!' + data + ' || ';
|
|
4926
4920
|
code += 'typeof ' + data + ' !== "object")';
|
|
@@ -4937,7 +4931,7 @@
|
|
|
4937
4931
|
}
|
|
4938
4932
|
|
|
4939
4933
|
|
|
4940
|
-
var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
|
|
4934
|
+
var COERCE_TO_TYPES = toHash$1([ 'string', 'number', 'integer', 'boolean', 'null' ]);
|
|
4941
4935
|
function coerceToTypes(optionCoerceTypes, dataTypes) {
|
|
4942
4936
|
if (Array.isArray(dataTypes)) {
|
|
4943
4937
|
var types = [];
|
|
@@ -4955,19 +4949,19 @@
|
|
|
4955
4949
|
}
|
|
4956
4950
|
|
|
4957
4951
|
|
|
4958
|
-
function toHash(arr) {
|
|
4952
|
+
function toHash$1(arr) {
|
|
4959
4953
|
var hash = {};
|
|
4960
4954
|
for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
|
|
4961
4955
|
return hash;
|
|
4962
4956
|
}
|
|
4963
4957
|
|
|
4964
4958
|
|
|
4965
|
-
var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
4959
|
+
var IDENTIFIER$1 = /^[a-z$_][a-z$_0-9]*$/i;
|
|
4966
4960
|
var SINGLE_QUOTE = /'|\\/g;
|
|
4967
4961
|
function getProperty(key) {
|
|
4968
4962
|
return typeof key == 'number'
|
|
4969
4963
|
? '[' + key + ']'
|
|
4970
|
-
: IDENTIFIER.test(key)
|
|
4964
|
+
: IDENTIFIER$1.test(key)
|
|
4971
4965
|
? '.' + key
|
|
4972
4966
|
: "['" + escapeQuotes(key) + "']";
|
|
4973
4967
|
}
|
|
@@ -5071,17 +5065,17 @@
|
|
|
5071
5065
|
}
|
|
5072
5066
|
|
|
5073
5067
|
|
|
5074
|
-
var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
|
|
5075
|
-
var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
5068
|
+
var JSON_POINTER$1 = /^\/(?:[^~]|~0|~1)*$/;
|
|
5069
|
+
var RELATIVE_JSON_POINTER$1 = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
5076
5070
|
function getData($data, lvl, paths) {
|
|
5077
5071
|
var up, jsonPointer, data, matches;
|
|
5078
5072
|
if ($data === '') return 'rootData';
|
|
5079
5073
|
if ($data[0] == '/') {
|
|
5080
|
-
if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
|
|
5074
|
+
if (!JSON_POINTER$1.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
|
|
5081
5075
|
jsonPointer = $data;
|
|
5082
5076
|
data = 'rootData';
|
|
5083
5077
|
} else {
|
|
5084
|
-
matches = $data.match(RELATIVE_JSON_POINTER);
|
|
5078
|
+
matches = $data.match(RELATIVE_JSON_POINTER$1);
|
|
5085
5079
|
if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
|
|
5086
5080
|
up = +matches[1];
|
|
5087
5081
|
jsonPointer = matches[2];
|
|
@@ -5133,15 +5127,17 @@
|
|
|
5133
5127
|
return str.replace(/~1/g, '/').replace(/~0/g, '~');
|
|
5134
5128
|
}
|
|
5135
5129
|
|
|
5136
|
-
var
|
|
5130
|
+
var util$4 = util$5;
|
|
5137
5131
|
|
|
5138
|
-
|
|
5139
|
-
|
|
5132
|
+
var schema_obj = SchemaObject$2;
|
|
5133
|
+
|
|
5134
|
+
function SchemaObject$2(obj) {
|
|
5135
|
+
util$4.copy(obj, this);
|
|
5140
5136
|
}
|
|
5141
5137
|
|
|
5142
|
-
var jsonSchemaTraverse =
|
|
5138
|
+
var jsonSchemaTraverse = {exports: {}};
|
|
5143
5139
|
|
|
5144
|
-
var traverse =
|
|
5140
|
+
var traverse$1 = jsonSchemaTraverse.exports = function (schema, opts, cb) {
|
|
5145
5141
|
// Legacy support for v0.3.1 and earlier.
|
|
5146
5142
|
if (typeof opts == 'function') {
|
|
5147
5143
|
cb = opts;
|
|
@@ -5156,7 +5152,7 @@
|
|
|
5156
5152
|
};
|
|
5157
5153
|
|
|
5158
5154
|
|
|
5159
|
-
traverse.keywords = {
|
|
5155
|
+
traverse$1.keywords = {
|
|
5160
5156
|
additionalItems: true,
|
|
5161
5157
|
items: true,
|
|
5162
5158
|
contains: true,
|
|
@@ -5165,21 +5161,21 @@
|
|
|
5165
5161
|
not: true
|
|
5166
5162
|
};
|
|
5167
5163
|
|
|
5168
|
-
traverse.arrayKeywords = {
|
|
5164
|
+
traverse$1.arrayKeywords = {
|
|
5169
5165
|
items: true,
|
|
5170
5166
|
allOf: true,
|
|
5171
5167
|
anyOf: true,
|
|
5172
5168
|
oneOf: true
|
|
5173
5169
|
};
|
|
5174
5170
|
|
|
5175
|
-
traverse.propsKeywords = {
|
|
5171
|
+
traverse$1.propsKeywords = {
|
|
5176
5172
|
definitions: true,
|
|
5177
5173
|
properties: true,
|
|
5178
5174
|
patternProperties: true,
|
|
5179
5175
|
dependencies: true
|
|
5180
5176
|
};
|
|
5181
5177
|
|
|
5182
|
-
traverse.skipKeywords = {
|
|
5178
|
+
traverse$1.skipKeywords = {
|
|
5183
5179
|
default: true,
|
|
5184
5180
|
enum: true,
|
|
5185
5181
|
const: true,
|
|
@@ -5207,16 +5203,16 @@
|
|
|
5207
5203
|
for (var key in schema) {
|
|
5208
5204
|
var sch = schema[key];
|
|
5209
5205
|
if (Array.isArray(sch)) {
|
|
5210
|
-
if (key in traverse.arrayKeywords) {
|
|
5206
|
+
if (key in traverse$1.arrayKeywords) {
|
|
5211
5207
|
for (var i=0; i<sch.length; i++)
|
|
5212
5208
|
_traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
|
|
5213
5209
|
}
|
|
5214
|
-
} else if (key in traverse.propsKeywords) {
|
|
5210
|
+
} else if (key in traverse$1.propsKeywords) {
|
|
5215
5211
|
if (sch && typeof sch == 'object') {
|
|
5216
5212
|
for (var prop in sch)
|
|
5217
5213
|
_traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
|
|
5218
5214
|
}
|
|
5219
|
-
} else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
|
|
5215
|
+
} else if (key in traverse$1.keywords || (opts.allKeys && !(key in traverse$1.skipKeywords))) {
|
|
5220
5216
|
_traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
|
|
5221
5217
|
}
|
|
5222
5218
|
}
|
|
@@ -5228,16 +5224,21 @@
|
|
|
5228
5224
|
function escapeJsonPtr(str) {
|
|
5229
5225
|
return str.replace(/~/g, '~0').replace(/\//g, '~1');
|
|
5230
5226
|
}
|
|
5231
|
-
});
|
|
5232
5227
|
|
|
5233
|
-
var
|
|
5228
|
+
var URI$1 = uri_all.exports
|
|
5229
|
+
, equal$1 = fastDeepEqual
|
|
5230
|
+
, util$3 = util$5
|
|
5231
|
+
, SchemaObject$1 = schema_obj
|
|
5232
|
+
, traverse = jsonSchemaTraverse.exports;
|
|
5233
|
+
|
|
5234
|
+
var resolve_1 = resolve$3;
|
|
5234
5235
|
|
|
5235
|
-
resolve.normalizeId = normalizeId;
|
|
5236
|
-
resolve.fullPath = getFullPath;
|
|
5237
|
-
resolve.url = resolveUrl;
|
|
5238
|
-
resolve.ids = resolveIds;
|
|
5239
|
-
resolve.inlineRef = inlineRef;
|
|
5240
|
-
resolve.schema = resolveSchema;
|
|
5236
|
+
resolve$3.normalizeId = normalizeId;
|
|
5237
|
+
resolve$3.fullPath = getFullPath;
|
|
5238
|
+
resolve$3.url = resolveUrl;
|
|
5239
|
+
resolve$3.ids = resolveIds;
|
|
5240
|
+
resolve$3.inlineRef = inlineRef;
|
|
5241
|
+
resolve$3.schema = resolveSchema;
|
|
5241
5242
|
|
|
5242
5243
|
/**
|
|
5243
5244
|
* [resolve and compile the references ($ref)]
|
|
@@ -5247,16 +5248,16 @@
|
|
|
5247
5248
|
* @param {String} ref reference to resolve
|
|
5248
5249
|
* @return {Object|Function} schema object (if the schema can be inlined) or validation function
|
|
5249
5250
|
*/
|
|
5250
|
-
function resolve(compile, root, ref) {
|
|
5251
|
+
function resolve$3(compile, root, ref) {
|
|
5251
5252
|
/* jshint validthis: true */
|
|
5252
5253
|
var refVal = this._refs[ref];
|
|
5253
5254
|
if (typeof refVal == 'string') {
|
|
5254
5255
|
if (this._refs[refVal]) refVal = this._refs[refVal];
|
|
5255
|
-
else return resolve.call(this, compile, root, refVal);
|
|
5256
|
+
else return resolve$3.call(this, compile, root, refVal);
|
|
5256
5257
|
}
|
|
5257
5258
|
|
|
5258
5259
|
refVal = refVal || this._schemas[ref];
|
|
5259
|
-
if (refVal instanceof
|
|
5260
|
+
if (refVal instanceof SchemaObject$1) {
|
|
5260
5261
|
return inlineRef(refVal.schema, this._opts.inlineRefs)
|
|
5261
5262
|
? refVal.schema
|
|
5262
5263
|
: refVal.validate || this._compile(refVal);
|
|
@@ -5270,7 +5271,7 @@
|
|
|
5270
5271
|
baseId = res.baseId;
|
|
5271
5272
|
}
|
|
5272
5273
|
|
|
5273
|
-
if (schema instanceof
|
|
5274
|
+
if (schema instanceof SchemaObject$1) {
|
|
5274
5275
|
v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
|
|
5275
5276
|
} else if (schema !== undefined) {
|
|
5276
5277
|
v = inlineRef(schema, this._opts.inlineRefs)
|
|
@@ -5291,7 +5292,7 @@
|
|
|
5291
5292
|
*/
|
|
5292
5293
|
function resolveSchema(root, ref) {
|
|
5293
5294
|
/* jshint validthis: true */
|
|
5294
|
-
var p =
|
|
5295
|
+
var p = URI$1.parse(ref)
|
|
5295
5296
|
, refPath = _getFullPath(p)
|
|
5296
5297
|
, baseId = getFullPath(this._getId(root.schema));
|
|
5297
5298
|
if (Object.keys(root.schema).length === 0 || refPath !== baseId) {
|
|
@@ -5299,12 +5300,12 @@
|
|
|
5299
5300
|
var refVal = this._refs[id];
|
|
5300
5301
|
if (typeof refVal == 'string') {
|
|
5301
5302
|
return resolveRecursive.call(this, root, refVal, p);
|
|
5302
|
-
} else if (refVal instanceof
|
|
5303
|
+
} else if (refVal instanceof SchemaObject$1) {
|
|
5303
5304
|
if (!refVal.validate) this._compile(refVal);
|
|
5304
5305
|
root = refVal;
|
|
5305
5306
|
} else {
|
|
5306
5307
|
refVal = this._schemas[id];
|
|
5307
|
-
if (refVal instanceof
|
|
5308
|
+
if (refVal instanceof SchemaObject$1) {
|
|
5308
5309
|
if (!refVal.validate) this._compile(refVal);
|
|
5309
5310
|
if (id == normalizeId(ref))
|
|
5310
5311
|
return { schema: refVal, root: root, baseId: baseId };
|
|
@@ -5335,7 +5336,7 @@
|
|
|
5335
5336
|
}
|
|
5336
5337
|
|
|
5337
5338
|
|
|
5338
|
-
var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
|
|
5339
|
+
var PREVENT_SCOPE_CHANGE = util$3.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
|
|
5339
5340
|
/* @this Ajv */
|
|
5340
5341
|
function getJsonPointer(parsedRef, baseId, schema, root) {
|
|
5341
5342
|
/* jshint validthis: true */
|
|
@@ -5346,7 +5347,7 @@
|
|
|
5346
5347
|
for (var i = 1; i < parts.length; i++) {
|
|
5347
5348
|
var part = parts[i];
|
|
5348
5349
|
if (part) {
|
|
5349
|
-
part = util.unescapeFragment(part);
|
|
5350
|
+
part = util$3.unescapeFragment(part);
|
|
5350
5351
|
schema = schema[part];
|
|
5351
5352
|
if (schema === undefined) break;
|
|
5352
5353
|
var id;
|
|
@@ -5370,7 +5371,7 @@
|
|
|
5370
5371
|
}
|
|
5371
5372
|
|
|
5372
5373
|
|
|
5373
|
-
var SIMPLE_INLINED = util.toHash([
|
|
5374
|
+
var SIMPLE_INLINED = util$3.toHash([
|
|
5374
5375
|
'type', 'format', 'pattern',
|
|
5375
5376
|
'maxLength', 'minLength',
|
|
5376
5377
|
'maxProperties', 'minProperties',
|
|
@@ -5430,13 +5431,13 @@
|
|
|
5430
5431
|
|
|
5431
5432
|
function getFullPath(id, normalize) {
|
|
5432
5433
|
if (normalize !== false) id = normalizeId(id);
|
|
5433
|
-
var p =
|
|
5434
|
+
var p = URI$1.parse(id);
|
|
5434
5435
|
return _getFullPath(p);
|
|
5435
5436
|
}
|
|
5436
5437
|
|
|
5437
5438
|
|
|
5438
5439
|
function _getFullPath(p) {
|
|
5439
|
-
return
|
|
5440
|
+
return URI$1.serialize(p).split('#')[0] + '#';
|
|
5440
5441
|
}
|
|
5441
5442
|
|
|
5442
5443
|
|
|
@@ -5448,7 +5449,7 @@
|
|
|
5448
5449
|
|
|
5449
5450
|
function resolveUrl(baseId, id) {
|
|
5450
5451
|
id = normalizeId(id);
|
|
5451
|
-
return
|
|
5452
|
+
return URI$1.resolve(baseId, id);
|
|
5452
5453
|
}
|
|
5453
5454
|
|
|
5454
5455
|
|
|
@@ -5460,25 +5461,25 @@
|
|
|
5460
5461
|
var localRefs = {};
|
|
5461
5462
|
var self = this;
|
|
5462
5463
|
|
|
5463
|
-
|
|
5464
|
+
traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
|
|
5464
5465
|
if (jsonPtr === '') return;
|
|
5465
5466
|
var id = self._getId(sch);
|
|
5466
5467
|
var baseId = baseIds[parentJsonPtr];
|
|
5467
5468
|
var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
|
|
5468
5469
|
if (keyIndex !== undefined)
|
|
5469
|
-
fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
|
|
5470
|
+
fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util$3.escapeFragment(keyIndex));
|
|
5470
5471
|
|
|
5471
5472
|
if (typeof id == 'string') {
|
|
5472
|
-
id = baseId = normalizeId(baseId ?
|
|
5473
|
+
id = baseId = normalizeId(baseId ? URI$1.resolve(baseId, id) : id);
|
|
5473
5474
|
|
|
5474
5475
|
var refVal = self._refs[id];
|
|
5475
5476
|
if (typeof refVal == 'string') refVal = self._refs[refVal];
|
|
5476
5477
|
if (refVal && refVal.schema) {
|
|
5477
|
-
if (!
|
|
5478
|
+
if (!equal$1(sch, refVal.schema))
|
|
5478
5479
|
throw new Error('id "' + id + '" resolves to more than one schema');
|
|
5479
5480
|
} else if (id != normalizeId(fullPath)) {
|
|
5480
5481
|
if (id[0] == '#') {
|
|
5481
|
-
if (localRefs[id] && !
|
|
5482
|
+
if (localRefs[id] && !equal$1(sch, localRefs[id]))
|
|
5482
5483
|
throw new Error('id "' + id + '" resolves to more than one schema');
|
|
5483
5484
|
localRefs[id] = sch;
|
|
5484
5485
|
} else {
|
|
@@ -5493,28 +5494,30 @@
|
|
|
5493
5494
|
return localRefs;
|
|
5494
5495
|
}
|
|
5495
5496
|
|
|
5497
|
+
var resolve$2 = resolve_1;
|
|
5498
|
+
|
|
5496
5499
|
var error_classes = {
|
|
5497
|
-
Validation: errorSubclass(ValidationError),
|
|
5498
|
-
MissingRef: errorSubclass(MissingRefError)
|
|
5500
|
+
Validation: errorSubclass(ValidationError$1),
|
|
5501
|
+
MissingRef: errorSubclass(MissingRefError$1)
|
|
5499
5502
|
};
|
|
5500
5503
|
|
|
5501
5504
|
|
|
5502
|
-
function ValidationError(errors) {
|
|
5505
|
+
function ValidationError$1(errors) {
|
|
5503
5506
|
this.message = 'validation failed';
|
|
5504
5507
|
this.errors = errors;
|
|
5505
5508
|
this.ajv = this.validation = true;
|
|
5506
5509
|
}
|
|
5507
5510
|
|
|
5508
5511
|
|
|
5509
|
-
MissingRefError.message = function (baseId, ref) {
|
|
5512
|
+
MissingRefError$1.message = function (baseId, ref) {
|
|
5510
5513
|
return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
|
|
5511
5514
|
};
|
|
5512
5515
|
|
|
5513
5516
|
|
|
5514
|
-
function MissingRefError(baseId, ref, message) {
|
|
5515
|
-
this.message = message || MissingRefError.message(baseId, ref);
|
|
5516
|
-
this.missingRef =
|
|
5517
|
-
this.missingSchema =
|
|
5517
|
+
function MissingRefError$1(baseId, ref, message) {
|
|
5518
|
+
this.message = message || MissingRefError$1.message(baseId, ref);
|
|
5519
|
+
this.missingRef = resolve$2.url(baseId, ref);
|
|
5520
|
+
this.missingSchema = resolve$2.normalizeId(resolve$2.fullPath(this.missingRef));
|
|
5518
5521
|
}
|
|
5519
5522
|
|
|
5520
5523
|
|
|
@@ -5582,7 +5585,7 @@
|
|
|
5582
5585
|
})(data);
|
|
5583
5586
|
};
|
|
5584
5587
|
|
|
5585
|
-
var validate = function generate_validate(it, $keyword, $ruleType) {
|
|
5588
|
+
var validate$1 = function generate_validate(it, $keyword, $ruleType) {
|
|
5586
5589
|
var out = '';
|
|
5587
5590
|
var $async = it.schema.$async === true,
|
|
5588
5591
|
$refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
|
|
@@ -6076,17 +6079,24 @@
|
|
|
6076
6079
|
return out;
|
|
6077
6080
|
};
|
|
6078
6081
|
|
|
6082
|
+
var resolve$1 = resolve_1
|
|
6083
|
+
, util$2 = util$5
|
|
6084
|
+
, errorClasses$1 = error_classes
|
|
6085
|
+
, stableStringify$1 = fastJsonStableStringify;
|
|
6086
|
+
|
|
6087
|
+
var validateGenerator = validate$1;
|
|
6088
|
+
|
|
6079
6089
|
/**
|
|
6080
6090
|
* Functions below are used inside compiled validations function
|
|
6081
6091
|
*/
|
|
6082
6092
|
|
|
6083
|
-
var ucs2length
|
|
6084
|
-
|
|
6093
|
+
var ucs2length = util$2.ucs2length;
|
|
6094
|
+
var equal = fastDeepEqual;
|
|
6085
6095
|
|
|
6086
6096
|
// this error is thrown by async schemas to return validation errors via exception
|
|
6087
|
-
var ValidationError
|
|
6097
|
+
var ValidationError = errorClasses$1.Validation;
|
|
6088
6098
|
|
|
6089
|
-
var compile_1 = compile;
|
|
6099
|
+
var compile_1 = compile$1;
|
|
6090
6100
|
|
|
6091
6101
|
|
|
6092
6102
|
/**
|
|
@@ -6098,7 +6108,7 @@
|
|
|
6098
6108
|
* @param {String} baseId base ID for IDs in the schema
|
|
6099
6109
|
* @return {Function} validation function
|
|
6100
6110
|
*/
|
|
6101
|
-
function compile(schema, root, localRefs, baseId) {
|
|
6111
|
+
function compile$1(schema, root, localRefs, baseId) {
|
|
6102
6112
|
/* jshint validthis: true, evil: true */
|
|
6103
6113
|
/* eslint no-shadow: 0 */
|
|
6104
6114
|
var self = this
|
|
@@ -6150,11 +6160,11 @@
|
|
|
6150
6160
|
function localCompile(_schema, _root, localRefs, baseId) {
|
|
6151
6161
|
var isRoot = !_root || (_root && _root.schema == _schema);
|
|
6152
6162
|
if (_root.schema != root.schema)
|
|
6153
|
-
return compile.call(self, _schema, _root, localRefs, baseId);
|
|
6163
|
+
return compile$1.call(self, _schema, _root, localRefs, baseId);
|
|
6154
6164
|
|
|
6155
6165
|
var $async = _schema.$async === true;
|
|
6156
6166
|
|
|
6157
|
-
var sourceCode =
|
|
6167
|
+
var sourceCode = validateGenerator({
|
|
6158
6168
|
isTop: true,
|
|
6159
6169
|
schema: _schema,
|
|
6160
6170
|
isRoot: isRoot,
|
|
@@ -6163,11 +6173,11 @@
|
|
|
6163
6173
|
schemaPath: '',
|
|
6164
6174
|
errSchemaPath: '#',
|
|
6165
6175
|
errorPath: '""',
|
|
6166
|
-
MissingRefError:
|
|
6176
|
+
MissingRefError: errorClasses$1.MissingRef,
|
|
6167
6177
|
RULES: RULES,
|
|
6168
|
-
validate:
|
|
6169
|
-
util: util,
|
|
6170
|
-
resolve:
|
|
6178
|
+
validate: validateGenerator,
|
|
6179
|
+
util: util$2,
|
|
6180
|
+
resolve: resolve$1,
|
|
6171
6181
|
resolveRef: resolveRef,
|
|
6172
6182
|
usePattern: usePattern,
|
|
6173
6183
|
useDefault: useDefault,
|
|
@@ -6179,12 +6189,12 @@
|
|
|
6179
6189
|
});
|
|
6180
6190
|
|
|
6181
6191
|
sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
|
|
6182
|
-
+ vars(defaults, defaultCode) + vars(customRules, customRuleCode)
|
|
6192
|
+
+ vars(defaults, defaultCode) + vars(customRules, customRuleCode$1)
|
|
6183
6193
|
+ sourceCode;
|
|
6184
6194
|
|
|
6185
6195
|
if (opts.processCode) sourceCode = opts.processCode(sourceCode);
|
|
6186
6196
|
// console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
|
|
6187
|
-
var validate
|
|
6197
|
+
var validate;
|
|
6188
6198
|
try {
|
|
6189
6199
|
var makeValidate = new Function(
|
|
6190
6200
|
'self',
|
|
@@ -6200,7 +6210,7 @@
|
|
|
6200
6210
|
sourceCode
|
|
6201
6211
|
);
|
|
6202
6212
|
|
|
6203
|
-
validate
|
|
6213
|
+
validate = makeValidate(
|
|
6204
6214
|
self,
|
|
6205
6215
|
RULES,
|
|
6206
6216
|
formats,
|
|
@@ -6208,36 +6218,36 @@
|
|
|
6208
6218
|
refVal,
|
|
6209
6219
|
defaults,
|
|
6210
6220
|
customRules,
|
|
6211
|
-
|
|
6212
|
-
ucs2length
|
|
6213
|
-
ValidationError
|
|
6221
|
+
equal,
|
|
6222
|
+
ucs2length,
|
|
6223
|
+
ValidationError
|
|
6214
6224
|
);
|
|
6215
6225
|
|
|
6216
|
-
refVal[0] = validate
|
|
6226
|
+
refVal[0] = validate;
|
|
6217
6227
|
} catch(e) {
|
|
6218
6228
|
self.logger.error('Error compiling schema, function code:', sourceCode);
|
|
6219
6229
|
throw e;
|
|
6220
6230
|
}
|
|
6221
6231
|
|
|
6222
|
-
validate
|
|
6223
|
-
validate
|
|
6224
|
-
validate
|
|
6225
|
-
validate
|
|
6226
|
-
validate
|
|
6227
|
-
if ($async) validate
|
|
6232
|
+
validate.schema = _schema;
|
|
6233
|
+
validate.errors = null;
|
|
6234
|
+
validate.refs = refs;
|
|
6235
|
+
validate.refVal = refVal;
|
|
6236
|
+
validate.root = isRoot ? validate : _root;
|
|
6237
|
+
if ($async) validate.$async = true;
|
|
6228
6238
|
if (opts.sourceCode === true) {
|
|
6229
|
-
validate
|
|
6239
|
+
validate.source = {
|
|
6230
6240
|
code: sourceCode,
|
|
6231
6241
|
patterns: patterns,
|
|
6232
6242
|
defaults: defaults
|
|
6233
6243
|
};
|
|
6234
6244
|
}
|
|
6235
6245
|
|
|
6236
|
-
return validate
|
|
6246
|
+
return validate;
|
|
6237
6247
|
}
|
|
6238
6248
|
|
|
6239
6249
|
function resolveRef(baseId, ref, isRoot) {
|
|
6240
|
-
ref =
|
|
6250
|
+
ref = resolve$1.url(baseId, ref);
|
|
6241
6251
|
var refIndex = refs[ref];
|
|
6242
6252
|
var _refVal, refCode;
|
|
6243
6253
|
if (refIndex !== undefined) {
|
|
@@ -6255,13 +6265,13 @@
|
|
|
6255
6265
|
}
|
|
6256
6266
|
|
|
6257
6267
|
refCode = addLocalRef(ref);
|
|
6258
|
-
var v =
|
|
6268
|
+
var v = resolve$1.call(self, localCompile, root, ref);
|
|
6259
6269
|
if (v === undefined) {
|
|
6260
6270
|
var localSchema = localRefs && localRefs[ref];
|
|
6261
6271
|
if (localSchema) {
|
|
6262
|
-
v =
|
|
6272
|
+
v = resolve$1.inlineRef(localSchema, opts.inlineRefs)
|
|
6263
6273
|
? localSchema
|
|
6264
|
-
: compile.call(self, localSchema, root, localRefs, baseId);
|
|
6274
|
+
: compile$1.call(self, localSchema, root, localRefs, baseId);
|
|
6265
6275
|
}
|
|
6266
6276
|
}
|
|
6267
6277
|
|
|
@@ -6310,10 +6320,10 @@
|
|
|
6310
6320
|
case 'number':
|
|
6311
6321
|
return '' + value;
|
|
6312
6322
|
case 'string':
|
|
6313
|
-
return util.toQuotedString(value);
|
|
6323
|
+
return util$2.toQuotedString(value);
|
|
6314
6324
|
case 'object':
|
|
6315
6325
|
if (value === null) return 'null';
|
|
6316
|
-
var valueStr =
|
|
6326
|
+
var valueStr = stableStringify$1(value);
|
|
6317
6327
|
var index = defaultsHash[valueStr];
|
|
6318
6328
|
if (index === undefined) {
|
|
6319
6329
|
index = defaultsHash[valueStr] = defaults.length;
|
|
@@ -6428,7 +6438,7 @@
|
|
|
6428
6438
|
|
|
6429
6439
|
|
|
6430
6440
|
function patternCode(i, patterns) {
|
|
6431
|
-
return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
|
|
6441
|
+
return 'var pattern' + i + ' = new RegExp(' + util$2.toQuotedString(patterns[i]) + ');';
|
|
6432
6442
|
}
|
|
6433
6443
|
|
|
6434
6444
|
|
|
@@ -6442,7 +6452,7 @@
|
|
|
6442
6452
|
}
|
|
6443
6453
|
|
|
6444
6454
|
|
|
6445
|
-
function customRuleCode(i) {
|
|
6455
|
+
function customRuleCode$1(i) {
|
|
6446
6456
|
return 'var customRule' + i + ' = customRules[' + i + '];';
|
|
6447
6457
|
}
|
|
6448
6458
|
|
|
@@ -6455,33 +6465,33 @@
|
|
|
6455
6465
|
return code;
|
|
6456
6466
|
}
|
|
6457
6467
|
|
|
6458
|
-
var cache =
|
|
6459
|
-
|
|
6468
|
+
var cache = {exports: {}};
|
|
6460
6469
|
|
|
6461
|
-
var Cache =
|
|
6470
|
+
var Cache$1 = cache.exports = function Cache() {
|
|
6462
6471
|
this._cache = {};
|
|
6463
6472
|
};
|
|
6464
6473
|
|
|
6465
6474
|
|
|
6466
|
-
Cache.prototype.put = function Cache_put(key, value) {
|
|
6475
|
+
Cache$1.prototype.put = function Cache_put(key, value) {
|
|
6467
6476
|
this._cache[key] = value;
|
|
6468
6477
|
};
|
|
6469
6478
|
|
|
6470
6479
|
|
|
6471
|
-
Cache.prototype.get = function Cache_get(key) {
|
|
6480
|
+
Cache$1.prototype.get = function Cache_get(key) {
|
|
6472
6481
|
return this._cache[key];
|
|
6473
6482
|
};
|
|
6474
6483
|
|
|
6475
6484
|
|
|
6476
|
-
Cache.prototype.del = function Cache_del(key) {
|
|
6485
|
+
Cache$1.prototype.del = function Cache_del(key) {
|
|
6477
6486
|
delete this._cache[key];
|
|
6478
6487
|
};
|
|
6479
6488
|
|
|
6480
6489
|
|
|
6481
|
-
Cache.prototype.clear = function Cache_clear() {
|
|
6490
|
+
Cache$1.prototype.clear = function Cache_clear() {
|
|
6482
6491
|
this._cache = {};
|
|
6483
6492
|
};
|
|
6484
|
-
|
|
6493
|
+
|
|
6494
|
+
var util$1 = util$5;
|
|
6485
6495
|
|
|
6486
6496
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
6487
6497
|
var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
|
|
@@ -6497,20 +6507,20 @@
|
|
|
6497
6507
|
// 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;
|
|
6498
6508
|
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-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-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;
|
|
6499
6509
|
var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
6500
|
-
var JSON_POINTER
|
|
6510
|
+
var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
|
|
6501
6511
|
var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
|
|
6502
|
-
var RELATIVE_JSON_POINTER
|
|
6512
|
+
var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
|
|
6503
6513
|
|
|
6504
6514
|
|
|
6505
|
-
var formats_1 = formats;
|
|
6515
|
+
var formats_1 = formats$1;
|
|
6506
6516
|
|
|
6507
|
-
function formats(mode) {
|
|
6517
|
+
function formats$1(mode) {
|
|
6508
6518
|
mode = mode == 'full' ? 'full' : 'fast';
|
|
6509
|
-
return util.copy(formats[mode]);
|
|
6519
|
+
return util$1.copy(formats$1[mode]);
|
|
6510
6520
|
}
|
|
6511
6521
|
|
|
6512
6522
|
|
|
6513
|
-
formats.fast = {
|
|
6523
|
+
formats$1.fast = {
|
|
6514
6524
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
6515
6525
|
date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
|
|
6516
6526
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -6535,14 +6545,14 @@
|
|
|
6535
6545
|
uuid: UUID,
|
|
6536
6546
|
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
6537
6547
|
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
|
6538
|
-
'json-pointer': JSON_POINTER
|
|
6548
|
+
'json-pointer': JSON_POINTER,
|
|
6539
6549
|
'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
|
|
6540
6550
|
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
|
6541
|
-
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6551
|
+
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6542
6552
|
};
|
|
6543
6553
|
|
|
6544
6554
|
|
|
6545
|
-
formats.full = {
|
|
6555
|
+
formats$1.full = {
|
|
6546
6556
|
date: date,
|
|
6547
6557
|
time: time,
|
|
6548
6558
|
'date-time': date_time,
|
|
@@ -6556,9 +6566,9 @@
|
|
|
6556
6566
|
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,
|
|
6557
6567
|
regex: regex,
|
|
6558
6568
|
uuid: UUID,
|
|
6559
|
-
'json-pointer': JSON_POINTER
|
|
6569
|
+
'json-pointer': JSON_POINTER,
|
|
6560
6570
|
'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
|
|
6561
|
-
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6571
|
+
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6562
6572
|
};
|
|
6563
6573
|
|
|
6564
6574
|
|
|
@@ -6874,7 +6884,7 @@
|
|
|
6874
6884
|
var out = ' ';
|
|
6875
6885
|
var $schema = it.schema[$keyword];
|
|
6876
6886
|
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
|
|
6877
|
-
|
|
6887
|
+
!it.opts.allErrors;
|
|
6878
6888
|
var $comment = it.util.toQuotedString($schema);
|
|
6879
6889
|
if (it.opts.$comment === true) {
|
|
6880
6890
|
out += ' console.log(' + ($comment) + ');';
|
|
@@ -8345,7 +8355,7 @@
|
|
|
8345
8355
|
return out;
|
|
8346
8356
|
};
|
|
8347
8357
|
|
|
8348
|
-
var properties = function generate_properties(it, $keyword, $ruleType) {
|
|
8358
|
+
var properties$2 = function generate_properties(it, $keyword, $ruleType) {
|
|
8349
8359
|
var out = ' ';
|
|
8350
8360
|
var $lvl = it.level;
|
|
8351
8361
|
var $dataLvl = it.dataLevel;
|
|
@@ -8757,7 +8767,7 @@
|
|
|
8757
8767
|
return out;
|
|
8758
8768
|
};
|
|
8759
8769
|
|
|
8760
|
-
var required = function generate_required(it, $keyword, $ruleType) {
|
|
8770
|
+
var required$1 = function generate_required(it, $keyword, $ruleType) {
|
|
8761
8771
|
var out = ' ';
|
|
8762
8772
|
var $lvl = it.level;
|
|
8763
8773
|
var $dataLvl = it.dataLevel;
|
|
@@ -9134,16 +9144,17 @@
|
|
|
9134
9144
|
not: not,
|
|
9135
9145
|
oneOf: oneOf,
|
|
9136
9146
|
pattern: pattern,
|
|
9137
|
-
properties: properties,
|
|
9147
|
+
properties: properties$2,
|
|
9138
9148
|
propertyNames: propertyNames,
|
|
9139
|
-
required: required,
|
|
9149
|
+
required: required$1,
|
|
9140
9150
|
uniqueItems: uniqueItems,
|
|
9141
|
-
validate: validate
|
|
9151
|
+
validate: validate$1
|
|
9142
9152
|
};
|
|
9143
9153
|
|
|
9144
|
-
var
|
|
9154
|
+
var ruleModules = dotjs
|
|
9155
|
+
, toHash = util$5.toHash;
|
|
9145
9156
|
|
|
9146
|
-
var rules = function rules() {
|
|
9157
|
+
var rules$1 = function rules() {
|
|
9147
9158
|
var RULES = [
|
|
9148
9159
|
{ type: 'number',
|
|
9149
9160
|
rules: [ { 'maximum': ['exclusiveMaximum'] },
|
|
@@ -9167,8 +9178,8 @@
|
|
|
9167
9178
|
'additionalItems', 'then', 'else'
|
|
9168
9179
|
];
|
|
9169
9180
|
var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
|
|
9170
|
-
RULES.all = toHash
|
|
9171
|
-
RULES.types = toHash
|
|
9181
|
+
RULES.all = toHash(ALL);
|
|
9182
|
+
RULES.types = toHash(TYPES);
|
|
9172
9183
|
|
|
9173
9184
|
RULES.forEach(function (group) {
|
|
9174
9185
|
group.rules = group.rules.map(function (keyword) {
|
|
@@ -9185,7 +9196,7 @@
|
|
|
9185
9196
|
ALL.push(keyword);
|
|
9186
9197
|
var rule = RULES.all[keyword] = {
|
|
9187
9198
|
keyword: keyword,
|
|
9188
|
-
code:
|
|
9199
|
+
code: ruleModules[keyword],
|
|
9189
9200
|
implements: implKeywords
|
|
9190
9201
|
};
|
|
9191
9202
|
return rule;
|
|
@@ -9193,13 +9204,13 @@
|
|
|
9193
9204
|
|
|
9194
9205
|
RULES.all.$comment = {
|
|
9195
9206
|
keyword: '$comment',
|
|
9196
|
-
code:
|
|
9207
|
+
code: ruleModules.$comment
|
|
9197
9208
|
};
|
|
9198
9209
|
|
|
9199
9210
|
if (group.type) RULES.types[group.type] = group;
|
|
9200
9211
|
});
|
|
9201
9212
|
|
|
9202
|
-
RULES.keywords = toHash
|
|
9213
|
+
RULES.keywords = toHash(ALL.concat(KEYWORDS));
|
|
9203
9214
|
RULES.custom = {};
|
|
9204
9215
|
|
|
9205
9216
|
return RULES;
|
|
@@ -9253,7 +9264,7 @@
|
|
|
9253
9264
|
return metaSchema;
|
|
9254
9265
|
};
|
|
9255
9266
|
|
|
9256
|
-
var MissingRefError
|
|
9267
|
+
var MissingRefError = error_classes.MissingRef;
|
|
9257
9268
|
|
|
9258
9269
|
var async = compileAsync;
|
|
9259
9270
|
|
|
@@ -9306,7 +9317,7 @@
|
|
|
9306
9317
|
function _compileAsync(schemaObj) {
|
|
9307
9318
|
try { return self._compile(schemaObj); }
|
|
9308
9319
|
catch(e) {
|
|
9309
|
-
if (e instanceof MissingRefError
|
|
9320
|
+
if (e instanceof MissingRefError) return loadMissingSchema(e);
|
|
9310
9321
|
throw e;
|
|
9311
9322
|
}
|
|
9312
9323
|
|
|
@@ -9570,10 +9581,10 @@
|
|
|
9570
9581
|
return out;
|
|
9571
9582
|
};
|
|
9572
9583
|
|
|
9573
|
-
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
9574
|
-
var $id = "http://json-schema.org/draft-07/schema#";
|
|
9584
|
+
var $schema$2 = "http://json-schema.org/draft-07/schema#";
|
|
9585
|
+
var $id$1 = "http://json-schema.org/draft-07/schema#";
|
|
9575
9586
|
var title = "Core schema meta-schema";
|
|
9576
|
-
var definitions = {
|
|
9587
|
+
var definitions$1 = {
|
|
9577
9588
|
schemaArray: {
|
|
9578
9589
|
type: "array",
|
|
9579
9590
|
minItems: 1,
|
|
@@ -9616,7 +9627,7 @@
|
|
|
9616
9627
|
]
|
|
9617
9628
|
}
|
|
9618
9629
|
};
|
|
9619
|
-
var type = [
|
|
9630
|
+
var type$1 = [
|
|
9620
9631
|
"object",
|
|
9621
9632
|
"boolean"
|
|
9622
9633
|
];
|
|
@@ -9812,32 +9823,19 @@
|
|
|
9812
9823
|
$ref: "#"
|
|
9813
9824
|
}
|
|
9814
9825
|
};
|
|
9815
|
-
var
|
|
9816
|
-
$schema: $schema,
|
|
9817
|
-
$id: $id,
|
|
9826
|
+
var require$$13 = {
|
|
9827
|
+
$schema: $schema$2,
|
|
9828
|
+
$id: $id$1,
|
|
9818
9829
|
title: title,
|
|
9819
|
-
definitions: definitions,
|
|
9820
|
-
type: type,
|
|
9830
|
+
definitions: definitions$1,
|
|
9831
|
+
type: type$1,
|
|
9821
9832
|
properties: properties$1,
|
|
9822
9833
|
"default": true
|
|
9823
9834
|
};
|
|
9824
9835
|
|
|
9825
|
-
var
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
$id: $id,
|
|
9829
|
-
title: title,
|
|
9830
|
-
definitions: definitions,
|
|
9831
|
-
type: type,
|
|
9832
|
-
properties: properties$1,
|
|
9833
|
-
'default': jsonSchemaDraft07
|
|
9834
|
-
});
|
|
9835
|
-
|
|
9836
|
-
var require$$2 = getCjsExportFromNamespace(jsonSchemaDraft07$1);
|
|
9837
|
-
|
|
9838
|
-
var IDENTIFIER$1 = /^[a-z_$][a-z0-9_$-]*$/i;
|
|
9839
|
-
|
|
9840
|
-
var metaSchema = require$$2;
|
|
9836
|
+
var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;
|
|
9837
|
+
var customRuleCode = custom;
|
|
9838
|
+
var metaSchema = require$$13;
|
|
9841
9839
|
|
|
9842
9840
|
var keyword = {
|
|
9843
9841
|
add: addKeyword,
|
|
@@ -9893,7 +9891,7 @@
|
|
|
9893
9891
|
if (RULES.keywords[keyword])
|
|
9894
9892
|
throw new Error('Keyword ' + keyword + ' is already defined');
|
|
9895
9893
|
|
|
9896
|
-
if (!IDENTIFIER
|
|
9894
|
+
if (!IDENTIFIER.test(keyword))
|
|
9897
9895
|
throw new Error('Keyword ' + keyword + ' is not a valid identifier');
|
|
9898
9896
|
|
|
9899
9897
|
if (definition) {
|
|
@@ -9943,7 +9941,7 @@
|
|
|
9943
9941
|
keyword: keyword,
|
|
9944
9942
|
definition: definition,
|
|
9945
9943
|
custom: true,
|
|
9946
|
-
code:
|
|
9944
|
+
code: customRuleCode,
|
|
9947
9945
|
implements: definition.implements
|
|
9948
9946
|
};
|
|
9949
9947
|
ruleGroup.rules.push(rule);
|
|
@@ -10013,13 +10011,13 @@
|
|
|
10013
10011
|
}
|
|
10014
10012
|
|
|
10015
10013
|
var $schema$1 = "http://json-schema.org/draft-07/schema#";
|
|
10016
|
-
var $id
|
|
10014
|
+
var $id = "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#";
|
|
10017
10015
|
var description = "Meta-schema for $data reference (JSON Schema extension proposal)";
|
|
10018
|
-
var type
|
|
10019
|
-
var required
|
|
10016
|
+
var type = "object";
|
|
10017
|
+
var required = [
|
|
10020
10018
|
"$data"
|
|
10021
10019
|
];
|
|
10022
|
-
var properties
|
|
10020
|
+
var properties = {
|
|
10023
10021
|
$data: {
|
|
10024
10022
|
type: "string",
|
|
10025
10023
|
anyOf: [
|
|
@@ -10033,56 +10031,52 @@
|
|
|
10033
10031
|
}
|
|
10034
10032
|
};
|
|
10035
10033
|
var additionalProperties = false;
|
|
10036
|
-
var
|
|
10034
|
+
var require$$12 = {
|
|
10037
10035
|
$schema: $schema$1,
|
|
10038
|
-
$id: $id
|
|
10036
|
+
$id: $id,
|
|
10039
10037
|
description: description,
|
|
10040
|
-
type: type
|
|
10041
|
-
required: required
|
|
10042
|
-
properties: properties
|
|
10038
|
+
type: type,
|
|
10039
|
+
required: required,
|
|
10040
|
+
properties: properties,
|
|
10043
10041
|
additionalProperties: additionalProperties
|
|
10044
10042
|
};
|
|
10045
10043
|
|
|
10046
|
-
var
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
Ajv.prototype.
|
|
10063
|
-
Ajv.prototype.
|
|
10064
|
-
Ajv.prototype.
|
|
10065
|
-
Ajv.prototype.
|
|
10066
|
-
Ajv.prototype.
|
|
10067
|
-
|
|
10068
|
-
Ajv.prototype.
|
|
10069
|
-
Ajv.prototype.
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
Ajv.prototype.
|
|
10074
|
-
|
|
10075
|
-
Ajv.prototype.
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
Ajv.
|
|
10080
|
-
Ajv.
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
Ajv.ValidationError = error_classes.Validation;
|
|
10084
|
-
Ajv.MissingRefError = error_classes.MissingRef;
|
|
10085
|
-
Ajv.$dataMetaSchema = data;
|
|
10044
|
+
var compileSchema = compile_1
|
|
10045
|
+
, resolve = resolve_1
|
|
10046
|
+
, Cache = cache.exports
|
|
10047
|
+
, SchemaObject = schema_obj
|
|
10048
|
+
, stableStringify = fastJsonStableStringify
|
|
10049
|
+
, formats = formats_1
|
|
10050
|
+
, rules = rules$1
|
|
10051
|
+
, $dataMetaSchema = data
|
|
10052
|
+
, util = util$5;
|
|
10053
|
+
|
|
10054
|
+
var ajv = Ajv$1;
|
|
10055
|
+
|
|
10056
|
+
Ajv$1.prototype.validate = validate;
|
|
10057
|
+
Ajv$1.prototype.compile = compile;
|
|
10058
|
+
Ajv$1.prototype.addSchema = addSchema;
|
|
10059
|
+
Ajv$1.prototype.addMetaSchema = addMetaSchema;
|
|
10060
|
+
Ajv$1.prototype.validateSchema = validateSchema;
|
|
10061
|
+
Ajv$1.prototype.getSchema = getSchema;
|
|
10062
|
+
Ajv$1.prototype.removeSchema = removeSchema;
|
|
10063
|
+
Ajv$1.prototype.addFormat = addFormat;
|
|
10064
|
+
Ajv$1.prototype.errorsText = errorsText;
|
|
10065
|
+
|
|
10066
|
+
Ajv$1.prototype._addSchema = _addSchema;
|
|
10067
|
+
Ajv$1.prototype._compile = _compile;
|
|
10068
|
+
|
|
10069
|
+
Ajv$1.prototype.compileAsync = async;
|
|
10070
|
+
var customKeyword = keyword;
|
|
10071
|
+
Ajv$1.prototype.addKeyword = customKeyword.add;
|
|
10072
|
+
Ajv$1.prototype.getKeyword = customKeyword.get;
|
|
10073
|
+
Ajv$1.prototype.removeKeyword = customKeyword.remove;
|
|
10074
|
+
Ajv$1.prototype.validateKeyword = customKeyword.validate;
|
|
10075
|
+
|
|
10076
|
+
var errorClasses = error_classes;
|
|
10077
|
+
Ajv$1.ValidationError = errorClasses.Validation;
|
|
10078
|
+
Ajv$1.MissingRefError = errorClasses.MissingRef;
|
|
10079
|
+
Ajv$1.$dataMetaSchema = $dataMetaSchema;
|
|
10086
10080
|
|
|
10087
10081
|
var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
|
|
10088
10082
|
|
|
@@ -10095,16 +10089,16 @@
|
|
|
10095
10089
|
* @param {Object} opts optional options
|
|
10096
10090
|
* @return {Object} ajv instance
|
|
10097
10091
|
*/
|
|
10098
|
-
function Ajv(opts) {
|
|
10099
|
-
if (!(this instanceof Ajv)) return new Ajv(opts);
|
|
10092
|
+
function Ajv$1(opts) {
|
|
10093
|
+
if (!(this instanceof Ajv$1)) return new Ajv$1(opts);
|
|
10100
10094
|
opts = this._opts = util.copy(opts) || {};
|
|
10101
10095
|
setLogger(this);
|
|
10102
10096
|
this._schemas = {};
|
|
10103
10097
|
this._refs = {};
|
|
10104
10098
|
this._fragments = {};
|
|
10105
|
-
this._formats =
|
|
10099
|
+
this._formats = formats(opts.format);
|
|
10106
10100
|
|
|
10107
|
-
this._cache = opts.cache || new
|
|
10101
|
+
this._cache = opts.cache || new Cache;
|
|
10108
10102
|
this._loadingSchemas = {};
|
|
10109
10103
|
this._compilations = [];
|
|
10110
10104
|
this.RULES = rules();
|
|
@@ -10112,7 +10106,7 @@
|
|
|
10112
10106
|
|
|
10113
10107
|
opts.loopRequired = opts.loopRequired || Infinity;
|
|
10114
10108
|
if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
|
|
10115
|
-
if (opts.serialize === undefined) opts.serialize =
|
|
10109
|
+
if (opts.serialize === undefined) opts.serialize = stableStringify;
|
|
10116
10110
|
this._metaOpts = getMetaSchemaOptions(this);
|
|
10117
10111
|
|
|
10118
10112
|
if (opts.formats) addInitialFormats(this);
|
|
@@ -10132,7 +10126,7 @@
|
|
|
10132
10126
|
* @param {Any} data to be validated
|
|
10133
10127
|
* @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
|
|
10134
10128
|
*/
|
|
10135
|
-
function validate
|
|
10129
|
+
function validate(schemaKeyRef, data) {
|
|
10136
10130
|
var v;
|
|
10137
10131
|
if (typeof schemaKeyRef == 'string') {
|
|
10138
10132
|
v = this.getSchema(schemaKeyRef);
|
|
@@ -10155,7 +10149,7 @@
|
|
|
10155
10149
|
* @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
|
|
10156
10150
|
* @return {Function} validating function
|
|
10157
10151
|
*/
|
|
10158
|
-
function compile
|
|
10152
|
+
function compile(schema, _meta) {
|
|
10159
10153
|
var schemaObj = this._addSchema(schema, undefined, _meta);
|
|
10160
10154
|
return schemaObj.validate || this._compile(schemaObj);
|
|
10161
10155
|
}
|
|
@@ -10178,7 +10172,7 @@
|
|
|
10178
10172
|
var id = this._getId(schema);
|
|
10179
10173
|
if (id !== undefined && typeof id != 'string')
|
|
10180
10174
|
throw new Error('schema id must be string');
|
|
10181
|
-
key =
|
|
10175
|
+
key = resolve.normalizeId(key || id);
|
|
10182
10176
|
checkUnique(this, key);
|
|
10183
10177
|
this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
|
|
10184
10178
|
return this;
|
|
@@ -10255,13 +10249,13 @@
|
|
|
10255
10249
|
|
|
10256
10250
|
|
|
10257
10251
|
function _getSchemaFragment(self, ref) {
|
|
10258
|
-
var res =
|
|
10252
|
+
var res = resolve.schema.call(self, { schema: {} }, ref);
|
|
10259
10253
|
if (res) {
|
|
10260
10254
|
var schema = res.schema
|
|
10261
10255
|
, root = res.root
|
|
10262
10256
|
, baseId = res.baseId;
|
|
10263
|
-
var v =
|
|
10264
|
-
self._fragments[ref] = new
|
|
10257
|
+
var v = compileSchema.call(self, schema, root, undefined, baseId);
|
|
10258
|
+
self._fragments[ref] = new SchemaObject({
|
|
10265
10259
|
ref: ref,
|
|
10266
10260
|
fragment: true,
|
|
10267
10261
|
schema: schema,
|
|
@@ -10275,7 +10269,7 @@
|
|
|
10275
10269
|
|
|
10276
10270
|
|
|
10277
10271
|
function _getSchemaObj(self, keyRef) {
|
|
10278
|
-
keyRef =
|
|
10272
|
+
keyRef = resolve.normalizeId(keyRef);
|
|
10279
10273
|
return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
|
|
10280
10274
|
}
|
|
10281
10275
|
|
|
@@ -10313,7 +10307,7 @@
|
|
|
10313
10307
|
this._cache.del(cacheKey);
|
|
10314
10308
|
var id = this._getId(schemaKeyRef);
|
|
10315
10309
|
if (id) {
|
|
10316
|
-
id =
|
|
10310
|
+
id = resolve.normalizeId(id);
|
|
10317
10311
|
delete this._schemas[id];
|
|
10318
10312
|
delete this._refs[id];
|
|
10319
10313
|
}
|
|
@@ -10344,17 +10338,17 @@
|
|
|
10344
10338
|
|
|
10345
10339
|
shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
|
|
10346
10340
|
|
|
10347
|
-
var id =
|
|
10341
|
+
var id = resolve.normalizeId(this._getId(schema));
|
|
10348
10342
|
if (id && shouldAddSchema) checkUnique(this, id);
|
|
10349
10343
|
|
|
10350
10344
|
var willValidate = this._opts.validateSchema !== false && !skipValidation;
|
|
10351
10345
|
var recursiveMeta;
|
|
10352
|
-
if (willValidate && !(recursiveMeta = id && id ==
|
|
10346
|
+
if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
|
|
10353
10347
|
this.validateSchema(schema, true);
|
|
10354
10348
|
|
|
10355
|
-
var localRefs =
|
|
10349
|
+
var localRefs = resolve.ids.call(this, schema);
|
|
10356
10350
|
|
|
10357
|
-
var schemaObj = new
|
|
10351
|
+
var schemaObj = new SchemaObject({
|
|
10358
10352
|
id: id,
|
|
10359
10353
|
schema: schema,
|
|
10360
10354
|
localRefs: localRefs,
|
|
@@ -10391,7 +10385,7 @@
|
|
|
10391
10385
|
}
|
|
10392
10386
|
|
|
10393
10387
|
var v;
|
|
10394
|
-
try { v =
|
|
10388
|
+
try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
|
|
10395
10389
|
catch(e) {
|
|
10396
10390
|
delete schemaObj.validate;
|
|
10397
10391
|
throw e;
|
|
@@ -10487,12 +10481,12 @@
|
|
|
10487
10481
|
function addDefaultMetaSchema(self) {
|
|
10488
10482
|
var $dataSchema;
|
|
10489
10483
|
if (self._opts.$data) {
|
|
10490
|
-
$dataSchema = require$$
|
|
10484
|
+
$dataSchema = require$$12;
|
|
10491
10485
|
self.addMetaSchema($dataSchema, $dataSchema.$id, true);
|
|
10492
10486
|
}
|
|
10493
10487
|
if (self._opts.meta === false) return;
|
|
10494
|
-
var metaSchema = require$$
|
|
10495
|
-
if (self._opts.$data) metaSchema =
|
|
10488
|
+
var metaSchema = require$$13;
|
|
10489
|
+
if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
|
|
10496
10490
|
self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
|
|
10497
10491
|
self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
|
|
10498
10492
|
}
|
|
@@ -10543,14 +10537,14 @@
|
|
|
10543
10537
|
|
|
10544
10538
|
function noop() {}
|
|
10545
10539
|
|
|
10546
|
-
var _Ajv = /*#__PURE__*/Object.freeze(/*#__PURE__*/
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
}));
|
|
10540
|
+
var _Ajv = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces$1({
|
|
10541
|
+
__proto__: null,
|
|
10542
|
+
'default': ajv
|
|
10543
|
+
}, [ajv]));
|
|
10550
10544
|
|
|
10551
10545
|
var $ref = "#/definitions/Schema";
|
|
10552
|
-
var $schema
|
|
10553
|
-
var definitions
|
|
10546
|
+
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
10547
|
+
var definitions = {
|
|
10554
10548
|
ActivityType: {
|
|
10555
10549
|
anyOf: [
|
|
10556
10550
|
{
|
|
@@ -12193,21 +12187,21 @@
|
|
|
12193
12187
|
type: "string"
|
|
12194
12188
|
}
|
|
12195
12189
|
};
|
|
12196
|
-
var v2
|
|
12190
|
+
var v2 = {
|
|
12197
12191
|
$ref: $ref,
|
|
12198
|
-
$schema: $schema
|
|
12199
|
-
definitions: definitions
|
|
12192
|
+
$schema: $schema,
|
|
12193
|
+
definitions: definitions
|
|
12200
12194
|
};
|
|
12201
12195
|
|
|
12202
12196
|
var _ddl2Schema = /*#__PURE__*/Object.freeze({
|
|
12203
12197
|
__proto__: null,
|
|
12204
12198
|
$ref: $ref,
|
|
12205
|
-
$schema: $schema
|
|
12206
|
-
definitions: definitions
|
|
12207
|
-
'default': v2
|
|
12199
|
+
$schema: $schema,
|
|
12200
|
+
definitions: definitions,
|
|
12201
|
+
'default': v2
|
|
12208
12202
|
});
|
|
12209
12203
|
|
|
12210
|
-
var Ajv
|
|
12204
|
+
var Ajv = ajv || _Ajv;
|
|
12211
12205
|
var ddl2Schema = _ddl2Schema;
|
|
12212
12206
|
var options = {
|
|
12213
12207
|
allErrors: false,
|
|
@@ -12215,7 +12209,7 @@
|
|
|
12215
12209
|
jsonPointers: false
|
|
12216
12210
|
};
|
|
12217
12211
|
function doValidate(ddl, schema) {
|
|
12218
|
-
var ajv = new Ajv
|
|
12212
|
+
var ajv = new Ajv(options);
|
|
12219
12213
|
var validate = ajv.compile(schema);
|
|
12220
12214
|
var success = validate(ddl);
|
|
12221
12215
|
return {
|
|
@@ -12247,7 +12241,7 @@
|
|
|
12247
12241
|
case ">=":
|
|
12248
12242
|
return function (localRow) { return localRow[lf] >= val; };
|
|
12249
12243
|
default:
|
|
12250
|
-
throw new Error("Unknown filter condition: "
|
|
12244
|
+
throw new Error("Unknown filter condition: ".concat(condition));
|
|
12251
12245
|
}
|
|
12252
12246
|
}
|
|
12253
12247
|
var ColumnMapping = /** @class */ (function (_super) {
|
|
@@ -12259,16 +12253,16 @@
|
|
|
12259
12253
|
var retVal = [];
|
|
12260
12254
|
if (!this.remoteField_valid()) {
|
|
12261
12255
|
retVal.push({
|
|
12262
|
-
source: prefix
|
|
12263
|
-
msg: "Invalid remoteField: \""
|
|
12264
|
-
hint: "expected: "
|
|
12256
|
+
source: "".concat(prefix, ".remoteField"),
|
|
12257
|
+
msg: "Invalid remoteField: \"".concat(this.remoteField(), "\""),
|
|
12258
|
+
hint: "expected: ".concat(JSON.stringify(this.sourceOutFields()))
|
|
12265
12259
|
});
|
|
12266
12260
|
}
|
|
12267
12261
|
if (!this.localField_valid()) {
|
|
12268
12262
|
retVal.push({
|
|
12269
|
-
source: prefix
|
|
12270
|
-
msg: "Invalid localField: \""
|
|
12271
|
-
hint: "expected: "
|
|
12263
|
+
source: "".concat(prefix, ".localField"),
|
|
12264
|
+
msg: "Invalid localField: \"".concat(this.localField(), "\""),
|
|
12265
|
+
hint: "expected: ".concat(JSON.stringify(this.localFields()))
|
|
12272
12266
|
});
|
|
12273
12267
|
}
|
|
12274
12268
|
return retVal;
|
|
@@ -12301,7 +12295,7 @@
|
|
|
12301
12295
|
return new ColumnMapping().fromDDL(ddl);
|
|
12302
12296
|
};
|
|
12303
12297
|
ColumnMapping.prototype.hash = function () {
|
|
12304
|
-
return util$
|
|
12298
|
+
return util$6.hashSum({
|
|
12305
12299
|
remoteField: this.remoteField(),
|
|
12306
12300
|
localField: this.localField(),
|
|
12307
12301
|
condition: this.condition(),
|
|
@@ -12328,9 +12322,9 @@
|
|
|
12328
12322
|
switch (this.condition()) {
|
|
12329
12323
|
case "in":
|
|
12330
12324
|
case "range":
|
|
12331
|
-
return this.localField()
|
|
12325
|
+
return "".concat(this.localField(), " ").concat(this.condition(), " [").concat(this.remoteValues(filterSelection).join(", "), "]");
|
|
12332
12326
|
default:
|
|
12333
|
-
return this.localField()
|
|
12327
|
+
return "".concat(this.localField(), " ").concat(this.condition(), " ").concat(this.remoteValues(filterSelection)[0]);
|
|
12334
12328
|
}
|
|
12335
12329
|
};
|
|
12336
12330
|
ColumnMapping.prototype.createFilter = function (filterSelection) {
|
|
@@ -12391,21 +12385,21 @@
|
|
|
12391
12385
|
var retVal = [];
|
|
12392
12386
|
if (!this.source_valid()) {
|
|
12393
12387
|
retVal.push({
|
|
12394
|
-
source: prefix
|
|
12395
|
-
msg: "Invalid source: \""
|
|
12396
|
-
hint: "expected: "
|
|
12388
|
+
source: "".concat(prefix, ".source.").concat(this.source()),
|
|
12389
|
+
msg: "Invalid source: \"".concat(this.source(), "\""),
|
|
12390
|
+
hint: "expected: ".concat(JSON.stringify(this.visualizationIDs()))
|
|
12397
12391
|
});
|
|
12398
12392
|
}
|
|
12399
12393
|
if (this.source_exists() && this.validMappings().length === 0) {
|
|
12400
12394
|
retVal.push({
|
|
12401
|
-
source: prefix
|
|
12402
|
-
msg: "Invalid mappings: \""
|
|
12395
|
+
source: "".concat(prefix, ".source.").concat(this.source()),
|
|
12396
|
+
msg: "Invalid mappings: \"".concat(this.source(), "\""),
|
|
12403
12397
|
hint: "expected minimum of 1 mapping"
|
|
12404
12398
|
});
|
|
12405
12399
|
}
|
|
12406
12400
|
for (var _i = 0, _a = this.validMappings(); _i < _a.length; _i++) {
|
|
12407
12401
|
var mapping = _a[_i];
|
|
12408
|
-
retVal = retVal.concat(mapping.validate(prefix
|
|
12402
|
+
retVal = retVal.concat(mapping.validate("".concat(prefix, ".").concat(this.source(), ".mappings")));
|
|
12409
12403
|
}
|
|
12410
12404
|
return retVal;
|
|
12411
12405
|
};
|
|
@@ -12442,7 +12436,7 @@
|
|
|
12442
12436
|
return this._owner.visualizationIDs();
|
|
12443
12437
|
};
|
|
12444
12438
|
RemoteFilter.prototype.hash = function () {
|
|
12445
|
-
return util$
|
|
12439
|
+
return util$6.hashSum({
|
|
12446
12440
|
source: this.source(),
|
|
12447
12441
|
mappings: this.validMappings().map(function (mapping) { return mapping.hash(); }),
|
|
12448
12442
|
selection: this.sourceSelection()
|
|
@@ -12507,9 +12501,9 @@
|
|
|
12507
12501
|
var retVal = [];
|
|
12508
12502
|
if (!this.localField_valid()) {
|
|
12509
12503
|
retVal.push({
|
|
12510
|
-
source: prefix
|
|
12511
|
-
msg: "Invalid localField: \""
|
|
12512
|
-
hint: "expected: "
|
|
12504
|
+
source: "".concat(prefix, ".localField"),
|
|
12505
|
+
msg: "Invalid localField: \"".concat(this.localField(), "\""),
|
|
12506
|
+
hint: "expected: ".concat(JSON.stringify(this.localFields()))
|
|
12513
12507
|
});
|
|
12514
12508
|
}
|
|
12515
12509
|
return retVal;
|
|
@@ -12559,7 +12553,7 @@
|
|
|
12559
12553
|
return new StaticFilter().fromDDL(ddl);
|
|
12560
12554
|
};
|
|
12561
12555
|
StaticFilter.prototype.hash = function () {
|
|
12562
|
-
return util$
|
|
12556
|
+
return util$6.hashSum({
|
|
12563
12557
|
localField: this.localField(),
|
|
12564
12558
|
condition: this.condition(),
|
|
12565
12559
|
value: this.value(),
|
|
@@ -12570,7 +12564,7 @@
|
|
|
12570
12564
|
return this._owner.inFields().map(function (field) { return field.id; });
|
|
12571
12565
|
};
|
|
12572
12566
|
StaticFilter.prototype.createFilterDescription = function () {
|
|
12573
|
-
return this.localField()
|
|
12567
|
+
return "".concat(this.localField(), " ").concat(this.condition(), " ").concat(this.coerceValue());
|
|
12574
12568
|
};
|
|
12575
12569
|
StaticFilter.prototype.createFilter = function () {
|
|
12576
12570
|
return createFilter(this.condition(), this.localField(), this.coerceValue());
|
|
@@ -12631,7 +12625,7 @@
|
|
|
12631
12625
|
var remoteFilters = [];
|
|
12632
12626
|
var staticFilters = [];
|
|
12633
12627
|
_.forEach(function (fc) {
|
|
12634
|
-
if (v2.isIFilterCondition(fc)) {
|
|
12628
|
+
if (v2$1.isIFilterCondition(fc)) {
|
|
12635
12629
|
remoteFilters.push(RemoteFilter.fromDDL(fc));
|
|
12636
12630
|
}
|
|
12637
12631
|
else {
|
|
@@ -12650,7 +12644,7 @@
|
|
|
12650
12644
|
};
|
|
12651
12645
|
// Activity overrides ---
|
|
12652
12646
|
Filters.prototype.hash = function () {
|
|
12653
|
-
return util$
|
|
12647
|
+
return util$6.hashSum(this.validFilters().map(function (f) {
|
|
12654
12648
|
return {
|
|
12655
12649
|
filter: f.hash()
|
|
12656
12650
|
};
|
|
@@ -12698,7 +12692,7 @@
|
|
|
12698
12692
|
return this.staticFilter().filter(function (filter) { return filter.valid(); });
|
|
12699
12693
|
};
|
|
12700
12694
|
Filters.prototype.validFilters = function () {
|
|
12701
|
-
return __spreadArray(__spreadArray([], this.validRemoteFilters()), this.validStaticFilters());
|
|
12695
|
+
return __spreadArray$1(__spreadArray$1([], this.validRemoteFilters(), true), this.validStaticFilters(), true);
|
|
12702
12696
|
};
|
|
12703
12697
|
Filters.Filter = RemoteFilter;
|
|
12704
12698
|
Filters.Mapping = ColumnMapping;
|
|
@@ -12723,9 +12717,9 @@
|
|
|
12723
12717
|
var retVal = [];
|
|
12724
12718
|
if (!this.label_valid()) {
|
|
12725
12719
|
retVal.push({
|
|
12726
|
-
source: prefix
|
|
12727
|
-
msg: "Invalid label: \""
|
|
12728
|
-
hint: "expected "
|
|
12720
|
+
source: "".concat(prefix, ".label"),
|
|
12721
|
+
msg: "Invalid label: \"".concat(this.label(), "\""),
|
|
12722
|
+
hint: "expected ".concat(JSON.stringify(this.columns()))
|
|
12729
12723
|
});
|
|
12730
12724
|
}
|
|
12731
12725
|
return retVal;
|
|
@@ -12750,7 +12744,7 @@
|
|
|
12750
12744
|
return new GroupByColumn().fromDDL(label);
|
|
12751
12745
|
};
|
|
12752
12746
|
GroupByColumn.prototype.hash = function () {
|
|
12753
|
-
return util$
|
|
12747
|
+
return util$6.hashSum(this.label());
|
|
12754
12748
|
};
|
|
12755
12749
|
GroupByColumn.prototype.columns = function () {
|
|
12756
12750
|
return this._owner.inFieldIDs();
|
|
@@ -12793,16 +12787,16 @@
|
|
|
12793
12787
|
var retVal = [];
|
|
12794
12788
|
if (!this.aggrColumn_valid()) {
|
|
12795
12789
|
retVal.push({
|
|
12796
|
-
source: prefix
|
|
12797
|
-
msg: "Invalid aggrColumn: \""
|
|
12798
|
-
hint: "expected "
|
|
12790
|
+
source: "".concat(prefix, ".").concat(this.fieldID(), ".aggrColumn"),
|
|
12791
|
+
msg: "Invalid aggrColumn: \"".concat(this.aggrColumn(), "\""),
|
|
12792
|
+
hint: "expected ".concat(JSON.stringify(this.columns()))
|
|
12799
12793
|
});
|
|
12800
12794
|
}
|
|
12801
12795
|
if (!this.baseCountColumn_valid()) {
|
|
12802
12796
|
retVal.push({
|
|
12803
|
-
source: prefix
|
|
12804
|
-
msg: "Invalid baseCountColumn: \""
|
|
12805
|
-
hint: "expected "
|
|
12797
|
+
source: "".concat(prefix, ".").concat(this.fieldID(), ".aggrColumn"),
|
|
12798
|
+
msg: "Invalid baseCountColumn: \"".concat(this.baseCountColumn(), "\""),
|
|
12799
|
+
hint: "expected ".concat(JSON.stringify(this.columns()))
|
|
12806
12800
|
});
|
|
12807
12801
|
}
|
|
12808
12802
|
return retVal;
|
|
@@ -12844,7 +12838,7 @@
|
|
|
12844
12838
|
return new AggregateField().fromDDL(ddl);
|
|
12845
12839
|
};
|
|
12846
12840
|
AggregateField.prototype.hash = function () {
|
|
12847
|
-
return util$
|
|
12841
|
+
return util$6.hashSum({
|
|
12848
12842
|
label: this.fieldID(),
|
|
12849
12843
|
aggrType: this.aggrType(),
|
|
12850
12844
|
aggrColumn: this.aggrColumn()
|
|
@@ -12949,7 +12943,7 @@
|
|
|
12949
12943
|
};
|
|
12950
12944
|
// Activity
|
|
12951
12945
|
GroupBy.prototype.hash = function () {
|
|
12952
|
-
return util$
|
|
12946
|
+
return util$6.hashSum({
|
|
12953
12947
|
groupBy: this.column().map(function (gb) { return gb.hash(); }),
|
|
12954
12948
|
computedFields: this.computedFields().map(function (cf) { return cf.hash(); })
|
|
12955
12949
|
});
|
|
@@ -13138,7 +13132,7 @@
|
|
|
13138
13132
|
return new Limit().fromDDL(ddl);
|
|
13139
13133
|
};
|
|
13140
13134
|
Limit.prototype.hash = function () {
|
|
13141
|
-
return util$
|
|
13135
|
+
return util$6.hashSum({
|
|
13142
13136
|
limit: this.rows()
|
|
13143
13137
|
});
|
|
13144
13138
|
};
|
|
@@ -13168,15 +13162,15 @@
|
|
|
13168
13162
|
var retVal = [];
|
|
13169
13163
|
if (!this.value_valid()) {
|
|
13170
13164
|
retVal.push({
|
|
13171
|
-
source: prefix
|
|
13172
|
-
msg: "Invalid value: \""
|
|
13165
|
+
source: "".concat(prefix, ".value"),
|
|
13166
|
+
msg: "Invalid value: \"".concat(this.value(), "\""),
|
|
13173
13167
|
hint: 'expected: "any"'
|
|
13174
13168
|
});
|
|
13175
13169
|
}
|
|
13176
13170
|
if (!this.newValue_valid()) {
|
|
13177
13171
|
retVal.push({
|
|
13178
|
-
source: prefix
|
|
13179
|
-
msg: "Invalid value: \""
|
|
13172
|
+
source: "".concat(prefix, ".newValue"),
|
|
13173
|
+
msg: "Invalid value: \"".concat(this.newValue(), "\""),
|
|
13180
13174
|
hint: 'expected: "any"'
|
|
13181
13175
|
});
|
|
13182
13176
|
}
|
|
@@ -13241,23 +13235,23 @@
|
|
|
13241
13235
|
var retVal = [];
|
|
13242
13236
|
if (!this.column1_valid()) {
|
|
13243
13237
|
retVal.push({
|
|
13244
|
-
source: prefix
|
|
13245
|
-
msg: "Invalid column1: \""
|
|
13246
|
-
hint: "expected: "
|
|
13238
|
+
source: "".concat(prefix, ".").concat(this.label()),
|
|
13239
|
+
msg: "Invalid column1: \"".concat(this.column1(), "\""),
|
|
13240
|
+
hint: "expected: ".concat(JSON.stringify(this.columns()))
|
|
13247
13241
|
});
|
|
13248
13242
|
}
|
|
13249
13243
|
if (!this.column2_valid()) {
|
|
13250
13244
|
retVal.push({
|
|
13251
|
-
source: prefix
|
|
13252
|
-
msg: "Invalid column2: \""
|
|
13253
|
-
hint: "expected: "
|
|
13245
|
+
source: "".concat(prefix, ".").concat(this.label()),
|
|
13246
|
+
msg: "Invalid column2: \"".concat(this.column2(), "\""),
|
|
13247
|
+
hint: "expected: ".concat(JSON.stringify(this.columns()))
|
|
13254
13248
|
});
|
|
13255
13249
|
}
|
|
13256
13250
|
if (!this.disableMapping()) {
|
|
13257
|
-
this.validComputedMappings().forEach(function (cm) { return cm.validate(prefix
|
|
13251
|
+
this.validComputedMappings().forEach(function (cm) { return cm.validate("".concat(prefix, ".mapping")); });
|
|
13258
13252
|
}
|
|
13259
13253
|
if (!this.disableChildField()) {
|
|
13260
|
-
this.validChildFields().forEach(function (cf) { return cf.validate(prefix
|
|
13254
|
+
this.validChildFields().forEach(function (cf) { return cf.validate("".concat(prefix, ".childField")); });
|
|
13261
13255
|
}
|
|
13262
13256
|
return retVal;
|
|
13263
13257
|
};
|
|
@@ -13375,7 +13369,7 @@
|
|
|
13375
13369
|
return new ComputedField().fromDDL(ddl);
|
|
13376
13370
|
};
|
|
13377
13371
|
ComputedField.prototype.hash = function () {
|
|
13378
|
-
return util$
|
|
13372
|
+
return util$6.hashSum(this.toDDL());
|
|
13379
13373
|
};
|
|
13380
13374
|
ComputedField.prototype.columns = function () {
|
|
13381
13375
|
return this._owner.fieldIDs();
|
|
@@ -13395,7 +13389,7 @@
|
|
|
13395
13389
|
.column1(child.id);
|
|
13396
13390
|
});
|
|
13397
13391
|
}
|
|
13398
|
-
return __assign(__assign({}, this._owner.field(this.column1())), { id: this.label(), children: validChildFields.length ? validChildFields.map(function (cf) { return cf.computedField(); }) : undefined });
|
|
13392
|
+
return __assign$1(__assign$1({}, this._owner.field(this.column1())), { id: this.label(), children: validChildFields.length ? validChildFields.map(function (cf) { return cf.computedField(); }) : undefined });
|
|
13399
13393
|
case "*":
|
|
13400
13394
|
case "/":
|
|
13401
13395
|
case "+":
|
|
@@ -13418,7 +13412,7 @@
|
|
|
13418
13412
|
};
|
|
13419
13413
|
});
|
|
13420
13414
|
return function (row) {
|
|
13421
|
-
var retVal = trim && hasComputedFields ? {} : __assign({}, row);
|
|
13415
|
+
var retVal = trim && hasComputedFields ? {} : __assign$1({}, row);
|
|
13422
13416
|
for (var _i = 0, computedFields_1 = computedFields; _i < computedFields_1.length; _i++) {
|
|
13423
13417
|
var cf = computedFields_1[_i];
|
|
13424
13418
|
retVal[cf.label] = cf.func(row);
|
|
@@ -13438,7 +13432,7 @@
|
|
|
13438
13432
|
if (this.hasChildFields()) {
|
|
13439
13433
|
return function (row) {
|
|
13440
13434
|
// TODO Move to function factory ---
|
|
13441
|
-
var r = row[column1].Row && util$
|
|
13435
|
+
var r = row[column1].Row && util$6.isArray(row[column1].Row) ? row[column1].Row : row[column1];
|
|
13442
13436
|
return r.map(_this.projection(trim));
|
|
13443
13437
|
};
|
|
13444
13438
|
}
|
|
@@ -13572,7 +13566,7 @@
|
|
|
13572
13566
|
return _super.call(this) || this;
|
|
13573
13567
|
}
|
|
13574
13568
|
MultiField.prototype.hash = function () {
|
|
13575
|
-
return util$
|
|
13569
|
+
return util$6.hashSum(this.toDDL());
|
|
13576
13570
|
};
|
|
13577
13571
|
MultiField.prototype.owner = function (_) {
|
|
13578
13572
|
if (!arguments.length)
|
|
@@ -13587,7 +13581,7 @@
|
|
|
13587
13581
|
var retVal = [];
|
|
13588
13582
|
for (var _i = 0, _a = this.validMultiFields(); _i < _a.length; _i++) {
|
|
13589
13583
|
var cf = _a[_i];
|
|
13590
|
-
retVal = retVal.concat(cf.validate(prefix
|
|
13584
|
+
retVal = retVal.concat(cf.validate("".concat(prefix, ".computedFields")));
|
|
13591
13585
|
}
|
|
13592
13586
|
return retVal;
|
|
13593
13587
|
};
|
|
@@ -13646,7 +13640,7 @@
|
|
|
13646
13640
|
var retVal = [];
|
|
13647
13641
|
for (var _i = 0, _a = this.validComputedFields(); _i < _a.length; _i++) {
|
|
13648
13642
|
var cf = _a[_i];
|
|
13649
|
-
retVal = retVal.concat(cf.validate(this.classID()
|
|
13643
|
+
retVal = retVal.concat(cf.validate("".concat(this.classID(), ".computedFields")));
|
|
13650
13644
|
}
|
|
13651
13645
|
return retVal;
|
|
13652
13646
|
};
|
|
@@ -13794,7 +13788,7 @@
|
|
|
13794
13788
|
}
|
|
13795
13789
|
}
|
|
13796
13790
|
return function (row) {
|
|
13797
|
-
var retVal = trim && hasComputedFields ? {} : __assign({}, row);
|
|
13791
|
+
var retVal = trim && hasComputedFields ? {} : __assign$1({}, row);
|
|
13798
13792
|
for (var _i = 0, computedFields_3 = computedFields; _i < computedFields_3.length; _i++) {
|
|
13799
13793
|
var cf = computedFields_3[_i];
|
|
13800
13794
|
retVal[cf.label] = cf.func(row);
|
|
@@ -13839,7 +13833,7 @@
|
|
|
13839
13833
|
};
|
|
13840
13834
|
Project.prototype.hash = function (more) {
|
|
13841
13835
|
if (more === void 0) { more = {}; }
|
|
13842
|
-
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL() }, more));
|
|
13836
|
+
return _super.prototype.hash.call(this, __assign$1({ ddl: this.toDDL() }, more));
|
|
13843
13837
|
};
|
|
13844
13838
|
return Project;
|
|
13845
13839
|
}(ProjectBase));
|
|
@@ -13868,7 +13862,7 @@
|
|
|
13868
13862
|
};
|
|
13869
13863
|
Mappings.prototype.hash = function (more) {
|
|
13870
13864
|
if (more === void 0) { more = {}; }
|
|
13871
|
-
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL() }, more));
|
|
13865
|
+
return _super.prototype.hash.call(this, __assign$1({ ddl: this.toDDL() }, more));
|
|
13872
13866
|
};
|
|
13873
13867
|
Mappings.prototype.referencedFields = function (refs) {
|
|
13874
13868
|
if (this.hasComputedFields()) {
|
|
@@ -13889,9 +13883,9 @@
|
|
|
13889
13883
|
var retVal = [];
|
|
13890
13884
|
if (!this.fieldID_valid()) {
|
|
13891
13885
|
retVal.push({
|
|
13892
|
-
source: prefix
|
|
13893
|
-
msg: "Invalid fieldID: "
|
|
13894
|
-
hint: "expected "
|
|
13886
|
+
source: "".concat(prefix, ".fieldID"),
|
|
13887
|
+
msg: "Invalid fieldID: ".concat(this.fieldID()),
|
|
13888
|
+
hint: "expected ".concat(JSON.stringify(this.fieldIDs()))
|
|
13895
13889
|
});
|
|
13896
13890
|
}
|
|
13897
13891
|
return retVal;
|
|
@@ -13920,7 +13914,7 @@
|
|
|
13920
13914
|
return new SortColumn().fromDDL(ddl);
|
|
13921
13915
|
};
|
|
13922
13916
|
SortColumn.prototype.hash = function () {
|
|
13923
|
-
return util$
|
|
13917
|
+
return util$6.hashSum({
|
|
13924
13918
|
sortColumn: this.fieldID(),
|
|
13925
13919
|
descending: this.descending()
|
|
13926
13920
|
});
|
|
@@ -13982,7 +13976,7 @@
|
|
|
13982
13976
|
};
|
|
13983
13977
|
// Activitiy ---
|
|
13984
13978
|
Sort.prototype.hash = function () {
|
|
13985
|
-
return util$
|
|
13979
|
+
return util$6.hashSum({
|
|
13986
13980
|
Sort: this.column().map(function (sb) { return sb.hash(); })
|
|
13987
13981
|
});
|
|
13988
13982
|
};
|
|
@@ -14010,7 +14004,7 @@
|
|
|
14010
14004
|
});
|
|
14011
14005
|
}
|
|
14012
14006
|
if (sortByArr.length) {
|
|
14013
|
-
return __spreadArray([], data).sort(function (l, r) {
|
|
14007
|
+
return __spreadArray$1([], data, true).sort(function (l, r) {
|
|
14014
14008
|
for (var _i = 0, sortByArr_1 = sortByArr; _i < sortByArr_1.length; _i++) {
|
|
14015
14009
|
var item = sortByArr_1[_i];
|
|
14016
14010
|
var retVal2 = item.compare(l[item.id], r[item.id]);
|
|
@@ -14233,7 +14227,7 @@
|
|
|
14233
14227
|
});
|
|
14234
14228
|
});
|
|
14235
14229
|
_this._origButtons = _this.buttons();
|
|
14236
|
-
_this._filterButtons = __spreadArray([_this._togglePopup, new common.Spacer()], _this._origButtons);
|
|
14230
|
+
_this._filterButtons = __spreadArray$1([_this._togglePopup, new common.Spacer()], _this._origButtons, true);
|
|
14237
14231
|
return _this;
|
|
14238
14232
|
}
|
|
14239
14233
|
VizChartPanel.prototype.popup = function (_) {
|
|
@@ -14455,7 +14449,7 @@
|
|
|
14455
14449
|
}
|
|
14456
14450
|
}
|
|
14457
14451
|
else {
|
|
14458
|
-
console.log("***"
|
|
14452
|
+
console.log("***".concat(this.id(), " Immutable Fields***"));
|
|
14459
14453
|
}
|
|
14460
14454
|
var data = mappings.outData();
|
|
14461
14455
|
var dataChanged = this._prevData !== data;
|
|
@@ -14464,7 +14458,6 @@
|
|
|
14464
14458
|
var mappedData = this.toDBData(dbFields, data);
|
|
14465
14459
|
if (this.chartType() === "DataGraph") {
|
|
14466
14460
|
var dataGraph = this.chartPanel().widget();
|
|
14467
|
-
dataGraph.clear();
|
|
14468
14461
|
dataGraph.vertices(mappedData);
|
|
14469
14462
|
if (se) {
|
|
14470
14463
|
var linkData = se.mappings().outData();
|
|
@@ -14477,7 +14470,7 @@
|
|
|
14477
14470
|
}
|
|
14478
14471
|
}
|
|
14479
14472
|
else {
|
|
14480
|
-
console.log(this.id()
|
|
14473
|
+
console.log("".concat(this.id(), " Immutable Data!"));
|
|
14481
14474
|
}
|
|
14482
14475
|
if (fieldsChanged || dataChanged) {
|
|
14483
14476
|
return this.chartPanel().renderPromise().then(function () { });
|
|
@@ -14516,7 +14509,7 @@
|
|
|
14516
14509
|
};
|
|
14517
14510
|
Visualization.prototype.toDBData = function (fields, data) {
|
|
14518
14511
|
var _this = this;
|
|
14519
|
-
var _data = util$
|
|
14512
|
+
var _data = util$6.isArray(data) ? data : [data];
|
|
14520
14513
|
return _data.map(function (row) {
|
|
14521
14514
|
var retVal = [];
|
|
14522
14515
|
for (var _i = 0, fields_1 = fields; _i < fields_1.length; _i++) {
|
|
@@ -14569,7 +14562,7 @@
|
|
|
14569
14562
|
__metadata("design:type", Function)
|
|
14570
14563
|
], Visualization.prototype, "description", void 0);
|
|
14571
14564
|
__decorate([
|
|
14572
|
-
common.publish(v2.VisibilitySet[0], "set", "Type", v2.VisibilitySet),
|
|
14565
|
+
common.publish(v2$1.VisibilitySet[0], "set", "Type", v2$1.VisibilitySet),
|
|
14573
14566
|
__metadata("design:type", String)
|
|
14574
14567
|
], Visualization.prototype, "_visibility", void 0);
|
|
14575
14568
|
__decorate([
|
|
@@ -14600,8 +14593,8 @@
|
|
|
14600
14593
|
return _this;
|
|
14601
14594
|
}
|
|
14602
14595
|
State.prototype.set = function (_) {
|
|
14603
|
-
var currSelHash = util$
|
|
14604
|
-
var newSelHash = util$
|
|
14596
|
+
var currSelHash = util$6.hashSum(this.selection());
|
|
14597
|
+
var newSelHash = util$6.hashSum(_);
|
|
14605
14598
|
if (currSelHash !== newSelHash) {
|
|
14606
14599
|
this.selection(_);
|
|
14607
14600
|
return true;
|
|
@@ -14612,7 +14605,7 @@
|
|
|
14612
14605
|
var currSelection = this.selection();
|
|
14613
14606
|
var newSelection = [];
|
|
14614
14607
|
var _loop_1 = function (selRow) {
|
|
14615
|
-
if (util$
|
|
14608
|
+
if (util$6.find(data, function (row, index) {
|
|
14616
14609
|
for (var column in selRow) {
|
|
14617
14610
|
if (selRow[column] !== row[column]) {
|
|
14618
14611
|
return false;
|
|
@@ -14647,7 +14640,7 @@
|
|
|
14647
14640
|
_this._initialized = false;
|
|
14648
14641
|
while (true) {
|
|
14649
14642
|
vizID++;
|
|
14650
|
-
_this._id = "e_"
|
|
14643
|
+
_this._id = "e_".concat(vizID);
|
|
14651
14644
|
if (!_this._ec.elementExists(_this._id)) {
|
|
14652
14645
|
break;
|
|
14653
14646
|
}
|
|
@@ -14655,9 +14648,9 @@
|
|
|
14655
14648
|
var view = new HipiePipeline(_this._ec, _this._id);
|
|
14656
14649
|
_this.hipiePipeline(view);
|
|
14657
14650
|
_this._vizChartPanel = new Visualization(_this._ec, _this.hipiePipeline())
|
|
14658
|
-
.id("viz_"
|
|
14659
|
-
.title("Element "
|
|
14660
|
-
_this._vizChartPanel.chartPanel().id("cp_"
|
|
14651
|
+
.id("viz_".concat(vizID))
|
|
14652
|
+
.title("Element ".concat(vizID));
|
|
14653
|
+
_this._vizChartPanel.chartPanel().id("cp_".concat(vizID));
|
|
14661
14654
|
_this.visualization(_this._vizChartPanel);
|
|
14662
14655
|
_this.state(new State());
|
|
14663
14656
|
return _this;
|
|
@@ -14673,12 +14666,12 @@
|
|
|
14673
14666
|
_this.selection(sel ? more.selection.map(function (r) { return r.__lparam || r; }) : []);
|
|
14674
14667
|
}
|
|
14675
14668
|
else {
|
|
14676
|
-
var row = util$
|
|
14669
|
+
var row = util$6.isArray(_row) ? _row : [_row];
|
|
14677
14670
|
_this.selection(sel ? row.map(function (r) { return r.__lparam || r; }) : []);
|
|
14678
14671
|
}
|
|
14679
14672
|
})
|
|
14680
14673
|
.on("vertex_click", function (_row, col, sel) {
|
|
14681
|
-
var row = util$
|
|
14674
|
+
var row = util$6.isArray(_row) ? _row : [_row];
|
|
14682
14675
|
_this.selection(sel ? row.map(function (r) { return r.__lparam || r; }) : []);
|
|
14683
14676
|
});
|
|
14684
14677
|
return this;
|
|
@@ -14738,11 +14731,11 @@
|
|
|
14738
14731
|
}
|
|
14739
14732
|
this._errors = [];
|
|
14740
14733
|
var pipeline = this.hipiePipeline();
|
|
14741
|
-
for (var _i = 0, _a = __spreadArray(__spreadArray([], pipeline.activities()), [this.mappings()]); _i < _a.length; _i++) {
|
|
14734
|
+
for (var _i = 0, _a = __spreadArray$1(__spreadArray$1([], pipeline.activities(), true), [this.mappings()], false); _i < _a.length; _i++) {
|
|
14742
14735
|
var activity = _a[_i];
|
|
14743
14736
|
for (var _b = 0, _c = activity.validate(); _b < _c.length; _b++) {
|
|
14744
14737
|
var error = _c[_b];
|
|
14745
|
-
this._errors.push(__assign({ elementID: this.id() }, error));
|
|
14738
|
+
this._errors.push(__assign$1({ elementID: this.id() }, error));
|
|
14746
14739
|
}
|
|
14747
14740
|
}
|
|
14748
14741
|
return this._errors;
|
|
@@ -14756,7 +14749,7 @@
|
|
|
14756
14749
|
_this._initialized = true;
|
|
14757
14750
|
var data = _this.hipiePipeline().outData();
|
|
14758
14751
|
if (_this.visualization().chartType() === "FieldForm") {
|
|
14759
|
-
if (_this.state().set(__spreadArray([], data))) {
|
|
14752
|
+
if (_this.state().set(__spreadArray$1([], data, true))) {
|
|
14760
14753
|
_this.selectionChanged();
|
|
14761
14754
|
}
|
|
14762
14755
|
}
|
|
@@ -14842,7 +14835,7 @@
|
|
|
14842
14835
|
return this;
|
|
14843
14836
|
};
|
|
14844
14837
|
ElementContainer.prototype.elements = function () {
|
|
14845
|
-
return __spreadArray([], this._elements);
|
|
14838
|
+
return __spreadArray$1([], this._elements, true);
|
|
14846
14839
|
};
|
|
14847
14840
|
ElementContainer.prototype.element = function (w) {
|
|
14848
14841
|
var retVal;
|
|
@@ -15005,7 +14998,7 @@
|
|
|
15005
14998
|
};
|
|
15006
14999
|
PopupManager.prototype.syncPopups = function () {
|
|
15007
15000
|
var prevPopups = this.popupChartPanels();
|
|
15008
|
-
var diffPopups = util$
|
|
15001
|
+
var diffPopups = util$6.compare(prevPopups, this._ec.elements()
|
|
15009
15002
|
.filter(function (e) { return e.visualization().visibility() === "flyout"; })
|
|
15010
15003
|
.map(function (elem) { return elem.visualization().chartPanel(); }));
|
|
15011
15004
|
for (var _i = 0, _a = diffPopups.exit; _i < _a.length; _i++) {
|
|
@@ -15052,7 +15045,7 @@
|
|
|
15052
15045
|
var errors = element.validate();
|
|
15053
15046
|
wa.title.label = this.tabTitle(element);
|
|
15054
15047
|
this.titleClassed(wa, "error", errors.length > 0);
|
|
15055
|
-
wa.title.caption = errors.map(function (err) { return err.source
|
|
15048
|
+
wa.title.caption = errors.map(function (err) { return "".concat(err.source, ": ").concat(err.msg); }).join("\n");
|
|
15056
15049
|
};
|
|
15057
15050
|
DashboardDockPanel.prototype.activate = function (element) {
|
|
15058
15051
|
var wa = this.getWidgetAdapter(element.visualization().chartPanel());
|
|
@@ -15064,15 +15057,15 @@
|
|
|
15064
15057
|
if (w.minWidth_exists() || w.minHeight_exists()) {
|
|
15065
15058
|
var wa = this.getWidgetAdapter(w);
|
|
15066
15059
|
common.select(wa.node)
|
|
15067
|
-
.style("min-width", w.minWidth()
|
|
15068
|
-
.style("min-height", w.minHeight()
|
|
15060
|
+
.style("min-width", "".concat(w.minWidth(), "px"))
|
|
15061
|
+
.style("min-height", "".concat(w.minHeight(), "px"));
|
|
15069
15062
|
return true;
|
|
15070
15063
|
}
|
|
15071
15064
|
return false;
|
|
15072
15065
|
};
|
|
15073
15066
|
DashboardDockPanel.prototype.syncWidgets = function () {
|
|
15074
15067
|
var prevWidgets = this.widgets();
|
|
15075
|
-
var diffWidgets = util$
|
|
15068
|
+
var diffWidgets = util$6.compare(prevWidgets, this._ec.elements().filter(function (e) { return e.visualization().visibility() === "normal"; }).map(function (viz) { return viz.visualization().chartPanel(); }));
|
|
15076
15069
|
var refit = false;
|
|
15077
15070
|
for (var _i = 0, _a = diffWidgets.exit; _i < _a.length; _i++) {
|
|
15078
15071
|
var w = _a[_i];
|
|
@@ -15117,7 +15110,7 @@
|
|
|
15117
15110
|
// IClosable ---
|
|
15118
15111
|
DashboardDockPanel.prototype.canClose = function (w, wa) {
|
|
15119
15112
|
var id = this._ec.element(w).id();
|
|
15120
|
-
var retVal = window.confirm("Remove Widget \""
|
|
15113
|
+
var retVal = window.confirm("Remove Widget \"".concat(id, "\"?"));
|
|
15121
15114
|
if (retVal) {
|
|
15122
15115
|
this._ec.clear(id);
|
|
15123
15116
|
this.syncWidgets();
|
|
@@ -15248,8 +15241,8 @@
|
|
|
15248
15241
|
if (w.minWidth_exists() || w.minHeight_exists()) {
|
|
15249
15242
|
var cell = this.getWidgetCell(w.id());
|
|
15250
15243
|
cell.element()
|
|
15251
|
-
.style("min-width", w.minWidth()
|
|
15252
|
-
.style("min-height", w.minHeight()
|
|
15244
|
+
.style("min-width", "".concat(w.minWidth(), "px"))
|
|
15245
|
+
.style("min-height", "".concat(w.minHeight(), "px"));
|
|
15253
15246
|
return true;
|
|
15254
15247
|
}
|
|
15255
15248
|
return false;
|
|
@@ -15257,7 +15250,7 @@
|
|
|
15257
15250
|
DashboardGrid.prototype.syncWidgets = function () {
|
|
15258
15251
|
var _this = this;
|
|
15259
15252
|
var prevWidgets = this.widgets();
|
|
15260
|
-
var diffWidgets = util$
|
|
15253
|
+
var diffWidgets = util$6.compare(prevWidgets, this._ec.elements().filter(function (e) { return e.visualization().visibility() === "normal"; }).map(function (viz) { return viz.visualization().chartPanel(); }));
|
|
15261
15254
|
for (var _i = 0, _a = diffWidgets.exit; _i < _a.length; _i++) {
|
|
15262
15255
|
var w = _a[_i];
|
|
15263
15256
|
this.removeWidget(w);
|
|
@@ -15312,7 +15305,7 @@
|
|
|
15312
15305
|
// IClosable ---
|
|
15313
15306
|
DashboardGrid.prototype.canClose = function (w, wa) {
|
|
15314
15307
|
var id = this._ec.element(w).id();
|
|
15315
|
-
var retVal = window.confirm("Remove Widget \""
|
|
15308
|
+
var retVal = window.confirm("Remove Widget \"".concat(id, "\"?"));
|
|
15316
15309
|
if (retVal) {
|
|
15317
15310
|
this._ec.clear(id);
|
|
15318
15311
|
this.syncWidgets();
|
|
@@ -15326,7 +15319,7 @@
|
|
|
15326
15319
|
DashboardGrid.prototype._class += " marshaller_DashboardGrid";
|
|
15327
15320
|
DashboardGrid.prototype.mixin(PopupManager);
|
|
15328
15321
|
|
|
15329
|
-
var logger = util$
|
|
15322
|
+
var logger$1 = util$6.scopedLogger("marshaller/ddl2/ddl");
|
|
15330
15323
|
var DDLDatasourceAdapter = /** @class */ (function () {
|
|
15331
15324
|
function DDLDatasourceAdapter() {
|
|
15332
15325
|
}
|
|
@@ -15335,13 +15328,13 @@
|
|
|
15335
15328
|
};
|
|
15336
15329
|
DDLDatasourceAdapter.prototype.id = function (dsT) {
|
|
15337
15330
|
if (dsT instanceof WU) {
|
|
15338
|
-
return dsT.url()
|
|
15331
|
+
return "".concat(dsT.url(), "/").concat(dsT.wuid());
|
|
15339
15332
|
}
|
|
15340
15333
|
else if (dsT instanceof RoxieService) {
|
|
15341
|
-
return dsT.url()
|
|
15334
|
+
return "".concat(dsT.url(), "/").concat(dsT.querySet(), "/").concat(dsT.queryID());
|
|
15342
15335
|
}
|
|
15343
15336
|
else if (dsT instanceof RestService) {
|
|
15344
|
-
return dsT.url()
|
|
15337
|
+
return "".concat(dsT.url(), "/").concat(dsT.action());
|
|
15345
15338
|
}
|
|
15346
15339
|
return dsT.id();
|
|
15347
15340
|
};
|
|
@@ -15499,12 +15492,12 @@
|
|
|
15499
15492
|
};
|
|
15500
15493
|
DDLAdapter.prototype.readDatasourceRef = function (ddlDSRef, dsPicker, elementContainer) {
|
|
15501
15494
|
var _this = this;
|
|
15502
|
-
if (v2.isWUResultRef(ddlDSRef)) {
|
|
15495
|
+
if (v2$1.isWUResultRef(ddlDSRef)) {
|
|
15503
15496
|
var wu = this._dsReadDedup[ddlDSRef.id];
|
|
15504
15497
|
dsPicker.datasourceID(wu.output(ddlDSRef.output).id());
|
|
15505
15498
|
}
|
|
15506
|
-
else if (v2.isRoxieServiceRef(ddlDSRef)) {
|
|
15507
|
-
dsPicker.datasourceID(ddlDSRef.id
|
|
15499
|
+
else if (v2$1.isRoxieServiceRef(ddlDSRef)) {
|
|
15500
|
+
dsPicker.datasourceID("".concat(ddlDSRef.id, "_").concat(ddlDSRef.output));
|
|
15508
15501
|
var dsRef = dsPicker.datasourceRef();
|
|
15509
15502
|
dsRef
|
|
15510
15503
|
.request(ddlDSRef.request.map(function (rf) {
|
|
@@ -15539,7 +15532,7 @@
|
|
|
15539
15532
|
}
|
|
15540
15533
|
else if (activity instanceof DSPicker) ;
|
|
15541
15534
|
else {
|
|
15542
|
-
logger.warning("Unknown activity type: "
|
|
15535
|
+
logger$1.warning("Unknown activity type: ".concat(activity.classID()));
|
|
15543
15536
|
}
|
|
15544
15537
|
}).filter(function (activity) { return !!activity; });
|
|
15545
15538
|
};
|
|
@@ -15600,8 +15593,8 @@
|
|
|
15600
15593
|
};
|
|
15601
15594
|
DDLAdapter.prototype.writeProperties = function () {
|
|
15602
15595
|
return {
|
|
15603
|
-
name: PKG_NAME,
|
|
15604
|
-
version: PKG_VERSION,
|
|
15596
|
+
name: PKG_NAME$1,
|
|
15597
|
+
version: PKG_VERSION$1,
|
|
15605
15598
|
buildVersion: BUILD_VERSION,
|
|
15606
15599
|
layout: this._dashboard.layout()
|
|
15607
15600
|
};
|
|
@@ -15615,23 +15608,23 @@
|
|
|
15615
15608
|
this.readDatasourceRef(ddlView.datasource, hipiePipeline.datasource(), this._ec);
|
|
15616
15609
|
for (var _a = 0, _b = ddlView.activities; _a < _b.length; _a++) {
|
|
15617
15610
|
var activity = _b[_a];
|
|
15618
|
-
if (v2.isProjectActivity(activity)) {
|
|
15611
|
+
if (v2$1.isProjectActivity(activity)) {
|
|
15619
15612
|
var project = this.readProject(activity);
|
|
15620
15613
|
hipiePipeline.project(project);
|
|
15621
15614
|
}
|
|
15622
|
-
if (v2.isFilterActivity(activity)) {
|
|
15615
|
+
if (v2$1.isFilterActivity(activity)) {
|
|
15623
15616
|
var filters = this.readFilters(activity, this._ec);
|
|
15624
15617
|
hipiePipeline.filters(filters);
|
|
15625
15618
|
}
|
|
15626
|
-
if (v2.isGroupByActivity(activity)) {
|
|
15619
|
+
if (v2$1.isGroupByActivity(activity)) {
|
|
15627
15620
|
var groupBy = this.readGroupBy(activity);
|
|
15628
15621
|
hipiePipeline.groupBy(groupBy);
|
|
15629
15622
|
}
|
|
15630
|
-
if (v2.isSortActivity(activity)) {
|
|
15623
|
+
if (v2$1.isSortActivity(activity)) {
|
|
15631
15624
|
var sort = this.readSort(activity);
|
|
15632
15625
|
hipiePipeline.sort(sort);
|
|
15633
15626
|
}
|
|
15634
|
-
if (v2.isLimitActivity(activity)) {
|
|
15627
|
+
if (v2$1.isLimitActivity(activity)) {
|
|
15635
15628
|
var limit = this.readLimit(activity);
|
|
15636
15629
|
hipiePipeline.limit(limit);
|
|
15637
15630
|
}
|
|
@@ -15649,8 +15642,8 @@
|
|
|
15649
15642
|
var retVal = {
|
|
15650
15643
|
version: "2.2.1",
|
|
15651
15644
|
createdBy: {
|
|
15652
|
-
name: PKG_NAME,
|
|
15653
|
-
version: PKG_VERSION
|
|
15645
|
+
name: PKG_NAME$1,
|
|
15646
|
+
version: PKG_VERSION$1
|
|
15654
15647
|
},
|
|
15655
15648
|
datasources: this.writeDatasources(),
|
|
15656
15649
|
dataviews: this.writeDDLViews(),
|
|
@@ -15696,7 +15689,7 @@
|
|
|
15696
15689
|
}
|
|
15697
15690
|
break;
|
|
15698
15691
|
default:
|
|
15699
|
-
logger.warning("Unknown ddl datasource type: "
|
|
15692
|
+
logger$1.warning("Unknown ddl datasource type: ".concat(ddlDS.type, " "));
|
|
15700
15693
|
}
|
|
15701
15694
|
}
|
|
15702
15695
|
this.readDDLViews(ddl.dataviews);
|
|
@@ -15724,7 +15717,7 @@
|
|
|
15724
15717
|
classIDs.push(classID);
|
|
15725
15718
|
}
|
|
15726
15719
|
classIDs.sort();
|
|
15727
|
-
importJS.push("import { "
|
|
15720
|
+
importJS.push("import { ".concat(classIDs.join(", "), " } from \"").concat(moduleID, "\";"));
|
|
15728
15721
|
}
|
|
15729
15722
|
return importJS.join("\n");
|
|
15730
15723
|
};
|
|
@@ -15767,18 +15760,18 @@
|
|
|
15767
15760
|
switch (meta.type) {
|
|
15768
15761
|
case "string":
|
|
15769
15762
|
case "set":
|
|
15770
|
-
retVal.push(prefix
|
|
15763
|
+
retVal.push("".concat(prefix, ".").concat(meta.id, "(\"").concat(pe[meta.id](), "\")").concat(postfix, ";"));
|
|
15771
15764
|
break;
|
|
15772
15765
|
case "number":
|
|
15773
15766
|
case "boolean":
|
|
15774
|
-
retVal.push(prefix
|
|
15767
|
+
retVal.push("".concat(prefix, ".").concat(meta.id, "(").concat(pe[meta.id](), ")").concat(postfix, ";"));
|
|
15775
15768
|
break;
|
|
15776
15769
|
case "widget":
|
|
15777
|
-
retVal = retVal.concat(this.createProps(prefix
|
|
15770
|
+
retVal = retVal.concat(this.createProps("".concat(prefix, ".").concat(meta.id, "()"), pe[meta.id]()));
|
|
15778
15771
|
break;
|
|
15779
15772
|
case "propertyArray":
|
|
15780
15773
|
if (meta.ext)
|
|
15781
|
-
retVal.push(prefix
|
|
15774
|
+
retVal.push("".concat(prefix, ".").concat(meta.id, "([").concat(pe[meta.id](), "])").concat(postfix, ";"));
|
|
15782
15775
|
break;
|
|
15783
15776
|
}
|
|
15784
15777
|
}
|
|
@@ -15795,13 +15788,13 @@
|
|
|
15795
15788
|
};
|
|
15796
15789
|
JavaScriptAdapter.prototype.datasourceRefID = function (view) {
|
|
15797
15790
|
var datasourceRef = view.datasource;
|
|
15798
|
-
if (v2.isRoxieServiceRef(datasourceRef)) {
|
|
15799
|
-
return this.safeID(datasourceRef.id)
|
|
15791
|
+
if (v2$1.isRoxieServiceRef(datasourceRef)) {
|
|
15792
|
+
return "".concat(this.safeID(datasourceRef.id), "_").concat(this.safeID(datasourceRef.output), "_").concat(this.safeID(view.id));
|
|
15800
15793
|
}
|
|
15801
|
-
else if (v2.isWUResultRef(datasourceRef)) {
|
|
15802
|
-
return this.safeID(datasourceRef.id)
|
|
15794
|
+
else if (v2$1.isWUResultRef(datasourceRef)) {
|
|
15795
|
+
return "".concat(this.safeID(datasourceRef.id), "_").concat(this.safeID(datasourceRef.output));
|
|
15803
15796
|
}
|
|
15804
|
-
return ""
|
|
15797
|
+
return "".concat(this.safeID(datasourceRef.id));
|
|
15805
15798
|
};
|
|
15806
15799
|
JavaScriptAdapter.prototype.writeDatasource = function (view) {
|
|
15807
15800
|
var datasourceRef = view.datasource;
|
|
@@ -15816,30 +15809,30 @@
|
|
|
15816
15809
|
var wuID = this.safeID(view.datasource.id);
|
|
15817
15810
|
if (!this._dedup[wuID]) {
|
|
15818
15811
|
this._dedup[wuID] = true;
|
|
15819
|
-
retVal.push(" export const "
|
|
15812
|
+
retVal.push(" export const ".concat(wuID, " = new marshaller.WU()\n .url(\"").concat(datasource.url, "\")\n .wuid(\"").concat(datasource.wuid, "\")\n ;"));
|
|
15820
15813
|
}
|
|
15821
|
-
retVal.push(" export const "
|
|
15814
|
+
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 ;"));
|
|
15822
15815
|
break;
|
|
15823
15816
|
case "logicalfile":
|
|
15824
|
-
retVal.push(" export const "
|
|
15817
|
+
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 ;"));
|
|
15825
15818
|
break;
|
|
15826
15819
|
case "hipie":
|
|
15827
15820
|
case "roxie":
|
|
15828
15821
|
var serviceID = this.safeID(view.datasource.id);
|
|
15829
15822
|
if (!this._dedup[serviceID]) {
|
|
15830
15823
|
this._dedup[serviceID] = true;
|
|
15831
|
-
retVal.push(" export const "
|
|
15824
|
+
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 ;"));
|
|
15832
15825
|
}
|
|
15833
15826
|
var resultID = serviceID + "_" + this.safeID(outputID);
|
|
15834
15827
|
if (!this._dedup[resultID]) {
|
|
15835
15828
|
this._dedup[resultID] = true;
|
|
15836
|
-
retVal.push(" export const "
|
|
15829
|
+
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 ;"));
|
|
15837
15830
|
}
|
|
15838
|
-
retVal.push(" export const "
|
|
15831
|
+
retVal.push(" export const ".concat(id, " = new marshaller.HipieResultRef(ec)\n .datasource(").concat(resultID, ")\n .requestFieldRefs(").concat(stringify(datasourceRef.request), ")\n ;"));
|
|
15839
15832
|
break;
|
|
15840
15833
|
case "databomb":
|
|
15841
15834
|
{
|
|
15842
|
-
retVal.push(" export const "
|
|
15835
|
+
retVal.push(" export const ".concat(id, " = new marshaller.Databomb()\n .format(\"").concat(datasource.format, "\")\n .payload(").concat(JSON.stringify(datasource.payload), ")\n ;"));
|
|
15843
15836
|
}
|
|
15844
15837
|
break;
|
|
15845
15838
|
case "form":
|
|
@@ -15847,9 +15840,9 @@
|
|
|
15847
15840
|
var fromFields = [];
|
|
15848
15841
|
for (var _i = 0, _a = datasource.fields; _i < _a.length; _i++) {
|
|
15849
15842
|
var field = _a[_i];
|
|
15850
|
-
fromFields.push("new marshaller.FormField().fieldID(\""
|
|
15843
|
+
fromFields.push("new marshaller.FormField().fieldID(\"".concat(field.id, "\").default(\"").concat(field.default || "", "\")"));
|
|
15851
15844
|
}
|
|
15852
|
-
retVal.push(" export const "
|
|
15845
|
+
retVal.push(" export const ".concat(id, " = new marshaller.Form()\n .formFields([\n ").concat(fromFields.join(",\n "), "\n ])\n ;"));
|
|
15853
15846
|
}
|
|
15854
15847
|
break;
|
|
15855
15848
|
}
|
|
@@ -15859,17 +15852,17 @@
|
|
|
15859
15852
|
JavaScriptAdapter.prototype.writeActivity = function (activity) {
|
|
15860
15853
|
switch (activity.type) {
|
|
15861
15854
|
case "filter":
|
|
15862
|
-
return "new marshaller.Filters(ec).conditions("
|
|
15855
|
+
return "new marshaller.Filters(ec).conditions(".concat(stringify(activity.conditions), ")");
|
|
15863
15856
|
case "project":
|
|
15864
|
-
return "new marshaller.Project().transformations("
|
|
15857
|
+
return "new marshaller.Project().transformations(".concat(stringify(activity.transformations), ")");
|
|
15865
15858
|
case "groupby":
|
|
15866
|
-
return "new marshaller.GroupBy().fieldIDs("
|
|
15859
|
+
return "new marshaller.GroupBy().fieldIDs(".concat(JSON.stringify(activity.groupByIDs), ").aggregates(").concat(stringify(activity.aggregates), ")");
|
|
15867
15860
|
case "sort":
|
|
15868
|
-
return "new marshaller.Sort().conditions("
|
|
15861
|
+
return "new marshaller.Sort().conditions(".concat(stringify(activity.conditions), ")");
|
|
15869
15862
|
case "limit":
|
|
15870
|
-
return "new marshaller.Limit().rows("
|
|
15863
|
+
return "new marshaller.Limit().rows(".concat(activity.limit, ")");
|
|
15871
15864
|
case "mappings":
|
|
15872
|
-
return "new marshaller.Mappings().transformations("
|
|
15865
|
+
return "new marshaller.Mappings().transformations(".concat(stringify(activity.transformations), ")");
|
|
15873
15866
|
}
|
|
15874
15867
|
};
|
|
15875
15868
|
JavaScriptAdapter.prototype.writeWidgetProps = function (pe) {
|
|
@@ -15877,7 +15870,7 @@
|
|
|
15877
15870
|
for (var _i = 0, _a = pe.publishedProperties(); _i < _a.length; _i++) {
|
|
15878
15871
|
var meta = _a[_i];
|
|
15879
15872
|
if (pe[meta.id + "_modified"]() && meta.id !== "fields") {
|
|
15880
|
-
retVal.push("."
|
|
15873
|
+
retVal.push(".".concat(meta.id, "(").concat(JSON.stringify(pe[meta.id]()), ")"));
|
|
15881
15874
|
}
|
|
15882
15875
|
}
|
|
15883
15876
|
return retVal;
|
|
@@ -15887,29 +15880,29 @@
|
|
|
15887
15880
|
var retVal = "";
|
|
15888
15881
|
var meta;
|
|
15889
15882
|
if (props.__class) {
|
|
15890
|
-
meta = util$
|
|
15883
|
+
meta = util$6.classID2Meta(props.__class);
|
|
15891
15884
|
imports.append(meta);
|
|
15892
|
-
retVal += "new "
|
|
15885
|
+
retVal += "new ".concat(meta.class, "()");
|
|
15893
15886
|
}
|
|
15894
15887
|
for (var prop in props) {
|
|
15895
15888
|
if (prop === "__class") ;
|
|
15896
|
-
else if (util$
|
|
15897
|
-
var arr = ""
|
|
15889
|
+
else if (util$6.isArray(props[prop])) {
|
|
15890
|
+
var arr = "".concat(props[prop].map(function (item) { return _this.joinWithPrefix(item, imports, joinStr + " ", ""); }).join(",".concat(joinStr, " ")));
|
|
15898
15891
|
if (arr) {
|
|
15899
|
-
retVal += joinStr
|
|
15892
|
+
retVal += "".concat(joinStr, " .").concat(prop, "([").concat(joinStr, " ").concat(arr).concat(joinStr, " ])").concat(postFix);
|
|
15900
15893
|
}
|
|
15901
15894
|
}
|
|
15902
15895
|
else {
|
|
15903
|
-
retVal += joinStr
|
|
15896
|
+
retVal += "".concat(joinStr, " .").concat(prop, "(").concat(JSON.stringify(props[prop]), ")").concat(postFix);
|
|
15904
15897
|
}
|
|
15905
15898
|
}
|
|
15906
15899
|
return retVal;
|
|
15907
15900
|
};
|
|
15908
15901
|
JavaScriptAdapter.prototype.writeWidget = function (dataview, imports) {
|
|
15909
|
-
return " export const "
|
|
15902
|
+
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 ;");
|
|
15910
15903
|
};
|
|
15911
15904
|
JavaScriptAdapter.prototype.writeElement = function (dataview) {
|
|
15912
|
-
var activities = ["data."
|
|
15905
|
+
var activities = ["data.".concat(this.datasourceRefID(dataview))];
|
|
15913
15906
|
for (var _i = 0, _a = dataview.activities; _i < _a.length; _i++) {
|
|
15914
15907
|
var activity = _a[_i];
|
|
15915
15908
|
activities.push(this.writeActivity(activity));
|
|
@@ -15917,9 +15910,9 @@
|
|
|
15917
15910
|
var updates = [];
|
|
15918
15911
|
for (var _b = 0, _c = this._ec.filteredBy(dataview.id); _b < _c.length; _b++) {
|
|
15919
15912
|
var filteredViz = _c[_b];
|
|
15920
|
-
updates.push(filteredViz.id()
|
|
15913
|
+
updates.push("".concat(filteredViz.id(), ".refresh();"));
|
|
15921
15914
|
}
|
|
15922
|
-
return "\nconst "
|
|
15915
|
+
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");
|
|
15923
15916
|
};
|
|
15924
15917
|
JavaScriptAdapter.prototype.writeDatasources = function () {
|
|
15925
15918
|
var retVal = [];
|
|
@@ -15951,7 +15944,7 @@
|
|
|
15951
15944
|
};
|
|
15952
15945
|
JavaScriptAdapter.prototype.createJavaScript = function () {
|
|
15953
15946
|
var widgets = this.writeWidgets();
|
|
15954
|
-
return widgets.widgetImports
|
|
15947
|
+
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");
|
|
15955
15948
|
};
|
|
15956
15949
|
return JavaScriptAdapter;
|
|
15957
15950
|
}());
|
|
@@ -15983,8 +15976,8 @@
|
|
|
15983
15976
|
}
|
|
15984
15977
|
}
|
|
15985
15978
|
|
|
15986
|
-
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)}";
|
|
15987
|
-
styleInject(css_248z);
|
|
15979
|
+
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)}";
|
|
15980
|
+
styleInject(css_248z$3);
|
|
15988
15981
|
|
|
15989
15982
|
var Dashboard = /** @class */ (function (_super) {
|
|
15990
15983
|
__extends(Dashboard, _super);
|
|
@@ -16014,7 +16007,7 @@
|
|
|
16014
16007
|
.enabled(false)
|
|
16015
16008
|
.on("click", function () {
|
|
16016
16009
|
var elem = _this._prevActive;
|
|
16017
|
-
if (elem && window.confirm("Remove Widget \""
|
|
16010
|
+
if (elem && window.confirm("Remove Widget \"".concat(elem.id(), "\"?"))) {
|
|
16018
16011
|
_this._ec.clear(elem.id());
|
|
16019
16012
|
_this.renderPromise().then(function () {
|
|
16020
16013
|
_this.vizActivation(undefined);
|
|
@@ -16210,7 +16203,7 @@
|
|
|
16210
16203
|
};
|
|
16211
16204
|
Dashboard.prototype.importDDL = function (ddl, baseUrl, wuid, dermatologyJson) {
|
|
16212
16205
|
if (dermatologyJson === void 0) { dermatologyJson = {}; }
|
|
16213
|
-
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade
|
|
16206
|
+
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade(ddl, baseUrl, wuid, true, dermatologyJson);
|
|
16214
16207
|
return this.restore(ddl2, true);
|
|
16215
16208
|
};
|
|
16216
16209
|
Dashboard.prototype.javascript = function () {
|
|
@@ -16259,8 +16252,8 @@
|
|
|
16259
16252
|
}(layout.ChartPanel));
|
|
16260
16253
|
Dashboard.prototype._class += " dashboard_dashboard";
|
|
16261
16254
|
|
|
16262
|
-
var css_248z$
|
|
16263
|
-
styleInject(css_248z$
|
|
16255
|
+
var css_248z$2 = "";
|
|
16256
|
+
styleInject(css_248z$2);
|
|
16264
16257
|
|
|
16265
16258
|
var DDLEditor = /** @class */ (function (_super) {
|
|
16266
16259
|
__extends(DDLEditor, _super);
|
|
@@ -16346,7 +16339,7 @@
|
|
|
16346
16339
|
this.subgraphMap[id] = retVal;
|
|
16347
16340
|
}
|
|
16348
16341
|
this.vertices.push(retVal);
|
|
16349
|
-
retVal.title(""
|
|
16342
|
+
retVal.title("".concat(label));
|
|
16350
16343
|
retVal.getBBox(true);
|
|
16351
16344
|
return retVal;
|
|
16352
16345
|
};
|
|
@@ -16364,13 +16357,13 @@
|
|
|
16364
16357
|
this.vertices.push(retVal);
|
|
16365
16358
|
retVal
|
|
16366
16359
|
.textbox_shape_colorFill(fillColor)
|
|
16367
|
-
.text(tooltip ? label
|
|
16360
|
+
.text(tooltip ? "".concat(label, "\n").concat(tooltip) : "".concat(label))
|
|
16368
16361
|
.tooltip(tooltip);
|
|
16369
16362
|
retVal.getBBox(true);
|
|
16370
16363
|
return retVal;
|
|
16371
16364
|
};
|
|
16372
16365
|
GraphAdapter.prototype.createEdge = function (sourceID, targetID) {
|
|
16373
|
-
var edgeID = sourceID
|
|
16366
|
+
var edgeID = "".concat(sourceID, "->").concat(targetID);
|
|
16374
16367
|
var retVal = this.edgeMap[edgeID];
|
|
16375
16368
|
if (!retVal) {
|
|
16376
16369
|
retVal = new graph.Edge()
|
|
@@ -16386,27 +16379,27 @@
|
|
|
16386
16379
|
dsDetails = dsDetails.selection().datasource();
|
|
16387
16380
|
}
|
|
16388
16381
|
if (dsDetails instanceof WUResult) {
|
|
16389
|
-
var serverID = ""
|
|
16390
|
-
var server = this.createSubgraph(serverID, ""
|
|
16391
|
-
var wuID = dsDetails.url()
|
|
16392
|
-
var wu = this.createSubgraph(wuID, ""
|
|
16382
|
+
var serverID = "".concat(dsDetails.url());
|
|
16383
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16384
|
+
var wuID = "".concat(dsDetails.url(), "/").concat(dsDetails.wuid());
|
|
16385
|
+
var wu = this.createSubgraph(wuID, "".concat(dsDetails.wuid()));
|
|
16393
16386
|
this.hierarchy.push({ parent: server, child: wu });
|
|
16394
|
-
var resultID = wuID
|
|
16387
|
+
var resultID = "".concat(wuID, "/").concat(dsDetails.resultName());
|
|
16395
16388
|
var result = this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails });
|
|
16396
16389
|
this.hierarchy.push({ parent: wu, child: result });
|
|
16397
16390
|
return resultID;
|
|
16398
16391
|
}
|
|
16399
16392
|
else if (dsDetails instanceof LogicalFile) {
|
|
16400
|
-
var serverID = ""
|
|
16401
|
-
var server = this.createSubgraph(serverID, ""
|
|
16402
|
-
var lfID = serverID
|
|
16393
|
+
var serverID = "".concat(dsDetails.url());
|
|
16394
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16395
|
+
var lfID = "".concat(serverID, "/").concat(dsDetails.logicalFile());
|
|
16403
16396
|
var lf = this.createVertex(lfID, dsDetails.logicalFile(), { activity: dsDetails });
|
|
16404
16397
|
this.hierarchy.push({ parent: server, child: lf });
|
|
16405
16398
|
return lfID;
|
|
16406
16399
|
}
|
|
16407
16400
|
else if (dsDetails instanceof RoxieResultRef) {
|
|
16408
|
-
var serverID = ""
|
|
16409
|
-
var server = this.createSubgraph(serverID, ""
|
|
16401
|
+
var serverID = "".concat(dsDetails.url());
|
|
16402
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16410
16403
|
var surfaceID = dsDetails.serviceID(); // `${dsDetails.url()}/${dsDetails.querySet()}`;
|
|
16411
16404
|
var surface = this.createSubgraph(surfaceID, dsDetails.querySet());
|
|
16412
16405
|
this.hierarchy.push({ parent: server, child: surface });
|
|
@@ -16415,7 +16408,7 @@
|
|
|
16415
16408
|
parent: surface,
|
|
16416
16409
|
child: this.createVertex(roxieID, dsDetails.queryID())
|
|
16417
16410
|
});
|
|
16418
|
-
var roxieResultID = surfaceID
|
|
16411
|
+
var roxieResultID = "".concat(surfaceID, "/").concat(dsDetails.resultName());
|
|
16419
16412
|
this.hierarchy.push({
|
|
16420
16413
|
parent: surface,
|
|
16421
16414
|
child: this.createVertex(roxieResultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16424,15 +16417,15 @@
|
|
|
16424
16417
|
return roxieResultID;
|
|
16425
16418
|
}
|
|
16426
16419
|
else if (dsDetails instanceof RoxieResult) {
|
|
16427
|
-
var serverID = ""
|
|
16428
|
-
var server = this.createSubgraph(serverID, ""
|
|
16420
|
+
var serverID = "".concat(dsDetails.service().url());
|
|
16421
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16429
16422
|
var querySetID = dsDetails.serviceID();
|
|
16430
16423
|
var querySet = this.createSubgraph(querySetID, dsDetails.service().querySet());
|
|
16431
16424
|
this.hierarchy.push({ parent: server, child: querySet });
|
|
16432
|
-
var queryID = querySetID
|
|
16425
|
+
var queryID = "".concat(querySetID, "/").concat(dsDetails.service().queryID());
|
|
16433
16426
|
var query = this.createSubgraph(queryID, dsDetails.service().queryID());
|
|
16434
16427
|
this.hierarchy.push({ parent: querySet, child: query });
|
|
16435
|
-
var resultID = queryID
|
|
16428
|
+
var resultID = "".concat(queryID, "/").concat(dsDetails.resultName());
|
|
16436
16429
|
this.hierarchy.push({
|
|
16437
16430
|
parent: query,
|
|
16438
16431
|
child: this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16441,8 +16434,8 @@
|
|
|
16441
16434
|
return resultID;
|
|
16442
16435
|
}
|
|
16443
16436
|
else if (dsDetails instanceof RestResultRef) {
|
|
16444
|
-
var serverID = ""
|
|
16445
|
-
var server = this.createSubgraph(serverID, ""
|
|
16437
|
+
var serverID = "".concat(dsDetails.url());
|
|
16438
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16446
16439
|
var surfaceID = dsDetails.serviceID();
|
|
16447
16440
|
var surface = this.createSubgraph(surfaceID, dsDetails.action());
|
|
16448
16441
|
this.hierarchy.push({ parent: server, child: surface });
|
|
@@ -16451,7 +16444,7 @@
|
|
|
16451
16444
|
parent: surface,
|
|
16452
16445
|
child: this.createVertex(roxieID, dsDetails.action())
|
|
16453
16446
|
});
|
|
16454
|
-
var roxieResultID = surfaceID
|
|
16447
|
+
var roxieResultID = "".concat(surfaceID, "/").concat(dsDetails.resultName());
|
|
16455
16448
|
this.hierarchy.push({
|
|
16456
16449
|
parent: surface,
|
|
16457
16450
|
child: this.createVertex(roxieResultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16460,13 +16453,13 @@
|
|
|
16460
16453
|
return roxieResultID;
|
|
16461
16454
|
}
|
|
16462
16455
|
else if (dsDetails instanceof RestResult) {
|
|
16463
|
-
var serverID = ""
|
|
16464
|
-
var server = this.createSubgraph(serverID, ""
|
|
16456
|
+
var serverID = "".concat(dsDetails.service().url());
|
|
16457
|
+
var server = this.createSubgraph(serverID, "".concat(serverID));
|
|
16465
16458
|
var serviceID = dsDetails.serviceID();
|
|
16466
|
-
var actionID = serverID
|
|
16459
|
+
var actionID = "".concat(serverID, "/").concat(dsDetails.service().action());
|
|
16467
16460
|
var action = this.createSubgraph(serviceID, dsDetails.service().action());
|
|
16468
16461
|
this.hierarchy.push({ parent: server, child: action });
|
|
16469
|
-
var resultID = actionID
|
|
16462
|
+
var resultID = "".concat(actionID, "/").concat(dsDetails.resultName());
|
|
16470
16463
|
this.hierarchy.push({
|
|
16471
16464
|
parent: action,
|
|
16472
16465
|
child: this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16491,20 +16484,20 @@
|
|
|
16491
16484
|
}
|
|
16492
16485
|
};
|
|
16493
16486
|
GraphAdapter.prototype.createActivity = function (sourceID, view, activity, label) {
|
|
16494
|
-
var surface = this.createSubgraph(view.id(), ""
|
|
16487
|
+
var surface = this.createSubgraph(view.id(), "".concat(view.id()), { view: view });
|
|
16495
16488
|
var fillColor = null;
|
|
16496
16489
|
var tooltip = "";
|
|
16497
16490
|
if (activity.exists()) {
|
|
16498
16491
|
var errors = activity.validate();
|
|
16499
16492
|
if (errors.length) {
|
|
16500
16493
|
fillColor = "pink";
|
|
16501
|
-
tooltip = errors.map(function (error) { return error.source
|
|
16494
|
+
tooltip = errors.map(function (error) { return "".concat(error.source, ": ").concat(error.msg); }).join("\n");
|
|
16502
16495
|
}
|
|
16503
16496
|
}
|
|
16504
16497
|
else {
|
|
16505
16498
|
fillColor = "lightgrey";
|
|
16506
16499
|
}
|
|
16507
|
-
var vertex = this.createVertex(activity.id(), label || ""
|
|
16500
|
+
var vertex = this.createVertex(activity.id(), label || "".concat(activity.classID()), { view: view, activity: activity }, tooltip, fillColor);
|
|
16508
16501
|
if (sourceID) {
|
|
16509
16502
|
this.createEdge(sourceID, activity.id());
|
|
16510
16503
|
}
|
|
@@ -16531,7 +16524,7 @@
|
|
|
16531
16524
|
var visualization = view.visualization();
|
|
16532
16525
|
var mappings = visualization.mappings();
|
|
16533
16526
|
var mappingVertexID = this.createActivity(prevID, view, mappings, "Mappings");
|
|
16534
|
-
var vizSubgraphID = visualization.id()
|
|
16527
|
+
var vizSubgraphID = "".concat(visualization.id(), "-sg");
|
|
16535
16528
|
var surface = this.createSubgraph(vizSubgraphID, "Visualization", { visualization: visualization });
|
|
16536
16529
|
this.hierarchy.push({
|
|
16537
16530
|
parent: this.subgraphMap[view.id()],
|
|
@@ -16541,14 +16534,14 @@
|
|
|
16541
16534
|
parent: surface,
|
|
16542
16535
|
child: this.vertexMap[mappings.id()]
|
|
16543
16536
|
});
|
|
16544
|
-
var vizVertexID = visualization.id()
|
|
16537
|
+
var vizVertexID = "".concat(visualization.id(), "-viz");
|
|
16545
16538
|
var widgetVertex = this.createVertex(vizVertexID, visualization.chartPanel().widget().classID(), { view: view, chartPanel: visualization.chartPanel() });
|
|
16546
16539
|
this.createEdge(mappingVertexID, vizVertexID);
|
|
16547
16540
|
this.hierarchy.push({
|
|
16548
16541
|
parent: surface,
|
|
16549
16542
|
child: widgetVertex
|
|
16550
16543
|
});
|
|
16551
|
-
var stateVertexID = visualization.id()
|
|
16544
|
+
var stateVertexID = "".concat(visualization.id(), "-state");
|
|
16552
16545
|
var stateVertex = this.createVertex(stateVertexID, "Selection", { view: view, state: view.state() });
|
|
16553
16546
|
this.createEdge(vizVertexID, stateVertexID)
|
|
16554
16547
|
.weight(10)
|
|
@@ -16569,7 +16562,7 @@
|
|
|
16569
16562
|
var secondaryElement = this._ec.element(visualization.secondaryDataviewID());
|
|
16570
16563
|
if (secondaryElement) {
|
|
16571
16564
|
var mappings = secondaryElement.visualization().mappings();
|
|
16572
|
-
this.createEdge(mappings.id(), visualization.id()
|
|
16565
|
+
this.createEdge(mappings.id(), "".concat(visualization.id(), "-viz"));
|
|
16573
16566
|
}
|
|
16574
16567
|
}
|
|
16575
16568
|
for (var _f = 0, _g = this._ec.elements(); _f < _g.length; _f++) {
|
|
@@ -16810,7 +16803,7 @@
|
|
|
16810
16803
|
var data = this._ec.elements().map(function (elem) {
|
|
16811
16804
|
return [elem.id(), elem.visualization().title(), elem];
|
|
16812
16805
|
});
|
|
16813
|
-
var dataID = util$
|
|
16806
|
+
var dataID = util$6.hashSum(data.map(function (row) { return row[0]; }));
|
|
16814
16807
|
if (this._prevDataID !== dataID) {
|
|
16815
16808
|
this._prevDataID = dataID;
|
|
16816
16809
|
this.data(data);
|
|
@@ -16820,8 +16813,8 @@
|
|
|
16820
16813
|
return DVTable;
|
|
16821
16814
|
}(layout.ChartPanel));
|
|
16822
16815
|
|
|
16823
|
-
var css_248z$
|
|
16824
|
-
styleInject(css_248z$
|
|
16816
|
+
var css_248z$1 = ".common_SelectionButton.error{background:red;background:linear-gradient(180deg,rgba(255,0,0,.5),hsla(0,0%,100%,0) 80%)}";
|
|
16817
|
+
styleInject(css_248z$1);
|
|
16825
16818
|
|
|
16826
16819
|
var PipelineSelectionButton = /** @class */ (function (_super) {
|
|
16827
16820
|
__extends(PipelineSelectionButton, _super);
|
|
@@ -16847,7 +16840,7 @@
|
|
|
16847
16840
|
this.tooltip(_.map(function (err) {
|
|
16848
16841
|
var errSourceParts = err.source.split(".");
|
|
16849
16842
|
errSourceParts.splice(0, 1);
|
|
16850
|
-
return errSourceParts.join(".")
|
|
16843
|
+
return "".concat(errSourceParts.join("."), ": ").concat(err.msg);
|
|
16851
16844
|
}).join("\n"));
|
|
16852
16845
|
}
|
|
16853
16846
|
else {
|
|
@@ -17126,7 +17119,7 @@
|
|
|
17126
17119
|
return PipelinePanel;
|
|
17127
17120
|
}(layout.ChartPanel));
|
|
17128
17121
|
PipelinePanel.prototype._class += " marshaller_PipelinePanel";
|
|
17129
|
-
var DDLPreview = /** @class */ (function (_super) {
|
|
17122
|
+
var DDLPreview$1 = /** @class */ (function (_super) {
|
|
17130
17123
|
__extends(DDLPreview, _super);
|
|
17131
17124
|
function DDLPreview() {
|
|
17132
17125
|
var _this = _super.call(this) || this;
|
|
@@ -17193,7 +17186,7 @@
|
|
|
17193
17186
|
_this.propChanged(id, newValue, oldValue, source);
|
|
17194
17187
|
});
|
|
17195
17188
|
_this._previewPanel = new phosphor.TabPanel();
|
|
17196
|
-
_this._rhsDDLPreview = new DDLPreview();
|
|
17189
|
+
_this._rhsDDLPreview = new DDLPreview$1();
|
|
17197
17190
|
_this._rhsDataPreview = new dgrid.DatasourceTable().pagination(true);
|
|
17198
17191
|
_this._previewPanel
|
|
17199
17192
|
.addWidget(_this._rhsDataPreview, "Data")
|
|
@@ -17244,11 +17237,11 @@
|
|
|
17244
17237
|
return PipelineSplitPanel;
|
|
17245
17238
|
}(phosphor.SplitPanel));
|
|
17246
17239
|
|
|
17247
|
-
var css_248z
|
|
17248
|
-
styleInject(css_248z
|
|
17240
|
+
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}";
|
|
17241
|
+
styleInject(css_248z);
|
|
17249
17242
|
|
|
17250
|
-
var logger
|
|
17251
|
-
var DDLPreview
|
|
17243
|
+
var logger = util$6.scopedLogger("marshaller/dashy");
|
|
17244
|
+
var DDLPreview = /** @class */ (function (_super) {
|
|
17252
17245
|
__extends(DDLPreview, _super);
|
|
17253
17246
|
function DDLPreview(_dashy) {
|
|
17254
17247
|
var _this = _super.call(this) || this;
|
|
@@ -17333,7 +17326,7 @@
|
|
|
17333
17326
|
.on("vertex_contextmenu", function (row, col, sel, ext) {
|
|
17334
17327
|
});
|
|
17335
17328
|
_this._lhsDebugSheet = new phosphor.TabPanel();
|
|
17336
|
-
_this._lhsDebugDDLEditor = new DDLPreview
|
|
17329
|
+
_this._lhsDebugDDLEditor = new DDLPreview(_this);
|
|
17337
17330
|
_this._lhsDebugDDLSchema = new codemirror.JSONEditor().json(ddl2Schema);
|
|
17338
17331
|
_this._lhsDebugJSEditor = new codemirror.JSEditor();
|
|
17339
17332
|
_this._lhsDebugCloneEC = new ElementContainer();
|
|
@@ -17397,7 +17390,7 @@
|
|
|
17397
17390
|
for (var _i = 0, _a = _this._elementContainer.validate(); _i < _a.length; _i++) {
|
|
17398
17391
|
var error = _a[_i];
|
|
17399
17392
|
hasError = true;
|
|
17400
|
-
logger
|
|
17393
|
+
logger.warning(error.elementID + " (" + error.source + "): " + error.msg);
|
|
17401
17394
|
}
|
|
17402
17395
|
if (hasError) {
|
|
17403
17396
|
// Re-render to highlight errrors ---
|
|
@@ -17408,7 +17401,7 @@
|
|
|
17408
17401
|
};
|
|
17409
17402
|
Dashy.prototype.importDDL = function (ddl, baseUrl, wuid, dermatologyJson) {
|
|
17410
17403
|
if (dermatologyJson === void 0) { dermatologyJson = {}; }
|
|
17411
|
-
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade
|
|
17404
|
+
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade(ddl, baseUrl, wuid, true, dermatologyJson);
|
|
17412
17405
|
var retVal = this.restore(ddl2);
|
|
17413
17406
|
if (isDDL2Schema(ddl)) {
|
|
17414
17407
|
this._lhsDebugDDLv2.json(ddl2);
|
|
@@ -17471,7 +17464,7 @@
|
|
|
17471
17464
|
};
|
|
17472
17465
|
Dashy.prototype.loadGraph = function () {
|
|
17473
17466
|
this._lhsPipeline
|
|
17474
|
-
.data(__assign({}, this._graphAdapter.createGraph()), true);
|
|
17467
|
+
.data(__assign$1({}, this._graphAdapter.createGraph()), true);
|
|
17475
17468
|
if (this.activeLHS() === this._lhsPipeline) {
|
|
17476
17469
|
this._lhsPipeline
|
|
17477
17470
|
.lazyRender();
|
|
@@ -17504,7 +17497,7 @@
|
|
|
17504
17497
|
}).then(function () {
|
|
17505
17498
|
for (var _i = 0, _a = _this._lhsDebugCloneEC.validate(); _i < _a.length; _i++) {
|
|
17506
17499
|
var error = _a[_i];
|
|
17507
|
-
logger
|
|
17500
|
+
logger.warning(error.elementID + " (" + error.source + "): " + error.msg);
|
|
17508
17501
|
}
|
|
17509
17502
|
});
|
|
17510
17503
|
});
|
|
@@ -17552,11 +17545,11 @@
|
|
|
17552
17545
|
palette.addItem({ command: "remove", category: "Notebook" });
|
|
17553
17546
|
palette.id = "palette";
|
|
17554
17547
|
var contextMenu = new phosphor.ContextMenu({ commands: commands });
|
|
17555
|
-
contextMenu.addItem({ command: "dash_add", selector: "#"
|
|
17556
|
-
contextMenu.addItem({ command: "dash_clear", selector: "#"
|
|
17557
|
-
contextMenu.addItem({ type: "separator", selector: "#"
|
|
17558
|
-
contextMenu.addItem({ command: "dash_load", selector: "#"
|
|
17559
|
-
contextMenu.addItem({ command: "dash_save", selector: "#"
|
|
17548
|
+
contextMenu.addItem({ command: "dash_add", selector: "#".concat(this._lhsDashboard.id()) });
|
|
17549
|
+
contextMenu.addItem({ command: "dash_clear", selector: "#".concat(this._lhsDashboard.id()) });
|
|
17550
|
+
contextMenu.addItem({ type: "separator", selector: "#".concat(this._lhsDashboard.id()) });
|
|
17551
|
+
contextMenu.addItem({ command: "dash_load", selector: "#".concat(this.id()) });
|
|
17552
|
+
contextMenu.addItem({ command: "dash_save", selector: "#".concat(this.id()) });
|
|
17560
17553
|
document.addEventListener("contextmenu", function (event) {
|
|
17561
17554
|
if (contextMenu.open(event)) {
|
|
17562
17555
|
event.preventDefault();
|
|
@@ -17700,9 +17693,7 @@
|
|
|
17700
17693
|
|
|
17701
17694
|
Object.defineProperty(exports, 'hookSend', {
|
|
17702
17695
|
enumerable: true,
|
|
17703
|
-
get: function () {
|
|
17704
|
-
return comms.hookSend;
|
|
17705
|
-
}
|
|
17696
|
+
get: function () { return comms.hookSend; }
|
|
17706
17697
|
});
|
|
17707
17698
|
exports.Activity = Activity;
|
|
17708
17699
|
exports.ActivityArray = ActivityArray;
|
|
@@ -17739,8 +17730,8 @@
|
|
|
17739
17730
|
exports.Mappings = Mappings;
|
|
17740
17731
|
exports.MultiField = MultiField;
|
|
17741
17732
|
exports.NullView = NullView;
|
|
17742
|
-
exports.PKG_NAME = PKG_NAME;
|
|
17743
|
-
exports.PKG_VERSION = PKG_VERSION;
|
|
17733
|
+
exports.PKG_NAME = PKG_NAME$1;
|
|
17734
|
+
exports.PKG_VERSION = PKG_VERSION$1;
|
|
17744
17735
|
exports.Project = Project;
|
|
17745
17736
|
exports.ProjectBase = ProjectBase;
|
|
17746
17737
|
exports.RemoteFilter = RemoteFilter;
|
|
@@ -17768,5 +17759,5 @@
|
|
|
17768
17759
|
|
|
17769
17760
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
17770
17761
|
|
|
17771
|
-
}))
|
|
17762
|
+
}));
|
|
17772
17763
|
//# sourceMappingURL=index.js.map
|