shirkasoft-ui-components 1.13.18 → 2.0.0

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.
Files changed (98) hide show
  1. package/README.md +415 -42
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
  3. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/shirkasoft-ui-components-button.mjs +367 -73
  5. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
  7. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
  8. package/fesm2022/shirkasoft-ui-components-config.mjs +976 -0
  9. package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
  10. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
  11. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
  12. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1624 -1400
  13. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
  14. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
  15. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
  16. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +484 -293
  17. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
  18. package/fesm2022/shirkasoft-ui-components-icons.mjs +1141 -0
  19. package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
  20. package/fesm2022/shirkasoft-ui-components-knob.mjs +395 -180
  21. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
  22. package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
  23. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
  24. package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -303
  25. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
  26. package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
  27. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
  28. package/fesm2022/shirkasoft-ui-components-price-input.mjs +517 -277
  29. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
  30. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
  31. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
  32. package/fesm2022/shirkasoft-ui-components-select.mjs +1014 -814
  33. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
  34. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
  35. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
  36. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
  37. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
  38. package/fesm2022/shirkasoft-ui-components-table.mjs +1918 -1676
  39. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
  40. package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -177
  41. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
  42. package/fesm2022/shirkasoft-ui-components-tag.mjs +177 -51
  43. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
  44. package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -369
  45. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
  46. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +466 -0
  47. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
  48. package/fesm2022/shirkasoft-ui-components-theme.mjs +147 -0
  49. package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
  50. package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -215
  51. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
  52. package/fesm2022/shirkasoft-ui-components-toggle.mjs +205 -128
  53. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
  54. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
  55. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/shirkasoft-ui-components-utils.mjs +97 -125
  57. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
  58. package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -166
  59. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
  60. package/fesm2022/shirkasoft-ui-components.mjs +0 -9
  61. package/package.json +37 -7
  62. package/src/baseline.css +2472 -0
  63. package/src/theme.css +15 -543
  64. package/src/themes/ocean.css +56 -0
  65. package/src/themes/sunset.css +55 -0
  66. package/src/themes/violet.css +25 -0
  67. package/src/tokens.css +612 -0
  68. package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
  69. package/types/shirkasoft-ui-components-button.d.ts +142 -49
  70. package/types/shirkasoft-ui-components-chart.d.ts +59 -44
  71. package/types/shirkasoft-ui-components-config.d.ts +357 -0
  72. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -65
  73. package/types/shirkasoft-ui-components-date-picker.d.ts +527 -373
  74. package/types/shirkasoft-ui-components-fieldset.d.ts +135 -59
  75. package/types/shirkasoft-ui-components-file-upload.d.ts +176 -106
  76. package/types/shirkasoft-ui-components-icons.d.ts +1430 -0
  77. package/types/shirkasoft-ui-components-knob.d.ts +151 -64
  78. package/types/shirkasoft-ui-components-loading.d.ts +155 -64
  79. package/types/shirkasoft-ui-components-modal.d.ts +134 -132
  80. package/types/shirkasoft-ui-components-notification.d.ts +63 -58
  81. package/types/shirkasoft-ui-components-price-input.d.ts +198 -85
  82. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
  83. package/types/shirkasoft-ui-components-select.d.ts +301 -192
  84. package/types/shirkasoft-ui-components-sidebar.d.ts +198 -92
  85. package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
  86. package/types/shirkasoft-ui-components-table.d.ts +849 -649
  87. package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
  88. package/types/shirkasoft-ui-components-tag.d.ts +54 -23
  89. package/types/shirkasoft-ui-components-text-field.d.ts +231 -111
  90. package/types/shirkasoft-ui-components-theme-picker.d.ts +117 -0
  91. package/types/shirkasoft-ui-components-theme.d.ts +80 -0
  92. package/types/shirkasoft-ui-components-timeline.d.ts +326 -150
  93. package/types/shirkasoft-ui-components-toggle.d.ts +76 -45
  94. package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
  95. package/types/shirkasoft-ui-components-utils.d.ts +26 -17
  96. package/types/shirkasoft-ui-components-wizard.d.ts +236 -86
  97. package/types/shirkasoft-ui-components.d.ts +1 -2
  98. package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
