@acorex/components 18.10.4 → 18.10.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/esm2022/map/acorex-components-map.mjs +5 -0
  2. package/esm2022/map/index.mjs +3 -0
  3. package/esm2022/map/lib/map.component.mjs +74 -0
  4. package/esm2022/map/lib/map.module.mjs +18 -0
  5. package/esm2022/menu/index.mjs +2 -1
  6. package/esm2022/menu/lib/menu-item/menu-item.component.mjs +5 -18
  7. package/esm2022/menu/lib/menu-item-text/menu-item-text.component.mjs +11 -0
  8. package/esm2022/menu/lib/menu.component.mjs +9 -117
  9. package/esm2022/menu/lib/menu.module.mjs +4 -3
  10. package/esm2022/menu/lib/menu.service.mjs +2 -7
  11. package/esm2022/rate-picker/acorex-components-rate-picker.mjs +5 -0
  12. package/esm2022/rate-picker/index.mjs +3 -0
  13. package/esm2022/rate-picker/lib/calculatePercentage.mjs +45 -0
  14. package/esm2022/rate-picker/lib/rate-picker.component.mjs +184 -0
  15. package/esm2022/rate-picker/lib/rate-picker.module.mjs +18 -0
  16. package/esm2022/time-line/acorex-components-time-line.mjs +5 -0
  17. package/esm2022/time-line/index.mjs +4 -0
  18. package/esm2022/time-line/lib/time-line-item.component.mjs +34 -0
  19. package/esm2022/time-line/lib/time-line.component.mjs +11 -0
  20. package/esm2022/time-line/lib/time-line.module.mjs +19 -0
  21. package/fesm2022/acorex-components-map.mjs +96 -0
  22. package/fesm2022/acorex-components-map.mjs.map +1 -0
  23. package/fesm2022/acorex-components-menu.mjs +24 -141
  24. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  25. package/fesm2022/acorex-components-rate-picker.mjs +250 -0
  26. package/fesm2022/acorex-components-rate-picker.mjs.map +1 -0
  27. package/fesm2022/acorex-components-time-line.mjs +65 -0
  28. package/fesm2022/acorex-components-time-line.mjs.map +1 -0
  29. package/map/README.md +3 -0
  30. package/map/index.d.ts +3 -0
  31. package/map/lib/map.component.d.ts +24 -0
  32. package/map/lib/map.module.d.ts +8 -0
  33. package/menu/index.d.ts +1 -0
  34. package/menu/lib/menu-item/menu-item.component.d.ts +1 -3
  35. package/menu/lib/menu-item-text/menu-item-text.component.d.ts +5 -0
  36. package/menu/lib/menu.component.d.ts +1 -6
  37. package/menu/lib/menu.module.d.ts +9 -8
  38. package/menu/lib/menu.service.d.ts +0 -5
  39. package/package.json +55 -37
  40. package/rate-picker/README.md +3 -0
  41. package/rate-picker/index.d.ts +2 -0
  42. package/rate-picker/lib/calculatePercentage.d.ts +27 -0
  43. package/rate-picker/lib/rate-picker.component.d.ts +69 -0
  44. package/rate-picker/lib/rate-picker.module.d.ts +8 -0
  45. package/time-line/README.md +3 -0
  46. package/time-line/index.d.ts +3 -0
  47. package/time-line/lib/time-line-item.component.d.ts +7 -0
  48. package/time-line/lib/time-line.component.d.ts +5 -0
  49. 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.4",
3
+ "version": "18.10.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.2.0",
6
6
  "@angular/core": ">=18.2.0",
@@ -32,12 +32,6 @@
32
32
  "esm": "./esm2022/action-sheet/acorex-components-action-sheet.mjs",
33
33
  "default": "./fesm2022/acorex-components-action-sheet.mjs"
34
34
  },
