@c8y/ng1-modules 1018.0.39 → 1018.0.41

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 n(i,n,t,e){i.onRealtimeAlarmFn=function(n){i.onAlarm=n},i.onRealtimeEventFn=function(n){i.onEvent=n};var a,o=200;function c(n,t){!1!==i.child.config.updateDates&&(i.child.config.dateFrom=n,i.child.config.dateTo=t)}function d(){var n=t.height();_.isUndefined(_.get(a,"height"))||(n-=a.height),i.dataPointsGraphHeight=_.max([o,n])}function l(){n(function(){i.$broadcast("dashboardResize")},500)}function r(n,t){i.alarmsEventsTimeline=i.alarmsEventsTimeline||{},i.alarmsEventsTimeline.displayedDateFrom=n,i.alarmsEventsTimeline.displayedDateTo=t}function h(n){return _(n).map(function(n){return n.__target.id}).uniq().value().join(",")}i.onUpdateDates=c,i.onUpdateDisplayedDates=r,i.onBoxChanged=function(n){i.chartBox=n},i.onTimelinesChartSizeChanged=function(n){a=n,d(),l()},i.dataPointsGraphHeight=t.height(),function(){var n=i.child.config.interval;if(!n||n===e.custom.id)return;var t=_.find(e.intervals,function(n){return n.id===i.child.config.interval})||{};t.qty&&(i.child.config.dateFrom=moment().subtract(t.qty,t.unit).toDate(),i.child.config.dateTo=moment().toDate())}(),i.$watch("child.config.datapoints",function(n){var t=h(n);i.channel=t?"/measurements/".concat(t):""}),i.$watch("child.config.alarmsEventsConfigs",function(n){var t=h(n);i.alarmsChannel=t?"/alarms/".concat(t):"",i.eventsChannel=t?"/events/".concat(t):""}),i.$watchCollection(["child.config.dateFrom","child.config.dateTo"],function(){r(i.child.config.dateFrom,i.child.config.dateTo)}),i.$watch("child.config.date",function(){i.child.config.widgetInstanceGlobalTimeContext&&c(new Date(i.child.config.date[0]),new Date(i.child.config.date[1]))}),i.$on("dashboardResize",function(n){n.targetScope!==i&&(d(),l())})}n.$inject=["$scope","$timeout","$element","INTERVAL_CONSTANTS"],angular.module("c8y.cockpit.dataPointExplorer").controller("DataPointWidgetCtrl",n)}();
1
+ "use strict";!function(){function n(e,n,t,a){e.onRealtimeAlarmFn=function(n){e.onAlarm=n},e.onRealtimeEventFn=function(n){e.onEvent=n};var i,o=200;function c(n,t){!1!==e.child.config.updateDates&&(e.child.config.dateFrom=n,e.child.config.dateTo=t)}function d(){if(e.child&&e.child.config){var n=e.child.config,t=n.interval,i=n.realtime;t&&(t!==a.custom.id||i)&&(t===a.custom.id&&i?function(){var n=new Date(e.child.config.dateFrom),t=new Date(e.child.config.dateTo)-n,i=moment();e.child.config.dateTo=i.toDate(),e.child.config.dateFrom=i.subtract(t,"milliseconds").toDate()}():function(t){var n=_.find(a.intervals,function(n){return n.id===t})||{};n.qty&&(e.child.config.dateFrom=moment().subtract(n.qty,n.unit).toDate(),e.child.config.dateTo=moment().toDate())}(t))}}function l(){var n=t.height();_.isUndefined(_.get(i,"height"))||(n-=i.height),e.dataPointsGraphHeight=_.max([o,n])}function r(){n(function(){e.$broadcast("dashboardResize")},500)}function f(n,t){e.alarmsEventsTimeline=e.alarmsEventsTimeline||{},e.alarmsEventsTimeline.displayedDateFrom=n,e.alarmsEventsTimeline.displayedDateTo=t}function h(n){return _(n).map(function(n){return n.__target.id}).uniq().value().join(",")}e.onUpdateDates=c,e.onUpdateDisplayedDates=f,e.onBoxChanged=function(n){e.chartBox=n},e.onTimelinesChartSizeChanged=function(n){i=n,l(),r()},e.dataPointsGraphHeight=t.height(),(e.recalculate=d)(),e.$watch("child.config.datapoints",function(n){var t=h(n);e.channel=t?"/measurements/".concat(t):""}),e.$watch("child.config.alarmsEventsConfigs",function(n){var t=h(n);e.alarmsChannel=t?"/alarms/".concat(t):"",e.eventsChannel=t?"/events/".concat(t):""}),e.$watchCollection(["child.config.dateFrom","child.config.dateTo"],function(){f(e.child.config.dateFrom,e.child.config.dateTo)}),e.$watch("child.config.date",function(){e.child.config.widgetInstanceGlobalTimeContext&&c(new Date(e.child.config.date[0]),new Date(e.child.config.date[1]))}),e.$on("dashboardResize",function(n){n.targetScope!==e&&(l(),r())})}n.$inject=["$scope","$timeout","$element","INTERVAL_CONSTANTS"],angular.module("c8y.cockpit.dataPointExplorer").controller("DataPointWidgetCtrl",n)}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1018.0.39",
3
+ "version": "1018.0.41",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",