@c8y/ng1-modules 1018.0.161 → 1018.0.164

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/NOTICES CHANGED
@@ -2270,7 +2270,7 @@ SOFTWARE.
2270
2270
 
2271
2271
  -----
2272
2272
 
2273
- The following software may be included in this product: @trysound/sax, chownr, color-support, dezalgo, fs-minipass, fs-write-stream-atomic, glob, ignore-walk, ini, isexe, json-stringify-safe, lockfile, lru-cache, minimatch, minipass-collect, minipass-flush, minipass-pipeline, minipass-sized, mute-stream, nopt, npm-packlist, once, osenv, pseudomap, read, readdir-scoped-modules, rimraf, semver, tar, which, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/svg/sax.git (@trysound/sax), git://github.com/isaacs/chownr.git (chownr), git+https://github.com/isaacs/color-support.git (color-support), https://github.com/npm/dezalgo (dezalgo), git+https://github.com/npm/fs-minipass.git (fs-minipass), https://github.com/npm/fs-write-stream-atomic (fs-write-stream-atomic), git://github.com/isaacs/node-glob.git (glob), git+https://github.com/isaacs/ignore-walk.git (ignore-walk), git://github.com/isaacs/ini.git (ini), git+https://github.com/isaacs/isexe.git (isexe), git://github.com/isaacs/json-stringify-safe (json-stringify-safe), https://github.com/npm/lockfile.git (lockfile), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git+https://github.com/isaacs/minipass-flush.git (minipass-flush), git+https://github.com/isaacs/minipass-sized.git (minipass-sized), git://github.com/isaacs/mute-stream (mute-stream), https://github.com/npm/nopt.git (nopt), git+https://github.com/npm/npm-packlist.git (npm-packlist), git://github.com/isaacs/once (once), https://github.com/npm/osenv (osenv), git+https://github.com/isaacs/pseudomap.git (pseudomap), git://github.com/isaacs/read.git (read), https://github.com/npm/readdir-scoped-modules (readdir-scoped-modules), git://github.com/isaacs/rimraf.git (rimraf), https://github.com/npm/node-semver (semver), https://github.com/npm/node-tar.git (tar), git://github.com/isaacs/node-which.git (which), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below:
2273
+ The following software may be included in this product: @trysound/sax, chownr, color-support, dezalgo, fs-minipass, fs-write-stream-atomic, glob, ignore-walk, ini, isexe, json-stringify-safe, lockfile, lru-cache, minimatch, minipass-collect, minipass-flush, minipass-pipeline, minipass-sized, mute-stream, nopt, npm-packlist, once, osenv, pseudomap, read, readdir-scoped-modules, rimraf, semver, tar, which, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/svg/sax.git (@trysound/sax), git://github.com/isaacs/chownr.git (chownr), git+https://github.com/isaacs/color-support.git (color-support), https://github.com/npm/dezalgo (dezalgo), git+https://github.com/npm/fs-minipass.git (fs-minipass), https://github.com/npm/fs-write-stream-atomic (fs-write-stream-atomic), git://github.com/isaacs/node-glob.git (glob), git+https://github.com/isaacs/ignore-walk.git (ignore-walk), git://github.com/isaacs/ini.git (ini), git+https://github.com/isaacs/isexe.git (isexe), git://github.com/isaacs/json-stringify-safe (json-stringify-safe), https://github.com/npm/lockfile.git (lockfile), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git+https://github.com/isaacs/minipass-flush.git (minipass-flush), git+https://github.com/isaacs/minipass-sized.git (minipass-sized), git://github.com/isaacs/mute-stream (mute-stream), https://github.com/npm/nopt.git (nopt), git+https://github.com/npm/npm-packlist.git (npm-packlist), git://github.com/isaacs/once (once), https://github.com/npm/osenv (osenv), git+https://github.com/isaacs/pseudomap.git (pseudomap), git://github.com/isaacs/read.git (read), https://github.com/npm/readdir-scoped-modules (readdir-scoped-modules), git://github.com/isaacs/rimraf.git (rimraf), https://github.com/npm/node-semver.git (semver), https://github.com/npm/node-tar.git (tar), git://github.com/isaacs/node-which.git (which), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below:
2274
2274
 
