ps-toolkit-ui 0.0.1 → 0.0.5
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/README.md +1 -23
- package/bundles/ps-toolkit-ui.umd.js +3 -5
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/permission.class.js +2 -1
- package/esm2015/lib/classes/table.class.js +2 -1
- package/esm2015/lib/components/table/row/table.row.component.js +2 -6
- package/fesm2015/ps-toolkit-ui.js +3 -5
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/permission.class.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,2 @@
|
|
|
1
1
|
# PsToolkitUi
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.6.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project ps-toolkit-ui` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ps-toolkit-ui`.
|
|
8
|
-
> Note: Don't forget to add `--project ps-toolkit-ui` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build ps-toolkit-ui` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build ps-toolkit-ui`, go to the dist folder `cd dist/ps-toolkit-ui` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test ps-toolkit-ui` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
|
2
|
+
This is a simple project for personal testing
|
|
@@ -2379,10 +2379,6 @@
|
|
|
2379
2379
|
_this.table.showInsertModal();
|
|
2380
2380
|
};
|
|
2381
2381
|
}
|
|
2382
|
-
console.log(this.row.CountChild > 0);
|
|
2383
|
-
console.log(!this.table.childrenAutoLoad);
|
|
2384
|
-
console.log((!this.table.childrenAutoLoad && this.children.length > 0));
|
|
2385
|
-
console.log(this.row.CountChild > 0 || (!this.table.childrenAutoLoad && this.children.length > 0));
|
|
2386
2382
|
this.showChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'SubsetTitle', 'fad fa-angle-left f-s-22', this.row.CountChild > 0 || (!this.table.childrenAutoLoad && this.children.length > 0) ? exports.InputType.Icon : exports.InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
|
|
2387
2383
|
this.showChildren.onClick = function () {
|
|
2388
2384
|
if ($__namespace(_this.childrenDiv.nativeElement).is(':visible')) {
|
|
@@ -2497,7 +2493,7 @@
|
|
|
2497
2493
|
TableRowComponent.prototype.getOptions = function () {
|
|
2498
2494
|
var _this = this;
|
|
2499
2495
|
return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
|
|
2500
|
-
.concat(this.table.options.filter(function (x) { return x.condition == null || x.condition
|
|
2496
|
+
.concat(this.table.options.filter(function (x) { return x.condition == null || _this.row[x.condition]; }).map(function (o) {
|
|
2501
2497
|
var i = HelperClass.clone(o);
|
|
2502
2498
|
if (i.url) {
|
|
2503
2499
|
i.url = i.url.replace('{}', _this.row.Id);
|
|
@@ -5043,6 +5039,7 @@
|
|
|
5043
5039
|
this.Children = Children;
|
|
5044
5040
|
this.Accesses = Accesses;
|
|
5045
5041
|
this.RelatedId = null;
|
|
5042
|
+
this.Condition = null;
|
|
5046
5043
|
}
|
|
5047
5044
|
PermissionClass.prototype.hasAccess = function (a) {
|
|
5048
5045
|
return this.Accesses.filter(function (x) { return x.Action === a && x.Type === exports.PermissionTypeEnum.Access; }).length > 0;
|
|
@@ -7119,6 +7116,7 @@
|
|
|
7119
7116
|
return "continue";
|
|
7120
7117
|
}
|
|
7121
7118
|
var opt = new InputClass(this_1.environment, this_1.l, option.Name, option.Icon, exports.InputType.Icon, 'blue h-25 m-h-5 d-ib va-m f-u');
|
|
7119
|
+
opt.condition = option.Condition;
|
|
7122
7120
|
if (option.Type === exports.PermissionTypeEnum.OptionLink || option.Type === exports.PermissionTypeEnum.OptionLinkNewTab) {
|
|
7123
7121
|
var p = new PermissionClass();
|
|
7124
7122
|
p.RelatedId = this_1.permissions.RelatedId;
|