shirkasoft-ui-components 1.14.0 → 2.0.1

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 (92) hide show
  1. package/README.md +12 -9
  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 +363 -69
  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 +905 -843
  9. package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -1
  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 +1697 -1440
  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 +555 -300
  17. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
  18. package/fesm2022/shirkasoft-ui-components-icons.mjs +1028 -533
  19. package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -1
  20. package/fesm2022/shirkasoft-ui-components-knob.mjs +389 -201
  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 -314
  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 +585 -327
  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 +1076 -819
  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 +1916 -1698
  39. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
  40. package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -175
  41. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
  42. package/fesm2022/shirkasoft-ui-components-tag.mjs +175 -49
  43. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
  44. package/fesm2022/shirkasoft-ui-components-text-field.mjs +749 -402
  45. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
  46. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +310 -124
  47. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -1
  48. package/fesm2022/shirkasoft-ui-components-theme.mjs +141 -174
  49. package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -1
  50. package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -203
  51. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
  52. package/fesm2022/shirkasoft-ui-components-toggle.mjs +179 -109
  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 +129 -133
  57. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
  58. package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -165
  59. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
  60. package/fesm2022/shirkasoft-ui-components.mjs +0 -9
  61. package/package.json +5 -5
  62. package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
  63. package/types/shirkasoft-ui-components-button.d.ts +142 -49
  64. package/types/shirkasoft-ui-components-chart.d.ts +59 -44
  65. package/types/shirkasoft-ui-components-config.d.ts +193 -204
  66. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -66
  67. package/types/shirkasoft-ui-components-date-picker.d.ts +561 -398
  68. package/types/shirkasoft-ui-components-fieldset.d.ts +135 -60
  69. package/types/shirkasoft-ui-components-file-upload.d.ts +210 -112
  70. package/types/shirkasoft-ui-components-icons.d.ts +1302 -1294
  71. package/types/shirkasoft-ui-components-knob.d.ts +144 -78
  72. package/types/shirkasoft-ui-components-loading.d.ts +155 -64
  73. package/types/shirkasoft-ui-components-modal.d.ts +134 -136
  74. package/types/shirkasoft-ui-components-notification.d.ts +63 -59
  75. package/types/shirkasoft-ui-components-price-input.d.ts +232 -113
  76. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
  77. package/types/shirkasoft-ui-components-select.d.ts +335 -196
  78. package/types/shirkasoft-ui-components-sidebar.d.ts +198 -93
  79. package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
  80. package/types/shirkasoft-ui-components-table.d.ts +849 -660
  81. package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
  82. package/types/shirkasoft-ui-components-tag.d.ts +54 -23
  83. package/types/shirkasoft-ui-components-text-field.d.ts +263 -127
  84. package/types/shirkasoft-ui-components-theme-picker.d.ts +92 -58
  85. package/types/shirkasoft-ui-components-theme.d.ts +56 -64
  86. package/types/shirkasoft-ui-components-timeline.d.ts +325 -150
  87. package/types/shirkasoft-ui-components-toggle.d.ts +73 -49
  88. package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
  89. package/types/shirkasoft-ui-components-utils.d.ts +47 -15
  90. package/types/shirkasoft-ui-components-wizard.d.ts +236 -87
  91. package/types/shirkasoft-ui-components.d.ts +1 -2
  92. package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
@@ -1,7 +1,8 @@
1
- import * as _angular_core from '@angular/core';
2
- import { Type, ViewContainerRef, ComponentRef } from '@angular/core';
3
- import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
4
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { ComponentRef, Type, ViewContainerRef } from "@angular/core";
5
6
  /**
6
7
  * Shirkasoft UI Components.
7
8
  * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
@@ -9,147 +10,144 @@ import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons'
9
10
  */
10
11
  /** Options for opening a modal through the service. */
11
12
  interface ModalConfig {
12
- /** Title shown in the modal header. */
13
- title: string;
14
- /** Component rendered inside the modal body. */
15
- component: Type<any>;
16
- /** Data passed to the modal component via inputs. */
17
- data?: Record<string, any>;
18
- /** Modal width (CSS value). */
19
- width?: string;
20
- /** Whether the accept/cancel buttons are shown. */
21
- showButtons?: boolean;
22
- /** Whether the expand (fullscreen) button is shown. */
23
- showExpandButton?: boolean;
24
- /** Label of the accept button. */
25
- acceptLabel?: string;
26
- /** Label of the cancel button. */
27
- cancelLabel?: string;
28
- /** Optional callback invoked when the modal closes. */
29
- onClose?: () => void;
30
- /**
31
- * Optional callback invoked when the modal is accepted, with the payload of
32
- * the dynamic component: the value emitted by its `submitSuccess` output or,
33
- * when it emits nothing, the raw value of its `form`. Omit it to keep the
34
- * previous behaviour.
35
- */
36
- 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;
37
38
  }
38
39
  /**
39
40
  * Global modal manager. Opens modals on a stack, exposing reactive access to
40
41
  * the current modal and the top-most opened config.
41
42
  */
