@acorex/cdk 19.11.13-next.2 → 19.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/drawer/lib/drawer-container.directive.d.ts +3 -1
- package/drawer/lib/drawer-item.directive.d.ts +3 -1
- package/fesm2022/acorex-cdk-drawer.mjs +22 -3
- package/fesm2022/acorex-cdk-drawer.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +43 -0
- package/fesm2022/acorex-cdk-overlay.mjs.map +1 -0
- package/fesm2022/acorex-cdk-wysiwyg.mjs +6 -0
- package/fesm2022/acorex-cdk-wysiwyg.mjs.map +1 -1
- package/overlay/README.md +3 -0
- package/overlay/index.d.ts +2 -0
- package/overlay/lib/overlay.service.d.ts +9 -0
- package/overlay/lib/overlay.types.d.ts +15 -0
- package/package.json +5 -1
- package/wysiwyg/wysiwyg.class.d.ts +2 -0
|
@@ -3,6 +3,8 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export declare class AXDrawerContainerDirective {
|
|
4
4
|
#private;
|
|
5
5
|
el: ElementRef<any>;
|
|
6
|
+
onBackdropClicked: import("@angular/core").OutputEmitterRef<void>;
|
|
7
|
+
onDrawerClosed: import("@angular/core").OutputEmitterRef<void>;
|
|
6
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDrawerContainerDirective, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AXDrawerContainerDirective, "[axDrawerContainer]", ["axDrawerContainer"], {}, {}, never, never, true, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AXDrawerContainerDirective, "[axDrawerContainer]", ["axDrawerContainer"], {}, { "onBackdropClicked": "onBackdropClicked"; "onDrawerClosed": "onDrawerClosed"; }, never, never, true, never>;
|
|
8
10
|
}
|
|
@@ -6,6 +6,7 @@ export declare class AXDrawerItemDirective {
|
|
|
6
6
|
backDrop: import("@angular/core").InputSignal<boolean>;
|
|
7
7
|
mode: import("@angular/core").InputSignal<"push" | "overlay">;
|
|
8
8
|
transition: import("@angular/core").InputSignal<string>;
|
|
9
|
+
closeOnBackdropClick: import("@angular/core").InputSignal<boolean>;
|
|
9
10
|
backdropColor: import("@angular/core").InputSignal<string>;
|
|
10
11
|
private el;
|
|
11
12
|
private htmlElem;
|
|
@@ -15,6 +16,7 @@ export declare class AXDrawerItemDirective {
|
|
|
15
16
|
show(): void;
|
|
16
17
|
hide(): void;
|
|
17
18
|
toggle(): void;
|
|
19
|
+
private addBackdropClickListener;
|
|
18
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDrawerItemDirective, never>;
|
|
19
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AXDrawerItemDirective, "[axDrawerItem]", ["axDrawerItem"], { "drawerLocation": { "alias": "drawerLocation"; "required": false; "isSignal": true; }; "initialState": { "alias": "initialState"; "required": false; "isSignal": true; }; "backDrop": { "alias": "backDrop"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "transition": { "alias": "transition"; "required": false; "isSignal": true; }; "backdropColor": { "alias": "backdropColor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AXDrawerItemDirective, "[axDrawerItem]", ["axDrawerItem"], { "drawerLocation": { "alias": "drawerLocation"; "required": false; "isSignal": true; }; "initialState": { "alias": "initialState"; "required": false; "isSignal": true; }; "backDrop": { "alias": "backDrop"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "transition": { "alias": "transition"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "backdropColor": { "alias": "backdropColor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
20
22
|
}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, afterNextRender, Directive, input, signal, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, output, afterNextRender, Directive, input, signal, NgModule } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class AXDrawerContainerDirective {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.el = inject(ElementRef);
|
|
7
|
+
this.onBackdropClicked = output();
|
|
8
|
+
this.onDrawerClosed = output();
|
|
7
9
|
this.#init = afterNextRender(() => {
|
|
8
10
|
const htmlElem = this.el.nativeElement;
|
|
9
11
|
htmlElem.style.position = 'relative';
|
|
10
12
|
htmlElem.style.overflow = 'hidden';
|
|
11
13
|
htmlElem.style.display = 'flex';
|
|
14
|
+
htmlElem.style.touchAction = 'none';
|
|
12
15
|
});
|
|
13
16
|
}
|
|
14
17
|
#init;
|
|
15
18
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXDrawerContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
16
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: AXDrawerContainerDirective, isStandalone: true, selector: "[axDrawerContainer]", exportAs: ["axDrawerContainer"], ngImport: i0 }); }
|
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: AXDrawerContainerDirective, isStandalone: true, selector: "[axDrawerContainer]", outputs: { onBackdropClicked: "onBackdropClicked", onDrawerClosed: "onDrawerClosed" }, exportAs: ["axDrawerContainer"], ngImport: i0 }); }
|
|
17
20
|
}
|
|
18
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXDrawerContainerDirective, decorators: [{
|
|
19
22
|
type: Directive,
|
|
@@ -30,6 +33,7 @@ class AXDrawerItemDirective {
|
|
|
30
33
|
this.backDrop = input(true);
|
|
31
34
|
this.mode = input('overlay');
|
|
32
35
|
this.transition = input('0.5');
|
|
36
|
+
this.closeOnBackdropClick = input(false);
|
|
33
37
|
this.backdropColor = input('rgba(0,0,0,0.5)');
|
|
34
38
|
this.el = inject(ElementRef);
|
|
35
39
|
this.htmlElem = signal(null);
|
|
@@ -40,6 +44,9 @@ class AXDrawerItemDirective {
|
|
|
40
44
|
this.htmlElem.set(this.el.nativeElement);
|
|
41
45
|
this.htmlElem().style.transition = `${this.transition()}s all ease`;
|
|
42
46
|
this.parent.el.nativeElement.style.transition = `${this.transition()}s all ease`;
|
|
47
|
+
if (this.backDrop()) {
|
|
48
|
+
this.addBackdropClickListener();
|
|
49
|
+
}
|
|
43
50
|
if (this.mode() === 'push') {
|
|
44
51
|
switch (this.drawerLocation()) {
|
|
45
52
|
case 'right':
|
|
@@ -137,6 +144,7 @@ class AXDrawerItemDirective {
|
|
|
137
144
|
this.parent.el.nativeElement.style.backgroundColor = 'transparent';
|
|
138
145
|
}
|
|
139
146
|
this.showState.set(false);
|
|
147
|
+
this.parent.onDrawerClosed.emit();
|
|
140
148
|
}
|
|
141
149
|
toggle() {
|
|
142
150
|
if (this.showState()) {
|
|
@@ -146,8 +154,19 @@ class AXDrawerItemDirective {
|
|
|
146
154
|
this.show();
|
|
147
155
|
}
|
|
148
156
|
}
|
|
157
|
+
addBackdropClickListener() {
|
|
158
|
+
const backdropElement = this.parent.el.nativeElement;
|
|
159
|
+
backdropElement.addEventListener('pointerdown', (event) => {
|
|
160
|
+
if (!this.htmlElem().contains(event.target) && this.showState()) {
|
|
161
|
+
this.parent.onBackdropClicked.emit();
|
|
162
|
+
if (this.closeOnBackdropClick()) {
|
|
163
|
+
this.hide();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
149
168
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXDrawerItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
150
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.5", type: AXDrawerItemDirective, isStandalone: true, selector: "[axDrawerItem]", inputs: { drawerLocation: { classPropertyName: "drawerLocation", publicName: "drawerLocation", isSignal: true, isRequired: false, transformFunction: null }, initialState: { classPropertyName: "initialState", publicName: "initialState", isSignal: true, isRequired: false, transformFunction: null }, backDrop: { classPropertyName: "backDrop", publicName: "backDrop", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null }, backdropColor: { classPropertyName: "backdropColor", publicName: "backdropColor", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["axDrawerItem"], ngImport: i0 }); }
|
|
169
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.5", type: AXDrawerItemDirective, isStandalone: true, selector: "[axDrawerItem]", inputs: { drawerLocation: { classPropertyName: "drawerLocation", publicName: "drawerLocation", isSignal: true, isRequired: false, transformFunction: null }, initialState: { classPropertyName: "initialState", publicName: "initialState", isSignal: true, isRequired: false, transformFunction: null }, backDrop: { classPropertyName: "backDrop", publicName: "backDrop", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, backdropColor: { classPropertyName: "backdropColor", publicName: "backdropColor", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["axDrawerItem"], ngImport: i0 }); }
|
|
151
170
|
}
|
|
152
171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXDrawerItemDirective, decorators: [{
|
|
153
172
|
type: Directive,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-cdk-drawer.mjs","sources":["../../../../libs/cdk/drawer/src/lib/drawer-container.directive.ts","../../../../libs/cdk/drawer/src/lib/drawer-item.directive.ts","../../../../libs/cdk/drawer/src/lib/drawer.module.ts","../../../../libs/cdk/drawer/src/acorex-cdk-drawer.ts"],"sourcesContent":["import { afterNextRender, Directive, ElementRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[axDrawerContainer]',\n exportAs: 'axDrawerContainer',\n})\nexport class AXDrawerContainerDirective {\n el = inject(ElementRef);\n\n #init = afterNextRender(() => {\n const htmlElem = this.el.nativeElement as HTMLElement;\n htmlElem.style.position = 'relative';\n htmlElem.style.overflow = 'hidden';\n htmlElem.style.display = 'flex';\n });\n}\n","import { afterNextRender, Directive, ElementRef, inject, input, signal } from '@angular/core';\nimport { AXDrawerContainerDirective } from './drawer-container.directive';\n\n@Directive({\n selector: '[axDrawerItem]',\n exportAs: 'axDrawerItem',\n})\nexport class AXDrawerItemDirective {\n drawerLocation = input<'left' | 'right' | 'top' | 'bottom'>('left');\n initialState = input<'show' | 'hide'>('hide');\n backDrop = input(true);\n mode = input<'push' | 'overlay'>('overlay');\n transition = input('0.5');\n backdropColor = input('rgba(0,0,0,0.5)');\n private el = inject(ElementRef);\n private htmlElem = signal<HTMLElement>(null);\n private rect = signal<DOMRect>(null);\n private showState = signal(null);\n private parent = inject(AXDrawerContainerDirective);\n\n #init = afterNextRender(() => {\n this.htmlElem.set(this.el.nativeElement as HTMLElement);\n this.htmlElem().style.transition = `${this.transition()}s all ease`;\n this.parent.el.nativeElement.style.transition = `${this.transition()}s all ease`;\n\n if (this.mode() === 'push') {\n switch (this.drawerLocation()) {\n case 'right':\n this.htmlElem().style.order = '999';\n this.parent.el.nativeElement.style.justifyContent = 'space-between';\n break;\n case 'left':\n this.htmlElem().style.order = '-999';\n break;\n case 'bottom':\n this.htmlElem().style.order = '999';\n this.parent.el.nativeElement.style.flexDirection = 'column';\n break;\n case 'top':\n this.htmlElem().style.order = '-999';\n this.parent.el.nativeElement.style.flexDirection = 'column';\n break;\n }\n }\n\n this.rect.set(this.htmlElem().getClientRects()[0]);\n\n if (this.mode() === 'overlay') {\n this.htmlElem().style.position = 'absolute';\n this.htmlElem().style.top = '0px';\n }\n\n if (this.initialState() === 'show') {\n this.show();\n }\n if (this.initialState() === 'hide') {\n this.hide();\n }\n });\n\n public show() {\n if (this.mode() === 'overlay') {\n if (this.drawerLocation() === 'left') {\n this.htmlElem().style.left = `0px`;\n }\n\n if (this.drawerLocation() === 'right') {\n this.htmlElem().style.right = `0px`;\n }\n\n if (this.drawerLocation() === 'top' || this.drawerLocation() === 'bottom') {\n this.htmlElem().style.top = `0px`;\n }\n }\n\n if (this.mode() === 'push') {\n if (this.drawerLocation() === 'left') {\n this.htmlElem().style.marginInlineStart = '0px';\n }\n\n if (this.drawerLocation() === 'right') {\n this.htmlElem().style.marginInlineEnd = '0px';\n }\n\n if (this.drawerLocation() === 'bottom') {\n this.htmlElem().style.marginBlockStart = '0px';\n }\n\n if (this.drawerLocation() === 'top') {\n this.htmlElem().style.marginBlockStart = '0px';\n }\n }\n\n if (this.backDrop()) {\n (this.parent.el.nativeElement as HTMLElement).style.backgroundColor = this.backdropColor();\n }\n\n this.showState.set(true);\n }\n\n public hide() {\n if (this.mode() === 'overlay') {\n if (this.drawerLocation() === 'left') {\n this.htmlElem().style.left = `-${this.rect().width}px`;\n }\n\n if (this.drawerLocation() === 'right') {\n this.htmlElem().style.right = `-${this.rect().width}px`;\n }\n\n if (this.drawerLocation() === 'top') {\n this.htmlElem().style.top = `-${this.rect().height}px`;\n }\n\n if (this.drawerLocation() === 'bottom') {\n this.htmlElem().style.top = `${this.rect().height}px`;\n }\n }\n\n if (this.mode() === 'push') {\n if (this.drawerLocation() === 'right') {\n this.htmlElem().style.marginInlineEnd = `-${this.rect().width}px`;\n }\n\n if (this.drawerLocation() === 'left') {\n this.htmlElem().style.marginInlineStart = `-${this.rect().width}px`;\n }\n\n if (this.drawerLocation() === 'bottom') {\n this.htmlElem().style.marginBlockStart = `${this.rect().height}px`;\n }\n\n if (this.drawerLocation() === 'top') {\n this.htmlElem().style.marginBlockStart = `-${this.rect().height}px`;\n }\n }\n\n if (this.backDrop()) {\n (this.parent.el.nativeElement as HTMLElement).style.backgroundColor = 'transparent';\n }\n\n this.showState.set(false);\n }\n\n public toggle() {\n if (this.showState()) {\n this.hide();\n } else {\n this.show();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AXDrawerContainerDirective } from './drawer-container.directive';\nimport { AXDrawerItemDirective } from './drawer-item.directive';\n\nconst COMPONENT = [AXDrawerContainerDirective, AXDrawerItemDirective];\n\nconst MODULES = [];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,0BAA0B,CAAA;AAJvC,IAAA,WAAA,GAAA;AAKE,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvB,QAAA,IAAA,CAAA,KAAK,GAAG,eAAe,CAAC,MAAK;AAC3B,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,aAA4B;AACrD,YAAA,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;AACpC,YAAA,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ;AAClC,YAAA,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM;AACjC,SAAC,CAAC;AACH;AANC,IAAA,KAAK;8GAHM,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,QAAA,EAAA,CAAA,mBA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,0BAA0B,EAAE,qBAAqB,CAAC;AAErE,MAAM,OAAO,GAAG,EAAE;MAOL,uBAAuB,CAAA;8GAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAvB,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,uBAAuB,YATjB,0BAA0B,EAAE,qBAAqB,CAAjD,EAAA,OAAA,EAAA,CAAA,0BAA0B,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;AASvD,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,uBAAuB,YAJrB,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-cdk-drawer.mjs","sources":["../../../../libs/cdk/drawer/src/lib/drawer-container.directive.ts","../../../../libs/cdk/drawer/src/lib/drawer-item.directive.ts","../../../../libs/cdk/drawer/src/lib/drawer.module.ts","../../../../libs/cdk/drawer/src/acorex-cdk-drawer.ts"],"sourcesContent":["import { afterNextRender, Directive, ElementRef, inject, output } from '@angular/core';\n\n@Directive({\n selector: '[axDrawerContainer]',\n exportAs: 'axDrawerContainer',\n})\nexport class AXDrawerContainerDirective {\n el = inject(ElementRef);\n\n onBackdropClicked = output();\n onDrawerClosed = output();\n\n #init = afterNextRender(() => {\n const htmlElem = this.el.nativeElement as HTMLElement;\n htmlElem.style.position = 'relative';\n htmlElem.style.overflow = 'hidden';\n htmlElem.style.display = 'flex';\n htmlElem.style.touchAction = 'none';\n });\n}\n","import { afterNextRender, Directive, ElementRef, inject, input, signal } from '@angular/core';\nimport { AXDrawerContainerDirective } from './drawer-container.directive';\n\n@Directive({\n selector: '[axDrawerItem]',\n exportAs: 'axDrawerItem',\n})\nexport class AXDrawerItemDirective {\n drawerLocation = input<'left' | 'right' | 'top' | 'bottom'>('left');\n initialState = input<'show' | 'hide'>('hide');\n backDrop = input(true);\n mode = input<'push' | 'overlay'>('overlay');\n transition = input('0.5');\n closeOnBackdropClick = input(false);\n backdropColor = input('rgba(0,0,0,0.5)');\n private el = inject(ElementRef);\n private htmlElem = signal<HTMLElement>(null);\n private rect = signal<DOMRect>(null);\n private showState = signal(null);\n private parent = inject(AXDrawerContainerDirective);\n\n #init = afterNextRender(() => {\n this.htmlElem.set(this.el.nativeElement as HTMLElement);\n this.htmlElem().style.transition = `${this.transition()}s all ease`;\n this.parent.el.nativeElement.style.transition = `${this.transition()}s all ease`;\n\n if (this.backDrop()) {\n this.addBackdropClickListener();\n }\n\n if (this.mode() === 'push') {\n switch (this.drawerLocation()) {\n case 'right':\n this.htmlElem().style.order = '999';\n this.parent.el.nativeElement.style.justifyContent = 'space-between';\n break;\n case 'left':\n this.htmlElem().style.order = '-999';\n break;\n case 'bottom':\n this.htmlElem().style.order = '999';\n this.parent.el.nativeElement.style.flexDirection = 'column';\n break;\n case 'top':\n this.htmlElem().style.order = '-999';\n this.parent.el.nativeElement.style.flexDirection = 'column';\n break;\n }\n }\n\n this.rect.set(this.htmlElem().getClientRects()[0]);\n\n if (this.mode() === 'overlay') {\n this.htmlElem().style.position = 'absolute';\n this.htmlElem().style.top = '0px';\n }\n\n if (this.initialState() === 'show') {\n this.show();\n }\n if (this.initialState() === 'hide') {\n this.hide();\n }\n });\n\n public show() {\n if (this.mode() === 'overlay') {\n if (this.drawerLocation() === 'left') {\n this.htmlElem().style.left = `0px`;\n }\n\n if (this.drawerLocation() === 'right') {\n this.htmlElem().style.right = `0px`;\n }\n\n if (this.drawerLocation() === 'top' || this.drawerLocation() === 'bottom') {\n this.htmlElem().style.top = `0px`;\n }\n }\n\n if (this.mode() === 'push') {\n if (this.drawerLocation() === 'left') {\n this.htmlElem().style.marginInlineStart = '0px';\n }\n\n if (this.drawerLocation() === 'right') {\n this.htmlElem().style.marginInlineEnd = '0px';\n }\n\n if (this.drawerLocation() === 'bottom') {\n this.htmlElem().style.marginBlockStart = '0px';\n }\n\n if (this.drawerLocation() === 'top') {\n this.htmlElem().style.marginBlockStart = '0px';\n }\n }\n\n if (this.backDrop()) {\n (this.parent.el.nativeElement as HTMLElement).style.backgroundColor = this.backdropColor();\n }\n\n this.showState.set(true);\n }\n\n public hide() {\n if (this.mode() === 'overlay') {\n if (this.drawerLocation() === 'left') {\n this.htmlElem().style.left = `-${this.rect().width}px`;\n }\n\n if (this.drawerLocation() === 'right') {\n this.htmlElem().style.right = `-${this.rect().width}px`;\n }\n\n if (this.drawerLocation() === 'top') {\n this.htmlElem().style.top = `-${this.rect().height}px`;\n }\n\n if (this.drawerLocation() === 'bottom') {\n this.htmlElem().style.top = `${this.rect().height}px`;\n }\n }\n\n if (this.mode() === 'push') {\n if (this.drawerLocation() === 'right') {\n this.htmlElem().style.marginInlineEnd = `-${this.rect().width}px`;\n }\n\n if (this.drawerLocation() === 'left') {\n this.htmlElem().style.marginInlineStart = `-${this.rect().width}px`;\n }\n\n if (this.drawerLocation() === 'bottom') {\n this.htmlElem().style.marginBlockStart = `${this.rect().height}px`;\n }\n\n if (this.drawerLocation() === 'top') {\n this.htmlElem().style.marginBlockStart = `-${this.rect().height}px`;\n }\n }\n\n if (this.backDrop()) {\n (this.parent.el.nativeElement as HTMLElement).style.backgroundColor = 'transparent';\n }\n\n this.showState.set(false);\n this.parent.onDrawerClosed.emit();\n }\n\n public toggle() {\n if (this.showState()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n private addBackdropClickListener() {\n const backdropElement = this.parent.el.nativeElement as HTMLElement;\n backdropElement.addEventListener('pointerdown', (event: MouseEvent) => {\n if (!this.htmlElem().contains(event.target as Node) && this.showState()) {\n this.parent.onBackdropClicked.emit();\n if (this.closeOnBackdropClick()) {\n this.hide();\n }\n }\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AXDrawerContainerDirective } from './drawer-container.directive';\nimport { AXDrawerItemDirective } from './drawer-item.directive';\n\nconst COMPONENT = [AXDrawerContainerDirective, AXDrawerItemDirective];\n\nconst MODULES = [];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerDirectiveModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,0BAA0B,CAAA;AAJvC,IAAA,WAAA,GAAA;AAKE,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;QAEvB,IAAiB,CAAA,iBAAA,GAAG,MAAM,EAAE;QAC5B,IAAc,CAAA,cAAA,GAAG,MAAM,EAAE;AAEzB,QAAA,IAAA,CAAA,KAAK,GAAG,eAAe,CAAC,MAAK;AAC3B,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,aAA4B;AACrD,YAAA,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU;AACpC,YAAA,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ;AAClC,YAAA,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM;AAC/B,YAAA,QAAQ,CAAC,KAAK,CAAC,WAAW,GAAG,MAAM;AACrC,SAAC,CAAC;AACH;AAPC,IAAA,KAAK;8GANM,0BAA0B,EAAA,IAA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A,CAAA,CAAA;AAAvB,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,uBAAuB,YATjB,0BAA0B,EAAE,qBAAqB,CAAjD,EAAA,OAAA,EAAA,CAAA,0BAA0B,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;AASvD,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,uBAAuB,YAJrB,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AXComponentService } from '@acorex/core/components';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, TemplateRef, Injectable } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
class AXOverlayService {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.componentService = inject(AXComponentService);
|
|
8
|
+
}
|
|
9
|
+
async create(content, options) {
|
|
10
|
+
if (content instanceof TemplateRef) {
|
|
11
|
+
const ref = await this.componentService.createFromTemplate(content);
|
|
12
|
+
return {
|
|
13
|
+
instance: ref,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const ref = await this.componentService.createFromComponent(content);
|
|
18
|
+
if (options?.inputs) {
|
|
19
|
+
Object.entries(options.inputs).forEach((c) => {
|
|
20
|
+
ref.setInput(c[0], c[1]);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
instance: ref,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXOverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
29
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXOverlayService, providedIn: 'root' }); }
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXOverlayService, decorators: [{
|
|
32
|
+
type: Injectable,
|
|
33
|
+
args: [{
|
|
34
|
+
providedIn: 'root',
|
|
35
|
+
}]
|
|
36
|
+
}] });
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Generated bundle index. Do not edit.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
export { AXOverlayService };
|
|
43
|
+
//# sourceMappingURL=acorex-cdk-overlay.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-cdk-overlay.mjs","sources":["../../../../libs/cdk/overlay/src/lib/overlay.service.ts","../../../../libs/cdk/overlay/src/acorex-cdk-overlay.ts"],"sourcesContent":["import { AXComponentContent, AXComponentService } from '@acorex/core/components';\nimport { inject, Injectable, TemplateRef } from '@angular/core';\nimport { AXOverlayOptions, AXOverlayRef } from './overlay.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXOverlayService {\n private componentService = inject(AXComponentService);\n\n async create<T = any>(content: AXComponentContent<T>, options?: AXOverlayOptions): Promise<AXOverlayRef<T>> {\n if (content instanceof TemplateRef) {\n const ref = await this.componentService.createFromTemplate<T>(content);\n return {\n instance: ref,\n };\n } else {\n const ref = await this.componentService.createFromComponent<T>(content);\n if (options?.inputs) {\n Object.entries(options.inputs).forEach((c) => {\n ref.setInput(c[0], c[1]);\n });\n }\n return {\n instance: ref,\n };\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,gBAAgB,CAAA;AAH7B,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAoBtD;AAlBC,IAAA,MAAM,MAAM,CAAU,OAA8B,EAAE,OAA0B,EAAA;AAC9E,QAAA,IAAI,OAAO,YAAY,WAAW,EAAE;YAClC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAI,OAAO,CAAC;YACtE,OAAO;AACL,gBAAA,QAAQ,EAAE,GAAG;aACd;;aACI;YACL,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAI,OAAO,CAAC;AACvE,YAAA,IAAI,OAAO,EAAE,MAAM,EAAE;AACnB,gBAAA,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAI;AAC3C,oBAAA,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B,iBAAC,CAAC;;YAEJ,OAAO;AACL,gBAAA,QAAQ,EAAE,GAAG;aACd;;;8GAlBM,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-cdk-wysiwyg.mjs","sources":["../../../../libs/cdk/wysiwyg/src/wysiwyg.class.ts","../../../../libs/cdk/wysiwyg/src/acorex-cdk-wysiwyg.ts"],"sourcesContent":["import { signal } from '@angular/core';\r\nimport type Quill from 'quill/quill.d.ts';\r\nimport type { QuillOptions } from 'quill/quill.d.ts';\r\n\r\nexport type Wysiwyg = Quill;\r\nexport type WysiwygOptions = QuillOptions;\r\n\r\nexport class AXWysiwyg {\r\n quillObj = signal<Wysiwyg | null>(null);\r\n\r\n async init(container: HTMLElement | string, option?: WysiwygOptions) {\r\n await import('quill').then((e) => {\r\n const wysiwygObject = new e.default(container, option);\r\n this.quillObj.set(wysiwygObject);\r\n });\r\n }\r\n\r\n bold(value: boolean) {\r\n this.quillObj().format('bold', value);\r\n }\r\n\r\n italic(value: boolean) {\r\n this.quillObj().format('italic', value);\r\n }\r\n\r\n underLine(value: boolean) {\r\n this.quillObj().format('underline', value);\r\n }\r\n\r\n strike(value: boolean) {\r\n this.quillObj().format('strike', value);\r\n }\r\n\r\n color(value: string) {\r\n this.quillObj().format('color', value);\r\n }\r\n\r\n header(value: number) {\r\n this.quillObj().format('header', value);\r\n }\r\n\r\n list(value: 'ordered' | 'bullet' | '') {\r\n this.quillObj().format('list', value);\r\n }\r\n\r\n align(value: 'center' | 'right' | 'left' | 'justify') {\r\n if (value === 'left') {\r\n this.quillObj().format('align', '');\r\n } else {\r\n this.quillObj().format('align', value);\r\n }\r\n }\r\n\r\n direction(value: 'rtl' | 'ltr') {\r\n this.quillObj().format('direction', value);\r\n }\r\n\r\n fontSize(value: 'small' | false | 'large' | 'huge', range) {\r\n this.quillObj().formatText(range.index, range.length, 'size', value);\r\n }\r\n\r\n get HTMLoutput() {\r\n return this.quillObj().root.innerHTML;\r\n }\r\n\r\n undo() {\r\n this.quillObj().history.undo();\r\n }\r\n\r\n redo() {\r\n this.quillObj().history.redo();\r\n }\r\n\r\n background(value: string) {\r\n this.quillObj().format('background', value);\r\n }\r\n\r\n addImage(value: string) {\r\n const range = this.quillObj().getSelection();\r\n const currentIndex = range?.index;\r\n this.quillObj().insertEmbed(currentIndex, 'image', value);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;MAOa,SAAS,CAAA;AAAtB,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC;;AAEvC,IAAA,MAAM,IAAI,CAAC,SAA+B,EAAE,MAAuB,EAAA;QACjE,MAAM,OAAO,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAI;YAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC;AACtD,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC;AAClC,SAAC,CAAC;;AAGJ,IAAA,IAAI,CAAC,KAAc,EAAA;QACjB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;;AAGvC,IAAA,MAAM,CAAC,KAAc,EAAA;QACnB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC;;AAGzC,IAAA,SAAS,CAAC,KAAc,EAAA;QACtB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC;;AAG5C,IAAA,MAAM,CAAC,KAAc,EAAA;QACnB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK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CAAC;;AAG7C,IAAA,QAAQ,CAAC,KAAa,EAAA;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE;AAC5C,QAAA,MAAM,YAAY,GAAG,KAAK,EAAE,KAAK;AACjC,QAAA,IAAI,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC;;
|
|
1
|
+
{"version":3,"file":"acorex-cdk-wysiwyg.mjs","sources":["../../../../libs/cdk/wysiwyg/src/wysiwyg.class.ts","../../../../libs/cdk/wysiwyg/src/acorex-cdk-wysiwyg.ts"],"sourcesContent":["import { signal } from '@angular/core';\r\nimport type Quill from 'quill/quill.d.ts';\r\nimport type { QuillOptions } from 'quill/quill.d.ts';\r\n\r\nexport type Wysiwyg = Quill;\r\nexport type WysiwygOptions = QuillOptions;\r\n\r\nexport class AXWysiwyg {\r\n quillObj = signal<Wysiwyg | null>(null);\r\n\r\n async init(container: HTMLElement | string, option?: WysiwygOptions) {\r\n await import('quill').then((e) => {\r\n const wysiwygObject = new e.default(container, option);\r\n this.quillObj.set(wysiwygObject);\r\n });\r\n }\r\n\r\n bold(value: boolean) {\r\n this.quillObj().format('bold', value);\r\n }\r\n\r\n italic(value: boolean) {\r\n this.quillObj().format('italic', value);\r\n }\r\n\r\n underLine(value: boolean) {\r\n this.quillObj().format('underline', value);\r\n }\r\n\r\n strike(value: boolean) {\r\n this.quillObj().format('strike', value);\r\n }\r\n\r\n color(value: string) {\r\n this.quillObj().format('color', value);\r\n }\r\n\r\n header(value: number) {\r\n this.quillObj().format('header', value);\r\n }\r\n\r\n list(value: 'ordered' | 'bullet' | '') {\r\n this.quillObj().format('list', value);\r\n }\r\n\r\n align(value: 'center' | 'right' | 'left' | 'justify') {\r\n if (value === 'left') {\r\n this.quillObj().format('align', '');\r\n } else {\r\n this.quillObj().format('align', value);\r\n }\r\n }\r\n\r\n direction(value: 'rtl' | 'ltr') {\r\n this.quillObj().format('direction', value);\r\n }\r\n\r\n fontSize(value: 'small' | false | 'large' | 'huge', range) {\r\n this.quillObj().formatText(range.index, range.length, 'size', value);\r\n }\r\n\r\n get HTMLoutput() {\r\n return this.quillObj().root.innerHTML;\r\n }\r\n\r\n undo() {\r\n this.quillObj().history.undo();\r\n }\r\n\r\n redo() {\r\n this.quillObj().history.redo();\r\n }\r\n\r\n background(value: string) {\r\n this.quillObj().format('background', value);\r\n }\r\n\r\n addImage(value: string) {\r\n const range = this.quillObj().getSelection();\r\n const currentIndex = range?.index;\r\n this.quillObj().insertEmbed(currentIndex, 'image', value);\r\n }\r\n\r\n focus() {\r\n this.quillObj().focus();\r\n }\r\n\r\n blur() {\r\n this.quillObj().blur();\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;MAOa,SAAS,CAAA;AAAtB,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC;;AAEvC,IAAA,MAAM,IAAI,CAAC,SAA+B,EAAE,MAAuB,EAAA;QACjE,MAAM,OAAO,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAI;YAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC;AACtD,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC;AAClC,SAAC,CAAC;;AAGJ,IAAA,IAAI,CAAC,KAAc,EAAA;QACjB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;;AAGvC,IAAA,MAAM,CAAC,KAAc,EAAA;QACnB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC;;AAGzC,IAAA,SAAS,CAAC,KAAc,EAAA;QACtB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,WAAW,EAA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C,IAAI,EAAE;;AAGhC,IAAA,UAAU,CAAC,KAAa,EAAA;QACtB,IAAI,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC;;AAG7C,IAAA,QAAQ,CAAC,KAAa,EAAA;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,YAAY,EAAE;AAC5C,QAAA,MAAM,YAAY,GAAG,KAAK,EAAE,KAAK;AACjC,QAAA,IAAI,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,CAAC;;IAG3D,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;;IAGzB,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE;;AAEzB;;AC1FD;;AAEG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AXComponentContent } from '@acorex/core/components';
|
|
2
|
+
import { AXOverlayOptions, AXOverlayRef } from './overlay.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AXOverlayService {
|
|
5
|
+
private componentService;
|
|
6
|
+
create<T = any>(content: AXComponentContent<T>, options?: AXOverlayOptions): Promise<AXOverlayRef<T>>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXOverlayService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXOverlayService>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AXComponentOptions } from '@acorex/core/components';
|
|
2
|
+
import { AXPlacement } from '@acorex/core/types';
|
|
3
|
+
import { ComponentRef, EmbeddedViewRef } from '@angular/core';
|
|
4
|
+
export interface AXOverlayRef<T> {
|
|
5
|
+
instance: EmbeddedViewRef<T> | ComponentRef<T>;
|
|
6
|
+
}
|
|
7
|
+
export interface AXOverlayOptions extends AXComponentOptions {
|
|
8
|
+
backdrop?: {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
background?: boolean;
|
|
11
|
+
cssClass?: string;
|
|
12
|
+
closeOnClick?: boolean;
|
|
13
|
+
};
|
|
14
|
+
position?: AXPlacement;
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/cdk",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.12.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=19.0.0",
|
|
6
6
|
"@angular/core": ">=19.0.0",
|
|
@@ -47,6 +47,10 @@
|
|
|
47
47
|
"types": "./outline/index.d.ts",
|
|
48
48
|
"default": "./fesm2022/acorex-cdk-outline.mjs"
|
|
49
49
|
},
|
|
50
|
+
"./overlay": {
|
|
51
|
+
"types": "./overlay/index.d.ts",
|
|
52
|
+
"default": "./fesm2022/acorex-cdk-overlay.mjs"
|
|
53
|
+
},
|
|
50
54
|
"./pan-view": {
|
|
51
55
|
"types": "./pan-view/index.d.ts",
|
|
52
56
|
"default": "./fesm2022/acorex-cdk-pan-view.mjs"
|