@livinglogic/livingapi 1.28.0 → 1.30.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 +19 -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 +153 -4
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", "**"]);
|
|
@@ -5955,6 +6069,34 @@ JSONAttachment.prototype._ul4onattrs = [...Attachment.prototype._ul4onattrs, "va
|
|
|
5955
6069
|
JSONAttachment.prototype._ul4attrs = new Set([...Attachment.prototype._ul4onattrs, "value"]);
|
|
5956
6070
|
|
|
5957
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
|
+
|
|
5958
6100
|
class InstallationType extends ul4.Type
|
|
5959
6101
|
{
|
|
5960
6102
|
instancecheck(obj)
|
|
@@ -6068,10 +6210,15 @@ export class AppParameter extends Base
|
|
|
6068
6210
|
{
|
|
6069
6211
|
return "<AppParameter id=" + ul4._repr(this.id) + " identifier=" + ul4._repr(this.identifier) + ">";
|
|
6070
6212
|
}
|
|
6213
|
+
|
|
6214
|
+
get full_identifier()
|
|
6215
|
+
{
|
|
6216
|
+
return this.namespace === null ? this.identifier : `${this.namespace}.${this.identifier}`;
|
|
6217
|
+
}
|
|
6071
6218
|
};
|
|
6072
6219
|
|
|
6073
|
-
AppParameter.prototype._ul4onattrs = ["app", "appgroup", "parent", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"];
|
|
6074
|
-
AppParameter.prototype._ul4attrs = new Set(["id", "app", "appgroup", "parent", "app", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"]);
|
|
6220
|
+
AppParameter.prototype._ul4onattrs = ["app", "appgroup", "parent", "type", "order", "identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby", "namespace"];
|
|
6221
|
+
AppParameter.prototype._ul4attrs = new Set(["id", "app", "appgroup", "parent", "app", "type", "order", "identifier", "namespace", "full_identifier", "description", "value", "createdat", "createdby", "updatedat", "updatedby"]);
|
|
6075
6222
|
|
|
6076
6223
|
|
|
6077
6224
|
class MutableAppParameterType extends AppParameterType
|
|
@@ -6427,6 +6574,7 @@ let classes = [
|
|
|
6427
6574
|
URLAttachment,
|
|
6428
6575
|
FileAttachment,
|
|
6429
6576
|
JSONAttachment,
|
|
6577
|
+
DataAction,
|
|
6430
6578
|
Installation,
|
|
6431
6579
|
Category,
|
|
6432
6580
|
KeyView,
|
|
@@ -6487,6 +6635,7 @@ export const module = new ul4.Module(
|
|
|
6487
6635
|
URLAttachment: URLAttachment,
|
|
6488
6636
|
NoteAttachment: NoteAttachment,
|
|
6489
6637
|
JSONAttachment: JSONAttachment,
|
|
6638
|
+
DataAction: DataAction,
|
|
6490
6639
|
Installation: Installation,
|
|
6491
6640
|
HTMLLayoutControl: HTMLLayoutControl,
|
|
6492
6641
|
ImageLayoutControl: ImageLayoutControl,
|