@livinglogic/livingapi 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -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 +3 -3
- package/src/livingapi.js +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"@livinglogic/ul4";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 t,r,o,l,n,a,i,u,s,p,c,d,_,h,f,y,v,m,g,k,C,b="0.13.0",A=function(t){_inherits(Base,e.Proto);var r=_createSuper(Base);function Base(e){var t;return _classCallCheck(this,Base),(t=r.call(this)).id=e,t}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:e.symbols.getattr,value:function value(t){if(this._ul4attrs.has(t)){var value=this[t];if("function"==typeof value){var r=value.bind(this);return r._ul4_name=value._ul4_name||value.name,r._ul4_signature=value._ul4_signature,r._ul4_needsobject=value._ul4_needsobject,r._ul4_needscontext=value._ul4_needscontext,r}return value}throw new e.AttributeError(this,t)}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Base}(),L=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}();t=e.symbols.repr;var w=function(r){_inherits(Globals,A);var o=_createSuper(Globals);function Globals(e){var t;return _classCallCheck(this,Globals),(t=o.call(this,e)).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 L,t}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 Ee&&(e="https://"+this.hostname+e.url,(d=encodeURIComponent(e.filename))!=e.filename&&(d=null));var _="";return _+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==o&&(_+="/rt:"+o),null!=t&&(_+="/w:"+t),null!=r&&(_+="/h:"+r),l&&(_+="/el:1"),null!=n&&(_+="/g:"+n),null!=a&&(_+="/q:"+a),null!==i&&i%360!=0&&(_+="/rot:"+rotatet),null!=u&&(_+="/bl:"+u),null!=s&&(_+="/sh:"+s),null!=p&&(_+="/f:"+p),null!=d&&(_+="/fn:"+d),_+="/plain/"+encodeURIComponent(e)}},{key:t,value:function value(){return"<Globals version="+e._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),_=o(p)*o(c)+r(s)*r(c),h=Math.atan(Math.sqrt(d/_)),f=2*h*6378.137,y=Math.sqrt(d*_)/h,v=(3*y+1)/(2*d);return f*(1+n*((3*y-1)/(2*_))*r(s)*o(p)-n*v*o(s)*r(p))}}]),Globals}();_defineProperty(w,"classdoc","Global information"),w.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"],w.prototype._ul4attrs=new Set(["version","hostname","platform","user","lang","app","record","maxdbactions","maxtemplateruntime","flashmessages","mode"]),r=e.symbols.repr;var S=function(t){_inherits(FlashMessage,A);var o=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),o.apply(this,arguments)}return _createClass(FlashMessage,[{key:r,value:function value(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();_defineProperty(S,"classdoc","A flash message in a web page"),S.prototype._ul4onattrs=["timestamp","type","title","message"],S.prototype._ul4attrs=new Set(["timestamp","type","title","message"]),o=e.symbols.repr,l=e.symbols.call,n=e.symbols.getattr;var P=function(t){_inherits(App,A);var r=_createSuper(App);function App(){return _classCallCheck(this,App),r.apply(this,arguments)}return _createClass(App,[{key:o,value:function value(){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]:{},r=this[e.symbols.call](t);return this.globals.handler.save(this),r}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:l,value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new O(null,this);if(e._ismap(t)){var o,l=_createForOfIteratorHelper(t.keys());try{for(l.s();!(o=l.n()).done;){var n=o.value;if(!r.fields.has(n))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(n))}}catch(e){l.e(e)}finally{l.f()}r._make_fields(!0,t,null,null)}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var a in t)if(!r.fields.has(a))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(a));r._make_fields(!0,new Map(e._list(e.dicttype.items(t))),null,null)}return r}},{key:n,value:function value(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),e.symbols.getattr,this).call(this,t)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(t){if(null===t);else if("string"==typeof t){if(null===this.views||!this.views.has(t))throw new e.ValueError("View "+e._repr(t)+" not found!");t=this.views.get(t)}else{if(!(t instanceof M))throw new e.TypeError(e._repr(t)+" is not a view!");if(t.app!==this)throw new e.ValueError("View "+e._repr(t)+" belongs to the wrong app!")}this._active_view=t}}]),App}();_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"]),e.expose(P.prototype[e.symbols.call],["**values"],{needsobject:!0}),e.expose(P.prototype.insert,["**values"],{needsobject:!0}),a=e.symbols.repr;var M=function(t){_inherits(View,A);var r=_createSuper(View);function View(){return _classCallCheck(this,View),r.apply(this,arguments)}return _createClass(View,[{key:a,value:function value(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();_defineProperty(M,"classdoc","An input form for a LivingApps application"),M.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang"],M.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang"]),i=e.symbols.repr;var x=function(t){_inherits(DataSourceData,A);var r=_createSuper(DataSourceData);function DataSourceData(){return _classCallCheck(this,DataSourceData),r.apply(this,arguments)}return _createClass(DataSourceData,[{key:i,value:function value(){return"<DataSource.Data id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceData}();_defineProperty(x,"classdoc","The data resulting from a data source configuration"),x.prototype._ul4onattrs=["identifier","app","apps"],x.prototype._ul4attrs=new Set(["id","identifier","app","apps"]),u=e.symbols.repr,s=e.symbols.getattr,p=e.symbols.setattr;var O=function(t){_inherits(Record,A);var r=_createSuper(Record);function Record(e,t){var o;return _classCallCheck(this,Record),(o=r.call(this,e)).app=t,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.fieldtype(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:u,value:function value(){var t,r=["<Record id=",e._repr(this.id)],o=_createForOfIteratorHelper(this.fields.values());try{for(o.s();!(t=o.n()).done;){var l=t.value;l.control.priority&&!l.is_empty()&&(r.push(" v_"),r.push(l.control.identifier),r.push("="),r.push(e._repr(l.value)))}}catch(e){o.e(e)}finally{o.f()}return r.push(" state="),r.push(e._repr(this.state)),r.push(">"),r.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 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 l=_slicedToArray(r.value,2),n=l[0],a=l[1];if(!this.fields.has(n))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(n));fields.get(n).value=a}}catch(e){o.e(e)}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:"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:s,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:p,value:function value(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}}}]),Record}();_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"]),e.expose(O.prototype.is_dirty,[]),e.expose(O.prototype.has_errors,[]),e.expose(O.prototype.delete,[]),e.expose(O.prototype.save,[]),e.expose(O.prototype.update,["**values"],{needsobject:!0}),c=e.symbols.repr;var T=function(t){_inherits(Field,A);var r=_createSuper(Field);function Field(e,t,o){var l;return _classCallCheck(this,Field),(l=r.call(this,null)).control=e,l.record=t,l._label=null,l._lookupdate=null,l.errors=[],l._value=null,l.value=o,l._dirty=!1,l}return _createClass(Field,[{key:"value",get:function get(){return this._value},set:function set(t){var r=this._value,o={value:t,errors:[]};this._validate(o),e._ne(r,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||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(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(t){return'"'.concat(this.label,"\" doesn't support the type ").concat(e._type(t).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(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" can't be found!")}},{key:c,value:function value(){var t="<Field identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),this.errors.length>0&&(t+=" has_errors()=True"),t+=">"}}]),Field}();_defineProperty(T,"classdoc","Holds the value of a field of a record (and related information)"),T.prototype._ul4onattrs=["control","record","label","value","errors","enabled","writable","visible"],T.prototype._ul4attrs=new Set(["control","record","label","value","errors","enabled","writable","visible"]);var I=function(e){_inherits(BoolField,T);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}();_defineProperty(I,"classdoc","Holds the value of a bool field of a record (and related information)");var D=function(e){_inherits(IntField,T);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}();_defineProperty(D,"classdoc","Holds the value of an int field of a record (and related information)");var H=function(e){_inherits(NumberField,T);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}();_defineProperty(H,"classdoc","Holds the value of a number field of a record (and related information)");var R=function(e){_inherits(StringField,T);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}();_defineProperty(R,"classdoc","Holds the value of a string field of a record (and related information)");var U=function(e){_inherits(EmailField,R);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}();_defineProperty(U,"classdoc","Holds the value of a string/email field of a record (and related information)");var N=function(e){_inherits(URLField,R);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}();_defineProperty(N,"classdoc","Holds the value of a string/url field of a record (and related information)");var B=function(e){_inherits(TelField,R);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}();_defineProperty(B,"classdoc","Holds the value of a string/tel field of a record (and related information)");var q=function(e){_inherits(TextAreaField,R);var t=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),t.apply(this,arguments)}return TextAreaField}();_defineProperty(q,"classdoc","Holds the value of a string/textarea field of a record (and related information)");var j=function(e){_inherits(HTMLField,R);var t=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),t.apply(this,arguments)}return HTMLField}();_defineProperty(j,"classdoc","Holds the value of a string/html field of a record (and related information)");var V=function(e){_inherits(GeoField,T);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 Ge||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}();_defineProperty(V,"classdoc","Holds the value of a geo field of a record (and related information)");var E=function(e){_inherits(FileField,T);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 Ee||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),FileField}();_defineProperty(E,"classdoc","Holds the value of a file field of a record (and related information)");var G=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}();_defineProperty(G,"classdoc","Holds the value of a file/signature field of a record (and related information)");var Y=function(e){_inherits(DateFieldBase,T);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}();_defineProperty(Y,"classdoc","Holds the value of a date field of a record (and related information)");var z=function(t){_inherits(DateField,Y);var r=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),r.apply(this,arguments)}return _createClass(DateField,[{key:"_convert",value:function _convert(t){return new e.Date_(t.getFullYear(),t.getMonth()+1,t.getDate())}}]),DateField}();_defineProperty(z,"classdoc","Holds the value of a date/date field of a record (and related information)");var W=function(e){_inherits(DatetimeMinuteField,Y);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}();_defineProperty(W,"classdoc","Holds the value of a date/datetimeminute field of a record (and related information)");var J=function(e){_inherits(DatetimeSecondField,Y);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}();_defineProperty(J,"classdoc","Holds the value of a date/datetimesecond field of a record (and related information)");var K=function(e){_inherits(LookupFieldBase,T);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 Re){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}();_defineProperty(K,"classdoc","Base type of LookupField and MultipleLookupField");var $=function(e){_inherits(LookupField,K);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($,"classdoc","Holds the value of a lookup field of a record (and related information)");var Z=function(e){_inherits(MultipleLookupField,K);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(Z,"classdoc","Holds the value of a multiple lookup field of a record (and related information)");var Q=function(e){_inherits(AppLookupFieldBase,T);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._lookupdata?this._lookupdata:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map},set:function set(e){this._lookupdata=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}();_defineProperty(Q,"classdoc","Base type of AppLookupField and MultipleAppLookupField");var X=function(e){_inherits(AppLookupField,Q);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}();_defineProperty(X,"classdoc","Holds the value of a applookup field of a record (and related information)");var ee=function(e){_inherits(MultipleAppLookupField,Q);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}();_defineProperty(ee,"classdoc","Holds the value of a multiple applookup field of a record (and related information)");var te=function(t){_inherits(Control,A);var r=_createSuper(Control);function Control(){return _classCallCheck(this,Control),r.apply(this,arguments)}return _createClass(Control,[{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._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}();te.prototype.type=null,te.prototype.subtype=null,te.prototype._ul4onattrs=["identifier","fieldname","app","_label","priority","order","ininsertprocedure","inupdateprocedure"],te.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 re=function(e){_inherits(BoolControl,te);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}();_defineProperty(re,"classdoc","A LivingApps boolean field (type 'bool')"),re.prototype.type="bool",re.prototype.fieldtype=I;var oe=function(e){_inherits(IntControl,te);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}();_defineProperty(oe,"classdoc","A LivingApps integer field (type 'int')"),oe.prototype.type="int",oe.prototype.fieldtype=D;var le=function(e){_inherits(PlaceholderControl,te);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}();_defineProperty(le,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/select')"),le.prototype._ul4attrs=new Set([].concat(_toConsumableArray(te.prototype._ul4attrs),["placeholder"]));var ne=function(e){_inherits(NumberControl,le);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}();_defineProperty(ne,"classdoc","A LivingApps number field (type 'number')"),ne.prototype.type="number",ne.prototype.fieldtype=H;var ae=function(t){_inherits(StringControl,le);var r=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),r.apply(this,arguments)}return _createClass(StringControl,[{key:"_user_placeholder",value:function _user_placeholder(t,r){if(null===r)return null;switch(r){case"{gender}":return null!==t?t.gender:null;case"{title}":return null!==t?t.title:null;case"{firstname}":return null!==t?t.firstname:null;case"{surname}":return null!==t?t.surname:null;case"{account}":return null!==t?t.email:null;case"{streetname}":return null!==t?t.streetname:null;case"{streetnumber}":return null!==t?t.streetnumber:null;case"{street}":return null===t?null:null===t.street?t.streetnumber:null===t.streetnumber?t.street:t.street+" "+t.streetnumber;case"{zip}":return null!==t?t.zip:null;case"{phone}":return null!==t?t.phone:null;case"{fax}":return null!==t?t.fax:null;case"{company}":return null!==t?t.company:null;case"{city}":return null!==t?t.city:null;case"{summary}":return null!==t?t.summary:null;case"{interests}":return null!==t?t.interests:null;case"{personal_website}":return null!==t?t.personal_website:null;case"{company_website}":return null!==t?t.company_website:null;case"{position}":return null!==t?t.position:null;case"{department}":return null!==t?t.department:null;case"{today}":return e.today();default:return r}}},{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}();ae.prototype.type="string";var ie=function(e){_inherits(TextControl,ae);var t=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),t.apply(this,arguments)}return TextControl}();_defineProperty(ie,"classdoc","A LivingApps text field (type 'string/text')"),ie.prototype.subtype="text",ie.prototype.fieldtype=R;var ue=function(e){_inherits(EmailControl,ae);var t=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),t.apply(this,arguments)}return EmailControl}();_defineProperty(ue,"classdoc","A LivingApps email field (type 'string/email')"),ue.prototype.subtype="email",ue.prototype.fieldtype=U;var se=function(e){_inherits(URLControl,ae);var t=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),t.apply(this,arguments)}return URLControl}();_defineProperty(se,"classdoc","A LivingApps URL field (type 'string/url')"),se.prototype.subtype="url",se.prototype.fieldtype=N;var pe=function(e){_inherits(TelControl,ae);var t=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),t.apply(this,arguments)}return TelControl}();_defineProperty(pe,"classdoc","A LivingApps phone number field (type 'string/tel')"),pe.prototype.subtype="tel",pe.prototype.fieldtype=B;var ce=function(e){_inherits(TextAreaControl,ae);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}();_defineProperty(ce,"classdoc","A LivingApps textarea field (type 'string/textarea')"),ce.prototype.subtype="textarea",ce.prototype.fieldtype=q,ce.prototype._ul4onattrs=[].concat(_toConsumableArray(ae.prototype._ul4onattrs),["encrypted"]),ce.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ae.prototype._ul4attrs),["encrypted"]));var de=function(e){_inherits(HTMLControl,ae);var t=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),t.apply(this,arguments)}return HTMLControl}();_defineProperty(de,"classdoc","A LivingApps HTML field (type 'string/html')"),de.prototype.subtype="html",de.prototype.fieldtype=j;var _e=function(t){_inherits(DateControl,le);var r=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),r.apply(this,arguments)}return _createClass(DateControl,[{key:"default",get:function get(){var t=this._view_control();return null===t?null:"{today}"===t.default?e.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(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}();_defineProperty(_e,"classdoc","A LivingApps date field (type 'date/date')"),_e.prototype.type="date",_e.prototype.subtype="date",_e.prototype.fieldtype=z;var he=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}();_defineProperty(he,"classdoc","A LivingApps date field (type 'date/datetimeminute')"),he.prototype.subtype="datetimeminute",he.prototype.fieldtype=W;var fe=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}();_defineProperty(fe,"classdoc","A LivingApps date field (type 'date/datetimesecond')"),fe.prototype.subtype="datetimesecond",fe.prototype.fieldtype=J;var ye=function(e){_inherits(LookupControl,te);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}();ye.prototype.type="lookup",ye.prototype.fieldtype=$,ye.prototype._ul4onattrs=[].concat(_toConsumableArray(te.prototype._ul4onattrs),["lookupdata"]),ye.prototype._ul4attrs=new Set([].concat(_toConsumableArray(te.prototype._ul4attrs),["lookupdata"]));var ve=function(e){_inherits(LookupSelectControl,ye);var t=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),t.apply(this,arguments)}return LookupSelectControl}();_defineProperty(ve,"classdoc","A LivingApps lookup field (type 'lookup/select')"),ve.prototype.subtype="select";var me=function(e){_inherits(LookupRadioControl,ye);var t=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),t.apply(this,arguments)}return LookupRadioControl}();_defineProperty(me,"classdoc","A LivingApps lookup field (type 'lookup/radio')"),me.prototype.subtype="radio";var ge=function(e){_inherits(LookupChoiceControl,ye);var t=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),t.apply(this,arguments)}return LookupChoiceControl}();_defineProperty(ge,"classdoc","A LivingApps lookup field (type 'lookup/choice')"),ge.prototype.subtype="choice";var ke=function(e){_inherits(AppLookupControl,te);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}();ke.prototype.type="applookup",ke.prototype.fieldtype=X,ke.prototype._ul4onattrs=[].concat(_toConsumableArray(te.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),ke.prototype._ul4attrs=new Set([].concat(_toConsumableArray(te.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var Ce=function(e){_inherits(AppLookupSelectControl,ke);var t=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),t.apply(this,arguments)}return AppLookupSelectControl}();_defineProperty(Ce,"classdoc","A LivingApps applookup field (type 'applookup/select')"),Ce.prototype.subtype="select";var be=function(e){_inherits(AppLookupRadioControl,ke);var t=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),t.apply(this,arguments)}return AppLookupRadioControl}();_defineProperty(be,"classdoc","A LivingApps applookup field (type 'applookup/radio')"),be.prototype.subtype="radio";var Ae=function(e){_inherits(AppLookupChoiceControl,ke);var t=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),t.apply(this,arguments)}return AppLookupChoiceControl}();_defineProperty(Ae,"classdoc","A LivingApps applookup field (type 'applookup/choice')"),Ae.prototype.subtype="choice";var Le=function(e){_inherits(MultipleLookupControl,ye);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}();Le.prototype.subtype="multiplelookup",Le.prototype.fieldtype=Z;var we=function(e){_inherits(MultipleLookupSelectControl,Le);var t=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),t.apply(this,arguments)}return MultipleLookupSelectControl}();_defineProperty(we,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/select')"),we.prototype.subtype="select";var Se=function(e){_inherits(MultipleLookupCheckboxControl,Le);var t=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),t.apply(this,arguments)}return MultipleLookupCheckboxControl}();_defineProperty(Se,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),Se.prototype.subtype="checkbox";var Fe=function(e){_inherits(MultipleLookupChoiceControl,Le);var t=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),t.apply(this,arguments)}return MultipleLookupChoiceControl}();_defineProperty(Fe,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),Fe.prototype.subtype="choice";var Pe=function(e){_inherits(MultipleAppLookupControl,ke);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}();Pe.prototype.type="multipleapplookup",Pe.prototype.fieldtype=ee;var Me=function(e){_inherits(MultipleAppLookupSelectControl,Pe);var t=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),t.apply(this,arguments)}return MultipleAppLookupSelectControl}();_defineProperty(Me,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),Me.prototype.subtype="select";var xe=function(e){_inherits(MultipleAppLookupCheckboxControl,Pe);var t=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),t.apply(this,arguments)}return MultipleAppLookupCheckboxControl}();_defineProperty(xe,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),xe.prototype.subtype="checkbox";var Oe=function(e){_inherits(MultipleAppLookupChoiceControl,Pe);var t=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),t.apply(this,arguments)}return MultipleAppLookupChoiceControl}();_defineProperty(Oe,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),Oe.prototype.subtype="choice";var Te=function(e){_inherits(GeoControl,te);var t=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),t.apply(this,arguments)}return GeoControl}();_defineProperty(Te,"classdoc","A LivingApps geo field (type 'geo')"),Te.prototype.type="geo",Te.prototype.fieldtype=V;var Ie=function(e){_inherits(FileControl,te);var t=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),t.apply(this,arguments)}return FileControl}();_defineProperty(Ie,"classdoc","A LivingApps upload field (type 'file')"),Ie.prototype.type="file",Ie.prototype.fieldtype=E;var De=function(e){_inherits(FileSignatureControl,Ie);var t=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),t.apply(this,arguments)}return FileSignatureControl}();_defineProperty(De,"classdoc","A LivingApps signature image field (type 'file/signature')"),De.prototype.subtype="signature",De.prototype.fieldtype=G;var He=function(e){_inherits(ButtonControl,te);var t=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),t.apply(this,arguments)}return ButtonControl}();He.prototype.type="button",d=e.symbols.repr;var Re=function(t){_inherits(LookupItem,A);var r=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),r.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:d,value:function value(){var t="<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+="visible=False"),t+">"}}]),LookupItem}();_defineProperty(Re,"classdoc","An option in a lookup control/field"),Re.prototype._ul4onattrs=["control","key","_label"],Re.prototype._ul4attrs=new Set(["id","control","key","label"]),_=e.symbols.repr;var Ue=function(t){_inherits(ViewLookupItem,A);var r=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),r.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:_,value:function value(){var t="<ViewLookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+=" visible=False"),t+">"}}]),ViewLookupItem}();_defineProperty(Ue,"classdoc","View specific information about a lookup item"),Ue.prototype._ul4onattrs=["key","label","visible"],Ue.prototype._ul4attrs=new Set(["key","label","visible"]),h=e.symbols.repr;var Ne=function(t){_inherits(LayoutControl,A);var r=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),r.apply(this,arguments)}return _createClass(LayoutControl,[{key:h,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),LayoutControl}();_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 Be=function(e){_inherits(HTMLLayoutControl,Ne);var t=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),t.apply(this,arguments)}return HTMLLayoutControl}();_defineProperty(Be,"classdoc","An HTML decoration in an input form"),Be.prototype._ul4onattrs=[].concat(_toConsumableArray(Ne.prototype._ul4onattrs),["value"]),Be.prototype._ul4attrs=new Set([Ne.prototype._ul4attrs,"value"]);var qe=function(e){_inherits(ImageLayoutControl,Ne);var t=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),t.apply(this,arguments)}return ImageLayoutControl}();_defineProperty(qe,"classdoc","An image decoration in an input form"),qe.prototype._ul4onattrs=[].concat(_toConsumableArray(Ne.prototype._ul4onattrs),["original","scaled"]),qe.prototype._ul4attrs=new Set([Ne.prototype._ul4attrs,"original","scaled"]);var je=function(e){_inherits(ViewControl,A);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}();_defineProperty(je,"classdoc","Contains view specific information aboutn a control"),je.prototype._ul4onattrs=["view","control","top","left","width","height","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],je.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"]),f=e.symbols.repr;var Ve=function(t){_inherits(User,A);var r=_createSuper(User);function User(){return _classCallCheck(this,User),r.apply(this,arguments)}return _createClass(User,[{key:f,value:function value(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}}]),User}();_defineProperty(Ve,"classdoc","A LivingApps user/account"),Ve.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"],Ve.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"]),y=e.symbols.repr;var Ee=function(t){_inherits(File,A);var r=_createSuper(File);function File(){return _classCallCheck(this,File),r.apply(this,arguments)}return _createClass(File,[{key:y,value:function value(){return"<File id="+e._repr(this.id)+" url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}}]),File}();_defineProperty(Ee,"classdoc","An uploaded file"),Ee.prototype._ul4onattrs=["url","filename","mimetype","width","height","internalid","createdat","size"],Ee.prototype._ul4attrs=new Set(["id","url","filename","mimetype","width","height","size","createdat"]),v=e.symbols.repr;var Ge=function(t){_inherits(Geo,A);var r=_createSuper(Geo);function Geo(e,t,o){var l;return _classCallCheck(this,Geo),(l=r.call(this,null)).lat=e,l.long=t,l.info=o,l}return _createClass(Geo,[{key:v,value:function value(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();_defineProperty(Ge,"classdoc","Geographical coordinates and location information"),Ge.prototype._ul4onattrs=["lat","long","info"],Ge.prototype._ul4attrs=new Set(["lat","long","info"]);var Ye=function(t){_inherits(Attachment,A);var r=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),r.apply(this,arguments)}return _createClass(Attachment,[{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}}]),Attachment}();Ye.prototype._ul4onattrs=["record","label","active"],Ye.prototype._ul4attrs=new Set(["id","record","label","active"]);var ze=function(e){_inherits(NoteAttachment,Ye);var t=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),t.apply(this,arguments)}return NoteAttachment}();_defineProperty(ze,"classdoc","A note attachment of a record"),ze.prototype.type="noteattachment",ze.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),ze.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]));var We=function(e){_inherits(URLAttachment,Ye);var t=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),t.apply(this,arguments)}return URLAttachment}();_defineProperty(We,"classdoc","A URL attachment of a record"),We.prototype.type="urlattachment",We.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),We.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]));var Je=function(e){_inherits(FileAttachment,Ye);var t=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),t.apply(this,arguments)}return FileAttachment}();_defineProperty(Je,"classdoc","A file attachment of a record"),Je.prototype.type="fileattachment",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(ImageAttachment,Ye);var t=_createSuper(ImageAttachment);function ImageAttachment(){return _classCallCheck(this,ImageAttachment),t.apply(this,arguments)}return ImageAttachment}();_defineProperty(Ke,"classdoc","An image attachment of a record"),Ke.prototype.type="imageattachment",Ke.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["original","thumb","small","medium","large"]),Ke.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["original","thumb","small","medium","large"]));var $e=function(t){_inherits(JSONAttachment,Ye);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}();_defineProperty($e,"classdoc","A JSON attachment of a record"),$e.prototype.type="jsonattachment",$e.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),$e.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"])),m=e.symbols.repr;var Ze=function(t){_inherits(Installation,A);var r=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),r.apply(this,arguments)}return _createClass(Installation,[{key:m,value:function value(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();_defineProperty(Ze,"classdoc","The installation that created an app"),Ze.prototype._ul4onattrs=["name"],Ze.prototype._ul4attrs=new Set(["id","name"]),g=e.symbols.repr;var Qe=function(t){_inherits(Category,A);var r=_createSuper(Category);function Category(){return _classCallCheck(this,Category),r.apply(this,arguments)}return _createClass(Category,[{key:g,value:function value(){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}();_defineProperty(Qe,"classdoc","A navigation category"),Qe.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],Qe.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]),k=e.symbols.repr;var Xe=function(t){_inherits(KeyView,A);var r=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),r.apply(this,arguments)}return _createClass(KeyView,[{key:k,value:function value(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();_defineProperty(Xe,"classdoc","Object granting access to a view template"),Xe.prototype._ul4onattrs=["identifier","name","key","user"],Xe.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]),C=e.symbols.repr;var et=function(t){_inherits(AppParameter,A);var r=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),r.apply(this,arguments)}return _createClass(AppParameter,[{key:C,value:function value(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),AppParameter}();_defineProperty(et,"classdoc","A parameter of a LivingApps application"),et.prototype._ul4onattrs=["app","identifier","description","value"],et.prototype._ul4attrs=new Set(["id","app","identifier","description","value"]);for(var tt=0,rt=[w,S,P,M,x,O,re,oe,ne,ie,ue,se,pe,ce,_e,he,fe,ye,ve,me,ge,ke,Ce,be,Ae,Le,we,Se,Fe,Pe,Me,xe,Oe,Te,Ie,De,He,T,I,R,U,N,B,q,j,D,H,V,E,G,Y,z,W,J,K,$,Z,Q,X,ee,Re,Ue,Ne,Be,qe,je,Ve,Ee,Ge,ze,We,Je,Ke,$e,Ze,Qe,Xe,et];tt<rt.length;tt++){var ot=rt[tt];e.register("de.livinglogic.livingapi."+ot.name.toLowerCase(),ot)}export{P as App,Ae as AppLookupChoiceControl,ke as AppLookupControl,X as AppLookupField,Q as AppLookupFieldBase,be as AppLookupRadioControl,Ce as AppLookupSelectControl,et as AppParameter,Ye as Attachment,A as Base,re as BoolControl,I as BoolField,He as ButtonControl,Qe as Category,te as Control,x as DataSourceData,_e as DateControl,z as DateField,Y as DateFieldBase,he as DatetimeMinuteControl,W as DatetimeMinuteField,fe as DatetimeSecondControl,J as DatetimeSecondField,ue as EmailControl,U as EmailField,T as Field,Ee as File,Je as FileAttachment,Ie as FileControl,E as FileField,De as FileSignatureControl,G as FileSignatureField,S as FlashMessage,Ge as Geo,Te as GeoControl,V as GeoField,w as Globals,de as HTMLControl,j as HTMLField,Be as HTMLLayoutControl,L as Handler,Ke as ImageAttachment,qe as ImageLayoutControl,Ze as Installation,oe as IntControl,D as IntField,$e as JSONAttachment,Xe as KeyView,Ne as LayoutControl,ge as LookupChoiceControl,ye as LookupControl,$ as LookupField,K as LookupFieldBase,Re as LookupItem,me as LookupRadioControl,ve as LookupSelectControl,xe as MultipleAppLookupCheckboxControl,Oe as MultipleAppLookupChoiceControl,Pe as MultipleAppLookupControl,ee as MultipleAppLookupField,Me as MultipleAppLookupSelectControl,Se as MultipleLookupCheckboxControl,Fe as MultipleLookupChoiceControl,Le as MultipleLookupControl,Z as MultipleLookupField,we as MultipleLookupSelectControl,ze as NoteAttachment,ne as NumberControl,H as NumberField,O as Record,ae as StringControl,R as StringField,pe as TelControl,B as TelField,ce as TextAreaControl,q as TextAreaField,ie as TextControl,We as URLAttachment,se as URLControl,N as URLField,Ve as User,M as View,je as ViewControl,Ue as ViewLookupItem,b as version};
|
|
1
|
+
import*as e from"@livinglogic/ul4";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 t,r,o,l,n,a,i,u,s,p,c,d,_,h,f,y,v,m,g,k,C,b="0.13.2",A=function(t){_inherits(Base,e.Proto);var r=_createSuper(Base);function Base(e){var t;return _classCallCheck(this,Base),(t=r.call(this)).id=e,t}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:e.symbols.getattr,value:function value(t){if(this._ul4attrs.has(t)){var value=this[t];if("function"==typeof value){var r=value.bind(this);return r._ul4_name=value._ul4_name||value.name,r._ul4_signature=value._ul4_signature,r._ul4_needsobject=value._ul4_needsobject,r._ul4_needscontext=value._ul4_needscontext,r}return value}throw new e.AttributeError(this,t)}},{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+">"}},{key:"toString",value:function toString(){return this[e.symbols.repr]()}}]),Base}(),L=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(e){}},{key:"delete",value:function _delete(e){}}]),Handler}();t=e.symbols.repr;var w=function(r){_inherits(Globals,A);var o=_createSuper(Globals);function Globals(e){var t;return _classCallCheck(this,Globals),(t=o.call(this,e)).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 L,t}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 Ee&&(e="https://"+this.hostname+e.url,(d=encodeURIComponent(e.filename))!=e.filename&&(d=null));var _="";return _+=c?"/imgproxycache/insecure":"/imgproxy/insecure","fit"!==o&&(_+="/rt:"+o),null!=t&&(_+="/w:"+t),null!=r&&(_+="/h:"+r),l&&(_+="/el:1"),null!=n&&(_+="/g:"+n),null!=a&&(_+="/q:"+a),null!==i&&i%360!=0&&(_+="/rot:"+rotatet),null!=u&&(_+="/bl:"+u),null!=s&&(_+="/sh:"+s),null!=p&&(_+="/f:"+p),null!=d&&(_+="/fn:"+d),_+="/plain/"+encodeURIComponent(e)}},{key:t,value:function value(){return"<Globals version="+e._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),_=o(p)*o(c)+r(s)*r(c),h=Math.atan(Math.sqrt(d/_)),f=2*h*6378.137,y=Math.sqrt(d*_)/h,v=(3*y+1)/(2*d);return f*(1+n*((3*y-1)/(2*_))*r(s)*o(p)-n*v*o(s)*r(p))}}]),Globals}();_defineProperty(w,"classdoc","Global information"),w.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"],w.prototype._ul4attrs=new Set(["version","hostname","platform","user","lang","app","record","maxdbactions","maxtemplateruntime","flashmessages","mode"]),r=e.symbols.repr;var S=function(t){_inherits(FlashMessage,A);var o=_createSuper(FlashMessage);function FlashMessage(){return _classCallCheck(this,FlashMessage),o.apply(this,arguments)}return _createClass(FlashMessage,[{key:r,value:function value(){return"<FlashMessage type="+e._repr(this.type)+" title="+e._repr(this.title)+">"}}]),FlashMessage}();_defineProperty(S,"classdoc","A flash message in a web page"),S.prototype._ul4onattrs=["timestamp","type","title","message"],S.prototype._ul4attrs=new Set(["timestamp","type","title","message"]),o=e.symbols.repr,l=e.symbols.call,n=e.symbols.getattr;var P=function(t){_inherits(App,A);var r=_createSuper(App);function App(){return _classCallCheck(this,App),r.apply(this,arguments)}return _createClass(App,[{key:o,value:function value(){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]:{},r=this[e.symbols.call](t);return this.globals.handler.save(this),r}},{key:"layout_controls",get:function get(){return null===this.active_view?new Map:this.active_view.layout_controls}},{key:l,value:function value(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new O(null,this);if(e._ismap(t)){var o,l=_createForOfIteratorHelper(t.keys());try{for(l.s();!(o=l.n()).done;){var n=o.value;if(!r.fields.has(n))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(n))}}catch(e){l.e(e)}finally{l.f()}r._make_fields(!0,t,null,null)}else{if(!e._isobject(t))throw new e.TypeError("values must be an object or a Map");for(var a in t)if(!r.fields.has(a))throw new e.ArgumentError(e._repr(this)+"() get an unexpected keyword argument "+e._repr(a));r._make_fields(!0,new Map(e._list(e.dicttype.items(t))),null,null)}return r}},{key:n,value:function value(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),e.symbols.getattr,this).call(this,t)}},{key:"active_view",get:function get(){return this._active_view}},{key:"active_view",set:function set(t){if(null===t);else if("string"==typeof t){if(null===this.views||!this.views.has(t))throw new e.ValueError("View "+e._repr(t)+" not found!");t=this.views.get(t)}else{if(!(t instanceof M))throw new e.TypeError(e._repr(t)+" is not a view!");if(t.app!==this)throw new e.ValueError("View "+e._repr(t)+" belongs to the wrong app!")}this._active_view=t}}]),App}();_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"]),e.expose(P.prototype[e.symbols.call],["**values"],{needsobject:!0}),e.expose(P.prototype.insert,["**values"],{needsobject:!0}),a=e.symbols.repr;var M=function(t){_inherits(View,A);var r=_createSuper(View);function View(){return _classCallCheck(this,View),r.apply(this,arguments)}return _createClass(View,[{key:a,value:function value(){return"<View id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),View}();_defineProperty(M,"classdoc","An input form for a LivingApps application"),M.prototype._ul4onattrs=["name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang"],M.prototype._ul4attrs=new Set(["id","name","combined_type","app","order","width","height","start","end","controls","layout_controls","lang"]),i=e.symbols.repr;var x=function(t){_inherits(DataSourceData,A);var r=_createSuper(DataSourceData);function DataSourceData(){return _classCallCheck(this,DataSourceData),r.apply(this,arguments)}return _createClass(DataSourceData,[{key:i,value:function value(){return"<DataSourceData id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),DataSourceData}();_defineProperty(x,"classdoc","The data resulting from a data source configuration"),x.prototype._ul4onattrs=["identifier","app","apps"],x.prototype._ul4attrs=new Set(["id","identifier","app","apps"]),u=e.symbols.repr,s=e.symbols.getattr,p=e.symbols.setattr;var O=function(t){_inherits(Record,A);var r=_createSuper(Record);function Record(e,t){var o;return _classCallCheck(this,Record),(o=r.call(this,e)).app=t,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.fieldtype(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:u,value:function value(){var t,r=["<Record id=",e._repr(this.id)],o=_createForOfIteratorHelper(this.fields.values());try{for(o.s();!(t=o.n()).done;){var l=t.value;l.control.priority&&!l.is_empty()&&(r.push(" v_"),r.push(l.control.identifier),r.push("="),r.push(e._repr(l.value)))}}catch(e){o.e(e)}finally{o.f()}return r.push(" state="),r.push(e._repr(this.state)),r.push(">"),r.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 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 l=_slicedToArray(r.value,2),n=l[0],a=l[1];if(!this.fields.has(n))throw new e.ArgumentError("update() get an unexpected keyword argument "+e._repr(n));fields.get(n).value=a}}catch(e){o.e(e)}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:"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:s,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:p,value:function value(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}}}]),Record}();_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"]),e.expose(O.prototype.is_dirty,[]),e.expose(O.prototype.has_errors,[]),e.expose(O.prototype.delete,[]),e.expose(O.prototype.save,[]),e.expose(O.prototype.update,["**values"],{needsobject:!0}),c=e.symbols.repr;var T=function(t){_inherits(Field,A);var r=_createSuper(Field);function Field(e,t,o){var l;return _classCallCheck(this,Field),(l=r.call(this,null)).control=e,l.record=t,l._label=null,l._lookupdate=null,l.errors=[],l._value=null,l.value=o,l._dirty=!1,l}return _createClass(Field,[{key:"value",get:function get(){return this._value},set:function set(t){var r=this._value,o={value:t,errors:[]};this._validate(o),e._ne(r,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||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(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(t){return'"'.concat(this.label,"\" doesn't support the type ").concat(e._type(t).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(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to this lookup!")}},{key:"msg_lookup_unknownkey",value:function msg_lookup_unknownkey(t){return"The option ".concat(e._repr(t),' for "').concat(this.label,'" is unknown!')}},{key:"msg_applookup_wrongrecord",value:function msg_applookup_wrongrecord(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" doesn't belong to the correct app!")}},{key:"msg_applookup_unknownkey",value:function msg_applookup_unknownkey(t){return"The record ".concat(e._repr(t),' for "').concat(this.label,"\" can't be found!")}},{key:c,value:function value(){var t="<Field identifier=";return t+=e._repr(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),this.errors.length>0&&(t+=" has_errors()=True"),t+=">"}}]),Field}();_defineProperty(T,"classdoc","Holds the value of a field of a record (and related information)"),T.prototype._ul4onattrs=["control","record","label","value","errors","enabled","writable","visible"],T.prototype._ul4attrs=new Set(["control","record","label","value","errors","enabled","writable","visible"]);var I=function(e){_inherits(BoolField,T);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}();_defineProperty(I,"classdoc","Holds the value of a bool field of a record (and related information)");var D=function(e){_inherits(IntField,T);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}();_defineProperty(D,"classdoc","Holds the value of an int field of a record (and related information)");var H=function(e){_inherits(NumberField,T);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}();_defineProperty(H,"classdoc","Holds the value of a number field of a record (and related information)");var R=function(e){_inherits(StringField,T);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}();_defineProperty(R,"classdoc","Holds the value of a string field of a record (and related information)");var U=function(e){_inherits(EmailField,R);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}();_defineProperty(U,"classdoc","Holds the value of a string/email field of a record (and related information)");var N=function(e){_inherits(URLField,R);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}();_defineProperty(N,"classdoc","Holds the value of a string/url field of a record (and related information)");var B=function(e){_inherits(TelField,R);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}();_defineProperty(B,"classdoc","Holds the value of a string/tel field of a record (and related information)");var q=function(e){_inherits(TextAreaField,R);var t=_createSuper(TextAreaField);function TextAreaField(){return _classCallCheck(this,TextAreaField),t.apply(this,arguments)}return TextAreaField}();_defineProperty(q,"classdoc","Holds the value of a string/textarea field of a record (and related information)");var j=function(e){_inherits(HTMLField,R);var t=_createSuper(HTMLField);function HTMLField(){return _classCallCheck(this,HTMLField),t.apply(this,arguments)}return HTMLField}();_defineProperty(j,"classdoc","Holds the value of a string/html field of a record (and related information)");var V=function(e){_inherits(GeoField,T);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 Ge||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),GeoField}();_defineProperty(V,"classdoc","Holds the value of a geo field of a record (and related information)");var E=function(e){_inherits(FileField,T);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 Ee||(e.errors.push(this.msg_field_wrong_type(e.value)),e.value=null)}}]),FileField}();_defineProperty(E,"classdoc","Holds the value of a file field of a record (and related information)");var G=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}();_defineProperty(G,"classdoc","Holds the value of a file/signature field of a record (and related information)");var Y=function(t){_inherits(DateFieldBase,T);var r=_createSuper(DateFieldBase);function DateFieldBase(){return _classCallCheck(this,DateFieldBase),r.apply(this,arguments)}return _createClass(DateFieldBase,[{key:"_validate",value:function _validate(t){if(null===t.value||""===t.value)this.control.required&&t.errors.push(this.msg_field_required(t.value)),t.value=null;else if(t.value instanceof Date)t.value=this._convert(t.value);else if(t.value instanceof e.Date_)t.value=this._convert(t.value._date);else if("string"==typeof t.value){var r=null;10===t.value.length?r=new Date(t.value+"T00:00:00"):16===t.value.length?r=new Date(t.value+":00"):19===t.value.length&&(r=new Date(t.value)),null===r||Number.isNaN(r.getYear())?t.errors.push(this.msg_date_format(t.value)):t.value=this._convert(r)}else t.errors.push(this.msg_field_wrong_type(t.value)),t.value=null}}]),DateFieldBase}();_defineProperty(Y,"classdoc","Holds the value of a date field of a record (and related information)");var z=function(t){_inherits(DateField,Y);var r=_createSuper(DateField);function DateField(){return _classCallCheck(this,DateField),r.apply(this,arguments)}return _createClass(DateField,[{key:"_convert",value:function _convert(t){return new e.Date_(t.getFullYear(),t.getMonth()+1,t.getDate())}}]),DateField}();_defineProperty(z,"classdoc","Holds the value of a date/date field of a record (and related information)");var W=function(e){_inherits(DatetimeMinuteField,Y);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}();_defineProperty(W,"classdoc","Holds the value of a date/datetimeminute field of a record (and related information)");var J=function(e){_inherits(DatetimeSecondField,Y);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}();_defineProperty(J,"classdoc","Holds the value of a date/datetimesecond field of a record (and related information)");var K=function(e){_inherits(LookupFieldBase,T);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 Re){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}();_defineProperty(K,"classdoc","Base type of LookupField and MultipleLookupField");var $=function(e){_inherits(LookupField,K);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($,"classdoc","Holds the value of a lookup field of a record (and related information)");var Z=function(e){_inherits(MultipleLookupField,K);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(Z,"classdoc","Holds the value of a multiple lookup field of a record (and related information)");var Q=function(e){_inherits(AppLookupFieldBase,T);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._lookupdata?this._lookupdata:null!==this.control.lookup_app.records?this.control.lookup_app.records:new Map},set:function set(e){this._lookupdata=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}();_defineProperty(Q,"classdoc","Base type of AppLookupField and MultipleAppLookupField");var X=function(e){_inherits(AppLookupField,Q);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}();_defineProperty(X,"classdoc","Holds the value of a applookup field of a record (and related information)");var ee=function(e){_inherits(MultipleAppLookupField,Q);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}();_defineProperty(ee,"classdoc","Holds the value of a multiple applookup field of a record (and related information)");var te=function(t){_inherits(Control,A);var r=_createSuper(Control);function Control(){return _classCallCheck(this,Control),r.apply(this,arguments)}return _createClass(Control,[{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._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}();te.prototype.type=null,te.prototype.subtype=null,te.prototype._ul4onattrs=["identifier","fieldname","app","_label","priority","order","ininsertprocedure","inupdateprocedure"],te.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 re=function(e){_inherits(BoolControl,te);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}();_defineProperty(re,"classdoc","A LivingApps boolean field (type 'bool')"),re.prototype.type="bool",re.prototype.fieldtype=I;var oe=function(e){_inherits(IntControl,te);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}();_defineProperty(oe,"classdoc","A LivingApps integer field (type 'int')"),oe.prototype.type="int",oe.prototype.fieldtype=D;var le=function(e){_inherits(PlaceholderControl,te);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}();_defineProperty(le,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/select')"),le.prototype._ul4attrs=new Set([].concat(_toConsumableArray(te.prototype._ul4attrs),["placeholder"]));var ne=function(e){_inherits(NumberControl,le);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}();_defineProperty(ne,"classdoc","A LivingApps number field (type 'number')"),ne.prototype.type="number",ne.prototype.fieldtype=H;var ae=function(t){_inherits(StringControl,le);var r=_createSuper(StringControl);function StringControl(){return _classCallCheck(this,StringControl),r.apply(this,arguments)}return _createClass(StringControl,[{key:"_user_placeholder",value:function _user_placeholder(t,r){if(null===r)return null;switch(r){case"{gender}":return null!==t?t.gender:null;case"{title}":return null!==t?t.title:null;case"{firstname}":return null!==t?t.firstname:null;case"{surname}":return null!==t?t.surname:null;case"{account}":return null!==t?t.email:null;case"{streetname}":return null!==t?t.streetname:null;case"{streetnumber}":return null!==t?t.streetnumber:null;case"{street}":return null===t?null:null===t.street?t.streetnumber:null===t.streetnumber?t.street:t.street+" "+t.streetnumber;case"{zip}":return null!==t?t.zip:null;case"{phone}":return null!==t?t.phone:null;case"{fax}":return null!==t?t.fax:null;case"{company}":return null!==t?t.company:null;case"{city}":return null!==t?t.city:null;case"{summary}":return null!==t?t.summary:null;case"{interests}":return null!==t?t.interests:null;case"{personal_website}":return null!==t?t.personal_website:null;case"{company_website}":return null!==t?t.company_website:null;case"{position}":return null!==t?t.position:null;case"{department}":return null!==t?t.department:null;case"{today}":return e.today();default:return r}}},{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}();ae.prototype.type="string";var ie=function(e){_inherits(TextControl,ae);var t=_createSuper(TextControl);function TextControl(){return _classCallCheck(this,TextControl),t.apply(this,arguments)}return TextControl}();_defineProperty(ie,"classdoc","A LivingApps text field (type 'string/text')"),ie.prototype.subtype="text",ie.prototype.fieldtype=R;var ue=function(e){_inherits(EmailControl,ae);var t=_createSuper(EmailControl);function EmailControl(){return _classCallCheck(this,EmailControl),t.apply(this,arguments)}return EmailControl}();_defineProperty(ue,"classdoc","A LivingApps email field (type 'string/email')"),ue.prototype.subtype="email",ue.prototype.fieldtype=U;var se=function(e){_inherits(URLControl,ae);var t=_createSuper(URLControl);function URLControl(){return _classCallCheck(this,URLControl),t.apply(this,arguments)}return URLControl}();_defineProperty(se,"classdoc","A LivingApps URL field (type 'string/url')"),se.prototype.subtype="url",se.prototype.fieldtype=N;var pe=function(e){_inherits(TelControl,ae);var t=_createSuper(TelControl);function TelControl(){return _classCallCheck(this,TelControl),t.apply(this,arguments)}return TelControl}();_defineProperty(pe,"classdoc","A LivingApps phone number field (type 'string/tel')"),pe.prototype.subtype="tel",pe.prototype.fieldtype=B;var ce=function(e){_inherits(TextAreaControl,ae);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}();_defineProperty(ce,"classdoc","A LivingApps textarea field (type 'string/textarea')"),ce.prototype.subtype="textarea",ce.prototype.fieldtype=q,ce.prototype._ul4onattrs=[].concat(_toConsumableArray(ae.prototype._ul4onattrs),["encrypted"]),ce.prototype._ul4attrs=new Set([].concat(_toConsumableArray(ae.prototype._ul4attrs),["encrypted"]));var de=function(e){_inherits(HTMLControl,ae);var t=_createSuper(HTMLControl);function HTMLControl(){return _classCallCheck(this,HTMLControl),t.apply(this,arguments)}return HTMLControl}();_defineProperty(de,"classdoc","A LivingApps HTML field (type 'string/html')"),de.prototype.subtype="html",de.prototype.fieldtype=j;var _e=function(t){_inherits(DateControl,le);var r=_createSuper(DateControl);function DateControl(){return _classCallCheck(this,DateControl),r.apply(this,arguments)}return _createClass(DateControl,[{key:"default",get:function get(){var t=this._view_control();return null===t?null:"{today}"===t.default?e.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(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}();_defineProperty(_e,"classdoc","A LivingApps date field (type 'date/date')"),_e.prototype.type="date",_e.prototype.subtype="date",_e.prototype.fieldtype=z;var he=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}();_defineProperty(he,"classdoc","A LivingApps date field (type 'date/datetimeminute')"),he.prototype.subtype="datetimeminute",he.prototype.fieldtype=W;var fe=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}();_defineProperty(fe,"classdoc","A LivingApps date field (type 'date/datetimesecond')"),fe.prototype.subtype="datetimesecond",fe.prototype.fieldtype=J;var ye=function(e){_inherits(LookupControl,te);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}();ye.prototype.type="lookup",ye.prototype.fieldtype=$,ye.prototype._ul4onattrs=[].concat(_toConsumableArray(te.prototype._ul4onattrs),["lookupdata"]),ye.prototype._ul4attrs=new Set([].concat(_toConsumableArray(te.prototype._ul4attrs),["lookupdata"]));var ve=function(e){_inherits(LookupSelectControl,ye);var t=_createSuper(LookupSelectControl);function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),t.apply(this,arguments)}return LookupSelectControl}();_defineProperty(ve,"classdoc","A LivingApps lookup field (type 'lookup/select')"),ve.prototype.subtype="select";var me=function(e){_inherits(LookupRadioControl,ye);var t=_createSuper(LookupRadioControl);function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),t.apply(this,arguments)}return LookupRadioControl}();_defineProperty(me,"classdoc","A LivingApps lookup field (type 'lookup/radio')"),me.prototype.subtype="radio";var ge=function(e){_inherits(LookupChoiceControl,ye);var t=_createSuper(LookupChoiceControl);function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),t.apply(this,arguments)}return LookupChoiceControl}();_defineProperty(ge,"classdoc","A LivingApps lookup field (type 'lookup/choice')"),ge.prototype.subtype="choice";var ke=function(e){_inherits(AppLookupControl,te);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}();ke.prototype.type="applookup",ke.prototype.fieldtype=X,ke.prototype._ul4onattrs=[].concat(_toConsumableArray(te.prototype._ul4onattrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]),ke.prototype._ul4attrs=new Set([].concat(_toConsumableArray(te.prototype._ul4attrs),["lookup_app","lookup_controls","local_master_control","local_detail_controls","remote_master_control"]));var Ce=function(e){_inherits(AppLookupSelectControl,ke);var t=_createSuper(AppLookupSelectControl);function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),t.apply(this,arguments)}return AppLookupSelectControl}();_defineProperty(Ce,"classdoc","A LivingApps applookup field (type 'applookup/select')"),Ce.prototype.subtype="select";var be=function(e){_inherits(AppLookupRadioControl,ke);var t=_createSuper(AppLookupRadioControl);function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),t.apply(this,arguments)}return AppLookupRadioControl}();_defineProperty(be,"classdoc","A LivingApps applookup field (type 'applookup/radio')"),be.prototype.subtype="radio";var Ae=function(e){_inherits(AppLookupChoiceControl,ke);var t=_createSuper(AppLookupChoiceControl);function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),t.apply(this,arguments)}return AppLookupChoiceControl}();_defineProperty(Ae,"classdoc","A LivingApps applookup field (type 'applookup/choice')"),Ae.prototype.subtype="choice";var Le=function(e){_inherits(MultipleLookupControl,ye);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}();Le.prototype.subtype="multiplelookup",Le.prototype.fieldtype=Z;var we=function(e){_inherits(MultipleLookupSelectControl,Le);var t=_createSuper(MultipleLookupSelectControl);function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),t.apply(this,arguments)}return MultipleLookupSelectControl}();_defineProperty(we,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/select')"),we.prototype.subtype="select";var Se=function(e){_inherits(MultipleLookupCheckboxControl,Le);var t=_createSuper(MultipleLookupCheckboxControl);function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),t.apply(this,arguments)}return MultipleLookupCheckboxControl}();_defineProperty(Se,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/checkbox')"),Se.prototype.subtype="checkbox";var Fe=function(e){_inherits(MultipleLookupChoiceControl,Le);var t=_createSuper(MultipleLookupChoiceControl);function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),t.apply(this,arguments)}return MultipleLookupChoiceControl}();_defineProperty(Fe,"classdoc","A LivingApps multiplelookup field (type 'multiplelookup/choice')"),Fe.prototype.subtype="choice";var Pe=function(e){_inherits(MultipleAppLookupControl,ke);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}();Pe.prototype.type="multipleapplookup",Pe.prototype.fieldtype=ee;var Me=function(e){_inherits(MultipleAppLookupSelectControl,Pe);var t=_createSuper(MultipleAppLookupSelectControl);function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),t.apply(this,arguments)}return MultipleAppLookupSelectControl}();_defineProperty(Me,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/select')"),Me.prototype.subtype="select";var xe=function(e){_inherits(MultipleAppLookupCheckboxControl,Pe);var t=_createSuper(MultipleAppLookupCheckboxControl);function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),t.apply(this,arguments)}return MultipleAppLookupCheckboxControl}();_defineProperty(xe,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/checkbox')"),xe.prototype.subtype="checkbox";var Oe=function(e){_inherits(MultipleAppLookupChoiceControl,Pe);var t=_createSuper(MultipleAppLookupChoiceControl);function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),t.apply(this,arguments)}return MultipleAppLookupChoiceControl}();_defineProperty(Oe,"classdoc","A LivingApps multiple applookup field (type 'multipleapplookup/choice')"),Oe.prototype.subtype="choice";var Te=function(e){_inherits(GeoControl,te);var t=_createSuper(GeoControl);function GeoControl(){return _classCallCheck(this,GeoControl),t.apply(this,arguments)}return GeoControl}();_defineProperty(Te,"classdoc","A LivingApps geo field (type 'geo')"),Te.prototype.type="geo",Te.prototype.fieldtype=V;var Ie=function(e){_inherits(FileControl,te);var t=_createSuper(FileControl);function FileControl(){return _classCallCheck(this,FileControl),t.apply(this,arguments)}return FileControl}();_defineProperty(Ie,"classdoc","A LivingApps upload field (type 'file')"),Ie.prototype.type="file",Ie.prototype.fieldtype=E;var De=function(e){_inherits(FileSignatureControl,Ie);var t=_createSuper(FileSignatureControl);function FileSignatureControl(){return _classCallCheck(this,FileSignatureControl),t.apply(this,arguments)}return FileSignatureControl}();_defineProperty(De,"classdoc","A LivingApps signature image field (type 'file/signature')"),De.prototype.subtype="signature",De.prototype.fieldtype=G;var He=function(e){_inherits(ButtonControl,te);var t=_createSuper(ButtonControl);function ButtonControl(){return _classCallCheck(this,ButtonControl),t.apply(this,arguments)}return ButtonControl}();He.prototype.type="button",d=e.symbols.repr;var Re=function(t){_inherits(LookupItem,A);var r=_createSuper(LookupItem);function LookupItem(){return _classCallCheck(this,LookupItem),r.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:d,value:function value(){var t="<LookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+="visible=False"),t+">"}}]),LookupItem}();_defineProperty(Re,"classdoc","An option in a lookup control/field"),Re.prototype._ul4onattrs=["control","key","_label"],Re.prototype._ul4attrs=new Set(["id","control","key","label"]),_=e.symbols.repr;var Ue=function(t){_inherits(ViewLookupItem,A);var r=_createSuper(ViewLookupItem);function ViewLookupItem(){return _classCallCheck(this,ViewLookupItem),r.apply(this,arguments)}return _createClass(ViewLookupItem,[{key:_,value:function value(){var t="<ViewLookupItem key="+e._repr(this.key)+" label="+e._repr(this.label);return this.visible||(t+=" visible=False"),t+">"}}]),ViewLookupItem}();_defineProperty(Ue,"classdoc","View specific information about a lookup item"),Ue.prototype._ul4onattrs=["key","label","visible"],Ue.prototype._ul4attrs=new Set(["key","label","visible"]),h=e.symbols.repr;var Ne=function(t){_inherits(LayoutControl,A);var r=_createSuper(LayoutControl);function LayoutControl(){return _classCallCheck(this,LayoutControl),r.apply(this,arguments)}return _createClass(LayoutControl,[{key:h,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),LayoutControl}();_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 Be=function(e){_inherits(HTMLLayoutControl,Ne);var t=_createSuper(HTMLLayoutControl);function HTMLLayoutControl(){return _classCallCheck(this,HTMLLayoutControl),t.apply(this,arguments)}return HTMLLayoutControl}();_defineProperty(Be,"classdoc","An HTML decoration in an input form"),Be.prototype._ul4onattrs=[].concat(_toConsumableArray(Ne.prototype._ul4onattrs),["value"]),Be.prototype._ul4attrs=new Set([Ne.prototype._ul4attrs,"value"]);var qe=function(e){_inherits(ImageLayoutControl,Ne);var t=_createSuper(ImageLayoutControl);function ImageLayoutControl(){return _classCallCheck(this,ImageLayoutControl),t.apply(this,arguments)}return ImageLayoutControl}();_defineProperty(qe,"classdoc","An image decoration in an input form"),qe.prototype._ul4onattrs=[].concat(_toConsumableArray(Ne.prototype._ul4onattrs),["original","scaled"]),qe.prototype._ul4attrs=new Set([Ne.prototype._ul4attrs,"original","scaled"]);var je=function(e){_inherits(ViewControl,A);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}();_defineProperty(je,"classdoc","Contains view specific information aboutn a control"),je.prototype._ul4onattrs=["view","control","top","left","width","height","liveupdate","default","tabindex","minlength","maxlength","required","placeholder","_mode","labelpos","lookupnonekey","lookupnonelabel","label","autoalign","labelwidth","lookupdata","autoexpandable"],je.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"]),f=e.symbols.repr;var Ve=function(t){_inherits(User,A);var r=_createSuper(User);function User(){return _classCallCheck(this,User),r.apply(this,arguments)}return _createClass(User,[{key:f,value:function value(){return"<User id="+e._repr(this.id)+" firstname="+e._repr(this.firstname)+" surname="+e._repr(this.surname)+" email="+e._repr(this.email)+">"}}]),User}();_defineProperty(Ve,"classdoc","A LivingApps user/account"),Ve.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"],Ve.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"]),y=e.symbols.repr;var Ee=function(t){_inherits(File,A);var r=_createSuper(File);function File(){return _classCallCheck(this,File),r.apply(this,arguments)}return _createClass(File,[{key:y,value:function value(){return"<File id="+e._repr(this.id)+" url="+e._repr(this.url)+" filename="+e._repr(this.filename)+">"}}]),File}();_defineProperty(Ee,"classdoc","An uploaded file"),Ee.prototype._ul4onattrs=["url","filename","mimetype","width","height","internalid","createdat","size"],Ee.prototype._ul4attrs=new Set(["id","url","filename","mimetype","width","height","size","createdat"]),v=e.symbols.repr;var Ge=function(t){_inherits(Geo,A);var r=_createSuper(Geo);function Geo(e,t,o){var l;return _classCallCheck(this,Geo),(l=r.call(this,null)).lat=e,l.long=t,l.info=o,l}return _createClass(Geo,[{key:v,value:function value(){return"<Geo lat="+e._repr(this.lat)+" long="+e._repr(this.long)+" info="+e._repr(this.info)+">"}}]),Geo}();_defineProperty(Ge,"classdoc","Geographical coordinates and location information"),Ge.prototype._ul4onattrs=["lat","long","info"],Ge.prototype._ul4attrs=new Set(["lat","long","info"]);var Ye=function(t){_inherits(Attachment,A);var r=_createSuper(Attachment);function Attachment(){return _classCallCheck(this,Attachment),r.apply(this,arguments)}return _createClass(Attachment,[{key:e.symbols.repr,value:function value(){return"<"+this.constructor.name+" id="+e._repr(this.id)+" label="+e._repr(this.label)+">"}}]),Attachment}();Ye.prototype._ul4onattrs=["record","label","active"],Ye.prototype._ul4attrs=new Set(["id","record","label","active"]);var ze=function(e){_inherits(NoteAttachment,Ye);var t=_createSuper(NoteAttachment);function NoteAttachment(){return _classCallCheck(this,NoteAttachment),t.apply(this,arguments)}return NoteAttachment}();_defineProperty(ze,"classdoc","A note attachment of a record"),ze.prototype.type="noteattachment",ze.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),ze.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]));var We=function(e){_inherits(URLAttachment,Ye);var t=_createSuper(URLAttachment);function URLAttachment(){return _classCallCheck(this,URLAttachment),t.apply(this,arguments)}return URLAttachment}();_defineProperty(We,"classdoc","A URL attachment of a record"),We.prototype.type="urlattachment",We.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),We.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]));var Je=function(e){_inherits(FileAttachment,Ye);var t=_createSuper(FileAttachment);function FileAttachment(){return _classCallCheck(this,FileAttachment),t.apply(this,arguments)}return FileAttachment}();_defineProperty(Je,"classdoc","A file attachment of a record"),Je.prototype.type="fileattachment",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(ImageAttachment,Ye);var t=_createSuper(ImageAttachment);function ImageAttachment(){return _classCallCheck(this,ImageAttachment),t.apply(this,arguments)}return ImageAttachment}();_defineProperty(Ke,"classdoc","An image attachment of a record"),Ke.prototype.type="imageattachment",Ke.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["original","thumb","small","medium","large"]),Ke.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["original","thumb","small","medium","large"]));var $e=function(t){_inherits(JSONAttachment,Ye);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}();_defineProperty($e,"classdoc","A JSON attachment of a record"),$e.prototype.type="jsonattachment",$e.prototype._ul4onattrs=[].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"]),$e.prototype._ul4attrs=new Set([].concat(_toConsumableArray(Ye.prototype._ul4onattrs),["value"])),m=e.symbols.repr;var Ze=function(t){_inherits(Installation,A);var r=_createSuper(Installation);function Installation(){return _classCallCheck(this,Installation),r.apply(this,arguments)}return _createClass(Installation,[{key:m,value:function value(){return"<Installation id="+e._repr(this.id)+" name="+e._repr(this.name)+">"}}]),Installation}();_defineProperty(Ze,"classdoc","The installation that created an app"),Ze.prototype._ul4onattrs=["name"],Ze.prototype._ul4attrs=new Set(["id","name"]),g=e.symbols.repr;var Qe=function(t){_inherits(Category,A);var r=_createSuper(Category);function Category(){return _classCallCheck(this,Category),r.apply(this,arguments)}return _createClass(Category,[{key:g,value:function value(){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}();_defineProperty(Qe,"classdoc","A navigation category"),Qe.prototype._ul4onattrs=["identifier","name","order","parent","children","apps"],Qe.prototype._ul4attrs=new Set(["id","identifier","name","order","parent","children","apps"]),k=e.symbols.repr;var Xe=function(t){_inherits(KeyView,A);var r=_createSuper(KeyView);function KeyView(){return _classCallCheck(this,KeyView),r.apply(this,arguments)}return _createClass(KeyView,[{key:k,value:function value(){return"<KeyView id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),KeyView}();_defineProperty(Xe,"classdoc","Object granting access to a view template"),Xe.prototype._ul4onattrs=["identifier","name","key","user"],Xe.prototype._ul4attrs=new Set(["id","identifier","name","key","user"]),C=e.symbols.repr;var et=function(t){_inherits(AppParameter,A);var r=_createSuper(AppParameter);function AppParameter(){return _classCallCheck(this,AppParameter),r.apply(this,arguments)}return _createClass(AppParameter,[{key:C,value:function value(){return"<AppParameter id="+e._repr(this.id)+" identifier="+e._repr(this.identifier)+">"}}]),AppParameter}();_defineProperty(et,"classdoc","A parameter of a LivingApps application"),et.prototype._ul4onattrs=["app","identifier","description","value"],et.prototype._ul4attrs=new Set(["id","app","identifier","description","value"]);for(var tt=0,rt=[w,S,P,M,x,O,re,oe,ne,ie,ue,se,pe,ce,_e,he,fe,ye,ve,me,ge,ke,Ce,be,Ae,Le,we,Se,Fe,Pe,Me,xe,Oe,Te,Ie,De,He,T,I,R,U,N,B,q,j,D,H,V,E,G,Y,z,W,J,K,$,Z,Q,X,ee,Re,Ue,Ne,Be,qe,je,Ve,Ee,Ge,ze,We,Je,Ke,$e,Ze,Qe,Xe,et];tt<rt.length;tt++){var ot=rt[tt];e.register("de.livinglogic.livingapi."+ot.name.toLowerCase(),ot)}export{P as App,Ae as AppLookupChoiceControl,ke as AppLookupControl,X as AppLookupField,Q as AppLookupFieldBase,be as AppLookupRadioControl,Ce as AppLookupSelectControl,et as AppParameter,Ye as Attachment,A as Base,re as BoolControl,I as BoolField,He as ButtonControl,Qe as Category,te as Control,x as DataSourceData,_e as DateControl,z as DateField,Y as DateFieldBase,he as DatetimeMinuteControl,W as DatetimeMinuteField,fe as DatetimeSecondControl,J as DatetimeSecondField,ue as EmailControl,U as EmailField,T as Field,Ee as File,Je as FileAttachment,Ie as FileControl,E as FileField,De as FileSignatureControl,G as FileSignatureField,S as FlashMessage,Ge as Geo,Te as GeoControl,V as GeoField,w as Globals,de as HTMLControl,j as HTMLField,Be as HTMLLayoutControl,L as Handler,Ke as ImageAttachment,qe as ImageLayoutControl,Ze as Installation,oe as IntControl,D as IntField,$e as JSONAttachment,Xe as KeyView,Ne as LayoutControl,ge as LookupChoiceControl,ye as LookupControl,$ as LookupField,K as LookupFieldBase,Re as LookupItem,me as LookupRadioControl,ve as LookupSelectControl,xe as MultipleAppLookupCheckboxControl,Oe as MultipleAppLookupChoiceControl,Pe as MultipleAppLookupControl,ee as MultipleAppLookupField,Me as MultipleAppLookupSelectControl,Se as MultipleLookupCheckboxControl,Fe as MultipleLookupChoiceControl,Le as MultipleLookupControl,Z as MultipleLookupField,we as MultipleLookupSelectControl,ze as NoteAttachment,ne as NumberControl,H as NumberField,O as Record,ae as StringControl,R as StringField,pe as TelControl,B as TelField,ce as TextAreaControl,q as TextAreaField,ie as TextControl,We as URLAttachment,se as URLControl,N as URLField,Ve as User,M as View,je as ViewControl,Ue as ViewLookupItem,b as version};
|
|
2
2
|
//# sourceMappingURL=livingapi.js.map
|