@acorex/components 21.0.0-next.3 → 21.0.0-next.31
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/accordion/index.d.ts +0 -1
- package/autocomplete/index.d.ts +23 -9
- package/button/index.d.ts +38 -17
- package/chips/index.d.ts +3 -8
- package/code-editor/README.md +291 -1
- package/code-editor/index.d.ts +260 -12
- package/command/index.d.ts +1 -0
- package/conversation2/README.md +426 -0
- package/conversation2/index.d.ts +6139 -0
- package/data-table/index.d.ts +79 -7
- package/dialog/index.d.ts +1 -1
- package/drawer/README.md +2 -2
- package/drawer/index.d.ts +33 -57
- package/drawer-legacy/README.md +3 -0
- package/drawer-legacy/index.d.ts +86 -0
- package/editor/README.md +3 -0
- package/editor/index.d.ts +79 -0
- package/fesm2022/acorex-components-accordion.mjs +19 -24
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +12 -12
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +14 -14
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-aspect-ratio.mjs +4 -4
- package/fesm2022/acorex-components-aspect-ratio.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs +12 -11
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-autocomplete.mjs +30 -13
- package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +13 -13
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +10 -10
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +12 -12
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-breadcrumbs.mjs +12 -12
- package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/acorex-components-button-group.mjs +17 -19
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +78 -29
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +18 -18
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +11 -11
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-chips.mjs +12 -14
- package/fesm2022/acorex-components-chips.mjs.map +1 -1
- package/fesm2022/acorex-components-circular-progress.mjs +13 -11
- package/fesm2022/acorex-components-circular-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-code-editor.mjs +494 -162
- package/fesm2022/acorex-components-code-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-collapse.mjs +13 -28
- package/fesm2022/acorex-components-collapse.mjs.map +1 -1
- package/fesm2022/acorex-components-color-box.mjs +11 -11
- package/fesm2022/acorex-components-color-box.mjs.map +1 -1
- package/fesm2022/acorex-components-color-palette.mjs +32 -32
- package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
- package/fesm2022/acorex-components-command.mjs +18 -11
- package/fesm2022/acorex-components-command.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +34 -34
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +56 -65
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation2.mjs +17641 -0
- package/fesm2022/acorex-components-conversation2.mjs.map +1 -0
- package/fesm2022/acorex-components-cron-job.mjs +53 -53
- package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
- package/fesm2022/acorex-components-data-list.mjs +5 -5
- package/fesm2022/acorex-components-data-list.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs +53 -41
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +462 -105
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +10 -10
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +8 -8
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +11 -11
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +96 -54
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +26 -16
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer-legacy.mjs +218 -0
- package/fesm2022/acorex-components-drawer-legacy.mjs.map +1 -0
- package/fesm2022/acorex-components-drawer.mjs +66 -150
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown-button.mjs +9 -9
- package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +18 -16
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-editor.mjs +195 -0
- package/fesm2022/acorex-components-editor.mjs.map +1 -0
- package/fesm2022/acorex-components-file-explorer.mjs +28 -28
- package/fesm2022/acorex-components-file-explorer.mjs.map +1 -1
- package/fesm2022/acorex-components-flow-chart.mjs +18 -18
- package/fesm2022/acorex-components-flow-chart.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +52 -35
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +14 -15
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-image-editor.mjs +166 -126
- package/fesm2022/acorex-components-image-editor.mjs.map +1 -1
- package/fesm2022/acorex-components-image.mjs +10 -10
- package/fesm2022/acorex-components-image.mjs.map +1 -1
- package/fesm2022/acorex-components-json-viewer.mjs +9 -9
- package/fesm2022/acorex-components-json-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-kanban.mjs +9 -7
- package/fesm2022/acorex-components-kanban.mjs.map +1 -1
- package/fesm2022/acorex-components-kbd.mjs +8 -8
- package/fesm2022/acorex-components-kbd.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +9 -9
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +10 -10
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +22 -13
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-loading.mjs +23 -23
- package/fesm2022/acorex-components-loading.mjs.map +1 -1
- package/fesm2022/acorex-components-map.mjs +16 -15
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +78 -97
- package/fesm2022/acorex-components-media-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +24 -24
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/{acorex-components-modal-acorex-components-modal-h5Y-qcbh.mjs → acorex-components-modal-acorex-components-modal-BmmAkCKJ.mjs} +24 -24
- package/fesm2022/acorex-components-modal-acorex-components-modal-BmmAkCKJ.mjs.map +1 -0
- package/fesm2022/acorex-components-modal-modal-content.component-5GqTzNOs.mjs +214 -0
- package/fesm2022/acorex-components-modal-modal-content.component-5GqTzNOs.mjs.map +1 -0
- package/fesm2022/acorex-components-modal.mjs +1 -1
- package/fesm2022/acorex-components-navbar.mjs +9 -9
- package/fesm2022/acorex-components-navbar.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +16 -23
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box-legacy.mjs +412 -0
- package/fesm2022/acorex-components-number-box-legacy.mjs.map +1 -0
- package/fesm2022/acorex-components-number-box.mjs +98 -331
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +10 -10
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-page.mjs +10 -10
- package/fesm2022/acorex-components-page.mjs.map +1 -1
- package/fesm2022/acorex-components-paint.mjs +35 -40
- package/fesm2022/acorex-components-paint.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +13 -13
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-pdf-reader.mjs +8 -8
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +10 -10
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-picker.mjs +17 -17
- package/fesm2022/acorex-components-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +12 -12
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +13 -13
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-progress-bar.mjs +11 -9
- package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
- package/fesm2022/acorex-components-qrcode.mjs +8 -8
- package/fesm2022/acorex-components-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-components-query-builder.mjs +9 -9
- package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +7 -7
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-rail-navigation.mjs +40 -38
- package/fesm2022/acorex-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +11 -11
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +20 -35
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-rest-api-generator.mjs +23 -23
- package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
- package/fesm2022/acorex-components-result.mjs +8 -8
- package/fesm2022/acorex-components-result.mjs.map +1 -1
- package/fesm2022/acorex-components-routing-progress.mjs +8 -8
- package/fesm2022/acorex-components-routing-progress.mjs.map +1 -1
- package/fesm2022/acorex-components-rrule.mjs +111 -16
- package/fesm2022/acorex-components-rrule.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler-picker.mjs +2339 -0
- package/fesm2022/acorex-components-scheduler-picker.mjs.map +1 -0
- package/fesm2022/acorex-components-scheduler.mjs +52 -52
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-scss.mjs +4 -4
- package/fesm2022/acorex-components-scss.mjs.map +1 -1
- package/fesm2022/acorex-components-search-box.mjs +23 -12
- package/fesm2022/acorex-components-search-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +36 -17
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +10 -10
- package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +10 -10
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +31 -38
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-skeleton.mjs +8 -8
- package/fesm2022/acorex-components-skeleton.mjs.map +1 -1
- package/fesm2022/acorex-components-slider.mjs +11 -11
- package/fesm2022/acorex-components-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-sliding-item.mjs +17 -17
- package/fesm2022/acorex-components-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-components-step-wizard.mjs +16 -16
- package/fesm2022/acorex-components-step-wizard.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +14 -14
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +20 -16
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +51 -21
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-tag.mjs +47 -11
- package/fesm2022/acorex-components-tag.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +9 -9
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-text-box.mjs +13 -13
- package/fesm2022/acorex-components-text-box.mjs.map +1 -1
- package/fesm2022/acorex-components-time-duration.mjs +54 -14
- package/fesm2022/acorex-components-time-duration.mjs.map +1 -1
- package/fesm2022/acorex-components-time-line.mjs +14 -29
- package/fesm2022/acorex-components-time-line.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +14 -14
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-toolbar.mjs +9 -9
- package/fesm2022/acorex-components-toolbar.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +12 -12
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +16 -45
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/fesm2022/acorex-components-tree2.mjs +689 -0
- package/fesm2022/acorex-components-tree2.mjs.map +1 -0
- package/fesm2022/acorex-components-uploader.mjs +28 -641
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-video-player.mjs +8 -8
- package/fesm2022/acorex-components-video-player.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +213 -462
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/form/index.d.ts +3 -3
- package/grid-layout-builder/index.d.ts +1 -2
- package/image-editor/index.d.ts +8 -5
- package/loading/index.d.ts +1 -1
- package/media-viewer/index.d.ts +2 -3
- package/notification/index.d.ts +0 -2
- package/number-box/README.md +2 -2
- package/number-box/index.d.ts +31 -171
- package/number-box-legacy/README.md +3 -0
- package/number-box-legacy/index.d.ts +191 -0
- package/package.json +53 -26
- package/paint/index.d.ts +1 -6
- package/phone-box/index.d.ts +4 -4
- package/rate-picker/index.d.ts +5 -15
- package/rrule/index.d.ts +96 -1
- package/scheduler-picker/README.md +15 -0
- package/scheduler-picker/index.d.ts +1360 -0
- package/search-box/index.d.ts +6 -1
- package/select-box/index.d.ts +15 -10
- package/side-menu/index.d.ts +3 -2
- package/tag/index.d.ts +8 -2
- package/tag-box/index.d.ts +12 -3
- package/time-duration/index.d.ts +19 -3
- package/tree2/README.md +3 -0
- package/tree2/index.d.ts +337 -0
- package/uploader/index.d.ts +4 -331
- package/wysiwyg/index.d.ts +57 -159
- package/drawer-2/README.md +0 -3
- package/drawer-2/index.d.ts +0 -62
- package/fesm2022/acorex-components-drawer-2.mjs +0 -134
- package/fesm2022/acorex-components-drawer-2.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-acorex-components-modal-h5Y-qcbh.mjs.map +0 -1
- package/fesm2022/acorex-components-modal-modal-content.component-B6tyMLdU.mjs +0 -235
- package/fesm2022/acorex-components-modal-modal-content.component-B6tyMLdU.mjs.map +0 -1
- package/fesm2022/acorex-components-number-box-2.mjs +0 -183
- package/fesm2022/acorex-components-number-box-2.mjs.map +0 -1
- package/number-box-2/README.md +0 -3
- package/number-box-2/index.d.ts +0 -41
|
@@ -0,0 +1,218 @@
|
|
|
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: "20.3.12", ngImport: i0, type: AXDrawerLegacyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerLegacyService }); }
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", 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: "20.3.12", ngImport: i0, type: AXDrawerLegacyContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", 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: "20.3.12", 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: "20.3.12", ngImport: i0, type: AXDrawerLegacyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.12", 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: "20.3.12", 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: "20.3.12", ngImport: i0, type: AXDrawerLegacyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
201
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerLegacyModule, imports: [CommonModule, AXDrawerLegacyComponent, AXDrawerLegacyContainerComponent], exports: [AXDrawerLegacyComponent, AXDrawerLegacyContainerComponent] }); }
|
|
202
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerLegacyModule, imports: [MODULES] }); }
|
|
203
|
+
}
|
|
204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", 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
|
|
@@ -0,0 +1 @@
|
|
|
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;+GAFY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAArB,qBAAqB,EAAA,CAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC;;;ACED;;;AAGG;AAYG,MAAO,gCAAiC,SAAQ,eAAe,CAAA;AAGnE,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;A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AAA;+GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAApB,oBAAoB,EAAA,OAAA,EAAA,CAPhB,YAAY,EADV,uBAAuB,EAAE,gCAAgC,CAAA,EAAA,OAAA,EAAA,CAAzD,uBAAuB,EAAE,gCAAgC,CAAA,EAAA,CAAA,CAAA;AAQ/D,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,oBAAoB,YAJlB,OAAO,CAAA,EAAA,CAAA,CAAA;;4FAIT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,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,47 +1,31 @@
|
|
|
1
1
|
import { MXBaseComponent, AXComponent, AXClosableComponent } from '@acorex/cdk/common';
|
|
2
|
+
import * as i1 from '@acorex/cdk/drawer';
|
|
3
|
+
import { AXDrawerContainerDirective, AXDrawerItemDirective } from '@acorex/cdk/drawer';
|
|
2
4
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { isBrowser } from '@acorex/core/platform';
|
|
5
|
-
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
6
|
-
|
|
7
|
-
class AXDrawerService {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.drawerElements = signal(null, ...(ngDevMode ? [{ debugName: "drawerElements" }] : []));
|
|
10
|
-
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDrawerService }); }
|
|
13
|
-
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXDrawerService, decorators: [{
|
|
15
|
-
type: Injectable
|
|
16
|
-
}] });
|
|
5
|
+
import { afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component, input, output, inject, effect, NgModule } from '@angular/core';
|
|
17
6
|
|
|
18
7
|
/**
|
|
19
8
|
* A container component that organizes and positions drawer components.
|
|
20
9
|
* @category component
|
|
21
10
|
*/
|
|
22
11
|
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: "20.3.3", ngImport: i0, type: AXDrawerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: AXDrawerContainerComponent, isStandalone: true, selector: "ax-drawer-container", providers: [AXDrawerService, { provide: AXComponent, useExisting: AXDrawerContainerComponent }], usesInheritance: true, ngImport: i0, template: `
|
|
12
|
+
#init = afterNextRender(() => {
|
|
13
|
+
const host = this.getHostElement();
|
|
14
|
+
Array.from(host.querySelectorAll(`ax-drawer`)).map((c) => c['__axContext__']);
|
|
15
|
+
});
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXDrawerContainerComponent, isStandalone: true, selector: "ax-drawer-container", providers: [{ provide: AXComponent, useExisting: AXDrawerContainerComponent }], usesInheritance: true, hostDirectives: [{ directive: i1.AXDrawerContainerDirective }], ngImport: i0, template: `
|
|
34
18
|
<ng-content select="ax-drawer"> </ng-content>
|
|
35
|
-
<ng-content select="ax-content"
|
|
36
|
-
`, isInline: true, styles: ["ax-drawer-container{
|
|
19
|
+
<ng-content select="ax-content"> </ng-content>
|
|
20
|
+
`, isInline: true, styles: ["ax-drawer-container{width:100%;height:100%;z-index:10}ax-drawer-container>ax-content{height:100%;flex:1 1 0%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
37
21
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerContainerComponent, decorators: [{
|
|
39
23
|
type: Component,
|
|
40
24
|
args: [{ selector: 'ax-drawer-container', template: `
|
|
41
25
|
<ng-content select="ax-drawer"> </ng-content>
|
|
42
|
-
<ng-content select="ax-content"
|
|
43
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
44
|
-
}]
|
|
26
|
+
<ng-content select="ax-content"> </ng-content>
|
|
27
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ 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%}\n"] }]
|
|
28
|
+
}] });
|
|
45
29
|
|
|
46
30
|
/**
|
|
47
31
|
* A component that represents a drawer with header and content sections.
|
|
@@ -51,136 +35,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
51
35
|
class AXDrawerComponent extends MXBaseComponent {
|
|
52
36
|
constructor() {
|
|
53
37
|
super(...arguments);
|
|
54
|
-
this.location =
|
|
38
|
+
this.location = input('start', ...(ngDevMode ? [{ debugName: "location" }] : []));
|
|
55
39
|
this.showBackdrop = input(true, ...(ngDevMode ? [{ debugName: "showBackdrop" }] : []));
|
|
56
|
-
this.mode =
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
40
|
+
this.mode = input('overlay', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
41
|
+
this.transition = input(100, ...(ngDevMode ? [{ debugName: "transition" }] : []));
|
|
42
|
+
this.closeOnBackdropClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnBackdropClick" }] : []));
|
|
43
|
+
this.backdropClass = input('ax-bg-black/45', ...(ngDevMode ? [{ debugName: "backdropClass" }] : []));
|
|
44
|
+
this.collapsed = input(true, ...(ngDevMode ? [{ debugName: "collapsed" }] : []));
|
|
45
|
+
this.singleOpenMode = input(true, ...(ngDevMode ? [{ debugName: "singleOpenMode" }] : []));
|
|
46
|
+
this.onBackdropClick = output();
|
|
47
|
+
this.collapsedStateChanged = output();
|
|
48
|
+
this.drawerItem = inject(AXDrawerItemDirective);
|
|
65
49
|
this.#eff = effect(() => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
50
|
+
this.drawerItem.mode.set(this.mode());
|
|
51
|
+
this.drawerItem.transition.set(this.transition());
|
|
52
|
+
this.drawerItem.backdropClass.set(this.backdropClass());
|
|
53
|
+
this.drawerItem.closeOnBackdropClick.set(this.closeOnBackdropClick());
|
|
54
|
+
this.drawerItem.location.set(this.location());
|
|
55
|
+
this.drawerItem.backDrop.set(this.showBackdrop());
|
|
56
|
+
this.drawerItem.collapsed.set(this.collapsed());
|
|
57
|
+
this.drawerItem.singleOpenMode.set(this.singleOpenMode());
|
|
74
58
|
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
}
|
|
59
|
+
this.#init = afterNextRender(() => {
|
|
60
|
+
this.drawerItem.onBackdropClick.subscribe((event) => {
|
|
61
|
+
this.onBackdropClick.emit({ nativeEvent: event, component: this });
|
|
62
|
+
});
|
|
63
|
+
this.drawerItem.collapseStateChanged.subscribe((event) => {
|
|
64
|
+
this.collapsedStateChanged.emit(event);
|
|
65
|
+
});
|
|
101
66
|
});
|
|
102
67
|
}
|
|
68
|
+
#eff;
|
|
69
|
+
#init;
|
|
103
70
|
/**
|
|
104
|
-
* Toggles the
|
|
71
|
+
* Toggles the drawer state between open and closed.
|
|
72
|
+
*
|
|
73
|
+
* @returns void - No return value. The drawer state is toggled.
|
|
105
74
|
*/
|
|
106
75
|
toggle() {
|
|
107
|
-
|
|
108
|
-
this.open();
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
this.close();
|
|
112
|
-
}
|
|
76
|
+
this.drawerItem.toggle();
|
|
113
77
|
}
|
|
114
78
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
79
|
+
* Closes the drawer.
|
|
80
|
+
*
|
|
81
|
+
* @returns void - No return value. The drawer is collapsed.
|
|
117
82
|
*/
|
|
118
83
|
close() {
|
|
119
|
-
this.
|
|
84
|
+
this.drawerItem.hide();
|
|
120
85
|
}
|
|
121
86
|
/**
|
|
122
|
-
*
|
|
87
|
+
* Opens the drawer.
|
|
88
|
+
*
|
|
89
|
+
* @returns void - No return value. The drawer is expanded.
|
|
123
90
|
*/
|
|
124
91
|
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'}`;
|
|
92
|
+
this.drawerItem.show();
|
|
173
93
|
}
|
|
174
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
175
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
94
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
95
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.12", 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 }, 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 }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, singleOpenMode: { classPropertyName: "singleOpenMode", publicName: "singleOpenMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onBackdropClick: "onBackdropClick", collapsedStateChanged: "collapsedStateChanged" }, providers: [
|
|
176
96
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
|
177
97
|
{ provide: AXClosableComponent, useExisting: AXDrawerComponent },
|
|
178
|
-
], usesInheritance: true, ngImport: i0, template: `
|
|
98
|
+
], usesInheritance: true, hostDirectives: [{ directive: i1.AXDrawerItemDirective }], ngImport: i0, template: `
|
|
179
99
|
<ng-content select="ax-header"></ng-content>
|
|
180
100
|
<ng-content select="ax-content"></ng-content>
|
|
181
|
-
`, isInline: true, styles: ["ax-drawer
|
|
101
|
+
`, isInline: true, styles: ["ax-drawer>ax-content{flex:1 1 0%;width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
182
102
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerComponent, decorators: [{
|
|
184
104
|
type: Component,
|
|
185
105
|
args: [{ selector: 'ax-drawer', template: `
|
|
186
106
|
<ng-content select="ax-header"></ng-content>
|
|
@@ -188,23 +108,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
188
108
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
189
109
|
{ provide: AXComponent, useExisting: AXDrawerComponent },
|
|
190
110
|
{ provide: AXClosableComponent, useExisting: AXDrawerComponent },
|
|
191
|
-
], styles: ["ax-drawer
|
|
192
|
-
}], propDecorators: {
|
|
193
|
-
type: HostBinding,
|
|
194
|
-
args: ['class']
|
|
195
|
-
}] } });
|
|
111
|
+
], hostDirectives: [AXDrawerItemDirective], styles: ["ax-drawer>ax-content{flex:1 1 0%;width:100%;height:100%}\n"] }]
|
|
112
|
+
}], propDecorators: { location: [{ type: i0.Input, args: [{ isSignal: true, alias: "location", required: false }] }], showBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackdrop", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], transition: [{ type: i0.Input, args: [{ isSignal: true, alias: "transition", required: false }] }], closeOnBackdropClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnBackdropClick", required: false }] }], backdropClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdropClass", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }], singleOpenMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "singleOpenMode", required: false }] }], onBackdropClick: [{ type: i0.Output, args: ["onBackdropClick"] }], collapsedStateChanged: [{ type: i0.Output, args: ["collapsedStateChanged"] }] } });
|
|
196
113
|
|
|
197
114
|
const COMPONENT = [AXDrawerComponent, AXDrawerContainerComponent];
|
|
198
|
-
const MODULES = [CommonModule];
|
|
199
115
|
class AXDrawerModule {
|
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
201
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
202
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
117
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerModule, imports: [AXDrawerComponent, AXDrawerContainerComponent], exports: [AXDrawerComponent, AXDrawerContainerComponent] }); }
|
|
118
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerModule }); }
|
|
203
119
|
}
|
|
204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXDrawerModule, decorators: [{
|
|
205
121
|
type: NgModule,
|
|
206
122
|
args: [{
|
|
207
|
-
imports: [...
|
|
123
|
+
imports: [...COMPONENT],
|
|
208
124
|
exports: [...COMPONENT],
|
|
209
125
|
providers: [],
|
|
210
126
|
}]
|