@acorex/components 18.9.1 → 18.9.3
Sign up to get free protection for your applications and to get access to all the features.
- package/common/lib/components/base-component.class.d.ts +4 -4
- package/esm2022/button/lib/button.component.mjs +2 -2
- package/esm2022/common/lib/components/base-component.class.mjs +6 -6
- package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +2 -2
- package/esm2022/conversation/lib/conversation.module.mjs +2 -2
- package/esm2022/media-viewer/acorex-components-media-viewer.mjs +5 -0
- package/esm2022/media-viewer/index.mjs +10 -0
- package/esm2022/media-viewer/lib/media-viewer-container/media-viewer-container.component.mjs +35 -0
- package/esm2022/media-viewer/lib/media-viewer-slider/media-viewer-slider.component.mjs +35 -0
- package/esm2022/media-viewer/lib/media-viewer-thumbnail/media-viewer-thumbnail.component.mjs +23 -0
- package/esm2022/media-viewer/lib/media-viewer-tools/audio-player/audio-player.component.mjs +19 -0
- package/esm2022/media-viewer/lib/media-viewer-tools/image-viewer/image-viewer.component.mjs +19 -0
- package/esm2022/media-viewer/lib/media-viewer-tools/pdf-reader/pdf-reader.component.mjs +23 -0
- package/esm2022/media-viewer/lib/media-viewer-tools/video-player/video-player.component.mjs +19 -0
- package/esm2022/media-viewer/lib/media-viewer-type-registry.service.mjs +20 -0
- package/esm2022/media-viewer/lib/media-viewer-types.mjs +10 -0
- package/esm2022/media-viewer/lib/media-viewer.module.mjs +113 -0
- package/esm2022/media-viewer/lib/media-viewer.service.mjs +14 -0
- package/esm2022/menu/lib/menu.component.mjs +2 -2
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +11 -3
- package/fesm2022/acorex-components-button.mjs +2 -2
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +4 -4
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +298 -0
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -0
- package/fesm2022/acorex-components-menu.mjs +2 -2
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +10 -2
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/media-viewer/README.md +3 -0
- package/media-viewer/index.d.ts +9 -0
- package/media-viewer/lib/media-viewer-container/media-viewer-container.component.d.ts +15 -0
- package/media-viewer/lib/media-viewer-slider/media-viewer-slider.component.d.ts +19 -0
- package/media-viewer/lib/media-viewer-thumbnail/media-viewer-thumbnail.component.d.ts +11 -0
- package/media-viewer/lib/media-viewer-tools/audio-player/audio-player.component.d.ts +8 -0
- package/media-viewer/lib/media-viewer-tools/image-viewer/image-viewer.component.d.ts +8 -0
- package/media-viewer/lib/media-viewer-tools/pdf-reader/pdf-reader.component.d.ts +7 -0
- package/media-viewer/lib/media-viewer-tools/video-player/video-player.component.d.ts +8 -0
- package/media-viewer/lib/media-viewer-type-registry.service.d.ts +9 -0
- package/media-viewer/lib/media-viewer-types.d.ts +17 -0
- package/media-viewer/lib/media-viewer.module.d.ts +26 -0
- package/media-viewer/lib/media-viewer.service.d.ts +8 -0
- package/package.json +37 -31
- package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +2 -1
@@ -0,0 +1,298 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { signal, Injectable, inject, input, effect, Component, ChangeDetectionStrategy, ViewEncapsulation, computed, afterNextRender, NgModule, Optional, Inject } from '@angular/core';
|
3
|
+
import * as i1$1 from '@acorex/components/button';
|
4
|
+
import { AXButtonModule } from '@acorex/components/button';
|
5
|
+
import * as i2 from '@acorex/components/decorators';
|
6
|
+
import { AXDecoratorModule } from '@acorex/components/decorators';
|
7
|
+
import { isBrowser } from '@acorex/core/platform';
|
8
|
+
import * as i1 from '@angular/cdk/portal';
|
9
|
+
import { ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
10
|
+
import * as i1$2 from '@angular/common';
|
11
|
+
import { CommonModule } from '@angular/common';
|
12
|
+
import { FormsModule } from '@angular/forms';
|
13
|
+
|
14
|
+
class AXMediaViewerService {
|
15
|
+
constructor() {
|
16
|
+
this.dataArray = signal([]);
|
17
|
+
this.selectedIndex = signal(0);
|
18
|
+
}
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
20
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerService }); }
|
21
|
+
}
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerService, decorators: [{
|
23
|
+
type: Injectable
|
24
|
+
}] });
|
25
|
+
|
26
|
+
class AXMediaViewerTypeRegistryService {
|
27
|
+
constructor() {
|
28
|
+
this.plugins = new Map();
|
29
|
+
}
|
30
|
+
register(...plugins) {
|
31
|
+
plugins.forEach((p) => this.plugins.set(p.name, p));
|
32
|
+
}
|
33
|
+
resolve(name) {
|
34
|
+
return this.plugins.get(name);
|
35
|
+
}
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerTypeRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerTypeRegistryService, providedIn: 'root' }); }
|
38
|
+
}
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerTypeRegistryService, decorators: [{
|
40
|
+
type: Injectable,
|
41
|
+
args: [{ providedIn: 'root' }]
|
42
|
+
}] });
|
43
|
+
|
44
|
+
class AXMediaViewerSliderComponent {
|
45
|
+
/** @ignore */
|
46
|
+
constructor() {
|
47
|
+
this.service = inject(AXMediaViewerService);
|
48
|
+
this.dataObject = input();
|
49
|
+
/** @ignore */
|
50
|
+
this.portal = signal(null);
|
51
|
+
/** @ignore */
|
52
|
+
this.registryService = inject(AXMediaViewerTypeRegistryService);
|
53
|
+
effect(() => {
|
54
|
+
this.portal.set(new ComponentPortal(this.registryService.resolve(this.dataObject()?.type).component));
|
55
|
+
}, { allowSignalWrites: true });
|
56
|
+
}
|
57
|
+
/** @ignore */
|
58
|
+
_handleAttached(ref) {
|
59
|
+
ref = ref;
|
60
|
+
if (ref.instance && isBrowser()) {
|
61
|
+
Object.assign(ref.instance, { message: this.dataObject() });
|
62
|
+
}
|
63
|
+
}
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
65
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXMediaViewerSliderComponent, selector: "ax-media-viewer-slider", inputs: { dataObject: { classPropertyName: "dataObject", publicName: "dataObject", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-template [cdkPortalOutlet]=\"portal()\" (attached)=\"_handleAttached($event)\"></ng-template>\n", styles: ["ax-media-viewer-slider{padding:1rem}\n"], dependencies: [{ kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
66
|
+
}
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerSliderComponent, decorators: [{
|
68
|
+
type: Component,
|
69
|
+
args: [{ selector: 'ax-media-viewer-slider', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template [cdkPortalOutlet]=\"portal()\" (attached)=\"_handleAttached($event)\"></ng-template>\n", styles: ["ax-media-viewer-slider{padding:1rem}\n"] }]
|
70
|
+
}], ctorParameters: () => [] });
|
71
|
+
|
72
|
+
class AXMediaViewerContainerComponent {
|
73
|
+
constructor() {
|
74
|
+
this.dataArray = input();
|
75
|
+
this.service = inject(AXMediaViewerService);
|
76
|
+
this.arrayLength = computed(() => this.dataArray().length);
|
77
|
+
this.arrayIndex = computed(() => this.service.selectedIndex());
|
78
|
+
this.showComponent = computed(() => this.dataArray()[this.arrayIndex()]);
|
79
|
+
afterNextRender(() => {
|
80
|
+
this.service.dataArray.set(this.dataArray());
|
81
|
+
});
|
82
|
+
}
|
83
|
+
nextHandler() {
|
84
|
+
if (this.arrayIndex() === this.arrayLength() - 1)
|
85
|
+
return;
|
86
|
+
this.service.selectedIndex.update((prev) => prev + 1);
|
87
|
+
}
|
88
|
+
backHandler() {
|
89
|
+
if (this.arrayIndex() === 0)
|
90
|
+
return;
|
91
|
+
this.service.selectedIndex.update((prev) => prev - 1);
|
92
|
+
}
|
93
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
94
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXMediaViewerContainerComponent, selector: "ax-media-viewer-container", inputs: { dataArray: { classPropertyName: "dataArray", publicName: "dataArray", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-content select=\"ax-prefix\"> </ng-content>\n\n<div class=\"ax-media-viewer-slider-container ax-sm\">\n <ax-button (click)=\"backHandler()\">\n <ax-icon class=\"ax-icon ax-icon-arrow-left button-slider-media\"> </ax-icon>\n </ax-button>\n\n <ax-media-viewer-slider [dataObject]=\"showComponent()\"></ax-media-viewer-slider>\n\n <ax-button (click)=\"nextHandler()\">\n <ax-icon class=\"ax-icon ax-icon-arrow-right\"> </ax-icon>\n </ax-button>\n</div>\n\n<ng-content select=\"ax-suffix\"> </ng-content>\n", styles: ["ax-media-viewer-container{padding:.5rem;overflow:hidden}ax-media-viewer-container .ax-media-viewer-slider-container{display:flex;justify-content:space-between;align-items:center}ax-media-viewer-container .ax-media-viewer-slider-container ax-media-viewer-slider{width:90%}ax-media-viewer-container .ax-media-viewer-slider-container .button-slider-media{width:5%}\n"], dependencies: [{ kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXMediaViewerSliderComponent, selector: "ax-media-viewer-slider", inputs: ["dataObject"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
95
|
+
}
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerContainerComponent, decorators: [{
|
97
|
+
type: Component,
|
98
|
+
args: [{ selector: 'ax-media-viewer-container', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"> </ng-content>\n\n<div class=\"ax-media-viewer-slider-container ax-sm\">\n <ax-button (click)=\"backHandler()\">\n <ax-icon class=\"ax-icon ax-icon-arrow-left button-slider-media\"> </ax-icon>\n </ax-button>\n\n <ax-media-viewer-slider [dataObject]=\"showComponent()\"></ax-media-viewer-slider>\n\n <ax-button (click)=\"nextHandler()\">\n <ax-icon class=\"ax-icon ax-icon-arrow-right\"> </ax-icon>\n </ax-button>\n</div>\n\n<ng-content select=\"ax-suffix\"> </ng-content>\n", styles: ["ax-media-viewer-container{padding:.5rem;overflow:hidden}ax-media-viewer-container .ax-media-viewer-slider-container{display:flex;justify-content:space-between;align-items:center}ax-media-viewer-container .ax-media-viewer-slider-container ax-media-viewer-slider{width:90%}ax-media-viewer-container .ax-media-viewer-slider-container .button-slider-media{width:5%}\n"] }]
|
99
|
+
}], ctorParameters: () => [] });
|
100
|
+
|
101
|
+
class AXMediaViewerThumbnailComponent {
|
102
|
+
constructor() {
|
103
|
+
this.service = inject(AXMediaViewerService);
|
104
|
+
this.data = signal([]);
|
105
|
+
afterNextRender(() => {
|
106
|
+
this.data.set(this.service.dataArray());
|
107
|
+
});
|
108
|
+
}
|
109
|
+
clickHandler(i) {
|
110
|
+
this.service.selectedIndex.set(i);
|
111
|
+
}
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXMediaViewerThumbnailComponent, selector: "ax-media-viewer-thumbnail", ngImport: i0, template: "@for (item of data(); track $index) {\n <div\n class=\"ax-thumbnail\"\n (click)=\"clickHandler($index)\"\n [ngClass]=\"$index === service.selectedIndex() && 'active'\"\n >\n <img [src]=\"item.thumbnail\" alt=\"thumbnail\" />\n </div>\n}\n", styles: ["ax-media-viewer-thumbnail{padding:1rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;overflow-x:auto}ax-media-viewer-thumbnail .ax-thumbnail{cursor:pointer;padding:.5rem;min-width:9rem;aspect-ratio:1;background-color:gray;margin-inline:.6rem;overflow:hidden}ax-media-viewer-thumbnail .ax-thumbnail img{object-position:center;object-fit:cover;height:100%;width:100%}ax-media-viewer-thumbnail .ax-thumbnail.active{background-color:#87ceeb}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
114
|
+
}
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerThumbnailComponent, decorators: [{
|
116
|
+
type: Component,
|
117
|
+
args: [{ selector: 'ax-media-viewer-thumbnail', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@for (item of data(); track $index) {\n <div\n class=\"ax-thumbnail\"\n (click)=\"clickHandler($index)\"\n [ngClass]=\"$index === service.selectedIndex() && 'active'\"\n >\n <img [src]=\"item.thumbnail\" alt=\"thumbnail\" />\n </div>\n}\n", styles: ["ax-media-viewer-thumbnail{padding:1rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;overflow-x:auto}ax-media-viewer-thumbnail .ax-thumbnail{cursor:pointer;padding:.5rem;min-width:9rem;aspect-ratio:1;background-color:gray;margin-inline:.6rem;overflow:hidden}ax-media-viewer-thumbnail .ax-thumbnail img{object-position:center;object-fit:cover;height:100%;width:100%}ax-media-viewer-thumbnail .ax-thumbnail.active{background-color:#87ceeb}\n"] }]
|
118
|
+
}], ctorParameters: () => [] });
|
119
|
+
|
120
|
+
class AXMediaViewerBaseComponent {
|
121
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
122
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerBaseComponent }); }
|
123
|
+
}
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerBaseComponent, decorators: [{
|
125
|
+
type: Injectable
|
126
|
+
}] });
|
127
|
+
|
128
|
+
class AXAudioPlayerComponent extends AXMediaViewerBaseComponent {
|
129
|
+
constructor() {
|
130
|
+
super();
|
131
|
+
this.dataObject = signal(null);
|
132
|
+
afterNextRender(() => {
|
133
|
+
this.dataObject.set(this.message);
|
134
|
+
});
|
135
|
+
}
|
136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXAudioPlayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
137
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXAudioPlayerComponent, selector: "ax-audio-player", usesInheritance: true, ngImport: i0, template: "<audio class=\"ax-audio-player-tag\" controls [src]=\"dataObject()?.url\"></audio>\n", styles: ["ax-audio-player{display:flex;justify-content:center;align-items:center}ax-audio-player .ax-audio-player-tag{max-width:100%;min-width:7rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
138
|
+
}
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXAudioPlayerComponent, decorators: [{
|
140
|
+
type: Component,
|
141
|
+
args: [{ selector: 'ax-audio-player', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<audio class=\"ax-audio-player-tag\" controls [src]=\"dataObject()?.url\"></audio>\n", styles: ["ax-audio-player{display:flex;justify-content:center;align-items:center}ax-audio-player .ax-audio-player-tag{max-width:100%;min-width:7rem}\n"] }]
|
142
|
+
}], ctorParameters: () => [] });
|
143
|
+
|
144
|
+
class AXImageViewerComponent extends AXMediaViewerBaseComponent {
|
145
|
+
constructor() {
|
146
|
+
super();
|
147
|
+
this.dataObject = signal(null);
|
148
|
+
afterNextRender(() => {
|
149
|
+
this.dataObject.set(this.message);
|
150
|
+
});
|
151
|
+
}
|
152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXImageViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
153
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXImageViewerComponent, selector: "ax-image-viewer", usesInheritance: true, ngImport: i0, template: "<img [src]=\"dataObject()?.url\" />\n", styles: ["ax-image-viewer{display:flex;justify-content:center;align-items:center}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
154
|
+
}
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXImageViewerComponent, decorators: [{
|
156
|
+
type: Component,
|
157
|
+
args: [{ selector: 'ax-image-viewer', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<img [src]=\"dataObject()?.url\" />\n", styles: ["ax-image-viewer{display:flex;justify-content:center;align-items:center}\n"] }]
|
158
|
+
}], ctorParameters: () => [] });
|
159
|
+
|
160
|
+
class AXPdfReaderComponent extends AXMediaViewerBaseComponent {
|
161
|
+
constructor() {
|
162
|
+
super();
|
163
|
+
afterNextRender(() => {
|
164
|
+
const obj = document.createElement('object');
|
165
|
+
obj.type = 'application/pdf';
|
166
|
+
obj.data = this.message.url;
|
167
|
+
obj.classList.add('pdfObj');
|
168
|
+
const container = document.querySelector('ax-pdf-reader');
|
169
|
+
container.appendChild(obj);
|
170
|
+
});
|
171
|
+
}
|
172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPdfReaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
173
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXPdfReaderComponent, selector: "ax-pdf-reader", usesInheritance: true, ngImport: i0, template: "\n", styles: ["ax-pdf-reader .pdfObj{width:clamp(100%,30rem,35rem);height:30rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
174
|
+
}
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXPdfReaderComponent, decorators: [{
|
176
|
+
type: Component,
|
177
|
+
args: [{ selector: 'ax-pdf-reader', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "\n", styles: ["ax-pdf-reader .pdfObj{width:clamp(100%,30rem,35rem);height:30rem}\n"] }]
|
178
|
+
}], ctorParameters: () => [] });
|
179
|
+
|
180
|
+
class AXVideoPlayerComponent extends AXMediaViewerBaseComponent {
|
181
|
+
constructor() {
|
182
|
+
super();
|
183
|
+
this.dataObject = signal(null);
|
184
|
+
afterNextRender(() => {
|
185
|
+
this.dataObject.set(this.message);
|
186
|
+
});
|
187
|
+
}
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXVideoPlayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
189
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXVideoPlayerComponent, selector: "ax-video-player", usesInheritance: true, ngImport: i0, template: "<video controls [src]=\"dataObject()?.url\"></video>\n", styles: ["ax-video-player{display:flex;justify-content:center;align-items:center}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
190
|
+
}
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXVideoPlayerComponent, decorators: [{
|
192
|
+
type: Component,
|
193
|
+
args: [{ selector: 'ax-video-player', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<video controls [src]=\"dataObject()?.url\"></video>\n", styles: ["ax-video-player{display:flex;justify-content:center;align-items:center}\n"] }]
|
194
|
+
}], ctorParameters: () => [] });
|
195
|
+
|
196
|
+
const COMPONENT = [
|
197
|
+
AXMediaViewerContainerComponent,
|
198
|
+
AXMediaViewerSliderComponent,
|
199
|
+
AXMediaViewerThumbnailComponent,
|
200
|
+
AXAudioPlayerComponent,
|
201
|
+
AXImageViewerComponent,
|
202
|
+
AXPdfReaderComponent,
|
203
|
+
AXVideoPlayerComponent,
|
204
|
+
];
|
205
|
+
const MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, CdkPortalOutlet, FormsModule];
|
206
|
+
class AXMediaViewerModule {
|
207
|
+
constructor(instances) {
|
208
|
+
instances?.forEach((f) => {
|
209
|
+
f();
|
210
|
+
});
|
211
|
+
}
|
212
|
+
static forRoot(config) {
|
213
|
+
return {
|
214
|
+
ngModule: AXMediaViewerModule,
|
215
|
+
providers: [
|
216
|
+
{
|
217
|
+
provide: 'AXMediaViewerFactory',
|
218
|
+
useFactory: (registry) => () => {
|
219
|
+
if (config?.types?.length) {
|
220
|
+
registry.register(...config.types);
|
221
|
+
}
|
222
|
+
registry.register({
|
223
|
+
name: 'audio',
|
224
|
+
component: AXAudioPlayerComponent,
|
225
|
+
});
|
226
|
+
registry.register({
|
227
|
+
name: 'image',
|
228
|
+
component: AXImageViewerComponent,
|
229
|
+
});
|
230
|
+
registry.register({
|
231
|
+
name: 'pdf',
|
232
|
+
component: AXPdfReaderComponent,
|
233
|
+
});
|
234
|
+
registry.register({
|
235
|
+
name: 'video',
|
236
|
+
component: AXVideoPlayerComponent,
|
237
|
+
});
|
238
|
+
},
|
239
|
+
deps: [AXMediaViewerTypeRegistryService],
|
240
|
+
multi: true,
|
241
|
+
},
|
242
|
+
],
|
243
|
+
};
|
244
|
+
}
|
245
|
+
static forChild(config) {
|
246
|
+
return {
|
247
|
+
ngModule: AXMediaViewerModule,
|
248
|
+
providers: [
|
249
|
+
{
|
250
|
+
provide: 'AXMediaViewerFactory',
|
251
|
+
useFactory: (registry) => () => {
|
252
|
+
if (config?.types?.length) {
|
253
|
+
registry.register(...config.types);
|
254
|
+
}
|
255
|
+
},
|
256
|
+
deps: [AXMediaViewerTypeRegistryService],
|
257
|
+
multi: true,
|
258
|
+
},
|
259
|
+
],
|
260
|
+
};
|
261
|
+
}
|
262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerModule, deps: [{ token: 'AXMediaViewerFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
263
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerModule, declarations: [AXMediaViewerContainerComponent,
|
264
|
+
AXMediaViewerSliderComponent,
|
265
|
+
AXMediaViewerThumbnailComponent,
|
266
|
+
AXAudioPlayerComponent,
|
267
|
+
AXImageViewerComponent,
|
268
|
+
AXPdfReaderComponent,
|
269
|
+
AXVideoPlayerComponent], imports: [CommonModule, AXButtonModule, AXDecoratorModule, CdkPortalOutlet, FormsModule], exports: [AXMediaViewerContainerComponent,
|
270
|
+
AXMediaViewerSliderComponent,
|
271
|
+
AXMediaViewerThumbnailComponent,
|
272
|
+
AXAudioPlayerComponent,
|
273
|
+
AXImageViewerComponent,
|
274
|
+
AXPdfReaderComponent,
|
275
|
+
AXVideoPlayerComponent] }); }
|
276
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerModule, providers: [AXMediaViewerService], imports: [CommonModule, AXButtonModule, AXDecoratorModule, FormsModule] }); }
|
277
|
+
}
|
278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMediaViewerModule, decorators: [{
|
279
|
+
type: NgModule,
|
280
|
+
args: [{
|
281
|
+
declarations: [...COMPONENT],
|
282
|
+
imports: [...MODULES],
|
283
|
+
exports: [...COMPONENT],
|
284
|
+
providers: [AXMediaViewerService],
|
285
|
+
}]
|
286
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
287
|
+
type: Optional
|
288
|
+
}, {
|
289
|
+
type: Inject,
|
290
|
+
args: ['AXMediaViewerFactory']
|
291
|
+
}] }] });
|
292
|
+
|
293
|
+
/**
|
294
|
+
* Generated bundle index. Do not edit.
|
295
|
+
*/
|
296
|
+
|
297
|
+
export { AXAudioPlayerComponent, AXImageViewerComponent, AXMediaViewerBaseComponent, AXMediaViewerContainerComponent, AXMediaViewerModule, AXMediaViewerSliderComponent, AXMediaViewerThumbnailComponent, AXPdfReaderComponent, AXVideoPlayerComponent };
|
298
|
+
//# sourceMappingURL=acorex-components-media-viewer.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-components-media-viewer.mjs","sources":["../../../../libs/components/media-viewer/src/lib/media-viewer.service.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-type-registry.service.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-slider/media-viewer-slider.component.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-slider/media-viewer-slider.component.html","../../../../libs/components/media-viewer/src/lib/media-viewer-container/media-viewer-container.component.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-container/media-viewer-container.component.html","../../../../libs/components/media-viewer/src/lib/media-viewer-thumbnail/media-viewer-thumbnail.component.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-thumbnail/media-viewer-thumbnail.component.html","../../../../libs/components/media-viewer/src/lib/media-viewer-types.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-tools/audio-player/audio-player.component.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-tools/audio-player/audio-player.component.html","../../../../libs/components/media-viewer/src/lib/media-viewer-tools/image-viewer/image-viewer.component.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-tools/image-viewer/image-viewer.component.html","../../../../libs/components/media-viewer/src/lib/media-viewer-tools/pdf-reader/pdf-reader.component.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-tools/pdf-reader/pdf-reader.component.html","../../../../libs/components/media-viewer/src/lib/media-viewer-tools/video-player/video-player.component.ts","../../../../libs/components/media-viewer/src/lib/media-viewer-tools/video-player/video-player.component.html","../../../../libs/components/media-viewer/src/lib/media-viewer.module.ts","../../../../libs/components/media-viewer/src/acorex-components-media-viewer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXMediaViewerData } from './media-viewer-types';\n\n@Injectable()\nexport class AXMediaViewerService {\n dataArray = signal<AXMediaViewerData[]>([]);\n selectedIndex = signal(0);\n}\n","import { Injectable } from '@angular/core';\nimport { AXMediaViewerType } from './media-viewer-types';\n\n@Injectable({ providedIn: 'root' })\nexport class AXMediaViewerTypeRegistryService {\n private plugins: Map<string, AXMediaViewerType> = new Map<string, AXMediaViewerType>();\n\n register(...plugins: AXMediaViewerType[]) {\n plugins.forEach((p) => this.plugins.set(p.name, p));\n }\n\n public resolve(name: string): AXMediaViewerType | undefined {\n return this.plugins.get(name);\n }\n}\n","import { isBrowser } from '@acorex/core/platform';\nimport { CdkPortalOutletAttachedRef, ComponentPortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n effect,\n inject,\n input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXMediaViewerTypeRegistryService } from '../media-viewer-type-registry.service';\nimport { AXMediaViewerData } from '../media-viewer-types';\nimport { AXMediaViewerService } from '../media-viewer.service';\n\n@Component({\n selector: 'ax-media-viewer-slider',\n templateUrl: './media-viewer-slider.component.html',\n styleUrls: ['./media-viewer-slider.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXMediaViewerSliderComponent {\n protected service = inject(AXMediaViewerService);\n\n dataObject = input<AXMediaViewerData>();\n\n /** @ignore */\n protected portal = signal<ComponentPortal<any> | null>(null);\n\n /** @ignore */\n protected registryService = inject(AXMediaViewerTypeRegistryService);\n\n /** @ignore */\n constructor() {\n effect(\n () => {\n this.portal.set(new ComponentPortal(this.registryService.resolve(this.dataObject()?.type).component));\n },\n { allowSignalWrites: true },\n );\n }\n\n /** @ignore */\n protected _handleAttached(ref: CdkPortalOutletAttachedRef) {\n ref = ref as ComponentRef<unknown>;\n if (ref.instance && isBrowser()) {\n Object.assign(ref.instance, { message: this.dataObject() });\n }\n }\n}\n","<ng-template [cdkPortalOutlet]=\"portal()\" (attached)=\"_handleAttached($event)\"></ng-template>\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXMediaViewerData } from '../media-viewer-types';\nimport { AXMediaViewerService } from '../media-viewer.service';\n\n@Component({\n selector: 'ax-media-viewer-container',\n templateUrl: './media-viewer-container.component.html',\n styleUrls: ['./media-viewer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXMediaViewerContainerComponent {\n dataArray = input<AXMediaViewerData[]>();\n\n protected service = inject(AXMediaViewerService);\n\n protected arrayLength = computed(() => this.dataArray().length);\n protected arrayIndex = computed(() => this.service.selectedIndex());\n protected showComponent = computed(() => this.dataArray()[this.arrayIndex()]);\n\n constructor() {\n afterNextRender(() => {\n this.service.dataArray.set(this.dataArray());\n });\n }\n\n protected nextHandler() {\n if (this.arrayIndex() === this.arrayLength() - 1) return;\n this.service.selectedIndex.update((prev) => prev + 1);\n }\n\n protected backHandler() {\n if (this.arrayIndex() === 0) return;\n this.service.selectedIndex.update((prev) => prev - 1);\n }\n}\n","<ng-content select=\"ax-prefix\"> </ng-content>\n\n<div class=\"ax-media-viewer-slider-container ax-sm\">\n <ax-button (click)=\"backHandler()\">\n <ax-icon class=\"ax-icon ax-icon-arrow-left button-slider-media\"> </ax-icon>\n </ax-button>\n\n <ax-media-viewer-slider [dataObject]=\"showComponent()\"></ax-media-viewer-slider>\n\n <ax-button (click)=\"nextHandler()\">\n <ax-icon class=\"ax-icon ax-icon-arrow-right\"> </ax-icon>\n </ax-button>\n</div>\n\n<ng-content select=\"ax-suffix\"> </ng-content>\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { AXMediaViewerData } from '../media-viewer-types';\nimport { AXMediaViewerService } from '../media-viewer.service';\n\n@Component({\n selector: 'ax-media-viewer-thumbnail',\n templateUrl: './media-viewer-thumbnail.component.html',\n styleUrls: ['./media-viewer-thumbnail.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXMediaViewerThumbnailComponent {\n protected service = inject(AXMediaViewerService);\n protected data = signal<AXMediaViewerData[]>([]);\n\n constructor() {\n afterNextRender(() => {\n this.data.set(this.service.dataArray());\n });\n }\n\n protected clickHandler(i: number) {\n this.service.selectedIndex.set(i);\n }\n}\n","@for (item of data(); track $index) {\n <div\n class=\"ax-thumbnail\"\n (click)=\"clickHandler($index)\"\n [ngClass]=\"$index === service.selectedIndex() && 'active'\"\n >\n <img [src]=\"item.thumbnail\" alt=\"thumbnail\" />\n </div>\n}\n","import { Injectable, Type } from '@angular/core';\n\nexport interface AXMediaViewerType {\n name: string;\n component: Type<any>;\n}\n\nexport type AXMediaViewerData = {\n id: string;\n type: 'image' | 'audio' | 'pdf' | 'video';\n url: string;\n thumbnail: string;\n};\n\n@Injectable()\nexport class AXMediaViewerBaseComponent {\n message: AXMediaViewerData;\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXMediaViewerBaseComponent, AXMediaViewerData } from '../../media-viewer-types';\n\n@Component({\n selector: 'ax-audio-player',\n templateUrl: './audio-player.component.html',\n styleUrls: ['./audio-player.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXAudioPlayerComponent extends AXMediaViewerBaseComponent {\n dataObject = signal<AXMediaViewerData>(null);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.dataObject.set(this.message);\n });\n }\n}\n","<audio class=\"ax-audio-player-tag\" controls [src]=\"dataObject()?.url\"></audio>\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXMediaViewerBaseComponent, AXMediaViewerData } from '../../media-viewer-types';\n\n@Component({\n selector: 'ax-image-viewer',\n templateUrl: './image-viewer.component.html',\n styleUrls: ['./image-viewer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXImageViewerComponent extends AXMediaViewerBaseComponent {\n dataObject = signal<AXMediaViewerData>(null);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.dataObject.set(this.message);\n });\n }\n}\n","<img [src]=\"dataObject()?.url\" />\n","import { afterNextRender, ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { AXMediaViewerBaseComponent } from '../../media-viewer-types';\n\n@Component({\n selector: 'ax-pdf-reader',\n templateUrl: './pdf-reader.component.html',\n styleUrls: ['./pdf-reader.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXPdfReaderComponent extends AXMediaViewerBaseComponent {\n constructor() {\n super();\n afterNextRender(() => {\n const obj = document.createElement('object');\n obj.type = 'application/pdf';\n obj.data = this.message.url;\n obj.classList.add('pdfObj');\n const container = document.querySelector('ax-pdf-reader');\n container.appendChild(obj);\n });\n }\n}\n","\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXMediaViewerBaseComponent, AXMediaViewerData } from '../../media-viewer-types';\n\n@Component({\n selector: 'ax-video-player',\n templateUrl: './video-player.component.html',\n styleUrls: ['./video-player.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXVideoPlayerComponent extends AXMediaViewerBaseComponent {\n dataObject = signal<AXMediaViewerData>(null);\n\n constructor() {\n super();\n afterNextRender(() => {\n this.dataObject.set(this.message);\n });\n }\n}\n","<video controls [src]=\"dataObject()?.url\"></video>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { Inject, ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AXMediaViewerContainerComponent } from './media-viewer-container/media-viewer-container.component';\nimport { AXMediaViewerSliderComponent } from './media-viewer-slider/media-viewer-slider.component';\nimport { AXMediaViewerThumbnailComponent } from './media-viewer-thumbnail/media-viewer-thumbnail.component';\nimport { AXAudioPlayerComponent } from './media-viewer-tools/audio-player/audio-player.component';\nimport { AXImageViewerComponent } from './media-viewer-tools/image-viewer/image-viewer.component';\nimport { AXPdfReaderComponent } from './media-viewer-tools/pdf-reader/pdf-reader.component';\nimport { AXVideoPlayerComponent } from './media-viewer-tools/video-player/video-player.component';\nimport { AXMediaViewerTypeRegistryService } from './media-viewer-type-registry.service';\nimport { AXMediaViewerType } from './media-viewer-types';\nimport { AXMediaViewerService } from './media-viewer.service';\n\nexport interface AXMediaViewerModuleConfig {\n types: AXMediaViewerType[];\n}\n\nconst COMPONENT = [\n AXMediaViewerContainerComponent,\n AXMediaViewerSliderComponent,\n AXMediaViewerThumbnailComponent,\n AXAudioPlayerComponent,\n AXImageViewerComponent,\n AXPdfReaderComponent,\n AXVideoPlayerComponent,\n];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, CdkPortalOutlet, FormsModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXMediaViewerService],\n})\nexport class AXMediaViewerModule {\n constructor(@Optional() @Inject('AXMediaViewerFactory') instances: any[]) {\n instances?.forEach((f) => {\n f();\n });\n }\n\n static forRoot(config?: AXMediaViewerModuleConfig): ModuleWithProviders<AXMediaViewerModule> {\n return {\n ngModule: AXMediaViewerModule,\n providers: [\n {\n provide: 'AXMediaViewerFactory',\n useFactory: (registry: AXMediaViewerTypeRegistryService) => () => {\n if (config?.types?.length) {\n registry.register(...config.types);\n }\n registry.register({\n name: 'audio',\n component: AXAudioPlayerComponent,\n });\n registry.register({\n name: 'image',\n component: AXImageViewerComponent,\n });\n registry.register({\n name: 'pdf',\n component: AXPdfReaderComponent,\n });\n registry.register({\n name: 'video',\n component: AXVideoPlayerComponent,\n });\n },\n deps: [AXMediaViewerTypeRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(config?: AXMediaViewerModuleConfig): ModuleWithProviders<AXMediaViewerModule> {\n return {\n ngModule: AXMediaViewerModule,\n providers: [\n {\n provide: 'AXMediaViewerFactory',\n useFactory: (registry: AXMediaViewerTypeRegistryService) => () => {\n if (config?.types?.length) {\n registry.register(...config.types);\n }\n },\n deps: [AXMediaViewerTypeRegistryService],\n multi: true,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3.AXMediaViewerSliderComponent"],"mappings":";;;;;;;;;;;;;MAIa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAsB,EAAE,CAAC,CAAC;AAC5C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC3B,KAAA;8GAHY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAApB,oBAAoB,EAAA,CAAA,CAAA,EAAA;;2FAApB,oBAAoB,E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,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;oBACvB,SAAS,EAAE,CAAC,oBAAoB,CAAC;AAClC,iBAAA,CAAA;;0BAEc,QAAQ;;0BAAI,MAAM;2BAAC,sBAAsB,CAAA;;;ACvCxD;;AAEG;;;;"}
|
@@ -218,7 +218,7 @@ class AXMenuComponent extends MXBaseComponent {
|
|
218
218
|
{
|
219
219
|
provide: AXMenuService,
|
220
220
|
},
|
221
|
-
], queries: [{ propertyName: "children", predicate: AXMenuItemComponent }], usesInheritance: true, ngImport: i0, template: `<ng-content select="ax-menu-item,ng-container"></ng-content>`, isInline: true, styles: ["ax-menu{width:100%;font-size:.875rem;line-height:1.25rem;color:inherit}ax-menu.ax-orientation-horizontal{display:flex}ax-menu.ax-orientation-horizontal ax-menu-item:not(ax-menu.ax-orientation-horizontal ax-menu-item:last-child){margin-inline-end:1rem}ax-menu.ax-orientation-vertical{display:flex;flex-direction:column}ax-menu.ax-orientation-vertical ax-menu-item{justify-content:space-between}ax-menu.ax-orientation-vertical ax-menu-item:not(ax-menu.ax-orientation-vertical ax-menu-item:last-child){margin-bottom:1rem}ax-menu ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled){color:rgba(var(--ax-color-primary-500))}ax-menu-item{position:relative;display:flex;align-items:center;gap:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;justify-content:space-between}ax-menu-item:not(ax-menu-item.ax-state-disabled){cursor:pointer}ax-menu-item .ax-menu-item-start-side{display:flex;align-items:center;gap:.5rem}ax-menu-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-menu-item.ax-state-selected{color:rgba(var(--ax-color-primary-500))}ax-menu-item .ax-menu-item-child-icon{width:fit-content;line-height:1}ax-menu-item ax-popover{position:absolute}.ax-menu-item-children{padding-top:.5rem;padding-bottom:.5rem}.ax-menu-item-children:not(.ax-menu-item-children:empty){display:flex;min-width:12rem;flex-direction:column;border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item{padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-suffix{opacity:1}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-suffix{opacity:.75}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item .ax-menu-item-text{flex:1 1 0%}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon:before{-moz-transform:scale(1,-1);-webkit-transform:scale(1,-1);-o-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scaleY(-1)}.ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
221
|
+
], queries: [{ propertyName: "children", predicate: AXMenuItemComponent }], usesInheritance: true, ngImport: i0, template: `<ng-content select="ax-menu-item,ng-container"></ng-content>`, isInline: true, styles: ["ax-menu{width:100%;font-size:.875rem;line-height:1.25rem;color:inherit}ax-menu.ax-orientation-horizontal{display:flex}ax-menu.ax-orientation-horizontal ax-menu-item:not(ax-menu.ax-orientation-horizontal ax-menu-item:last-child){margin-inline-end:1rem}ax-menu.ax-orientation-vertical{display:flex;flex-direction:column}ax-menu.ax-orientation-vertical ax-menu-item{justify-content:space-between}ax-menu.ax-orientation-vertical ax-menu-item:not(ax-menu.ax-orientation-vertical ax-menu-item:last-child){margin-bottom:1rem}ax-menu ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled){color:rgba(var(--ax-color-primary-500))}ax-menu-item{position:relative;display:flex;align-items:center;gap:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;justify-content:space-between;color:rgba(var(--ax-color-text-default))}ax-menu-item:not(ax-menu-item.ax-state-disabled){cursor:pointer}ax-menu-item .ax-menu-item-start-side{display:flex;align-items:center;gap:.5rem}ax-menu-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-menu-item.ax-state-selected{color:rgba(var(--ax-color-primary-500))}ax-menu-item .ax-menu-item-child-icon{width:fit-content;line-height:1}ax-menu-item ax-popover{position:absolute}.ax-menu-item-children{padding-top:.5rem;padding-bottom:.5rem}.ax-menu-item-children:not(.ax-menu-item-children:empty){display:flex;min-width:12rem;flex-direction:column;border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item{padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-suffix{opacity:1}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-suffix{opacity:.75}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item .ax-menu-item-text{flex:1 1 0%}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon:before{-moz-transform:scale(1,-1);-webkit-transform:scale(1,-1);-o-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scaleY(-1)}.ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
222
222
|
}
|
223
223
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuComponent, decorators: [{
|
224
224
|
type: Component,
|
@@ -230,7 +230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
230
230
|
{
|
231
231
|
provide: AXMenuService,
|
232
232
|
},
|
233
|
-
], styles: ["ax-menu{width:100%;font-size:.875rem;line-height:1.25rem;color:inherit}ax-menu.ax-orientation-horizontal{display:flex}ax-menu.ax-orientation-horizontal ax-menu-item:not(ax-menu.ax-orientation-horizontal ax-menu-item:last-child){margin-inline-end:1rem}ax-menu.ax-orientation-vertical{display:flex;flex-direction:column}ax-menu.ax-orientation-vertical ax-menu-item{justify-content:space-between}ax-menu.ax-orientation-vertical ax-menu-item:not(ax-menu.ax-orientation-vertical ax-menu-item:last-child){margin-bottom:1rem}ax-menu ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled){color:rgba(var(--ax-color-primary-500))}ax-menu-item{position:relative;display:flex;align-items:center;gap:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;justify-content:space-between}ax-menu-item:not(ax-menu-item.ax-state-disabled){cursor:pointer}ax-menu-item .ax-menu-item-start-side{display:flex;align-items:center;gap:.5rem}ax-menu-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-menu-item.ax-state-selected{color:rgba(var(--ax-color-primary-500))}ax-menu-item .ax-menu-item-child-icon{width:fit-content;line-height:1}ax-menu-item ax-popover{position:absolute}.ax-menu-item-children{padding-top:.5rem;padding-bottom:.5rem}.ax-menu-item-children:not(.ax-menu-item-children:empty){display:flex;min-width:12rem;flex-direction:column;border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item{padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-suffix{opacity:1}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-suffix{opacity:.75}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item .ax-menu-item-text{flex:1 1 0%}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon:before{-moz-transform:scale(1,-1);-webkit-transform:scale(1,-1);-o-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scaleY(-1)}.ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}\n"] }]
|
233
|
+
], styles: ["ax-menu{width:100%;font-size:.875rem;line-height:1.25rem;color:inherit}ax-menu.ax-orientation-horizontal{display:flex}ax-menu.ax-orientation-horizontal ax-menu-item:not(ax-menu.ax-orientation-horizontal ax-menu-item:last-child){margin-inline-end:1rem}ax-menu.ax-orientation-vertical{display:flex;flex-direction:column}ax-menu.ax-orientation-vertical ax-menu-item{justify-content:space-between}ax-menu.ax-orientation-vertical ax-menu-item:not(ax-menu.ax-orientation-vertical ax-menu-item:last-child){margin-bottom:1rem}ax-menu ax-menu-item:hover:not(ax-menu ax-menu-item:hover.ax-state-disabled){color:rgba(var(--ax-color-primary-500))}ax-menu-item{position:relative;display:flex;align-items:center;gap:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;justify-content:space-between;color:rgba(var(--ax-color-text-default))}ax-menu-item:not(ax-menu-item.ax-state-disabled){cursor:pointer}ax-menu-item .ax-menu-item-start-side{display:flex;align-items:center;gap:.5rem}ax-menu-item.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-menu-item.ax-state-selected{color:rgba(var(--ax-color-primary-500))}ax-menu-item .ax-menu-item-child-icon{width:fit-content;line-height:1}ax-menu-item ax-popover{position:absolute}.ax-menu-item-children{padding-top:.5rem;padding-bottom:.5rem}.ax-menu-item-children:not(.ax-menu-item-children:empty){display:flex;min-width:12rem;flex-direction:column;border-radius:var(--ax-rounded-border-default);border-width:1px;border-color:rgba(var(--ax-color-border-default));background-color:rgba(var(--ax-color-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item{padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled){background-color:rgba(var(--ax-color-on-surface))}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover:not(.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item:hover.ax-state-disabled) ax-suffix{opacity:1}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-prefix,.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item ax-suffix{opacity:.75}.ax-menu-item-children:not(.ax-menu-item-children:empty) ax-menu-item .ax-menu-item-text{flex:1 1 0%}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}html[dir=rtl] .ax-parent-horizontal .ax-menu-item-child-icon:before{-moz-transform:scale(1,-1);-webkit-transform:scale(1,-1);-o-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scaleY(-1)}.ax-parent-horizontal .ax-menu-item-child-icon{transform:rotate(-90deg)}\n"] }]
|
234
234
|
}], propDecorators: { children: [{
|
235
235
|
type: ContentChildren,
|
236
236
|
args: [AXMenuItemComponent]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-menu.mjs","sources":["../../../../libs/components/menu/src/lib/class/root-menu.class.ts","../../../../libs/components/menu/src/lib/menu.service.ts","../../../../libs/components/menu/src/lib/menu-item/menu-item.component.ts","../../../../libs/components/menu/src/lib/menu-item/menu-item.component.html","../../../../libs/components/menu/src/lib/menu.component.ts","../../../../libs/components/menu/src/lib/menu.module.ts","../../../../libs/components/menu/src/acorex-components-menu.ts"],"sourcesContent":["import { AXOrientation } from '@acorex/components/common';\nimport { WritableSignal, signal } from '@angular/core';\nimport { AXMenuPopoverTrigger } from './popover.class';\nexport class AXRootMenu {\n orientation: WritableSignal<AXOrientation> = signal('horizontal');\n openOn: WritableSignal<AXMenuPopoverTrigger> = signal('toggle');\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { AXMenuItemComponent } from './menu-item/menu-item.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXMenuService {\n activeMenus$: BehaviorSubject<AXMenuItemComponent[]> = new BehaviorSubject<AXMenuItemComponent[]>([]);\n}\n","import { AXClickEvent, MXInteractiveComponent } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport {\n Component,\n ContentChildren,\n HostBinding,\n HostListener,\n QueryList,\n ViewChild,\n afterNextRender,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { AXRootMenu } from '../class/root-menu.class';\nimport { AXMenuService } from '../menu.service';\n\n/**\n * Represents a menu item component used within an `ax-menu`.\n * @category Components\n */\n@Component({\n selector: 'ax-menu-item',\n inputs: ['disabled'],\n templateUrl: './menu-item.component.html',\n host: { ngSkipHydration: 'true' },\n})\nexport class AXMenuItemComponent extends MXInteractiveComponent {\n\n /** @ignore */\n @ViewChild(AXPopoverComponent)\n\n /** @ignore */\n private popover: AXPopoverComponent;\n\n /**\n * Injects the `AXMenuService` for managing menu interactions.\n */\n menuService = inject(AXMenuService);\n\n /**\n * The vertical offset for positioning, initialized to 0.\n */\n offsetY = signal(0);\n\n /**\n * The horizontal offset for positioning, initialized to 0.\n */\n offsetX = signal(0);\n\n /**\n * The text content, initialized to an empty string.\n */\n text = input<string>();\n\n /**\n * Indicates whether the item is active.\n */\n active = input<boolean>();\n\n /**\n * Emitted when the active state changes.\n */\n activeChange = output<boolean>();\n\n /**\n * Emitted when the element is clicked.\n */\n onClick = output<AXClickEvent>();\n\n /**\n * Indicates whether the component is a root menu item.\n * @defaultValue false\n */\n isRoot = false;\n\n /**\n * The parent menu item component, if any.\n */\n parent?: AXMenuItemComponent;\n\n /**\n * Injects the root menu service.\n */\n rootMenu = inject(AXRootMenu);\n\n /** @ignore */\n @ContentChildren(AXMenuItemComponent)\n children: QueryList<AXMenuItemComponent>;\n\n /** @ignore */\n constructor() {\n super();\n afterNextRender(() => {\n this.children.forEach((c) => {\n c.parent = this;\n });\n\n this.offsetY.set(this.isRoot ? 8 : 0);\n this.offsetX.set(this.isRoot ? 0 : 4);\n\n this.getPlacement();\n });\n }\n\n /**\n * Closes the popover if it is open.\n */\n close() {\n this.popover?.close();\n }\n\n // @HostListener('mouseleave', ['$event'])\n // private onMouseHover(e: MouseEvent) {\n // this.children.forEach((c) => {\n // c.close();\n // });\n // }\n\n /** @ignore */\n _handleOnOpened() {\n this.parent.children.forEach((c) => {\n if (c != this) {\n c.close();\n }\n });\n if (this.children.length) {\n this.menuService.activeMenus$.next(this.menuService.activeMenus$.getValue().concat(this));\n }\n }\n\n /** @ignore */\n _handleOnClosed() {\n this.children.forEach((c) => {\n c.close();\n });\n }\n\n /**\n * Returns the icon based on the orientation of the root menu.\n */\n getIcon() {\n if (this.rootMenu.orientation() == 'vertical') {\n return 'ax-icon-arrow-right';\n } else {\n return 'ax-icon-arrow-down';\n }\n }\n\n /**\n * Determines the placement based on the root menu's orientation: 'bottom-start' for horizontal root, 'end-top' otherwise.\n */\n getPlacement() {\n switch (this.rootMenu.orientation()) {\n case 'horizontal':\n if (this.isRoot) {\n return 'bottom-start';\n } else {\n return 'end-top';\n }\n break;\n case 'vertical':\n if (this.isRoot) {\n return 'end-top';\n } else {\n return 'end-top';\n }\n break;\n default:\n return 'bottom-start';\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): string[] {\n return [`${this.disabled ? 'ax-state-disabled' : ''}`, `${this.active() ? 'ax-state-active' : ''}`];\n }\n\n /** @ignore */\n @HostListener('click', ['$event'])\n private __hostClick(e: MouseEvent) {\n if (!this.disabled) {\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n if (!this.children.length) {\n this.menuService.activeMenus$.subscribe((c) => c.forEach((x) => x.close())).unsubscribe();\n this.menuService.activeMenus$.next([]);\n }\n }\n }\n}\n","<div class=\"ax-menu-item-start-side\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <div class=\"ax-menu-item-text\">{{ text() }}</div>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n@if(children.length){\n<i class=\"ax-icon ax-icon-solid {{ getIcon() }} ax-menu-item-child-icon\"></i>\n}\n<ax-popover #popover [closeOn]=\"'clickOut'\" [openOn]=\"rootMenu.openOn()\" [target]=\"getHostElement()\"\n [offsetY]=\"offsetY()\" [offsetX]=\"offsetX()\" [placement]=\"getPlacement()\" (onOpened)=\"_handleOnOpened()\"\n (onClosed)=\"_handleOnClosed()\">\n <div class=\"ax-menu-item-children ax-parent-{{ this.rootMenu.orientation() }}\">\n <ng-content select=\"ax-menu-item\"></ng-content>\n </div>\n</ax-popover>","import { AXOrientation, MXBaseComponent } from '@acorex/components/common';\nimport { AfterViewInit, Component, ContentChildren, HostBinding, QueryList, ViewEncapsulation, input } from '@angular/core';\nimport { AXMenuPopoverTrigger } from './class/popover.class';\nimport { AXRootMenu } from './class/root-menu.class';\nimport { AXMenuItemComponent } from './menu-item/menu-item.component';\nimport { AXMenuService } from './menu.service';\n\n/**\n * Represents a menu component that displays menu items.\n * @category Components\n */\n@Component({\n selector: 'ax-menu',\n template: `<ng-content select=\"ax-menu-item,ng-container\"></ng-content>`,\n styleUrls: ['./menu.component.scss'],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXRootMenu,\n useExisting: AXMenuComponent,\n },\n {\n provide: AXMenuService,\n },\n ],\n})\nexport class AXMenuComponent extends MXBaseComponent implements AfterViewInit {\n orientation = input<AXOrientation>('horizontal');\n openOn = input<AXMenuPopoverTrigger>('toggle');\n\n /** @ignore */\n @ContentChildren(AXMenuItemComponent)\n children: QueryList<AXMenuItemComponent>;\n\n /** @ignore */\n ngAfterViewInit() {\n this.children.forEach((c) => {\n c.isRoot = true;\n c.parent = this as unknown as AXMenuItemComponent;\n });\n }\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-orientation-${this.orientation()}`;\n }\n}\n","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXMenuItemComponent } from './menu-item/menu-item.component';\nimport { AXMenuComponent } from './menu.component';\n\nconst COMPONENT = [AXMenuItemComponent, AXMenuComponent];\nconst MODULES = [AXDecoratorModule, AXLoadingModule, AXTranslationModule, OverlayModule, AXPopoverModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [CommonModule, ...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAGa,UAAU,CAAA;AAAvB,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,WAAW,GAAkC,MAAM,CAAC,YAAY,CAAC,CAAC;AAClE,QAAA,IAAA,CAAA,MAAM,GAAyC,MAAM,CAAC,QAAQ,CAAC,CAAC;KACjE;AAAA;;MCCY,aAAa,CAAA;AAH1B,IAAA,WAAA,GAAA;AAIE,QAAA,IAAA,CAAA,YAAY,GAA2C,IAAI,eAAe,CAAwB,EAAE,CAAC,CAAC;AACvG,KAAA;8GAFY,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAb,IAAA,SA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AAC5B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,OAAO,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-menu.mjs","sources":["../../../../libs/components/menu/src/lib/class/root-menu.class.ts","../../../../libs/components/menu/src/lib/menu.service.ts","../../../../libs/components/menu/src/lib/menu-item/menu-item.component.ts","../../../../libs/components/menu/src/lib/menu-item/menu-item.component.html","../../../../libs/components/menu/src/lib/menu.component.ts","../../../../libs/components/menu/src/lib/menu.module.ts","../../../../libs/components/menu/src/acorex-components-menu.ts"],"sourcesContent":["import { AXOrientation } from '@acorex/components/common';\nimport { WritableSignal, signal } from '@angular/core';\nimport { AXMenuPopoverTrigger } from './popover.class';\nexport class AXRootMenu {\n orientation: WritableSignal<AXOrientation> = signal('horizontal');\n openOn: WritableSignal<AXMenuPopoverTrigger> = signal('toggle');\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { AXMenuItemComponent } from './menu-item/menu-item.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXMenuService {\n activeMenus$: BehaviorSubject<AXMenuItemComponent[]> = new BehaviorSubject<AXMenuItemComponent[]>([]);\n}\n","import { AXClickEvent, MXInteractiveComponent } from '@acorex/components/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport {\n Component,\n ContentChildren,\n HostBinding,\n HostListener,\n QueryList,\n ViewChild,\n afterNextRender,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { AXRootMenu } from '../class/root-menu.class';\nimport { AXMenuService } from '../menu.service';\n\n/**\n * Represents a menu item component used within an `ax-menu`.\n * @category Components\n */\n@Component({\n selector: 'ax-menu-item',\n inputs: ['disabled'],\n templateUrl: './menu-item.component.html',\n host: { ngSkipHydration: 'true' },\n})\nexport class AXMenuItemComponent extends MXInteractiveComponent {\n\n /** @ignore */\n @ViewChild(AXPopoverComponent)\n\n /** @ignore */\n private popover: AXPopoverComponent;\n\n /**\n * Injects the `AXMenuService` for managing menu interactions.\n */\n menuService = inject(AXMenuService);\n\n /**\n * The vertical offset for positioning, initialized to 0.\n */\n offsetY = signal(0);\n\n /**\n * The horizontal offset for positioning, initialized to 0.\n */\n offsetX = signal(0);\n\n /**\n * The text content, initialized to an empty string.\n */\n text = input<string>();\n\n /**\n * Indicates whether the item is active.\n */\n active = input<boolean>();\n\n /**\n * Emitted when the active state changes.\n */\n activeChange = output<boolean>();\n\n /**\n * Emitted when the element is clicked.\n */\n onClick = output<AXClickEvent>();\n\n /**\n * Indicates whether the component is a root menu item.\n * @defaultValue false\n */\n isRoot = false;\n\n /**\n * The parent menu item component, if any.\n */\n parent?: AXMenuItemComponent;\n\n /**\n * Injects the root menu service.\n */\n rootMenu = inject(AXRootMenu);\n\n /** @ignore */\n @ContentChildren(AXMenuItemComponent)\n children: QueryList<AXMenuItemComponent>;\n\n /** @ignore */\n constructor() {\n super();\n afterNextRender(() => {\n this.children.forEach((c) => {\n c.parent = this;\n });\n\n this.offsetY.set(this.isRoot ? 8 : 0);\n this.offsetX.set(this.isRoot ? 0 : 4);\n\n this.getPlacement();\n });\n }\n\n /**\n * Closes the popover if it is open.\n */\n close() {\n this.popover?.close();\n }\n\n // @HostListener('mouseleave', ['$event'])\n // private onMouseHover(e: MouseEvent) {\n // this.children.forEach((c) => {\n // c.close();\n // });\n // }\n\n /** @ignore */\n _handleOnOpened() {\n this.parent.children.forEach((c) => {\n if (c != this) {\n c.close();\n }\n });\n if (this.children.length) {\n this.menuService.activeMenus$.next(this.menuService.activeMenus$.getValue().concat(this));\n }\n }\n\n /** @ignore */\n _handleOnClosed() {\n this.children.forEach((c) => {\n c.close();\n });\n }\n\n /**\n * Returns the icon based on the orientation of the root menu.\n */\n getIcon() {\n if (this.rootMenu.orientation() == 'vertical') {\n return 'ax-icon-arrow-right';\n } else {\n return 'ax-icon-arrow-down';\n }\n }\n\n /**\n * Determines the placement based on the root menu's orientation: 'bottom-start' for horizontal root, 'end-top' otherwise.\n */\n getPlacement() {\n switch (this.rootMenu.orientation()) {\n case 'horizontal':\n if (this.isRoot) {\n return 'bottom-start';\n } else {\n return 'end-top';\n }\n break;\n case 'vertical':\n if (this.isRoot) {\n return 'end-top';\n } else {\n return 'end-top';\n }\n break;\n default:\n return 'bottom-start';\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): string[] {\n return [`${this.disabled ? 'ax-state-disabled' : ''}`, `${this.active() ? 'ax-state-active' : ''}`];\n }\n\n /** @ignore */\n @HostListener('click', ['$event'])\n private __hostClick(e: MouseEvent) {\n if (!this.disabled) {\n this.onClick.emit({\n component: this,\n htmlElement: this.getHostElement(),\n nativeEvent: e,\n });\n if (!this.children.length) {\n this.menuService.activeMenus$.subscribe((c) => c.forEach((x) => x.close())).unsubscribe();\n this.menuService.activeMenus$.next([]);\n }\n }\n }\n}\n","<div class=\"ax-menu-item-start-side\">\n <ng-content select=\"ax-prefix\"></ng-content>\n <div class=\"ax-menu-item-text\">{{ text() }}</div>\n</div>\n<ng-content select=\"ax-suffix\"></ng-content>\n@if(children.length){\n<i class=\"ax-icon ax-icon-solid {{ getIcon() }} ax-menu-item-child-icon\"></i>\n}\n<ax-popover #popover [closeOn]=\"'clickOut'\" [openOn]=\"rootMenu.openOn()\" [target]=\"getHostElement()\"\n [offsetY]=\"offsetY()\" [offsetX]=\"offsetX()\" [placement]=\"getPlacement()\" (onOpened)=\"_handleOnOpened()\"\n (onClosed)=\"_handleOnClosed()\">\n <div class=\"ax-menu-item-children ax-parent-{{ this.rootMenu.orientation() }}\">\n <ng-content select=\"ax-menu-item\"></ng-content>\n </div>\n</ax-popover>","import { AXOrientation, MXBaseComponent } from '@acorex/components/common';\nimport { AfterViewInit, Component, ContentChildren, HostBinding, QueryList, ViewEncapsulation, input } from '@angular/core';\nimport { AXMenuPopoverTrigger } from './class/popover.class';\nimport { AXRootMenu } from './class/root-menu.class';\nimport { AXMenuItemComponent } from './menu-item/menu-item.component';\nimport { AXMenuService } from './menu.service';\n\n/**\n * Represents a menu component that displays menu items.\n * @category Components\n */\n@Component({\n selector: 'ax-menu',\n template: `<ng-content select=\"ax-menu-item,ng-container\"></ng-content>`,\n styleUrls: ['./menu.component.scss'],\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AXRootMenu,\n useExisting: AXMenuComponent,\n },\n {\n provide: AXMenuService,\n },\n ],\n})\nexport class AXMenuComponent extends MXBaseComponent implements AfterViewInit {\n orientation = input<AXOrientation>('horizontal');\n openOn = input<AXMenuPopoverTrigger>('toggle');\n\n /** @ignore */\n @ContentChildren(AXMenuItemComponent)\n children: QueryList<AXMenuItemComponent>;\n\n /** @ignore */\n ngAfterViewInit() {\n this.children.forEach((c) => {\n c.isRoot = true;\n c.parent = this as unknown as AXMenuItemComponent;\n });\n }\n\n /** @ignore */\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-orientation-${this.orientation()}`;\n }\n}\n","import { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXPopoverModule } from '@acorex/components/popover';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXMenuItemComponent } from './menu-item/menu-item.component';\nimport { AXMenuComponent } from './menu.component';\n\nconst COMPONENT = [AXMenuItemComponent, AXMenuComponent];\nconst MODULES = [AXDecoratorModule, AXLoadingModule, AXTranslationModule, OverlayModule, AXPopoverModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [CommonModule, ...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAGa,UAAU,CAAA;AAAv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mBAAmB,EAAE,eAAe,CAK3C,EAAA,OAAA,EAAA,CAAA,YAAY,EAJP,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,aAAa,EAAE,eAAe,CADrF,EAAA,OAAA,EAAA,CAAA,mBAAmB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;+GAS1C,YAAY,EAAA,OAAA,EAAA,CAJb,YAAY,EAAK,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIvB,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,OAAO,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
@@ -5,7 +5,7 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
5
5
|
import * as i3$2 from '@acorex/components/select-box';
|
6
6
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
7
7
|
import * as i0 from '@angular/core';
|
8
|
-
import { signal, Injectable, inject, NgZone, afterNextRender, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation,
|
8
|
+
import { signal, Injectable, inject, NgZone, input, afterNextRender, effect, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, HostListener, NgModule } from '@angular/core';
|
9
9
|
import * as i3$1 from '@angular/forms';
|
10
10
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
11
11
|
import { AXWysiwyg } from '@acorex/cdk/wysiwyg';
|
@@ -49,6 +49,7 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
49
49
|
this.view = signal(null);
|
50
50
|
/** @ignore */
|
51
51
|
this.service = inject(AXWysiwygService);
|
52
|
+
this.initialValue = input();
|
52
53
|
afterNextRender(() => {
|
53
54
|
this.view.set(this.getHostElement().querySelector('ax-wysiwyg-view'));
|
54
55
|
this.zone.runOutsideAngular(() => {
|
@@ -58,7 +59,14 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
58
59
|
this.wysiwyg().wysiwygObj.on('text-change', this.changeHandler.bind(this));
|
59
60
|
});
|
60
61
|
this.service.wysiwyg.set(this.wysiwyg());
|
62
|
+
if (this.initialValue())
|
63
|
+
this.wysiwyg().wysiwygObj.root.innerHTML = this.initialValue();
|
61
64
|
});
|
65
|
+
effect(() => {
|
66
|
+
if (this.value) {
|
67
|
+
this.wysiwyg().wysiwygObj.root.innerHTML = this.value;
|
68
|
+
}
|
69
|
+
}, { allowSignalWrites: true });
|
62
70
|
}
|
63
71
|
/** @ignore */
|
64
72
|
changeHandler() {
|
@@ -81,7 +89,7 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
81
89
|
this.wysiwyg().wysiwygObj.off('text-change', this.changeHandler);
|
82
90
|
}
|
83
91
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
92
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXWysiwygContainerComponent, selector: "ax-wysiwyg-container", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, initialValue: { classPropertyName: "initialValue", publicName: "initialValue", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
85
93
|
{ provide: AXComponent, useExisting: AXWysiwygContainerComponent },
|
86
94
|
{ provide: AXFocusableComponent, useExisting: AXWysiwygContainerComponent },
|
87
95
|
{ provide: AXClearableComponent, useExisting: AXWysiwygContainerComponent },
|