@livinglogic/livingapi 1.3.2 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livinglogic/livingapi",
3
- "version": "1.3.2",
3
+ "version": "1.4.1",
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-2023 by LivingLogic AG, Bayreuth/Germany
6
- * Copyright 2017-2023 by Walter Dörwald
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 = "https://" + this.hostname + image.archive_url;
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";
@@ -499,37 +499,37 @@ export class Globals extends Base
499
499
 
500
500
  my_apps_url()
501
501
  {
502
- return "/apps.htm";
502
+ return "https://" + this.hostname + "/apps.htm";
503
503
  }
504
504
 
505
505
  my_tasks_url()
506
506
  {
507
- return "/xist4c/web/aufgaben_id_393_.htm";
507
+ return "https://" + this.hostname + "/xist4c/web/aufgaben_id_393_.htm";
508
508
  }
509
509
 
510
510
  catalog_url()
511
511
  {
512
- return "/katalog/home.htm";
512
+ return "https://" + this.hostname + "/katalog/home.htm";
513
513
  }
514
514
 
515
515
  chats_url()
516
516
  {
517
- return "/chats.htm";
517
+ return "https://" + this.hostname + "/chats.htm";
518
518
  }
519
519
 
520
520
  profile_url()
521
521
  {
522
- return "/profil/index.htm";
522
+ return "https://" + this.hostname + "/profil/index.htm";
523
523
  }
524
524
 
525
525
  account_url()
526
526
  {
527
- return "/account.htm";
527
+ return "https://" + this.hostname + "/account.htm";
528
528
  }
529
529
 
530
530
  logout_url()
531
531
  {
532
- return "/login.htm?logout=standardCug";
532
+ return "https://" + this.hostname + "/login.htm?logout=standardCug";
533
533
  }
534
534
  };
535
535
 
@@ -617,7 +617,7 @@ export class App extends Base
617
617
 
618
618
  template_url(identifier, record=null, params)
