@acorex/components 21.0.1-next.82 → 21.0.1-next.84

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.
Files changed (51) hide show
  1. package/fesm2022/acorex-components-button.mjs +2 -2
  2. package/fesm2022/acorex-components-button.mjs.map +1 -1
  3. package/fesm2022/acorex-components-conversation.mjs +16 -16
  4. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  5. package/fesm2022/acorex-components-cron-job.mjs +2 -2
  6. package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
  7. package/fesm2022/acorex-components-data-list.mjs +2 -2
  8. package/fesm2022/acorex-components-data-list.mjs.map +1 -1
  9. package/fesm2022/acorex-components-dialog.mjs +2 -2
  10. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  11. package/fesm2022/acorex-components-flow-chart.mjs +6 -6
  12. package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
  13. package/fesm2022/acorex-components-grid-layout-builder.mjs +2 -2
  14. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  15. package/fesm2022/acorex-components-loading-dialog.mjs +2 -2
  16. package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
  17. package/fesm2022/acorex-components-rest-api-generator.mjs +10 -10
  18. package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
  19. package/fesm2022/acorex-components-scheduler-picker.mjs +114 -120
  20. package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -1
  21. package/fesm2022/acorex-components-slider.mjs +1 -1
  22. package/fesm2022/acorex-components-slider.mjs.map +1 -1
  23. package/fesm2022/acorex-components-tabs.mjs +2 -2
  24. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  25. package/fesm2022/acorex-components-tree-view.mjs +2 -2
  26. package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
  27. package/package.json +3 -27
  28. package/collapse/README.md +0 -3
  29. package/drawer-legacy/README.md +0 -3
  30. package/fesm2022/acorex-components-collapse.mjs +0 -369
  31. package/fesm2022/acorex-components-collapse.mjs.map +0 -1
  32. package/fesm2022/acorex-components-drawer-legacy.mjs +0 -218
  33. package/fesm2022/acorex-components-drawer-legacy.mjs.map +0 -1
  34. package/fesm2022/acorex-components-file-explorer.mjs +0 -307
  35. package/fesm2022/acorex-components-file-explorer.mjs.map +0 -1
  36. package/fesm2022/acorex-components-number-box-legacy.mjs +0 -412
  37. package/fesm2022/acorex-components-number-box-legacy.mjs.map +0 -1
  38. package/fesm2022/acorex-components-scss.mjs +0 -22
  39. package/fesm2022/acorex-components-scss.mjs.map +0 -1
  40. package/fesm2022/acorex-components-tree-view-legacy.mjs +0 -515
  41. package/fesm2022/acorex-components-tree-view-legacy.mjs.map +0 -1
  42. package/file-explorer/README.md +0 -3
  43. package/number-box-legacy/README.md +0 -3
  44. package/scss/README.md +0 -3
  45. package/tree-view-legacy/README.md +0 -3
  46. package/types/acorex-components-collapse.d.ts +0 -172
  47. package/types/acorex-components-drawer-legacy.d.ts +0 -86
  48. package/types/acorex-components-file-explorer.d.ts +0 -103
  49. package/types/acorex-components-number-box-legacy.d.ts +0 -191
  50. package/types/acorex-components-scss.d.ts +0 -10
  51. package/types/acorex-components-tree-view-legacy.d.ts +0 -185
