@livinglogic/livingapi 0.11.0 → 0.13.1

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 CHANGED
@@ -1,9 +1,82 @@
1
1
  # Changes
2
2
 
3
3
 
4
+ ## 0.13.1 (2021-12-22)
5
+
6
+ Fixed creating `Field` objects: Now for each control type the matching field
7
+ type will be used: e.g. the value for a `StringControl` will be in a
8
+ `StringField`.
9
+
10
+ Fix setting the initial value of a field: Now the value goes through the
11
+ normal field validation.
12
+
13
+
14
+ ## 0.13.0 (2021-11-30)
15
+
16
+ Renamed `AppLookupControl.lookupapp` to `lookup_app` and
17
+ `AppLookupControl.lookupcontrols` to `lookup_controls`.
18
+
19
+ Add the following attributes for hierarchical applookup to ``AppLookupControl``:
20
+ ``local_master_control``, ``local_detail_controls`` and ``remote_master_control``.
21
+
22
+ Add attribute `favorite` to `App` and expose it to UL4. Expose `superid` to
23
+ UL4ON.
24
+
25
+ Rename `App.language` to `App.lang`.
26
+
27
+ Added `Globals.mode` which is the template mode we're running in. Valid values
28
+ are `"form/new/init"`, `"form/new/search"`, `"form/new/failed"`,
29
+ `"form/new/presave"`, `"form/new/postsave"`, `"form/edit/init"`,
30
+ `"form/edit/search"`, `"form/edit/failed"`, `"form/edit/presave`,
31
+ `"form/edit/postsave"`, `"view/list"`, `"view/detail"`, `"view/support"`,
32
+ `"email/text` and `email/html"`.
33
+
34
+ Most LivingAPI objects are now persistent objects.
35
+
36
+ Updated the code to directly use `Set` and `Map`.
37
+
38
+ Implement `Globals.scaledURL()`.
39
+
40
+ All LivingAPI object now implement `toString()` (by calling `repr()`).
41
+
42
+ Add the classes `ViewControl`, `HTMLLayoutControl` and `ImageLayoutControl` and
43
+ attributes `View.controls` and `App.active_view`.
44
+
45
+ Setting `App.active_view` to a `View` objects makes `Control` attributes honor
46
+ the additional information defined in the `View`.
47
+
48
+ Added `View` attributes `lang`, `controls` and `layout_controls`.
49
+
50
+ Added `App` attribute `layout_controls`.
51
+
52
+ Added various `Control` attributes that are used in `View`s: `top`, `left`,
53
+ `width`, `height`, `default`, `tabindex`, `minlength`, `maxlength`, `required`,
54
+ `placeholder`, `mode`, `labelpos`, `autoalign` and `labelwidth`.
55
+
56
+ Added attribute `format` to `DateControl`.
57
+
58
+ Added attributes `none_key` and `none_label` to `LookupControl`,
59
+ `MultipleLookupControl`, `AppLookupControl` and `MultipleAppLookupControl`.
60
+
61
+ Implemented field value validation and support for field default values.
62
+
63
+
64
+ ## 0.12.0 (2020-08-31)
65
+
66
+ Added classes `FileSignatureControl` and `HTMLControl`.
67
+
68
+ Added attributes `Globals.app` and `Globals.record`.
69
+
70
+
71
+ ## 0.11.1 (2020-04-06)
72
+
73
+ Updated dependencies.
74
+
75
+
4
76
  ## 0.11.0 (2019-07-24)
5
77
 
6
- Add support for the following attributes of the ``globals`` objects: ``lang``, ``datasources`` and ``hostname``
78
+ Add support for the following attributes of the ``globals`` objects: ``lang``,
79
+ ``datasources`` and ``hostname``.
7
80
 
8
81
 
9
82
  ## 0.10.0 (2019-05-13)
package/README.md CHANGED
@@ -41,7 +41,7 @@ do
41
41
 
42
42
  ```html
43
43
  <script type="module">
44
- import * as la from '/static/livingapi/0.10.0/dist/esm-static/livingapi.js';
44
+ import * as la from '/static/livingapi/0.13.0/dist/esm-static/livingapi.js';
45
45
  ...
46
46
  </script>
47
47
  ```
@@ -50,8 +50,8 @@ or (if you need both UL4 and LivingAPI):
50
50
 
51
51
  ```html
52
52
  <script type="module">
53
- import * as ul4 from '/static/ul4/1.1.0/dist/esm/ul4.js';
54
- import * as la from '/static/livingapi/0.10.0/dist/esm-static/livingapi.js';
53
+ import * as ul4 from '/static/ul4/1.11.0/dist/esm/ul4.js';
54
+ import * as la from '/static/livingapi/0.13.0/dist/esm-static/livingapi.js';
55
55
  ...
56
56
  </script>
57
57
  ```
