@livinglogic/livingapi 1.3.1 → 1.3.3

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.1",
3
+ "version": "1.3.3",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
package/src/livingapi.js CHANGED
@@ -355,7 +355,7 @@ export class Globals extends Base
355
355
 
356
356
  set_current_geo(position)
357
357
  {
358
- this._current_geo = new Geo(position.coords.latitude, position.coords.longitude);
358
+ this._current_geo = new Geo(this, position.coords.latitude, position.coords.longitude);
359
359
  }
360
360
 
361
361
  _in_form()
@@ -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
@@ -5321,7 +5322,7 @@ export class File extends Base
5321
5322
 
5322
5323
  get url()
5323
5324
  {
5324
- return "/gateway/files/" + this.contextid + "/" + this.id;
5325
+ return "/files/" + this.contextid + "/" + this.id;
5325
5326
  }
5326
5327
 
5327
5328
  get archive_url()
@@ -5332,8 +5333,8 @@ export class File extends Base
5332
5333
  }
5333
5334
  };
5334
5335
 
5335
- File.prototype._ul4onattrs = ["filename", "mimetype", "width", "height", "internal_id", "createdat", "size", "duration", "geo", "storagefilename", "archive", "context_id"];
5336
- File.prototype._ul4attrs = new Set(["id", "internal_id", "url", "archive_url", "filename", "mimetype", "width", "height", "size", "duration", "geo", "archive", "createdat", "context_id"]);
5336
+ File.prototype._ul4onattrs = ["globals", "filename", "mimetype", "width", "height", "internal_id", "createdat", "size", "duration", "geo", "storagefilename", "archive", "context_id"];
5337
+ File.prototype._ul4attrs = new Set(["globals", "id", "internal_id", "url", "archive_url", "filename", "mimetype", "width", "height", "size", "duration", "geo", "archive", "createdat", "context_id"]);
5337
5338
 
5338
5339
 
5339
5340
  class GeoType extends ul4.Type
@@ -5349,9 +5350,10 @@ let geotype = new GeoType("la", "Geo", "Geographical coordinates and location in
5349
5350
 
5350
5351
  export class Geo extends Base
5351
5352
  {
5352
- constructor(lat, long, info=null)
5353
+ constructor(globals, lat, long, info=null)
5353
5354
  {
5354
5355
  super(null);
5356
+ this.globals = globals;
5355
5357
  this.lat = lat;
5356
5358
  this.long = long;
5357
5359
  this.info = info;
@@ -5368,8 +5370,8 @@ export class Geo extends Base
5368
5370
  }
5369
5371
  };
5370
5372
 
5371
- Geo.prototype._ul4onattrs = ["lat", "long", "info"];
5372
- Geo.prototype._ul4attrs = new Set(["lat", "long", "info"]);
5373
+ Geo.prototype._ul4onattrs = ["globals", "lat", "long", "info"];
5374
+ Geo.prototype._ul4attrs = new Set(["globals", "lat", "long", "info"]);
5373
5375
 
5374
5376
 
5375
5377
  class AttachmentType extends ul4.Type