2275
2275
  The ISC License
2276
2276
 
@@ -1 +1 @@
1
- "use strict";!function(){function e(l,e,s,c,r,u,d,p){var m=this;this.downloadReportForDevice=function(e,t,r,n){var a=_.get(t,"id",t),o=_(r).map(_.partial(m.createPairFromSeries,a)).value();return new m.Downloader(e,n,o).start()},this.downloadReportForDatapoints=function(e,t,r){var n=_.map(t,m.createPairFromDp);return n.length?new m.Downloader(e,r,n).start():l.reject(new Error(d("At least 1 data point must be selected")))},this.createPairFromSeries=function(e,t){return{source:e,fragmentType:t}},this.createPairFromDp=function(e){return{source:e.__target.id,valueFragmentType:e.fragment}},this.generateFileName=function(e,t){if(_.isEmpty(e.source&&t)||_.isEmpty(e.valueFragmentType||e.fragmentType))throw new Error("Unable to generate a file name for given data");return[e.source,e.valueFragmentType||e.fragmentType,t].join(".")},this.Downloader=function(n,a,e){var o=this,t=_.uniqBy(e,function(e){return JSON.stringify(e)});function i(e){return{text:d("Access denied."),type:"danger",detailedData:e}}this.downloadReports=function(){var e=_(t).map(o.downloadReportForPair).value();return l.all(e).then(o.onDownloads).catch(o.onFail)},this.start=function(){return r({templateUrl:":::PLUGIN_PATH:::/ui/views/measurementsReport.html",title:d("Generating report"),controller:["$scope","$timeout",function(n,a){n.completed=0,n.total=t.length,n.reportFileName="report.zip",n.close=function(){if(void 0!==window.navigator.msSaveBlob){var e=n.blob,t=n.reportFileName;window.navigator.msSaveBlob(e,t)}else{var r=n.url;a(function(){window.URL.revokeObjectURL(r)},5e3)}n.$close()},o.scope=n,o.downloadReports()}]})},this.downloadReportForPair=function(e,t){var r=o.getFilter(e,t);return s.list(r,n).then(_.partial(o.onDownload,e)).catch(_.partial(o.onAsyncResult,e))},this.onDownload=function(e,t){return o.scope.completed+=1,t.name=m.generateFileName(e,n.name),t},this.onAsyncResult=function(e,t){return t.async?(o.scope.completed+=1,null):l.reject(t)},this.onFail=function(e){o.scope.$dismiss(),function(r){var n=l.defer();if(403===r.status)if(r.data instanceof Blob){var e=new FileReader;e.addEventListener("loadend",function(e){try{var t=JSON.parse(_.get(e,"srcElement.result"));n.resolve({type:"danger",text:p.getString(t.message),detailedData:t})}catch(e){n.resolve(i(r))}}),e.readAsText(r.data)}else n.resolve(i(r));else n.resolve({type:"danger",text:d("An error occurred. Please try again later."),detailedData:r});return n.promise}(e).then(u.add)},this.onDownloads=function(e){var t=e.filter(_.identity),r=e.length-t.length;if(0<r){var n=p.getPlural(r,"You will get a CSV/Excel file for 1 series via email.","You will get CSV/Excel files for {{$count}} series via email.",{});u.success(n)}return 0===t.length?l.when():c.zipFiles(t).then(function(e){o.scope.blob=e,o.scope.url=window.URL.createObjectURL(e)})},this.getFilter=function(e,t){var r=_.isArray(a)?a[t]:a;return r=_.merge({},r,e)}}}e.$inject=["$q","$rootScope","c8yMeasurements","c8yZip","c8yModal","c8yAlert","gettext","gettextCatalog"],angular.module("c8y.ui").service("MeasurementsReportSvc",e)}();
1
+ "use strict";!function(){function e(s,e,l,u,r,c,d,p){var m=this;this.downloadReportForDevice=function(e,t,r,n){var a=_.get(t,"id",t),o=_(r).map(_.partial(m.createPairFromSeries,a)).value();return new m.Downloader(e,n,o).start()},this.downloadReportForDatapoints=function(e,t,r){var n=_(t).filter(function(e){return!0===e.__active}).map(m.getDpRequestParams).value();return n.length?new m.Downloader(e,r,n).start():s.reject(new Error(d("At least 1 data point must be selected")))},this.createPairFromSeries=function(e,t){return{source:e,fragmentType:t}},this.getDpRequestParams=function(e){return{source:e.__target.id,valueFragmentType:e.fragment,valueFragmentSeries:e.series}},this.generateFileName=function(e,t){if(_.isEmpty(e.source&&t)||_.isEmpty(e.valueFragmentType||e.fragmentType))throw new Error("Unable to generate a file name for given data");var r=e.valueFragmentType?[e.valueFragmentType,e.valueFragmentSeries].join("."):e.fragmentType;return[e.source,r,t].join(".")},this.Downloader=function(n,a,e){var o=this,t=_.uniqBy(e,function(e){return JSON.stringify(e)});function i(e){return{text:d("Access denied."),type:"danger",detailedData:e}}this.downloadReports=function(){var e=_(t).map(o.downloadReportForDpRequestParams).value();return s.all(e).then(o.onDownloads).catch(o.onFail)},this.start=function(){return r({templateUrl:":::PLUGIN_PATH:::/ui/views/measurementsReport.html",title:d("Generating report"),controller:["$scope","$timeout",function(n,a){n.completed=0,n.total=t.length,n.reportFileName="report.zip",n.close=function(){if(void 0!==window.navigator.msSaveBlob){var e=n.blob,t=n.reportFileName;window.navigator.msSaveBlob(e,t)}else{var r=n.url;a(function(){window.URL.revokeObjectURL(r)},5e3)}n.$close()},o.scope=n,o.downloadReports()}]})},this.downloadReportForDpRequestParams=function(t,e){var r=o.getFilter(t,e);return l.list(r,n).then(function(e){return o.onDownload(t,e)}).catch(function(e){o.onAsyncResult(t,e)})},this.onDownload=function(e,t){return o.scope.completed+=1,t.name=m.generateFileName(e,n.name),t},this.onAsyncResult=function(e,t){return t.async?(o.scope.completed+=1,null):s.reject(t)},this.onFail=function(e){o.scope.$dismiss(),function(r){var n=s.defer();if(403===r.status)if(r.data instanceof Blob){var e=new FileReader;e.addEventListener("loadend",function(e){try{var t=JSON.parse(_.get(e,"srcElement.result"));n.resolve({type:"danger",text:p.getString(t.message),detailedData:t})}catch(e){n.resolve(i(r))}}),e.readAsText(r.data)}else n.resolve(i(r));else n.resolve({type:"danger",text:d("An error occurred. Please try again later."),detailedData:r});return n.promise}(e).then(c.add)},this.onDownloads=function(e){var t=e.filter(_.identity),r=e.length-t.length;if(0<r){var n=p.getPlural(r,"You will get a CSV/Excel file for 1 series via email.","You will get CSV/Excel files for {{$count}} series via email.",{});c.success(n)}return 0===t.length?s.when():u.zipFiles(t).then(function(e){o.scope.blob=e,o.scope.url=window.URL.createObjectURL(e)})},this.getFilter=function(e,t){var r=_.isArray(a)?a[t]:a;return r=_.merge({},r,e)}}}e.$inject=["$q","$rootScope","c8yMeasurements","c8yZip","c8yModal","c8yAlert","gettext","gettextCatalog"],angular.module("c8y.ui").service("MeasurementsReportSvc",e)}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1018.0.161",
3
+ "version": "1018.0.164",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",