@livinglogic/livingapi 0.12.0 → 0.13.0
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/CHANGELOG.md +50 -0
- package/dist/esm-node/livingapi.js +1 -1
- package/dist/esm-node/livingapi.js.map +1 -1
- package/dist/esm-static/livingapi.js +1 -1
- package/dist/esm-static/livingapi.js.map +1 -1
- package/dist/umd/livingapi.js +1 -1
- package/dist/umd/livingapi.js.map +1 -1
- package/package.json +8 -8
- package/src/livingapi.js +1602 -191
package/dist/umd/livingapi.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@livinglogic/ul4")):"function"==typeof define&&define.amd?define(["exports","@livinglogic/ul4"],e):e((t=t||self).la={},t.ul4)}(this,function(t,e){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,e){return t.__proto__=e,t})(t,e)}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function _createSuper(t){return function(){var e,r=_getPrototypeOf(t);if(function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()){var o=_getPrototypeOf(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return _possibleConstructorReturn(this,e)}}function _get(t,e,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(t,e,r){var o=function _superPropBase(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}(t,e);if(o){var n=Object.getOwnPropertyDescriptor(o,e);return n.get?n.get.call(r):n.value}})(t,e,r||t)}function _slicedToArray(t,e){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],o=!0,n=!1,a=void 0;try{for(var l,i=t[Symbol.iterator]();!(o=(l=i.next()).done)&&(r.push(l.value),!e||r.length!==e);o=!0);}catch(t){n=!0,a=t}finally{try{o||null==i.return||i.return()}finally{if(n)throw a}}return r}(t,e)||_unsupportedIterableToArray(t,e)||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 _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function _createForOfIteratorHelper(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=_unsupportedIterableToArray(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n,a=!0,l=!1;return{s:function(){o=t[Symbol.iterator]()},n:function(){var t=o.next();return a=t.done,t},e:function(t){l=!0,n=t},f:function(){try{a||null==o.return||o.return()}finally{if(l)throw n}}}}var r=function(t){_inherits(Base,e.Proto);var r=_createSuper(Base);function Base(){return _classCallCheck(this,Base),r.call(this)}return _createClass(Base,[{key:"ul4ondump",value:function ul4ondump(t){for(var e=0;e<this._ul4onattrs.length;++e)t.dump(this._dumpUL4ONAttr(this._ul4onattrs[e]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return this[t]}},{key:"ul4onload",value:function ul4onload(t){for(var e=0,r=t.loadcontent();;++e){var o=r.next();if(o.done)break;e<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[e],o.value)}for(;e<this._ul4onattrs.length;++e)this._setDefaultUL4ONAttr(this._ul4onattrs[e])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,e){this[t]=e}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(t){this[t]=null}},{key:"__getattr__",value:function __getattr__(t){if(this._ul4attrs.has(t)){var r=this[t];if("function"==typeof r){var o=r.bind(this);return o._ul4_name=r._ul4_name||r.name,o._ul4_signature=r._ul4_signature,o._ul4_needsobject=r._ul4_needsobject,o._ul4_needscontext=r._ul4_needscontext,o}return r}throw new e.AttributeError(this,t)}},{key:"__repr__",value:function __repr__(){return"<"+this.constructor.name+">"}}]),Base}(),o=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(t){}},{key:"delete",value:function _delete(t){}}]),Handler}(),n=function(t){_inherits(Globals,r);var n=_createSuper(Globals);function Globals(){var t;return _classCallCheck(this,Globals),(t=n.call(this)).version=null,t.hostname=null,t.platform=null,t.user=null,t.lang=null,t.app=null,t.record=null,t.maxdbactions=null,t.maxtemplateruntime=null,t.flashmessages=null,t.handler=new o,t}return _createClass(Globals,[{key:"__repr__",value:function __repr__(){return"<Globals version="+e._repr(this.version)+">"}}],[{key:"geodist",value:function geodist(t,e){var r=function sqsin(t){return(t=Math.sin(t))*t},o=function sqsos(t){return(t=Math.cos(t))*t},n=Math.PI/180,a=1/298.257223563,l=t.lat*n,i=t.long*n,u=e.lat*n,s=(l+u)/2,p=(l-u)/2,c=(i-e.long*n)/2,_=r(p)*o(c)+o(s)*r(c),h=o(p)*o(c)+r(s)*r(c),y=Math.atan(Math.sqrt(_/h)),f=2*y*6378.137,C=Math.sqrt(_*h)/y,d=(3*C+1)/(2*_);return f*(1+a*((3*C-1)/(2*h))*r(s)*o(p)-a*d*o(s)*r(p))}}]),Globals}();n.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","flashmessages","lang","datasources","hostname","app","record"],n.prototype._ul4attrs=e._makeset("version","hostname","platform","user","lang","app","record","maxdbactions","maxtemplateruntime","flashmessages");var a=function(t){_inherits(FlashMessage,r);var o=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),o.apply(this,arguments)}return _createClass(FlashMessage,[{key:"__repr__",value:function __repr__(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();a.prototype._ul4onattrs=["timestamp","type","title","message"],a.prototype._ul4attrs=e._makeset("timestamp","type","title","message");var l=function(t){_inherits(App,r);var o=_createSuper(App);function App(){return _classCallCheck(this,App),o.apply(this,arguments)}return _createClass(App,[{key:"__repr__",value:function __repr__(){return"<App id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}},{key:"insert",value:function insert(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.__call__(t);return this.globals.handler.save(this),e}},{key:"__call__",value:function __call__(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new s(this);if(e._ismap(t)){var o,n=_createForOfIteratorHelper(t.entries());try{for(n.s();!(o=n.n()).done;){var a=_slicedToArray(o.value,2),l=a[0],i=a[1];if(!r.fields.has(l))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(l));r.fields.get(l).value=i}}catch(t){n.e(t)}finally{n.f()}}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var u in t){if(!r.fields.has(u))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(u));r.fields.get(u).value=t[u]}}return r}},{key:"__getattr__",value:function __getattr__(t){if(t.startsWith("c_")){if(!this.controls.has(t.substr(2)))throw new e.AttributeError(this,t);return this.controls.get(t.substr(2))}return _get(_getPrototypeOf(App.prototype),"__getattr__",this).call(this,t)}}]),App}();l.prototype._ul4onattrs=["id","globals","name","description","language","startlink","iconlarge","iconsmall","createdby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby"],l.prototype._ul4attrs=e._makeset("id","globals","name","description","language","startlink","iconlarge","iconsmall","createdat","createdby","updatedat","updatedby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","insert"),e.expose(l.prototype.__call__,["**values"],{needsobject:!0}),e.expose(l.prototype.insert,["**values"],{needsobject:!0});var i=function(t){_inherits(View,r);var o=_createSuper(View);function View(){return _classCallCheck(this,View),o.apply(this,arguments)}return _createClass(View,[{key:"__repr__",value:function __repr__(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();i.prototype._ul4onattrs=["id","name","app","order","width","height","start","end"],i.prototype._ul4attrs=e._makeset("id","name","app","order","width","height","start","end");var u=function(t){_inherits(DataSourceData,r);var o=_createSuper(DataSourceData);function DataSourceData(){return _classCallCheck(this,DataSourceData),o.apply(this,arguments)}return _createClass(DataSourceData,[{key:"__repr__",value:function __repr__(){return"<DataSource.Data id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceData}();u.prototype._ul4onattrs=["id","identifier","app","apps"],u.prototype._ul4attrs=e._makeset("id","identifier","app","apps");var s=function(t){_inherits(Record,r);var o=_createSuper(Record);function Record(t){var e;return _classCallCheck(this,Record),(e=o.call(this)).id=null,e.app=t,e.createdat=null,e.createdby=null,e.updatedat=null,e.updatedby=null,e.updatecount=0,e._sparsevalues=new Map,e._values=null,e._fields=null,e.children=new Map,e.attachments=null,e.errors=[],e._is_deleted=!1,e}return _createClass(Record,[{key:"__repr__",value:function __repr__(){var t,r=["<Record id=",e._repr(this.id)],o=_createForOfIteratorHelper(this.fields.values());try{for(o.s();!(t=o.n()).done;){var n=t.value;n.control.priority&&(r.push(" v_"),r.push(n.control.identifier),r.push("="),r.push(e._repr(n.value)))}}catch(t){o.e(t)}finally{o.f()}return r.push(">"),r.join("")}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var t,e=_createForOfIteratorHelper(this.fields.values());try{for(e.s();!(t=e.n()).done;){if(t.value.is_dirty())return!0}}catch(t){e.e(t)}finally{e.f()}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var t,e=_createForOfIteratorHelper(this.fields.values());try{for(e.s();!(t=e.n()).done;){if(t.value.has_errors())return!0}}catch(t){e.e(t)}finally{e.f()}return!1}},{key:"delete",value:function _delete(){return this.app.globals.handler.delete(this)}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._ismap(t)){var r,o=_createForOfIteratorHelper(t.entries());try{for(o.s();!(r=o.n()).done;){var n=_slicedToArray(r.value,2),a=n[0],l=n[1];if(!this.fields.has(a))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(a));fields.get(a).value=l}}catch(t){o.e(t)}finally{o.f()}}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var i in t){if(!this.fields.has(i))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(i));record.fields.get(i).value=t[i]}}this.app.globals.handler.save(this)}},{key:"search",value:function search(t){for(var r in t){var o=t[r];if(e._bool(o)&&!this.fields.get(r).search(o))return!1}return!0}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"values"===t?this._sparsevalues:this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,e){"values"===t?(this._sparsevalues=e,this._values=null,this._fields=null):this[t]=e}},{key:"__getattr__",value:function __getattr__(t){return t.startsWith("c_")?this.children.get(t.substr(2)):t.startsWith("f_")?this.fields.get(t.substr(2)):t.startsWith("v_")?this.values.get(t.substr(2)):this[t]}},{key:"__setattr__",value:function __setattr__(t,r){if(t.startsWith("c_"))this.children[t.substr(2)]=r;else{if(!t.startsWith("v_"))throw new e.AttributeError(this,t);this.fields.get(t.substr(2)).value=r}}},{key:"values",get:function get(){if(null===this._values){this._values=e._havemap?new Map:{};var t,r=_createForOfIteratorHelper(this.app.controls.entries());try{for(r.s();!(t=r.n()).done;){var o=_slicedToArray(t.value,2),n=o[0],a=(o[1],this._sparsevalues.get(n));void 0===a&&(a=null),this._values.set(n,a)}}catch(t){r.e(t)}finally{r.f()}}return this._values}},{key:"fields",get:function get(){if(null===this._fields){this._fields=e._havemap?new Map:{};var t,r=_createForOfIteratorHelper(this.values.entries());try{for(r.s();!(t=r.n()).done;){var o=_slicedToArray(t.value,2),n=o[0],a=o[1],l=new K(this.app.controls.get(n),this,a);this._fields.set(n,l)}}catch(t){r.e(t)}finally{r.f()}}return this._fields}}]),Record}();s.prototype._ul4onattrs=["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","attachments","children"],s.prototype._ul4attrs=e._makeset("id","app","createdat","createdby","updatedat","updatedby","updatecount","values","attachments","children"),e.expose(s.prototype.is_dirty,[]),e.expose(s.prototype.has_errors,[]),e.expose(s.prototype.delete,[]),e.expose(s.prototype.save,[]),e.expose(s.prototype.update,["**values"],{needsobject:!0});var p=function(t){_inherits(Control,r);var o=_createSuper(Control);function Control(){return _classCallCheck(this,Control),o.apply(this,arguments)}return _createClass(Control,[{key:"__repr__",value:function __repr__(){return"<"+this.__type__+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}},{key:"_logsearch",value:function _logsearch(t,e){}},{key:"search",value:function search(t,e){return!1}}]),Control}();p.prototype.type=null,p.prototype.subtype=null,p.prototype._ul4onattrs=["id","identifier","field","app","label","priority","order","default","ininsertprocedure","inupdateprocedure"],p.prototype._ul4attrs=e._makeset("id","identifier","field","app","label","priority","order","default","ininsertprocedure","inupdateprocedure");var c=function(t){_inherits(BoolControl,p);var e=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),e.apply(this,arguments)}return _createClass(BoolControl,[{key:"search",value:function search(t,e){return this._logsearch(t,e),"equals"===e.operator&&e.value===t}}]),BoolControl}();c.prototype.type="bool";var _=function(t){_inherits(IntControl,p);var e=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),e.apply(this,arguments)}return _createClass(IntControl,[{key:"search",value:function search(t,e){return this._logsearch(t,e),"equals"===e.operator&&e.value===t}}]),IntControl}();_.prototype.type="int";var h=function(t){_inherits(NumberControl,p);var e=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),e.apply(this,arguments)}return _createClass(NumberControl,[{key:"search",value:function search(t,e){return this._logsearch(t,e),"equals"===e.operator?e.value===t:"range"===e.operator&&(null!==t&&((null===e.minvalue||e.minvalue<=t)&&(null===e.maxvalue||t<e.maxvalue)))}}]),NumberControl}();h.prototype.type="number";var y=function(t){_inherits(StringControl,p);var e=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),e.apply(this,arguments)}return _createClass(StringControl,[{key:"search",value:function search(t,e){return this._logsearch(t,e),"equals"===e.operator?e.value===t:"contains"===e.operator?null===e.value||null===t?e.value===t:t.toLowerCase().indexOf(e.value.toLowerCase())>=0:void 0}}]),StringControl}();y.prototype.type="string";var f=function(t){_inherits(TextControl,y);var e=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),e.apply(this,arguments)}return TextControl}();f.prototype.subtype="text";var C=function(t){_inherits(EmailControl,y);var e=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),e.apply(this,arguments)}return EmailControl}();C.prototype.subtype="email";var d=function(t){_inherits(URLControl,y);var e=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),e.apply(this,arguments)}return URLControl}();d.prototype.subtype="url";var v=function(t){_inherits(TelControl,y);var e=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),e.apply(this,arguments)}return TelControl}();v.prototype.subtype="tel";var m=function(t){_inherits(PasswordControl,y);var e=_createSuper(PasswordControl);function PasswordControl(){return _classCallCheck(this,PasswordControl),e.apply(this,arguments)}return PasswordControl}();m.prototype.subtype="password";var k=function(t){_inherits(TextAreaControl,y);var e=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),e.apply(this,arguments)}return TextAreaControl}();k.prototype.subtype="textarea",k.prototype._ul4onattrs=y.prototype._ul4onattrs.concat(["encrypted"]),k.prototype._ul4attrs=e._makeset.apply(e,_toConsumableArray(y.prototype._ul4attrs).concat(["encrypted"]));var g=function(t){_inherits(HTMLControl,y);var e=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),e.apply(this,arguments)}return HTMLControl}();g.prototype.subtype="html";var b=function(t){_inherits(DateControl,p);var r=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),r.apply(this,arguments)}return _createClass(DateControl,[{key:"formatstring",value:function formatstring(t){return"de"===(t=t||this.app.language)?"%d.%m.%Y":"%m/%d/%Y"}},{key:"search",value:function search(t,r){this._logsearch(t,r);var o=r.value;return"[object Date]"==Object.prototype.toString.call(o)&&(o=e._format(o,this.formatstring(),this.app.language)),null!==t&&(t=e._format(t,this.formatstring(),this.app.language)),"equals"===r.operator?o===t:"contains"===r.operator&&(null===o||null===t?o===t:t.toLowerCase().indexOf(o.toLowerCase())>=0)}}]),DateControl}();b.prototype.type="date",b.prototype.subtype="date";var A=function(t){_inherits(DatetimeMinuteControl,b);var e=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),e.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:"formatstring",value:function formatstring(t){return"de"===(t=t||this.app.language)?"%d.%m.%Y %H:%M":"%m/%d/%Y %H:%M"}}]),DatetimeMinuteControl}();A.prototype.subtype="datetimeminute";var L=function(t){_inherits(DatetimeSecondControl,b);var e=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),e.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:"formatstring",value:function formatstring(t){return"de"===(t=t||this.app.language)?"%d.%m.%Y %H:%M:%S":"%m/%d/%Y %H:%M:%S"}}]),DatetimeSecondControl}();L.prototype.subtype="datetimesecond";var S=function(t){_inherits(LookupControl,p);var e=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),e.apply(this,arguments)}return _createClass(LookupControl,[{key:"search",value:function search(t,e){return"equals"===e.operator&&(null===t?null===e.value:t.key===e.value)}}]),LookupControl}();S.prototype.type="lookup",S.prototype._ul4onattrs=p.prototype._ul4onattrs.concat(["lookupdata"]),S.prototype._ul4attrs=e._makeset.apply(e,_toConsumableArray(p.prototype._ul4attrs).concat(["lookupdata"]));var M=function(t){_inherits(LookupSelectControl,S);var e=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),e.apply(this,arguments)}return LookupSelectControl}();M.prototype.subtype="select";var w=function(t){_inherits(LookupRadioControl,S);var e=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),e.apply(this,arguments)}return LookupRadioControl}();w.prototype.subtype="radio";var O=function(t){_inherits(LookupChoiceControl,S);var e=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),e.apply(this,arguments)}return LookupChoiceControl}();O.prototype.subtype="choice";var x=function(t){_inherits(AppLookupControl,p);var e=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),e.apply(this,arguments)}return _createClass(AppLookupControl,[{key:"search",value:function search(t,e){return null===t||null===e.value?t===e.value:t.search(e)}}]),AppLookupControl}();x.prototype.type="applookup",x.prototype._ul4onattrs=p.prototype._ul4onattrs.concat(["lookupapp","lookupcontrols"]),x.prototype._ul4attrs=e._makeset.apply(e,_toConsumableArray(p.prototype._ul4attrs).concat(["lookupapp","lookupcontrols"]));var I=function(t){_inherits(AppLookupSelectControl,x);var e=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),e.apply(this,arguments)}return AppLookupSelectControl}();I.prototype.subtype="select";var F=function(t){_inherits(AppLookupRadioControl,x);var e=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),e.apply(this,arguments)}return AppLookupRadioControl}();F.prototype.subtype="radio";var T=function(t){_inherits(AppLookupChoiceControl,x);var e=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),e.apply(this,arguments)}return AppLookupChoiceControl}();T.prototype.subtype="choice";var R=function(t){_inherits(MultipleLookupControl,S);var e=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),e.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:"search",value:function search(t,e){if("equals"===e.operator){var r,o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){if(r.value.key===e.value)return!0}}catch(t){o.e(t)}finally{o.f()}return!1}return!1}}]),MultipleLookupControl}();R.prototype.subtype="multiplelookup";var D=function(t){_inherits(MultipleLookupSelectControl,R);var e=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),e.apply(this,arguments)}return MultipleLookupSelectControl}();D.prototype.subtype="select";var N=function(t){_inherits(MultipleLookupCheckboxControl,R);var e=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),e.apply(this,arguments)}return MultipleLookupCheckboxControl}();N.prototype.subtype="checkbox";var P=function(t){_inherits(MultipleLookupChoiceControl,R);var e=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),e.apply(this,arguments)}return MultipleLookupChoiceControl}();P.prototype.subtype="choice";var U=function(t){_inherits(MultipleAppLookupControl,x);var e=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),e.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:"search",value:function search(t,e){if("equals"===e.operator){if(null===e.value)return 0===t.length;var r,o=_createForOfIteratorHelper(t);try{for(o.s();!(r=o.n()).done;){if(r.value.search(e.value))return!0}}catch(t){o.e(t)}finally{o.f()}return!1}return!1}}]),MultipleAppLookupControl}();U.prototype.type="multipleapplookup";var j=function(t){_inherits(MultipleAppLookupSelectControl,U);var e=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),e.apply(this,arguments)}return MultipleAppLookupSelectControl}();j.prototype.subtype="select";var H=function(t){_inherits(MultipleAppLookupCheckboxControl,U);var e=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),e.apply(this,arguments)}return MultipleAppLookupCheckboxControl}();H.prototype.subtype="checkbox";var G=function(t){_inherits(MultipleAppLookupChoiceControl,U);var e=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),e.apply(this,arguments)}return MultipleAppLookupChoiceControl}();G.prototype.subtype="choice";var B=function(t){_inherits(GeoControl,p);var e=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),e.apply(this,arguments)}return GeoControl}();B.prototype.type="geo";var E=function(t){_inherits(FileControl,p);var e=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),e.apply(this,arguments)}return FileControl}();E.prototype.type="file";var V=function(t){_inherits(FileSignatureControl,E);var e=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),e.apply(this,arguments)}return FileSignatureControl}();V.prototype.subtype="signature";var q=function(t){_inherits(ButtonControl,p);var e=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),e.apply(this,arguments)}return ButtonControl}();q.prototype.type="button";var K=function(t){_inherits(Field,r);var o=_createSuper(Field);function Field(t,e,r){var n;return _classCallCheck(this,Field),(n=o.call(this)).control=t,n.record=e,n._value=r,n._dirty=!1,n.errors=[],n}return _createClass(Field,[{key:"is_empty",value:function is_empty(){return null===this._value||e._islist(this._value)&&0===this._value.length}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"search",value:function search(t){return this.control.search(this.value,t)}},{key:"__repr__",value:function __repr__(){var t="<Field identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),0!==this.errors.length&&(t+=" has_errors()=True"),t+=">"}},{key:"value",get:function get(){return this._value},set:function set(t){var r=this._value;e._ne(r,t)&&(this.record.values.set(this.control.identifier,t),this._value=t,this._dirty=!0)}}]),Field}(),W=function(t){_inherits(LookupItem,r);var o=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),o.apply(this,arguments)}return _createClass(LookupItem,[{key:"__repr__",value:function __repr__(){return"<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label)+">"}}]),LookupItem}();W.prototype._ul4onattrs=["key","label"],W.prototype._ul4attrs=e._makeset("key","label");var J=function(t){_inherits(User,r);var o=_createSuper(User);function User(){return _classCallCheck(this,User),o.apply(this,arguments)}return _createClass(User,[{key:"__repr__",value:function __repr__(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}}]),User}();J.prototype._ul4onattrs=["_id","id","gender","firstname","surname","initials","email","language","avatarsmall","avatarlarge","keyviews"],J.prototype._ul4attrs=e._makeset("_id","id","gender","firstname","surname","initials","email","language","avatarsmall","avatarlarge","keyviews");var Y=function(t){_inherits(File,r);var o=_createSuper(File);function File(){return _classCallCheck(this,File),o.apply(this,arguments)}return _createClass(File,[{key:"__repr__",value:function __repr__(){return"<File id="+e._repr(this.id)+" url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}}]),File}();Y.prototype._ul4onattrs=["id","url","filename","mimetype","width","height","internalid","createdat","size"],Y.prototype._ul4attrs=e._makeset("id","url","filename","mimetype","width","height","size","createdat");var z=function(t){_inherits(Geo,r);var o=_createSuper(Geo);function Geo(t,e,r){var n;return _classCallCheck(this,Geo),(n=o.call(this)).lat=t,n.long=e,n.info=r,n}return _createClass(Geo,[{key:"__repr__",value:function __repr__(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();z.prototype._ul4onattrs=["lat","long","info"],z.prototype._ul4attrs=e._makeset("lat","long","info");var $=function(t){_inherits(Attachment,r);var o=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),o.apply(this,arguments)}return _createClass(Attachment,[{key:"__repr__",value:function __repr__(){return"<"+this.__type__+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}}]),Attachment}();$.prototype._ul4onattrs=["id","record","label","active"],$.prototype._ul4attrs=e._makeset("id","record","label","active");var Q=function(t){_inherits(NoteAttachment,$);var e=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),e.apply(this,arguments)}return NoteAttachment}();Q.prototype.type="noteattachment",Q.prototype._ul4onattrs=$.prototype._ul4onattrs.concat(["value"]),Q.prototype._ul4attrs=e._makeset.apply(e,_toConsumableArray($.prototype._ul4onattrs).concat(["value"]));var X=function(t){_inherits(URLAttachment,$);var e=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),e.apply(this,arguments)}return URLAttachment}();X.prototype.type="urlattachment",X.prototype._ul4onattrs=$.prototype._ul4onattrs.concat(["value"]),X.prototype._ul4attrs=e._makeset.apply(e,_toConsumableArray($.prototype._ul4onattrs).concat(["value"]));var Z=function(t){_inherits(FileAttachment,$);var e=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),e.apply(this,arguments)}return FileAttachment}();Z.prototype.type="fileattachment",Z.prototype._ul4onattrs=$.prototype._ul4onattrs.concat(["value"]),Z.prototype._ul4attrs=e._makeset.apply(e,_toConsumableArray($.prototype._ul4onattrs).concat(["value"]));var tt=function(t){_inherits(ImageAttachment,$);var e=_createSuper(ImageAttachment);function ImageAttachment(){return _classCallCheck(this,ImageAttachment),e.apply(this,arguments)}return ImageAttachment}();tt.prototype.type="imageattachment",tt.prototype._ul4onattrs=$.prototype._ul4onattrs.concat(["original","thumb","small","medium","large"]),tt.prototype._ul4attrs=e._makeset.apply(e,_toConsumableArray($.prototype._ul4onattrs).concat(["original","thumb","small","medium","large"]));var et=function(t){_inherits(JSONAttachment,$);var r=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),r.apply(this,arguments)}return _createClass(JSONAttachment,[{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"value"===t?e._asjson(this.value):this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,r){"value"===t?this.value=e._fromjson(r):this[t]=r}}]),JSONAttachment}();et.prototype.type="jsonattachment",et.prototype._ul4onattrs=$.prototype._ul4onattrs.concat(["value"]),et.prototype._ul4attrs=e._makeset.apply(e,_toConsumableArray($.prototype._ul4onattrs).concat(["value"]));var rt=function(t){_inherits(Installation,r);var o=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),o.apply(this,arguments)}return _createClass(Installation,[{key:"__repr__",value:function __repr__(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();rt.prototype._ul4onattrs=["id","name"],rt.prototype._ul4attrs=e._makeset("id","name");var ot=function(t){_inherits(Category,r);var o=_createSuper(Category);function Category(){return _classCallCheck(this,Category),o.apply(this,arguments)}return _createClass(Category,[{key:"__repr__",value:function __repr__(){for(var t=[],r=this;null!==r;)t.splice(0,0,r.identifier),r=r.parent;return"<Category id="+e._repr(this.id)+" identifierpath="+e._repr(t.join("/"))+NaN+e._repr(this.name)+">"}}]),Category}();ot.prototype._ul4onattrs=["id","identifier","name","order","parent","children","apps"],ot.prototype._ul4attrs=e._makeset("id","identifier","name","order","parent","children","apps");var nt=function(t){_inherits(KeyView,r);var o=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),o.apply(this,arguments)}return _createClass(KeyView,[{key:"__repr__",value:function __repr__(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();nt.prototype._ul4onattrs=["id","identifier","name","key","user"],nt.prototype._ul4attrs=e._makeset("id","identifier","name","key","user");var at=function(t){_inherits(AppParameter,r);var o=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),o.apply(this,arguments)}return _createClass(AppParameter,[{key:"__repr__",value:function __repr__(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),AppParameter}();at.prototype._ul4onattrs=["id","app","identifier","description","value"],at.prototype._ul4attrs=e._makeset("id","app","identifier","description","value");for(var lt=0,it=[n,a,l,i,u,s,c,_,h,f,C,d,v,m,k,b,A,L,S,M,w,O,x,I,F,T,R,D,N,P,U,j,H,G,B,E,q,K,W,J,Y,z,Q,X,Z,tt,et,rt,ot,nt,at];lt<it.length;lt++){var ut=it[lt];e.register("de.livinglogic.livingapi."+ut.name.toLowerCase(),ut)}t.App=l,t.AppLookupChoiceControl=T,t.AppLookupControl=x,t.AppLookupRadioControl=F,t.AppLookupSelectControl=I,t.AppParameter=at,t.Attachment=$,t.Base=r,t.BoolControl=c,t.ButtonControl=q,t.Category=ot,t.Control=p,t.DataSourceData=u,t.DateControl=b,t.DatetimeMinuteControl=A,t.DatetimeSecondControl=L,t.EmailControl=C,t.Field=K,t.File=Y,t.FileAttachment=Z,t.FileControl=E,t.FileSignatureControl=V,t.FlashMessage=a,t.Geo=z,t.GeoControl=B,t.Globals=n,t.HTMLControl=g,t.Handler=o,t.ImageAttachment=tt,t.Installation=rt,t.IntControl=_,t.JSONAttachment=et,t.KeyView=nt,t.LookupChoiceControl=O,t.LookupControl=S,t.LookupItem=W,t.LookupRadioControl=w,t.LookupSelectControl=M,t.MultipleAppLookupCheckboxControl=H,t.MultipleAppLookupChoiceControl=G,t.MultipleAppLookupControl=U,t.MultipleAppLookupSelectControl=j,t.MultipleLookupCheckboxControl=N,t.MultipleLookupChoiceControl=P,t.MultipleLookupControl=R,t.MultipleLookupSelectControl=D,t.NoteAttachment=Q,t.NumberControl=h,t.PasswordControl=m,t.Record=s,t.StringControl=y,t.TelControl=v,t.TextAreaControl=k,t.TextControl=f,t.URLAttachment=X,t.URLControl=d,t.User=J,t.View=i,t.version="0.12.0",Object.defineProperty(t,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@livinglogic/ul4")):"function"==typeof define&&define.amd?define(["exports","@livinglogic/ul4"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).la={},e.ul4)}(this,(function(e,t){"use strict";function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var r=_interopNamespace(t);function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,o=_getPrototypeOf(e);if(t){var l=_getPrototypeOf(this).constructor;r=Reflect.construct(o,arguments,l)}else r=o.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,r){var o=function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}(e,t);if(o){var l=Object.getOwnPropertyDescriptor(o,t);return l.get?l.get.call(r):l.value}})(e,t,r||e)}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var o,l,n=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){i=!0,l=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw l}}return n}(e,t)||_unsupportedIterableToArray(e,t)||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 _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,F=function(){};return{s:F,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,n=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return n=e.done,e},e:function(e){a=!0,l=e},f:function(){try{n||null==r.return||r.return()}finally{if(a)throw l}}}}var o,l,n,a,i,u,s,p,c,d,h,_,f,y,v,m,k,C,g,b,A,L=function(e){_inherits(Base,e);var t=_createSuper(Base);function Base(e){var r;return _classCallCheck(this,Base),(r=t.call(this)).id=e,r}return _createClass(Base,[{key:"ul4onid",get:function get(){return this.id}},{key:"ul4ondump",value:function ul4ondump(e){for(var t=0;t<this._ul4onattrs.length;++t)e.dump(this._dumpUL4ONAttr(this._ul4onattrs[t]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return this[e]}},{key:"ul4onload",value:function ul4onload(e){for(var t=0,r=e.loadcontent();;++t){var o=r.next();if(o.done)break;t<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[t],o.value)}for(;t<this._ul4onattrs.length;++t)this._setDefaultUL4ONAttr(this._ul4onattrs[t])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){this[e]=t}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(e){this[e]=null}},{key:r.symbols.getattr,value:function value(e){if(this._ul4attrs.has(e)){var value=this[e];if("function"==typeof value){var t=value.bind(this);return t._ul4_name=value._ul4_name||value.name,t._ul4_signature=value._ul4_signature,t._ul4_needsobject=value._ul4_needsobject,t._ul4_needscontext=value._ul4_needscontext,t}return value}throw new r.AttributeError(this,e)}},{key:r.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[r.symbols.repr]()}}]),Base}(r.Proto),w=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}();o=r.symbols.repr;var S=function(e){_inherits(Globals,e);var t=_createSuper(Globals);function Globals(e){var r;return _classCallCheck(this,Globals),(r=t.call(this,e)).version=null,r.hostname=null,r.platform=null,r.user=null,r.lang=null,r.app=null,r.record=null,r.maxdbactions=null,r.maxtemplateruntime=null,r.flashmessages=null,r.handler=new w,r}return _createClass(Globals,[{key:"scaledURL",value:function scaledURL(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"fill",l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"sm",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,i=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,s=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,p=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,c=!(arguments.length>11&&void 0!==arguments[11])||arguments[11],d=null;e instanceof Ge&&(e="https://"+this.hostname+e.url,(d=encodeURIComponent(e.filename))!=e.filename&&(d=null));var h="";return h+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==o&&(h+="/rt:"+o),null!=t&&(h+="/w:"+t),null!=r&&(h+="/h:"+r),l&&(h+="/el:1"),null!=n&&(h+="/g:"+n),null!=a&&(h+="/q:"+a),null!==i&&i%360!=0&&(h+="/rot:"+rotatet),null!=u&&(h+="/bl:"+u),null!=s&&(h+="/sh:"+s),null!=p&&(h+="/f:"+p),null!=d&&(h+="/fn:"+d),h+="/plain/"+encodeURIComponent(e)}},{key:o,value:function value(){return"<Globals version="+r._repr(this.version)+">"}}],[{key:"geodist",value:function geodist(e,t){var r=function sqsin(e){return(e=Math.sin(e))*e},o=function sqsos(e){return(e=Math.cos(e))*e},l=Math.PI/180,n=1/298.257223563,a=e.lat*l,i=e.long*l,u=t.lat*l,s=(a+u)/2,p=(a-u)/2,c=(i-t.long*l)/2,d=r(p)*o(c)+o(s)*r(c),h=o(p)*o(c)+r(s)*r(c),_=Math.atan(Math.sqrt(d/h)),f=2*_*6378.137,y=Math.sqrt(d*h)/_,v=(3*y+1)/(2*d);return f*(1+n*((3*y-1)/(2*h))*r(s)*o(p)-n*v*o(s)*r(p))}}]),Globals}(L);_defineProperty(S,"classdoc","Global information"),S.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","flashmessages","lang","datasources","hostname","app","record","google_api_key","mode","view_template_id","email_template_id","view_id"],S.prototype._ul4attrs=new Set(["version","hostname","platform","user","lang","app","record","maxdbactions","maxtemplateruntime","flashmessages","mode"]),l=r.symbols.repr;var M=function(e){_inherits(FlashMessage,e);var t=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),t.apply(this,arguments)}return _createClass(FlashMessage,[{key:l,value:function value(){return"<FlashMessage type="+r._repr(this.type)+" title="+r._repr(this.title)+">"}}]),FlashMessage}(L);_defineProperty(M,"classdoc","A flash message in a web page"),M.prototype._ul4onattrs=["timestamp","type","title","message"],M.prototype._ul4attrs=new Set(["timestamp","type","title","message"]),n=r.symbols.repr,a=r.symbols.call,i=r.symbols.getattr;var P=function(e){_inherits(App,e);var t=_createSuper(App);function App(){return _classCallCheck(this,App),t.apply(this,arguments)}return _createClass(App,[{key:n,value:function value(){return"<App id="+r._repr(this.id)+" name="+r._repr(this.name)+">"}},{key:"insert",value:function insert(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this[r.symbols.call](e);return this.globals.handler.save(this),t}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:a,value:function value(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new O(null,this);if(r._ismap(e)){var o,l=_createForOfIteratorHelper(e.keys());try{for(l.s();!(o=l.n()).done;){var n=o.value;if(!t.fields.has(n))throw new r.ArgumentError(r._repr(this)+"() get an unexpected keyword argument "+r._repr(n))}}catch(e){l.e(e)}finally{l.f()}t._make_fields(!0,e,null,null)}else{if(!r._isobject(e))throw new r.TypeError("values must be an object or a Map");for(var a in e)if(!t.fields.has(a))throw new r.ArgumentError(r._repr(this)+"() get an unexpected keyword argument "+r._repr(a));t._make_fields(!0,new Map(r._list(r.dicttype.items(e))),null,null)}return t}},{key:i,value:function value(e){if(e.startsWith("c_")){if(!this.controls.has(e.substr(2)))throw new r.AttributeError(this,e);return this.controls.get(e.substr(2))}return _get(_getPrototypeOf(App.prototype),r.symbols.getattr,this).call(this,e)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(e){if(null===e);else if("string"==typeof e){if(null===this.views||!this.views.has(e))throw new r.ValueError("View "+r._repr(e)+" not found!");e=this.views.get(e)}else{if(!(e instanceof x))throw new r.TypeError(r._repr(e)+" is not a view!");if(e.app!==this)throw new r.ValueError("View "+r._repr(e)+" belongs to the wrong app!")}this._active_view=e}}]),App}(L);_defineProperty(P,"classdoc","A LivingApps application"),P.prototype._ul4onattrs=["globals","name","description","lang","startlink","iconlarge","iconsmall","createdby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby","superid","favorite","_active_view"],P.prototype._ul4attrs=new Set(["id","globals","name","description","lang","startlink","iconlarge","iconsmall","createdat","createdby","updatedat","updatedby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","insert","favorite","_active_view"]),r.expose(P.prototype[r.symbols.call],["**values"],{needsobject:!0}),r.expose(P.prototype.insert,["**values"],{needsobject:!0}),u=r.symbols.repr;var x=function(e){_inherits(View,e);var t=_createSuper(View);function View(){return _classCallCheck(this,View),t.apply(this,arguments)}return _createClass(View,[{key:u,value:function value(){return"<View id="+r._repr(this.id)+" name="+r._repr(this.name)+">"}}]),View}(L);_defineProperty(x,"classdoc","An input form for a LivingApps application"),x.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang"],x.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang"]),s=r.symbols.repr;var T=function(e){_inherits(DataSourceData,e);var t=_createSuper(DataSourceData);function DataSourceData(){return _classCallCheck(this,DataSourceData),t.apply(this,arguments)}return _createClass(DataSourceData,[{key:s,value:function value(){return"<DataSource.Data id="+r._repr(this.id)+" identifier="+r._repr(this.identifier)+">"}}]),DataSourceData}(L);_defineProperty(T,"classdoc","The data resulting from a data source configuration"),T.prototype._ul4onattrs=["identifier","app","apps"],T.prototype._ul4attrs=new Set(["id","identifier","app","apps"]),p=r.symbols.repr,c=r.symbols.getattr,d=r.symbols.setattr;var O=function(e){_inherits(Record,e);var t=_createSuper(Record);function Record(e,r){var o;return _classCallCheck(this,Record),(o=t.call(this,e)).app=r,o.createdat=null,o.createdby=null,o.updatedat=null,o.updatedby=null,o.updatecount=0,o._sparsevalues=new Map,o._values=null,o._fields=null,o.children=new Map,o.attachments=null,o.errors=[],o._sparsefielderrors=null,o._sparsefieldlookupdata=null,o._is_deleted=!1,o._is_new=!0,o}return _createClass(Record,[{key:"_make_fields",value:function _make_fields(e,t,r,o){var l,n=new Map,a=_createForOfIteratorHelper(this.app.controls.values());try{for(a.s();!(l=a.n()).done;){var i=l.value,u=i.identifier,s=null;null!==t&&(e&&!t.has(u)?s=i.default:t.has(u)&&(s=t.get(u)));var p=new I(i,this,s);n.set(u,p),null!==r&&r.has(u)&&(p.errors=r.get(u)),null!==o&&o.has(u)&&(p.lookupdata=o.get(u))}}catch(e){a.e(e)}finally{a.f()}this._fields=n,this._sparsevalues=null,this._sparsefielderrors=null,this._sparselookupdata=null}},{key:p,value:function value(){var e,t=["<Record id=",r._repr(this.id)],o=_createForOfIteratorHelper(this.fields.values());try{for(o.s();!(e=o.n()).done;){var l=e.value;l.control.priority&&!l.is_empty()&&(t.push(" v_"),t.push(l.control.identifier),t.push("="),t.push(r._repr(l.value)))}}catch(e){o.e(e)}finally{o.f()}return t.push(" state="),t.push(r._repr(this.state)),t.push(">"),t.join("")}},{key:"state",get:function get(){return this._is_deleted?"deleted":this._is_new?"new":this.is_dirty()?"dirty":"saved"}},{key:"values",get:function get(){if(null===this._values){this._values=new Map;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){var r=e.value;this._values.set(r.control.identifier,r.value)}}catch(e){t.e(e)}finally{t.f()}}return this._values}},{key:"fields",get:function get(){return null===this._fields&&this._make_fields(!1,this._sparsevalues,this._sparsefielderrors,this._sparsefieldlookupdata),this._fields}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.is_dirty())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var e,t=_createForOfIteratorHelper(this.fields.values());try{for(t.s();!(e=t.n()).done;){if(e.value.has_errors())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"delete",value:function _delete(){var e=this.app.globals.handler.delete(this);return this._is_deleted=!0,e}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r._ismap(e)){var t,o=_createForOfIteratorHelper(e.entries());try{for(o.s();!(t=o.n()).done;){var l=_slicedToArray(t.value,2),n=l[0],a=l[1];if(!this.fields.has(n))throw new r.ArgumentError("update() get an unexpected keyword argument "+r._repr(n));fields.get(n).value=a}}catch(e){o.e(e)}finally{o.f()}}else{if(!r._isobject(e))throw new r.TypeError("values must be an object or a Map");for(var i in e){if(!this.fields.has(i))throw new r.ArgumentError("update() get an unexpected keyword argument "+r._repr(i));record.fields.get(i).value=e[i]}}this.app.globals.handler.save(this)}},{key:"search",value:function search(e){for(var t in e){var o=e[t];if(r._bool(o)&&!this.fields.get(t).search(o))return!1}return!0}},{key:"ul4onload",value:function ul4onload(e){_get(_getPrototypeOf(Record.prototype),"ul4onload",this).call(this,e),this._is_new=!1}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"values"===e?this._sparsevalues:this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"values"===e?(this._sparsevalues=t,this._values=null,this._fields=null):this[e]=t}},{key:c,value:function value(e){return e.startsWith("c_")?this.children.get(e.substr(2)):e.startsWith("f_")?this.fields.get(e.substr(2)):e.startsWith("v_")?this.values.get(e.substr(2)):this[e]}},{key:d,value:function value(e,t){if(e.startsWith("c_"))this.children[e.substr(2)]=t;else{if(!e.startsWith("v_"))throw new r.AttributeError(this,e);this.fields.get(e.substr(2)).value=t}}}]),Record}(L);_defineProperty(O,"classdoc","A record of a LivingApp application"),O.prototype._ul4onattrs=["app","createdat","createdby","updatedat","updatedby","updatecount","_sparsevalues","attachments","children","errors","_sparsefielderrors","_sparsefieldlookupdata"],O.prototype._ul4attrs=new Set(["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","attachments","children","errors"]),r.expose(O.prototype.is_dirty,[]),r.expose(O.prototype.has_errors,[]),r.expose(O.prototype.delete,[]),r.expose(O.prototype.save,[]),r.expose(O.prototype.update,["**values"],{needsobject:!0}),h=r.symbols.repr;var I=function(e){_inherits(Field,e);var t=_createSuper(Field);function Field(e,r,o){var l;return _classCallCheck(this,Field),(l=t.call(this,null)).control=e,l.record=r,l._label=null,l._value=o,l._dirty=!1,l._lookupdate=null,l.errors=[],l}return _createClass(Field,[{key:"value",get:function get(){return this._value},set:function set(e){var t=this._value,o={value:e,errors:[]};this._validate(o),r._ne(t,o.value)&&(this.record.values.set(this.control.identifier,o.value),this._value=o.value,this._dirty=!0),this.errors=o.errors}},{key:"_validate",value:function _validate(e){}},{key:"label",get:function get(){return null!==this._label?this._label:this.control.label},set:function set(e){this._label=e}},{key:"globals",get:function get(){return this.control.globals}},{key:"is_empty",value:function is_empty(){return null===this._value||r._islist(this._value)&&0===this._value.length}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"search",value:function search(e){return this.control.search(this.value,e)}},{key:"msg_field_required",value:function msg_field_required(e){switch(this.globals.lang){case"de":return'"'.concat(this.label,'" wird benötigt!');default:return'"'.concat(this.label,'" is required!')}}},{key:"msg_field_wrong_type",value:function msg_field_wrong_type(e){return'"'.concat(this.label,"\" doesn't support the type ").concat(r._type(e).name,"!")}},{key:"msg_bool_truerequired",value:function msg_bool_truerequired(e){return'"'.concat(this.label,'" only accepts "Yes"!')}},{key:"msg_string_tooshort",value:function msg_string_tooshort(e){return'"'.concat(this.label,'" is too short. Tou must use at least ').concat(this.control.minlength," characters!")}},{key:"msg_string_toolong",value:function msg_string_toolong(e){return'"'.concat(this.label,'" is too long. You may use at most ').concat(this.control.maxlength," characters!")}},{key:"msg_email_format",value:function msg_email_format(e){return'"'.concat(this.label,'" must be a valid email address!')}},{key:"msg_url_format",value:function msg_url_format(e){return'"'.concat(this.label,'" must be a valid URL!')}},{key:"msg_tel_format",value:function msg_tel_format(e){return'"'.concat(this.label,'" must be a valid phone number!')}},{key:"msg_date_format",value:function msg_date_format(e){return'"'.concat(this.label,"\" doesn't support this date format!")}},{key:"msg_lookup_wrongitem",value:function msg_lookup_wrongitem(e){return"The option ".concat(r._repr(e),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(e){return"The option ".concat(r._repr(e),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(e){return"The record ".concat(r._repr(e),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(e){return"The record ".concat(r._repr(e),' for "').concat(this.label,"\" can't be found!")}},{key:h,value:function value(){var e="<Field identifier=";return e+=r._repr(this.control.identifier),this._dirty&&(e+=" is_dirty()=True"),this.errors.length>0&&(e+=" has_errors()=True"),e+=">"}}]),Field}(L);_defineProperty(I,"classdoc","Holds the value of a field of a record (and related information)"),I.prototype._ul4onattrs=["control","record","label","value","errors","enabled","writable","visible"],I.prototype._ul4attrs=new Set(["control","record","label","value","errors","enabled","writable","visible"]);var D=function(e){_inherits(BoolField,e);var t=_createSuper(BoolField);function BoolField(){return _classCallCheck(this,BoolField),t.apply(this,arguments)}return _createClass(BoolField,[{key:"_validate",value:function _validate(e){null===e.value?this.control.required&&e.errors.push(this.msg_field_required(e.value)):"boolean"==typeof e.value?this.control.required&&!e.value&&e.errors.push(this.msg_bool_truerequired(e.value)):(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),BoolField}(I);_defineProperty(D,"classdoc","Holds the value of a bool field of a record (and related information)");var H=function(e){_inherits(IntField,e);var t=_createSuper(IntField);function IntField(){return _classCallCheck(this,IntField),t.apply(this,arguments)}return _createClass(IntField,[{key:"_validate",value:function _validate(e){null===e.value?this.control.required&&e.errors.push(this.msg_field_required(e.value)):"number"==typeof e.value&&Math.round(e.value)===e.value||e.errors.push(this.msg_field_wrong_type(e.value))}}]),IntField}(I);_defineProperty(H,"classdoc","Holds the value of an int field of a record (and related information)");var R=function(e){_inherits(NumberField,e);var t=_createSuper(NumberField);function NumberField(){return _classCallCheck(this,NumberField),t.apply(this,arguments)}return _createClass(NumberField,[{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):"number"!=typeof e.value&&e.errors.push(this.msg_field_wrong_type(e.value))}}]),NumberField}(I);_defineProperty(R,"classdoc","Holds the value of a number field of a record (and related information)");var U=function(e){_inherits(StringField,e);var t=_createSuper(StringField);function StringField(){return _classCallCheck(this,StringField),t.apply(this,arguments)}return _createClass(StringField,[{key:"_validate",value:function _validate(e){if(null===e.value||""===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null;else if("string"==typeof e.value){var t=this.control.minlength,r=this.control.maxlength;null!==t&&e.value.length<t&&e.errors.push(this.msg_string_tooshort(e.value)),null!==r&&e.value.length>r&&e.errors.push(this.msg_string_toolong(e.value))}else e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null}}]),StringField}(I);_defineProperty(U,"classdoc","Holds the value of a string field of a record (and related information)");var B=function(e){_inherits(EmailField,e);var t=_createSuper(EmailField);function EmailField(){return _classCallCheck(this,EmailField),t.apply(this,arguments)}return _createClass(EmailField,[{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e.value)||e.errors.push(this.msg_email_format(e.value))}_get(_getPrototypeOf(EmailField.prototype),"_validate",this).call(this,e)}}]),EmailField}(U);_defineProperty(B,"classdoc","Holds the value of a string/email field of a record (and related information)");var N=function(e){_inherits(URLField,e);var t=_createSuper(URLField);function URLField(){return _classCallCheck(this,URLField),t.apply(this,arguments)}return _createClass(URLField,[{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){var t=null;try{t=new URL(e.value)}catch(t){e.errors.push(this.msg_url_format(e.value))}null!==t&&"http:"!==t.protocol&&"https:"!==t.protocol&&e.errors.push(this.msg_url_format(e.value))}_get(_getPrototypeOf(URLField.prototype),"_validate",this).call(this,e)}}]),URLField}(U);_defineProperty(N,"classdoc","Holds the value of a string/url field of a record (and related information)");var q=function(e){_inherits(TelField,e);var t=_createSuper(TelField);function TelField(){return _classCallCheck(this,TelField),t.apply(this,arguments)}return _createClass(TelField,[{key:"_validate",value:function _validate(e){if("string"==typeof e.value&&e.value.length>0){/^\\+?[0-9 /()-]+$/.test(e.value)||e.errors.push(this.msg_tel_format(e.value))}_get(_getPrototypeOf(TelField.prototype),"_validate",this).call(this,e)}}]),TelField}(U);_defineProperty(q,"classdoc","Holds the value of a string/tel field of a record (and related information)");var j=function(e){_inherits(TextAreaField,e);var t=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),t.apply(this,arguments)}return TextAreaField}(U);_defineProperty(j,"classdoc","Holds the value of a string/textarea field of a record (and related information)");var V=function(e){_inherits(HTMLField,e);var t=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),t.apply(this,arguments)}return HTMLField}(U);_defineProperty(V,"classdoc","Holds the value of a string/html field of a record (and related information)");var E=function(e){_inherits(GeoField,e);var t=_createSuper(GeoField);function GeoField(){return _classCallCheck(this,GeoField),t.apply(this,arguments)}return _createClass(GeoField,[{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof ze||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}(I);_defineProperty(E,"classdoc","Holds the value of a geo field of a record (and related information)");var G=function(e){_inherits(FileField,e);var t=_createSuper(FileField);function FileField(){return _classCallCheck(this,FileField),t.apply(this,arguments)}return _createClass(FileField,[{key:"_validate",value:function _validate(e){null===e.value||""===e.value?(this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null):e.value instanceof Ge||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),FileField}(I);_defineProperty(G,"classdoc","Holds the value of a file field of a record (and related information)");var z=function(e){_inherits(FileSignatureField,e);var t=_createSuper(FileSignatureField);function FileSignatureField(){return _classCallCheck(this,FileSignatureField),t.apply(this,arguments)}return _createClass(FileSignatureField,[{key:"_validate",value:function _validate(e){_get(_getPrototypeOf(FileSignatureField.prototype),"_validate",this).call(this,e)}}]),FileSignatureField}(G);_defineProperty(z,"classdoc","Holds the value of a file/signature field of a record (and related information)");var Y=function(e){_inherits(DateFieldBase,e);var t=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),t.apply(this,arguments)}return _createClass(DateFieldBase,[{key:"_validate",value:function _validate(e){if(null===e.value||""===e.value)this.control.required&&e.errors.push(this.msg_field_required(e.value)),e.value=null;else if(e.value instanceof Date)e.value=this._convert(new Date(e.value.getTime()));else if("string"==typeof e.value){var t=null;10===e.value.length?t=new Date(e.value+"T00:00:00"):16===e.value.length?t=new Date(e.value+":00"):19===e.value.length&&(t=new Date(e.value)),null===t||Number.isNaN(t.getYear())?e.errors.push(this.msg_date_format(e.value)):e.value=this._convert(t)}else e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null}}]),DateFieldBase}(I);_defineProperty(Y,"classdoc","Holds the value of a date field of a record (and related information)");var J=function(e){_inherits(DateField,e);var t=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),t.apply(this,arguments)}return _createClass(DateField,[{key:"_convert",value:function _convert(e){return new r.Date_(e.getFullYear(),e.getMonth()+1,e.getDate())}}]),DateField}(Y);_defineProperty(J,"classdoc","Holds the value of a date/date field of a record (and related information)");var K=function(e){_inherits(DatetimeMinuteField,e);var t=_createSuper(DatetimeMinuteField);function DatetimeMinuteField(){return _classCallCheck(this,DatetimeMinuteField),t.apply(this,arguments)}return _createClass(DatetimeMinuteField,[{key:"_convert",value:function _convert(e){return e.setSeconds(0),e.setMilliseconds(0),e}}]),DatetimeMinuteField}(Y);_defineProperty(K,"classdoc","Holds the value of a date/datetimeminute field of a record (and related information)");var W=function(e){_inherits(DatetimeSecondField,e);var t=_createSuper(DatetimeSecondField);function DatetimeSecondField(){return _classCallCheck(this,DatetimeSecondField),t.apply(this,arguments)}return _createClass(DatetimeSecondField,[{key:"_convert",value:function _convert(e){return e.setMilliseconds(0),e}}]),DatetimeSecondField}(Y);_defineProperty(W,"classdoc","Holds the value of a date/datetimesecond field of a record (and related information)");var $=function(e){_inherits(LookupFieldBase,e);var t=_createSuper(LookupFieldBase);function LookupFieldBase(){return _classCallCheck(this,LookupFieldBase),t.apply(this,arguments)}return _createClass(LookupFieldBase,[{key:"lookupdata",get:function get(){return null!==this._lookupdate?this._lookupdate:this.control.lookupdata},set:function set(e){this._lookupdate=e}},{key:"_find_lookupitem",value:function _find_lookupitem(e){var t=e.value;if("string"==typeof t){if(null===this.lookupdata)return;var r=this.lookupdata.get(t);if(void 0===r)if(this.control.autoexpandable){var o,l=_createForOfIteratorHelper(this.lookupdata.values());try{for(l.s();!(o=l.n()).done;){var n=o.value;if(t===n.label)return void(e.value=n)}}catch(e){l.e(e)}finally{l.f()}}else e.errors.push(this.msg_lookup_unknownkey(t)),e.value=null;else e.value=r}else if(t instanceof Ue){this.control.lookupdata.get(t.key)!==t&&(e.errors.push(this.msg_lookup_wrongitem(t)),e.value=null)}else e.errors.push(this.msg_field_wrong_type(t)),e.value=null}}]),LookupFieldBase}(I);_defineProperty($,"classdoc","Base type of LookupField and MultipleLookupField");var Z=function(e){_inherits(LookupField,e);var t=_createSuper(LookupField);function LookupField(){return _classCallCheck(this,LookupField),t.apply(this,arguments)}return _createClass(LookupField,[{key:"_validate",value:function _validate(e){var t=e.value;null===t||""===t||this.control.nonekey===t?(this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=null):this._find_lookupitem(e)}}]),LookupField}($);_defineProperty(Z,"classdoc","Holds the value of a lookup field of a record (and related information)");var Q=function(e){_inherits(MultipleLookupField,e);var t=_createSuper(MultipleLookupField);function MultipleLookupField(){return _classCallCheck(this,MultipleLookupField),t.apply(this,arguments)}return _createClass(MultipleLookupField,[{key:"_validate",value:function _validate(e){var t=e.value,r="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.nonekey===t||r&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(r){var o,l=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(o=n.n()).done;){var a={value:o.value,errors:[]};this._find_lookupitem(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):l.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=l}else this._find_lookupitem(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleLookupField}($);_defineProperty(Q,"classdoc","Holds the value of a multiple lookup field of a record (and related information)");var X=function(e){_inherits(AppLookupFieldBase,e);var t=_createSuper(AppLookupFieldBase);function AppLookupFieldBase(){return _classCallCheck(this,AppLookupFieldBase),t.apply(this,arguments)}return _createClass(AppLookupFieldBase,[{key:"lookupdata",get:function get(){return null!==this._lookupdate?this._lookupdate:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map},set:function set(e){this._lookupdate=e}},{key:"_find_record",value:function _find_record(e){var t=e.value;if("string"==typeof t){var r=this.lookupdata.get(t);void 0===r?(e.errors.push(this.msg_applookup_unknownkey(t)),e.value=null):e.value=r}else t instanceof O?t.app!==this.control.lookup_app&&(e.errors.push(this.msg_applookup_wrongrecord(t)),e.value=null):(e.errors.push(this.msg_field_wrong_type(t)),e.value=null)}}]),AppLookupFieldBase}(I);_defineProperty(X,"classdoc","Base type of AppLookupField and MultipleAppLookupField");var ee=function(e){_inherits(AppLookupField,e);var t=_createSuper(AppLookupField);function AppLookupField(){return _classCallCheck(this,AppLookupField),t.apply(this,arguments)}return _createClass(AppLookupField,[{key:"_validate",value:function _validate(e){this._find_record(e)}}]),AppLookupField}(X);_defineProperty(ee,"classdoc","Holds the value of a applookup field of a record (and related information)");var te=function(e){_inherits(MultipleAppLookupField,e);var t=_createSuper(MultipleAppLookupField);function MultipleAppLookupField(){return _classCallCheck(this,MultipleAppLookupField),t.apply(this,arguments)}return _createClass(MultipleAppLookupField,[{key:"_validate",value:function _validate(e){var t=e.value,r="[object Array]"===Object.prototype.toString.call(t);if(null===t||""===t||this.control.nonekey===t||r&&0===t.length)this.control.required&&e.errors.push(this.msg_field_required(t)),e.value=[];else if(r){var o,l=[],n=_createForOfIteratorHelper(t);try{for(n.s();!(o=n.n()).done;){var a={value:o.value,errors:[]};this._find_record(a),a.errors.length>0?e.errors=[].concat(_toConsumableArray(e.errors),_toConsumableArray(a.errors)):l.push(a.value)}}catch(e){n.e(e)}finally{n.f()}e.value=l}else this._find_record(e),e.errors.length>0?e.value=[]:e.value=[e.value]}}]),MultipleAppLookupField}(X);_defineProperty(te,"classdoc","Holds the value of a multiple applookup field of a record (and related information)");var re=function(e){_inherits(Control,e);var t=_createSuper(Control);function Control(){return _classCallCheck(this,Control),t.apply(this,arguments)}return _createClass(Control,[{key:r.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+r._repr(this.id)+" identifier="+r._repr(this.identifier)+">"}},{key:"globals",get:function get(){return this.app.globals}},{key:"fulltype",get:function get(){return this.subtype?this.type+"/"+this.subtype:this.type}},{key:"label",get:function get(){var e=this._view_control();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"label",set:function set(e){this._label=e}},{key:"default",get:function get(){return null}},{key:"top",get:function get(){var e=this._view_control();return null!==e?e.top:null}},{key:"left",get:function get(){var e=this._view_control();return null!==e?e.left:null}},{key:"width",get:function get(){var e=this._view_control();return null!==e?e.width:null}},{key:"height",get:function get(){var e=this._view_control();return null!==e?e.height:null}},{key:"liveupdate",get:function get(){var e=this._view_control();return null!==e&&e.liveupdate}},{key:"tabindex",get:function get(){var e=this._view_control();return null!==e?e.tabindex:null}},{key:"required",get:function get(){var e=this._view_control();return null!==e&&e.required}},{key:"mode",get:function get(){var e=this._view_control();return null!==e?e.mode:"edit"}},{key:"labelpos",get:function get(){var e=this._view_control();return null!==e?e.labelpos:"left"}},{key:"labelwidth",get:function get(){var e=this._view_control();return null!==e?e.labelwidth:null}},{key:"autoalign",get:function get(){var e=this._view_control();return null===e||e.autoalign}},{key:"in_active_view",get:function get(){return null!==this._view_control()}},{key:"_view_control",value:function _view_control(){if(null===this.app._active_view)return null;var e=this.app._active_view.controls.get(this.identifier);return null!=e?e:null}},{key:"_logsearch",value:function _logsearch(e,t){}},{key:"search",value:function search(e,t){return!1}}]),Control}(L);re.prototype.type=null,re.prototype.subtype=null,re.prototype._ul4onattrs=["identifier","fieldname","app","_label","priority","order","ininsertprocedure","inupdateprocedure"],re.prototype._ul4attrs=new Set(["id","identifier","fieldname","app","priority","order","ininsertprocedure","inupdateprocedure","fulltype","label","top","left","width","height","liveupdate","tabindex","required","mode","labelpos","autoalign","in_active_view"]);var oe=function(e){_inherits(BoolControl,e);var t=_createSuper(BoolControl);function BoolControl(){return _classCallCheck(this,BoolControl),t.apply(this,arguments)}return _createClass(BoolControl,[{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),BoolControl}(re);_defineProperty(oe,"classdoc","A LivingApps boolean field (type 'bool')"),oe.prototype.type="bool",oe.prototype.fieldtype=D;var le=function(e){_inherits(IntControl,e);var t=_createSuper(IntControl);function IntControl(){return _classCallCheck(this,IntControl),t.apply(this,arguments)}return _createClass(IntControl,[{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator&&t.value===e}}]),IntControl}(re);_defineProperty(le,"classdoc","A LivingApps integer field (type 'int')"),le.prototype.type="int",le.prototype.fieldtype=H;var ne=function(e){_inherits(PlaceholderControl,e);var t=_createSuper(PlaceholderControl);function PlaceholderControl(){return _classCallCheck(this,PlaceholderControl),t.apply(this,arguments)}return _createClass(PlaceholderControl,[{key:"placeholder",get:function get(){var e=this._view_control();return null===e?null:e.placeholder}}]),PlaceholderControl}(re);_defineProperty(ne,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/select')"),ne.prototype._ul4attrs=new Set([].concat(_toConsumableArray(re.prototype._ul4attrs),["placeholder"]));var ae=function(e){_inherits(NumberControl,e);var t=_createSuper(NumberControl);function NumberControl(){return _classCallCheck(this,NumberControl),t.apply(this,arguments)}return _createClass(NumberControl,[{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"range"===t.operator&&(null!==e&&((null===t.minvalue||t.minvalue<=e)&&(null===t.maxvalue||e<t.maxvalue)))}}]),NumberControl}(ne);_defineProperty(ae,"classdoc","A LivingApps number field (type 'number')"),ae.prototype.type="number",ae.prototype.fieldtype=R;var ie=function(e){_inherits(StringControl,e);var t=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),t.apply(this,arguments)}return _createClass(StringControl,[{key:"_user_placeholder",value:function _user_placeholder(e,t){if(null===t)return null;switch(t){case"{gender}":return null!==e?e.gender:null;case"{title}":return null!==e?e.title:null;case"{firstname}":return null!==e?e.firstname:null;case"{surname}":return null!==e?e.surname:null;case"{account}":return null!==e?e.email:null;case"{streetname}":return null!==e?e.streetname:null;case"{streetnumber}":return null!==e?e.streetnumber:null;case"{street}":return null===e?null:null===e.street?e.streetnumber:null===e.streetnumber?e.street:e.street+" "+e.streetnumber;case"{zip}":return null!==e?e.zip:null;case"{phone}":return null!==e?e.phone:null;case"{fax}":return null!==e?e.fax:null;case"{company}":return null!==e?e.company:null;case"{city}":return null!==e?e.city:null;case"{summary}":return null!==e?e.summary:null;case"{interests}":return null!==e?e.interests:null;case"{personal_website}":return null!==e?e.personal_website:null;case"{company_website}":return null!==e?e.company_website:null;case"{position}":return null!==e?e.position:null;case"{department}":return null!==e?e.department:null;case"{today}":return r.today();default:return t}}},{key:"default",get:function get(){var e=this._view_control();return null===e?null:this._user_placeholder(this.app.globals.user,e.default)}},{key:"minlength",get:function get(){var e=this._view_control();if(null===e)return 0;var t=e.minlength;return null===t||t<0?0:t}},{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return 4e3;var t=e.maxlength;return null===t||t<0||t>4e3?4e3:t}},{key:"search",value:function search(e,t){return this._logsearch(e,t),"equals"===t.operator?t.value===e:"contains"===t.operator?null===t.value||null===e?t.value===e:e.toLowerCase().indexOf(t.value.toLowerCase())>=0:void 0}}]),StringControl}(ne);ie.prototype.type="string";var ue=function(e){_inherits(TextControl,e);var t=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),t.apply(this,arguments)}return TextControl}(ie);_defineProperty(ue,"classdoc","A LivingApps text field (type 'string/text')"),ue.prototype.subtype="text",ue.prototype.fieldtype=U;var se=function(e){_inherits(EmailControl,e);var t=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),t.apply(this,arguments)}return EmailControl}(ie);_defineProperty(se,"classdoc","A LivingApps email field (type 'string/email')"),se.prototype.subtype="email",se.prototype.fieldtype=B;var pe=function(e){_inherits(URLControl,e);var t=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),t.apply(this,arguments)}return URLControl}(ie);_defineProperty(pe,"classdoc","A LivingApps URL field (type 'string/url')"),pe.prototype.subtype="url",pe.prototype.fieldtype=N;var ce=function(e){_inherits(TelControl,e);var t=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),t.apply(this,arguments)}return TelControl}(ie);_defineProperty(ce,"classdoc","A LivingApps phone number field (type 'string/tel')"),ce.prototype.subtype="tel",ce.prototype.fieldtype=q;var de=function(e){_inherits(TextAreaControl,e);var t=_createSuper(TextAreaControl);function TextAreaControl(){return _classCallCheck(this,TextAreaControl),t.apply(this,arguments)}return _createClass(TextAreaControl,[{key:"maxlength",get:function get(){var e=this._view_control();if(null===e)return null;if(null!==this.encrypted)return null;var t=e.maxlength;return t<0?null:t}}]),TextAreaControl}(ie);_defineProperty(de,"classdoc","A LivingApps textarea field (type 'string/textarea')"),de.prototype.subtype="textarea",de.prototype.fieldtype=j,de.prototype._ul4onattrs=[].concat(_toConsumableArray(ie.prototype._ul4onattrs),["encrypted"]),de.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ie.prototype._ul4attrs),["encrypted"]));var he=function(e){_inherits(HTMLControl,e);var t=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),t.apply(this,arguments)}return HTMLControl}(ie);_defineProperty(he,"classdoc","A LivingApps HTML field (type 'string/html')"),he.prototype.subtype="html",he.prototype.fieldtype=V;var _e=function(e){_inherits(DateControl,e);var t=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),t.apply(this,arguments)}return _createClass(DateControl,[{key:"default",get:function get(){var e=this._view_control();return null===e?null:"{today}"===e.default?r.today():null}},{key:"formatstring",value:function formatstring(e){return"de"===(e=e||this.app.language)?"%d.%m.%Y":"%m/%d/%Y"}},{key:"search",value:function search(e,t){this._logsearch(e,t);var o=t.value;return"[object Date]"==Object.prototype.toString.call(o)&&(o=r._format(o,this.formatstring(),this.app.language)),null!==e&&(e=r._format(e,this.formatstring(),this.app.language)),"equals"===t.operator?o===e:"contains"===t.operator&&(null===o||null===e?o===e:e.toLowerCase().indexOf(o.toLowerCase())>=0)}}]),DateControl}(ne);_defineProperty(_e,"classdoc","A LivingApps date field (type 'date/date')"),_e.prototype.type="date",_e.prototype.subtype="date",_e.prototype.fieldtype=J;var fe=function(e){_inherits(DatetimeMinuteControl,e);var t=_createSuper(DatetimeMinuteControl);function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),t.apply(this,arguments)}return _createClass(DatetimeMinuteControl,[{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setSeconds(0),t.setMilliseconds(0),t}return null}},{key:"formatstring",value:function formatstring(e){return"de"===(e=e||this.app.language)?"%d.%m.%Y %H:%M":"%m/%d/%Y %H:%M"}}]),DatetimeMinuteControl}(_e);_defineProperty(fe,"classdoc","A LivingApps date field (type 'date/datetimeminute')"),fe.prototype.subtype="datetimeminute",fe.prototype.fieldtype=K;var ye=function(e){_inherits(DatetimeSecondControl,e);var t=_createSuper(DatetimeSecondControl);function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),t.apply(this,arguments)}return _createClass(DatetimeSecondControl,[{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;if("{today}"===e.default){var t=new Date;return t.setMilliseconds(0),t}return null}},{key:"formatstring",value:function formatstring(e){return"de"===(e=e||this.app.language)?"%d.%m.%Y %H:%M:%S":"%m/%d/%Y %H:%M:%S"}}]),DatetimeSecondControl}(_e);_defineProperty(ye,"classdoc","A LivingApps date field (type 'date/datetimesecond')"),ye.prototype.subtype="datetimesecond",ye.prototype.fieldtype=W;var ve=function(e){_inherits(LookupControl,e);var t=_createSuper(LookupControl);function LookupControl(){return _classCallCheck(this,LookupControl),t.apply(this,arguments)}return _createClass(LookupControl,[{key:"default",get:function get(){var e,t=this._view_control();return null===t?null:null!==(e=this.lookupdata.get(t))&&void 0!==e?e:null}},{key:"autoexpandable",get:function get(){var e=this._view_control();return null!==e&&e.autoexpandable}},{key:"nonekey",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonekey}},{key:"nonelabel",get:function get(){var e=this._view_control();return null===e?null:e.lookupnonelabel}},{key:"search",value:function search(e,t){return"equals"===t.operator&&(null===e?null===t.value:e.key===t.value)}}]),LookupControl}(re);ve.prototype.type="lookup",ve.prototype.fieldtype=Z,ve.prototype._ul4onattrs=[].concat(_toConsumableArray(re.prototype._ul4onattrs),["lookupdata"]),ve.prototype._ul4attrs=new Set([].concat(_toConsumableArray(re.prototype._ul4attrs),["lookupdata"]));var me=function(e){_inherits(LookupSelectControl,e);var t=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),t.apply(this,arguments)}return LookupSelectControl}(ve);_defineProperty(me,"classdoc","A LivingApps lookup field (type 'lookup/select')"),me.prototype.subtype="select";var ke=function(e){_inherits(LookupRadioControl,e);var t=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),t.apply(this,arguments)}return LookupRadioControl}(ve);_defineProperty(ke,"classdoc","A LivingApps lookup field (type 'lookup/radio')"),ke.prototype.subtype="radio";var Ce=function(e){_inherits(LookupChoiceControl,e);var t=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),t.apply(this,arguments)}return LookupChoiceControl}(ve);_defineProperty(Ce,"classdoc","A LivingApps lookup field (type 'lookup/choice')"),Ce.prototype.subtype="choice";var ge=function(e){_inherits(AppLookupControl,e);var t=_createSuper(AppLookupControl);function AppLookupControl(){return _classCallCheck(this,AppLookupControl),t.apply(this,arguments)}return _createClass(AppLookupControl,[{key:"search",value:function search(e,t){return null===e||null===t.value?e===t.value:e.search(t)}}]),AppLookupControl}(re);ge.prototype.type="applookup",ge.prototype.fieldtype=ee,ge.prototype._ul4onattrs=[].concat(_toConsumableArray(re.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),ge.prototype._ul4attrs=new Set([].concat(_toConsumableArray(re.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var be=function(e){_inherits(AppLookupSelectControl,e);var t=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),t.apply(this,arguments)}return AppLookupSelectControl}(ge);_defineProperty(be,"classdoc","A LivingApps applookup field (type 'applookup/select')"),be.prototype.subtype="select";var Ae=function(e){_inherits(AppLookupRadioControl,e);var t=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),t.apply(this,arguments)}return AppLookupRadioControl}(ge);_defineProperty(Ae,"classdoc","A LivingApps applookup field (type 'applookup/radio')"),Ae.prototype.subtype="radio";var Le=function(e){_inherits(AppLookupChoiceControl,e);var t=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),t.apply(this,arguments)}return AppLookupChoiceControl}(ge);_defineProperty(Le,"classdoc","A LivingApps applookup field (type 'applookup/choice')"),Le.prototype.subtype="choice";var we=function(e){_inherits(MultipleLookupControl,e);var t=_createSuper(MultipleLookupControl);function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),t.apply(this,arguments)}return _createClass(MultipleLookupControl,[{key:"default",get:function get(){var e=this._view_control();if(null===e)return null;var t=this.lookupdata.get(e);return void 0!==t?[t]:[]}},{key:"search",value:function search(e,t){if("equals"===t.operator){var r,o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){if(r.value.key===t.value)return!0}}catch(e){o.e(e)}finally{o.f()}return!1}return!1}}]),MultipleLookupControl}(ve);we.prototype.subtype="multiplelookup",we.prototype.fieldtype=Q;var Fe=function(e){_inherits(MultipleLookupSelectControl,e);var t=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),t.apply(this,arguments)}return MultipleLookupSelectControl}(we);_defineProperty(Fe,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/select')"),Fe.prototype.subtype="select";var Se=function(e){_inherits(MultipleLookupCheckboxControl,e);var t=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),t.apply(this,arguments)}return MultipleLookupCheckboxControl}(we);_defineProperty(Se,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),Se.prototype.subtype="checkbox";var Me=function(e){_inherits(MultipleLookupChoiceControl,e);var t=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),t.apply(this,arguments)}return MultipleLookupChoiceControl}(we);_defineProperty(Me,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),Me.prototype.subtype="choice";var Pe=function(e){_inherits(MultipleAppLookupControl,e);var t=_createSuper(MultipleAppLookupControl);function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),t.apply(this,arguments)}return _createClass(MultipleAppLookupControl,[{key:"search",value:function search(e,t){if("equals"===t.operator){if(null===t.value)return 0===e.length;var r,o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){if(r.value.search(t.value))return!0}}catch(e){o.e(e)}finally{o.f()}return!1}return!1}}]),MultipleAppLookupControl}(ge);Pe.prototype.type="multipleapplookup",Pe.prototype.fieldtype=te;var xe=function(e){_inherits(MultipleAppLookupSelectControl,e);var t=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),t.apply(this,arguments)}return MultipleAppLookupSelectControl}(Pe);_defineProperty(xe,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),xe.prototype.subtype="select";var Te=function(e){_inherits(MultipleAppLookupCheckboxControl,e);var t=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),t.apply(this,arguments)}return MultipleAppLookupCheckboxControl}(Pe);_defineProperty(Te,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),Te.prototype.subtype="checkbox";var Oe=function(e){_inherits(MultipleAppLookupChoiceControl,e);var t=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),t.apply(this,arguments)}return MultipleAppLookupChoiceControl}(Pe);_defineProperty(Oe,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),Oe.prototype.subtype="choice";var Ie=function(e){_inherits(GeoControl,e);var t=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),t.apply(this,arguments)}return GeoControl}(re);_defineProperty(Ie,"classdoc","A LivingApps geo field (type 'geo')"),Ie.prototype.type="geo",Ie.prototype.fieldtype=E;var De=function(e){_inherits(FileControl,e);var t=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),t.apply(this,arguments)}return FileControl}(re);_defineProperty(De,"classdoc","A LivingApps upload field (type 'file')"),De.prototype.type="file",De.prototype.fieldtype=G;var He=function(e){_inherits(FileSignatureControl,e);var t=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),t.apply(this,arguments)}return FileSignatureControl}(De);_defineProperty(He,"classdoc","A LivingApps signature image field (type 'file/signature')"),He.prototype.subtype="signature",He.prototype.fieldtype=z;var Re=function(e){_inherits(ButtonControl,e);var t=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),t.apply(this,arguments)}return ButtonControl}(re);Re.prototype.type="button",_=r.symbols.repr;var Ue=function(e){_inherits(LookupItem,e);var t=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),t.apply(this,arguments)}return _createClass(LookupItem,[{key:"label",get:function get(){if(null===this.control)return this._label;var e=this._view_lookupitem();if(null===e)return this._label;var t=e.label;return null===t?this._label:t}},{key:"visible",get:function get(){if(null===this.control)return!0;var e=this._view_lookupitem();return null===e||e.visible}},{key:"_view_lookupitem",value:function _view_lookupitem(){var e=this.control.identifier,t=this.control.app.active_view;if(null!==t&&null!==t.controls){var r=t.controls.get(e);if(void 0!==r&&void 0!==r.lookupdata&&null!==r.lookupdata){var o=r.lookupdata.get(this.key);if(void 0!==o)return o}}return null}},{key:_,value:function value(){var e="<LookupItem key="+r._repr(this.key)+" label="+r._repr(this.label);return this.visible||(e+="visible=False"),e+">"}}]),LookupItem}(L);_defineProperty(Ue,"classdoc","An option in a lookup control/field"),Ue.prototype._ul4onattrs=["control","key","_label"],Ue.prototype._ul4attrs=new Set(["id","control","key","label"]),f=r.symbols.repr;var Be=function(e){_inherits(ViewLookupItem,e);var t=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),t.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:f,value:function value(){var e="<ViewLookupItem key="+r._repr(this.key)+" label="+r._repr(this.label);return this.visible||(e+=" visible=False"),e+">"}}]),ViewLookupItem}(L);_defineProperty(Be,"classdoc","View specific information about a lookup item"),Be.prototype._ul4onattrs=["key","label","visible"],Be.prototype._ul4attrs=new Set(["key","label","visible"]),y=r.symbols.repr;var Ne=function(e){_inherits(LayoutControl,e);var t=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),t.apply(this,arguments)}return _createClass(LayoutControl,[{key:y,value:function value(){return"<"+this.constructor.name+" id="+r._repr(this.id)+" identifier="+r._repr(this.identifier)+">"}}]),LayoutControl}(L);_defineProperty(Ne,"classdoc","A decoration in an input form"),Ne.prototype._ul4onattrs=["label","identifier","view","top","left","width","height"],Ne.prototype._ul4attrs=new Set(["id","label","identifier","view","top","left","width","height"]);var qe=function(e){_inherits(HTMLLayoutControl,e);var t=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),t.apply(this,arguments)}return HTMLLayoutControl}(Ne);_defineProperty(qe,"classdoc","An HTML decoration in an input form"),qe.prototype._ul4onattrs=[].concat(_toConsumableArray(Ne.prototype._ul4onattrs),["value"]),qe.prototype._ul4attrs=new Set([Ne.prototype._ul4attrs,"value"]);var je=function(e){_inherits(ImageLayoutControl,e);var t=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),t.apply(this,arguments)}return ImageLayoutControl}(Ne);_defineProperty(je,"classdoc","An image decoration in an input form"),je.prototype._ul4onattrs=[].concat(_toConsumableArray(Ne.prototype._ul4onattrs),["original","scaled"]),je.prototype._ul4attrs=new Set([Ne.prototype._ul4attrs,"original","scaled"]);var Ve=function(e){_inherits(ViewControl,e);var t=_createSuper(ViewControl);function ViewControl(){return _classCallCheck(this,ViewControl),t.apply(this,arguments)}return _createClass(ViewControl,[{key:"mode",get:function get(){return this._mode?"display":"edit"}}]),ViewControl}(L);_defineProperty(Ve,"classdoc","Contains view specific information aboutn a control"),Ve.prototype._ul4onattrs=["view","control","top","left","width","height","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],Ve.prototype._ul4attrs=new Set(["id","view","control","top","left","width","height","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"]),v=r.symbols.repr;var Ee=function(e){_inherits(User,e);var t=_createSuper(User);function User(){return _classCallCheck(this,User),t.apply(this,arguments)}return _createClass(User,[{key:v,value:function value(){return"<User id="+r._repr(this.id)+" firstname="+r._repr(this.firstname)+" surname="+r._repr(this.surname)+" email="+r._repr(this.email)+">"}}]),User}(L);_defineProperty(Ee,"classdoc","A LivingApps user/account"),Ee.prototype._ul4onattrs=["_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","avatarsmall","avatarlarge","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"],Ee.prototype._ul4attrs=new Set(["id","_id","gender","title","firstname","surname","initials","email","streetname","streetnumber","zip","city","phone","fax","lang","avatarsmall","avatarlarge","summary","interests","personalwebsite","companywebsite","company","position","department","keyviews"]),m=r.symbols.repr;var Ge=function(e){_inherits(File,e);var t=_createSuper(File);function File(){return _classCallCheck(this,File),t.apply(this,arguments)}return _createClass(File,[{key:m,value:function value(){return"<File id="+r._repr(this.id)+" url="+r._repr(this.url)+" filename="+r._repr(this.filename)+">"}}]),File}(L);_defineProperty(Ge,"classdoc","An uploaded file"),Ge.prototype._ul4onattrs=["url","filename","mimetype","width","height","internalid","createdat","size"],Ge.prototype._ul4attrs=new Set(["id","url","filename","mimetype","width","height","size","createdat"]),k=r.symbols.repr;var ze=function(e){_inherits(Geo,e);var t=_createSuper(Geo);function Geo(e,r,o){var l;return _classCallCheck(this,Geo),(l=t.call(this,null)).lat=e,l.long=r,l.info=o,l}return _createClass(Geo,[{key:k,value:function value(){return"<Geo lat="+r._repr(this.lat)+" long="+r._repr(this.long)+" info="+r._repr(this.info)+">"}}]),Geo}(L);_defineProperty(ze,"classdoc","Geographical coordinates and location information"),ze.prototype._ul4onattrs=["lat","long","info"],ze.prototype._ul4attrs=new Set(["lat","long","info"]);var Ye=function(e){_inherits(Attachment,e);var t=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),t.apply(this,arguments)}return _createClass(Attachment,[{key:r.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+r._repr(this.id)+" label="+r._repr(this.label)+">"}}]),Attachment}(L);Ye.prototype._ul4onattrs=["record","label","active"],Ye.prototype._ul4attrs=new Set(["id","record","label","active"]);var Je=function(e){_inherits(NoteAttachment,e);var t=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),t.apply(this,arguments)}return NoteAttachment}(Ye);_defineProperty(Je,"classdoc","A note attachment of a record"),Je.prototype.type="noteattachment",Je.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),Je.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]));var Ke=function(e){_inherits(URLAttachment,e);var t=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),t.apply(this,arguments)}return URLAttachment}(Ye);_defineProperty(Ke,"classdoc","A URL attachment of a record"),Ke.prototype.type="urlattachment",Ke.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),Ke.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]));var We=function(e){_inherits(FileAttachment,e);var t=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),t.apply(this,arguments)}return FileAttachment}(Ye);_defineProperty(We,"classdoc","A file attachment of a record"),We.prototype.type="fileattachment",We.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),We.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]));var $e=function(e){_inherits(ImageAttachment,e);var t=_createSuper(ImageAttachment);function ImageAttachment(){return _classCallCheck(this,ImageAttachment),t.apply(this,arguments)}return ImageAttachment}(Ye);_defineProperty($e,"classdoc","An image attachment of a record"),$e.prototype.type="imageattachment",$e.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["original","thumb","small","medium","large"]),$e.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["original","thumb","small","medium","large"]));var Ze=function(e){_inherits(JSONAttachment,e);var t=_createSuper(JSONAttachment);function JSONAttachment(){return _classCallCheck(this,JSONAttachment),t.apply(this,arguments)}return _createClass(JSONAttachment,[{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(e){return"value"===e?r._asjson(this.value):this[e]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(e,t){"value"===e?this.value=r._fromjson(t):this[e]=t}}]),JSONAttachment}(Ye);_defineProperty(Ze,"classdoc","A JSON attachment of a record"),Ze.prototype.type="jsonattachment",Ze.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),Ze.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"])),C=r.symbols.repr;var Qe=function(e){_inherits(Installation,e);var t=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),t.apply(this,arguments)}return _createClass(Installation,[{key:C,value:function value(){return"<Installation id="+r._repr(this.id)+" name="+r._repr(this.name)+">"}}]),Installation}(L);_defineProperty(Qe,"classdoc","The installation that created an app"),Qe.prototype._ul4onattrs=["name"],Qe.prototype._ul4attrs=new Set(["id","name"]),g=r.symbols.repr;var Xe=function(e){_inherits(Category,e);var t=_createSuper(Category);function Category(){return _classCallCheck(this,Category),t.apply(this,arguments)}return _createClass(Category,[{key:g,value:function value(){for(var e=[],t=this;null!==t;)e.splice(0,0,t.identifier),t=t.parent;return"<Category id="+r._repr(this.id)+" identifierpath="+r._repr(e.join("/"))+NaN+r._repr(this.name)+">"}}]),Category}(L);_defineProperty(Xe,"classdoc","A navigation category"),Xe.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],Xe.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]),b=r.symbols.repr;var et=function(e){_inherits(KeyView,e);var t=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),t.apply(this,arguments)}return _createClass(KeyView,[{key:b,value:function value(){return"<KeyView id="+r._repr(this.id)+" identifier="+r._repr(this.identifier)+">"}}]),KeyView}(L);_defineProperty(et,"classdoc","Object granting access to a view template"),et.prototype._ul4onattrs=["identifier","name","key","user"],et.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]),A=r.symbols.repr;var tt=function(e){_inherits(AppParameter,e);var t=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),t.apply(this,arguments)}return _createClass(AppParameter,[{key:A,value:function value(){return"<AppParameter id="+r._repr(this.id)+" identifier="+r._repr(this.identifier)+">"}}]),AppParameter}(L);_defineProperty(tt,"classdoc","A parameter of a LivingApps application"),tt.prototype._ul4onattrs=["app","identifier","description","value"],tt.prototype._ul4attrs=new Set(["id","app","identifier","description","value"]);for(var rt=0,ot=[S,M,P,x,T,O,oe,le,ae,ue,se,pe,ce,de,_e,fe,ye,ve,me,ke,Ce,ge,be,Ae,Le,we,Fe,Se,Me,Pe,xe,Te,Oe,Ie,De,He,Re,I,D,U,B,N,q,j,V,H,R,E,G,z,Y,J,K,W,$,Z,Q,X,ee,te,Ue,Be,Ne,qe,je,Ve,Ee,Ge,ze,Je,Ke,We,$e,Ze,Qe,Xe,et,tt];rt<ot.length;rt++){var lt=ot[rt];r.register("de.livinglogic.livingapi."+lt.name.toLowerCase(),lt)}e.App=P,e.AppLookupChoiceControl=Le,e.AppLookupControl=ge,e.AppLookupField=ee,e.AppLookupFieldBase=X,e.AppLookupRadioControl=Ae,e.AppLookupSelectControl=be,e.AppParameter=tt,e.Attachment=Ye,e.Base=L,e.BoolControl=oe,e.BoolField=D,e.ButtonControl=Re,e.Category=Xe,e.Control=re,e.DataSourceData=T,e.DateControl=_e,e.DateField=J,e.DateFieldBase=Y,e.DatetimeMinuteControl=fe,e.DatetimeMinuteField=K,e.DatetimeSecondControl=ye,e.DatetimeSecondField=W,e.EmailControl=se,e.EmailField=B,e.Field=I,e.File=Ge,e.FileAttachment=We,e.FileControl=De,e.FileField=G,e.FileSignatureControl=He,e.FileSignatureField=z,e.FlashMessage=M,e.Geo=ze,e.GeoControl=Ie,e.GeoField=E,e.Globals=S,e.HTMLControl=he,e.HTMLField=V,e.HTMLLayoutControl=qe,e.Handler=w,e.ImageAttachment=$e,e.ImageLayoutControl=je,e.Installation=Qe,e.IntControl=le,e.IntField=H,e.JSONAttachment=Ze,e.KeyView=et,e.LayoutControl=Ne,e.LookupChoiceControl=Ce,e.LookupControl=ve,e.LookupField=Z,e.LookupFieldBase=$,e.LookupItem=Ue,e.LookupRadioControl=ke,e.LookupSelectControl=me,e.MultipleAppLookupCheckboxControl=Te,e.MultipleAppLookupChoiceControl=Oe,e.MultipleAppLookupControl=Pe,e.MultipleAppLookupField=te,e.MultipleAppLookupSelectControl=xe,e.MultipleLookupCheckboxControl=Se,e.MultipleLookupChoiceControl=Me,e.MultipleLookupControl=we,e.MultipleLookupField=Q,e.MultipleLookupSelectControl=Fe,e.NoteAttachment=Je,e.NumberControl=ae,e.NumberField=R,e.Record=O,e.StringControl=ie,e.StringField=U,e.TelControl=ce,e.TelField=q,e.TextAreaControl=de,e.TextAreaField=j,e.TextControl=ue,e.URLAttachment=Ke,e.URLControl=pe,e.URLField=N,e.User=Ee,e.View=x,e.ViewControl=Ve,e.ViewLookupItem=Be,e.version="0.13.0",Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=livingapi.js.map
|