@coolon/angular-ui-powerups 11.2.1 → 11.2.4

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.
@@ -6335,11 +6335,11 @@
6335
6335
  })(exports.ParameterDefinition || (exports.ParameterDefinition = {}));
6336
6336
 
6337
6337
  var PlaceDefinition = /** @class */ (function () {
6338
- function PlaceDefinition(component, path, authenticate, roles, data, routeParameters, children) {
6338
+ function PlaceDefinition(component, path, authenticate, role, data, routeParameters, children) {
6339
6339
  this.component = component;
6340
6340
  this.path = path;
6341
6341
  this.authenticate = authenticate;
6342
- this.roles = roles;
6342
+ this.role = role;
6343
6343
  this.data = data;
6344
6344
  this.routeParameters = routeParameters;
6345
6345
  this.children = children;
@@ -8904,8 +8904,12 @@
8904
8904
 
8905
8905
  function Place(options) {
8906
8906
  return function (target) {
8907
+ var _a;
8907
8908
  if (exports.PlaceComponent.isPlaceComponentConstructor(target)) {
8908
- exports.PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, _.isNil(options.authenticate) ? true : options.authenticate, _.isNil(options.roles) ? [] : options.roles, options.data, exports.PlaceComponent.getRouteParameters(target), (options.children || []).map(function (c) { return exports.PlaceComponent.getDefinition(c); })));
8909
+ exports.PlaceComponent.injectDefinition(target, new PlaceDefinition(target, options.path, _.isNil(options.authenticate) ? true : options.authenticate, (_a = options.role) !== null && _a !== void 0 ? _a : options.roles, options.data, exports.PlaceComponent.getRouteParameters(target), (options.children || []).map(function (c) { return exports.PlaceComponent.getDefinition(c); })));
8910
+ if (options.roles) {
8911
+ console.warn(target.name + " @Place({roles: string[]}) is deprecated. Use @Place({role:any}) instead");
8912
+ }
8909
8913
  }
8910
8914
  else {
8911
8915
  pectin.lang.illegalState(target + " must extend PlaceComponent to use the @Place decorator");