@livinglogic/livingapi 1.27.0 → 1.29.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 +18 -1
- package/README.md +2 -3
- 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 +160 -6
package/package.json
CHANGED
package/src/livingapi.js
CHANGED
|
@@ -581,6 +581,109 @@ FlashMessage.prototype._ul4onattrs = ["timestamp", "type", "title", "message"];
|
|
|
581
581
|
FlashMessage.prototype._ul4attrs = new Set(["timestamp", "type", "title", "message"]);
|
|
582
582
|
|
|
583
583
|
|
|
584
|
+
class PermissionType extends ul4.Type
|
|
585
|
+
{
|
|
586
|
+
instancecheck(obj)
|
|
587
|
+
{
|
|
588
|
+
return obj instanceof Permission;
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
let permissiontype = new PermissionType("la", "Permission", "Permission information");
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
export class Permission extends Base
|
|
596
|
+
{
|
|
597
|
+
[ul4.symbols.type]()
|
|
598
|
+
{
|
|
599
|
+
return permissiontype;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
[ul4.symbols.repr]()
|
|
603
|
+
{
|
|
604
|
+
return "<Permission id=" + ul4._repr(this.id) + " name=" + ul4._repr(this.name) + ">";
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
get edit()
|
|
608
|
+
{
|
|
609
|
+
return this.permissions.charAt(0) == '1';
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
get config()
|
|
613
|
+
{
|
|
614
|
+
return this.permissions.charAt(1) == '1';
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
get delete()
|
|
618
|
+
{
|
|
619
|
+
return this.permissions.charAt(2) == '1';
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
get task_manage()
|
|
623
|
+
{
|
|
624
|
+
return this.permissions.charAt(3) == '1';
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
get data_edit()
|
|
628
|
+
{
|
|
629
|
+
return this.permissions.charAt(4) == '1';
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
get data_view()
|
|
633
|
+
{
|
|
634
|
+
return this.permissions.charAt(5) == '1';
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
get task_view()
|
|
638
|
+
{
|
|
639
|
+
return this.permissions.charAt(6) == '1';
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
get frontend()
|
|
643
|
+
{
|
|
644
|
+
return this.permissions.charAt(7) == '1';
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
get data_connect_external()
|
|
648
|
+
{
|
|
649
|
+
return this.permissions.charAt(8) == '1';
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
get perform_evaluation()
|
|
653
|
+
{
|
|
654
|
+
return this.permissions.charAt(9) == '1';
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
get to_catalog()
|
|
658
|
+
{
|
|
659
|
+
return this.permissions.charAt(10) == '1';
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
get data_import_export()
|
|
663
|
+
{
|
|
664
|
+
return this.permissions.charAt(11) == '1';
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
get mydata_view()
|
|
668
|
+
{
|
|
669
|
+
return this.permissions.charAt(12) == '1';
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
get mydata_edit()
|
|
673
|
+
{
|
|
674
|
+
return this.permissions.charAt(13) == '1';
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
get user_admin()
|
|
678
|
+
{
|
|
679
|
+
return this.permissions.charAt(14) == '1';
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
Permission.prototype._ul4onattrs = ["permissions"];
|
|
684
|
+
Permission.prototype._ul4attrs = new Set(["permissions", "edit", "config", "delete", "task_manage", "data_edit", "data_view", "task_view", "frontend", "data_connect_external", "perform_evaluation", "to_catalog", "data_import_export", "mydata_view", "mydata_edit", "user_admin"]);
|
|
685
|
+
|
|
686
|
+
|
|
584
687
|
class AppType extends ul4.Type
|
|
585
688
|
{
|
|
586
689
|
instancecheck(obj)
|
|
@@ -794,12 +897,23 @@ export class App extends Base
|
|
|
794
897
|
return new Map();
|
|
795
898
|
return this.active_view.layout_controls;
|
|
796
899
|
}
|
|
900
|
+
|
|
901
|
+
get permissions()
|
|
902
|
+
{
|
|
903
|
+
if (typeof(this._permissions) === "string")
|
|
904
|
+
{
|
|
905
|
+
const p = this._permissions;
|
|
906
|
+
this._permissions = new Permission();
|
|
907
|
+
this._permissions.permissions = p;
|
|
908
|
+
}
|
|
909
|
+
return this._permissions;
|
|
910
|
+
}
|
|
797
911
|
};
|
|
798
912
|
|
|
799
913
|
|
|
800
914
|
App.prototype._ul4onattrs = ["globals", "internal_id", "name", "description", "lang", "appgroup", "typename_grammatical_gender", "typename_nominative_singular", "typename_genitive_singular", "typename_dative_singular", "typename_accusative_singular", "typename_nominative_plural", "typename_genitive_plural", "typename_dative_plural", "typename_accusative_plural",
|
|
801
|
-
"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", "ai_generated", "viewtemplates"];
|
|
802
|
-
App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "lang", "appgroup", "group", "main", "ai_generated", "typename_grammatical_gender", "typename_nominative_singular", "typename_genitive_singular", "typename_dative_singular", "typename_accusative_singular", "typename_nominative_plural", "typename_genitive_plural", "typename_dative_plural", "typename_accusative_plural", "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"]);
|
|
915
|
+
"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", "ai_generated", "viewtemplates", "filter_default", "sort_default", "filter_owndata", "_permissions", "data_actions"];
|
|
916
|
+
App.prototype._ul4attrs = new Set(["id", "globals", "name", "description", "lang", "appgroup", "group", "main", "ai_generated", "typename_grammatical_gender", "typename_nominative_singular", "typename_genitive_singular", "typename_dative_singular", "typename_accusative_singular", "typename_nominative_plural", "typename_genitive_plural", "typename_dative_plural", "typename_accusative_plural", "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", "filter_default", "sort_default", "filter_owndata", "permissions", "data_actions", "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"]);
|
|
803
917
|
ul4.expose(App.prototype[ul4.symbols.call], ["values", "**"], {"needsobject": true});
|
|
804
918
|
ul4.expose(App.prototype.insert, ["values", "**"], {"needsobject": true});
|
|
805
919
|
ul4.expose(App.prototype.template_url, ["identifier", "p", "record", "p=", null, "params", "**"]);
|
|
@@ -4090,8 +4204,8 @@ export class Control extends Base
|
|
|
4090
4204
|
|
|
4091
4205
|
Control.prototype.type = null;
|
|
4092
4206
|
Control.prototype.subtype = null;
|
|
4093
|
-
Control.prototype._ul4onattrs = ["identifier", "fieldname", "app", "_label", "_description", "_priority", "_in_mobile_list", "_in_text", "_in_structured_search", "_in_fulltext_search", "_in_expert_search", "_required", "_required_in_view", "order", "ininsertprocedure", "inupdateprocedure"];
|
|
4094
|
-
Control.prototype._ul4attrs = new Set(["id", "identifier", "fieldname", "app", "priority", "in_list", "in_mobile_list", "in_text", "in_structured_search", "in_fulltext_search", "in_expert_search", "order", "ininsertprocedure", "inupdateprocedure", "fulltype", "label", "description", "top", "left", "width", "height", "z_index", "liveupdate", "tabindex", "required", "mode", "labelpos", "autoalign", "in_active_view"]);
|
|
4207
|
+
Control.prototype._ul4onattrs = ["identifier", "fieldname", "app", "_label", "_description", "base_mode", "in_sum", "_priority", "_in_mobile_list", "_in_text", "_in_structured_search", "_in_fulltext_search", "_in_expert_search", "_required", "_required_in_view", "order", "ininsertprocedure", "inupdateprocedure"];
|
|
4208
|
+
Control.prototype._ul4attrs = new Set(["id", "identifier", "fieldname", "app", "base_mode", "in_sum", "priority", "in_list", "in_mobile_list", "in_text", "in_structured_search", "in_fulltext_search", "in_expert_search", "order", "ininsertprocedure", "inupdateprocedure", "fulltype", "label", "description", "top", "left", "width", "height", "z_index", "liveupdate", "tabindex", "required", "mode", "labelpos", "autoalign", "in_active_view"]);
|
|
4095
4209
|
Control.prototype._cssclass_root = "llft-control";
|
|
4096
4210
|
Control.prototype._cssclass_control = "input";
|
|
4097
4211
|
|
|
@@ -4229,6 +4343,18 @@ export class StringControl extends Control
|
|
|
4229
4343
|
return this._placeholder;
|
|
4230
4344
|
}
|
|
4231
4345
|
|
|
4346
|
+
set placeholder(placeholder)
|
|
4347
|
+
{
|
|
4348
|
+
this._placeholder = placeholder;
|
|
4349
|
+
|
|
4350
|
+
const globals = this.app.globals;
|
|
4351
|
+
if (globals._in_form() && this.app === globals.record.app)
|
|
4352
|
+
{
|
|
4353
|
+
const field = globals.record.fields.get(this.identifier);
|
|
4354
|
+
field._dom_control.placeholder = field.placeholder;
|
|
4355
|
+
}
|
|
4356
|
+
}
|
|
4357
|
+
|
|
4232
4358
|
_user_placeholder(user, placeholder)
|
|
4233
4359
|
{
|
|
4234
4360
|
if (placeholder === null)
|
|
@@ -5943,6 +6069,34 @@ JSONAttachment.prototype._ul4onattrs = [...Attachment.prototype._ul4onattrs, "va
|
|
|
5943
6069
|
JSONAttachment.prototype._ul4attrs = new Set([...Attachment.prototype._ul4onattrs, "value"]);
|
|
5944
6070
|
|
|
5945
6071
|
|
|
6072
|
+
class DataActionType extends ul4.Type
|
|
6073
|
+
{
|
|
6074
|
+
instancecheck(obj)
|
|
6075
|
+
{
|
|
6076
|
+
return obj instanceof DataAction;
|
|
6077
|
+
}
|
|
6078
|
+
};
|
|
6079
|
+
|
|
6080
|
+
let dataactiontype = new DataActionType("la", "DataAction", "A data action configured for an app.");
|
|
6081
|
+
|
|
6082
|
+
|
|
6083
|
+
export class DataAction extends Base
|
|
6084
|
+
{
|
|
6085
|
+
[ul4.symbols.type]()
|
|
6086
|
+
{
|
|
6087
|
+
return dataactiontype;
|
|
6088
|
+
}
|
|
6089
|
+
|
|
6090
|
+
[ul4.symbols.repr]()
|
|
6091
|
+
{
|
|
6092
|
+
return "<" + this.constructor.name + " id=" + ul4._repr(this.id) + " identifier=" + ul4._repr(this.identifier) + ">";
|
|
6093
|
+
}
|
|
6094
|
+
};
|
|
6095
|
+
|
|
6096
|
+
DataAction.prototype._ul4onattrs = ["app", "identifier", "label", "order", "permission", "active", "icon", "description", "message", "filter", "as_multiple_action", "as_single_action", "as_mail_link", "on_edit_form_show", "on_record_edit", "on_record_new", "on_record_delete"];
|
|
6097
|
+
DataAction.prototype._ul4attrs = new Set(["app", "id", "identifier", "label", "order", "permission", "active", "icon", "description", "message", "filter", "as_multiple_action", "as_single_action", "as_link", "on_edit_form_show", "on_record_new", "on_record_edit", "on_record_delete"]);
|
|
6098
|
+
|
|
6099
|
+
|
|
5946
6100
|
class InstallationType extends ul4.Type
|
|
5947
6101
|
{
|
|
5948
6102
|
instancecheck(obj)
|
|
@@ -6058,8 +6212,8 @@ export class AppParameter extends Base
|
|
|
6058
6212
|
}
|
|
6059
6213
|
};
|
|
6060
6214
|
|
|
6061
|
-
AppParameter.prototype._ul4onattrs = ["app", "appgroup", "parent", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"];
|
|
6062
|
-
AppParameter.prototype._ul4attrs = new Set(["id", "app", "appgroup", "parent", "app", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"]);
|
|
6215
|
+
AppParameter.prototype._ul4onattrs = ["app", "appgroup", "parent", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby", "namespace"];
|
|
6216
|
+
AppParameter.prototype._ul4attrs = new Set(["id", "app", "appgroup", "parent", "app", "type", "order", "identifier", "namespace", "description", "value", "createdat", "createdby", "updatedat", "updatedby"]);
|
|
6063
6217
|
|
|
6064
6218
|
|
|
6065
6219
|
class MutableAppParameterType extends AppParameterType
|