@@ -1,2 +1,2 @@
1
- import*as t from"@livinglogic/ul4";import{AttributeError as e,Proto as r,_repr as o,_makeset as n,_ismap as l,ArgumentError as a,_isobject as i,TypeError as s,expose as u,_bool as p,_havemap as c,_format as _,_islist as h,_ne as y,_asjson as f,_fromjson as C,register as d}from"@livinglogic/ul4";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),t}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,e){return t.__proto__=e,t})(t,e)}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function _get(t,e,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(t,e,r){var o=function _superPropBase(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}(t,e);if(o){var n=Object.getOwnPropertyDescriptor(o,e);return n.get?n.get.call(r):n.value}})(t,e,r||t)}function _slicedToArray(t,e){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,e){var r=[],o=!0,n=!1,l=void 0;try{for(var a,i=t[Symbol.iterator]();!(o=(a=i.next()).done)&&(r.push(a.value),!e||r.length!==e);o=!0);}catch(t){n=!0,l=t}finally{try{o||null==i.return||i.return()}finally{if(n)throw l}}return r}(t,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var v="0.11.0",k=function(t){function Base(){return _classCallCheck(this,Base),_possibleConstructorReturn(this,_getPrototypeOf(Base).call(this))}return _inherits(Base,r),_createClass(Base,[{key:"ul4ondump",value:function ul4ondump(t){for(var e=0;e<this._ul4onattrs.length;++e)t.dump(this._dumpUL4ONAttr(this._ul4onattrs[e]))}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return this[t]}},{key:"ul4onload",value:function ul4onload(t){for(var e=0,r=t.loadcontent();;++e){var o=r.next();if(o.done)break;e<this._ul4onattrs.length&&this._loadUL4ONAttr(this._ul4onattrs[e],o.value)}for(;e<this._ul4onattrs.length;++e)this._setDefaultUL4ONAttr(this._ul4onattrs[e])}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,e){this[t]=e}},{key:"_setDefaultUL4ONAttr",value:function _setDefaultUL4ONAttr(t){this[t]=null}},{key:"__getattr__",value:function __getattr__(t){if(this._ul4attrs.has(t)){var r=this[t];if("function"==typeof r){var o=r.bind(this);return o._ul4_name=r._ul4_name||r.name,o._ul4_signature=r._ul4_signature,o._ul4_needsobject=r._ul4_needsobject,o._ul4_needscontext=r._ul4_needscontext,o}return r}throw new e(this,t)}},{key:"__repr__",value:function __repr__(){return"<"+this.constructor.name+">"}}]),Base}(),m=function(){function Handler(){_classCallCheck(this,Handler)}return _createClass(Handler,[{key:"save",value:function save(t){}},{key:"delete",value:function _delete(t){}}]),Handler}(),g=function(t){function Globals(){var t;return _classCallCheck(this,Globals),(t=_possibleConstructorReturn(this,_getPrototypeOf(Globals).call(this))).version=null,t.hostname=null,t.platform=null,t.user=null,t.lang=null,t.maxdbactions=null,t.maxtemplateruntime=null,t.flashmessages=null,t.handler=new m,t}return _inherits(Globals,k),_createClass(Globals,[{key:"__repr__",value:function __repr__(){return"<Globals version="+o(this.version)+">"}}],[{key:"geodist",value:function geodist(t,e){var r=function sqsin(t){return(t=Math.sin(t))*t},o=function sqsos(t){return(t=Math.cos(t))*t},n=Math.PI/180,l=1/298.257223563,a=t.lat*n,i=t.long*n,s=e.lat*n,u=(a+s)/2,p=(a-s)/2,c=(i-e.long*n)/2,_=r(p)*o(c)+o(u)*r(c),h=o(p)*o(c)+r(u)*r(c),y=Math.atan(Math.sqrt(_/h)),f=2*y*6378.137,C=Math.sqrt(_*h)/y,d=(3*C+1)/(2*_);return f*(1+l*((3*C-1)/(2*h))*r(u)*o(p)-l*d*o(u)*r(p))}}]),Globals}();g.prototype._ul4onattrs=["version","platform","user","maxdbactions","maxtemplateruntime","flashmessages","lang","datasources","hostname"],g.prototype._ul4attrs=n("version","hostname","platform","user","lang","maxdbactions","maxtemplateruntime","flashmessages");var b=function(t){function FlashMessage(){return _classCallCheck(this,FlashMessage),_possibleConstructorReturn(this,_getPrototypeOf(FlashMessage).apply(this,arguments))}return _inherits(FlashMessage,k),_createClass(FlashMessage,[{key:"__repr__",value:function __repr__(){return"<FlashMessage type="+o(this.type)+" title="+o(this.title)+">"}}]),FlashMessage}();b.prototype._ul4onattrs=["timestamp","type","title","message"],b.prototype._ul4attrs=n("timestamp","type","title","message");var A=function(t){function App(){return _classCallCheck(this,App),_possibleConstructorReturn(this,_getPrototypeOf(App).apply(this,arguments))}return _inherits(App,k),_createClass(App,[{key:"__repr__",value:function __repr__(){return"<App id="+o(this.id)+" name="+o(this.name)+">"}},{key:"insert",value:function insert(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.__call__(t);return this.globals.handler.save(this),e}},{key:"__call__",value:function __call__(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new P(this);if(l(t)){var r=!0,n=!1,u=void 0;try{for(var p,c=t.entries()[Symbol.iterator]();!(r=(p=c.next()).done);r=!0){var _=_slicedToArray(p.value,2),h=_[0],y=_[1];if(!e.fields.has(h))throw new a("update() get an unexpected keyword argument "+o(h));e.fields.get(h).value=y}}catch(t){n=!0,u=t}finally{try{r||null==c.return||c.return()}finally{if(n)throw u}}}else{if(!i(t))throw new s("values must be an object or a Map");for(var h in t){if(!e.fields.has(h))throw new a("update() get an unexpected keyword argument "+o(h));e.fields.get(h).value=t[h]}}return e}},{key:"__getattr__",value:function __getattr__(t){if(t.startsWith("c_")){if(!this.controls.has(t.substr(2)))throw new e(this,t);return this.controls.get(t.substr(2))}return _get(_getPrototypeOf(App.prototype),"__getattr__",this).call(this,t)}}]),App}();A.prototype._ul4onattrs=["id","globals","name","description","language","startlink","iconlarge","iconsmall","createdby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","basetable","primarykey","insertprocedure","updateprocedure","deleteprocedure","templates","createdat","updatedat","updatedby"],A.prototype._ul4attrs=n("id","globals","name","description","language","startlink","iconlarge","iconsmall","createdat","createdby","updatedat","updatedby","controls","records","recordcount","installation","categories","params","views","datamanagement_identifier","insert"),u(A.prototype.__call__,["**values"],{needsobject:!0}),u(A.prototype.insert,["**values"],{needsobject:!0});var L=function(t){function View(){return _classCallCheck(this,View),_possibleConstructorReturn(this,_getPrototypeOf(View).apply(this,arguments))}return _inherits(View,k),_createClass(View,[{key:"__repr__",value:function __repr__(){return"<View id="+o(this.id)+" name="+o(this.name)+">"}}]),View}();L.prototype._ul4onattrs=["id","name","app","order","width","height","start","end"],L.prototype._ul4attrs=n("id","name","app","order","width","height","start","end");var O=function(t){function DataSourceData(){return _classCallCheck(this,DataSourceData),_possibleConstructorReturn(this,_getPrototypeOf(DataSourceData).apply(this,arguments))}return _inherits(DataSourceData,k),_createClass(DataSourceData,[{key:"__repr__",value:function __repr__(){return"<DataSource.Data id="+o(this.id)+" identifier="+o(this.identifier)+">"}}]),DataSourceData}();O.prototype._ul4onattrs=["id","identifier","app","apps"],O.prototype._ul4attrs=n("id","identifier","app","apps");var P=function(t){function Record(t){var e;return _classCallCheck(this,Record),(e=_possibleConstructorReturn(this,_getPrototypeOf(Record).call(this))).id=null,e.app=t,e.createdat=null,e.createdby=null,e.updatedat=null,e.updatedby=null,e.updatecount=0,e._sparsevalues=new Map,e._values=null,e._fields=null,e.children=new Map,e.attachments=null,e.errors=[],e._is_deleted=!1,e}return _inherits(Record,k),_createClass(Record,[{key:"__repr__",value:function __repr__(){var t=["<Record id=",o(this.id)],e=!0,r=!1,n=void 0;try{for(var l,a=this.fields.values()[Symbol.iterator]();!(e=(l=a.next()).done);e=!0){var i=l.value;i.control.priority&&(t.push(" v_"),t.push(i.control.identifier),t.push("="),t.push(o(i.value)))}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}return t.push(">"),t.join("")}},{key:"is_dirty",value:function is_dirty(){if(null===this.id)return!0;var t=!0,e=!1,r=void 0;try{for(var o,n=this.fields.values()[Symbol.iterator]();!(t=(o=n.next()).done);t=!0){if(o.value.is_dirty())return!0}}catch(t){e=!0,r=t}finally{try{t||null==n.return||n.return()}finally{if(e)throw r}}return!1}},{key:"has_errors",value:function has_errors(){if(0!==this.errors.length)return!0;var t=!0,e=!1,r=void 0;try{for(var o,n=this.fields.values()[Symbol.iterator]();!(t=(o=n.next()).done);t=!0){if(o.value.has_errors())return!0}}catch(t){e=!0,r=t}finally{try{t||null==n.return||n.return()}finally{if(e)throw r}}return!1}},{key:"delete",value:function _delete(){return this.app.globals.handler.delete(this)}},{key:"save",value:function save(){this.app.globals.handler.save(this)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(l(t)){var e=!0,r=!1,n=void 0;try{for(var u,p=t.entries()[Symbol.iterator]();!(e=(u=p.next()).done);e=!0){var c=_slicedToArray(u.value,2),_=c[0],h=c[1];if(!this.fields.has(_))throw new a("update() get an unexpected keyword argument "+o(_));fields.get(_).value=h}}catch(t){r=!0,n=t}finally{try{e||null==p.return||p.return()}finally{if(r)throw n}}}else{if(!i(t))throw new s("values must be an object or a Map");for(var _ in t){if(!this.fields.has(_))throw new a("update() get an unexpected keyword argument "+o(_));record.fields.get(_).value=t[_]}}this.app.globals.handler.save(this)}},{key:"search",value:function search(t){for(var e in t){var r=t[e];if(p(r)&&!this.fields.get(e).search(r))return!1}return!0}},{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"values"===t?this._sparsevalues:this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,e){"values"===t?(this._sparsevalues=e,this._values=null,this._fields=null):this[t]=e}},{key:"__getattr__",value:function __getattr__(t){return t.startsWith("c_")?this.children.get(t.substr(2)):t.startsWith("f_")?this.fields.get(t.substr(2)):t.startsWith("v_")?this.values.get(t.substr(2)):this[t]}},{key:"__setattr__",value:function __setattr__(t,r){if(t.startsWith("c_"))this.children[t.substr(2)]=r;else{if(!t.startsWith("v_"))throw new e(this,t);this.fields.get(t.substr(2)).value=r}}},{key:"values",get:function get(){if(null===this._values){this._values=c?new Map:{};var t=!0,e=!1,r=void 0;try{for(var o,n=this.app.controls.entries()[Symbol.iterator]();!(t=(o=n.next()).done);t=!0){var l=_slicedToArray(o.value,2),a=l[0],i=(l[1],this._sparsevalues.get(a));void 0===i&&(i=null),this._values.set(a,i)}}catch(t){e=!0,r=t}finally{try{t||null==n.return||n.return()}finally{if(e)throw r}}}return this._values}},{key:"fields",get:function get(){if(null===this._fields){this._fields=c?new Map:{};var t=!0,e=!1,r=void 0;try{for(var o,n=this.values.entries()[Symbol.iterator]();!(t=(o=n.next()).done);t=!0){var l=_slicedToArray(o.value,2),a=l[0],i=l[1],s=new at(this.app.controls.get(a),this,i);this._fields.set(a,s)}}catch(t){e=!0,r=t}finally{try{t||null==n.return||n.return()}finally{if(e)throw r}}}return this._fields}}]),Record}();P.prototype._ul4onattrs=["id","app","createdat","createdby","updatedat","updatedby","updatecount","values","attachments","children"],P.prototype._ul4attrs=n("id","app","createdat","createdby","updatedat","updatedby","updatecount","values","attachments","children"),u(P.prototype.is_dirty,[]),u(P.prototype.has_errors,[]),u(P.prototype.delete,[]),u(P.prototype.save,[]),u(P.prototype.update,["**values"],{needsobject:!0});var R=function(t){function Control(){return _classCallCheck(this,Control),_possibleConstructorReturn(this,_getPrototypeOf(Control).apply(this,arguments))}return _inherits(Control,k),_createClass(Control,[{key:"__repr__",value:function __repr__(){return"<"+this.__type__+" id="+o(this.id)+" identifier="+o(this.identifier)+">"}},{key:"_logsearch",value:function _logsearch(t,e){}},{key:"search",value:function search(t,e){return!1}}]),Control}();R.prototype.type=null,R.prototype.subtype=null,R.prototype._ul4onattrs=["id","identifier","field","app","label","priority","order","default","ininsertprocedure","inupdateprocedure"],R.prototype._ul4attrs=n("id","identifier","field","app","label","priority","order","default","ininsertprocedure","inupdateprocedure");var w=function(t){function BoolControl(){return _classCallCheck(this,BoolControl),_possibleConstructorReturn(this,_getPrototypeOf(BoolControl).apply(this,arguments))}return _inherits(BoolControl,R),_createClass(BoolControl,[{key:"search",value:function search(t,e){return this._logsearch(t,e),"equals"===e.operator&&e.value===t}}]),BoolControl}();w.prototype.type="bool";var M=function(t){function IntControl(){return _classCallCheck(this,IntControl),_possibleConstructorReturn(this,_getPrototypeOf(IntControl).apply(this,arguments))}return _inherits(IntControl,R),_createClass(IntControl,[{key:"search",value:function search(t,e){return this._logsearch(t,e),"equals"===e.operator&&e.value===t}}]),IntControl}();M.prototype.type="int";var S=function(t){function NumberControl(){return _classCallCheck(this,NumberControl),_possibleConstructorReturn(this,_getPrototypeOf(NumberControl).apply(this,arguments))}return _inherits(NumberControl,R),_createClass(NumberControl,[{key:"search",value:function search(t,e){return this._logsearch(t,e),"equals"===e.operator?e.value===t:"range"===e.operator&&(null!==t&&((null===e.minvalue||e.minvalue<=t)&&(null===e.maxvalue||t<e.maxvalue)))}}]),NumberControl}();S.prototype.type="number";var x=function(t){function StringControl(){return _classCallCheck(this,StringControl),_possibleConstructorReturn(this,_getPrototypeOf(StringControl).apply(this,arguments))}return _inherits(StringControl,R),_createClass(StringControl,[{key:"search",value:function search(t,e){return this._logsearch(t,e),"equals"===e.operator?e.value===t:"contains"===e.operator?null===e.value||null===t?e.value===t:t.toLowerCase().indexOf(e.value.toLowerCase())>=0:void 0}}]),StringControl}();x.prototype.type="string";var D=function(t){function TextControl(){return _classCallCheck(this,TextControl),_possibleConstructorReturn(this,_getPrototypeOf(TextControl).apply(this,arguments))}return _inherits(TextControl,x),TextControl}();D.prototype.subtype="text";var N=function(t){function EmailControl(){return _classCallCheck(this,EmailControl),_possibleConstructorReturn(this,_getPrototypeOf(EmailControl).apply(this,arguments))}return _inherits(EmailControl,x),EmailControl}();N.prototype.subtype="email";var U=function(t){function URLControl(){return _classCallCheck(this,URLControl),_possibleConstructorReturn(this,_getPrototypeOf(URLControl).apply(this,arguments))}return _inherits(URLControl,x),URLControl}();U.prototype.subtype="url";var F=function(t){function TelControl(){return _classCallCheck(this,TelControl),_possibleConstructorReturn(this,_getPrototypeOf(TelControl).apply(this,arguments))}return _inherits(TelControl,x),TelControl}();F.prototype.subtype="tel";var I=function(t){function PasswordControl(){return _classCallCheck(this,PasswordControl),_possibleConstructorReturn(this,_getPrototypeOf(PasswordControl).apply(this,arguments))}return _inherits(PasswordControl,x),PasswordControl}();I.prototype.subtype="password";var T=function(t){function TextAreaControl(){return _classCallCheck(this,TextAreaControl),_possibleConstructorReturn(this,_getPrototypeOf(TextAreaControl).apply(this,arguments))}return _inherits(TextAreaControl,x),TextAreaControl}();T.prototype.subtype="textarea",T.prototype._ul4onattrs=x.prototype._ul4onattrs.concat(["encrypted"]),T.prototype._ul4attrs=n.apply(t,_toConsumableArray(x.prototype._ul4attrs).concat(["encrypted"]));var j=function(t){function DateControl(){return _classCallCheck(this,DateControl),_possibleConstructorReturn(this,_getPrototypeOf(DateControl).apply(this,arguments))}return _inherits(DateControl,R),_createClass(DateControl,[{key:"formatstring",value:function formatstring(t){return"de"===(t=t||this.app.language)?"%d.%m.%Y":"%m/%d/%Y"}},{key:"search",value:function search(t,e){this._logsearch(t,e);var r=e.value;return"[object Date]"==Object.prototype.toString.call(r)&&(r=_(r,this.formatstring(),this.app.language)),null!==t&&(t=_(t,this.formatstring(),this.app.language)),"equals"===e.operator?r===t:"contains"===e.operator&&(null===r||null===t?r===t:t.toLowerCase().indexOf(r.toLowerCase())>=0)}}]),DateControl}();j.prototype.type="date",j.prototype.subtype="date";var G=function(t){function DatetimeMinuteControl(){return _classCallCheck(this,DatetimeMinuteControl),_possibleConstructorReturn(this,_getPrototypeOf(DatetimeMinuteControl).apply(this,arguments))}return _inherits(DatetimeMinuteControl,j),_createClass(DatetimeMinuteControl,[{key:"formatstring",value:function formatstring(t){return"de"===(t=t||this.app.language)?"%d.%m.%Y %H:%M":"%m/%d/%Y %H:%M"}}]),DatetimeMinuteControl}();G.prototype.subtype="datetimeminute";var B=function(t){function DatetimeSecondControl(){return _classCallCheck(this,DatetimeSecondControl),_possibleConstructorReturn(this,_getPrototypeOf(DatetimeSecondControl).apply(this,arguments))}return _inherits(DatetimeSecondControl,j),_createClass(DatetimeSecondControl,[{key:"formatstring",value:function formatstring(t){return"de"===(t=t||this.app.language)?"%d.%m.%Y %H:%M:%S":"%m/%d/%Y %H:%M:%S"}}]),DatetimeSecondControl}();B.prototype.subtype="datetimesecond";var V=function(t){function LookupControl(){return _classCallCheck(this,LookupControl),_possibleConstructorReturn(this,_getPrototypeOf(LookupControl).apply(this,arguments))}return _inherits(LookupControl,R),_createClass(LookupControl,[{key:"search",value:function search(t,e){return"equals"===e.operator&&(null===t?null===e.value:t.key===e.value)}}]),LookupControl}();V.prototype.type="lookup",V.prototype._ul4onattrs=R.prototype._ul4onattrs.concat(["lookupdata"]),V.prototype._ul4attrs=n.apply(t,_toConsumableArray(R.prototype._ul4attrs).concat(["lookupdata"]));var q=function(t){function LookupSelectControl(){return _classCallCheck(this,LookupSelectControl),_possibleConstructorReturn(this,_getPrototypeOf(LookupSelectControl).apply(this,arguments))}return _inherits(LookupSelectControl,V),LookupSelectControl}();q.prototype.subtype="select";var E=function(t){function LookupRadioControl(){return _classCallCheck(this,LookupRadioControl),_possibleConstructorReturn(this,_getPrototypeOf(LookupRadioControl).apply(this,arguments))}return _inherits(LookupRadioControl,V),LookupRadioControl}();E.prototype.subtype="radio";var H=function(t){function LookupChoiceControl(){return _classCallCheck(this,LookupChoiceControl),_possibleConstructorReturn(this,_getPrototypeOf(LookupChoiceControl).apply(this,arguments))}return _inherits(LookupChoiceControl,V),LookupChoiceControl}();H.prototype.subtype="choice";var W=function(t){function AppLookupControl(){return _classCallCheck(this,AppLookupControl),_possibleConstructorReturn(this,_getPrototypeOf(AppLookupControl).apply(this,arguments))}return _inherits(AppLookupControl,R),_createClass(AppLookupControl,[{key:"search",value:function search(t,e){return null===t||null===e.value?t===e.value:t.search(e)}}]),AppLookupControl}();W.prototype.type="applookup",W.prototype._ul4onattrs=R.prototype._ul4onattrs.concat(["lookupapp","lookupcontrols"]),W.prototype._ul4attrs=n.apply(t,_toConsumableArray(R.prototype._ul4attrs).concat(["lookupapp","lookupcontrols"]));var K=function(t){function AppLookupSelectControl(){return _classCallCheck(this,AppLookupSelectControl),_possibleConstructorReturn(this,_getPrototypeOf(AppLookupSelectControl).apply(this,arguments))}return _inherits(AppLookupSelectControl,W),AppLookupSelectControl}();K.prototype.subtype="select";var J=function(t){function AppLookupRadioControl(){return _classCallCheck(this,AppLookupRadioControl),_possibleConstructorReturn(this,_getPrototypeOf(AppLookupRadioControl).apply(this,arguments))}return _inherits(AppLookupRadioControl,W),AppLookupRadioControl}();J.prototype.subtype="radio";var Y=function(t){function AppLookupChoiceControl(){return _classCallCheck(this,AppLookupChoiceControl),_possibleConstructorReturn(this,_getPrototypeOf(AppLookupChoiceControl).apply(this,arguments))}return _inherits(AppLookupChoiceControl,W),AppLookupChoiceControl}();Y.prototype.subtype="choice";var z=function(t){function MultipleLookupControl(){return _classCallCheck(this,MultipleLookupControl),_possibleConstructorReturn(this,_getPrototypeOf(MultipleLookupControl).apply(this,arguments))}return _inherits(MultipleLookupControl,V),_createClass(MultipleLookupControl,[{key:"search",value:function search(t,e){if("equals"===e.operator){var r=!0,o=!1,n=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done);r=!0){if(l.value.key===e.value)return!0}}catch(t){o=!0,n=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw n}}return!1}return!1}}]),MultipleLookupControl}();z.prototype.subtype="multiplelookup";var Q=function(t){function MultipleLookupSelectControl(){return _classCallCheck(this,MultipleLookupSelectControl),_possibleConstructorReturn(this,_getPrototypeOf(MultipleLookupSelectControl).apply(this,arguments))}return _inherits(MultipleLookupSelectControl,z),MultipleLookupSelectControl}();Q.prototype.subtype="select";var X=function(t){function MultipleLookupCheckboxControl(){return _classCallCheck(this,MultipleLookupCheckboxControl),_possibleConstructorReturn(this,_getPrototypeOf(MultipleLookupCheckboxControl).apply(this,arguments))}return _inherits(MultipleLookupCheckboxControl,z),MultipleLookupCheckboxControl}();X.prototype.subtype="checkbox";var Z=function(t){function MultipleLookupChoiceControl(){return _classCallCheck(this,MultipleLookupChoiceControl),_possibleConstructorReturn(this,_getPrototypeOf(MultipleLookupChoiceControl).apply(this,arguments))}return _inherits(MultipleLookupChoiceControl,z),MultipleLookupChoiceControl}();Z.prototype.subtype="choice";var $=function(t){function MultipleAppLookupControl(){return _classCallCheck(this,MultipleAppLookupControl),_possibleConstructorReturn(this,_getPrototypeOf(MultipleAppLookupControl).apply(this,arguments))}return _inherits(MultipleAppLookupControl,W),_createClass(MultipleAppLookupControl,[{key:"search",value:function search(t,e){if("equals"===e.operator){if(null===e.value)return 0===t.length;var r=!0,o=!1,n=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done);r=!0){if(l.value.search(e.value))return!0}}catch(t){o=!0,n=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw n}}return!1}return!1}}]),MultipleAppLookupControl}();$.prototype.type="multipleapplookup";var tt=function(t){function MultipleAppLookupSelectControl(){return _classCallCheck(this,MultipleAppLookupSelectControl),_possibleConstructorReturn(this,_getPrototypeOf(MultipleAppLookupSelectControl).apply(this,arguments))}return _inherits(MultipleAppLookupSelectControl,$),MultipleAppLookupSelectControl}();tt.prototype.subtype="select";var et=function(t){function MultipleAppLookupCheckboxControl(){return _classCallCheck(this,MultipleAppLookupCheckboxControl),_possibleConstructorReturn(this,_getPrototypeOf(MultipleAppLookupCheckboxControl).apply(this,arguments))}return _inherits(MultipleAppLookupCheckboxControl,$),MultipleAppLookupCheckboxControl}();et.prototype.subtype="checkbox";var rt=function(t){function MultipleAppLookupChoiceControl(){return _classCallCheck(this,MultipleAppLookupChoiceControl),_possibleConstructorReturn(this,_getPrototypeOf(MultipleAppLookupChoiceControl).apply(this,arguments))}return _inherits(MultipleAppLookupChoiceControl,$),MultipleAppLookupChoiceControl}();rt.prototype.subtype="choice";var ot=function(t){function GeoControl(){return _classCallCheck(this,GeoControl),_possibleConstructorReturn(this,_getPrototypeOf(GeoControl).apply(this,arguments))}return _inherits(GeoControl,R),GeoControl}();ot.prototype.type="geo";var nt=function(t){function FileControl(){return _classCallCheck(this,FileControl),_possibleConstructorReturn(this,_getPrototypeOf(FileControl).apply(this,arguments))}return _inherits(FileControl,R),FileControl}();nt.prototype.type="file";var lt=function(t){function ButtonControl(){return _classCallCheck(this,ButtonControl),_possibleConstructorReturn(this,_getPrototypeOf(ButtonControl).apply(this,arguments))}return _inherits(ButtonControl,R),ButtonControl}();lt.prototype.type="button";var at=function(t){function Field(t,e,r){var o;return _classCallCheck(this,Field),(o=_possibleConstructorReturn(this,_getPrototypeOf(Field).call(this))).control=t,o.record=e,o._value=r,o._dirty=!1,o.errors=[],o}return _inherits(Field,k),_createClass(Field,[{key:"is_empty",value:function is_empty(){return null===this._value||h(this._value)&&0===this._value.length}},{key:"is_dirty",value:function is_dirty(){return this._dirty}},{key:"has_errors",value:function has_errors(){return 0!==this.errors.length}},{key:"search",value:function search(t){return this.control.search(this.value,t)}},{key:"__repr__",value:function __repr__(){var t="<Field identifier=";return t+=o(this.control.identifier),this._dirty&&(t+=" is_dirty()=True"),0!==this.errors.length&&(t+=" has_errors()=True"),t+=">"}},{key:"value",get:function get(){return this._value},set:function set(t){var e=this._value;y(e,t)&&(this.record.values.set(this.control.identifier,t),this._value=t,this._dirty=!0)}}]),Field}(),it=function(t){function LookupItem(){return _classCallCheck(this,LookupItem),_possibleConstructorReturn(this,_getPrototypeOf(LookupItem).apply(this,arguments))}return _inherits(LookupItem,k),_createClass(LookupItem,[{key:"__repr__",value:function __repr__(){return"<LookupItem key="+o(this.key)+" label="+o(this.label)+">"}}]),LookupItem}();it.prototype._ul4onattrs=["key","label"],it.prototype._ul4attrs=n("key","label");var st=function(t){function User(){return _classCallCheck(this,User),_possibleConstructorReturn(this,_getPrototypeOf(User).apply(this,arguments))}return _inherits(User,k),_createClass(User,[{key:"__repr__",value:function __repr__(){return"<User id="+o(this.id)+" firstname="+o(this.firstname)+" surname="+o(this.surname)+" email="+o(this.email)+">"}}]),User}();st.prototype._ul4onattrs=["_id","id","gender","firstname","surname","initials","email","language","avatarsmall","avatarlarge","keyviews"],st.prototype._ul4attrs=n("_id","id","gender","firstname","surname","initials","email","language","avatarsmall","avatarlarge","keyviews");var ut=function(t){function File(){return _classCallCheck(this,File),_possibleConstructorReturn(this,_getPrototypeOf(File).apply(this,arguments))}return _inherits(File,k),_createClass(File,[{key:"__repr__",value:function __repr__(){return"<File id="+o(this.id)+" url="+o(this.url)+" filename="+o(this.filename)+">"}}]),File}();ut.prototype._ul4onattrs=["id","url","filename","mimetype","width","height","internalid","createdat","size"],ut.prototype._ul4attrs=n("id","url","filename","mimetype","width","height","size","createdat");var pt=function(t){function Geo(t,e,r){var o;return _classCallCheck(this,Geo),(o=_possibleConstructorReturn(this,_getPrototypeOf(Geo).call(this))).lat=t,o.long=e,o.info=r,o}return _inherits(Geo,k),_createClass(Geo,[{key:"__repr__",value:function __repr__(){return"<Geo lat="+o(this.lat)+" long="+o(this.long)+" info="+o(this.info)+">"}}]),Geo}();pt.prototype._ul4onattrs=["lat","long","info"],pt.prototype._ul4attrs=n("lat","long","info");var ct=function(t){function Attachment(){return _classCallCheck(this,Attachment),_possibleConstructorReturn(this,_getPrototypeOf(Attachment).apply(this,arguments))}return _inherits(Attachment,k),_createClass(Attachment,[{key:"__repr__",value:function __repr__(){return"<"+this.__type__+" id="+o(this.id)+" label="+o(this.label)+">"}}]),Attachment}();ct.prototype._ul4onattrs=["id","record","label","active"],ct.prototype._ul4attrs=n("id","record","label","active");var _t=function(t){function NoteAttachment(){return _classCallCheck(this,NoteAttachment),_possibleConstructorReturn(this,_getPrototypeOf(NoteAttachment).apply(this,arguments))}return _inherits(NoteAttachment,ct),NoteAttachment}();_t.prototype.type="noteattachment",_t.prototype._ul4onattrs=ct.prototype._ul4onattrs.concat(["value"]),_t.prototype._ul4attrs=n.apply(t,_toConsumableArray(ct.prototype._ul4onattrs).concat(["value"]));var ht=function(t){function URLAttachment(){return _classCallCheck(this,URLAttachment),_possibleConstructorReturn(this,_getPrototypeOf(URLAttachment).apply(this,arguments))}return _inherits(URLAttachment,ct),URLAttachment}();ht.prototype.type="urlattachment",ht.prototype._ul4onattrs=ct.prototype._ul4onattrs.concat(["value"]),ht.prototype._ul4attrs=n.apply(t,_toConsumableArray(ct.prototype._ul4onattrs).concat(["value"]));var yt=function(t){function FileAttachment(){return _classCallCheck(this,FileAttachment),_possibleConstructorReturn(this,_getPrototypeOf(FileAttachment).apply(this,arguments))}return _inherits(FileAttachment,ct),FileAttachment}();yt.prototype.type="fileattachment",yt.prototype._ul4onattrs=ct.prototype._ul4onattrs.concat(["value"]),yt.prototype._ul4attrs=n.apply(t,_toConsumableArray(ct.prototype._ul4onattrs).concat(["value"]));var ft=function(t){function ImageAttachment(){return _classCallCheck(this,ImageAttachment),_possibleConstructorReturn(this,_getPrototypeOf(ImageAttachment).apply(this,arguments))}return _inherits(ImageAttachment,ct),ImageAttachment}();ft.prototype.type="imageattachment",ft.prototype._ul4onattrs=ct.prototype._ul4onattrs.concat(["original","thumb","small","medium","large"]),ft.prototype._ul4attrs=n.apply(t,_toConsumableArray(ct.prototype._ul4onattrs).concat(["original","thumb","small","medium","large"]));var Ct=function(t){function JSONAttachment(){return _classCallCheck(this,JSONAttachment),_possibleConstructorReturn(this,_getPrototypeOf(JSONAttachment).apply(this,arguments))}return _inherits(JSONAttachment,ct),_createClass(JSONAttachment,[{key:"_dumpUL4ONAttr",value:function _dumpUL4ONAttr(t){return"value"===t?f(this.value):this[t]}},{key:"_loadUL4ONAttr",value:function _loadUL4ONAttr(t,e){"value"===t?this.value=C(e):this[t]=e}}]),JSONAttachment}();Ct.prototype.type="jsonattachment",Ct.prototype._ul4onattrs=ct.prototype._ul4onattrs.concat(["value"]),Ct.prototype._ul4attrs=n.apply(t,_toConsumableArray(ct.prototype._ul4onattrs).concat(["value"]));var dt=function(t){function Installation(){return _classCallCheck(this,Installation),_possibleConstructorReturn(this,_getPrototypeOf(Installation).apply(this,arguments))}return _inherits(Installation,k),_createClass(Installation,[{key:"__repr__",value:function __repr__(){return"<Installation id="+o(this.id)+" name="+o(this.name)+">"}}]),Installation}();dt.prototype._ul4onattrs=["id","name"],dt.prototype._ul4attrs=n("id","name");var vt=function(t){function Category(){return _classCallCheck(this,Category),_possibleConstructorReturn(this,_getPrototypeOf(Category).apply(this,arguments))}return _inherits(Category,k),_createClass(Category,[{key:"__repr__",value:function __repr__(){for(var t=[],e=this;null!==e;)t.splice(0,0,e.identifier),e=e.parent;return"<Category id="+o(this.id)+" identifierpath="+o(t.join("/"))+NaN+o(this.name)+">"}}]),Category}();vt.prototype._ul4onattrs=["id","identifier","name","order","parent","children","apps"],vt.prototype._ul4attrs=n("id","identifier","name","order","parent","children","apps");var kt=function(t){function KeyView(){return _classCallCheck(this,KeyView),_possibleConstructorReturn(this,_getPrototypeOf(KeyView).apply(this,arguments))}return _inherits(KeyView,k),_createClass(KeyView,[{key:"__repr__",value:function __repr__(){return"<KeyView id="+o(this.id)+" identifier="+o(this.identifier)+">"}}]),KeyView}();kt.prototype._ul4onattrs=["id","identifier","name","key","user"],kt.prototype._ul4attrs=n("id","identifier","name","key","user");var mt=function(t){function AppParameter(){return _classCallCheck(this,AppParameter),_possibleConstructorReturn(this,_getPrototypeOf(AppParameter).apply(this,arguments))}return _inherits(AppParameter,k),_createClass(AppParameter,[{key:"__repr__",value:function __repr__(){return"<AppParameter id="+o(this.id)+" identifier="+o(this.identifier)+">"}}]),AppParameter}();mt.prototype._ul4onattrs=["id","app","identifier","description","value"],mt.prototype._ul4attrs=n("id","app","identifier","description","value");for(var gt=0,bt=[g,b,A,L,O,P,w,M,S,D,N,U,F,I,T,j,G,B,V,q,E,H,W,K,J,Y,z,Q,X,Z,$,tt,et,rt,ot,nt,lt,at,it,st,ut,pt,_t,ht,yt,ft,Ct,dt,vt,kt,mt];gt<bt.length;gt++){var At=bt[gt];d("de.livinglogic.livingapi."+At.name.toLowerCase(),At)}export{A as App,Y as AppLookupChoiceControl,W as AppLookupControl,J as AppLookupRadioControl,K as AppLookupSelectControl,mt as AppParameter,ct as Attachment,k as Base,w as BoolControl,lt as ButtonControl,vt as Category,R as Control,O as DataSourceData,j as DateControl,G as DatetimeMinuteControl,B as DatetimeSecondControl,N as EmailControl,at as Field,ut as File,yt as FileAttachment,nt as FileControl,b as FlashMessage,pt as Geo,ot as GeoControl,g as Globals,m as Handler,ft as ImageAttachment,dt as Installation,M as IntControl,Ct as JSONAttachment,kt as KeyView,H as LookupChoiceControl,V as LookupControl,it as LookupItem,E as LookupRadioControl,q as LookupSelectControl,et as MultipleAppLookupCheckboxControl,rt as MultipleAppLookupChoiceControl,$ as MultipleAppLookupControl,tt as MultipleAppLookupSelectControl,X as MultipleLookupCheckboxControl,Z as MultipleLookupChoiceControl,z as MultipleLookupControl,Q as MultipleLookupSelectControl,_t as NoteAttachment,S as NumberControl,I as PasswordControl,P as Record,x as StringControl,F as TelControl,T as TextAreaControl,D as TextControl,ht as URLAttachment,U as URLControl,st as User,L as View,v 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.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};
2
2
  //# sourceMappingURL=livingapi.js.map