@c8y/ng1-modules 1023.61.12 → 1023.62.2

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.
@@ -12937,6 +12937,9 @@ msgstr "Eigenschaftsbibliothek"
12937
12937
  msgid "Property"
12938
12938
  msgstr "Eigenschaft"
12939
12939
 
12940
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12941
+ msgstr "Die Eigenschaft wurde für ein anderes Asset konfiguriert. Bitte passen Sie die Konfiguration an das aktuelle Asset an."
12942
+
12940
12943
  msgid "Property deleted."
12941
12944
  msgstr "Eigenschaft gelöscht."
12942
12945
 
@@ -15617,6 +15620,9 @@ msgstr "Zeige folgende Checkboxen"
15617
15620
  msgid "Show cleared alarms"
15618
15621
  msgstr "Aufgehobene Alarme anzeigen"
15619
15622
 
15623
+ msgid "Show controls directly in the widget view for easier access."
15624
+ msgstr "Zeige die Steuerungen direkt in der Widget-Ansicht an, um den Zugriff zu vereinfachen."
15625
+
15620
15626
  msgid "Show data point"
15621
15627
  msgstr "Datenpunkt anzeigen"
15622
15628
 
@@ -12935,6 +12935,9 @@ msgstr "Biblioteca de propiedades"
12935
12935
  msgid "Property"
12936
12936
  msgstr "Propiedad"
12937
12937
 
12938
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12939
+ msgstr "La propiedad está configurada para un activo diferente. Reconfigúrala para que coincida con el activo actual."
12940
+
12938
12941
  msgid "Property deleted."
12939
12942
  msgstr "Propiedad eliminada."
12940
12943
 
@@ -15616,6 +15619,9 @@ msgstr "Mostrar las casillas de verificación que son"
15616
15619
  msgid "Show cleared alarms"
15617
15620
  msgstr "Mostrar alarmas eliminadas"
15618
15621
 
15622
+ msgid "Show controls directly in the widget view for easier access."
15623
+ msgstr "Mostrar los controles directamente en la vista del Widget para facilitar el acceso."
15624
+
15619
15625
  msgid "Show data point"
15620
15626
  msgstr "Mostrar punto de datos"
15621
15627
 
@@ -12953,6 +12953,9 @@ msgstr "Bibliothèque de propriétés"
12953
12953
  msgid "Property"
12954
12954
  msgstr "Propriété"
12955
12955
 
12956
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12957
+ msgstr "Propriété configurée pour un autre actif. Veuillez la reconfigurer pour qu'elle corresponde à l'actif actuel."
12958
+
12956
12959
  msgid "Property deleted."
12957
12960
  msgstr "Propriété supprimée."
12958
12961
 
@@ -15634,6 +15637,9 @@ msgstr "Afficher cases à cocher qui sont"
15634
15637
  msgid "Show cleared alarms"
15635
15638
  msgstr "Afficher les alarmes effacées"
15636
15639
 
15640
+ msgid "Show controls directly in the widget view for easier access."
15641
+ msgstr "Afficher les commandes directement dans la vue du Widget pour faciliter l'accès."
15642
+
15637
15643
  msgid "Show data point"
15638
15644
  msgstr "Afficher le point de données"
15639
15645
 
@@ -12845,6 +12845,9 @@ msgstr "プロパティ ライブラリ"
12845
12845
  msgid "Property"
12846
12846
  msgstr "プロパティ"
12847
12847
 
12848
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12849
+ msgstr ""
12850
+
12848
12851
  msgid "Property deleted."
12849
12852
  msgstr "プロパティが削除されました。"
12850
12853
 
@@ -15525,6 +15528,9 @@ msgstr "次のチェックボックスを表示"
15525
15528
  msgid "Show cleared alarms"
15526
15529
  msgstr "クリアされたアラームを表示"
15527
15530
 
15531
+ msgid "Show controls directly in the widget view for easier access."
15532
+ msgstr ""
15533
+
15528
15534
  msgid "Show data point"
15529
15535
  msgstr "データ ポイントを表示する"
15530
15536
 
@@ -12922,6 +12922,9 @@ msgstr "속성 라이브러리"
12922
12922
  msgid "Property"
12923
12923
  msgstr "속성"
12924
12924
 
12925
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12926
+ msgstr "이 속성은 다른 자산에 대해 설정된 것입니다. 현재 자산에 맞게 재설정하십시오."
12927
+
12925
12928
  msgid "Property deleted."
12926
12929
  msgstr "속성이 삭제되었습니다."
12927
12930
 
@@ -15603,6 +15606,9 @@ msgstr "다음 확인란 표시"
15603
15606
  msgid "Show cleared alarms"
15604
15607
  msgstr "해제된 알람 표시"
15605
15608
 
15609
+ msgid "Show controls directly in the widget view for easier access."
15610
+ msgstr "위젯 뷰에 제어를 직접 표시하여 더 쉽게 접근할 수 있도록 합니다."
15611
+
15606
15612
  msgid "Show data point"
15607
15613
  msgstr "데이터 요소 표시"
15608
15614
 
@@ -12952,6 +12952,9 @@ msgstr "Eigenschappenbibliotheek"
12952
12952
  msgid "Property"
12953
12953
  msgstr "Eigenschap"
