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.
- package/README.md +415 -42
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +367 -73
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +976 -0
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1624 -1400
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +484 -293
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +1141 -0
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-knob.mjs +395 -180
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -303
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +517 -277
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +1014 -814
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +1918 -1676
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -177
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +177 -51
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -369
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +466 -0
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs +147 -0
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -215
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +205 -128
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +97 -125
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -166
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components.mjs +0 -9
- package/package.json +37 -7
- package/src/baseline.css +2472 -0
- package/src/theme.css +15 -543
- package/src/themes/ocean.css +56 -0
- package/src/themes/sunset.css +55 -0
- package/src/themes/violet.css +25 -0
- package/src/tokens.css +612 -0
- package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
- package/types/shirkasoft-ui-components-button.d.ts +142 -49
- package/types/shirkasoft-ui-components-chart.d.ts +59 -44
- package/types/shirkasoft-ui-components-config.d.ts +357 -0
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -65
- package/types/shirkasoft-ui-components-date-picker.d.ts +527 -373
- package/types/shirkasoft-ui-components-fieldset.d.ts +135 -59
- package/types/shirkasoft-ui-components-file-upload.d.ts +176 -106
- package/types/shirkasoft-ui-components-icons.d.ts +1430 -0
- package/types/shirkasoft-ui-components-knob.d.ts +151 -64
- package/types/shirkasoft-ui-components-loading.d.ts +155 -64
- package/types/shirkasoft-ui-components-modal.d.ts +134 -132
- package/types/shirkasoft-ui-components-notification.d.ts +63 -58
- package/types/shirkasoft-ui-components-price-input.d.ts +198 -85
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
- package/types/shirkasoft-ui-components-select.d.ts +301 -192
- package/types/shirkasoft-ui-components-sidebar.d.ts +198 -92
- package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
- package/types/shirkasoft-ui-components-table.d.ts +849 -649
- package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
- package/types/shirkasoft-ui-components-tag.d.ts +54 -23
- package/types/shirkasoft-ui-components-text-field.d.ts +231 -111
- package/types/shirkasoft-ui-components-theme-picker.d.ts +117 -0
- package/types/shirkasoft-ui-components-theme.d.ts +80 -0
- package/types/shirkasoft-ui-components-timeline.d.ts +326 -150
- package/types/shirkasoft-ui-components-toggle.d.ts +76 -45
- package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
- package/types/shirkasoft-ui-components-utils.d.ts +26 -17
- package/types/shirkasoft-ui-components-wizard.d.ts +236 -86
- package/types/shirkasoft-ui-components.d.ts +1 -2
- package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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 };
|