@livinglogic/livingapi 1.5.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livinglogic/livingapi",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
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)
@@ -1094,6 +1083,28 @@ export class Record extends Base
1094
1083
  return url_with_params(url, params);
1095
1084
  }
1096
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
+
1097
1108
  search(search)
1098
1109
  {
1099
1110
  for (let identifier in search)