12954
12954
 
12955
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12956
+ msgstr "Dit object heeft een andere eigenschap dan het huidige bedrijfsmiddel. Pas de configuratie aan zodat deze overeenkomt met het actuele bedrijfsmiddel."
12957
+
12955
12958
  msgid "Property deleted."
12956
12959
  msgstr "Eigenschap verwijderd."
12957
12960
 
@@ -15633,6 +15636,9 @@ msgstr "Selectievakjes weergeven die zijn"
15633
15636
  msgid "Show cleared alarms"
15634
15637
  msgstr "Gewiste alarmen tonen"
15635
15638
 
15639
+ msgid "Show controls directly in the widget view for easier access."
15640
+ msgstr "Weergeef de besturingen direct in de Widget-weergave, zodat ze gemakkelijker toegankelijk zijn."
15641
+
15636
15642
  msgid "Show data point"
15637
15643
  msgstr "Gegevenspunt weergeven"
15638
15644
 
@@ -12998,6 +12998,9 @@ msgstr "Biblioteka właściwości"
12998
12998
  msgid "Property"
12999
12999
  msgstr "Właściwość"
13000
13000
 
13001
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
13002
+ msgstr "Właściwość skonfigurowana dla innego zasobu. Należy ją ponownie skonfigurować tak, aby odpowiadała bieżącemu zasobowi."
13003
+
13001
13004
  msgid "Property deleted."
13002
13005
  msgstr "Usunięto właściwość."
13003
13006
 
@@ -15679,6 +15682,9 @@ msgstr "Pokaż pola wyboru, które są"
15679
15682
  msgid "Show cleared alarms"
15680
15683
  msgstr "Pokaż wyczyszczone alarmy"
15681
15684
 
15685
+ msgid "Show controls directly in the widget view for easier access."
15686
+ msgstr "Pokaż elementy sterujące bezpośrednio w widoku widżetu, aby ułatwić dostęp."
15687
+
15682
15688
  msgid "Show data point"
15683
15689
  msgstr "Pokaż punkt danych"
15684
15690
 
@@ -12950,6 +12950,9 @@ msgstr "Biblioteca de propriedades"
12950
12950
  msgid "Property"
12951
12951
  msgstr "Propriedade"
12952
12952
 
12953
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12954
+ msgstr "A propriedade está configurada para um ativo diferente. Reconfigure-a para corresponder ao ativo atual."
12955
+
12953
12956
  msgid "Property deleted."
12954
12957
  msgstr "Propriedade excluída."
12955
12958
 
@@ -15631,6 +15634,9 @@ msgstr "Mostrar caixas de verificação que estão"
15631
15634
  msgid "Show cleared alarms"
15632
15635
  msgstr "Mostrar alarmes apagados"
15633
15636
 
15637
+ msgid "Show controls directly in the widget view for easier access."
15638
+ msgstr "Mostrar os controles diretamente na visualização do Widget para facilitar o acesso."
15639
+
15634
15640
  msgid "Show data point"
15635
15641
  msgstr "Mostrar ponto de dados"
15636
15642
 
@@ -12928,6 +12928,9 @@ msgstr "属性库"
12928
12928
  msgid "Property"
12929
12929
  msgstr "属性"
12930
12930
 
12931
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12932
+ msgstr "该属性配置的资产不正确。请重新配置以匹配当前资产。"
12933
+
12931
12934
  msgid "Property deleted."
12932
12935
  msgstr "已删除属性。"
12933
12936
 
@@ -15609,6 +15612,9 @@ msgstr "显示符合以下条件的复选框:"
15609
15612
  msgid "Show cleared alarms"
15610
15613
  msgstr "显示清除的警报"
15611
15614
 
15615
+ msgid "Show controls directly in the widget view for easier access."
15616
+ msgstr "在小小组件视图中直接显示控制,以便于操作。"
15617
+
15612
15618
  msgid "Show data point"
15613
15619
  msgstr "显示数据点"
15614
15620
 
@@ -12924,6 +12924,9 @@ msgstr "属性库"
12924
12924
  msgid "Property"
12925
12925
  msgstr "属性"
12926
12926
 
12927
+ msgid "Property configured for a different asset. Reconfigure to match current asset."
12928
+ msgstr "此属性已针对其他资产进行设置。请重新设置以符合当前资产。"
12929
+
12927
12930
  msgid "Property deleted."
12928
12931
  msgstr "已删除属性。"
12929
12932
 
@@ -15605,6 +15608,9 @@ msgstr "顯示符合以下条件的复选框:"
15605
15608
  msgid "Show cleared alarms"
15606
15609
  msgstr "顯示清除的警报"
15607
15610
 
15611
+ msgid "Show controls directly in the widget view for easier access."
15612
+ msgstr "將控制項直接顯示在小组件視圖中,以便於存取。"
15613
+
15608
15614
  msgid "Show data point"
15609
15615
  msgstr "顯示資料點"
15610
15616
 