619
619
  {
620
- let url = "/gateway/apps/" + this.id;
620
+ let url = "https://" + this.globals.hostname + "/gateway/apps/" + this.id;
621
621
  if (record !== null)
622
622
  url += "/" + record.id;
623
623
  return url_with_params(url, ['template', identifier], params);
@@ -625,34 +625,34 @@ export class App extends Base
625
625
 
626
626
  new_embedded_url(params)
627
627
  {
628
- let url = "/dateneingabe/" + this.id + "/new";
628
+ let url = "https://" + this.globals.hostname + "/dateneingabe/" + this.id + "/new";
629
629
  return url_with_params(url, params);
630
630
  }
631
631
 
632
632
  new_standalone_url(params)
633
633
  {
634
- let url = "/gateway/apps/" + this.id + "/new";
634
+ let url = "https://" + this.globals.hostname + "/gateway/apps/" + this.id + "/new";
635
635
  return url_with_params(url, params);
636
636
  }
637
637
 
638
638
  home_url()
639
639
  {
640
- return "/apps/" + this.id + ".htm";
640
+ return "https://" + this.globals.hostname + "/apps/" + this.id + ".htm";
641
641
  }
642
642
 
643
643
  datamanagement_url()
644
644
  {
645
- return "/_id_36_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true&templateIdentifier=created_" + this.id;
645
+ return "https://" + this.globals.hostname + "/_id_36_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true&templateIdentifier=created_" + this.id;
646
646
  }
647
647
 
648
648
  import_url()
649
649
  {
650
- return "/import-export/"+ this.id + ".htm";
650
+ return "https://" + this.globals.hostname + "/import-export/"+ this.id + ".htm";
651
651
  }
652
652
 
653
653
  tasks_url()
654
654
  {
655
- return "/_id_1073_.htm?uuid=" + this.id + "&dId=" + this.id + "&p_tpl_uuid=" + this.id + "&resetInfo=true&templateIdentifier=created_task_" + this.id;
655
+ 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
656
  }
657
657
 
658
658
  // formbuilder_url()
@@ -662,28 +662,28 @@ export class App extends Base
662
662
  // lang = "de"
663
663
  // let tpl_id = "???"
664
664
  // let cl_id = "???"
665
- // return "/formbuilder/index.html?lang=" + lang + "&searchDescription=" + tpl_id + "&p_tpl_uuid=" + this.id + "&p_cl_id=" + cl_id;
665
+ // return "https://" + this.globals.hostname + "/formbuilder/index.html?lang=" + lang + "&searchDescription=" + tpl_id + "&p_tpl_uuid=" + this.id + "&p_cl_id=" + cl_id;
666
666
  // }
667
667
 
668
668
  // tasks_config_url()
669
669
  // {
670
670
  // let tpl_id = "???"
671
- // return "/konfiguration/aufgaben.htm?com.livinglogic.cms.apps.search.model.SearchState.search_submit=true&searchDescription=" + tpl_id + "&dId=" + this.id;
671
+ // 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
672
  // }
673
673
 
674
674
  datamanagement_config_url()
675
675
  {
676
- return "/datenmanagement-konfigurieren/" + this.id + ".htm";
676
+ return "https://" + this.globals.hostname + "/datenmanagement-konfigurieren/" + this.id + ".htm";
677
677
  }
678
678
 
679
679
  permissions_url()
680
680
  {
681
- return "/_id_833_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true";
681
+ return "https://" + this.globals.hostname + "/_id_833_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true";
682
682
  }
683
683
 
684
684
  datamanageview_url(identifier)
685
685
  {
686
- return "/_id_36_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true&templateIdentifier=created_" + this.id + "_datamanage_master_" + identifier;
686
+ return "https://" + this.globals.hostname + "/_id_36_.htm?uuid=" + this.id + "&dId=" + this.id + "&resetInfo=true&templateIdentifier=created_" + this.id + "_datamanage_master_" + identifier;
687
687
  }
688
688
 
689
689
  get layout_controls()
@@ -1073,19 +1073,19 @@ export class Record extends Base
1073
1073
 
1074
1074
  template_url(identifier, params)
1075
1075
  {
1076
- let url = "/gateway/apps/" + this.app.id + "/" + this.id;
1076
+ let url = "https://" + this.app.globals.hostname + "/gateway/apps/" + this.app.id + "/" + this.id;
1077
1077
  return url_with_params(url, ['template', identifier], params);
1078
1078
  }
1079
1079
 
1080
1080
  edit_embedded_url(params)
1081
1081
  {
1082
- let url = "/dateneingabe/" + this.app.id + "/" + this.id + "/edit";
1082
+ let url = "https://" + this.app.globals.hostname + "/dateneingabe/" + this.app.id + "/" + this.id + "/edit";
1083
1083
  return url_with_params(url, params);
1084
1084
  }
1085
1085
 
1086
1086
  edit_standalone_url(params)
1087
1087
  {
1088
- let url = "/gateway/apps/" + this.app.id + "/" + this.id + "/edit";
1088
+ let url = "https://" + this.app.globals.hostname + "/gateway/apps/" + this.app.id + "/" + this.id + "/edit";
1089
1089
  return url_with_params(url, params);
1090
1090
  }
1091
1091
 
@@ -2096,6 +2096,7 @@ export class GeoField extends Field
2096
2096
  {
2097
2097
  value = JSON.parse(value);
2098
2098
  return new Geo(
2099
+ this.globals,
2099
2100
  value.geometry.coordinates[0],
2100
2101
  value.geometry.coordinates[1],
2101
2102
  value.properties.formatted_address
@@ -5292,8 +5293,8 @@ export class User extends Base
5292
5293
  }
5293
5294
  };
5294
5295
 
5295
- 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"];
5296
- 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"]);
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", "globals"];
5297
+ 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"]);
5297
5298
 
5298
5299
 
5299
5300
  class FileType extends ul4.Type
@@ -5321,7 +5322,7 @@ export class File extends Base
5321
5322
 
5322
5323
  get url()
5323
5324
  {
5324
- return "/files/" + this.contextid + "/" + this.id;
5325
+ return "https://" + this.globals.hostname + "/files/" + this.contextid + "/" + this.id;
5325
5326
  }
5326
5327
 
5327
5328
  get archive_url()