@ng-vagabond-lab/ng-dsv 0.0.34 → 0.0.36
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OutputEmitterRef } from '@angular/core';
|
|
1
2
|
import { Router } from '@angular/router';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class DsvItemComponent {
|
|
@@ -6,8 +7,10 @@ export declare class DsvItemComponent {
|
|
|
6
7
|
text: import("@angular/core").InputSignal<string>;
|
|
7
8
|
url: import("@angular/core").InputSignal<string | undefined>;
|
|
8
9
|
small: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
callback: OutputEmitterRef<void>;
|
|
9
11
|
constructor(router: Router);
|
|
12
|
+
isCallback(): boolean;
|
|
10
13
|
doClick(): void;
|
|
11
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DsvItemComponent, 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>;
|
|
15
|
+
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; }; }, { "callback": "callback"; }, never, ["*"], true, never>;
|
|
13
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, Component } from '@angular/core';
|
|
3
|
+
import { input, output, Component } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/router';
|
|
5
5
|
|
|
6
6
|
class DsvItemComponent {
|
|
@@ -9,14 +9,22 @@ class DsvItemComponent {
|
|
|
9
9
|
text = input('');
|
|
10
10
|
url = input();
|
|
11
11
|
small = input(false);
|
|
12
|
+
callback = output();
|
|
12
13
|
constructor(router) {
|
|
13
14
|
this.router = router;
|
|
14
15
|
}
|
|
16
|
+
isCallback() {
|
|
17
|
+
const listeners = this.callback['listeners'];
|
|
18
|
+
return listeners?.length > 0;
|
|
19
|
+
}
|
|
15
20
|
doClick() {
|
|
16
|
-
|
|
21
|
+
if (this.url()) {
|
|
22
|
+
this.router.navigate([this.url()]);
|
|
23
|
+
this.isCallback() && this.callback.emit();
|
|
24
|
+
}
|
|
17
25
|
}
|
|
18
26
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DsvItemComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: DsvItemComponent, isStandalone: true, selector: "dsv-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<a class=\"text\" (click)=\"doClick()\" [class.small]=\"small()\">\n @if (icon()) {\n <i class=\"ri-{{ icon() }}-line\"></i>\n }\n {{ text() }}\n</a>\n<ng-content></ng-content>\n", styles: [":host{display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}:host a{margin:5px 10px;padding:10px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host a:hover{background-color:#d9d9d9;cursor:pointer}:host i{margin-right:10px}:host .text{font-size:1.2rem;font-weight:700}:host .text.small{font-size:1rem}::ng-deep .dark dsv-item a:hover{background-color:#313131!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
27
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: DsvItemComponent, isStandalone: true, selector: "dsv-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { callback: "callback" }, ngImport: i0, template: "<a class=\"text\" (click)=\"doClick()\" [class.small]=\"small()\">\n @if (icon()) {\n <i class=\"ri-{{ icon() }}-line\"></i>\n }\n {{ text() }}\n</a>\n<ng-content></ng-content>\n", styles: [":host{display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}:host a{margin:5px 10px;padding:10px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host a:hover{background-color:#d9d9d9;cursor:pointer}:host i{margin-right:10px}:host .text{font-size:1.2rem;font-weight:700}:host .text.small{font-size:1rem}::ng-deep .dark dsv-item a:hover{background-color:#313131!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
20
28
|
}
|
|
21
29
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: DsvItemComponent, decorators: [{
|
|
22
30
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-vagabond-lab-ng-dsv-ds-item.mjs","sources":["../../../projects/ng-dsv/ds/item/component/item.component.ts","../../../projects/ng-dsv/ds/item/component/item.component.html","../../../projects/ng-dsv/ds/item/ng-vagabond-lab-ng-dsv-ds-item.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input } from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'dsv-item',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class DsvItemComponent {\n icon = input<string>('');\n text = input<string>('');\n url = input<string>();\n small = input<boolean>(false);\n\n constructor(private readonly router: Router) {}\n\n doClick() {\n this.url()
|
|
1
|
+
{"version":3,"file":"ng-vagabond-lab-ng-dsv-ds-item.mjs","sources":["../../../projects/ng-dsv/ds/item/component/item.component.ts","../../../projects/ng-dsv/ds/item/component/item.component.html","../../../projects/ng-dsv/ds/item/ng-vagabond-lab-ng-dsv-ds-item.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, input, output, OutputEmitterRef } from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'dsv-item',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './item.component.html',\n styleUrls: ['./item.component.scss'],\n})\nexport class DsvItemComponent {\n icon = input<string>('');\n text = input<string>('');\n url = input<string>();\n small = input<boolean>(false);\n\n callback = output<void>();\n\n constructor(private readonly router: Router) {}\n\n isCallback() {\n const listeners =\n this.callback['listeners' as keyof OutputEmitterRef<void>];\n return listeners?.length > 0;\n }\n\n doClick() {\n if (this.url()) {\n this.router.navigate([this.url()]);\n this.isCallback() && this.callback.emit();\n }\n }\n}\n","<a class=\"text\" (click)=\"doClick()\" [class.small]=\"small()\">\n @if (icon()) {\n <i class=\"ri-{{ icon() }}-line\"></i>\n }\n {{ text() }}\n</a>\n<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAWa,gBAAgB,CAAA;AAQE,IAAA,MAAA;AAP7B,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AACxB,IAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;IACxB,GAAG,GAAG,KAAK,EAAU;AACrB,IAAA,KAAK,GAAG,KAAK,CAAU,KAAK,CAAC;IAE7B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