@c8y/ng1-modules 1023.14.130 → 1023.14.131
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 +1 -1
- package/scada/index.js +1 -1
- package/scada/widget.controller.js +1 -1
package/package.json
CHANGED
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,
|
|
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.$
|
|
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)})();
|