@c8y/ng1-modules 1019.13.0 → 1019.13.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.
- package/core/locales/de.po +3 -0
- package/core/locales/es.po +3 -0
- package/core/locales/fr.po +3 -0
- package/core/locales/ja_JP.po +3 -0
- package/core/locales/nl.po +3 -0
- package/core/locales/pl.po +3 -0
- package/core/locales/pt_BR.po +3 -0
- package/measurements/measurements2/series.service.js +1 -1
- package/package.json +1 -1
package/core/locales/de.po
CHANGED
|
@@ -15064,6 +15064,9 @@ msgstr "Diese Cookies werden verwendet, um Werbung gezielt an einen Benutzer zu
|
|
|
15064
15064
|
msgid "These cookies are used to track site usage and to process my personal data to measure and improve usability and performance. We will neither forward this data to any third party nor use this data for direct marketing purposes. I recognize that I can opt in and out of these cookies at any time."
|
|
15065
15065
|
msgstr "Diese Cookies werden verwendet, um die Nutzung der Website zu verfolgen und meine persönlichen Daten zu verarbeiten und so die Benutzerfreundlichkeit und Leistung zu messen und zu verbessern. Wir werden diese Daten weder an Dritte weitergeben noch für Direktmarketingzwecke verwenden. Ich erkenne an, dass ich mich jederzeit für oder gegen diese Cookies entscheiden kann."
|
|
15066
15066
|
|
|
15067
|
+
msgid "These cookies are used to support you during your first steps with the product, to deliver content tailored to your needs, and to collect usage statistics."
|
|
15068
|
+
msgstr "Diese Cookies werden verwendet, um Sie bei Ihren ersten Schritten mit dem Produkt zu unterstützen, um auf Ihre Bedürfnisse zugeschnittene Inhalte zu liefern und um Nutzungsstatistiken zu sammeln."
|
|
15069
|
+
|
|
15067
15070
|
msgid "These plugins and/or blueprints are provided <strong>as-is and without warranty or support</strong>, and they do not constitute part of the product suite. Users are free to use subject to the license agreement."
|
|
15068
15071
|
msgstr "Die folgenden Plugins und/oder Vorlagen sind verfügbar <strong>wie besehen und ohne Garantie oder Support</strong> und sie sind nicht Teil des Produktportfolios. Benutzer können sie vorbehaltlich der Lizenzvereinbarung frei verwenden."
|
|
15069
15072
|
|
package/core/locales/es.po
CHANGED
|
@@ -15093,6 +15093,9 @@ msgstr "Estas cookies se utilizan para dirigir publicidad a un usuario."
|
|
|
15093
15093
|
msgid "These cookies are used to track site usage and to process my personal data to measure and improve usability and performance. We will neither forward this data to any third party nor use this data for direct marketing purposes. I recognize that I can opt in and out of these cookies at any time."
|
|
15094
15094
|
msgstr "Estas cookies se utilizan para hacer un seguimiento del uso del sitio y para procesar mis datos personales a fin de medir y mejorar la usabilidad y el rendimiento. No compartiremos estos datos con terceros ni los utilizaremos para fines de marketing directo. Acepto la posibilidad de admitir y dejar de admitir estas cookies en cualquier momento."
|
|
15095
15095
|
|
|
15096
|
+
msgid "These cookies are used to support you during your first steps with the product, to deliver content tailored to your needs, and to collect usage statistics."
|
|
15097
|
+
msgstr "Estas cookies se utilizan para ayudarle durante sus primeros pasos con el producto, para ofrecerle contenidos adaptados a sus necesidades y para recopilar estadísticas de uso."
|
|
15098
|
+
|
|
15096
15099
|
msgid "These plugins and/or blueprints are provided <strong>as-is and without warranty or support</strong>, and they do not constitute part of the product suite. Users are free to use subject to the license agreement."
|
|
15097
15100
|
msgstr "Estos complementos o plantillas base se proporcionan <strong>sin garantía ni soporte</strong>, y no forman parte del paquete de productos. Los usuarios pueden hacer uso de los mismos conforme al acuerdo de licencia."
|
|
15098
15101
|
|
package/core/locales/fr.po
CHANGED
|
@@ -15093,6 +15093,9 @@ msgstr "Ces cookies sont utilisés pour cibler les publicités pour un utilisate
|
|
|
15093
15093
|
msgid "These cookies are used to track site usage and to process my personal data to measure and improve usability and performance. We will neither forward this data to any third party nor use this data for direct marketing purposes. I recognize that I can opt in and out of these cookies at any time."
|
|
15094
15094
|
msgstr "Ces cookies sont utilisés pour suivre l'utilisation du site et traiter mes données personnelles afin de mesurer et d'améliorer l'utilisation et la performance. Nous ne transmettrons jamais ces données à un tiers ni ne les utiliserons à des fins de marketing direct. Je reconnais que je peux accepter et me désabonner de ces cookies à tout moment."
|
|
15095
15095
|
|
|
15096
|
+
msgid "These cookies are used to support you during your first steps with the product, to deliver content tailored to your needs, and to collect usage statistics."
|
|
15097
|
+
msgstr "Ces cookies sont utilisés pour vous aider lors de vos premiers pas avec le produit, pour vous fournir un contenu adapté à vos besoins et pour collecter des statistiques d'utilisation."
|
|
15098
|
+
|
|
15096
15099
|
msgid "These plugins and/or blueprints are provided <strong>as-is and without warranty or support</strong>, and they do not constitute part of the product suite. Users are free to use subject to the license agreement."
|
|
15097
15100
|
msgstr "Ces plugins et/ou blueprints sont fournis <strong>en l'état et sans garantie ou support</strong> et ne font pas partie de la suite produit. Les utilisateurs sont libres de l'utiliser sous réserve de l'accord de licence."
|
|
15098
15101
|
|
package/core/locales/ja_JP.po
CHANGED
|
@@ -15076,6 +15076,9 @@ msgstr "マーケティング Cookie は、ユーザーをターゲットにし
|
|
|
15076
15076
|
msgid "These cookies are used to track site usage and to process my personal data to measure and improve usability and performance. We will neither forward this data to any third party nor use this data for direct marketing purposes. I recognize that I can opt in and out of these cookies at any time."
|
|
15077
15077
|
msgstr "これらの Cookie は、サイトの使用を追跡し、個人データを処理して、ユーザビリティとパフォーマンスを向上するために使用されます。このデータは、いかなるサードパーティにも転送されることはなく、ダイレクト マーケティングに使用されることもありません。私は、これらの Cookie 設定をいつでも変更できることを理解しています。"
|
|
15078
15078
|
|
|
15079
|
+
msgid "These cookies are used to support you during your first steps with the product, to deliver content tailored to your needs, and to collect usage statistics."
|
|
15080
|
+
msgstr "これらのクッキーは、お客様が本製品を初めて使用する際のサポート、お客様のニーズに合わせたコンテンツの配信、および利用統計の収集のために使用されます。"
|
|
15081
|
+
|
|
15079
15082
|
msgid "These plugins and/or blueprints are provided <strong>as-is and without warranty or support</strong>, and they do not constitute part of the product suite. Users are free to use subject to the license agreement."
|
|
15080
15083
|
msgstr "これらのプラグインまたは設計、またはその両方は、<strong>現状有姿で保障やサポートなく提供されており、</strong>製品群の一部ではありません。ユーザーは、使用許諾契約書に従って自由に使用できます。"
|
|
15081
15084
|
|
package/core/locales/nl.po
CHANGED
|
@@ -15092,6 +15092,9 @@ msgstr "Deze cookies worden gebruikt om gebruikers gerichte advertenties te tone
|
|
|
15092
15092
|
msgid "These cookies are used to track site usage and to process my personal data to measure and improve usability and performance. We will neither forward this data to any third party nor use this data for direct marketing purposes. I recognize that I can opt in and out of these cookies at any time."
|
|
15093
15093
|
msgstr "Deze cookies worden gebruikt om het websitegebruik te traceren en mijn persoonlijke gegevens te verwerken en zo de gebruiksvriendelijkheid en prestatie te meten en te verbeteren. Wij sturen deze gegeven niet door naar derden en gebruiken deze gegevens niet voor direct marketing. Ik weet dat ik deze cookies op elk gewenst moment kan accepteren of weigeren."
|
|
15094
15094
|
|
|
15095
|
+
msgid "These cookies are used to support you during your first steps with the product, to deliver content tailored to your needs, and to collect usage statistics."
|
|
15096
|
+
msgstr "Deze cookies worden gebruikt om u te ondersteunen tijdens uw eerste stappen met het product, om inhoud op maat van uw behoeften te leveren en om gebruiksstatistieken te verzamelen."
|
|
15097
|
+
|
|
15095
15098
|
msgid "These plugins and/or blueprints are provided <strong>as-is and without warranty or support</strong>, and they do not constitute part of the product suite. Users are free to use subject to the license agreement."
|
|
15096
15099
|
msgstr "Deze plug-ins en/of blauwdrukken worden <strong>'as-is' en zonder garantie of ondersteuning</strong> geleverd, en maken geen deel uit van de productsuite. Gebruikers mogen ze gebruiken met inachtneming van de licentieovereenkomst."
|
|
15097
15100
|
|
package/core/locales/pl.po
CHANGED
|
@@ -15118,6 +15118,9 @@ msgstr "Te pliki cookie służą do personalizowania reklam dla użytkownika."
|
|
|
15118
15118
|
msgid "These cookies are used to track site usage and to process my personal data to measure and improve usability and performance. We will neither forward this data to any third party nor use this data for direct marketing purposes. I recognize that I can opt in and out of these cookies at any time."
|
|
15119
15119
|
msgstr "Te pliki cookie służą do śledzenia wykorzystania witryny oraz do przetwarzania moich danych osobowych w celu pomiaru oraz poprawy wygody użytkowania i wydajności. Dane nie będą przesyłane żadnym innym podmiotom zewnętrznym ani nie będą używane do celów marketingowych. Zdaję sobie sprawę, że mogę w każdej chwili zgodzić się na te pliki cookie lub z nich zrezygnować."
|
|
15120
15120
|
|
|
15121
|
+
msgid "These cookies are used to support you during your first steps with the product, to deliver content tailored to your needs, and to collect usage statistics."
|
|
15122
|
+
msgstr "Te pliki cookie są wykorzystywane do wspierania pierwszych kroków z produktem, do dostarczania treści dostosowanych do potrzeb oraz do gromadzenia statystyk użytkowania."
|
|
15123
|
+
|
|
15121
15124
|
msgid "These plugins and/or blueprints are provided <strong>as-is and without warranty or support</strong>, and they do not constitute part of the product suite. Users are free to use subject to the license agreement."
|
|
15122
15125
|
msgstr "Te wtyczki lub szablony zostały udostępnione <strong>w stanie, w jakim są, bez gwarancji ani wsparcia</strong>. Nie stanowią części pakietu produktu. Użytkownicy mogą z nich korzystać, jeśli chcą, zgodnie z umową licencyjną."
|
|
15123
15126
|
|
package/core/locales/pt_BR.po
CHANGED
|
@@ -15092,6 +15092,9 @@ msgstr "Esses cookies são usados para direcionar a publicidade a um usuário."
|
|
|
15092
15092
|
msgid "These cookies are used to track site usage and to process my personal data to measure and improve usability and performance. We will neither forward this data to any third party nor use this data for direct marketing purposes. I recognize that I can opt in and out of these cookies at any time."
|
|
15093
15093
|
msgstr "Esses cookies são usados para rastrear o uso do site e para processar meus dados pessoais para medir e melhorar a usabilidade e o desempenho. Nós não encaminharemos esses dados a terceiros nem os usaremos para fins de marketing direto. Reconheço que posso optar por aceitar ou não esses cookies a qualquer momento."
|
|
15094
15094
|
|
|
15095
|
+
msgid "These cookies are used to support you during your first steps with the product, to deliver content tailored to your needs, and to collect usage statistics."
|
|
15096
|
+
msgstr "Esses cookies são usados para dar suporte ao usuário durante suas primeiras etapas com o produto, para fornecer conteúdo adaptado às suas necessidades e para coletar estatísticas de uso."
|
|
15097
|
+
|
|
15095
15098
|
msgid "These plugins and/or blueprints are provided <strong>as-is and without warranty or support</strong>, and they do not constitute part of the product suite. Users are free to use subject to the license agreement."
|
|
15096
15099
|
msgstr "Esses plugins e/ou blueprints são <strong>fornecidos como estão e sem garantia ou suporte</strong> e não fazem parte do pacote de produtos. Os usuários podem usá-los livremente nos termos do contrato de licença."
|
|
15097
15100
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,r,a,s){var i;function o(e,t,n,r,i){return a.listForDataPoint(e,t,n,"NONE"!==r?r:void 0,i)}function t(e,t){var n=this;return n.chart=e,n.dataPoint=t,n.hoverItems=[],n.values=[],n.implicitDomain={},n.bisect=d3.bisector(function(e){return e.time}).right,n.loadSeriesData=r.latest(o),n}return i=e.has("ngZone")?e.get("ngZone"):{runOutsideAngular:function(e){return e()}},t.prototype={defaultRenderType:"min",defaultLineType:"line",loadDataAndRender:function(e,t,n){var r=this;return r.loadData(e,t,n).finally(function(){r.chart.render()})},loadData:function(e,t,n){var r=this,i=r.dataPoint,a=r._aggregation;return this.loadSeriesData(i,e,t,n,r.chart).then(function(e){return a!==n&&(r.values.length=0,r._aggregation=n,r.resetImplicitDomain()),r.appendValues(e.values),i.unit=e.dataPoint.unit,e})},appendValues:function(e){var i=this,a=i.values,o=i.implicitDomain;return _.forEach(e,function(e){var t,n,r;_.isFinite(e.min)&&_.isFinite(e.max)&&(r=new Date(e.time),t=r.getTime(),n=_.find(a,function(e){return t===e.time.getTime()}),r={time:r,val:{min:e.min,max:e.max}},a.length&&_.last(a).time.getTime()>t&&(i._valuesSortingNeeded=!0),n?_.assign(n,r):a.push(r),(_.isUndefined(o.min)||e.min<o.min)&&(o.min=e.min),_.isUndefined(o.max)||e.max>o.max)&&(o.max=e.max)}),a},destroy:function(){this.svg&&this.svg.remove(),this.hoverItems=[],delete this.svg},resetImplicitDomain:function(){this.implicitDomain.min=void 0,this.implicitDomain.max=void 0},domain:function(){var e=this.dataPoint,t=this.implicitDomain,n=_.isUndefined(e.min)||""===e.min||_.isNull(e.min)?t.min:Number(e.min),e=_.isUndefined(e.max)||""===e.max||_.isNull(e.max)?t.max:Number(e.max);return(_.isUndefined(n)||Number.isNaN(n))&&(n=d3.min(this.values,function(e){return e.val.min}),_.isUndefined(n)||(t.min=n),n=n||0),(_.isUndefined(e)||Number.isNaN(e))&&(e=d3.max(this.values,function(e){return e.val.max}),_.isUndefined(e)||(t.max=e),e=e||0),n===e&&(--n,e+=1),[n,e]},scale:function(){return this.chart.scaleY().domain(this.domain())},getRenderType:function(){return this.dataPoint.renderType||this.renderType||this.defaultRenderType},getLineType:function(){return this.dataPoint.lineType||this.lineType||this.defaultLineType},render:function(){var e,t=this,n=t.chart.svgSeries,r=t.getRenderType(),i=t.getLineType(),a=t.values,o=t.svg;!o||o.minOrMax===r&&o.chartType===r||t.destroy(),t.svg||(e=t.chart.margins,t.svg=n.append("g").attr("transform",s.translate(e.l,e.t)).attr("class","series"),(o=t.svg).minOrMax=r,o.chartType=i),t._valuesSortingNeeded&&(delete t._valuesSortingNeeded,a.sort(function(e,t){return e.time>t.time?1:e.time<t.time?-1:0})),t.chart.allowSelectFocusTime||t.removeOldHiddenValues(),"bars"===i?t._render_bars():"area"!==r?t._render_path(r):t._render_area()},removeOldHiddenValues:function(){var e=this.values,n=this.chart.axisX._from,r=0;_.forEach(e,function(e,t){return!moment(e.time).isSameOrAfter(n)||(r=t-1,!1)}),r&&e.splice(0,r)},_render_path:function(t){var n=this,e=n.svg._path;function r(e){return n.chart.axisX.scale()(e.time)}function i(e){return n.scale()(e.val[t])}function a(){return n.dataPoint.color}e||(n.svg._path=n.svg.append("path"),(e=n.svg._path).style({"pointer-events":"none"})),n._create_update_focusPoint(1),n._render_path_line(e,r,i,a),n._render_path_points(r,i,a)},_render_path_line:function(e,t,n,r){var i=this,a=i.getLineType()||"linear",o=d3.svg.line().interpolate(a).x(t).y(n);_.includes(["bars","points"],i.getLineType())?(e.remove(),i.svg._path=void 0):e.attr("d",function(){return o(i.values)}).style({fill:"transparent",stroke:r})},_render_path_points:function(e,t,n){var r;_.includes(["points","linePoints"],this.getLineType())?((r=this.svg.selectAll("circle.point").data(this.values)).enter().append("circle").attr("class","point"),r.exit().remove(),r.attr("cx",e).attr("cy",t).attr("r",4).attr("fill","transparent").attr("stroke",n)):this.svg.selectAll("circle.point").remove()},_render_bars:function(){var r=this,e=_.filter(r.chart.series,function(e){return e.getLineType()===r.getLineType()}),n=e.length,i=_.findIndex(e,function(e){return e===r}),a=r.svg.minOrMax,e=function(){var t=r.chart.axisX.scale();if(r._aggregation)return function(e){return t(e.time)-n*s()/2+i*s()};return function(e){return t(e.time)}}(),t=c(),o=u(t),s=function(){var e=1;{var t;r._aggregation&&(t=function(e){var t=r.chart.axisX.scale(),n=_slicedToArray(t.domain(),1)[0],e=moment(n).add(1,{MINUTELY:"minute",HOURLY:"hour",DAILY:"day"}[e]).toDate();return t(e)-t(n)}(r._aggregation),(e=20<(e=t/(n+1))?20:e)<1)&&(e=1)}return _.constant(e)}();function c(e){var t=r.scale(),n=(n=e)||("area"===a?"max":a);return function(e){return t(e.val[n])}}function l(t){var n=_.max(r.scale().range());return function(e){e=t(e);return n<e?n:e}}function u(t){var n=r.scale().range();return function(e){return Math.abs(_.max(n)-t(e))}}var e={x:e,y:l(t),width:s,height:o,fill:function(){return r.dataPoint.color}},t=r.svg.selectAll(".bars").data(r.values),o=t.enter().append("g").style("pointer-events","none").attr("class",function(e,t){return"bar index".concat(t)});o.append("rect").attr("class","barmain"),t.exit().remove(),t.select(".barmain").attr(e),"area"===a&&r._aggregation&&(o.append("rect").attr("class","barmin").style("opacity","0.2"),o=c("min"),o=_.defaults({fill:"#000",y:l(o),height:u(o)},e),t.select(".barmin").attr(o)),r._aggregation||r._create_update_focusPoint(1)},hover:function(e){var t=this,n=t.getRenderType(),r=t.getLineType(),i=t.values[e];(t.overPoint=i)&&(t._focusPointTime=i.time,"bars"===r)&&this._hover_bars(e),t._render_focusPoint(1,"area"!==n?n:"max"),t._render_focusPoint(2,"area"!==n?n:"min")},_hover_bars:function(e){this.svg.select(".hover").classed("hover",!1).style({opacity:1}),this.svg.select(".index".concat(e," .barmain")).classed("hover",!0).style({opacity:.5})},mouseleave:function(){"bars"===this.getLineType()&&this.svg.select(".hover").classed("hover",!1).style({opacity:1})},_create_update_focusPoint:function(e){var t=this,e="focusPoint".concat(e),n=t.svg[e];n||(t.svg[e]=t.svg.append("circle").style({visibility:t.chart.hoverItemsVisible?"visible":"hidden","pointer-events":"all"}).attr({cx:0,cy:0,r:3}),n=t.svg[e],t.addFocusPointEvent(n),t.hoverItems.push(n)),n.attr({fill:function(){return t.dataPoint.color}})},_render_focusPoint:function(e,t){var n=this.chart.axisX.scale(),r=this.scale(),i=this.svg,a=this.overPoint,e=i&&i["focusPoint".concat(e)];e&&(a?(i=i.xFocusScale?i.xFocusScale(a):n(a.time),n=r(a.val[t]),e.attr({cx:i,cy:n})):e.style("visibility","hidden"))},_render_area:function(){var t=this,e=t.getLineType()||"linear";function n(e){return t.chart.axisX.scale()(e.time)}function r(e){return t.scale()(e.val.max)}function i(e){return t.scale()(e.val.min)}function a(){return t.dataPoint.color}var o=d3.svg.area().interpolate(e).x(n).y0(r).y1(i),e=t.svg._path;e||(t.svg._path=t.svg.append("path").style({"pointer-events":"none",opacity:.8})),e=t.svg._path,t._create_update_focusPoint(1),t._create_update_focusPoint(2),e.attr("d",function(){return o(t.values)}).style({"pointer-events":"none",stroke:a,fill:a}),_.includes(["points","linePoints"],t.getLineType())?(t.svg.selectAll("circle.point.max").data(t.values).enter().append("circle").attr("class","point max"),t.svg.selectAll("circle.point.min").data(t.values).enter().append("circle").attr("class","point min"),t.svg.selectAll("circle.point.max").attr("cx",n).attr("cy",r).attr("r",4).attr("fill","transparent").attr("stroke",a),t.svg.selectAll("circle.point.min").attr("cx",n).attr("cy",i).attr("r",4).attr("fill","transparent").attr("stroke",a)):t.svg.selectAll("circle.point").remove()},onMove:function(e,t){var n=this.getNearIndex(e);this.hover(n,e,t)},hoverValue:function(){var e,t=this.getRenderType(),n=this.overPoint,r=this.dataPoint.unit||"",i=" -- ";return i=n&&(e=(n=n.val).min,n=n.max,"min"===t&&(i="".concat(e," ").concat(r)),"max"===t&&(i="".concat(n," ").concat(r)),"area"===t)?"".concat(e," ").concat(r," — ").concat(n," ").concat(r):i},hoverTime:function(){var e=this.overPoint;return e?moment(e.time):"--"},getNearIndex:function(e){var t=e,n=this.values,r=n.length-1,e=this.bisect(n,e,1,r),r=n[e-1]&&n[e-1].time,n=n[e]&&n[e].time;return!_.isUndefined(r)&&(_.isUndefined(n)||t-r<n-t)?e-1:e},measurementFits:function(e){return a.rtMeasurementForDatapoint(this.dataPoint)(e)},addFocusPointEvent:function(e){var n=this,r=n.chart;e.on("click",function(){var e,t;r.allowSelectFocusTime&&(e={target:(n.dataPoint.__target||{}).id,date:moment(n._focusPointTime).format("YYYY-MM-DDTHH:mm:ss.SSSZ")},(t=r.selectedPoint)&&moment(e.date).isSame(moment(t.date))?r.clearSelectPoint():r.setSelectPoint(e))}),e.on("mouseenter",function(){r.allowSelectFocusTime&&e.style({cursor:"pointer"}).attr({r:6})}),e.on("mouseleave",function(){r.allowSelectFocusTime&&e.style({cursor:"default"}).attr({r:3})})},realtimeMeasurement:function(e){function t(){r.appendValues(_.flattenDeep(r.__realtimeToAppend)),r.__realtimeToAppend=[],r.__realtimeToAppendTimout=void 0,r.chart.render()}var n,r=this,e=r.measurementFits(e);return e&&(r.__realtimeToAppend||(r.__realtimeToAppend=[]),r.__realtimeToAppend.push(e.values),(n=r.chart.axisX.getDebouncePreference()).reset?(clearTimeout(r.__realtimeToAppendTimout),t()):r.__realtimeToAppendTimout||i.runOutsideAngular(function(){r.__realtimeToAppendTimout=setTimeout(t,n.debounceTime)})),e}},t}e.$inject=["$injector","c8yBase","c8yMeasurements","c8yChartCommon"],angular.module("c8y.core.measurements2").factory("c8ySeries",e)}();
|
|
1
|
+
"use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}!function(){function e(e,r,a,s){var i;function o(e,t,n,r,i){return a.listForDataPoint(e,t,n,"NONE"!==r?r:void 0,i)}function t(e,t){var n=this;return n.chart=e,n.dataPoint=t,n.hoverItems=[],n.values=[],n.implicitDomain={},n.bisect=d3.bisector(function(e){return e.time}).right,n.loadSeriesData=r.latest(o),n}return i=e.has("ngZone")?e.get("ngZone"):{runOutsideAngular:function(e){return e()}},t.prototype={defaultRenderType:"min",defaultLineType:"line",loadDataAndRender:function(e,t,n){var r=this;return r.loadData(e,t,n).finally(function(){r.chart.render()})},loadData:function(e,t,n){var r=this,i=r.dataPoint,a=r._aggregation;return this.loadSeriesData(i,e,t,n,r.chart).then(function(e){return a!==n&&(r.values.length=0,r._aggregation=n,r.resetImplicitDomain()),r.appendValues(e.values),!i.unit&&e.dataPoint.unit&&e.dataPoint.unit.length&&(i.unit=e.dataPoint.unit),e})},appendValues:function(e){var i=this,a=i.values,o=i.implicitDomain;return _.forEach(e,function(e){var t,n,r;_.isFinite(e.min)&&_.isFinite(e.max)&&(r=new Date(e.time),t=r.getTime(),n=_.find(a,function(e){return t===e.time.getTime()}),r={time:r,val:{min:e.min,max:e.max}},a.length&&_.last(a).time.getTime()>t&&(i._valuesSortingNeeded=!0),n?_.assign(n,r):a.push(r),(_.isUndefined(o.min)||e.min<o.min)&&(o.min=e.min),_.isUndefined(o.max)||e.max>o.max)&&(o.max=e.max)}),a},destroy:function(){this.svg&&this.svg.remove(),this.hoverItems=[],delete this.svg},resetImplicitDomain:function(){this.implicitDomain.min=void 0,this.implicitDomain.max=void 0},domain:function(){var e=this.dataPoint,t=this.implicitDomain,n=_.isUndefined(e.min)||""===e.min||_.isNull(e.min)?t.min:Number(e.min),e=_.isUndefined(e.max)||""===e.max||_.isNull(e.max)?t.max:Number(e.max);return(_.isUndefined(n)||Number.isNaN(n))&&(n=d3.min(this.values,function(e){return e.val.min}),_.isUndefined(n)||(t.min=n),n=n||0),(_.isUndefined(e)||Number.isNaN(e))&&(e=d3.max(this.values,function(e){return e.val.max}),_.isUndefined(e)||(t.max=e),e=e||0),n===e&&(--n,e+=1),[n,e]},scale:function(){return this.chart.scaleY().domain(this.domain())},getRenderType:function(){return this.dataPoint.renderType||this.renderType||this.defaultRenderType},getLineType:function(){return this.dataPoint.lineType||this.lineType||this.defaultLineType},render:function(){var e,t=this,n=t.chart.svgSeries,r=t.getRenderType(),i=t.getLineType(),a=t.values,o=t.svg;!o||o.minOrMax===r&&o.chartType===r||t.destroy(),t.svg||(e=t.chart.margins,t.svg=n.append("g").attr("transform",s.translate(e.l,e.t)).attr("class","series"),(o=t.svg).minOrMax=r,o.chartType=i),t._valuesSortingNeeded&&(delete t._valuesSortingNeeded,a.sort(function(e,t){return e.time>t.time?1:e.time<t.time?-1:0})),t.chart.allowSelectFocusTime||t.removeOldHiddenValues(),"bars"===i?t._render_bars():"area"!==r?t._render_path(r):t._render_area()},removeOldHiddenValues:function(){var e=this.values,n=this.chart.axisX._from,r=0;_.forEach(e,function(e,t){return!moment(e.time).isSameOrAfter(n)||(r=t-1,!1)}),r&&e.splice(0,r)},_render_path:function(t){var n=this,e=n.svg._path;function r(e){return n.chart.axisX.scale()(e.time)}function i(e){return n.scale()(e.val[t])}function a(){return n.dataPoint.color}e||(n.svg._path=n.svg.append("path"),(e=n.svg._path).style({"pointer-events":"none"})),n._create_update_focusPoint(1),n._render_path_line(e,r,i,a),n._render_path_points(r,i,a)},_render_path_line:function(e,t,n,r){var i=this,a=i.getLineType()||"linear",o=d3.svg.line().interpolate(a).x(t).y(n);_.includes(["bars","points"],i.getLineType())?(e.remove(),i.svg._path=void 0):e.attr("d",function(){return o(i.values)}).style({fill:"transparent",stroke:r})},_render_path_points:function(e,t,n){var r;_.includes(["points","linePoints"],this.getLineType())?((r=this.svg.selectAll("circle.point").data(this.values)).enter().append("circle").attr("class","point"),r.exit().remove(),r.attr("cx",e).attr("cy",t).attr("r",4).attr("fill","transparent").attr("stroke",n)):this.svg.selectAll("circle.point").remove()},_render_bars:function(){var r=this,e=_.filter(r.chart.series,function(e){return e.getLineType()===r.getLineType()}),n=e.length,i=_.findIndex(e,function(e){return e===r}),a=r.svg.minOrMax,e=function(){var t=r.chart.axisX.scale();if(r._aggregation)return function(e){return t(e.time)-n*s()/2+i*s()};return function(e){return t(e.time)}}(),t=c(),o=u(t),s=function(){var e=1;{var t;r._aggregation&&(t=function(e){var t=r.chart.axisX.scale(),n=_slicedToArray(t.domain(),1)[0],e=moment(n).add(1,{MINUTELY:"minute",HOURLY:"hour",DAILY:"day"}[e]).toDate();return t(e)-t(n)}(r._aggregation),(e=20<(e=t/(n+1))?20:e)<1)&&(e=1)}return _.constant(e)}();function c(e){var t=r.scale(),n=(n=e)||("area"===a?"max":a);return function(e){return t(e.val[n])}}function l(t){var n=_.max(r.scale().range());return function(e){e=t(e);return n<e?n:e}}function u(t){var n=r.scale().range();return function(e){return Math.abs(_.max(n)-t(e))}}var e={x:e,y:l(t),width:s,height:o,fill:function(){return r.dataPoint.color}},t=r.svg.selectAll(".bars").data(r.values),o=t.enter().append("g").style("pointer-events","none").attr("class",function(e,t){return"bar index".concat(t)});o.append("rect").attr("class","barmain"),t.exit().remove(),t.select(".barmain").attr(e),"area"===a&&r._aggregation&&(o.append("rect").attr("class","barmin").style("opacity","0.2"),o=c("min"),o=_.defaults({fill:"#000",y:l(o),height:u(o)},e),t.select(".barmin").attr(o)),r._aggregation||r._create_update_focusPoint(1)},hover:function(e){var t=this,n=t.getRenderType(),r=t.getLineType(),i=t.values[e];(t.overPoint=i)&&(t._focusPointTime=i.time,"bars"===r)&&this._hover_bars(e),t._render_focusPoint(1,"area"!==n?n:"max"),t._render_focusPoint(2,"area"!==n?n:"min")},_hover_bars:function(e){this.svg.select(".hover").classed("hover",!1).style({opacity:1}),this.svg.select(".index".concat(e," .barmain")).classed("hover",!0).style({opacity:.5})},mouseleave:function(){"bars"===this.getLineType()&&this.svg.select(".hover").classed("hover",!1).style({opacity:1})},_create_update_focusPoint:function(e){var t=this,e="focusPoint".concat(e),n=t.svg[e];n||(t.svg[e]=t.svg.append("circle").style({visibility:t.chart.hoverItemsVisible?"visible":"hidden","pointer-events":"all"}).attr({cx:0,cy:0,r:3}),n=t.svg[e],t.addFocusPointEvent(n),t.hoverItems.push(n)),n.attr({fill:function(){return t.dataPoint.color}})},_render_focusPoint:function(e,t){var n=this.chart.axisX.scale(),r=this.scale(),i=this.svg,a=this.overPoint,e=i&&i["focusPoint".concat(e)];e&&(a?(i=i.xFocusScale?i.xFocusScale(a):n(a.time),n=r(a.val[t]),e.attr({cx:i,cy:n})):e.style("visibility","hidden"))},_render_area:function(){var t=this,e=t.getLineType()||"linear";function n(e){return t.chart.axisX.scale()(e.time)}function r(e){return t.scale()(e.val.max)}function i(e){return t.scale()(e.val.min)}function a(){return t.dataPoint.color}var o=d3.svg.area().interpolate(e).x(n).y0(r).y1(i),e=t.svg._path;e||(t.svg._path=t.svg.append("path").style({"pointer-events":"none",opacity:.8})),e=t.svg._path,t._create_update_focusPoint(1),t._create_update_focusPoint(2),e.attr("d",function(){return o(t.values)}).style({"pointer-events":"none",stroke:a,fill:a}),_.includes(["points","linePoints"],t.getLineType())?(t.svg.selectAll("circle.point.max").data(t.values).enter().append("circle").attr("class","point max"),t.svg.selectAll("circle.point.min").data(t.values).enter().append("circle").attr("class","point min"),t.svg.selectAll("circle.point.max").attr("cx",n).attr("cy",r).attr("r",4).attr("fill","transparent").attr("stroke",a),t.svg.selectAll("circle.point.min").attr("cx",n).attr("cy",i).attr("r",4).attr("fill","transparent").attr("stroke",a)):t.svg.selectAll("circle.point").remove()},onMove:function(e,t){var n=this.getNearIndex(e);this.hover(n,e,t)},hoverValue:function(){var e,t=this.getRenderType(),n=this.overPoint,r=this.dataPoint.unit||"",i=" -- ";return i=n&&(e=(n=n.val).min,n=n.max,"min"===t&&(i="".concat(e," ").concat(r)),"max"===t&&(i="".concat(n," ").concat(r)),"area"===t)?"".concat(e," ").concat(r," — ").concat(n," ").concat(r):i},hoverTime:function(){var e=this.overPoint;return e?moment(e.time):"--"},getNearIndex:function(e){var t=e,n=this.values,r=n.length-1,e=this.bisect(n,e,1,r),r=n[e-1]&&n[e-1].time,n=n[e]&&n[e].time;return!_.isUndefined(r)&&(_.isUndefined(n)||t-r<n-t)?e-1:e},measurementFits:function(e){return a.rtMeasurementForDatapoint(this.dataPoint)(e)},addFocusPointEvent:function(e){var n=this,r=n.chart;e.on("click",function(){var e,t;r.allowSelectFocusTime&&(e={target:(n.dataPoint.__target||{}).id,date:moment(n._focusPointTime).format("YYYY-MM-DDTHH:mm:ss.SSSZ")},(t=r.selectedPoint)&&moment(e.date).isSame(moment(t.date))?r.clearSelectPoint():r.setSelectPoint(e))}),e.on("mouseenter",function(){r.allowSelectFocusTime&&e.style({cursor:"pointer"}).attr({r:6})}),e.on("mouseleave",function(){r.allowSelectFocusTime&&e.style({cursor:"default"}).attr({r:3})})},realtimeMeasurement:function(e){function t(){r.appendValues(_.flattenDeep(r.__realtimeToAppend)),r.__realtimeToAppend=[],r.__realtimeToAppendTimout=void 0,r.chart.render()}var n,r=this,e=r.measurementFits(e);return e&&(r.__realtimeToAppend||(r.__realtimeToAppend=[]),r.__realtimeToAppend.push(e.values),(n=r.chart.axisX.getDebouncePreference()).reset?(clearTimeout(r.__realtimeToAppendTimout),t()):r.__realtimeToAppendTimout||i.runOutsideAngular(function(){r.__realtimeToAppendTimout=setTimeout(t,n.debounceTime)})),e}},t}e.$inject=["$injector","c8yBase","c8yMeasurements","c8yChartCommon"],angular.module("c8y.core.measurements2").factory("c8ySeries",e)}();
|