@@ -1,218 +0,0 @@
1
- import { MXBaseComponent, AXComponent, AXClosableComponent } from '@acorex/cdk/common';
2
- import * as i0 from '@angular/core';
3
- import { signal, Injectable, inject, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component, model, input, NgZone, DOCUMENT, PLATFORM_ID, effect, HostBinding, NgModule } from '@angular/core';
4
- import { isBrowser } from '@acorex/core/platform';
5
- import { isPlatformBrowser, CommonModule } from '@angular/common';
6
-
7
- class AXDrawerLegacyService {
8
- constructor() {
9
- this.drawerElements = signal(null, ...(ngDevMode ? [{ debugName: "drawerElements" }] : []));
10
- }
11
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
12
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyService }); }
13
- }
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyService, decorators: [{
15
- type: Injectable
16
- }] });
17
-
18
- /**
19
- * A container component that organizes and positions drawer components.
20
- * @category component
21
- */
22
- class AXDrawerLegacyContainerComponent extends MXBaseComponent {
23
- constructor() {
24
- super();
25
- this.service = inject(AXDrawerLegacyService);
26
- afterNextRender(() => {
27
- const host = this.getHostElement();
28
- const drawerClasses = Array.from(host.querySelectorAll(`ax-drawer`)).map((c) => c['__axContext__']);
29
- this.service.drawerElements.set(drawerClasses);
30
- });
31
- }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
33
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: AXDrawerLegacyContainerComponent, isStandalone: true, selector: "ax-drawer-legacy-container", providers: [AXDrawerLegacyService, { provide: AXComponent, useExisting: AXDrawerLegacyContainerComponent }], usesInheritance: true, ngImport: i0, template: `
34
- <ng-content select="ax-drawer"> </ng-content>
35
- <ng-content select="ax-content"></ng-content>
36
- `, isInline: true, styles: ["ax-drawer-legacy-container{position:relative;display:flex;height:100%;width:100%;overflow:hidden}ax-drawer-legacy-container.ax-fixed{bottom:0;inset-inline-end:0px;inset-inline-start:0px;top:0;z-index:50;display:none}ax-drawer-legacy-container.ax-fixed.ax-visible{display:flex}ax-drawer-legacy-container .ax-backdrop{position:absolute;bottom:0;top:0;z-index:10;height:100%;width:100%;background-color:rgba(var(--ax-comp-drawer-container-bg-color, 0, 0, 0, .2));transition-property:all;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}ax-drawer-legacy-container>ax-content{height:100%;flex:1 1 0%;overflow:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyContainerComponent, decorators: [{
39
- type: Component,
40
- args: [{ selector: 'ax-drawer-legacy-container', template: `
41
- <ng-content select="ax-drawer"> </ng-content>
42
- <ng-content select="ax-content"></ng-content>
43
- `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [AXDrawerLegacyService, { provide: AXComponent, useExisting: AXDrawerLegacyContainerComponent }], styles: ["ax-drawer-legacy-container{position:relative;display:flex;height:100%;width:100%;overflow:hidden}ax-drawer-legacy-container.ax-fixed{bottom:0;inset-inline-end:0px;inset-inline-start:0px;top:0;z-index:50;display:none}ax-drawer-legacy-container.ax-fixed.ax-visible{display:flex}ax-drawer-legacy-container .ax-backdrop{position:absolute;bottom:0;top:0;z-index:10;height:100%;width:100%;background-color:rgba(var(--ax-comp-drawer-container-bg-color, 0, 0, 0, .2));transition-property:all;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}ax-drawer-legacy-container>ax-content{height:100%;flex:1 1 0%;overflow:auto}\n"] }]
44
- }], ctorParameters: () => [] });
45
-
46
- /**
47
- * A component that represents a drawer with header and content sections.
48
- *
49
- * @category Components
50
- */
51
- class AXDrawerLegacyComponent extends MXBaseComponent {
52
- constructor() {
53
- super(...arguments);
54
- this.location = model('start', ...(ngDevMode ? [{ debugName: "location" }] : []));
55
- this.showBackdrop = input(true, ...(ngDevMode ? [{ debugName: "showBackdrop" }] : []));
56
- this.mode = model('overlay', ...(ngDevMode ? [{ debugName: "mode" }] : []));
57
- this.closeOthers = input(false, ...(ngDevMode ? [{ debugName: "closeOthers" }] : []));
58
- this.collapsed = model(true, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
59
- this.backdropElement = signal(null, ...(ngDevMode ? [{ debugName: "backdropElement" }] : []));
60
- this.loaded = signal(false, ...(ngDevMode ? [{ debugName: "loaded" }] : []));
61
- this.service = inject(AXDrawerLegacyService);
62
- this._zone = inject(NgZone);
63
- this.document = inject(DOCUMENT);
64
- this.platformID = inject(PLATFORM_ID);
65
- this.#eff = effect(() => {
66
- if (!this.collapsed()) {
67
- if (this.showBackdrop() && this.mode() === 'overlay') {
68
- this._addBackdrop();
69
- }
70
- }
71
- else {
72
- this._removeBackdrop();
73
- }
74
- }, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
75
- }
76
- /**
77
- *
78
- * @ignore
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
- }
101
- });
102
- }
103
- /**
104
- * Toggles the collapsed state of the drawer.
105
- */
106
- toggle() {
107
- if (this.collapsed()) {
108
- this.open();
109
- }
110
- else {
111
- this.close();
112
- }
113
- }
114
- /**
115
- * Collapses the drawer.
116
- * @ignore
117
- */
118
- close() {
119
- this.collapsed.set(true);
120
- }
121
- /**
122
- * Expands the drawer.
123
- */
124
- open() {
125
- if (!this.collapsed())
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'}`;
173
- }
174
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
175
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: AXDrawerLegacyComponent, isStandalone: true, selector: "ax-drawer-legacy", 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 }, closeOthers: { classPropertyName: "closeOthers", publicName: "closeOthers", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { location: "locationChange", mode: "modeChange", collapsed: "collapsedChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
176
- { provide: AXComponent, useExisting: AXDrawerLegacyComponent },
177
- { provide: AXClosableComponent, useExisting: AXDrawerLegacyComponent },
178
- ], usesInheritance: true, ngImport: i0, template: `
179
- <ng-content select="ax-header"></ng-content>
180
- <ng-content select="ax-content"></ng-content>
181
- `, isInline: true, styles: ["ax-drawer-legacy{height:100%;display:flex;max-width:95%;flex-direction:column}ax-drawer-legacy>ax-content{flex:1 1 0%;overflow:auto}ax-drawer-legacy.ax-drawer-overlay{position:absolute;transition-property:background-color,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}ax-drawer-legacy.ax-drawer-overlay.ax-expanded{z-index:20}ax-drawer-legacy.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer-legacy.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer-legacy.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-sys-el-width))}ax-drawer-legacy.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer-legacy.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-sys-el-width))}ax-drawer-legacy.ax-drawer-push{flex:0 1 auto}ax-drawer-legacy.ax-drawer-push.ax-expanded{z-index:20}ax-drawer-legacy.ax-drawer-push.ax-collapsed{z-index:0}ax-drawer-legacy.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer-legacy.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0px}ax-drawer-legacy.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-sys-el-width))}ax-drawer-legacy.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer-legacy.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0px}ax-drawer-legacy.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-sys-el-width))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
182
- }
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyComponent, decorators: [{
184
- type: Component,
185
- args: [{ selector: 'ax-drawer-legacy', template: `
186
- <ng-content select="ax-header"></ng-content>
187
- <ng-content select="ax-content"></ng-content>
188
- `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
189
- { provide: AXComponent, useExisting: AXDrawerLegacyComponent },
190
- { provide: AXClosableComponent, useExisting: AXDrawerLegacyComponent },
191
- ], styles: ["ax-drawer-legacy{height:100%;display:flex;max-width:95%;flex-direction:column}ax-drawer-legacy>ax-content{flex:1 1 0%;overflow:auto}ax-drawer-legacy.ax-drawer-overlay{position:absolute;transition-property:background-color,color;transition-duration:var(--ax-sys-transition-duration);transition-timing-function:var(--ax-sys-transition-timing-function)}ax-drawer-legacy.ax-drawer-overlay.ax-expanded{z-index:20}ax-drawer-legacy.ax-drawer-overlay.ax-collapsed{z-index:0}ax-drawer-legacy.ax-drawer-overlay.ax-drawer-start.ax-expanded{inset-inline-start:0px}ax-drawer-legacy.ax-drawer-overlay.ax-drawer-start.ax-collapsed{inset-inline-start:calc(-1 * var(--ax-sys-el-width))}ax-drawer-legacy.ax-drawer-overlay.ax-drawer-end.ax-expanded{inset-inline-end:0px}ax-drawer-legacy.ax-drawer-overlay.ax-drawer-end.ax-collapsed{inset-inline-end:calc(-1 * var(--ax-sys-el-width))}ax-drawer-legacy.ax-drawer-push{flex:0 1 auto}ax-drawer-legacy.ax-drawer-push.ax-expanded{z-index:20}ax-drawer-legacy.ax-drawer-push.ax-collapsed{z-index:0}ax-drawer-legacy.ax-drawer-push.ax-drawer-start{order:-9999}ax-drawer-legacy.ax-drawer-push.ax-drawer-start.ax-expanded{margin-inline-start:0px}ax-drawer-legacy.ax-drawer-push.ax-drawer-start.ax-collapsed{margin-inline-start:calc(-1 * var(--ax-sys-el-width))}ax-drawer-legacy.ax-drawer-push.ax-drawer-end{order:9999}ax-drawer-legacy.ax-drawer-push.ax-drawer-end.ax-expanded{margin-inline-end:0px}ax-drawer-legacy.ax-drawer-push.ax-drawer-end.ax-collapsed{margin-inline-end:calc(-1 * var(--ax-sys-el-width))}\n"] }]
192
- }], propDecorators: { location: [{ type: i0.Input, args: [{ isSignal: true, alias: "location", required: false }] }, { type: i0.Output, args: ["locationChange"] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }, { type: i0.Output, args: ["modeChange"] }], closeOthers: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOthers", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], __hostClass: [{
193
- type: HostBinding,
194
- args: ['class']
195
- }] } });
196
-
197
- const COMPONENT = [AXDrawerLegacyComponent, AXDrawerLegacyContainerComponent];
198
- const MODULES = [CommonModule];
199
- class AXDrawerLegacyModule {
200
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
201
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyModule, imports: [CommonModule, AXDrawerLegacyComponent, AXDrawerLegacyContainerComponent], exports: [AXDrawerLegacyComponent, AXDrawerLegacyContainerComponent] }); }
202
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyModule, imports: [MODULES] }); }
203
- }
204
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXDrawerLegacyModule, decorators: [{
205
- type: NgModule,
206
- args: [{
207
- imports: [...MODULES, ...COMPONENT],
208
- exports: [...COMPONENT],
209
- providers: [],
210
- }]
211
- }] });
212
-
213
- /**
214
- * Generated bundle index. Do not edit.
215
- */
216
-
217
- export { AXDrawerLegacyComponent, AXDrawerLegacyContainerComponent, AXDrawerLegacyModule };
218
- //# sourceMappingURL=acorex-components-drawer-legacy.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acorex-components-drawer-legacy.mjs","sources":["../../../../packages/components/drawer-legacy/src/lib/drawer.service.ts","../../../../packages/components/drawer-legacy/src/lib/drawer-container/drawer-container.component.ts","../../../../packages/components/drawer-legacy/src/lib/drawer-item/drawer.component.ts","../../../../packages/components/drawer-legacy/src/lib/drawer.module.ts","../../../../packages/components/drawer-legacy/src/acorex-components-drawer-legacy.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { AXDrawerLegacyComponent } from './drawer-item/drawer.component';\n\n@Injectable()\nexport class AXDrawerLegacyService {\n drawerElements = signal<AXDrawerLegacyComponent[]>(null);\n}\n","import { AXComponent, MXBaseComponent } from '@acorex/cdk/common';\nimport { afterNextRender, ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { AXDrawerLegacyComponent } from '../drawer-item/drawer.component';\nimport { AXDrawerLegacyService } from '../drawer.service';\n\n/**\n * A container component that organizes and positions drawer components.\n * @category component\n */\n@Component({\n selector: 'ax-drawer-legacy-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: [AXDrawerLegacyService, { provide: AXComponent, useExisting: AXDrawerLegacyContainerComponent }],\n})\nexport class AXDrawerLegacyContainerComponent extends MXBaseComponent {\n private service = inject(AXDrawerLegacyService);\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 AXDrawerLegacyComponent,\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 { isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n DoCheck,\n DOCUMENT,\n effect,\n HostBinding,\n inject,\n input,\n model,\n NgZone,\n PLATFORM_ID,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXDrawerLegacyService } 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-legacy',\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: AXDrawerLegacyComponent },\n { provide: AXClosableComponent, useExisting: AXDrawerLegacyComponent },\n ],\n})\nexport class AXDrawerLegacyComponent 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(AXDrawerLegacyService);\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 { AXDrawerLegacyContainerComponent } from './drawer-container/drawer-container.component';\nimport { AXDrawerLegacyComponent } from './drawer-item/drawer.component';\n\nconst COMPONENT = [AXDrawerLegacyComponent, AXDrawerLegacyContainerComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n imports: [...MODULES, ...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDrawerLegacyModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAIa,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAA4B,IAAI,0DAAC;AACzD,IAAA;8GAFY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAArB,qBAAqB,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC;;;ACED;;;AAGG;AAYG,MAAO,gCAAiC,SAAQ,eAAe,CAAA;AAGnE,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAHD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,qBAAqB,CAAC;QAI7C,eAAe,CAAC,MAAK;AACnB,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE;YAClC,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA,SAAA,CAAW,CAAC,CAAC,CAAC,GAAG,CACtE,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAA4B,CACrD;YACD,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC;AAChD,QAAA,CAAC,CAAC;IACJ;8GAZW,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gCAAgC,EAA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AS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -1,307 +0,0 @@
1
- import { AXComponent, MXBaseComponent } from '@acorex/cdk/common';
2
- import * as i0 from '@angular/core';
3
- import { signal, Injectable, inject, ViewEncapsulation, Component, ChangeDetectionStrategy, input, output, viewChild, effect, afterNextRender, NgModule } from '@angular/core';
4
- import { AXBreadCrumbsComponent, AXBreadCrumbsItemComponent, AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
5
- import { AXButtonComponent, AXButtonModule } from '@acorex/components/button';
6
- import { AXDecoratorGenericComponent, AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
7
- import { AXMenuComponent, AXMenuItemComponent, AXContextMenuComponent, AXMenuModule } from '@acorex/components/menu';
8
- import { AXToolBarComponent, AXToolBarModule } from '@acorex/components/toolbar';
9
- import { NgClass, NgStyle, CommonModule } from '@angular/common';
10
- import { AXDrawerComponent, AXDrawerContainerComponent, AXDrawerModule } from '@acorex/components/drawer';
11
- import { AXTreeViewLegacyComponent, AXTreeViewLegacyModule } from '@acorex/components/tree-view-legacy';
12
-
13
- class AXFileExplorerInternalService {
14
- constructor() {
15
- this.viewMode = signal('ax-large-icon', ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
16
- this.treeViewState = signal(false, ...(ngDevMode ? [{ debugName: "treeViewState" }] : []));
17
- this.allData = signal([], ...(ngDevMode ? [{ debugName: "allData" }] : []));
18
- this.showData = signal([], ...(ngDevMode ? [{ debugName: "showData" }] : []));
19
- this.breadcrumbsData = signal(['root'], ...(ngDevMode ? [{ debugName: "breadcrumbsData" }] : []));
20
- this.activeFolderId = signal(null, ...(ngDevMode ? [{ debugName: "activeFolderId" }] : []));
21
- this.dataCallBack = signal(null, ...(ngDevMode ? [{ debugName: "dataCallBack" }] : []));
22
- this.treeViewInstant = signal(null, ...(ngDevMode ? [{ debugName: "treeViewInstant" }] : []));
23
- this.clickedItems = new Set();
24
- }
25
- findItemInNestedArray(array, predicate) {
26
- for (const item of array) {
27
- if (predicate(item)) {
28
- return item;
29
- }
30
- if (item.children) {
31
- const found = this.findItemInNestedArray(item.children, predicate);
32
- if (found)
33
- return found;
34
- }
35
- }
36
- return null;
37
- }
38
- async dbClickHandler(item, isTreeViewClicked = true) {
39
- if (item.extension)
40
- return;
41
- if (!item?.id)
42
- return;
43
- if (isTreeViewClicked) {
44
- this.treeViewInstant().executeOnTreeNode(item, 'active', true);
45
- this.treeViewInstant().executeOnTreeNode(item, 'expand', true);
46
- }
47
- this.activeFolderId.set(item.id);
48
- const clickedItem = this.findItemInNestedArray(this.allData(), (e) => e.id === item.id);
49
- this.breadcrumbsData.update((prev) => [...prev, clickedItem.text]);
50
- let canPass = true;
51
- this.clickedItems.forEach((e) => {
52
- if (e === item.id)
53
- canPass = false;
54
- });
55
- this.clickedItems.add(item.id);
56
- if (!canPass)
57
- return;
58
- const newChild = await this.dataCallBack()(item.id);
59
- this.allData.update((prev) => {
60
- const copy = [...prev];
61
- const find = this.findItemInNestedArray(copy, (e) => e.id === item.id);
62
- find.children = newChild;
63
- return copy;
64
- });
65
- }
66
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerInternalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
67
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerInternalService }); }
68
- }
69
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerInternalService, decorators: [{
70
- type: Injectable
71
- }] });
72
-
73
- class AXFileExplorerService {
74
- constructor() {
75
- this.internalService = inject(AXFileExplorerInternalService);
76
- }
77
- backButtonHandler() {
78
- this.internalService.breadcrumbsData.update((prev) => {
79
- const copy = [...prev];
80
- if (copy.length !== 1)
81
- copy.pop();
82
- return copy;
83
- });
84
- const parentId = this.internalService.showData()[0].parentId;
85
- const parent = this.internalService.findItemInNestedArray(this.internalService.allData(), (item) => item.id === parentId);
86
- if (parent?.parentId) {
87
- this.internalService.activeFolderId.set(parent.parentId);
88
- }
89
- else {
90
- this.internalService.activeFolderId.set(null);
91
- }
92
- this.internalService.treeViewInstant().executeOnTreeNode(parent, 'active', false);
93
- }
94
- menuToggleHandler() {
95
- this.internalService.treeViewState.update((prev) => !prev);
96
- }
97
- changeViewHandler(v) {
98
- this.internalService.viewMode.set(v);
99
- }
100
- async sortItemHandler(sort) {
101
- await this.internalService.dataCallBack()(this.internalService.activeFolderId(), sort);
102
- }
103
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
104
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerService }); }
105
- }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerService, decorators: [{
107
- type: Injectable
108
- }] });
109
-
110
- class AXFileExplorerContainerComponent {
111
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
112
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: AXFileExplorerContainerComponent, isStandalone: true, selector: "ax-file-explorer-container", providers: [
113
- AXFileExplorerService,
114
- AXFileExplorerInternalService,
115
- { provide: AXComponent, useExisting: AXFileExplorerContainerComponent },
116
- ], ngImport: i0, template: "<ng-content select=\"ax-file-explorer-tree\"></ng-content>\n<ng-content select=\"ax-file-explorer-view\"></ng-content>\n", styles: ["ax-file-explorer-container{display:flex;min-width:30vw;max-height:40vh;overflow:hidden;border:1px solid rgba(var(--ax-sys-color-border-lightest-surface));border-radius:var(--ax-sys-border-radius)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
117
- }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerContainerComponent, decorators: [{
119
- type: Component,
120
- args: [{ selector: 'ax-file-explorer-container', encapsulation: ViewEncapsulation.None, providers: [
121
- AXFileExplorerService,
122
- AXFileExplorerInternalService,
123
- { provide: AXComponent, useExisting: AXFileExplorerContainerComponent },
124
- ], template: "<ng-content select=\"ax-file-explorer-tree\"></ng-content>\n<ng-content select=\"ax-file-explorer-view\"></ng-content>\n", styles: ["ax-file-explorer-container{display:flex;min-width:30vw;max-height:40vh;overflow:hidden;border:1px solid rgba(var(--ax-sys-color-border-lightest-surface));border-radius:var(--ax-sys-border-radius)}\n"] }]
125
- }] });
126
-
127
- class AXFileExplorerHeaderComponent {
128
- constructor() {
129
- this.service = inject(AXFileExplorerService);
130
- this.internalService = inject(AXFileExplorerInternalService);
131
- }
132
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
133
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AXFileExplorerHeaderComponent, isStandalone: true, selector: "ax-file-explorer-header", providers: [{ provide: AXComponent, useExisting: AXFileExplorerHeaderComponent }], ngImport: i0, template: "<ax-toolbar>\n <ax-prefix>\n <ax-button (onClick)=\"service.menuToggleHandler()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-menu\"></ax-icon>\n </ax-button>\n\n <ax-divider></ax-divider>\n\n <ax-button (onClick)=\"service.backButtonHandler()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-up-folder\"></ax-icon>\n </ax-button>\n\n <ax-divider></ax-divider>\n\n <ax-breadcrumbs>\n @if (false) {\n <ng-template #divider> '|' </ng-template>\n }\n @for (item of internalService.breadcrumbsData(); track item; let idx = $last) {\n <ax-breadcrumbs-item [active]=\"idx\">\n <ax-text>{{ item }}</ax-text>\n </ax-breadcrumbs-item>\n }\n </ax-breadcrumbs>\n </ax-prefix>\n\n <ax-suffix>\n <ax-menu openOn=\"click\" [hasArrow]=\"false\">\n <ax-menu-item>\n <ax-text>View</ax-text>\n\n <ax-menu-item (onClick)=\"service.changeViewHandler('ax-large-icon')\">\n <ax-text>Large</ax-text>\n </ax-menu-item>\n\n <ax-menu-item (onClick)=\"service.changeViewHandler('ax-small-icon')\">\n <ax-text>Small</ax-text>\n </ax-menu-item>\n\n <ax-menu-item (onClick)=\"service.changeViewHandler('ax-list-icon')\">\n <ax-text>List</ax-text>\n </ax-menu-item>\n </ax-menu-item>\n </ax-menu>\n\n <ax-divider></ax-divider>\n\n <ax-menu openOn=\"click\" [hasArrow]=\"false\">\n <ax-menu-item>\n <ax-prefix>\n <ax-icon class=\"ax-icon ax-icon-sort\"></ax-icon>\n </ax-prefix>\n <ax-menu-item (onClick)=\"service.sortItemHandler('name')\"> <ax-text>Name</ax-text> </ax-menu-item>\n <ax-menu-item (onClick)=\"service.sortItemHandler('date')\"> <ax-text>Date</ax-text> </ax-menu-item>\n <ax-menu-item (onClick)=\"service.sortItemHandler('type')\"> <ax-text>Type</ax-text> </ax-menu-item>\n </ax-menu-item>\n </ax-menu>\n </ax-suffix>\n</ax-toolbar>\n", styles: ["ax-file-explorer-header ax-toolbar{border-bottom:1px solid rgb(var(--ax-sys-color-border-lightest-surface));width:100%;justify-content:space-between}ax-file-explorer-header ax-toolbar ax-menu.ax-action-list-horizontal{min-width:fit-content}ax-file-explorer-header ax-toolbar ax-prefix{flex-wrap:nowrap}ax-file-explorer-header ax-toolbar .ax-start-toolbar-divider{display:none}\n"], dependencies: [{ kind: "component", type: AXToolBarComponent, selector: "ax-toolbar" }, { 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: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXBreadCrumbsComponent, selector: "ax-breadcrumbs" }, { kind: "component", type: AXBreadCrumbsItemComponent, selector: "ax-breadcrumbs-item", inputs: ["disabled", "active"] }, { kind: "component", type: AXMenuComponent, selector: "ax-menu", inputs: ["orientation", "openOn", "closeOn", "items", "hasArrow"], outputs: ["onItemClick"] }, { kind: "component", type: AXMenuItemComponent, selector: "ax-menu-item", inputs: ["name", "data", "disabled", "color"], outputs: ["onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
134
- }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerHeaderComponent, decorators: [{
136
- type: Component,
137
- args: [{ selector: 'ax-file-explorer-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
138
- AXToolBarComponent,
139
- AXDecoratorGenericComponent,
140
- AXButtonComponent,
141
- AXDecoratorIconComponent,
142
- AXBreadCrumbsComponent,
143
- AXBreadCrumbsItemComponent,
144
- AXMenuComponent,
145
- AXMenuItemComponent,
146
- ], providers: [{ provide: AXComponent, useExisting: AXFileExplorerHeaderComponent }], template: "<ax-toolbar>\n <ax-prefix>\n <ax-button (onClick)=\"service.menuToggleHandler()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-menu\"></ax-icon>\n </ax-button>\n\n <ax-divider></ax-divider>\n\n <ax-button (onClick)=\"service.backButtonHandler()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-up-folder\"></ax-icon>\n </ax-button>\n\n <ax-divider></ax-divider>\n\n <ax-breadcrumbs>\n @if (false) {\n <ng-template #divider> '|' </ng-template>\n }\n @for (item of internalService.breadcrumbsData(); track item; let idx = $last) {\n <ax-breadcrumbs-item [active]=\"idx\">\n <ax-text>{{ item }}</ax-text>\n </ax-breadcrumbs-item>\n }\n </ax-breadcrumbs>\n </ax-prefix>\n\n <ax-suffix>\n <ax-menu openOn=\"click\" [hasArrow]=\"false\">\n <ax-menu-item>\n <ax-text>View</ax-text>\n\n <ax-menu-item (onClick)=\"service.changeViewHandler('ax-large-icon')\">\n <ax-text>Large</ax-text>\n </ax-menu-item>\n\n <ax-menu-item (onClick)=\"service.changeViewHandler('ax-small-icon')\">\n <ax-text>Small</ax-text>\n </ax-menu-item>\n\n <ax-menu-item (onClick)=\"service.changeViewHandler('ax-list-icon')\">\n <ax-text>List</ax-text>\n </ax-menu-item>\n </ax-menu-item>\n </ax-menu>\n\n <ax-divider></ax-divider>\n\n <ax-menu openOn=\"click\" [hasArrow]=\"false\">\n <ax-menu-item>\n <ax-prefix>\n <ax-icon class=\"ax-icon ax-icon-sort\"></ax-icon>\n </ax-prefix>\n <ax-menu-item (onClick)=\"service.sortItemHandler('name')\"> <ax-text>Name</ax-text> </ax-menu-item>\n <ax-menu-item (onClick)=\"service.sortItemHandler('date')\"> <ax-text>Date</ax-text> </ax-menu-item>\n <ax-menu-item (onClick)=\"service.sortItemHandler('type')\"> <ax-text>Type</ax-text> </ax-menu-item>\n </ax-menu-item>\n </ax-menu>\n </ax-suffix>\n</ax-toolbar>\n", styles: ["ax-file-explorer-header ax-toolbar{border-bottom:1px solid rgb(var(--ax-sys-color-border-lightest-surface));width:100%;justify-content:space-between}ax-file-explorer-header ax-toolbar ax-menu.ax-action-list-horizontal{min-width:fit-content}ax-file-explorer-header ax-toolbar ax-prefix{flex-wrap:nowrap}ax-file-explorer-header ax-toolbar .ax-start-toolbar-divider{display:none}\n"] }]
147
- }] });
148
-
149
- class AXFileExplorerItemComponent extends MXBaseComponent {
150
- constructor() {
151
- super(...arguments);
152
- this.data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : []));
153
- this.dbClick = output();
154
- this.viewMode = input(...(ngDevMode ? [undefined, { debugName: "viewMode" }] : []));
155
- }
156
- dbClickHandler() {
157
- this.dbClick.emit();
158
- }
159
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
160
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AXFileExplorerItemComponent, isStandalone: true, selector: "ax-file-explorer-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, viewMode: { classPropertyName: "viewMode", publicName: "viewMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dbClick: "dbClick" }, providers: [{ provide: AXComponent, useExisting: AXFileExplorerItemComponent }], usesInheritance: true, ngImport: i0, template: "@if (viewMode() === 'ax-list-icon') {\n <div class=\"ax-list-icon\" (dblclick)=\"dbClickHandler()\">\n <div class=\"ax-thumb-file\">\n <ax-icon [icon]=\"data().icon\"></ax-icon>\n <ax-text>{{ data().text }}</ax-text>\n </div>\n\n @if (data().extension) {\n <ax-text>\n {{ data().size }}\n </ax-text>\n }\n\n <ax-text>\n {{ data().description }}\n </ax-text>\n\n <ax-text>\n {{ data().lastModify }}\n </ax-text>\n </div>\n} @else {\n <div [ngClass]=\"viewMode()\" (dblclick)=\"dbClickHandler()\">\n <ax-icon [icon]=\"data().icon\"></ax-icon>\n <ax-text>{{ data().text }}</ax-text>\n </div>\n}\n", styles: ["ax-file-explorer-item{-webkit-user-select:none;user-select:none;cursor:pointer}ax-file-explorer-item .ax-large-icon,ax-file-explorer-item .ax-small-icon{display:flex;flex-direction:column;justify-content:center;align-items:center}ax-file-explorer-item .ax-small-icon ax-icon{font-size:.9rem}ax-file-explorer-item .ax-small-icon ax-text{font-size:.7rem}ax-file-explorer-item .ax-large-icon ax-icon{font-size:3rem}ax-file-explorer-item .ax-large-icon ax-text{font-size:.8rem}ax-file-explorer-item .ax-list-icon{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:.1rem;align-items:center;padding:.3rem;border-bottom:1px solid rgb(var(--ax-color-input-border));margin-bottom:.5rem}ax-file-explorer-item .ax-list-icon ax-icon{font-size:1.2rem;margin-inline-end:.5rem}ax-file-explorer-item .ax-list-icon ax-text{font-size:.8rem}ax-file-explorer-item .ax-list-icon .ax-thumb-file{display:flex}ax-file-explorer-item .ax-list-icon .ax-thumb-file ax-text{max-width:5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-file-explorer-item .ax-list-icon>ax-text{color:rgb(var(--ax-color-neutral-500));max-width:10rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;justify-content:center}\n"], dependencies: [{ kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { 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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
161
- }
162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerItemComponent, decorators: [{
163
- type: Component,
164
- args: [{ selector: 'ax-file-explorer-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXDecoratorIconComponent, AXDecoratorGenericComponent, NgClass], providers: [{ provide: AXComponent, useExisting: AXFileExplorerItemComponent }], template: "@if (viewMode() === 'ax-list-icon') {\n <div class=\"ax-list-icon\" (dblclick)=\"dbClickHandler()\">\n <div class=\"ax-thumb-file\">\n <ax-icon [icon]=\"data().icon\"></ax-icon>\n <ax-text>{{ data().text }}</ax-text>\n </div>\n\n @if (data().extension) {\n <ax-text>\n {{ data().size }}\n </ax-text>\n }\n\n <ax-text>\n {{ data().description }}\n </ax-text>\n\n <ax-text>\n {{ data().lastModify }}\n </ax-text>\n </div>\n} @else {\n <div [ngClass]=\"viewMode()\" (dblclick)=\"dbClickHandler()\">\n <ax-icon [icon]=\"data().icon\"></ax-icon>\n <ax-text>{{ data().text }}</ax-text>\n </div>\n}\n", styles: ["ax-file-explorer-item{-webkit-user-select:none;user-select:none;cursor:pointer}ax-file-explorer-item .ax-large-icon,ax-file-explorer-item .ax-small-icon{display:flex;flex-direction:column;justify-content:center;align-items:center}ax-file-explorer-item .ax-small-icon ax-icon{font-size:.9rem}ax-file-explorer-item .ax-small-icon ax-text{font-size:.7rem}ax-file-explorer-item .ax-large-icon ax-icon{font-size:3rem}ax-file-explorer-item .ax-large-icon ax-text{font-size:.8rem}ax-file-explorer-item .ax-list-icon{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:.1rem;align-items:center;padding:.3rem;border-bottom:1px solid rgb(var(--ax-color-input-border));margin-bottom:.5rem}ax-file-explorer-item .ax-list-icon ax-icon{font-size:1.2rem;margin-inline-end:.5rem}ax-file-explorer-item .ax-list-icon ax-text{font-size:.8rem}ax-file-explorer-item .ax-list-icon .ax-thumb-file{display:flex}ax-file-explorer-item .ax-list-icon .ax-thumb-file ax-text{max-width:5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ax-file-explorer-item .ax-list-icon>ax-text{color:rgb(var(--ax-color-neutral-500));max-width:10rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;justify-content:center}\n"] }]
165
- }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], dbClick: [{ type: i0.Output, args: ["dbClick"] }], viewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewMode", required: false }] }] } });
166
-
167
- class AXFileExplorerTreeComponent {
168
- constructor() {
169
- this.internalService = inject(AXFileExplorerInternalService);
170
- this.drawer = viewChild(AXDrawerComponent, ...(ngDevMode ? [{ debugName: "drawer" }] : []));
171
- this.treeView = viewChild(AXTreeViewLegacyComponent, ...(ngDevMode ? [{ debugName: "treeView" }] : []));
172
- this.#effect = effect(() => {
173
- if (this.internalService.treeViewState()) {
174
- this.drawer().open();
175
- }
176
- else {
177
- this.drawer().close();
178
- }
179
- }, ...(ngDevMode ? [{ debugName: "#effect" }] : []));
180
- this.#init = afterNextRender(() => {
181
- this.internalService.treeViewInstant.set(this.treeView());
182
- });
183
- }
184
- #effect;
185
- #init;
186
- openFolderOnViewHandler(e) {
187
- this.internalService.dbClickHandler(e.data, false);
188
- }
189
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
190
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.3", 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: AXTreeViewLegacyComponent, 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-legacy\n (onCollapsedChanged)=\"openFolderOnViewHandler($event)\"\n [showCheckbox]=\"false\"\n hasChildField=\"hasChild\"\n [items]=\"internalService.dataCallBack()\"\n ></ax-tree-view-legacy>\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", "transition", "closeOnBackdropClick", "backdropClass", "collapsed", "singleOpenMode"], outputs: ["onBackdropClick", "collapsedStateChanged"] }, { 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: AXTreeViewLegacyComponent, selector: "ax-tree-view-legacy", inputs: ["items", "showCheckbox", "hasCheckboxField", "selectionMode", "selectionBehavior", "selectionScope", "focusNodeEnabled", "valueField", "textField", "visibleField", "disableField", "hasChildField", "selectedField", "expandedField", "tooltipField", "childrenField", "activeField", "indeterminateField", "parentField", "iconField", "toggleIcons", "look", "showEmptyNodeMassage", "itemTemplate", "emptyTemplate", "expandOn"], outputs: ["onSelectionChanged", "onItemSelectedChanged", "onNodeClick", "onCollapsedChanged", "onNodedbClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
191
- }
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerTreeComponent, decorators: [{
193
- type: Component,
194
- args: [{ selector: 'ax-file-explorer-tree', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
195
- AXDrawerContainerComponent,
196
- NgClass,
197
- NgStyle,
198
- AXDrawerComponent,
199
- AXDecoratorGenericComponent,
200
- AXTreeViewLegacyComponent,
201
- ], providers: [{ provide: AXComponent, useExisting: AXFileExplorerTreeComponent }], 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-legacy\n (onCollapsedChanged)=\"openFolderOnViewHandler($event)\"\n [showCheckbox]=\"false\"\n hasChildField=\"hasChild\"\n [items]=\"internalService.dataCallBack()\"\n ></ax-tree-view-legacy>\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"] }]
202
- }], propDecorators: { drawer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXDrawerComponent), { isSignal: true }] }], treeView: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXTreeViewLegacyComponent), { isSignal: true }] }] } });
203
-
204
- class AXFileExplorerViewComponent {
205
- constructor() {
206
- this.dataCallBack = input.required(...(ngDevMode ? [{ debugName: "dataCallBack" }] : []));
207
- this.contextMenu = viewChild(AXContextMenuComponent, ...(ngDevMode ? [{ debugName: "contextMenu" }] : []));
208
- this.internalService = inject(AXFileExplorerInternalService);
209
- this.#init = effect(() => {
210
- this.setInitialAllData();
211
- this.internalService.dataCallBack.set(this.dataCallBack());
212
- }, ...(ngDevMode ? [{ debugName: "#init" }] : []));
213
- this.#effect2 = effect(() => {
214
- if (this.internalService.activeFolderId()) {
215
- const result = this.internalService.findItemInNestedArray(this.internalService.allData(), (item) => item.id === this.internalService.activeFolderId());
216
- this.internalService.showData.set(result.children);
217
- }
218
- else {
219
- this.internalService.showData.set(this.internalService.allData());
220
- }
221
- setTimeout(() => {
222
- this.contextMenu().refresh();
223
- });
224
- }, ...(ngDevMode ? [{ debugName: "#effect2" }] : []));
225
- }
226
- #init;
227
- #effect2;
228
- async setInitialAllData() {
229
- const rootData = await this.dataCallBack()();
230
- this.internalService.allData.set(rootData);
231
- }
232
- handleContextMenuOpening(e) {
233
- const target = e.targetElement['__axContext__'];
234
- const items = [{ text: 'open', data: target }, { text: 'delete', data: target }];
235
- e.items.push(...items);
236
- // if (items.length) {
237
- // e.items.push(...items);
238
- // } else {
239
- // e.canceled = true;
240
- // }
241
- }
242
- handleContextMenuItemClick(e) {
243
- this.internalService.dbClickHandler(e.item.data.data());
244
- }
245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
246
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: AXFileExplorerViewComponent, isStandalone: true, selector: "ax-file-explorer-view", inputs: { dataCallBack: { classPropertyName: "dataCallBack", publicName: "dataCallBack", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXFileExplorerViewComponent }], viewQueries: [{ propertyName: "contextMenu", first: true, predicate: AXContextMenuComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content select=\"ax-file-explorer-header\"></ng-content>\n\n<div [ngClass]=\"internalService.viewMode()\" class=\"ax-file-container\">\n @for (item of internalService.showData(); track item.id) {\n <ax-file-explorer-item\n id=\"ax-file-explore-item-ref\"\n (dbClick)=\"internalService.dbClickHandler(item)\"\n [data]=\"item\"\n [viewMode]=\"internalService.viewMode()\"\n ></ax-file-explorer-item>\n }\n</div>\n<ax-context-menu\n target=\"#ax-file-explore-item-ref\"\n orientation=\"vertical\"\n (onOpening)=\"handleContextMenuOpening($event)\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n>\n</ax-context-menu>\n", styles: ["ax-file-explorer-view{flex-grow:1;overflow:hidden}ax-file-explorer-view .ax-file-container.ax-large-icon,ax-file-explorer-view .ax-file-container.ax-small-icon{display:flex;flex-wrap:wrap;padding:.5rem;overflow:auto;gap:.6rem}ax-file-explorer-view .ax-file-container.ax-list-icon{overflow:auto;height:100%;padding:.5rem}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AXFileExplorerItemComponent, selector: "ax-file-explorer-item", inputs: ["data", "viewMode"], outputs: ["dbClick"] }, { kind: "component", type: AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "items", "target"], outputs: ["onItemClick", "onOpening", "onClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
247
- }
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerViewComponent, decorators: [{
249
- type: Component,
250
- args: [{ selector: 'ax-file-explorer-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass, AXFileExplorerItemComponent, AXContextMenuComponent], providers: [{ provide: AXComponent, useExisting: AXFileExplorerViewComponent }], template: "<ng-content select=\"ax-file-explorer-header\"></ng-content>\n\n<div [ngClass]=\"internalService.viewMode()\" class=\"ax-file-container\">\n @for (item of internalService.showData(); track item.id) {\n <ax-file-explorer-item\n id=\"ax-file-explore-item-ref\"\n (dbClick)=\"internalService.dbClickHandler(item)\"\n [data]=\"item\"\n [viewMode]=\"internalService.viewMode()\"\n ></ax-file-explorer-item>\n }\n</div>\n<ax-context-menu\n target=\"#ax-file-explore-item-ref\"\n orientation=\"vertical\"\n (onOpening)=\"handleContextMenuOpening($event)\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n>\n</ax-context-menu>\n", styles: ["ax-file-explorer-view{flex-grow:1;overflow:hidden}ax-file-explorer-view .ax-file-container.ax-large-icon,ax-file-explorer-view .ax-file-container.ax-small-icon{display:flex;flex-wrap:wrap;padding:.5rem;overflow:auto;gap:.6rem}ax-file-explorer-view .ax-file-container.ax-list-icon{overflow:auto;height:100%;padding:.5rem}\n"] }]
251
- }], propDecorators: { dataCallBack: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataCallBack", required: true }] }], contextMenu: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXContextMenuComponent), { isSignal: true }] }] } });
252
-
253
- const COMPONENT = [
254
- AXFileExplorerContainerComponent,
255
- AXFileExplorerViewComponent,
256
- AXFileExplorerItemComponent,
257
- AXFileExplorerHeaderComponent,
258
- AXFileExplorerTreeComponent,
259
- ];
260
- const MODULES = [
261
- AXDecoratorModule,
262
- AXButtonModule,
263
- AXBreadcrumbsModule,
264
- CommonModule,
265
- AXToolBarModule,
266
- AXMenuModule,
267
- AXDrawerModule,
268
- AXTreeViewLegacyModule,
269
- ];
270
- class AXFileExplorerModule {
271
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
272
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerModule, imports: [AXDecoratorModule,
273
- AXButtonModule,
274
- AXBreadcrumbsModule,
275
- CommonModule,
276
- AXToolBarModule,
277
- AXMenuModule,
278
- AXDrawerModule,
279
- AXTreeViewLegacyModule, AXFileExplorerContainerComponent,
280
- AXFileExplorerViewComponent,
281
- AXFileExplorerItemComponent,
282
- AXFileExplorerHeaderComponent,
283
- AXFileExplorerTreeComponent], exports: [AXFileExplorerContainerComponent,
284
- AXFileExplorerViewComponent,
285
- AXFileExplorerItemComponent,
286
- AXFileExplorerHeaderComponent,
287
- AXFileExplorerTreeComponent] }); }
288
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerModule, imports: [MODULES, AXFileExplorerViewComponent,
289
- AXFileExplorerItemComponent,
290
- AXFileExplorerHeaderComponent,
291
- AXFileExplorerTreeComponent] }); }
292
- }
293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFileExplorerModule, decorators: [{
294
- type: NgModule,
295
- args: [{
296
- imports: [...MODULES, ...COMPONENT],
297
- exports: [...COMPONENT],
298
- providers: [],
299
- }]
300
- }] });
301
-
302
- /**
303
- * Generated bundle index. Do not edit.
304
- */
305
-
306
- export { AXFileExplorerContainerComponent, AXFileExplorerHeaderComponent, AXFileExplorerItemComponent, AXFileExplorerModule, AXFileExplorerService, AXFileExplorerTreeComponent, AXFileExplorerViewComponent };
307
- //# sourceMappingURL=acorex-components-file-explorer.mjs.map