@livinglogic/livingapi 1.15.0 → 1.17.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.15.0",
3
+ "version": "1.17.0",
4
4
  "description": "Javascript version of the LivingAPI classes of LivingApps",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "module": "dist/esm-node/livingapi.js",
19
19
  "browser": "dist/umd/livingapi.js",
20
20
  "dependencies": {
21
- "@livinglogic/ul4": "~1.16.1"
21
+ "@livinglogic/ul4": "~1.18.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@babel/core": "^7.14.6",
package/src/livingapi.js CHANGED
@@ -783,10 +783,9 @@ export class App extends Base
783
783
  };
784
784
 
785
785
 
786
- App.prototype._ul4onattrs = ["globals", "name", "description", "lang", "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",
786
+ 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",
787
787
  "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", "menus", "panels"];
788
- App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "lang", "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",
789
- "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"]);
788
+ App.prototype._ul4attrs = new Set(["id", "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", "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
789
  ul4.expose(App.prototype[ul4.symbols.call], ["values", "**"], {"needsobject": true});
791
790
  ul4.expose(App.prototype.insert, ["values", "**"], {"needsobject": true});
792
791
  ul4.expose(App.prototype.template_url, ["identifier", "p", "record", "p=", null, "params", "**"]);
@@ -794,6 +793,33 @@ ul4.expose(App.prototype.new_embedded_url, ["params", "**"]);
794
793
  ul4.expose(App.prototype.new_standalone_url, ["params", "**"]);
795
794
 
796
795
 
796
+ class AppGroupType extends ul4.Type
797
+ {
798
+ instancecheck(obj)
799
+ {
800
+ return obj instanceof AppGroup;
801
+ }
802
+ };
803
+
804
+ let appgrouptype = new AppType("la", "AppGroup", "A group of LivingApps");
805
+
806
+
807
+ export class AppGroup extends Base
808
+ {
809
+ [ul4.symbols.type]()
810
+ {
811
+ return appgrouptype;
812
+ }
813
+
814
+ [ul4.symbols.repr]()
815
+ {
816
+ return "<AppGroup id=" + ul4._repr(this.id) + " name=" + ul4._repr(this.name) + ">";
817
+ }
818
+ };
819
+ AppGroup.prototype._ul4onattrs = ["globals", "name", "apps"];
820
+ AppGroup.prototype._ul4attrs = new Set(["globals", "id", "name", "apps"]);
821
+
822
+
797
823
  class ViewType extends ul4.Type
798
824
  {
799
825
  instancecheck(obj)
@@ -1275,6 +1301,7 @@ export class Field extends Base
1275
1301
  this.control = control;
1276
1302
  this.record = record;
1277
1303
  this._label = null;
1304
+ this._description = null;
1278
1305
  this._lookupdata = null;
1279
1306
  this.errors = [];
1280
1307
  this._value = null;
@@ -1285,6 +1312,7 @@ export class Field extends Base
1285
1312
  this._writable = true;
1286
1313
  this._visible = true;
1287
1314
  this._required = null;
1315
+ this._in_text = null;
1288
1316
  this._top = null;
1289
1317
  this._left = null;
1290
1318
  }
@@ -1357,6 +1385,16 @@ export class Field extends Base
1357
1385
  this._set_dom_label();
1358
1386
  }
1359
1387
 
1388
+ get description()
1389
+ {
1390
+ return this._description ?? this.control.description;
1391
+ }
1392
+
1393
+ set description(value)
1394
+ {
1395
+ this._description = value;
1396
+ }
1397
+
1360
1398
  get globals()
1361
1399
  {
1362
1400
  return this.control.globals;
@@ -1582,6 +1620,26 @@ export class Field extends Base
1582
1620
  this._required = value;
1583
1621
  }
1584
1622
 
1623
+ get in_list()
1624
+ {
1625
+ return this.control.in_list;
1626
+ }
1627
+
1628
+ get in_mobile_list()
1629
+ {
1630
+ return this.control.in_mobile_list;
1631
+ }
1632
+
1633
+ get in_text()
1634
+ {
1635
+ return this._in_text ?? this.control.in_text;
1636
+ }
1637
+
1638
+ set in_text(value)
1639
+ {
1640
+ this._in_text = value;
1641
+ }
1642
+
1585
1643
  get enabled()
1586
1644
  {
1587
1645
  if (this._in_form())
@@ -1654,7 +1712,7 @@ export class Field extends Base
1654
1712
  };
1655
1713
 
1656
1714
  Field.prototype._ul4onattrs = ["control", "record", "label", "value", "errors", "_visible", "_enabled", "_writable", "_required"];
1657
- Field.prototype._ul4attrs = new Set(["control", "record", "label", "value", "mode", "errors", "visible", "enabled", "writable", "required", "top", "left", "width", "height"]);
1715
+ Field.prototype._ul4attrs = new Set(["control", "record", "label", "description", "value", "mode", "errors", "visible", "enabled", "writable", "required", "in_text", "top", "left", "width", "height"]);
1658
1716
  Field.prototype._inputevent = "input";
1659
1717
 
1660
1718
 
@@ -3775,6 +3833,56 @@ export class Control extends Base
3775
3833
  this._label = value;
3776
3834
  }
