@livinglogic/livingapi 1.1.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +3 -3
- package/dist/esm-node/livingapi.js +1 -1
- package/dist/esm-node/livingapi.js.map +1 -1
- package/dist/esm-static/livingapi.js +1 -1
- package/dist/esm-static/livingapi.js.map +1 -1
- package/dist/umd/livingapi.js +1 -1
- package/dist/umd/livingapi.js.map +1 -1
- package/package.json +2 -2
- package/src/livingapi.js +36 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livinglogic/livingapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Javascript version of the LivingAPI classes of LivingApps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "dist/esm-node/livingapi.js",
|
|
19
19
|
"browser": "dist/umd/livingapi.js",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@livinglogic/ul4": "~1.15.
|
|
21
|
+
"@livinglogic/ul4": "~1.15.3"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@babel/core": "^7.14.6",
|
package/src/livingapi.js
CHANGED
|
@@ -276,6 +276,9 @@ export class Globals extends Base
|
|
|
276
276
|
const C = sqcos(G) * sqcos(l) + sqsin(F) * sqsin(l);
|
|
277
277
|
const w = Math.atan(Math.sqrt(S/C));
|
|
278
278
|
const D = 2 * w * radius;
|
|
279
|
+
if (D === 0.0)
|
|
280
|
+
/* The "correction" calculation below would fail if the raw distance is 0 */
|
|
281
|
+
return D;
|
|
279
282
|
const T = Math.sqrt(S*C)/w;
|
|
280
283
|
const H1 = (3*T-1)/(2*C);
|
|
281
284
|
const H2 = (3*T+1)/(2*S);
|
|
@@ -700,8 +703,8 @@ export class App extends Base
|
|
|
700
703
|
};
|
|
701
704
|
|
|
702
705
|
|
|
703
|
-
App.prototype._ul4onattrs = ["globals", "name", "description", "lang", "startlink", "
|
|
704
|
-
App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "lang", "startlink", "
|
|
706
|
+
App.prototype._ul4onattrs = ["globals", "name", "description", "lang", "startlink", "image", "createdby", "controls", "records", "recordcount", "installation", "categories", "params", "views", "datamanagement_identifier", "basetable", "primarykey", "insertprocedure", "updateprocedure", "deleteprocedure", "templates", "createdat", "updatedat", "updatedby", "superid", "favorite", "_active_view", "datasource", "menus", "panels"];
|
|
707
|
+
App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "lang", "startlink", "image", "createdat", "createdby", "updatedat", "updatedby", "controls", "layout_controls", "records", "recordcount", "installation", "categories", "params", "views", "menus", "panels", "datasource", "datamanagement_identifier", "insert", "favorite", "_active_view", "template_url", "new_embedded_url", "new_standalone_url"]);
|
|
705
708
|
ul4.expose(App.prototype[ul4.symbols.call], ["values", "**"], {"needsobject": true});
|
|
706
709
|
ul4.expose(App.prototype.insert, ["values", "**"], {"needsobject": true});
|
|
707
710
|
ul4.expose(App.prototype.template_url, ["identifier", "p", "record", "p=", null, "params", "**"]);
|
|
@@ -3487,6 +3490,12 @@ export class Control extends Base
|
|
|
3487
3490
|
return view_control !== null ? view_control.height : null;
|
|
3488
3491
|
}
|
|
3489
3492
|
|
|
3493
|
+
get z_index()
|
|
3494
|
+
{
|
|
3495
|
+
let view_control = this._view_control();
|
|
3496
|
+
return view_control !== null ? view_control.z_index : null;
|
|
3497
|
+
}
|
|
3498
|
+
|
|
3490
3499
|
get liveupdate()
|
|
3491
3500
|
{
|
|
3492
3501
|
let view_control = this._view_control();
|
|
@@ -3565,7 +3574,7 @@ export class Control extends Base
|
|
|
3565
3574
|
Control.prototype.type = null;
|
|
3566
3575
|
Control.prototype.subtype = null;
|
|
3567
3576
|
Control.prototype._ul4onattrs = ["identifier", "fieldname", "app", "_label", "priority", "order", "ininsertprocedure", "inupdateprocedure"];
|
|
3568
|
-
Control.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"]);
|
|
3577
|
+
Control.prototype._ul4attrs = new Set(["id", "identifier", "fieldname", "app", "priority", "order", "ininsertprocedure", "inupdateprocedure", "fulltype", "label", "top", "left", "width", "height", "z_index", "liveupdate", "tabindex", "required", "mode", "labelpos", "autoalign", "in_active_view"]);
|
|
3569
3578
|
Control.prototype._cssclass_root = "llft-control";
|
|
3570
3579
|
Control.prototype._cssclass_control = "input";
|
|
3571
3580
|
|
|
@@ -5074,16 +5083,26 @@ export class ImageLayoutControl extends LayoutControl
|
|
|
5074
5083
|
return imagelayoutcontroltype;
|
|
5075
5084
|
}
|
|
5076
5085
|
|
|
5086
|
+
get image()
|
|
5087
|
+
{
|
|
5088
|
+
return this._image;
|
|
5089
|
+
}
|
|
5090
|
+
|
|
5091
|
+
set image(image)
|
|
5092
|
+
{
|
|
5093
|
+
this._image = image;
|
|
5094
|
+
if (this.globals._in_form())
|
|
5095
|
+
this._set_dom_value(this._image);
|
|
5096
|
+
}
|
|
5097
|
+
|
|
5077
5098
|
get original()
|
|
5078
5099
|
{
|
|
5079
|
-
return this.
|
|
5100
|
+
return this.image;
|
|
5080
5101
|
}
|
|
5081
5102
|
|
|
5082
5103
|
set original(original)
|
|
5083
5104
|
{
|
|
5084
|
-
this.
|
|
5085
|
-
if (this.globals._in_form())
|
|
5086
|
-
this._set_dom_value(this._original);
|
|
5105
|
+
this.image = image;
|
|
5087
5106
|
}
|
|
5088
5107
|
|
|
5089
5108
|
_set_dom_value(value)
|
|
@@ -5102,13 +5121,15 @@ export class ImageLayoutControl extends LayoutControl
|
|
|
5102
5121
|
{
|
|
5103
5122
|
if (name === "original")
|
|
5104
5123
|
this.original = value;
|
|
5124
|
+
else if (name === "image")
|
|
5125
|
+
this.image = value;
|
|
5105
5126
|
else
|
|
5106
5127
|
super[ul4.symbols.setattr](name, value);
|
|
5107
5128
|
}
|
|
5108
5129
|
};
|
|
5109
5130
|
|
|
5110
|
-
ImageLayoutControl.prototype._ul4onattrs = [...LayoutControl.prototype._ul4onattrs, "
|
|
5111
|
-
ImageLayoutControl.prototype._ul4attrs = new Set([...LayoutControl.prototype._ul4attrs, "
|
|
5131
|
+
ImageLayoutControl.prototype._ul4onattrs = [...LayoutControl.prototype._ul4onattrs, "_image", "_visible"];
|
|
5132
|
+
ImageLayoutControl.prototype._ul4attrs = new Set([...LayoutControl.prototype._ul4attrs, "image", "original"]);
|
|
5112
5133
|
|
|
5113
5134
|
|
|
5114
5135
|
class ButtonLayoutControlType extends LayoutControlType
|
|
@@ -5157,8 +5178,8 @@ export class ViewControl extends Base
|
|
|
5157
5178
|
}
|
|
5158
5179
|
};
|
|
5159
5180
|
|
|
5160
|
-
ViewControl.prototype._ul4onattrs = ["view", "control", "top", "left", "width", "height", "liveupdate", "default", "tabindex", "minlength", "maxlength", "required", "placeholder", "_mode", "labelpos", "lookupnonekey", "lookupnonelabel", "label", "autoalign", "labelwidth", "lookupdata", "autoexpandable"];
|
|
5161
|
-
ViewControl.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"]);
|
|
5181
|
+
ViewControl.prototype._ul4onattrs = ["view", "control", "top", "left", "width", "height", "z_index", "liveupdate", "default", "tabindex", "minlength", "maxlength", "required", "placeholder", "_mode", "labelpos", "lookupnonekey", "lookupnonelabel", "label", "autoalign", "labelwidth", "lookupdata", "autoexpandable"];
|
|
5182
|
+
ViewControl.prototype._ul4attrs = new Set(["id", "view", "control", "top", "left", "width", "height", "z_index", "liveupdate", "default", "tabindex", "minlength", "maxlength", "required", "placeholder", "mode", "labelpos", "lookupnonekey", "lookupnonelabel", "label", "autoalign", "labelwidth", "lookupdata", "autoexpandable"]);
|
|
5162
5183
|
|
|
5163
5184
|
|
|
5164
5185
|
class UserType extends ul4.Type
|
|
@@ -5185,8 +5206,8 @@ export class User extends Base
|
|
|
5185
5206
|
}
|
|
5186
5207
|
};
|
|
5187
5208
|
|
|
5188
|
-
User.prototype._ul4onattrs = ["_id", "gender", "title", "firstname", "surname", "initials", "email", "streetname", "streetnumber", "zip", "city", "phone", "fax", "lang", "
|
|
5189
|
-
User.prototype._ul4attrs = new Set(["id", "_id", "gender", "title", "firstname", "surname", "initials", "email", "streetname", "streetnumber", "zip", "city", "phone", "fax", "lang", "
|
|
5209
|
+
User.prototype._ul4onattrs = ["_id", "gender", "title", "firstname", "surname", "initials", "email", "streetname", "streetnumber", "zip", "city", "phone", "fax", "lang", "image", "summary", "interests", "personalwebsite", "companywebsite", "company", "position", "department", "keyviews"];
|
|
5210
|
+
User.prototype._ul4attrs = new Set(["id", "_id", "gender", "title", "firstname", "surname", "initials", "email", "streetname", "streetnumber", "zip", "city", "phone", "fax", "lang", "image", "summary", "interests", "personalwebsite", "companywebsite", "company", "position", "department", "keyviews"]);
|
|
5190
5211
|
|
|
5191
5212
|
|
|
5192
5213
|
class FileType extends ul4.Type
|
|
@@ -5365,30 +5386,6 @@ FileAttachment.prototype._ul4onattrs = [...Attachment.prototype._ul4onattrs, "va
|
|
|
5365
5386
|
FileAttachment.prototype._ul4attrs = new Set([...Attachment.prototype._ul4onattrs, "value"]);
|
|
5366
5387
|
|
|
5367
5388
|
|
|
5368
|
-
class ImageAttachmentType extends AttachmentType
|
|
5369
|
-
{
|
|
5370
|
-
instancecheck(obj)
|
|
5371
|
-
{
|
|
5372
|
-
return obj instanceof ImageAttachment;
|
|
5373
|
-
}
|
|
5374
|
-
};
|
|
5375
|
-
|
|
5376
|
-
let imageattachmenttype = new ImageAttachmentType("la", "ImageAttachment", "An image attachment of a record");
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
export class ImageAttachment extends Attachment
|
|
5380
|
-
{
|
|
5381
|
-
[ul4.symbols.type]()
|
|
5382
|
-
{
|
|
5383
|
-
return imageattachmenttype;
|
|
5384
|
-
}
|
|
5385
|
-
};
|
|
5386
|
-
|
|
5387
|
-
ImageAttachment.prototype.type = "imageattachment";
|
|
5388
|
-
ImageAttachment.prototype._ul4onattrs = [...Attachment.prototype._ul4onattrs, "original", "thumb", "small", "medium","large"];
|
|
5389
|
-
ImageAttachment.prototype._ul4attrs = new Set([...Attachment.prototype._ul4onattrs, "original", "thumb", "small", "medium", "large"]);
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
5389
|
class JSONAttachmentType extends AttachmentType
|
|
5393
5390
|
{
|
|
5394
5391
|
instancecheck(obj)
|
|
@@ -5579,8 +5576,8 @@ export class MenuItem extends Base
|
|
|
5579
5576
|
}
|
|
5580
5577
|
};
|
|
5581
5578
|
|
|
5582
|
-
MenuItem.prototype._ul4onattrs = ["app", "identifier", "label", "type", "icon", "title", "target", "cssclass", "url", "order", "start_time", "end_time", "on_app_overview_page", "on_app_detail_page", "on_form_page", "on_iframe_page", "on_custom_overview_page", "children", "createdat", "createdby", "updatedat", "updatedby"];
|
|
5583
|
-
MenuItem.prototype._ul4attrs = new Set(["id", "app", "identifier", "label", "type", "icon", "title", "target", "cssclass", "url", "order", "start_time", "end_time", "on_app_overview_page", "on_app_detail_page", "on_form_page", "on_iframe_page", "on_custom_overview_page", "children", "createdat", "createdby", "updatedat", "updatedby"]);
|
|
5579
|
+
MenuItem.prototype._ul4onattrs = ["app", "identifier", "label", "type", "icon", "title", "target", "cssclass", "url", "order", "start_time", "end_time", "on_app_overview_page", "on_app_detail_page", "on_form_page", "on_iframe_page", "on_custom_overview_page", "accessible", "children", "createdat", "createdby", "updatedat", "updatedby"];
|
|
5580
|
+
MenuItem.prototype._ul4attrs = new Set(["id", "app", "identifier", "label", "type", "icon", "title", "target", "cssclass", "url", "order", "start_time", "end_time", "on_app_overview_page", "on_app_detail_page", "on_form_page", "on_iframe_page", "on_custom_overview_page", "accessible", "children", "createdat", "createdby", "updatedat", "updatedby"]);
|
|
5584
5581
|
|
|
5585
5582
|
|
|
5586
5583
|
class PanelType extends MenuItemType
|
|
@@ -5851,7 +5848,6 @@ let classes = [
|
|
|
5851
5848
|
NoteAttachment,
|
|
5852
5849
|
URLAttachment,
|
|
5853
5850
|
FileAttachment,
|
|
5854
|
-
ImageAttachment,
|
|
5855
5851
|
JSONAttachment,
|
|
5856
5852
|
Installation,
|
|
5857
5853
|
Category,
|
|
@@ -5905,7 +5901,6 @@ export const module = new ul4.Module(
|
|
|
5905
5901
|
GeoControl: GeoControl,
|
|
5906
5902
|
ViewControl: ViewControl,
|
|
5907
5903
|
Record: Record,
|
|
5908
|
-
ImageAttachment: ImageAttachment,
|
|
5909
5904
|
FileAttachment: FileAttachment,
|
|
5910
5905
|
URLAttachment: URLAttachment,
|
|
5911
5906
|
NoteAttachment: NoteAttachment,
|