@c8y/ng1-modules 1021.35.1 → 1021.36.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1021.35.1",
3
+ "version": "1021.36.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
@@ -1 +1 @@
1
- (()=>{function e(t,e,n,i,l,c){var s,o=this,r={},d={},a=null,u={open:!1},f={text:""};function h(e){r={},d={},_.forEach(e,function(e){r[e.id]=!0,d[e.id]=!0})}function g(e){return d[e.id]}function p(e){d[e.id]=!0}function A(){return e("filter")(s,f.text)}function C(e){d[e.id]=!1}o.isSelected=g,o.selectAllVisible=function(){_.forEach(A(),p)},o.select=p,o.deselectAllVisible=function(){_.forEach(A(),C)},o.deselect=C,o.toggle=function(e){d[e.id]=!d[e.id]},o.areAllVisibleSelected=function(){var e=A();return!!e&&_.filter(e,g).length===e.length},o.getSelectedStatusText=function(){var e=_.filter(r,_.identity).length;return e===a?c.getString("All children active`assets`"):0===e?c.getString("No children active`assets`"):c.getPlural(e,"1 child active`asset`","{{$count}} children active`asset`",{})},o.apply=function(){t.onSelectionConfirmed&&t.onSelectionConfirmed({selection:_.filter(s,g)}),u.open=!1},o.filterCfg=f,o.dropdownStatus=u,t.$watch("parentMo()",function(e){o.parentMoId=e.id||e,l.detail(o.parentMoId).then(i.getResData).then(function(e){o.childAssets=_.map(e.childAssets.references,"managedObject").concat(_.map(e.childDevices.references,"managedObject")),s=o.childAssets,o.allChildAssetsCount=o.childAssets.length,a=o.allChildAssetsCount})}),t.$watch("selectedChildAssets()",h),t.$watch("ctrl.dropdownStatus.open",function(e){e&&h(t.selectedChildAssets()),n(function(){o.dropdownOpeningFinished=e})})}e.$inject=["$scope","$filter","$timeout","c8yBase","c8yInventory","gettextCatalog"],angular.module("c8y.smartRules").controller("c8yChildAssetsSelectorCtrl",e)})();
1
+ (()=>{function e(t,e,n,i,l,c){var s,o=this,a={},r={},d=null,f={open:!1},u={text:""};function h(e){a={},r={},_.forEach(e,function(e){a[e.id]=!0,r[e.id]=!0})}function g(e){return r[e.id]}function p(e){r[e.id]=!0}function C(){var e,t=S();t?(e=_.filter(t,g),o.allVisibleSelected=e.length===t.length):o.allVisibleSelected=!1}function S(){return e("filter")(s,u.text)}function A(e){r[e.id]=!1}o.allVisibleSelected=!1,o.isSelected=g,o.selectAllVisible=function(){_.forEach(S(),p),C()},o.select=p,o.deselectAllVisible=function(){_.forEach(S(),A),C()},o.deselect=A,o.toggle=function(e){r[e.id]=!r[e.id],C()},o.getSelectedStatusText=function(){var e=_.filter(a,_.identity).length;return e===d?c.getString("All children active`assets`"):0===e?c.getString("No children active`assets`"):c.getPlural(e,"1 child active`asset`","{{$count}} children active`asset`",{})},o.apply=function(){t.onSelectionConfirmed&&t.onSelectionConfirmed({selection:_.filter(s,g)}),f.open=!1},o.filterCfg=u,o.dropdownStatus=f,t.$watch("parentMo()",function(e){o.parentMoId=e.id||e,l.detail(o.parentMoId).then(i.getResData).then(function(e){o.childAssets=_.map(e.childAssets.references,"managedObject").concat(_.map(e.childDevices.references,"managedObject")),s=o.childAssets,o.allChildAssetsCount=o.childAssets.length,d=o.allChildAssetsCount,C()})}),t.$watch("selectedChildAssets()",h),t.$watch("ctrl.dropdownStatus.open",function(e){e&&h(t.selectedChildAssets()),n(function(){o.dropdownOpeningFinished=e})}),t.$watch("ctrl.filterCfg.text",C),t.$watchCollection(function(){return r},C)}e.$inject=["$scope","$filter","$timeout","c8yBase","c8yInventory","gettextCatalog"],angular.module("c8y.smartRules").controller("c8yChildAssetsSelectorCtrl",e)})();
@@ -39,7 +39,7 @@
39
39
  <li class="multiselect-item">
40
40
  <label
41
41
  title="{{ 'Activate all visible`children`' | translate }}"
42
- ng-if="!ctrl.areAllVisibleSelected()"
42
+ ng-if="!ctrl.allVisibleSelected"
43
43
  class="c8y-checkbox input-sm"
44
44
  ng-click="ctrl.selectAllVisible()"
45
45
  >
@@ -54,7 +54,7 @@
54
54
  </label>
55
55
  <label
56
56
  title="{{ 'Deactivate all visible`children`' | translate }}"
57
- ng-if="ctrl.areAllVisibleSelected()"
57
+ ng-if="ctrl.allVisibleSelected"
58
58
  class="c8y-checkbox input-sm"
59
59
  ng-click="ctrl.deselectAllVisible()"
60
60
  >