42
- declare class ModalService {
43
- /** Stack of open modals (top-most renders on top). */
44
- private stackSignal;
45
- /** Counter emitted on each close, used to trigger close animations. */
46
- private closeRequestSignal;
47
- private router;
48
- private destroyRef;
49
- constructor();
50
- /** Reactive list of open modals. */
51
- modalStack: _angular_core.Signal<ModalConfig[]>;
52
- /** Top-most modal on the stack, or null. */
53
- currentModal: _angular_core.Signal<ModalConfig | null>;
54
- /** Reactive close-request counter. */
55
- closeRequest: _angular_core.Signal<number>;
56
- /** Opens a new modal on top of the stack. */
57
- open(config: ModalConfig): void;
58
- /** Alias of `close()` used by the accept button. */
59
- accept(): void;
60
- /** Closes the top-most modal, invoking its onClose callback. */
61
- close(): void;
62
- /** Closes all open modals at once. */
63
- clear(): void;
64
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
65
- 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>;
66
67
  }
67
-
68
68
  /**
69
69
  * Modal dialog that renders a dynamically loaded component, tracks its
70
70
  * form validity and submit outputs, and delegates accept/cancel to the
71
71
  * shared ModalService.
72
72
  */
73
- declare class ModalComponent {
74
- protected getIcon: (name: any) => 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: _angular_core.Signal<ViewContainerRef | undefined>;
82
- /** Configuration of the modal currently open (from the service). */
83
- currentConfig: _angular_core.WritableSignal<ModalConfig | null>;
84
- /** Modal title. */
85
- title: _angular_core.WritableSignal<string>;
86
- /** Whether the modal is visible. */
87
- visible: _angular_core.WritableSignal<boolean>;
88
- /** Generic loading flag for the footer actions. */
89
- loading: _angular_core.WritableSignal<boolean>;
90
- /** Whether the accept action is being processed. */
91
- isProcessing: _angular_core.WritableSignal<boolean>;
92
- /** Whether the modal is currently expanded to fullscreen. */
93
- isExpanded: _angular_core.WritableSignal<boolean>;
94
- /** True when the dynamic component reports a valid form. */
95
- isFormValid: _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: _angular_core.Signal<string>;
102
- /** Whether the footer buttons should be rendered. */
103
- modalButtonsVisible: _angular_core.Signal<boolean>;
104
- /** Whether the expand/fullscreen button is shown. */
105
- showExpandButton: _angular_core.Signal<boolean>;
106
- /** Resolved cancel button label. */
107
- cancelLabel: _angular_core.Signal<string>;
108
- /** Resolved accept button label. */
109
- acceptLabel: _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: _angular_core.ɵɵFactoryDeclaration<ModalComponent, never>;
151
- 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>;
152
152
  }
153
-
154
- export { ModalComponent, ModalService };
155
- export type { ModalConfig };
153
+ export type { ModalConfig };
@@ -1,6 +1,7 @@
1
- import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
2
- import * as _angular_core from '@angular/core';
3
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
4
5
  /**
5
6
  * Shirkasoft UI Components.
6
7
  * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
@@ -8,42 +9,41 @@ import * as _angular_core from '@angular/core';
8
9
  */
9
10
  /** Toast-style notification entry. */
10
11
  interface Notification {
11
- id: string;
12
- message: string;
13
- type: 'success' | 'error' | 'warning' | 'info';
14
- /** Current progress 0-100 when `showProgress` is true. */
15
- progress?: number;
16
- /** Whether the notification renders a progress indicator. */
17
- 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;
18
19
  }
19
20
  /**
20
21
  * Central notification store. Components push/update/remove notifications
21
22
  * reactively through signals for the notification component to render.
22
23
  */
23
- declare class NotificationService {
24
- /** Reactive list of visible notifications. */
25
- private notificationsSignal;
26
- /** Monotonic id counter for new notifications. */
27
- private currentId;
28
- /** Readonly reactive list of visible notifications. */
29
- notifications: _angular_core.Signal<Notification[]>;
30
- /**
31
- * Adds a notification and returns its id. When `showProgress` is false and
32
- * `duration` is positive, it auto-removes after that many ms.
33
- */
34
- addNotification(message: string, type?: Notification['type'], showProgress?: boolean, duration?: number): string;
35
- /** Updates a progress notification; auto-removes when progress hits 100. */
36
- updateProgress(notificationId: string, progress: number): void;
37
- /** Removes the given notification. */
38
- removeNotification(notification: Notification): void;
39
- /** Removes the notification with the given id. */
40
- removeNotificationById(notificationId: string): void;
41
- /** Removes every visible notification. */
42
- clearAll(): void;
43
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationService, never>;
44
- 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>;
45
46
  }
46
-
47
47
  type NotificationPosition = 'center-top' | 'right-top' | 'left-top';
48
48
  /**
49
49
  * Shirkasoft UI Components.
@@ -54,30 +54,34 @@ type NotificationPosition = 'center-top' | 'right-top' | 'left-top';
54
54
  * Toast notification host that renders the notifications pushed through the
55
55
  * NotificationService in the configured position.
56
56
  */
57
- declare class NotificationComponent {
58
- /** Position of the notification stack: center, right or left top. */
59
- position: _angular_core.InputSignal<NotificationPosition>;
60
- private notificationService;
61
- protected getIcon: (name: any) => 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: _angular_core.Signal<Notification[]>;
68
- /** Notifications sorted with the newest first. */
69
- sortedNotifications: _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: _angular_core.Signal<boolean>;
76
- /** CSS classes positioning the stack according to `position`. */
77
- 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">;
78
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationComponent, never>;
79
- 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>;
80
86
  }
81
-
82
- export { NotificationComponent, NotificationService };
83
- export type { Notification, NotificationPosition };
87
+ export type { Notification, NotificationPosition };