@hpcc-js/marshaller 2.23.103 → 2.23.105
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 +528 -522
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +575 -567
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -3
- package/dist/index.min.js.map +1 -1
- package/package.json +33 -32
- package/src/__package__.ts +2 -2
- package/src/dashy.ts +1 -1
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -12,9 +12,9 @@ import { DockPanel, SplitPanel, CommandRegistry, ContextMenu, TabPanel, CommandP
|
|
|
12
12
|
import { JSONEditor, JSEditor } from '@hpcc-js/codemirror';
|
|
13
13
|
import { PropertyEditor } from '@hpcc-js/other';
|
|
14
14
|
|
|
15
|
-
var PKG_NAME
|
|
16
|
-
var PKG_VERSION
|
|
17
|
-
var BUILD_VERSION = "2.
|
|
15
|
+
var PKG_NAME = "@hpcc-js/marshaller";
|
|
16
|
+
var PKG_VERSION = "2.23.105";
|
|
17
|
+
var BUILD_VERSION = "2.99.0";
|
|
18
18
|
|
|
19
19
|
/*! *****************************************************************************
|
|
20
20
|
Copyright (c) Microsoft Corporation.
|
|
@@ -47,15 +47,15 @@ function __extends(d, b) {
|
|
|
47
47
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
var __assign
|
|
51
|
-
__assign
|
|
50
|
+
var __assign = function() {
|
|
51
|
+
__assign = Object.assign || function __assign(t) {
|
|
52
52
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
53
53
|
s = arguments[i];
|
|
54
54
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
55
55
|
}
|
|
56
56
|
return t;
|
|
57
57
|
};
|
|
58
|
-
return __assign
|
|
58
|
+
return __assign.apply(this, arguments);
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -107,14 +107,14 @@ function __generator(thisArg, body) {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
function __spreadArray
|
|
110
|
+
function __spreadArray(to, from, pack) {
|
|
111
111
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
112
112
|
if (ar || !(i in from)) {
|
|
113
113
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
114
114
|
ar[i] = from[i];
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
return to.concat(ar ||
|
|
117
|
+
return to.concat(ar || from);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
function stringify(obj_from_json) {
|
|
@@ -130,9 +130,9 @@ function stringify(obj_from_json) {
|
|
|
130
130
|
// but without quotes around the keys.
|
|
131
131
|
var props = Object
|
|
132
132
|
.keys(obj_from_json)
|
|
133
|
-
.map(function (key) { return
|
|
133
|
+
.map(function (key) { return key + ": " + stringify(obj_from_json[key]); })
|
|
134
134
|
.join(", ");
|
|
135
|
-
return "{ "
|
|
135
|
+
return "{ " + props + " }";
|
|
136
136
|
}
|
|
137
137
|
function schemaType2IFieldType(type) {
|
|
138
138
|
switch (type) {
|
|
@@ -231,7 +231,7 @@ var Activity = /** @class */ (function (_super) {
|
|
|
231
231
|
};
|
|
232
232
|
Activity.prototype.hash = function (more) {
|
|
233
233
|
if (more === void 0) { more = {}; }
|
|
234
|
-
return hashSum(__assign
|
|
234
|
+
return hashSum(__assign({}, more));
|
|
235
235
|
};
|
|
236
236
|
Activity.prototype.refreshMeta = function () {
|
|
237
237
|
return this._sourceActivity ? this._sourceActivity.refreshMeta() : Promise.resolve();
|
|
@@ -387,7 +387,7 @@ var ActivityPipeline = /** @class */ (function (_super) {
|
|
|
387
387
|
// Activity overrides ---
|
|
388
388
|
ActivityPipeline.prototype.hash = function (more) {
|
|
389
389
|
if (more === void 0) { more = {}; }
|
|
390
|
-
return hashSum(__assign
|
|
390
|
+
return hashSum(__assign({ activities: [this.activities().map(function (activity) { return activity.hash(); })] }, more));
|
|
391
391
|
};
|
|
392
392
|
ActivityPipeline.prototype.refreshMeta = function () {
|
|
393
393
|
return this.last().refreshMeta();
|
|
@@ -451,7 +451,7 @@ var ActivitySelection = /** @class */ (function (_super) {
|
|
|
451
451
|
// Activity overrides ---
|
|
452
452
|
ActivitySelection.prototype.hash = function (more) {
|
|
453
453
|
if (more === void 0) { more = {}; }
|
|
454
|
-
return hashSum(__assign
|
|
454
|
+
return hashSum(__assign({ selection: this.selection().hash() }, more));
|
|
455
455
|
};
|
|
456
456
|
ActivitySelection.prototype.label = function () {
|
|
457
457
|
return this.selection().label();
|
|
@@ -498,7 +498,7 @@ var Datasource = /** @class */ (function (_super) {
|
|
|
498
498
|
__extends(Datasource, _super);
|
|
499
499
|
function Datasource() {
|
|
500
500
|
var _this = _super.call(this) || this;
|
|
501
|
-
_this._id = "ds_"
|
|
501
|
+
_this._id = "ds_" + ++datasourceID;
|
|
502
502
|
return _this;
|
|
503
503
|
}
|
|
504
504
|
return Datasource;
|
|
@@ -517,7 +517,7 @@ var DatasourceRef = /** @class */ (function (_super) {
|
|
|
517
517
|
};
|
|
518
518
|
DatasourceRef.prototype.hash = function (more) {
|
|
519
519
|
if (more === void 0) { more = {}; }
|
|
520
|
-
return _super.prototype.hash.call(this, __assign
|
|
520
|
+
return _super.prototype.hash.call(this, __assign({ datasource: this._datasource ? this._datasource.hash(more) : undefined }, more));
|
|
521
521
|
};
|
|
522
522
|
DatasourceRef.prototype.toDDL = function () {
|
|
523
523
|
return {
|
|
@@ -630,7 +630,7 @@ var Form = /** @class */ (function (_super) {
|
|
|
630
630
|
};
|
|
631
631
|
Form.prototype.hash = function (more) {
|
|
632
632
|
if (more === void 0) { more = {}; }
|
|
633
|
-
return _super.prototype.hash.call(this, __assign
|
|
633
|
+
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL() }, more));
|
|
634
634
|
};
|
|
635
635
|
Form.prototype.refreshMeta = function () {
|
|
636
636
|
return Promise.resolve();
|
|
@@ -775,7 +775,7 @@ var Databomb = /** @class */ (function (_super) {
|
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
777
|
Databomb.prototype.hash = function (more) {
|
|
778
|
-
return _super.prototype.hash.call(this, __assign
|
|
778
|
+
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL(true) }, more)) + this.payload();
|
|
779
779
|
};
|
|
780
780
|
Databomb.prototype.refreshMeta = function () {
|
|
781
781
|
return Promise.resolve();
|
|
@@ -927,7 +927,7 @@ var ESPResult = /** @class */ (function (_super) {
|
|
|
927
927
|
}
|
|
928
928
|
ESPResult.prototype.hash = function (more) {
|
|
929
929
|
if (more === void 0) { more = {}; }
|
|
930
|
-
return hashSum(__assign
|
|
930
|
+
return hashSum(__assign({ samples: this.samples(), sampleSize: this.sampleSize() }, more));
|
|
931
931
|
};
|
|
932
932
|
ESPResult.prototype.refreshMeta = function () {
|
|
933
933
|
var _this = this;
|
|
@@ -1079,7 +1079,7 @@ var WUResult = /** @class */ (function (_super) {
|
|
|
1079
1079
|
});
|
|
1080
1080
|
};
|
|
1081
1081
|
WUResult.prototype.label = function () {
|
|
1082
|
-
return
|
|
1082
|
+
return this.wuid() + "\n" + this.resultName();
|
|
1083
1083
|
};
|
|
1084
1084
|
__decorate([
|
|
1085
1085
|
publish(null, "widget", "Workunit"),
|
|
@@ -1273,7 +1273,7 @@ var LogicalFile = /** @class */ (function (_super) {
|
|
|
1273
1273
|
});
|
|
1274
1274
|
};
|
|
1275
1275
|
LogicalFile.prototype.label = function () {
|
|
1276
|
-
return ""
|
|
1276
|
+
return "" + this.logicalFile();
|
|
1277
1277
|
};
|
|
1278
1278
|
__decorate([
|
|
1279
1279
|
publish("", "string", "ESP Url (http://x.x.x.x:8010)"),
|
|
@@ -1362,7 +1362,7 @@ var RestService = /** @class */ (function (_super) {
|
|
|
1362
1362
|
};
|
|
1363
1363
|
RestService.prototype.hash = function (more) {
|
|
1364
1364
|
if (more === void 0) { more = {}; }
|
|
1365
|
-
return hashSum(__assign
|
|
1365
|
+
return hashSum(__assign({ url: this.url(), action: this.action(), mode: this.mode() }, more));
|
|
1366
1366
|
};
|
|
1367
1367
|
RestService.prototype.label = function () {
|
|
1368
1368
|
return this.action();
|
|
@@ -1449,12 +1449,12 @@ var RestResult = /** @class */ (function (_super) {
|
|
|
1449
1449
|
};
|
|
1450
1450
|
RestResult.fromDDL = function (ec, rs, resultName) {
|
|
1451
1451
|
return new RestResult(ec)
|
|
1452
|
-
.id(
|
|
1452
|
+
.id(rs.id() + "_" + resultName)
|
|
1453
1453
|
.service(rs)
|
|
1454
1454
|
.resultName(resultName);
|
|
1455
1455
|
};
|
|
1456
1456
|
RestResult.prototype.serviceID = function () {
|
|
1457
|
-
return
|
|
1457
|
+
return this.service().url() + "/" + this.service().action() + "}";
|
|
1458
1458
|
};
|
|
1459
1459
|
RestResult.prototype.sourceHash = function () {
|
|
1460
1460
|
return this.service().hash();
|
|
@@ -1470,10 +1470,10 @@ var RestResult = /** @class */ (function (_super) {
|
|
|
1470
1470
|
};
|
|
1471
1471
|
RestResult.prototype.hash = function (more) {
|
|
1472
1472
|
if (more === void 0) { more = {}; }
|
|
1473
|
-
return hashSum(__assign
|
|
1473
|
+
return hashSum(__assign({ source: this.sourceHash(), resultName: this.resultName() }, more));
|
|
1474
1474
|
};
|
|
1475
1475
|
RestResult.prototype.label = function () {
|
|
1476
|
-
return
|
|
1476
|
+
return this.service().label() + "\n" + this.resultName();
|
|
1477
1477
|
};
|
|
1478
1478
|
RestResult.prototype.jsonDataFields = function () {
|
|
1479
1479
|
if (!this._jsonData || !this._jsonData.length)
|
|
@@ -1534,22 +1534,22 @@ var Param = /** @class */ (function (_super) {
|
|
|
1534
1534
|
var retVal = [];
|
|
1535
1535
|
if (!this.source_valid()) {
|
|
1536
1536
|
retVal.push({
|
|
1537
|
-
source:
|
|
1538
|
-
msg: "Invalid source: \""
|
|
1539
|
-
hint: "expected: "
|
|
1537
|
+
source: prefix + ".source." + this.source(),
|
|
1538
|
+
msg: "Invalid source: \"" + this.source() + "\"",
|
|
1539
|
+
hint: "expected: " + JSON.stringify(this.visualizationIDs())
|
|
1540
1540
|
});
|
|
1541
1541
|
}
|
|
1542
1542
|
if (!this.remoteField_valid()) {
|
|
1543
1543
|
retVal.push({
|
|
1544
|
-
source:
|
|
1545
|
-
msg: "Invalid remoteField: \""
|
|
1546
|
-
hint: "expected: "
|
|
1544
|
+
source: prefix + ".remoteField",
|
|
1545
|
+
msg: "Invalid remoteField: \"" + this.remoteField() + "\"",
|
|
1546
|
+
hint: "expected: " + JSON.stringify(this.sourceOutFields())
|
|
1547
1547
|
});
|
|
1548
1548
|
}
|
|
1549
1549
|
if (!this.value_valid()) {
|
|
1550
1550
|
retVal.push({
|
|
1551
|
-
source:
|
|
1552
|
-
msg: "Invalid value: \""
|
|
1551
|
+
source: prefix + ".value",
|
|
1552
|
+
msg: "Invalid value: \"" + this.value() + "\"",
|
|
1553
1553
|
hint: "expected: any value."
|
|
1554
1554
|
});
|
|
1555
1555
|
}
|
|
@@ -1715,7 +1715,7 @@ var RestResultRef = /** @class */ (function (_super) {
|
|
|
1715
1715
|
});
|
|
1716
1716
|
};
|
|
1717
1717
|
RestResultRef.prototype.label = function () {
|
|
1718
|
-
return
|
|
1718
|
+
return this.datasource().label() + "\n" + this.datasource().resultName();
|
|
1719
1719
|
};
|
|
1720
1720
|
RestResultRef.prototype.elementIDs = function () {
|
|
1721
1721
|
return this._ec.elementIDs();
|
|
@@ -1795,15 +1795,15 @@ function parseUrl(_) {
|
|
|
1795
1795
|
// "http://10.241.100.157:8002/WsEcl/submit/query/roxie/carmigjx_govbisgsavi.Ins4621360_Service_00000006/json",
|
|
1796
1796
|
var parts = _.split("/WsEcl/submit/query/");
|
|
1797
1797
|
if (parts.length < 2)
|
|
1798
|
-
throw new Error("Invalid roxie URL: "
|
|
1798
|
+
throw new Error("Invalid roxie URL: " + _);
|
|
1799
1799
|
var urlParts = parts[0].split(":");
|
|
1800
1800
|
if (urlParts.length < 3)
|
|
1801
|
-
throw new Error("Invalid roxie URL: "
|
|
1801
|
+
throw new Error("Invalid roxie URL: " + _);
|
|
1802
1802
|
var roxieParts = parts[1].split("/");
|
|
1803
1803
|
if (roxieParts.length < 2)
|
|
1804
|
-
throw new Error("Invalid roxie URL: "
|
|
1804
|
+
throw new Error("Invalid roxie URL: " + _);
|
|
1805
1805
|
return {
|
|
1806
|
-
url:
|
|
1806
|
+
url: urlParts[0] + ":" + urlParts[1] + ":" + (urlParts[2] === "18002" ? "18010" : "8010"),
|
|
1807
1807
|
querySet: roxieParts[0],
|
|
1808
1808
|
queryID: roxieParts[1]
|
|
1809
1809
|
};
|
|
@@ -1857,7 +1857,7 @@ var RoxieService = /** @class */ (function (_super) {
|
|
|
1857
1857
|
};
|
|
1858
1858
|
RoxieService.prototype.hash = function (more) {
|
|
1859
1859
|
if (more === void 0) { more = {}; }
|
|
1860
|
-
return hashSum(__assign
|
|
1860
|
+
return hashSum(__assign({ url: this.url(), querySet: this.querySet(), queryId: this.queryID(), ignoreHipieRequest: this.ignoreHipieRequest(), ignoreHipieResponse: this.ignoreHipieResponse() }, more));
|
|
1861
1861
|
};
|
|
1862
1862
|
RoxieService.prototype.label = function () {
|
|
1863
1863
|
return this.queryID();
|
|
@@ -1974,12 +1974,12 @@ var RoxieResult = /** @class */ (function (_super) {
|
|
|
1974
1974
|
};
|
|
1975
1975
|
RoxieResult.fromDDL = function (ec, rs, resultName) {
|
|
1976
1976
|
return new RoxieResult(ec)
|
|
1977
|
-
.id(
|
|
1977
|
+
.id(rs.id() + "_" + resultName)
|
|
1978
1978
|
.service(rs)
|
|
1979
1979
|
.resultName(resultName);
|
|
1980
1980
|
};
|
|
1981
1981
|
RoxieResult.prototype.serviceID = function () {
|
|
1982
|
-
return
|
|
1982
|
+
return this.service().url() + "/" + this.service().querySet() + "/" + this.service().queryID();
|
|
1983
1983
|
};
|
|
1984
1984
|
RoxieResult.prototype.sourceHash = function () {
|
|
1985
1985
|
return this.service().hash();
|
|
@@ -1995,10 +1995,10 @@ var RoxieResult = /** @class */ (function (_super) {
|
|
|
1995
1995
|
};
|
|
1996
1996
|
RoxieResult.prototype.hash = function (more) {
|
|
1997
1997
|
if (more === void 0) { more = {}; }
|
|
1998
|
-
return hashSum(__assign
|
|
1998
|
+
return hashSum(__assign({ source: this.sourceHash(), resultName: this.resultName() }, more));
|
|
1999
1999
|
};
|
|
2000
2000
|
RoxieResult.prototype.label = function () {
|
|
2001
|
-
return
|
|
2001
|
+
return this.service().label() + "\n" + this.resultName();
|
|
2002
2002
|
};
|
|
2003
2003
|
RoxieResult.prototype.computeFields = function (inFields) {
|
|
2004
2004
|
var _this = this;
|
|
@@ -2101,7 +2101,7 @@ var RoxieResultRef = /** @class */ (function (_super) {
|
|
|
2101
2101
|
});
|
|
2102
2102
|
};
|
|
2103
2103
|
RoxieResultRef.prototype.label = function () {
|
|
2104
|
-
return
|
|
2104
|
+
return this.datasource().label() + "\n" + this.datasource().resultName();
|
|
2105
2105
|
};
|
|
2106
2106
|
RoxieResultRef.prototype.elementIDs = function () {
|
|
2107
2107
|
return this._ec.elementIDs();
|
|
@@ -2226,7 +2226,7 @@ var HipieResultRef = /** @class */ (function (_super) {
|
|
|
2226
2226
|
var request = {};
|
|
2227
2227
|
for (var key in _request) {
|
|
2228
2228
|
request[key] = _request[key];
|
|
2229
|
-
request[
|
|
2229
|
+
request[key + "_changed"] = true;
|
|
2230
2230
|
}
|
|
2231
2231
|
return request;
|
|
2232
2232
|
};
|
|
@@ -2241,7 +2241,7 @@ var DSPicker = /** @class */ (function (_super) {
|
|
|
2241
2241
|
var _this = _super.call(this) || this;
|
|
2242
2242
|
_this._ec = _ec;
|
|
2243
2243
|
_this._nullDatasource = emptyDatabomb;
|
|
2244
|
-
_this._id = "ds_"
|
|
2244
|
+
_this._id = "ds_" + ++dsPickerID;
|
|
2245
2245
|
var ds = _this._ec.datasources()[0];
|
|
2246
2246
|
_this.datasourceID(ds.id());
|
|
2247
2247
|
return _this;
|
|
@@ -2298,18 +2298,18 @@ var DSPicker = /** @class */ (function (_super) {
|
|
|
2298
2298
|
return this.selection().validate();
|
|
2299
2299
|
};
|
|
2300
2300
|
DSPicker.prototype.toDDL = function () {
|
|
2301
|
-
return __assign
|
|
2301
|
+
return __assign(__assign({}, this.datasourceRef().toDDL()), { id: this.datasourceID() });
|
|
2302
2302
|
};
|
|
2303
2303
|
// Activity overrides ---
|
|
2304
2304
|
DSPicker.prototype.hash = function (more) {
|
|
2305
2305
|
if (more === void 0) { more = {}; }
|
|
2306
|
-
return _super.prototype.hash.call(this, __assign
|
|
2306
|
+
return _super.prototype.hash.call(this, __assign({}, more));
|
|
2307
2307
|
};
|
|
2308
2308
|
DSPicker.prototype.datasourceIDs = function () {
|
|
2309
2309
|
return this._ec.datasources().map(function (ds) {
|
|
2310
2310
|
return {
|
|
2311
2311
|
value: ds.id(),
|
|
2312
|
-
text:
|
|
2312
|
+
text: ds.label() + " " + (ds.id() !== ds.label() ? " (" + ds.id() + ")" : "")
|
|
2313
2313
|
};
|
|
2314
2314
|
});
|
|
2315
2315
|
};
|
|
@@ -2325,23 +2325,8 @@ var DSPicker = /** @class */ (function (_super) {
|
|
|
2325
2325
|
}(ActivitySelection));
|
|
2326
2326
|
DSPicker.prototype._class += " DSPicker";
|
|
2327
2327
|
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
2331
|
-
if (k !== 'default' && !(k in n)) {
|
|
2332
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
2333
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
2334
|
-
enumerable: true,
|
|
2335
|
-
get: function () { return e[k]; }
|
|
2336
|
-
});
|
|
2337
|
-
}
|
|
2338
|
-
});
|
|
2339
|
-
});
|
|
2340
|
-
return Object.freeze(n);
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
var PKG_NAME = "@hpcc-js/ddl-shim";
|
|
2344
|
-
var PKG_VERSION = "2.17.21";
|
|
2328
|
+
var PKG_NAME$1 = "@hpcc-js/ddl-shim";
|
|
2329
|
+
var PKG_VERSION$1 = "2.17.23";
|
|
2345
2330
|
|
|
2346
2331
|
function isWorkunitDatasource(ref) {
|
|
2347
2332
|
return ref.WUID !== undefined;
|
|
@@ -2406,7 +2391,7 @@ function isLimitActivity(activity) {
|
|
|
2406
2391
|
}
|
|
2407
2392
|
var VisibilitySet = ["normal", "flyout"];
|
|
2408
2393
|
|
|
2409
|
-
var v2
|
|
2394
|
+
var v2 = /*#__PURE__*/Object.freeze({
|
|
2410
2395
|
__proto__: null,
|
|
2411
2396
|
isDatabombRef: isDatabombRef,
|
|
2412
2397
|
isWUResultRef: isWUResultRef,
|
|
@@ -2436,25 +2421,25 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
2436
2421
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2437
2422
|
***************************************************************************** */
|
|
2438
2423
|
|
|
2439
|
-
var __assign = function() {
|
|
2440
|
-
__assign = Object.assign || function __assign(t) {
|
|
2424
|
+
var __assign$1 = function() {
|
|
2425
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
2441
2426
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2442
2427
|
s = arguments[i];
|
|
2443
2428
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
2444
2429
|
}
|
|
2445
2430
|
return t;
|
|
2446
2431
|
};
|
|
2447
|
-
return __assign.apply(this, arguments);
|
|
2432
|
+
return __assign$1.apply(this, arguments);
|
|
2448
2433
|
};
|
|
2449
2434
|
|
|
2450
|
-
function __spreadArray(to, from, pack) {
|
|
2435
|
+
function __spreadArray$1(to, from, pack) {
|
|
2451
2436
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2452
2437
|
if (ar || !(i in from)) {
|
|
2453
2438
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2454
2439
|
ar[i] = from[i];
|
|
2455
2440
|
}
|
|
2456
2441
|
}
|
|
2457
|
-
return to.concat(ar ||
|
|
2442
|
+
return to.concat(ar || from);
|
|
2458
2443
|
}
|
|
2459
2444
|
|
|
2460
2445
|
var classMappings = {
|
|
@@ -2670,7 +2655,7 @@ function apply_to_properties_layout(ddl2, dermObj) {
|
|
|
2670
2655
|
});
|
|
2671
2656
|
return retVal;
|
|
2672
2657
|
}
|
|
2673
|
-
function upgrade
|
|
2658
|
+
function upgrade(ddl2, dermObj) {
|
|
2674
2659
|
apply_to_dataviews(ddl2, dermObj);
|
|
2675
2660
|
return apply_to_properties_layout(ddl2, dermObj);
|
|
2676
2661
|
}
|
|
@@ -2890,7 +2875,7 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
2890
2875
|
break;
|
|
2891
2876
|
default:
|
|
2892
2877
|
groupByColumns.push(this.toLowerCase(field.id));
|
|
2893
|
-
throw new Error("Unhandled field function: "
|
|
2878
|
+
throw new Error("Unhandled field function: " + field.properties.function);
|
|
2894
2879
|
}
|
|
2895
2880
|
}
|
|
2896
2881
|
else {
|
|
@@ -2901,7 +2886,7 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
2901
2886
|
this._ddl2DataviewActivities[viz.id].project.transformations = projectTransformations;
|
|
2902
2887
|
}
|
|
2903
2888
|
if (aggrFields.length) {
|
|
2904
|
-
this._ddl2DataviewActivities[viz.id].groupBy.groupByIDs = __spreadArray([], groupByColumns
|
|
2889
|
+
this._ddl2DataviewActivities[viz.id].groupBy.groupByIDs = __spreadArray$1([], groupByColumns);
|
|
2905
2890
|
this._ddl2DataviewActivities[viz.id].groupBy.aggregates = aggrFields;
|
|
2906
2891
|
}
|
|
2907
2892
|
}
|
|
@@ -2919,7 +2904,7 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
2919
2904
|
case "MAX":
|
|
2920
2905
|
return "max";
|
|
2921
2906
|
}
|
|
2922
|
-
throw new Error("Unknown DDL1 Function Type: "
|
|
2907
|
+
throw new Error("Unknown DDL1 Function Type: " + func);
|
|
2923
2908
|
};
|
|
2924
2909
|
DDLUpgrade.prototype.readMappings = function () {
|
|
2925
2910
|
for (var _i = 0, _a = this._ddl.dashboards; _i < _a.length; _i++) {
|
|
@@ -2946,7 +2931,7 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
2946
2931
|
this.readSliderMappings(viz);
|
|
2947
2932
|
}
|
|
2948
2933
|
else {
|
|
2949
|
-
throw new Error("Unkown DDL1 mapping type: "
|
|
2934
|
+
throw new Error("Unkown DDL1 mapping type: " + viz.type);
|
|
2950
2935
|
}
|
|
2951
2936
|
}
|
|
2952
2937
|
}
|
|
@@ -3061,7 +3046,7 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
3061
3046
|
var flag = _a[_i];
|
|
3062
3047
|
if (flag.fieldid) {
|
|
3063
3048
|
mappings.transformations.push({
|
|
3064
|
-
fieldID: "annotation_"
|
|
3049
|
+
fieldID: "annotation_" + idx++,
|
|
3065
3050
|
type: "map",
|
|
3066
3051
|
sourceFieldID: this.toLowerCase(flag.fieldid),
|
|
3067
3052
|
default: {},
|
|
@@ -3120,7 +3105,7 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
3120
3105
|
var mapping = update.mappings[key];
|
|
3121
3106
|
var dsFilter = (mapping && dsFilters[mapping]) ? dsFilters[mapping].filter : undefined;
|
|
3122
3107
|
if (!dsFilter) {
|
|
3123
|
-
console.warn("Select Mapping \""
|
|
3108
|
+
console.warn("Select Mapping \"" + mapping + "\" in viz \"" + viz.id + "\" not found in filters for \"" + otherViz.id + "\"");
|
|
3124
3109
|
}
|
|
3125
3110
|
else {
|
|
3126
3111
|
condition.mappings.push({
|
|
@@ -3231,7 +3216,7 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
3231
3216
|
groupBy,
|
|
3232
3217
|
limit
|
|
3233
3218
|
],
|
|
3234
|
-
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 || {}) })
|
|
3219
|
+
visualization: __assign$1(__assign$1({ 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 || {}) })
|
|
3235
3220
|
};
|
|
3236
3221
|
};
|
|
3237
3222
|
DDLUpgrade.prototype.type2chartType = function (chartType) {
|
|
@@ -3361,8 +3346,8 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
3361
3346
|
return {
|
|
3362
3347
|
version: "2.2.1",
|
|
3363
3348
|
createdBy: {
|
|
3364
|
-
name: PKG_NAME,
|
|
3365
|
-
version: PKG_VERSION
|
|
3349
|
+
name: PKG_NAME$1,
|
|
3350
|
+
version: PKG_VERSION$1
|
|
3366
3351
|
},
|
|
3367
3352
|
datasources: this.writeDatasources(),
|
|
3368
3353
|
dataviews: this.writeDataviews(),
|
|
@@ -3371,24 +3356,43 @@ var DDLUpgrade = /** @class */ (function () {
|
|
|
3371
3356
|
};
|
|
3372
3357
|
return DDLUpgrade;
|
|
3373
3358
|
}());
|
|
3374
|
-
function upgrade(ddl, baseUrl, wuid, toLowerCase, dermatologyJson) {
|
|
3359
|
+
function upgrade$1(ddl, baseUrl, wuid, toLowerCase, dermatologyJson) {
|
|
3375
3360
|
if (toLowerCase === void 0) { toLowerCase = true; }
|
|
3376
3361
|
if (dermatologyJson === void 0) { dermatologyJson = {}; }
|
|
3377
3362
|
var ddlUp = new DDLUpgrade(ddl, baseUrl, wuid, toLowerCase);
|
|
3378
3363
|
var retVal = ddlUp.write();
|
|
3379
|
-
retVal.properties = upgrade
|
|
3364
|
+
retVal.properties = upgrade(retVal, dermatologyJson);
|
|
3380
3365
|
return retVal;
|
|
3381
3366
|
}
|
|
3382
3367
|
|
|
3383
3368
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
3384
3369
|
|
|
3385
|
-
|
|
3370
|
+
function unwrapExports (x) {
|
|
3371
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3372
|
+
}
|
|
3386
3373
|
|
|
3387
|
-
|
|
3374
|
+
function createCommonjsModule(fn, basedir, module) {
|
|
3375
|
+
return module = {
|
|
3376
|
+
path: basedir,
|
|
3377
|
+
exports: {},
|
|
3378
|
+
require: function (path, base) {
|
|
3379
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
3380
|
+
}
|
|
3381
|
+
}, fn(module, module.exports), module.exports;
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
function getCjsExportFromNamespace (n) {
|
|
3385
|
+
return n && n['default'] || n;
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
function commonjsRequire () {
|
|
3389
|
+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
3390
|
+
}
|
|
3388
3391
|
|
|
3389
|
-
(function (module, exports) {
|
|
3392
|
+
var uri_all = createCommonjsModule(function (module, exports) {
|
|
3393
|
+
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
|
3390
3394
|
(function (global, factory) {
|
|
3391
|
-
|
|
3395
|
+
factory(exports) ;
|
|
3392
3396
|
}(commonjsGlobal, (function (exports) {
|
|
3393
3397
|
function merge() {
|
|
3394
3398
|
for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -3442,10 +3446,10 @@ function buildExps(isIRI) {
|
|
|
3442
3446
|
//subset, excludes bidi control characters
|
|
3443
3447
|
IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
|
|
3444
3448
|
//subset
|
|
3445
|
-
UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$)
|
|
3446
|
-
subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*")
|
|
3447
|
-
subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*")
|
|
3448
|
-
|
|
3449
|
+
UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$),
|
|
3450
|
+
SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"),
|
|
3451
|
+
USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"),
|
|
3452
|
+
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$$),
|
|
3449
3453
|
//relaxed parsing rules
|
|
3450
3454
|
IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
|
|
3451
3455
|
H16$ = subexp(HEXDIG$$ + "{1,4}"),
|
|
@@ -3469,14 +3473,14 @@ function buildExps(isIRI) {
|
|
|
3469
3473
|
IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
|
|
3470
3474
|
//[ *6( h16 ":" ) h16 ] "::"
|
|
3471
3475
|
IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
|
|
3472
|
-
ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+")
|
|
3476
|
+
ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"),
|
|
3473
3477
|
//RFC 6874, with relaxed parsing rules
|
|
3474
|
-
subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+")
|
|
3478
|
+
IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"),
|
|
3475
3479
|
//RFC 6874
|
|
3476
|
-
subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*")
|
|
3477
|
-
|
|
3478
|
-
subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+")
|
|
3479
|
-
subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*");
|
|
3480
|
+
REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"),
|
|
3481
|
+
PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")),
|
|
3482
|
+
SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"),
|
|
3483
|
+
QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*");
|
|
3480
3484
|
return {
|
|
3481
3485
|
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
|
3482
3486
|
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
|
@@ -4590,7 +4594,7 @@ var handler$3 = {
|
|
|
4590
4594
|
|
|
4591
4595
|
var O = {};
|
|
4592
4596
|
//RFC 3986
|
|
4593
|
-
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ("\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]";
|
|
4597
|
+
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + ( "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" ) + "]";
|
|
4594
4598
|
var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
|
|
4595
4599
|
var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
|
|
4596
4600
|
//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
|
|
@@ -4788,7 +4792,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4788
4792
|
|
|
4789
4793
|
})));
|
|
4790
4794
|
|
|
4791
|
-
}
|
|
4795
|
+
});
|
|
4796
|
+
|
|
4797
|
+
unwrapExports(uri_all);
|
|
4792
4798
|
|
|
4793
4799
|
var isArray = Array.isArray;
|
|
4794
4800
|
var keyList = Object.keys;
|
|
@@ -4846,7 +4852,7 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
4846
4852
|
|
|
4847
4853
|
// https://mathiasbynens.be/notes/javascript-encoding
|
|
4848
4854
|
// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
|
|
4849
|
-
var ucs2length
|
|
4855
|
+
var ucs2length = function ucs2length(str) {
|
|
4850
4856
|
var length = 0
|
|
4851
4857
|
, len = str.length
|
|
4852
4858
|
, pos = 0
|
|
@@ -4863,16 +4869,16 @@ var ucs2length$1 = function ucs2length(str) {
|
|
|
4863
4869
|
return length;
|
|
4864
4870
|
};
|
|
4865
4871
|
|
|
4866
|
-
var util
|
|
4872
|
+
var util = {
|
|
4867
4873
|
copy: copy,
|
|
4868
4874
|
checkDataType: checkDataType,
|
|
4869
4875
|
checkDataTypes: checkDataTypes,
|
|
4870
4876
|
coerceToTypes: coerceToTypes,
|
|
4871
|
-
toHash: toHash
|
|
4877
|
+
toHash: toHash,
|
|
4872
4878
|
getProperty: getProperty,
|
|
4873
4879
|
escapeQuotes: escapeQuotes,
|
|
4874
4880
|
equal: fastDeepEqual,
|
|
4875
|
-
ucs2length: ucs2length
|
|
4881
|
+
ucs2length: ucs2length,
|
|
4876
4882
|
varOccurences: varOccurences,
|
|
4877
4883
|
varReplace: varReplace,
|
|
4878
4884
|
cleanUpCode: cleanUpCode,
|
|
@@ -4922,7 +4928,7 @@ function checkDataTypes(dataTypes, data) {
|
|
|
4922
4928
|
case 1: return checkDataType(dataTypes[0], data, true);
|
|
4923
4929
|
default:
|
|
4924
4930
|
var code = '';
|
|
4925
|
-
var types = toHash
|
|
4931
|
+
var types = toHash(dataTypes);
|
|
4926
4932
|
if (types.array && types.object) {
|
|
4927
4933
|
code = types.null ? '(': '(!' + data + ' || ';
|
|
4928
4934
|
code += 'typeof ' + data + ' !== "object")';
|
|
@@ -4939,7 +4945,7 @@ function checkDataTypes(dataTypes, data) {
|
|
|
4939
4945
|
}
|
|
4940
4946
|
|
|
4941
4947
|
|
|
4942
|
-
var COERCE_TO_TYPES = toHash
|
|
4948
|
+
var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
|
|
4943
4949
|
function coerceToTypes(optionCoerceTypes, dataTypes) {
|
|
4944
4950
|
if (Array.isArray(dataTypes)) {
|
|
4945
4951
|
var types = [];
|
|
@@ -4957,19 +4963,19 @@ function coerceToTypes(optionCoerceTypes, dataTypes) {
|
|
|
4957
4963
|
}
|
|
4958
4964
|
|
|
4959
4965
|
|
|
4960
|
-
function toHash
|
|
4966
|
+
function toHash(arr) {
|
|
4961
4967
|
var hash = {};
|
|
4962
4968
|
for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
|
|
4963
4969
|
return hash;
|
|
4964
4970
|
}
|
|
4965
4971
|
|
|
4966
4972
|
|
|
4967
|
-
var IDENTIFIER
|
|
4973
|
+
var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
4968
4974
|
var SINGLE_QUOTE = /'|\\/g;
|
|
4969
4975
|
function getProperty(key) {
|
|
4970
4976
|
return typeof key == 'number'
|
|
4971
4977
|
? '[' + key + ']'
|
|
4972
|
-
: IDENTIFIER
|
|
4978
|
+
: IDENTIFIER.test(key)
|
|
4973
4979
|
? '.' + key
|
|
4974
4980
|
: "['" + escapeQuotes(key) + "']";
|
|
4975
4981
|
}
|
|
@@ -5073,17 +5079,17 @@ function getPath(currentPath, prop, jsonPointers) {
|
|
|
5073
5079
|
}
|
|
5074
5080
|
|
|
5075
5081
|
|
|
5076
|
-
var JSON_POINTER
|
|
5077
|
-
var RELATIVE_JSON_POINTER
|
|
5082
|
+
var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
|
|
5083
|
+
var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
5078
5084
|
function getData($data, lvl, paths) {
|
|
5079
5085
|
var up, jsonPointer, data, matches;
|
|
5080
5086
|
if ($data === '') return 'rootData';
|
|
5081
5087
|
if ($data[0] == '/') {
|
|
5082
|
-
if (!JSON_POINTER
|
|
5088
|
+
if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
|
|
5083
5089
|
jsonPointer = $data;
|
|
5084
5090
|
data = 'rootData';
|
|
5085
5091
|
} else {
|
|
5086
|
-
matches = $data.match(RELATIVE_JSON_POINTER
|
|
5092
|
+
matches = $data.match(RELATIVE_JSON_POINTER);
|
|
5087
5093
|
if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
|
|
5088
5094
|
up = +matches[1];
|
|
5089
5095
|
jsonPointer = matches[2];
|
|
@@ -5135,17 +5141,15 @@ function unescapeJsonPointer(str) {
|
|
|
5135
5141
|
return str.replace(/~1/g, '/').replace(/~0/g, '~');
|
|
5136
5142
|
}
|
|
5137
5143
|
|
|
5138
|
-
var
|
|
5144
|
+
var schema_obj = SchemaObject;
|
|
5139
5145
|
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
function SchemaObject$2(obj) {
|
|
5143
|
-
util$4.copy(obj, this);
|
|
5146
|
+
function SchemaObject(obj) {
|
|
5147
|
+
util.copy(obj, this);
|
|
5144
5148
|
}
|
|
5145
5149
|
|
|
5146
|
-
var jsonSchemaTraverse =
|
|
5150
|
+
var jsonSchemaTraverse = createCommonjsModule(function (module) {
|
|
5147
5151
|
|
|
5148
|
-
var traverse
|
|
5152
|
+
var traverse = module.exports = function (schema, opts, cb) {
|
|
5149
5153
|
// Legacy support for v0.3.1 and earlier.
|
|
5150
5154
|
if (typeof opts == 'function') {
|
|
5151
5155
|
cb = opts;
|
|
@@ -5160,7 +5164,7 @@ var traverse$1 = jsonSchemaTraverse.exports = function (schema, opts, cb) {
|
|
|
5160
5164
|
};
|
|
5161
5165
|
|
|
5162
5166
|
|
|
5163
|
-
traverse
|
|
5167
|
+
traverse.keywords = {
|
|
5164
5168
|
additionalItems: true,
|
|
5165
5169
|
items: true,
|
|
5166
5170
|
contains: true,
|
|
@@ -5169,21 +5173,21 @@ traverse$1.keywords = {
|
|
|
5169
5173
|
not: true
|
|
5170
5174
|
};
|
|
5171
5175
|
|
|
5172
|
-
traverse
|
|
5176
|
+
traverse.arrayKeywords = {
|
|
5173
5177
|
items: true,
|
|
5174
5178
|
allOf: true,
|
|
5175
5179
|
anyOf: true,
|
|
5176
5180
|
oneOf: true
|
|
5177
5181
|
};
|
|
5178
5182
|
|
|
5179
|
-
traverse
|
|
5183
|
+
traverse.propsKeywords = {
|
|
5180
5184
|
definitions: true,
|
|
5181
5185
|
properties: true,
|
|
5182
5186
|
patternProperties: true,
|
|
5183
5187
|
dependencies: true
|
|
5184
5188
|
};
|
|
5185
5189
|
|
|
5186
|
-
traverse
|
|
5190
|
+
traverse.skipKeywords = {
|
|
5187
5191
|
default: true,
|
|
5188
5192
|
enum: true,
|
|
5189
5193
|
const: true,
|
|
@@ -5211,16 +5215,16 @@ function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr,
|
|
|
5211
5215
|
for (var key in schema) {
|
|
5212
5216
|
var sch = schema[key];
|
|
5213
5217
|
if (Array.isArray(sch)) {
|
|
5214
|
-
if (key in traverse
|
|
5218
|
+
if (key in traverse.arrayKeywords) {
|
|
5215
5219
|
for (var i=0; i<sch.length; i++)
|
|
5216
5220
|
_traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
|
|
5217
5221
|
}
|
|
5218
|
-
} else if (key in traverse
|
|
5222
|
+
} else if (key in traverse.propsKeywords) {
|
|
5219
5223
|
if (sch && typeof sch == 'object') {
|
|
5220
5224
|
for (var prop in sch)
|
|
5221
5225
|
_traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
|
|
5222
5226
|
}
|
|
5223
|
-
} else if (key in traverse
|
|
5227
|
+
} else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
|
|
5224
5228
|
_traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
|
|
5225
5229
|
}
|
|
5226
5230
|
}
|
|
@@ -5232,21 +5236,16 @@ function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr,
|
|
|
5232
5236
|
function escapeJsonPtr(str) {
|
|
5233
5237
|
return str.replace(/~/g, '~0').replace(/\//g, '~1');
|
|
5234
5238
|
}
|
|
5239
|
+
});
|
|
5235
5240
|
|
|
5236
|
-
var
|
|
5237
|
-
, equal$1 = fastDeepEqual
|
|
5238
|
-
, util$3 = util$5
|
|
5239
|
-
, SchemaObject$1 = schema_obj
|
|
5240
|
-
, traverse = jsonSchemaTraverse.exports;
|
|
5241
|
-
|
|
5242
|
-
var resolve_1 = resolve$3;
|
|
5241
|
+
var resolve_1 = resolve;
|
|
5243
5242
|
|
|
5244
|
-
resolve
|
|
5245
|
-
resolve
|
|
5246
|
-
resolve
|
|
5247
|
-
resolve
|
|
5248
|
-
resolve
|
|
5249
|
-
resolve
|
|
5243
|
+
resolve.normalizeId = normalizeId;
|
|
5244
|
+
resolve.fullPath = getFullPath;
|
|
5245
|
+
resolve.url = resolveUrl;
|
|
5246
|
+
resolve.ids = resolveIds;
|
|
5247
|
+
resolve.inlineRef = inlineRef;
|
|
5248
|
+
resolve.schema = resolveSchema;
|
|
5250
5249
|
|
|
5251
5250
|
/**
|
|
5252
5251
|
* [resolve and compile the references ($ref)]
|
|
@@ -5256,16 +5255,16 @@ resolve$3.schema = resolveSchema;
|
|
|
5256
5255
|
* @param {String} ref reference to resolve
|
|
5257
5256
|
* @return {Object|Function} schema object (if the schema can be inlined) or validation function
|
|
5258
5257
|
*/
|
|
5259
|
-
function resolve
|
|
5258
|
+
function resolve(compile, root, ref) {
|
|
5260
5259
|
/* jshint validthis: true */
|
|
5261
5260
|
var refVal = this._refs[ref];
|
|
5262
5261
|
if (typeof refVal == 'string') {
|
|
5263
5262
|
if (this._refs[refVal]) refVal = this._refs[refVal];
|
|
5264
|
-
else return resolve
|
|
5263
|
+
else return resolve.call(this, compile, root, refVal);
|
|
5265
5264
|
}
|
|
5266
5265
|
|
|
5267
5266
|
refVal = refVal || this._schemas[ref];
|
|
5268
|
-
if (refVal instanceof
|
|
5267
|
+
if (refVal instanceof schema_obj) {
|
|
5269
5268
|
return inlineRef(refVal.schema, this._opts.inlineRefs)
|
|
5270
5269
|
? refVal.schema
|
|
5271
5270
|
: refVal.validate || this._compile(refVal);
|
|
@@ -5279,7 +5278,7 @@ function resolve$3(compile, root, ref) {
|
|
|
5279
5278
|
baseId = res.baseId;
|
|
5280
5279
|
}
|
|
5281
5280
|
|
|
5282
|
-
if (schema instanceof
|
|
5281
|
+
if (schema instanceof schema_obj) {
|
|
5283
5282
|
v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);
|
|
5284
5283
|
} else if (schema !== undefined) {
|
|
5285
5284
|
v = inlineRef(schema, this._opts.inlineRefs)
|
|
@@ -5300,7 +5299,7 @@ function resolve$3(compile, root, ref) {
|
|
|
5300
5299
|
*/
|
|
5301
5300
|
function resolveSchema(root, ref) {
|
|
5302
5301
|
/* jshint validthis: true */
|
|
5303
|
-
var p =
|
|
5302
|
+
var p = uri_all.parse(ref)
|
|
5304
5303
|
, refPath = _getFullPath(p)
|
|
5305
5304
|
, baseId = getFullPath(this._getId(root.schema));
|
|
5306
5305
|
if (Object.keys(root.schema).length === 0 || refPath !== baseId) {
|
|
@@ -5308,12 +5307,12 @@ function resolveSchema(root, ref) {
|
|
|
5308
5307
|
var refVal = this._refs[id];
|
|
5309
5308
|
if (typeof refVal == 'string') {
|
|
5310
5309
|
return resolveRecursive.call(this, root, refVal, p);
|
|
5311
|
-
} else if (refVal instanceof
|
|
5310
|
+
} else if (refVal instanceof schema_obj) {
|
|
5312
5311
|
if (!refVal.validate) this._compile(refVal);
|
|
5313
5312
|
root = refVal;
|
|
5314
5313
|
} else {
|
|
5315
5314
|
refVal = this._schemas[id];
|
|
5316
|
-
if (refVal instanceof
|
|
5315
|
+
if (refVal instanceof schema_obj) {
|
|
5317
5316
|
if (!refVal.validate) this._compile(refVal);
|
|
5318
5317
|
if (id == normalizeId(ref))
|
|
5319
5318
|
return { schema: refVal, root: root, baseId: baseId };
|
|
@@ -5344,7 +5343,7 @@ function resolveRecursive(root, ref, parsedRef) {
|
|
|
5344
5343
|
}
|
|
5345
5344
|
|
|
5346
5345
|
|
|
5347
|
-
var PREVENT_SCOPE_CHANGE = util
|
|
5346
|
+
var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);
|
|
5348
5347
|
/* @this Ajv */
|
|
5349
5348
|
function getJsonPointer(parsedRef, baseId, schema, root) {
|
|
5350
5349
|
/* jshint validthis: true */
|
|
@@ -5355,7 +5354,7 @@ function getJsonPointer(parsedRef, baseId, schema, root) {
|
|
|
5355
5354
|
for (var i = 1; i < parts.length; i++) {
|
|
5356
5355
|
var part = parts[i];
|
|
5357
5356
|
if (part) {
|
|
5358
|
-
part = util
|
|
5357
|
+
part = util.unescapeFragment(part);
|
|
5359
5358
|
schema = schema[part];
|
|
5360
5359
|
if (schema === undefined) break;
|
|
5361
5360
|
var id;
|
|
@@ -5379,7 +5378,7 @@ function getJsonPointer(parsedRef, baseId, schema, root) {
|
|
|
5379
5378
|
}
|
|
5380
5379
|
|
|
5381
5380
|
|
|
5382
|
-
var SIMPLE_INLINED = util
|
|
5381
|
+
var SIMPLE_INLINED = util.toHash([
|
|
5383
5382
|
'type', 'format', 'pattern',
|
|
5384
5383
|
'maxLength', 'minLength',
|
|
5385
5384
|
'maxProperties', 'minProperties',
|
|
@@ -5439,13 +5438,13 @@ function countKeys(schema) {
|
|
|
5439
5438
|
|
|
5440
5439
|
function getFullPath(id, normalize) {
|
|
5441
5440
|
if (normalize !== false) id = normalizeId(id);
|
|
5442
|
-
var p =
|
|
5441
|
+
var p = uri_all.parse(id);
|
|
5443
5442
|
return _getFullPath(p);
|
|
5444
5443
|
}
|
|
5445
5444
|
|
|
5446
5445
|
|
|
5447
5446
|
function _getFullPath(p) {
|
|
5448
|
-
return
|
|
5447
|
+
return uri_all.serialize(p).split('#')[0] + '#';
|
|
5449
5448
|
}
|
|
5450
5449
|
|
|
5451
5450
|
|
|
@@ -5457,7 +5456,7 @@ function normalizeId(id) {
|
|
|
5457
5456
|
|
|
5458
5457
|
function resolveUrl(baseId, id) {
|
|
5459
5458
|
id = normalizeId(id);
|
|
5460
|
-
return
|
|
5459
|
+
return uri_all.resolve(baseId, id);
|
|
5461
5460
|
}
|
|
5462
5461
|
|
|
5463
5462
|
|
|
@@ -5469,25 +5468,25 @@ function resolveIds(schema) {
|
|
|
5469
5468
|
var localRefs = {};
|
|
5470
5469
|
var self = this;
|
|
5471
5470
|
|
|
5472
|
-
|
|
5471
|
+
jsonSchemaTraverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
|
|
5473
5472
|
if (jsonPtr === '') return;
|
|
5474
5473
|
var id = self._getId(sch);
|
|
5475
5474
|
var baseId = baseIds[parentJsonPtr];
|
|
5476
5475
|
var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;
|
|
5477
5476
|
if (keyIndex !== undefined)
|
|
5478
|
-
fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util
|
|
5477
|
+
fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));
|
|
5479
5478
|
|
|
5480
5479
|
if (typeof id == 'string') {
|
|
5481
|
-
id = baseId = normalizeId(baseId ?
|
|
5480
|
+
id = baseId = normalizeId(baseId ? uri_all.resolve(baseId, id) : id);
|
|
5482
5481
|
|
|
5483
5482
|
var refVal = self._refs[id];
|
|
5484
5483
|
if (typeof refVal == 'string') refVal = self._refs[refVal];
|
|
5485
5484
|
if (refVal && refVal.schema) {
|
|
5486
|
-
if (!
|
|
5485
|
+
if (!fastDeepEqual(sch, refVal.schema))
|
|
5487
5486
|
throw new Error('id "' + id + '" resolves to more than one schema');
|
|
5488
5487
|
} else if (id != normalizeId(fullPath)) {
|
|
5489
5488
|
if (id[0] == '#') {
|
|
5490
|
-
if (localRefs[id] && !
|
|
5489
|
+
if (localRefs[id] && !fastDeepEqual(sch, localRefs[id]))
|
|
5491
5490
|
throw new Error('id "' + id + '" resolves to more than one schema');
|
|
5492
5491
|
localRefs[id] = sch;
|
|
5493
5492
|
} else {
|
|
@@ -5502,30 +5501,28 @@ function resolveIds(schema) {
|
|
|
5502
5501
|
return localRefs;
|
|
5503
5502
|
}
|
|
5504
5503
|
|
|
5505
|
-
var resolve$2 = resolve_1;
|
|
5506
|
-
|
|
5507
5504
|
var error_classes = {
|
|
5508
|
-
Validation: errorSubclass(ValidationError
|
|
5509
|
-
MissingRef: errorSubclass(MissingRefError
|
|
5505
|
+
Validation: errorSubclass(ValidationError),
|
|
5506
|
+
MissingRef: errorSubclass(MissingRefError)
|
|
5510
5507
|
};
|
|
5511
5508
|
|
|
5512
5509
|
|
|
5513
|
-
function ValidationError
|
|
5510
|
+
function ValidationError(errors) {
|
|
5514
5511
|
this.message = 'validation failed';
|
|
5515
5512
|
this.errors = errors;
|
|
5516
5513
|
this.ajv = this.validation = true;
|
|
5517
5514
|
}
|
|
5518
5515
|
|
|
5519
5516
|
|
|
5520
|
-
MissingRefError
|
|
5517
|
+
MissingRefError.message = function (baseId, ref) {
|
|
5521
5518
|
return 'can\'t resolve reference ' + ref + ' from id ' + baseId;
|
|
5522
5519
|
};
|
|
5523
5520
|
|
|
5524
5521
|
|
|
5525
|
-
function MissingRefError
|
|
5526
|
-
this.message = message || MissingRefError
|
|
5527
|
-
this.missingRef =
|
|
5528
|
-
this.missingSchema =
|
|
5522
|
+
function MissingRefError(baseId, ref, message) {
|
|
5523
|
+
this.message = message || MissingRefError.message(baseId, ref);
|
|
5524
|
+
this.missingRef = resolve_1.url(baseId, ref);
|
|
5525
|
+
this.missingSchema = resolve_1.normalizeId(resolve_1.fullPath(this.missingRef));
|
|
5529
5526
|
}
|
|
5530
5527
|
|
|
5531
5528
|
|
|
@@ -5593,7 +5590,7 @@ var fastJsonStableStringify = function (data, opts) {
|
|
|
5593
5590
|
})(data);
|
|
5594
5591
|
};
|
|
5595
5592
|
|
|
5596
|
-
var validate
|
|
5593
|
+
var validate = function generate_validate(it, $keyword, $ruleType) {
|
|
5597
5594
|
var out = '';
|
|
5598
5595
|
var $async = it.schema.$async === true,
|
|
5599
5596
|
$refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),
|
|
@@ -6087,24 +6084,17 @@ var validate$1 = function generate_validate(it, $keyword, $ruleType) {
|
|
|
6087
6084
|
return out;
|
|
6088
6085
|
};
|
|
6089
6086
|
|
|
6090
|
-
var resolve$1 = resolve_1
|
|
6091
|
-
, util$2 = util$5
|
|
6092
|
-
, errorClasses$1 = error_classes
|
|
6093
|
-
, stableStringify$1 = fastJsonStableStringify;
|
|
6094
|
-
|
|
6095
|
-
var validateGenerator = validate$1;
|
|
6096
|
-
|
|
6097
6087
|
/**
|
|
6098
6088
|
* Functions below are used inside compiled validations function
|
|
6099
6089
|
*/
|
|
6100
6090
|
|
|
6101
|
-
var ucs2length = util
|
|
6102
|
-
|
|
6091
|
+
var ucs2length$1 = util.ucs2length;
|
|
6092
|
+
|
|
6103
6093
|
|
|
6104
6094
|
// this error is thrown by async schemas to return validation errors via exception
|
|
6105
|
-
var ValidationError =
|
|
6095
|
+
var ValidationError$1 = error_classes.Validation;
|
|
6106
6096
|
|
|
6107
|
-
var compile_1 = compile
|
|
6097
|
+
var compile_1 = compile;
|
|
6108
6098
|
|
|
6109
6099
|
|
|
6110
6100
|
/**
|
|
@@ -6116,7 +6106,7 @@ var compile_1 = compile$1;
|
|
|
6116
6106
|
* @param {String} baseId base ID for IDs in the schema
|
|
6117
6107
|
* @return {Function} validation function
|
|
6118
6108
|
*/
|
|
6119
|
-
function compile
|
|
6109
|
+
function compile(schema, root, localRefs, baseId) {
|
|
6120
6110
|
/* jshint validthis: true, evil: true */
|
|
6121
6111
|
/* eslint no-shadow: 0 */
|
|
6122
6112
|
var self = this
|
|
@@ -6168,11 +6158,11 @@ function compile$1(schema, root, localRefs, baseId) {
|
|
|
6168
6158
|
function localCompile(_schema, _root, localRefs, baseId) {
|
|
6169
6159
|
var isRoot = !_root || (_root && _root.schema == _schema);
|
|
6170
6160
|
if (_root.schema != root.schema)
|
|
6171
|
-
return compile
|
|
6161
|
+
return compile.call(self, _schema, _root, localRefs, baseId);
|
|
6172
6162
|
|
|
6173
6163
|
var $async = _schema.$async === true;
|
|
6174
6164
|
|
|
6175
|
-
var sourceCode =
|
|
6165
|
+
var sourceCode = validate({
|
|
6176
6166
|
isTop: true,
|
|
6177
6167
|
schema: _schema,
|
|
6178
6168
|
isRoot: isRoot,
|
|
@@ -6181,11 +6171,11 @@ function compile$1(schema, root, localRefs, baseId) {
|
|
|
6181
6171
|
schemaPath: '',
|
|
6182
6172
|
errSchemaPath: '#',
|
|
6183
6173
|
errorPath: '""',
|
|
6184
|
-
MissingRefError:
|
|
6174
|
+
MissingRefError: error_classes.MissingRef,
|
|
6185
6175
|
RULES: RULES,
|
|
6186
|
-
validate:
|
|
6187
|
-
util: util
|
|
6188
|
-
resolve:
|
|
6176
|
+
validate: validate,
|
|
6177
|
+
util: util,
|
|
6178
|
+
resolve: resolve_1,
|
|
6189
6179
|
resolveRef: resolveRef,
|
|
6190
6180
|
usePattern: usePattern,
|
|
6191
6181
|
useDefault: useDefault,
|
|
@@ -6197,12 +6187,12 @@ function compile$1(schema, root, localRefs, baseId) {
|
|
|
6197
6187
|
});
|
|
6198
6188
|
|
|
6199
6189
|
sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)
|
|
6200
|
-
+ vars(defaults, defaultCode) + vars(customRules, customRuleCode
|
|
6190
|
+
+ vars(defaults, defaultCode) + vars(customRules, customRuleCode)
|
|
6201
6191
|
+ sourceCode;
|
|
6202
6192
|
|
|
6203
6193
|
if (opts.processCode) sourceCode = opts.processCode(sourceCode);
|
|
6204
6194
|
// console.log('\n\n\n *** \n', JSON.stringify(sourceCode));
|
|
6205
|
-
var validate;
|
|
6195
|
+
var validate$1;
|
|
6206
6196
|
try {
|
|
6207
6197
|
var makeValidate = new Function(
|
|
6208
6198
|
'self',
|
|
@@ -6218,7 +6208,7 @@ function compile$1(schema, root, localRefs, baseId) {
|
|
|
6218
6208
|
sourceCode
|
|
6219
6209
|
);
|
|
6220
6210
|
|
|
6221
|
-
validate = makeValidate(
|
|
6211
|
+
validate$1 = makeValidate(
|
|
6222
6212
|
self,
|
|
6223
6213
|
RULES,
|
|
6224
6214
|
formats,
|
|
@@ -6226,36 +6216,36 @@ function compile$1(schema, root, localRefs, baseId) {
|
|
|
6226
6216
|
refVal,
|
|
6227
6217
|
defaults,
|
|
6228
6218
|
customRules,
|
|
6229
|
-
|
|
6230
|
-
ucs2length,
|
|
6231
|
-
ValidationError
|
|
6219
|
+
fastDeepEqual,
|
|
6220
|
+
ucs2length$1,
|
|
6221
|
+
ValidationError$1
|
|
6232
6222
|
);
|
|
6233
6223
|
|
|
6234
|
-
refVal[0] = validate;
|
|
6224
|
+
refVal[0] = validate$1;
|
|
6235
6225
|
} catch(e) {
|
|
6236
6226
|
self.logger.error('Error compiling schema, function code:', sourceCode);
|
|
6237
6227
|
throw e;
|
|
6238
6228
|
}
|
|
6239
6229
|
|
|
6240
|
-
validate.schema = _schema;
|
|
6241
|
-
validate.errors = null;
|
|
6242
|
-
validate.refs = refs;
|
|
6243
|
-
validate.refVal = refVal;
|
|
6244
|
-
validate.root = isRoot ? validate : _root;
|
|
6245
|
-
if ($async) validate.$async = true;
|
|
6230
|
+
validate$1.schema = _schema;
|
|
6231
|
+
validate$1.errors = null;
|
|
6232
|
+
validate$1.refs = refs;
|
|
6233
|
+
validate$1.refVal = refVal;
|
|
6234
|
+
validate$1.root = isRoot ? validate$1 : _root;
|
|
6235
|
+
if ($async) validate$1.$async = true;
|
|
6246
6236
|
if (opts.sourceCode === true) {
|
|
6247
|
-
validate.source = {
|
|
6237
|
+
validate$1.source = {
|
|
6248
6238
|
code: sourceCode,
|
|
6249
6239
|
patterns: patterns,
|
|
6250
6240
|
defaults: defaults
|
|
6251
6241
|
};
|
|
6252
6242
|
}
|
|
6253
6243
|
|
|
6254
|
-
return validate;
|
|
6244
|
+
return validate$1;
|
|
6255
6245
|
}
|
|
6256
6246
|
|
|
6257
6247
|
function resolveRef(baseId, ref, isRoot) {
|
|
6258
|
-
ref =
|
|
6248
|
+
ref = resolve_1.url(baseId, ref);
|
|
6259
6249
|
var refIndex = refs[ref];
|
|
6260
6250
|
var _refVal, refCode;
|
|
6261
6251
|
if (refIndex !== undefined) {
|
|
@@ -6273,13 +6263,13 @@ function compile$1(schema, root, localRefs, baseId) {
|
|
|
6273
6263
|
}
|
|
6274
6264
|
|
|
6275
6265
|
refCode = addLocalRef(ref);
|
|
6276
|
-
var v =
|
|
6266
|
+
var v = resolve_1.call(self, localCompile, root, ref);
|
|
6277
6267
|
if (v === undefined) {
|
|
6278
6268
|
var localSchema = localRefs && localRefs[ref];
|
|
6279
6269
|
if (localSchema) {
|
|
6280
|
-
v =
|
|
6270
|
+
v = resolve_1.inlineRef(localSchema, opts.inlineRefs)
|
|
6281
6271
|
? localSchema
|
|
6282
|
-
: compile
|
|
6272
|
+
: compile.call(self, localSchema, root, localRefs, baseId);
|
|
6283
6273
|
}
|
|
6284
6274
|
}
|
|
6285
6275
|
|
|
@@ -6328,10 +6318,10 @@ function compile$1(schema, root, localRefs, baseId) {
|
|
|
6328
6318
|
case 'number':
|
|
6329
6319
|
return '' + value;
|
|
6330
6320
|
case 'string':
|
|
6331
|
-
return util
|
|
6321
|
+
return util.toQuotedString(value);
|
|
6332
6322
|
case 'object':
|
|
6333
6323
|
if (value === null) return 'null';
|
|
6334
|
-
var valueStr =
|
|
6324
|
+
var valueStr = fastJsonStableStringify(value);
|
|
6335
6325
|
var index = defaultsHash[valueStr];
|
|
6336
6326
|
if (index === undefined) {
|
|
6337
6327
|
index = defaultsHash[valueStr] = defaults.length;
|
|
@@ -6446,7 +6436,7 @@ function compIndex(schema, root, baseId) {
|
|
|
6446
6436
|
|
|
6447
6437
|
|
|
6448
6438
|
function patternCode(i, patterns) {
|
|
6449
|
-
return 'var pattern' + i + ' = new RegExp(' + util
|
|
6439
|
+
return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
|
|
6450
6440
|
}
|
|
6451
6441
|
|
|
6452
6442
|
|
|
@@ -6460,7 +6450,7 @@ function refValCode(i, refVal) {
|
|
|
6460
6450
|
}
|
|
6461
6451
|
|
|
6462
6452
|
|
|
6463
|
-
function customRuleCode
|
|
6453
|
+
function customRuleCode(i) {
|
|
6464
6454
|
return 'var customRule' + i + ' = customRules[' + i + '];';
|
|
6465
6455
|
}
|
|
6466
6456
|
|
|
@@ -6473,33 +6463,33 @@ function vars(arr, statement) {
|
|
|
6473
6463
|
return code;
|
|
6474
6464
|
}
|
|
6475
6465
|
|
|
6476
|
-
var cache =
|
|
6466
|
+
var cache = createCommonjsModule(function (module) {
|
|
6467
|
+
|
|
6477
6468
|
|
|
6478
|
-
var Cache
|
|
6469
|
+
var Cache = module.exports = function Cache() {
|
|
6479
6470
|
this._cache = {};
|
|
6480
6471
|
};
|
|
6481
6472
|
|
|
6482
6473
|
|
|
6483
|
-
Cache
|
|
6474
|
+
Cache.prototype.put = function Cache_put(key, value) {
|
|
6484
6475
|
this._cache[key] = value;
|
|
6485
6476
|
};
|
|
6486
6477
|
|
|
6487
6478
|
|
|
6488
|
-
Cache
|
|
6479
|
+
Cache.prototype.get = function Cache_get(key) {
|
|
6489
6480
|
return this._cache[key];
|
|
6490
6481
|
};
|
|
6491
6482
|
|
|
6492
6483
|
|
|
6493
|
-
Cache
|
|
6484
|
+
Cache.prototype.del = function Cache_del(key) {
|
|
6494
6485
|
delete this._cache[key];
|
|
6495
6486
|
};
|
|
6496
6487
|
|
|
6497
6488
|
|
|
6498
|
-
Cache
|
|
6489
|
+
Cache.prototype.clear = function Cache_clear() {
|
|
6499
6490
|
this._cache = {};
|
|
6500
6491
|
};
|
|
6501
|
-
|
|
6502
|
-
var util$1 = util$5;
|
|
6492
|
+
});
|
|
6503
6493
|
|
|
6504
6494
|
var DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
6505
6495
|
var DAYS = [0,31,28,31,30,31,30,31,31,30,31,30,31];
|
|
@@ -6515,20 +6505,20 @@ var URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|
|
|
|
6515
6505
|
// 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;
|
|
6516
6506
|
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;
|
|
6517
6507
|
var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;
|
|
6518
|
-
var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
|
|
6508
|
+
var JSON_POINTER$1 = /^(?:\/(?:[^~/]|~0|~1)*)*$/;
|
|
6519
6509
|
var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;
|
|
6520
|
-
var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
|
|
6510
|
+
var RELATIVE_JSON_POINTER$1 = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;
|
|
6521
6511
|
|
|
6522
6512
|
|
|
6523
|
-
var formats_1 = formats
|
|
6513
|
+
var formats_1 = formats;
|
|
6524
6514
|
|
|
6525
|
-
function formats
|
|
6515
|
+
function formats(mode) {
|
|
6526
6516
|
mode = mode == 'full' ? 'full' : 'fast';
|
|
6527
|
-
return util
|
|
6517
|
+
return util.copy(formats[mode]);
|
|
6528
6518
|
}
|
|
6529
6519
|
|
|
6530
6520
|
|
|
6531
|
-
formats
|
|
6521
|
+
formats.fast = {
|
|
6532
6522
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
6533
6523
|
date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/,
|
|
6534
6524
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -6553,14 +6543,14 @@ formats$1.fast = {
|
|
|
6553
6543
|
uuid: UUID,
|
|
6554
6544
|
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
6555
6545
|
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
|
6556
|
-
'json-pointer': JSON_POINTER,
|
|
6546
|
+
'json-pointer': JSON_POINTER$1,
|
|
6557
6547
|
'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
|
|
6558
6548
|
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
|
6559
|
-
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6549
|
+
'relative-json-pointer': RELATIVE_JSON_POINTER$1
|
|
6560
6550
|
};
|
|
6561
6551
|
|
|
6562
6552
|
|
|
6563
|
-
formats
|
|
6553
|
+
formats.full = {
|
|
6564
6554
|
date: date,
|
|
6565
6555
|
time: time,
|
|
6566
6556
|
'date-time': date_time,
|
|
@@ -6574,9 +6564,9 @@ formats$1.full = {
|
|
|
6574
6564
|
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,
|
|
6575
6565
|
regex: regex,
|
|
6576
6566
|
uuid: UUID,
|
|
6577
|
-
'json-pointer': JSON_POINTER,
|
|
6567
|
+
'json-pointer': JSON_POINTER$1,
|
|
6578
6568
|
'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,
|
|
6579
|
-
'relative-json-pointer': RELATIVE_JSON_POINTER
|
|
6569
|
+
'relative-json-pointer': RELATIVE_JSON_POINTER$1
|
|
6580
6570
|
};
|
|
6581
6571
|
|
|
6582
6572
|
|
|
@@ -6892,7 +6882,7 @@ var comment = function generate_comment(it, $keyword, $ruleType) {
|
|
|
6892
6882
|
var out = ' ';
|
|
6893
6883
|
var $schema = it.schema[$keyword];
|
|
6894
6884
|
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
|
|
6895
|
-
!it.opts.allErrors;
|
|
6885
|
+
var $breakOnError = !it.opts.allErrors;
|
|
6896
6886
|
var $comment = it.util.toQuotedString($schema);
|
|
6897
6887
|
if (it.opts.$comment === true) {
|
|
6898
6888
|
out += ' console.log(' + ($comment) + ');';
|
|
@@ -8363,7 +8353,7 @@ var pattern = function generate_pattern(it, $keyword, $ruleType) {
|
|
|
8363
8353
|
return out;
|
|
8364
8354
|
};
|
|
8365
8355
|
|
|
8366
|
-
var properties
|
|
8356
|
+
var properties = function generate_properties(it, $keyword, $ruleType) {
|
|
8367
8357
|
var out = ' ';
|
|
8368
8358
|
var $lvl = it.level;
|
|
8369
8359
|
var $dataLvl = it.dataLevel;
|
|
@@ -8775,7 +8765,7 @@ var propertyNames = function generate_propertyNames(it, $keyword, $ruleType) {
|
|
|
8775
8765
|
return out;
|
|
8776
8766
|
};
|
|
8777
8767
|
|
|
8778
|
-
var required
|
|
8768
|
+
var required = function generate_required(it, $keyword, $ruleType) {
|
|
8779
8769
|
var out = ' ';
|
|
8780
8770
|
var $lvl = it.level;
|
|
8781
8771
|
var $dataLvl = it.dataLevel;
|
|
@@ -9152,17 +9142,16 @@ var dotjs = {
|
|
|
9152
9142
|
not: not,
|
|
9153
9143
|
oneOf: oneOf,
|
|
9154
9144
|
pattern: pattern,
|
|
9155
|
-
properties: properties
|
|
9145
|
+
properties: properties,
|
|
9156
9146
|
propertyNames: propertyNames,
|
|
9157
|
-
required: required
|
|
9147
|
+
required: required,
|
|
9158
9148
|
uniqueItems: uniqueItems,
|
|
9159
|
-
validate: validate
|
|
9149
|
+
validate: validate
|
|
9160
9150
|
};
|
|
9161
9151
|
|
|
9162
|
-
var
|
|
9163
|
-
, toHash = util$5.toHash;
|
|
9152
|
+
var toHash$1 = util.toHash;
|
|
9164
9153
|
|
|
9165
|
-
var rules
|
|
9154
|
+
var rules = function rules() {
|
|
9166
9155
|
var RULES = [
|
|
9167
9156
|
{ type: 'number',
|
|
9168
9157
|
rules: [ { 'maximum': ['exclusiveMaximum'] },
|
|
@@ -9186,8 +9175,8 @@ var rules$1 = function rules() {
|
|
|
9186
9175
|
'additionalItems', 'then', 'else'
|
|
9187
9176
|
];
|
|
9188
9177
|
var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
|
|
9189
|
-
RULES.all = toHash(ALL);
|
|
9190
|
-
RULES.types = toHash(TYPES);
|
|
9178
|
+
RULES.all = toHash$1(ALL);
|
|
9179
|
+
RULES.types = toHash$1(TYPES);
|
|
9191
9180
|
|
|
9192
9181
|
RULES.forEach(function (group) {
|
|
9193
9182
|
group.rules = group.rules.map(function (keyword) {
|
|
@@ -9204,7 +9193,7 @@ var rules$1 = function rules() {
|
|
|
9204
9193
|
ALL.push(keyword);
|
|
9205
9194
|
var rule = RULES.all[keyword] = {
|
|
9206
9195
|
keyword: keyword,
|
|
9207
|
-
code:
|
|
9196
|
+
code: dotjs[keyword],
|
|
9208
9197
|
implements: implKeywords
|
|
9209
9198
|
};
|
|
9210
9199
|
return rule;
|
|
@@ -9212,13 +9201,13 @@ var rules$1 = function rules() {
|
|
|
9212
9201
|
|
|
9213
9202
|
RULES.all.$comment = {
|
|
9214
9203
|
keyword: '$comment',
|
|
9215
|
-
code:
|
|
9204
|
+
code: dotjs.$comment
|
|
9216
9205
|
};
|
|
9217
9206
|
|
|
9218
9207
|
if (group.type) RULES.types[group.type] = group;
|
|
9219
9208
|
});
|
|
9220
9209
|
|
|
9221
|
-
RULES.keywords = toHash(ALL.concat(KEYWORDS));
|
|
9210
|
+
RULES.keywords = toHash$1(ALL.concat(KEYWORDS));
|
|
9222
9211
|
RULES.custom = {};
|
|
9223
9212
|
|
|
9224
9213
|
return RULES;
|
|
@@ -9272,7 +9261,7 @@ var data = function (metaSchema, keywordsJsonPointers) {
|
|
|
9272
9261
|
return metaSchema;
|
|
9273
9262
|
};
|
|
9274
9263
|
|
|
9275
|
-
var MissingRefError = error_classes.MissingRef;
|
|
9264
|
+
var MissingRefError$1 = error_classes.MissingRef;
|
|
9276
9265
|
|
|
9277
9266
|
var async = compileAsync;
|
|
9278
9267
|
|
|
@@ -9325,7 +9314,7 @@ function compileAsync(schema, meta, callback) {
|
|
|
9325
9314
|
function _compileAsync(schemaObj) {
|
|
9326
9315
|
try { return self._compile(schemaObj); }
|
|
9327
9316
|
catch(e) {
|
|
9328
|
-
if (e instanceof MissingRefError) return loadMissingSchema(e);
|
|
9317
|
+
if (e instanceof MissingRefError$1) return loadMissingSchema(e);
|
|
9329
9318
|
throw e;
|
|
9330
9319
|
}
|
|
9331
9320
|
|
|
@@ -9589,10 +9578,10 @@ var custom = function generate_custom(it, $keyword, $ruleType) {
|
|
|
9589
9578
|
return out;
|
|
9590
9579
|
};
|
|
9591
9580
|
|
|
9592
|
-
var $schema
|
|
9593
|
-
var $id
|
|
9581
|
+
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
9582
|
+
var $id = "http://json-schema.org/draft-07/schema#";
|
|
9594
9583
|
var title = "Core schema meta-schema";
|
|
9595
|
-
var definitions
|
|
9584
|
+
var definitions = {
|
|
9596
9585
|
schemaArray: {
|
|
9597
9586
|
type: "array",
|
|
9598
9587
|
minItems: 1,
|
|
@@ -9635,7 +9624,7 @@ var definitions$1 = {
|
|
|
9635
9624
|
]
|
|
9636
9625
|
}
|
|
9637
9626
|
};
|
|
9638
|
-
var type
|
|
9627
|
+
var type = [
|
|
9639
9628
|
"object",
|
|
9640
9629
|
"boolean"
|
|
9641
9630
|
];
|
|
@@ -9831,19 +9820,32 @@ var properties$1 = {
|
|
|
9831
9820
|
$ref: "#"
|
|
9832
9821
|
}
|
|
9833
9822
|
};
|
|
9834
|
-
var
|
|
9835
|
-
$schema: $schema
|
|
9836
|
-
$id: $id
|
|
9823
|
+
var jsonSchemaDraft07 = {
|
|
9824
|
+
$schema: $schema,
|
|
9825
|
+
$id: $id,
|
|
9837
9826
|
title: title,
|
|
9838
|
-
definitions: definitions
|
|
9839
|
-
type: type
|
|
9827
|
+
definitions: definitions,
|
|
9828
|
+
type: type,
|
|
9840
9829
|
properties: properties$1,
|
|
9841
9830
|
"default": true
|
|
9842
9831
|
};
|
|
9843
9832
|
|
|
9844
|
-
var
|
|
9845
|
-
|
|
9846
|
-
|
|
9833
|
+
var jsonSchemaDraft07$1 = /*#__PURE__*/Object.freeze({
|
|
9834
|
+
__proto__: null,
|
|
9835
|
+
$schema: $schema,
|
|
9836
|
+
$id: $id,
|
|
9837
|
+
title: title,
|
|
9838
|
+
definitions: definitions,
|
|
9839
|
+
type: type,
|
|
9840
|
+
properties: properties$1,
|
|
9841
|
+
'default': jsonSchemaDraft07
|
|
9842
|
+
});
|
|
9843
|
+
|
|
9844
|
+
var require$$2 = getCjsExportFromNamespace(jsonSchemaDraft07$1);
|
|
9845
|
+
|
|
9846
|
+
var IDENTIFIER$1 = /^[a-z_$][a-z0-9_$-]*$/i;
|
|
9847
|
+
|
|
9848
|
+
var metaSchema = require$$2;
|
|
9847
9849
|
|
|
9848
9850
|
var keyword = {
|
|
9849
9851
|
add: addKeyword,
|
|
@@ -9899,7 +9901,7 @@ function addKeyword(keyword, definition) {
|
|
|
9899
9901
|
if (RULES.keywords[keyword])
|
|
9900
9902
|
throw new Error('Keyword ' + keyword + ' is already defined');
|
|
9901
9903
|
|
|
9902
|
-
if (!IDENTIFIER.test(keyword))
|
|
9904
|
+
if (!IDENTIFIER$1.test(keyword))
|
|
9903
9905
|
throw new Error('Keyword ' + keyword + ' is not a valid identifier');
|
|
9904
9906
|
|
|
9905
9907
|
if (definition) {
|
|
@@ -9949,7 +9951,7 @@ function addKeyword(keyword, definition) {
|
|
|
9949
9951
|
keyword: keyword,
|
|
9950
9952
|
definition: definition,
|
|
9951
9953
|
custom: true,
|
|
9952
|
-
code:
|
|
9954
|
+
code: custom,
|
|
9953
9955
|
implements: definition.implements
|
|
9954
9956
|
};
|
|
9955
9957
|
ruleGroup.rules.push(rule);
|
|
@@ -10019,13 +10021,13 @@ function validateKeyword(definition, throwError) {
|
|
|
10019
10021
|
}
|
|
10020
10022
|
|
|
10021
10023
|
var $schema$1 = "http://json-schema.org/draft-07/schema#";
|
|
10022
|
-
var $id = "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#";
|
|
10024
|
+
var $id$1 = "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#";
|
|
10023
10025
|
var description = "Meta-schema for $data reference (JSON Schema extension proposal)";
|
|
10024
|
-
var type = "object";
|
|
10025
|
-
var required = [
|
|
10026
|
+
var type$1 = "object";
|
|
10027
|
+
var required$1 = [
|
|
10026
10028
|
"$data"
|
|
10027
10029
|
];
|
|
10028
|
-
var properties = {
|
|
10030
|
+
var properties$2 = {
|
|
10029
10031
|
$data: {
|
|
10030
10032
|
type: "string",
|
|
10031
10033
|
anyOf: [
|
|
@@ -10039,52 +10041,56 @@ var properties = {
|
|
|
10039
10041
|
}
|
|
10040
10042
|
};
|
|
10041
10043
|
var additionalProperties = false;
|
|
10042
|
-
var
|
|
10044
|
+
var data$1 = {
|
|
10043
10045
|
$schema: $schema$1,
|
|
10044
|
-
$id: $id,
|
|
10046
|
+
$id: $id$1,
|
|
10045
10047
|
description: description,
|
|
10046
|
-
type: type,
|
|
10047
|
-
required: required,
|
|
10048
|
-
properties: properties,
|
|
10048
|
+
type: type$1,
|
|
10049
|
+
required: required$1,
|
|
10050
|
+
properties: properties$2,
|
|
10049
10051
|
additionalProperties: additionalProperties
|
|
10050
10052
|
};
|
|
10051
10053
|
|
|
10052
|
-
var
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
Ajv
|
|
10069
|
-
Ajv
|
|
10070
|
-
Ajv
|
|
10071
|
-
Ajv
|
|
10072
|
-
Ajv
|
|
10073
|
-
|
|
10074
|
-
Ajv
|
|
10075
|
-
Ajv
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
Ajv
|
|
10080
|
-
|
|
10081
|
-
Ajv
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
Ajv
|
|
10086
|
-
Ajv
|
|
10087
|
-
|
|
10054
|
+
var data$2 = /*#__PURE__*/Object.freeze({
|
|
10055
|
+
__proto__: null,
|
|
10056
|
+
$schema: $schema$1,
|
|
10057
|
+
$id: $id$1,
|
|
10058
|
+
description: description,
|
|
10059
|
+
type: type$1,
|
|
10060
|
+
required: required$1,
|
|
10061
|
+
properties: properties$2,
|
|
10062
|
+
additionalProperties: additionalProperties,
|
|
10063
|
+
'default': data$1
|
|
10064
|
+
});
|
|
10065
|
+
|
|
10066
|
+
var require$$1 = getCjsExportFromNamespace(data$2);
|
|
10067
|
+
|
|
10068
|
+
var ajv = Ajv;
|
|
10069
|
+
|
|
10070
|
+
Ajv.prototype.validate = validate$1;
|
|
10071
|
+
Ajv.prototype.compile = compile$1;
|
|
10072
|
+
Ajv.prototype.addSchema = addSchema;
|
|
10073
|
+
Ajv.prototype.addMetaSchema = addMetaSchema;
|
|
10074
|
+
Ajv.prototype.validateSchema = validateSchema;
|
|
10075
|
+
Ajv.prototype.getSchema = getSchema;
|
|
10076
|
+
Ajv.prototype.removeSchema = removeSchema;
|
|
10077
|
+
Ajv.prototype.addFormat = addFormat;
|
|
10078
|
+
Ajv.prototype.errorsText = errorsText;
|
|
10079
|
+
|
|
10080
|
+
Ajv.prototype._addSchema = _addSchema;
|
|
10081
|
+
Ajv.prototype._compile = _compile;
|
|
10082
|
+
|
|
10083
|
+
Ajv.prototype.compileAsync = async;
|
|
10084
|
+
|
|
10085
|
+
Ajv.prototype.addKeyword = keyword.add;
|
|
10086
|
+
Ajv.prototype.getKeyword = keyword.get;
|
|
10087
|
+
Ajv.prototype.removeKeyword = keyword.remove;
|
|
10088
|
+
Ajv.prototype.validateKeyword = keyword.validate;
|
|
10089
|
+
|
|
10090
|
+
|
|
10091
|
+
Ajv.ValidationError = error_classes.Validation;
|
|
10092
|
+
Ajv.MissingRefError = error_classes.MissingRef;
|
|
10093
|
+
Ajv.$dataMetaSchema = data;
|
|
10088
10094
|
|
|
10089
10095
|
var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
|
|
10090
10096
|
|
|
@@ -10097,16 +10103,16 @@ var META_SUPPORT_DATA = ['/properties'];
|
|
|
10097
10103
|
* @param {Object} opts optional options
|
|
10098
10104
|
* @return {Object} ajv instance
|
|
10099
10105
|
*/
|
|
10100
|
-
function Ajv
|
|
10101
|
-
if (!(this instanceof Ajv
|
|
10106
|
+
function Ajv(opts) {
|
|
10107
|
+
if (!(this instanceof Ajv)) return new Ajv(opts);
|
|
10102
10108
|
opts = this._opts = util.copy(opts) || {};
|
|
10103
10109
|
setLogger(this);
|
|
10104
10110
|
this._schemas = {};
|
|
10105
10111
|
this._refs = {};
|
|
10106
10112
|
this._fragments = {};
|
|
10107
|
-
this._formats =
|
|
10113
|
+
this._formats = formats_1(opts.format);
|
|
10108
10114
|
|
|
10109
|
-
this._cache = opts.cache || new
|
|
10115
|
+
this._cache = opts.cache || new cache;
|
|
10110
10116
|
this._loadingSchemas = {};
|
|
10111
10117
|
this._compilations = [];
|
|
10112
10118
|
this.RULES = rules();
|
|
@@ -10114,7 +10120,7 @@ function Ajv$1(opts) {
|
|
|
10114
10120
|
|
|
10115
10121
|
opts.loopRequired = opts.loopRequired || Infinity;
|
|
10116
10122
|
if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
|
|
10117
|
-
if (opts.serialize === undefined) opts.serialize =
|
|
10123
|
+
if (opts.serialize === undefined) opts.serialize = fastJsonStableStringify;
|
|
10118
10124
|
this._metaOpts = getMetaSchemaOptions(this);
|
|
10119
10125
|
|
|
10120
10126
|
if (opts.formats) addInitialFormats(this);
|
|
@@ -10134,7 +10140,7 @@ function Ajv$1(opts) {
|
|
|
10134
10140
|
* @param {Any} data to be validated
|
|
10135
10141
|
* @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
|
|
10136
10142
|
*/
|
|
10137
|
-
function validate(schemaKeyRef, data) {
|
|
10143
|
+
function validate$1(schemaKeyRef, data) {
|
|
10138
10144
|
var v;
|
|
10139
10145
|
if (typeof schemaKeyRef == 'string') {
|
|
10140
10146
|
v = this.getSchema(schemaKeyRef);
|
|
@@ -10157,7 +10163,7 @@ function validate(schemaKeyRef, data) {
|
|
|
10157
10163
|
* @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
|
|
10158
10164
|
* @return {Function} validating function
|
|
10159
10165
|
*/
|
|
10160
|
-
function compile(schema, _meta) {
|
|
10166
|
+
function compile$1(schema, _meta) {
|
|
10161
10167
|
var schemaObj = this._addSchema(schema, undefined, _meta);
|
|
10162
10168
|
return schemaObj.validate || this._compile(schemaObj);
|
|
10163
10169
|
}
|
|
@@ -10180,7 +10186,7 @@ function addSchema(schema, key, _skipValidation, _meta) {
|
|
|
10180
10186
|
var id = this._getId(schema);
|
|
10181
10187
|
if (id !== undefined && typeof id != 'string')
|
|
10182
10188
|
throw new Error('schema id must be string');
|
|
10183
|
-
key =
|
|
10189
|
+
key = resolve_1.normalizeId(key || id);
|
|
10184
10190
|
checkUnique(this, key);
|
|
10185
10191
|
this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
|
|
10186
10192
|
return this;
|
|
@@ -10257,13 +10263,13 @@ function getSchema(keyRef) {
|
|
|
10257
10263
|
|
|
10258
10264
|
|
|
10259
10265
|
function _getSchemaFragment(self, ref) {
|
|
10260
|
-
var res =
|
|
10266
|
+
var res = resolve_1.schema.call(self, { schema: {} }, ref);
|
|
10261
10267
|
if (res) {
|
|
10262
10268
|
var schema = res.schema
|
|
10263
10269
|
, root = res.root
|
|
10264
10270
|
, baseId = res.baseId;
|
|
10265
|
-
var v =
|
|
10266
|
-
self._fragments[ref] = new
|
|
10271
|
+
var v = compile_1.call(self, schema, root, undefined, baseId);
|
|
10272
|
+
self._fragments[ref] = new schema_obj({
|
|
10267
10273
|
ref: ref,
|
|
10268
10274
|
fragment: true,
|
|
10269
10275
|
schema: schema,
|
|
@@ -10277,7 +10283,7 @@ function _getSchemaFragment(self, ref) {
|
|
|
10277
10283
|
|
|
10278
10284
|
|
|
10279
10285
|
function _getSchemaObj(self, keyRef) {
|
|
10280
|
-
keyRef =
|
|
10286
|
+
keyRef = resolve_1.normalizeId(keyRef);
|
|
10281
10287
|
return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
|
|
10282
10288
|
}
|
|
10283
10289
|
|
|
@@ -10315,7 +10321,7 @@ function removeSchema(schemaKeyRef) {
|
|
|
10315
10321
|
this._cache.del(cacheKey);
|
|
10316
10322
|
var id = this._getId(schemaKeyRef);
|
|
10317
10323
|
if (id) {
|
|
10318
|
-
id =
|
|
10324
|
+
id = resolve_1.normalizeId(id);
|
|
10319
10325
|
delete this._schemas[id];
|
|
10320
10326
|
delete this._refs[id];
|
|
10321
10327
|
}
|
|
@@ -10346,17 +10352,17 @@ function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
|
|
|
10346
10352
|
|
|
10347
10353
|
shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
|
|
10348
10354
|
|
|
10349
|
-
var id =
|
|
10355
|
+
var id = resolve_1.normalizeId(this._getId(schema));
|
|
10350
10356
|
if (id && shouldAddSchema) checkUnique(this, id);
|
|
10351
10357
|
|
|
10352
10358
|
var willValidate = this._opts.validateSchema !== false && !skipValidation;
|
|
10353
10359
|
var recursiveMeta;
|
|
10354
|
-
if (willValidate && !(recursiveMeta = id && id ==
|
|
10360
|
+
if (willValidate && !(recursiveMeta = id && id == resolve_1.normalizeId(schema.$schema)))
|
|
10355
10361
|
this.validateSchema(schema, true);
|
|
10356
10362
|
|
|
10357
|
-
var localRefs =
|
|
10363
|
+
var localRefs = resolve_1.ids.call(this, schema);
|
|
10358
10364
|
|
|
10359
|
-
var schemaObj = new
|
|
10365
|
+
var schemaObj = new schema_obj({
|
|
10360
10366
|
id: id,
|
|
10361
10367
|
schema: schema,
|
|
10362
10368
|
localRefs: localRefs,
|
|
@@ -10393,7 +10399,7 @@ function _compile(schemaObj, root) {
|
|
|
10393
10399
|
}
|
|
10394
10400
|
|
|
10395
10401
|
var v;
|
|
10396
|
-
try { v =
|
|
10402
|
+
try { v = compile_1.call(this, schemaObj.schema, root, schemaObj.localRefs); }
|
|
10397
10403
|
catch(e) {
|
|
10398
10404
|
delete schemaObj.validate;
|
|
10399
10405
|
throw e;
|
|
@@ -10489,12 +10495,12 @@ function addFormat(name, format) {
|
|
|
10489
10495
|
function addDefaultMetaSchema(self) {
|
|
10490
10496
|
var $dataSchema;
|
|
10491
10497
|
if (self._opts.$data) {
|
|
10492
|
-
$dataSchema = require$$
|
|
10498
|
+
$dataSchema = require$$1;
|
|
10493
10499
|
self.addMetaSchema($dataSchema, $dataSchema.$id, true);
|
|
10494
10500
|
}
|
|
10495
10501
|
if (self._opts.meta === false) return;
|
|
10496
|
-
var metaSchema = require$$
|
|
10497
|
-
if (self._opts.$data) metaSchema =
|
|
10502
|
+
var metaSchema = require$$2;
|
|
10503
|
+
if (self._opts.$data) metaSchema = data(metaSchema, META_SUPPORT_DATA);
|
|
10498
10504
|
self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
|
|
10499
10505
|
self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
|
|
10500
10506
|
}
|
|
@@ -10545,14 +10551,14 @@ function setLogger(self) {
|
|
|
10545
10551
|
|
|
10546
10552
|
function noop() {}
|
|
10547
10553
|
|
|
10548
|
-
var _Ajv = /*#__PURE__*/Object.freeze(/*#__PURE__*/
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
}
|
|
10554
|
+
var _Ajv = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), ajv, {
|
|
10555
|
+
'default': ajv,
|
|
10556
|
+
__moduleExports: ajv
|
|
10557
|
+
}));
|
|
10552
10558
|
|
|
10553
10559
|
var $ref = "#/definitions/Schema";
|
|
10554
|
-
var $schema = "http://json-schema.org/draft-07/schema#";
|
|
10555
|
-
var definitions = {
|
|
10560
|
+
var $schema$2 = "http://json-schema.org/draft-07/schema#";
|
|
10561
|
+
var definitions$1 = {
|
|
10556
10562
|
ActivityType: {
|
|
10557
10563
|
anyOf: [
|
|
10558
10564
|
{
|
|
@@ -12195,21 +12201,21 @@ var definitions = {
|
|
|
12195
12201
|
type: "string"
|
|
12196
12202
|
}
|
|
12197
12203
|
};
|
|
12198
|
-
var v2 = {
|
|
12204
|
+
var v2$1 = {
|
|
12199
12205
|
$ref: $ref,
|
|
12200
|
-
$schema: $schema,
|
|
12201
|
-
definitions: definitions
|
|
12206
|
+
$schema: $schema$2,
|
|
12207
|
+
definitions: definitions$1
|
|
12202
12208
|
};
|
|
12203
12209
|
|
|
12204
12210
|
var _ddl2Schema = /*#__PURE__*/Object.freeze({
|
|
12205
12211
|
__proto__: null,
|
|
12206
12212
|
$ref: $ref,
|
|
12207
|
-
$schema: $schema,
|
|
12208
|
-
definitions: definitions,
|
|
12209
|
-
'default': v2
|
|
12213
|
+
$schema: $schema$2,
|
|
12214
|
+
definitions: definitions$1,
|
|
12215
|
+
'default': v2$1
|
|
12210
12216
|
});
|
|
12211
12217
|
|
|
12212
|
-
var Ajv = ajv || _Ajv;
|
|
12218
|
+
var Ajv$1 = ajv || _Ajv;
|
|
12213
12219
|
var ddl2Schema = _ddl2Schema;
|
|
12214
12220
|
var options = {
|
|
12215
12221
|
allErrors: false,
|
|
@@ -12217,7 +12223,7 @@ var options = {
|
|
|
12217
12223
|
jsonPointers: false
|
|
12218
12224
|
};
|
|
12219
12225
|
function doValidate(ddl, schema) {
|
|
12220
|
-
var ajv = new Ajv(options);
|
|
12226
|
+
var ajv = new Ajv$1(options);
|
|
12221
12227
|
var validate = ajv.compile(schema);
|
|
12222
12228
|
var success = validate(ddl);
|
|
12223
12229
|
return {
|
|
@@ -12249,7 +12255,7 @@ function createFilter(condition, lf, val) {
|
|
|
12249
12255
|
case ">=":
|
|
12250
12256
|
return function (localRow) { return localRow[lf] >= val; };
|
|
12251
12257
|
default:
|
|
12252
|
-
throw new Error("Unknown filter condition: "
|
|
12258
|
+
throw new Error("Unknown filter condition: " + condition);
|
|
12253
12259
|
}
|
|
12254
12260
|
}
|
|
12255
12261
|
var ColumnMapping = /** @class */ (function (_super) {
|
|
@@ -12261,16 +12267,16 @@ var ColumnMapping = /** @class */ (function (_super) {
|
|
|
12261
12267
|
var retVal = [];
|
|
12262
12268
|
if (!this.remoteField_valid()) {
|
|
12263
12269
|
retVal.push({
|
|
12264
|
-
source:
|
|
12265
|
-
msg: "Invalid remoteField: \""
|
|
12266
|
-
hint: "expected: "
|
|
12270
|
+
source: prefix + ".remoteField",
|
|
12271
|
+
msg: "Invalid remoteField: \"" + this.remoteField() + "\"",
|
|
12272
|
+
hint: "expected: " + JSON.stringify(this.sourceOutFields())
|
|
12267
12273
|
});
|
|
12268
12274
|
}
|
|
12269
12275
|
if (!this.localField_valid()) {
|
|
12270
12276
|
retVal.push({
|
|
12271
|
-
source:
|
|
12272
|
-
msg: "Invalid localField: \""
|
|
12273
|
-
hint: "expected: "
|
|
12277
|
+
source: prefix + ".localField",
|
|
12278
|
+
msg: "Invalid localField: \"" + this.localField() + "\"",
|
|
12279
|
+
hint: "expected: " + JSON.stringify(this.localFields())
|
|
12274
12280
|
});
|
|
12275
12281
|
}
|
|
12276
12282
|
return retVal;
|
|
@@ -12330,9 +12336,9 @@ var ColumnMapping = /** @class */ (function (_super) {
|
|
|
12330
12336
|
switch (this.condition()) {
|
|
12331
12337
|
case "in":
|
|
12332
12338
|
case "range":
|
|
12333
|
-
return
|
|
12339
|
+
return this.localField() + " " + this.condition() + " [" + this.remoteValues(filterSelection).join(", ") + "]";
|
|
12334
12340
|
default:
|
|
12335
|
-
return
|
|
12341
|
+
return this.localField() + " " + this.condition() + " " + this.remoteValues(filterSelection)[0];
|
|
12336
12342
|
}
|
|
12337
12343
|
};
|
|
12338
12344
|
ColumnMapping.prototype.createFilter = function (filterSelection) {
|
|
@@ -12393,21 +12399,21 @@ var RemoteFilter = /** @class */ (function (_super) {
|
|
|
12393
12399
|
var retVal = [];
|
|
12394
12400
|
if (!this.source_valid()) {
|
|
12395
12401
|
retVal.push({
|
|
12396
|
-
source:
|
|
12397
|
-
msg: "Invalid source: \""
|
|
12398
|
-
hint: "expected: "
|
|
12402
|
+
source: prefix + ".source." + this.source(),
|
|
12403
|
+
msg: "Invalid source: \"" + this.source() + "\"",
|
|
12404
|
+
hint: "expected: " + JSON.stringify(this.visualizationIDs())
|
|
12399
12405
|
});
|
|
12400
12406
|
}
|
|
12401
12407
|
if (this.source_exists() && this.validMappings().length === 0) {
|
|
12402
12408
|
retVal.push({
|
|
12403
|
-
source:
|
|
12404
|
-
msg: "Invalid mappings: \""
|
|
12409
|
+
source: prefix + ".source." + this.source(),
|
|
12410
|
+
msg: "Invalid mappings: \"" + this.source() + "\"",
|
|
12405
12411
|
hint: "expected minimum of 1 mapping"
|
|
12406
12412
|
});
|
|
12407
12413
|
}
|
|
12408
12414
|
for (var _i = 0, _a = this.validMappings(); _i < _a.length; _i++) {
|
|
12409
12415
|
var mapping = _a[_i];
|
|
12410
|
-
retVal = retVal.concat(mapping.validate(
|
|
12416
|
+
retVal = retVal.concat(mapping.validate(prefix + "." + this.source() + ".mappings"));
|
|
12411
12417
|
}
|
|
12412
12418
|
return retVal;
|
|
12413
12419
|
};
|
|
@@ -12509,9 +12515,9 @@ var StaticFilter = /** @class */ (function (_super) {
|
|
|
12509
12515
|
var retVal = [];
|
|
12510
12516
|
if (!this.localField_valid()) {
|
|
12511
12517
|
retVal.push({
|
|
12512
|
-
source:
|
|
12513
|
-
msg: "Invalid localField: \""
|
|
12514
|
-
hint: "expected: "
|
|
12518
|
+
source: prefix + ".localField",
|
|
12519
|
+
msg: "Invalid localField: \"" + this.localField() + "\"",
|
|
12520
|
+
hint: "expected: " + JSON.stringify(this.localFields())
|
|
12515
12521
|
});
|
|
12516
12522
|
}
|
|
12517
12523
|
return retVal;
|
|
@@ -12572,7 +12578,7 @@ var StaticFilter = /** @class */ (function (_super) {
|
|
|
12572
12578
|
return this._owner.inFields().map(function (field) { return field.id; });
|
|
12573
12579
|
};
|
|
12574
12580
|
StaticFilter.prototype.createFilterDescription = function () {
|
|
12575
|
-
return
|
|
12581
|
+
return this.localField() + " " + this.condition() + " " + this.coerceValue();
|
|
12576
12582
|
};
|
|
12577
12583
|
StaticFilter.prototype.createFilter = function () {
|
|
12578
12584
|
return createFilter(this.condition(), this.localField(), this.coerceValue());
|
|
@@ -12633,7 +12639,7 @@ var Filters = /** @class */ (function (_super) {
|
|
|
12633
12639
|
var remoteFilters = [];
|
|
12634
12640
|
var staticFilters = [];
|
|
12635
12641
|
_.forEach(function (fc) {
|
|
12636
|
-
if (v2
|
|
12642
|
+
if (v2.isIFilterCondition(fc)) {
|
|
12637
12643
|
remoteFilters.push(RemoteFilter.fromDDL(fc));
|
|
12638
12644
|
}
|
|
12639
12645
|
else {
|
|
@@ -12700,7 +12706,7 @@ var Filters = /** @class */ (function (_super) {
|
|
|
12700
12706
|
return this.staticFilter().filter(function (filter) { return filter.valid(); });
|
|
12701
12707
|
};
|
|
12702
12708
|
Filters.prototype.validFilters = function () {
|
|
12703
|
-
return __spreadArray
|
|
12709
|
+
return __spreadArray(__spreadArray([], this.validRemoteFilters()), this.validStaticFilters());
|
|
12704
12710
|
};
|
|
12705
12711
|
Filters.Filter = RemoteFilter;
|
|
12706
12712
|
Filters.Mapping = ColumnMapping;
|
|
@@ -12725,9 +12731,9 @@ var GroupByColumn = /** @class */ (function (_super) {
|
|
|
12725
12731
|
var retVal = [];
|
|
12726
12732
|
if (!this.label_valid()) {
|
|
12727
12733
|
retVal.push({
|
|
12728
|
-
source:
|
|
12729
|
-
msg: "Invalid label: \""
|
|
12730
|
-
hint: "expected "
|
|
12734
|
+
source: prefix + ".label",
|
|
12735
|
+
msg: "Invalid label: \"" + this.label() + "\"",
|
|
12736
|
+
hint: "expected " + JSON.stringify(this.columns())
|
|
12731
12737
|
});
|
|
12732
12738
|
}
|
|
12733
12739
|
return retVal;
|
|
@@ -12795,16 +12801,16 @@ var AggregateField = /** @class */ (function (_super) {
|
|
|
12795
12801
|
var retVal = [];
|
|
12796
12802
|
if (!this.aggrColumn_valid()) {
|
|
12797
12803
|
retVal.push({
|
|
12798
|
-
source:
|
|
12799
|
-
msg: "Invalid aggrColumn: \""
|
|
12800
|
-
hint: "expected "
|
|
12804
|
+
source: prefix + "." + this.fieldID() + ".aggrColumn",
|
|
12805
|
+
msg: "Invalid aggrColumn: \"" + this.aggrColumn() + "\"",
|
|
12806
|
+
hint: "expected " + JSON.stringify(this.columns())
|
|
12801
12807
|
});
|
|
12802
12808
|
}
|
|
12803
12809
|
if (!this.baseCountColumn_valid()) {
|
|
12804
12810
|
retVal.push({
|
|
12805
|
-
source:
|
|
12806
|
-
msg: "Invalid baseCountColumn: \""
|
|
12807
|
-
hint: "expected "
|
|
12811
|
+
source: prefix + "." + this.fieldID() + ".aggrColumn",
|
|
12812
|
+
msg: "Invalid baseCountColumn: \"" + this.baseCountColumn() + "\"",
|
|
12813
|
+
hint: "expected " + JSON.stringify(this.columns())
|
|
12808
12814
|
});
|
|
12809
12815
|
}
|
|
12810
12816
|
return retVal;
|
|
@@ -13170,15 +13176,15 @@ var ComputedMapping = /** @class */ (function (_super) {
|
|
|
13170
13176
|
var retVal = [];
|
|
13171
13177
|
if (!this.value_valid()) {
|
|
13172
13178
|
retVal.push({
|
|
13173
|
-
source:
|
|
13174
|
-
msg: "Invalid value: \""
|
|
13179
|
+
source: prefix + ".value",
|
|
13180
|
+
msg: "Invalid value: \"" + this.value() + "\"",
|
|
13175
13181
|
hint: 'expected: "any"'
|
|
13176
13182
|
});
|
|
13177
13183
|
}
|
|
13178
13184
|
if (!this.newValue_valid()) {
|
|
13179
13185
|
retVal.push({
|
|
13180
|
-
source:
|
|
13181
|
-
msg: "Invalid value: \""
|
|
13186
|
+
source: prefix + ".newValue",
|
|
13187
|
+
msg: "Invalid value: \"" + this.newValue() + "\"",
|
|
13182
13188
|
hint: 'expected: "any"'
|
|
13183
13189
|
});
|
|
13184
13190
|
}
|
|
@@ -13243,23 +13249,23 @@ var ComputedField = /** @class */ (function (_super) {
|
|
|
13243
13249
|
var retVal = [];
|
|
13244
13250
|
if (!this.column1_valid()) {
|
|
13245
13251
|
retVal.push({
|
|
13246
|
-
source:
|
|
13247
|
-
msg: "Invalid column1: \""
|
|
13248
|
-
hint: "expected: "
|
|
13252
|
+
source: prefix + "." + this.label(),
|
|
13253
|
+
msg: "Invalid column1: \"" + this.column1() + "\"",
|
|
13254
|
+
hint: "expected: " + JSON.stringify(this.columns())
|
|
13249
13255
|
});
|
|
13250
13256
|
}
|
|
13251
13257
|
if (!this.column2_valid()) {
|
|
13252
13258
|
retVal.push({
|
|
13253
|
-
source:
|
|
13254
|
-
msg: "Invalid column2: \""
|
|
13255
|
-
hint: "expected: "
|
|
13259
|
+
source: prefix + "." + this.label(),
|
|
13260
|
+
msg: "Invalid column2: \"" + this.column2() + "\"",
|
|
13261
|
+
hint: "expected: " + JSON.stringify(this.columns())
|
|
13256
13262
|
});
|
|
13257
13263
|
}
|
|
13258
13264
|
if (!this.disableMapping()) {
|
|
13259
|
-
this.validComputedMappings().forEach(function (cm) { return cm.validate(
|
|
13265
|
+
this.validComputedMappings().forEach(function (cm) { return cm.validate(prefix + ".mapping"); });
|
|
13260
13266
|
}
|
|
13261
13267
|
if (!this.disableChildField()) {
|
|
13262
|
-
this.validChildFields().forEach(function (cf) { return cf.validate(
|
|
13268
|
+
this.validChildFields().forEach(function (cf) { return cf.validate(prefix + ".childField"); });
|
|
13263
13269
|
}
|
|
13264
13270
|
return retVal;
|
|
13265
13271
|
};
|
|
@@ -13397,7 +13403,7 @@ var ComputedField = /** @class */ (function (_super) {
|
|
|
13397
13403
|
.column1(child.id);
|
|
13398
13404
|
});
|
|
13399
13405
|
}
|
|
13400
|
-
return __assign
|
|
13406
|
+
return __assign(__assign({}, this._owner.field(this.column1())), { id: this.label(), children: validChildFields.length ? validChildFields.map(function (cf) { return cf.computedField(); }) : undefined });
|
|
13401
13407
|
case "*":
|
|
13402
13408
|
case "/":
|
|
13403
13409
|
case "+":
|
|
@@ -13420,7 +13426,7 @@ var ComputedField = /** @class */ (function (_super) {
|
|
|
13420
13426
|
};
|
|
13421
13427
|
});
|
|
13422
13428
|
return function (row) {
|
|
13423
|
-
var retVal = trim && hasComputedFields ? {} : __assign
|
|
13429
|
+
var retVal = trim && hasComputedFields ? {} : __assign({}, row);
|
|
13424
13430
|
for (var _i = 0, computedFields_1 = computedFields; _i < computedFields_1.length; _i++) {
|
|
13425
13431
|
var cf = computedFields_1[_i];
|
|
13426
13432
|
retVal[cf.label] = cf.func(row);
|
|
@@ -13589,7 +13595,7 @@ var MultiField = /** @class */ (function (_super) {
|
|
|
13589
13595
|
var retVal = [];
|
|
13590
13596
|
for (var _i = 0, _a = this.validMultiFields(); _i < _a.length; _i++) {
|
|
13591
13597
|
var cf = _a[_i];
|
|
13592
|
-
retVal = retVal.concat(cf.validate(
|
|
13598
|
+
retVal = retVal.concat(cf.validate(prefix + ".computedFields"));
|
|
13593
13599
|
}
|
|
13594
13600
|
return retVal;
|
|
13595
13601
|
};
|
|
@@ -13648,7 +13654,7 @@ var ProjectBase = /** @class */ (function (_super) {
|
|
|
13648
13654
|
var retVal = [];
|
|
13649
13655
|
for (var _i = 0, _a = this.validComputedFields(); _i < _a.length; _i++) {
|
|
13650
13656
|
var cf = _a[_i];
|
|
13651
|
-
retVal = retVal.concat(cf.validate(
|
|
13657
|
+
retVal = retVal.concat(cf.validate(this.classID() + ".computedFields"));
|
|
13652
13658
|
}
|
|
13653
13659
|
return retVal;
|
|
13654
13660
|
};
|
|
@@ -13796,7 +13802,7 @@ var ProjectBase = /** @class */ (function (_super) {
|
|
|
13796
13802
|
}
|
|
13797
13803
|
}
|
|
13798
13804
|
return function (row) {
|
|
13799
|
-
var retVal = trim && hasComputedFields ? {} : __assign
|
|
13805
|
+
var retVal = trim && hasComputedFields ? {} : __assign({}, row);
|
|
13800
13806
|
for (var _i = 0, computedFields_3 = computedFields; _i < computedFields_3.length; _i++) {
|
|
13801
13807
|
var cf = computedFields_3[_i];
|
|
13802
13808
|
retVal[cf.label] = cf.func(row);
|
|
@@ -13841,7 +13847,7 @@ var Project = /** @class */ (function (_super) {
|
|
|
13841
13847
|
};
|
|
13842
13848
|
Project.prototype.hash = function (more) {
|
|
13843
13849
|
if (more === void 0) { more = {}; }
|
|
13844
|
-
return _super.prototype.hash.call(this, __assign
|
|
13850
|
+
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL() }, more));
|
|
13845
13851
|
};
|
|
13846
13852
|
return Project;
|
|
13847
13853
|
}(ProjectBase));
|
|
@@ -13870,7 +13876,7 @@ var Mappings = /** @class */ (function (_super) {
|
|
|
13870
13876
|
};
|
|
13871
13877
|
Mappings.prototype.hash = function (more) {
|
|
13872
13878
|
if (more === void 0) { more = {}; }
|
|
13873
|
-
return _super.prototype.hash.call(this, __assign
|
|
13879
|
+
return _super.prototype.hash.call(this, __assign({ ddl: this.toDDL() }, more));
|
|
13874
13880
|
};
|
|
13875
13881
|
Mappings.prototype.referencedFields = function (refs) {
|
|
13876
13882
|
if (this.hasComputedFields()) {
|
|
@@ -13891,9 +13897,9 @@ var SortColumn = /** @class */ (function (_super) {
|
|
|
13891
13897
|
var retVal = [];
|
|
13892
13898
|
if (!this.fieldID_valid()) {
|
|
13893
13899
|
retVal.push({
|
|
13894
|
-
source:
|
|
13895
|
-
msg: "Invalid fieldID: "
|
|
13896
|
-
hint: "expected "
|
|
13900
|
+
source: prefix + ".fieldID",
|
|
13901
|
+
msg: "Invalid fieldID: " + this.fieldID(),
|
|
13902
|
+
hint: "expected " + JSON.stringify(this.fieldIDs())
|
|
13897
13903
|
});
|
|
13898
13904
|
}
|
|
13899
13905
|
return retVal;
|
|
@@ -14012,7 +14018,7 @@ var Sort = /** @class */ (function (_super) {
|
|
|
14012
14018
|
});
|
|
14013
14019
|
}
|
|
14014
14020
|
if (sortByArr.length) {
|
|
14015
|
-
return __spreadArray
|
|
14021
|
+
return __spreadArray([], data).sort(function (l, r) {
|
|
14016
14022
|
for (var _i = 0, sortByArr_1 = sortByArr; _i < sortByArr_1.length; _i++) {
|
|
14017
14023
|
var item = sortByArr_1[_i];
|
|
14018
14024
|
var retVal2 = item.compare(l[item.id], r[item.id]);
|
|
@@ -14235,7 +14241,7 @@ var VizChartPanel = /** @class */ (function (_super) {
|
|
|
14235
14241
|
});
|
|
14236
14242
|
});
|
|
14237
14243
|
_this._origButtons = _this.buttons();
|
|
14238
|
-
_this._filterButtons = __spreadArray
|
|
14244
|
+
_this._filterButtons = __spreadArray([_this._togglePopup, new Spacer()], _this._origButtons);
|
|
14239
14245
|
return _this;
|
|
14240
14246
|
}
|
|
14241
14247
|
VizChartPanel.prototype.popup = function (_) {
|
|
@@ -14457,7 +14463,7 @@ var Visualization = /** @class */ (function (_super) {
|
|
|
14457
14463
|
}
|
|
14458
14464
|
}
|
|
14459
14465
|
else {
|
|
14460
|
-
console.log("***"
|
|
14466
|
+
console.log("***" + this.id() + " Immutable Fields***");
|
|
14461
14467
|
}
|
|
14462
14468
|
var data = mappings.outData();
|
|
14463
14469
|
var dataChanged = this._prevData !== data;
|
|
@@ -14478,7 +14484,7 @@ var Visualization = /** @class */ (function (_super) {
|
|
|
14478
14484
|
}
|
|
14479
14485
|
}
|
|
14480
14486
|
else {
|
|
14481
|
-
console.log(
|
|
14487
|
+
console.log(this.id() + " Immutable Data!");
|
|
14482
14488
|
}
|
|
14483
14489
|
if (fieldsChanged || dataChanged) {
|
|
14484
14490
|
return this.chartPanel().renderPromise().then(function () { });
|
|
@@ -14570,7 +14576,7 @@ var Visualization = /** @class */ (function (_super) {
|
|
|
14570
14576
|
__metadata("design:type", Function)
|
|
14571
14577
|
], Visualization.prototype, "description", void 0);
|
|
14572
14578
|
__decorate([
|
|
14573
|
-
publish(v2
|
|
14579
|
+
publish(v2.VisibilitySet[0], "set", "Type", v2.VisibilitySet),
|
|
14574
14580
|
__metadata("design:type", String)
|
|
14575
14581
|
], Visualization.prototype, "_visibility", void 0);
|
|
14576
14582
|
__decorate([
|
|
@@ -14648,7 +14654,7 @@ var Element = /** @class */ (function (_super) {
|
|
|
14648
14654
|
_this._initialized = false;
|
|
14649
14655
|
while (true) {
|
|
14650
14656
|
vizID++;
|
|
14651
|
-
_this._id = "e_"
|
|
14657
|
+
_this._id = "e_" + vizID;
|
|
14652
14658
|
if (!_this._ec.elementExists(_this._id)) {
|
|
14653
14659
|
break;
|
|
14654
14660
|
}
|
|
@@ -14656,9 +14662,9 @@ var Element = /** @class */ (function (_super) {
|
|
|
14656
14662
|
var view = new HipiePipeline(_this._ec, _this._id);
|
|
14657
14663
|
_this.hipiePipeline(view);
|
|
14658
14664
|
_this._vizChartPanel = new Visualization(_this._ec, _this.hipiePipeline())
|
|
14659
|
-
.id("viz_"
|
|
14660
|
-
.title("Element "
|
|
14661
|
-
_this._vizChartPanel.chartPanel().id("cp_"
|
|
14665
|
+
.id("viz_" + vizID)
|
|
14666
|
+
.title("Element " + vizID);
|
|
14667
|
+
_this._vizChartPanel.chartPanel().id("cp_" + vizID);
|
|
14662
14668
|
_this.visualization(_this._vizChartPanel);
|
|
14663
14669
|
_this.state(new State());
|
|
14664
14670
|
return _this;
|
|
@@ -14739,11 +14745,11 @@ var Element = /** @class */ (function (_super) {
|
|
|
14739
14745
|
}
|
|
14740
14746
|
this._errors = [];
|
|
14741
14747
|
var pipeline = this.hipiePipeline();
|
|
14742
|
-
for (var _i = 0, _a = __spreadArray
|
|
14748
|
+
for (var _i = 0, _a = __spreadArray(__spreadArray([], pipeline.activities()), [this.mappings()]); _i < _a.length; _i++) {
|
|
14743
14749
|
var activity = _a[_i];
|
|
14744
14750
|
for (var _b = 0, _c = activity.validate(); _b < _c.length; _b++) {
|
|
14745
14751
|
var error = _c[_b];
|
|
14746
|
-
this._errors.push(__assign
|
|
14752
|
+
this._errors.push(__assign({ elementID: this.id() }, error));
|
|
14747
14753
|
}
|
|
14748
14754
|
}
|
|
14749
14755
|
return this._errors;
|
|
@@ -14757,7 +14763,7 @@ var Element = /** @class */ (function (_super) {
|
|
|
14757
14763
|
_this._initialized = true;
|
|
14758
14764
|
var data = _this.hipiePipeline().outData();
|
|
14759
14765
|
if (_this.visualization().chartType() === "FieldForm") {
|
|
14760
|
-
if (_this.state().set(__spreadArray
|
|
14766
|
+
if (_this.state().set(__spreadArray([], data))) {
|
|
14761
14767
|
_this.selectionChanged();
|
|
14762
14768
|
}
|
|
14763
14769
|
}
|
|
@@ -14843,7 +14849,7 @@ var ElementContainer = /** @class */ (function (_super) {
|
|
|
14843
14849
|
return this;
|
|
14844
14850
|
};
|
|
14845
14851
|
ElementContainer.prototype.elements = function () {
|
|
14846
|
-
return __spreadArray
|
|
14852
|
+
return __spreadArray([], this._elements);
|
|
14847
14853
|
};
|
|
14848
14854
|
ElementContainer.prototype.element = function (w) {
|
|
14849
14855
|
var retVal;
|
|
@@ -15053,7 +15059,7 @@ var DashboardDockPanel = /** @class */ (function (_super) {
|
|
|
15053
15059
|
var errors = element.validate();
|
|
15054
15060
|
wa.title.label = this.tabTitle(element);
|
|
15055
15061
|
this.titleClassed(wa, "error", errors.length > 0);
|
|
15056
|
-
wa.title.caption = errors.map(function (err) { return
|
|
15062
|
+
wa.title.caption = errors.map(function (err) { return err.source + ": " + err.msg; }).join("\n");
|
|
15057
15063
|
};
|
|
15058
15064
|
DashboardDockPanel.prototype.activate = function (element) {
|
|
15059
15065
|
var wa = this.getWidgetAdapter(element.visualization().chartPanel());
|
|
@@ -15065,8 +15071,8 @@ var DashboardDockPanel = /** @class */ (function (_super) {
|
|
|
15065
15071
|
if (w.minWidth_exists() || w.minHeight_exists()) {
|
|
15066
15072
|
var wa = this.getWidgetAdapter(w);
|
|
15067
15073
|
select(wa.node)
|
|
15068
|
-
.style("min-width",
|
|
15069
|
-
.style("min-height",
|
|
15074
|
+
.style("min-width", w.minWidth() + "px")
|
|
15075
|
+
.style("min-height", w.minHeight() + "px");
|
|
15070
15076
|
return true;
|
|
15071
15077
|
}
|
|
15072
15078
|
return false;
|
|
@@ -15118,7 +15124,7 @@ var DashboardDockPanel = /** @class */ (function (_super) {
|
|
|
15118
15124
|
// IClosable ---
|
|
15119
15125
|
DashboardDockPanel.prototype.canClose = function (w, wa) {
|
|
15120
15126
|
var id = this._ec.element(w).id();
|
|
15121
|
-
var retVal = window.confirm("Remove Widget \""
|
|
15127
|
+
var retVal = window.confirm("Remove Widget \"" + id + "\"?");
|
|
15122
15128
|
if (retVal) {
|
|
15123
15129
|
this._ec.clear(id);
|
|
15124
15130
|
this.syncWidgets();
|
|
@@ -15249,8 +15255,8 @@ var DashboardGrid = /** @class */ (function (_super) {
|
|
|
15249
15255
|
if (w.minWidth_exists() || w.minHeight_exists()) {
|
|
15250
15256
|
var cell = this.getWidgetCell(w.id());
|
|
15251
15257
|
cell.element()
|
|
15252
|
-
.style("min-width",
|
|
15253
|
-
.style("min-height",
|
|
15258
|
+
.style("min-width", w.minWidth() + "px")
|
|
15259
|
+
.style("min-height", w.minHeight() + "px");
|
|
15254
15260
|
return true;
|
|
15255
15261
|
}
|
|
15256
15262
|
return false;
|
|
@@ -15313,7 +15319,7 @@ var DashboardGrid = /** @class */ (function (_super) {
|
|
|
15313
15319
|
// IClosable ---
|
|
15314
15320
|
DashboardGrid.prototype.canClose = function (w, wa) {
|
|
15315
15321
|
var id = this._ec.element(w).id();
|
|
15316
|
-
var retVal = window.confirm("Remove Widget \""
|
|
15322
|
+
var retVal = window.confirm("Remove Widget \"" + id + "\"?");
|
|
15317
15323
|
if (retVal) {
|
|
15318
15324
|
this._ec.clear(id);
|
|
15319
15325
|
this.syncWidgets();
|
|
@@ -15327,7 +15333,7 @@ var DashboardGrid = /** @class */ (function (_super) {
|
|
|
15327
15333
|
DashboardGrid.prototype._class += " marshaller_DashboardGrid";
|
|
15328
15334
|
DashboardGrid.prototype.mixin(PopupManager);
|
|
15329
15335
|
|
|
15330
|
-
var logger
|
|
15336
|
+
var logger = scopedLogger("marshaller/ddl2/ddl");
|
|
15331
15337
|
var DDLDatasourceAdapter = /** @class */ (function () {
|
|
15332
15338
|
function DDLDatasourceAdapter() {
|
|
15333
15339
|
}
|
|
@@ -15336,13 +15342,13 @@ var DDLDatasourceAdapter = /** @class */ (function () {
|
|
|
15336
15342
|
};
|
|
15337
15343
|
DDLDatasourceAdapter.prototype.id = function (dsT) {
|
|
15338
15344
|
if (dsT instanceof WU) {
|
|
15339
|
-
return
|
|
15345
|
+
return dsT.url() + "/" + dsT.wuid();
|
|
15340
15346
|
}
|
|
15341
15347
|
else if (dsT instanceof RoxieService) {
|
|
15342
|
-
return
|
|
15348
|
+
return dsT.url() + "/" + dsT.querySet() + "/" + dsT.queryID();
|
|
15343
15349
|
}
|
|
15344
15350
|
else if (dsT instanceof RestService) {
|
|
15345
|
-
return
|
|
15351
|
+
return dsT.url() + "/" + dsT.action();
|
|
15346
15352
|
}
|
|
15347
15353
|
return dsT.id();
|
|
15348
15354
|
};
|
|
@@ -15500,12 +15506,12 @@ var DDLAdapter = /** @class */ (function () {
|
|
|
15500
15506
|
};
|
|
15501
15507
|
DDLAdapter.prototype.readDatasourceRef = function (ddlDSRef, dsPicker, elementContainer) {
|
|
15502
15508
|
var _this = this;
|
|
15503
|
-
if (v2
|
|
15509
|
+
if (v2.isWUResultRef(ddlDSRef)) {
|
|
15504
15510
|
var wu = this._dsReadDedup[ddlDSRef.id];
|
|
15505
15511
|
dsPicker.datasourceID(wu.output(ddlDSRef.output).id());
|
|
15506
15512
|
}
|
|
15507
|
-
else if (v2
|
|
15508
|
-
dsPicker.datasourceID(
|
|
15513
|
+
else if (v2.isRoxieServiceRef(ddlDSRef)) {
|
|
15514
|
+
dsPicker.datasourceID(ddlDSRef.id + "_" + ddlDSRef.output);
|
|
15509
15515
|
var dsRef = dsPicker.datasourceRef();
|
|
15510
15516
|
dsRef
|
|
15511
15517
|
.request(ddlDSRef.request.map(function (rf) {
|
|
@@ -15540,7 +15546,7 @@ var DDLAdapter = /** @class */ (function () {
|
|
|
15540
15546
|
}
|
|
15541
15547
|
else if (activity instanceof DSPicker) ;
|
|
15542
15548
|
else {
|
|
15543
|
-
logger
|
|
15549
|
+
logger.warning("Unknown activity type: " + activity.classID());
|
|
15544
15550
|
}
|
|
15545
15551
|
}).filter(function (activity) { return !!activity; });
|
|
15546
15552
|
};
|
|
@@ -15601,8 +15607,8 @@ var DDLAdapter = /** @class */ (function () {
|
|
|
15601
15607
|
};
|
|
15602
15608
|
DDLAdapter.prototype.writeProperties = function () {
|
|
15603
15609
|
return {
|
|
15604
|
-
name: PKG_NAME
|
|
15605
|
-
version: PKG_VERSION
|
|
15610
|
+
name: PKG_NAME,
|
|
15611
|
+
version: PKG_VERSION,
|
|
15606
15612
|
buildVersion: BUILD_VERSION,
|
|
15607
15613
|
layout: this._dashboard.layout()
|
|
15608
15614
|
};
|
|
@@ -15616,23 +15622,23 @@ var DDLAdapter = /** @class */ (function () {
|
|
|
15616
15622
|
this.readDatasourceRef(ddlView.datasource, hipiePipeline.datasource(), this._ec);
|
|
15617
15623
|
for (var _a = 0, _b = ddlView.activities; _a < _b.length; _a++) {
|
|
15618
15624
|
var activity = _b[_a];
|
|
15619
|
-
if (v2
|
|
15625
|
+
if (v2.isProjectActivity(activity)) {
|
|
15620
15626
|
var project = this.readProject(activity);
|
|
15621
15627
|
hipiePipeline.project(project);
|
|
15622
15628
|
}
|
|
15623
|
-
if (v2
|
|
15629
|
+
if (v2.isFilterActivity(activity)) {
|
|
15624
15630
|
var filters = this.readFilters(activity, this._ec);
|
|
15625
15631
|
hipiePipeline.filters(filters);
|
|
15626
15632
|
}
|
|
15627
|
-
if (v2
|
|
15633
|
+
if (v2.isGroupByActivity(activity)) {
|
|
15628
15634
|
var groupBy = this.readGroupBy(activity);
|
|
15629
15635
|
hipiePipeline.groupBy(groupBy);
|
|
15630
15636
|
}
|
|
15631
|
-
if (v2
|
|
15637
|
+
if (v2.isSortActivity(activity)) {
|
|
15632
15638
|
var sort = this.readSort(activity);
|
|
15633
15639
|
hipiePipeline.sort(sort);
|
|
15634
15640
|
}
|
|
15635
|
-
if (v2
|
|
15641
|
+
if (v2.isLimitActivity(activity)) {
|
|
15636
15642
|
var limit = this.readLimit(activity);
|
|
15637
15643
|
hipiePipeline.limit(limit);
|
|
15638
15644
|
}
|
|
@@ -15650,8 +15656,8 @@ var DDLAdapter = /** @class */ (function () {
|
|
|
15650
15656
|
var retVal = {
|
|
15651
15657
|
version: "2.2.1",
|
|
15652
15658
|
createdBy: {
|
|
15653
|
-
name: PKG_NAME
|
|
15654
|
-
version: PKG_VERSION
|
|
15659
|
+
name: PKG_NAME,
|
|
15660
|
+
version: PKG_VERSION
|
|
15655
15661
|
},
|
|
15656
15662
|
datasources: this.writeDatasources(),
|
|
15657
15663
|
dataviews: this.writeDDLViews(),
|
|
@@ -15697,7 +15703,7 @@ var DDLAdapter = /** @class */ (function () {
|
|
|
15697
15703
|
}
|
|
15698
15704
|
break;
|
|
15699
15705
|
default:
|
|
15700
|
-
logger
|
|
15706
|
+
logger.warning("Unknown ddl datasource type: " + ddlDS.type + " ");
|
|
15701
15707
|
}
|
|
15702
15708
|
}
|
|
15703
15709
|
this.readDDLViews(ddl.dataviews);
|
|
@@ -15725,7 +15731,7 @@ var Imports = /** @class */ (function () {
|
|
|
15725
15731
|
classIDs.push(classID);
|
|
15726
15732
|
}
|
|
15727
15733
|
classIDs.sort();
|
|
15728
|
-
importJS.push("import { "
|
|
15734
|
+
importJS.push("import { " + classIDs.join(", ") + " } from \"" + moduleID + "\";");
|
|
15729
15735
|
}
|
|
15730
15736
|
return importJS.join("\n");
|
|
15731
15737
|
};
|
|
@@ -15768,18 +15774,18 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15768
15774
|
switch (meta.type) {
|
|
15769
15775
|
case "string":
|
|
15770
15776
|
case "set":
|
|
15771
|
-
retVal.push(
|
|
15777
|
+
retVal.push(prefix + "." + meta.id + "(\"" + pe[meta.id]() + "\")" + postfix + ";");
|
|
15772
15778
|
break;
|
|
15773
15779
|
case "number":
|
|
15774
15780
|
case "boolean":
|
|
15775
|
-
retVal.push(
|
|
15781
|
+
retVal.push(prefix + "." + meta.id + "(" + pe[meta.id]() + ")" + postfix + ";");
|
|
15776
15782
|
break;
|
|
15777
15783
|
case "widget":
|
|
15778
|
-
retVal = retVal.concat(this.createProps(
|
|
15784
|
+
retVal = retVal.concat(this.createProps(prefix + "." + meta.id + "()", pe[meta.id]()));
|
|
15779
15785
|
break;
|
|
15780
15786
|
case "propertyArray":
|
|
15781
15787
|
if (meta.ext)
|
|
15782
|
-
retVal.push(
|
|
15788
|
+
retVal.push(prefix + "." + meta.id + "([" + pe[meta.id]() + "])" + postfix + ";");
|
|
15783
15789
|
break;
|
|
15784
15790
|
}
|
|
15785
15791
|
}
|
|
@@ -15796,13 +15802,13 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15796
15802
|
};
|
|
15797
15803
|
JavaScriptAdapter.prototype.datasourceRefID = function (view) {
|
|
15798
15804
|
var datasourceRef = view.datasource;
|
|
15799
|
-
if (v2
|
|
15800
|
-
return
|
|
15805
|
+
if (v2.isRoxieServiceRef(datasourceRef)) {
|
|
15806
|
+
return this.safeID(datasourceRef.id) + "_" + this.safeID(datasourceRef.output) + "_" + this.safeID(view.id);
|
|
15801
15807
|
}
|
|
15802
|
-
else if (v2
|
|
15803
|
-
return
|
|
15808
|
+
else if (v2.isWUResultRef(datasourceRef)) {
|
|
15809
|
+
return this.safeID(datasourceRef.id) + "_" + this.safeID(datasourceRef.output);
|
|
15804
15810
|
}
|
|
15805
|
-
return ""
|
|
15811
|
+
return "" + this.safeID(datasourceRef.id);
|
|
15806
15812
|
};
|
|
15807
15813
|
JavaScriptAdapter.prototype.writeDatasource = function (view) {
|
|
15808
15814
|
var datasourceRef = view.datasource;
|
|
@@ -15817,30 +15823,30 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15817
15823
|
var wuID = this.safeID(view.datasource.id);
|
|
15818
15824
|
if (!this._dedup[wuID]) {
|
|
15819
15825
|
this._dedup[wuID] = true;
|
|
15820
|
-
retVal.push(" export const "
|
|
15826
|
+
retVal.push(" export const " + wuID + " = new marshaller.WU()\n .url(\"" + datasource.url + "\")\n .wuid(\"" + datasource.wuid + "\")\n ;");
|
|
15821
15827
|
}
|
|
15822
|
-
retVal.push(" export const "
|
|
15828
|
+
retVal.push(" export const " + id + " = new marshaller.WUResult()\n .wu(" + wuID + ")\n .resultName(\"" + outputID + "\")\n .responseFields(" + stringify(datasource.outputs[outputID].fields) + ")\n ;");
|
|
15823
15829
|
break;
|
|
15824
15830
|
case "logicalfile":
|
|
15825
|
-
retVal.push(" export const "
|
|
15831
|
+
retVal.push(" export const " + id + " = new marshaller.LogicalFile()\n .url(\"" + datasource.url + "\")\n .logicalFile(\"" + datasource.logicalFile + "\")\n .responseFields(" + stringify(datasource.fields) + ")\n ;");
|
|
15826
15832
|
break;
|
|
15827
15833
|
case "hipie":
|
|
15828
15834
|
case "roxie":
|
|
15829
15835
|
var serviceID = this.safeID(view.datasource.id);
|
|
15830
15836
|
if (!this._dedup[serviceID]) {
|
|
15831
15837
|
this._dedup[serviceID] = true;
|
|
15832
|
-
retVal.push(" export const "
|
|
15838
|
+
retVal.push(" export const " + serviceID + " = new marshaller.RoxieService(ec)\n .url(\"" + datasource.url + "\")\n .querySet(\"" + datasource.querySet + "\")\n .queryID(\"" + datasource.queryID + "\")\n .requestFields(" + stringify(datasource.inputs) + ")\n ;");
|
|
15833
15839
|
}
|
|
15834
15840
|
var resultID = serviceID + "_" + this.safeID(outputID);
|
|
15835
15841
|
if (!this._dedup[resultID]) {
|
|
15836
15842
|
this._dedup[resultID] = true;
|
|
15837
|
-
retVal.push(" export const "
|
|
15843
|
+
retVal.push(" export const " + resultID + " = new marshaller.RoxieResult(ec)\n .service(" + serviceID + ")\n .resultName(\"" + outputID + "\")\n .responseFields(" + stringify(datasource.outputs[outputID].fields) + ")\n ;");
|
|
15838
15844
|
}
|
|
15839
|
-
retVal.push(" export const "
|
|
15845
|
+
retVal.push(" export const " + id + " = new marshaller.HipieResultRef(ec)\n .datasource(" + resultID + ")\n .requestFieldRefs(" + stringify(datasourceRef.request) + ")\n ;");
|
|
15840
15846
|
break;
|
|
15841
15847
|
case "databomb":
|
|
15842
15848
|
{
|
|
15843
|
-
retVal.push(" export const "
|
|
15849
|
+
retVal.push(" export const " + id + " = new marshaller.Databomb()\n .format(\"" + datasource.format + "\")\n .payload(" + JSON.stringify(datasource.payload) + ")\n ;");
|
|
15844
15850
|
}
|
|
15845
15851
|
break;
|
|
15846
15852
|
case "form":
|
|
@@ -15848,9 +15854,9 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15848
15854
|
var fromFields = [];
|
|
15849
15855
|
for (var _i = 0, _a = datasource.fields; _i < _a.length; _i++) {
|
|
15850
15856
|
var field = _a[_i];
|
|
15851
|
-
fromFields.push("new marshaller.FormField().fieldID(\""
|
|
15857
|
+
fromFields.push("new marshaller.FormField().fieldID(\"" + field.id + "\").default(\"" + (field.default || "") + "\")");
|
|
15852
15858
|
}
|
|
15853
|
-
retVal.push(" export const "
|
|
15859
|
+
retVal.push(" export const " + id + " = new marshaller.Form()\n .formFields([\n " + fromFields.join(",\n ") + "\n ])\n ;");
|
|
15854
15860
|
}
|
|
15855
15861
|
break;
|
|
15856
15862
|
}
|
|
@@ -15860,17 +15866,17 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15860
15866
|
JavaScriptAdapter.prototype.writeActivity = function (activity) {
|
|
15861
15867
|
switch (activity.type) {
|
|
15862
15868
|
case "filter":
|
|
15863
|
-
return "new marshaller.Filters(ec).conditions("
|
|
15869
|
+
return "new marshaller.Filters(ec).conditions(" + stringify(activity.conditions) + ")";
|
|
15864
15870
|
case "project":
|
|
15865
|
-
return "new marshaller.Project().transformations("
|
|
15871
|
+
return "new marshaller.Project().transformations(" + stringify(activity.transformations) + ")";
|
|
15866
15872
|
case "groupby":
|
|
15867
|
-
return "new marshaller.GroupBy().fieldIDs("
|
|
15873
|
+
return "new marshaller.GroupBy().fieldIDs(" + JSON.stringify(activity.groupByIDs) + ").aggregates(" + stringify(activity.aggregates) + ")";
|
|
15868
15874
|
case "sort":
|
|
15869
|
-
return "new marshaller.Sort().conditions("
|
|
15875
|
+
return "new marshaller.Sort().conditions(" + stringify(activity.conditions) + ")";
|
|
15870
15876
|
case "limit":
|
|
15871
|
-
return "new marshaller.Limit().rows("
|
|
15877
|
+
return "new marshaller.Limit().rows(" + activity.limit + ")";
|
|
15872
15878
|
case "mappings":
|
|
15873
|
-
return "new marshaller.Mappings().transformations("
|
|
15879
|
+
return "new marshaller.Mappings().transformations(" + stringify(activity.transformations) + ")";
|
|
15874
15880
|
}
|
|
15875
15881
|
};
|
|
15876
15882
|
JavaScriptAdapter.prototype.writeWidgetProps = function (pe) {
|
|
@@ -15878,7 +15884,7 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15878
15884
|
for (var _i = 0, _a = pe.publishedProperties(); _i < _a.length; _i++) {
|
|
15879
15885
|
var meta = _a[_i];
|
|
15880
15886
|
if (pe[meta.id + "_modified"]() && meta.id !== "fields") {
|
|
15881
|
-
retVal.push("."
|
|
15887
|
+
retVal.push("." + meta.id + "(" + JSON.stringify(pe[meta.id]()) + ")");
|
|
15882
15888
|
}
|
|
15883
15889
|
}
|
|
15884
15890
|
return retVal;
|
|
@@ -15890,27 +15896,27 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15890
15896
|
if (props.__class) {
|
|
15891
15897
|
meta = classID2Meta(props.__class);
|
|
15892
15898
|
imports.append(meta);
|
|
15893
|
-
retVal += "new "
|
|
15899
|
+
retVal += "new " + meta.class + "()";
|
|
15894
15900
|
}
|
|
15895
15901
|
for (var prop in props) {
|
|
15896
15902
|
if (prop === "__class") ;
|
|
15897
15903
|
else if (isArray$1(props[prop])) {
|
|
15898
|
-
var arr = ""
|
|
15904
|
+
var arr = "" + props[prop].map(function (item) { return _this.joinWithPrefix(item, imports, joinStr + " ", ""); }).join("," + joinStr + " ");
|
|
15899
15905
|
if (arr) {
|
|
15900
|
-
retVal +=
|
|
15906
|
+
retVal += joinStr + " ." + prop + "([" + joinStr + " " + arr + joinStr + " ])" + postFix;
|
|
15901
15907
|
}
|
|
15902
15908
|
}
|
|
15903
15909
|
else {
|
|
15904
|
-
retVal +=
|
|
15910
|
+
retVal += joinStr + " ." + prop + "(" + JSON.stringify(props[prop]) + ")" + postFix;
|
|
15905
15911
|
}
|
|
15906
15912
|
}
|
|
15907
15913
|
return retVal;
|
|
15908
15914
|
};
|
|
15909
15915
|
JavaScriptAdapter.prototype.writeWidget = function (dataview, imports) {
|
|
15910
|
-
return " export const "
|
|
15916
|
+
return " export const " + dataview.visualization.id + " = new marshaller.VizChartPanel()\n .id(\"" + dataview.visualization.id + "\")\n .title(\"" + dataview.visualization.title + "\")\n .widget(" + this.joinWithPrefix(dataview.visualization.properties["widget"], imports, "\n ", "") + ")\n ;";
|
|
15911
15917
|
};
|
|
15912
15918
|
JavaScriptAdapter.prototype.writeElement = function (dataview) {
|
|
15913
|
-
var activities = ["data."
|
|
15919
|
+
var activities = ["data." + this.datasourceRefID(dataview)];
|
|
15914
15920
|
for (var _i = 0, _a = dataview.activities; _i < _a.length; _i++) {
|
|
15915
15921
|
var activity = _a[_i];
|
|
15916
15922
|
activities.push(this.writeActivity(activity));
|
|
@@ -15918,9 +15924,9 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15918
15924
|
var updates = [];
|
|
15919
15925
|
for (var _b = 0, _c = this._ec.filteredBy(dataview.id); _b < _c.length; _b++) {
|
|
15920
15926
|
var filteredViz = _c[_b];
|
|
15921
|
-
updates.push(
|
|
15927
|
+
updates.push(filteredViz.id() + ".refresh();");
|
|
15922
15928
|
}
|
|
15923
|
-
return "\nconst "
|
|
15929
|
+
return "\nconst " + dataview.id + " = new marshaller.Element(ec)\n .id(\"" + dataview.id + "\")\n .pipeline([\n " + activities.join(",\n ") + "\n ])\n .mappings(new marshaller.Mappings().transformations(" + stringify(dataview.visualization.mappings.transformations) + "))\n .chartPanel(viz." + dataview.visualization.id + ")\n .on(\"selectionChanged\", () => {\n " + updates.join("\n ") + "\n }, true)\n ;\n" + dataview.id + ".visualization()\n .visibility(\"" + dataview.visualization.visibility + "\")\n .secondaryDataviewID(\"" + (dataview.visualization.secondaryDataviewID || "") + "\")\n ;\nec.append(" + dataview.id + ");\n";
|
|
15924
15930
|
};
|
|
15925
15931
|
JavaScriptAdapter.prototype.writeDatasources = function () {
|
|
15926
15932
|
var retVal = [];
|
|
@@ -15952,7 +15958,7 @@ var JavaScriptAdapter = /** @class */ (function () {
|
|
|
15952
15958
|
};
|
|
15953
15959
|
JavaScriptAdapter.prototype.createJavaScript = function () {
|
|
15954
15960
|
var widgets = this.writeWidgets();
|
|
15955
|
-
return
|
|
15961
|
+
return widgets.widgetImports + "\nimport * as marshaller from \"@hpcc-js/marshaller\";\n\n// Dashboard Element Container (Model) ---\nconst ec = new marshaller.ElementContainer();\n\nnamespace data {\n" + this.writeDatasources().join("\n") + "\n}\n\nnamespace viz {\n" + widgets.widgetDefs + "\n}\n\n// Dashboard Elements (Controller) ---\n" + 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(" + stringify(this._dashboard.layout()) + ")\n .render()\n ;\n\n// @ts-ignore\nconst ddl = " + JSON.stringify(this._ddlSchema) + ";\n";
|
|
15956
15962
|
};
|
|
15957
15963
|
return JavaScriptAdapter;
|
|
15958
15964
|
}());
|
|
@@ -15984,8 +15990,8 @@ function styleInject(css, ref) {
|
|
|
15984
15990
|
}
|
|
15985
15991
|
}
|
|
15986
15992
|
|
|
15987
|
-
var css_248z
|
|
15988
|
-
styleInject(css_248z
|
|
15993
|
+
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)}";
|
|
15994
|
+
styleInject(css_248z);
|
|
15989
15995
|
|
|
15990
15996
|
var Dashboard = /** @class */ (function (_super) {
|
|
15991
15997
|
__extends(Dashboard, _super);
|
|
@@ -16015,7 +16021,7 @@ var Dashboard = /** @class */ (function (_super) {
|
|
|
16015
16021
|
.enabled(false)
|
|
16016
16022
|
.on("click", function () {
|
|
16017
16023
|
var elem = _this._prevActive;
|
|
16018
|
-
if (elem && window.confirm("Remove Widget \""
|
|
16024
|
+
if (elem && window.confirm("Remove Widget \"" + elem.id() + "\"?")) {
|
|
16019
16025
|
_this._ec.clear(elem.id());
|
|
16020
16026
|
_this.renderPromise().then(function () {
|
|
16021
16027
|
_this.vizActivation(undefined);
|
|
@@ -16211,7 +16217,7 @@ var Dashboard = /** @class */ (function (_super) {
|
|
|
16211
16217
|
};
|
|
16212
16218
|
Dashboard.prototype.importDDL = function (ddl, baseUrl, wuid, dermatologyJson) {
|
|
16213
16219
|
if (dermatologyJson === void 0) { dermatologyJson = {}; }
|
|
16214
|
-
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade(ddl, baseUrl, wuid, true, dermatologyJson);
|
|
16220
|
+
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade$1(ddl, baseUrl, wuid, true, dermatologyJson);
|
|
16215
16221
|
return this.restore(ddl2, true);
|
|
16216
16222
|
};
|
|
16217
16223
|
Dashboard.prototype.javascript = function () {
|
|
@@ -16260,8 +16266,8 @@ var Dashboard = /** @class */ (function (_super) {
|
|
|
16260
16266
|
}(ChartPanel));
|
|
16261
16267
|
Dashboard.prototype._class += " dashboard_dashboard";
|
|
16262
16268
|
|
|
16263
|
-
var css_248z$
|
|
16264
|
-
styleInject(css_248z$
|
|
16269
|
+
var css_248z$1 = "";
|
|
16270
|
+
styleInject(css_248z$1);
|
|
16265
16271
|
|
|
16266
16272
|
var DDLEditor = /** @class */ (function (_super) {
|
|
16267
16273
|
__extends(DDLEditor, _super);
|
|
@@ -16347,7 +16353,7 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16347
16353
|
this.subgraphMap[id] = retVal;
|
|
16348
16354
|
}
|
|
16349
16355
|
this.vertices.push(retVal);
|
|
16350
|
-
retVal.title(""
|
|
16356
|
+
retVal.title("" + label);
|
|
16351
16357
|
retVal.getBBox(true);
|
|
16352
16358
|
return retVal;
|
|
16353
16359
|
};
|
|
@@ -16365,13 +16371,13 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16365
16371
|
this.vertices.push(retVal);
|
|
16366
16372
|
retVal
|
|
16367
16373
|
.textbox_shape_colorFill(fillColor)
|
|
16368
|
-
.text(tooltip ?
|
|
16374
|
+
.text(tooltip ? label + "\n" + tooltip : "" + label)
|
|
16369
16375
|
.tooltip(tooltip);
|
|
16370
16376
|
retVal.getBBox(true);
|
|
16371
16377
|
return retVal;
|
|
16372
16378
|
};
|
|
16373
16379
|
GraphAdapter.prototype.createEdge = function (sourceID, targetID) {
|
|
16374
|
-
var edgeID =
|
|
16380
|
+
var edgeID = sourceID + "->" + targetID;
|
|
16375
16381
|
var retVal = this.edgeMap[edgeID];
|
|
16376
16382
|
if (!retVal) {
|
|
16377
16383
|
retVal = new Edge()
|
|
@@ -16387,27 +16393,27 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16387
16393
|
dsDetails = dsDetails.selection().datasource();
|
|
16388
16394
|
}
|
|
16389
16395
|
if (dsDetails instanceof WUResult) {
|
|
16390
|
-
var serverID = ""
|
|
16391
|
-
var server = this.createSubgraph(serverID, ""
|
|
16392
|
-
var wuID =
|
|
16393
|
-
var wu = this.createSubgraph(wuID, ""
|
|
16396
|
+
var serverID = "" + dsDetails.url();
|
|
16397
|
+
var server = this.createSubgraph(serverID, "" + serverID);
|
|
16398
|
+
var wuID = dsDetails.url() + "/" + dsDetails.wuid();
|
|
16399
|
+
var wu = this.createSubgraph(wuID, "" + dsDetails.wuid());
|
|
16394
16400
|
this.hierarchy.push({ parent: server, child: wu });
|
|
16395
|
-
var resultID =
|
|
16401
|
+
var resultID = wuID + "/" + dsDetails.resultName();
|
|
16396
16402
|
var result = this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails });
|
|
16397
16403
|
this.hierarchy.push({ parent: wu, child: result });
|
|
16398
16404
|
return resultID;
|
|
16399
16405
|
}
|
|
16400
16406
|
else if (dsDetails instanceof LogicalFile) {
|
|
16401
|
-
var serverID = ""
|
|
16402
|
-
var server = this.createSubgraph(serverID, ""
|
|
16403
|
-
var lfID =
|
|
16407
|
+
var serverID = "" + dsDetails.url();
|
|
16408
|
+
var server = this.createSubgraph(serverID, "" + serverID);
|
|
16409
|
+
var lfID = serverID + "/" + dsDetails.logicalFile();
|
|
16404
16410
|
var lf = this.createVertex(lfID, dsDetails.logicalFile(), { activity: dsDetails });
|
|
16405
16411
|
this.hierarchy.push({ parent: server, child: lf });
|
|
16406
16412
|
return lfID;
|
|
16407
16413
|
}
|
|
16408
16414
|
else if (dsDetails instanceof RoxieResultRef) {
|
|
16409
|
-
var serverID = ""
|
|
16410
|
-
var server = this.createSubgraph(serverID, ""
|
|
16415
|
+
var serverID = "" + dsDetails.url();
|
|
16416
|
+
var server = this.createSubgraph(serverID, "" + serverID);
|
|
16411
16417
|
var surfaceID = dsDetails.serviceID(); // `${dsDetails.url()}/${dsDetails.querySet()}`;
|
|
16412
16418
|
var surface = this.createSubgraph(surfaceID, dsDetails.querySet());
|
|
16413
16419
|
this.hierarchy.push({ parent: server, child: surface });
|
|
@@ -16416,7 +16422,7 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16416
16422
|
parent: surface,
|
|
16417
16423
|
child: this.createVertex(roxieID, dsDetails.queryID())
|
|
16418
16424
|
});
|
|
16419
|
-
var roxieResultID =
|
|
16425
|
+
var roxieResultID = surfaceID + "/" + dsDetails.resultName();
|
|
16420
16426
|
this.hierarchy.push({
|
|
16421
16427
|
parent: surface,
|
|
16422
16428
|
child: this.createVertex(roxieResultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16425,15 +16431,15 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16425
16431
|
return roxieResultID;
|
|
16426
16432
|
}
|
|
16427
16433
|
else if (dsDetails instanceof RoxieResult) {
|
|
16428
|
-
var serverID = ""
|
|
16429
|
-
var server = this.createSubgraph(serverID, ""
|
|
16434
|
+
var serverID = "" + dsDetails.service().url();
|
|
16435
|
+
var server = this.createSubgraph(serverID, "" + serverID);
|
|
16430
16436
|
var querySetID = dsDetails.serviceID();
|
|
16431
16437
|
var querySet = this.createSubgraph(querySetID, dsDetails.service().querySet());
|
|
16432
16438
|
this.hierarchy.push({ parent: server, child: querySet });
|
|
16433
|
-
var queryID =
|
|
16439
|
+
var queryID = querySetID + "/" + dsDetails.service().queryID();
|
|
16434
16440
|
var query = this.createSubgraph(queryID, dsDetails.service().queryID());
|
|
16435
16441
|
this.hierarchy.push({ parent: querySet, child: query });
|
|
16436
|
-
var resultID =
|
|
16442
|
+
var resultID = queryID + "/" + dsDetails.resultName();
|
|
16437
16443
|
this.hierarchy.push({
|
|
16438
16444
|
parent: query,
|
|
16439
16445
|
child: this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16442,8 +16448,8 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16442
16448
|
return resultID;
|
|
16443
16449
|
}
|
|
16444
16450
|
else if (dsDetails instanceof RestResultRef) {
|
|
16445
|
-
var serverID = ""
|
|
16446
|
-
var server = this.createSubgraph(serverID, ""
|
|
16451
|
+
var serverID = "" + dsDetails.url();
|
|
16452
|
+
var server = this.createSubgraph(serverID, "" + serverID);
|
|
16447
16453
|
var surfaceID = dsDetails.serviceID();
|
|
16448
16454
|
var surface = this.createSubgraph(surfaceID, dsDetails.action());
|
|
16449
16455
|
this.hierarchy.push({ parent: server, child: surface });
|
|
@@ -16452,7 +16458,7 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16452
16458
|
parent: surface,
|
|
16453
16459
|
child: this.createVertex(roxieID, dsDetails.action())
|
|
16454
16460
|
});
|
|
16455
|
-
var roxieResultID =
|
|
16461
|
+
var roxieResultID = surfaceID + "/" + dsDetails.resultName();
|
|
16456
16462
|
this.hierarchy.push({
|
|
16457
16463
|
parent: surface,
|
|
16458
16464
|
child: this.createVertex(roxieResultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16461,13 +16467,13 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16461
16467
|
return roxieResultID;
|
|
16462
16468
|
}
|
|
16463
16469
|
else if (dsDetails instanceof RestResult) {
|
|
16464
|
-
var serverID = ""
|
|
16465
|
-
var server = this.createSubgraph(serverID, ""
|
|
16470
|
+
var serverID = "" + dsDetails.service().url();
|
|
16471
|
+
var server = this.createSubgraph(serverID, "" + serverID);
|
|
16466
16472
|
var serviceID = dsDetails.serviceID();
|
|
16467
|
-
var actionID =
|
|
16473
|
+
var actionID = serverID + "/" + dsDetails.service().action();
|
|
16468
16474
|
var action = this.createSubgraph(serviceID, dsDetails.service().action());
|
|
16469
16475
|
this.hierarchy.push({ parent: server, child: action });
|
|
16470
|
-
var resultID =
|
|
16476
|
+
var resultID = actionID + "/" + dsDetails.resultName();
|
|
16471
16477
|
this.hierarchy.push({
|
|
16472
16478
|
parent: action,
|
|
16473
16479
|
child: this.createVertex(resultID, dsDetails.resultName(), { activity: dsDetails })
|
|
@@ -16492,20 +16498,20 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16492
16498
|
}
|
|
16493
16499
|
};
|
|
16494
16500
|
GraphAdapter.prototype.createActivity = function (sourceID, view, activity, label) {
|
|
16495
|
-
var surface = this.createSubgraph(view.id(), ""
|
|
16501
|
+
var surface = this.createSubgraph(view.id(), "" + view.id(), { view: view });
|
|
16496
16502
|
var fillColor = null;
|
|
16497
16503
|
var tooltip = "";
|
|
16498
16504
|
if (activity.exists()) {
|
|
16499
16505
|
var errors = activity.validate();
|
|
16500
16506
|
if (errors.length) {
|
|
16501
16507
|
fillColor = "pink";
|
|
16502
|
-
tooltip = errors.map(function (error) { return
|
|
16508
|
+
tooltip = errors.map(function (error) { return error.source + ": " + error.msg; }).join("\n");
|
|
16503
16509
|
}
|
|
16504
16510
|
}
|
|
16505
16511
|
else {
|
|
16506
16512
|
fillColor = "lightgrey";
|
|
16507
16513
|
}
|
|
16508
|
-
var vertex = this.createVertex(activity.id(), label || ""
|
|
16514
|
+
var vertex = this.createVertex(activity.id(), label || "" + activity.classID(), { view: view, activity: activity }, tooltip, fillColor);
|
|
16509
16515
|
if (sourceID) {
|
|
16510
16516
|
this.createEdge(sourceID, activity.id());
|
|
16511
16517
|
}
|
|
@@ -16532,7 +16538,7 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16532
16538
|
var visualization = view.visualization();
|
|
16533
16539
|
var mappings = visualization.mappings();
|
|
16534
16540
|
var mappingVertexID = this.createActivity(prevID, view, mappings, "Mappings");
|
|
16535
|
-
var vizSubgraphID =
|
|
16541
|
+
var vizSubgraphID = visualization.id() + "-sg";
|
|
16536
16542
|
var surface = this.createSubgraph(vizSubgraphID, "Visualization", { visualization: visualization });
|
|
16537
16543
|
this.hierarchy.push({
|
|
16538
16544
|
parent: this.subgraphMap[view.id()],
|
|
@@ -16542,14 +16548,14 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16542
16548
|
parent: surface,
|
|
16543
16549
|
child: this.vertexMap[mappings.id()]
|
|
16544
16550
|
});
|
|
16545
|
-
var vizVertexID =
|
|
16551
|
+
var vizVertexID = visualization.id() + "-viz";
|
|
16546
16552
|
var widgetVertex = this.createVertex(vizVertexID, visualization.chartPanel().widget().classID(), { view: view, chartPanel: visualization.chartPanel() });
|
|
16547
16553
|
this.createEdge(mappingVertexID, vizVertexID);
|
|
16548
16554
|
this.hierarchy.push({
|
|
16549
16555
|
parent: surface,
|
|
16550
16556
|
child: widgetVertex
|
|
16551
16557
|
});
|
|
16552
|
-
var stateVertexID =
|
|
16558
|
+
var stateVertexID = visualization.id() + "-state";
|
|
16553
16559
|
var stateVertex = this.createVertex(stateVertexID, "Selection", { view: view, state: view.state() });
|
|
16554
16560
|
this.createEdge(vizVertexID, stateVertexID)
|
|
16555
16561
|
.weight(10)
|
|
@@ -16570,7 +16576,7 @@ var GraphAdapter = /** @class */ (function () {
|
|
|
16570
16576
|
var secondaryElement = this._ec.element(visualization.secondaryDataviewID());
|
|
16571
16577
|
if (secondaryElement) {
|
|
16572
16578
|
var mappings = secondaryElement.visualization().mappings();
|
|
16573
|
-
this.createEdge(mappings.id(),
|
|
16579
|
+
this.createEdge(mappings.id(), visualization.id() + "-viz");
|
|
16574
16580
|
}
|
|
16575
16581
|
}
|
|
16576
16582
|
for (var _f = 0, _g = this._ec.elements(); _f < _g.length; _f++) {
|
|
@@ -16821,8 +16827,8 @@ var DVTable = /** @class */ (function (_super) {
|
|
|
16821
16827
|
return DVTable;
|
|
16822
16828
|
}(ChartPanel));
|
|
16823
16829
|
|
|
16824
|
-
var css_248z$
|
|
16825
|
-
styleInject(css_248z$
|
|
16830
|
+
var css_248z$2 = ".common_SelectionButton.error{background:red;background:linear-gradient(180deg,rgba(255,0,0,.5),hsla(0,0%,100%,0) 80%)}";
|
|
16831
|
+
styleInject(css_248z$2);
|
|
16826
16832
|
|
|
16827
16833
|
var PipelineSelectionButton = /** @class */ (function (_super) {
|
|
16828
16834
|
__extends(PipelineSelectionButton, _super);
|
|
@@ -16848,7 +16854,7 @@ var PipelineSelectionButton = /** @class */ (function (_super) {
|
|
|
16848
16854
|
this.tooltip(_.map(function (err) {
|
|
16849
16855
|
var errSourceParts = err.source.split(".");
|
|
16850
16856
|
errSourceParts.splice(0, 1);
|
|
16851
|
-
return
|
|
16857
|
+
return errSourceParts.join(".") + ": " + err.msg;
|
|
16852
16858
|
}).join("\n"));
|
|
16853
16859
|
}
|
|
16854
16860
|
else {
|
|
@@ -17127,7 +17133,7 @@ var PipelinePanel = /** @class */ (function (_super) {
|
|
|
17127
17133
|
return PipelinePanel;
|
|
17128
17134
|
}(ChartPanel));
|
|
17129
17135
|
PipelinePanel.prototype._class += " marshaller_PipelinePanel";
|
|
17130
|
-
var DDLPreview
|
|
17136
|
+
var DDLPreview = /** @class */ (function (_super) {
|
|
17131
17137
|
__extends(DDLPreview, _super);
|
|
17132
17138
|
function DDLPreview() {
|
|
17133
17139
|
var _this = _super.call(this) || this;
|
|
@@ -17194,7 +17200,7 @@ var PipelineSplitPanel = /** @class */ (function (_super) {
|
|
|
17194
17200
|
_this.propChanged(id, newValue, oldValue, source);
|
|
17195
17201
|
});
|
|
17196
17202
|
_this._previewPanel = new TabPanel();
|
|
17197
|
-
_this._rhsDDLPreview = new DDLPreview
|
|
17203
|
+
_this._rhsDDLPreview = new DDLPreview();
|
|
17198
17204
|
_this._rhsDataPreview = new DatasourceTable().pagination(true);
|
|
17199
17205
|
_this._previewPanel
|
|
17200
17206
|
.addWidget(_this._rhsDataPreview, "Data")
|
|
@@ -17245,11 +17251,11 @@ var PipelineSplitPanel = /** @class */ (function (_super) {
|
|
|
17245
17251
|
return PipelineSplitPanel;
|
|
17246
17252
|
}(SplitPanel));
|
|
17247
17253
|
|
|
17248
|
-
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;
|
|
17249
|
-
styleInject(css_248z);
|
|
17254
|
+
var css_248z$3 = ".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{padding-left:5px;background:#fafafa;color:rgba(0,0,0,.87);border-bottom:1px solid #ddd;font:13px Helvetica,Arial,sans-serif}.p-MenuBar-menu{transform:translateY(-1px)}.p-MenuBar-item{padding:4px 8px;border-left:1px solid transparent;border-right:1px solid transparent}.p-MenuBar-item.p-mod-active{background:#e5e5e5}.p-MenuBar.p-mod-active .p-MenuBar-item.p-mod-active{z-index:10001;background:#fff;border-left:1px solid silver;border-right:1px solid silver;box-shadow:0 0 6px rgba(0,0,0,.2)}.p-Menu{padding:3px 0;background:#fff;color:rgba(0,0,0,.87);border:1px solid silver;font:12px Helvetica,Arial,sans-serif;box-shadow:0 1px 6px rgba(0,0,0,.2)}.p-Menu-item.p-mod-active{background:#e5e5e5}.p-Menu-item.p-mod-disabled{color:rgba(0,0,0,.25)}.p-Menu-itemIcon{width:21px;padding:4px 2px}.p-Menu-itemLabel{padding:4px 35px 4px 2px}.p-Menu-itemMnemonic{text-decoration:underline}.p-Menu-itemShortcut{padding:4px 0}.p-Menu-itemSubmenuIcon{width:16px;padding:4px 0}.p-Menu-item[data-type=separator]>div{padding:0;height:9px}.p-Menu-item[data-type=separator]>div:after{content:\"\";display:block;position:relative;top:4px;border-top:1px solid #ddd}.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{font-family:sans-serif;background:#f5f5f5}.p-CommandPalette-search{padding:8px}.p-CommandPalette-wrapper{padding:4px 6px;background:#fff;border:1px solid #e0e0e0}.p-CommandPalette-input{width:100%;border:none;outline:none;font-size:16px}.p-CommandPalette-header{padding:4px;color:#757575;font-size:12px;font-weight:600;background:#e1e1e1;cursor:pointer}.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{padding:4px 8px;color:#757575;font-size:13px;font-weight:500}.p-CommandPalette-emptyMessage{padding:4px;color:#757575;font-size:12px;font-weight:600;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}";
|
|
17255
|
+
styleInject(css_248z$3);
|
|
17250
17256
|
|
|
17251
|
-
var logger = scopedLogger("marshaller/dashy");
|
|
17252
|
-
var DDLPreview = /** @class */ (function (_super) {
|
|
17257
|
+
var logger$1 = scopedLogger("marshaller/dashy");
|
|
17258
|
+
var DDLPreview$1 = /** @class */ (function (_super) {
|
|
17253
17259
|
__extends(DDLPreview, _super);
|
|
17254
17260
|
function DDLPreview(_dashy) {
|
|
17255
17261
|
var _this = _super.call(this) || this;
|
|
@@ -17334,7 +17340,7 @@ var Dashy = /** @class */ (function (_super) {
|
|
|
17334
17340
|
.on("vertex_contextmenu", function (row, col, sel, ext) {
|
|
17335
17341
|
});
|
|
17336
17342
|
_this._lhsDebugSheet = new TabPanel();
|
|
17337
|
-
_this._lhsDebugDDLEditor = new DDLPreview(_this);
|
|
17343
|
+
_this._lhsDebugDDLEditor = new DDLPreview$1(_this);
|
|
17338
17344
|
_this._lhsDebugDDLSchema = new JSONEditor().json(ddl2Schema);
|
|
17339
17345
|
_this._lhsDebugJSEditor = new JSEditor();
|
|
17340
17346
|
_this._lhsDebugCloneEC = new ElementContainer();
|
|
@@ -17398,7 +17404,7 @@ var Dashy = /** @class */ (function (_super) {
|
|
|
17398
17404
|
for (var _i = 0, _a = _this._elementContainer.validate(); _i < _a.length; _i++) {
|
|
17399
17405
|
var error = _a[_i];
|
|
17400
17406
|
hasError = true;
|
|
17401
|
-
logger.warning(error.elementID + " (" + error.source + "): " + error.msg);
|
|
17407
|
+
logger$1.warning(error.elementID + " (" + error.source + "): " + error.msg);
|
|
17402
17408
|
}
|
|
17403
17409
|
if (hasError) {
|
|
17404
17410
|
// Re-render to highlight errrors ---
|
|
@@ -17409,7 +17415,7 @@ var Dashy = /** @class */ (function (_super) {
|
|
|
17409
17415
|
};
|
|
17410
17416
|
Dashy.prototype.importDDL = function (ddl, baseUrl, wuid, dermatologyJson) {
|
|
17411
17417
|
if (dermatologyJson === void 0) { dermatologyJson = {}; }
|
|
17412
|
-
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade(ddl, baseUrl, wuid, true, dermatologyJson);
|
|
17418
|
+
var ddl2 = isDDL2Schema(ddl) ? ddl : upgrade$1(ddl, baseUrl, wuid, true, dermatologyJson);
|
|
17413
17419
|
var retVal = this.restore(ddl2);
|
|
17414
17420
|
if (isDDL2Schema(ddl)) {
|
|
17415
17421
|
this._lhsDebugDDLv2.json(ddl2);
|
|
@@ -17472,7 +17478,7 @@ var Dashy = /** @class */ (function (_super) {
|
|
|
17472
17478
|
};
|
|
17473
17479
|
Dashy.prototype.loadGraph = function () {
|
|
17474
17480
|
this._lhsPipeline
|
|
17475
|
-
.data(__assign
|
|
17481
|
+
.data(__assign({}, this._graphAdapter.createGraph()), true);
|
|
17476
17482
|
if (this.activeLHS() === this._lhsPipeline) {
|
|
17477
17483
|
this._lhsPipeline
|
|
17478
17484
|
.lazyRender();
|
|
@@ -17505,7 +17511,7 @@ var Dashy = /** @class */ (function (_super) {
|
|
|
17505
17511
|
}).then(function () {
|
|
17506
17512
|
for (var _i = 0, _a = _this._lhsDebugCloneEC.validate(); _i < _a.length; _i++) {
|
|
17507
17513
|
var error = _a[_i];
|
|
17508
|
-
logger.warning(error.elementID + " (" + error.source + "): " + error.msg);
|
|
17514
|
+
logger$1.warning(error.elementID + " (" + error.source + "): " + error.msg);
|
|
17509
17515
|
}
|
|
17510
17516
|
});
|
|
17511
17517
|
});
|
|
@@ -17553,11 +17559,11 @@ var Dashy = /** @class */ (function (_super) {
|
|
|
17553
17559
|
palette.addItem({ command: "remove", category: "Notebook" });
|
|
17554
17560
|
palette.id = "palette";
|
|
17555
17561
|
var contextMenu = new ContextMenu({ commands: commands });
|
|
17556
|
-
contextMenu.addItem({ command: "dash_add", selector: "#"
|
|
17557
|
-
contextMenu.addItem({ command: "dash_clear", selector: "#"
|
|
17558
|
-
contextMenu.addItem({ type: "separator", selector: "#"
|
|
17559
|
-
contextMenu.addItem({ command: "dash_load", selector: "#"
|
|
17560
|
-
contextMenu.addItem({ command: "dash_save", selector: "#"
|
|
17562
|
+
contextMenu.addItem({ command: "dash_add", selector: "#" + this._lhsDashboard.id() });
|
|
17563
|
+
contextMenu.addItem({ command: "dash_clear", selector: "#" + this._lhsDashboard.id() });
|
|
17564
|
+
contextMenu.addItem({ type: "separator", selector: "#" + this._lhsDashboard.id() });
|
|
17565
|
+
contextMenu.addItem({ command: "dash_load", selector: "#" + this.id() });
|
|
17566
|
+
contextMenu.addItem({ command: "dash_save", selector: "#" + this.id() });
|
|
17561
17567
|
document.addEventListener("contextmenu", function (event) {
|
|
17562
17568
|
if (contextMenu.open(event)) {
|
|
17563
17569
|
event.preventDefault();
|
|
@@ -17699,5 +17705,5 @@ var Dashy = /** @class */ (function (_super) {
|
|
|
17699
17705
|
}(SplitPanel));
|
|
17700
17706
|
Dashy.prototype._class += " composite_Dashy";
|
|
17701
17707
|
|
|
17702
|
-
export { Activity, ActivityArray, ActivityPipeline, ActivitySelection, AggregateField, BUILD_VERSION, ColumnMapping, ComputedField, ComputedMapping, DDLAdapter, DDLEditor, DSPicker, Dashboard, Dashy, Databomb, Datasource, DatasourceAdapt, DatasourceRef, ESPResult, Element, ElementContainer, Filters, Form, FormField, GraphAdapter, GroupBy, GroupByColumn, HipiePipeline, HipieResultRef, JavaScriptAdapter, Limit, LogicalFile, Mappings, MultiField, NullView, PKG_NAME
|
|
17708
|
+
export { Activity, ActivityArray, ActivityPipeline, ActivitySelection, AggregateField, BUILD_VERSION, ColumnMapping, ComputedField, ComputedMapping, DDLAdapter, DDLEditor, DSPicker, Dashboard, Dashy, Databomb, Datasource, DatasourceAdapt, DatasourceRef, ESPResult, Element, ElementContainer, Filters, Form, FormField, GraphAdapter, GroupBy, GroupByColumn, HipiePipeline, HipieResultRef, JavaScriptAdapter, Limit, LogicalFile, Mappings, MultiField, NullView, PKG_NAME, PKG_VERSION, Project, ProjectBase, RemoteFilter, RoxieResult, RoxieResultRef, RoxieService, Sort, SortColumn, State, StaticFilter, Visualization, VizChartPanel, VizPopupPanel, VizTypeSet, WU, WUResult, WUResultRef, createProps, emptyDatabomb, rowToFields, schemaRow2IField, schemaType2IFieldType, stringify, wsEclSchemaRow2IField };
|
|
17703
17709
|
//# sourceMappingURL=index.es6.js.map
|