@@ -1,6 +1,8 @@
1
- import * as _angular_core from '@angular/core';
2
- import { Type, ViewContainerRef, ComponentRef } from '@angular/core';
3
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { ComponentRef, Type, ViewContainerRef } from "@angular/core";
4
6
  /**
5
7
  * Shirkasoft UI Components.
6
8
  * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
@@ -8,144 +10,144 @@ import { Type, ViewContainerRef, ComponentRef } from '@angular/core';
8
10
  */
9
11
  /** Options for opening a modal through the service. */
10
12
  interface ModalConfig {
11
- /** Title shown in the modal header. */
12
- title: string;
13
- /** Component rendered inside the modal body. */
14
- component: Type<any>;
15
- /** Data passed to the modal component via inputs. */
16
- data?: Record<string, any>;
17
- /** Modal width (CSS value). */
18
- width?: string;
19
- /** Whether the accept/cancel buttons are shown. */
20
- showButtons?: boolean;
21
- /** Whether the expand (fullscreen) button is shown. */
22
- showExpandButton?: boolean;
23
- /** Label of the accept button. */
24
- acceptLabel?: string;
25
- /** Label of the cancel button. */
26
- cancelLabel?: string;
27
- /** Optional callback invoked when the modal closes. */
28
- onClose?: () => void;
29
- /**
30
- * Optional callback invoked when the modal is accepted, with the payload of
31
- * the dynamic component: the value emitted by its `submitSuccess` output or,
32
- * when it emits nothing, the raw value of its `form`. Omit it to keep the
33
- * previous behaviour.
34
- */
35
- onAccept?: (payload: any) => void;
13
+ /** Title shown in the modal header. */
14
+ title: string;
15
+ /** Component rendered inside the modal body. */
16
+ component: Type<any>;
17
+ /** Data passed to the modal component via inputs. */
18
+ data?: Record<string, any>;
19
+ /** Modal width (CSS value). */
20
+ width?: string;
21
+ /** Whether the accept/cancel buttons are shown. */
22
+ showButtons?: boolean;
23
+ /** Whether the expand (fullscreen) button is shown. */
24
+ showExpandButton?: boolean;
25
+ /** Label of the accept button. */
26
+ acceptLabel?: string;
27
+ /** Label of the cancel button. */
28
+ cancelLabel?: string;
29
+ /** Optional callback invoked when the modal closes. */
30
+ onClose?: () => void;
31
+ /**
32
+ * Optional callback invoked when the modal is accepted, with the payload of
33
+ * the dynamic component: the value emitted by its `submitSuccess` output or,
34
+ * when it emits nothing, the raw value of its `form`. Omit it to keep the
35
+ * previous behaviour.
36
+ */
37
+ onAccept?: (payload: any) => void;
36
38
  }
37
39
  /**
38
40
  * Global modal manager. Opens modals on a stack, exposing reactive access to
39
41
  * the current modal and the top-most opened config.
40
42
  */
