@acorex/components 18.10.4 → 18.10.6
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/map/acorex-components-map.mjs +5 -0
- package/esm2022/map/index.mjs +3 -0
- package/esm2022/map/lib/map.component.mjs +78 -0
- package/esm2022/map/lib/map.module.mjs +18 -0
- package/esm2022/menu/index.mjs +2 -1
- package/esm2022/menu/lib/menu-item/menu-item.component.mjs +5 -18
- package/esm2022/menu/lib/menu-item-text/menu-item-text.component.mjs +11 -0
- package/esm2022/menu/lib/menu.component.mjs +9 -117
- package/esm2022/menu/lib/menu.module.mjs +4 -3
- package/esm2022/menu/lib/menu.service.mjs +2 -7
- package/esm2022/rate-picker/acorex-components-rate-picker.mjs +5 -0
- package/esm2022/rate-picker/index.mjs +3 -0
- package/esm2022/rate-picker/lib/calculatePercentage.mjs +45 -0
- package/esm2022/rate-picker/lib/rate-picker.component.mjs +184 -0
- package/esm2022/rate-picker/lib/rate-picker.module.mjs +18 -0
- package/esm2022/time-line/acorex-components-time-line.mjs +5 -0
- package/esm2022/time-line/index.mjs +4 -0
- package/esm2022/time-line/lib/time-line-item.component.mjs +48 -0
- package/esm2022/time-line/lib/time-line.component.mjs +14 -0
- package/esm2022/time-line/lib/time-line.module.mjs +19 -0
- package/fesm2022/acorex-components-map.mjs +100 -0
- package/fesm2022/acorex-components-map.mjs.map +1 -0
- package/fesm2022/acorex-components-menu.mjs +24 -141
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-rate-picker.mjs +250 -0
- package/fesm2022/acorex-components-rate-picker.mjs.map +1 -0
- package/fesm2022/acorex-components-time-line.mjs +81 -0
- package/fesm2022/acorex-components-time-line.mjs.map +1 -0
- package/map/README.md +3 -0
- package/map/index.d.ts +3 -0
- package/map/lib/map.component.d.ts +25 -0
- package/map/lib/map.module.d.ts +8 -0
- package/menu/index.d.ts +1 -0
- package/menu/lib/menu-item/menu-item.component.d.ts +1 -3
- package/menu/lib/menu-item-text/menu-item-text.component.d.ts +5 -0
- package/menu/lib/menu.component.d.ts +1 -6
- package/menu/lib/menu.module.d.ts +9 -8
- package/menu/lib/menu.service.d.ts +0 -5
- package/package.json +48 -30
- package/rate-picker/README.md +3 -0
- package/rate-picker/index.d.ts +2 -0
- package/rate-picker/lib/calculatePercentage.d.ts +27 -0
- package/rate-picker/lib/rate-picker.component.d.ts +69 -0
- package/rate-picker/lib/rate-picker.module.d.ts +8 -0
- package/time-line/README.md +3 -0
- package/time-line/index.d.ts +3 -0
- package/time-line/lib/time-line-item.component.d.ts +14 -0
- package/time-line/lib/time-line.component.d.ts +7 -0
- package/time-line/lib/time-line.module.d.ts +9 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@acorex/components",
|
3
|
-
"version": "18.10.
|
3
|
+
"version": "18.10.6",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@angular/common": ">=18.2.0",
|
6
6
|
"@angular/core": ">=18.2.0",
|
@@ -32,12 +32,24 @@
|
|
32
32
|
"esm": "./esm2022/action-sheet/acorex-components-action-sheet.mjs",
|
33
33
|
"default": "./fesm2022/acorex-components-action-sheet.mjs"
|
34
34
|
},
|
35
|
+
"./alert": {
|
36
|
+
"types": "./alert/index.d.ts",
|
37
|
+
"esm2022": "./esm2022/alert/acorex-components-alert.mjs",
|
38
|
+
"esm": "./esm2022/alert/acorex-components-alert.mjs",
|
39
|
+
"default": "./fesm2022/acorex-components-alert.mjs"
|
40
|
+
},
|
35
41
|
"./badge": {
|
36
42
|
"types": "./badge/index.d.ts",
|
37
43
|
"esm2022": "./esm2022/badge/acorex-components-badge.mjs",
|
38
44
|
"esm": "./esm2022/badge/acorex-components-badge.mjs",
|
39
45
|
"default": "./fesm2022/acorex-components-badge.mjs"
|
40
46
|
},
|
47
|
+
"./breadcrumbs": {
|
48
|
+
"types": "./breadcrumbs/index.d.ts",
|
49
|
+
"esm2022": "./esm2022/breadcrumbs/acorex-components-breadcrumbs.mjs",
|
50
|
+
"esm": "./esm2022/breadcrumbs/acorex-components-breadcrumbs.mjs",
|
51
|
+
"default": "./fesm2022/acorex-components-breadcrumbs.mjs"
|
52
|
+
},
|
41
53
|
"./avatar": {
|
42
54
|
"types": "./avatar/index.d.ts",
|
43
55
|
"esm2022": "./esm2022/avatar/acorex-components-avatar.mjs",
|
@@ -50,18 +62,6 @@
|
|
50
62
|
"esm": "./esm2022/bottom-navigation/acorex-components-bottom-navigation.mjs",
|
51
63
|
"default": "./fesm2022/acorex-components-bottom-navigation.mjs"
|
52
64
|
},
|
53
|
-
"./alert": {
|
54
|
-
"types": "./alert/index.d.ts",
|
55
|
-
"esm2022": "./esm2022/alert/acorex-components-alert.mjs",
|
56
|
-
"esm": "./esm2022/alert/acorex-components-alert.mjs",
|
57
|
-
"default": "./fesm2022/acorex-components-alert.mjs"
|
58
|
-
},
|
59
|
-
"./breadcrumbs": {
|
60
|
-
"types": "./breadcrumbs/index.d.ts",
|
61
|
-
"esm2022": "./esm2022/breadcrumbs/acorex-components-breadcrumbs.mjs",
|
62
|
-
"esm": "./esm2022/breadcrumbs/acorex-components-breadcrumbs.mjs",
|
63
|
-
"default": "./fesm2022/acorex-components-breadcrumbs.mjs"
|
64
|
-
},
|
65
65
|
"./audio-wave": {
|
66
66
|
"types": "./audio-wave/index.d.ts",
|
67
67
|
"esm2022": "./esm2022/audio-wave/acorex-components-audio-wave.mjs",
|
@@ -146,18 +146,18 @@
|
|
146
146
|
"esm": "./esm2022/data-pager/acorex-components-data-pager.mjs",
|
147
147
|
"default": "./fesm2022/acorex-components-data-pager.mjs"
|
148
148
|
},
|
149
|
-
"./data-table": {
|
150
|
-
"types": "./data-table/index.d.ts",
|
151
|
-
"esm2022": "./esm2022/data-table/acorex-components-data-table.mjs",
|
152
|
-
"esm": "./esm2022/data-table/acorex-components-data-table.mjs",
|
153
|
-
"default": "./fesm2022/acorex-components-data-table.mjs"
|
154
|
-
},
|
155
149
|
"./datetime-box": {
|
156
150
|
"types": "./datetime-box/index.d.ts",
|
157
151
|
"esm2022": "./esm2022/datetime-box/acorex-components-datetime-box.mjs",
|
158
152
|
"esm": "./esm2022/datetime-box/acorex-components-datetime-box.mjs",
|
159
153
|
"default": "./fesm2022/acorex-components-datetime-box.mjs"
|
160
154
|
},
|
155
|
+
"./data-table": {
|
156
|
+
"types": "./data-table/index.d.ts",
|
157
|
+
"esm2022": "./esm2022/data-table/acorex-components-data-table.mjs",
|
158
|
+
"esm": "./esm2022/data-table/acorex-components-data-table.mjs",
|
159
|
+
"default": "./fesm2022/acorex-components-data-table.mjs"
|
160
|
+
},
|
161
161
|
"./datetime-input": {
|
162
162
|
"types": "./datetime-input/index.d.ts",
|
163
163
|
"esm2022": "./esm2022/datetime-input/acorex-components-datetime-input.mjs",
|
@@ -236,6 +236,12 @@
|
|
236
236
|
"esm": "./esm2022/loading-dialog/acorex-components-loading-dialog.mjs",
|
237
237
|
"default": "./fesm2022/acorex-components-loading-dialog.mjs"
|
238
238
|
},
|
239
|
+
"./map": {
|
240
|
+
"types": "./map/index.d.ts",
|
241
|
+
"esm2022": "./esm2022/map/acorex-components-map.mjs",
|
242
|
+
"esm": "./esm2022/map/acorex-components-map.mjs",
|
243
|
+
"default": "./fesm2022/acorex-components-map.mjs"
|
244
|
+
},
|
239
245
|
"./media-viewer": {
|
240
246
|
"types": "./media-viewer/index.d.ts",
|
241
247
|
"esm2022": "./esm2022/media-viewer/acorex-components-media-viewer.mjs",
|
@@ -332,24 +338,30 @@
|
|
332
338
|
"esm": "./esm2022/qrcode/acorex-components-qrcode.mjs",
|
333
339
|
"default": "./fesm2022/acorex-components-qrcode.mjs"
|
334
340
|
},
|
341
|
+
"./range-slider": {
|
342
|
+
"types": "./range-slider/index.d.ts",
|
343
|
+
"esm2022": "./esm2022/range-slider/acorex-components-range-slider.mjs",
|
344
|
+
"esm": "./esm2022/range-slider/acorex-components-range-slider.mjs",
|
345
|
+
"default": "./fesm2022/acorex-components-range-slider.mjs"
|
346
|
+
},
|
335
347
|
"./radio": {
|
336
348
|
"types": "./radio/index.d.ts",
|
337
349
|
"esm2022": "./esm2022/radio/acorex-components-radio.mjs",
|
338
350
|
"esm": "./esm2022/radio/acorex-components-radio.mjs",
|
339
351
|
"default": "./fesm2022/acorex-components-radio.mjs"
|
340
352
|
},
|
353
|
+
"./rate-picker": {
|
354
|
+
"types": "./rate-picker/index.d.ts",
|
355
|
+
"esm2022": "./esm2022/rate-picker/acorex-components-rate-picker.mjs",
|
356
|
+
"esm": "./esm2022/rate-picker/acorex-components-rate-picker.mjs",
|
357
|
+
"default": "./fesm2022/acorex-components-rate-picker.mjs"
|
358
|
+
},
|
341
359
|
"./result": {
|
342
360
|
"types": "./result/index.d.ts",
|
343
361
|
"esm2022": "./esm2022/result/acorex-components-result.mjs",
|
344
362
|
"esm": "./esm2022/result/acorex-components-result.mjs",
|
345
363
|
"default": "./fesm2022/acorex-components-result.mjs"
|
346
364
|
},
|
347
|
-
"./range-slider": {
|
348
|
-
"types": "./range-slider/index.d.ts",
|
349
|
-
"esm2022": "./esm2022/range-slider/acorex-components-range-slider.mjs",
|
350
|
-
"esm": "./esm2022/range-slider/acorex-components-range-slider.mjs",
|
351
|
-
"default": "./fesm2022/acorex-components-range-slider.mjs"
|
352
|
-
},
|
353
365
|
"./routing-progress": {
|
354
366
|
"types": "./routing-progress/index.d.ts",
|
355
367
|
"esm2022": "./esm2022/routing-progress/acorex-components-routing-progress.mjs",
|
@@ -428,17 +440,23 @@
|
|
428
440
|
"esm": "./esm2022/tag/acorex-components-tag.mjs",
|
429
441
|
"default": "./fesm2022/acorex-components-tag.mjs"
|
430
442
|
},
|
443
|
+
"./text-box": {
|
444
|
+
"types": "./text-box/index.d.ts",
|
445
|
+
"esm2022": "./esm2022/text-box/acorex-components-text-box.mjs",
|
446
|
+
"esm": "./esm2022/text-box/acorex-components-text-box.mjs",
|
447
|
+
"default": "./fesm2022/acorex-components-text-box.mjs"
|
448
|
+
},
|
431
449
|
"./text-area": {
|
432
450
|
"types": "./text-area/index.d.ts",
|
433
451
|
"esm2022": "./esm2022/text-area/acorex-components-text-area.mjs",
|
434
452
|
"esm": "./esm2022/text-area/acorex-components-text-area.mjs",
|
435
453
|
"default": "./fesm2022/acorex-components-text-area.mjs"
|
436
454
|
},
|
437
|
-
"./
|
438
|
-
"types": "./
|
439
|
-
"esm2022": "./esm2022/
|
440
|
-
"esm": "./esm2022/
|
441
|
-
"default": "./fesm2022/acorex-components-
|
455
|
+
"./time-line": {
|
456
|
+
"types": "./time-line/index.d.ts",
|
457
|
+
"esm2022": "./esm2022/time-line/acorex-components-time-line.mjs",
|
458
|
+
"esm": "./esm2022/time-line/acorex-components-time-line.mjs",
|
459
|
+
"default": "./fesm2022/acorex-components-time-line.mjs"
|
442
460
|
},
|
443
461
|
"./toast": {
|
444
462
|
"types": "./toast/index.d.ts",
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/**
|
2
|
+
* Calculates the horizontal position of a pointer event (mouse or touch) as a percentage
|
3
|
+
* of the target element's width.
|
4
|
+
*
|
5
|
+
* @param event - The mouse or touch event to get the pointer position from.
|
6
|
+
* @returns The percentage of the event's position relative to the target element's width,
|
7
|
+
* or -1 if the event is invalid.
|
8
|
+
*
|
9
|
+
* @remarks
|
10
|
+
* - For `MouseEvent`, it uses the `clientX` property.
|
11
|
+
* - For `TouchEvent`, it uses the `clientX` of the first touch point.
|
12
|
+
* - Returns `-1` if the event is neither a valid `MouseEvent` nor a `TouchEvent`.
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* ```typescript
|
16
|
+
* document.addEventListener('click', function(event) {
|
17
|
+
* const percentage = getPointerPercentage(event);
|
18
|
+
* console.log(`Click position: ${percentage.toFixed(2)}% of the element's width`);
|
19
|
+
* });
|
20
|
+
*
|
21
|
+
* document.addEventListener('touchstart', function(event) {
|
22
|
+
* const percentage = getPointerPercentage(event);
|
23
|
+
* console.log(`Touch position: ${percentage.toFixed(2)}% of the element's width`);
|
24
|
+
* });
|
25
|
+
* ```
|
26
|
+
*/
|
27
|
+
export declare function getPointerPercentage(event: MouseEvent | TouchEvent): number;
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import { MXValueComponent } from '@acorex/components/common';
|
2
|
+
import { ElementRef, Renderer2 } from '@angular/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
/**
|
5
|
+
* A component for selecting a rating using star icons.
|
6
|
+
*
|
7
|
+
* This component allows users to pick a rating by clicking or dragging over star icons.
|
8
|
+
* It supports rounding options and manages the rating state internally.
|
9
|
+
*/
|
10
|
+
export declare class AXRatePickerComponent extends MXValueComponent<number> {
|
11
|
+
/** The icon name to use for stars (e.g., 'fa-star'). */
|
12
|
+
iconName: import("@angular/core").InputSignal<string>;
|
13
|
+
/** The maximum rating value (e.g., 5 stars). */
|
14
|
+
max: import("@angular/core").InputSignal<number>;
|
15
|
+
/** Determines if the rating should be rounded to the nearest integer. */
|
16
|
+
isRound: import("@angular/core").InputSignal<boolean>;
|
17
|
+
/** choosing to have css transition for unchanging value after hover. */
|
18
|
+
hasTransition: import("@angular/core").InputSignal<boolean>;
|
19
|
+
/** The percentage of the current rating value relative to the maximum rating. */
|
20
|
+
protected ratePercentage: import("@angular/core").Signal<number>;
|
21
|
+
/** The current rating value as a signal. */
|
22
|
+
private currentValue;
|
23
|
+
/** State for tracking hover status and previous value. */
|
24
|
+
private prevState;
|
25
|
+
/** Reference to the container element. */
|
26
|
+
containerEl: import("@angular/core").Signal<ElementRef<any>>;
|
27
|
+
/** Reference to the rating element. */
|
28
|
+
ratingEl: import("@angular/core").Signal<ElementRef<any>>;
|
29
|
+
/** Renderer for manipulating styles. */
|
30
|
+
renderer: Renderer2;
|
31
|
+
/** Array of rating values from 1 to `max`. */
|
32
|
+
protected rates: import("@angular/core").Signal<number[]>;
|
33
|
+
/**
|
34
|
+
* Initializes the component and sets up value change subscription.
|
35
|
+
*/
|
36
|
+
constructor();
|
37
|
+
/**
|
38
|
+
* Calculates and updates the rating based on the mouse or touch event.
|
39
|
+
*
|
40
|
+
* @param event - The mouse or touch event triggering the rating calculation.
|
41
|
+
*/
|
42
|
+
protected calculateRate(event: MouseEvent | TouchEvent): void;
|
43
|
+
/**
|
44
|
+
* Handles mouse enter events to start tracking mouse movements for rating.
|
45
|
+
*/
|
46
|
+
protected mouseEnter(): void;
|
47
|
+
mouseLeave(): void;
|
48
|
+
/**
|
49
|
+
* Cleans up event listeners and restores the previous rating value.
|
50
|
+
*
|
51
|
+
* @param moveListener - The function to remove for mouse move events.
|
52
|
+
* @param endListener - The function to remove for mouse end events.
|
53
|
+
*/
|
54
|
+
private onEnd;
|
55
|
+
/**
|
56
|
+
* Determines if the component is active (i.e., not readonly or disabled).
|
57
|
+
*/
|
58
|
+
get isActive(): boolean;
|
59
|
+
/**
|
60
|
+
* Determines if the component is in readonly mode.
|
61
|
+
*/
|
62
|
+
get isReadonly(): boolean;
|
63
|
+
/**
|
64
|
+
* Determines if the component is disabled.
|
65
|
+
*/
|
66
|
+
get isDisabled(): boolean;
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXRatePickerComponent, never>;
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXRatePickerComponent, "ax-rate-picker", never, { "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "isRound": { "alias": "isRound"; "required": false; "isSignal": true; }; "hasTransition": { "alias": "hasTransition"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
|
69
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./rate-picker.component";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
export declare class AXRatePickerModule {
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXRatePickerModule, never>;
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXRatePickerModule, [typeof i1.AXRatePickerComponent], [typeof i2.CommonModule], [typeof i1.AXRatePickerComponent]>;
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXRatePickerModule>;
|
8
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { AXTimeLineComponent, AXTimeLineMode } from './time-line.component';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class AXTimeLineItemComponent {
|
4
|
+
parent: AXTimeLineComponent;
|
5
|
+
text: import("@angular/core").InputSignal<string>;
|
6
|
+
isActive: import("@angular/core").InputSignal<boolean>;
|
7
|
+
isCollapsed: import("@angular/core").ModelSignal<boolean>;
|
8
|
+
mode: import("@angular/core").WritableSignal<AXTimeLineMode>;
|
9
|
+
constructor();
|
10
|
+
handleClick(): void;
|
11
|
+
get __hostClass(): string[];
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeLineItemComponent, never>;
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXTimeLineItemComponent, "ax-time-line-item", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; "isCollapsed": { "alias": "isCollapsed"; "required": false; "isSignal": true; }; }, { "isCollapsed": "isCollapsedChange"; }, never, ["ax-icon", "*"], false, never>;
|
14
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export type AXTimeLineMode = 'icon' | 'bulet';
|
3
|
+
export declare class AXTimeLineComponent {
|
4
|
+
mode: import("@angular/core").InputSignal<AXTimeLineMode>;
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeLineComponent, never>;
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXTimeLineComponent, "ax-time-line", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
|
7
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./time-line.component";
|
3
|
+
import * as i2 from "./time-line-item.component";
|
4
|
+
import * as i3 from "@angular/common";
|
5
|
+
export declare class AXTimeLineModule {
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeLineModule, never>;
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXTimeLineModule, [typeof i1.AXTimeLineComponent, typeof i2.AXTimeLineItemComponent], [typeof i3.CommonModule], [typeof i1.AXTimeLineComponent, typeof i2.AXTimeLineItemComponent]>;
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXTimeLineModule>;
|
9
|
+
}
|