@ieeesa-npm/presentation 0.6.0 → 0.6.1
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/esm2022/lib/components/legend/legend.component.mjs +20 -2
- package/esm2022/lib/models/legend.model.mjs +1 -1
- package/fesm2022/ieeesa-npm-presentation.mjs +19 -1
- package/fesm2022/ieeesa-npm-presentation.mjs.map +1 -1
- package/lib/components/legend/legend.component.d.ts +7 -2
- package/lib/models/legend.model.d.ts +1 -0
- package/package.json +2 -2
|
@@ -4,16 +4,34 @@ import { SetBackgroundDirective } from '../../directives/set-background/set-back
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "@angular/common";
|
|
6
6
|
export class LegendComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.isSortingNeeded = false;
|
|
9
|
+
}
|
|
10
|
+
set isSorting(value) {
|
|
11
|
+
this.isSortingNeeded = value;
|
|
12
|
+
}
|
|
13
|
+
get isSorting() {
|
|
14
|
+
return this.isSortingNeeded;
|
|
15
|
+
}
|
|
16
|
+
ngOnInit() {
|
|
17
|
+
if (this.isSortingNeeded) {
|
|
18
|
+
this.legends?.sort((a, b) => {
|
|
19
|
+
return a?.hierarchy - b?.hierarchy;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
7
23
|
trackByFn(index, item) {
|
|
8
24
|
return item.label;
|
|
9
25
|
}
|
|
10
26
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: LegendComponent, isStandalone: true, selector: "ieeesa-legend", inputs: { legends: "legends" }, ngImport: i0, template: "<div class=\"ieeesa-legend d-flex flex-column flex-wrap flex-sm-row\">\r\n <div\r\n *ngFor=\"let item of legends; trackBy: trackByFn\"\r\n class=\"ieeesa-legend__indicator d-flex\"\r\n >\r\n <div\r\n class=\"ieeesa-legend__square\"\r\n [ngClass]=\"item.color\"\r\n ieeesaSetBackground\r\n [background]=\"{ imgURL: '', color: item.color }\"\r\n ></div>\r\n <p class=\"ieeesa-body-md-16 px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;min-width:.8em;height:.8em;margin-top:.2em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: SetBackgroundDirective, selector: "[ieeesaSetBackground]", inputs: ["background"] }] }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: LegendComponent, isStandalone: true, selector: "ieeesa-legend", inputs: { legends: "legends", isSorting: "isSorting" }, ngImport: i0, template: "<div class=\"ieeesa-legend d-flex flex-column flex-wrap flex-sm-row\">\r\n <div\r\n *ngFor=\"let item of legends; trackBy: trackByFn\"\r\n class=\"ieeesa-legend__indicator d-flex\"\r\n >\r\n <div\r\n class=\"ieeesa-legend__square\"\r\n [ngClass]=\"item.color\"\r\n ieeesaSetBackground\r\n [background]=\"{ imgURL: '', color: item.color }\"\r\n ></div>\r\n <p class=\"ieeesa-body-md-16 px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;min-width:.8em;height:.8em;margin-top:.2em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: SetBackgroundDirective, selector: "[ieeesaSetBackground]", inputs: ["background"] }] }); }
|
|
12
28
|
}
|
|
13
29
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LegendComponent, decorators: [{
|
|
14
30
|
type: Component,
|
|
15
31
|
args: [{ selector: 'ieeesa-legend', standalone: true, imports: [CommonModule, SetBackgroundDirective], template: "<div class=\"ieeesa-legend d-flex flex-column flex-wrap flex-sm-row\">\r\n <div\r\n *ngFor=\"let item of legends; trackBy: trackByFn\"\r\n class=\"ieeesa-legend__indicator d-flex\"\r\n >\r\n <div\r\n class=\"ieeesa-legend__square\"\r\n [ngClass]=\"item.color\"\r\n ieeesaSetBackground\r\n [background]=\"{ imgURL: '', color: item.color }\"\r\n ></div>\r\n <p class=\"ieeesa-body-md-16 px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;min-width:.8em;height:.8em;margin-top:.2em}\n"] }]
|
|
16
32
|
}], propDecorators: { legends: [{
|
|
17
33
|
type: Input
|
|
34
|
+
}], isSorting: [{
|
|
35
|
+
type: Input
|
|
18
36
|
}] } });
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGVnZW5kLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ByZXNlbnRhdGlvbi9zcmMvbGliL2NvbXBvbmVudHMvbGVnZW5kL2xlZ2VuZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9wcmVzZW50YXRpb24vc3JjL2xpYi9jb21wb25lbnRzL2xlZ2VuZC9sZWdlbmQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQ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6IHZvaWQge1xyXG4gICAgaWYodGhpcy5pc1NvcnRpbmdOZWVkZWQpe1xyXG4gICAgICB0aGlzLmxlZ2VuZHM/LnNvcnQoKGEsIGIpID0+IHtcclxuICAgICAgICByZXR1cm4gYT8uaGllcmFyY2h5IC0gYj8uaGllcmFyY2h5XHJcbiAgICAgIH0pXHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICB0cmFja0J5Rm4oaW5kZXg6IG51bWJlciwgaXRlbTogTGVnZW5kKTogc3RyaW5nIHtcclxuICAgIHJldHVybiBpdGVtLmxhYmVsO1xyXG4gIH1cclxufVxyXG4iLCI8ZGl2IGNsYXNzPVwiaWVlZXNhLWxlZ2VuZCBkLWZsZXggZmxleC1jb2x1bW4gZmxleC13cmFwIGZsZXgtc20tcm93XCI+XHJcbiAgPGRpdlxyXG4gICAgKm5nRm9yPVwibGV0IGl0ZW0gb2YgbGVnZW5kczsgdHJhY2tCeTogdHJhY2tCeUZuXCJcclxuICAgIGNsYXNzPVwiaWVlZXNhLWxlZ2VuZF9faW5kaWNhdG9yIGQtZmxleFwiXHJcbiAgPlxyXG4gICAgPGRpdlxyXG4gICAgICBjbGFzcz1cImllZWVzYS1sZWdlbmRfX3NxdWFyZVwiXHJcbiAgICAgIFtuZ0NsYXNzXT1cIml0ZW0uY29sb3JcIlxyXG4gICAgICBpZWVlc2FTZXRCYWNrZ3JvdW5kXHJcbiAgICAgIFtiYWNrZ3JvdW5kXT1cInsgaW1nVVJMOiAnJywgY29sb3I6IGl0ZW0uY29sb3IgfVwiXHJcbiAgICA+PC9kaXY+XHJcbiAgICA8cCBjbGFzcz1cImllZWVzYS1ib2R5LW1kLTE2IHB4LTJcIj57eyBpdGVtLmxhYmVsIH19PC9wPlxyXG4gIDwvZGl2PlxyXG48L2Rpdj5cclxuIl19
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGVnZW5kLm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcHJlc2VudGF0aW9uL3NyYy9saWIvbW9kZWxzL2xlZ2VuZC5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBMZWdlbmQge1xyXG4gIGxhYmVsOiBzdHJpbmc7XHJcbiAgY29sb3I6IHN0cmluZztcclxuICBoaWVyYXJjaHk6IG51bWJlcjtcclxufVxyXG4iXX0=
|
|
@@ -2422,17 +2422,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImpor
|
|
|
2422
2422
|
}] } });
|
|
2423
2423
|
|
|
2424
2424
|
class LegendComponent {
|
|
2425
|
+
constructor() {
|
|
2426
|
+
this.isSortingNeeded = false;
|
|
2427
|
+
}
|
|
2428
|
+
set isSorting(value) {
|
|
2429
|
+
this.isSortingNeeded = value;
|
|
2430
|
+
}
|
|
2431
|
+
get isSorting() {
|
|
2432
|
+
return this.isSortingNeeded;
|
|
2433
|
+
}
|
|
2434
|
+
ngOnInit() {
|
|
2435
|
+
if (this.isSortingNeeded) {
|
|
2436
|
+
this.legends?.sort((a, b) => {
|
|
2437
|
+
return a?.hierarchy - b?.hierarchy;
|
|
2438
|
+
});
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2425
2441
|
trackByFn(index, item) {
|
|
2426
2442
|
return item.label;
|
|
2427
2443
|
}
|
|
2428
2444
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2429
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: LegendComponent, isStandalone: true, selector: "ieeesa-legend", inputs: { legends: "legends" }, ngImport: i0, template: "<div class=\"ieeesa-legend d-flex flex-column flex-wrap flex-sm-row\">\r\n <div\r\n *ngFor=\"let item of legends; trackBy: trackByFn\"\r\n class=\"ieeesa-legend__indicator d-flex\"\r\n >\r\n <div\r\n class=\"ieeesa-legend__square\"\r\n [ngClass]=\"item.color\"\r\n ieeesaSetBackground\r\n [background]=\"{ imgURL: '', color: item.color }\"\r\n ></div>\r\n <p class=\"ieeesa-body-md-16 px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;min-width:.8em;height:.8em;margin-top:.2em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: SetBackgroundDirective, selector: "[ieeesaSetBackground]", inputs: ["background"] }] }); }
|
|
2445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.3", type: LegendComponent, isStandalone: true, selector: "ieeesa-legend", inputs: { legends: "legends", isSorting: "isSorting" }, ngImport: i0, template: "<div class=\"ieeesa-legend d-flex flex-column flex-wrap flex-sm-row\">\r\n <div\r\n *ngFor=\"let item of legends; trackBy: trackByFn\"\r\n class=\"ieeesa-legend__indicator d-flex\"\r\n >\r\n <div\r\n class=\"ieeesa-legend__square\"\r\n [ngClass]=\"item.color\"\r\n ieeesaSetBackground\r\n [background]=\"{ imgURL: '', color: item.color }\"\r\n ></div>\r\n <p class=\"ieeesa-body-md-16 px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;min-width:.8em;height:.8em;margin-top:.2em}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: SetBackgroundDirective, selector: "[ieeesaSetBackground]", inputs: ["background"] }] }); }
|
|
2430
2446
|
}
|
|
2431
2447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LegendComponent, decorators: [{
|
|
2432
2448
|
type: Component,
|
|
2433
2449
|
args: [{ selector: 'ieeesa-legend', standalone: true, imports: [CommonModule, SetBackgroundDirective], template: "<div class=\"ieeesa-legend d-flex flex-column flex-wrap flex-sm-row\">\r\n <div\r\n *ngFor=\"let item of legends; trackBy: trackByFn\"\r\n class=\"ieeesa-legend__indicator d-flex\"\r\n >\r\n <div\r\n class=\"ieeesa-legend__square\"\r\n [ngClass]=\"item.color\"\r\n ieeesaSetBackground\r\n [background]=\"{ imgURL: '', color: item.color }\"\r\n ></div>\r\n <p class=\"ieeesa-body-md-16 px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;min-width:.8em;height:.8em;margin-top:.2em}\n"] }]
|
|
2434
2450
|
}], propDecorators: { legends: [{
|
|
2435
2451
|
type: Input
|
|
2452
|
+
}], isSorting: [{
|
|
2453
|
+
type: Input
|
|
2436
2454
|
}] } });
|
|
2437
2455
|
|
|
2438
2456
|
/**
|