35
- "./badge": {
36
- "types": "./badge/index.d.ts",
37
- "esm2022": "./esm2022/badge/acorex-components-badge.mjs",
38
- "esm": "./esm2022/badge/acorex-components-badge.mjs",
39
- "default": "./fesm2022/acorex-components-badge.mjs"
40
- },
41
35
  "./avatar": {
42
36
  "types": "./avatar/index.d.ts",
43
37
  "esm2022": "./esm2022/avatar/acorex-components-avatar.mjs",
@@ -50,18 +44,24 @@
50
44
  "esm": "./esm2022/bottom-navigation/acorex-components-bottom-navigation.mjs",
51
45
  "default": "./fesm2022/acorex-components-bottom-navigation.mjs"
52
46
  },
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
47
  "./breadcrumbs": {
60
48
  "types": "./breadcrumbs/index.d.ts",
61
49
  "esm2022": "./esm2022/breadcrumbs/acorex-components-breadcrumbs.mjs",
62
50
  "esm": "./esm2022/breadcrumbs/acorex-components-breadcrumbs.mjs",
63
51
  "default": "./fesm2022/acorex-components-breadcrumbs.mjs"
64
52
  },
53
+ "./badge": {
54
+ "types": "./badge/index.d.ts",
55
+ "esm2022": "./esm2022/badge/acorex-components-badge.mjs",
56
+ "esm": "./esm2022/badge/acorex-components-badge.mjs",
57
+ "default": "./fesm2022/acorex-components-badge.mjs"
58
+ },
59
+ "./alert": {
60
+ "types": "./alert/index.d.ts",
61
+ "esm2022": "./esm2022/alert/acorex-components-alert.mjs",
62
+ "esm": "./esm2022/alert/acorex-components-alert.mjs",
63
+ "default": "./fesm2022/acorex-components-alert.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",
@@ -176,18 +176,18 @@
176
176
  "esm": "./esm2022/decorators/acorex-components-decorators.mjs",
177
177
  "default": "./fesm2022/acorex-components-decorators.mjs"
178
178
  },
179
- "./dialog": {
180
- "types": "./dialog/index.d.ts",
181
- "esm2022": "./esm2022/dialog/acorex-components-dialog.mjs",
182
- "esm": "./esm2022/dialog/acorex-components-dialog.mjs",
183
- "default": "./fesm2022/acorex-components-dialog.mjs"
184
- },
185
179
  "./drawer": {
186
180
  "types": "./drawer/index.d.ts",
187
181
  "esm2022": "./esm2022/drawer/acorex-components-drawer.mjs",
188
182
  "esm": "./esm2022/drawer/acorex-components-drawer.mjs",
189
183
  "default": "./fesm2022/acorex-components-drawer.mjs"
190
184
  },
185
+ "./dialog": {
186
+ "types": "./dialog/index.d.ts",
187
+ "esm2022": "./esm2022/dialog/acorex-components-dialog.mjs",
188
+ "esm": "./esm2022/dialog/acorex-components-dialog.mjs",
189
+ "default": "./fesm2022/acorex-components-dialog.mjs"
190
+ },
191
191
  "./dropdown": {
192
192
  "types": "./dropdown/index.d.ts",
193
193
  "esm2022": "./esm2022/dropdown/acorex-components-dropdown.mjs",
@@ -218,24 +218,30 @@
218
218
  "esm": "./esm2022/label/acorex-components-label.mjs",
219
219
  "default": "./fesm2022/acorex-components-label.mjs"
220
220
  },
221
- "./list": {
222
- "types": "./list/index.d.ts",
223
- "esm2022": "./esm2022/list/acorex-components-list.mjs",
224
- "esm": "./esm2022/list/acorex-components-list.mjs",
225
- "default": "./fesm2022/acorex-components-list.mjs"
226
- },
227
221
  "./loading": {
228
222
  "types": "./loading/index.d.ts",
229
223
  "esm2022": "./esm2022/loading/acorex-components-loading.mjs",
230
224
  "esm": "./esm2022/loading/acorex-components-loading.mjs",
231
225
  "default": "./fesm2022/acorex-components-loading.mjs"
232
226
  },
227
+ "./list": {
228
+ "types": "./list/index.d.ts",
229
+ "esm2022": "./esm2022/list/acorex-components-list.mjs",
230
+ "esm": "./esm2022/list/acorex-components-list.mjs",
231
+ "default": "./fesm2022/acorex-components-list.mjs"
232
+ },
233
233
  "./loading-dialog": {
234
234
  "types": "./loading-dialog/index.d.ts",
235
235
  "esm2022": "./esm2022/loading-dialog/acorex-components-loading-dialog.mjs",
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",
@@ -338,18 +344,24 @@
338
344
  "esm": "./esm2022/radio/acorex-components-radio.mjs",
339
345
  "default": "./fesm2022/acorex-components-radio.mjs"
340
346
  },