@@ -1 +1 @@
1
- function ownKeys(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(()=>{function e(E,D,T,e,t,n,M,$,A,r,R,U,a,B,I,z,x,F,K){return o.$inject=["$scope","$element"],{restrict:"EA",templateUrl:":::PLUGIN_PATH:::/ui/views/map2.html",scope:{multipleDevices:"&",realtime:"&",cssClass:"@",deviceId:"&",config:"&",markerTemplate:"&",controlButtons:"&",noDataFetch:"&",map:"=?",c8yLegend:"&"},link:function(e){e.$on("dashboard-change",function(){e.map&&e.map.leafletMap&&e.map.leafletMap.invalidateSize()})},controller:o};function o(i,e){var n,t={padding:[50,50]},c=[],s=!1,l=z("The map widget displays up to {{count}} devices."),r={mapCustomBaseLayers:A.getPluginService("mapCustomBaseLayers"),ecbPositionSelector:A.getPluginService("ecbPositionSelector"),mapMarkerClusterer:A.getPluginService("mapMarkerClusterer")},u=(i.map=this,e.addClass(i.cssClass),L.map(e.find(".c8y-map-internal").get(0),{attributionControl:!1}).fitBounds(L.latLngBounds(L.latLng(14,-130.3),L.latLng(53.9,112.3)))),e=(i.map.leafletMap=u,L.Browser.mobile&&(e=z("Use two fingers to move the map."),u.dragging.disable(),u._container.setAttribute("data-touch-warning-content",x.getString(e)),u._container.addEventListener("touchstart",f),u._container.addEventListener("touchmove",f),u._container.addEventListener("touchend",f),u._container.addEventListener("touchcancel",f),u._container.addEventListener("click",f)),i.map.event=i.$new(!0),i.map.markers=c,L.tileLayer("//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{noWrap:!0})),a=(e.addTo(u),r.mapMarkerClusterer&&r.mapMarkerClusterer.applyClustering({mapInternalScope:i}),i.map.tracker=new R.Tracker(i),i.tracker=i.map.tracker,i.tracker.onPaths(function(e,t){n&&u.removeLayer(n);(n=e).addTo(u),t&&y(n.getBounds())}),i.$on("$destroy",function(){i.cleanRealtime&&i.cleanRealtime(),s=!0,L.Browser.mobile&&(u._container.removeEventListener("touchstart",f),u._container.removeEventListener("touchmove",f),u._container.removeEventListener("touchend",f),u._container.removeEventListener("touchcancel",f),u._container.removeEventListener("click",f))}),L.Control.extend({options:{position:"topright"},onAdd:function(){var e=L.DomUtil.create("div");return angular.element(e).html('\n <c8y-realtime-switch\n ng-if="!realtime()"\n get-state="state()"\n on-start="startRt()"\n on-stop="stopRt()"\n ></c8y-realtime-switch>\n <c8y-refresh-btn></c8y-refresh-btn>\n '),D(e)(i),e}})),o=L.Control.extend({options:{position:"bottomright"},onAdd:function(){var e=L.DomUtil.create("div");return angular.element(e).html("<div c8y-map-legend></div>"),D(e)(i),e}}),e=L.control.layers({OSM:e}),p=i.map.layersControl=e,d=u,e=I.getBaseLayers(i.map),m=I.getOverlays(i.map),g=E.reject();function f(e){for(var t=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],n=!1,r=0;r<t.length;r++)L.DomUtil.hasClass(e.target,t[r])&&(n=!0);n?L.DomUtil.hasClass(e.target,"leaflet-interactive")&&"touchmove"===e.type&&1===e.touches.length?(L.DomUtil.addClass(u._container,"touch-warning"),u.dragging.disable()):L.DomUtil.removeClass(u._container,"touch-warning"):"touchmove"!==e.type&&"touchstart"!==e.type?L.DomUtil.removeClass(u._container,"touch-warning"):1===e.touches.length?(L.DomUtil.addClass(u._container,"touch-warning"),u.dragging.disable()):(u.dragging.enable(),L.DomUtil.removeClass(u._container,"touch-warning"))}function v(){var e=i.deviceId(),e=e?(e=>e=_.isArray(e)?h(e):e&&i.multipleDevices()?h((e=>({__or:[{__and:[{__or:[{id:e},{__bygroupid:e}]},{__has:"".concat(U.c8y_Position,".lat")},{__has:"".concat(U.c8y_Position,".lng")}]}]}))(e)):e?h([e]):h())(e):h();return e.then(function(e){i.tracker.getActiveDeviceIds().length||y(e.getBounds())})}function y(e){e&&e.isValid()&&u.fitBounds(e,t)}function h(t){function a(e){var n,r;return e.then(function(e){var t=e.statistics;return n=e.paging.next,r=t.pageSize,e}).then(function(e){return _(e).filter(function(e){var t=U.getLocationFragment(e);return!(!t||180<Math.abs(t.lng)||90<Math.abs(t.lat))||(console.warn("Device ".concat(e.name," has an invalid position!")),!1)}).reduce(function(e,t){return e[t.id]=t,e},{})}).then(function(e){return o=((e,t,n)=>{var e=_objectSpread({},e),r=Object.keys(e).length;return e=r+Object.keys(t).length<=n?_objectSpread(_objectSpread({},e),t):(C()||F.info(x.getString(l,{count:n})),t=Object.entries(t).filter(function(e,t){return void 0!==e&&t+r<n}).reduce(function(e,t){return e[t[0]]=t[1],e},{}),_objectSpread(_objectSpread({},e),t))})(o,e,r),Object.keys(o).length<r&&n&&!s&&a(n()),Object.keys(o).length>=r&&n&&!C()&&F.info(x.getString(l,{count:r})),o}).then(function(e){i.devices=[],_.forEach(c,function(e){u.removeLayer(e)}),c.length=0,i.devices=e,_.forEach(e,function(e){var t=b(e),n=U.getLocationFragment(e),r=L.marker(L.latLng(n.lat,n.lng),{icon:t});r.on("click",function(){r.isPopupOpen()&&r.getPopup()||P(e,r)}),r.id=e.id,c.push(r)});e=new L.featureGroup(c);return e.addTo(u),e}).then(function(e){return i.map.event.$broadcast("refresh",t),e}).then(function(e){i.tracker.getActiveDeviceIds().length||y(e.getBounds())})}var e,n,o={};return i.noDataFetch()?E.reject():(delete i.filterIds,r.ecbPositionSelector?e=r.ecbPositionSelector.getPositionedDevicesByEvents():(e=t&&"object"===_typeof(t)&&!_.isArray(t)?M.listQuery(t,{pageSize:O()}):t&&t.length?(n=_.uniq(t),function t(e){var n=O();var r=_.take(e,n);var a=_.drop(e,n);return M.list({ids:r.join(","),pageSize:n}).then(function(e){return a.length&&(e.paging.next=function(){return t(a)}),e})}(i.filterIds=n)):(n={__or:[{__and:[{__has:"".concat(U.c8y_Position,".lat")},{__has:"".concat(U.c8y_Position,".lng")}]}]},M.listQuery(n,{pageSize:O()})),S()),a(e))}function b(e){var t=e.c8y_ActiveAlarmsStatus||{},e=_.find(["critical","major","minor","warning"],function(e){return t[e]})||"normal";return L.divIcon({className:"".concat(e,"-marker-icon"),iconSize:[25,41],iconAnchor:[12.5,41]})}function P(e,a){var n;n=e,e={fragmentType:"c8y_Position",dateFrom:"1970-01-01",dateTo:moment().add(1,"days").format("YYYY-MM-DD"),pageSize:1,source:n.id},B.list(e).then(function(e){var e=e.length?e[0].time:void 0,t=n;return i.markerTemplate()||(i.markerTemplate=k),e=T("absoluteDate")(e),t='\n <div\n c8y-map-marker\n i-mo="devices['.concat(t.id,']"\n i-template="markerTemplate()"\n i-tracker="tracker"\n last-updated="\'').concat(e,"'\"\n ></div>\n "),e=angular.element(t),D(e)(i),e.get(0)}).then(function(e){var t=a,n=t.getPopup(),r=n||L.popup({minWidth:120});return t.bindPopup(r,{offset:L.point(0,-20)}),r.setContent(e),n||t.openPopup(),r})}function k(){return"<div ng-include=\"'".concat(K,"'\"></div>")}function S(){var e=i.realtimeChannel,t="/managedobjects/*",n=i.filterIds,r=i.deviceId();if((n=r&&!n?[r]:n)&&(t="/managedobjects/".concat(n.join(","))),e){if(e===t)return;i.cleanRealtime()}e=t,i.realtimeChannel=e,$.addListener.bind($,i.$id,e)("UPDATE",function(e,t){var n,r=U.getLocationFragment(t);r&&((n=_.find(c,{id:t.id}))&&(n.setLatLng(L.latLng(r.lat,r.lng)),n.setIcon(b(t)),r=n.getPopup())&&r._isOpen&&P(t,n),i.devices&&i.devices[t.id]&&(i.devices[t.id]=t),i.map.event.$broadcast("realtime",t))}),i.cleanRealtime=function(){$.removeSubscriber(i.$id,e)},i.map.state=function(){return $.getStatus(i.$id,e)},i.map.startRt=function(){i.noDataFetch()||($.start(i.$id,e),i.tracker.state)||i.tracker.start()},i.map.stopRt=function(){$.stop(i.$id,e),i.tracker.state&&i.tracker.stop()},_.assign(i,{state:i.map.state,startRt:i.map.startRt,stopRt:i.map.stopRt}),i.realtime()&&!j()&&i.startRt()}function w(e){return _.get(window,"C8Y_APP.".concat(e))}function j(){return w("mapWidgetRealtimeDisabled")}function O(){var e=w("mapWidgetPageSize");return e&&!_.isNaN(e)?e:100}function C(){return w("mapWidgetHideMaxDeviceOnMapHint")}r.mapCustomBaseLayers&&(g=r.mapCustomBaseLayers.create({google:!0,here:!0,bing:!0,googleSatellite:!0,hereSatellite:!0,bingSatellite:!0})),E.any(_.values(e).concat(g,_.values(m))).then(function(e){_.isEmpty(e)||p.addTo(d)}),_.forEach(e,function(e,t){e.then(function(e){p.addBaseLayer(e,t)})}),g.then(function(e){_.forEach(e,function(e){p.addBaseLayer(e.layer,e.name)})}),I.getUserOverlayPreferences().then(function(n){_.forEach(m,function(e,t){e.then(function(e){p.addOverlay(e,t),n[t]&&d.addLayer(e)})})}),u.on("overlayadd",function(e){I.setUserOverlayPreference(e,!0)}),u.on("overlayremove",function(e){I.setUserOverlayPreference(e,!1)}),i.controlButtons()&&u.addControl(new a),i.c8yLegend()&&u.addControl(new o),i.paging={refresh:!0},i.refresh=v,S(),i.$watch("deviceId()",v),i.$watch("noDataFetch()",function(e){e?i.stopRt():j()||i.startRt()})}}function t(n){return{restrict:"EA",scope:{iMo:"&",iTemplate:"&",iTracker:"&",lastUpdated:"="},link:function(t,e){_.assign(t,{mo:t.iMo(),tracker:_.defaults(t.iTracker(),{__gps:!1,__gsm:!1}),onTrackingChange:function(e){t.tracker.__gps||t.tracker.__gsm?t.tracker.activate(e,{gps:t.tracker.__gps,gsm:t.tracker.__gsm}):t.tracker.deactivate(e)}}),t.showTrackingOptions=!1,e.html(t.iTemplate()),n(e.contents())(t)}}}t.$inject=["$compile"],e.$inject=["$q","$compile","$filter","$http","$timeout","$injector","c8yInventory","c8yRealtime","c8yBase","c8yGroups","c8yTracker","c8yGeo","c8yApplication","c8yEvents","c8yMapConfig","gettext","gettextCatalog","c8yAlert","MARKER_TEMPLATE"],angular.module("c8y.ui").constant("MARKER_TEMPLATE",":::PLUGIN_PATH:::/ui/views/map2-markerTemplate.html").directive("c8yMapInternal",e).directive("c8yMapMarker",t).directive("c8yMapLegend",function(){return{restrict:"EA",templateUrl:":::PLUGIN_PATH:::/ui/views/map2-legend.html"}})})();
1
+ function ownKeys(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(()=>{function e(E,D,T,e,t,n,M,$,A,r,R,U,a,B,I,z,x,F,K){return o.$inject=["$scope","$element"],{restrict:"EA",templateUrl:":::PLUGIN_PATH:::/ui/views/map2.html",scope:{multipleDevices:"&",realtime:"&",cssClass:"@",deviceId:"&",config:"&",markerTemplate:"&",controlButtons:"&",noDataFetch:"&",map:"=?",c8yLegend:"&"},link:function(e){e.$on("dashboard-change",function(){e.map&&e.map.leafletMap&&e.map.leafletMap.invalidateSize()})},controller:o};function o(i,e){var n,t={padding:[50,50]},c=[],s=!1,l=z("The map widget displays up to {{count}} devices."),r={mapCustomBaseLayers:A.getPluginService("mapCustomBaseLayers"),ecbPositionSelector:A.getPluginService("ecbPositionSelector"),mapMarkerClusterer:A.getPluginService("mapMarkerClusterer")},u=(i.map=this,e.addClass(i.cssClass),L.map(e.find(".c8y-map-internal").get(0),{attributionControl:!1}).fitBounds(L.latLngBounds(L.latLng(14,-130.3),L.latLng(53.9,112.3)))),e=(i.map.leafletMap=u,L.Browser.mobile&&(e=z("Use two fingers to move the map."),u.dragging.disable(),u._container.setAttribute("data-touch-warning-content",x.getString(e)),u._container.addEventListener("touchstart",f),u._container.addEventListener("touchmove",f),u._container.addEventListener("touchend",f),u._container.addEventListener("touchcancel",f),u._container.addEventListener("click",f)),i.map.event=i.$new(!0),i.map.markers=c,L.tileLayer("//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{noWrap:!0,referrerPolicy:"strict-origin-when-cross-origin"})),a=(e.addTo(u),r.mapMarkerClusterer&&r.mapMarkerClusterer.applyClustering({mapInternalScope:i}),i.map.tracker=new R.Tracker(i),i.tracker=i.map.tracker,i.tracker.onPaths(function(e,t){n&&u.removeLayer(n);(n=e).addTo(u),t&&y(n.getBounds())}),i.$on("$destroy",function(){i.cleanRealtime&&i.cleanRealtime(),s=!0,L.Browser.mobile&&(u._container.removeEventListener("touchstart",f),u._container.removeEventListener("touchmove",f),u._container.removeEventListener("touchend",f),u._container.removeEventListener("touchcancel",f),u._container.removeEventListener("click",f))}),L.Control.extend({options:{position:"topright"},onAdd:function(){var e=L.DomUtil.create("div");return angular.element(e).html('\n <c8y-realtime-switch\n ng-if="!realtime()"\n get-state="state()"\n on-start="startRt()"\n on-stop="stopRt()"\n ></c8y-realtime-switch>\n <c8y-refresh-btn></c8y-refresh-btn>\n '),D(e)(i),e}})),o=L.Control.extend({options:{position:"bottomright"},onAdd:function(){var e=L.DomUtil.create("div");return angular.element(e).html("<div c8y-map-legend></div>"),D(e)(i),e}}),e=L.control.layers({OSM:e}),p=i.map.layersControl=e,d=u,e=I.getBaseLayers(i.map),m=I.getOverlays(i.map),g=E.reject();function f(e){for(var t=["leaflet-control-minimap","leaflet-interactive","leaflet-popup-content","leaflet-popup-content-wrapper","leaflet-popup-close-button","leaflet-control-zoom-in","leaflet-control-zoom-out"],n=!1,r=0;r<t.length;r++)L.DomUtil.hasClass(e.target,t[r])&&(n=!0);n?L.DomUtil.hasClass(e.target,"leaflet-interactive")&&"touchmove"===e.type&&1===e.touches.length?(L.DomUtil.addClass(u._container,"touch-warning"),u.dragging.disable()):L.DomUtil.removeClass(u._container,"touch-warning"):"touchmove"!==e.type&&"touchstart"!==e.type?L.DomUtil.removeClass(u._container,"touch-warning"):1===e.touches.length?(L.DomUtil.addClass(u._container,"touch-warning"),u.dragging.disable()):(u.dragging.enable(),L.DomUtil.removeClass(u._container,"touch-warning"))}function v(){var e=i.deviceId(),e=e?(e=>e=_.isArray(e)?h(e):e&&i.multipleDevices()?h((e=>({__or:[{__and:[{__or:[{id:e},{__bygroupid:e}]},{__has:"".concat(U.c8y_Position,".lat")},{__has:"".concat(U.c8y_Position,".lng")}]}]}))(e)):e?h([e]):h())(e):h();return e.then(function(e){i.tracker.getActiveDeviceIds().length||y(e.getBounds())})}function y(e){e&&e.isValid()&&u.fitBounds(e,t)}function h(t){function a(e){var n,r;return e.then(function(e){var t=e.statistics;return n=e.paging.next,r=t.pageSize,e}).then(function(e){return _(e).filter(function(e){var t=U.getLocationFragment(e);return!(!t||180<Math.abs(t.lng)||90<Math.abs(t.lat))||(console.warn("Device ".concat(e.name," has an invalid position!")),!1)}).reduce(function(e,t){return e[t.id]=t,e},{})}).then(function(e){return o=((e,t,n)=>{var e=_objectSpread({},e),r=Object.keys(e).length;return e=r+Object.keys(t).length<=n?_objectSpread(_objectSpread({},e),t):(C()||F.info(x.getString(l,{count:n})),t=Object.entries(t).filter(function(e,t){return void 0!==e&&t+r<n}).reduce(function(e,t){return e[t[0]]=t[1],e},{}),_objectSpread(_objectSpread({},e),t))})(o,e,r),Object.keys(o).length<r&&n&&!s&&a(n()),Object.keys(o).length>=r&&n&&!C()&&F.info(x.getString(l,{count:r})),o}).then(function(e){i.devices=[],_.forEach(c,function(e){u.removeLayer(e)}),c.length=0,i.devices=e,_.forEach(e,function(e){var t=b(e),n=U.getLocationFragment(e),r=L.marker(L.latLng(n.lat,n.lng),{icon:t});r.on("click",function(){r.isPopupOpen()&&r.getPopup()||P(e,r)}),r.id=e.id,c.push(r)});e=new L.featureGroup(c);return e.addTo(u),e}).then(function(e){return i.map.event.$broadcast("refresh",t),e}).then(function(e){i.tracker.getActiveDeviceIds().length||y(e.getBounds())})}var e,n,o={};return i.noDataFetch()?E.reject():(delete i.filterIds,r.ecbPositionSelector?e=r.ecbPositionSelector.getPositionedDevicesByEvents():(e=t&&"object"===_typeof(t)&&!_.isArray(t)?M.listQuery(t,{pageSize:O()}):t&&t.length?(n=_.uniq(t),function t(e){var n=O();var r=_.take(e,n);var a=_.drop(e,n);return M.list({ids:r.join(","),pageSize:n}).then(function(e){return a.length&&(e.paging.next=function(){return t(a)}),e})}(i.filterIds=n)):(n={__or:[{__and:[{__has:"".concat(U.c8y_Position,".lat")},{__has:"".concat(U.c8y_Position,".lng")}]}]},M.listQuery(n,{pageSize:O()})),w()),a(e))}function b(e){var t=e.c8y_ActiveAlarmsStatus||{},e=_.find(["critical","major","minor","warning"],function(e){return t[e]})||"normal";return L.divIcon({className:"".concat(e,"-marker-icon"),iconSize:[25,41],iconAnchor:[12.5,41]})}function P(e,a){var n;n=e,e={fragmentType:"c8y_Position",dateFrom:"1970-01-01",dateTo:moment().add(1,"days").format("YYYY-MM-DD"),pageSize:1,source:n.id},B.list(e).then(function(e){var e=e.length?e[0].time:void 0,t=n;return i.markerTemplate()||(i.markerTemplate=k),e=T("absoluteDate")(e),t='\n <div\n c8y-map-marker\n i-mo="devices['.concat(t.id,']"\n i-template="markerTemplate()"\n i-tracker="tracker"\n last-updated="\'').concat(e,"'\"\n ></div>\n "),e=angular.element(t),D(e)(i),e.get(0)}).then(function(e){var t=a,n=t.getPopup(),r=n||L.popup({minWidth:120});return t.bindPopup(r,{offset:L.point(0,-20)}),r.setContent(e),n||t.openPopup(),r})}function k(){return"<div ng-include=\"'".concat(K,"'\"></div>")}function w(){var e=i.realtimeChannel,t="/managedobjects/*",n=i.filterIds,r=i.deviceId();if((n=r&&!n?[r]:n)&&(t="/managedobjects/".concat(n.join(","))),e){if(e===t)return;i.cleanRealtime()}e=t,i.realtimeChannel=e,$.addListener.bind($,i.$id,e)("UPDATE",function(e,t){var n,r=U.getLocationFragment(t);r&&((n=_.find(c,{id:t.id}))&&(n.setLatLng(L.latLng(r.lat,r.lng)),n.setIcon(b(t)),r=n.getPopup())&&r._isOpen&&P(t,n),i.devices&&i.devices[t.id]&&(i.devices[t.id]=t),i.map.event.$broadcast("realtime",t))}),i.cleanRealtime=function(){$.removeSubscriber(i.$id,e)},i.map.state=function(){return $.getStatus(i.$id,e)},i.map.startRt=function(){i.noDataFetch()||($.start(i.$id,e),i.tracker.state)||i.tracker.start()},i.map.stopRt=function(){$.stop(i.$id,e),i.tracker.state&&i.tracker.stop()},_.assign(i,{state:i.map.state,startRt:i.map.startRt,stopRt:i.map.stopRt}),i.realtime()&&!j()&&i.startRt()}function S(e){return _.get(window,"C8Y_APP.".concat(e))}function j(){return S("mapWidgetRealtimeDisabled")}function O(){var e=S("mapWidgetPageSize");return e&&!_.isNaN(e)?e:100}function C(){return S("mapWidgetHideMaxDeviceOnMapHint")}r.mapCustomBaseLayers&&(g=r.mapCustomBaseLayers.create({google:!0,here:!0,bing:!0,googleSatellite:!0,hereSatellite:!0,bingSatellite:!0})),E.any(_.values(e).concat(g,_.values(m))).then(function(e){_.isEmpty(e)||p.addTo(d)}),_.forEach(e,function(e,t){e.then(function(e){p.addBaseLayer(e,t)})}),g.then(function(e){_.forEach(e,function(e){p.addBaseLayer(e.layer,e.name)})}),I.getUserOverlayPreferences().then(function(n){_.forEach(m,function(e,t){e.then(function(e){p.addOverlay(e,t),n[t]&&d.addLayer(e)})})}),u.on("overlayadd",function(e){I.setUserOverlayPreference(e,!0)}),u.on("overlayremove",function(e){I.setUserOverlayPreference(e,!1)}),i.controlButtons()&&u.addControl(new a),i.c8yLegend()&&u.addControl(new o),i.paging={refresh:!0},i.refresh=v,w(),i.$watch("deviceId()",v),i.$watch("noDataFetch()",function(e){e?i.stopRt():j()||i.startRt()})}}function t(n){return{restrict:"EA",scope:{iMo:"&",iTemplate:"&",iTracker:"&",lastUpdated:"="},link:function(t,e){_.assign(t,{mo:t.iMo(),tracker:_.defaults(t.iTracker(),{__gps:!1,__gsm:!1}),onTrackingChange:function(e){t.tracker.__gps||t.tracker.__gsm?t.tracker.activate(e,{gps:t.tracker.__gps,gsm:t.tracker.__gsm}):t.tracker.deactivate(e)}}),t.showTrackingOptions=!1,e.html(t.iTemplate()),n(e.contents())(t)}}}t.$inject=["$compile"],e.$inject=["$q","$compile","$filter","$http","$timeout","$injector","c8yInventory","c8yRealtime","c8yBase","c8yGroups","c8yTracker","c8yGeo","c8yApplication","c8yEvents","c8yMapConfig","gettext","gettextCatalog","c8yAlert","MARKER_TEMPLATE"],angular.module("c8y.ui").constant("MARKER_TEMPLATE",":::PLUGIN_PATH:::/ui/views/map2-markerTemplate.html").directive("c8yMapInternal",e).directive("c8yMapMarker",t).directive("c8yMapLegend",function(){return{restrict:"EA",templateUrl:":::PLUGIN_PATH:::/ui/views/map2-legend.html"}})})();
@@ -1 +1 @@
1
- (()=>{function e(e){var a=angular.bind(e,e.setDefaults);return e.setDefaults=function(e,t){e=_.isObjectLike(e)?e:{};return e.tileLayer||(e.tileLayer="//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"),a(e,t)},e}e.$inject=["$delegate"],angular.module("c8y.ui").decorator("leafletMapDefaults",e)})();
1
+ (()=>{function e(e){var t=angular.bind(e,e.setDefaults);return e.setDefaults=function(e,r){e=_.isObjectLike(e)?e:{};return e.tileLayer||(e.tileLayer="//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"),e.referrerPolicy||(e.referrerPolicy="strict-origin-when-cross-origin"),t(e,r)},e}e.$inject=["$delegate"],angular.module("c8y.ui").decorator("leafletMapDefaults",e)})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1023.61.12",
3
+ "version": "1023.62.2",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",
package/scada/index.js CHANGED
@@ -1 +1 @@
1
- (()=>{function e(e,t){e.add({name:"SCADA",description:t("Display a configurable SVG."),templateUrl:":::PLUGIN_PATH:::/views/component.html",configTemplateUrl:":::PLUGIN_PATH:::/views/componentConfig.html",previewImage:":::PLUGIN_PATH:::/img/scada-widget-pr.png",transformConfigWithContext:["config","context","dashboard",function(e,t,n){return n.deviceType&&e.deviceIds&&(e.deviceIds=_.mapValues(e.deviceIds,_.constant(t.id))),e}],options:{groupsSelectable:!0}})}e.$inject=["c8yComponentsProvider","gettext"],angular.module("c8y.parts.scadaWidget",[]).config(e)})();
1
+ function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(()=>{function e(e,t){function c(n){n&&"object"===_typeof(n)&&(Array.isArray(n)?n.forEach(c):Object.keys(n).forEach(function(e){var t,o;"__target"===e&&n[e]&&"object"===_typeof(n[e])?(o=(t=n[e]).id,n[e]={id:o,name:t.name,c8y_IsDevice:t.c8y_IsDevice}):c(n[e])}))}e.add({name:"SCADA",description:t("Display a configurable SVG."),templateUrl:":::PLUGIN_PATH:::/views/component.html",configTemplateUrl:":::PLUGIN_PATH:::/views/componentConfig.html",previewImage:":::PLUGIN_PATH:::/img/scada-widget-pr.png",transformConfigWithContext:["config","context","dashboard",function(e,t,o){return o.deviceType&&e.deviceIds&&(e.deviceIds=_.mapValues(e.deviceIds,_.constant(t.id)),c(e)),e}],options:{groupsSelectable:!0}})}e.$inject=["c8yComponentsProvider","gettext"],angular.module("c8y.parts.scadaWidget",[]).config(e)})();
@@ -1 +1 @@
1
- (()=>{function i(e,n,t,c,d,a,o){var r=this;function l(n){return _.find(r.devices,function(i){return n===i.id})}this.init=function(){e.child.config.deviceIds||(e.child.config.deviceIds={},_.forOwn(e.child.config.mapping,function(i,n){e.child.config.deviceIds[n]=e.child.config.device.id}));var i=_(e.child.config.deviceIds).values().uniq().map(function(i){return d.detailRealtime(i,e,function(i){i.name=t("truncate")(i.name)})}).value();n.all(i).then(function(i){r.devices=i,r.updateComputedProperties(e.child.config.deviceIds,e.child.config.mapping)}),c.detail(e.child.config.binaryId).then(function(i){r.svgFile=i.data,c.downloadAsDataUri(r.svgFile).then(c.decodeDataUri).then(function(i){return new File([i],r.svgFile.name,{type:r.svgFile.type})}).then(function(i){return o.sanitizeFileByLevel(i,e.child.config.sanitization)}).then(function(i){return c.readDataUri(i)}).then(c.decodeDataUri).then(function(i){r.svgFile.data=i})})},this.updateComputedProperties=function(i,e){i&&e&&_.forOwn(i,function(i,n){n=[e[n]];n.length&&a.attach(l(i),n)})},e.$watch("child.config",this.init,!0),e.$on("$destroy",function(){var i=_.uniq(_.values(e.child.config.deviceIds));_.forEach(i,function(i){a.detach(l(i))})})}i.$inject=["$scope","$q","$filter","c8yBinary","c8yDevices","c8yComputedProperties","c8ySanitizeHtml"],angular.module("c8y.parts.scadaWidget").controller("ScadaWidgetCtrl",i)})();
1
+ (()=>{function i(e,n,t,c,d,a,o){var i=this,r=this;function l(n){return _.find(r.devices,function(i){return n===i.id})}this.init=function(){e.child.config.deviceIds||(e.child.config.deviceIds={},_.forOwn(e.child.config.mapping,function(i,n){e.child.config.deviceIds[n]=e.child.config.device.id}));var i=_(e.child.config.deviceIds).values().uniq().map(function(i){return d.detailRealtime(i,e,function(i){i.name=t("truncate")(i.name)})}).value();n.all(i).then(function(i){r.devices=i,r.updateComputedProperties(e.child.config.deviceIds,e.child.config.mapping)}),c.detail(e.child.config.binaryId).then(function(i){r.svgFile=i.data,c.downloadAsDataUri(r.svgFile).then(c.decodeDataUri).then(function(i){return new File([i],r.svgFile.name,{type:r.svgFile.type})}).then(function(i){return o.sanitizeFileByLevel(i,e.child.config.sanitization)}).then(function(i){return c.readDataUri(i)}).then(c.decodeDataUri).then(function(i){r.svgFile.data=i})})},this.updateComputedProperties=function(i,e){i&&e&&_.forOwn(i,function(i,n){n=[e[n]];n.length&&a.attach(l(i),n)})},e.$watchGroup(["child.config.binaryId","child.config.sanitization","child.config.deviceIds"],function(){return i.init()}),e.$on("$destroy",function(){var i=_.uniq(_.values(e.child.config.deviceIds));_.forEach(i,function(i){a.detach(l(i))})})}i.$inject=["$scope","$q","$filter","c8yBinary","c8yDevices","c8yComputedProperties","c8ySanitizeHtml"],angular.module("c8y.parts.scadaWidget").controller("ScadaWidgetCtrl",i)})();