@livinglogic/livingapi 1.3.3 → 1.5.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 +19 -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 -4
- package/src/livingapi.js +35 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livinglogic/livingapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Javascript version of the LivingAPI classes of LivingApps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,8 +29,6 @@
|
|
|
29
29
|
"rollup-plugin-json": "^4.0.0",
|
|
30
30
|
"rollup-plugin-node-resolve": "^4.2.4",
|
|
31
31
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
32
|
-
"rollup-plugin-terser": "^7.0.2"
|
|
33
|
-
"rollup-plugin-uglify": "^5.0.2",
|
|
34
|
-
"source-map-support": "^0.5.19"
|
|
32
|
+
"rollup-plugin-terser": "^7.0.2"
|
|
35
33
|
}
|
|
36
34
|
}
|
package/src/livingapi.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* LivingAPI JavaScript Library
|
|
3
3
|
* https://my.living-apps.de/docs/LivingAPI.html
|
|
4
4
|
*
|
|
5
|
-
* Copyright 2017-
|
|
6
|
-
* Copyright 2017-
|
|
5
|
+
* Copyright 2017-2024 by LivingLogic AG, Bayreuth/Germany
|
|
6
|
+
* Copyright 2017-2024 by Walter Dörwald
|
|
7
7
|
*
|
|
8
8
|
* All Rights Reserved
|
|
9
9
|
*
|
|
@@ -292,13 +292,13 @@ export class Globals extends Base
|
|
|
292
292
|
|
|
293
293
|
if (image instanceof File)
|
|
294
294
|
{
|
|
295
|
-
image =
|
|
295
|
+
image = image.archive_url;
|
|
296
296
|
filename = encodeURIComponent(image.filename);
|
|
297
297
|
if (filename != image.filename)
|
|
298
298
|
filename = null;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
let result = "";
|
|
301
|
+
let result = "https://" + this.hostname;
|
|
302
302
|
|
|
303
303
|
if (cache)
|
|
304
304
|
result += "/imgproxycache/insecure";
|
|
@@ -343,6 +343,11 @@ export class Globals extends Base
|
|
|
343
343
|
return result;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
qrcode_url(data, size)
|
|
347
|
+
{
|
|
348
|
+
return "https://" + this.hostname + "/qr/generate?data=" + encodeURIComponent(data) + "&size=" + encodeURIComponent(size);
|
|
349
|
+
}
|
|
350
|
+
|
|
346
351
|
[ul4.symbols.repr]()
|
|
347
352
|
{
|
|
348
353
|
return "<Globals version=" + ul4._repr(this.version) + " mode=" + ul4._repr(this.mode) + ">";
|
|
@@ -499,42 +504,42 @@ export class Globals extends Base
|
|
|
499
504
|
|
|
500
505
|
my_apps_url()
|
|
501
506
|
{
|
|
502
|
-
return "/apps.htm";
|
|
507
|
+
return "https://" + this.hostname + "/apps.htm";
|
|
503
508
|
}
|
|
504
509
|
|
|
505
510
|
my_tasks_url()
|
|
506
511
|
{
|
|
507
|
-
return "/xist4c/web/aufgaben_id_393_.htm";
|
|
512
|
+
return "https://" + this.hostname + "/xist4c/web/aufgaben_id_393_.htm";
|
|
508
513
|
}
|
|
509
514
|
|
|
510
515
|
catalog_url()
|
|
511
516
|
{
|
|
512
|
-
return "/katalog/home.htm";
|
|
517
|
+
return "https://" + this.hostname + "/katalog/home.htm";
|
|
513
518
|
}
|
|
514
519
|
|
|
515
520
|
chats_url()
|
|
516
521
|
{
|
|
517
|
-
return "/chats.htm";
|
|
522
|
+
return "https://" + this.hostname + "/chats.htm";
|
|
518
523
|
}
|
|
519
524
|
|
|
520
525
|
profile_url()
|
|
521
526
|
{
|
|
522
|
-
return "/profil/index.htm";
|
|
527
|
+
return "https://" + this.hostname + "/profil/index.htm";
|
|
523
528
|
}
|
|
524
529
|
|
|
525
530
|
account_url()
|
|
526
531
|
{
|
|
527
|
-
return "/account.htm";
|
|
532
|
+
return "https://" + this.hostname + "/account.htm";
|
|
528
533
|
}
|
|
529
534
|
|
|
530
535
|
logout_url()
|
|
531
536
|
{
|
|
532
|
-
return "/login.htm?logout=standardCug";
|
|
537
|
+
return "https://" + this.hostname + "/login.htm?logout=standardCug";
|
|
533
538
|
}
|
|
534
539
|
};
|
|
535
540
|
|
|
536
541
|
Globals.prototype._ul4onattrs = ["version", "platform", "user", "maxdbactions", "maxtemplateruntime", "lang", "datasources", "hostname", "app", "record", "mode", "view_template_id", "email_template_id", "view_id"];
|
|
537
|
-
Globals.prototype._ul4attrs = new Set(["version", "hostname", "platform", "user", "lang", "datasources", "app", "record", "maxdbactions", "maxtemplateruntime", "flashmessages", "mode", "scaled_url", "dist", "current_geo", "log_debug", "log_info", "log_warning", "log_error", "my_apps_url", "my_tasks_url", "catalog_url", "chats_url", "profile_url", "account_url", "logout_url"]);
|
|
542
|
+
Globals.prototype._ul4attrs = new Set(["version", "hostname", "platform", "user", "lang", "datasources", "app", "record", "maxdbactions", "maxtemplateruntime", "flashmessages", "mode", "scaled_url", "qrcode_url", "dist", "current_geo", "log_debug", "log_info", "log_warning", "log_error", "my_apps_url", "my_tasks_url", "catalog_url", "chats_url", "profile_url", "account_url", "logout_url"]);
|
|
538
543
|
ul4.expose(Globals.prototype.log_debug, ["message", "*"]);
|
|
539
544
|
ul4.expose(Globals.prototype.log_info, ["message", "*"]);
|
|
540
545
|
ul4.expose(Globals.prototype.log_warning, ["message", "*"]);
|
|
@@ -617,7 +622,7 @@ export class App extends Base
|
|
|
617
622
|
|
|
618
623
|
template_url(identifier, record=null, params)
|
|
619
624
|
{
|
|
620
|
-
let url = "/gateway/apps/" + this.id;
|
|
625
|
+
let url = "https://" + this.globals.hostname + "/gateway/apps/" + this.id;
|
|
621
626
|
if (record !== null)
|
|
622
627
|
url += "/" + record.id;
|
|
623
628
|
return url_with_params(url, ['template', identifier], params);
|
|
@@ -625,34 +630,34 @@ export class App extends Base
|
|
|
625
630
|
|
|
626
631
|
new_embedded_url(params)
|
|
627
632
|
{
|
|
628
|
-
let url = "/dateneingabe/" + this.id + "/new";
|
|
633
|
+
let url = "https://" + this.globals.hostname + "/dateneingabe/" + this.id + "/new";
|
|
629
634
|
return url_with_params(url, params);
|
|
630
635
|
}
|
|
631
636
|
|
|
632
637
|
new_standalone_url(params)
|
|
633
638
|
{
|
|
634
|
-
let url = "/gateway/apps/" + this.id + "/new";
|
|
639
|
+
let url = "https://" + this.globals.hostname + "/gateway/apps/" + this.id + "/new";
|
|
635
640
|
return url_with_params(url, params);
|
|
636
641
|
}
|
|
637
642
|
|
|
638
643
|
home_url()
|
|
639
644
|
{
|
|
640
|
-
return "/apps/" + this.id + ".htm";
|
|
645
|
+
return "https://" + this.globals.hostname + "/apps/" + this.id + ".htm";
|
|
641
646
|
}
|
|
642
647
|
|
|
643
648
|
datamanagement_url()
|
|
644
649
|
{
|
|
645
|
-
return "/_id_36_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true&templateIdentifier=created_" + this.id;
|
|
650
|
+
return "https://" + this.globals.hostname + "/_id_36_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true&templateIdentifier=created_" + this.id;
|
|
646
651
|
}
|
|
647
652
|
|
|
648
653
|
import_url()
|
|
649
654
|
{
|
|
650
|
-
return "/import-export/"+ this.id + ".htm";
|
|
655
|
+
return "https://" + this.globals.hostname + "/import-export/"+ this.id + ".htm";
|
|
651
656
|
}
|
|
652
657
|
|
|
653
658
|
tasks_url()
|
|
654
659
|
{
|
|
655
|
-
return "/_id_1073_.htm?uuid=" + this.id + "&dId=" + this.id + "&p_tpl_uuid=" + this.id + "&resetInfo=true&templateIdentifier=created_task_" + this.id;
|
|
660
|
+
return "https://" + this.globals.hostname + "/_id_1073_.htm?uuid=" + this.id + "&dId=" + this.id + "&p_tpl_uuid=" + this.id + "&resetInfo=true&templateIdentifier=created_task_" + this.id;
|
|
656
661
|
}
|
|
657
662
|
|
|
658
663
|
// formbuilder_url()
|
|
@@ -662,28 +667,28 @@ export class App extends Base
|
|
|
662
667
|
// lang = "de"
|
|
663
668
|
// let tpl_id = "???"
|
|
664
669
|
// let cl_id = "???"
|
|
665
|
-
// return "/formbuilder/index.html?lang=" + lang + "&searchDescription=" + tpl_id + "&p_tpl_uuid=" + this.id + "&p_cl_id=" + cl_id;
|
|
670
|
+
// return "https://" + this.globals.hostname + "/formbuilder/index.html?lang=" + lang + "&searchDescription=" + tpl_id + "&p_tpl_uuid=" + this.id + "&p_cl_id=" + cl_id;
|
|
666
671
|
// }
|
|
667
672
|
|
|
668
673
|
// tasks_config_url()
|
|
669
674
|
// {
|
|
670
675
|
// let tpl_id = "???"
|
|
671
|
-
// return "/konfiguration/aufgaben.htm?com.livinglogic.cms.apps.search.model.SearchState.search_submit=true&searchDescription=" + tpl_id + "&dId=" + this.id;
|
|
676
|
+
// return "https://" + this.globals.hostname + "/konfiguration/aufgaben.htm?com.livinglogic.cms.apps.search.model.SearchState.search_submit=true&searchDescription=" + tpl_id + "&dId=" + this.id;
|
|
672
677
|
// }
|
|
673
678
|
|
|
674
679
|
datamanagement_config_url()
|
|
675
680
|
{
|
|
676
|
-
return "/datenmanagement-konfigurieren/" + this.id + ".htm";
|
|
681
|
+
return "https://" + this.globals.hostname + "/datenmanagement-konfigurieren/" + this.id + ".htm";
|
|
677
682
|
}
|
|
678
683
|
|
|
679
684
|
permissions_url()
|
|
680
685
|
{
|
|
681
|
-
return "/_id_833_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true";
|
|
686
|
+
return "https://" + this.globals.hostname + "/_id_833_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true";
|
|
682
687
|
}
|
|
683
688
|
|
|
684
689
|
datamanageview_url(identifier)
|
|
685
690
|
{
|
|
686
|
-
return "/_id_36_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true&templateIdentifier=created_" + this.id + "_datamanage_master_" + identifier;
|
|
691
|
+
return "https://" + this.globals.hostname + "/_id_36_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true&templateIdentifier=created_" + this.id + "_datamanage_master_" + identifier;
|
|
687
692
|
}
|
|
688
693
|
|
|
689
694
|
get layout_controls()
|
|
@@ -1073,19 +1078,19 @@ export class Record extends Base
|
|
|
1073
1078
|
|
|
1074
1079
|
template_url(identifier, params)
|
|
1075
1080
|
{
|
|
1076
|
-
let url = "/gateway/apps/" + this.app.id + "/" + this.id;
|
|
1081
|
+
let url = "https://" + this.app.globals.hostname + "/gateway/apps/" + this.app.id + "/" + this.id;
|
|
1077
1082
|
return url_with_params(url, ['template', identifier], params);
|
|
1078
1083
|
}
|
|
1079
1084
|
|
|
1080
1085
|
edit_embedded_url(params)
|
|
1081
1086
|
{
|
|
1082
|
-
let url = "/dateneingabe/" + this.app.id + "/" + this.id + "/edit";
|
|
1087
|
+
let url = "https://" + this.app.globals.hostname + "/dateneingabe/" + this.app.id + "/" + this.id + "/edit";
|
|
1083
1088
|
return url_with_params(url, params);
|
|
1084
1089
|
}
|
|
1085
1090
|
|
|
1086
1091
|
edit_standalone_url(params)
|
|
1087
1092
|
{
|
|
1088
|
-
let url = "/gateway/apps/" + this.app.id + "/" + this.id + "/edit";
|
|
1093
|
+
let url = "https://" + this.app.globals.hostname + "/gateway/apps/" + this.app.id + "/" + this.id + "/edit";
|
|
1089
1094
|
return url_with_params(url, params);
|
|
1090
1095
|
}
|
|
1091
1096
|
|
|
@@ -5293,8 +5298,8 @@ export class User extends Base
|
|
|
5293
5298
|
}
|
|
5294
5299
|
};
|
|
5295
5300
|
|
|
5296
|
-
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"];
|
|
5297
|
-
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"]);
|
|
5301
|
+
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", "globals"];
|
|
5302
|
+
User.prototype._ul4attrs = new Set(["id", "globals", "_id", "gender", "title", "firstname", "surname", "initials", "email", "streetname", "streetnumber", "zip", "city", "phone", "fax", "lang", "image", "summary", "interests", "personalwebsite", "companywebsite", "company", "position", "department", "keyviews"]);
|
|
5298
5303
|
|
|
5299
5304
|
|
|
5300
5305
|
class FileType extends ul4.Type
|
|
@@ -5322,7 +5327,7 @@ export class File extends Base
|
|
|
5322
5327
|
|
|
5323
5328
|
get url()
|
|
5324
5329
|
{
|
|
5325
|
-
return "/files/" + this.contextid + "/" + this.id;
|
|
5330
|
+
return "https://" + this.globals.hostname + "/files/" + this.contextid + "/" + this.id;
|
|
5326
5331
|
}
|
|
5327
5332
|
|
|
5328
5333
|
get archive_url()
|