41
- declare class ModalService {
42
- /** Stack of open modals (top-most renders on top). */
43
- private stackSignal;
44
- /** Counter emitted on each close, used to trigger close animations. */
45
- private closeRequestSignal;
46
- private router;
47
- private destroyRef;
48
- constructor();
49
- /** Reactive list of open modals. */
50
- modalStack: _angular_core.Signal<ModalConfig[]>;
51
- /** Top-most modal on the stack, or null. */
52
- currentModal: _angular_core.Signal<ModalConfig | null>;
53
- /** Reactive close-request counter. */
54
- closeRequest: _angular_core.Signal<number>;
55
- /** Opens a new modal on top of the stack. */
56
- open(config: ModalConfig): void;
57
- /** Alias of `close()` used by the accept button. */
58
- accept(): void;
59
- /** Closes the top-most modal, invoking its onClose callback. */
60
- close(): void;
61
- /** Closes all open modals at once. */
62
- clear(): void;
63
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
64
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModalService>;
43
+ export declare class ModalService {
44
+ /** Stack of open modals (top-most renders on top). */
45
+ private stackSignal;
46
+ /** Counter emitted on each close, used to trigger close animations. */
47
+ private closeRequestSignal;
48
+ private router;
49
+ private destroyRef;
50
+ constructor();
51
+ /** Reactive list of open modals. */
52
+ modalStack: import("@angular/core").Signal<ModalConfig[]>;
53
+ /** Top-most modal on the stack, or null. */
54
+ currentModal: import("@angular/core").Signal<ModalConfig | null>;
55
+ /** Reactive close-request counter. */
56
+ closeRequest: import("@angular/core").Signal<number>;
57
+ /** Opens a new modal on top of the stack. */
58
+ open(config: ModalConfig): void;
59
+ /** Alias of `close()` used by the accept button. */
60
+ accept(): void;
61
+ /** Closes the top-most modal, invoking its onClose callback. */
62
+ close(): void;
63
+ /** Closes all open modals at once. */
64
+ clear(): void;
65
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
66
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
65
67
  }
66
-
67
- /**
68
- * Shirkasoft UI Components.
69
- * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
70
- * Belongs to Shirkasoft.
71
- */
72
68
  /**
73
69
  * Modal dialog that renders a dynamically loaded component, tracks its
74
70
  * form validity and submit outputs, and delegates accept/cancel to the
75
71
  * shared ModalService.
76
72
  */
77
- declare class ModalComponent {
78
- protected getIcon: (name: any) => any;
79
- private notificationSrv;
80
- private destroyRef;
81
- private modalSrv;
82
- private transloco;
83
- private cdr;
84
- /** Reference where the dynamic content is rendered. */
85
- container: _angular_core.Signal<ViewContainerRef | undefined>;
86
- /** Configuration of the modal currently open (from the service). */
87
- currentConfig: _angular_core.WritableSignal<ModalConfig | null>;
88
- /** Modal title. */
89
- title: _angular_core.WritableSignal<string>;
90
- /** Whether the modal is visible. */
91
- visible: _angular_core.WritableSignal<boolean>;
92
- /** Generic loading flag for the footer actions. */
93
- loading: _angular_core.WritableSignal<boolean>;
94
- /** Whether the accept action is being processed. */
95
- isProcessing: _angular_core.WritableSignal<boolean>;
96
- /** Whether the modal is currently expanded to fullscreen. */
97
- isExpanded: _angular_core.WritableSignal<boolean>;
98
- /** True when the dynamic component reports a valid form. */
99
- isFormValid: _angular_core.WritableSignal<boolean>;
100
- /** Reference to the dynamically created component. */
101
- componentRef: ComponentRef<any> | null;
102
- /** Subscriptions to the dynamic component outputs. */
103
- private subscriptions;
104
- /** Width of the modal (fullscreen when expanded). */
105
- computedModalWidth: _angular_core.Signal<string>;
106
- /** Whether the footer buttons should be rendered. */
107
- modalButtonsVisible: _angular_core.Signal<boolean>;
108
- /** Whether the expand/fullscreen button is shown. */
109
- showExpandButton: _angular_core.Signal<boolean>;
110
- /** Resolved cancel button label. */
111
- cancelLabel: _angular_core.Signal<string>;
112
- /** Resolved accept button label. */
113
- acceptLabel: _angular_core.Signal<string>;
114
- constructor();
115
- /** Updates visibility when the backdrop/close controls change. */
116
- onVisibleChange(show: boolean): void;
117
- /** Creates the dynamic component and wires its form/submit outputs. */
118
- private loadComponent;
119
- /** Subscribes to a dynamic component output if it exists. */
120
- private subscribeToOutput;
121
- /** Finalizes the submit flow, accepting the modal on success. */
122
- private handleSubmit;
123
- /** Raw value of the dynamic component's form, or undefined when it has none. */
124
- private getFormValue;
125
- /** Closes the modal, calling the dynamic component's `handleCancel` if any. */
126
- closeModal(): void;
127
- /** Performs the actual close sequence and cleanup. */
128
- doClose(): void;
129
- /** Toggles between normal width and fullscreen. */
130
- toggleExpand(): void;
131
- /** Validates the dynamic component form and triggers its `onSubmit`. */
132
- onAccept(): void;
133
- /** Resolves the dynamic component's form (property or getter function). */
134
- private getForm;
135
- /** Recursively checks for real validation errors (ignoring 'warning'). */
136
- private hasRealErrors;
137
- /** Marks a form (and all its descendants) as touched. */
138
- private markAllAsTouched;
139
- /**
140
- * True when the component exposes `onSubmit`. The `form` is optional:
141
- * without it, validation is skipped and `onSubmit` runs directly.
142
- */
143
- private isDynamicComponent;
144
- /** Unsubscribes outputs and destroys the dynamic component. */
145
- private cleanup;
146
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalComponent, never>;
147
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ModalComponent, "shk-modal", never, {}, {}, never, never, true, never>;
73
+ export declare class ModalComponent {
74
+ protected getIcon: (name: any) => import("shirkasoft-ui-components/icons").IconNode | null;
75
+ private notificationSrv;
76
+ private destroyRef;
77
+ private modalSrv;
78
+ private transloco;
79
+ private cdr;
80
+ /** Reference where the dynamic content is rendered. */
81
+ container: import("@angular/core").Signal<ViewContainerRef | undefined>;
82
+ /** Configuration of the modal currently open (from the service). */
83
+ currentConfig: import("@angular/core").WritableSignal<ModalConfig | null>;
84
+ /** Modal title. */
85
+ title: import("@angular/core").WritableSignal<string>;
86
+ /** Whether the modal is visible. */
87
+ visible: import("@angular/core").WritableSignal<boolean>;
88
+ /** Generic loading flag for the footer actions. */
89
+ loading: import("@angular/core").WritableSignal<boolean>;
90
+ /** Whether the accept action is being processed. */
91
+ isProcessing: import("@angular/core").WritableSignal<boolean>;
92
+ /** Whether the modal is currently expanded to fullscreen. */
93
+ isExpanded: import("@angular/core").WritableSignal<boolean>;
94
+ /** True when the dynamic component reports a valid form. */
95
+ isFormValid: import("@angular/core").WritableSignal<boolean>;
96
+ /** Reference to the dynamically created component. */
97
+ componentRef: ComponentRef<any> | null;
98
+ /** Subscriptions to the dynamic component outputs. */
99
+ private subscriptions;
100
+ /** Width of the modal (fullscreen when expanded). */
101
+ computedModalWidth: import("@angular/core").Signal<string>;
102
+ /** Whether the footer buttons should be rendered. */
103
+ modalButtonsVisible: import("@angular/core").Signal<boolean>;
104
+ /** Whether the expand/fullscreen button is shown. */
105
+ showExpandButton: import("@angular/core").Signal<boolean>;
106
+ /** Resolved cancel button label. */
107
+ cancelLabel: import("@angular/core").Signal<string>;
108
+ /** Resolved accept button label. */
109
+ acceptLabel: import("@angular/core").Signal<string>;
110
+ constructor();
111
+ /** Updates visibility when the backdrop/close controls change. */
112
+ onVisibleChange(show: boolean): void;
113
+ /** Creates the dynamic component and wires its form/submit outputs. */
114
+ private loadComponent;
115
+ /** Subscribes to a dynamic component output if it exists. */
116
+ private subscribeToOutput;
117
+ /** Finalizes the submit flow, accepting the modal on success. */
118
+ private handleSubmit;
119
+ /** Raw value of the dynamic component's form, or undefined when it has none. */
120
+ private getFormValue;
121
+ /** Closes the modal, calling the dynamic component's `handleCancel` if any. */
122
+ closeModal(): void;
123
+ /** Performs the actual close sequence and cleanup. */
124
+ doClose(): void;
125
+ /** Toggles between normal width and fullscreen. */
126
+ toggleExpand(): void;
127
+ /** Validates the dynamic component form and triggers its `onSubmit`. */
128
+ onAccept(): void;
129
+ /**
130
+ * Resolves the dynamic component's form: a reactive form (property or getter
131
+ * function) or a Signal Forms `FieldTree`, which is itself a function that
132
+ * returns its `FieldState`.
133
+ */
134
+ private getForm;
135
+ /** True when the form is a Signal Forms `FieldState`, not a reactive control. */
136
+ private isSignalField;
137
+ /** Recursively checks for real validation errors (ignoring 'warning'). */
138
+ private hasRealErrors;
139
+ /** Marks a form (and all its descendants) as touched. */
140
+ private markAllAsTouched;
141
+ /** Normalizes `controls` (record for groups, array for form arrays). */
142
+ private childControls;
143
+ /**
144
+ * True when the component exposes `onSubmit`. The `form` is optional:
145
+ * without it, validation is skipped and `onSubmit` runs directly.
146
+ */
147
+ private isDynamicComponent;
148
+ /** Unsubscribes outputs and destroys the dynamic component. */
149
+ private cleanup;
150
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
151
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "shk-modal", never, {}, {}, never, never, true, never>;
148
152
  }
149
-
150
- export { ModalComponent, ModalService };
151
- export type { ModalConfig };
153
+ export type { ModalConfig };
@@ -1,5 +1,7 @@
1
- import * as _angular_core from '@angular/core';
2
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
3
5
  /**
4
6
  * Shirkasoft UI Components.
5
7
  * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
@@ -7,42 +9,41 @@ import * as _angular_core from '@angular/core';
7
9
  */
8
10
  /** Toast-style notification entry. */
9
11
  interface Notification {
10
- id: string;
11
- message: string;
12
- type: 'success' | 'error' | 'warning' | 'info';
13
- /** Current progress 0-100 when `showProgress` is true. */
14
- progress?: number;
15
- /** Whether the notification renders a progress indicator. */
16
- showProgress?: boolean;
12
+ id: string;
13
+ message: string;
14
+ type: 'success' | 'error' | 'warning' | 'info';
15
+ /** Current progress 0-100 when `showProgress` is true. */
16
+ progress?: number;
17
+ /** Whether the notification renders a progress indicator. */
18
+ showProgress?: boolean;
17
19
  }
18
20
  /**
19
21
  * Central notification store. Components push/update/remove notifications
20
22
  * reactively through signals for the notification component to render.
21
23
  */
22
- declare class NotificationService {
23
- /** Reactive list of visible notifications. */
24
- private notificationsSignal;
25
- /** Monotonic id counter for new notifications. */
26
- private currentId;
27
- /** Readonly reactive list of visible notifications. */
28
- notifications: _angular_core.Signal<Notification[]>;
29
- /**
30
- * Adds a notification and returns its id. When `showProgress` is false and
31
- * `duration` is positive, it auto-removes after that many ms.
32
- */
33
- addNotification(message: string, type?: Notification['type'], showProgress?: boolean, duration?: number): string;
34
- /** Updates a progress notification; auto-removes when progress hits 100. */
35
- updateProgress(notificationId: string, progress: number): void;
36
- /** Removes the given notification. */
37
- removeNotification(notification: Notification): void;
38
- /** Removes the notification with the given id. */
39
- removeNotificationById(notificationId: string): void;
40
- /** Removes every visible notification. */
41
- clearAll(): void;
42
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationService, never>;
43
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<NotificationService>;
24
+ export declare class NotificationService {
25
+ /** Reactive list of visible notifications. */
26
+ private notificationsSignal;
27
+ /** Monotonic id counter for new notifications. */
28
+ private currentId;
29
+ /** Readonly reactive list of visible notifications. */
30
+ notifications: import("@angular/core").Signal<Notification[]>;
31
+ /**
32
+ * Adds a notification and returns its id. When `showProgress` is false and
33
+ * `duration` is positive, it auto-removes after that many ms.
34
+ */
35
+ addNotification(message: string, type?: Notification['type'], showProgress?: boolean, duration?: number): string;
36
+ /** Updates a progress notification; auto-removes when progress hits 100. */
37
+ updateProgress(notificationId: string, progress: number): void;
38
+ /** Removes the given notification. */
39
+ removeNotification(notification: Notification): void;
40
+ /** Removes the notification with the given id. */
41
+ removeNotificationById(notificationId: string): void;
42
+ /** Removes every visible notification. */
43
+ clearAll(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
45
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
44
46
  }
45
-
46
47
  type NotificationPosition = 'center-top' | 'right-top' | 'left-top';
47
48
  /**
48
49
  * Shirkasoft UI Components.
@@ -53,30 +54,34 @@ type NotificationPosition = 'center-top' | 'right-top' | 'left-top';
53
54
  * Toast notification host that renders the notifications pushed through the
54
55
  * NotificationService in the configured position.
55
56
  */
56
- declare class NotificationComponent {
57
- /** Position of the notification stack: center, right or left top. */
58
- position: _angular_core.InputSignal<NotificationPosition>;
59
- private notificationService;
60
- protected getIcon: (name: any) => any;
61
- /** Maps each notification type to its internal icon name. */
62
- private readonly iconMap;
63
- /** Resolves the icon name for a notification type. */
64
- getNotificationIcon(type: string): string;
65
- /** Live list of active notifications. */
66
- notifications: _angular_core.Signal<Notification[]>;
67
- /** Notifications sorted with the newest first. */
68
- sortedNotifications: _angular_core.Signal<Notification[]>;
69
- /** Removes a notification through the service. */
70
- removeNotification(notification: Notification): void;
71
- /** Rounds the progress value of a notification. */
72
- roundProgress(progress: number | undefined): number;
73
- /** Whether there are notifications to show. */
74
- hasNotifications: _angular_core.Signal<boolean>;
75
- /** CSS classes positioning the stack according to `position`. */
76
- positionClass: _angular_core.Signal<"fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 right-4" | "fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 left-4" | "fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 left-1/2 -translate-x-1/2">;
77
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationComponent, never>;
78
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NotificationComponent, "shk-notification", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
57
+ export declare class NotificationComponent {
58
+ /** Position of the notification stack: center, right or left top. */
59
+ position: import("@angular/core").InputSignal<NotificationPosition>;
60
+ private notificationService;
61
+ protected getIcon: (name: any) => import("shirkasoft-ui-components/icons").IconNode | null;
62
+ /** Maps each notification type to its internal icon name. */
63
+ private readonly iconMap;
64
+ /** Resolves the icon name for a notification type. */
65
+ getNotificationIcon(type: string): string;
66
+ /** Live list of active notifications. */
67
+ notifications: import("@angular/core").Signal<Notification[]>;
68
+ /** Notifications sorted with the newest first. */
69
+ sortedNotifications: import("@angular/core").Signal<Notification[]>;
70
+ /** Removes a notification through the service. */
71
+ removeNotification(notification: Notification): void;
72
+ /** Rounds the progress value of a notification. */
73
+ roundProgress(progress: number | undefined): number;
74
+ /** Whether there are notifications to show. */
75
+ hasNotifications: import("@angular/core").Signal<boolean>;
76
+ /** CSS classes positioning the stack according to `position`. */
77
+ positionClass: import("@angular/core").Signal<"fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 right-4" | "fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 left-4" | "fixed top-4 z-[9999] space-y-4 sm:space-y-6 sm:top-6 lg:top-8 left-1/2 -translate-x-1/2">;
78
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationComponent, never>;
79
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationComponent, "shk-notification", never, {
80
+ "position": {
81
+ "alias": "position";
82
+ "required": false;
83
+ "isSignal": true;
84
+ };
85
+ }, {}, never, never, true, never>;
79
86
  }
80
-
81
- export { NotificationComponent, NotificationService };
82
- export type { Notification, NotificationPosition };
87
+ export type { Notification, NotificationPosition };