@acorex/components 18.9.7 → 18.10.1
Sign up to get free protection for your applications and to get access to all the features.
- package/drawer/lib/drawer/drawer-item/drawer.component.d.ts +2 -2
- package/esm2022/drawer/lib/drawer/drawer-item/drawer.component.mjs +5 -5
- package/esm2022/media-viewer/lib/media-viewer-slider/media-viewer-slider.component.mjs +4 -2
- package/esm2022/menu/lib/menu-item/menu-item.component.mjs +42 -35
- package/esm2022/menu/lib/menu.component.mjs +104 -10
- package/esm2022/menu/lib/menu.module.mjs +5 -4
- package/esm2022/menu/lib/menu.service.mjs +6 -2
- package/esm2022/qrcode/acorex-components-qrcode.mjs +5 -0
- package/esm2022/qrcode/index.mjs +4 -0
- package/esm2022/qrcode/lib/qrcode.class.mjs +12 -0
- package/esm2022/qrcode/lib/qrcode.component.mjs +108 -0
- package/esm2022/qrcode/lib/qrcode.module.mjs +18 -0
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +6 -1
- package/fesm2022/acorex-components-drawer.mjs +4 -4
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +3 -1
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +151 -45
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +142 -0
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -0
- package/fesm2022/acorex-components-wysiwyg.mjs +5 -0
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/menu/lib/menu-item/menu-item.component.d.ts +28 -27
- package/menu/lib/menu.component.d.ts +6 -0
- package/menu/lib/menu.module.d.ts +2 -1
- package/menu/lib/menu.service.d.ts +4 -0
- package/package.json +88 -81
- package/qrcode/README.md +3 -0
- package/qrcode/index.d.ts +3 -0
- package/qrcode/lib/qrcode.class.d.ts +3 -0
- package/qrcode/lib/qrcode.component.d.ts +58 -0
- package/qrcode/lib/qrcode.module.d.ts +8 -0
- package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +1 -0
@@ -1,3 +1,4 @@
|
|
1
|
+
import { AXButtonModule } from '@acorex/components/button';
|
1
2
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
2
3
|
import { AXLoadingModule } from '@acorex/components/loading';
|
3
4
|
import { AXPopoverModule } from '@acorex/components/popover';
|
@@ -12,16 +13,16 @@ const COMPONENT = [AXMenuItemComponent, AXMenuComponent];
|
|
12
13
|
const MODULES = [AXDecoratorModule, AXLoadingModule, AXTranslationModule, OverlayModule, AXPopoverModule];
|
13
14
|
export class AXMenuModule {
|
14
15
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
15
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, declarations: [AXMenuItemComponent, AXMenuComponent], imports: [CommonModule, AXDecoratorModule, AXLoadingModule, AXTranslationModule, OverlayModule, AXPopoverModule], exports: [AXMenuItemComponent, AXMenuComponent] }); }
|
16
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, imports: [CommonModule, MODULES] }); }
|
16
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, declarations: [AXMenuItemComponent, AXMenuComponent], imports: [CommonModule, AXDecoratorModule, AXLoadingModule, AXTranslationModule, OverlayModule, AXPopoverModule, AXButtonModule], exports: [AXMenuItemComponent, AXMenuComponent] }); }
|
17
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, imports: [CommonModule, MODULES, AXButtonModule] }); }
|
17
18
|
}
|
18
19
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuModule, decorators: [{
|
19
20
|
type: NgModule,
|
20
21
|
args: [{
|
21
22
|
declarations: [...COMPONENT],
|
22
|
-
imports: [CommonModule, ...MODULES],
|
23
|
+
imports: [CommonModule, ...MODULES, AXButtonModule],
|
23
24
|
exports: [...COMPONENT],
|
24
25
|
providers: [],
|
25
26
|
}]
|
26
27
|
}] });
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvbWVudS9zcmMvbGliL21lbnUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNsRSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDN0QsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQzdELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQy9ELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUN0RSxPQUFPLEVBQUUsZUFBZSx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VyTW9kdWxlIH0gZnJvbSAnQGFjb3JleC9jb21wb25lbnRzL3BvcG92ZXInO1xuaW1wb3J0IHsgQVhUcmFuc2xhdGlvbk1vZHVsZSB9IGZyb20gJ0BhY29yZXgvY29yZS90cmFuc2xhdGlvbic7XG5pbXBvcnQgeyBPdmVybGF5TW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY2RrL292ZXJsYXknO1xuaW1wb3J0IHsgQ29tbW9uTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uJztcbmltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBBWE1lbnVJdGVtQ29tcG9uZW50IH0gZnJvbSAnLi9tZW51LWl0ZW0vbWVudS1pdGVtLmNvbXBvbmVudCc7XG5pbXBvcnQgeyBBWE1lbnVDb21wb25lbnQgfSBmcm9tICcuL21lbnUuY29tcG9uZW50JztcblxuY29uc3QgQ09NUE9ORU5UID0gW0FYTWVudUl0ZW1Db21wb25lbnQsIEFYTWVudUNvbXBvbmVudF07XG5jb25zdCBNT0RVTEVTID0gW0FYRGVjb3JhdG9yTW9kdWxlLCBBWExvYWRpbmdNb2R1bGUsIEFYVHJhbnNsYXRpb25Nb2R1bGUsIE92ZXJsYXlNb2R1bGUsIEFYUG9wb3Zlck1vZHVsZV07XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogWy4uLkNPTVBPTkVOVF0sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGUsIC4uLk1PRFVMRVMsIEFYQnV0dG9uTW9kdWxlXSxcbiAgZXhwb3J0czogWy4uLkNPTVBPTkVOVF0sXG4gIHByb3ZpZGVyczogW10sXG59KVxuZXhwb3J0IGNsYXNzIEFYTWVudU1vZHVsZSB7fVxuIl19
|
@@ -1,9 +1,13 @@
|
|
1
|
-
import { Injectable } from '@angular/core';
|
1
|
+
import { Injectable, signal } from '@angular/core';
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export class AXMenuService {
|
5
5
|
constructor() {
|
6
6
|
this.activeMenus$ = new BehaviorSubject([]);
|
7
|
+
this.rightOverflow = signal(0);
|
8
|
+
this.leftOverflow = signal(0);
|
9
|
+
this.overflowElements = signal([]);
|
10
|
+
this.notOverflowElements = signal([]);
|
7
11
|
}
|
8
12
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
9
13
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXMenuService, providedIn: 'root' }); }
|
@@ -14,4 +18,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
14
18
|
providedIn: 'root',
|
15
19
|
}]
|
16
20
|
}] });
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVudS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL21lbnUvc3JjL2xpYi9tZW51LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLE1BQU0sQ0FBQzs7QUFNdkMsTUFBTSxPQUFPLGFBQWE7SUFIMUI7UUFJRSxpQkFBWSxHQUEyQyxJQUFJLGVBQWUsQ0FBd0IsRUFBRSxDQUFDLENBQUM7UUFFdEcsa0JBQWEsR0FBRyxNQUFNLENBQVMsQ0FBQyxDQ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
|
2
|
+
* Generated bundle index. Do not edit.
|
3
|
+
*/
|
4
|
+
export * from './index';
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvbXBvbmVudHMtcXJjb2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3FyY29kZS9zcmMvYWNvcmV4LWNvbXBvbmVudHMtcXJjb2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export * from './lib/qrcode.class';
|
2
|
+
export * from './lib/qrcode.component';
|
3
|
+
export * from './lib/qrcode.module';
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvcXJjb2RlL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxxQkFBcUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL3FyY29kZS5jbGFzcyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9xcmNvZGUuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3FyY29kZS5tb2R1bGUnO1xuIl19
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export function debounce(func, delay) {
|
2
|
+
let timeoutId;
|
3
|
+
return function (...args) {
|
4
|
+
if (timeoutId) {
|
5
|
+
clearTimeout(timeoutId);
|
6
|
+
}
|
7
|
+
timeoutId = setTimeout(() => {
|
8
|
+
func(...args);
|
9
|
+
}, delay);
|
10
|
+
};
|
11
|
+
}
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXJjb2RlLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3FyY29kZS9zcmMvbGliL3FyY29kZS5jbGFzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxNQUFNLFVBQVUsUUFBUSxDQUFDLElBQUksRUFBRSxLQUFLO0lBQ2xDLElBQUksU0FBUyxDQUFDO0lBRWQsT0FBTyxVQUFVLEdBQUcsSUFBSTtRQUN0QixJQUFJLFNBQVMsRUFBRSxDQUFDO1lBQ2QsWUFBWSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQzFCLENBQUM7UUFDRCxTQUFTLEdBQUcsVUFBVSxDQUFDLEdBQUcsRUFBRTtZQUMxQixJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsQ0FBQztRQUNoQixDQUFDLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFDWixDQUFDLENBQUM7QUFDSixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgQVhRcmNvZGVPdXRwdXRUeXBlID0gJ2NhbnZhcycgfCAnc3ZnJyB8ICd1cmwnO1xuZXhwb3J0IHR5cGUgQVhRcmNvZGVMZXZlbCA9ICdMJyB8ICdNJyB8ICdRJyB8ICdIJztcblxuZXhwb3J0IGZ1bmN0aW9uIGRlYm91bmNlKGZ1bmMsIGRlbGF5KSB7XG4gIGxldCB0aW1lb3V0SWQ7XG5cbiAgcmV0dXJuIGZ1bmN0aW9uICguLi5hcmdzKSB7XG4gICAgaWYgKHRpbWVvdXRJZCkge1xuICAgICAgY2xlYXJUaW1lb3V0KHRpbWVvdXRJZCk7XG4gICAgfVxuICAgIHRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgZnVuYyguLi5hcmdzKTtcbiAgICB9LCBkZWxheSk7XG4gIH07XG59XG4iXX0=
|
@@ -0,0 +1,108 @@
|
|
1
|
+
import { generateQRCode } from '@acorex/cdk/qrcode';
|
2
|
+
import { AXValuableComponent } from '@acorex/components/common';
|
3
|
+
import { ChangeDetectionStrategy, Component, computed, effect, forwardRef, input, signal, viewChild, ViewEncapsulation, } from '@angular/core';
|
4
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export class AXQrcodeComponent {
|
7
|
+
constructor() {
|
8
|
+
/**
|
9
|
+
* @description Value of QR code
|
10
|
+
*/
|
11
|
+
this.content = input.required();
|
12
|
+
/**
|
13
|
+
* @description Size of the QR code
|
14
|
+
* @default 256
|
15
|
+
*/
|
16
|
+
this.size = input(256);
|
17
|
+
/**
|
18
|
+
* @description Error correction level can be 'L' | 'M' | 'Q' | 'H'
|
19
|
+
* @default 'M'
|
20
|
+
*/
|
21
|
+
this.level = input('M');
|
22
|
+
/**
|
23
|
+
* @description QR code color, can be a hex code or CSS color name
|
24
|
+
* @default '#000000'
|
25
|
+
*/
|
26
|
+
this.color = input('#000000');
|
27
|
+
/**
|
28
|
+
* @description QR code Background color, can be a hex code or CSS color name
|
29
|
+
* @default '#FFFFFF'
|
30
|
+
*/
|
31
|
+
this.backgroundColor = input('#FFFFFF');
|
32
|
+
/**
|
33
|
+
* @description Type of output can be 'canvas' | 'svg' | 'url'
|
34
|
+
* @default 'canvas'
|
35
|
+
*/
|
36
|
+
this.outputType = input('canvas'); //
|
37
|
+
/**
|
38
|
+
* @ignore
|
39
|
+
*/
|
40
|
+
/**
|
41
|
+
* @description // Holds base64 or URL if outputType is 'url' or 'base64'
|
42
|
+
*/
|
43
|
+
this.qrCodeUrl = signal(undefined);
|
44
|
+
/**
|
45
|
+
* @ignore
|
46
|
+
*/
|
47
|
+
this.canvas = viewChild('canvas');
|
48
|
+
/**
|
49
|
+
* @ignore
|
50
|
+
*/
|
51
|
+
this.svg = viewChild('svg');
|
52
|
+
/**
|
53
|
+
* @ignore
|
54
|
+
*/
|
55
|
+
this.calculateLogoSize = computed(() => {
|
56
|
+
switch (this.level()) {
|
57
|
+
case 'L':
|
58
|
+
return Math.sqrt((5 / 100) * (this.size() * this.size()));
|
59
|
+
case 'M':
|
60
|
+
return Math.sqrt((8 / 100) * (this.size() * this.size()));
|
61
|
+
case 'Q':
|
62
|
+
return Math.sqrt((11 / 100) * (this.size() * this.size()));
|
63
|
+
case 'H':
|
64
|
+
return Math.sqrt((14 / 100) * (this.size() * this.size()));
|
65
|
+
}
|
66
|
+
});
|
67
|
+
effect(() => {
|
68
|
+
this.generate();
|
69
|
+
}, {
|
70
|
+
allowSignalWrites: true,
|
71
|
+
});
|
72
|
+
}
|
73
|
+
ngAfterViewInit() {
|
74
|
+
this.generate();
|
75
|
+
}
|
76
|
+
generate() {
|
77
|
+
generateQRCode(this.content(), this.size(), this.level(), this.color(), this.backgroundColor(), this.outputType(), this.canvas()?.nativeElement, this.svg()?.nativeElement)
|
78
|
+
.then((result) => {
|
79
|
+
if (this.outputType() === 'url') {
|
80
|
+
this.qrCodeUrl.set(result);
|
81
|
+
}
|
82
|
+
})
|
83
|
+
.catch((error) => {
|
84
|
+
console.error(error);
|
85
|
+
});
|
86
|
+
}
|
87
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXQrcodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
88
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: AXQrcodeComponent, selector: "ax-qrcode", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, backgroundColor: { classPropertyName: "backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, outputType: { classPropertyName: "outputType", publicName: "outputType", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
89
|
+
{ provide: AXValuableComponent, useExisting: AXQrcodeComponent },
|
90
|
+
{
|
91
|
+
provide: NG_VALUE_ACCESSOR,
|
92
|
+
useExisting: forwardRef(() => AXQrcodeComponent),
|
93
|
+
multi: true,
|
94
|
+
},
|
95
|
+
], viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }, { propertyName: "svg", first: true, predicate: ["svg"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"qrcode\">\n @if (outputType() === 'canvas') {\n <canvas #canvas></canvas>\n } @else if (outputType() === 'svg') {\n <div #svg></div>\n } @else {\n <img [src]=\"qrCodeUrl()\" alt=\"QR Code\" />\n }\n <div class=\"logo-container\" [style.width.px]=\"calculateLogoSize()\" [style.height.px]=\"calculateLogoSize()\">\n <ng-content select=\"img\"></ng-content>\n </div>\n</div>\n", styles: [".qrcode{position:relative}.qrcode .logo-container{position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:50%;transform:translate(-50%,-50%)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
96
|
+
}
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXQrcodeComponent, decorators: [{
|
98
|
+
type: Component,
|
99
|
+
args: [{ selector: 'ax-qrcode', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
100
|
+
{ provide: AXValuableComponent, useExisting: AXQrcodeComponent },
|
101
|
+
{
|
102
|
+
provide: NG_VALUE_ACCESSOR,
|
103
|
+
useExisting: forwardRef(() => AXQrcodeComponent),
|
104
|
+
multi: true,
|
105
|
+
},
|
106
|
+
], template: "<div class=\"qrcode\">\n @if (outputType() === 'canvas') {\n <canvas #canvas></canvas>\n } @else if (outputType() === 'svg') {\n <div #svg></div>\n } @else {\n <img [src]=\"qrCodeUrl()\" alt=\"QR Code\" />\n }\n <div class=\"logo-container\" [style.width.px]=\"calculateLogoSize()\" [style.height.px]=\"calculateLogoSize()\">\n <ng-content select=\"img\"></ng-content>\n </div>\n</div>\n", styles: [".qrcode{position:relative}.qrcode .logo-container{position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:50%;transform:translate(-50%,-50%)}\n"] }]
|
107
|
+
}], ctorParameters: () => [] });
|
108
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXJjb2RlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9xcmNvZGUvc3JjL2xpYi9xcmNvZGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3FyY29kZS9zcmMvbGliL3FyY29kZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDcEQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDaEUsT0FBTyxFQUVMLHVCQUF1QixFQUN2QixTQUFTLEVBQ1QsUUFBUSxFQUNSLE1BQU0sRUFFTixVQUFVLEVBQ1YsS0F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kgPT09ICd1cmwnKSB7XG4gICAgICAgICAgdGhpcy5xckNvZGVVcmwuc2V0KHJlc3VsdCBhcyBzdHJpbmcpO1xuICAgICAgICB9XG4gICAgICB9KVxuICAgICAgLmNhdGNoKChlcnJvcikgPT4ge1xuICAgICAgICBjb25zb2xlLmVycm9yKGVycm9yKTtcbiAgICAgIH0pO1xuICB9XG59XG4iLCI8ZGl2IGNsYXNzPVwicXJjb2RlXCI+XG4gIEBpZiAob3V0cHV0VHlwZSgpID09PSAnY2FudmFzJykge1xuICAgIDxjYW52YXMgI2NhbnZhcz48L2NhbnZhcz5cbiAgfSBAZWxzZSBpZiAob3V0cHV0VHlwZSgpID09PSAnc3ZnJykge1xuICAgIDxkaXYgI3N2Zz48L2Rpdj5cbiAgfSBAZWxzZSB7XG4gICAgPGltZyBbc3JjXT1cInFyQ29kZVVybCgpXCIgYWx0PVwiUVIgQ29kZVwiIC8+XG4gIH1cbiAgPGRpdiBjbGFzcz1cImxvZ28tY29udGFpbmVyXCIgW3N0eWxlLndpZHRoLnB4XT1cImNhbGN1bGF0ZUxvZ29TaXplKClcIiBbc3R5bGUuaGVpZ2h0LnB4XT1cImNhbGN1bGF0ZUxvZ29TaXplKClcIj5cbiAgICA8bmctY29udGVudCBzZWxlY3Q9XCJpbWdcIj48L25nLWNvbnRlbnQ+XG4gIDwvZGl2PlxuPC9kaXY+XG4iXX0=
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
2
|
+
import { NgModule } from '@angular/core';
|
3
|
+
import { AXQrcodeComponent } from './qrcode.component';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export class QrcodeModule {
|
6
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: QrcodeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
7
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: QrcodeModule, declarations: [AXQrcodeComponent], imports: [CommonModule], exports: [AXQrcodeComponent] }); }
|
8
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: QrcodeModule, imports: [CommonModule] }); }
|
9
|
+
}
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: QrcodeModule, decorators: [{
|
11
|
+
type: NgModule,
|
12
|
+
args: [{
|
13
|
+
declarations: [AXQrcodeComponent],
|
14
|
+
imports: [CommonModule],
|
15
|
+
exports: [AXQrcodeComponent],
|
16
|
+
}]
|
17
|
+
}] });
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXJjb2RlLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9xcmNvZGUvc3JjL2xpYi9xcmNvZGUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG9CQUFvQixDQUFDOztBQU92RCxNQUFNLE9BQU8sWUFBWTs4R0FBWixZQUFZOytHQUFaLFlBQVksaUJBSlIsaUJBQWlCLGFBQ3RCLFlBQVksYUFDWixpQkFBaUI7K0dBRWhCLFlBQVksWUFIYixZQUFZOzsyRkFHWCxZQUFZO2tCQUx4QixRQUFRO21CQUFDO29CQUNSLFlBQVksRUFBRSxDQUFDLGlCQUFpQixDQUFDO29CQUNqQyxPQUFPLEVBQUUsQ0FBQyxZQUFZLENBQUM7b0JBQ3ZCLE9BQU8sRUFBRSxDQUFDLGlCQUFpQixDQUFDO2lCQUM3QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5pbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgQVhRcmNvZGVDb21wb25lbnQgfSBmcm9tICcuL3FyY29kZS5jb21wb25lbnQnO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtBWFFyY29kZUNvbXBvbmVudF0sXG4gIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxuICBleHBvcnRzOiBbQVhRcmNvZGVDb21wb25lbnRdLFxufSlcbmV4cG9ydCBjbGFzcyBRcmNvZGVNb2R1bGUge31cbiJdfQ==
|
@@ -28,12 +28,16 @@ export class AXWysiwygContainerComponent extends classes((MXInputBaseValueCompon
|
|
28
28
|
this.zone.runOutsideAngular(() => {
|
29
29
|
this.wysiwyg.set(new AXWysiwyg(this.view(), {
|
30
30
|
placeholder: 'Write Your Message ...',
|
31
|
+
readOnly: true,
|
31
32
|
}));
|
32
33
|
this.wysiwyg().wysiwygObj.on('text-change', this.changeHandler.bind(this));
|
33
34
|
});
|
34
35
|
this.service.wysiwyg.set(this.wysiwyg());
|
35
36
|
if (this.initialValue())
|
36
37
|
this.wysiwyg().wysiwygObj.root.innerHTML = this.initialValue();
|
38
|
+
this.setTimeOut = setTimeout(() => {
|
39
|
+
this.wysiwyg().wysiwygObj.enable();
|
40
|
+
}, 1000);
|
37
41
|
});
|
38
42
|
effect(() => {
|
39
43
|
if (this.value) {
|
@@ -64,6 +68,7 @@ export class AXWysiwygContainerComponent extends classes((MXInputBaseValueCompon
|
|
64
68
|
/** @ignore */
|
65
69
|
ngOnDestroy() {
|
66
70
|
this.wysiwyg().wysiwygObj.off('text-change', this.changeHandler);
|
71
|
+
clearTimeout(this.setTimeOut);
|
67
72
|
}
|
68
73
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
69
74
|
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: [
|
@@ -92,4 +97,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
92
97
|
},
|
93
98
|
], template: "<div class=\"ax-editor-container ax-look-{{ look }}\">\n <ng-content></ng-content>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n", styles: [".ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container:not(.ql-disabled) li[data-list=checked]>.ql-ui,.ql-container:not(.ql-disabled) li[data-list=unchecked]>.ql-ui{cursor:pointer}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}@supports (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-set:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor table{border-collapse:collapse}.ql-editor td{border:1px solid #000;padding:2px 5px}.ql-editor ol{padding-left:1.5em}.ql-editor li{list-style-type:none;padding-left:1.5em;position:relative}.ql-editor li>.ql-ui:before{display:inline-block;margin-left:-1.5em;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li[data-list=checked]>.ql-ui,.ql-editor li[data-list=unchecked]>.ql-ui{color:#777}.ql-editor li[data-list=bullet]>.ql-ui:before{content:\"\\2022\"}.ql-editor li[data-list=checked]>.ql-ui:before{content:\"\\2611\"}.ql-editor li[data-list=unchecked]>.ql-ui:before{content:\"\\2610\"}@supports (counter-set:none){.ql-editor li[data-list]{counter-set:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list]{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered]{counter-increment:list-0}.ql-editor li[data-list=ordered]>.ql-ui:before{content:counter(list-0,decimal) \". \"}.ql-editor li[data-list=ordered].ql-indent-1{counter-increment:list-1}.ql-editor li[data-list=ordered].ql-indent-1>.ql-ui:before{content:counter(list-1,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-set:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-2{counter-increment:list-2}.ql-editor li[data-list=ordered].ql-indent-2>.ql-ui:before{content:counter(list-2,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-set:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-3{counter-increment:list-3}.ql-editor li[data-list=ordered].ql-indent-3>.ql-ui:before{content:counter(list-3,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-set:list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-4{counter-increment:list-4}.ql-editor li[data-list=ordered].ql-indent-4>.ql-ui:before{content:counter(list-4,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-set:list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-5{counter-increment:list-5}.ql-editor li[data-list=ordered].ql-indent-5>.ql-ui:before{content:counter(list-5,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-set:list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-6{counter-increment:list-6}.ql-editor li[data-list=ordered].ql-indent-6>.ql-ui:before{content:counter(list-6,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-set:list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-reset:list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-7{counter-increment:list-7}.ql-editor li[data-list=ordered].ql-indent-7>.ql-ui:before{content:counter(list-7,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-set:list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-reset:list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-8{counter-increment:list-8}.ql-editor li[data-list=ordered].ql-indent-8>.ql-ui:before{content:counter(list-8,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-set:list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-reset:list-9}}.ql-editor li[data-list=ordered].ql-indent-9{counter-increment:list-9}.ql-editor li[data-list=ordered].ql-indent-9>.ql-ui:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor li.ql-direction-rtl{padding-right:1.5em}.ql-editor li.ql-direction-rtl>.ql-ui:before{margin-left:.3em;margin-right:-1.5em;text-align:left}.ql-editor table{table-layout:fixed;width:100%}.ql-editor table td{outline:none}.ql-editor .ql-code-block-container{font-family:monospace}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor .ql-ui{position:absolute}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}ax-wysiwyg-container{width:100%;display:block}ax-wysiwyg-container>.ax-editor-container{display:block;height:auto!important}\n/*! Bundled license information:\n\nquill/dist/quill.core.css:\n (*!\n * Quill Editor v2.0.2\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n *)\n*/\n"] }]
|
94
99
|
}], ctorParameters: () => [] });
|
95
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3lzaXd5Zy1jb250YWluZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3d5c2l3eWcvc3JjL2xpYi93eXNpd3lnL3d5c2l3eWctY29udGFpb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CI+PC9kaXY+XG4iXX0=
|
@@ -61,7 +61,7 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
61
61
|
this.showBackdrop = input(true);
|
62
62
|
this.mode = model('overlay');
|
63
63
|
this.collapsed = model(true);
|
64
|
-
this.
|
64
|
+
this.closeOthers = input(false);
|
65
65
|
this.backdropElement = signal(null);
|
66
66
|
this.loaded = signal(false);
|
67
67
|
this.service = inject(AXDrawerService);
|
@@ -101,7 +101,7 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
101
101
|
* Toggles the collapsed state of the drawer.
|
102
102
|
*/
|
103
103
|
toggle() {
|
104
|
-
if (!this.
|
104
|
+
if (!this.closeOthers()) {
|
105
105
|
this.service.drawerElements().forEach((element) => {
|
106
106
|
if (element.location() === this.location() && element.id !== this.id) {
|
107
107
|
element.close();
|
@@ -122,7 +122,7 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
122
122
|
* Expands the drawer.
|
123
123
|
*/
|
124
124
|
open() {
|
125
|
-
if (!this.
|
125
|
+
if (!this.closeOthers()) {
|
126
126
|
this.service.drawerElements().forEach((element) => {
|
127
127
|
if (element.location() === this.location() && element.id !== this.id) {
|
128
128
|
element.close();
|
@@ -169,7 +169,7 @@ class AXDrawerComponent extends MXBaseComponent {
|
|
169
169
|
}
|
170
170
|
}
|
171
171
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXDrawerComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
172
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXDrawerComponent, selector: "ax-drawer", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null },
|
172
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXDrawerComponent, selector: "ax-drawer", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, closeOthers: { classPropertyName: "closeOthers", publicName: "closeOthers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { location: "locationChange", mode: "modeChange", collapsed: "collapsedChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
|
173
173
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
174
174
|
{ provide: AXClosbaleComponent, useExisting: AXDrawerComponent },
|
175
175
|
], usesInheritance: true, ngImport: i0, template: `
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer.service.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerService {\n drawerElements = signal<AXDrawerComponent[]>(null);\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\nimport { AXDrawerComponent } from '../drawer-item/drawer.component';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer[location='start']\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n <ng-content select=\"ax-drawer[location='end']\"> </ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n service = inject(AXDrawerService);\n\n constructor() {\n super();\n afterNextRender(() => {\n const host = this.getHostElement();\n const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map(\n (c) => c['__axContext__'] as AXDrawerComponent,\n );\n this.service.drawerElements.set(drawerClasses);\n });\n }\n}\n","import { AXClosbaleComponent, AXComponent, MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n effect,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n/**\n * A component that represents a drawer with header and content sections.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent implements AfterContentInit, DoCheck {\n location = model<AXDrawerLocation>('start');\n\n showBackdrop = input(true);\n\n mode = model<AXDrawerMode>('overlay');\n\n collapsed = model(true);\n\n multiple = input(false);\n\n private backdropElement = signal<HTMLElement>(null);\n\n private loaded = signal(false);\n\n service = inject(AXDrawerService);\n\n /**\n * @ignore\n */\n constructor(private _zone: NgZone) {\n super();\n effect(\n () => {\n if (this.mode() === 'overlay' && !this.collapsed() && this.showBackdrop()) {\n this._addBackdrop();\n }\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n setTimeout(() => {\n this.loaded.set(true);\n }, 5000);\n }\n\n /**\n * @ignore\n */\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n /**\n * @ignore\n */\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (!this.multiple()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n this.collapsed.update((prev) => !prev);\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this._removeBackdrop();\n this.collapsed.set(true);\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n if (!this.multiple()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n this.collapsed.set(false);\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${\n this.collapsed() ? 'ax-collapsed' : 'ax-expanded'\n } ${this.loaded() ? 'ax-state-loaded' : ''}`;\n }\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = document.createElement('div');\n backDropElem.classList.add('ax-backdrop');\n backDropElem.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement()?.parentElement?.appendChild(backDropElem);\n this.backdropElement.set(backDropElem);\n });\n }\n }\n\n /**\n * @ignore\n */\n private _removeBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n if (this.backdropElement()) {\n this.getHostElement()?.parentElement?.removeChild(this.backdropElement());\n this.backdropElement.set(null);\n }\n });\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer/drawer-container/drawer-container.component';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;AACpD,KAAA;8GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAAf,eAAe,EAAA,CAAA,CAAA,EAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;;;ACQX;;;AAGG;AAaG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAG7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AAHV,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAIhC,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;YACnC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA,SAAA,CAAW,CAAC,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,CAAA,CAAA,EAAA;+GAAd,cAAc,EAAA,YAAA,EAAA,CATR,iBAAiB,EAAE,0BAA0B,aAC/C,YAAY,CAAA,EAAA,OAAA,EAAA,CADV,iBAAiB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA,EAAA;AASnD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJZ,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,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;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../libs/components/drawer/src/lib/drawer.service.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../libs/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../libs/components/drawer/src/lib/drawer.module.ts","../../../../libs/components/drawer/src/acorex-components-drawer.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerService {\n drawerElements = signal<AXDrawerComponent[]>(null);\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\nimport { AXDrawerComponent } from '../drawer-item/drawer.component';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-container',\n template: `\n <ng-content select=\"ax-drawer[location='start']\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n <ng-content select=\"ax-drawer[location='end']\"> </ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n service = inject(AXDrawerService);\n\n constructor() {\n super();\n afterNextRender(() => {\n const host = this.getHostElement();\n const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map(\n (c) => c['__axContext__'] as AXDrawerComponent,\n );\n this.service.drawerElements.set(drawerClasses);\n });\n }\n}\n","import { AXClosbaleComponent, AXComponent, MXBaseComponent } from '@acorex/components/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n effect,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerService } from '../../drawer.service';\n\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end';\n\n/**\n * A component that represents a drawer with header and content sections.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-drawer',\n template: `\n <ng-content select=\"ax-header\"></ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosbaleComponent, useExisting: AXDrawerComponent },\n ],\n})\nexport class AXDrawerComponent extends MXBaseComponent implements AfterContentInit, DoCheck {\n location = model<AXDrawerLocation>('start');\n\n showBackdrop = input(true);\n\n mode = model<AXDrawerMode>('overlay');\n\n collapsed = model(true);\n\n closeOthers = input(false);\n\n private backdropElement = signal<HTMLElement>(null);\n\n private loaded = signal(false);\n\n service = inject(AXDrawerService);\n\n /**\n * @ignore\n */\n constructor(private _zone: NgZone) {\n super();\n effect(\n () => {\n if (this.mode() === 'overlay' && !this.collapsed() && this.showBackdrop()) {\n this._addBackdrop();\n }\n },\n { allowSignalWrites: true },\n );\n }\n\n /**\n * @ignore\n */\n ngAfterContentInit(): void {\n this._detectBoundingSize();\n setTimeout(() => {\n this.loaded.set(true);\n }, 5000);\n }\n\n /**\n * @ignore\n */\n ngDoCheck() {\n this._detectBoundingSize();\n }\n\n /**\n * @ignore\n */\n private _detectBoundingSize() {\n this._zone.runOutsideAngular(() => {\n const host = this.getHostElement();\n if (host.clientWidth) {\n host.style.setProperty('--ax-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n this.collapsed.update((prev) => !prev);\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this._removeBackdrop();\n this.collapsed.set(true);\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n if (!this.closeOthers()) {\n this.service.drawerElements().forEach((element) => {\n if (element.location() === this.location() && element.id !== this.id) {\n element.close();\n }\n });\n }\n this.collapsed.set(false);\n }\n\n /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${\n this.collapsed() ? 'ax-collapsed' : 'ax-expanded'\n } ${this.loaded() ? 'ax-state-loaded' : ''}`;\n }\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = document.createElement('div');\n backDropElem.classList.add('ax-backdrop');\n backDropElem.onclick = () => {\n this._zone.run(() => {\n this.close();\n });\n };\n this.getHostElement()?.parentElement?.appendChild(backDropElem);\n this.backdropElement.set(backDropElem);\n });\n }\n }\n\n /**\n * @ignore\n */\n private _removeBackdrop() {\n if (isBrowser()) {\n this._zone.runOutsideAngular(() => {\n if (this.backdropElement()) {\n this.getHostElement()?.parentElement?.removeChild(this.backdropElement());\n this.backdropElement.set(null);\n }\n });\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXDrawerContainerComponent } from './drawer/drawer-container/drawer-container.component';\nimport { AXDrawerComponent } from './drawer/drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;AACpD,KAAA;8GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAAf,eAAe,EAAA,CAAA,CAAA,EAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;;;ACQX;;;AAGG;AAaG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAG7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;AAHV,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAIhC,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;YACnC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA,SAAA,CAAW,CAAC,CAAC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AAA,EAAA;+GAAd,cAAc,EAAA,YAAA,EAAA,CATR,iBAAiB,EAAE,0BAA0B,aAC/C,YAAY,CAAA,EAAA,OAAA,EAAA,CADV,iBAAiB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA,EAAA;AASnD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJZ,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,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;AACd,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
@@ -51,7 +51,9 @@ class AXMediaViewerSliderComponent {
|
|
51
51
|
/** @ignore */
|
52
52
|
this.registryService = inject(AXMediaViewerTypeRegistryService);
|
53
53
|
effect(() => {
|
54
|
-
|
54
|
+
if (this.dataObject()) {
|
55
|
+
this.portal.set(new ComponentPortal(this.registryService.resolve(this.dataObject().type).component));
|
56
|
+
}
|
55
57
|
}, { allowSignalWrites: true });
|
56
58
|
}
|
57
59
|
/** @ignore */
|