@c8y/ng1-modules 1018.0.194 → 1018.0.196

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 e(e,i,t,n,c,r){var u="c8y_DeviceShellTemplate";function o(e,t,n){return _.map(e||[],function(e){return _.assign(e,{syntax:t,deviceType:n})})}return{getCommandTemplatesForDeviceType:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(e){var n=[];return _.forEach(e,function(e){var t=function(e){return _.get(window.c8y,"collections.devicecommands",{})[e]}(e);t&&n.push(function(t,e){var n;return n=_.isArray(e)?_(e).map(function(e){return o(e.templates,e.syntax,t)}).flatten().value():o(e.templates,e.syntax,t),i.when(n)}(e,t))}),i.all(n).then(_.flatten)}(t),a=function(e){var t={__filter:{type:u,deviceType:{__in:e}},__orderby:[{creationTime:-1}]};return c.listQuery(t,{pageSize:1e3},!0)}(t);return i.all([r,a]).then(_.flatten)},canSendCommandsViaSMS:function(){return n.getSystemOptionValue({category:"messaging",key:"provider"},!1).then(function(e){return!!e})},saveTemplate:function(e){var t=_.assign({type:u,c8y_Global:{}},e);return c.save(t)},getDeliveryTypes:function(){return{defaultDeliveryType:r("Default"),standardDeliveryTypes:[r("Default"),r("SMS")]}},removeTemplate:c.remove}}e.$inject=["$http","$q","c8yBase","c8ySettings","c8yInventory","gettext"],angular.module("c8y.core").factory("c8yDeviceShell",e)}();
1
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var a={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,r){t[e]=r.value},e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new L(n||[]);return c(i,"_invoke",{value:function(i,a,c){var u="suspendedStart";return function(t,e){if("executing"===u)throw new Error("Generator is already running");if("completed"===u){if("throw"===t)throw e;return j()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=_(r,c);if(n){if(n===f)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===u)throw u="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u="executing";var o=s(i,a,c);if("normal"===o.type){if(u=c.done?"completed":"suspendedYield",o.arg===f)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(u="completed",c.method="throw",c.arg=o.arg)}}}(t,r,a)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var f={};function y(){}function h(){}function p(){}var v={};i(v,o,function(){return this});var d=Object.getPrototypeOf,m=d&&d(d(E([])));m&&m!==t&&l.call(m,o)&&(v=m);var g=p.prototype=y.prototype=Object.create(v);function w(t){["next","throw","return"].forEach(function(e){i(t,e,function(t){return this._invoke(e,t)})})}function b(u,f){var e;c(this,"_invoke",{value:function(r,n){function t(){return new f(function(t,e){!function e(t,r,n,o){var i=s(u[t],u,r);if("throw"!==i.type){var a=i.arg,c=a.value;return c&&"object"==_typeof(c)&&l.call(c,"__await")?f.resolve(c.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):f.resolve(c).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function _(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(l.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:j}}function j(){return{value:void 0,done:!0}}return c(g,"constructor",{value:h.prototype=p,configurable:!0}),c(p,"constructor",{value:h,configurable:!0}),h.displayName=i(p,n,"GeneratorFunction"),a.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,i(t,n,"GeneratorFunction")),t.prototype=Object.create(g),t},a.awrap=function(t){return{__await:t}},w(b.prototype),i(b.prototype,r,function(){return this}),a.AsyncIterator=b,a.async=function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new b(u(t,e,r,n),o);return a.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},w(g),i(g,n,"Generator"),i(g,o,function(){return this}),i(g,"toString",function(){return"[object Generator]"}),a.keys=function(t){var r=Object(t),n=[];for(var e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},a.values=E,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function t(t,e){return i.type="throw",i.arg=r,n.next=t,e&&(n.method="next",n.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var o=this.tryEntries[e],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),c=l.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&l.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},a}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.forEach(function(t){_defineProperty(e,t,r[t])})}return e}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0===r)return("string"===e?String:Number)(t);var n=r.call(t,e||"default");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function asyncGeneratorStep(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(c){return function(){var t=this,a=arguments;return new Promise(function(e,r){var n=c.apply(t,a);function o(t){asyncGeneratorStep(n,e,r,o,i,"next",t)}function i(t){asyncGeneratorStep(n,e,r,o,i,"throw",t)}o(void 0)})}}!function(){function t(i,t,a,o,e){var c="c8y_DeviceShellTemplate";function u(t,e,r){return _.map(t||[],function(t){return _.assign(t,{syntax:e,deviceType:r})})}function r(){return(r=_asyncToGenerator(_regeneratorRuntime().mark(function t(e){var r,n;return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.getGlobalParam(c);case 2:return r=t.sent,n=_.assign(_objectSpread({type:c},r&&{c8y_Global:{}}),e),t.abrupt("return",a.save(n));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}return{getCommandTemplatesForDeviceType:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=function(t){var r=[];return _.forEach(t,function(t){var e=function(t){return _.get(window.c8y,"collections.devicecommands",{})[t]}(t);e&&r.push(function(e,t){var r;return r=_.isArray(t)?_(t).map(function(t){return u(t.templates,t.syntax,e)}).flatten().value():u(t.templates,t.syntax,e),i.when(r)}(t,e))}),i.all(r).then(_.flatten)}(e),o=function(t){var e={__filter:{type:c,deviceType:{__in:t}},__orderby:[{creationTime:-1}]};return a.listQuery(e,{pageSize:1e3},!0)}(e);return i.all([n,o]).then(_.flatten)},canSendCommandsViaSMS:function(){return t.getSystemOptionValue({category:"messaging",key:"provider"},!1).then(function(t){return!!t})},saveTemplate:function(t){return r.apply(this,arguments)},getDeliveryTypes:function(){return{defaultDeliveryType:e("Default"),standardDeliveryTypes:[e("Default"),e("SMS")]}},removeTemplate:a.remove}}t.$inject=["$q","c8ySettings","c8yInventory","c8yGlobalConfigService","gettext"],angular.module("c8y.core").factory("c8yDeviceShell",t)}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c8y/ng1-modules",
3
- "version": "1018.0.194",
3
+ "version": "1018.0.196",
4
4
  "license": "Apache-2.0",
5
5
  "author": "Cumulocity",
6
6
  "description": "AngularJS modules for Cumulocity IoT applications.",