@po-ui/ng-components 18.5.0 → 18.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/po-toolbar/po-toolbar-notification/po-toolbar-notification.component.mjs +24 -10
- package/fesm2022/po-ui-ng-components.mjs +239 -225
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-toolbar/po-toolbar-notification/po-toolbar-notification.component.d.ts +6 -3
- package/package.json +4 -4
- package/po-ui-ng-components-18.6.0.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-18.5.0.tgz +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
1
|
+
import { Component, ElementRef, Input, ViewChild } from '@angular/core';
|
|
2
2
|
import { PoControlPositionService } from '../../../services/po-control-position/po-control-position.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/common";
|
|
5
5
|
import * as i2 from "../../po-popup/po-popup.component";
|
|
6
6
|
import * as i3 from "../../po-icon/po-icon.component";
|
|
7
|
+
const _c0 = ["notification"];
|
|
7
8
|
function PoToolbarNotificationComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
8
9
|
i0.ɵɵelementStart(0, "div", 6);
|
|
9
10
|
i0.ɵɵtext(1);
|
|
@@ -27,18 +28,29 @@ function PoToolbarNotificationComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
27
28
|
* ícone de notificações.
|
|
28
29
|
*/
|
|
29
30
|
export class PoToolbarNotificationComponent {
|
|
30
|
-
|
|
31
|
+
cdr;
|
|
32
|
+
notificationRef;
|
|
31
33
|
notificationActions;
|
|
32
34
|
_notificationNumber = 0;
|
|
33
|
-
/** Define o número de notificações. */
|
|
34
35
|
set notificationNumber(value) {
|
|
35
36
|
this._notificationNumber = Number.isInteger(value) ? value : 0;
|
|
36
37
|
}
|
|
37
38
|
get notificationNumber() {
|
|
38
39
|
return this._notificationNumber;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
constructor(cdr) {
|
|
42
|
+
this.cdr = cdr;
|
|
43
|
+
}
|
|
44
|
+
ngAfterViewInit() {
|
|
45
|
+
this.cdr.detectChanges();
|
|
46
|
+
}
|
|
47
|
+
static ɵfac = function PoToolbarNotificationComponent_Factory(t) { return new (t || PoToolbarNotificationComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
48
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoToolbarNotificationComponent, selectors: [["po-toolbar-notification"]], viewQuery: function PoToolbarNotificationComponent_Query(rf, ctx) { if (rf & 1) {
|
|
49
|
+
i0.ɵɵviewQuery(_c0, 5, ElementRef);
|
|
50
|
+
} if (rf & 2) {
|
|
51
|
+
let _t;
|
|
52
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.notificationRef = _t.first);
|
|
53
|
+
} }, inputs: { notificationActions: [0, "p-notification-actions", "notificationActions"], notificationNumber: [0, "p-notification-number", "notificationNumber"] }, features: [i0.ɵɵProvidersFeature([PoControlPositionService])], decls: 6, vars: 3, consts: [["notification", ""], ["popup", ""], [1, "po-toolbar-notification", "po-clickable", 3, "click"], ["p-icon", "ICON_NOTIFICATION", 1, "po-toolbar-icon"], ["class", "po-toolbar-notification-badge", 4, "ngIf"], [3, "p-actions", "p-target"], [1, "po-toolbar-notification-badge"]], template: function PoToolbarNotificationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
42
54
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
43
55
|
i0.ɵɵelementStart(0, "div", 2);
|
|
44
56
|
i0.ɵɵlistener("click", function PoToolbarNotificationComponent_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r1); const popup_r2 = i0.ɵɵreference(5); return i0.ɵɵresetView(popup_r2.toggle()); });
|
|
@@ -47,17 +59,19 @@ export class PoToolbarNotificationComponent {
|
|
|
47
59
|
i0.ɵɵelementEnd();
|
|
48
60
|
i0.ɵɵelement(4, "po-popup", 5, 1);
|
|
49
61
|
} if (rf & 2) {
|
|
50
|
-
const notification_r4 = i0.ɵɵreference(2);
|
|
51
62
|
i0.ɵɵadvance(3);
|
|
52
63
|
i0.ɵɵproperty("ngIf", ctx.notificationNumber);
|
|
53
64
|
i0.ɵɵadvance();
|
|
54
|
-
i0.ɵɵproperty("p-actions", ctx.notificationActions)("p-target",
|
|
65
|
+
i0.ɵɵproperty("p-actions", ctx.notificationActions)("p-target", ctx.notificationRef);
|
|
55
66
|
} }, dependencies: [i1.NgIf, i2.PoPopupComponent, i3.PoIconComponent], encapsulation: 2 });
|
|
56
67
|
}
|
|
57
68
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoToolbarNotificationComponent, [{
|
|
58
69
|
type: Component,
|
|
59
|
-
args: [{ selector: 'po-toolbar-notification', providers: [PoControlPositionService], template: "<div class=\"po-toolbar-notification po-clickable\" (click)=\"popup.toggle()\">\n <po-icon #notification p-icon=\"ICON_NOTIFICATION\" class=\"po-toolbar-icon\"></po-icon>\n <div *ngIf=\"notificationNumber\" class=\"po-toolbar-notification-badge\">\n {{ notificationNumber }}\n </div>\n</div>\n\n<po-popup #popup [p-actions]=\"notificationActions\" [p-target]=\"
|
|
60
|
-
}],
|
|
70
|
+
args: [{ selector: 'po-toolbar-notification', providers: [PoControlPositionService], template: "<div class=\"po-toolbar-notification po-clickable\" (click)=\"popup.toggle()\">\n <po-icon #notification p-icon=\"ICON_NOTIFICATION\" class=\"po-toolbar-icon\"></po-icon>\n <div *ngIf=\"notificationNumber\" class=\"po-toolbar-notification-badge\">\n {{ notificationNumber }}\n </div>\n</div>\n\n<po-popup #popup [p-actions]=\"notificationActions\" [p-target]=\"notificationRef\"> </po-popup>\n" }]
|
|
71
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { notificationRef: [{
|
|
72
|
+
type: ViewChild,
|
|
73
|
+
args: ['notification', { read: ElementRef }]
|
|
74
|
+
}], notificationActions: [{
|
|
61
75
|
type: Input,
|
|
62
76
|
args: ['p-notification-actions']
|
|
63
77
|
}], notificationNumber: [{
|
|
@@ -65,4 +79,4 @@ export class PoToolbarNotificationComponent {
|
|
|
65
79
|
args: ['p-notification-number']
|
|
66
80
|
}] }); })();
|
|
67
81
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PoToolbarNotificationComponent, { className: "PoToolbarNotificationComponent", filePath: "lib/components/po-toolbar/po-toolbar-notification/po-toolbar-notification.component.ts", lineNumber: 25 }); })();
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
82
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG8tdG9vbGJhci1ub3RpZmljYXRpb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvc3JjL2xpYi9jb21wb25lbnRzL3BvLXRvb2xiYXIvcG8tdG9vbGJhci1ub3RpZmljYXRpb24vcG8tdG9vbGJhci1ub3RpZmljYXRpb24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvc3JjL2xpYi9jb21wb25lbnRzL3BvLXRvb2xiYXIvcG8tdG9vbGJhci1ub3RpZmljYXRpb24vcG8tdG9vbGJ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