mapa-library-ui 0.43.7 → 0.43.9
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/esm2020/src/lib/components/scale/lib/components/scale/src/scale.component.mjs +3 -3
- package/esm2020/src/lib/core/guards/authorize-guard/authorize.mjs +5 -0
- package/esm2020/src/lib/core/guards/authorize-guard/lib/core/enums/permissions.enum.mjs +41 -0
- package/esm2020/src/lib/core/guards/authorize-guard/lib/core/guards/authorize-guard/authorize.guard.mjs +29 -0
- package/esm2020/src/lib/core/guards/authorize-guard/lib/core/guards/authorize-guard/public-api.mjs +7 -0
- package/esm2020/src/lib/core/guards/authorize-guard/lib/core/utils/permissions.util.mjs +15 -0
- package/esm2020/src/lib/core/guards/authorize-guard/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs +5 -0
- package/fesm2015/mapa-library-ui-src-lib-components-scale.mjs +2 -2
- package/fesm2015/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs +99 -0
- package/fesm2015/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs.map +1 -0
- package/fesm2020/mapa-library-ui-src-lib-components-scale.mjs +2 -2
- package/fesm2020/mapa-library-ui-src-lib-components-scale.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs +99 -0
- package/fesm2020/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs.map +1 -0
- package/mapa-library-ui-0.43.9.tgz +0 -0
- package/package.json +9 -1
- package/src/lib/core/guards/authorize-guard/authorize.d.ts +1 -0
- package/src/lib/core/guards/authorize-guard/index.d.ts +5 -0
- package/src/lib/core/guards/authorize-guard/lib/core/enums/permissions.enum.d.ts +39 -0
- package/src/lib/core/guards/authorize-guard/lib/core/guards/authorize-guard/authorize.guard.d.ts +10 -0
- package/src/lib/core/guards/authorize-guard/lib/core/guards/authorize-guard/public-api.d.ts +3 -0
- package/src/lib/core/guards/authorize-guard/lib/core/utils/permissions.util.d.ts +5 -0
- package/mapa-library-ui-0.43.7.tgz +0 -0
|
@@ -39,13 +39,13 @@ export class MapaScaleComponent {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
MapaScaleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaScaleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
-
MapaScaleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaScaleComponent, selector: "mapa-scale", inputs: { data: "data", showProgressbar: "showProgressbar" }, ngImport: i0, template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section
|
|
42
|
+
MapaScaleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaScaleComponent, selector: "mapa-scale", inputs: { data: "data", showProgressbar: "showProgressbar" }, ngImport: i0, template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section\n class=\"mapa__card scale-details\"\n *ngFor=\"let scale of competence.scales\"\n >\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension__title\">\n <div class=\"dimension__title--direction\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >\u2191</span\n >\n <ng-template #negativeDirection>\u2193</ng-template>\n </div>\n <div class=\"dimension__title--label\">\n {{ dimension.dimensionName }}\n </div>\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n", styles: [".competence{display:flex;gap:24px;font-family:SF-Pro;width:-moz-fit-content;width:fit-content}.competence__header{display:flex;align-items:center;color:#ea561d;font-size:32px;font-weight:400;line-height:40px;width:100%}.competence__header img{margin-right:16px}.competence .scales--summarized{display:grid;gap:24px;grid-template-columns:1fr 1fr 1fr}.competence .scale-details{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;flex-wrap:wrap;gap:16px;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.competence .scale-details__top{border-bottom:2px solid #8c8f94;width:100%}.competence .scale-details__header{display:flex;align-items:center;justify-content:space-between;width:100%;color:#181818;font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:20px}.competence .scale-details__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px;padding-bottom:16px}.competence .scale-details__concept strong{color:#181818;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.competence .scale-details__dimensions{display:flex;flex-wrap:wrap;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension{display:flex;justify-content:flex-start;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension__main{display:flex;justify-content:space-between;width:100%}.competence .scale-details .dimension--full-sized .dimension{display:flex;gap:32px;width:100%}.competence .scale-details .dimension--full-sized .dimension__main{width:35%}.competence .scale-details .dimension--full-sized .dimension__concept{width:65%}.competence .scale-details .dimension__title{display:flex;align-items:center;justify-content:center;color:#181818;font-size:16px;font-style:normal;font-weight:400;line-height:24px;gap:8px}.competence .scale-details .dimension--classification{display:flex;align-items:center;justify-content:center}.competence .scale-details .dimension__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MapaProgressbarComponent, selector: "mapa-progressbar", inputs: ["data", "showInterval"] }] });
|
|
43
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaScaleComponent, decorators: [{
|
|
44
44
|
type: Component,
|
|
45
|
-
args: [{ selector: "mapa-scale", template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section
|
|
45
|
+
args: [{ selector: "mapa-scale", template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section\n class=\"mapa__card scale-details\"\n *ngFor=\"let scale of competence.scales\"\n >\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension__title\">\n <div class=\"dimension__title--direction\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >\u2191</span\n >\n <ng-template #negativeDirection>\u2193</ng-template>\n </div>\n <div class=\"dimension__title--label\">\n {{ dimension.dimensionName }}\n </div>\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n", styles: [".competence{display:flex;gap:24px;font-family:SF-Pro;width:-moz-fit-content;width:fit-content}.competence__header{display:flex;align-items:center;color:#ea561d;font-size:32px;font-weight:400;line-height:40px;width:100%}.competence__header img{margin-right:16px}.competence .scales--summarized{display:grid;gap:24px;grid-template-columns:1fr 1fr 1fr}.competence .scale-details{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;flex-wrap:wrap;gap:16px;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.competence .scale-details__top{border-bottom:2px solid #8c8f94;width:100%}.competence .scale-details__header{display:flex;align-items:center;justify-content:space-between;width:100%;color:#181818;font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:20px}.competence .scale-details__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px;padding-bottom:16px}.competence .scale-details__concept strong{color:#181818;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.competence .scale-details__dimensions{display:flex;flex-wrap:wrap;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension{display:flex;justify-content:flex-start;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension__main{display:flex;justify-content:space-between;width:100%}.competence .scale-details .dimension--full-sized .dimension{display:flex;gap:32px;width:100%}.competence .scale-details .dimension--full-sized .dimension__main{width:35%}.competence .scale-details .dimension--full-sized .dimension__concept{width:65%}.competence .scale-details .dimension__title{display:flex;align-items:center;justify-content:center;color:#181818;font-size:16px;font-style:normal;font-weight:400;line-height:24px;gap:8px}.competence .scale-details .dimension--classification{display:flex;align-items:center;justify-content:center}.competence .scale-details .dimension__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px}\n"] }]
|
|
46
46
|
}], propDecorators: { data: [{
|
|
47
47
|
type: Input
|
|
48
48
|
}], showProgressbar: [{
|
|
49
49
|
type: Input
|
|
50
50
|
}] } });
|
|
51
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NhbGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbWFwYS1saWJyYXJ5LXVpL3NyYy9saWIvY29tcG9uZW50cy9zY2FsZS9zcmMvc2NhbGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbWFwYS1saWJyYXJ5LXVpL3NyYy9saWIvY29tcG9uZW50cy9zY2FsZS9zcmMvc2NhbGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7QUFTakQsTUFBTSxPQUFPLGtCQUFrQjtJQUwvQjtRQU9XLG9CQUFlLEdBQVksSUFBSSxDQUFDO0tBb0MxQztJQWxDQyxrQkFBa0IsQ0FBQyxLQUFZO1FBQzdCLE9BQU87WUFDTCxRQUFRLEVBQUUsS0FBSyxDQUFDLFFBQVE7WUFDeEIsY0FBYyxFQUFFL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oc2NhbGUpXCJcbiAgICAgICAgW2NsYXNzLmRpbWVuc2lvbi0tc3VtbWFyaXplZF09XCJzaG93U3VtbWFyaXplZChzY2FsZSlcIlxuICAgICAgPlxuICAgICAgICA8YXJ0aWNsZVxuICAgICAgICAgICpuZ0Zvcj1cImxldCBkaW1lbnNpb24gb2Ygc2NhbGUuZGltZW5zaW9uc1wiXG4gICAgICAgICAgY2xhc3M9XCJtYXBhX19jYXJkLS1zbSBkaW1lbnNpb25cIlxuICAgICAgICA+XG4gICAgICAgICAgPG5hdiBjbGFzcz1cImRpbWVuc2lvbl9fbWFpblwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImRpbWVuc2lvbl9fdGl0bGVcIj5cbiAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImRpbWVuc2lvbl9fdGl0bGUtLWRpcmVjdGlvblwiPlxuICAgICAgICAgICAgICAgIDxzcGFuXG4gICAgICAgICAgICAgICAgICAqbmdJZj1cImRpbWVuc2lvbi5kaXJlY3Rpb24gPT09ICdQb3NpdGl2YSc7IGVsc2UgbmVnYXRpdmVEaXJlY3Rpb25cIlxuICAgICAgICAgICAgICAgICAgPuKGkTwvc3BhblxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8bmctdGVtcGxhdGUgI25lZ2F0aXZlRGlyZWN0aW9uPuKGkzwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZGltZW5zaW9uX190aXRsZS0tbGFiZWxcIj5cbiAgICAgICAgICAgICAgICB7eyBkaW1lbnNpb24uZGltZW5zaW9uTmFtZSB9fVxuICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImRpbWVuc2lvbi0tY2xhc3NpZmljYXRpb25cIj5cbiAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICpuZ0lmPVwiZGltZW5zaW9uLmNsYXNzaWZpY2F0aW9uXCJcbiAgICAgICAgICAgICAgICBjbGFzcz1cIm1hcGFfX3RhZy0tYmdcIlxuICAgICAgICAgICAgICAgIFtzdHlsZS5iYWNrZ3JvdW5kQ29sb3JdPVwiZGltZW5zaW9uLmNsYXNzaWZpY2F0aW9uLmNsYXNzaWZpY2F0aW9uQ29sb3JcIlxuICAgICAgICAgICAgICAgIFtjbGFzcy5tYXBhX190YWctLWNvbnRyYXN0XT1cImRpbWVuc2lvbi5jbGFzc2lmaWNhdGlvbi5jbGFzc2lmaWNhdGlvbklkID09PSAxXCJcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwibWFwYV9fdGFnLS10ZXh0XCJcbiAgICAgICAgICAgICAgICAgID57eyBkaW1lbnNpb24uY2xhc3NpZmljYXRpb24uY2xhc3NpZmljYXRpb25OYW1lIH19PC9zcGFuXG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvbmF2PlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICpuZ0lmPVwiZGltZW5zaW9uLmRpbWVuc2lvbkNsYXNzaWZpY2F0aW9uTWVzc2FnZVwiXG4gICAgICAgICAgICBjbGFzcz1cImRpbWVuc2lvbl9fY29uY2VwdFwiXG4gICAgICAgICAgPlxuICAgICAgICAgICAge3sgZGltZW5zaW9uLmRpbWVuc2lvbkNsYXNzaWZpY2F0aW9uTWVzc2FnZSB9fVxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2FydGljbGU+XG4gICAgICA8L3NlY3Rpb24+XG4gICAgPC9zZWN0aW9uPlxuICA8L3NlY3Rpb24+XG48L3NlY3Rpb24+XG4iXX0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of mapa-library-ui authorize
|
|
3
|
+
*/
|
|
4
|
+
export * from './lib/core/guards/authorize-guard/public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXplLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbWFwYS1saWJyYXJ5LXVpL3NyYy9hdXRob3JpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLDhDQUE4QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBtYXBhLWxpYnJhcnktdWkgYXV0aG9yaXplXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29yZS9ndWFyZHMvYXV0aG9yaXplLWd1YXJkL3B1YmxpYy1hcGknO1xuIl19
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export var Permissions;
|
|
2
|
+
(function (Permissions) {
|
|
3
|
+
Permissions["V5CustomReportView"] = "V5CustomReportView";
|
|
4
|
+
Permissions["V5MenuMyOrganization"] = "V5MenuMyOrganization";
|
|
5
|
+
Permissions["V5CompanyViewList"] = "V5CompanyViewList";
|
|
6
|
+
Permissions["V5CompanyExportList"] = "V5CompanyExportList";
|
|
7
|
+
Permissions["V5CompanyCreateNew"] = "V5CompanyCreateNew";
|
|
8
|
+
Permissions["V5CompanyEdit"] = "V5CompanyEdit";
|
|
9
|
+
Permissions["V5CompanyView"] = "V5CompanyView";
|
|
10
|
+
Permissions["V5CompanyDelete"] = "V5CompanyDelete";
|
|
11
|
+
Permissions["V5DivisionViewList"] = "V5DivisionViewList";
|
|
12
|
+
Permissions["V5DivisionExportList"] = "V5DivisionExportList";
|
|
13
|
+
Permissions["V5DivisionCreateNew"] = "V5DivisionCreateNew";
|
|
14
|
+
Permissions["V5DivisionEdit"] = "V5DivisionEdit";
|
|
15
|
+
Permissions["V5DivisionView"] = "V5DivisionView";
|
|
16
|
+
Permissions["V5DivisionDelete"] = "V5DivisionDelete";
|
|
17
|
+
Permissions["V5UnitViewList"] = "V5UnitViewList";
|
|
18
|
+
Permissions["V5UnitExportList"] = "V5UnitExportList";
|
|
19
|
+
Permissions["V5UnitCreateNew"] = "V5UnitCreateNew";
|
|
20
|
+
Permissions["V5UnitEdit"] = "V5UnitEdit";
|
|
21
|
+
Permissions["V5UnitView"] = "V5UnitView";
|
|
22
|
+
Permissions["V5UnitDelete"] = "V5UnitDelete";
|
|
23
|
+
Permissions["V5UserViewList"] = "V5UserViewList";
|
|
24
|
+
Permissions["V5UserExportList"] = "V5UserExportList";
|
|
25
|
+
Permissions["V5UserView"] = "V5UserView";
|
|
26
|
+
Permissions["V5UserCreateNew"] = "V5UserCreateNew";
|
|
27
|
+
Permissions["V5UserEdit"] = "V5UserEdit";
|
|
28
|
+
Permissions["V5UserDelete"] = "V5UserDelete";
|
|
29
|
+
Permissions["V5MenuMyTests"] = "V5MenuMyTests";
|
|
30
|
+
Permissions["V5TestsInvitationsSend"] = "V5TestsInvitationsSend";
|
|
31
|
+
Permissions["V5TestsInvitationAndEvaluationView"] = "V5TestsInvitationAndEvaluationView";
|
|
32
|
+
Permissions["V5MenuMyReports"] = "V5MenuMyReports";
|
|
33
|
+
Permissions["V5MenuConfiguration"] = "V5MenuConfiguration";
|
|
34
|
+
Permissions["V5CustomReportCreate"] = "V5CustomReportCreate";
|
|
35
|
+
Permissions["V5ParameterizedReportCreate"] = "V5ParameterizedReportCreate";
|
|
36
|
+
Permissions["V5MenuFinancial"] = "V5MenuFinancial";
|
|
37
|
+
Permissions["V5FinancialCreditsView"] = "V5FinancialCreditsView";
|
|
38
|
+
Permissions["V5FinancialUsageExtractView"] = "V5FinancialUsageExtractView";
|
|
39
|
+
Permissions["V5FinancialInvoiceView"] = "V5FinancialInvoiceView";
|
|
40
|
+
})(Permissions || (Permissions = {}));
|
|
41
|
+
//# sourceM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ZWRSZXBvcnRDcmVhdGUgPSAnVjVQYXJhbWV0ZXJpemVkUmVwb3J0Q3JlYXRlJyxcbiAgICBWNU1lbnVGaW5hbmNpYWwgPSAnVjVNZW51RmluYW5jaWFsJyxcbiAgICBWNUZpbmFuY2lhbENyZWRpdHNWaWV3ID0gJ1Y1RmluYW5jaWFsQ3JlZGl0c1ZpZXcnLFxuICAgIFY1RmluYW5jaWFsVXNhZ2VFeHRyYWN0VmlldyA9ICdWNUZpbmFuY2lhbFVzYWdlRXh0cmFjdFZpZXcnLFxuICAgIFY1RmluYW5jaWFsSW52b2ljZVZpZXcgPSAnVjVGaW5hbmNpYWxJbnZvaWNlVmlldydcbn0gIl19
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { getUserPermissions } from '../../utils/permissions.util';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/router";
|
|
5
|
+
export class AuthorizeGuard {
|
|
6
|
+
constructor(router) {
|
|
7
|
+
this.router = router;
|
|
8
|
+
}
|
|
9
|
+
canActivate(route, state) {
|
|
10
|
+
const requiredPermission = route.data['permission'];
|
|
11
|
+
const userPermissions = getUserPermissions();
|
|
12
|
+
if (userPermissions.includes(requiredPermission)) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
this.router.navigate(['/app/acesso-negado']);
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
AuthorizeGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22
|
+
AuthorizeGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, providedIn: 'root' });
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, decorators: [{
|
|
24
|
+
type: Injectable,
|
|
25
|
+
args: [{
|
|
26
|
+
providedIn: 'root'
|
|
27
|
+
}]
|
|
28
|
+
}], ctorParameters: function () { return [{ type: i1.Router }]; } });
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXplLmd1YXJkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbWFwYS1saWJyYXJ5LXVpL3NyYy9saWIvY29yZS9ndWFyZHMvYXV0aG9yaXplLWd1YXJkL2F1dGhvcml6ZS5ndWFyZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRzNDLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDhCQUE4QixDQUFDOzs7QUFLbEUsTUFBTSxPQUFPLGNBQWM7SUFFekIsWUFBb0IsTUFBYztRQUFkLFdBQU0sR0FBTixNQUFNLENBQVE7SUFBRyxDQUFDO0lBRXRDLFdBQVcsQ0FDVCxLQUE2QixFQUM3QixLQUEwQjtRQUUxQixNQUFNLGtCQUFrQixHQUFHLEtBQUssQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLENBQUM7UUFDcEQsTUFBTSxlQUFlLEdBQUcsa0JBQWtCLEVBQUUsQ0FBQztRQUU3QyxJQUFJLGVBQWUsQ0FBQyxRQUFRLENBQUMsa0JBQWtCLENBQUMsRUFBRTtZQUNoRCxPQUFPLElBQUksQ0FBQztTQUNiO2FBQU07WUFDTCxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDLG9CQUFvQixDQUFDLENBQUMsQ0FBQztZ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KHVzZXJQZXJtaXNzaW9ucy5pbmNsdWRlcyhyZXF1aXJlZFBlcm1pc3Npb24pKSB7XG4gICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhpcy5yb3V0ZXIubmF2aWdhdGUoWycvYXBwL2FjZXNzby1uZWdhZG8nXSk7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG4gIFxufVxuIl19
|
package/esm2020/src/lib/core/guards/authorize-guard/lib/core/guards/authorize-guard/public-api.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of mapa-library-ui authorize
|
|
3
|
+
*/
|
|
4
|
+
export * from './authorize.guard';
|
|
5
|
+
export * from '../../utils/permissions.util';
|
|
6
|
+
export * from '../../enums/permissions.enum';
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21hcGEtbGlicmFyeS11aS9zcmMvbGliL2NvcmUvZ3VhcmRzL2F1dGhvcml6ZS1ndWFyZC9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsY0FBYyxtQkFBbUIsQ0FBQztBQUVsQyxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsOEJBQThCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG1hcGEtbGlicmFyeS11aSBhdXRob3JpemVcbiAqL1xuZXhwb3J0ICogZnJvbSAnLi9hdXRob3JpemUuZ3VhcmQnO1xuXG5leHBvcnQgKiBmcm9tICcuLi8uLi91dGlscy9wZXJtaXNzaW9ucy51dGlsJztcbmV4cG9ydCAqIGZyb20gJy4uLy4uL2VudW1zL3Blcm1pc3Npb25zLmVudW0nOyJdfQ==
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function hasPermission(requiredPermission) {
|
|
2
|
+
const userPermissions = getUserPermissions();
|
|
3
|
+
return userPermissions.includes(requiredPermission);
|
|
4
|
+
}
|
|
5
|
+
export function hasAnyPermission(requiredsPermission) {
|
|
6
|
+
return requiredsPermission.some(rp => hasPermission(rp));
|
|
7
|
+
}
|
|
8
|
+
export function hasAllPermission(requiredsPermission) {
|
|
9
|
+
return requiredsPermission.every(rp => hasPermission(rp));
|
|
10
|
+
}
|
|
11
|
+
export function getUserPermissions() {
|
|
12
|
+
const permissions = localStorage.getItem('groups') || '';
|
|
13
|
+
return permissions?.split(',');
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVybWlzc2lvbnMudXRpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL21hcGEtbGlicmFyeS11aS9zcmMvbGliL2NvcmUvdXRpbHMvcGVybWlzc2lvbnMudXRpbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxNQUFNLFVBQVUsYUFBYSxDQUFDLGtCQUErQjtJQUN6RCxNQUFNLGVBQWUsR0FBRyxrQkFBa0IsRUFBRSxDQUFDO0lBQzdDLE9BQU8sZUFBZSxDQUFDLFFBQVEsQ0FBQyxrQkFBa0IsQ0FBQyxDQUFBO0FBQ3ZELENBQUM7QUFFRCxNQUFNLFVBQVUsZ0JBQWdCLENBQUMsbUJBQWtDO0lBQy9ELE9BQU8sbUJBQW1CLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsYUFBYSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUE7QU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Ghhc1Blcm1pc3Npb24ocnApKVxufVxuXG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRVc2VyUGVybWlzc2lvbnMoKTogc3RyaW5nW10ge1xuICAgIGNvbnN0IHBlcm1pc3Npb25zID0gbG9jYWxTdG9yYWdlLmdldEl0ZW0oJ2dyb3VwcycpIHx8ICcnO1xuICAgIHJldHVybiBwZXJtaXNzaW9ucz8uc3BsaXQoJywnKVxufSJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './authorize';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwYS1saWJyYXJ5LXVpLXNyYy1saWItY29yZS1ndWFyZHMtYXV0aG9yaXplLWd1YXJkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbWFwYS1saWJyYXJ5LXVpL3NyYy9tYXBhLWxpYnJhcnktdWktc3JjLWxpYi1jb3JlLWd1YXJkcy1hdXRob3JpemUtZ3VhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGFBQWEsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9hdXRob3JpemUnO1xuIl19
|
|
@@ -56,10 +56,10 @@ class MapaScaleComponent {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
MapaScaleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaScaleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
-
MapaScaleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaScaleComponent, selector: "mapa-scale", inputs: { data: "data", showProgressbar: "showProgressbar" }, ngImport: i0, template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section
|
|
59
|
+
MapaScaleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaScaleComponent, selector: "mapa-scale", inputs: { data: "data", showProgressbar: "showProgressbar" }, ngImport: i0, template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section\n class=\"mapa__card scale-details\"\n *ngFor=\"let scale of competence.scales\"\n >\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension__title\">\n <div class=\"dimension__title--direction\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >\u2191</span\n >\n <ng-template #negativeDirection>\u2193</ng-template>\n </div>\n <div class=\"dimension__title--label\">\n {{ dimension.dimensionName }}\n </div>\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n", styles: [".competence{display:flex;gap:24px;font-family:SF-Pro;width:-moz-fit-content;width:fit-content}.competence__header{display:flex;align-items:center;color:#ea561d;font-size:32px;font-weight:400;line-height:40px;width:100%}.competence__header img{margin-right:16px}.competence .scales--summarized{display:grid;gap:24px;grid-template-columns:1fr 1fr 1fr}.competence .scale-details{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;flex-wrap:wrap;gap:16px;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.competence .scale-details__top{border-bottom:2px solid #8c8f94;width:100%}.competence .scale-details__header{display:flex;align-items:center;justify-content:space-between;width:100%;color:#181818;font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:20px}.competence .scale-details__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px;padding-bottom:16px}.competence .scale-details__concept strong{color:#181818;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.competence .scale-details__dimensions{display:flex;flex-wrap:wrap;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension{display:flex;justify-content:flex-start;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension__main{display:flex;justify-content:space-between;width:100%}.competence .scale-details .dimension--full-sized .dimension{display:flex;gap:32px;width:100%}.competence .scale-details .dimension--full-sized .dimension__main{width:35%}.competence .scale-details .dimension--full-sized .dimension__concept{width:65%}.competence .scale-details .dimension__title{display:flex;align-items:center;justify-content:center;color:#181818;font-size:16px;font-style:normal;font-weight:400;line-height:24px;gap:8px}.competence .scale-details .dimension--classification{display:flex;align-items:center;justify-content:center}.competence .scale-details .dimension__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MapaProgressbarComponent, selector: "mapa-progressbar", inputs: ["data", "showInterval"] }] });
|
|
60
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaScaleComponent, decorators: [{
|
|
61
61
|
type: Component,
|
|
62
|
-
args: [{ selector: "mapa-scale", template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section
|
|
62
|
+
args: [{ selector: "mapa-scale", template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section\n class=\"mapa__card scale-details\"\n *ngFor=\"let scale of competence.scales\"\n >\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension__title\">\n <div class=\"dimension__title--direction\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >\u2191</span\n >\n <ng-template #negativeDirection>\u2193</ng-template>\n </div>\n <div class=\"dimension__title--label\">\n {{ dimension.dimensionName }}\n </div>\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n", styles: [".competence{display:flex;gap:24px;font-family:SF-Pro;width:-moz-fit-content;width:fit-content}.competence__header{display:flex;align-items:center;color:#ea561d;font-size:32px;font-weight:400;line-height:40px;width:100%}.competence__header img{margin-right:16px}.competence .scales--summarized{display:grid;gap:24px;grid-template-columns:1fr 1fr 1fr}.competence .scale-details{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;flex-wrap:wrap;gap:16px;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.competence .scale-details__top{border-bottom:2px solid #8c8f94;width:100%}.competence .scale-details__header{display:flex;align-items:center;justify-content:space-between;width:100%;color:#181818;font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:20px}.competence .scale-details__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px;padding-bottom:16px}.competence .scale-details__concept strong{color:#181818;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.competence .scale-details__dimensions{display:flex;flex-wrap:wrap;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension{display:flex;justify-content:flex-start;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension__main{display:flex;justify-content:space-between;width:100%}.competence .scale-details .dimension--full-sized .dimension{display:flex;gap:32px;width:100%}.competence .scale-details .dimension--full-sized .dimension__main{width:35%}.competence .scale-details .dimension--full-sized .dimension__concept{width:65%}.competence .scale-details .dimension__title{display:flex;align-items:center;justify-content:center;color:#181818;font-size:16px;font-style:normal;font-weight:400;line-height:24px;gap:8px}.competence .scale-details .dimension--classification{display:flex;align-items:center;justify-content:center}.competence .scale-details .dimension__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px}\n"] }]
|
|
63
63
|
}], propDecorators: { data: [{
|
|
64
64
|
type: Input
|
|
65
65
|
}], showProgressbar: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapa-library-ui-src-lib-components-scale.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/scale/src/progressbar/progressbar.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/progressbar/progressbar.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/details/details.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/details/details.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.module.ts","../../../projects/mapa-library-ui/src/lib/components/scale/public-api.ts","../../../projects/mapa-library-ui/src/scale.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-scale.ts"],"sourcesContent":["import { Component, Input } from \"@angular/core\";\nimport { ProgressBar } from \"../scale.interface\";\n\n@Component({\n selector: \"mapa-progressbar\",\n templateUrl: \"./progressbar.component.html\",\n styleUrls: [\"./progressbar.component.scss\"],\n})\nexport class MapaProgressbarComponent {\n @Input() data!: ProgressBar;\n @Input() showInterval: boolean = true;\n}\n","<div class=\"progress-bar\">\n <div class=\"progress-bar--bg\">\n <div\n class=\"progress-bar--filled\"\n [style.width.%]=\"data.interval\"\n [style.backgroundColor]=\"data.classification?.classificationColor\"\n ></div>\n </div>\n <div class=\"progress-bar--interval\" *ngIf=\"showInterval\">\n {{data.interval}}%\n </div>\n</div>\n","import { Component, Input } from \"@angular/core\";\nimport { Dimension } from \"../../group-report/src/group-report-interface\";\nimport { Competence, Scale, ProgressBar } from \"./scale.interface\";\n\n@Component({\n selector: \"mapa-scale\",\n templateUrl: \"./scale.component.html\",\n styleUrls: [\"./scale.component.scss\"],\n})\nexport class MapaScaleComponent {\n @Input() data!: Competence[];\n @Input() showProgressbar: boolean = true;\n\n getProgressbarData(scale: Scale): ProgressBar {\n return {\n interval: scale.interval,\n classification: scale.classification!,\n };\n }\n\n isPositive(dimension: Dimension): boolean {\n return dimension.direction === \"Positiva\";\n }\n\n showSummarized(scale: Scale): boolean {\n return scale?.scaleConcept === undefined;\n }\n\n getCompetenceImg(competence: Competence): string {\n let img = \"\";\n if (competence.competenceName.includes(\"Gestão\")) {\n img = \"UsersThree\";\n }\n if (competence.competenceName.includes(\"Autogestão\")) {\n img = \"Brain\";\n }\n if (competence.competenceName.includes(\"Relacionamento\")) {\n img = \"Handshake\";\n }\n if (competence.competenceName.includes(\"Atividade\")) {\n img = \"ListCheck\";\n }\n if (competence.competenceName.includes(\"Corporais\")) {\n img = \"Warning\";\n }\n return `assets/images/icons/${img}.svg`;\n }\n}\n","<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section class=\"mapa__card scale-details\" *ngFor=\"let scale of competence.scales\">\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension--title\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >↑</span\n >\n <ng-template #negativeDirection>↓</ng-template>\n {{ dimension.dimensionName }}\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'mapa-details',\n templateUrl: './details.component.html',\n styleUrls: ['./details.component.scss']\n})\nexport class MapaDetailsComponent {\n\n}\n","<p>details works!</p>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MapaScaleComponent } from \"./scale.component\";\nimport { MapaProgressbarComponent } from \"./progressbar/progressbar.component\";\nimport { MapaDetailsComponent } from \"./details/details.component\";\n\n@NgModule({\n declarations: [\n MapaScaleComponent,\n MapaProgressbarComponent,\n MapaDetailsComponent,\n ],\n exports: [\n MapaScaleComponent,\n MapaProgressbarComponent,\n MapaDetailsComponent,\n ],\n imports: [CommonModule],\n})\nexport class MapaScaleModule {}\n","/*\n * Public API Surface of mapa-library-ui scale\n */\n\nexport * from './src/scale.component';\nexport * from './src/scale.module';\nexport * from './src/progressbar/progressbar.component';\nexport * from './src/details/details.component';","/*\n * Public API Surface of mapa-library-ui scale\n */\n\nexport * from './lib/components/scale/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './scale';\n"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EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,iBAXxB,kBAAkB;QAClB,wBAAwB;QACxB,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAOZ,YAAY,CAAA,EAAA,OAAA,EAAA,CAJpB,kBAAkB;QAClB,wBAAwB;QACxB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAIX,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFhB,YAAY,CAAA,EAAA,CAAA,CAAA;4FAEX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;iBACxB,CAAA;;;AClBD;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mapa-library-ui-src-lib-components-scale.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/scale/src/progressbar/progressbar.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/progressbar/progressbar.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/details/details.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/details/details.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.module.ts","../../../projects/mapa-library-ui/src/lib/components/scale/public-api.ts","../../../projects/mapa-library-ui/src/scale.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-scale.ts"],"sourcesContent":["import { Component, Input } from \"@angular/core\";\nimport { ProgressBar } from \"../scale.interface\";\n\n@Component({\n selector: \"mapa-progressbar\",\n templateUrl: \"./progressbar.component.html\",\n styleUrls: [\"./progressbar.component.scss\"],\n})\nexport class MapaProgressbarComponent {\n @Input() data!: ProgressBar;\n @Input() showInterval: boolean = true;\n}\n","<div class=\"progress-bar\">\n <div class=\"progress-bar--bg\">\n <div\n class=\"progress-bar--filled\"\n [style.width.%]=\"data.interval\"\n [style.backgroundColor]=\"data.classification?.classificationColor\"\n ></div>\n </div>\n <div class=\"progress-bar--interval\" *ngIf=\"showInterval\">\n {{data.interval}}%\n </div>\n</div>\n","import { Component, Input } from \"@angular/core\";\nimport { Dimension } from \"../../group-report/src/group-report-interface\";\nimport { Competence, Scale, ProgressBar } from \"./scale.interface\";\n\n@Component({\n selector: \"mapa-scale\",\n templateUrl: \"./scale.component.html\",\n styleUrls: [\"./scale.component.scss\"],\n})\nexport class MapaScaleComponent {\n @Input() data!: Competence[];\n @Input() showProgressbar: boolean = true;\n\n getProgressbarData(scale: Scale): ProgressBar {\n return {\n interval: scale.interval,\n classification: scale.classification!,\n };\n }\n\n isPositive(dimension: Dimension): boolean {\n return dimension.direction === \"Positiva\";\n }\n\n showSummarized(scale: Scale): boolean {\n return scale?.scaleConcept === undefined;\n }\n\n getCompetenceImg(competence: Competence): string {\n let img = \"\";\n if (competence.competenceName.includes(\"Gestão\")) {\n img = \"UsersThree\";\n }\n if (competence.competenceName.includes(\"Autogestão\")) {\n img = \"Brain\";\n }\n if (competence.competenceName.includes(\"Relacionamento\")) {\n img = \"Handshake\";\n }\n if (competence.competenceName.includes(\"Atividade\")) {\n img = \"ListCheck\";\n }\n if (competence.competenceName.includes(\"Corporais\")) {\n img = \"Warning\";\n }\n return `assets/images/icons/${img}.svg`;\n }\n}\n","<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section\n class=\"mapa__card scale-details\"\n *ngFor=\"let scale of competence.scales\"\n >\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension__title\">\n <div class=\"dimension__title--direction\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >↑</span\n >\n <ng-template #negativeDirection>↓</ng-template>\n </div>\n <div class=\"dimension__title--label\">\n {{ dimension.dimensionName }}\n </div>\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'mapa-details',\n templateUrl: './details.component.html',\n styleUrls: ['./details.component.scss']\n})\nexport class MapaDetailsComponent {\n\n}\n","<p>details works!</p>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MapaScaleComponent } from \"./scale.component\";\nimport { MapaProgressbarComponent } from \"./progressbar/progressbar.component\";\nimport { MapaDetailsComponent } from \"./details/details.component\";\n\n@NgModule({\n declarations: [\n MapaScaleComponent,\n MapaProgressbarComponent,\n MapaDetailsComponent,\n ],\n exports: [\n MapaScaleComponent,\n MapaProgressbarComponent,\n MapaDetailsComponent,\n ],\n imports: [CommonModule],\n})\nexport class MapaScaleModule {}\n","/*\n * Public API Surface of mapa-library-ui scale\n */\n\nexport * from './src/scale.component';\nexport * from './src/scale.module';\nexport * from './src/progressbar/progressbar.component';\nexport * from './src/details/details.component';","/*\n * Public API Surface of mapa-library-ui scale\n */\n\nexport * from './lib/components/scale/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './scale';\n"],"names":["i2.MapaProgressbarComponent"],"mappings":";;;;;MAQa,wBAAwB,CAAA;AALrC,IAAA,WAAA,GAAA;AAOW,QAAA,IAAY,CAAA,YAAA,GAAY,IAAI,CAAC;KACvC;;sHAHY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,gHCRrC,2WAYA,EAAA,MAAA,EAAA,CAAA,4eAAA,C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A,CAAA,CAAA;4FAEX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;iBACxB,CAAA;;;AClBD;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/router';
|
|
4
|
+
|
|
5
|
+
function hasPermission(requiredPermission) {
|
|
6
|
+
const userPermissions = getUserPermissions();
|
|
7
|
+
return userPermissions.includes(requiredPermission);
|
|
8
|
+
}
|
|
9
|
+
function hasAnyPermission(requiredsPermission) {
|
|
10
|
+
return requiredsPermission.some(rp => hasPermission(rp));
|
|
11
|
+
}
|
|
12
|
+
function hasAllPermission(requiredsPermission) {
|
|
13
|
+
return requiredsPermission.every(rp => hasPermission(rp));
|
|
14
|
+
}
|
|
15
|
+
function getUserPermissions() {
|
|
16
|
+
const permissions = localStorage.getItem('groups') || '';
|
|
17
|
+
return permissions === null || permissions === void 0 ? void 0 : permissions.split(',');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class AuthorizeGuard {
|
|
21
|
+
constructor(router) {
|
|
22
|
+
this.router = router;
|
|
23
|
+
}
|
|
24
|
+
canActivate(route, state) {
|
|
25
|
+
const requiredPermission = route.data['permission'];
|
|
26
|
+
const userPermissions = getUserPermissions();
|
|
27
|
+
if (userPermissions.includes(requiredPermission)) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
this.router.navigate(['/app/acesso-negado']);
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
AuthorizeGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
37
|
+
AuthorizeGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, providedIn: 'root' });
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, decorators: [{
|
|
39
|
+
type: Injectable,
|
|
40
|
+
args: [{
|
|
41
|
+
providedIn: 'root'
|
|
42
|
+
}]
|
|
43
|
+
}], ctorParameters: function () { return [{ type: i1.Router }]; } });
|
|
44
|
+
|
|
45
|
+
var Permissions;
|
|
46
|
+
(function (Permissions) {
|
|
47
|
+
Permissions["V5CustomReportView"] = "V5CustomReportView";
|
|
48
|
+
Permissions["V5MenuMyOrganization"] = "V5MenuMyOrganization";
|
|
49
|
+
Permissions["V5CompanyViewList"] = "V5CompanyViewList";
|
|
50
|
+
Permissions["V5CompanyExportList"] = "V5CompanyExportList";
|
|
51
|
+
Permissions["V5CompanyCreateNew"] = "V5CompanyCreateNew";
|
|
52
|
+
Permissions["V5CompanyEdit"] = "V5CompanyEdit";
|
|
53
|
+
Permissions["V5CompanyView"] = "V5CompanyView";
|
|
54
|
+
Permissions["V5CompanyDelete"] = "V5CompanyDelete";
|
|
55
|
+
Permissions["V5DivisionViewList"] = "V5DivisionViewList";
|
|
56
|
+
Permissions["V5DivisionExportList"] = "V5DivisionExportList";
|
|
57
|
+
Permissions["V5DivisionCreateNew"] = "V5DivisionCreateNew";
|
|
58
|
+
Permissions["V5DivisionEdit"] = "V5DivisionEdit";
|
|
59
|
+
Permissions["V5DivisionView"] = "V5DivisionView";
|
|
60
|
+
Permissions["V5DivisionDelete"] = "V5DivisionDelete";
|
|
61
|
+
Permissions["V5UnitViewList"] = "V5UnitViewList";
|
|
62
|
+
Permissions["V5UnitExportList"] = "V5UnitExportList";
|
|
63
|
+
Permissions["V5UnitCreateNew"] = "V5UnitCreateNew";
|
|
64
|
+
Permissions["V5UnitEdit"] = "V5UnitEdit";
|
|
65
|
+
Permissions["V5UnitView"] = "V5UnitView";
|
|
66
|
+
Permissions["V5UnitDelete"] = "V5UnitDelete";
|
|
67
|
+
Permissions["V5UserViewList"] = "V5UserViewList";
|
|
68
|
+
Permissions["V5UserExportList"] = "V5UserExportList";
|
|
69
|
+
Permissions["V5UserView"] = "V5UserView";
|
|
70
|
+
Permissions["V5UserCreateNew"] = "V5UserCreateNew";
|
|
71
|
+
Permissions["V5UserEdit"] = "V5UserEdit";
|
|
72
|
+
Permissions["V5UserDelete"] = "V5UserDelete";
|
|
73
|
+
Permissions["V5MenuMyTests"] = "V5MenuMyTests";
|
|
74
|
+
Permissions["V5TestsInvitationsSend"] = "V5TestsInvitationsSend";
|
|
75
|
+
Permissions["V5TestsInvitationAndEvaluationView"] = "V5TestsInvitationAndEvaluationView";
|
|
76
|
+
Permissions["V5MenuMyReports"] = "V5MenuMyReports";
|
|
77
|
+
Permissions["V5MenuConfiguration"] = "V5MenuConfiguration";
|
|
78
|
+
Permissions["V5CustomReportCreate"] = "V5CustomReportCreate";
|
|
79
|
+
Permissions["V5ParameterizedReportCreate"] = "V5ParameterizedReportCreate";
|
|
80
|
+
Permissions["V5MenuFinancial"] = "V5MenuFinancial";
|
|
81
|
+
Permissions["V5FinancialCreditsView"] = "V5FinancialCreditsView";
|
|
82
|
+
Permissions["V5FinancialUsageExtractView"] = "V5FinancialUsageExtractView";
|
|
83
|
+
Permissions["V5FinancialInvoiceView"] = "V5FinancialInvoiceView";
|
|
84
|
+
})(Permissions || (Permissions = {}));
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* Public API Surface of mapa-library-ui authorize
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
* Public API Surface of mapa-library-ui authorize
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Generated bundle index. Do not edit.
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
export { AuthorizeGuard, Permissions, getUserPermissions, hasAllPermission, hasAnyPermission, hasPermission };
|
|
99
|
+
//# sourceMappingURL=mapa-library-ui-src-lib-core-guards-authorize-guard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapa-library-ui-src-lib-core-guards-authorize-guard.mjs","sources":["../../../projects/mapa-library-ui/src/lib/core/utils/permissions.util.ts","../../../projects/mapa-library-ui/src/lib/core/guards/authorize-guard/authorize.guard.ts","../../../projects/mapa-library-ui/src/lib/core/enums/permissions.enum.ts","../../../projects/mapa-library-ui/src/lib/core/guards/authorize-guard/public-api.ts","../../../projects/mapa-library-ui/src/authorize.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-core-guards-authorize-guard.ts"],"sourcesContent":["import { Permissions } from \"../enums/permissions.enum\";\n\nexport function hasPermission(requiredPermission: Permissions) {\n const userPermissions = getUserPermissions();\n return userPermissions.includes(requiredPermission)\n}\n\nexport function hasAnyPermission(requiredsPermission: Permissions[]) {\n return requiredsPermission.some(rp => hasPermission(rp))\n}\n\nexport function hasAllPermission(requiredsPermission: Permissions[]) {\n return requiredsPermission.every(rp => hasPermission(rp))\n}\n\n\nexport function getUserPermissions(): string[] {\n const permissions = localStorage.getItem('groups') || '';\n return permissions?.split(',')\n}","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { getUserPermissions } from '../../utils/permissions.util';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthorizeGuard implements CanActivate {\n\n constructor(private router: Router) {}\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): boolean | Observable<boolean> | Promise<boolean> {\n const requiredPermission = route.data['permission'];\n const userPermissions = getUserPermissions();\n\n if (userPermissions.includes(requiredPermission)) {\n return true;\n } else {\n this.router.navigate(['/app/acesso-negado']);\n return false;\n }\n }\n \n}\n","export enum Permissions {\n V5CustomReportView = 'V5CustomReportView',\n V5MenuMyOrganization = 'V5MenuMyOrganization',\n V5CompanyViewList = 'V5CompanyViewList',\n V5CompanyExportList = 'V5CompanyExportList',\n V5CompanyCreateNew = 'V5CompanyCreateNew',\n V5CompanyEdit = 'V5CompanyEdit',\n V5CompanyView = 'V5CompanyView',\n V5CompanyDelete = 'V5CompanyDelete',\n V5DivisionViewList = 'V5DivisionViewList',\n V5DivisionExportList = 'V5DivisionExportList',\n V5DivisionCreateNew = 'V5DivisionCreateNew',\n V5DivisionEdit = 'V5DivisionEdit',\n V5DivisionView = 'V5DivisionView',\n V5DivisionDelete = 'V5DivisionDelete',\n V5UnitViewList = 'V5UnitViewList',\n V5UnitExportList = 'V5UnitExportList',\n V5UnitCreateNew = 'V5UnitCreateNew',\n V5UnitEdit = 'V5UnitEdit',\n V5UnitView = 'V5UnitView',\n V5UnitDelete = 'V5UnitDelete',\n V5UserViewList = 'V5UserViewList',\n V5UserExportList = 'V5UserExportList',\n V5UserView = 'V5UserView',\n V5UserCreateNew = 'V5UserCreateNew',\n V5UserEdit = 'V5UserEdit',\n V5UserDelete = 'V5UserDelete',\n V5MenuMyTests = 'V5MenuMyTests',\n V5TestsInvitationsSend = 'V5TestsInvitationsSend',\n V5TestsInvitationAndEvaluationView = 'V5TestsInvitationAndEvaluationView',\n V5MenuMyReports = 'V5MenuMyReports',\n V5MenuConfiguration = 'V5MenuConfiguration',\n V5CustomReportCreate = 'V5CustomReportCreate',\n V5ParameterizedReportCreate = 'V5ParameterizedReportCreate',\n V5MenuFinancial = 'V5MenuFinancial',\n V5FinancialCreditsView = 'V5FinancialCreditsView',\n V5FinancialUsageExtractView = 'V5FinancialUsageExtractView',\n V5FinancialInvoiceView = 'V5FinancialInvoiceView'\n} ","/*\n * Public API Surface of mapa-library-ui authorize\n */\nexport * from './authorize.guard';\n\nexport * from '../../utils/permissions.util';\nexport * from '../../enums/permissions.enum';","/*\n * Public API Surface of mapa-library-ui authorize\n */\n\nexport * from './lib/core/guards/authorize-guard/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './authorize';\n"],"names":[],"mappings":";;;;AAEM,SAAU,aAAa,CAAC,kBAA+B,EAAA;AACzD,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;AAC7C,IAAA,OAAO,eAAe,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAA;AACvD,CAAC;AAEK,SAAU,gBAAgB,CAAC,mBAAkC,EAAA;AAC/D,IAAA,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC,CAAA;AAC5D,CAAC;AAEK,SAAU,gBAAgB,CAAC,mBAAkC,EAAA;AAC/D,IAAA,OAAO,mBAAmB,CAAC,KAAK,CAAC,EAAE,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC,CAAA;AAC7D,CAAC;SAGe,kBAAkB,GAAA;IAC9B,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzD,OAAO,WAAW,KAAX,IAAA,IAAA,WAAW,KAAX,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,WAAW,CAAE,KAAK,CAAC,GAAG,CAAC,CAAA;AAClC;;MCXa,cAAc,CAAA;AAEzB,IAAA,WAAA,CAAoB,MAAc,EAAA;AAAd,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;KAAI;IAEtC,WAAW,CACT,KAA6B,EAC7B,KAA0B,EAAA;QAE1B,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACpD,QAAA,MAAM,eAAe,GAAG,kBAAkB,E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,GAAA,iBAAmC,CAAA;AACnC,IAAA,WAAA,CAAA,qBAAA,CAAA,GAAA,qBAA2C,CAAA;AAC3C,IAAA,WAAA,CAAA,sBAAA,CAAA,GAAA,sBAA6C,CAAA;AAC7C,IAAA,WAAA,CAAA,6BAAA,CAAA,GAAA,6BAA2D,CAAA;AAC3D,IAAA,WAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC,CAAA;AACnC,IAAA,WAAA,CAAA,wBAAA,CAAA,GAAA,wBAAiD,CAAA;AACjD,IAAA,WAAA,CAAA,6BAAA,CAAA,GAAA,6BAA2D,CAAA;AAC3D,IAAA,WAAA,CAAA,wBAAA,CAAA,GAAA,wBAAiD,CAAA;AACrD,CAAC,EAtCW,WAAW,KAAX,WAAW,GAsCtB,EAAA,CAAA,CAAA;;ACtCD;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -56,10 +56,10 @@ class MapaScaleComponent {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
MapaScaleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaScaleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
-
MapaScaleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaScaleComponent, selector: "mapa-scale", inputs: { data: "data", showProgressbar: "showProgressbar" }, ngImport: i0, template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section
|
|
59
|
+
MapaScaleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaScaleComponent, selector: "mapa-scale", inputs: { data: "data", showProgressbar: "showProgressbar" }, ngImport: i0, template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section\n class=\"mapa__card scale-details\"\n *ngFor=\"let scale of competence.scales\"\n >\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension__title\">\n <div class=\"dimension__title--direction\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >\u2191</span\n >\n <ng-template #negativeDirection>\u2193</ng-template>\n </div>\n <div class=\"dimension__title--label\">\n {{ dimension.dimensionName }}\n </div>\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n", styles: [".competence{display:flex;gap:24px;font-family:SF-Pro;width:-moz-fit-content;width:fit-content}.competence__header{display:flex;align-items:center;color:#ea561d;font-size:32px;font-weight:400;line-height:40px;width:100%}.competence__header img{margin-right:16px}.competence .scales--summarized{display:grid;gap:24px;grid-template-columns:1fr 1fr 1fr}.competence .scale-details{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;flex-wrap:wrap;gap:16px;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.competence .scale-details__top{border-bottom:2px solid #8c8f94;width:100%}.competence .scale-details__header{display:flex;align-items:center;justify-content:space-between;width:100%;color:#181818;font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:20px}.competence .scale-details__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px;padding-bottom:16px}.competence .scale-details__concept strong{color:#181818;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.competence .scale-details__dimensions{display:flex;flex-wrap:wrap;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension{display:flex;justify-content:flex-start;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension__main{display:flex;justify-content:space-between;width:100%}.competence .scale-details .dimension--full-sized .dimension{display:flex;gap:32px;width:100%}.competence .scale-details .dimension--full-sized .dimension__main{width:35%}.competence .scale-details .dimension--full-sized .dimension__concept{width:65%}.competence .scale-details .dimension__title{display:flex;align-items:center;justify-content:center;color:#181818;font-size:16px;font-style:normal;font-weight:400;line-height:24px;gap:8px}.competence .scale-details .dimension--classification{display:flex;align-items:center;justify-content:center}.competence .scale-details .dimension__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MapaProgressbarComponent, selector: "mapa-progressbar", inputs: ["data", "showInterval"] }] });
|
|
60
60
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaScaleComponent, decorators: [{
|
|
61
61
|
type: Component,
|
|
62
|
-
args: [{ selector: "mapa-scale", template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section
|
|
62
|
+
args: [{ selector: "mapa-scale", template: "<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section\n class=\"mapa__card scale-details\"\n *ngFor=\"let scale of competence.scales\"\n >\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension__title\">\n <div class=\"dimension__title--direction\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >\u2191</span\n >\n <ng-template #negativeDirection>\u2193</ng-template>\n </div>\n <div class=\"dimension__title--label\">\n {{ dimension.dimensionName }}\n </div>\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n", styles: [".competence{display:flex;gap:24px;font-family:SF-Pro;width:-moz-fit-content;width:fit-content}.competence__header{display:flex;align-items:center;color:#ea561d;font-size:32px;font-weight:400;line-height:40px;width:100%}.competence__header img{margin-right:16px}.competence .scales--summarized{display:grid;gap:24px;grid-template-columns:1fr 1fr 1fr}.competence .scale-details{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:column;flex-wrap:wrap;gap:16px;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.competence .scale-details__top{border-bottom:2px solid #8c8f94;width:100%}.competence .scale-details__header{display:flex;align-items:center;justify-content:space-between;width:100%;color:#181818;font-size:24px;font-style:normal;font-weight:500;line-height:32px;margin-bottom:20px}.competence .scale-details__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px;padding-bottom:16px}.competence .scale-details__concept strong{color:#181818;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.competence .scale-details__dimensions{display:flex;flex-wrap:wrap;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension{display:flex;justify-content:flex-start;gap:24px;width:100%;height:-moz-fit-content;height:fit-content}.competence .scale-details .dimension__main{display:flex;justify-content:space-between;width:100%}.competence .scale-details .dimension--full-sized .dimension{display:flex;gap:32px;width:100%}.competence .scale-details .dimension--full-sized .dimension__main{width:35%}.competence .scale-details .dimension--full-sized .dimension__concept{width:65%}.competence .scale-details .dimension__title{display:flex;align-items:center;justify-content:center;color:#181818;font-size:16px;font-style:normal;font-weight:400;line-height:24px;gap:8px}.competence .scale-details .dimension--classification{display:flex;align-items:center;justify-content:center}.competence .scale-details .dimension__concept{color:#50575e;font-size:16px;font-style:normal;font-weight:400;line-height:24px}\n"] }]
|
|
63
63
|
}], propDecorators: { data: [{
|
|
64
64
|
type: Input
|
|
65
65
|
}], showProgressbar: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapa-library-ui-src-lib-components-scale.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/scale/src/progressbar/progressbar.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/progressbar/progressbar.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/details/details.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/details/details.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.module.ts","../../../projects/mapa-library-ui/src/lib/components/scale/public-api.ts","../../../projects/mapa-library-ui/src/scale.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-scale.ts"],"sourcesContent":["import { Component, Input } from \"@angular/core\";\nimport { ProgressBar } from \"../scale.interface\";\n\n@Component({\n selector: \"mapa-progressbar\",\n templateUrl: \"./progressbar.component.html\",\n styleUrls: [\"./progressbar.component.scss\"],\n})\nexport class MapaProgressbarComponent {\n @Input() data!: ProgressBar;\n @Input() showInterval: boolean = true;\n}\n","<div class=\"progress-bar\">\n <div class=\"progress-bar--bg\">\n <div\n class=\"progress-bar--filled\"\n [style.width.%]=\"data.interval\"\n [style.backgroundColor]=\"data.classification?.classificationColor\"\n ></div>\n </div>\n <div class=\"progress-bar--interval\" *ngIf=\"showInterval\">\n {{data.interval}}%\n </div>\n</div>\n","import { Component, Input } from \"@angular/core\";\nimport { Dimension } from \"../../group-report/src/group-report-interface\";\nimport { Competence, Scale, ProgressBar } from \"./scale.interface\";\n\n@Component({\n selector: \"mapa-scale\",\n templateUrl: \"./scale.component.html\",\n styleUrls: [\"./scale.component.scss\"],\n})\nexport class MapaScaleComponent {\n @Input() data!: Competence[];\n @Input() showProgressbar: boolean = true;\n\n getProgressbarData(scale: Scale): ProgressBar {\n return {\n interval: scale.interval,\n classification: scale.classification!,\n };\n }\n\n isPositive(dimension: Dimension): boolean {\n return dimension.direction === \"Positiva\";\n }\n\n showSummarized(scale: Scale): boolean {\n return scale?.scaleConcept === undefined;\n }\n\n getCompetenceImg(competence: Competence): string {\n let img = \"\";\n if (competence.competenceName.includes(\"Gestão\")) {\n img = \"UsersThree\";\n }\n if (competence.competenceName.includes(\"Autogestão\")) {\n img = \"Brain\";\n }\n if (competence.competenceName.includes(\"Relacionamento\")) {\n img = \"Handshake\";\n }\n if (competence.competenceName.includes(\"Atividade\")) {\n img = \"ListCheck\";\n }\n if (competence.competenceName.includes(\"Corporais\")) {\n img = \"Warning\";\n }\n return `assets/images/icons/${img}.svg`;\n }\n}\n","<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section class=\"mapa__card scale-details\" *ngFor=\"let scale of competence.scales\">\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension--title\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >↑</span\n >\n <ng-template #negativeDirection>↓</ng-template>\n {{ dimension.dimensionName }}\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'mapa-details',\n templateUrl: './details.component.html',\n styleUrls: ['./details.component.scss']\n})\nexport class MapaDetailsComponent {\n\n}\n","<p>details works!</p>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MapaScaleComponent } from \"./scale.component\";\nimport { MapaProgressbarComponent } from \"./progressbar/progressbar.component\";\nimport { MapaDetailsComponent } from \"./details/details.component\";\n\n@NgModule({\n declarations: [\n MapaScaleComponent,\n MapaProgressbarComponent,\n MapaDetailsComponent,\n ],\n exports: [\n MapaScaleComponent,\n MapaProgressbarComponent,\n MapaDetailsComponent,\n ],\n imports: [CommonModule],\n})\nexport class MapaScaleModule {}\n","/*\n * Public API Surface of mapa-library-ui scale\n */\n\nexport * from './src/scale.component';\nexport * from './src/scale.module';\nexport * from './src/progressbar/progressbar.component';\nexport * from './src/details/details.component';","/*\n * Public API Surface of mapa-library-ui scale\n */\n\nexport * from './lib/components/scale/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './scale';\n"],"names":["i2.MapaProgressbarComponent"],"mappings":";;;;;MAQa,wBAAwB,CAAA;AALrC,IAAA,WAAA,GAAA;QAOW,IAAY,CAAA,YAAA,GAAY,IAAI,CAAC;AACvC,KAAA;;sHAHY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,gHCRrC,2WAYA,EAAA,MAAA,EAAA,CAAA,4eAAA,CAAA,EAAA,YAAA,EAAA,CAAA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,oBAAA,YAAY,EAAE;wBACZ,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA,CAAA;;;AClBD;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mapa-library-ui-src-lib-components-scale.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/scale/src/progressbar/progressbar.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/progressbar/progressbar.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/details/details.component.ts","../../../projects/mapa-library-ui/src/lib/components/scale/src/details/details.component.html","../../../projects/mapa-library-ui/src/lib/components/scale/src/scale.module.ts","../../../projects/mapa-library-ui/src/lib/components/scale/public-api.ts","../../../projects/mapa-library-ui/src/scale.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-scale.ts"],"sourcesContent":["import { Component, Input } from \"@angular/core\";\nimport { ProgressBar } from \"../scale.interface\";\n\n@Component({\n selector: \"mapa-progressbar\",\n templateUrl: \"./progressbar.component.html\",\n styleUrls: [\"./progressbar.component.scss\"],\n})\nexport class MapaProgressbarComponent {\n @Input() data!: ProgressBar;\n @Input() showInterval: boolean = true;\n}\n","<div class=\"progress-bar\">\n <div class=\"progress-bar--bg\">\n <div\n class=\"progress-bar--filled\"\n [style.width.%]=\"data.interval\"\n [style.backgroundColor]=\"data.classification?.classificationColor\"\n ></div>\n </div>\n <div class=\"progress-bar--interval\" *ngIf=\"showInterval\">\n {{data.interval}}%\n </div>\n</div>\n","import { Component, Input } from \"@angular/core\";\nimport { Dimension } from \"../../group-report/src/group-report-interface\";\nimport { Competence, Scale, ProgressBar } from \"./scale.interface\";\n\n@Component({\n selector: \"mapa-scale\",\n templateUrl: \"./scale.component.html\",\n styleUrls: [\"./scale.component.scss\"],\n})\nexport class MapaScaleComponent {\n @Input() data!: Competence[];\n @Input() showProgressbar: boolean = true;\n\n getProgressbarData(scale: Scale): ProgressBar {\n return {\n interval: scale.interval,\n classification: scale.classification!,\n };\n }\n\n isPositive(dimension: Dimension): boolean {\n return dimension.direction === \"Positiva\";\n }\n\n showSummarized(scale: Scale): boolean {\n return scale?.scaleConcept === undefined;\n }\n\n getCompetenceImg(competence: Competence): string {\n let img = \"\";\n if (competence.competenceName.includes(\"Gestão\")) {\n img = \"UsersThree\";\n }\n if (competence.competenceName.includes(\"Autogestão\")) {\n img = \"Brain\";\n }\n if (competence.competenceName.includes(\"Relacionamento\")) {\n img = \"Handshake\";\n }\n if (competence.competenceName.includes(\"Atividade\")) {\n img = \"ListCheck\";\n }\n if (competence.competenceName.includes(\"Corporais\")) {\n img = \"Warning\";\n }\n return `assets/images/icons/${img}.svg`;\n }\n}\n","<section class=\"mapa__card competence\" *ngFor=\"let competence of data\">\n <header class=\"competence__header\">\n <img [src]=\"getCompetenceImg(competence)\" />\n {{ competence.competenceName }}\n </header>\n <section\n class=\"scales\"\n [class.scales--full-sized]=\"!showSummarized(competence.scales[0])\"\n [class.scales--summarized]=\"showSummarized(competence.scales[0])\"\n >\n <section\n class=\"mapa__card scale-details\"\n *ngFor=\"let scale of competence.scales\"\n >\n <section class=\"scale-details__top\">\n <header class=\"scale-details__header\">\n <div class=\"scale__header--title mapa--display-m\">\n {{ scale.scaleName }}\n <div\n *ngIf=\"scale.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"scale.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"scale.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ scale.classification.classificationName }}</span\n >\n </div>\n </div>\n <div\n *ngIf=\"showProgressbar && scale.interval\"\n class=\"scale__header--progressbar\"\n >\n <mapa-progressbar\n [data]=\"getProgressbarData(scale)\"\n ></mapa-progressbar>\n </div>\n </header>\n <article *ngIf=\"scale.scaleConcept\" class=\"scale-details__concept\">\n <strong>Conceito:</strong> {{ scale.scaleConcept }}\n </article>\n </section>\n <section\n class=\"scale-details__dimensions\"\n [class.dimension--full-sized]=\"!showSummarized(scale)\"\n [class.dimension--summarized]=\"showSummarized(scale)\"\n >\n <article\n *ngFor=\"let dimension of scale.dimensions\"\n class=\"mapa__card--sm dimension\"\n >\n <nav class=\"dimension__main\">\n <div class=\"dimension__title\">\n <div class=\"dimension__title--direction\">\n <span\n *ngIf=\"dimension.direction === 'Positiva'; else negativeDirection\"\n >↑</span\n >\n <ng-template #negativeDirection>↓</ng-template>\n </div>\n <div class=\"dimension__title--label\">\n {{ dimension.dimensionName }}\n </div>\n </div>\n <div class=\"dimension--classification\">\n <div\n *ngIf=\"dimension.classification\"\n class=\"mapa__tag--bg\"\n [style.backgroundColor]=\"dimension.classification.classificationColor\"\n [class.mapa__tag--contrast]=\"dimension.classification.classificationId === 1\"\n >\n <span class=\"mapa__tag--text\"\n >{{ dimension.classification.classificationName }}</span\n >\n </div>\n </div>\n </nav>\n <div\n *ngIf=\"dimension.dimensionClassificationMessage\"\n class=\"dimension__concept\"\n >\n {{ dimension.dimensionClassificationMessage }}\n </div>\n </article>\n </section>\n </section>\n </section>\n</section>\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'mapa-details',\n templateUrl: './details.component.html',\n styleUrls: ['./details.component.scss']\n})\nexport class MapaDetailsComponent {\n\n}\n","<p>details works!</p>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { MapaScaleComponent } from \"./scale.component\";\nimport { MapaProgressbarComponent } from \"./progressbar/progressbar.component\";\nimport { MapaDetailsComponent } from \"./details/details.component\";\n\n@NgModule({\n declarations: [\n MapaScaleComponent,\n MapaProgressbarComponent,\n MapaDetailsComponent,\n ],\n exports: [\n MapaScaleComponent,\n MapaProgressbarComponent,\n MapaDetailsComponent,\n ],\n imports: [CommonModule],\n})\nexport class MapaScaleModule {}\n","/*\n * Public API Surface of mapa-library-ui scale\n */\n\nexport * from './src/scale.component';\nexport * from './src/scale.module';\nexport * from './src/progressbar/progressbar.component';\nexport * from './src/details/details.component';","/*\n * Public API Surface of mapa-library-ui scale\n */\n\nexport * from './lib/components/scale/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './scale';\n"],"names":["i2.MapaProgressbarComponent"],"mappings":";;;;;MAQa,wBAAwB,CAAA;AALrC,IAAA,WAAA,GAAA;QAOW,IAAY,CAAA,YAAA,GAAY,IAAI,CAAC;AACvC,KAAA;;sHAHY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,gHCRrC,2WAYA,EAAA,MAAA,EAAA,CAAA,4eAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;4FDJa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;+BACE,kBAAkB,EAAA,QAAA,EAAA,2WAAA,EAAA,MAAA,EAAA,CAAA,4eAAA,CAAA,EAAA,CAAA;8BAKnB,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;;;MEDK,kBAAkB,CAAA;AAL/B,IAAA,WAAA,GAAA;QAOW,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAo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A,EAAA,CAAA;;;MEgBb,eAAe,CAAA;;6GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,iBAXxB,kBAAkB;QAClB,wBAAwB;QACxB,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAOZ,YAAY,CAAA,EAAA,OAAA,EAAA,CAJpB,kBAAkB;QAClB,wBAAwB;QACxB,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAIX,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFhB,YAAY,CAAA,EAAA,CAAA,CAAA;4FAEX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA,CAAA;;;AClBD;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/router';
|
|
4
|
+
|
|
5
|
+
function hasPermission(requiredPermission) {
|
|
6
|
+
const userPermissions = getUserPermissions();
|
|
7
|
+
return userPermissions.includes(requiredPermission);
|
|
8
|
+
}
|
|
9
|
+
function hasAnyPermission(requiredsPermission) {
|
|
10
|
+
return requiredsPermission.some(rp => hasPermission(rp));
|
|
11
|
+
}
|
|
12
|
+
function hasAllPermission(requiredsPermission) {
|
|
13
|
+
return requiredsPermission.every(rp => hasPermission(rp));
|
|
14
|
+
}
|
|
15
|
+
function getUserPermissions() {
|
|
16
|
+
const permissions = localStorage.getItem('groups') || '';
|
|
17
|
+
return permissions?.split(',');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class AuthorizeGuard {
|
|
21
|
+
constructor(router) {
|
|
22
|
+
this.router = router;
|
|
23
|
+
}
|
|
24
|
+
canActivate(route, state) {
|
|
25
|
+
const requiredPermission = route.data['permission'];
|
|
26
|
+
const userPermissions = getUserPermissions();
|
|
27
|
+
if (userPermissions.includes(requiredPermission)) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
this.router.navigate(['/app/acesso-negado']);
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
AuthorizeGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
37
|
+
AuthorizeGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, providedIn: 'root' });
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AuthorizeGuard, decorators: [{
|
|
39
|
+
type: Injectable,
|
|
40
|
+
args: [{
|
|
41
|
+
providedIn: 'root'
|
|
42
|
+
}]
|
|
43
|
+
}], ctorParameters: function () { return [{ type: i1.Router }]; } });
|
|
44
|
+
|
|
45
|
+
var Permissions;
|
|
46
|
+
(function (Permissions) {
|
|
47
|
+
Permissions["V5CustomReportView"] = "V5CustomReportView";
|
|
48
|
+
Permissions["V5MenuMyOrganization"] = "V5MenuMyOrganization";
|
|
49
|
+
Permissions["V5CompanyViewList"] = "V5CompanyViewList";
|
|
50
|
+
Permissions["V5CompanyExportList"] = "V5CompanyExportList";
|
|
51
|
+
Permissions["V5CompanyCreateNew"] = "V5CompanyCreateNew";
|
|
52
|
+
Permissions["V5CompanyEdit"] = "V5CompanyEdit";
|
|
53
|
+
Permissions["V5CompanyView"] = "V5CompanyView";
|
|
54
|
+
Permissions["V5CompanyDelete"] = "V5CompanyDelete";
|
|
55
|
+
Permissions["V5DivisionViewList"] = "V5DivisionViewList";
|
|
56
|
+
Permissions["V5DivisionExportList"] = "V5DivisionExportList";
|
|
57
|
+
Permissions["V5DivisionCreateNew"] = "V5DivisionCreateNew";
|
|
58
|
+
Permissions["V5DivisionEdit"] = "V5DivisionEdit";
|
|
59
|
+
Permissions["V5DivisionView"] = "V5DivisionView";
|
|
60
|
+
Permissions["V5DivisionDelete"] = "V5DivisionDelete";
|
|
61
|
+
Permissions["V5UnitViewList"] = "V5UnitViewList";
|
|
62
|
+
Permissions["V5UnitExportList"] = "V5UnitExportList";
|
|
63
|
+
Permissions["V5UnitCreateNew"] = "V5UnitCreateNew";
|
|
64
|
+
Permissions["V5UnitEdit"] = "V5UnitEdit";
|
|
65
|
+
Permissions["V5UnitView"] = "V5UnitView";
|
|
66
|
+
Permissions["V5UnitDelete"] = "V5UnitDelete";
|
|
67
|
+
Permissions["V5UserViewList"] = "V5UserViewList";
|
|
68
|
+
Permissions["V5UserExportList"] = "V5UserExportList";
|
|
69
|
+
Permissions["V5UserView"] = "V5UserView";
|
|
70
|
+
Permissions["V5UserCreateNew"] = "V5UserCreateNew";
|
|
71
|
+
Permissions["V5UserEdit"] = "V5UserEdit";
|
|
72
|
+
Permissions["V5UserDelete"] = "V5UserDelete";
|
|
73
|
+
Permissions["V5MenuMyTests"] = "V5MenuMyTests";
|
|
74
|
+
Permissions["V5TestsInvitationsSend"] = "V5TestsInvitationsSend";
|
|
75
|
+
Permissions["V5TestsInvitationAndEvaluationView"] = "V5TestsInvitationAndEvaluationView";
|
|
76
|
+
Permissions["V5MenuMyReports"] = "V5MenuMyReports";
|
|
77
|
+
Permissions["V5MenuConfiguration"] = "V5MenuConfiguration";
|
|
78
|
+
Permissions["V5CustomReportCreate"] = "V5CustomReportCreate";
|
|
79
|
+
Permissions["V5ParameterizedReportCreate"] = "V5ParameterizedReportCreate";
|
|
80
|
+
Permissions["V5MenuFinancial"] = "V5MenuFinancial";
|
|
81
|
+
Permissions["V5FinancialCreditsView"] = "V5FinancialCreditsView";
|
|
82
|
+
Permissions["V5FinancialUsageExtractView"] = "V5FinancialUsageExtractView";
|
|
83
|
+
Permissions["V5FinancialInvoiceView"] = "V5FinancialInvoiceView";
|
|
84
|
+
})(Permissions || (Permissions = {}));
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* Public API Surface of mapa-library-ui authorize
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
* Public API Surface of mapa-library-ui authorize
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Generated bundle index. Do not edit.
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
export { AuthorizeGuard, Permissions, getUserPermissions, hasAllPermission, hasAnyPermission, hasPermission };
|
|
99
|
+
//# sourceMappingURL=mapa-library-ui-src-lib-core-guards-authorize-guard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapa-library-ui-src-lib-core-guards-authorize-guard.mjs","sources":["../../../projects/mapa-library-ui/src/lib/core/utils/permissions.util.ts","../../../projects/mapa-library-ui/src/lib/core/guards/authorize-guard/authorize.guard.ts","../../../projects/mapa-library-ui/src/lib/core/enums/permissions.enum.ts","../../../projects/mapa-library-ui/src/lib/core/guards/authorize-guard/public-api.ts","../../../projects/mapa-library-ui/src/authorize.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-core-guards-authorize-guard.ts"],"sourcesContent":["import { Permissions } from \"../enums/permissions.enum\";\n\nexport function hasPermission(requiredPermission: Permissions) {\n const userPermissions = getUserPermissions();\n return userPermissions.includes(requiredPermission)\n}\n\nexport function hasAnyPermission(requiredsPermission: Permissions[]) {\n return requiredsPermission.some(rp => hasPermission(rp))\n}\n\nexport function hasAllPermission(requiredsPermission: Permissions[]) {\n return requiredsPermission.every(rp => hasPermission(rp))\n}\n\n\nexport function getUserPermissions(): string[] {\n const permissions = localStorage.getItem('groups') || '';\n return permissions?.split(',')\n}","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { getUserPermissions } from '../../utils/permissions.util';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthorizeGuard implements CanActivate {\n\n constructor(private router: Router) {}\n\n canActivate(\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): boolean | Observable<boolean> | Promise<boolean> {\n const requiredPermission = route.data['permission'];\n const userPermissions = getUserPermissions();\n\n if (userPermissions.includes(requiredPermission)) {\n return true;\n } else {\n this.router.navigate(['/app/acesso-negado']);\n return false;\n }\n }\n \n}\n","export enum Permissions {\n V5CustomReportView = 'V5CustomReportView',\n V5MenuMyOrganization = 'V5MenuMyOrganization',\n V5CompanyViewList = 'V5CompanyViewList',\n V5CompanyExportList = 'V5CompanyExportList',\n V5CompanyCreateNew = 'V5CompanyCreateNew',\n V5CompanyEdit = 'V5CompanyEdit',\n V5CompanyView = 'V5CompanyView',\n V5CompanyDelete = 'V5CompanyDelete',\n V5DivisionViewList = 'V5DivisionViewList',\n V5DivisionExportList = 'V5DivisionExportList',\n V5DivisionCreateNew = 'V5DivisionCreateNew',\n V5DivisionEdit = 'V5DivisionEdit',\n V5DivisionView = 'V5DivisionView',\n V5DivisionDelete = 'V5DivisionDelete',\n V5UnitViewList = 'V5UnitViewList',\n V5UnitExportList = 'V5UnitExportList',\n V5UnitCreateNew = 'V5UnitCreateNew',\n V5UnitEdit = 'V5UnitEdit',\n V5UnitView = 'V5UnitView',\n V5UnitDelete = 'V5UnitDelete',\n V5UserViewList = 'V5UserViewList',\n V5UserExportList = 'V5UserExportList',\n V5UserView = 'V5UserView',\n V5UserCreateNew = 'V5UserCreateNew',\n V5UserEdit = 'V5UserEdit',\n V5UserDelete = 'V5UserDelete',\n V5MenuMyTests = 'V5MenuMyTests',\n V5TestsInvitationsSend = 'V5TestsInvitationsSend',\n V5TestsInvitationAndEvaluationView = 'V5TestsInvitationAndEvaluationView',\n V5MenuMyReports = 'V5MenuMyReports',\n V5MenuConfiguration = 'V5MenuConfiguration',\n V5CustomReportCreate = 'V5CustomReportCreate',\n V5ParameterizedReportCreate = 'V5ParameterizedReportCreate',\n V5MenuFinancial = 'V5MenuFinancial',\n V5FinancialCreditsView = 'V5FinancialCreditsView',\n V5FinancialUsageExtractView = 'V5FinancialUsageExtractView',\n V5FinancialInvoiceView = 'V5FinancialInvoiceView'\n} ","/*\n * Public API Surface of mapa-library-ui authorize\n */\nexport * from './authorize.guard';\n\nexport * from '../../utils/permissions.util';\nexport * from '../../enums/permissions.enum';","/*\n * Public API Surface of mapa-library-ui authorize\n */\n\nexport * from './lib/core/guards/authorize-guard/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './authorize';\n"],"names":[],"mappings":";;;;AAEM,SAAU,aAAa,CAAC,kBAA+B,EAAA;AACzD,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;AAC7C,IAAA,OAAO,eAAe,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAA;AACvD,CAAC;AAEK,SAAU,gBAAgB,CAAC,mBAAkC,EAAA;AAC/D,IAAA,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC,CAAA;AAC5D,CAAC;AAEK,SAAU,gBAAgB,CAAC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"0.43.9",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^15.2.0",
|
|
6
6
|
"@angular/core": "^15.2.0"
|
|
@@ -226,6 +226,14 @@
|
|
|
226
226
|
"es2015": "./fesm2015/mapa-library-ui-src-lib-components-warning.mjs",
|
|
227
227
|
"node": "./fesm2015/mapa-library-ui-src-lib-components-warning.mjs",
|
|
228
228
|
"default": "./fesm2020/mapa-library-ui-src-lib-components-warning.mjs"
|
|
229
|
+
},
|
|
230
|
+
"./src/lib/core/guards/authorize-guard": {
|
|
231
|
+
"types": "./src/lib/core/guards/authorize-guard/index.d.ts",
|
|
232
|
+
"esm2020": "./esm2020/src/lib/core/guards/authorize-guard/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs",
|
|
233
|
+
"es2020": "./fesm2020/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs",
|
|
234
|
+
"es2015": "./fesm2015/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs",
|
|
235
|
+
"node": "./fesm2015/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs",
|
|
236
|
+
"default": "./fesm2020/mapa-library-ui-src-lib-core-guards-authorize-guard.mjs"
|
|
229
237
|
}
|
|
230
238
|
}
|
|
231
239
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/core/guards/authorize-guard/public-api';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare enum Permissions {
|
|
2
|
+
V5CustomReportView = "V5CustomReportView",
|
|
3
|
+
V5MenuMyOrganization = "V5MenuMyOrganization",
|
|
4
|
+
V5CompanyViewList = "V5CompanyViewList",
|
|
5
|
+
V5CompanyExportList = "V5CompanyExportList",
|
|
6
|
+
V5CompanyCreateNew = "V5CompanyCreateNew",
|
|
7
|
+
V5CompanyEdit = "V5CompanyEdit",
|
|
8
|
+
V5CompanyView = "V5CompanyView",
|
|
9
|
+
V5CompanyDelete = "V5CompanyDelete",
|
|
10
|
+
V5DivisionViewList = "V5DivisionViewList",
|
|
11
|
+
V5DivisionExportList = "V5DivisionExportList",
|
|
12
|
+
V5DivisionCreateNew = "V5DivisionCreateNew",
|
|
13
|
+
V5DivisionEdit = "V5DivisionEdit",
|
|
14
|
+
V5DivisionView = "V5DivisionView",
|
|
15
|
+
V5DivisionDelete = "V5DivisionDelete",
|
|
16
|
+
V5UnitViewList = "V5UnitViewList",
|
|
17
|
+
V5UnitExportList = "V5UnitExportList",
|
|
18
|
+
V5UnitCreateNew = "V5UnitCreateNew",
|
|
19
|
+
V5UnitEdit = "V5UnitEdit",
|
|
20
|
+
V5UnitView = "V5UnitView",
|
|
21
|
+
V5UnitDelete = "V5UnitDelete",
|
|
22
|
+
V5UserViewList = "V5UserViewList",
|
|
23
|
+
V5UserExportList = "V5UserExportList",
|
|
24
|
+
V5UserView = "V5UserView",
|
|
25
|
+
V5UserCreateNew = "V5UserCreateNew",
|
|
26
|
+
V5UserEdit = "V5UserEdit",
|
|
27
|
+
V5UserDelete = "V5UserDelete",
|
|
28
|
+
V5MenuMyTests = "V5MenuMyTests",
|
|
29
|
+
V5TestsInvitationsSend = "V5TestsInvitationsSend",
|
|
30
|
+
V5TestsInvitationAndEvaluationView = "V5TestsInvitationAndEvaluationView",
|
|
31
|
+
V5MenuMyReports = "V5MenuMyReports",
|
|
32
|
+
V5MenuConfiguration = "V5MenuConfiguration",
|
|
33
|
+
V5CustomReportCreate = "V5CustomReportCreate",
|
|
34
|
+
V5ParameterizedReportCreate = "V5ParameterizedReportCreate",
|
|
35
|
+
V5MenuFinancial = "V5MenuFinancial",
|
|
36
|
+
V5FinancialCreditsView = "V5FinancialCreditsView",
|
|
37
|
+
V5FinancialUsageExtractView = "V5FinancialUsageExtractView",
|
|
38
|
+
V5FinancialInvoiceView = "V5FinancialInvoiceView"
|
|
39
|
+
}
|
package/src/lib/core/guards/authorize-guard/lib/core/guards/authorize-guard/authorize.guard.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AuthorizeGuard implements CanActivate {
|
|
5
|
+
private router;
|
|
6
|
+
constructor(router: Router);
|
|
7
|
+
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | Observable<boolean> | Promise<boolean>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthorizeGuard, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthorizeGuard>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Permissions } from "../enums/permissions.enum";
|
|
2
|
+
export declare function hasPermission(requiredPermission: Permissions): boolean;
|
|
3
|
+
export declare function hasAnyPermission(requiredsPermission: Permissions[]): boolean;
|
|
4
|
+
export declare function hasAllPermission(requiredsPermission: Permissions[]): boolean;
|
|
5
|
+
export declare function getUserPermissions(): string[];
|
|
Binary file
|