@livinglogic/livingapi 1.4.1 → 1.6.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 +11 -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 +1 -1
- package/src/livingapi.js +28 -12
package/package.json
CHANGED
package/src/livingapi.js
CHANGED
|
@@ -98,17 +98,6 @@ export function url_with_params(url, ...params)
|
|
|
98
98
|
return url;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
/*
|
|
102
|
-
let urlparams = new URLSearchParams({"template": identifier});
|
|
103
|
-
for (let [name, value] of params)
|
|
104
|
-
{
|
|
105
|
-
if (Object.prototype.toString.call(v) === "[object Array]")
|
|
106
|
-
{
|
|
107
|
-
for (let [n, v])
|
|
108
|
-
}
|
|
109
|
-
urlparams.append()
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
101
|
export class Base extends ul4.Proto
|
|
113
102
|
{
|
|
114
103
|
constructor(id)
|
|
@@ -343,6 +332,11 @@ export class Globals extends Base
|
|
|
343
332
|
return result;
|
|
344
333
|
}
|
|
345
334
|
|
|
335
|
+
qrcode_url(data, size)
|
|
336
|
+
{
|
|
337
|
+
return "https://" + this.hostname + "/qr/generate?data=" + encodeURIComponent(data) + "&size=" + encodeURIComponent(size);
|
|
338
|
+
}
|
|
339
|
+
|
|
346
340
|
[ul4.symbols.repr]()
|
|
347
341
|
{
|
|
348
342
|
return "<Globals version=" + ul4._repr(this.version) + " mode=" + ul4._repr(this.mode) + ">";
|
|
@@ -534,7 +528,7 @@ export class Globals extends Base
|
|
|
534
528
|
};
|
|
535
529
|
|
|
536
530
|
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"]);
|
|
531
|
+
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
532
|
ul4.expose(Globals.prototype.log_debug, ["message", "*"]);
|
|
539
533
|
ul4.expose(Globals.prototype.log_info, ["message", "*"]);
|
|
540
534
|
ul4.expose(Globals.prototype.log_warning, ["message", "*"]);
|
|
@@ -1089,6 +1083,28 @@ export class Record extends Base
|
|
|
1089
1083
|
return url_with_params(url, params);
|
|
1090
1084
|
}
|
|
1091
1085
|
|
|
1086
|
+
edit_url(params)
|
|
1087
|
+
{
|
|
1088
|
+
return this.app[ul4.symbols.getattr]("pv_la_default_form_variant") === "standalone" ? this.edit_standalone_url(params) : this.edit_embedded_url(params);
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
display_embedded_url(params)
|
|
1092
|
+
{
|
|
1093
|
+
let url = "https://" + this.app.globals.hostname + "/dateneingabe/" + this.app.id + "/" + this.id + "/display";
|
|
1094
|
+
return url_with_params(url, params);
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
display_standalone_url(params)
|
|
1098
|
+
{
|
|
1099
|
+
let url = "https://" + this.app.globals.hostname + "/gateway/apps/" + this.app.id + "/" + this.id + "/display";
|
|
1100
|
+
return url_with_params(url, params);
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
display_url(params)
|
|
1104
|
+
{
|
|
1105
|
+
return this.app[ul4.symbols.getattr]("pv_la_default_form_variant") === "standalone" ? this.display_standalone_url(params) : this.display_embedded_url(params);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1092
1108
|
search(search)
|
|
1093
1109
|
{
|
|
1094
1110
|
for (let identifier in search)
|