@acorex/components 19.15.0-next.7 → 19.15.0-next.8
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/drawer-container/drawer-container.component.d.ts +3 -3
- package/drawer/lib/drawer/drawer-item/drawer.component.d.ts +15 -50
- package/fesm2022/acorex-components-drawer.mjs +49 -138
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs +1 -1
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +3 -9
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +3 -3
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +2 -2
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +8 -7
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +0 -2
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +28 -1
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +1 -1
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/form/lib/form.component.d.ts +2 -3
- package/package.json +13 -13
- package/scheduler/lib/scheduler.class.d.ts +3 -1
- package/scheduler/lib/scheduler.component.d.ts +2 -2
- package/tooltip/lib/tooltip.directive.d.ts +7 -1
@@ -1,12 +1,12 @@
|
|
1
1
|
import { MXBaseComponent } from '@acorex/cdk/common';
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "@acorex/cdk/drawer";
|
3
4
|
/**
|
4
5
|
* A container component that organizes and positions drawer components.
|
5
6
|
* @category component
|
6
7
|
*/
|
7
8
|
export declare class AXDrawerContainerComponent extends MXBaseComponent {
|
8
|
-
private
|
9
|
-
constructor();
|
9
|
+
#private;
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDrawerContainerComponent, never>;
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXDrawerContainerComponent, "ax-drawer-container", never, {}, {}, never, ["ax-drawer", "ax-content"], true,
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXDrawerContainerComponent, "ax-drawer-container", never, {}, {}, never, ["ax-drawer", "ax-content"], true, [{ directive: typeof i1.AXDrawerContainerDirective; inputs: {}; outputs: {}; }]>;
|
12
12
|
}
|
@@ -1,64 +1,29 @@
|
|
1
|
-
import { MXBaseComponent } from '@acorex/cdk/common';
|
2
|
-
import { AfterContentInit, DoCheck } from '@angular/core';
|
1
|
+
import { AXClickEvent, MXBaseComponent } from '@acorex/cdk/common';
|
3
2
|
import * as i0 from "@angular/core";
|
3
|
+
import * as i1 from "@acorex/cdk/drawer";
|
4
4
|
export type AXDrawerMode = 'push' | 'overlay';
|
5
|
-
export type AXDrawerLocation = 'start' | 'end';
|
5
|
+
export type AXDrawerLocation = 'start' | 'end' | 'top' | 'bottom';
|
6
6
|
/**
|
7
7
|
* A component that represents a drawer with header and content sections.
|
8
8
|
*
|
9
9
|
* @category Components
|
10
10
|
*/
|
11
|
-
export declare class AXDrawerComponent extends MXBaseComponent
|
11
|
+
export declare class AXDrawerComponent extends MXBaseComponent {
|
12
12
|
#private;
|
13
|
-
location: import("@angular/core").
|
13
|
+
location: import("@angular/core").InputSignal<AXDrawerLocation>;
|
14
|
+
collapsed: import("@angular/core").InputSignal<boolean>;
|
14
15
|
showBackdrop: import("@angular/core").InputSignal<boolean>;
|
15
|
-
mode: import("@angular/core").
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
private
|
23
|
-
private platformID;
|
24
|
-
/**
|
25
|
-
*
|
26
|
-
* @ignore
|
27
|
-
*/
|
28
|
-
ngAfterContentInit(): void;
|
29
|
-
/**
|
30
|
-
* @ignore
|
31
|
-
*/
|
32
|
-
ngDoCheck(): void;
|
33
|
-
/**
|
34
|
-
* @ignore
|
35
|
-
*/
|
36
|
-
private _detectBoundingSize;
|
37
|
-
/**
|
38
|
-
* Toggles the collapsed state of the drawer.
|
39
|
-
*/
|
16
|
+
mode: import("@angular/core").InputSignal<AXDrawerMode>;
|
17
|
+
transition: import("@angular/core").InputSignal<number>;
|
18
|
+
closeOnBackdropClick: import("@angular/core").InputSignal<boolean>;
|
19
|
+
backdropClass: import("@angular/core").InputSignal<string>;
|
20
|
+
customClass: import("@angular/core").InputSignal<string>;
|
21
|
+
onBackdropClick: import("@angular/core").OutputEmitterRef<AXClickEvent>;
|
22
|
+
onDrawerClosed: import("@angular/core").OutputEmitterRef<void>;
|
23
|
+
private drawerItem;
|
40
24
|
toggle(): void;
|
41
|
-
/**
|
42
|
-
* Collapses the drawer.
|
43
|
-
* @ignore
|
44
|
-
*/
|
45
25
|
close(): void;
|
46
|
-
/**
|
47
|
-
* Expands the drawer.
|
48
|
-
*/
|
49
26
|
open(): void;
|
50
|
-
/**
|
51
|
-
* @ignore
|
52
|
-
*/
|
53
|
-
private _addBackdrop;
|
54
|
-
/**
|
55
|
-
* @ignore
|
56
|
-
*/
|
57
|
-
private _removeBackdrop;
|
58
|
-
/**
|
59
|
-
* @ignore
|
60
|
-
*/
|
61
|
-
private get __hostClass();
|
62
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDrawerComponent, never>;
|
63
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXDrawerComponent, "ax-drawer", never, { "location": { "alias": "location"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXDrawerComponent, "ax-drawer", never, { "location": { "alias": "location"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "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; }; "backdropClass": { "alias": "backdropClass"; "required": false; "isSignal": true; }; "customClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "onBackdropClick": "onBackdropClick"; "onDrawerClosed": "onDrawerClosed"; }, never, ["ax-header", "ax-content"], true, [{ directive: typeof i1.AXDrawerItemDirective; inputs: {}; outputs: {}; }]>;
|
64
29
|
}
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { CommonModule } from '@angular/common';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { signal, Injectable,
|
3
|
+
import { signal, Injectable, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component, input, output, inject, effect, NgModule } from '@angular/core';
|
4
4
|
import { MXBaseComponent, AXComponent, AXClosableComponent } from '@acorex/cdk/common';
|
5
|
-
import
|
5
|
+
import * as i1 from '@acorex/cdk/drawer';
|
6
|
+
import { AXDrawerContainerDirective, AXDrawerItemDirective } from '@acorex/cdk/drawer';
|
6
7
|
|
7
8
|
class AXDrawerService {
|
8
9
|
constructor() {
|
@@ -20,28 +21,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
20
21
|
* @category component
|
21
22
|
*/
|
22
23
|
class AXDrawerContainerComponent extends MXBaseComponent {
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
this.service.drawerElements.set(drawerClasses);
|
30
|
-
});
|
31
|
-
}
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXDrawerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AXDrawerContainerComponent, isStandalone: true, selector: "ax-drawer-container", providers: [AXDrawerService, { provide: AXComponent, useExisting: AXDrawerContainerComponent }], usesInheritance: true, ngImport: i0, template: `
|
24
|
+
#init = afterNextRender(() => {
|
25
|
+
const host = this.getHostElement();
|
26
|
+
Array.from(host.querySelectorAll(`ax-drawer`)).map((c) => c['__axContext__']);
|
27
|
+
});
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXDrawerContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.11", type: AXDrawerContainerComponent, isStandalone: true, selector: "ax-drawer-container", providers: [AXDrawerService, { provide: AXComponent, useExisting: AXDrawerContainerComponent }], usesInheritance: true, hostDirectives: [{ directive: i1.AXDrawerContainerDirective }], ngImport: i0, template: `
|
34
30
|
<ng-content select="ax-drawer"> </ng-content>
|
35
|
-
<ng-content select="ax-content"
|
36
|
-
`, isInline: true, styles: ["ax-drawer-container{
|
31
|
+
<ng-content select="ax-content"> </ng-content>
|
32
|
+
`, isInline: true, styles: ["ax-drawer-container{width:100%;height:100%;z-index:10}ax-drawer-container>ax-content{height:100%;flex:1 1 0%;overflow:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
37
33
|
}
|
38
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXDrawerContainerComponent, decorators: [{
|
39
35
|
type: Component,
|
40
36
|
args: [{ selector: 'ax-drawer-container', template: `
|
41
37
|
<ng-content select="ax-drawer"> </ng-content>
|
42
|
-
<ng-content select="ax-content"
|
43
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [AXDrawerService, { provide: AXComponent, useExisting: AXDrawerContainerComponent }], styles: ["ax-drawer-container{
|
44
|
-
}]
|
38
|
+
<ng-content select="ax-content"> </ng-content>
|
39
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [AXDrawerService, { provide: AXComponent, useExisting: AXDrawerContainerComponent }], hostDirectives: [AXDrawerContainerDirective], styles: ["ax-drawer-container{width:100%;height:100%;z-index:10}ax-drawer-container>ax-content{height:100%;flex:1 1 0%;overflow:auto}\n"] }]
|
40
|
+
}] });
|
45
41
|
|
46
42
|
/**
|
47
43
|
* A component that represents a drawer with header and content sections.
|
@@ -51,134 +47,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
51
47
|
class AXDrawerComponent extends MXBaseComponent {
|
52
48
|
constructor() {
|
53
49
|
super(...arguments);
|
54
|
-
this.location =
|
50
|
+
this.location = input('start');
|
51
|
+
this.collapsed = input(true);
|
55
52
|
this.showBackdrop = input(true);
|
56
|
-
this.mode =
|
57
|
-
this.
|
58
|
-
this.
|
59
|
-
this.
|
60
|
-
this.
|
61
|
-
this.
|
62
|
-
this.
|
63
|
-
this.
|
64
|
-
this
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
*/
|
80
|
-
ngAfterContentInit() {
|
81
|
-
this._detectBoundingSize();
|
82
|
-
setTimeout(() => {
|
83
|
-
this.loaded.set(true);
|
84
|
-
}, 5000);
|
85
|
-
}
|
86
|
-
/**
|
87
|
-
* @ignore
|
88
|
-
*/
|
89
|
-
ngDoCheck() {
|
90
|
-
this._detectBoundingSize();
|
91
|
-
}
|
92
|
-
/**
|
93
|
-
* @ignore
|
94
|
-
*/
|
95
|
-
_detectBoundingSize() {
|
96
|
-
this._zone.runOutsideAngular(() => {
|
97
|
-
const host = this.getHostElement();
|
98
|
-
if (host.clientWidth) {
|
99
|
-
host.style.setProperty('--ax-sys-el-width', `${host.clientWidth}px`);
|
100
|
-
}
|
53
|
+
this.mode = input('overlay');
|
54
|
+
this.transition = input(100);
|
55
|
+
this.closeOnBackdropClick = input(true);
|
56
|
+
this.backdropClass = input('ax-bg-black/45');
|
57
|
+
this.customClass = input('', { alias: 'class' });
|
58
|
+
this.onBackdropClick = output();
|
59
|
+
this.onDrawerClosed = output();
|
60
|
+
this.drawerItem = inject(AXDrawerItemDirective);
|
61
|
+
this.#init = effect(() => {
|
62
|
+
this.drawerItem.mode.set(this.mode());
|
63
|
+
this.drawerItem.transition.set(this.transition());
|
64
|
+
this.drawerItem.backdropClass.set(this.backdropClass());
|
65
|
+
this.drawerItem.closeOnBackdropClick.set(this.closeOnBackdropClick());
|
66
|
+
this.drawerItem.drawerLocation.set(this.location());
|
67
|
+
this.drawerItem.initialState.set(this.collapsed() ? 'hide' : 'show');
|
68
|
+
this.drawerItem.backDrop.set(this.showBackdrop());
|
69
|
+
this.drawerItem.drawerItemClass.set(this.customClass());
|
70
|
+
this.drawerItem.onBackdropClick.subscribe(() => {
|
71
|
+
this.onBackdropClick.emit({ nativeEvent: event, component: this });
|
72
|
+
});
|
73
|
+
this.drawerItem.onDrawerClosed.subscribe(() => {
|
74
|
+
this.onDrawerClosed.emit();
|
75
|
+
});
|
101
76
|
});
|
102
77
|
}
|
103
|
-
|
104
|
-
* Toggles the collapsed state of the drawer.
|
105
|
-
*/
|
78
|
+
#init;
|
106
79
|
toggle() {
|
107
|
-
|
108
|
-
this.open();
|
109
|
-
}
|
110
|
-
else {
|
111
|
-
this.close();
|
112
|
-
}
|
80
|
+
this.drawerItem.toggle();
|
113
81
|
}
|
114
|
-
/**
|
115
|
-
* Collapses the drawer.
|
116
|
-
* @ignore
|
117
|
-
*/
|
118
82
|
close() {
|
119
|
-
this.
|
83
|
+
this.drawerItem.hide();
|
120
84
|
}
|
121
|
-
/**
|
122
|
-
* Expands the drawer.
|
123
|
-
*/
|
124
85
|
open() {
|
125
|
-
|
126
|
-
return;
|
127
|
-
this.collapsed.set(false);
|
128
|
-
if (!this.closeOthers()) {
|
129
|
-
this.service.drawerElements()?.forEach((element) => {
|
130
|
-
if (element.location() === this.location() && element.id !== this.id) {
|
131
|
-
element.close();
|
132
|
-
}
|
133
|
-
});
|
134
|
-
}
|
135
|
-
}
|
136
|
-
#eff;
|
137
|
-
/**
|
138
|
-
* @ignore
|
139
|
-
*/
|
140
|
-
_addBackdrop() {
|
141
|
-
if (isPlatformBrowser(this.platformID)) {
|
142
|
-
this._zone.runOutsideAngular(() => {
|
143
|
-
const backDropElem = this.document.createElement('div');
|
144
|
-
backDropElem.classList.add('ax-backdrop');
|
145
|
-
backDropElem.onclick = () => {
|
146
|
-
this._zone.run(() => {
|
147
|
-
this.close();
|
148
|
-
});
|
149
|
-
};
|
150
|
-
this.getHostElement()?.parentElement?.appendChild(backDropElem);
|
151
|
-
this.backdropElement.set(backDropElem);
|
152
|
-
});
|
153
|
-
}
|
154
|
-
}
|
155
|
-
/**
|
156
|
-
* @ignore
|
157
|
-
*/
|
158
|
-
_removeBackdrop() {
|
159
|
-
if (isBrowser()) {
|
160
|
-
this._zone.runOutsideAngular(() => {
|
161
|
-
if (this.backdropElement()) {
|
162
|
-
this.getHostElement()?.parentElement?.removeChild(this.backdropElement());
|
163
|
-
this.backdropElement.set(null);
|
164
|
-
}
|
165
|
-
});
|
166
|
-
}
|
167
|
-
}
|
168
|
-
/**
|
169
|
-
* @ignore
|
170
|
-
*/
|
171
|
-
get __hostClass() {
|
172
|
-
return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${this.collapsed() ? 'ax-collapsed' : 'ax-expanded'} ${this.loaded() && 'ax-state-loaded'}`;
|
86
|
+
this.drawerItem.show();
|
173
87
|
}
|
174
88
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXDrawerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
175
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.11", type: AXDrawerComponent, isStandalone: true, 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 },
|
89
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.11", type: AXDrawerComponent, isStandalone: true, selector: "ax-drawer", inputs: { location: { classPropertyName: "location", publicName: "location", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", 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 }, transition: { classPropertyName: "transition", publicName: "transition", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, backdropClass: { classPropertyName: "backdropClass", publicName: "backdropClass", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBackdropClick: "onBackdropClick", onDrawerClosed: "onDrawerClosed" }, providers: [
|
176
90
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
177
91
|
{ provide: AXClosableComponent, useExisting: AXDrawerComponent },
|
178
|
-
], usesInheritance: true, ngImport: i0, template: `
|
92
|
+
], usesInheritance: true, hostDirectives: [{ directive: i1.AXDrawerItemDirective }], ngImport: i0, template: `
|
179
93
|
<ng-content select="ax-header"></ng-content>
|
180
94
|
<ng-content select="ax-content"></ng-content>
|
181
|
-
`, isInline: true, styles: ["ax-drawer
|
95
|
+
`, isInline: true, styles: ["ax-drawer>ax-content{flex:1 1 0%;overflow:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
182
96
|
}
|
183
97
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXDrawerComponent, decorators: [{
|
184
98
|
type: Component,
|
@@ -188,11 +102,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
188
102
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
189
103
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
190
104
|
{ provide: AXClosableComponent, useExisting: AXDrawerComponent },
|
191
|
-
], styles: ["ax-drawer
|
192
|
-
}]
|
193
|
-
type: HostBinding,
|
194
|
-
args: ['class']
|
195
|
-
}] } });
|
105
|
+
], hostDirectives: [AXDrawerItemDirective], styles: ["ax-drawer>ax-content{flex:1 1 0%;overflow:auto}\n"] }]
|
106
|
+
}] });
|
196
107
|
|
197
108
|
const COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];
|
198
109
|
const MODULES = [CommonModule];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-drawer.mjs","sources":["../../../../packages/components/drawer/src/lib/drawer.service.ts","../../../../packages/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../packages/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../packages/components/drawer/src/lib/drawer.module.ts","../../../../packages/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 { AXComponent, MXBaseComponent } from '@acorex/cdk/common';\nimport { afterNextRender, ChangeDetectionStrategy, Component, inject, ViewEncapsulation } 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\"> </ng-content>\n <ng-content select=\"ax-content\"></ng-content>\n `,\n styleUrls: ['./drawer-container.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService, { provide: AXComponent, useExisting: AXDrawerContainerComponent }],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n private 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 { AXClosableComponent, AXComponent, MXBaseComponent } from '@acorex/cdk/common';\nimport { isBrowser } from '@acorex/core/platform';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n effect,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n PLATFORM_ID,\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: AXClosableComponent, 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 closeOthers = input(false);\n\n collapsed = model(true);\n\n private backdropElement = signal<HTMLElement>(null);\n\n protected loaded = signal(false);\n\n private service = inject(AXDrawerService);\n\n private _zone = inject(NgZone);\n\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\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-sys-el-width', `${host.clientWidth}px`);\n }\n });\n }\n\n /**\n * Toggles the collapsed state of the drawer.\n */\n toggle() {\n if (this.collapsed()) {\n this.open();\n } else {\n this.close();\n }\n }\n\n /**\n * Collapses the drawer.\n * @ignore\n */\n close() {\n this.collapsed.set(true);\n }\n\n /**\n * Expands the drawer.\n */\n open() {\n if (!this.collapsed()) return;\n\n this.collapsed.set(false);\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 }\n\n #eff = effect(() => {\n if (!this.collapsed()) {\n if (this.showBackdrop() && this.mode() === 'overlay') {\n this._addBackdrop();\n }\n } else {\n this._removeBackdrop();\n }\n });\n\n /**\n * @ignore\n */\n private _addBackdrop() {\n if (isPlatformBrowser(this.platformID)) {\n this._zone.runOutsideAngular(() => {\n const backDropElem = this.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 /**\n * @ignore\n */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-drawer-${this.mode()} ax-drawer-${this.location()} ${this.collapsed() ? 'ax-collapsed' : 'ax-expanded'} ${this.loaded() && 'ax-state-loaded'}`;\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 imports: [...MODULES, ...COMPONENT],\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;AACnD;+GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAf,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACED;;;AAGG;AAYG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAG7D,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAHD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;QAIvC,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAA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IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJZ,OAAO,CAAA,EAAA,CAAA,CAAA;;4FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,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-components-drawer.mjs","sources":["../../../../packages/components/drawer/src/lib/drawer.service.ts","../../../../packages/components/drawer/src/lib/drawer/drawer-container/drawer-container.component.ts","../../../../packages/components/drawer/src/lib/drawer/drawer-item/drawer.component.ts","../../../../packages/components/drawer/src/lib/drawer.module.ts","../../../../packages/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 { AXComponent, MXBaseComponent } from '@acorex/cdk/common';\nimport { AXDrawerContainerDirective } from '@acorex/cdk/drawer';\nimport { afterNextRender, ChangeDetectionStrategy, Component, ViewEncapsulation } 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\"> </ng-content>\n <ng-content select=\"ax-content\"> </ng-content>\n `,\n styleUrl: './drawer-container.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [AXDrawerService, { provide: AXComponent, useExisting: AXDrawerContainerComponent }],\n hostDirectives: [AXDrawerContainerDirective],\n})\nexport class AXDrawerContainerComponent extends MXBaseComponent {\n #init = afterNextRender(() => {\n const host = this.getHostElement();\n Array.from(host.querySelectorAll(`ax-drawer`)).map((c) => c['__axContext__'] as AXDrawerComponent);\n });\n}\n","import { AXClickEvent, AXClosableComponent, AXComponent, MXBaseComponent } from '@acorex/cdk/common';\nimport { AXDrawerItemDirective } from '@acorex/cdk/drawer';\nimport { ChangeDetectionStrategy, Component, effect, inject, input, output, ViewEncapsulation } from '@angular/core';\nexport type AXDrawerMode = 'push' | 'overlay';\nexport type AXDrawerLocation = 'start' | 'end' | 'top' | 'bottom';\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 styleUrl: './drawer.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: AXComponent, useExisting: AXDrawerComponent },\n { provide: AXClosableComponent, useExisting: AXDrawerComponent },\n ],\n hostDirectives: [AXDrawerItemDirective],\n})\nexport class AXDrawerComponent extends MXBaseComponent {\n location = input<AXDrawerLocation>('start');\n collapsed = input(true);\n showBackdrop = input(true);\n mode = input<AXDrawerMode>('overlay');\n transition = input<number>(100);\n closeOnBackdropClick = input(true);\n backdropClass = input('ax-bg-black/45');\n customClass = input<string>('', { alias: 'class' });\n\n onBackdropClick = output<AXClickEvent>();\n onDrawerClosed = output();\n\n private drawerItem = inject(AXDrawerItemDirective);\n\n #init = effect(() => {\n this.drawerItem.mode.set(this.mode());\n this.drawerItem.transition.set(this.transition());\n this.drawerItem.backdropClass.set(this.backdropClass());\n this.drawerItem.closeOnBackdropClick.set(this.closeOnBackdropClick());\n this.drawerItem.drawerLocation.set(this.location());\n this.drawerItem.initialState.set(this.collapsed() ? 'hide' : 'show');\n this.drawerItem.backDrop.set(this.showBackdrop());\n this.drawerItem.drawerItemClass.set(this.customClass());\n this.drawerItem.onBackdropClick.subscribe(() => {\n this.onBackdropClick.emit({ nativeEvent: event, component: this });\n });\n this.drawerItem.onDrawerClosed.subscribe(() => {\n this.onDrawerClosed.emit();\n });\n });\n\n toggle() {\n this.drawerItem.toggle();\n }\n\n close() {\n this.drawerItem.hide();\n }\n\n open() {\n this.drawerItem.show();\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 imports: [...MODULES, ...COMPONENT],\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;AACnD;+GAFY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAf,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACGD;;;AAGG;AAaG,MAAO,0BAA2B,SAAQ,eAAe,CAAA;AAC7D,IAAA,KAAK,GAAG,eAAe,CAAC,MAAK;AAC3B,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE;QAClC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAW,SAAA,CAAA,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC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iBAAiB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;AAQnD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAJZ,OAAO,CAAA,EAAA,CAAA,CAAA;;4FAIT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,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;;;;"}
|
@@ -188,7 +188,7 @@ class AXFileExplorerTreeComponent {
|
|
188
188
|
this.internalService.dbClickHandler(e.data, false);
|
189
189
|
}
|
190
190
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXFileExplorerTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
191
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.11", type: AXFileExplorerTreeComponent, isStandalone: true, selector: "ax-file-explorer-tree", providers: [{ provide: AXComponent, useExisting: AXFileExplorerTreeComponent }], viewQueries: [{ propertyName: "drawer", first: true, predicate: AXDrawerComponent, descendants: true, isSignal: true }, { propertyName: "treeView", first: true, predicate: AXTreeViewComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-drawer-container\n [ngClass]=\"this.internalService.treeViewState() && 'ax-file-explore-drawer-border'\"\n [ngStyle]=\"this.internalService.treeViewState() ? { width: 'fit-content' } : { width: 0 }\"\n>\n <ax-drawer location=\"start\" mode=\"push\">\n <ax-content>\n <ax-tree-view\n (onCollapsedChanged)=\"openFolderOnViewHandler($event)\"\n [showCheckbox]=\"false\"\n hasChildField=\"hasChild\"\n [items]=\"internalService.dataCallBack()\"\n ></ax-tree-view>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>\n", styles: ["ax-file-explorer-tree .ax-file-explore-drawer-border{border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-file-explorer-tree ax-drawer-container{height:auto}ax-file-explorer-tree ax-drawer-container ax-drawer ax-content{padding:.5rem;overflow-x:hidden}ax-file-explorer-tree ax-drawer-container ax-drawer ax-text{white-space:nowrap;padding-inline-end:1rem}\n"], dependencies: [{ kind: "component", type: AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "
|
191
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.11", type: AXFileExplorerTreeComponent, isStandalone: true, selector: "ax-file-explorer-tree", providers: [{ provide: AXComponent, useExisting: AXFileExplorerTreeComponent }], viewQueries: [{ propertyName: "drawer", first: true, predicate: AXDrawerComponent, descendants: true, isSignal: true }, { propertyName: "treeView", first: true, predicate: AXTreeViewComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-drawer-container\n [ngClass]=\"this.internalService.treeViewState() && 'ax-file-explore-drawer-border'\"\n [ngStyle]=\"this.internalService.treeViewState() ? { width: 'fit-content' } : { width: 0 }\"\n>\n <ax-drawer location=\"start\" mode=\"push\">\n <ax-content>\n <ax-tree-view\n (onCollapsedChanged)=\"openFolderOnViewHandler($event)\"\n [showCheckbox]=\"false\"\n hasChildField=\"hasChild\"\n [items]=\"internalService.dataCallBack()\"\n ></ax-tree-view>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>\n", styles: ["ax-file-explorer-tree .ax-file-explore-drawer-border{border-inline-end:1px solid rgba(var(--ax-sys-color-border-lightest-surface))}ax-file-explorer-tree ax-drawer-container{height:auto}ax-file-explorer-tree ax-drawer-container ax-drawer ax-content{padding:.5rem;overflow-x:hidden}ax-file-explorer-tree ax-drawer-container ax-drawer ax-text{white-space:nowrap;padding-inline-end:1rem}\n"], dependencies: [{ kind: "component", type: AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "collapsed", "showBackdrop", "mode", "transition", "closeOnBackdropClick", "backdropClass", "class"], outputs: ["onBackdropClick", "onDrawerClosed"] }, { kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["items", "showCheckbox", "selectionMode", "selectionBehavior", "selectionScope", "focusNodeEnabled", "valueField", "textField", "visibleField", "disableField", "hasChildField", "selectedField", "expandedField", "tooltipField", "childrenField", "activeField", "indeterminateField", "parentField", "iconField", "toggleIcons", "look", "itemTemplate", "emptyTemplate", "expandOn"], outputs: ["onSelectionChanged", "onItemSelectedChanged", "onNodeClick", "onCollapsedChanged", "onNodedbClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
192
192
|
}
|
193
193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: AXFileExplorerTreeComponent, decorators: [{
|
194
194
|
type: Component,
|