341
- "./result": {
342
- "types": "./result/index.d.ts",
343
- "esm2022": "./esm2022/result/acorex-components-result.mjs",
344
- "esm": "./esm2022/result/acorex-components-result.mjs",
345
- "default": "./fesm2022/acorex-components-result.mjs"
346
- },
347
347
  "./range-slider": {
348
348
  "types": "./range-slider/index.d.ts",
349
349
  "esm2022": "./esm2022/range-slider/acorex-components-range-slider.mjs",
350
350
  "esm": "./esm2022/range-slider/acorex-components-range-slider.mjs",
351
351
  "default": "./fesm2022/acorex-components-range-slider.mjs"
352
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
+ },
359
+ "./result": {
360
+ "types": "./result/index.d.ts",
361
+ "esm2022": "./esm2022/result/acorex-components-result.mjs",
362
+ "esm": "./esm2022/result/acorex-components-result.mjs",
363
+ "default": "./fesm2022/acorex-components-result.mjs"
364
+ },
353
365
  "./routing-progress": {
354
366
  "types": "./routing-progress/index.d.ts",
355
367
  "esm2022": "./esm2022/routing-progress/acorex-components-routing-progress.mjs",
@@ -374,18 +386,18 @@
374
386
  "esm": "./esm2022/search-box/acorex-components-search-box.mjs",
375
387
  "default": "./fesm2022/acorex-components-search-box.mjs"
376
388
  },
377
- "./select-box": {
378
- "types": "./select-box/index.d.ts",
379
- "esm2022": "./esm2022/select-box/acorex-components-select-box.mjs",
380
- "esm": "./esm2022/select-box/acorex-components-select-box.mjs",
381
- "default": "./fesm2022/acorex-components-select-box.mjs"
382
- },
383
389
  "./selection-list": {
384
390
  "types": "./selection-list/index.d.ts",
385
391
  "esm2022": "./esm2022/selection-list/acorex-components-selection-list.mjs",
386
392
  "esm": "./esm2022/selection-list/acorex-components-selection-list.mjs",
387
393
  "default": "./fesm2022/acorex-components-selection-list.mjs"
388
394
  },
395
+ "./select-box": {
396
+ "types": "./select-box/index.d.ts",
397
+ "esm2022": "./esm2022/select-box/acorex-components-select-box.mjs",
398
+ "esm": "./esm2022/select-box/acorex-components-select-box.mjs",
399
+ "default": "./fesm2022/acorex-components-select-box.mjs"
400
+ },
389
401
  "./side-menu": {
390
402
  "types": "./side-menu/index.d.ts",
391
403
  "esm2022": "./esm2022/side-menu/acorex-components-side-menu.mjs",
@@ -440,6 +452,12 @@
440
452
  "esm": "./esm2022/text-box/acorex-components-text-box.mjs",
441
453
  "default": "./fesm2022/acorex-components-text-box.mjs"
442
454
  },
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"
460
+ },
443
461
  "./toast": {
444
462
  "types": "./toast/index.d.ts",
445
463
  "esm2022": "./esm2022/toast/acorex-components-toast.mjs",
@@ -0,0 +1,3 @@
1
+ # @acorex/components/rate-picker
2
+
3
+ Secondary entry point of `@acorex/components`. It can be used by importing from `@acorex/components/rate-picker`.
@@ -0,0 +1,2 @@
1
+ export * from './lib/rate-picker.component';
2
+ export * from './lib/rate-picker.module';
@@ -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,3 @@
1
+ # @acorex/components/time-line
2
+
3
+ Secondary entry point of `@acorex/components`. It can be used by importing from `@acorex/components/time-line`.
@@ -0,0 +1,3 @@
1
+ export * from './lib/time-line-item.component';
2
+ export * from './lib/time-line.component';
3
+ export * from './lib/time-line.module';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AXTimeLineItemComponent {
3
+ text: import("@angular/core").InputSignal<string>;
4
+ isCollapsed: import("@angular/core").WritableSignal<boolean>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeLineItemComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXTimeLineItemComponent, "ax-time-line-item", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
7
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AXTimeLineComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeLineComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXTimeLineComponent, "ax-time-line", never, {}, {}, never, ["*"], false, never>;
5
+ }
@@ -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
+ }