duck-dev-lib 0.0.20 → 0.0.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "duck-dev-lib",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
@@ -1,7 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { ElementRef } from '@angular/core';
2
+ import { ElementRef, OnInit, OnDestroy } from '@angular/core';
3
3
  import { Translation } from '@jsverse/transloco';
4
4
  import { FormGroup } from '@angular/forms';
5
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
5
6
 
6
7
  declare enum ButtonEnumColor {
7
8
  Orange = "orange",
@@ -140,5 +141,68 @@ declare class DuckDevInput {
140
141
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DuckDevInput, "duck-dev-input", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; "controlName": { "alias": "controlName"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "formInputType": { "alias": "formInputType"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
141
142
  }
142
143
 
143
- export { ButtonBlurLift, ButtonEnumColor, ButtonFlip, ButtonGlideOver, DuckDevInput, DuckDevLibTranslations, DuckDevTab, DuckDevTabVertical, LoaderClassic, LoaderLoadingBubble, LoaderThreeDots, MainDocumentationPage };
144
- export type { DuckDevTabItem, DuckDevTabVerticalItem };
144
+ type NotificationType = 'success' | 'warning' | 'error';
145
+ type NotificationPosition = 'top' | 'center' | 'bottom';
146
+ declare class DuckDevNotification implements OnInit, OnDestroy {
147
+ readonly type: _angular_core.InputSignal<NotificationType>;
148
+ readonly title: _angular_core.InputSignal<string>;
149
+ readonly message: _angular_core.InputSignal<string>;
150
+ readonly duration: _angular_core.InputSignal<number>;
151
+ readonly position: _angular_core.InputSignal<NotificationPosition>;
152
+ readonly closed: _angular_core.OutputEmitterRef<void>;
153
+ isVisible: _angular_core.WritableSignal<boolean>;
154
+ state: _angular_core.WritableSignal<"enter" | "leave">;
155
+ private timer?;
156
+ ngOnInit(): void;
157
+ close(): void;
158
+ ngOnDestroy(): void;
159
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DuckDevNotification, never>;
160
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DuckDevNotification, "duck-dev-notification", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "message": { "alias": "message"; "required": true; "isSignal": true; }; "duration": { "alias": "duration"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
161
+ }
162
+
163
+ interface NotificationItem {
164
+ id: number;
165
+ type: NotificationType;
166
+ position: NotificationPosition;
167
+ title: string;
168
+ message: string;
169
+ duration: number;
170
+ }
171
+ declare class DuckDevNotificationService {
172
+ private seq;
173
+ private timers;
174
+ readonly items: _angular_core.WritableSignal<NotificationItem[]>;
175
+ show(options: Partial<Omit<NotificationItem, 'id'>> & Pick<NotificationItem, 'message'>): number;
176
+ success(message: string, opts?: Partial<Omit<NotificationItem, 'id' | 'type' | 'message'>>): number;
177
+ warning(message: string, opts?: Partial<Omit<NotificationItem, 'id' | 'type' | 'message'>>): number;
178
+ error(message: string, opts?: Partial<Omit<NotificationItem, 'id' | 'type' | 'message'>>): number;
179
+ remove(id: number): void;
180
+ clear(): void;
181
+ private defaultTitle;
182
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DuckDevNotificationService, never>;
183
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DuckDevNotificationService>;
184
+ }
185
+
186
+ declare class DuckDevNotificationContainer implements OnInit, OnDestroy {
187
+ readonly service: DuckDevNotificationService;
188
+ private readonly hostRef;
189
+ private originalParent?;
190
+ private nextSibling?;
191
+ ngOnInit(): void;
192
+ ngOnDestroy(): void;
193
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DuckDevNotificationContainer, never>;
194
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DuckDevNotificationContainer, "duck-dev-notification-container", never, {}, {}, never, never, true, never>;
195
+ }
196
+
197
+ declare class DuckDevIcon {
198
+ private sanitizer;
199
+ private static iconMap;
200
+ readonly name: _angular_core.InputSignal<string>;
201
+ constructor(sanitizer: DomSanitizer);
202
+ readonly svgHtml: _angular_core.Signal<SafeHtml>;
203
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DuckDevIcon, never>;
204
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DuckDevIcon, "duck-dev-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
205
+ }
206
+
207
+ export { ButtonBlurLift, ButtonEnumColor, ButtonFlip, ButtonGlideOver, DuckDevIcon, DuckDevInput, DuckDevLibTranslations, DuckDevNotification, DuckDevNotificationContainer, DuckDevNotificationService, DuckDevTab, DuckDevTabVertical, LoaderClassic, LoaderLoadingBubble, LoaderThreeDots, MainDocumentationPage };
208
+ export type { DuckDevTabItem, DuckDevTabVerticalItem, NotificationItem, NotificationPosition, NotificationType };