@ng-vagabond-lab/ng-dsv 0.0.27 → 0.0.28
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/auth/component/auth.component.d.ts +1 -1
- package/ds/accordion/component/accordion.component.d.ts +6 -7
- package/ds/avatar/component/avatar.component.d.ts +6 -4
- package/ds/button/component/button.component.d.ts +10 -10
- package/ds/card/component/card.component.d.ts +6 -6
- package/ds/container/component/container.component.d.ts +2 -3
- package/ds/form/form/component/form.component.d.ts +2 -2
- package/ds/form/input/component/form.input.component.d.ts +5 -6
- package/ds/form/searchbar/component/searchbar.component.d.ts +4 -5
- package/ds/header/component/header.component.d.ts +4 -4
- package/ds/item/component/item.component.d.ts +5 -5
- package/ds/menu/component/menu.component.d.ts +2 -2
- package/ds/theme/component/dsv.theme.component.d.ts +2 -2
- package/fesm2022/ng-vagabond-lab-ng-dsv-auth.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-accordion.mjs +12 -19
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-accordion.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-avatar.mjs +14 -18
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-avatar.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-button.mjs +14 -32
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-button.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-card.mjs +9 -20
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-card.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-container.mjs +14 -11
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-container.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-form.mjs +24 -40
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-form.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-header.mjs +7 -14
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-header.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-item.mjs +9 -18
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-item.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-menu.mjs +5 -8
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-menu.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-theme.mjs +14 -16
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-theme.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-toast.mjs +2 -2
- package/fesm2022/ng-vagabond-lab-ng-dsv-ds-toast.mjs.map +1 -1
- package/fesm2022/ng-vagabond-lab-ng-dsv-storage.mjs.map +1 -1
- package/package.json +1 -1
- package/storage/service/storage.service.d.ts +1 -1
|
@@ -4,7 +4,7 @@ export declare class AuthComponent {
|
|
|
4
4
|
private readonly authGoogleService;
|
|
5
5
|
protected authService: AuthService;
|
|
6
6
|
private readonly environmentService;
|
|
7
|
-
private ssrRendered;
|
|
7
|
+
private readonly ssrRendered;
|
|
8
8
|
constructor();
|
|
9
9
|
logout(): void;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthComponent, never>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { SimpleChanges, WritableSignal } from '@angular/core';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
export declare class DsvAccordionComponent {
|
|
4
|
-
open: boolean
|
|
5
|
-
title: string
|
|
6
|
-
color: string
|
|
7
|
-
isOpen: WritableSignal<boolean>;
|
|
8
|
-
|
|
3
|
+
open: import("@angular/core").InputSignal<boolean>;
|
|
4
|
+
title: import("@angular/core").InputSignal<string>;
|
|
5
|
+
color: import("@angular/core").InputSignal<string>;
|
|
6
|
+
isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
+
constructor();
|
|
9
8
|
doToogle(): void;
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvAccordionComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvAccordionComponent, "dsv-accordion", never, { "open": { "alias": "open"; "required": false; }; "title": { "alias": "title"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvAccordionComponent, "dsv-accordion", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
12
11
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { OutputEmitterRef } from '@angular/core';
|
|
1
2
|
import { ColorType } from '@ng-vagabond-lab/ng-dsv/type';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class DsvAvatarComponent {
|
|
4
|
-
avatar: string
|
|
5
|
-
color: ColorType
|
|
6
|
-
callback
|
|
5
|
+
avatar: import("@angular/core").InputSignal<string>;
|
|
6
|
+
color: import("@angular/core").InputSignal<ColorType>;
|
|
7
|
+
callback: OutputEmitterRef<void>;
|
|
7
8
|
isImage(): boolean;
|
|
9
|
+
isCallback(): boolean;
|
|
8
10
|
showAvatar(): string;
|
|
9
11
|
triggerEvent(): void;
|
|
10
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvAvatarComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvAvatarComponent, "dsv-avatar", never, { "avatar": { "alias": "avatar"; "required": false; }; "color": { "alias": "color"; "required": false;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvAvatarComponent, "dsv-avatar", never, { "avatar": { "alias": "avatar"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, { "callback": "callback"; }, never, never, true, never>;
|
|
12
14
|
}
|
|
@@ -3,17 +3,17 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export type ButtonWidthType = 'small' | 'medium' | 'large';
|
|
4
4
|
export type ButtonVariantType = 'text' | 'outlined' | 'contained';
|
|
5
5
|
export declare class DsvButtonComponent {
|
|
6
|
-
libelle: string
|
|
7
|
-
color: ColorType
|
|
8
|
-
icon: string
|
|
9
|
-
iconEnd: string
|
|
10
|
-
width: ButtonWidthType
|
|
11
|
-
variant: ButtonVariantType
|
|
12
|
-
fullwidth: boolean
|
|
13
|
-
show: boolean
|
|
14
|
-
disabled: boolean
|
|
6
|
+
libelle: import("@angular/core").InputSignal<string>;
|
|
7
|
+
color: import("@angular/core").InputSignal<ColorType>;
|
|
8
|
+
icon: import("@angular/core").InputSignal<string>;
|
|
9
|
+
iconEnd: import("@angular/core").InputSignal<string>;
|
|
10
|
+
width: import("@angular/core").InputSignal<ButtonWidthType>;
|
|
11
|
+
variant: import("@angular/core").InputSignal<ButtonVariantType>;
|
|
12
|
+
fullwidth: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
show: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
disabled: import("@angular/core").InputSignal<boolean>;
|
|
15
15
|
callback: import("@angular/core").OutputEmitterRef<void>;
|
|
16
16
|
doClick(event: Event): void;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvButtonComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvButtonComponent, "dsv-button", never, { "libelle": { "alias": "libelle"; "required": false; }; "color": { "alias": "color"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconEnd": { "alias": "iconEnd"; "required": false; }; "width": { "alias": "width"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "fullwidth": { "alias": "fullwidth"; "required": false; }; "show": { "alias": "show"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "callback": "callback"; }, never, ["*"], true, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvButtonComponent, "dsv-button", never, { "libelle": { "alias": "libelle"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconEnd": { "alias": "iconEnd"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "fullwidth": { "alias": "fullwidth"; "required": false; "isSignal": true; }; "show": { "alias": "show"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "callback": "callback"; }, never, ["*"], true, never>;
|
|
19
19
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class DsvCardComponent {
|
|
3
|
-
avatar
|
|
4
|
-
title: string
|
|
5
|
-
subtitle: string
|
|
6
|
-
image: string
|
|
7
|
-
alt: string
|
|
3
|
+
avatar: import("@angular/core").InputSignal<string | undefined>;
|
|
4
|
+
title: import("@angular/core").InputSignal<string>;
|
|
5
|
+
subtitle: import("@angular/core").InputSignal<string>;
|
|
6
|
+
image: import("@angular/core").InputSignal<string | undefined>;
|
|
7
|
+
alt: import("@angular/core").InputSignal<string | undefined>;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvCardComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvCardComponent, "dsv-card", never, { "avatar": { "alias": "avatar"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "image": { "alias": "image"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvCardComponent, "dsv-card", never, { "avatar": { "alias": "avatar"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "image": { "alias": "image"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
10
10
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class DsvContainerComponent {
|
|
3
|
-
column: boolean
|
|
3
|
+
column: import("@angular/core").InputSignal<boolean>;
|
|
4
4
|
private readonly storageService;
|
|
5
5
|
constructor();
|
|
6
|
-
ngOnInit(): void;
|
|
7
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvContainerComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvContainerComponent, "dsv-container", never, { "column": { "alias": "column"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvContainerComponent, "dsv-container", never, { "column": { "alias": "column"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
9
8
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FormGroup } from '@angular/forms';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class FormComponent {
|
|
4
|
-
form: FormGroup
|
|
4
|
+
form: import("@angular/core").InputSignal<FormGroup<any>>;
|
|
5
5
|
constructor();
|
|
6
6
|
onSubmit(): void;
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "app-form", never, { "form": { "alias": "form"; "required":
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "app-form", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
9
9
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Signal } from '@angular/core';
|
|
2
1
|
import { FormGroup } from '@angular/forms';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class FormInputComponent {
|
|
5
|
-
form: FormGroup
|
|
6
|
-
field: string
|
|
7
|
-
withLabel: boolean
|
|
8
|
-
onSend:
|
|
4
|
+
form: import("@angular/core").InputSignal<FormGroup<any>>;
|
|
5
|
+
field: import("@angular/core").InputSignal<string>;
|
|
6
|
+
withLabel: import("@angular/core").InputSignal<boolean>;
|
|
7
|
+
onSend: import("@angular/core").OutputEmitterRef<string>;
|
|
9
8
|
onEnter(): void;
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormInputComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormInputComponent, "form-input", never, { "form": { "alias": "form"; "required":
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormInputComponent, "form-input", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; "field": { "alias": "field"; "required": true; "isSignal": true; }; "withLabel": { "alias": "withLabel"; "required": false; "isSignal": true; }; }, { "onSend": "onSend"; }, never, never, true, never>;
|
|
12
11
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Signal } from '@angular/core';
|
|
2
1
|
import { BaseFormComponent } from '../../public-api';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class SearchbarComponent extends BaseFormComponent {
|
|
5
|
-
search: string
|
|
6
|
-
onSearch:
|
|
4
|
+
search: import("@angular/core").InputSignal<string>;
|
|
5
|
+
onSearch: import("@angular/core").OutputEmitterRef<string>;
|
|
7
6
|
afterInit(): void;
|
|
8
|
-
onTap:
|
|
7
|
+
onTap(value: string): void;
|
|
9
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<SearchbarComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SearchbarComponent, "form-searchbar", never, { "search": { "alias": "search"; "required": false;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchbarComponent, "form-searchbar", never, { "search": { "alias": "search"; "required": false; "isSignal": true; }; }, { "onSearch": "onSearch"; }, never, never, true, never>;
|
|
11
10
|
}
|
|
@@ -4,12 +4,12 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class DsvHeaderComponent {
|
|
5
5
|
private readonly router;
|
|
6
6
|
private readonly menuService;
|
|
7
|
-
img: string
|
|
8
|
-
title: string
|
|
9
|
-
withMenu: boolean
|
|
7
|
+
img: import("@angular/core").InputSignal<string | undefined>;
|
|
8
|
+
title: import("@angular/core").InputSignal<string>;
|
|
9
|
+
withMenu: import("@angular/core").InputSignal<boolean>;
|
|
10
10
|
constructor(router: Router, menuService: MenuService);
|
|
11
11
|
doToogleMenu(): void;
|
|
12
12
|
goToHome(): void;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvHeaderComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvHeaderComponent, "dsv-header", never, { "img": { "alias": "img"; "required": false; }; "title": { "alias": "title"; "required": false; }; "withMenu": { "alias": "withMenu"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvHeaderComponent, "dsv-header", never, { "img": { "alias": "img"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "withMenu": { "alias": "withMenu"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
15
15
|
}
|
|
@@ -2,12 +2,12 @@ import { Router } from '@angular/router';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class DsvItemComponent {
|
|
4
4
|
private readonly router;
|
|
5
|
-
icon: string
|
|
6
|
-
text: string
|
|
7
|
-
url: string
|
|
8
|
-
small: boolean
|
|
5
|
+
icon: import("@angular/core").InputSignal<string>;
|
|
6
|
+
text: import("@angular/core").InputSignal<string>;
|
|
7
|
+
url: import("@angular/core").InputSignal<string | undefined>;
|
|
8
|
+
small: import("@angular/core").InputSignal<boolean>;
|
|
9
9
|
constructor(router: Router);
|
|
10
10
|
doClick(): void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvItemComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvItemComponent, "dsv-item", never, { "icon": { "alias": "icon"; "required": false; }; "text": { "alias": "text"; "required": false; }; "url": { "alias": "url"; "required": false; }; "small": { "alias": "small"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvItemComponent, "dsv-item", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "url": { "alias": "url"; "required": false; "isSignal": true; }; "small": { "alias": "small"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
13
13
|
}
|
|
@@ -6,10 +6,10 @@ export declare class DsvMenuComponent implements OnInit {
|
|
|
6
6
|
private readonly menuService;
|
|
7
7
|
private readonly elementRef;
|
|
8
8
|
private readonly storageService;
|
|
9
|
-
showFooter: boolean
|
|
9
|
+
showFooter: import("@angular/core").InputSignal<boolean>;
|
|
10
10
|
constructor(menuService: MenuService, elementRef: ElementRef, storageService: StorageService);
|
|
11
11
|
ngOnInit(): void;
|
|
12
12
|
onClickOutside(event: Event): void;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvMenuComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvMenuComponent, "dsv-menu", never, { "showFooter": { "alias": "showFooter"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvMenuComponent, "dsv-menu", never, { "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
15
15
|
}
|
|
@@ -12,7 +12,7 @@ export type ThemeType = {
|
|
|
12
12
|
error?: string;
|
|
13
13
|
};
|
|
14
14
|
export declare class DsvThemeComponent {
|
|
15
|
-
theme: ThemeType
|
|
15
|
+
theme: import("@angular/core").InputSignal<ThemeType>;
|
|
16
16
|
background: string;
|
|
17
17
|
backgroundDark: string;
|
|
18
18
|
text: string;
|
|
@@ -25,5 +25,5 @@ export declare class DsvThemeComponent {
|
|
|
25
25
|
error: string;
|
|
26
26
|
ngOnInit(): void;
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvThemeComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DsvThemeComponent, "dsv-theme", never, { "theme": { "alias": "theme"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DsvThemeComponent, "dsv-theme", never, { "theme": { "alias": "theme"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-vagabond-lab-ng-dsv-auth.mjs","sources":["../../../projects/ng-dsv/auth/component/auth.component.ts","../../../projects/ng-dsv/auth/component/auth.component.html","../../../projects/ng-dsv/auth/service/auth.service.ts","../../../projects/ng-dsv/auth/service/auth.google.service.ts","../../../projects/ng-dsv/auth/ng-vagabond-lab-ng-dsv-auth.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n afterNextRender,\n Component,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { EnvironmentService } from '@ng-vagabond-lab/ng-dsv/environment';\nimport { AuthGoogleService, AuthService } from '../public-api';\n\n@Component({\n selector: 'app-auth',\n imports: [CommonModule, DsvButtonComponent],\n standalone: true,\n templateUrl: './auth.component.html',\n styleUrls: ['./auth.component.scss'],\n})\nexport class AuthComponent {\n private readonly authGoogleService = inject(AuthGoogleService);\n protected authService = inject(AuthService);\n private readonly environmentService = inject(EnvironmentService);\n\n private ssrRendered = signal(false);\n\n constructor() {\n afterNextRender(() => {\n this.ssrRendered.set(true);\n });\n effect(() => {\n if (this.authService.userConnected() === null) {\n this.ssrRendered() && this.authGoogleService.loginWithGoogle();\n } else {\n //this.memberService.initMember(\n // this.authService.userConnected()?.user?.id\n //);\n }\n });\n effect(() => {\n if (this.environmentService.env() && this.ssrRendered()) {\n this.authService.loginFromCache();\n this.authGoogleService.initGoogleAuth();\n }\n });\n }\n\n logout() {\n this.authService.logout();\n }\n}\n","<div class=\"auth-button\">\n <button\n id=\"google-signin-button\"\n [style]=\"authService.userConnected() === null ? '' : 'display: none;'\"\n ></button>\n</div>\n\n@if(authService.userConnected()) {\n<div class=\"profile\">\n <img [src]=\"authService.userConnected()?.user?.avatar\" alt=\"profile\" />\n <dsv-button\n (callback)=\"logout()\"\n icon=\"ri-logout-box-line\"\n color=\"inherit\"\n ></dsv-button>\n</div>\n}\n","import { Injectable, signal, WritableSignal } from '@angular/core';\nimport { ApiService } from '@ng-vagabond-lab/ng-dsv/api';\nimport { IUserConnectedDto } from '../dto/user.dto';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n userConnected: WritableSignal<IUserConnectedDto | null> = signal(null);\n\n constructor(private readonly apiService: ApiService) {}\n\n googleLogin(credential: string) {\n this.apiService.post<IUserConnectedDto>(\n 'auth/google-identity-connect',\n {\n googleToken: credential,\n },\n (data) => {\n localStorage?.setItem('user-connected', JSON.stringify(data));\n this.userConnected.set(data);\n }\n );\n }\n\n loginFromCache() {\n const userConnected =\n typeof window !== 'undefined' &&\n JSON.parse(localStorage?.getItem('user-connected')!);\n this.userConnected.set(userConnected);\n console.info('userConnected', userConnected);\n return userConnected;\n }\n\n logout() {\n localStorage?.removeItem('user-connected');\n this.userConnected.set(null);\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { EnvironmentService } from '@ng-vagabond-lab/ng-dsv/environment';\nimport { AuthService } from './auth.service';\n\ndeclare const google: any;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGoogleService {\n private readonly authService = inject(AuthService);\n\n constructor(private readonly environmentService: EnvironmentService) {}\n\n initGoogleAuth() {\n google.accounts.id.initialize({\n client_id: this.environmentService.env()?.GOOGLE_CLIENT_ID,\n callback: this.handleCredentialResponse.bind(this),\n });\n google.accounts.id.renderButton(\n document.getElementById('google-signin-button')!,\n { theme: 'outline', size: 'medium' }\n );\n }\n\n handleCredentialResponse(response: { credential: string }) {\n this.authService.googleLogin(response.credential);\n }\n\n decodeJwtToken(token: string) {\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\n const jsonPayload = decodeURIComponent(\n atob(base64)\n .split('')\n .map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join('')\n );\n return JSON.parse(jsonPayload);\n }\n\n loginWithGoogle() {\n google?.accounts.id.prompt();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;MAmBa,aAAa,CAAA;AACP,IAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACpD,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC1B,IAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-auth.mjs","sources":["../../../projects/ng-dsv/auth/component/auth.component.ts","../../../projects/ng-dsv/auth/component/auth.component.html","../../../projects/ng-dsv/auth/service/auth.service.ts","../../../projects/ng-dsv/auth/service/auth.google.service.ts","../../../projects/ng-dsv/auth/ng-vagabond-lab-ng-dsv-auth.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n afterNextRender,\n Component,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport { DsvButtonComponent } from '@ng-vagabond-lab/ng-dsv/ds/button';\nimport { EnvironmentService } from '@ng-vagabond-lab/ng-dsv/environment';\nimport { AuthGoogleService, AuthService } from '../public-api';\n\n@Component({\n selector: 'app-auth',\n imports: [CommonModule, DsvButtonComponent],\n standalone: true,\n templateUrl: './auth.component.html',\n styleUrls: ['./auth.component.scss'],\n})\nexport class AuthComponent {\n private readonly authGoogleService = inject(AuthGoogleService);\n protected authService = inject(AuthService);\n private readonly environmentService = inject(EnvironmentService);\n\n private readonly ssrRendered = signal(false);\n\n constructor() {\n afterNextRender(() => {\n this.ssrRendered.set(true);\n });\n effect(() => {\n if (this.authService.userConnected() === null) {\n this.ssrRendered() && this.authGoogleService.loginWithGoogle();\n } else {\n //this.memberService.initMember(\n // this.authService.userConnected()?.user?.id\n //);\n }\n });\n effect(() => {\n if (this.environmentService.env() && this.ssrRendered()) {\n this.authService.loginFromCache();\n this.authGoogleService.initGoogleAuth();\n }\n });\n }\n\n logout() {\n this.authService.logout();\n }\n}\n","<div class=\"auth-button\">\n <button\n id=\"google-signin-button\"\n [style]=\"authService.userConnected() === null ? '' : 'display: none;'\"\n ></button>\n</div>\n\n@if(authService.userConnected()) {\n<div class=\"profile\">\n <img [src]=\"authService.userConnected()?.user?.avatar\" alt=\"profile\" />\n <dsv-button\n (callback)=\"logout()\"\n icon=\"ri-logout-box-line\"\n color=\"inherit\"\n ></dsv-button>\n</div>\n}\n","import { Injectable, signal, WritableSignal } from '@angular/core';\nimport { ApiService } from '@ng-vagabond-lab/ng-dsv/api';\nimport { IUserConnectedDto } from '../dto/user.dto';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n userConnected: WritableSignal<IUserConnectedDto | null> = signal(null);\n\n constructor(private readonly apiService: ApiService) {}\n\n googleLogin(credential: string) {\n this.apiService.post<IUserConnectedDto>(\n 'auth/google-identity-connect',\n {\n googleToken: credential,\n },\n (data) => {\n localStorage?.setItem('user-connected', JSON.stringify(data));\n this.userConnected.set(data);\n }\n );\n }\n\n loginFromCache() {\n const userConnected =\n typeof window !== 'undefined' &&\n JSON.parse(localStorage?.getItem('user-connected')!);\n this.userConnected.set(userConnected);\n console.info('userConnected', userConnected);\n return userConnected;\n }\n\n logout() {\n localStorage?.removeItem('user-connected');\n this.userConnected.set(null);\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { EnvironmentService } from '@ng-vagabond-lab/ng-dsv/environment';\nimport { AuthService } from './auth.service';\n\ndeclare const google: any;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGoogleService {\n private readonly authService = inject(AuthService);\n\n constructor(private readonly environmentService: EnvironmentService) {}\n\n initGoogleAuth() {\n google.accounts.id.initialize({\n client_id: this.environmentService.env()?.GOOGLE_CLIENT_ID,\n callback: this.handleCredentialResponse.bind(this),\n });\n google.accounts.id.renderButton(\n document.getElementById('google-signin-button')!,\n { theme: 'outline', size: 'medium' }\n );\n }\n\n handleCredentialResponse(response: { credential: string }) {\n this.authService.googleLogin(response.credential);\n }\n\n decodeJwtToken(token: string) {\n const base64Url = token.split('.')[1];\n const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');\n const jsonPayload = decodeURIComponent(\n atob(base64)\n .split('')\n .map(function (c) {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n })\n .join('')\n );\n return JSON.parse(jsonPayload);\n }\n\n loginWithGoogle() {\n google?.accounts.id.prompt();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;MAmBa,aAAa,CAAA;AACP,IAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACpD,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC1B,IAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAE/C,IAAA,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;AAE5C,IAAA,WAAA,GAAA;QACE,eAAe,CAAC,MAAK;AACnB,YAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC;AAC5B,SAAC,CAAC;QACF,MAAM,CAAC,MAAK;YACV,IAAI,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE,KAAK,I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K,CAAC,EAAE;aACR,GAAG,CAAC,UAAU,CAAC,EAAA;YACd,OAAO,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AAC9D,SAAC;AACA,aAAA,IAAI,CAAC,EAAE,CAAC,CACZ;AACD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;;IAGhC,eAAe,GAAA;AACb,QAAA,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;;wGAnCnB,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,kBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA;;4FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -1,34 +1,27 @@
|
|
|
1
|
-
import * as i1 from '@angular/common';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { signal,
|
|
3
|
+
import { input, signal, effect, Component } from '@angular/core';
|
|
5
4
|
|
|
6
5
|
class DsvAccordionComponent {
|
|
7
|
-
open = false;
|
|
8
|
-
title = '';
|
|
9
|
-
color = '';
|
|
10
|
-
isOpen = signal(this.open);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.isOpen.set(
|
|
14
|
-
}
|
|
6
|
+
open = input(false);
|
|
7
|
+
title = input('');
|
|
8
|
+
color = input('');
|
|
9
|
+
isOpen = signal(this.open());
|
|
10
|
+
constructor() {
|
|
11
|
+
effect(() => {
|
|
12
|
+
this.isOpen.set(this.open());
|
|
13
|
+
});
|
|
15
14
|
}
|
|
16
15
|
doToogle() {
|
|
17
16
|
this.isOpen.update((tootle) => !tootle);
|
|
18
17
|
}
|
|
19
18
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DsvAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: DsvAccordionComponent, isStandalone: true, selector: "dsv-accordion", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<a class=\"dsv-accordion-header\" (click)=\"doToogle()\">\n {{ title() }}\n @if(isOpen() === true) {\n <i class=\"ri-arrow-up-s-line\"></i>\n } @else {\n <i class=\"ri-arrow-down-s-line\"></i>\n }\n</a>\n<div class=\"dsv-accordion-text\" [class.open]=\"isOpen() === true\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:flex;flex-direction:column;gap:7px;width:calc(100% - 20px);padding:10px!important;background-color:#fff;position:relative;border-radius:0}:host .dsv-accordion-header{display:flex;width:95%;font-weight:700;cursor:pointer;padding:5px 10px}:host .dsv-accordion-header i{position:absolute;right:10px}:host .dsv-accordion-text{display:flex;width:100%;overflow:hidden;padding:0 10px;opacity:0;height:0;transition:transform .3s ease-out,opacity .2s ease-out,height .2s ease-out}:host .dsv-accordion-text.open{padding:10px;opacity:1;height:auto}::ng-deep .dark dsv-accordion{background-color:#2c2c2c}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
21
20
|
}
|
|
22
21
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DsvAccordionComponent, decorators: [{
|
|
23
22
|
type: Component,
|
|
24
|
-
args: [{ selector: 'dsv-accordion', standalone: true, imports: [CommonModule], template: "<a class=\"dsv-accordion-header\" (click)=\"doToogle()\">\n {{ title }}\n <i class=\"ri-arrow-up-s-line\"
|
|
25
|
-
}],
|
|
26
|
-
type: Input
|
|
27
|
-
}], title: [{
|
|
28
|
-
type: Input
|
|
29
|
-
}], color: [{
|
|
30
|
-
type: Input
|
|
31
|
-
}] } });
|
|
23
|
+
args: [{ selector: 'dsv-accordion', standalone: true, imports: [CommonModule], template: "<a class=\"dsv-accordion-header\" (click)=\"doToogle()\">\n {{ title() }}\n @if(isOpen() === true) {\n <i class=\"ri-arrow-up-s-line\"></i>\n } @else {\n <i class=\"ri-arrow-down-s-line\"></i>\n }\n</a>\n<div class=\"dsv-accordion-text\" [class.open]=\"isOpen() === true\">\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:flex;flex-direction:column;gap:7px;width:calc(100% - 20px);padding:10px!important;background-color:#fff;position:relative;border-radius:0}:host .dsv-accordion-header{display:flex;width:95%;font-weight:700;cursor:pointer;padding:5px 10px}:host .dsv-accordion-header i{position:absolute;right:10px}:host .dsv-accordion-text{display:flex;width:100%;overflow:hidden;padding:0 10px;opacity:0;height:0;transition:transform .3s ease-out,opacity .2s ease-out,height .2s ease-out}:host .dsv-accordion-text.open{padding:10px;opacity:1;height:auto}::ng-deep .dark dsv-accordion{background-color:#2c2c2c}\n"] }]
|
|
24
|
+
}], ctorParameters: () => [] });
|
|
32
25
|
|
|
33
26
|
/**
|
|
34
27
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-vagabond-lab-ng-dsv-ds-accordion.mjs","sources":["../../../projects/ng-dsv/ds/accordion/component/accordion.component.ts","../../../projects/ng-dsv/ds/accordion/component/accordion.component.html","../../../projects/ng-dsv/ds/accordion/ng-vagabond-lab-ng-dsv-ds-accordion.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-ds-accordion.mjs","sources":["../../../projects/ng-dsv/ds/accordion/component/accordion.component.ts","../../../projects/ng-dsv/ds/accordion/component/accordion.component.html","../../../projects/ng-dsv/ds/accordion/ng-vagabond-lab-ng-dsv-ds-accordion.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, effect, input, signal } from '@angular/core';\n\n@Component({\n selector: 'dsv-accordion',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './accordion.component.html',\n styleUrls: ['./accordion.component.scss'],\n})\nexport class DsvAccordionComponent {\n open = input<boolean>(false);\n title = input<string>('');\n color = input<string>('');\n\n isOpen = signal<boolean>(this.open());\n\n constructor() {\n effect(() => {\n this.isOpen.set(this.open());\n });\n }\n\n doToogle() {\n this.isOpen.update((tootle) => !tootle);\n }\n}\n","<a class=\"dsv-accordion-header\" (click)=\"doToogle()\">\n {{ title() }}\n @if(isOpen() === true) {\n <i class=\"ri-arrow-up-s-line\"></i>\n } @else {\n <i class=\"ri-arrow-down-s-line\"></i>\n }\n</a>\n<div class=\"dsv-accordion-text\" [class.open]=\"isOpen() === true\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAUa,qBAAqB,CAAA;AAChC,IAAA,IAAI,GAAG,KAAK,CAAU,KAAK,CAAC;AAC5B,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;AACzB,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;IAEzB,MAAM,GAAG,MAAM,CAAU,IAAI,CAAC,IAAI,EAAE,CAAC;AAErC,IAAA,WAAA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EAAA,MAAA,EAAA,CAAA,kmBAAA,CAAA,EAAA;;;AENzB;;AAEG;;;;"}
|
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { input, output, Component } from '@angular/core';
|
|
5
5
|
|
|
6
6
|
class DsvAvatarComponent {
|
|
7
|
-
avatar = '';
|
|
8
|
-
color = 'primary';
|
|
9
|
-
callback;
|
|
7
|
+
avatar = input('');
|
|
8
|
+
color = input('primary');
|
|
9
|
+
callback = output();
|
|
10
10
|
isImage() {
|
|
11
|
-
return this.avatar.startsWith('http');
|
|
11
|
+
return this.avatar().startsWith('http');
|
|
12
|
+
}
|
|
13
|
+
isCallback() {
|
|
14
|
+
const listeners = this.callback['listeners'];
|
|
15
|
+
return listeners?.length > 0;
|
|
12
16
|
}
|
|
13
17
|
showAvatar() {
|
|
14
|
-
return this.avatar.substring(0, 1).toUpperCase();
|
|
18
|
+
return this.avatar().substring(0, 1).toUpperCase();
|
|
15
19
|
}
|
|
16
20
|
triggerEvent() {
|
|
17
|
-
|
|
18
|
-
this.callback();
|
|
19
|
-
}
|
|
21
|
+
this.callback?.emit();
|
|
20
22
|
}
|
|
21
23
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DsvAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
24
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: DsvAvatarComponent, isStandalone: true, selector: "dsv-avatar", inputs: { avatar: { classPropertyName: "avatar", publicName: "avatar", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { callback: "callback" }, ngImport: i0, template: "<a\n class=\"dsv-avatar\"\n [ngClass]=\"color() + ' ' + (isCallback() ? 'callback' : '')\"\n (click)=\"triggerEvent()\"\n>\n @if (isImage()) {\n <img src=\"{{ avatar() }}\" alt=\"avatar\" />\n } @else {\n <span>{{ showAvatar() }}</span>\n }\n</a>\n", styles: [".dsv-avatar{position:relative;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;flex-shrink:0;width:40px;height:40px;font-size:1.25rem;line-height:1;border-radius:50%;overflow:hidden;-webkit-user-select:none;user-select:none;color:#fff;background-color:inherit;border:4px solid var(--background)}::ng-deep .dark .dsv-avatar{border-color:var(--background-dark)}.dsv-avatar img{width:40px;height:40px}.dsv-avatar.callback:hover{border:4px solid #e0e0e0}::ng-deep .dark .dsv-avatar.callback:hover{border-color:#2b2b2b}.dsv-avatar.callback:active{opacity:.8}.dsv-avatar.primary{background-color:var(--primary)}.dsv-avatar.success{background-color:var(--success)}.dsv-avatar.info{background-color:var(--info)}.dsv-avatar.warning{background-color:var(--warning)}.dsv-avatar.error{background-color:var(--error)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
23
25
|
}
|
|
24
26
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DsvAvatarComponent, decorators: [{
|
|
25
27
|
type: Component,
|
|
26
|
-
args: [{ selector: 'dsv-avatar', standalone: true, imports: [CommonModule], template: "<a
|
|
27
|
-
}]
|
|
28
|
-
type: Input
|
|
29
|
-
}], color: [{
|
|
30
|
-
type: Input
|
|
31
|
-
}], callback: [{
|
|
32
|
-
type: Input
|
|
33
|
-
}] } });
|
|
28
|
+
args: [{ selector: 'dsv-avatar', standalone: true, imports: [CommonModule], template: "<a\n class=\"dsv-avatar\"\n [ngClass]=\"color() + ' ' + (isCallback() ? 'callback' : '')\"\n (click)=\"triggerEvent()\"\n>\n @if (isImage()) {\n <img src=\"{{ avatar() }}\" alt=\"avatar\" />\n } @else {\n <span>{{ showAvatar() }}</span>\n }\n</a>\n", styles: [".dsv-avatar{position:relative;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;flex-shrink:0;width:40px;height:40px;font-size:1.25rem;line-height:1;border-radius:50%;overflow:hidden;-webkit-user-select:none;user-select:none;color:#fff;background-color:inherit;border:4px solid var(--background)}::ng-deep .dark .dsv-avatar{border-color:var(--background-dark)}.dsv-avatar img{width:40px;height:40px}.dsv-avatar.callback:hover{border:4px solid #e0e0e0}::ng-deep .dark .dsv-avatar.callback:hover{border-color:#2b2b2b}.dsv-avatar.callback:active{opacity:.8}.dsv-avatar.primary{background-color:var(--primary)}.dsv-avatar.success{background-color:var(--success)}.dsv-avatar.info{background-color:var(--info)}.dsv-avatar.warning{background-color:var(--warning)}.dsv-avatar.error{background-color:var(--error)}\n"] }]
|
|
29
|
+
}] });
|
|
34
30
|
|
|
35
31
|
/**
|
|
36
32
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-vagabond-lab-ng-dsv-ds-avatar.mjs","sources":["../../../projects/ng-dsv/ds/avatar/component/avatar.component.ts","../../../projects/ng-dsv/ds/avatar/component/avatar.component.html","../../../projects/ng-dsv/ds/avatar/ng-vagabond-lab-ng-dsv-ds-avatar.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component,
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-ds-avatar.mjs","sources":["../../../projects/ng-dsv/ds/avatar/component/avatar.component.ts","../../../projects/ng-dsv/ds/avatar/component/avatar.component.html","../../../projects/ng-dsv/ds/avatar/ng-vagabond-lab-ng-dsv-ds-avatar.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input, output, OutputEmitterRef } from '@angular/core';\nimport { ColorType } from '@ng-vagabond-lab/ng-dsv/type';\n\n@Component({\n selector: 'dsv-avatar',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n})\nexport class DsvAvatarComponent {\n avatar = input<string>('');\n color = input<ColorType>('primary');\n callback = output<void>();\n\n isImage() {\n return this.avatar().startsWith('http');\n }\n\n isCallback() {\n const listeners =\n this.callback['listeners' as keyof OutputEmitterRef<void>];\n return listeners?.length > 0;\n }\n\n showAvatar() {\n return this.avatar().substring(0, 1).toUpperCase();\n }\n\n triggerEvent() {\n this.callback?.emit();\n }\n}\n","<a\n class=\"dsv-avatar\"\n [ngClass]=\"color() + ' ' + (isCallback() ? 'callback' : '')\"\n (click)=\"triggerEvent()\"\n>\n @if (isImage()) {\n <img src=\"{{ avatar() }}\" alt=\"avatar\" />\n } @else {\n <span>{{ showAvatar() }}</span>\n }\n</a>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,kBAAkB,CAAA;AAC7B,IAAA,MAAM,GAAG,KAAK,CAAS,EAAE,CAAC;AAC1B,IAAA,KAAK,GAAG,KAAK,CAAY,SAAS,CAAC;IACnC,QAAQ,GAAG,MAAM,EAAQ;IAEzB,OAAO,GAAA;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;;IAGzC,UAAU,GAAA;QACR,MAAM,SAAS,GACb,IAAI,CAAC,QAAQ,CAAC,WAA2C,CAAC;AAC5D,QAAA,OAAO,SAAS,EAAE,MAAM,GAAG,CAAC;;IAG9B,UAAU,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE;;IAGpD,YAAY,GAAA;AACV,QAAA,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE;;wGApBZ,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECX/B,kQAWA,EAAA,MAAA,EAAA,CAAA,81BAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDJY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAP9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EACV,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,kQAAA,EAAA,MAAA,EAAA,CAAA,81BAAA,CAAA,EAAA;;;AEPzB;;AAEG;;;;"}
|
|
@@ -1,49 +1,31 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { input, output, Component } from '@angular/core';
|
|
5
5
|
|
|
6
6
|
class DsvButtonComponent {
|
|
7
|
-
libelle = '';
|
|
8
|
-
color = 'primary';
|
|
9
|
-
icon = '';
|
|
10
|
-
iconEnd = '';
|
|
11
|
-
width = 'medium';
|
|
12
|
-
variant = 'contained';
|
|
13
|
-
fullwidth = false;
|
|
14
|
-
show = true;
|
|
15
|
-
disabled = false;
|
|
7
|
+
libelle = input('');
|
|
8
|
+
color = input('primary');
|
|
9
|
+
icon = input('');
|
|
10
|
+
iconEnd = input('');
|
|
11
|
+
width = input('medium');
|
|
12
|
+
variant = input('contained');
|
|
13
|
+
fullwidth = input(false);
|
|
14
|
+
show = input(true);
|
|
15
|
+
disabled = input(false);
|
|
16
16
|
callback = output();
|
|
17
17
|
doClick(event) {
|
|
18
18
|
event.stopPropagation();
|
|
19
19
|
event.preventDefault();
|
|
20
|
-
!this.disabled && this.callback.emit();
|
|
20
|
+
!this.disabled() && this.callback.emit();
|
|
21
21
|
}
|
|
22
22
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DsvButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
23
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: DsvButtonComponent, isStandalone: true, selector: "dsv-button", inputs: { libelle: { classPropertyName: "libelle", publicName: "libelle", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconEnd: { classPropertyName: "iconEnd", publicName: "iconEnd", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fullwidth: { classPropertyName: "fullwidth", publicName: "fullwidth", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { callback: "callback" }, ngImport: i0, template: "@if (show()) {\n<button\n class=\"dsv-button\"\n (click)=\"doClick($event)\"\n [ngClass]=\"\n (icon() ? 'icon' : '') +\n ' ' +\n color() +\n ' ' +\n width() +\n ' ' +\n variant() +\n ' ' +\n (fullwidth() ? 'fullwidth' : '')\n \"\n [disabled]=\"disabled()\"\n>\n @if(icon()) {\n <i [class]=\"icon()\"></i>\n } @if(libelle()) {\n <span>\n {{ libelle() }}\n </span>\n }\n <ng-content></ng-content>\n @if (iconEnd()) {\n <i [class]=\"iconEnd()\"></i>\n }\n</button>\n}\n", styles: ["button.dsv-button{display:inline-flex;flex-direction:row;gap:5px;align-items:center;justify-content:center;position:relative;box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;font-weight:500;letter-spacing:.02857em;text-transform:uppercase;color:var(--white);outline:0px;margin:0;text-decoration:none;border-width:0px;border-radius:4px;transition:background-color .25s cubic-bezier(.4,0,.2,1),box-shadow .25s cubic-bezier(.4,0,.2,1),border-color .25s cubic-bezier(.4,0,.2,1);padding:6px;font-size:1rem;min-width:10px;line-height:1}button.dsv-button.small,button.dsv-button.small>i{font-size:.8rem!important}button.dsv-button.medium,button.dsv-button.medium>i{font-size:1rem!important}button.dsv-button.large,button.dsv-button.large>i{font-size:1.5rem!important}button.dsv-button.fullwidth{width:100%}button.dsv-button.text,button.dsv-button.outlined{background-color:transparent;box-shadow:none}button.dsv-button.text.primary,button.dsv-button.outlined.primary{color:var(--primary)}button.dsv-button.text.success,button.dsv-button.outlined.success{color:var(--success)}button.dsv-button.text.info,button.dsv-button.outlined.info{color:var(--info)}button.dsv-button.text.warning,button.dsv-button.outlined.warning{color:var(--warning)}button.dsv-button.text.error,button.dsv-button.outlined.error{color:var(--error)}button.dsv-button.text.outlined.primary,button.dsv-button.outlined.outlined.primary{border:1px solid var(--primary)}button.dsv-button.text.outlined.success,button.dsv-button.outlined.outlined.success{border:1px solid var(--success)}button.dsv-button.text.outlined.info,button.dsv-button.outlined.outlined.info{border:1px solid var(--info)}button.dsv-button.text.outlined.warning,button.dsv-button.outlined.outlined.warning{border:1px solid var(--warning)}button.dsv-button.text.outlined.error,button.dsv-button.outlined.outlined.error{border:1px solid var(--error)}button.dsv-button.contained.inherit{background-color:inherit;color:var(--text)!important}button.dsv-button.contained.primary{background-color:var(--primary)}button.dsv-button.contained.secondary{background-color:var(--secondary)}button.dsv-button.contained.success{background-color:var(--success)}button.dsv-button.contained.info{background-color:var(--info)}button.dsv-button.contained.warning{background-color:var(--warning)}button.dsv-button.contained.error{background-color:var(--error)}button.dsv-button:not(:disabled):hover{transform:scale(1);opacity:1.2}button.dsv-button:not(:disabled):hover:not(.text){box-shadow:#0003 0 2px 4px -1px,#00000024 0 4px 5px,#0000001f 0 1px 10px}button.dsv-button:not(:disabled):active{transform:scale(1);opacity:.8}button.dsv-button:disabled{background:#5b5b5b!important}::ng-deep .dark button.dsv-button.contained.inherit{color:var(--white)!important;filter:hue-rotate(5deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
24
24
|
}
|
|
25
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DsvButtonComponent, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
|
-
args: [{ selector: 'dsv-button', standalone: true, imports: [CommonModule], template: "<button\n class=\"dsv-button\"\n (click)=\"doClick($event)\"\n [ngClass]=\"\n (icon ? 'icon' : '') +\n ' ' +\n color +\n ' ' +\n width +\n ' ' +\n variant +\n ' ' +\n (fullwidth ? 'fullwidth' : '')\n \"\n [disabled]=\"disabled\"\n
|
|
28
|
-
}]
|
|
29
|
-
type: Input
|
|
30
|
-
}], color: [{
|
|
31
|
-
type: Input
|
|
32
|
-
}], icon: [{
|
|
33
|
-
type: Input
|
|
34
|
-
}], iconEnd: [{
|
|
35
|
-
type: Input
|
|
36
|
-
}], width: [{
|
|
37
|
-
type: Input
|
|
38
|
-
}], variant: [{
|
|
39
|
-
type: Input
|
|
40
|
-
}], fullwidth: [{
|
|
41
|
-
type: Input
|
|
42
|
-
}], show: [{
|
|
43
|
-
type: Input
|
|
44
|
-
}], disabled: [{
|
|
45
|
-
type: Input
|
|
46
|
-
}] } });
|
|
27
|
+
args: [{ selector: 'dsv-button', standalone: true, imports: [CommonModule], template: "@if (show()) {\n<button\n class=\"dsv-button\"\n (click)=\"doClick($event)\"\n [ngClass]=\"\n (icon() ? 'icon' : '') +\n ' ' +\n color() +\n ' ' +\n width() +\n ' ' +\n variant() +\n ' ' +\n (fullwidth() ? 'fullwidth' : '')\n \"\n [disabled]=\"disabled()\"\n>\n @if(icon()) {\n <i [class]=\"icon()\"></i>\n } @if(libelle()) {\n <span>\n {{ libelle() }}\n </span>\n }\n <ng-content></ng-content>\n @if (iconEnd()) {\n <i [class]=\"iconEnd()\"></i>\n }\n</button>\n}\n", styles: ["button.dsv-button{display:inline-flex;flex-direction:row;gap:5px;align-items:center;justify-content:center;position:relative;box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;font-weight:500;letter-spacing:.02857em;text-transform:uppercase;color:var(--white);outline:0px;margin:0;text-decoration:none;border-width:0px;border-radius:4px;transition:background-color .25s cubic-bezier(.4,0,.2,1),box-shadow .25s cubic-bezier(.4,0,.2,1),border-color .25s cubic-bezier(.4,0,.2,1);padding:6px;font-size:1rem;min-width:10px;line-height:1}button.dsv-button.small,button.dsv-button.small>i{font-size:.8rem!important}button.dsv-button.medium,button.dsv-button.medium>i{font-size:1rem!important}button.dsv-button.large,button.dsv-button.large>i{font-size:1.5rem!important}button.dsv-button.fullwidth{width:100%}button.dsv-button.text,button.dsv-button.outlined{background-color:transparent;box-shadow:none}button.dsv-button.text.primary,button.dsv-button.outlined.primary{color:var(--primary)}button.dsv-button.text.success,button.dsv-button.outlined.success{color:var(--success)}button.dsv-button.text.info,button.dsv-button.outlined.info{color:var(--info)}button.dsv-button.text.warning,button.dsv-button.outlined.warning{color:var(--warning)}button.dsv-button.text.error,button.dsv-button.outlined.error{color:var(--error)}button.dsv-button.text.outlined.primary,button.dsv-button.outlined.outlined.primary{border:1px solid var(--primary)}button.dsv-button.text.outlined.success,button.dsv-button.outlined.outlined.success{border:1px solid var(--success)}button.dsv-button.text.outlined.info,button.dsv-button.outlined.outlined.info{border:1px solid var(--info)}button.dsv-button.text.outlined.warning,button.dsv-button.outlined.outlined.warning{border:1px solid var(--warning)}button.dsv-button.text.outlined.error,button.dsv-button.outlined.outlined.error{border:1px solid var(--error)}button.dsv-button.contained.inherit{background-color:inherit;color:var(--text)!important}button.dsv-button.contained.primary{background-color:var(--primary)}button.dsv-button.contained.secondary{background-color:var(--secondary)}button.dsv-button.contained.success{background-color:var(--success)}button.dsv-button.contained.info{background-color:var(--info)}button.dsv-button.contained.warning{background-color:var(--warning)}button.dsv-button.contained.error{background-color:var(--error)}button.dsv-button:not(:disabled):hover{transform:scale(1);opacity:1.2}button.dsv-button:not(:disabled):hover:not(.text){box-shadow:#0003 0 2px 4px -1px,#00000024 0 4px 5px,#0000001f 0 1px 10px}button.dsv-button:not(:disabled):active{transform:scale(1);opacity:.8}button.dsv-button:disabled{background:#5b5b5b!important}::ng-deep .dark button.dsv-button.contained.inherit{color:var(--white)!important;filter:hue-rotate(5deg)}\n"] }]
|
|
28
|
+
}] });
|
|
47
29
|
|
|
48
30
|
/**
|
|
49
31
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-vagabond-lab-ng-dsv-ds-button.mjs","sources":["../../../projects/ng-dsv/ds/button/component/button.component.ts","../../../projects/ng-dsv/ds/button/component/button.component.html","../../../projects/ng-dsv/ds/button/ng-vagabond-lab-ng-dsv-ds-button.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component,
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-ds-button.mjs","sources":["../../../projects/ng-dsv/ds/button/component/button.component.ts","../../../projects/ng-dsv/ds/button/component/button.component.html","../../../projects/ng-dsv/ds/button/ng-vagabond-lab-ng-dsv-ds-button.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input, output } from '@angular/core';\nimport { ColorType } from '@ng-vagabond-lab/ng-dsv/type';\n\nexport type ButtonWidthType = 'small' | 'medium' | 'large';\nexport type ButtonVariantType = 'text' | 'outlined' | 'contained';\n\n@Component({\n selector: 'dsv-button',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n})\nexport class DsvButtonComponent {\n libelle = input<string>('');\n color = input<ColorType>('primary');\n icon = input<string>('');\n iconEnd = input<string>('');\n width = input<ButtonWidthType>('medium');\n variant = input<ButtonVariantType>('contained');\n fullwidth = input<boolean>(false);\n show = input<boolean>(true);\n disabled = input<boolean>(false);\n\n callback = output<void>();\n\n doClick(event: Event) {\n event.stopPropagation();\n event.preventDefault();\n !this.disabled() && this.callback.emit();\n }\n}\n","@if (show()) {\n<button\n class=\"dsv-button\"\n (click)=\"doClick($event)\"\n [ngClass]=\"\n (icon() ? 'icon' : '') +\n ' ' +\n color() +\n ' ' +\n width() +\n ' ' +\n variant() +\n ' ' +\n (fullwidth() ? 'fullwidth' : '')\n \"\n [disabled]=\"disabled()\"\n>\n @if(icon()) {\n <i [class]=\"icon()\"></i>\n } @if(libelle()) {\n <span>\n {{ libelle() }}\n </span>\n }\n <ng-content></ng-content>\n @if (iconEnd()) {\n <i [class]=\"iconEnd()\"></i>\n }\n</button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAca,kBAAkB,CAAA;AAC7B,IAAA,OAAO,GA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