@livinglogic/livingapi 1.18.2 → 1.19.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.18.2",
3
+ "version": "1.19.0",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
package/src/livingapi.js CHANGED
@@ -603,6 +603,12 @@ export class App extends Base
603
603
  return "<App id=" + ul4._repr(this.id) + " name=" + ul4._repr(this.name) + ">";
604
604
  }
605
605
 
606
+ /* For backwards compatibility */
607
+ get group()
608
+ {
609
+ return this.appgroup;
610
+ }
611
+
606
612
  insert(values={})
607
613
  {
608
614
  let record = this[ul4.symbols.call](values);
@@ -728,17 +734,23 @@ export class App extends Base
728
734
  throw new ul4.AttributeError(this, name);
729
735
  return this.layout_controls.get(name.substr(3));
730
736
  }
731
- else if (name.startsWith("p_") && this.params !== null)
737
+ else if (name.startsWith("p_"))
732
738
  {
733
- if (!this.params.has(name.substr(2)))
734
- throw new ul4.AttributeError(this, name);
735
- return this.params.get(name.substr(2));
739
+ let identifier = name.substr(2);
740
+ if (this.params !== null && this.params.has(identifier))
741
+ return this.params.get(identifier);
742
+ else if (this.appgroup !== null && this.appgroup.params !== null && this.appgroup.params.has(identifier))
743
+ return this.appgroup.params.get(identifier);
744
+ throw new ul4.AttributeError(this, name);
736
745
  }
737
- else if (name.startsWith("pv_") && this.params !== null)
746
+ else if (name.startsWith("pv_"))
738
747
  {
739
- if (!this.params.has(name.substr(3)))
740
- throw new ul4.AttributeError(this, name);
741
- return this.params.get(name.substr(3)).value;
748
+ let identifier = name.substr(3);
749
+ if (this.params !== null && this.params.has(identifier))
750
+ return this.params.get(identifier).value;
751
+ else if (this.appgroup !== null && this.appgroup.params !== null && this.appgroup.params.has(identifier))
752
+ return this.appgroup.params.get(identifier).value;
753
+ throw new ul4.AttributeError(this, name);
742
754
  }
743
755
  else
744
756
  return super[ul4.symbols.getattr](name);
@@ -784,9 +796,9 @@ export class App extends Base
784
796
  };
785
797
 
786
798
 
787
- App.prototype._ul4onattrs = ["globals", "name", "description", "lang", "group", "gramgen", "typename_nom_sin", "typename_gen_sin", "typename_dat_sin", "typename_acc_sin", "typename_nom_plu", "typename_gen_plu", "typename_dat_plu", "typename_acc_plu",
799
+ App.prototype._ul4onattrs = ["globals", "name", "description", "lang", "appgroup", "gramgen", "typename_nom_sin", "typename_gen_sin", "typename_dat_sin", "typename_acc_sin", "typename_nom_plu", "typename_gen_plu", "typename_dat_plu", "typename_acc_plu",
788
800
  "startlink", "image", "createdby", "controls", "records", "recordcount", "installation", "categories", "params", "views", "datamanagement_identifier", "basetable", "primarykey", "insertprocedure", "updateprocedure", "deleteprocedure", "templates", "createdat", "updatedat", "updatedby", "superid", "favorite", "_active_view", "datasource", "main", "viewtemplates"];
789
- App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "lang", "group", "main", "gramgen", "typename_nom_sin", "typename_gen_sin", "typename_dat_sin", "typename_acc_sin", "typename_nom_plu", "typename_gen_plu", "typename_dat_plu", "typename_acc_plu", "startlink", "image", "createdat", "createdby", "updatedat", "updatedby", "controls", "layout_controls", "records", "recordcount", "installation", "categories", "params", "views", "menus", "panels", "datasource", "datamanagement_identifier", "insert", "favorite", "_active_view", "template_url", "new_embedded_url", "new_standalone_url", "home_url", "datamanagement_url", "import_url", "tasks_url", /*"formbuilder_url", "tasks_config_url",*/ "datamanagement_config_url", "permissions_url", "datamanageview_url"]);
801
+ App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "lang", "appgroup", "group", "main", "gramgen", "typename_nom_sin", "typename_gen_sin", "typename_dat_sin", "typename_acc_sin", "typename_nom_plu", "typename_gen_plu", "typename_dat_plu", "typename_acc_plu", "startlink", "image", "createdat", "createdby", "updatedat", "updatedby", "controls", "layout_controls", "records", "recordcount", "installation", "categories", "params", "views", "menus", "panels", "datasource", "datamanagement_identifier", "insert", "favorite", "_active_view", "template_url", "new_embedded_url", "new_standalone_url", "home_url", "datamanagement_url", "import_url", "tasks_url", /*"formbuilder_url", "tasks_config_url",*/ "datamanagement_config_url", "permissions_url", "datamanageview_url"]);
790
802
  ul4.expose(App.prototype[ul4.symbols.call], ["values", "**"], {"needsobject": true});
791
803
  ul4.expose(App.prototype.insert, ["values", "**"], {"needsobject": true});
792
804
  ul4.expose(App.prototype.template_url, ["identifier", "p", "record", "p=", null, "params", "**"]);
@@ -817,8 +829,8 @@ export class AppGroup extends Base
817
829
  return "<AppGroup id=" + ul4._repr(this.id) + " name=" + ul4._repr(this.name) + ">";
818
830
  }
819
831
  };
820
- AppGroup.prototype._ul4onattrs = ["globals", "name", "apps", "main_app"];
821
- AppGroup.prototype._ul4attrs = new Set(["globals", "id", "name", "apps", "main_app"]);
832
+ AppGroup.prototype._ul4onattrs = ["globals", "name", "apps", "main_app", "params"];
833
+ AppGroup.prototype._ul4attrs = new Set(["globals", "id", "name", "apps", "main_app", "params"]);
822
834
 
823
835
 
824
836
  class ViewType extends ul4.Type
@@ -5998,17 +6010,10 @@ export class AppParameter extends Base
5998
6010
  {
5999
6011
  return "<AppParameter id=" + ul4._repr(this.id) + " identifier=" + ul4._repr(this.identifier) + ">";
6000
6012
  }
6001
-
6002
- get app()
6003
- {
6004
- if (this.owner instanceof App)
6005
- return this.owner;
6006
- return null;
6007
- }
6008
6013
  };
6009
6014
 
6010
- AppParameter.prototype._ul4onattrs = ["owner", "parent", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"];
6011
- AppParameter.prototype._ul4attrs = new Set(["id", "owner", "parent", "app", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"]);
6015
+ AppParameter.prototype._ul4onattrs = ["app", "appgroup", "parent", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"];
6016
+ AppParameter.prototype._ul4attrs = new Set(["id", "app", "appgroup", "parent", "app", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"]);
6012
6017
 
6013
6018
 
6014
6019
  class MutableAppParameterType extends AppParameterType
@@ -6033,13 +6038,6 @@ export class MutableAppParameter extends AppParameter
6033
6038
  {
6034
6039
  return "<MutableAppParameter id=" + ul4._repr(this.id) + " identifier=" + ul4._repr(this.identifier) + ">";
6035
6040
  }
6036
-
6037
- get app()
6038
- {
6039
- if (this.owner instanceof App)
6040
- return this.owner;
6041
- return null;
6042
- }
6043
6041
  };
6044
6042
 
6045
6043
  class MenuItemType extends ul4.Type