@catarina-ds/angular 0.1.1 → 0.1.3
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/fesm2022/catarina-ds-angular.mjs +242 -728
- package/fesm2022/catarina-ds-angular.mjs.map +1 -1
- package/index.d.ts +90 -61
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { TemplateRef, Type, EventEmitter, ElementRef, QueryList, OnInit, OnDestroy, AfterContentInit, AfterViewChecked, AfterViewInit, Renderer2 } from '@angular/core';
|
|
4
3
|
import * as rxjs from 'rxjs';
|
|
5
|
-
import { Subscription } from 'rxjs';
|
|
4
|
+
import { Subscription, Subject } from 'rxjs';
|
|
6
5
|
import { NgControl, ControlValueAccessor } from '@angular/forms';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private platformId;
|
|
11
|
-
private iconProvider;
|
|
12
|
-
private abortController?;
|
|
13
|
-
svgContent: i0.WritableSignal<SafeHtml>;
|
|
14
|
-
isLoading: i0.WritableSignal<boolean>;
|
|
15
|
-
isVisible: i0.WritableSignal<boolean>;
|
|
16
|
-
size: string;
|
|
17
|
-
color: string;
|
|
18
|
-
ngOnDestroy(): void;
|
|
19
|
-
set name(iconName: string);
|
|
20
|
-
set src(path: string);
|
|
21
|
-
private loadSvg;
|
|
22
|
-
private isValidSvg;
|
|
23
|
-
private processSvg;
|
|
24
|
-
private processSvgWithRegex;
|
|
7
|
+
type IconContent = TemplateRef<unknown> | Type<unknown>;
|
|
8
|
+
declare class Icon {
|
|
25
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<Icon, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Icon, "cat-icon", never, {
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Icon, "cat-icon", never, {}, {}, never, ["*"], true, never>;
|
|
27
11
|
}
|
|
28
12
|
|
|
29
13
|
declare class Button {
|
|
@@ -31,13 +15,14 @@ declare class Button {
|
|
|
31
15
|
size: 'sm' | 'md' | 'lg';
|
|
32
16
|
disabled: boolean;
|
|
33
17
|
type: 'button' | 'submit' | 'reset';
|
|
34
|
-
iconLeft?:
|
|
35
|
-
iconCenter?:
|
|
36
|
-
iconRight?:
|
|
18
|
+
iconLeft?: IconContent;
|
|
19
|
+
iconCenter?: IconContent;
|
|
20
|
+
iconRight?: IconContent;
|
|
37
21
|
customClass: string;
|
|
38
22
|
clicked: EventEmitter<MouseEvent>;
|
|
39
23
|
get buttonClasses(): string;
|
|
40
24
|
get iconSize(): string;
|
|
25
|
+
isTemplateRef(content: IconContent): content is TemplateRef<unknown>;
|
|
41
26
|
get dataCustomClass(): string;
|
|
42
27
|
handleClick(event: MouseEvent): void;
|
|
43
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<Button, never>;
|
|
@@ -65,9 +50,9 @@ declare class Accordion {
|
|
|
65
50
|
customClass: string;
|
|
66
51
|
buttonVariant: 'primary' | 'secondary' | 'contrast' | 'outline' | 'ghost';
|
|
67
52
|
buttonSize: 'sm' | 'md' | 'lg';
|
|
68
|
-
iconLeft: boolean;
|
|
69
|
-
iconCenter: boolean;
|
|
70
|
-
iconRight: boolean;
|
|
53
|
+
iconLeft: IconContent | boolean;
|
|
54
|
+
iconCenter: IconContent | boolean;
|
|
55
|
+
iconRight: IconContent | boolean;
|
|
71
56
|
scrolleable: boolean;
|
|
72
57
|
variant: 'surface' | 'outlined' | 'elevated';
|
|
73
58
|
updateAccordionGroupStatusOutput: EventEmitter<string>;
|
|
@@ -111,10 +96,11 @@ declare class CatInput implements OnInit {
|
|
|
111
96
|
|
|
112
97
|
declare class ColorInput implements ControlValueAccessor {
|
|
113
98
|
value: string;
|
|
114
|
-
icon
|
|
99
|
+
icon: IconContent | boolean;
|
|
115
100
|
size: string;
|
|
116
101
|
private onChange;
|
|
117
102
|
onTouched: () => void;
|
|
103
|
+
isTemplateRef(content: IconContent): content is TemplateRef<unknown>;
|
|
118
104
|
onInput(event: Event): void;
|
|
119
105
|
writeValue(value: any): void;
|
|
120
106
|
registerOnChange(fn: any): void;
|
|
@@ -157,10 +143,8 @@ declare class Dialog implements OnInit, OnDestroy {
|
|
|
157
143
|
private viewContainerRef;
|
|
158
144
|
private overlayRef?;
|
|
159
145
|
variant: 'surface' | 'outlined' | 'elevated';
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
height: string;
|
|
163
|
-
};
|
|
146
|
+
width: string;
|
|
147
|
+
height: string;
|
|
164
148
|
customClass: string;
|
|
165
149
|
closs: EventEmitter<boolean>;
|
|
166
150
|
dialogTemplate: TemplateRef<any>;
|
|
@@ -171,7 +155,7 @@ declare class Dialog implements OnInit, OnDestroy {
|
|
|
171
155
|
ngOnInit(): void;
|
|
172
156
|
ngOnDestroy(): void;
|
|
173
157
|
static ɵfac: i0.ɵɵFactoryDeclaration<Dialog, never>;
|
|
174
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Dialog, "cat-dialog", never, { "variant": { "alias": "variant"; "required": false; }; "
|
|
158
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Dialog, "cat-dialog", never, { "variant": { "alias": "variant"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; }, { "closs": "closs"; }, never, ["*"], true, never>;
|
|
175
159
|
}
|
|
176
160
|
|
|
177
161
|
declare class Drawer implements OnInit, OnDestroy {
|
|
@@ -193,26 +177,46 @@ declare class Drawer implements OnInit, OnDestroy {
|
|
|
193
177
|
static ɵcmp: i0.ɵɵComponentDeclaration<Drawer, "cat-drawer", never, { "side": { "alias": "side"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; }, { "closs": "closs"; }, never, ["*"], true, never>;
|
|
194
178
|
}
|
|
195
179
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
180
|
+
interface MenuDropdownItem {
|
|
181
|
+
label: any;
|
|
182
|
+
element: HTMLElement;
|
|
183
|
+
}
|
|
184
|
+
declare class MenuDropdown {
|
|
185
|
+
items: MenuDropdownItem[];
|
|
186
|
+
panelContainer: ElementRef<HTMLElement>;
|
|
187
|
+
activeIndex: number;
|
|
188
|
+
get isSingle(): boolean;
|
|
189
|
+
isTemplateRef(value: any): value is TemplateRef<unknown>;
|
|
190
|
+
setActive(index: number): void;
|
|
191
|
+
showActivePanel(): void;
|
|
192
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuDropdown, never>;
|
|
193
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuDropdown, "cat-menu-dropdown", never, { "items": { "alias": "items"; "required": false; }; }, {}, never, never, true, never>;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
declare class MenuPanel {
|
|
197
|
+
elementRef: ElementRef<HTMLElement>;
|
|
198
|
+
label: any;
|
|
199
|
+
constructor(elementRef: ElementRef<HTMLElement>);
|
|
200
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuPanel, never>;
|
|
201
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuPanel, "cat-menu-panel", never, { "label": { "alias": "label"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
declare class Menu implements AfterContentInit, AfterViewChecked {
|
|
205
|
+
panels: QueryList<MenuPanel>;
|
|
206
|
+
panelsHost: ElementRef<HTMLElement>;
|
|
207
|
+
dropdownRef?: MenuDropdown;
|
|
208
|
+
private cdr;
|
|
209
|
+
isDropdownActive: boolean;
|
|
210
|
+
isPanelOpen: boolean;
|
|
211
|
+
private pendingPanelMove;
|
|
212
|
+
ngAfterContentInit(): void;
|
|
213
|
+
ngAfterViewChecked(): void;
|
|
214
|
+
toggleContent(): void;
|
|
215
|
+
togglePanel(): void;
|
|
216
|
+
private executePanelMove;
|
|
217
|
+
private restorePanels;
|
|
214
218
|
static ɵfac: i0.ɵɵFactoryDeclaration<Menu, never>;
|
|
215
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Menu, "cat-menu", never, {}, {},
|
|
219
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Menu, "cat-menu", never, {}, {}, ["panels"], [":not(cat-menu-panel)", "cat-menu-panel"], true, never>;
|
|
216
220
|
}
|
|
217
221
|
|
|
218
222
|
declare class Drag implements AfterViewInit {
|
|
@@ -247,15 +251,40 @@ declare class Theming {
|
|
|
247
251
|
static ɵprov: i0.ɵɵInjectableDeclaration<Theming>;
|
|
248
252
|
}
|
|
249
253
|
|
|
250
|
-
|
|
251
|
-
|
|
254
|
+
declare class DynamicBackgroundService {
|
|
255
|
+
readonly setImages$: Subject<string[]>;
|
|
256
|
+
readonly setBackgroundImage$: Subject<number>;
|
|
257
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicBackgroundService, never>;
|
|
258
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DynamicBackgroundService>;
|
|
252
259
|
}
|
|
253
|
-
declare const ICON_PROVIDER: InjectionToken<IconProvider>;
|
|
254
260
|
|
|
255
|
-
declare
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
261
|
+
declare class DynamicBackground implements AfterViewInit, OnDestroy {
|
|
262
|
+
private el;
|
|
263
|
+
private renderer;
|
|
264
|
+
private bgService;
|
|
265
|
+
showControls: i0.InputSignal<boolean>;
|
|
266
|
+
images: i0.InputSignal<string[] | undefined>;
|
|
267
|
+
/** Label shown in the navigation controls next to the image counter. */
|
|
268
|
+
controlsLabel: i0.InputSignal<string>;
|
|
269
|
+
/** Slideshow interval in milliseconds. 0 = disabled. */
|
|
270
|
+
slideshowInterval: i0.InputSignal<number>;
|
|
271
|
+
private backgroundElement?;
|
|
272
|
+
private resolvedImages;
|
|
273
|
+
private imageIndex;
|
|
274
|
+
private slideshowTimer?;
|
|
275
|
+
private subscriptions;
|
|
276
|
+
constructor(el: ElementRef, renderer: Renderer2, bgService: DynamicBackgroundService);
|
|
277
|
+
ngAfterViewInit(): void;
|
|
278
|
+
ngOnDestroy(): void;
|
|
279
|
+
private applyBackground;
|
|
280
|
+
private startSlideshow;
|
|
281
|
+
private stopSlideshow;
|
|
282
|
+
changeImageIndex(increment: boolean): void;
|
|
283
|
+
get currentIndex(): number;
|
|
284
|
+
get totalImages(): number;
|
|
285
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicBackground, [null, null, { optional: true; }]>;
|
|
286
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicBackground, "cat-dynamic-background", never, { "showControls": { "alias": "showControls"; "required": false; "isSignal": true; }; "images": { "alias": "images"; "required": false; "isSignal": true; }; "controlsLabel": { "alias": "controlsLabel"; "required": false; "isSignal": true; }; "slideshowInterval": { "alias": "slideshowInterval"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
287
|
+
}
|
|
259
288
|
|
|
260
|
-
export { Accordion, AccordionGroup, Button, Card, CatInput, ColorInput, Dialog, Drag, Drawer,
|
|
261
|
-
export type {
|
|
289
|
+
export { Accordion, AccordionGroup, Button, Card, CatInput, ColorInput, Dialog, Drag, Drawer, DynamicBackground, DynamicBackgroundService, Icon, Menu, MenuDropdown, MenuPanel, SelectInput, Theming };
|
|
290
|
+
export type { IconContent, MenuDropdownItem };
|