@acorex/components 18.11.0 → 18.11.1
Sign up to get free protection for your applications and to get access to all the features.
- package/action-sheet/lib/action-sheet.class.d.ts +8 -0
- package/common/index.d.ts +1 -0
- package/common/lib/types/base/component.types.d.ts +8 -0
- package/common/lib/types/base/events.types.d.ts +21 -0
- package/common/lib/types/base/index.d.ts +2 -0
- package/esm2022/action-sheet/lib/action-sheet.class.mjs +1 -1
- package/esm2022/action-sheet/lib/action-sheet.component.mjs +3 -3
- package/esm2022/common/index.mjs +2 -1
- package/esm2022/common/lib/components/base-component.class.mjs +1 -1
- package/esm2022/common/lib/types/base/component.types.mjs +27 -0
- package/esm2022/common/lib/types/base/events.types.mjs +19 -0
- package/esm2022/common/lib/types/base/index.mjs +3 -0
- package/esm2022/menu/lib/context-menu.component.mjs +101 -50
- package/esm2022/menu/lib/menu-item.component.mjs +23 -24
- package/esm2022/menu/lib/menu.component.mjs +6 -6
- package/esm2022/menu/lib/menu.types.mjs +3 -11
- package/fesm2022/acorex-components-action-sheet.mjs +2 -2
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +47 -3
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +128 -86
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/menu/lib/context-menu.component.d.ts +27 -16
- package/menu/lib/menu-item.component.d.ts +6 -6
- package/menu/lib/menu.component.d.ts +5 -4
- package/menu/lib/menu.types.d.ts +9 -14
- package/package.json +29 -29
@@ -1,6 +1,6 @@
|
|
1
|
-
import { flatten, clone, filter, isEqual } from 'lodash-es';
|
2
1
|
import * as i0 from '@angular/core';
|
3
|
-
import { Injectable, Directive, Host, Self, Optional, Input, Inject, NgModule,
|
2
|
+
import { inject, ElementRef, signal, afterNextRender, Injectable, Directive, Host, Self, Optional, Input, Inject, NgModule, ChangeDetectorRef, ViewContainerRef, EventEmitter, InjectionToken, Output, input, effect } from '@angular/core';
|
3
|
+
import { flatten, clone, filter, isEqual } from 'lodash-es';
|
4
4
|
import { DataSource } from '@angular/cdk/collections';
|
5
5
|
import { Subscription, BehaviorSubject, debounceTime, distinctUntilChanged, Subject, fromEvent, noop, skip } from 'rxjs';
|
6
6
|
import { DOCUMENT } from '@angular/common';
|
@@ -15,6 +15,50 @@ import { AXValidationService } from '@acorex/core/validation';
|
|
15
15
|
import { AXFormatService } from '@acorex/core/format';
|
16
16
|
import * as i1$1 from '@angular/forms';
|
17
17
|
|
18
|
+
class NXComponent {
|
19
|
+
constructor() {
|
20
|
+
this.#elementRef = inject(ElementRef);
|
21
|
+
this.#isRendered = signal(false);
|
22
|
+
this.isRendered = this.#isRendered.asReadonly();
|
23
|
+
this.#afterNextRender = afterNextRender(() => {
|
24
|
+
if (!this.isRendered()) {
|
25
|
+
this.nativeElement['__axContext__'] = this;
|
26
|
+
this.#isRendered.set(true);
|
27
|
+
}
|
28
|
+
});
|
29
|
+
}
|
30
|
+
#elementRef;
|
31
|
+
#isRendered;
|
32
|
+
#afterNextRender;
|
33
|
+
get nativeElement() {
|
34
|
+
return this.#elementRef.nativeElement;
|
35
|
+
}
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NXComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NXComponent }); }
|
38
|
+
}
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NXComponent, decorators: [{
|
40
|
+
type: Injectable
|
41
|
+
}] });
|
42
|
+
|
43
|
+
/**
|
44
|
+
* Base event class
|
45
|
+
* @category Events
|
46
|
+
*/
|
47
|
+
class NXEvent {
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Contains native event
|
51
|
+
* @category Events
|
52
|
+
*/
|
53
|
+
class NXNativeEvent extends NXEvent {
|
54
|
+
}
|
55
|
+
/**
|
56
|
+
* Fires each time the user click the element.
|
57
|
+
* @category Events
|
58
|
+
*/
|
59
|
+
class NXClickEvent extends NXNativeEvent {
|
60
|
+
}
|
61
|
+
|
18
62
|
const defaultOffset = 3;
|
19
63
|
function convertToPlacement(value) {
|
20
64
|
const result = [];
|
@@ -1790,5 +1834,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
|
|
1790
1834
|
* Generated bundle index. Do not edit.
|
1791
1835
|
*/
|
1792
1836
|
|
1793
|
-
export { AXAutoFocusDirective, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXInvertedColorDirective, AXItemClickEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, AX_STYLE_LOOK_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, TAB_META_KEY, convertArrayToDataSource, convertToPlacement };
|
1837
|
+
export { AXAutoFocusDirective, AXButtonClickEvent, AXClearableComponent, AXClickEvent, AXClosbaleComponent, AXCommonModule, AXComponent, AXComponentCloseEvent, AXComponentClosedPromise, AXComponentClosing, AXComponentResult, AXDataSource, AXDomService, AXEvent, AXFocusEvent, AXFocusableComponent, AXHotkeyDirective, AXHotkeysService, AXHtmlEvent, AXInfiniteScrollerDirective, AXInvertedColorDirective, AXItemClickEvent, AXListDataSource, AXNgModelDelayedValueChangedDirective, AXOptionChangedEvent, AXPagedComponent, AXRangeChangedEvent, AXResponsiveDirective, AXRippleDirective, AXSearchableComponent, AXSelectionValueChangedEvent, AXValuableComponent, AXValueChangedEvent, AX_LOCATIONS, AX_PLACEMENT_BOTTOM, AX_PLACEMENT_BOTTOM_END, AX_PLACEMENT_BOTTOM_START, AX_PLACEMENT_END, AX_PLACEMENT_END_BOTTOM, AX_PLACEMENT_END_TOP, AX_PLACEMENT_MAP, AX_PLACEMENT_START, AX_PLACEMENT_START_BOTTOM, AX_PLACEMENT_START_TOP, AX_PLACEMENT_TOP, AX_PLACEMENT_TOP_END, AX_PLACEMENT_TOP_START, AX_SELECTION_DATA_TOKEN, AX_STYLE_COLOR_TYPES, AX_STYLE_LOOK_TYPES, MXBaseComponent, MXButtonBaseComponent, MXColorComponent, MXColorLookComponent, MXInputBaseValueComponent, MXInteractiveComponent, MXLookComponent, MXLookableComponent, MXSelectionBridgeService, MXSelectionValueComponent, MXValueComponent, NXClickEvent, NXComponent, NXEvent, NXNativeEvent, TAB_META_KEY, convertArrayToDataSource, convertToPlacement };
|
1794
1838
|
//# sourceMappingURL=acorex-components-common.mjs.map
|