@acorex/components 7.0.23 → 7.0.24
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/action-sheet/src/action-sheet.component.mjs +4 -3
- package/esm2020/loading/src/loading-spinner.component.mjs +9 -15
- package/esm2020/loading/src/loading.component.mjs +2 -2
- package/esm2020/tooltip/src/tooltip.component.mjs +3 -3
- package/fesm2015/acorex-components-action-sheet.mjs +4 -4
- package/fesm2015/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2015/acorex-components-calendar.mjs +1 -0
- package/fesm2015/acorex-components-loading.mjs +10 -17
- package/fesm2015/acorex-components-loading.mjs.map +1 -1
- package/fesm2015/acorex-components-tooltip.mjs +2 -3
- package/fesm2015/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2020/acorex-components-action-sheet.mjs +4 -4
- package/fesm2020/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2020/acorex-components-calendar.mjs +1 -0
- package/fesm2020/acorex-components-loading.mjs +10 -17
- package/fesm2020/acorex-components-loading.mjs.map +1 -1
- package/fesm2020/acorex-components-tooltip.mjs +2 -3
- package/fesm2020/acorex-components-tooltip.mjs.map +1 -1
- package/package.json +1 -1
@@ -5,6 +5,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, HostListener, ViewEnc
|
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
import * as i1 from "@angular/common";
|
7
7
|
import * as i2 from "@angular/cdk/portal";
|
8
|
+
import * as i3 from "@acorex/components/decorators";
|
8
9
|
export class AXActionSheetComponent extends AXBaseComponent {
|
9
10
|
constructor(elementRef, cdr, _viewContainerRef) {
|
10
11
|
super(elementRef, cdr);
|
@@ -51,12 +52,12 @@ export class AXActionSheetComponent extends AXBaseComponent {
|
|
51
52
|
}
|
52
53
|
}
|
53
54
|
AXActionSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXActionSheetComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
54
|
-
AXActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXActionSheetComponent, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n
|
55
|
+
AXActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXActionSheetComponent, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div> -->\r\n<ax-header>\r\n <ax-title>{{ title }}</ax-title>\r\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\r\n</ax-header>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div\r\n class=\"ax-action-sheet-item ax-{{ item.color }}\"\r\n [class.ax-state-disabled]=\"item.disabled\"\r\n (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{ item.text }}</span>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: ["@media (max-width: 599px){ax-action-sheet{width:100vw}}@media (min-width: 600px){ax-action-sheet{width:75vw}}@media (min-width: 1200px){ax-action-sheet{width:30vw}}@media (min-width: 1800px){ax-action-sheet{width:25vw}}ax-action-sheet ax-header{padding:.75rem}ax-action-sheet .ax-action-sheet-items{padding:.5rem 0}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item{-webkit-user-select:none;user-select:none;cursor:pointer;padding:.75rem 1rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item:hover{background-color:rgba(var(--ax-color-ghost),.03)}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item .item-icon{font-size:1.5rem;margin-inline-end:.75rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-primary{color:rgb(var(--ax-color-primary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-secondary{color:rgb(var(--ax-color-secondary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-success{color:rgb(var(--ax-color-success-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-warning{color:rgb(var(--ax-color-warning-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-danger{color:rgb(var(--ax-color-danger-500))}\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: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i3.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i3.AXDecoratorTitleComponent, selector: "ax-title" }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
55
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXActionSheetComponent, decorators: [{
|
56
57
|
type: Component,
|
57
|
-
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n
|
58
|
+
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- <div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div> -->\r\n<ax-header>\r\n <ax-title>{{ title }}</ax-title>\r\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\r\n</ax-header>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div\r\n class=\"ax-action-sheet-item ax-{{ item.color }}\"\r\n [class.ax-state-disabled]=\"item.disabled\"\r\n (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{ item.text }}</span>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: ["@media (max-width: 599px){ax-action-sheet{width:100vw}}@media (min-width: 600px){ax-action-sheet{width:75vw}}@media (min-width: 1200px){ax-action-sheet{width:30vw}}@media (min-width: 1800px){ax-action-sheet{width:25vw}}ax-action-sheet ax-header{padding:.75rem}ax-action-sheet .ax-action-sheet-items{padding:.5rem 0}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item{-webkit-user-select:none;user-select:none;cursor:pointer;padding:.75rem 1rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item:hover{background-color:rgba(var(--ax-color-ghost),.03)}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item .item-icon{font-size:1.5rem;margin-inline-end:.75rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-primary{color:rgb(var(--ax-color-primary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-secondary{color:rgb(var(--ax-color-secondary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-success{color:rgb(var(--ax-color-success-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-warning{color:rgb(var(--ax-color-warning-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-danger{color:rgb(var(--ax-color-danger-500))}\n"] }]
|
58
59
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { onKeydownHandler: [{
|
59
60
|
type: HostListener,
|
60
61
|
args: ['keydown.escape', ['$event']]
|
61
62
|
}] } });
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLXNoZWV0LmNvbXBvbmVudC5qcyIsInNvdX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L2Rpdj5cclxuIl19
|
@@ -15,12 +15,10 @@ AXLoadingSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
15
15
|
x="0px"
|
16
16
|
y="0px"
|
17
17
|
viewBox="0 0 50 50"
|
18
|
-
xml:space="preserve"
|
19
|
-
>
|
18
|
+
xml:space="preserve">
|
20
19
|
<path
|
21
20
|
fill="current"
|
22
|
-
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"
|
23
|
-
>
|
21
|
+
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z">
|
24
22
|
<animateTransform
|
25
23
|
attributeType="xml"
|
26
24
|
attributeName="transform"
|
@@ -28,11 +26,10 @@ AXLoadingSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
28
26
|
from="0 25 25"
|
29
27
|
to="360 25 25"
|
30
28
|
dur="0.6s"
|
31
|
-
repeatCount="indefinite"
|
32
|
-
/>
|
29
|
+
repeatCount="indefinite" />
|
33
30
|
</path>
|
34
31
|
</svg>
|
35
|
-
<span
|
32
|
+
<span *ngIf="text"> {{ text }} </span>
|
36
33
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
37
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXLoadingSpinnerComponent, decorators: [{
|
38
35
|
type: Component,
|
@@ -49,12 +46,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
49
46
|
x="0px"
|
50
47
|
y="0px"
|
51
48
|
viewBox="0 0 50 50"
|
52
|
-
xml:space="preserve"
|
53
|
-
>
|
49
|
+
xml:space="preserve">
|
54
50
|
<path
|
55
51
|
fill="current"
|
56
|
-
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"
|
57
|
-
>
|
52
|
+
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z">
|
58
53
|
<animateTransform
|
59
54
|
attributeType="xml"
|
60
55
|
attributeName="transform"
|
@@ -62,13 +57,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
62
57
|
from="0 25 25"
|
63
58
|
to="360 25 25"
|
64
59
|
dur="0.6s"
|
65
|
-
repeatCount="indefinite"
|
66
|
-
/>
|
60
|
+
repeatCount="indefinite" />
|
67
61
|
</path>
|
68
62
|
</svg>
|
69
|
-
<span
|
63
|
+
<span *ngIf="text"> {{ text }} </span>
|
70
64
|
`,
|
71
65
|
host: { class: 'ax-loading-spinner' },
|
72
66
|
}]
|
73
67
|
}] });
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGluZy1zcGlubmVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Fjb3JleC9jb21wb25lbnRzL2xvYWRpbmcvc3JjL2xvYWRpbmctc3Bpbm5lci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBUyxNQUFNLGVBQWUsQ0FBQzs7O0FBaUNqRCxNQUFNLE9BQU8seUJBQXlCOztzSEFBekIseUJBQXlCOzBHQUF6Qix5QkFBeUIsMEdBN0IxQjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0EwQlQ7MkZBR1UseUJBQXlCO2tCQS9CckMsU0FBUzttQkFBQzt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AgICAgICAgICBhdHRyaWJ1dGVOYW1lPVwidHJhbnNmb3JtXCJcclxuICAgICAgICAgIHR5cGU9XCJyb3RhdGVcIlxyXG4gICAgICAgICAgZnJvbT1cIjAgMjUgMjVcIlxyXG4gICAgICAgICAgdG89XCIzNjAgMjUgMjVcIlxyXG4gICAgICAgICAgZHVyPVwiMC42c1wiXHJcbiAgICAgICAgICByZXBlYXRDb3VudD1cImluZGVmaW5pdGVcIiAvPlxyXG4gICAgICA8L3BhdGg+XHJcbiAgICA8L3N2Zz5cclxuICAgIDxzcGFuICpuZ0lmPVwidGV4dFwiPiB7eyB0ZXh0IH19IDwvc3Bhbj5cclxuICBgLFxyXG4gIGhvc3Q6IHsgY2xhc3M6ICdheC1sb2FkaW5nLXNwaW5uZXInIH0sXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBBWExvYWRpbmdTcGlubmVyQ29tcG9uZW50IHtcclxuICB0ZXh0OiBzdHJpbmc7XHJcbn1cclxuIl19
|
@@ -43,7 +43,7 @@ AXLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
43
43
|
[cdkPortalOutlet]="_selectedPortal"
|
44
44
|
(attached)="_handleAttched($event)"
|
45
45
|
></ng-template>
|
46
|
-
`, isInline: true, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex}\n"], dependencies: [{ kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
46
|
+
`, isInline: true, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex;gap:.75rem}\n"], dependencies: [{ kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
47
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXLoadingComponent, decorators: [{
|
48
48
|
type: Component,
|
49
49
|
args: [{ selector: 'ax-loading', template: `
|
@@ -51,7 +51,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
51
51
|
[cdkPortalOutlet]="_selectedPortal"
|
52
52
|
(attached)="_handleAttched($event)"
|
53
53
|
></ng-template>
|
54
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-loading' }, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex}\n"] }]
|
54
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-loading' }, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex;gap:.75rem}\n"] }]
|
55
55
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { visibleChange: [{
|
56
56
|
type: Output
|
57
57
|
}], visible: [{
|
@@ -10,7 +10,7 @@ export class AXTooltipComponent extends AXBaseComponentMixin {
|
|
10
10
|
}
|
11
11
|
}
|
12
12
|
AXTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTooltipComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
13
|
-
AXTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem;background-color:rgb(var(--ax-color-ghost));
|
13
|
+
AXTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost));color:rgb(var(--ax-color-ghost-fore));border-radius:var(--ax-rounded-border-default);font-size:.875rem}.ax-tooltip-container .ax-tooltip-tringle{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgb(var(--ax-color-ghost));position:absolute}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-bottom{transform:rotate(180deg);left:0;right:0;margin:auto;top:-5px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-right{transform:rotate(90deg);top:0;bottom:0;margin:auto;left:-7px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-top{transform:rotate(0);left:0;right:0;margin:auto}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-left{transform:rotate(270deg);top:0;bottom:0;margin:auto;right:-7px}\n"], animations: [
|
14
14
|
trigger('tooltip', [
|
15
15
|
transition(':enter', [
|
16
16
|
style({ opacity: 0 }),
|
@@ -29,10 +29,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
29
29
|
]),
|
30
30
|
transition(':leave', [animate(50, style({ opacity: 0 }))]),
|
31
31
|
]),
|
32
|
-
], template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem;background-color:rgb(var(--ax-color-ghost));
|
32
|
+
], template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost));color:rgb(var(--ax-color-ghost-fore));border-radius:var(--ax-rounded-border-default);font-size:.875rem}.ax-tooltip-container .ax-tooltip-tringle{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgb(var(--ax-color-ghost));position:absolute}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-bottom{transform:rotate(180deg);left:0;right:0;margin:auto;top:-5px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-right{transform:rotate(90deg);top:0;bottom:0;margin:auto;left:-7px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-top{transform:rotate(0);left:0;right:0;margin:auto}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-left{transform:rotate(270deg);top:0;bottom:0;margin:auto;right:-7px}\n"] }]
|
33
33
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { text: [{
|
34
34
|
type: Input
|
35
35
|
}], position: [{
|
36
36
|
type: Input
|
37
37
|
}] } });
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9vbHRpcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hY29yZXgvY29tcG9uZW50cy90b29sdGlwL3NyYy90b29sdGlwLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL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cz1cImF4LXRvb2x0aXBcIiBAdG9vbHRpcD5cclxuICAgICAgICB7eyB0ZXh0IH19XHJcbiAgICA8L2Rpdj5cclxuICAgIDxkaXYgY2xhc3M9XCJheC10b29sdGlwLXRyaW5nbGUgYXgtdG9vbHRpcC10cmluZ2xlLXt7cG9zaXRpb259fVwiPjwvZGl2PlxyXG48L2Rpdj4iXX0=
|
@@ -7,10 +7,11 @@ import * as i0 from '@angular/core';
|
|
7
7
|
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, HostListener, NgModule, Injectable } from '@angular/core';
|
8
8
|
import * as i1 from '@angular/common';
|
9
9
|
import { CommonModule } from '@angular/common';
|
10
|
+
import * as i3 from '@acorex/components/decorators';
|
11
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
10
12
|
import { A11yModule } from '@angular/cdk/a11y';
|
11
13
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
12
14
|
import { AXButtonModule } from '@acorex/components/button';
|
13
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
14
15
|
import { AXTranslator } from '@acorex/core/translation';
|
15
16
|
import * as i1$1 from '@angular/cdk/overlay';
|
16
17
|
|
@@ -60,10 +61,10 @@ class AXActionSheetComponent extends AXBaseComponent {
|
|
60
61
|
}
|
61
62
|
}
|
62
63
|
AXActionSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXActionSheetComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
63
|
-
AXActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXActionSheetComponent, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n
|
64
|
+
AXActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXActionSheetComponent, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div> -->\r\n<ax-header>\r\n <ax-title>{{ title }}</ax-title>\r\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\r\n</ax-header>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div\r\n class=\"ax-action-sheet-item ax-{{ item.color }}\"\r\n [class.ax-state-disabled]=\"item.disabled\"\r\n (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{ item.text }}</span>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: ["@media (max-width: 599px){ax-action-sheet{width:100vw}}@media (min-width: 600px){ax-action-sheet{width:75vw}}@media (min-width: 1200px){ax-action-sheet{width:30vw}}@media (min-width: 1800px){ax-action-sheet{width:25vw}}ax-action-sheet ax-header{padding:.75rem}ax-action-sheet .ax-action-sheet-items{padding:.5rem 0}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item{-webkit-user-select:none;user-select:none;cursor:pointer;padding:.75rem 1rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item:hover{background-color:rgba(var(--ax-color-ghost),.03)}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item .item-icon{font-size:1.5rem;margin-inline-end:.75rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-primary{color:rgb(var(--ax-color-primary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-secondary{color:rgb(var(--ax-color-secondary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-success{color:rgb(var(--ax-color-success-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-warning{color:rgb(var(--ax-color-warning-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-danger{color:rgb(var(--ax-color-danger-500))}\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: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i3.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i3.AXDecoratorTitleComponent, selector: "ax-title" }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
64
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXActionSheetComponent, decorators: [{
|
65
66
|
type: Component,
|
66
|
-
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n
|
67
|
+
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- <div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div> -->\r\n<ax-header>\r\n <ax-title>{{ title }}</ax-title>\r\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\r\n</ax-header>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div\r\n class=\"ax-action-sheet-item ax-{{ item.color }}\"\r\n [class.ax-state-disabled]=\"item.disabled\"\r\n (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{ item.text }}</span>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: ["@media (max-width: 599px){ax-action-sheet{width:100vw}}@media (min-width: 600px){ax-action-sheet{width:75vw}}@media (min-width: 1200px){ax-action-sheet{width:30vw}}@media (min-width: 1800px){ax-action-sheet{width:25vw}}ax-action-sheet ax-header{padding:.75rem}ax-action-sheet .ax-action-sheet-items{padding:.5rem 0}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item{-webkit-user-select:none;user-select:none;cursor:pointer;padding:.75rem 1rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item:hover{background-color:rgba(var(--ax-color-ghost),.03)}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item .item-icon{font-size:1.5rem;margin-inline-end:.75rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-primary{color:rgb(var(--ax-color-primary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-secondary{color:rgb(var(--ax-color-secondary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-success{color:rgb(var(--ax-color-success-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-warning{color:rgb(var(--ax-color-warning-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-danger{color:rgb(var(--ax-color-danger-500))}\n"] }]
|
67
68
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { onKeydownHandler: [{
|
68
69
|
type: HostListener,
|
69
70
|
args: ['keydown.escape', ['$event']]
|
@@ -175,4 +176,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
175
176
|
|
176
177
|
export { AXActionSheetComponent, AXActionSheetModule, AXActionSheetService };
|
177
178
|
//# sourceMappingURL=acorex-components-action-sheet.mjs.map
|
178
|
-
//# sourceMappingURL=acorex-components-action-sheet.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.service.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXComponentCloseEvent, TAB_META_KEY } from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, ElementRef, EventEmitter, HostListener, Input, ViewContainerRef, ViewEncapsulation } from '@angular/core';\r\nimport { AXActionSheetItem } from './action-sheet.interface';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n styleUrls: ['./action-sheet.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\n\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n\r\n _selectedPortal: Portal<any>;\r\n title: string;\r\n items: AXActionSheetItem[] = [];\r\n content: any;\r\n showCloseButton: boolean = true;\r\n showHeader: boolean = true;\r\n data: any = {};\r\n\r\n onClosed: EventEmitter<AXComponentCloseEvent> = new EventEmitter<AXComponentCloseEvent>();\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, private _viewContainerRef: ViewContainerRef,) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n close(): void {\r\n this.onClosed.emit({\r\n component: this[TAB_META_KEY].component,\r\n htmlElement: this._getHostElement(),\r\n });\r\n this._cdr.detectChanges();\r\n }\r\n\r\n onInit(): void {\r\n if (this.content) {\r\n this._selectedPortal = new ComponentPortal(this.content);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n\r\n @HostListener('keydown.escape', ['$event'])\r\n onKeydownHandler(event: KeyboardEvent) {\r\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\r\n if (this.showCloseButton && focusedOrHasFocused) {\r\n this.close();\r\n }\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n this[TAB_META_KEY].component = ref.instance;\r\n Object.assign(this[TAB_META_KEY].component, this.data);\r\n if (ref.instance.onClosed) {\r\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\r\n this.onClosed.emit(e);\r\n });\r\n }\r\n }\r\n }\r\n\r\n _handleCloseClick() {\r\n this.close();\r\n }\r\n}\r\n","<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div class=\"ax-action-sheet-item ax-{{item.color}}\" [class.ax-state-disabled]=\"item.disabled\" (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{item.text}}</span>\r\n </div>\r\n </ng-container>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXCommonModule } from '@acorex/components/common';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\n\r\n\r\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\r\n\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent],\r\n imports: [...MODULES],\r\n exports: [AXActionSheetComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule { }\r\n","import {\r\n AXComponentClosedPromise,\r\n AXComponentCloseEvent,\r\n AXOverlayService,\r\n AXOverlayViewRef,\r\n TAB_META_KEY,\r\n} from '@acorex/components/common';\r\nimport { AXTranslator } from '@acorex/core/translation';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable } from '@angular/core';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetOptions } from './action-sheet.interface';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXActionSheetService {\r\n // _overlayRef: OverlayRef;\r\n // _templatePortal!: ComponentPortal<any>;\r\n\r\n constructor(\r\n private _overlay: Overlay,\r\n private overlayService: AXOverlayService\r\n ) {}\r\n\r\n //open(items: AXActionSheetItem[],options?:AXActionSheetOptions);\r\n //open(content:AXActionSheetContentType, options?: AXActionSheetOptions);\r\n open(options: AXActionSheetOptions): AXComponentClosedPromise {\r\n const opt: any = {\r\n title: AXTranslator.get('action-sheet.title'),\r\n showCloseButton: true,\r\n closeOnBackdrop: true,\r\n showHeader: true,\r\n };\r\n Object.assign(opt, options);\r\n const lastActiveElement = document.activeElement as HTMLElement;\r\n const com = this.overlayService.show(AXActionSheetComponent, opt, {\r\n hasBackdrop: true,\r\n closeOnClickOutside: opt.closeOnBackdrop,\r\n transparentBackdrop: false,\r\n panelClass: ['ax-actionsheet-panel'],\r\n position: this._overlay.position().global().bottom().centerHorizontally(),\r\n });\r\n const actionSheet = com.instance as AXActionSheetComponent;\r\n actionSheet[TAB_META_KEY] = {};\r\n actionSheet.onClosed.subscribe(c => {\r\n this.closePopup(actionSheet, com, c, lastActiveElement);\r\n });\r\n const promise = new AXComponentClosedPromise((resolve, reject) => {\r\n actionSheet[TAB_META_KEY].close = e => {\r\n if (resolve) {\r\n resolve(e);\r\n } else {\r\n reject(e);\r\n }\r\n };\r\n });\r\n promise['closeMethod'] = () => {\r\n actionSheet.close();\r\n };\r\n return promise;\r\n }\r\n\r\n private closePopup(\r\n popup: AXActionSheetComponent,\r\n com: AXOverlayViewRef,\r\n result: AXComponentCloseEvent,\r\n lastActiveElement?: HTMLElement\r\n ) {\r\n const closeFunc = e => {\r\n com.dispose();\r\n delete e.cancel;\r\n popup[TAB_META_KEY].close(e);\r\n if (lastActiveElement?.focus) {\r\n lastActiveElement.focus();\r\n }\r\n };\r\n const e = { cancel: false };\r\n const closingFunc = popup[TAB_META_KEY].component?.onClosing;\r\n if (closingFunc) {\r\n const res = closingFunc(e);\r\n if (res instanceof Promise) {\r\n res.then(() => {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n });\r\n } else {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n }\r\n } else {\r\n closeFunc(result);\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAcM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAYzD,IAAA,WAAA,CAAY,UAAsB,EAAE,GAAsB,EAAU,iBAAmC,EAAA;AACrG,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAD2C,QAAA,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;AARvG,QAAA,IAAK,CAAA,KAAA,GAAwB,EAAE,CAAC;AAEhC,QAAA,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAChC,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAC3B,QAAA,IAAI,CAAA,IAAA,GAAQ,EAAE,CAAC;AAEf,QAAA,IAAA,CAAA,QAAQ,GAAwC,IAAI,YAAY,EAAyB,CAAC;KAIzF;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACjB,YAAA,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,SAAS;A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AAI,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,EAAE;wBAClC,SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,qBAAA;AACH,iBAAC,CAAC,CAAC;AACJ,aAAA;AAAM,iBAAA;gBACL,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,EAAE;oBAClC,SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,iBAAA;AACF,aAAA;AACF,SAAA;AAAM,aAAA;YACL,SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,SAAA;KACF;;iHA/EU,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACblC;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.service.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXComponentCloseEvent, TAB_META_KEY } from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, ElementRef, EventEmitter, HostListener, Input, ViewContainerRef, ViewEncapsulation } from '@angular/core';\r\nimport { AXActionSheetItem } from './action-sheet.interface';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n styleUrls: ['./action-sheet.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\n\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n\r\n _selectedPortal: Portal<any>;\r\n title: string;\r\n items: AXActionSheetItem[] = [];\r\n content: any;\r\n showCloseButton: boolean = true;\r\n showHeader: boolean = true;\r\n data: any = {};\r\n\r\n onClosed: EventEmitter<AXComponentCloseEvent> = new EventEmitter<AXComponentCloseEvent>();\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, private _viewContainerRef: ViewContainerRef,) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n close(): void {\r\n this.onClosed.emit({\r\n component: this[TAB_META_KEY].component,\r\n htmlElement: this._getHostElement(),\r\n });\r\n this._cdr.detectChanges();\r\n }\r\n\r\n onInit(): void {\r\n if (this.content) {\r\n this._selectedPortal = new ComponentPortal(this.content);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n\r\n @HostListener('keydown.escape', ['$event'])\r\n onKeydownHandler(event: KeyboardEvent) {\r\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\r\n if (this.showCloseButton && focusedOrHasFocused) {\r\n this.close();\r\n }\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n this[TAB_META_KEY].component = ref.instance;\r\n Object.assign(this[TAB_META_KEY].component, this.data);\r\n if (ref.instance.onClosed) {\r\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\r\n this.onClosed.emit(e);\r\n });\r\n }\r\n }\r\n }\r\n\r\n _handleCloseClick() {\r\n this.close();\r\n }\r\n}\r\n","<!-- <div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div> -->\r\n<ax-header>\r\n <ax-title>{{ title }}</ax-title>\r\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\r\n</ax-header>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div\r\n class=\"ax-action-sheet-item ax-{{ item.color }}\"\r\n [class.ax-state-disabled]=\"item.disabled\"\r\n (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{ item.text }}</span>\r\n </div>\r\n </ng-container>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXCommonModule } from '@acorex/components/common';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\n\r\n\r\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\r\n\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent],\r\n imports: [...MODULES],\r\n exports: [AXActionSheetComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule { }\r\n","import {\r\n AXComponentClosedPromise,\r\n AXComponentCloseEvent,\r\n AXOverlayService,\r\n AXOverlayViewRef,\r\n TAB_META_KEY,\r\n} from '@acorex/components/common';\r\nimport { AXTranslator } from '@acorex/core/translation';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable } from '@angular/core';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetOptions } from './action-sheet.interface';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXActionSheetService {\r\n // _overlayRef: OverlayRef;\r\n // _templatePortal!: ComponentPortal<any>;\r\n\r\n constructor(\r\n private _overlay: Overlay,\r\n private overlayService: AXOverlayService\r\n ) {}\r\n\r\n //open(items: AXActionSheetItem[],options?:AXActionSheetOptions);\r\n //open(content:AXActionSheetContentType, options?: AXActionSheetOptions);\r\n open(options: AXActionSheetOptions): AXComponentClosedPromise {\r\n const opt: any = {\r\n title: AXTranslator.get('action-sheet.title'),\r\n showCloseButton: true,\r\n closeOnBackdrop: true,\r\n showHeader: true,\r\n };\r\n Object.assign(opt, options);\r\n const lastActiveElement = document.activeElement as HTMLElement;\r\n const com = this.overlayService.show(AXActionSheetComponent, opt, {\r\n hasBackdrop: true,\r\n closeOnClickOutside: opt.closeOnBackdrop,\r\n transparentBackdrop: false,\r\n panelClass: ['ax-actionsheet-panel'],\r\n position: this._overlay.position().global().bottom().centerHorizontally(),\r\n });\r\n const actionSheet = com.instance as AXActionSheetComponent;\r\n actionSheet[TAB_META_KEY] = {};\r\n actionSheet.onClosed.subscribe(c => {\r\n this.closePopup(actionSheet, com, c, lastActiveElement);\r\n });\r\n const promise = new AXComponentClosedPromise((resolve, reject) => {\r\n actionSheet[TAB_META_KEY].close = e => {\r\n if (resolve) {\r\n resolve(e);\r\n } else {\r\n reject(e);\r\n }\r\n };\r\n });\r\n promise['closeMethod'] = () => {\r\n actionSheet.close();\r\n };\r\n return promise;\r\n }\r\n\r\n private closePopup(\r\n popup: AXActionSheetComponent,\r\n com: AXOverlayViewRef,\r\n result: AXComponentCloseEvent,\r\n lastActiveElement?: HTMLElement\r\n ) {\r\n const closeFunc = e => {\r\n com.dispose();\r\n delete e.cancel;\r\n popup[TAB_META_KEY].close(e);\r\n if (lastActiveElement?.focus) {\r\n lastActiveElement.focus();\r\n }\r\n };\r\n const e = { cancel: false };\r\n const closingFunc = popup[TAB_META_KEY].component?.onClosing;\r\n if (closingFunc) {\r\n const res = closingFunc(e);\r\n if (res instanceof Promise) {\r\n res.then(() => {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n });\r\n } else {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n }\r\n } else {\r\n closeFunc(result);\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;AAcM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAYzD,IAAA,WAAA,CAAY,UAAsB,EAAE,GAAsB,EAAU,iBAAmC,EAAA;AACrG,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAD2C,QAAA,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;AARvG,QAAA,IAAK,CAAA,KAAA,GAAwB,EAAE,CAAC;AAEhC,QAAA,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAChC,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAC3B,QAAA,IAAI,CAAA,IAAA,GAAQ,EAAE,CAAC;AAEf,QAAA,IAAA,CAAA,QAAQ,GAAwC,IAAI,YAAY,EAAyB,CAAC;KAIzF;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACjB,YAAA,SAAS,EAAE,IAAI,C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3 +528,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
528
528
|
|
529
529
|
export { AXCalendarBaseComponent, AXCalendarComponent, AXCalendarComponentMixin, AXCalendarModule, AXCalendarNavigateEvent, CALENDAR_INPUTS, CALENDAR_OUTPUTS };
|
530
530
|
//# sourceMappingURL=acorex-components-calendar.mjs.map
|
531
|
+
//# sourceMappingURL=acorex-components-calendar.mjs.map
|
@@ -50,7 +50,7 @@ AXLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
50
50
|
[cdkPortalOutlet]="_selectedPortal"
|
51
51
|
(attached)="_handleAttched($event)"
|
52
52
|
></ng-template>
|
53
|
-
`, isInline: true, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex}\n"], dependencies: [{ kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
53
|
+
`, isInline: true, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex;gap:.75rem}\n"], dependencies: [{ kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
54
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXLoadingComponent, decorators: [{
|
55
55
|
type: Component,
|
56
56
|
args: [{ selector: 'ax-loading', template: `
|
@@ -58,7 +58,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
58
58
|
[cdkPortalOutlet]="_selectedPortal"
|
59
59
|
(attached)="_handleAttched($event)"
|
60
60
|
></ng-template>
|
61
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-loading' }, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex}\n"] }]
|
61
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-loading' }, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex;gap:.75rem}\n"] }]
|
62
62
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { visibleChange: [{
|
63
63
|
type: Output
|
64
64
|
}], visible: [{
|
@@ -83,12 +83,10 @@ AXLoadingSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
83
83
|
x="0px"
|
84
84
|
y="0px"
|
85
85
|
viewBox="0 0 50 50"
|
86
|
-
xml:space="preserve"
|
87
|
-
>
|
86
|
+
xml:space="preserve">
|
88
87
|
<path
|
89
88
|
fill="current"
|
90
|
-
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"
|
91
|
-
>
|
89
|
+
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z">
|
92
90
|
<animateTransform
|
93
91
|
attributeType="xml"
|
94
92
|
attributeName="transform"
|
@@ -96,11 +94,10 @@ AXLoadingSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
96
94
|
from="0 25 25"
|
97
95
|
to="360 25 25"
|
98
96
|
dur="0.6s"
|
99
|
-
repeatCount="indefinite"
|
100
|
-
/>
|
97
|
+
repeatCount="indefinite" />
|
101
98
|
</path>
|
102
99
|
</svg>
|
103
|
-
<span
|
100
|
+
<span *ngIf="text"> {{ text }} </span>
|
104
101
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
105
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXLoadingSpinnerComponent, decorators: [{
|
106
103
|
type: Component,
|
@@ -117,12 +114,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
117
114
|
x="0px"
|
118
115
|
y="0px"
|
119
116
|
viewBox="0 0 50 50"
|
120
|
-
xml:space="preserve"
|
121
|
-
>
|
117
|
+
xml:space="preserve">
|
122
118
|
<path
|
123
119
|
fill="current"
|
124
|
-
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"
|
125
|
-
>
|
120
|
+
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z">
|
126
121
|
<animateTransform
|
127
122
|
attributeType="xml"
|
128
123
|
attributeName="transform"
|
@@ -130,11 +125,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
130
125
|
from="0 25 25"
|
131
126
|
to="360 25 25"
|
132
127
|
dur="0.6s"
|
133
|
-
repeatCount="indefinite"
|
134
|
-
/>
|
128
|
+
repeatCount="indefinite" />
|
135
129
|
</path>
|
136
130
|
</svg>
|
137
|
-
<span
|
131
|
+
<span *ngIf="text"> {{ text }} </span>
|
138
132
|
`,
|
139
133
|
host: { class: 'ax-loading-spinner' },
|
140
134
|
}]
|
@@ -388,4 +382,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
388
382
|
|
389
383
|
export { AXLoadingComponent, AXLoadingDirective, AXLoadingModule, AXLoadingService, AXLoadingSpinnerComponent };
|
390
384
|
//# sourceMappingURL=acorex-components-loading.mjs.map
|
391
|
-
//# sourceMappingURL=acorex-components-loading.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-loading.mjs","sources":["../../../../projects/acorex/components/loading/src/loading.component.ts","../../../../projects/acorex/components/loading/src/loading-spinner.component.ts","../../../../projects/acorex/components/loading/src/loading.directive.ts","../../../../projects/acorex/components/loading/src/loading.module.ts","../../../../projects/acorex/components/loading/src/loading.service.ts","../../../../projects/acorex/components/loading/acorex-components-loading.ts"],"sourcesContent":["import { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXConfig } from '@acorex/core/config';\r\nimport {\r\n CdkPortalOutletAttachedRef,\r\n ComponentPortal,\r\n Portal,\r\n} from '@angular/cdk/portal';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ComponentRef,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-loading',\r\n template: `\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"\r\n ></ng-template>\r\n `,\r\n styleUrls:['./loading.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-loading' },\r\n})\r\nexport class AXLoadingComponent extends AXBaseComponentMixin {\r\n _selectedPortal: Portal<any>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n @Output()\r\n visibleChange: EventEmitter<boolean> = new EventEmitter();\r\n\r\n private _visible: boolean;\r\n\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (v != this._visible) {\r\n this._visible = v;\r\n v\r\n ? this._getHostElement().classList.remove('ax-hide')\r\n : this._getHostElement().classList.add('ax-hide');\r\n this.visibleChange.emit(v);\r\n }\r\n }\r\n\r\n @Input()\r\n type: string = 'spinner';\r\n\r\n @Input()\r\n text: string;\r\n\r\n onInit() {\r\n const loading = AXConfig.get(`layout.loading.${this.type}`);\r\n this._selectedPortal = new ComponentPortal(loading);\r\n this._cdr.markForCheck();\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n ref.instance.text = this.text;\r\n }\r\n }\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-loading-spinner',\r\n template: `\r\n <svg\r\n version=\"1.1\"\r\n width=\"24\"\r\n height=\"24\"\r\n style=\"fill: currentColor;\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n x=\"0px\"\r\n y=\"0px\"\r\n viewBox=\"0 0 50 50\"\r\n xml:space=\"preserve\"\r\n >\r\n <path\r\n fill=\"current\"\r\n d=\"M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z\"\r\n >\r\n <animateTransform\r\n attributeType=\"xml\"\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 25 25\"\r\n to=\"360 25 25\"\r\n dur=\"0.6s\"\r\n repeatCount=\"indefinite\"\r\n />\r\n </path>\r\n </svg>\r\n <span class=\"ax-ms-3\" *ngIf=\"text\"> {{ text }} </span>\r\n `,\r\n host: { class: 'ax-loading-spinner' },\r\n})\r\nexport class AXLoadingSpinnerComponent {\r\n text: string;\r\n}\r\n","import {\r\n ChangeDetectorRef,\r\n ComponentFactoryResolver,\r\n Directive,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n Renderer2,\r\n SimpleChanges, ViewContainerRef\r\n } from '@angular/core';\r\nimport { AXLoadingComponent } from './loading.component';\r\n \r\n \r\n const OVERLAY_CLASS = 'ax-loading-overlay';\r\n \r\n // This directive places an overlay with a loading spinner over its host element\r\n // if isLoading equals to true and hides the overlay when isLoading becomes false.\r\n @Directive({\r\n selector: '[axIsLoading]'\r\n })\r\n export class AXLoadingDirective implements OnChanges {\r\n @Input('axIsLoading')\r\n isLoading = false;\r\n \r\n protected overlayElement!: HTMLDivElement;\r\n protected spinnerElement!: HTMLDivElement;\r\n protected hostElement!: HTMLDivElement;\r\n \r\n\r\n //TODO: ComponentFactoryResolver is deprecated\r\n constructor(\r\n protected readonly elementRef: ElementRef,\r\n protected readonly renderer: Renderer2,\r\n protected readonly changeDetectorRef: ChangeDetectorRef,\r\n protected readonly viewContainerRef: ViewContainerRef,\r\n protected readonly componentFactoryResolver: ComponentFactoryResolver,\r\n ) {\r\n this.hostElement = this.elementRef.nativeElement;\r\n this.hostElement.style.position = 'relative';\r\n }\r\n \r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (!this.overlayElement || !this.spinnerElement) {\r\n this.init();\r\n }\r\n \r\n if (changes.isLoading) {\r\n const isLoadingValue = changes.isLoading.currentValue;\r\n \r\n if (isLoadingValue) {\r\n this.addLoadingIndicator();\r\n }\r\n else {\r\n this.removeLoadingIndicator();\r\n }\r\n \r\n this.changeDetectorRef.markForCheck();\r\n }\r\n }\r\n \r\n protected addLoadingIndicator(): void {\r\n this.renderer.appendChild(this.hostElement, this.overlayElement);\r\n this.renderer.appendChild(this.overlayElement, this.spinnerElement);\r\n }\r\n \r\n protected removeLoadingIndicator(): void {\r\n this.renderer.removeChild(this.overlayElement, this.spinnerElement);\r\n this.renderer.removeChild(this.hostElement, this.overlayElement);\r\n this.viewContainerRef.clear();\r\n }\r\n \r\n protected init(): void {\r\n this.initOverlayElement();\r\n this.initSpinnerComponent();\r\n }\r\n \r\n protected initSpinnerComponent(): void {\r\n const spinnerComponentFactory = this.componentFactoryResolver.resolveComponentFactory(AXLoadingComponent);\r\n const spinnerComponent = this.viewContainerRef.createComponent(spinnerComponentFactory);\r\n this.spinnerElement = spinnerComponent.location.nativeElement;\r\n }\r\n \r\n protected initOverlayElement(): void {\r\n this.overlayElement = this.renderer.createElement('div');\r\n this.renderer.addClass(this.overlayElement, OVERLAY_CLASS);\r\n }\r\n }\r\n ","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXConfig } from '@acorex/core/config';\r\nimport { AXLoadingComponent } from './loading.component';\r\nimport { AXLoadingDirective } from './loading.directive';\r\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\r\n\r\nconst COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];\r\nconst MODULES = [CommonModule, OverlayModule, PortalModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXLoadingModule {\r\n\r\n\r\n constructor() {\r\n AXConfig.set({\r\n layout: {\r\n loading: {\r\n spinner: AXLoadingSpinnerComponent,\r\n }\r\n }\r\n })\r\n\r\n }\r\n}\r\n","import { Injectable, NgZone } from '@angular/core';\r\nimport { asyncScheduler, BehaviorSubject, Observable } from 'rxjs';\r\nimport { finalize, observeOn } from 'rxjs/operators';\r\nimport { AXOverlayService, AXOverlayViewRef } from '@acorex/components/common';\r\nimport { AXLoadingComponent } from './loading.component';\r\n\r\ntype LoadingContext = object;\r\ntype LoaderId = string | number; // expected enum values\r\nconst DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';\r\n\r\n/**\r\n * Used for centrally setting/unsetting loading flags for components or services.\r\n * Should be connected to global HTTP interceptor which will unset\r\n * the loading flags in case an error happens using the clearLoadings() method.\r\n *\r\n * FAQ:\r\n * Q: How to change loading flag for a parent component?\r\n * A: Inject the parent component as a dependency to your constructor and\r\n * call loadingService.setLoading(parentComponent, STATE).\r\n *\r\n * Q: How to change loading flag for a child component?\r\n * A: Use a @ViewChild with component selector and pass the\r\n * reference of the child to setLoading method.\r\n *\r\n * Q: I need more loading indicators in my components. How to?\r\n * A: Assign a LoaderId to each indicator and then use them\r\n * with calls to methods of this service.\r\n */\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXLoadingService {\r\n // WeakMap will remove components from itself upon\r\n // their garbage collection by JS runtime.\r\n protected loadingStates: any = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, boolean>\r\n >();\r\n // Both loading state maps are kept in-sync such that\r\n // they can be used by both sync and async methods.\r\n protected loadingStates$: any = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, BehaviorSubject<boolean>>\r\n >();\r\n\r\n constructor(\r\n protected zoneRef: NgZone,\r\n private overlayService: AXOverlayService\r\n ) {}\r\n\r\n private _stack: { id: number; component: AXOverlayViewRef }[] = [];\r\n\r\n show(location?: Element): number {\r\n let host: Element | any;\r\n if (location) {\r\n host = location.closest('.ax-loading-host');\r\n }\r\n const containerElement = (host || location) as HTMLDivElement;\r\n const com = this.overlayService.show(\r\n AXLoadingComponent,\r\n {},\r\n {\r\n closeOnClickOutside: false,\r\n containerElement,\r\n hasBackdrop: true,\r\n backdropClass: ['ax-loading-overlay'],\r\n scroll: 'block',\r\n }\r\n );\r\n com.instance.visible = true;\r\n const id = new Date().getTime();\r\n this._stack.push({ id, component: com });\r\n return id;\r\n }\r\n\r\n hide(id): void {\r\n const f = this._stack.find((c) => c.id === id);\r\n if (f) {\r\n f.component.dispose();\r\n this._stack = this._stack.filter((c) => c.id !== id);\r\n }\r\n }\r\n\r\n // Observable creation operator.\r\n // LoaderId can be used when there are multiple loading indicators associated to a single context.\r\n // Context can be any object, though in practice, components and services will be the most common contexts.\r\n // loaderId is a non-mandatory parameter - when not specified, a default loaderId is used.\r\n // Such a scenario is used when your context has contains only one loading indicator.\r\n doLoading<V>(\r\n source$: Observable<V>,\r\n context: LoadingContext,\r\n loaderId?: LoaderId\r\n ): Observable<V> {\r\n this.startLoading(context, loaderId);\r\n\r\n return source$.pipe(\r\n observeOn(asyncScheduler),\r\n finalize(() => this.endLoading(context, loaderId))\r\n );\r\n }\r\n\r\n // To be used in your html templates.\r\n // Returns a boolean indicating whether a given loader is active in a given context.\r\n // If loaderId is unspecified, the method will return a logical disjunction of all\r\n // loader states in the context.\r\n isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {\r\n const loaderStates = this.loadingStates.get(context);\r\n\r\n if (!loaderStates) {\r\n return false;\r\n } else {\r\n if (loaderId !== undefined) {\r\n return loaderStates.get(this.getLoaderId(loaderId)) ?? false;\r\n } else {\r\n return [...loaderStates.values()].filter((state) => state).length > 0;\r\n }\r\n }\r\n }\r\n\r\n // To be used in your html templates with async pipes.\r\n // Returns an Observable of booleans indicating whether a given loader is active in a given context.\r\n isLoading$(\r\n context: LoadingContext,\r\n loaderId?: LoaderId | any\r\n ): Observable<boolean> {\r\n const coalescedLoaderId = this.getLoaderId(loaderId);\r\n\r\n if (!this.hasLoadingStates(context, coalescedLoaderId)) {\r\n this.setLoadingState(context, false, loaderId);\r\n }\r\n\r\n return this.loadingStates$.get(context).get(coalescedLoaderId);\r\n }\r\n\r\n // The startLoading and endLoading methods are intended to be used when handling\r\n // complex scenarios where a need for extended usage flexibility is desired.\r\n startLoading(context: LoadingContext, loaderId?: LoaderId): void {\r\n this.setLoadingState(context, true, this.getLoaderId(loaderId));\r\n }\r\n\r\n endLoading(context: LoadingContext, loaderId?: LoaderId): void {\r\n this.setLoadingState(context, false, this.getLoaderId(loaderId));\r\n }\r\n\r\n // To be called by middleware code (HTTP interceptors/routing listeners, etc.).\r\n clearLoadings(): void {\r\n this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\r\n this.loadingStates$ = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, BehaviorSubject<boolean>>\r\n >();\r\n }\r\n\r\n protected setLoadingState(\r\n context: LoadingContext,\r\n state: boolean,\r\n loaderId: LoaderId\r\n ): void {\r\n if (!this.hasLoadingStates(context, loaderId)) {\r\n if (this.hasContextLoadingState(context)) {\r\n this.loadingStates.get(context).set(loaderId, state);\r\n this.loadingStates$\r\n .get(context)\r\n .set(loaderId, new BehaviorSubject<boolean>(state));\r\n } else {\r\n this.loadingStates.set(\r\n context,\r\n new Map<LoaderId, boolean>([[loaderId, state]])\r\n );\r\n this.loadingStates$.set(\r\n context,\r\n new Map<LoaderId, BehaviorSubject<boolean>>([\r\n [loaderId, new BehaviorSubject<boolean>(state)],\r\n ])\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - loadingStates[context] is surely defined in this branch\r\n this.loadingStates.get(context).set(loaderId, state);\r\n this.loadingStates$.get(context).get(loaderId).next(state);\r\n }\r\n }\r\n\r\n protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {\r\n return (\r\n this.hasContextLoadingState(context) &&\r\n this.hasLoaderLoadingState(context, loaderId)\r\n );\r\n }\r\n\r\n protected hasContextLoadingState(context: LoadingContext) {\r\n return this.loadingStates.has(context) && this.loadingStates$.has(context);\r\n }\r\n\r\n protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {\r\n return (\r\n this.loadingStates.get(context).has(loaderId) &&\r\n this.loadingStates$.get(context).has(loaderId)\r\n );\r\n }\r\n\r\n protected getLoaderId(loaderId?: LoaderId): LoaderId {\r\n return loaderId ?? DEFAULT_LOADER_ID;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAgCM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;AAG1D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAIzB,QAAA,IAAA,CAAA,aAAa,GAA0B,IAAI,YAAY,EAAE,CAAC;AAmB1D,QAAA,IAAI,CAAA,IAAA,GAAW,SAAS,CAAC;KAtBxB;AAOD,IAAA,IACW,OAAO,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;IACD,IAAW,OAAO,CAAC,CAAU,EAAA;AAC3B,QAAA,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;AACtB,YAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YAClB,CAAC;kBACG,IAAI,CAAC,eAAe,E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C,QAAQ,CAAC,EAC9C;KACH;AAES,IAAA,WAAW,CAAC,QAAmB,EAAA;AACvC,QAAA,OAAO,QAAQ,KAAR,IAAA,IAAA,QAAQ,cAAR,QAAQ,GAAI,iBAAiB,CAAC;KACtC;;6GA5KU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,EAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;AC9BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-loading.mjs","sources":["../../../../projects/acorex/components/loading/src/loading.component.ts","../../../../projects/acorex/components/loading/src/loading-spinner.component.ts","../../../../projects/acorex/components/loading/src/loading.directive.ts","../../../../projects/acorex/components/loading/src/loading.module.ts","../../../../projects/acorex/components/loading/src/loading.service.ts","../../../../projects/acorex/components/loading/acorex-components-loading.ts"],"sourcesContent":["import { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXConfig } from '@acorex/core/config';\r\nimport {\r\n CdkPortalOutletAttachedRef,\r\n ComponentPortal,\r\n Portal,\r\n} from '@angular/cdk/portal';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ComponentRef,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-loading',\r\n template: `\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"\r\n ></ng-template>\r\n `,\r\n styleUrls:['./loading.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-loading' },\r\n})\r\nexport class AXLoadingComponent extends AXBaseComponentMixin {\r\n _selectedPortal: Portal<any>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n @Output()\r\n visibleChange: EventEmitter<boolean> = new EventEmitter();\r\n\r\n private _visible: boolean;\r\n\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (v != this._visible) {\r\n this._visible = v;\r\n v\r\n ? this._getHostElement().classList.remove('ax-hide')\r\n : this._getHostElement().classList.add('ax-hide');\r\n this.visibleChange.emit(v);\r\n }\r\n }\r\n\r\n @Input()\r\n type: string = 'spinner';\r\n\r\n @Input()\r\n text: string;\r\n\r\n onInit() {\r\n const loading = AXConfig.get(`layout.loading.${this.type}`);\r\n this._selectedPortal = new ComponentPortal(loading);\r\n this._cdr.markForCheck();\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n ref.instance.text = this.text;\r\n }\r\n }\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-loading-spinner',\r\n template: `\r\n <svg\r\n version=\"1.1\"\r\n width=\"24\"\r\n height=\"24\"\r\n style=\"fill: currentColor;\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n x=\"0px\"\r\n y=\"0px\"\r\n viewBox=\"0 0 50 50\"\r\n xml:space=\"preserve\">\r\n <path\r\n fill=\"current\"\r\n d=\"M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z\">\r\n <animateTransform\r\n attributeType=\"xml\"\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 25 25\"\r\n to=\"360 25 25\"\r\n dur=\"0.6s\"\r\n repeatCount=\"indefinite\" />\r\n </path>\r\n </svg>\r\n <span *ngIf=\"text\"> {{ text }} </span>\r\n `,\r\n host: { class: 'ax-loading-spinner' },\r\n})\r\nexport class AXLoadingSpinnerComponent {\r\n text: string;\r\n}\r\n","import {\r\n ChangeDetectorRef,\r\n ComponentFactoryResolver,\r\n Directive,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n Renderer2,\r\n SimpleChanges, ViewContainerRef\r\n } from '@angular/core';\r\nimport { AXLoadingComponent } from './loading.component';\r\n \r\n \r\n const OVERLAY_CLASS = 'ax-loading-overlay';\r\n \r\n // This directive places an overlay with a loading spinner over its host element\r\n // if isLoading equals to true and hides the overlay when isLoading becomes false.\r\n @Directive({\r\n selector: '[axIsLoading]'\r\n })\r\n export class AXLoadingDirective implements OnChanges {\r\n @Input('axIsLoading')\r\n isLoading = false;\r\n \r\n protected overlayElement!: HTMLDivElement;\r\n protected spinnerElement!: HTMLDivElement;\r\n protected hostElement!: HTMLDivElement;\r\n \r\n\r\n //TODO: ComponentFactoryResolver is deprecated\r\n constructor(\r\n protected readonly elementRef: ElementRef,\r\n protected readonly renderer: Renderer2,\r\n protected readonly changeDetectorRef: ChangeDetectorRef,\r\n protected readonly viewContainerRef: ViewContainerRef,\r\n protected readonly componentFactoryResolver: ComponentFactoryResolver,\r\n ) {\r\n this.hostElement = this.elementRef.nativeElement;\r\n this.hostElement.style.position = 'relative';\r\n }\r\n \r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (!this.overlayElement || !this.spinnerElement) {\r\n this.init();\r\n }\r\n \r\n if (changes.isLoading) {\r\n const isLoadingValue = changes.isLoading.currentValue;\r\n \r\n if (isLoadingValue) {\r\n this.addLoadingIndicator();\r\n }\r\n else {\r\n this.removeLoadingIndicator();\r\n }\r\n \r\n this.changeDetectorRef.markForCheck();\r\n }\r\n }\r\n \r\n protected addLoadingIndicator(): void {\r\n this.renderer.appendChild(this.hostElement, this.overlayElement);\r\n this.renderer.appendChild(this.overlayElement, this.spinnerElement);\r\n }\r\n \r\n protected removeLoadingIndicator(): void {\r\n this.renderer.removeChild(this.overlayElement, this.spinnerElement);\r\n this.renderer.removeChild(this.hostElement, this.overlayElement);\r\n this.viewContainerRef.clear();\r\n }\r\n \r\n protected init(): void {\r\n this.initOverlayElement();\r\n this.initSpinnerComponent();\r\n }\r\n \r\n protected initSpinnerComponent(): void {\r\n const spinnerComponentFactory = this.componentFactoryResolver.resolveComponentFactory(AXLoadingComponent);\r\n const spinnerComponent = this.viewContainerRef.createComponent(spinnerComponentFactory);\r\n this.spinnerElement = spinnerComponent.location.nativeElement;\r\n }\r\n \r\n protected initOverlayElement(): void {\r\n this.overlayElement = this.renderer.createElement('div');\r\n this.renderer.addClass(this.overlayElement, OVERLAY_CLASS);\r\n }\r\n }\r\n ","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXConfig } from '@acorex/core/config';\r\nimport { AXLoadingComponent } from './loading.component';\r\nimport { AXLoadingDirective } from './loading.directive';\r\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\r\n\r\nconst COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];\r\nconst MODULES = [CommonModule, OverlayModule, PortalModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXLoadingModule {\r\n\r\n\r\n constructor() {\r\n AXConfig.set({\r\n layout: {\r\n loading: {\r\n spinner: AXLoadingSpinnerComponent,\r\n }\r\n }\r\n })\r\n\r\n }\r\n}\r\n","import { Injectable, NgZone } from '@angular/core';\r\nimport { asyncScheduler, BehaviorSubject, Observable } from 'rxjs';\r\nimport { finalize, observeOn } from 'rxjs/operators';\r\nimport { AXOverlayService, AXOverlayViewRef } from '@acorex/components/common';\r\nimport { AXLoadingComponent } from './loading.component';\r\n\r\ntype LoadingContext = object;\r\ntype LoaderId = string | number; // expected enum values\r\nconst DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';\r\n\r\n/**\r\n * Used for centrally setting/unsetting loading flags for components or services.\r\n * Should be connected to global HTTP interceptor which will unset\r\n * the loading flags in case an error happens using the clearLoadings() method.\r\n *\r\n * FAQ:\r\n * Q: How to change loading flag for a parent component?\r\n * A: Inject the parent component as a dependency to your constructor and\r\n * call loadingService.setLoading(parentComponent, STATE).\r\n *\r\n * Q: How to change loading flag for a child component?\r\n * A: Use a @ViewChild with component selector and pass the\r\n * reference of the child to setLoading method.\r\n *\r\n * Q: I need more loading indicators in my components. How to?\r\n * A: Assign a LoaderId to each indicator and then use them\r\n * with calls to methods of this service.\r\n */\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXLoadingService {\r\n // WeakMap will remove components from itself upon\r\n // their garbage collection by JS runtime.\r\n protected loadingStates: any = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, boolean>\r\n >();\r\n // Both loading state maps are kept in-sync such that\r\n // they can be used by both sync and async methods.\r\n protected loadingStates$: any = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, BehaviorSubject<boolean>>\r\n >();\r\n\r\n constructor(\r\n protected zoneRef: NgZone,\r\n private overlayService: AXOverlayService\r\n ) {}\r\n\r\n private _stack: { id: number; component: AXOverlayViewRef }[] = [];\r\n\r\n show(location?: Element): number {\r\n let host: Element | any;\r\n if (location) {\r\n host = location.closest('.ax-loading-host');\r\n }\r\n const containerElement = (host || location) as HTMLDivElement;\r\n const com = this.overlayService.show(\r\n AXLoadingComponent,\r\n {},\r\n {\r\n closeOnClickOutside: false,\r\n containerElement,\r\n hasBackdrop: true,\r\n backdropClass: ['ax-loading-overlay'],\r\n scroll: 'block',\r\n }\r\n );\r\n com.instance.visible = true;\r\n const id = new Date().getTime();\r\n this._stack.push({ id, component: com });\r\n return id;\r\n }\r\n\r\n hide(id): void {\r\n const f = this._stack.find((c) => c.id === id);\r\n if (f) {\r\n f.component.dispose();\r\n this._stack = this._stack.filter((c) => c.id !== id);\r\n }\r\n }\r\n\r\n // Observable creation operator.\r\n // LoaderId can be used when there are multiple loading indicators associated to a single context.\r\n // Context can be any object, though in practice, components and services will be the most common contexts.\r\n // loaderId is a non-mandatory parameter - when not specified, a default loaderId is used.\r\n // Such a scenario is used when your context has contains only one loading indicator.\r\n doLoading<V>(\r\n source$: Observable<V>,\r\n context: LoadingContext,\r\n loaderId?: LoaderId\r\n ): Observable<V> {\r\n this.startLoading(context, loaderId);\r\n\r\n return source$.pipe(\r\n observeOn(asyncScheduler),\r\n finalize(() => this.endLoading(context, loaderId))\r\n );\r\n }\r\n\r\n // To be used in your html templates.\r\n // Returns a boolean indicating whether a given loader is active in a given context.\r\n // If loaderId is unspecified, the method will return a logical disjunction of all\r\n // loader states in the context.\r\n isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {\r\n const loaderStates = this.loadingStates.get(context);\r\n\r\n if (!loaderStates) {\r\n return false;\r\n } else {\r\n if (loaderId !== undefined) {\r\n return loaderStates.get(this.getLoaderId(loaderId)) ?? false;\r\n } else {\r\n return [...loaderStates.values()].filter((state) => state).length > 0;\r\n }\r\n }\r\n }\r\n\r\n // To be used in your html templates with async pipes.\r\n // Returns an Observable of booleans indicating whether a given loader is active in a given context.\r\n isLoading$(\r\n context: LoadingContext,\r\n loaderId?: LoaderId | any\r\n ): Observable<boolean> {\r\n const coalescedLoaderId = this.getLoaderId(loaderId);\r\n\r\n if (!this.hasLoadingStates(context, coalescedLoaderId)) {\r\n this.setLoadingState(context, false, loaderId);\r\n }\r\n\r\n return this.loadingStates$.get(context).get(coalescedLoaderId);\r\n }\r\n\r\n // The startLoading and endLoading methods are intended to be used when handling\r\n // complex scenarios where a need for extended usage flexibility is desired.\r\n startLoading(context: LoadingContext, loaderId?: LoaderId): void {\r\n this.setLoadingState(context, true, this.getLoaderId(loaderId));\r\n }\r\n\r\n endLoading(context: LoadingContext, loaderId?: LoaderId): void {\r\n this.setLoadingState(context, false, this.getLoaderId(loaderId));\r\n }\r\n\r\n // To be called by middleware code (HTTP interceptors/routing listeners, etc.).\r\n clearLoadings(): void {\r\n this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\r\n this.loadingStates$ = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, BehaviorSubject<boolean>>\r\n >();\r\n }\r\n\r\n protected setLoadingState(\r\n context: LoadingContext,\r\n state: boolean,\r\n loaderId: LoaderId\r\n ): void {\r\n if (!this.hasLoadingStates(context, loaderId)) {\r\n if (this.hasContextLoadingState(context)) {\r\n this.loadingStates.get(context).set(loaderId, state);\r\n this.loadingStates$\r\n .get(context)\r\n .set(loaderId, new BehaviorSubject<boolean>(state));\r\n } else {\r\n this.loadingStates.set(\r\n context,\r\n new Map<LoaderId, boolean>([[loaderId, state]])\r\n );\r\n this.loadingStates$.set(\r\n context,\r\n new Map<LoaderId, BehaviorSubject<boolean>>([\r\n [loaderId, new BehaviorSubject<boolean>(state)],\r\n ])\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - loadingStates[context] is surely defined in this branch\r\n this.loadingStates.get(context).set(loaderId, state);\r\n this.loadingStates$.get(context).get(loaderId).next(state);\r\n }\r\n }\r\n\r\n protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {\r\n return (\r\n this.hasContextLoadingState(context) &&\r\n this.hasLoaderLoadingState(context, loaderId)\r\n );\r\n }\r\n\r\n protected hasContextLoadingState(context: LoadingContext) {\r\n return this.loadingStates.has(context) && this.loadingStates$.has(context);\r\n }\r\n\r\n protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {\r\n return (\r\n this.loadingStates.get(context).has(loaderId) &&\r\n this.loadingStates$.get(context).has(loaderId)\r\n );\r\n }\r\n\r\n protected getLoaderId(loaderId?: LoaderId): LoaderId {\r\n return loaderId ?? DEFAULT_LOADER_ID;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAgCM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;AAG1D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAIzB,QAAA,IAAA,CAAA,aAAa,GAA0B,IAAI,YAAY,EAAE,CAAC;AAmB1D,QAAA,IAAI,CAAA,IAAA,GAAW,SAAS,CAAC;KAtBxB;AAOD,IAAA,IACW,OAAO,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;IACD,IAAW,OAAO,CAAC,CAAU,EAAA;AAC3B,QAAA,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;AACtB,YAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YAClB,CAAC;kBACG,IAAI,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC;AACpD,kBAAE,IAAI,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AACpD,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5B,SAAA;KACF;IAQD,MAAM,GAAA;AACJ,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAkB,eAAA,EAAA,IAAI,CAAC,IAAI,CAAE,CAAA,CAAC,CAAC;QAC5D,IAAI,CAAC,eAAe,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,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AAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;AC9BD;;AAEG;;;;"}
|
@@ -15,7 +15,7 @@ class AXTooltipComponent extends AXBaseComponentMixin {
|
|
15
15
|
}
|
16
16
|
}
|
17
17
|
AXTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTooltipComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
18
|
-
AXTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem;background-color:rgb(var(--ax-color-ghost));
|
18
|
+
AXTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost));color:rgb(var(--ax-color-ghost-fore));border-radius:var(--ax-rounded-border-default);font-size:.875rem}.ax-tooltip-container .ax-tooltip-tringle{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgb(var(--ax-color-ghost));position:absolute}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-bottom{transform:rotate(180deg);left:0;right:0;margin:auto;top:-5px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-right{transform:rotate(90deg);top:0;bottom:0;margin:auto;left:-7px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-top{transform:rotate(0);left:0;right:0;margin:auto}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-left{transform:rotate(270deg);top:0;bottom:0;margin:auto;right:-7px}\n"], animations: [
|
19
19
|
trigger('tooltip', [
|
20
20
|
transition(':enter', [
|
21
21
|
style({ opacity: 0 }),
|
@@ -34,7 +34,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
34
34
|
]),
|
35
35
|
transition(':leave', [animate(50, style({ opacity: 0 }))]),
|
36
36
|
]),
|
37
|
-
], template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem;background-color:rgb(var(--ax-color-ghost));
|
37
|
+
], template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost));color:rgb(var(--ax-color-ghost-fore));border-radius:var(--ax-rounded-border-default);font-size:.875rem}.ax-tooltip-container .ax-tooltip-tringle{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgb(var(--ax-color-ghost));position:absolute}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-bottom{transform:rotate(180deg);left:0;right:0;margin:auto;top:-5px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-right{transform:rotate(90deg);top:0;bottom:0;margin:auto;left:-7px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-top{transform:rotate(0);left:0;right:0;margin:auto}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-left{transform:rotate(270deg);top:0;bottom:0;margin:auto;right:-7px}\n"] }]
|
38
38
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { text: [{
|
39
39
|
type: Input
|
40
40
|
}], position: [{
|
@@ -145,4 +145,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
145
145
|
|
146
146
|
export { AXTooltipComponent, AXTooltipDirective, AXTooltipModule };
|
147
147
|
//# sourceMappingURL=acorex-components-tooltip.mjs.map
|
148
|
-
//# sourceMappingURL=acorex-components-tooltip.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../projects/acorex/components/tooltip/src/tooltip.component.ts","../../../../projects/acorex/components/tooltip/src/tooltip.component.html","../../../../projects/acorex/components/tooltip/src/tooltip.directive.ts","../../../../projects/acorex/components/tooltip/src/tooltip.module.ts","../../../../projects/acorex/components/tooltip/acorex-components-tooltip.ts"],"sourcesContent":["import { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { animate, style, transition, trigger } from '@angular/animations';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-tooltip',\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n animations: [\r\n trigger('tooltip', [\r\n transition(':enter', [\r\n style({ opacity: 0 }),\r\n animate(50, style({ opacity: 1 })),\r\n ]),\r\n transition(':leave', [animate(50, style({ opacity: 0 }))]),\r\n ]),\r\n ],\r\n})\r\nexport class AXTooltipComponent extends AXBaseComponentMixin {\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n @Input()\r\n text: string = 'Text';\r\n\r\n @Input() position = 'top';\r\n}\r\n","<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>","import {\r\n ComponentRef,\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n} from '@angular/core';\r\nimport {\r\n Overlay,\r\n OverlayPositionBuilder,\r\n OverlayRef,\r\n} from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\n\r\n@Directive({ selector: '[axTooltip]' })\r\nexport class AXTooltipDirective implements OnInit {\r\n @Input('axTooltip') text = '';\r\n @Input('axTooltipPosition') position = 'top';\r\n\r\n private overlayRef: OverlayRef;\r\n\r\n positions: any;\r\n\r\n constructor(\r\n private overlay: Overlay,\r\n private overlayPositionBuilder: OverlayPositionBuilder,\r\n private elementRef: ElementRef\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n switch (this.position) {\r\n default:\r\n case 'top':\r\n this.positions = {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'bottom',\r\n offsetY: -8,\r\n };\r\n break;\r\n case 'right':\r\n this.positions = {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'center',\r\n offsetX: 8,\r\n };\r\n break;\r\n case 'bottom':\r\n this.positions = {\r\n originX: 'center',\r\n originY: 'bottom',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n offsetY: 8,\r\n };\r\n break;\r\n case 'left':\r\n this.positions = {\r\n originX: 'start',\r\n originY: 'center',\r\n overlayX: 'end',\r\n overlayY: 'center',\r\n offsetX: -8,\r\n };\r\n break;\r\n }\r\n const positionStrategy = this.overlayPositionBuilder\r\n .flexibleConnectedTo(this.elementRef)\r\n .withPositions([this.positions]);\r\n\r\n this.overlayRef = this.overlay.create({ positionStrategy });\r\n }\r\n\r\n @HostListener('mouseenter')\r\n show() {\r\n const tooltipRef: ComponentRef<AXTooltipComponent> = this.overlayRef.attach(\r\n new ComponentPortal(AXTooltipComponent)\r\n );\r\n\r\n tooltipRef.instance.text = this.text;\r\n tooltipRef.instance.position = this.position;\r\n }\r\n\r\n @HostListener('mouseout')\r\n hide() {\r\n this.overlayRef.detach();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\nimport { AXTooltipDirective } from './tooltip.directive';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\r\nconst MODULES = [CommonModule, OverlayModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXTooltipModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA2BM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;IAC1D,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAGzB,QAAA,IAAI,CAAA,IAAA,GAAW,MAAM,CAAC;AAEb,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAJzB;;+GAHU,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAlB,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC3B/B,+MAKM,EDYQ,MAAA,EAAA,CAAA,
|
1
|
+
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../projects/acorex/components/tooltip/src/tooltip.component.ts","../../../../projects/acorex/components/tooltip/src/tooltip.component.html","../../../../projects/acorex/components/tooltip/src/tooltip.directive.ts","../../../../projects/acorex/components/tooltip/src/tooltip.module.ts","../../../../projects/acorex/components/tooltip/acorex-components-tooltip.ts"],"sourcesContent":["import { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { animate, style, transition, trigger } from '@angular/animations';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-tooltip',\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n animations: [\r\n trigger('tooltip', [\r\n transition(':enter', [\r\n style({ opacity: 0 }),\r\n animate(50, style({ opacity: 1 })),\r\n ]),\r\n transition(':leave', [animate(50, style({ opacity: 0 }))]),\r\n ]),\r\n ],\r\n})\r\nexport class AXTooltipComponent extends AXBaseComponentMixin {\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n @Input()\r\n text: string = 'Text';\r\n\r\n @Input() position = 'top';\r\n}\r\n","<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>","import {\r\n ComponentRef,\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n} from '@angular/core';\r\nimport {\r\n Overlay,\r\n OverlayPositionBuilder,\r\n OverlayRef,\r\n} from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\n\r\n@Directive({ selector: '[axTooltip]' })\r\nexport class AXTooltipDirective implements OnInit {\r\n @Input('axTooltip') text = '';\r\n @Input('axTooltipPosition') position = 'top';\r\n\r\n private overlayRef: OverlayRef;\r\n\r\n positions: any;\r\n\r\n constructor(\r\n private overlay: Overlay,\r\n private overlayPositionBuilder: OverlayPositionBuilder,\r\n private elementRef: ElementRef\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n switch (this.position) {\r\n default:\r\n case 'top':\r\n this.positions = {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'bottom',\r\n offsetY: -8,\r\n };\r\n break;\r\n case 'right':\r\n this.positions = {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'center',\r\n offsetX: 8,\r\n };\r\n break;\r\n case 'bottom':\r\n this.positions = {\r\n originX: 'center',\r\n originY: 'bottom',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n offsetY: 8,\r\n };\r\n break;\r\n case 'left':\r\n this.positions = {\r\n originX: 'start',\r\n originY: 'center',\r\n overlayX: 'end',\r\n overlayY: 'center',\r\n offsetX: -8,\r\n };\r\n break;\r\n }\r\n const positionStrategy = this.overlayPositionBuilder\r\n .flexibleConnectedTo(this.elementRef)\r\n .withPositions([this.positions]);\r\n\r\n this.overlayRef = this.overlay.create({ positionStrategy });\r\n }\r\n\r\n @HostListener('mouseenter')\r\n show() {\r\n const tooltipRef: ComponentRef<AXTooltipComponent> = this.overlayRef.attach(\r\n new ComponentPortal(AXTooltipComponent)\r\n );\r\n\r\n tooltipRef.instance.text = this.text;\r\n tooltipRef.instance.position = this.position;\r\n }\r\n\r\n @HostListener('mouseout')\r\n hide() {\r\n this.overlayRef.detach();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\nimport { AXTooltipDirective } from './tooltip.directive';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\r\nconst MODULES = [CommonModule, OverlayModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXTooltipModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA2BM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;IAC1D,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAGzB,QAAA,IAAI,CAAA,IAAA,GAAW,MAAM,CAAC;AAEb,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAJzB;;+GAHU,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,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A,EAAA,IAAA,EAAA,eAAe,YAJb,OAAO,CAAA,EAAA,CAAA,CAAA;2FAIT,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;ACdD;;AAEG;;;;"}
|
@@ -7,10 +7,11 @@ import * as i0 from '@angular/core';
|
|
7
7
|
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, HostListener, NgModule, Injectable } from '@angular/core';
|
8
8
|
import * as i1 from '@angular/common';
|
9
9
|
import { CommonModule } from '@angular/common';
|
10
|
+
import * as i3 from '@acorex/components/decorators';
|
11
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
10
12
|
import { A11yModule } from '@angular/cdk/a11y';
|
11
13
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
12
14
|
import { AXButtonModule } from '@acorex/components/button';
|
13
|
-
import { AXDecoratorModule } from '@acorex/components/decorators';
|
14
15
|
import { AXTranslator } from '@acorex/core/translation';
|
15
16
|
import * as i1$1 from '@angular/cdk/overlay';
|
16
17
|
|
@@ -60,10 +61,10 @@ class AXActionSheetComponent extends AXBaseComponent {
|
|
60
61
|
}
|
61
62
|
}
|
62
63
|
AXActionSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXActionSheetComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
63
|
-
AXActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXActionSheetComponent, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n
|
64
|
+
AXActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXActionSheetComponent, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div> -->\r\n<ax-header>\r\n <ax-title>{{ title }}</ax-title>\r\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\r\n</ax-header>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div\r\n class=\"ax-action-sheet-item ax-{{ item.color }}\"\r\n [class.ax-state-disabled]=\"item.disabled\"\r\n (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{ item.text }}</span>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: ["@media (max-width: 599px){ax-action-sheet{width:100vw}}@media (min-width: 600px){ax-action-sheet{width:75vw}}@media (min-width: 1200px){ax-action-sheet{width:30vw}}@media (min-width: 1800px){ax-action-sheet{width:25vw}}ax-action-sheet ax-header{padding:.75rem}ax-action-sheet .ax-action-sheet-items{padding:.5rem 0}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item{-webkit-user-select:none;user-select:none;cursor:pointer;padding:.75rem 1rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item:hover{background-color:rgba(var(--ax-color-ghost),.03)}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item .item-icon{font-size:1.5rem;margin-inline-end:.75rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-primary{color:rgb(var(--ax-color-primary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-secondary{color:rgb(var(--ax-color-secondary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-success{color:rgb(var(--ax-color-success-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-warning{color:rgb(var(--ax-color-warning-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-danger{color:rgb(var(--ax-color-danger-500))}\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: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: i3.AXDecoratorHeaderComponent, selector: "ax-header" }, { kind: "component", type: i3.AXDecoratorTitleComponent, selector: "ax-title" }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
64
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXActionSheetComponent, decorators: [{
|
65
66
|
type: Component,
|
66
|
-
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n
|
67
|
+
args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!-- <div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div> -->\r\n<ax-header>\r\n <ax-title>{{ title }}</ax-title>\r\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\r\n</ax-header>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div\r\n class=\"ax-action-sheet-item ax-{{ item.color }}\"\r\n [class.ax-state-disabled]=\"item.disabled\"\r\n (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{ item.text }}</span>\r\n </div>\r\n </ng-container>\r\n</div>\r\n", styles: ["@media (max-width: 599px){ax-action-sheet{width:100vw}}@media (min-width: 600px){ax-action-sheet{width:75vw}}@media (min-width: 1200px){ax-action-sheet{width:30vw}}@media (min-width: 1800px){ax-action-sheet{width:25vw}}ax-action-sheet ax-header{padding:.75rem}ax-action-sheet .ax-action-sheet-items{padding:.5rem 0}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item{-webkit-user-select:none;user-select:none;cursor:pointer;padding:.75rem 1rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item:hover{background-color:rgba(var(--ax-color-ghost),.03)}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item .item-icon{font-size:1.5rem;margin-inline-end:.75rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-primary{color:rgb(var(--ax-color-primary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-secondary{color:rgb(var(--ax-color-secondary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-success{color:rgb(var(--ax-color-success-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-warning{color:rgb(var(--ax-color-warning-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-danger{color:rgb(var(--ax-color-danger-500))}\n"] }]
|
67
68
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { onKeydownHandler: [{
|
68
69
|
type: HostListener,
|
69
70
|
args: ['keydown.escape', ['$event']]
|
@@ -174,4 +175,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
174
175
|
|
175
176
|
export { AXActionSheetComponent, AXActionSheetModule, AXActionSheetService };
|
176
177
|
//# sourceMappingURL=acorex-components-action-sheet.mjs.map
|
177
|
-
//# sourceMappingURL=acorex-components-action-sheet.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.service.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXComponentCloseEvent, TAB_META_KEY } from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, ElementRef, EventEmitter, HostListener, Input, ViewContainerRef, ViewEncapsulation } from '@angular/core';\r\nimport { AXActionSheetItem } from './action-sheet.interface';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n styleUrls: ['./action-sheet.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\n\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n\r\n _selectedPortal: Portal<any>;\r\n title: string;\r\n items: AXActionSheetItem[] = [];\r\n content: any;\r\n showCloseButton: boolean = true;\r\n showHeader: boolean = true;\r\n data: any = {};\r\n\r\n onClosed: EventEmitter<AXComponentCloseEvent> = new EventEmitter<AXComponentCloseEvent>();\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, private _viewContainerRef: ViewContainerRef,) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n close(): void {\r\n this.onClosed.emit({\r\n component: this[TAB_META_KEY].component,\r\n htmlElement: this._getHostElement(),\r\n });\r\n this._cdr.detectChanges();\r\n }\r\n\r\n onInit(): void {\r\n if (this.content) {\r\n this._selectedPortal = new ComponentPortal(this.content);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n\r\n @HostListener('keydown.escape', ['$event'])\r\n onKeydownHandler(event: KeyboardEvent) {\r\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\r\n if (this.showCloseButton && focusedOrHasFocused) {\r\n this.close();\r\n }\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n this[TAB_META_KEY].component = ref.instance;\r\n Object.assign(this[TAB_META_KEY].component, this.data);\r\n if (ref.instance.onClosed) {\r\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\r\n this.onClosed.emit(e);\r\n });\r\n }\r\n }\r\n }\r\n\r\n _handleCloseClick() {\r\n this.close();\r\n }\r\n}\r\n","<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div class=\"ax-action-sheet-item ax-{{item.color}}\" [class.ax-state-disabled]=\"item.disabled\" (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{item.text}}</span>\r\n </div>\r\n </ng-container>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXCommonModule } from '@acorex/components/common';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\n\r\n\r\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\r\n\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent],\r\n imports: [...MODULES],\r\n exports: [AXActionSheetComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule { }\r\n","import {\r\n AXComponentClosedPromise,\r\n AXComponentCloseEvent,\r\n AXOverlayService,\r\n AXOverlayViewRef,\r\n TAB_META_KEY,\r\n} from '@acorex/components/common';\r\nimport { AXTranslator } from '@acorex/core/translation';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable } from '@angular/core';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetOptions } from './action-sheet.interface';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXActionSheetService {\r\n // _overlayRef: OverlayRef;\r\n // _templatePortal!: ComponentPortal<any>;\r\n\r\n constructor(\r\n private _overlay: Overlay,\r\n private overlayService: AXOverlayService\r\n ) {}\r\n\r\n //open(items: AXActionSheetItem[],options?:AXActionSheetOptions);\r\n //open(content:AXActionSheetContentType, options?: AXActionSheetOptions);\r\n open(options: AXActionSheetOptions): AXComponentClosedPromise {\r\n const opt: any = {\r\n title: AXTranslator.get('action-sheet.title'),\r\n showCloseButton: true,\r\n closeOnBackdrop: true,\r\n showHeader: true,\r\n };\r\n Object.assign(opt, options);\r\n const lastActiveElement = document.activeElement as HTMLElement;\r\n const com = this.overlayService.show(AXActionSheetComponent, opt, {\r\n hasBackdrop: true,\r\n closeOnClickOutside: opt.closeOnBackdrop,\r\n transparentBackdrop: false,\r\n panelClass: ['ax-actionsheet-panel'],\r\n position: this._overlay.position().global().bottom().centerHorizontally(),\r\n });\r\n const actionSheet = com.instance as AXActionSheetComponent;\r\n actionSheet[TAB_META_KEY] = {};\r\n actionSheet.onClosed.subscribe(c => {\r\n this.closePopup(actionSheet, com, c, lastActiveElement);\r\n });\r\n const promise = new AXComponentClosedPromise((resolve, reject) => {\r\n actionSheet[TAB_META_KEY].close = e => {\r\n if (resolve) {\r\n resolve(e);\r\n } else {\r\n reject(e);\r\n }\r\n };\r\n });\r\n promise['closeMethod'] = () => {\r\n actionSheet.close();\r\n };\r\n return promise;\r\n }\r\n\r\n private closePopup(\r\n popup: AXActionSheetComponent,\r\n com: AXOverlayViewRef,\r\n result: AXComponentCloseEvent,\r\n lastActiveElement?: HTMLElement\r\n ) {\r\n const closeFunc = e => {\r\n com.dispose();\r\n delete e.cancel;\r\n popup[TAB_META_KEY].close(e);\r\n if (lastActiveElement?.focus) {\r\n lastActiveElement.focus();\r\n }\r\n };\r\n const e = { cancel: false };\r\n const closingFunc = popup[TAB_META_KEY].component?.onClosing;\r\n if (closingFunc) {\r\n const res = closingFunc(e);\r\n if (res instanceof Promise) {\r\n res.then(() => {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n });\r\n } else {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n }\r\n } else {\r\n closeFunc(result);\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAcM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAYzD,IAAA,WAAA,CAAY,UAAsB,EAAE,GAAsB,EAAU,iBAAmC,EAAA;AACrG,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAD2C,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;QARvG,IAAK,CAAA,KAAA,GAAwB,EAAE,CAAC;QAEhC,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;QAChC,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAC3B,IAAI,CAAA,IAAA,GAAQ,EAAE,CAAC;AAEf,QAAA,IAAA,CAAA,QAAQ,GAAwC,IAAI,YAAY,EAAyB,CAAC;KAIzF;IAED,KAAK,GAAA;AACH,QAAA,IAAI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SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,qBAAA;AACH,iBAAC,CAAC,CAAC;AACJ,aAAA;AAAM,iBAAA;gBACL,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,EAAE;oBAClC,SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,iBAAA;AACF,aAAA;AACF,SAAA;AAAM,aAAA;YACL,SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,SAAA;KACF;;iHA/EU,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACblC;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.service.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXComponentCloseEvent, TAB_META_KEY } from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, ElementRef, EventEmitter, HostListener, Input, ViewContainerRef, ViewEncapsulation } from '@angular/core';\r\nimport { AXActionSheetItem } from './action-sheet.interface';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n styleUrls: ['./action-sheet.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\n\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n\r\n _selectedPortal: Portal<any>;\r\n title: string;\r\n items: AXActionSheetItem[] = [];\r\n content: any;\r\n showCloseButton: boolean = true;\r\n showHeader: boolean = true;\r\n data: any = {};\r\n\r\n onClosed: EventEmitter<AXComponentCloseEvent> = new EventEmitter<AXComponentCloseEvent>();\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, private _viewContainerRef: ViewContainerRef,) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n close(): void {\r\n this.onClosed.emit({\r\n component: this[TAB_META_KEY].component,\r\n htmlElement: this._getHostElement(),\r\n });\r\n this._cdr.detectChanges();\r\n }\r\n\r\n onInit(): void {\r\n if (this.content) {\r\n this._selectedPortal = new ComponentPortal(this.content);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n\r\n @HostListener('keydown.escape', ['$event'])\r\n onKeydownHandler(event: KeyboardEvent) {\r\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\r\n if (this.showCloseButton && focusedOrHasFocused) {\r\n this.close();\r\n }\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n this[TAB_META_KEY].component = ref.instance;\r\n Object.assign(this[TAB_META_KEY].component, this.data);\r\n if (ref.instance.onClosed) {\r\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\r\n this.onClosed.emit(e);\r\n });\r\n }\r\n }\r\n }\r\n\r\n _handleCloseClick() {\r\n this.close();\r\n }\r\n}\r\n","<!-- <div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div> -->\r\n<ax-header>\r\n <ax-title>{{ title }}</ax-title>\r\n <ax-close-button (click)=\"_handleCloseClick()\" tabindex=\"1\"></ax-close-button>\r\n</ax-header>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<!-- TODO: Are you sure we need this? if remove this content not showing -->\r\n<ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div\r\n class=\"ax-action-sheet-item ax-{{ item.color }}\"\r\n [class.ax-state-disabled]=\"item.disabled\"\r\n (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{ item.text }}</span>\r\n </div>\r\n </ng-container>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXCommonModule } from '@acorex/components/common';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\n\r\n\r\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\r\n\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent],\r\n imports: [...MODULES],\r\n exports: [AXActionSheetComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule { }\r\n","import {\r\n AXComponentClosedPromise,\r\n AXComponentCloseEvent,\r\n AXOverlayService,\r\n AXOverlayViewRef,\r\n TAB_META_KEY,\r\n} from '@acorex/components/common';\r\nimport { AXTranslator } from '@acorex/core/translation';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable } from '@angular/core';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetOptions } from './action-sheet.interface';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXActionSheetService {\r\n // _overlayRef: OverlayRef;\r\n // _templatePortal!: ComponentPortal<any>;\r\n\r\n constructor(\r\n private _overlay: Overlay,\r\n private overlayService: AXOverlayService\r\n ) {}\r\n\r\n //open(items: AXActionSheetItem[],options?:AXActionSheetOptions);\r\n //open(content:AXActionSheetContentType, options?: AXActionSheetOptions);\r\n open(options: AXActionSheetOptions): AXComponentClosedPromise {\r\n const opt: any = {\r\n title: AXTranslator.get('action-sheet.title'),\r\n showCloseButton: true,\r\n closeOnBackdrop: true,\r\n showHeader: true,\r\n };\r\n Object.assign(opt, options);\r\n const lastActiveElement = document.activeElement as HTMLElement;\r\n const com = this.overlayService.show(AXActionSheetComponent, opt, {\r\n hasBackdrop: true,\r\n closeOnClickOutside: opt.closeOnBackdrop,\r\n transparentBackdrop: false,\r\n panelClass: ['ax-actionsheet-panel'],\r\n position: this._overlay.position().global().bottom().centerHorizontally(),\r\n });\r\n const actionSheet = com.instance as AXActionSheetComponent;\r\n actionSheet[TAB_META_KEY] = {};\r\n actionSheet.onClosed.subscribe(c => {\r\n this.closePopup(actionSheet, com, c, lastActiveElement);\r\n });\r\n const promise = new AXComponentClosedPromise((resolve, reject) => {\r\n actionSheet[TAB_META_KEY].close = e => {\r\n if (resolve) {\r\n resolve(e);\r\n } else {\r\n reject(e);\r\n }\r\n };\r\n });\r\n promise['closeMethod'] = () => {\r\n actionSheet.close();\r\n };\r\n return promise;\r\n }\r\n\r\n private closePopup(\r\n popup: AXActionSheetComponent,\r\n com: AXOverlayViewRef,\r\n result: AXComponentCloseEvent,\r\n lastActiveElement?: HTMLElement\r\n ) {\r\n const closeFunc = e => {\r\n com.dispose();\r\n delete e.cancel;\r\n popup[TAB_META_KEY].close(e);\r\n if (lastActiveElement?.focus) {\r\n lastActiveElement.focus();\r\n }\r\n };\r\n const e = { cancel: false };\r\n const closingFunc = popup[TAB_META_KEY].component?.onClosing;\r\n if (closingFunc) {\r\n const res = closingFunc(e);\r\n if (res instanceof Promise) {\r\n res.then(() => {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n });\r\n } else {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n }\r\n } else {\r\n closeFunc(result);\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;AAcM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAYzD,IAAA,WAAA,CAAY,UAAsB,EAAE,GAAsB,EAAU,iBAAmC,EAAA;AACrG,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAD2C,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;QARvG,IAAK,CAAA,KAAA,GAAwB,EAAE,CAAC;QAEhC,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;QAChC,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAC3B,IAAI,CAAA,IAAA,GAAQ,EAAE,CAAC;AAEf,QAAA,IAAA,CAAA,QAAQ,GAAwC,IAAI,YAAY,EAAyB,CAAC;KAIzF;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACjB,YAAA,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,SAAS;AACvC,YAAA,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE;AACpC,S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AC,CAAC,CAAC;YAC3B,IAAI,GAAG,YAAY,OAAO,EAAE;AAC1B,gBAAA,GAAG,CAAC,IAAI,CAAC,MAAK;oBACZ,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,EAAE;wBAClC,SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,qBAAA;AACH,iBAAC,CAAC,CAAC;AACJ,aAAA;AAAM,iBAAA;gBACL,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,EAAE;oBAClC,SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,iBAAA;AACF,aAAA;AACF,SAAA;AAAM,aAAA;YACL,SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,SAAA;KACF;;iHA/EU,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACblC;;AAEG;;;;"}
|
@@ -527,3 +527,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
527
527
|
|
528
528
|
export { AXCalendarBaseComponent, AXCalendarComponent, AXCalendarComponentMixin, AXCalendarModule, AXCalendarNavigateEvent, CALENDAR_INPUTS, CALENDAR_OUTPUTS };
|
529
529
|
//# sourceMappingURL=acorex-components-calendar.mjs.map
|
530
|
+
//# sourceMappingURL=acorex-components-calendar.mjs.map
|
@@ -50,7 +50,7 @@ AXLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ver
|
|
50
50
|
[cdkPortalOutlet]="_selectedPortal"
|
51
51
|
(attached)="_handleAttched($event)"
|
52
52
|
></ng-template>
|
53
|
-
`, isInline: true, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex}\n"], dependencies: [{ kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
53
|
+
`, isInline: true, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex;gap:.75rem}\n"], dependencies: [{ kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
54
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXLoadingComponent, decorators: [{
|
55
55
|
type: Component,
|
56
56
|
args: [{ selector: 'ax-loading', template: `
|
@@ -58,7 +58,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
58
58
|
[cdkPortalOutlet]="_selectedPortal"
|
59
59
|
(attached)="_handleAttched($event)"
|
60
60
|
></ng-template>
|
61
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-loading' }, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex}\n"] }]
|
61
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-loading' }, styles: ["ax-loading{position:relative}ax-loading:before,ax-loading:after{content:\"\";position:absolute;top:50%;left:50%;width:100%;height:100%;border-radius:50%;transform:translate(-50%,-50%) scale(0)}ax-loading:before,ax-loading:after{background-color:transparent;animation:pulse2 2s ease-in-out infinite}@keyframes pulse2{0%,to{transform:translate(-50%,-50%) scale(0);opacity:1}50%{transform:translate(-50%,-50%) scale(1);opacity:0}}.ax-loading-overlay{background:rgba(var(--ax-color-ghost),.02)}.ax-loading-spinner{display:flex;gap:.75rem}\n"] }]
|
62
62
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { visibleChange: [{
|
63
63
|
type: Output
|
64
64
|
}], visible: [{
|
@@ -83,12 +83,10 @@ AXLoadingSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
83
83
|
x="0px"
|
84
84
|
y="0px"
|
85
85
|
viewBox="0 0 50 50"
|
86
|
-
xml:space="preserve"
|
87
|
-
>
|
86
|
+
xml:space="preserve">
|
88
87
|
<path
|
89
88
|
fill="current"
|
90
|
-
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"
|
91
|
-
>
|
89
|
+
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z">
|
92
90
|
<animateTransform
|
93
91
|
attributeType="xml"
|
94
92
|
attributeName="transform"
|
@@ -96,11 +94,10 @@ AXLoadingSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
|
|
96
94
|
from="0 25 25"
|
97
95
|
to="360 25 25"
|
98
96
|
dur="0.6s"
|
99
|
-
repeatCount="indefinite"
|
100
|
-
/>
|
97
|
+
repeatCount="indefinite" />
|
101
98
|
</path>
|
102
99
|
</svg>
|
103
|
-
<span
|
100
|
+
<span *ngIf="text"> {{ text }} </span>
|
104
101
|
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
105
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXLoadingSpinnerComponent, decorators: [{
|
106
103
|
type: Component,
|
@@ -117,12 +114,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
117
114
|
x="0px"
|
118
115
|
y="0px"
|
119
116
|
viewBox="0 0 50 50"
|
120
|
-
xml:space="preserve"
|
121
|
-
>
|
117
|
+
xml:space="preserve">
|
122
118
|
<path
|
123
119
|
fill="current"
|
124
|
-
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"
|
125
|
-
>
|
120
|
+
d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z">
|
126
121
|
<animateTransform
|
127
122
|
attributeType="xml"
|
128
123
|
attributeName="transform"
|
@@ -130,11 +125,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
130
125
|
from="0 25 25"
|
131
126
|
to="360 25 25"
|
132
127
|
dur="0.6s"
|
133
|
-
repeatCount="indefinite"
|
134
|
-
/>
|
128
|
+
repeatCount="indefinite" />
|
135
129
|
</path>
|
136
130
|
</svg>
|
137
|
-
<span
|
131
|
+
<span *ngIf="text"> {{ text }} </span>
|
138
132
|
`,
|
139
133
|
host: { class: 'ax-loading-spinner' },
|
140
134
|
}]
|
@@ -387,4 +381,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
387
381
|
|
388
382
|
export { AXLoadingComponent, AXLoadingDirective, AXLoadingModule, AXLoadingService, AXLoadingSpinnerComponent };
|
389
383
|
//# sourceMappingURL=acorex-components-loading.mjs.map
|
390
|
-
//# sourceMappingURL=acorex-components-loading.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-loading.mjs","sources":["../../../../projects/acorex/components/loading/src/loading.component.ts","../../../../projects/acorex/components/loading/src/loading-spinner.component.ts","../../../../projects/acorex/components/loading/src/loading.directive.ts","../../../../projects/acorex/components/loading/src/loading.module.ts","../../../../projects/acorex/components/loading/src/loading.service.ts","../../../../projects/acorex/components/loading/acorex-components-loading.ts"],"sourcesContent":["import { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXConfig } from '@acorex/core/config';\r\nimport {\r\n CdkPortalOutletAttachedRef,\r\n ComponentPortal,\r\n Portal,\r\n} from '@angular/cdk/portal';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ComponentRef,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-loading',\r\n template: `\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"\r\n ></ng-template>\r\n `,\r\n styleUrls:['./loading.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-loading' },\r\n})\r\nexport class AXLoadingComponent extends AXBaseComponentMixin {\r\n _selectedPortal: Portal<any>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n @Output()\r\n visibleChange: EventEmitter<boolean> = new EventEmitter();\r\n\r\n private _visible: boolean;\r\n\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (v != this._visible) {\r\n this._visible = v;\r\n v\r\n ? this._getHostElement().classList.remove('ax-hide')\r\n : this._getHostElement().classList.add('ax-hide');\r\n this.visibleChange.emit(v);\r\n }\r\n }\r\n\r\n @Input()\r\n type: string = 'spinner';\r\n\r\n @Input()\r\n text: string;\r\n\r\n onInit() {\r\n const loading = AXConfig.get(`layout.loading.${this.type}`);\r\n this._selectedPortal = new ComponentPortal(loading);\r\n this._cdr.markForCheck();\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n ref.instance.text = this.text;\r\n }\r\n }\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-loading-spinner',\r\n template: `\r\n <svg\r\n version=\"1.1\"\r\n width=\"24\"\r\n height=\"24\"\r\n style=\"fill: currentColor;\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n x=\"0px\"\r\n y=\"0px\"\r\n viewBox=\"0 0 50 50\"\r\n xml:space=\"preserve\"\r\n >\r\n <path\r\n fill=\"current\"\r\n d=\"M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z\"\r\n >\r\n <animateTransform\r\n attributeType=\"xml\"\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 25 25\"\r\n to=\"360 25 25\"\r\n dur=\"0.6s\"\r\n repeatCount=\"indefinite\"\r\n />\r\n </path>\r\n </svg>\r\n <span class=\"ax-ms-3\" *ngIf=\"text\"> {{ text }} </span>\r\n `,\r\n host: { class: 'ax-loading-spinner' },\r\n})\r\nexport class AXLoadingSpinnerComponent {\r\n text: string;\r\n}\r\n","import {\r\n ChangeDetectorRef,\r\n ComponentFactoryResolver,\r\n Directive,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n Renderer2,\r\n SimpleChanges, ViewContainerRef\r\n } from '@angular/core';\r\nimport { AXLoadingComponent } from './loading.component';\r\n \r\n \r\n const OVERLAY_CLASS = 'ax-loading-overlay';\r\n \r\n // This directive places an overlay with a loading spinner over its host element\r\n // if isLoading equals to true and hides the overlay when isLoading becomes false.\r\n @Directive({\r\n selector: '[axIsLoading]'\r\n })\r\n export class AXLoadingDirective implements OnChanges {\r\n @Input('axIsLoading')\r\n isLoading = false;\r\n \r\n protected overlayElement!: HTMLDivElement;\r\n protected spinnerElement!: HTMLDivElement;\r\n protected hostElement!: HTMLDivElement;\r\n \r\n\r\n //TODO: ComponentFactoryResolver is deprecated\r\n constructor(\r\n protected readonly elementRef: ElementRef,\r\n protected readonly renderer: Renderer2,\r\n protected readonly changeDetectorRef: ChangeDetectorRef,\r\n protected readonly viewContainerRef: ViewContainerRef,\r\n protected readonly componentFactoryResolver: ComponentFactoryResolver,\r\n ) {\r\n this.hostElement = this.elementRef.nativeElement;\r\n this.hostElement.style.position = 'relative';\r\n }\r\n \r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (!this.overlayElement || !this.spinnerElement) {\r\n this.init();\r\n }\r\n \r\n if (changes.isLoading) {\r\n const isLoadingValue = changes.isLoading.currentValue;\r\n \r\n if (isLoadingValue) {\r\n this.addLoadingIndicator();\r\n }\r\n else {\r\n this.removeLoadingIndicator();\r\n }\r\n \r\n this.changeDetectorRef.markForCheck();\r\n }\r\n }\r\n \r\n protected addLoadingIndicator(): void {\r\n this.renderer.appendChild(this.hostElement, this.overlayElement);\r\n this.renderer.appendChild(this.overlayElement, this.spinnerElement);\r\n }\r\n \r\n protected removeLoadingIndicator(): void {\r\n this.renderer.removeChild(this.overlayElement, this.spinnerElement);\r\n this.renderer.removeChild(this.hostElement, this.overlayElement);\r\n this.viewContainerRef.clear();\r\n }\r\n \r\n protected init(): void {\r\n this.initOverlayElement();\r\n this.initSpinnerComponent();\r\n }\r\n \r\n protected initSpinnerComponent(): void {\r\n const spinnerComponentFactory = this.componentFactoryResolver.resolveComponentFactory(AXLoadingComponent);\r\n const spinnerComponent = this.viewContainerRef.createComponent(spinnerComponentFactory);\r\n this.spinnerElement = spinnerComponent.location.nativeElement;\r\n }\r\n \r\n protected initOverlayElement(): void {\r\n this.overlayElement = this.renderer.createElement('div');\r\n this.renderer.addClass(this.overlayElement, OVERLAY_CLASS);\r\n }\r\n }\r\n ","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXConfig } from '@acorex/core/config';\r\nimport { AXLoadingComponent } from './loading.component';\r\nimport { AXLoadingDirective } from './loading.directive';\r\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\r\n\r\nconst COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];\r\nconst MODULES = [CommonModule, OverlayModule, PortalModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXLoadingModule {\r\n\r\n\r\n constructor() {\r\n AXConfig.set({\r\n layout: {\r\n loading: {\r\n spinner: AXLoadingSpinnerComponent,\r\n }\r\n }\r\n })\r\n\r\n }\r\n}\r\n","import { Injectable, NgZone } from '@angular/core';\r\nimport { asyncScheduler, BehaviorSubject, Observable } from 'rxjs';\r\nimport { finalize, observeOn } from 'rxjs/operators';\r\nimport { AXOverlayService, AXOverlayViewRef } from '@acorex/components/common';\r\nimport { AXLoadingComponent } from './loading.component';\r\n\r\ntype LoadingContext = object;\r\ntype LoaderId = string | number; // expected enum values\r\nconst DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';\r\n\r\n/**\r\n * Used for centrally setting/unsetting loading flags for components or services.\r\n * Should be connected to global HTTP interceptor which will unset\r\n * the loading flags in case an error happens using the clearLoadings() method.\r\n *\r\n * FAQ:\r\n * Q: How to change loading flag for a parent component?\r\n * A: Inject the parent component as a dependency to your constructor and\r\n * call loadingService.setLoading(parentComponent, STATE).\r\n *\r\n * Q: How to change loading flag for a child component?\r\n * A: Use a @ViewChild with component selector and pass the\r\n * reference of the child to setLoading method.\r\n *\r\n * Q: I need more loading indicators in my components. How to?\r\n * A: Assign a LoaderId to each indicator and then use them\r\n * with calls to methods of this service.\r\n */\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXLoadingService {\r\n // WeakMap will remove components from itself upon\r\n // their garbage collection by JS runtime.\r\n protected loadingStates: any = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, boolean>\r\n >();\r\n // Both loading state maps are kept in-sync such that\r\n // they can be used by both sync and async methods.\r\n protected loadingStates$: any = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, BehaviorSubject<boolean>>\r\n >();\r\n\r\n constructor(\r\n protected zoneRef: NgZone,\r\n private overlayService: AXOverlayService\r\n ) {}\r\n\r\n private _stack: { id: number; component: AXOverlayViewRef }[] = [];\r\n\r\n show(location?: Element): number {\r\n let host: Element | any;\r\n if (location) {\r\n host = location.closest('.ax-loading-host');\r\n }\r\n const containerElement = (host || location) as HTMLDivElement;\r\n const com = this.overlayService.show(\r\n AXLoadingComponent,\r\n {},\r\n {\r\n closeOnClickOutside: false,\r\n containerElement,\r\n hasBackdrop: true,\r\n backdropClass: ['ax-loading-overlay'],\r\n scroll: 'block',\r\n }\r\n );\r\n com.instance.visible = true;\r\n const id = new Date().getTime();\r\n this._stack.push({ id, component: com });\r\n return id;\r\n }\r\n\r\n hide(id): void {\r\n const f = this._stack.find((c) => c.id === id);\r\n if (f) {\r\n f.component.dispose();\r\n this._stack = this._stack.filter((c) => c.id !== id);\r\n }\r\n }\r\n\r\n // Observable creation operator.\r\n // LoaderId can be used when there are multiple loading indicators associated to a single context.\r\n // Context can be any object, though in practice, components and services will be the most common contexts.\r\n // loaderId is a non-mandatory parameter - when not specified, a default loaderId is used.\r\n // Such a scenario is used when your context has contains only one loading indicator.\r\n doLoading<V>(\r\n source$: Observable<V>,\r\n context: LoadingContext,\r\n loaderId?: LoaderId\r\n ): Observable<V> {\r\n this.startLoading(context, loaderId);\r\n\r\n return source$.pipe(\r\n observeOn(asyncScheduler),\r\n finalize(() => this.endLoading(context, loaderId))\r\n );\r\n }\r\n\r\n // To be used in your html templates.\r\n // Returns a boolean indicating whether a given loader is active in a given context.\r\n // If loaderId is unspecified, the method will return a logical disjunction of all\r\n // loader states in the context.\r\n isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {\r\n const loaderStates = this.loadingStates.get(context);\r\n\r\n if (!loaderStates) {\r\n return false;\r\n } else {\r\n if (loaderId !== undefined) {\r\n return loaderStates.get(this.getLoaderId(loaderId)) ?? false;\r\n } else {\r\n return [...loaderStates.values()].filter((state) => state).length > 0;\r\n }\r\n }\r\n }\r\n\r\n // To be used in your html templates with async pipes.\r\n // Returns an Observable of booleans indicating whether a given loader is active in a given context.\r\n isLoading$(\r\n context: LoadingContext,\r\n loaderId?: LoaderId | any\r\n ): Observable<boolean> {\r\n const coalescedLoaderId = this.getLoaderId(loaderId);\r\n\r\n if (!this.hasLoadingStates(context, coalescedLoaderId)) {\r\n this.setLoadingState(context, false, loaderId);\r\n }\r\n\r\n return this.loadingStates$.get(context).get(coalescedLoaderId);\r\n }\r\n\r\n // The startLoading and endLoading methods are intended to be used when handling\r\n // complex scenarios where a need for extended usage flexibility is desired.\r\n startLoading(context: LoadingContext, loaderId?: LoaderId): void {\r\n this.setLoadingState(context, true, this.getLoaderId(loaderId));\r\n }\r\n\r\n endLoading(context: LoadingContext, loaderId?: LoaderId): void {\r\n this.setLoadingState(context, false, this.getLoaderId(loaderId));\r\n }\r\n\r\n // To be called by middleware code (HTTP interceptors/routing listeners, etc.).\r\n clearLoadings(): void {\r\n this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\r\n this.loadingStates$ = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, BehaviorSubject<boolean>>\r\n >();\r\n }\r\n\r\n protected setLoadingState(\r\n context: LoadingContext,\r\n state: boolean,\r\n loaderId: LoaderId\r\n ): void {\r\n if (!this.hasLoadingStates(context, loaderId)) {\r\n if (this.hasContextLoadingState(context)) {\r\n this.loadingStates.get(context).set(loaderId, state);\r\n this.loadingStates$\r\n .get(context)\r\n .set(loaderId, new BehaviorSubject<boolean>(state));\r\n } else {\r\n this.loadingStates.set(\r\n context,\r\n new Map<LoaderId, boolean>([[loaderId, state]])\r\n );\r\n this.loadingStates$.set(\r\n context,\r\n new Map<LoaderId, BehaviorSubject<boolean>>([\r\n [loaderId, new BehaviorSubject<boolean>(state)],\r\n ])\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - loadingStates[context] is surely defined in this branch\r\n this.loadingStates.get(context).set(loaderId, state);\r\n this.loadingStates$.get(context).get(loaderId).next(state);\r\n }\r\n }\r\n\r\n protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {\r\n return (\r\n this.hasContextLoadingState(context) &&\r\n this.hasLoaderLoadingState(context, loaderId)\r\n );\r\n }\r\n\r\n protected hasContextLoadingState(context: LoadingContext) {\r\n return this.loadingStates.has(context) && this.loadingStates$.has(context);\r\n }\r\n\r\n protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {\r\n return (\r\n this.loadingStates.get(context).has(loaderId) &&\r\n this.loadingStates$.get(context).has(loaderId)\r\n );\r\n }\r\n\r\n protected getLoaderId(loaderId?: LoaderId): LoaderId {\r\n return loaderId ?? DEFAULT_LOADER_ID;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAgCM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;AAG1D;;AAEG;IACH,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAIzB,QAAA,IAAA,CAAA,aAAa,GAA0B,IAAI,YAAY,EAAE,CAAC;QAmB1D,IAAI,CAAA,IAAA,GAAW,SAAS,CAAC;KAtBxB;AAOD,IAAA,IACW,OAAO,GAAA;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;IACD,IAAW,OAAO,CAAC,CAAU,EAAA;AAC3B,QAAA,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;AACtB,YAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;YAClB,CAAC;kBACG,IAAI,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC;AACpD,kBAAE,IAAI,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AACpD,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5B,SAAA;KACF;IAQD,MAAM,GAAA;AACJ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,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;AC9BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-loading.mjs","sources":["../../../../projects/acorex/components/loading/src/loading.component.ts","../../../../projects/acorex/components/loading/src/loading-spinner.component.ts","../../../../projects/acorex/components/loading/src/loading.directive.ts","../../../../projects/acorex/components/loading/src/loading.module.ts","../../../../projects/acorex/components/loading/src/loading.service.ts","../../../../projects/acorex/components/loading/acorex-components-loading.ts"],"sourcesContent":["import { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { AXConfig } from '@acorex/core/config';\r\nimport {\r\n CdkPortalOutletAttachedRef,\r\n ComponentPortal,\r\n Portal,\r\n} from '@angular/cdk/portal';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ComponentRef,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-loading',\r\n template: `\r\n <ng-template\r\n [cdkPortalOutlet]=\"_selectedPortal\"\r\n (attached)=\"_handleAttched($event)\"\r\n ></ng-template>\r\n `,\r\n styleUrls:['./loading.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-loading' },\r\n})\r\nexport class AXLoadingComponent extends AXBaseComponentMixin {\r\n _selectedPortal: Portal<any>;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n @Output()\r\n visibleChange: EventEmitter<boolean> = new EventEmitter();\r\n\r\n private _visible: boolean;\r\n\r\n @Input()\r\n public get visible(): boolean {\r\n return this._visible;\r\n }\r\n public set visible(v: boolean) {\r\n if (v != this._visible) {\r\n this._visible = v;\r\n v\r\n ? this._getHostElement().classList.remove('ax-hide')\r\n : this._getHostElement().classList.add('ax-hide');\r\n this.visibleChange.emit(v);\r\n }\r\n }\r\n\r\n @Input()\r\n type: string = 'spinner';\r\n\r\n @Input()\r\n text: string;\r\n\r\n onInit() {\r\n const loading = AXConfig.get(`layout.loading.${this.type}`);\r\n this._selectedPortal = new ComponentPortal(loading);\r\n this._cdr.markForCheck();\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n ref.instance.text = this.text;\r\n }\r\n }\r\n}\r\n","import { Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-loading-spinner',\r\n template: `\r\n <svg\r\n version=\"1.1\"\r\n width=\"24\"\r\n height=\"24\"\r\n style=\"fill: currentColor;\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n x=\"0px\"\r\n y=\"0px\"\r\n viewBox=\"0 0 50 50\"\r\n xml:space=\"preserve\">\r\n <path\r\n fill=\"current\"\r\n d=\"M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z\">\r\n <animateTransform\r\n attributeType=\"xml\"\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 25 25\"\r\n to=\"360 25 25\"\r\n dur=\"0.6s\"\r\n repeatCount=\"indefinite\" />\r\n </path>\r\n </svg>\r\n <span *ngIf=\"text\"> {{ text }} </span>\r\n `,\r\n host: { class: 'ax-loading-spinner' },\r\n})\r\nexport class AXLoadingSpinnerComponent {\r\n text: string;\r\n}\r\n","import {\r\n ChangeDetectorRef,\r\n ComponentFactoryResolver,\r\n Directive,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n Renderer2,\r\n SimpleChanges, ViewContainerRef\r\n } from '@angular/core';\r\nimport { AXLoadingComponent } from './loading.component';\r\n \r\n \r\n const OVERLAY_CLASS = 'ax-loading-overlay';\r\n \r\n // This directive places an overlay with a loading spinner over its host element\r\n // if isLoading equals to true and hides the overlay when isLoading becomes false.\r\n @Directive({\r\n selector: '[axIsLoading]'\r\n })\r\n export class AXLoadingDirective implements OnChanges {\r\n @Input('axIsLoading')\r\n isLoading = false;\r\n \r\n protected overlayElement!: HTMLDivElement;\r\n protected spinnerElement!: HTMLDivElement;\r\n protected hostElement!: HTMLDivElement;\r\n \r\n\r\n //TODO: ComponentFactoryResolver is deprecated\r\n constructor(\r\n protected readonly elementRef: ElementRef,\r\n protected readonly renderer: Renderer2,\r\n protected readonly changeDetectorRef: ChangeDetectorRef,\r\n protected readonly viewContainerRef: ViewContainerRef,\r\n protected readonly componentFactoryResolver: ComponentFactoryResolver,\r\n ) {\r\n this.hostElement = this.elementRef.nativeElement;\r\n this.hostElement.style.position = 'relative';\r\n }\r\n \r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (!this.overlayElement || !this.spinnerElement) {\r\n this.init();\r\n }\r\n \r\n if (changes.isLoading) {\r\n const isLoadingValue = changes.isLoading.currentValue;\r\n \r\n if (isLoadingValue) {\r\n this.addLoadingIndicator();\r\n }\r\n else {\r\n this.removeLoadingIndicator();\r\n }\r\n \r\n this.changeDetectorRef.markForCheck();\r\n }\r\n }\r\n \r\n protected addLoadingIndicator(): void {\r\n this.renderer.appendChild(this.hostElement, this.overlayElement);\r\n this.renderer.appendChild(this.overlayElement, this.spinnerElement);\r\n }\r\n \r\n protected removeLoadingIndicator(): void {\r\n this.renderer.removeChild(this.overlayElement, this.spinnerElement);\r\n this.renderer.removeChild(this.hostElement, this.overlayElement);\r\n this.viewContainerRef.clear();\r\n }\r\n \r\n protected init(): void {\r\n this.initOverlayElement();\r\n this.initSpinnerComponent();\r\n }\r\n \r\n protected initSpinnerComponent(): void {\r\n const spinnerComponentFactory = this.componentFactoryResolver.resolveComponentFactory(AXLoadingComponent);\r\n const spinnerComponent = this.viewContainerRef.createComponent(spinnerComponentFactory);\r\n this.spinnerElement = spinnerComponent.location.nativeElement;\r\n }\r\n \r\n protected initOverlayElement(): void {\r\n this.overlayElement = this.renderer.createElement('div');\r\n this.renderer.addClass(this.overlayElement, OVERLAY_CLASS);\r\n }\r\n }\r\n ","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXConfig } from '@acorex/core/config';\r\nimport { AXLoadingComponent } from './loading.component';\r\nimport { AXLoadingDirective } from './loading.directive';\r\nimport { AXLoadingSpinnerComponent } from './loading-spinner.component';\r\n\r\nconst COMPONENT = [AXLoadingComponent, AXLoadingDirective, AXLoadingSpinnerComponent];\r\nconst MODULES = [CommonModule, OverlayModule, PortalModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXLoadingModule {\r\n\r\n\r\n constructor() {\r\n AXConfig.set({\r\n layout: {\r\n loading: {\r\n spinner: AXLoadingSpinnerComponent,\r\n }\r\n }\r\n })\r\n\r\n }\r\n}\r\n","import { Injectable, NgZone } from '@angular/core';\r\nimport { asyncScheduler, BehaviorSubject, Observable } from 'rxjs';\r\nimport { finalize, observeOn } from 'rxjs/operators';\r\nimport { AXOverlayService, AXOverlayViewRef } from '@acorex/components/common';\r\nimport { AXLoadingComponent } from './loading.component';\r\n\r\ntype LoadingContext = object;\r\ntype LoaderId = string | number; // expected enum values\r\nconst DEFAULT_LOADER_ID: LoaderId = '_DEFAULT';\r\n\r\n/**\r\n * Used for centrally setting/unsetting loading flags for components or services.\r\n * Should be connected to global HTTP interceptor which will unset\r\n * the loading flags in case an error happens using the clearLoadings() method.\r\n *\r\n * FAQ:\r\n * Q: How to change loading flag for a parent component?\r\n * A: Inject the parent component as a dependency to your constructor and\r\n * call loadingService.setLoading(parentComponent, STATE).\r\n *\r\n * Q: How to change loading flag for a child component?\r\n * A: Use a @ViewChild with component selector and pass the\r\n * reference of the child to setLoading method.\r\n *\r\n * Q: I need more loading indicators in my components. How to?\r\n * A: Assign a LoaderId to each indicator and then use them\r\n * with calls to methods of this service.\r\n */\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AXLoadingService {\r\n // WeakMap will remove components from itself upon\r\n // their garbage collection by JS runtime.\r\n protected loadingStates: any = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, boolean>\r\n >();\r\n // Both loading state maps are kept in-sync such that\r\n // they can be used by both sync and async methods.\r\n protected loadingStates$: any = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, BehaviorSubject<boolean>>\r\n >();\r\n\r\n constructor(\r\n protected zoneRef: NgZone,\r\n private overlayService: AXOverlayService\r\n ) {}\r\n\r\n private _stack: { id: number; component: AXOverlayViewRef }[] = [];\r\n\r\n show(location?: Element): number {\r\n let host: Element | any;\r\n if (location) {\r\n host = location.closest('.ax-loading-host');\r\n }\r\n const containerElement = (host || location) as HTMLDivElement;\r\n const com = this.overlayService.show(\r\n AXLoadingComponent,\r\n {},\r\n {\r\n closeOnClickOutside: false,\r\n containerElement,\r\n hasBackdrop: true,\r\n backdropClass: ['ax-loading-overlay'],\r\n scroll: 'block',\r\n }\r\n );\r\n com.instance.visible = true;\r\n const id = new Date().getTime();\r\n this._stack.push({ id, component: com });\r\n return id;\r\n }\r\n\r\n hide(id): void {\r\n const f = this._stack.find((c) => c.id === id);\r\n if (f) {\r\n f.component.dispose();\r\n this._stack = this._stack.filter((c) => c.id !== id);\r\n }\r\n }\r\n\r\n // Observable creation operator.\r\n // LoaderId can be used when there are multiple loading indicators associated to a single context.\r\n // Context can be any object, though in practice, components and services will be the most common contexts.\r\n // loaderId is a non-mandatory parameter - when not specified, a default loaderId is used.\r\n // Such a scenario is used when your context has contains only one loading indicator.\r\n doLoading<V>(\r\n source$: Observable<V>,\r\n context: LoadingContext,\r\n loaderId?: LoaderId\r\n ): Observable<V> {\r\n this.startLoading(context, loaderId);\r\n\r\n return source$.pipe(\r\n observeOn(asyncScheduler),\r\n finalize(() => this.endLoading(context, loaderId))\r\n );\r\n }\r\n\r\n // To be used in your html templates.\r\n // Returns a boolean indicating whether a given loader is active in a given context.\r\n // If loaderId is unspecified, the method will return a logical disjunction of all\r\n // loader states in the context.\r\n isLoading(context: LoadingContext, loaderId?: LoaderId): boolean {\r\n const loaderStates = this.loadingStates.get(context);\r\n\r\n if (!loaderStates) {\r\n return false;\r\n } else {\r\n if (loaderId !== undefined) {\r\n return loaderStates.get(this.getLoaderId(loaderId)) ?? false;\r\n } else {\r\n return [...loaderStates.values()].filter((state) => state).length > 0;\r\n }\r\n }\r\n }\r\n\r\n // To be used in your html templates with async pipes.\r\n // Returns an Observable of booleans indicating whether a given loader is active in a given context.\r\n isLoading$(\r\n context: LoadingContext,\r\n loaderId?: LoaderId | any\r\n ): Observable<boolean> {\r\n const coalescedLoaderId = this.getLoaderId(loaderId);\r\n\r\n if (!this.hasLoadingStates(context, coalescedLoaderId)) {\r\n this.setLoadingState(context, false, loaderId);\r\n }\r\n\r\n return this.loadingStates$.get(context).get(coalescedLoaderId);\r\n }\r\n\r\n // The startLoading and endLoading methods are intended to be used when handling\r\n // complex scenarios where a need for extended usage flexibility is desired.\r\n startLoading(context: LoadingContext, loaderId?: LoaderId): void {\r\n this.setLoadingState(context, true, this.getLoaderId(loaderId));\r\n }\r\n\r\n endLoading(context: LoadingContext, loaderId?: LoaderId): void {\r\n this.setLoadingState(context, false, this.getLoaderId(loaderId));\r\n }\r\n\r\n // To be called by middleware code (HTTP interceptors/routing listeners, etc.).\r\n clearLoadings(): void {\r\n this.loadingStates = new WeakMap<LoadingContext, Map<LoaderId, boolean>>();\r\n this.loadingStates$ = new WeakMap<\r\n LoadingContext,\r\n Map<LoaderId, BehaviorSubject<boolean>>\r\n >();\r\n }\r\n\r\n protected setLoadingState(\r\n context: LoadingContext,\r\n state: boolean,\r\n loaderId: LoaderId\r\n ): void {\r\n if (!this.hasLoadingStates(context, loaderId)) {\r\n if (this.hasContextLoadingState(context)) {\r\n this.loadingStates.get(context).set(loaderId, state);\r\n this.loadingStates$\r\n .get(context)\r\n .set(loaderId, new BehaviorSubject<boolean>(state));\r\n } else {\r\n this.loadingStates.set(\r\n context,\r\n new Map<LoaderId, boolean>([[loaderId, state]])\r\n );\r\n this.loadingStates$.set(\r\n context,\r\n new Map<LoaderId, BehaviorSubject<boolean>>([\r\n [loaderId, new BehaviorSubject<boolean>(state)],\r\n ])\r\n );\r\n }\r\n } else {\r\n // @ts-ignore - loadingStates[context] is surely defined in this branch\r\n this.loadingStates.get(context).set(loaderId, state);\r\n this.loadingStates$.get(context).get(loaderId).next(state);\r\n }\r\n }\r\n\r\n protected hasLoadingStates(context: LoadingContext, loaderId: LoaderId) {\r\n return (\r\n this.hasContextLoadingState(context) &&\r\n this.hasLoaderLoadingState(context, loaderId)\r\n );\r\n }\r\n\r\n protected hasContextLoadingState(context: LoadingContext) {\r\n return this.loadingStates.has(context) && this.loadingStates$.has(context);\r\n }\r\n\r\n protected hasLoaderLoadingState(context: LoadingContext, loaderId: LoaderId) {\r\n return (\r\n this.loadingStates.get(context).has(loaderId) &&\r\n this.loadingStates$.get(context).has(loaderId)\r\n );\r\n }\r\n\r\n protected getLoaderId(loaderId?: LoaderId): LoaderId {\r\n return loaderId ?? DEFAULT_LOADER_ID;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;AAgCM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;AAG1D;;AAEG;IACH,WAAY,CAAA,U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QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;KAC5E;IAES,qBAAqB,CAAC,OAAuB,EAAE,QAAkB,EAAA;AACzE,QAAA,QACE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC7C,YAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAC9C;KACH;AAES,IAAA,WAAW,CAAC,QAAmB,EAAA;QACvC,OAAO,QAAQ,IAAI,iBAAiB,CAAC;KACtC;;6GA5KU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,EAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,gBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;AC9BD;;AAEG;;;;"}
|
@@ -15,7 +15,7 @@ class AXTooltipComponent extends AXBaseComponentMixin {
|
|
15
15
|
}
|
16
16
|
}
|
17
17
|
AXTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AXTooltipComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
18
|
-
AXTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem;background-color:rgb(var(--ax-color-ghost));
|
18
|
+
AXTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: AXTooltipComponent, selector: "ax-tooltip", inputs: { text: "text", position: "position" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost));color:rgb(var(--ax-color-ghost-fore));border-radius:var(--ax-rounded-border-default);font-size:.875rem}.ax-tooltip-container .ax-tooltip-tringle{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgb(var(--ax-color-ghost));position:absolute}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-bottom{transform:rotate(180deg);left:0;right:0;margin:auto;top:-5px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-right{transform:rotate(90deg);top:0;bottom:0;margin:auto;left:-7px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-top{transform:rotate(0);left:0;right:0;margin:auto}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-left{transform:rotate(270deg);top:0;bottom:0;margin:auto;right:-7px}\n"], animations: [
|
19
19
|
trigger('tooltip', [
|
20
20
|
transition(':enter', [
|
21
21
|
style({ opacity: 0 }),
|
@@ -34,7 +34,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
34
34
|
]),
|
35
35
|
transition(':leave', [animate(50, style({ opacity: 0 }))]),
|
36
36
|
]),
|
37
|
-
], template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem;background-color:rgb(var(--ax-color-ghost));
|
37
|
+
], template: "<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>", styles: [".ax-tooltip-container{position:relative}.ax-tooltip-container .ax-tooltip{display:block;padding:.25rem .5rem;background-color:rgb(var(--ax-color-ghost));color:rgb(var(--ax-color-ghost-fore));border-radius:var(--ax-rounded-border-default);font-size:.875rem}.ax-tooltip-container .ax-tooltip-tringle{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid rgb(var(--ax-color-ghost));position:absolute}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-bottom{transform:rotate(180deg);left:0;right:0;margin:auto;top:-5px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-right{transform:rotate(90deg);top:0;bottom:0;margin:auto;left:-7px}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-top{transform:rotate(0);left:0;right:0;margin:auto}.ax-tooltip-container .ax-tooltip-tringle.ax-tooltip-tringle-left{transform:rotate(270deg);top:0;bottom:0;margin:auto;right:-7px}\n"] }]
|
38
38
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { text: [{
|
39
39
|
type: Input
|
40
40
|
}], position: [{
|
@@ -145,4 +145,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
145
145
|
|
146
146
|
export { AXTooltipComponent, AXTooltipDirective, AXTooltipModule };
|
147
147
|
//# sourceMappingURL=acorex-components-tooltip.mjs.map
|
148
|
-
//# sourceMappingURL=acorex-components-tooltip.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../projects/acorex/components/tooltip/src/tooltip.component.ts","../../../../projects/acorex/components/tooltip/src/tooltip.component.html","../../../../projects/acorex/components/tooltip/src/tooltip.directive.ts","../../../../projects/acorex/components/tooltip/src/tooltip.module.ts","../../../../projects/acorex/components/tooltip/acorex-components-tooltip.ts"],"sourcesContent":["import { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { animate, style, transition, trigger } from '@angular/animations';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-tooltip',\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n animations: [\r\n trigger('tooltip', [\r\n transition(':enter', [\r\n style({ opacity: 0 }),\r\n animate(50, style({ opacity: 1 })),\r\n ]),\r\n transition(':leave', [animate(50, style({ opacity: 0 }))]),\r\n ]),\r\n ],\r\n})\r\nexport class AXTooltipComponent extends AXBaseComponentMixin {\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n @Input()\r\n text: string = 'Text';\r\n\r\n @Input() position = 'top';\r\n}\r\n","<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>","import {\r\n ComponentRef,\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n} from '@angular/core';\r\nimport {\r\n Overlay,\r\n OverlayPositionBuilder,\r\n OverlayRef,\r\n} from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\n\r\n@Directive({ selector: '[axTooltip]' })\r\nexport class AXTooltipDirective implements OnInit {\r\n @Input('axTooltip') text = '';\r\n @Input('axTooltipPosition') position = 'top';\r\n\r\n private overlayRef: OverlayRef;\r\n\r\n positions: any;\r\n\r\n constructor(\r\n private overlay: Overlay,\r\n private overlayPositionBuilder: OverlayPositionBuilder,\r\n private elementRef: ElementRef\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n switch (this.position) {\r\n default:\r\n case 'top':\r\n this.positions = {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'bottom',\r\n offsetY: -8,\r\n };\r\n break;\r\n case 'right':\r\n this.positions = {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'center',\r\n offsetX: 8,\r\n };\r\n break;\r\n case 'bottom':\r\n this.positions = {\r\n originX: 'center',\r\n originY: 'bottom',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n offsetY: 8,\r\n };\r\n break;\r\n case 'left':\r\n this.positions = {\r\n originX: 'start',\r\n originY: 'center',\r\n overlayX: 'end',\r\n overlayY: 'center',\r\n offsetX: -8,\r\n };\r\n break;\r\n }\r\n const positionStrategy = this.overlayPositionBuilder\r\n .flexibleConnectedTo(this.elementRef)\r\n .withPositions([this.positions]);\r\n\r\n this.overlayRef = this.overlay.create({ positionStrategy });\r\n }\r\n\r\n @HostListener('mouseenter')\r\n show() {\r\n const tooltipRef: ComponentRef<AXTooltipComponent> = this.overlayRef.attach(\r\n new ComponentPortal(AXTooltipComponent)\r\n );\r\n\r\n tooltipRef.instance.text = this.text;\r\n tooltipRef.instance.position = this.position;\r\n }\r\n\r\n @HostListener('mouseout')\r\n hide() {\r\n this.overlayRef.detach();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\nimport { AXTooltipDirective } from './tooltip.directive';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\r\nconst MODULES = [CommonModule, OverlayModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXTooltipModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA2BM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;IAC1D,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAGzB,IAAI,CAAA,IAAA,GAAW,MAAM,CAAC;QAEb,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAJzB;;+GAHU,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAlB,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC3B/B,+MAKM,EDYQ,MAAA,EAAA,CAAA,
|
1
|
+
{"version":3,"file":"acorex-components-tooltip.mjs","sources":["../../../../projects/acorex/components/tooltip/src/tooltip.component.ts","../../../../projects/acorex/components/tooltip/src/tooltip.component.html","../../../../projects/acorex/components/tooltip/src/tooltip.directive.ts","../../../../projects/acorex/components/tooltip/src/tooltip.module.ts","../../../../projects/acorex/components/tooltip/acorex-components-tooltip.ts"],"sourcesContent":["import { AXBaseComponentMixin } from '@acorex/components/mixin';\r\nimport { animate, style, transition, trigger } from '@angular/animations';\r\nimport {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n Input,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-tooltip',\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n animations: [\r\n trigger('tooltip', [\r\n transition(':enter', [\r\n style({ opacity: 0 }),\r\n animate(50, style({ opacity: 1 })),\r\n ]),\r\n transition(':leave', [animate(50, style({ opacity: 0 }))]),\r\n ]),\r\n ],\r\n})\r\nexport class AXTooltipComponent extends AXBaseComponentMixin {\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n }\r\n @Input()\r\n text: string = 'Text';\r\n\r\n @Input() position = 'top';\r\n}\r\n","<div class=\"ax-tooltip-container\">\r\n <div class=\"ax-tooltip\" @tooltip>\r\n {{ text }}\r\n </div>\r\n <div class=\"ax-tooltip-tringle ax-tooltip-tringle-{{position}}\"></div>\r\n</div>","import {\r\n ComponentRef,\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n} from '@angular/core';\r\nimport {\r\n Overlay,\r\n OverlayPositionBuilder,\r\n OverlayRef,\r\n} from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\n\r\n@Directive({ selector: '[axTooltip]' })\r\nexport class AXTooltipDirective implements OnInit {\r\n @Input('axTooltip') text = '';\r\n @Input('axTooltipPosition') position = 'top';\r\n\r\n private overlayRef: OverlayRef;\r\n\r\n positions: any;\r\n\r\n constructor(\r\n private overlay: Overlay,\r\n private overlayPositionBuilder: OverlayPositionBuilder,\r\n private elementRef: ElementRef\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n switch (this.position) {\r\n default:\r\n case 'top':\r\n this.positions = {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'bottom',\r\n offsetY: -8,\r\n };\r\n break;\r\n case 'right':\r\n this.positions = {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'center',\r\n offsetX: 8,\r\n };\r\n break;\r\n case 'bottom':\r\n this.positions = {\r\n originX: 'center',\r\n originY: 'bottom',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n offsetY: 8,\r\n };\r\n break;\r\n case 'left':\r\n this.positions = {\r\n originX: 'start',\r\n originY: 'center',\r\n overlayX: 'end',\r\n overlayY: 'center',\r\n offsetX: -8,\r\n };\r\n break;\r\n }\r\n const positionStrategy = this.overlayPositionBuilder\r\n .flexibleConnectedTo(this.elementRef)\r\n .withPositions([this.positions]);\r\n\r\n this.overlayRef = this.overlay.create({ positionStrategy });\r\n }\r\n\r\n @HostListener('mouseenter')\r\n show() {\r\n const tooltipRef: ComponentRef<AXTooltipComponent> = this.overlayRef.attach(\r\n new ComponentPortal(AXTooltipComponent)\r\n );\r\n\r\n tooltipRef.instance.text = this.text;\r\n tooltipRef.instance.position = this.position;\r\n }\r\n\r\n @HostListener('mouseout')\r\n hide() {\r\n this.overlayRef.detach();\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTooltipComponent } from './tooltip.component';\r\nimport { AXTooltipDirective } from './tooltip.directive';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXTooltipComponent, AXTooltipDirective];\r\nconst MODULES = [CommonModule, OverlayModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXTooltipModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AA2BM,MAAO,kBAAmB,SAAQ,oBAAoB,CAAA;IAC1D,WAAY,CAAA,UAAsB,EAAE,GAAsB,EAAA;AACxD,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAGzB,IAAI,CAAA,IAAA,GAAW,MAAM,CAAC;QAEb,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAJzB;;+GAHU,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAlB,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC3B/B,+MAKM,EDYQ,MAAA,EAAA,CAAA,w7BAAA,CAAA,EAAA,UAAA,EAAA;QACV,OAAO,CAAC,SAAS,EAAE;YACjB,UAAU,CAAC,QAAQ,EAAE;AACnB,gBAAA,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;gBACrB,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;aACnC,CAAC;AACF,YAAA,UAAU,CAA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