3777
3835
 
3836
+ get description()
3837
+ {
3838
+ return this._description;
3839
+ }
3840
+
3841
+ set description(value)
3842
+ {
3843
+ this._description = value;
3844
+ }
3845
+
3846
+ get priority()
3847
+ {
3848
+ return this._priority;
3849
+ }
3850
+
3851
+ set priority(value)
3852
+ {
3853
+ this._priority = value;
3854
+ }
3855
+
3856
+ get in_list()
3857
+ {
3858
+ return this._priority;
3859
+ }
3860
+
3861
+ set in_list(value)
3862
+ {
3863
+ this._priority = value;
3864
+ }
3865
+
3866
+ get in_mobile_list()
3867
+ {
3868
+ return this._in_mobile_list;
3869
+ }
3870
+
3871
+ set in_mobile_list(value)
3872
+ {
3873
+ this._in_mobile_list = value;
3874
+ }
3875
+
3876
+ get in_text()
3877
+ {
3878
+ return this._in_text;
3879
+ }
3880
+
3881
+ set in_text(value)
3882
+ {
3883
+ this._in_text = value;
3884
+ }
3885
+
3778
3886
  get default()
3779
3887
  {
3780
3888
  return null;
@@ -3825,7 +3933,12 @@ export class Control extends Base
3825
3933
  get required()
3826
3934
  {
3827
3935
  let view_control = this._view_control();
3828
- return view_control !== null ? view_control.required : false;
3936
+ return view_control !== null ? view_control.required : this._required;
3937
+ }
3938
+
3939
+ set required(value)
3940
+ {
3941
+ this._required = value;
3829
3942
  }
3830
3943
 
3831
3944
  get mode()
@@ -3887,8 +4000,8 @@ export class Control extends Base
3887
4000
 
3888
4001
  Control.prototype.type = null;
3889
4002
  Control.prototype.subtype = null;
3890
- Control.prototype._ul4onattrs = ["identifier", "fieldname", "app", "_label", "priority", "order", "ininsertprocedure", "inupdateprocedure"];
3891
- Control.prototype._ul4attrs = new Set(["id", "identifier", "fieldname", "app", "priority", "order", "ininsertprocedure", "inupdateprocedure", "fulltype", "label", "top", "left", "width", "height", "z_index", "liveupdate", "tabindex", "required", "mode", "labelpos", "autoalign", "in_active_view"]);
4003
+ Control.prototype._ul4onattrs = ["identifier", "fieldname", "app", "_label", "_description", "_priority", "_in_mobile_list", "_in_text", "_required", "order", "ininsertprocedure", "inupdateprocedure"];
4004
+ Control.prototype._ul4attrs = new Set(["id", "identifier", "fieldname", "app", "priority", "in_list", "in_mobile_list", "in_text", "order", "ininsertprocedure", "inupdateprocedure", "fulltype", "label", "description", "top", "left", "width", "height", "z_index", "liveupdate", "tabindex", "required", "mode", "labelpos", "autoalign", "in_active_view"]);
3892
4005
  Control.prototype._cssclass_root = "llft-control";
3893
4006
  Control.prototype._cssclass_control = "input";
3894
4007
 
@@ -6143,6 +6256,7 @@ let classes = [
6143
6256
  Globals,
6144
6257
  FlashMessage,
6145
6258
  App,
6259
+ AppGroup,
6146
6260
  View,
6147
6261
  MenuItem,
6148
6262
  Panel,
@@ -6241,6 +6355,7 @@ export const module = new ul4.Module(
6241
6355
  KeyView: KeyView,
6242
6356
  Globals: Globals,
6243
6357
  App: App,
6358
+ AppGroup: AppGroup,
6244
6359
  TextControl: TextControl,
6245
6360
  URLControl: URLControl,
6246
6361
  EmailControl: EmailControl,