@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
package/accordion/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ declare class AXAccordionGroupComponent {
|
|
|
10
10
|
activeIndex: _angular_core.ModelSignal<number | number[]>;
|
|
11
11
|
look: _angular_core.InputSignal<string>;
|
|
12
12
|
collapsedOnItemClick: _angular_core.InputSignal<boolean>;
|
|
13
|
-
private get __hostClass();
|
|
14
13
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXAccordionGroupComponent, never>;
|
|
15
14
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXAccordionGroupComponent, "ax-accordion-group", never, { "accordion": { "alias": "accordion"; "required": false; "isSignal": true; }; "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "collapsedOnItemClick": { "alias": "collapsedOnItemClick"; "required": false; "isSignal": true; }; }, { "activeIndex": "activeIndexChange"; }, ["content"], ["ax-accordion-item"], true, never>;
|
|
16
15
|
}
|
package/autocomplete/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { AfterViewInit, OnDestroy, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as polytype from 'polytype';
|
|
4
4
|
import { MXSelectionValueComponent, MXLookComponent, AXDataSource, MXSelectionBridgeService, AXAutocompleteParentComponent, MXInputBaseValueComponent, AXEvent, AXValueChangedEvent, AXItemClickEvent, AXItemSelectedEvent } from '@acorex/cdk/common';
|
|
@@ -11,9 +11,13 @@ declare const AXAutocompleteComponent_base: polytype.Polytype.ClusteredConstruct
|
|
|
11
11
|
* @category
|
|
12
12
|
*/
|
|
13
13
|
declare class AXAutocompleteComponent extends AXAutocompleteComponent_base implements AfterViewInit, OnDestroy {
|
|
14
|
-
delayTime:
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
delayTime: _angular_core.InputSignal<number>;
|
|
15
|
+
/** Height of each list item in pixels, or 'auto' to let list measure. */
|
|
16
|
+
itemHeight: _angular_core.InputSignal<number | "auto">;
|
|
17
|
+
/** Maximum number of visible items before scrolling. */
|
|
18
|
+
maxVisibleItems: _angular_core.InputSignal<number>;
|
|
19
|
+
protected inputValue: _angular_core.WritableSignal<string>;
|
|
20
|
+
protected isLoading: _angular_core.WritableSignal<boolean>;
|
|
17
21
|
/** @ignore */
|
|
18
22
|
protected renderList: boolean;
|
|
19
23
|
/** @ignore */
|
|
@@ -67,6 +71,16 @@ declare class AXAutocompleteComponent extends AXAutocompleteComponent_base imple
|
|
|
67
71
|
* @param {TemplateRef<any>} loadingTemplate
|
|
68
72
|
*/
|
|
69
73
|
loadingTemplate: TemplateRef<any>;
|
|
74
|
+
/**
|
|
75
|
+
* The template used to display the header of the list.
|
|
76
|
+
* @param {TemplateRef<unknown>} listHeaderTemplate
|
|
77
|
+
*/
|
|
78
|
+
listHeaderTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
79
|
+
/**
|
|
80
|
+
* The template used to display the footer of the list.
|
|
81
|
+
* @param {TemplateRef<unknown>} listFooterTemplate
|
|
82
|
+
*/
|
|
83
|
+
listFooterTemplate: _angular_core.InputSignal<TemplateRef<unknown>>;
|
|
70
84
|
/**
|
|
71
85
|
* The width of the dropdown in pixels.
|
|
72
86
|
* @defaultValue 260
|
|
@@ -115,14 +129,14 @@ declare class AXAutocompleteComponent extends AXAutocompleteComponent_base imple
|
|
|
115
129
|
*/
|
|
116
130
|
refresh(): void;
|
|
117
131
|
private get __hostName();
|
|
118
|
-
static ɵfac:
|
|
119
|
-
static ɵcmp:
|
|
132
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXAutocompleteComponent, never>;
|
|
133
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXAutocompleteComponent, "ax-autocomplete", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "type": { "alias": "type"; "required": false; }; "look": { "alias": "look"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "disabledField": { "alias": "disabledField"; "required": false; }; "textTemplate": { "alias": "textTemplate"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "delayTime": { "alias": "delayTime"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxVisibleItems": { "alias": "maxVisibleItems"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "selectedTemplate": { "alias": "selectedTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; }; "listHeaderTemplate": { "alias": "listHeaderTemplate"; "required": false; "isSignal": true; }; "listFooterTemplate": { "alias": "listFooterTemplate"; "required": false; "isSignal": true; }; "dropdownWidth": { "alias": "dropdownWidth"; "required": false; }; }, { "valueChange": "valueChange"; "stateChange": "stateChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; "onOpened": "onOpened"; "onClosed": "onClosed"; "onItemClick": "onItemClick"; "onItemSelected": "onItemSelected"; }, never, ["ax-footer"], true, never>;
|
|
120
134
|
}
|
|
121
135
|
|
|
122
136
|
declare class AXAutocompleteModule {
|
|
123
|
-
static ɵfac:
|
|
124
|
-
static ɵmod:
|
|
125
|
-
static ɵinj:
|
|
137
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXAutocompleteModule, never>;
|
|
138
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXAutocompleteModule, never, [typeof AXAutocompleteComponent], [typeof AXAutocompleteComponent]>;
|
|
139
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXAutocompleteModule>;
|
|
126
140
|
}
|
|
127
141
|
|
|
128
142
|
export { AXAutocompleteComponent, AXAutocompleteModule };
|
package/button/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { EventEmitter, QueryList, AfterViewInit } from '@angular/core';
|
|
3
3
|
import { MXInteractiveComponent, MXColorComponent, AXClickEvent, AXStyleColorType, AXItemClickEvent, AXStyleLookType, AXHotKeyAction, MXButtonBaseComponent } from '@acorex/cdk/common';
|
|
4
4
|
import * as polytype from 'polytype';
|
|
@@ -11,7 +11,9 @@ interface AXButtonItemListItem {
|
|
|
11
11
|
divided?: boolean;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
selected?: boolean;
|
|
14
|
+
iconOnly?: boolean;
|
|
14
15
|
color?: AXStyleColorType;
|
|
16
|
+
loading?: boolean;
|
|
15
17
|
}
|
|
16
18
|
declare const AXButtonItemComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXInteractiveComponent, typeof MXColorComponent]>;
|
|
17
19
|
/**
|
|
@@ -93,8 +95,8 @@ declare class AXButtonItemComponent extends AXButtonItemComponent_base {
|
|
|
93
95
|
* @ignore
|
|
94
96
|
*/
|
|
95
97
|
tabindex: string;
|
|
96
|
-
static ɵfac:
|
|
97
|
-
static ɵcmp:
|
|
98
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonItemComponent, never>;
|
|
99
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXButtonItemComponent, "ax-button-item", never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "text": { "alias": "text"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "divided": { "alias": "divided"; "required": false; }; "data": { "alias": "data"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "onClick": "onClick"; "onFocus": "onFocus"; "onBlur": "onBlur"; "disabledChange": "disabledChange"; }, never, ["ax-prefix", "ax-loading", "ax-icon", "ax-suffix", "ax-dropdown-panel"], true, never>;
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
/**
|
|
@@ -110,7 +112,20 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
110
112
|
*
|
|
111
113
|
* @defaultValue []
|
|
112
114
|
*/
|
|
113
|
-
items:
|
|
115
|
+
items: _angular_core.InputSignal<AXButtonItemListItem[]>;
|
|
116
|
+
/**
|
|
117
|
+
* Determines if the parent closable component should be closed automatically when
|
|
118
|
+
* an item is clicked.
|
|
119
|
+
*
|
|
120
|
+
* @defaultValue true
|
|
121
|
+
*/
|
|
122
|
+
closeParentOnClick: _angular_core.InputSignal<boolean>;
|
|
123
|
+
/**
|
|
124
|
+
* Locks interaction for all items when any item is loading.
|
|
125
|
+
*
|
|
126
|
+
* @defaultValue false
|
|
127
|
+
*/
|
|
128
|
+
lockOnLoading: _angular_core.InputSignal<boolean>;
|
|
114
129
|
/**
|
|
115
130
|
* Emits an event when an item is clicked.
|
|
116
131
|
* The event contains details about the clicked item.
|
|
@@ -125,6 +140,8 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
125
140
|
* @ignore
|
|
126
141
|
*/
|
|
127
142
|
constructor();
|
|
143
|
+
protected isDisabled(item: AXButtonItemListItem): boolean;
|
|
144
|
+
protected hasAnyLoadingItem(): boolean;
|
|
128
145
|
/**
|
|
129
146
|
* Initializes the content of the button item list.
|
|
130
147
|
* Binds events and properties to content button items and marks for change detection.
|
|
@@ -162,6 +179,10 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
162
179
|
* @ignore
|
|
163
180
|
*/
|
|
164
181
|
_emitOnItemClickEvent(e: AXClickEvent, item: AXButtonItemComponent): void;
|
|
182
|
+
/**
|
|
183
|
+
* Closes the parent closable component if available.
|
|
184
|
+
*/
|
|
185
|
+
closeParent(): void;
|
|
165
186
|
/**
|
|
166
187
|
* Generates the CSS classes for the button item list host element.
|
|
167
188
|
* Includes classes for action list and vertical layout.
|
|
@@ -170,8 +191,8 @@ declare class AXButtonItemListComponent extends MXInteractiveComponent {
|
|
|
170
191
|
* @ignore
|
|
171
192
|
*/
|
|
172
193
|
private get __hostClass();
|
|
173
|
-
static ɵfac:
|
|
174
|
-
static ɵcmp:
|
|
194
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonItemListComponent, never>;
|
|
195
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXButtonItemListComponent, "ax-button-item-list", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "closeParentOnClick": { "alias": "closeParentOnClick"; "required": false; "isSignal": true; }; "lockOnLoading": { "alias": "lockOnLoading"; "required": false; "isSignal": true; }; }, { "onItemClick": "onItemClick"; }, ["_contentButtons"], ["*"], true, never>;
|
|
175
196
|
}
|
|
176
197
|
|
|
177
198
|
type AXButtonType = 'submit' | 'button' | 'cancel' | 'reset';
|
|
@@ -204,10 +225,10 @@ interface AXButtonItem {
|
|
|
204
225
|
* @category Components
|
|
205
226
|
*/
|
|
206
227
|
declare class AXButtonComponent extends MXButtonBaseComponent implements AfterViewInit {
|
|
207
|
-
iconOnly:
|
|
208
|
-
protected showIcon:
|
|
209
|
-
protected loadingIcon:
|
|
210
|
-
protected hasLoadingIcon:
|
|
228
|
+
iconOnly: _angular_core.InputSignal<boolean>;
|
|
229
|
+
protected showIcon: _angular_core.Signal<boolean>;
|
|
230
|
+
protected loadingIcon: _angular_core.Signal<AXLoadingComponent>;
|
|
231
|
+
protected hasLoadingIcon: _angular_core.Signal<boolean>;
|
|
211
232
|
/**
|
|
212
233
|
* Fires each time the user clicks the button.
|
|
213
234
|
* @event
|
|
@@ -218,13 +239,13 @@ declare class AXButtonComponent extends MXButtonBaseComponent implements AfterVi
|
|
|
218
239
|
*
|
|
219
240
|
* @defaultValue 'button'
|
|
220
241
|
*/
|
|
221
|
-
type:
|
|
242
|
+
type: _angular_core.InputSignal<AXButtonType>;
|
|
222
243
|
/**
|
|
223
244
|
* Defines the text displayed while the action sheet is loading.
|
|
224
245
|
*
|
|
225
246
|
* @defaultValue null
|
|
226
247
|
*/
|
|
227
|
-
loadingText:
|
|
248
|
+
loadingText: _angular_core.ModelSignal<string>;
|
|
228
249
|
/**
|
|
229
250
|
* @ignore
|
|
230
251
|
*/
|
|
@@ -255,14 +276,14 @@ declare class AXButtonComponent extends MXButtonBaseComponent implements AfterVi
|
|
|
255
276
|
* when the button loses focus.
|
|
256
277
|
*/
|
|
257
278
|
blur(): void;
|
|
258
|
-
static ɵfac:
|
|
259
|
-
static ɵcmp:
|
|
279
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonComponent, never>;
|
|
280
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXButtonComponent, "ax-button", never, { "disabled": { "alias": "disabled"; "required": false; }; "size": { "alias": "size"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "look": { "alias": "look"; "required": false; }; "text": { "alias": "text"; "required": false; }; "toggleable": { "alias": "toggleable"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; "onClick": "onClick"; "selectedChange": "selectedChange"; "toggleableChange": "toggleableChange"; "lookChange": "lookChange"; "colorChange": "colorChange"; "disabledChange": "disabledChange"; "loadingText": "loadingTextChange"; }, ["loadingIcon"], ["ax-loading, ax-loading-spinner", "ax-prefix, ax-icon", "ax-content", "ax-suffix", "ax-dropdown-panel", ".tab-content", "*"], true, never>;
|
|
260
281
|
}
|
|
261
282
|
|
|
262
283
|
declare class AXButtonModule {
|
|
263
|
-
static ɵfac:
|
|
264
|
-
static ɵmod:
|
|
265
|
-
static ɵinj:
|
|
284
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXButtonModule, never>;
|
|
285
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXButtonModule, never, [typeof AXButtonComponent, typeof AXButtonItemComponent, typeof AXButtonItemListComponent], [typeof AXButtonComponent, typeof AXButtonItemComponent, typeof AXButtonItemListComponent]>;
|
|
286
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXButtonModule>;
|
|
266
287
|
}
|
|
267
288
|
|
|
268
289
|
export { AXButtonComponent, AXButtonItemComponent, AXButtonItemListComponent, AXButtonModule };
|
package/chips/index.d.ts
CHANGED
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import * as i1 from '@acorex/cdk/common';
|
|
3
|
-
import {
|
|
3
|
+
import { MXColorLookComponent } from '@acorex/cdk/common';
|
|
4
4
|
|
|
5
|
-
type AXChipsLookType = Extract<AXStyleLookType, 'solid' | 'outline' | 'twotone'>;
|
|
6
|
-
type AXChipsSizeType = Exclude<AXStyleSizeType, 'ax-xs' | 'ax-xl'>;
|
|
7
5
|
/**
|
|
8
6
|
* A component for displaying and managing a set of chips.
|
|
9
7
|
*
|
|
10
8
|
* @category Components
|
|
11
9
|
*/
|
|
12
|
-
declare class AXChipsComponent extends
|
|
10
|
+
declare class AXChipsComponent extends MXColorLookComponent {
|
|
13
11
|
/**
|
|
14
12
|
* The text displayed on the chips.
|
|
15
13
|
*
|
|
16
14
|
* @defaultValue ''
|
|
17
15
|
*/
|
|
18
16
|
text: i0.ModelSignal<string>;
|
|
19
|
-
look: i0.ModelSignal<AXChipsLookType>;
|
|
20
|
-
size: i0.ModelSignal<AXChipsSizeType>;
|
|
21
17
|
/**
|
|
22
18
|
* @ignore
|
|
23
19
|
*/
|
|
24
20
|
private get __hostClass();
|
|
25
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXChipsComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXChipsComponent, "ax-chips", never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXChipsComponent, "ax-chips", never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "look": { "alias": "look"; "required": false; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; }, { "text": "textChange"; }, never, ["ax-prefix", "ax-suffix"], true, [{ directive: typeof i1.AXRippleDirective; inputs: {}; outputs: {}; }]>;
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
declare class AXChipsModule {
|
|
@@ -33,4 +29,3 @@ declare class AXChipsModule {
|
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
export { AXChipsComponent, AXChipsModule };
|
|
36
|
-
export type { AXChipsLookType, AXChipsSizeType };
|
package/code-editor/README.md
CHANGED
|
@@ -1,3 +1,293 @@
|
|
|
1
1
|
# @acorex/components/code-editor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A modular, plugin-based code editor component built on CodeMirror 6.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🔌 **Plugin Architecture** - Fully modular with external plugin support
|
|
8
|
+
- 🎨 **Themeable** - Custom theme plugins or platform-aware themes
|
|
9
|
+
- 🌍 **Multi-Language** - Support for any language via plugins
|
|
10
|
+
- ✨ **Formatting** - Pluggable formatters (Prettier included)
|
|
11
|
+
- 📝 **Rich API** - Comprehensive component API with signals
|
|
12
|
+
- ♿ **Accessible** - ARIA support and keyboard navigation
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @acorex/components
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Basic Usage
|
|
21
|
+
|
|
22
|
+
### With Default Plugins
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { Component } from '@angular/core';
|
|
26
|
+
import { AXCodeEditorComponent, provideDefaultCodeEditorConfig } from '@acorex/components/code-editor';
|
|
27
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
28
|
+
|
|
29
|
+
@Component({
|
|
30
|
+
selector: 'app-root',
|
|
31
|
+
imports: [AXCodeEditorComponent],
|
|
32
|
+
template: `
|
|
33
|
+
<ax-code-editor
|
|
34
|
+
[(value)]="code"
|
|
35
|
+
language="typescript"
|
|
36
|
+
[lineNumbers]="true"
|
|
37
|
+
[formatOnSave]="true"
|
|
38
|
+
/>
|
|
39
|
+
`
|
|
40
|
+
})
|
|
41
|
+
export class AppComponent {
|
|
42
|
+
code = 'const hello = "world";';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Provide default plugins in your app config
|
|
46
|
+
bootstrapApplication(AppComponent, {
|
|
47
|
+
providers: [provideDefaultCodeEditorConfig()]
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Without Default Plugins (Custom Configuration)
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import {
|
|
55
|
+
provideCodeEditorPlugins,
|
|
56
|
+
JavaScriptLanguagePlugin,
|
|
57
|
+
TypeScriptLanguagePlugin,
|
|
58
|
+
OneDarkThemePlugin,
|
|
59
|
+
LightThemePlugin,
|
|
60
|
+
PrettierFormatterPlugin
|
|
61
|
+
} from '@acorex/components/code-editor';
|
|
62
|
+
|
|
63
|
+
bootstrapApplication(AppComponent, {
|
|
64
|
+
providers: [
|
|
65
|
+
provideCodeEditorPlugins({
|
|
66
|
+
languages: [
|
|
67
|
+
new JavaScriptLanguagePlugin(),
|
|
68
|
+
new TypeScriptLanguagePlugin(),
|
|
69
|
+
],
|
|
70
|
+
themes: [
|
|
71
|
+
new OneDarkThemePlugin(),
|
|
72
|
+
new LightThemePlugin(),
|
|
73
|
+
],
|
|
74
|
+
formatters: [
|
|
75
|
+
new PrettierFormatterPlugin(),
|
|
76
|
+
],
|
|
77
|
+
extensions: []
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Plugin System
|
|
84
|
+
|
|
85
|
+
### Built-in Language Plugins
|
|
86
|
+
|
|
87
|
+
- `JavaScriptLanguagePlugin` - JavaScript (js, javascript)
|
|
88
|
+
- `TypeScriptLanguagePlugin` - TypeScript (ts, typescript)
|
|
89
|
+
- `JSONLanguagePlugin` - JSON
|
|
90
|
+
- `HTMLLanguagePlugin` - HTML
|
|
91
|
+
- `CSSLanguagePlugin` - CSS
|
|
92
|
+
- `SassLanguagePlugin` - Sass/SCSS
|
|
93
|
+
- `SQLLanguagePlugin` - SQL
|
|
94
|
+
- `XMLLanguagePlugin` - XML
|
|
95
|
+
- `MarkdownLanguagePlugin` - Markdown
|
|
96
|
+
|
|
97
|
+
### Built-in Theme Plugins
|
|
98
|
+
|
|
99
|
+
- `OneDarkThemePlugin` - Dark theme
|
|
100
|
+
- `LightThemePlugin` - Light theme
|
|
101
|
+
|
|
102
|
+
### Built-in Formatter Plugins
|
|
103
|
+
|
|
104
|
+
- `PrettierFormatterPlugin` - Prettier formatter (JS, TS, JSON, HTML, CSS, Markdown)
|
|
105
|
+
|
|
106
|
+
### Creating Custom Plugins
|
|
107
|
+
|
|
108
|
+
#### Custom Language Plugin
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
import { AXCodeEditorLanguagePlugin } from '@acorex/components/code-editor';
|
|
112
|
+
import type { Extension } from '@codemirror/state';
|
|
113
|
+
|
|
114
|
+
export class PythonLanguagePlugin implements AXCodeEditorLanguagePlugin {
|
|
115
|
+
readonly id = 'python';
|
|
116
|
+
readonly name = 'Python';
|
|
117
|
+
readonly version = '1.0.0';
|
|
118
|
+
readonly languages = ['python', 'py'];
|
|
119
|
+
|
|
120
|
+
async getExtension(): Promise<Extension> {
|
|
121
|
+
const { python } = await import('@codemirror/lang-python');
|
|
122
|
+
return python();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Custom Theme Plugin
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import { AXCodeEditorThemePlugin } from '@acorex/components/code-editor';
|
|
131
|
+
import type { Extension } from '@codemirror/state';
|
|
132
|
+
|
|
133
|
+
export class CustomThemePlugin implements AXCodeEditorThemePlugin {
|
|
134
|
+
readonly id = 'custom-theme';
|
|
135
|
+
readonly name = 'Custom Theme';
|
|
136
|
+
readonly version = '1.0.0';
|
|
137
|
+
readonly dark = false;
|
|
138
|
+
|
|
139
|
+
async getExtension(): Promise<Extension> {
|
|
140
|
+
const { EditorView } = await import('@codemirror/view');
|
|
141
|
+
return EditorView.theme({
|
|
142
|
+
'&': {
|
|
143
|
+
backgroundColor: '#f5f5f5',
|
|
144
|
+
color: '#333'
|
|
145
|
+
},
|
|
146
|
+
'.cm-gutters': {
|
|
147
|
+
backgroundColor: '#e0e0e0'
|
|
148
|
+
}
|
|
149
|
+
}, { dark: false });
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### Custom Formatter Plugin
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
import { AXCodeEditorFormatterPlugin } from '@acorex/components/code-editor';
|
|
158
|
+
|
|
159
|
+
export class CustomFormatterPlugin implements AXCodeEditorFormatterPlugin {
|
|
160
|
+
readonly id = 'custom-formatter';
|
|
161
|
+
readonly name = 'Custom Formatter';
|
|
162
|
+
readonly version = '1.0.0';
|
|
163
|
+
readonly languages = ['custom'];
|
|
164
|
+
|
|
165
|
+
async format(text: string, language: string): Promise<string | null> {
|
|
166
|
+
// Your formatting logic
|
|
167
|
+
return text.trim();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Runtime Plugin Registration
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { inject } from '@angular/core';
|
|
176
|
+
import { AXCodeEditorPluginRegistry } from '@acorex/components/code-editor';
|
|
177
|
+
|
|
178
|
+
export class MyComponent {
|
|
179
|
+
private registry = inject(AXCodeEditorPluginRegistry);
|
|
180
|
+
|
|
181
|
+
ngOnInit() {
|
|
182
|
+
// Register plugins at runtime
|
|
183
|
+
this.registry.registerLanguagePlugin(new PythonLanguagePlugin());
|
|
184
|
+
this.registry.registerThemePlugin(new CustomThemePlugin());
|
|
185
|
+
this.registry.registerFormatterPlugin(new CustomFormatterPlugin());
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Component API
|
|
191
|
+
|
|
192
|
+
### Inputs
|
|
193
|
+
|
|
194
|
+
| Input | Type | Default | Description |
|
|
195
|
+
| ------------------- | ---------------------------------- | -------------- | -------------------------------- |
|
|
196
|
+
| `value` | `string` | `''` | Editor content (two-way binding) |
|
|
197
|
+
| `language` | `string` | `'javascript'` | Language identifier |
|
|
198
|
+
| `theme` | `string \| null` | `null` | Theme ID (null = platform theme) |
|
|
199
|
+
| `readOnly` | `boolean` | `false` | Read-only mode |
|
|
200
|
+
| `placeholder` | `string` | `''` | Placeholder text |
|
|
201
|
+
| `lineNumbers` | `boolean` | `true` | Show line numbers |
|
|
202
|
+
| `lineWrapping` | `boolean` | `false` | Wrap long lines |
|
|
203
|
+
| `tabSize` | `number` | `2` | Tab size in spaces |
|
|
204
|
+
| `indentWithTab` | `boolean` | `true` | Use Tab key for indentation |
|
|
205
|
+
| `height` | `string \| null` | `null` | Fixed height |
|
|
206
|
+
| `minHeight` | `string \| null` | `null` | Minimum height |
|
|
207
|
+
| `maxHeight` | `string \| null` | `null` | Maximum height |
|
|
208
|
+
| `extensions` | `Extension[]` | `[]` | Additional CodeMirror extensions |
|
|
209
|
+
| `customCompletions` | `Completion[] \| CompletionSource` | `null` | Custom autocomplete |
|
|
210
|
+
| `ariaLabel` | `string \| null` | `null` | ARIA label |
|
|
211
|
+
| `focusOnReady` | `boolean` | `false` | Auto-focus on mount |
|
|
212
|
+
| `formatOnSave` | `boolean` | `false` | Format on Ctrl+S |
|
|
213
|
+
|
|
214
|
+
### Outputs
|
|
215
|
+
|
|
216
|
+
| Output | Type | Description |
|
|
217
|
+
| ------------- | -------- | -------------------------------- |
|
|
218
|
+
| `valueChange` | `string` | Emits when content changes |
|
|
219
|
+
| `ready` | `void` | Emits when editor is initialized |
|
|
220
|
+
| `save` | `string` | Emits on Ctrl+S |
|
|
221
|
+
|
|
222
|
+
### Methods
|
|
223
|
+
|
|
224
|
+
| Method | Returns | Description |
|
|
225
|
+
| ---------------------- | ------------------------- | ------------------- |
|
|
226
|
+
| `focus()` | `void` | Focus the editor |
|
|
227
|
+
| `selectAll()` | `void` | Select all text |
|
|
228
|
+
| `format(affect?)` | `Promise<string \| null>` | Format document |
|
|
229
|
+
| `getTotalCharacters()` | `number` | Get character count |
|
|
230
|
+
| `getTotalLines()` | `number` | Get line count |
|
|
231
|
+
|
|
232
|
+
## Examples
|
|
233
|
+
|
|
234
|
+
### With Custom Theme
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
<ax-code-editor
|
|
238
|
+
[(value)]="code"
|
|
239
|
+
language="typescript"
|
|
240
|
+
theme="one-dark"
|
|
241
|
+
/>
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### With Formatting
|
|
245
|
+
|
|
246
|
+
```typescript
|
|
247
|
+
<ax-code-editor
|
|
248
|
+
[(value)]="code"
|
|
249
|
+
language="json"
|
|
250
|
+
[formatOnSave]="true"
|
|
251
|
+
(save)="onSave($event)"
|
|
252
|
+
/>
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Programmatic Formatting
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
@Component({
|
|
259
|
+
template: `
|
|
260
|
+
<ax-code-editor #editor [(value)]="code" />
|
|
261
|
+
<button (click)="formatCode()">Format</button>
|
|
262
|
+
`
|
|
263
|
+
})
|
|
264
|
+
export class MyComponent {
|
|
265
|
+
editor = viewChild<AXCodeEditorComponent>('editor');
|
|
266
|
+
|
|
267
|
+
async formatCode() {
|
|
268
|
+
await this.editor().format();
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Migration from v1
|
|
274
|
+
|
|
275
|
+
The component now uses a plugin architecture. Update your app configuration:
|
|
276
|
+
|
|
277
|
+
**Before:**
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
// Languages were hardcoded
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**After:**
|
|
284
|
+
|
|
285
|
+
```typescript
|
|
286
|
+
import { provideDefaultCodeEditorConfig } from '@acorex/components/code-editor';
|
|
287
|
+
|
|
288
|
+
bootstrapApplication(AppComponent, {
|
|
289
|
+
providers: [provideDefaultCodeEditorConfig()]
|
|
290
|
+
});
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
The `AXCodeEditorSupportedLanguage` type is deprecated but still available for backward compatibility. Use `string` type directly for language inputs.
|