@c8y/ng1-modules 1017.0.346 → 1017.0.355

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.
@@ -1 +1 @@
1
- "use strict";function _objectSpread(n){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?Object(arguments[e]):{},s=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&s.push.apply(s,Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})),s.forEach(function(e){_defineProperty(n,e,o[e])})}return n}function _defineProperty(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}!function(){function e(e,n,o,t,r,s,l,i){var a=this;function c(){n.listInventoryRoles(a.userId).then(o.getResData).then(function(e){a.assignedRoles=_.keyBy(e.inventoryAssignments,"managedObject")}),n.detail(a.userId).then(o.getResData).then(function(e){a.user=e,a.user.owner?n.listInventoryRoles(a.user.owner).then(o.getResData).then(function(e){a.ownerAssignedRoles=_.keyBy(e.inventoryAssignments,"managedObject"),_.isEmpty(a.ownerAssignedRoles)&&(a.displayNoOwnerRolesAlert=!0),a.failedToFetchOwnerInventoryRoles=!1}).catch(function(){a.failedToFetchOwnerInventoryRoles=!0}):a.failedToFetchOwnerInventoryRoles=!1})}function u(){c(),l.success(i.getPlural(d(),"Inventory role updated","Inventory roles updated",{}))}function d(){return _.filter(a.assignedRoles,"isModified").length}function y(e){var n="replace"===e.process,o=e.roles,s=_.map(a.assignedRoles);return t.copyUserRoles(o,s,a.userId,n).then(c).then(r.successUserRolesCopy)}_.assign(a,{$onChange:function(e){e.user&&c()},onChangeRoles:function(e,n){a.assignedRoles[n]=a.assignedRoles[n]||{},_.assign(a.assignedRoles[n],{managedObject:n,roles:e,isModified:!0}),a.assignedRoles=_objectSpread({},a.assignedRoles)},onSaveInventoryRoles:function(){t.onSaveInventoryRoles(a.userId,a.assignedRoles).then(u)},copyRoles:function(){r.copyFromUserDialog(a.userId).then(y)},loadAssignedRoles:c,isUnchanged:function(){return 0===d()},helpLink:s.getUserGuideLink(_.get(r.STRINGS,"LINKS.ROLES_INVENTORY")),displayNoOwnerRolesAlert:!1,failedToFetchOwnerInventoryRoles:null}),c()}e.$inject=["$q","c8yUser","c8yBase","c8yUserInventoryRoles","c8yUserRolesUi","c8yDocs","c8yAlert","gettextCatalog"],angular.module("c8y.userRoles").component("c8yUserInventoryRolesTab",{templateUrl:":::PLUGIN_PATH:::/inventoryRolesTab/inventoryRolesTab.html",controllerAs:"vm",controller:e,bindings:{userId:"<"}})}();
1
+ "use strict";function _objectSpread(n){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?Object(arguments[e]):{},t=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&t.push.apply(t,Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable})),t.forEach(function(e){_defineProperty(n,e,o[e])})}return n}function _defineProperty(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}!function(){function e(e,n,o,s,r,t,l,i){var a=this;function c(){n.listInventoryRoles(a.userId).then(o.getResData).then(function(e){a.assignedRoles=_.keyBy(e.inventoryAssignments,"managedObject")}),n.detail(a.userId).then(o.getResData).then(function(e){a.user=e,a.user.owner?n.listInventoryRoles(a.user.owner).then(o.getResData).then(function(e){a.ownerAssignedRoles=_.keyBy(e.inventoryAssignments,"managedObject"),_.isEmpty(a.ownerAssignedRoles)&&(a.displayNoOwnerRolesAlert=!0),a.failedToFetchOwnerInventoryRoles=!1}).catch(function(){a.failedToFetchOwnerInventoryRoles=!0}):a.failedToFetchOwnerInventoryRoles=!1})}function u(){c(),l.success(i.getPlural(d(),"Inventory role updated","Inventory roles updated",{}))}function d(){return _.filter(a.assignedRoles,"isModified").length}function y(e){var n="replace"===e.process,o=e.roles,t=_.map(a.assignedRoles);return s.copyUserRoles(o,t,a.userId,n).then(c).then(r.successUserRolesCopy)}_.assign(a,{$onChange:function(e){e.user&&c()},onChangeRoles:function(e,n){a.assignedRoles[n]=a.assignedRoles[n]||{},_.assign(a.assignedRoles[n],{managedObject:n,roles:e,isModified:!0}),a.assignedRoles=_objectSpread({},a.assignedRoles)},onSaveInventoryRoles:function(){s.onSaveInventoryRoles(a.userId,a.assignedRoles).then(u)},copyRoles:function(){r.copyFromUserDialog(a.userId).then(y)},loadAssignedRoles:c,isUnchanged:function(){return 0===d()},helpLink:t.getUserGuideLink(_.get(r.STRINGS,"LINKS.ROLES_INVENTORY")),stopEventPropagation:function(e){e.stopPropagation()},displayNoOwnerRolesAlert:!1,failedToFetchOwnerInventoryRoles:null}),c()}e.$inject=["$q","c8yUser","c8yBase","c8yUserInventoryRoles","c8yUserRolesUi","c8yDocs","c8yAlert","gettextCatalog"],angular.module("c8y.userRoles").component("c8yUserInventoryRolesTab",{templateUrl:":::PLUGIN_PATH:::/inventoryRolesTab/inventoryRolesTab.html",controllerAs:"vm",controller:e,bindings:{userId:"<"}})}();
@@ -168,16 +168,22 @@
168
168
  You can also copy inventory roles from another user or replace this user's roles with the
169
169
  roles of another user.
170
170
  </p>
171
- <small ng-show="::vm.helpLink">
172
- <a
173
- title="{{ 'Help &amp; documentation' | translate }}"
174
- ng-href="{{::vm.helpLink}}"
175
- target="_blank"
176
- rel="noopener noreferrer"
171
+ <span
172
+ ng-click="vm.stopEventPropagation($event)"
173
+ >
174
+ <small
175
+ ng-show="::vm.helpLink"
177
176
  >
178
- <i c8y-icon="question-circle-o" class="text-info"></i>
179
- <span translate>Help &amp; documentation</span>
180
- </a>
181
- </small>
177
+ <a
178
+ title="{{ 'Help &amp; documentation' | translate }}"
179
+ ng-href="{{::vm.helpLink}}"
180
+ target="_blank"
181
+ rel="noopener noreferrer"
182
+ >
183
+ <i c8y-icon="question-circle-o" class="text-info"></i>
184
+ <span translate>Help &amp; documentation</span>
185
+ </a>
186
+ </small>
187
+ </span>
182
188
  </div>
183
189
  </script>