@livinglogic/livingapi 1.18.2 → 1.20.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 +20 -0
- package/README.md +2 -2
- package/dist/esm-node/livingapi.js +1 -1
- package/dist/esm-node/livingapi.js.map +1 -1
- package/dist/esm-npm/livingapi.js +1 -1
- package/dist/esm-npm/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 +42 -31
package/package.json
CHANGED
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_")
|
|
737
|
+
else if (name.startsWith("p_"))
|
|
732
738
|
{
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
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_")
|
|
746
|
+
else if (name.startsWith("pv_"))
|
|
738
747
|
{
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
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", "
|
|
788
|
-
"startlink", "image", "createdby", "controls", "records", "
|
|
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", "
|
|
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",
|
|
800
|
+
"startlink", "image", "createdby", "controls", "records", "record_start", "record_count", "record_total", "installation", "categories", "params", "views", "datamanagement_identifier", "basetable", "primarykey", "insertprocedure", "updateprocedure", "deleteprocedure", "templates", "createdat", "updatedat", "updatedby", "superid", "favorite", "_active_view", "datasource", "main", "viewtemplates"];
|
|
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", "record_start", "record_count", "record_total", "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
|
|
@@ -934,8 +946,8 @@ export class RecordChildren extends Base
|
|
|
934
946
|
}
|
|
935
947
|
};
|
|
936
948
|
|
|
937
|
-
RecordChildren.prototype._ul4onattrs = ["record", "datasourcechildren", "records"];
|
|
938
|
-
RecordChildren.prototype._ul4attrs = new Set(["id", "record", "datasourcechildren", "records"]);
|
|
949
|
+
RecordChildren.prototype._ul4onattrs = ["record", "datasourcechildren", "records", "record_start", "record_count", "record_total"];
|
|
950
|
+
RecordChildren.prototype._ul4attrs = new Set(["id", "record", "datasourcechildren", "records", "record_start", "record_count", "record_total"]);
|
|
939
951
|
|
|
940
952
|
|
|
941
953
|
class RecordType extends ul4.Type
|
|
@@ -3798,6 +3810,12 @@ let controltype = new ControlType("la", "Control", "Metainformation about a fiel
|
|
|
3798
3810
|
|
|
3799
3811
|
export class Control extends Base
|
|
3800
3812
|
{
|
|
3813
|
+
constructor(id)
|
|
3814
|
+
{
|
|
3815
|
+
super(id);
|
|
3816
|
+
this._mode = null;
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3801
3819
|
[ul4.symbols.type]()
|
|
3802
3820
|
{
|
|
3803
3821
|
return controltype;
|
|
@@ -3954,6 +3972,8 @@ export class Control extends Base
|
|
|
3954
3972
|
|
|
3955
3973
|
get mode()
|
|
3956
3974
|
{
|
|
3975
|
+
if (this._mode !== null)
|
|
3976
|
+
return this._mode;
|
|
3957
3977
|
let view_control = this._view_control();
|
|
3958
3978
|
if (this.app._active_view !== null && view_control === null)
|
|
3959
3979
|
return null;
|
|
@@ -3962,6 +3982,11 @@ export class Control extends Base
|
|
|
3962
3982
|
return view_control !== null ? view_control.mode : "edit";
|
|
3963
3983
|
}
|
|
3964
3984
|
|
|
3985
|
+
set mode(value)
|
|
3986
|
+
{
|
|
3987
|
+
this._mode = value;
|
|
3988
|
+
}
|
|
3989
|
+
|
|
3965
3990
|
get labelpos()
|
|
3966
3991
|
{
|
|
3967
3992
|
let view_control = this._view_control();
|
|
@@ -5998,17 +6023,10 @@ export class AppParameter extends Base
|
|
|
5998
6023
|
{
|
|
5999
6024
|
return "<AppParameter id=" + ul4._repr(this.id) + " identifier=" + ul4._repr(this.identifier) + ">";
|
|
6000
6025
|
}
|
|
6001
|
-
|
|
6002
|
-
get app()
|
|
6003
|
-
{
|
|
6004
|
-
if (this.owner instanceof App)
|
|
6005
|
-
return this.owner;
|
|
6006
|
-
return null;
|
|
6007
|
-
}
|
|
6008
6026
|
};
|
|
6009
6027
|
|
|
6010
|
-
AppParameter.prototype._ul4onattrs = ["
|
|
6011
|
-
AppParameter.prototype._ul4attrs = new Set(["id", "
|
|
6028
|
+
AppParameter.prototype._ul4onattrs = ["app", "appgroup", "parent", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"];
|
|
6029
|
+
AppParameter.prototype._ul4attrs = new Set(["id", "app", "appgroup", "parent", "app", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"]);
|
|
6012
6030
|
|
|
6013
6031
|
|
|
6014
6032
|
class MutableAppParameterType extends AppParameterType
|
|
@@ -6033,13 +6051,6 @@ export class MutableAppParameter extends AppParameter
|
|
|
6033
6051
|
{
|
|
6034
6052
|
return "<MutableAppParameter id=" + ul4._repr(this.id) + " identifier=" + ul4._repr(this.identifier) + ">";
|
|
6035
6053
|
}
|
|
6036
|
-
|
|
6037
|
-
get app()
|
|
6038
|
-
{
|
|
6039
|
-
if (this.owner instanceof App)
|
|
6040
|
-
return this.owner;
|
|
6041
|
-
return null;
|
|
6042
|
-
}
|
|
6043
6054
|
};
|
|
6044
6055
|
|
|
6045
6056
|
class MenuItemType extends ul4.Type
|