@acorex/components 21.0.0-next.4 → 21.0.0-next.40
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/button-group/index.d.ts +6 -4
- package/calendar/index.d.ts +4 -0
- 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 +25 -21
- package/fesm2022/acorex-components-button-group.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +68 -28
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +33 -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 +56 -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 +10 -10
- 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 +20 -18
- 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 +34 -34
- 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 +62 -37
- 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 +206 -156
- 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 +29 -11
- 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 +23 -14
- 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 +290 -31
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-media-viewer.mjs +83 -82
- 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-CjHPRiZD.mjs} +24 -24
- package/fesm2022/acorex-components-modal-acorex-components-modal-CjHPRiZD.mjs.map +1 -0
- package/fesm2022/acorex-components-modal-modal-content.component-j-bS0WGj.mjs +214 -0
- package/fesm2022/acorex-components-modal-modal-content.component-j-bS0WGj.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 +112 -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 +9 -9
- package/fesm2022/acorex-components-pdf-reader.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +47 -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 +12 -12
- 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 +28 -20
- 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-legacy.mjs +511 -0
- package/fesm2022/acorex-components-tree-view-legacy.mjs.map +1 -0
- package/fesm2022/acorex-components-tree-view.mjs +1668 -424
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- 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/file-explorer/index.d.ts +6 -6
- package/form/index.d.ts +3 -3
- package/grid-layout-builder/index.d.ts +1 -2
- package/image-editor/index.d.ts +11 -13
- package/kbd/index.d.ts +13 -7
- package/loading/index.d.ts +1 -1
- package/map/index.d.ts +28 -1
- package/media-viewer/index.d.ts +2 -1
- package/notification/index.d.ts +0 -2
- package/number-box/README.md +2 -2
- package/number-box/index.d.ts +32 -171
- package/number-box-legacy/README.md +3 -0
- package/number-box-legacy/index.d.ts +191 -0
- package/package.json +41 -14
- package/paint/index.d.ts +1 -6
- package/phone-box/index.d.ts +5 -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/tree-view/index.d.ts +658 -168
- package/tree-view-legacy/README.md +3 -0
- package/tree-view-legacy/index.d.ts +184 -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
package/tree-view/index.d.ts
CHANGED
|
@@ -1,184 +1,674 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { AXPlatform } from '@acorex/core/platform';
|
|
6
|
-
import * as i3 from '@angular/common';
|
|
7
|
-
import * as i5 from '@acorex/components/decorators';
|
|
8
|
-
import * as i6 from '@acorex/components/check-box';
|
|
9
|
-
import * as i7 from '@acorex/components/form';
|
|
10
|
-
import * as i8 from '@angular/forms';
|
|
11
|
-
import * as i9 from '@acorex/components/tooltip';
|
|
12
|
-
import * as i10 from '@acorex/components/loading';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { AXEvent, AXHtmlEvent, AXValueChangedEvent } from '@acorex/cdk/common';
|
|
4
|
+
import { AXDropListDroppedEvent } from '@acorex/cdk/drag-drop';
|
|
13
5
|
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
/**
|
|
7
|
+
* TreeView Component - Design Tokens
|
|
8
|
+
*
|
|
9
|
+
* The component supports the following CSS custom properties (design tokens):
|
|
10
|
+
*
|
|
11
|
+
* **Layout & Spacing:**
|
|
12
|
+
* - `--ax-comp-tree-view-indent-size`: Indentation size for each tree level.
|
|
13
|
+
* Default: `12px`
|
|
14
|
+
* - `--ax-comp-tree-view-node-margin`: Vertical margin between nodes.
|
|
15
|
+
* Default: `0.125rem`
|
|
16
|
+
*
|
|
17
|
+
* **Node Styling:**
|
|
18
|
+
* - `--ax-comp-tree-view-node-border-radius`: Border radius for tree nodes.
|
|
19
|
+
* Default: `6px`
|
|
20
|
+
* - `--ax-comp-tree-view-node-hover-bg`: Background color on node hover.
|
|
21
|
+
* Default: `rgba(var(--ax-sys-color-on-lightest-surface), 0.04)`
|
|
22
|
+
* - `--ax-comp-tree-view-node-selected-bg`: Background color for selected nodes.
|
|
23
|
+
* Default: `rgba(var(--ax-sys-color-primary-500), 0.12)`
|
|
24
|
+
*
|
|
25
|
+
* **Tree Lines (with-line look):**
|
|
26
|
+
* - `--ax-comp-tree-view-line-color`: Color for tree structure lines.
|
|
27
|
+
* Default: `rgba(var(--ax-sys-color-on-lightest-surface), 0.15)`
|
|
28
|
+
*
|
|
29
|
+
* **Drag & Drop:**
|
|
30
|
+
* - `--ax-comp-tree-view-drag-preview-opacity`: Opacity of dragged element preview.
|
|
31
|
+
* Default: `0.9`
|
|
32
|
+
* - `--ax-comp-tree-view-drag-placeholder-bg`: Background for drag placeholder.
|
|
33
|
+
* Default: `rgba(var(--ax-sys-color-on-lightest-surface), 0.02)`
|
|
34
|
+
* - `--ax-comp-tree-view-drop-active-bg`: Background when hovering over valid drop zone.
|
|
35
|
+
* Default: `rgba(var(--ax-sys-color-primary-500), 0.08)`
|
|
36
|
+
* - `--ax-comp-tree-view-drop-active-outline`: Outline color for active drop zones.
|
|
37
|
+
* Default: `rgba(var(--ax-sys-color-primary-500), 0.3)`
|
|
38
|
+
*
|
|
39
|
+
* **Dynamic Tokens (set via TypeScript):**
|
|
40
|
+
* - `--ax-tree-view-indent-size`: Dynamically set from `indentSize` input
|
|
41
|
+
* - `--ax-tree-view-line-offset`: Dynamically calculated as `indentSize / 2`
|
|
42
|
+
* - `--ax-tree-view-line-color`: Optional override for line color
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```css
|
|
46
|
+
* // Customize tree appearance
|
|
47
|
+
* ax-tree-view {
|
|
48
|
+
* --ax-comp-tree-view-indent-size: 16px;
|
|
49
|
+
* --ax-comp-tree-view-node-selected-bg: rgba(var(--ax-sys-color-primary-600), 0.15);
|
|
50
|
+
* --ax-comp-tree-view-line-color: rgba(var(--ax-sys-color-on-lightest-surface), 0.1);
|
|
51
|
+
* --ax-comp-tree-view-node-hover-bg: rgba(var(--ax-sys-color-primary-500), 0.06);
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* All color tokens use Acorex design system variables (`--ax-sys-color-*`) for automatic
|
|
57
|
+
* light/dark mode support. Colors adapt based on the active theme without additional configuration.
|
|
58
|
+
*/
|
|
59
|
+
interface AXTreeViewBeforeDropEvent extends AXEvent {
|
|
60
|
+
movedNode: AXTreeViewNode;
|
|
61
|
+
previousParent?: AXTreeViewNode;
|
|
62
|
+
currentParent?: AXTreeViewNode;
|
|
63
|
+
previousIndex: number;
|
|
64
|
+
currentIndex: number;
|
|
65
|
+
canceled: boolean;
|
|
16
66
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
abstract hasChildField(): string;
|
|
31
|
-
abstract tooltipField(): string;
|
|
32
|
-
abstract showEmptyNodeMassage(): boolean;
|
|
33
|
-
abstract expandOn(): AXTreeViewExpandBehavior;
|
|
34
|
-
abstract focusNodeEnabled(): boolean;
|
|
35
|
-
abstract toggleIcons(): {
|
|
36
|
-
expanded: string;
|
|
37
|
-
collapsed: string;
|
|
38
|
-
} | null;
|
|
39
|
-
abstract itemsPromise: boolean;
|
|
40
|
-
abstract itemsSignal(): unknown[];
|
|
41
|
-
abstract fetchData(item: unknown): void;
|
|
42
|
-
abstract setNodeLoading(value: unknown, loading: boolean): void;
|
|
43
|
-
abstract handleUnActiveNode(items: unknown[]): void;
|
|
44
|
-
abstract onCollapsedChanged: EventEmitter<{
|
|
45
|
-
component: any;
|
|
46
|
-
data: unknown;
|
|
47
|
-
nativeElement: any;
|
|
48
|
-
}>;
|
|
49
|
-
abstract onNodeClick: EventEmitter<{
|
|
50
|
-
component: any;
|
|
51
|
-
data: unknown;
|
|
52
|
-
nativeElement: any;
|
|
53
|
-
}>;
|
|
54
|
-
abstract onNodedbClick: EventEmitter<{
|
|
55
|
-
component: any;
|
|
56
|
-
data: unknown;
|
|
57
|
-
nativeElement: any;
|
|
58
|
-
}>;
|
|
67
|
+
interface AXTreeViewNode {
|
|
68
|
+
id: string;
|
|
69
|
+
label: string;
|
|
70
|
+
icon?: string;
|
|
71
|
+
expanded?: boolean;
|
|
72
|
+
selected?: boolean;
|
|
73
|
+
indeterminate?: boolean;
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
visible?: boolean;
|
|
76
|
+
children?: AXTreeViewNode[];
|
|
77
|
+
childrenCount?: number;
|
|
78
|
+
loading?: boolean;
|
|
79
|
+
data?: unknown;
|
|
59
80
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
interface AXTreeViewNodeToggleEvent extends AXHtmlEvent {
|
|
82
|
+
node: AXTreeViewNode;
|
|
83
|
+
}
|
|
84
|
+
interface AXTreeViewNodeSelectEvent extends AXHtmlEvent {
|
|
85
|
+
node: AXTreeViewNode;
|
|
86
|
+
}
|
|
87
|
+
interface AXTreeViewDropEvent extends AXEvent {
|
|
88
|
+
node: AXTreeViewNode;
|
|
89
|
+
previousParent?: AXTreeViewNode;
|
|
90
|
+
currentParent?: AXTreeViewNode;
|
|
91
|
+
previousIndex: number;
|
|
92
|
+
currentIndex: number;
|
|
93
|
+
}
|
|
94
|
+
interface AXTreeViewItemTemplateContext {
|
|
95
|
+
$implicit: AXTreeViewNode;
|
|
96
|
+
node: AXTreeViewNode;
|
|
97
|
+
level: number;
|
|
98
|
+
expanded: boolean;
|
|
99
|
+
childrenCount: number;
|
|
100
|
+
loading: boolean;
|
|
101
|
+
}
|
|
102
|
+
type AXTreeViewViewLook = 'default' | 'card' | 'with-line';
|
|
103
|
+
type AXTreeViewDragMode = 'none' | 'handler' | 'item';
|
|
104
|
+
type AXTreeViewDragOperationType = 'order-only' | 'move' | 'both';
|
|
105
|
+
type AXTreeViewSelectMode = 'single' | 'multiple';
|
|
106
|
+
/**
|
|
107
|
+
* Function type for lazy loading tree nodes
|
|
108
|
+
*/
|
|
109
|
+
type AXTreeViewCallback = (id?: string) => AXTreeViewNode[] | Promise<AXTreeViewNode[]>;
|
|
110
|
+
/**
|
|
111
|
+
* Data source type - can be static array or lazy loading function
|
|
112
|
+
*/
|
|
113
|
+
type AXTreeViewDataSource = AXTreeViewNode[] | AXTreeViewCallback;
|
|
114
|
+
/**
|
|
115
|
+
* Flat node representation for keyboard navigation
|
|
116
|
+
*/
|
|
117
|
+
interface AXTreeViewFlatNode {
|
|
118
|
+
node: AXTreeViewNode;
|
|
119
|
+
level: number;
|
|
120
|
+
parent?: AXTreeViewNode;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Children selection state for parent node calculation
|
|
124
|
+
*/
|
|
125
|
+
interface AXTreeViewChildrenSelectionState {
|
|
126
|
+
allSelected: boolean;
|
|
127
|
+
someSelected: boolean;
|
|
76
128
|
}
|
|
77
129
|
|
|
78
|
-
declare class AXTreeViewComponent
|
|
130
|
+
declare class AXTreeViewComponent {
|
|
79
131
|
#private;
|
|
80
|
-
|
|
81
|
-
private
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
itemTemplate
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
*
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
*
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
132
|
+
private readonly treeService;
|
|
133
|
+
private readonly platformService;
|
|
134
|
+
private readonly destroyRef;
|
|
135
|
+
/** Tree data source - can be static array or lazy loading function */
|
|
136
|
+
readonly datasource: _angular_core.ModelSignal<AXTreeViewDataSource>;
|
|
137
|
+
/** Selection mode: 'single' (click to select) or 'multiple' (checkbox selection) */
|
|
138
|
+
readonly selectMode: _angular_core.InputSignal<AXTreeViewSelectMode>;
|
|
139
|
+
/** Whether to show checkboxes for selection (only applies to multiple mode) */
|
|
140
|
+
readonly showCheckbox: _angular_core.InputSignal<boolean>;
|
|
141
|
+
/** When true, selecting a parent also selects all loaded children (only for multiple mode) */
|
|
142
|
+
readonly checkChildrenOnSelect: _angular_core.InputSignal<boolean>;
|
|
143
|
+
/** When true, selecting a child makes parents indeterminate (only for multiple mode) */
|
|
144
|
+
readonly intermediateState: _angular_core.InputSignal<boolean>;
|
|
145
|
+
/** When true, clicking on a node toggles its selection (works for both single and multiple modes) */
|
|
146
|
+
readonly checkOnClick: _angular_core.InputSignal<boolean>;
|
|
147
|
+
/** Drag and drop mode: 'none' (disabled), 'handler' (drag handle), 'item' (entire item) */
|
|
148
|
+
readonly dragMode: _angular_core.InputSignal<AXTreeViewDragMode>;
|
|
149
|
+
/** Drag operation type: 'order-only' (reorder only), 'move' (move between parents), 'both' (allow both) */
|
|
150
|
+
readonly dragOperationType: _angular_core.InputSignal<AXTreeViewDragOperationType>;
|
|
151
|
+
/** Whether to show icons */
|
|
152
|
+
readonly showIcons: _angular_core.InputSignal<boolean>;
|
|
153
|
+
/** Whether to show children count badge */
|
|
154
|
+
readonly showChildrenBadge: _angular_core.InputSignal<boolean>;
|
|
155
|
+
/** Custom icon for expanded nodes */
|
|
156
|
+
readonly expandedIcon: _angular_core.InputSignal<string>;
|
|
157
|
+
/** Custom icon for collapsed nodes */
|
|
158
|
+
readonly collapsedIcon: _angular_core.InputSignal<string>;
|
|
159
|
+
/** Indent size in pixels for each level */
|
|
160
|
+
readonly indentSize: _angular_core.InputSignal<number>;
|
|
161
|
+
/** Node height in pixels */
|
|
162
|
+
readonly nodeHeight: _angular_core.InputSignal<"compact" | "normal" | "comfortable">;
|
|
163
|
+
/** Visual style variant */
|
|
164
|
+
readonly look: _angular_core.InputSignal<AXTreeViewViewLook>;
|
|
165
|
+
/** Custom template for tree items */
|
|
166
|
+
readonly itemTemplate: _angular_core.InputSignal<TemplateRef<AXTreeViewItemTemplateContext>>;
|
|
167
|
+
/** Emitted before a drop operation - set canceled to true to prevent drop */
|
|
168
|
+
readonly onBeforeDrop: _angular_core.OutputEmitterRef<AXTreeViewBeforeDropEvent>;
|
|
169
|
+
/** Emitted when a node is toggled (expanded/collapsed) */
|
|
170
|
+
readonly onNodeToggle: _angular_core.OutputEmitterRef<AXTreeViewNodeToggleEvent>;
|
|
171
|
+
/** Emitted when a node is selected/deselected */
|
|
172
|
+
readonly onNodeSelect: _angular_core.OutputEmitterRef<AXTreeViewNodeSelectEvent>;
|
|
173
|
+
/** Emitted when nodes are reordered within the same parent */
|
|
174
|
+
readonly onOrderChange: _angular_core.OutputEmitterRef<AXTreeViewDropEvent>;
|
|
175
|
+
/** Emitted when a node is moved to a different parent */
|
|
176
|
+
readonly onMoveChange: _angular_core.OutputEmitterRef<AXTreeViewDropEvent>;
|
|
177
|
+
/** Emitted for any item change (order or move) */
|
|
178
|
+
readonly onItemsChange: _angular_core.OutputEmitterRef<AXTreeViewDropEvent>;
|
|
179
|
+
/** Internal signal for tree nodes */
|
|
180
|
+
protected readonly nodes: _angular_core.WritableSignal<AXTreeViewNode[]>;
|
|
181
|
+
/** Internal signal for tracking loading state */
|
|
182
|
+
protected readonly loadingNodes: _angular_core.WritableSignal<Set<string>>;
|
|
183
|
+
/** Currently focused node ID for keyboard navigation */
|
|
184
|
+
protected readonly focusedNodeId: _angular_core.WritableSignal<string>;
|
|
185
|
+
/** RTL detection signal */
|
|
186
|
+
protected readonly isRtl: _angular_core.WritableSignal<boolean>;
|
|
187
|
+
/** Computed chevron icons that flip for RTL */
|
|
188
|
+
protected readonly directionExpandedIcon: _angular_core.Signal<string>;
|
|
189
|
+
protected readonly directionCollapsedIcon: _angular_core.Signal<string>;
|
|
190
|
+
/** Flag to prevent infinite loops when syncing datasource */
|
|
191
|
+
private isUpdatingFromDatasource;
|
|
192
|
+
/** Computed to check if datasource is a function */
|
|
193
|
+
private readonly isLazyDataSource;
|
|
194
|
+
/**
|
|
195
|
+
* Expand all nodes in the tree (with lazy loading support)
|
|
196
|
+
*/
|
|
197
|
+
expandAll(): Promise<void>;
|
|
198
|
+
/**
|
|
199
|
+
* Collapse all nodes in the tree
|
|
200
|
+
*/
|
|
201
|
+
collapseAll(): void;
|
|
202
|
+
/**
|
|
203
|
+
* Get count of selected nodes
|
|
204
|
+
*/
|
|
205
|
+
getSelectedCount(): number;
|
|
206
|
+
/**
|
|
207
|
+
* Check if any nodes are selected
|
|
208
|
+
*/
|
|
209
|
+
hasSelection(): boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Get all selected nodes
|
|
212
|
+
*/
|
|
213
|
+
getSelectedNodes(): AXTreeViewNode[];
|
|
214
|
+
/**
|
|
215
|
+
* Delete selected nodes from the tree
|
|
216
|
+
*/
|
|
217
|
+
deleteSelected(): void;
|
|
218
|
+
/**
|
|
219
|
+
* Select all nodes in the tree
|
|
220
|
+
*/
|
|
221
|
+
selectAll(): void;
|
|
222
|
+
/**
|
|
223
|
+
* Deselect all nodes in the tree
|
|
224
|
+
*/
|
|
225
|
+
deselectAll(): void;
|
|
226
|
+
/**
|
|
227
|
+
* Find a node by ID in the tree
|
|
228
|
+
*/
|
|
229
|
+
findNode(id: string): AXTreeViewNode | null;
|
|
230
|
+
/**
|
|
231
|
+
* Refresh the tree to trigger change detection
|
|
232
|
+
*/
|
|
169
233
|
refresh(): void;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Check if a node is currently loading
|
|
236
|
+
*/
|
|
237
|
+
isNodeLoading(nodeId: string): boolean;
|
|
238
|
+
/**
|
|
239
|
+
* Edit/update a node's properties
|
|
240
|
+
* @param nodeId - The ID of the node to edit
|
|
241
|
+
* @param updates - Partial node object with properties to update
|
|
242
|
+
* @returns true if node was found and updated, false otherwise
|
|
243
|
+
*/
|
|
244
|
+
editNode(nodeId: string, updates: Partial<AXTreeViewNode>): boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Add a child node to a parent node
|
|
247
|
+
* @param parentId - The ID of the parent node
|
|
248
|
+
* @param childNode - The child node to add
|
|
249
|
+
* @param index - Optional index to insert at (default: append to end)
|
|
250
|
+
* @returns true if parent was found and child was added, false otherwise
|
|
251
|
+
*/
|
|
252
|
+
addChild(parentId: string, childNode: AXTreeViewNode, index?: number): boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Remove a node from the tree
|
|
255
|
+
* @param nodeId - The ID of the node to remove
|
|
256
|
+
* @returns The removed node if found, null otherwise
|
|
257
|
+
*/
|
|
258
|
+
removeNode(nodeId: string): AXTreeViewNode | null;
|
|
259
|
+
/**
|
|
260
|
+
* Expand a specific node
|
|
261
|
+
* @param nodeId - The ID of the node to expand
|
|
262
|
+
* @returns Promise that resolves when expansion is complete (if lazy loading)
|
|
263
|
+
*/
|
|
264
|
+
expandNode(nodeId: string): Promise<void>;
|
|
265
|
+
/**
|
|
266
|
+
* Collapse a specific node
|
|
267
|
+
* @param nodeId - The ID of the node to collapse
|
|
268
|
+
*/
|
|
269
|
+
collapseNode(nodeId: string): void;
|
|
270
|
+
/**
|
|
271
|
+
* Toggle expansion state of a specific node
|
|
272
|
+
* @param nodeId - The ID of the node to toggle
|
|
273
|
+
* @returns Promise that resolves when toggle is complete (if lazy loading)
|
|
274
|
+
*/
|
|
275
|
+
toggleNodeExpansion(nodeId: string): Promise<void>;
|
|
276
|
+
/**
|
|
277
|
+
* Programmatically select a node
|
|
278
|
+
* @param nodeId - The ID of the node to select
|
|
279
|
+
* @returns true if node was found and selected, false otherwise
|
|
280
|
+
*/
|
|
281
|
+
selectNode(nodeId: string): boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Programmatically deselect a node
|
|
284
|
+
* @param nodeId - The ID of the node to deselect
|
|
285
|
+
* @returns true if node was found and deselected, false otherwise
|
|
286
|
+
*/
|
|
287
|
+
deselectNode(nodeId: string): boolean;
|
|
288
|
+
/**
|
|
289
|
+
* Get parent node of a given node
|
|
290
|
+
* @param nodeId - The ID of the node
|
|
291
|
+
* @returns The parent node if found, null otherwise
|
|
292
|
+
*/
|
|
293
|
+
getParent(nodeId: string): AXTreeViewNode | null;
|
|
294
|
+
/**
|
|
295
|
+
* Get children of a node
|
|
296
|
+
* @param nodeId - The ID of the parent node
|
|
297
|
+
* @returns Array of child nodes, or null if node not found
|
|
298
|
+
*/
|
|
299
|
+
getChildren(nodeId: string): AXTreeViewNode[] | null;
|
|
300
|
+
/**
|
|
301
|
+
* Get all root nodes
|
|
302
|
+
* @returns Array of root nodes
|
|
303
|
+
*/
|
|
304
|
+
getRootNodes(): AXTreeViewNode[];
|
|
305
|
+
/**
|
|
306
|
+
* Get all nodes in a flat array
|
|
307
|
+
* @returns Array of all nodes in the tree
|
|
308
|
+
*/
|
|
309
|
+
getAllNodes(): AXTreeViewNode[];
|
|
310
|
+
/**
|
|
311
|
+
* Get the path to a node (array of parent IDs from root to node)
|
|
312
|
+
* @param nodeId - The ID of the node
|
|
313
|
+
* @returns Array of node IDs representing the path, or empty array if node not found
|
|
314
|
+
*/
|
|
315
|
+
getNodePath(nodeId: string): string[];
|
|
316
|
+
/**
|
|
317
|
+
* Get the level/depth of a node (0 = root level)
|
|
318
|
+
* @param nodeId - The ID of the node
|
|
319
|
+
* @returns The level of the node, or -1 if node not found
|
|
320
|
+
*/
|
|
321
|
+
getNodeLevel(nodeId: string): number;
|
|
322
|
+
/**
|
|
323
|
+
* Programmatically move a node to a new parent
|
|
324
|
+
* @param nodeId - The ID of the node to move
|
|
325
|
+
* @param newParentId - The ID of the new parent (undefined for root level)
|
|
326
|
+
* @param index - Optional index to insert at (default: append to end)
|
|
327
|
+
* @returns true if move was successful, false otherwise
|
|
328
|
+
*/
|
|
329
|
+
moveNode(nodeId: string, newParentId?: string, index?: number): boolean;
|
|
330
|
+
/**
|
|
331
|
+
* Clone a node (creates a deep copy)
|
|
332
|
+
* @param nodeId - The ID of the node to clone
|
|
333
|
+
* @returns The cloned node, or null if node not found
|
|
334
|
+
*/
|
|
335
|
+
cloneNode(nodeId: string): AXTreeViewNode | null;
|
|
336
|
+
/**
|
|
337
|
+
* Focus a specific node by ID
|
|
338
|
+
* @param nodeId - The ID of the node to focus
|
|
339
|
+
* @returns true if node was found and focused, false otherwise
|
|
340
|
+
*/
|
|
341
|
+
focusNode(nodeId: string): boolean;
|
|
342
|
+
/**
|
|
343
|
+
* Get all expanded nodes
|
|
344
|
+
* @returns Array of expanded nodes
|
|
345
|
+
*/
|
|
346
|
+
getExpandedNodes(): AXTreeViewNode[];
|
|
347
|
+
/**
|
|
348
|
+
* Get all collapsed nodes that have children
|
|
349
|
+
* @returns Array of collapsed nodes with children
|
|
350
|
+
*/
|
|
351
|
+
getCollapsedNodes(): AXTreeViewNode[];
|
|
352
|
+
/**
|
|
353
|
+
* Check if a node is expanded
|
|
354
|
+
* @param nodeId - The ID of the node
|
|
355
|
+
* @returns true if node is expanded, false otherwise
|
|
356
|
+
*/
|
|
357
|
+
isNodeExpanded(nodeId: string): boolean;
|
|
358
|
+
/**
|
|
359
|
+
* Check if a node is selected
|
|
360
|
+
* @param nodeId - The ID of the node
|
|
361
|
+
* @returns true if node is selected, false otherwise
|
|
362
|
+
*/
|
|
363
|
+
isNodeSelected(nodeId: string): boolean;
|
|
364
|
+
/**
|
|
365
|
+
* Check if a node has children
|
|
366
|
+
* @param nodeId - The ID of the node
|
|
367
|
+
* @returns true if node has children, false otherwise
|
|
368
|
+
*/
|
|
369
|
+
hasChildren(nodeId: string): boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Get template context for a node
|
|
372
|
+
*/
|
|
373
|
+
getTemplateContext(node: AXTreeViewNode, level?: number): AXTreeViewItemTemplateContext;
|
|
374
|
+
/**
|
|
375
|
+
* Calculate padding-inline for a node based on its level
|
|
376
|
+
*/
|
|
377
|
+
getNodePaddingInline(level: number): number;
|
|
378
|
+
/**
|
|
379
|
+
* Check if node should show expand toggle
|
|
380
|
+
*/
|
|
381
|
+
shouldShowExpandToggle(node: AXTreeViewNode): boolean;
|
|
382
|
+
/**
|
|
383
|
+
* Check if checkboxes should be shown (only for multiple mode)
|
|
384
|
+
*/
|
|
385
|
+
shouldShowCheckbox(): boolean;
|
|
386
|
+
/**
|
|
387
|
+
* Generate unique list ID for each node
|
|
388
|
+
*/
|
|
389
|
+
getListId(node?: AXTreeViewNode): string;
|
|
390
|
+
/**
|
|
391
|
+
* Check if a node is currently focused
|
|
392
|
+
*/
|
|
393
|
+
isNodeFocused(nodeId: string): boolean;
|
|
394
|
+
/**
|
|
395
|
+
* Get ARIA level for a node
|
|
396
|
+
*/
|
|
397
|
+
getNodeAriaLevel(level: number): number;
|
|
398
|
+
/**
|
|
399
|
+
* Get ARIA expanded state for a node
|
|
400
|
+
*/
|
|
401
|
+
getNodeAriaExpanded(node: AXTreeViewNode): string | null;
|
|
402
|
+
/**
|
|
403
|
+
* Get ARIA selected state for a node
|
|
404
|
+
*/
|
|
405
|
+
getNodeAriaSelected(node: AXTreeViewNode): string | null;
|
|
406
|
+
/**
|
|
407
|
+
* Handle node click - for single selection mode or multiple mode with checkOnClick enabled
|
|
408
|
+
*/
|
|
409
|
+
onNodeClick(node: AXTreeViewNode, event: Event): void;
|
|
410
|
+
/**
|
|
411
|
+
* Toggle node expansion state with lazy loading support
|
|
412
|
+
*/
|
|
413
|
+
toggleNode(node: AXTreeViewNode, event: Event): Promise<void>;
|
|
414
|
+
/**
|
|
415
|
+
* Toggle node selection state with indeterminate support (for multiple mode)
|
|
416
|
+
*/
|
|
417
|
+
toggleSelection(node: AXTreeViewNode, event: AXValueChangedEvent): void;
|
|
418
|
+
/**
|
|
419
|
+
* Handle drop events for tree nodes
|
|
420
|
+
*/
|
|
421
|
+
onDrop(event: AXDropListDroppedEvent, parentNode?: AXTreeViewNode): void;
|
|
422
|
+
/**
|
|
423
|
+
* Handle drop events when dropping directly onto a node (to make it a child)
|
|
424
|
+
*/
|
|
425
|
+
onDropOntoNode(event: AXDropListDroppedEvent, targetNode: AXTreeViewNode): void;
|
|
426
|
+
/**
|
|
427
|
+
* Handle node focus event
|
|
428
|
+
*/
|
|
429
|
+
onNodeFocus(nodeId: string): void;
|
|
430
|
+
/**
|
|
431
|
+
* Handle tree container focus - focus first node if none is focused
|
|
432
|
+
*/
|
|
433
|
+
onTreeFocus(event: FocusEvent): void;
|
|
434
|
+
/**
|
|
435
|
+
* Handle tree container blur
|
|
436
|
+
*/
|
|
437
|
+
onTreeBlur(event: FocusEvent): void;
|
|
438
|
+
/**
|
|
439
|
+
* Handle keyboard navigation
|
|
440
|
+
*/
|
|
441
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
442
|
+
/**
|
|
443
|
+
* Load root items when datasource is a function
|
|
444
|
+
*/
|
|
445
|
+
private loadRootItems;
|
|
446
|
+
/**
|
|
447
|
+
* Load children for a node using lazy loading
|
|
448
|
+
*/
|
|
449
|
+
private loadNodeChildren;
|
|
450
|
+
/**
|
|
451
|
+
* Internal method to refresh nodes signal and sync back to datasource if it's an array
|
|
452
|
+
* Creates new array references for all nested children to ensure reactivity
|
|
453
|
+
*/
|
|
454
|
+
private refreshNodes;
|
|
455
|
+
/**
|
|
456
|
+
* Recursively ensure all children arrays have new references to trigger change detection
|
|
457
|
+
* Mutates the tree structure by replacing children arrays with new array references
|
|
458
|
+
*/
|
|
459
|
+
private ensureNewArrayReferences;
|
|
460
|
+
/**
|
|
461
|
+
* Handle single selection mode
|
|
462
|
+
*/
|
|
463
|
+
private handleSingleSelection;
|
|
464
|
+
/**
|
|
465
|
+
* Handle multiple selection mode with checkOnClick
|
|
466
|
+
*/
|
|
467
|
+
private handleMultipleSelection;
|
|
468
|
+
/**
|
|
469
|
+
* Get array reference by drop list ID
|
|
470
|
+
*/
|
|
471
|
+
private getArrayByListId;
|
|
472
|
+
/**
|
|
473
|
+
* Find parent node by list ID
|
|
474
|
+
*/
|
|
475
|
+
private findParentByListId;
|
|
476
|
+
/**
|
|
477
|
+
* Check if move operation is allowed based on dragOperationType
|
|
478
|
+
*/
|
|
479
|
+
private canMoveToParent;
|
|
480
|
+
/**
|
|
481
|
+
* Check if reorder operation is allowed based on dragOperationType
|
|
482
|
+
*/
|
|
483
|
+
private canReorder;
|
|
484
|
+
/**
|
|
485
|
+
* Handle reordering within the same list */
|
|
486
|
+
private handleReorder;
|
|
487
|
+
/**
|
|
488
|
+
* Handle moving between different lists
|
|
489
|
+
*/
|
|
490
|
+
private handleMove;
|
|
491
|
+
/**
|
|
492
|
+
* Emit beforeDrop event and return whether to continue
|
|
493
|
+
*/
|
|
494
|
+
private emitBeforeDropEvent;
|
|
495
|
+
/**
|
|
496
|
+
* Emit drop events based on operation type
|
|
497
|
+
*/
|
|
498
|
+
private emitDropEvents;
|
|
499
|
+
/**
|
|
500
|
+
* Get the currently focused node
|
|
501
|
+
*/
|
|
502
|
+
private getFocusedNode;
|
|
503
|
+
/**
|
|
504
|
+
* Set focus to a node by ID
|
|
505
|
+
*/
|
|
506
|
+
private focusNodeById;
|
|
507
|
+
/**
|
|
508
|
+
* Handle keyboard navigation keys
|
|
509
|
+
*/
|
|
510
|
+
private handleNavigationKey;
|
|
511
|
+
/**
|
|
512
|
+
* Handle Space key selection
|
|
513
|
+
*/
|
|
514
|
+
private handleSpaceKeySelection;
|
|
515
|
+
/**
|
|
516
|
+
* Handle Enter key selection
|
|
517
|
+
*/
|
|
518
|
+
private handleEnterKeySelection;
|
|
519
|
+
/**
|
|
520
|
+
* Handle Ctrl/Cmd + Enter key selection
|
|
521
|
+
*/
|
|
522
|
+
private handleCtrlEnterSelection;
|
|
523
|
+
/**
|
|
524
|
+
* Type guard to check if value is an Event
|
|
525
|
+
*/
|
|
526
|
+
private isEvent;
|
|
527
|
+
/**
|
|
528
|
+
* Handle errors consistently
|
|
529
|
+
*/
|
|
530
|
+
private handleError;
|
|
173
531
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXTreeViewComponent, never>;
|
|
174
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXTreeViewComponent, "ax-tree-view", never, { "
|
|
532
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXTreeViewComponent, "ax-tree-view", never, { "datasource": { "alias": "datasource"; "required": true; "isSignal": true; }; "selectMode": { "alias": "selectMode"; "required": false; "isSignal": true; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; "isSignal": true; }; "checkChildrenOnSelect": { "alias": "checkChildrenOnSelect"; "required": false; "isSignal": true; }; "intermediateState": { "alias": "intermediateState"; "required": false; "isSignal": true; }; "checkOnClick": { "alias": "checkOnClick"; "required": false; "isSignal": true; }; "dragMode": { "alias": "dragMode"; "required": false; "isSignal": true; }; "dragOperationType": { "alias": "dragOperationType"; "required": false; "isSignal": true; }; "showIcons": { "alias": "showIcons"; "required": false; "isSignal": true; }; "showChildrenBadge": { "alias": "showChildrenBadge"; "required": false; "isSignal": true; }; "expandedIcon": { "alias": "expandedIcon"; "required": false; "isSignal": true; }; "collapsedIcon": { "alias": "collapsedIcon"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; "nodeHeight": { "alias": "nodeHeight"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; }, { "datasource": "datasourceChange"; "onBeforeDrop": "onBeforeDrop"; "onNodeToggle": "onNodeToggle"; "onNodeSelect": "onNodeSelect"; "onOrderChange": "onOrderChange"; "onMoveChange": "onMoveChange"; "onItemsChange": "onItemsChange"; }, never, never, true, never>;
|
|
175
533
|
}
|
|
176
534
|
|
|
177
535
|
declare class AXTreeViewModule {
|
|
178
536
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXTreeViewModule, never>;
|
|
179
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXTreeViewModule, never, [typeof AXTreeViewComponent
|
|
537
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXTreeViewModule, never, [typeof AXTreeViewComponent], never>;
|
|
180
538
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXTreeViewModule>;
|
|
181
539
|
}
|
|
182
540
|
|
|
183
|
-
|
|
184
|
-
|
|
541
|
+
/**
|
|
542
|
+
* Service for tree node operations
|
|
543
|
+
* Handles all business logic for tree node manipulation
|
|
544
|
+
*/
|
|
545
|
+
declare class AXTreeViewService {
|
|
546
|
+
private static readonly ROOT_LIST_ID;
|
|
547
|
+
private static readonly NODE_DROP_PREFIX;
|
|
548
|
+
private static readonly LIST_PREFIX;
|
|
549
|
+
/**
|
|
550
|
+
* Find a node by ID in the tree
|
|
551
|
+
*/
|
|
552
|
+
findNodeById(nodes: AXTreeViewNode[], id: string): AXTreeViewNode | null;
|
|
553
|
+
/**
|
|
554
|
+
* Find parent node of a given node
|
|
555
|
+
*/
|
|
556
|
+
findParentNode(nodes: AXTreeViewNode[], targetNode: AXTreeViewNode): AXTreeViewNode | undefined;
|
|
557
|
+
/**
|
|
558
|
+
* Check if targetNode is a descendant of ancestorNode (or the same node)
|
|
559
|
+
* Prevents circular references by checking if target exists in ancestor's children tree
|
|
560
|
+
*/
|
|
561
|
+
isValidDropTarget(movedNode: AXTreeViewNode, targetNode: AXTreeViewNode): boolean;
|
|
562
|
+
/**
|
|
563
|
+
* Check if targetNode is a descendant of ancestorNode
|
|
564
|
+
*/
|
|
565
|
+
private isNodeDescendantOf;
|
|
566
|
+
/**
|
|
567
|
+
* Build a flat list of all visible focusable nodes
|
|
568
|
+
*/
|
|
569
|
+
buildFlatNodeList(nodes: AXTreeViewNode[]): AXTreeViewFlatNode[];
|
|
570
|
+
/**
|
|
571
|
+
* Check if node has children
|
|
572
|
+
*/
|
|
573
|
+
hasChildren(node: AXTreeViewNode): boolean;
|
|
574
|
+
/**
|
|
575
|
+
* Check if node can be lazy loaded
|
|
576
|
+
*/
|
|
577
|
+
canLazyLoad(node: AXTreeViewNode, isLazyDataSource: boolean): boolean;
|
|
578
|
+
/**
|
|
579
|
+
* Recursively select/deselect all children
|
|
580
|
+
*/
|
|
581
|
+
selectAllChildren(children: AXTreeViewNode[], selected: boolean): void;
|
|
582
|
+
/**
|
|
583
|
+
* Get selection state of children
|
|
584
|
+
*/
|
|
585
|
+
getChildrenSelectionState(children: AXTreeViewNode[]): AXTreeViewChildrenSelectionState;
|
|
586
|
+
/**
|
|
587
|
+
* Update parent node states based on children selection (with intermediate state support)
|
|
588
|
+
*/
|
|
589
|
+
updateParentStates(nodes: AXTreeViewNode[], changedNode: AXTreeViewNode, intermediateState: boolean): void;
|
|
590
|
+
/**
|
|
591
|
+
* Recursively deselect all nodes
|
|
592
|
+
*/
|
|
593
|
+
deselectAllNodes(nodes: AXTreeViewNode[]): void;
|
|
594
|
+
/**
|
|
595
|
+
* Recursively set selection state for all nodes
|
|
596
|
+
*/
|
|
597
|
+
setAllSelection(nodes: AXTreeViewNode[], selected: boolean): void;
|
|
598
|
+
/**
|
|
599
|
+
* Recursively count selected nodes
|
|
600
|
+
*/
|
|
601
|
+
countSelected(nodes: AXTreeViewNode[]): number;
|
|
602
|
+
/**
|
|
603
|
+
* Recursively collect selected nodes
|
|
604
|
+
*/
|
|
605
|
+
collectSelected(nodes: AXTreeViewNode[], result: AXTreeViewNode[]): void;
|
|
606
|
+
/**
|
|
607
|
+
* Recursively remove selected nodes
|
|
608
|
+
*/
|
|
609
|
+
removeSelected(nodes: AXTreeViewNode[]): void;
|
|
610
|
+
/**
|
|
611
|
+
* Recursively update all parent states in the tree (used after deletion)
|
|
612
|
+
*/
|
|
613
|
+
updateAllParentStates(nodes: AXTreeViewNode[], intermediateState: boolean): void;
|
|
614
|
+
/**
|
|
615
|
+
* Recursively set expanded state (with lazy loading)
|
|
616
|
+
*/
|
|
617
|
+
setExpandedState(nodes: AXTreeViewNode[], expanded: boolean, isLazyDataSource: boolean, loadNodeChildren: (node: AXTreeViewNode) => Promise<void>): Promise<void>;
|
|
618
|
+
/**
|
|
619
|
+
* Get array reference by drop list ID
|
|
620
|
+
*/
|
|
621
|
+
getArrayByListId(nodes: AXTreeViewNode[], listId: string): AXTreeViewNode[] | null;
|
|
622
|
+
/**
|
|
623
|
+
* Find parent node by list ID
|
|
624
|
+
*/
|
|
625
|
+
findParentByListId(nodes: AXTreeViewNode[], listId: string): AXTreeViewNode | undefined;
|
|
626
|
+
/**
|
|
627
|
+
* Generate unique list ID for each node
|
|
628
|
+
*/
|
|
629
|
+
getListId(node?: AXTreeViewNode): string;
|
|
630
|
+
/**
|
|
631
|
+
* Get root list ID constant
|
|
632
|
+
*/
|
|
633
|
+
getRootListId(): string;
|
|
634
|
+
/**
|
|
635
|
+
* Get node drop prefix constant
|
|
636
|
+
*/
|
|
637
|
+
getNodeDropPrefix(): string;
|
|
638
|
+
/**
|
|
639
|
+
* Get list prefix constant
|
|
640
|
+
*/
|
|
641
|
+
getListPrefix(): string;
|
|
642
|
+
/**
|
|
643
|
+
* Get all nodes in a flat array
|
|
644
|
+
*/
|
|
645
|
+
getAllNodes(nodes: AXTreeViewNode[]): AXTreeViewNode[];
|
|
646
|
+
/**
|
|
647
|
+
* Get the path to a node (array of parent nodes from root to node)
|
|
648
|
+
*/
|
|
649
|
+
getNodePath(nodes: AXTreeViewNode[], nodeId: string): AXTreeViewNode[];
|
|
650
|
+
/**
|
|
651
|
+
* Get the level/depth of a node (0 = root level)
|
|
652
|
+
*/
|
|
653
|
+
getNodeLevel(nodes: AXTreeViewNode[], nodeId: string): number;
|
|
654
|
+
/**
|
|
655
|
+
* Get sibling nodes of a given node
|
|
656
|
+
*/
|
|
657
|
+
getSiblings(nodes: AXTreeViewNode[], nodeId: string): AXTreeViewNode[];
|
|
658
|
+
/**
|
|
659
|
+
* Clone a node (creates a deep copy)
|
|
660
|
+
*/
|
|
661
|
+
cloneNode(node: AXTreeViewNode): AXTreeViewNode;
|
|
662
|
+
/**
|
|
663
|
+
* Validate node structure (check for required fields and circular references)
|
|
664
|
+
*/
|
|
665
|
+
validateNode(node: AXTreeViewNode, visitedIds?: Set<string>): {
|
|
666
|
+
valid: boolean;
|
|
667
|
+
errors: string[];
|
|
668
|
+
};
|
|
669
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXTreeViewService, never>;
|
|
670
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXTreeViewService>;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export { AXTreeViewComponent, AXTreeViewModule, AXTreeViewService };
|
|
674
|
+
export type { AXTreeViewBeforeDropEvent, AXTreeViewCallback, AXTreeViewChildrenSelectionState, AXTreeViewDataSource, AXTreeViewDragMode, AXTreeViewDragOperationType, AXTreeViewDropEvent, AXTreeViewFlatNode, AXTreeViewItemTemplateContext, AXTreeViewNode, AXTreeViewNodeSelectEvent, AXTreeViewNodeToggleEvent, AXTreeViewSelectMode, AXTreeViewViewLook };
|