@ieeesa-npm/presentation 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Component, Input } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
|
|
4
|
-
import { SetBackgroundDirective } from '@presentation/directives/set-background/set-background.directive';
|
|
3
|
+
import { SetBackgroundDirective } from '../../directives/set-background/set-background.directive';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
import * as i1 from "@angular/common";
|
|
7
6
|
export class LegendComponent {
|
|
@@ -17,4 +16,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImpor
|
|
|
17
16
|
}], propDecorators: { legends: [{
|
|
18
17
|
type: Input
|
|
19
18
|
}] } });
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGVnZW5kLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ByZXNlbnRhdGlvbi9zcmMvbGliL2NvbXBvbmVudHMvbGVnZW5kL2xlZ2VuZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9wcmVzZW50YXRpb24vc3JjL2xpYi9jb21wb25lbnRzL2xlZ2VuZC9sZWdlbmQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDakQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRS9DLE9BQU8sRUFBRSxzQkFBc0IsR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BMZWdlbmRDb21wb25lbnQge1xyXG4gIEBJbnB1dCgpIGxlZ2VuZHMhOiBMZWdlbmRbXTtcclxuICB0cmFja0J5Rm4oaW5kZXg6IG51bWJlciwgaXRlbTogTGVnZW5kKTogc3RyaW5nIHtcclxuICAgIHJldHVybiBpdGVtLmxhYmVsO1xyXG4gIH1cclxufVxyXG4iLCI8ZGl2IGNsYXNzPVwiaWVlZXNhLWxlZ2VuZCBkLWZsZXggZmxleC1jb2x1bW4gZmxleC1zbS1yb3dcIj5cclxuICA8ZGl2XHJcbiAgICAqbmdGb3I9XCJsZXQgaXRlbSBvZiBsZWdlbmRzOyB0cmFja0J5OiB0cmFja0J5Rm5cIlxyXG4gICAgY2xhc3M9XCJpZWVlc2EtbGVnZW5kX19pbmRpY2F0b3IgZC1mbGV4XCJcclxuICA+XHJcbiAgICA8ZGl2XHJcbiAgICAgIGNsYXNzPVwiaWVlZXNhLWxlZ2VuZF9fc3F1YXJlXCJcclxuICAgICAgW25nQ2xhc3NdPVwiaXRlbS5jb2xvclwiXHJcbiAgICAgIGllZWVzYVNldEJhY2tncm91bmRcclxuICAgICAgW2JhY2tncm91bmRdPVwieyBpbWdVUkw6ICcnLCBjb2xvcjogaXRlbS5jb2xvciB9XCJcclxuICAgID48L2Rpdj5cclxuICAgIDxwIGNsYXNzPVwicHgtMlwiPnt7IGl0ZW0ubGFiZWwgfX08L3A+XHJcbiAgPC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, Injectable, EventEmitter, ViewEncapsulation, Output, ViewChild, Inject, ViewChildren, Directive, HostListener,
|
|
2
|
+
import { Component, Input, Injectable, EventEmitter, ViewEncapsulation, Output, ViewChild, Inject, ViewChildren, Directive, HostListener, HostBinding, ViewContainerRef, NgModule } from '@angular/core';
|
|
3
3
|
import { Subject, filter, debounceTime, distinctUntilChanged, takeUntil, fromEvent, map } from 'rxjs';
|
|
4
4
|
import * as i2 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -40,10 +40,9 @@ import { RouterModule } from '@angular/router';
|
|
|
40
40
|
import * as i2$3 from '@angular/material/divider';
|
|
41
41
|
import { MatDividerModule } from '@angular/material/divider';
|
|
42
42
|
import * as i2$4 from '@ieeesa-npm/utility';
|
|
43
|
-
import {
|
|
43
|
+
import { SafeType, SafePipe, ModalType } from '@ieeesa-npm/utility';
|
|
44
44
|
import * as i2$5 from '@angular/material/tooltip';
|
|
45
45
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
46
|
-
import { SetBackgroundDirective as SetBackgroundDirective$1 } from '@presentation/directives/set-background/set-background.directive';
|
|
47
46
|
import * as i1$1 from '@angular/material/dialog';
|
|
48
47
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
49
48
|
import { UserIdleSessionExpiryNotificationComponent } from '@ieeesa-npm/feature';
|
|
@@ -2162,16 +2161,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImpor
|
|
|
2162
2161
|
type: Output
|
|
2163
2162
|
}] } });
|
|
2164
2163
|
|
|
2164
|
+
/**
|
|
2165
|
+
* Sets background color and image for the attached element.
|
|
2166
|
+
* @export
|
|
2167
|
+
* @class SetBackgroundDirective
|
|
2168
|
+
* @implements {OnInit}
|
|
2169
|
+
*/
|
|
2170
|
+
class SetBackgroundDirective {
|
|
2171
|
+
// eslint-disable-next-line no-unused-vars, no-empty-function
|
|
2172
|
+
constructor(safePipe) {
|
|
2173
|
+
this.safePipe = safePipe;
|
|
2174
|
+
this.bgSize = 'cover';
|
|
2175
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2176
|
+
this.constants = constants$1;
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* Sets the elements background color and image.
|
|
2180
|
+
* @memberof SetBackgroundDirective
|
|
2181
|
+
*/
|
|
2182
|
+
ngOnInit() {
|
|
2183
|
+
const bgColor = this.background?.color !== ''
|
|
2184
|
+
? this.background?.color
|
|
2185
|
+
: this.constants.defaultWelcomeBgColor;
|
|
2186
|
+
const bgValue = this.background?.imgURL !== ''
|
|
2187
|
+
? `url('${this.background?.imgURL}') no-repeat center center`
|
|
2188
|
+
: bgColor;
|
|
2189
|
+
this.bg = this.safePipe.transform(bgValue, SafeType.STYLE);
|
|
2190
|
+
}
|
|
2191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: SetBackgroundDirective, deps: [{ token: i2$4.SafePipe }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2192
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.3", type: SetBackgroundDirective, isStandalone: true, selector: "[ieeesaSetBackground]", inputs: { background: "background" }, host: { properties: { "style.background": "this.bg", "style.background-size": "this.bgSize" } }, providers: [SafePipe], ngImport: i0 }); }
|
|
2193
|
+
}
|
|
2194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: SetBackgroundDirective, decorators: [{
|
|
2195
|
+
type: Directive,
|
|
2196
|
+
args: [{
|
|
2197
|
+
selector: '[ieeesaSetBackground]',
|
|
2198
|
+
providers: [SafePipe],
|
|
2199
|
+
standalone: true,
|
|
2200
|
+
}]
|
|
2201
|
+
}], ctorParameters: function () { return [{ type: i2$4.SafePipe }]; }, propDecorators: { background: [{
|
|
2202
|
+
type: Input
|
|
2203
|
+
}], bg: [{
|
|
2204
|
+
type: HostBinding,
|
|
2205
|
+
args: ['style.background']
|
|
2206
|
+
}], bgSize: [{
|
|
2207
|
+
type: HostBinding,
|
|
2208
|
+
args: ['style.background-size']
|
|
2209
|
+
}] } });
|
|
2210
|
+
|
|
2165
2211
|
class LegendComponent {
|
|
2166
2212
|
trackByFn(index, item) {
|
|
2167
2213
|
return item.label;
|
|
2168
2214
|
}
|
|
2169
2215
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2170
|
-
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-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=\"px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;height:.8em;margin-top:.4em}\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
|
|
2216
|
+
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-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=\"px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;height:.8em;margin-top:.4em}\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"] }] }); }
|
|
2171
2217
|
}
|
|
2172
2218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: LegendComponent, decorators: [{
|
|
2173
2219
|
type: Component,
|
|
2174
|
-
args: [{ selector: 'ieeesa-legend', standalone: true, imports: [CommonModule, SetBackgroundDirective
|
|
2220
|
+
args: [{ selector: 'ieeesa-legend', standalone: true, imports: [CommonModule, SetBackgroundDirective], template: "<div class=\"ieeesa-legend d-flex flex-column 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=\"px-2\">{{ item.label }}</p>\r\n </div>\r\n</div>\r\n", styles: [".ieeesa-legend__square{width:.8em;height:.8em;margin-top:.4em}\n"] }]
|
|
2175
2221
|
}], propDecorators: { legends: [{
|
|
2176
2222
|
type: Input
|
|
2177
2223
|
}] } });
|
|
@@ -2554,53 +2600,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImpor
|
|
|
2554
2600
|
type: Output
|
|
2555
2601
|
}] } });
|
|
2556
2602
|
|
|
2557
|
-
/**
|
|
2558
|
-
* Sets background color and image for the attached element.
|
|
2559
|
-
* @export
|
|
2560
|
-
* @class SetBackgroundDirective
|
|
2561
|
-
* @implements {OnInit}
|
|
2562
|
-
*/
|
|
2563
|
-
class SetBackgroundDirective {
|
|
2564
|
-
// eslint-disable-next-line no-unused-vars, no-empty-function
|
|
2565
|
-
constructor(safePipe) {
|
|
2566
|
-
this.safePipe = safePipe;
|
|
2567
|
-
this.bgSize = 'cover';
|
|
2568
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2569
|
-
this.constants = constants$1;
|
|
2570
|
-
}
|
|
2571
|
-
/**
|
|
2572
|
-
* Sets the elements background color and image.
|
|
2573
|
-
* @memberof SetBackgroundDirective
|
|
2574
|
-
*/
|
|
2575
|
-
ngOnInit() {
|
|
2576
|
-
const bgColor = this.background?.color !== ''
|
|
2577
|
-
? this.background?.color
|
|
2578
|
-
: this.constants.defaultWelcomeBgColor;
|
|
2579
|
-
const bgValue = this.background?.imgURL !== ''
|
|
2580
|
-
? `url('${this.background?.imgURL}') no-repeat center center`
|
|
2581
|
-
: bgColor;
|
|
2582
|
-
this.bg = this.safePipe.transform(bgValue, SafeType.STYLE);
|
|
2583
|
-
}
|
|
2584
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: SetBackgroundDirective, deps: [{ token: i2$4.SafePipe }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2585
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.3", type: SetBackgroundDirective, isStandalone: true, selector: "[ieeesaSetBackground]", inputs: { background: "background" }, host: { properties: { "style.background": "this.bg", "style.background-size": "this.bgSize" } }, providers: [SafePipe], ngImport: i0 }); }
|
|
2586
|
-
}
|
|
2587
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: SetBackgroundDirective, decorators: [{
|
|
2588
|
-
type: Directive,
|
|
2589
|
-
args: [{
|
|
2590
|
-
selector: '[ieeesaSetBackground]',
|
|
2591
|
-
providers: [SafePipe],
|
|
2592
|
-
standalone: true,
|
|
2593
|
-
}]
|
|
2594
|
-
}], ctorParameters: function () { return [{ type: i2$4.SafePipe }]; }, propDecorators: { background: [{
|
|
2595
|
-
type: Input
|
|
2596
|
-
}], bg: [{
|
|
2597
|
-
type: HostBinding,
|
|
2598
|
-
args: ['style.background']
|
|
2599
|
-
}], bgSize: [{
|
|
2600
|
-
type: HostBinding,
|
|
2601
|
-
args: ['style.background-size']
|
|
2602
|
-
}] } });
|
|
2603
|
-
|
|
2604
2603
|
class PresentationModule {
|
|
2605
2604
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.3", ngImport: i0, type: PresentationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2606
2605
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.3", ngImport: i0, type: PresentationModule }); }
|