@c8y/ng1-modules 1016.158.0 → 1016.159.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.
@@ -1 +1 @@
1
- "use strict";!function(){function e(c,i,t,n,s,u,o,a,e,d){function l(e){c.device=e.device,c.devices={},c.variables=[],c.devices[e.device.id]=e.device,_.forEach(e.children,function(e){c.devices[e.id]=e}),c.variables.push(c.device),c.variables.push(c.devices)}function r(){c.reloading=!0;var e=f("devices");return f("device")||e?function(e,i){return o.all({device:s.detail(e).then(a.getResData),children:i?t.listChildren(e):[]}).then(l)}(c.child.config.device.id,e).then(function(){c.reloading=!1}):(c.reloading=!1,o.when())}function v(e,i){!c.reloading&&c.device&&(function(e){return c.device.id===e.id}(i)?function(e){_.isEqual(e.childDevices,c.device.childDevices)&&_.isEqual(e.childAssets,c.device.childAssets)?(c.device=e,c.devices[e.id]=e):r()}(i):function(e){c.devices[e.id]&&(c.devices[e.id]=e)}(i))}function h(){c.devices&&e.stop(c.$id,"/managedobjects/*"),c.device=null,c.devices=null}function f(e){var i=e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),t=new RegExp("\\{\\{[^\\}]*\\b".concat(i,"\\b[^\\}]*}}")),n=new RegExp('ng[\\w-]*="[^"]*\\b'.concat(i,'\\b[^"]*'));return t.test(c.child.config.html)||n.test(c.child.config.html)}function g(){!function(){var e=[];c.countersLoaded=!1,f("devicesCount")&&e.push(d.getSummary().then(function(e){c.devicesCount=e.data.deviceWithChildrenCount,c.variables.push(c.devicesCount)}));f("deviceGroupsCount")&&e.push(s.getCount({fragmentType:"c8y_IsDeviceGroup"}).then(function(e){c.deviceGroupsCount=e,c.variables.push(c.deviceGroupsCount)}));f("usersCount")&&e.push(u.mustHaveAnyRole(["ROLE_USER_MANAGEMENT_READ"]).then(i.list).then(function(e){c.usersCount=e.length,c.variables.push(c.usersCount)}));f("criticalDevicesCount")&&e.push(s.list({fragmentType:"c8y_ActiveAlarmsStatus"}).then(function(e){c.criticalDevicesCount=_.filter(e,function(e){return e.c8y_ActiveAlarmsStatus&&e.c8y_ActiveAlarmsStatus.critical}).length,c.variables.push(c.criticalDevicesCount)}));f("onlineCount")&&e.push(t.list({pageSize:1e3}).then(function(e){c.onlineCount=_.filter(e,function(e){return n.isDeviceAvailable(e)}).length}));o.all(e).then(function(){c.countersLoaded=!0})}(),h(),r().then(function(){e.addListener(c.$id,"/managedobjects/*",e.realtimeActions().UPDATE,v),e.start(c.$id,"/managedobjects/*")})}_.assign(this,{isVariableUsed:f}),c.$watch("child.config.device",function(e,i){e&&!_.isEqual(e,i)&&g()},!0),c.$watch("child.config.html",function(e,i){void 0===e||_.isEqual(e,i)||g()}),c.$on("$destroy",h),c.variables=[],g()}e.$inject=["$scope","c8yUser","c8yDevices","c8yDeviceStatus","c8yInventory","c8yPermissions","$q","c8yBase","c8yRealtime","c8yStatistics"],angular.module("c8y.parts.htmlwidget").controller("HtmlWidgetCtrl",e)}();
1
+ "use strict";!function(){function e(c,i,t,n,s,u,o,d,a,l){function r(e){c.device=e.device,c.devices={},c.variables=[],c.devices[e.device.id]=e.device,_.forEach(e.children,function(e){c.devices[e.id]=e}),c.variables.push(c.device),c.variables.push(c.devices)}function v(){c.reloading=!0;var e=p("devices");return p("device")||e?function(e,i){return o.all({device:s.detail(e).then(d.getResData),children:i?t.listChildren(e):[]}).then(r)}(c.child.config.device.id,e).then(function(){c.reloading=!1}):(c.reloading=!1,o.when())}function h(e,i){!c.reloading&&c.device&&(function(e){return c.device.id===e.id}(i)?function(e){_.isEqual(e.childDevices,c.device.childDevices)&&_.isEqual(e.childAssets,c.device.childAssets)?(c.device=e,c.devices[e.id]=e):v()}(i):function(e){c.devices[e.id]&&(c.devices[e.id]=e)}(i))}function f(e){return"/managedobjects/".concat(e)}function e(e){a.addListener(c.$id,f(e),a.realtimeActions().UPDATE,h),a.start(c.$id,f(e))}function g(){c.devices&&Object.keys(c.devices).forEach(function(e){a.stop(c.$id,f(e))}),c.device=null,c.devices=null}function p(e){var i=e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),t=new RegExp("\\{\\{[^\\}]*\\b".concat(i,"\\b[^\\}]*}}")),n=new RegExp('ng[\\w-]*="[^"]*\\b'.concat(i,'\\b[^"]*'));return t.test(c.child.config.html)||n.test(c.child.config.html)}function y(){!function(){var e=[];c.countersLoaded=!1,p("devicesCount")&&e.push(l.getSummary().then(function(e){c.devicesCount=e.data.deviceWithChildrenCount,c.variables.push(c.devicesCount)}));p("deviceGroupsCount")&&e.push(s.getCount({fragmentType:"c8y_IsDeviceGroup"}).then(function(e){c.deviceGroupsCount=e,c.variables.push(c.deviceGroupsCount)}));p("usersCount")&&e.push(u.mustHaveAnyRole(["ROLE_USER_MANAGEMENT_READ"]).then(i.list).then(function(e){c.usersCount=e.length,c.variables.push(c.usersCount)}));p("criticalDevicesCount")&&e.push(s.list({fragmentType:"c8y_ActiveAlarmsStatus"}).then(function(e){c.criticalDevicesCount=_.filter(e,function(e){return e.c8y_ActiveAlarmsStatus&&e.c8y_ActiveAlarmsStatus.critical}).length,c.variables.push(c.criticalDevicesCount)}));p("onlineCount")&&e.push(t.list({pageSize:1e3}).then(function(e){c.onlineCount=_.filter(e,function(e){return n.isDeviceAvailable(e)}).length}));o.all(e).then(function(){c.countersLoaded=!0})}(),g(),v().then(function(){c.devices&&Object.keys(c.devices).forEach(e)})}_.assign(this,{isVariableUsed:p}),c.$watch("child.config.device",function(e,i){e&&!_.isEqual(e,i)&&y()},!0),c.$watch("child.config.html",function(e,i){void 0===e||_.isEqual(e,i)||y()}),c.$on("$destroy",g),c.variables=[],y()}e.$inject=["$scope","c8yUser","c8yDevices","c8yDeviceStatus","c8yInventory","c8yPermissions","$q","c8yBase","c8yRealtime","c8yStatistics"],angular.module("c8y.parts.htmlwidget").controller("HtmlWidgetCtrl",e)}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1016.158.0",
3
+ "version": "1016.159.0",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",