@nova-ui/dashboards 12.0.9-3616 → 12.0.10-3652
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/bundles/nova-ui-dashboards.umd.js +14 -4
- package/bundles/nova-ui-dashboards.umd.js.map +1 -1
- package/esm2015/lib/services/url-interaction.service.js +18 -4
- package/fesm2015/nova-ui-dashboards.js +15 -3
- package/fesm2015/nova-ui-dashboards.js.map +1 -1
- package/lib/services/url-interaction.service.d.ts +3 -0
- package/package.json +3 -3
- package/sdk/atoms/src/lib/services/url-interaction.service.d.ts +3 -0
- package/sdk/atoms/src/lib/services/url-interaction.service.js +16 -2
- package/sdk/atoms/src/lib/services/url-interaction.service.js.map +1 -1
|
@@ -1387,26 +1387,36 @@
|
|
|
1387
1387
|
} });
|
|
1388
1388
|
|
|
1389
1389
|
var UrlInteractionService = /** @class */ (function () {
|
|
1390
|
-
function UrlInteractionService() {
|
|
1390
|
+
function UrlInteractionService(logger) {
|
|
1391
|
+
this.logger = logger;
|
|
1391
1392
|
}
|
|
1392
1393
|
UrlInteractionService.prototype.template = function (url, data) {
|
|
1393
1394
|
var _this = this;
|
|
1394
1395
|
var regex = new RegExp(/\$\{([a-zA-Z0-9.]*)\}/g);
|
|
1395
|
-
return url.replace(regex, function (match, captured) {
|
|
1396
|
+
return url.replace(regex, function (match, captured) {
|
|
1397
|
+
var _a;
|
|
1398
|
+
try {
|
|
1399
|
+
return (_a = _this.evaluate(captured.split("."), data)) !== null && _a !== void 0 ? _a : "";
|
|
1400
|
+
}
|
|
1401
|
+
catch (e) {
|
|
1402
|
+
_this.logger.error(e);
|
|
1403
|
+
return "";
|
|
1404
|
+
}
|
|
1405
|
+
});
|
|
1396
1406
|
};
|
|
1397
1407
|
UrlInteractionService.prototype.evaluate = function (expresion, data) {
|
|
1398
1408
|
return expresion.reduce(function (result, item) { return result[item]; }, data);
|
|
1399
1409
|
};
|
|
1400
1410
|
return UrlInteractionService;
|
|
1401
1411
|
}());
|
|
1402
|
-
/** @nocollapse */ UrlInteractionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: UrlInteractionService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1412
|
+
/** @nocollapse */ UrlInteractionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: UrlInteractionService, deps: [{ token: i2__namespace.LoggerService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1403
1413
|
/** @nocollapse */ UrlInteractionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: UrlInteractionService, providedIn: "root" });
|
|
1404
1414
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: UrlInteractionService, decorators: [{
|
|
1405
1415
|
type: i0.Injectable,
|
|
1406
1416
|
args: [{
|
|
1407
1417
|
providedIn: "root",
|
|
1408
1418
|
}]
|
|
1409
|
-
}] });
|
|
1419
|
+
}], ctorParameters: function () { return [{ type: i2__namespace.LoggerService }]; } });
|
|
1410
1420
|
|
|
1411
1421
|
// Window is an interface, so it fails when used in constructor parameters for AoT
|
|
1412
1422
|
var WindowObject = /** @class */ (function (_super) {
|