inugami-ng 0.0.12 → 0.0.14
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/inugami-ng-components-inu-button.mjs +26 -4
- package/fesm2022/inugami-ng-components-inu-button.mjs.map +1 -1
- package/fesm2022/inugami-ng-components-inu-copy.mjs +1 -1
- package/fesm2022/inugami-ng-components-inu-copy.mjs.map +1 -1
- package/fesm2022/inugami-ng-components-inu-input-text.mjs +93 -0
- package/fesm2022/inugami-ng-components-inu-input-text.mjs.map +1 -0
- package/fesm2022/inugami-ng-components-inu-svg-asset.mjs +163 -0
- package/fesm2022/inugami-ng-components-inu-svg-asset.mjs.map +1 -0
- package/fesm2022/inugami-ng-components-inu-svg-isometric.mjs +790 -0
- package/fesm2022/inugami-ng-components-inu-svg-isometric.mjs.map +1 -0
- package/fesm2022/inugami-ng-components-inu-svg-switzerland.mjs +14 -3
- package/fesm2022/inugami-ng-components-inu-svg-switzerland.mjs.map +1 -1
- package/fesm2022/inugami-ng-pipes.mjs +38 -0
- package/fesm2022/inugami-ng-pipes.mjs.map +1 -0
- package/fesm2022/inugami-ng-services.mjs +426 -1
- package/fesm2022/inugami-ng-services.mjs.map +1 -1
- package/package.json +17 -1
- package/styles/inu-default-style.css +1 -0
- package/types/inugami-ng-components-inu-button.d.ts +11 -2
- package/types/inugami-ng-components-inu-input-text.d.ts +31 -0
- package/types/inugami-ng-components-inu-svg-asset.d.ts +33 -0
- package/types/inugami-ng-components-inu-svg-isometric.d.ts +105 -0
- package/types/inugami-ng-components-inu-svg-switzerland.d.ts +1 -0
- package/types/inugami-ng-models.d.ts +115 -1
- package/types/inugami-ng-pipes.d.ts +12 -0
- package/types/inugami-ng-services.d.ts +7 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, Component } from '@angular/core';
|
|
2
|
+
import { input, computed, signal, effect, Component } from '@angular/core';
|
|
3
3
|
import { InuIcon } from 'inugami-icons';
|
|
4
4
|
|
|
5
5
|
class InuButton {
|
|
@@ -8,9 +8,16 @@ class InuButton {
|
|
|
8
8
|
//==================================================================================================================
|
|
9
9
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
10
10
|
icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
11
|
+
iconSize = input(1.2, ...(ngDevMode ? [{ debugName: "iconSize" }] : []));
|
|
11
12
|
type = input('', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
12
13
|
link = input(false, ...(ngDevMode ? [{ debugName: "link" }] : []));
|
|
13
14
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
15
|
+
processing = input(false, ...(ngDevMode ? [{ debugName: "processing" }] : []));
|
|
16
|
+
processingIcon = input(null, ...(ngDevMode ? [{ debugName: "processingIcon" }] : []));
|
|
17
|
+
_processIcon = computed(() => {
|
|
18
|
+
const result = this.processingIcon();
|
|
19
|
+
return result ? result : this.icon();
|
|
20
|
+
}, ...(ngDevMode ? [{ debugName: "_processIcon" }] : []));
|
|
14
21
|
_styleClass = computed(() => {
|
|
15
22
|
return [
|
|
16
23
|
'inu-button',
|
|
@@ -19,13 +26,28 @@ class InuButton {
|
|
|
19
26
|
this.disabled() ? 'disabled' : ''
|
|
20
27
|
].join(' ');
|
|
21
28
|
}, ...(ngDevMode ? [{ debugName: "_styleClass" }] : []));
|
|
29
|
+
iconStyleClass = signal('inu-button-icon', ...(ngDevMode ? [{ debugName: "iconStyleClass" }] : []));
|
|
30
|
+
constructor() {
|
|
31
|
+
effect(() => {
|
|
32
|
+
this.iconStyleClass.set(this.computeIconStyleClass());
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
ngAfterViewInit() {
|
|
36
|
+
this.iconStyleClass.set(this.computeIconStyleClass());
|
|
37
|
+
}
|
|
38
|
+
computeIconStyleClass() {
|
|
39
|
+
return [
|
|
40
|
+
'inu-button-icon',
|
|
41
|
+
this.processing() ? 'rotate' : ''
|
|
42
|
+
].join(' ');
|
|
43
|
+
}
|
|
22
44
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InuButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: InuButton, isStandalone: true, selector: "inu-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if(link()){\n <span [class]=\"_styleClass()\">\n\n @if(icon()){\n <span class=\"
|
|
45
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: InuButton, isStandalone: true, selector: "inu-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, processing: { classPropertyName: "processing", publicName: "processing", isSignal: true, isRequired: false, transformFunction: null }, processingIcon: { classPropertyName: "processingIcon", publicName: "processingIcon", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (link()) {\n <span [class]=\"_styleClass()\">\n\n @if (icon()) {\n <span [class]=\"iconStyleClass()\" [style.width]=\"`${iconSize()}rem`\" [style.height]=\"`${iconSize()}rem`\">\n <inu-icon [icon]=\"processing()?_processIcon() : icon()\" [size]=\"1\"></inu-icon>\n </span>\n }\n\n <span class=\"inu-button-label\">\n @if (label()) {\n {{ label() }}\n }\n </span>\n </span>\n} @else {\n <button [class]=\"_styleClass()\" [disabled]=\"disabled()\">\n\n @if (icon()) {\n <span [class]=\"iconStyleClass()\" [style.width]=\"`${iconSize()}rem`\" [style.height]=\"`${iconSize()}rem`\">\n <inu-icon [icon]=\"processing()?_processIcon() : icon()\" [size]=\"iconSize()\"></inu-icon>\n </span>\n }\n\n <span class=\"inu-button-label\">\n @if (label()) {\n {{ label() }}\n }\n </span>\n </button>\n}\n", styles: [".inu-button{display:flex;gap:.5rem;justify-content:space-around;align-items:center;padding:.25rem .5rem;background-color:var(--neutral-light-extra);border:1px solid var(--neutral);-webkit-box-shadow:0px 0px .25rem 0px rgba(0,0,0,0);box-shadow:0 0 .25rem #0000}.inu-button inu-icon{display:flex;align-items:center}.inu-button inu-icon ::ng-deep .inu-icon{display:flex;align-items:center}.inu-button inu-icon ::ng-deep .inu-icon .inu-icon-content{display:flex;align-items:center}.inu-button inu-icon ::ng-deep .inu-icon .inu-icon-content svg{display:flex;align-items:center}.inu-button .inu-button-icon{width:1.25rem;height:1.25rem}.inu-button .inu-button-label{flex:1}.inu-button:hover{border-color:var(--neutral);-webkit-box-shadow:0px 0px .25rem 0px var(--neutral);box-shadow:0 0 .25rem 0 var(--neutral)}.inu-button.secondary{background-color:var(--secondary-light-extra);border-color:var(--secondary-light);color:var(--text-color)}.inu-button.secondary:hover{border-color:var(--secondary);-webkit-box-shadow:0px 0px .25rem 0px var(--secondary);box-shadow:0 0 .25rem 0 var(--secondary)}.inu-button.primary,.inu-button.success{background-color:var(--success-light-extra);border-color:var(--success-light);color:var(--text-color)}.inu-button.primary:hover,.inu-button.success:hover{border-color:var(--success);-webkit-box-shadow:0px 0px .25rem 0px var(--success);box-shadow:0 0 .25rem 0 var(--success)}.inu-button.warn{background-color:var(--warning-light-extra);border-color:var(--warning-light);color:var(--text-color)}.inu-button.warn:hover{border-color:var(--warning);-webkit-box-shadow:0px 0px .25rem 0px var(--warning);box-shadow:0 0 .25rem 0 var(--warning)}.inu-button.danger,.inu-button.error{background-color:var(--danger-light-extra);border-color:var(--danger-light);color:var(--text-color)}.inu-button.danger:hover,.inu-button.error:hover{border-color:var(--danger);-webkit-box-shadow:0px 0px .25rem 0px var(--danger);box-shadow:0 0 .25rem 0 var(--danger)}.inu-button.disabled{background-color:var(--neutral-light-extra);border:1px solid var(--neutral);-webkit-box-shadow:0px 0px .25rem 0px rgba(0,0,0,0);box-shadow:0 0 .25rem #0000;color:var(--neutral);fill:var(--neutral)}.inu-button.disabled:hover{border:1px solid var(--neutral);-webkit-box-shadow:0px 0px .25rem 0px rgba(0,0,0,0);box-shadow:0 0 .25rem #0000}.inu-button.link{border-top:none;border-left:none;border-right:none;background-color:transparent;box-shadow:0 0 .25rem 0 transparent!important}.inu-button.link:hover{background:linear-gradient(to bottom,transparent 95%,var(--neutral) 100%)}\n"], dependencies: [{ kind: "component", type: InuIcon, selector: "inu-icon", inputs: ["icon", "defaultIcon", "styleclass", "size"] }] });
|
|
24
46
|
}
|
|
25
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InuButton, decorators: [{
|
|
26
48
|
type: Component,
|
|
27
|
-
args: [{ selector: 'inu-button', standalone: true, imports: [InuIcon], template: "@if(link()){\n <span [class]=\"_styleClass()\">\n\n @if(icon()){\n <span class=\"
|
|
28
|
-
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
49
|
+
args: [{ selector: 'inu-button', standalone: true, imports: [InuIcon], template: "@if (link()) {\n <span [class]=\"_styleClass()\">\n\n @if (icon()) {\n <span [class]=\"iconStyleClass()\" [style.width]=\"`${iconSize()}rem`\" [style.height]=\"`${iconSize()}rem`\">\n <inu-icon [icon]=\"processing()?_processIcon() : icon()\" [size]=\"1\"></inu-icon>\n </span>\n }\n\n <span class=\"inu-button-label\">\n @if (label()) {\n {{ label() }}\n }\n </span>\n </span>\n} @else {\n <button [class]=\"_styleClass()\" [disabled]=\"disabled()\">\n\n @if (icon()) {\n <span [class]=\"iconStyleClass()\" [style.width]=\"`${iconSize()}rem`\" [style.height]=\"`${iconSize()}rem`\">\n <inu-icon [icon]=\"processing()?_processIcon() : icon()\" [size]=\"iconSize()\"></inu-icon>\n </span>\n }\n\n <span class=\"inu-button-label\">\n @if (label()) {\n {{ label() }}\n }\n </span>\n </button>\n}\n", styles: [".inu-button{display:flex;gap:.5rem;justify-content:space-around;align-items:center;padding:.25rem .5rem;background-color:var(--neutral-light-extra);border:1px solid var(--neutral);-webkit-box-shadow:0px 0px .25rem 0px rgba(0,0,0,0);box-shadow:0 0 .25rem #0000}.inu-button inu-icon{display:flex;align-items:center}.inu-button inu-icon ::ng-deep .inu-icon{display:flex;align-items:center}.inu-button inu-icon ::ng-deep .inu-icon .inu-icon-content{display:flex;align-items:center}.inu-button inu-icon ::ng-deep .inu-icon .inu-icon-content svg{display:flex;align-items:center}.inu-button .inu-button-icon{width:1.25rem;height:1.25rem}.inu-button .inu-button-label{flex:1}.inu-button:hover{border-color:var(--neutral);-webkit-box-shadow:0px 0px .25rem 0px var(--neutral);box-shadow:0 0 .25rem 0 var(--neutral)}.inu-button.secondary{background-color:var(--secondary-light-extra);border-color:var(--secondary-light);color:var(--text-color)}.inu-button.secondary:hover{border-color:var(--secondary);-webkit-box-shadow:0px 0px .25rem 0px var(--secondary);box-shadow:0 0 .25rem 0 var(--secondary)}.inu-button.primary,.inu-button.success{background-color:var(--success-light-extra);border-color:var(--success-light);color:var(--text-color)}.inu-button.primary:hover,.inu-button.success:hover{border-color:var(--success);-webkit-box-shadow:0px 0px .25rem 0px var(--success);box-shadow:0 0 .25rem 0 var(--success)}.inu-button.warn{background-color:var(--warning-light-extra);border-color:var(--warning-light);color:var(--text-color)}.inu-button.warn:hover{border-color:var(--warning);-webkit-box-shadow:0px 0px .25rem 0px var(--warning);box-shadow:0 0 .25rem 0 var(--warning)}.inu-button.danger,.inu-button.error{background-color:var(--danger-light-extra);border-color:var(--danger-light);color:var(--text-color)}.inu-button.danger:hover,.inu-button.error:hover{border-color:var(--danger);-webkit-box-shadow:0px 0px .25rem 0px var(--danger);box-shadow:0 0 .25rem 0 var(--danger)}.inu-button.disabled{background-color:var(--neutral-light-extra);border:1px solid var(--neutral);-webkit-box-shadow:0px 0px .25rem 0px rgba(0,0,0,0);box-shadow:0 0 .25rem #0000;color:var(--neutral);fill:var(--neutral)}.inu-button.disabled:hover{border:1px solid var(--neutral);-webkit-box-shadow:0px 0px .25rem 0px rgba(0,0,0,0);box-shadow:0 0 .25rem #0000}.inu-button.link{border-top:none;border-left:none;border-right:none;background-color:transparent;box-shadow:0 0 .25rem 0 transparent!important}.inu-button.link:hover{background:linear-gradient(to bottom,transparent 95%,var(--neutral) 100%)}\n"] }]
|
|
50
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], processing: [{ type: i0.Input, args: [{ isSignal: true, alias: "processing", required: false }] }], processingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "processingIcon", required: false }] }] } });
|
|
29
51
|
|
|
30
52
|
/**
|
|
31
53
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inugami-ng-components-inu-button.mjs","sources":["../../../projects/inugami-ng/components/inu-button/inu-button.component.ts","../../../projects/inugami-ng/components/inu-button/inu-button.component.html","../../../projects/inugami-ng/components/inu-button/inugami-ng-components-inu-button.ts"],"sourcesContent":["import {Component, computed, input} from '@angular/core';\nimport {InuIcon} from 'inugami-icons';\n\n@Component({\n selector: 'inu-button',\n standalone: true,\n imports: [InuIcon],\n templateUrl: './inu-button.component.html',\n styleUrl: './inu-button.component.scss',\n})\nexport class InuButton {\n\n //==================================================================================================================\n // ATTRIBUTES\n //==================================================================================================================\n label = input<string | undefined | null>('');\n icon = input<string | null>(null);\n type = input<string>('');\n link = input<boolean>(false);\n disabled = input<boolean>(false);\n\n _styleClass = computed<string>(() => {\n return [\n 'inu-button',\n this.type() ? this.type() : '',\n this.link() ? 'link' : '',\n this.disabled()? 'disabled' : ''\n ].join(' ');\n })\n\n}\n","@if(link()){\n <span [class]=\"_styleClass()\">\n\n @if(icon()){\n <span class=\"
|
|
1
|
+
{"version":3,"file":"inugami-ng-components-inu-button.mjs","sources":["../../../projects/inugami-ng/components/inu-button/inu-button.component.ts","../../../projects/inugami-ng/components/inu-button/inu-button.component.html","../../../projects/inugami-ng/components/inu-button/inugami-ng-components-inu-button.ts"],"sourcesContent":["import {AfterViewInit, Component, computed, effect, input, signal} from '@angular/core';\nimport {InuIcon} from 'inugami-icons';\nimport {NgClass} from '@angular/common';\n\n@Component({\n selector: 'inu-button',\n standalone: true,\n imports: [InuIcon],\n templateUrl: './inu-button.component.html',\n styleUrl: './inu-button.component.scss',\n})\nexport class InuButton implements AfterViewInit{\n\n //==================================================================================================================\n // ATTRIBUTES\n //==================================================================================================================\n label = input<string | undefined | null>('');\n icon = input<string | null>(null);\n iconSize = input<number>(1.2);\n type = input<string>('');\n link = input<boolean>(false);\n disabled = input<boolean>(false);\n processing = input<boolean>(false);\n processingIcon = input<string | null>(null);\n\n _processIcon = computed<string|null>(()=>{\n const result = this.processingIcon();\n return result?result: this.icon();\n } )\n _styleClass = computed<string>(() => {\n return [\n 'inu-button',\n this.type() ? this.type() : '',\n this.link() ? 'link' : '',\n this.disabled()? 'disabled' : ''\n ].join(' ');\n })\n\n iconStyleClass = signal<string>('inu-button-icon');\n\n constructor() {\n effect(() => {\n this.iconStyleClass.set(this.computeIconStyleClass());\n });\n }\n ngAfterViewInit(): void {\n this.iconStyleClass.set(this.computeIconStyleClass());\n }\n\n computeIconStyleClass(){\n return [\n 'inu-button-icon',\n this.processing() ? 'rotate' : ''\n ].join(' ');\n }\n\n\n\n}\n","@if (link()) {\n <span [class]=\"_styleClass()\">\n\n @if (icon()) {\n <span [class]=\"iconStyleClass()\" [style.width]=\"`${iconSize()}rem`\" [style.height]=\"`${iconSize()}rem`\">\n <inu-icon [icon]=\"processing()?_processIcon() : icon()\" [size]=\"1\"></inu-icon>\n </span>\n }\n\n <span class=\"inu-button-label\">\n @if (label()) {\n {{ label() }}\n }\n </span>\n </span>\n} @else {\n <button [class]=\"_styleClass()\" [disabled]=\"disabled()\">\n\n @if (icon()) {\n <span [class]=\"iconStyleClass()\" [style.width]=\"`${iconSize()}rem`\" [style.height]=\"`${iconSize()}rem`\">\n <inu-icon [icon]=\"processing()?_processIcon() : icon()\" [size]=\"iconSize()\"></inu-icon>\n </span>\n }\n\n <span class=\"inu-button-label\">\n @if (label()) {\n {{ label() }}\n }\n </span>\n </button>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAWa,SAAS,CAAA;;;;AAKpB,IAAA,KAAK,GAAG,KAAK,CAA4B,EAAE,iDAAC;AAC5C,IAAA,IAAI,GAAG,KAAK,CAAgB,IAAI,gDAAC;AACjC,IAAA,QAAQ,GAAG,K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gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECXtB,w4BA+BA,EAAA,MAAA,EAAA,CAAA,ugFAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDxBY,OAAO,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,aAAA,EAAA,YAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIN,SAAS,EAAA,UAAA,EAAA,CAAA;kBAPrB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,UAAA,EACV,IAAI,EAAA,OAAA,EACP,CAAC,OAAO,CAAC,EAAA,QAAA,EAAA,w4BAAA,EAAA,MAAA,EAAA,CAAA,ugFAAA,CAAA,EAAA;;;AEPpB;;AAEG;;;;"}
|
|
@@ -64,7 +64,7 @@ class InuCopy {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InuCopy, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: InuCopy, isStandalone: true, selector: "inu-copy", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, notificationLabel: { classPropertyName: "notificationLabel", publicName: "notificationLabel", isSignal: true, isRequired: false, transformFunction: null }, notificationMessage: { classPropertyName: "notificationMessage", publicName: "notificationMessage", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconNotification: { classPropertyName: "iconNotification", publicName: "iconNotification", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, styleclass: { classPropertyName: "styleclass", publicName: "styleclass", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"_styleClass()\">\n <inu-button [label]=\"label()\"\n [icon]=\"icon()\"\n [type]=\"type()\"\n [link]=\"link()\"\n [disabled]=\"!content()\"\n (click)=\"copyContent()\"\n ></inu-button>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: InuButton, selector: "inu-button", inputs: ["label", "icon", "type", "link", "disabled"] }] });
|
|
67
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.8", type: InuCopy, isStandalone: true, selector: "inu-copy", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, notificationLabel: { classPropertyName: "notificationLabel", publicName: "notificationLabel", isSignal: true, isRequired: false, transformFunction: null }, notificationMessage: { classPropertyName: "notificationMessage", publicName: "notificationMessage", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconNotification: { classPropertyName: "iconNotification", publicName: "iconNotification", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, styleclass: { classPropertyName: "styleclass", publicName: "styleclass", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"_styleClass()\">\n <inu-button [label]=\"label()\"\n [icon]=\"icon()\"\n [type]=\"type()\"\n [link]=\"link()\"\n [disabled]=\"!content()\"\n (click)=\"copyContent()\"\n ></inu-button>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: InuButton, selector: "inu-button", inputs: ["label", "icon", "iconSize", "type", "link", "disabled", "processing", "processingIcon"] }] });
|
|
68
68
|
}
|
|
69
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InuCopy, decorators: [{
|
|
70
70
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inugami-ng-components-inu-copy.mjs","sources":["../../../projects/inugami-ng/components/inu-copy/inu-copy.service.ts","../../../projects/inugami-ng/components/inu-copy/inu-copy.component.ts","../../../projects/inugami-ng/components/inu-copy/inu-copy.component.html","../../../projects/inugami-ng/components/inu-copy/inugami-ng-components-inu-copy.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {from, Observable} from 'rxjs';\n\n\n@Injectable({providedIn: 'root'})\nexport class InuCopyServices {\n\n\n // =================================================================================================================\n // API\n // =================================================================================================================\n copy(content:string):Observable<any> {\n const result$ = from(navigator.clipboard.writeText(content));\n result$.subscribe();\n return result$;\n }\n}\n","import {Component, computed, inject, input} from '@angular/core';\nimport {InuButton} from 'inugami-ng/components/inu-button';\nimport {InuCopyServices} from './inu-copy.service';\nimport {InuToastServices} from 'inugami-ng/components/inu-toast';\n\n@Component({\n selector: 'inu-copy',\n standalone: true,\n imports: [InuButton],\n templateUrl: './inu-copy.component.html',\n styleUrl: './inu-copy.component.scss',\n})\nexport class InuCopy {\n\n //==================================================================================================================\n // ATTRIBUTES\n //==================================================================================================================\n label = input<string | undefined | null>('');\n notificationLabel = input<string>('Value copied to clipboard');\n notificationMessage = input<string>('');\n icon = input<string>('copy');\n iconNotification = input<string>('approval');\n type = input<string>('success');\n link = input<boolean>(false);\n styleclass = input<string>('');\n content = input<string | undefined | null>(undefined);\n\n _styleClass = computed<string>(() => {\n return [\n 'inu-copy',\n this.styleclass() ? this.styleclass() : ''\n ].join(' ');\n })\n\n\n copyService = inject(InuCopyServices);\n toastServices = inject(InuToastServices);\n\n\n //==================================================================================================================\n // ACTIONS\n //==================================================================================================================\n protected copyContent() {\n const content = this.content();\n if(!content){\n return;\n }\n this.copyService.copy(content)\n .subscribe({\n next: ()=> this.notify()\n });\n }\n\n private notify() {\n this.toastServices.addMessage({\n title:this.notificationLabel(),\n message:this.notificationMessage(),\n icon:this.iconNotification(),\n level:\"success\"\n });\n }\n}\n","<div [class]=\"_styleClass()\">\n <inu-button [label]=\"label()\"\n [icon]=\"icon()\"\n [type]=\"type()\"\n [link]=\"link()\"\n [disabled]=\"!content()\"\n (click)=\"copyContent()\"\n ></inu-button>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAKa,eAAe,CAAA;;;;AAM1B,IAAA,IAAI,CAAC,OAAc,EAAA;AACjB,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,EAAE;AACnB,QAAA,OAAO,OAAO;IAChB;uGAVW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADH,MAAM,EAAA,CAAA;;2FAClB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;MCQnB,OAAO,CAAA;;;;AAKlB,IAAA,KAAK,GAAG,KAAK,CAA4B,EAAE,iDAAC;AAC5C,IAAA,iBAAiB,GAAG,KAAK,CAAS,2BAA2B,6DAAC;AAC9D,IAAA,mBAAmB,GAAG,KAA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A,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZpB,qRASA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDDY,SAAS,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIR,OAAO,EAAA,UAAA,EAAA,CAAA;kBAPnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,UAAA,EACR,IAAI,EAAA,OAAA,EACP,CAAC,SAAS,CAAC,EAAA,QAAA,EAAA,qRAAA,EAAA;;;AERtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"inugami-ng-components-inu-copy.mjs","sources":["../../../projects/inugami-ng/components/inu-copy/inu-copy.service.ts","../../../projects/inugami-ng/components/inu-copy/inu-copy.component.ts","../../../projects/inugami-ng/components/inu-copy/inu-copy.component.html","../../../projects/inugami-ng/components/inu-copy/inugami-ng-components-inu-copy.ts"],"sourcesContent":["import {Injectable} from '@angular/core';\nimport {from, Observable} from 'rxjs';\n\n\n@Injectable({providedIn: 'root'})\nexport class InuCopyServices {\n\n\n // =================================================================================================================\n // API\n // =================================================================================================================\n copy(content:string):Observable<any> {\n const result$ = from(navigator.clipboard.writeText(content));\n result$.subscribe();\n return result$;\n }\n}\n","import {Component, computed, inject, input} from '@angular/core';\nimport {InuButton} from 'inugami-ng/components/inu-button';\nimport {InuCopyServices} from './inu-copy.service';\nimport {InuToastServices} from 'inugami-ng/components/inu-toast';\n\n@Component({\n selector: 'inu-copy',\n standalone: true,\n imports: [InuButton],\n templateUrl: './inu-copy.component.html',\n styleUrl: './inu-copy.component.scss',\n})\nexport class InuCopy {\n\n //==================================================================================================================\n // ATTRIBUTES\n //==================================================================================================================\n label = input<string | undefined | null>('');\n notificationLabel = input<string>('Value copied to clipboard');\n notificationMessage = input<string>('');\n icon = input<string>('copy');\n iconNotification = input<string>('approval');\n type = input<string>('success');\n link = input<boolean>(false);\n styleclass = input<string>('');\n content = input<string | undefined | null>(undefined);\n\n _styleClass = computed<string>(() => {\n return [\n 'inu-copy',\n this.styleclass() ? this.styleclass() : ''\n ].join(' ');\n })\n\n\n copyService = inject(InuCopyServices);\n toastServices = inject(InuToastServices);\n\n\n //==================================================================================================================\n // ACTIONS\n //==================================================================================================================\n protected copyContent() {\n const content = this.content();\n if(!content){\n return;\n }\n this.copyService.copy(content)\n .subscribe({\n next: ()=> this.notify()\n });\n }\n\n private notify() {\n this.toastServices.addMessage({\n title:this.notificationLabel(),\n message:this.notificationMessage(),\n icon:this.iconNotification(),\n level:\"success\"\n });\n }\n}\n","<div [class]=\"_styleClass()\">\n <inu-button [label]=\"label()\"\n [icon]=\"icon()\"\n [type]=\"type()\"\n [link]=\"link()\"\n [disabled]=\"!content()\"\n (click)=\"copyContent()\"\n ></inu-button>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAKa,eAAe,CAAA;;;;AAM1B,IAAA,IAAI,CAAC,OAAc,EAAA;AACjB,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC5D,OAAO,CAAC,SAAS,EAAE;AACnB,QAAA,OAAO,OAAO;IAChB;uGAVW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAA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|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, inject, model, computed, output, viewChild, signal, Component } from '@angular/core';
|
|
3
|
+
import { FormField } from '@angular/forms/signals';
|
|
4
|
+
import { UuidUtils } from 'inugami-ng/services';
|
|
5
|
+
import { Subject, debounceTime } from 'rxjs';
|
|
6
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
+
import { InuIcon } from 'inugami-icons';
|
|
8
|
+
|
|
9
|
+
class InuInputText {
|
|
10
|
+
//==================================================================================================================
|
|
11
|
+
// ATTRIBUTES
|
|
12
|
+
//==================================================================================================================
|
|
13
|
+
// input
|
|
14
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
15
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
16
|
+
icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
17
|
+
name = input('', ...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
18
|
+
type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
19
|
+
_required = input(false, { ...(ngDevMode ? { debugName: "_required" } : {}), alias: 'required' });
|
|
20
|
+
// FormValueControl
|
|
21
|
+
formField = inject(FormField, { optional: true });
|
|
22
|
+
value = model('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
23
|
+
valid = computed(() => {
|
|
24
|
+
const state = this.formField?.state();
|
|
25
|
+
if (!state)
|
|
26
|
+
return true;
|
|
27
|
+
const isInvalid = state.invalid();
|
|
28
|
+
const hasBeenTouched = state.touched();
|
|
29
|
+
return !(isInvalid && hasBeenTouched);
|
|
30
|
+
}, ...(ngDevMode ? [{ debugName: "valid" }] : []));
|
|
31
|
+
// internal
|
|
32
|
+
changed = output();
|
|
33
|
+
debouncer = new Subject();
|
|
34
|
+
id = computed(() => UuidUtils.buildUid(), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
35
|
+
input = viewChild('input', ...(ngDevMode ? [{ debugName: "input" }] : []));
|
|
36
|
+
focus = signal(false, ...(ngDevMode ? [{ debugName: "focus" }] : []));
|
|
37
|
+
styleClass = input('', ...(ngDevMode ? [{ debugName: "styleClass" }] : []));
|
|
38
|
+
_styleClass = computed(() => {
|
|
39
|
+
return [
|
|
40
|
+
'inu-input',
|
|
41
|
+
'inu-input-text',
|
|
42
|
+
this.disabled() ? 'disabled' : '',
|
|
43
|
+
!this.valid() ? 'invalid' : '',
|
|
44
|
+
this.focus() ? 'focus' : '',
|
|
45
|
+
this.styleClass()
|
|
46
|
+
].join(' ');
|
|
47
|
+
}, ...(ngDevMode ? [{ debugName: "_styleClass" }] : []));
|
|
48
|
+
//==================================================================================================================
|
|
49
|
+
// INIT
|
|
50
|
+
//==================================================================================================================
|
|
51
|
+
constructor() {
|
|
52
|
+
this.debouncer.pipe(debounceTime(50), takeUntilDestroyed()).subscribe(val => {
|
|
53
|
+
this.value.set(val);
|
|
54
|
+
this.changed.emit(val);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
onChanged(event) {
|
|
58
|
+
const input = this.input()?.nativeElement;
|
|
59
|
+
if (!input) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
let value = input.value;
|
|
63
|
+
if ('number' === this.type()) {
|
|
64
|
+
try {
|
|
65
|
+
value = Number(value);
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
this.debouncer.next(value);
|
|
71
|
+
}
|
|
72
|
+
onFocus() {
|
|
73
|
+
this.focus.set(true);
|
|
74
|
+
}
|
|
75
|
+
onFocusOut() {
|
|
76
|
+
this.focus.set(false);
|
|
77
|
+
}
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InuInputText, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.8", type: InuInputText, isStandalone: true, selector: "inu-input-text", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, _required: { classPropertyName: "_required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", changed: "changed" }, providers: [], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"_styleClass()\">\n <div class=\"inu-input-text-label\">\n @if(icon()){\n <inu-icon [icon]=\"icon()!\" [size]=\"1\"></inu-icon>\n }\n @if (label()) {\n <label [for]=\"id()\">{{ label()! }}</label>\n }\n @if (_required()) {\n <inu-icon icon=\"required\" [size]=\"0.5\"></inu-icon>\n }\n </div>\n\n <input [id]=\"id()\"\n [name]=\"name()!\"\n [type]=\"type()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n (focusin)=\"onFocus()\"\n (focusout)=\"onFocusOut()\"\n (blur)=\"formField?.state()?.markAsTouched()\"\n (keyup)=\"onChanged($event)\" #input>\n</div>\n", styles: [".inu-input-text{display:flex;flex-direction:column;width:100%}.inu-input-text label{font-weight:700;font-size:90%;width:auto;transition:color .25s}.inu-input-text inu-icon{width:1rem}.inu-input-text input{border:none;border-bottom:2px solid var(--neutral);transition:border-bottom .25s;outline:none}.inu-input-text input:focus{border-bottom:2px solid var(--secondary-light)}.inu-input-text input.disabled{border-bottom:2px solid var(--neutral-light)}.inu-input-text .inu-input-text-label{display:flex;flex-direction:row;gap:.5rem}.inu-input-text.focus .inu-input-text-label{color:var(--secondary-light);fill:var(--secondary-light)}.inu-input-text.invalid input{border-bottom:1px solid var(--danger)}.inu-input-text.invalid .inu-input-text-label{color:var(--danger);fill:var(--danger)}\n"], dependencies: [{ kind: "component", type: InuIcon, selector: "inu-icon", inputs: ["icon", "defaultIcon", "styleclass", "size"] }] });
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InuInputText, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{ selector: 'inu-input-text', standalone: true, providers: [], imports: [
|
|
84
|
+
InuIcon
|
|
85
|
+
], template: "<div [class]=\"_styleClass()\">\n <div class=\"inu-input-text-label\">\n @if(icon()){\n <inu-icon [icon]=\"icon()!\" [size]=\"1\"></inu-icon>\n }\n @if (label()) {\n <label [for]=\"id()\">{{ label()! }}</label>\n }\n @if (_required()) {\n <inu-icon icon=\"required\" [size]=\"0.5\"></inu-icon>\n }\n </div>\n\n <input [id]=\"id()\"\n [name]=\"name()!\"\n [type]=\"type()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n (focusin)=\"onFocus()\"\n (focusout)=\"onFocusOut()\"\n (blur)=\"formField?.state()?.markAsTouched()\"\n (keyup)=\"onChanged($event)\" #input>\n</div>\n", styles: [".inu-input-text{display:flex;flex-direction:column;width:100%}.inu-input-text label{font-weight:700;font-size:90%;width:auto;transition:color .25s}.inu-input-text inu-icon{width:1rem}.inu-input-text input{border:none;border-bottom:2px solid var(--neutral);transition:border-bottom .25s;outline:none}.inu-input-text input:focus{border-bottom:2px solid var(--secondary-light)}.inu-input-text input.disabled{border-bottom:2px solid var(--neutral-light)}.inu-input-text .inu-input-text-label{display:flex;flex-direction:row;gap:.5rem}.inu-input-text.focus .inu-input-text-label{color:var(--secondary-light);fill:var(--secondary-light)}.inu-input-text.invalid input{border-bottom:1px solid var(--danger)}.inu-input-text.invalid .inu-input-text-label{color:var(--danger);fill:var(--danger)}\n"] }]
|
|
86
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], _required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], changed: [{ type: i0.Output, args: ["changed"] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }] } });
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Generated bundle index. Do not edit.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
export { InuInputText };
|
|
93
|
+
//# sourceMappingURL=inugami-ng-components-inu-input-text.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inugami-ng-components-inu-input-text.mjs","sources":["../../../projects/inugami-ng/components/inu-input-text/inu-input-text.component.ts","../../../projects/inugami-ng/components/inu-input-text/inu-input-text.component.html","../../../projects/inugami-ng/components/inu-input-text/inugami-ng-components-inu-input-text.ts"],"sourcesContent":["import {\n Component,\n computed,\n ElementRef, inject,\n input,\n InputSignal,\n model,\n ModelSignal,\n output,\n signal,\n viewChild\n} from '@angular/core';\nimport {FormField, FormValueControl} from '@angular/forms/signals';\nimport {UuidUtils} from 'inugami-ng/services';\nimport {debounceTime, Subject} from 'rxjs';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {InuIcon} from 'inugami-icons';\n\n@Component({\n selector: 'inu-input-text',\n standalone: true,\n providers: [],\n imports: [\n InuIcon\n\n ],\n templateUrl: './inu-input-text.component.html',\n styleUrl: './inu-input-text.component.scss',\n})\nexport class InuInputText implements FormValueControl<string | number>,FormValueControl<string | number> {\n\n\n //==================================================================================================================\n // ATTRIBUTES\n //==================================================================================================================\n // input\n readonly disabled = input(false);\n readonly label = input('');\n readonly icon = input('');\n readonly name = input('');\n readonly type: InputSignal<string | 'text' | 'number' | 'email' | 'password'> = input('text');\n readonly _required = input(false, {alias: 'required'});\n\n\n // FormValueControl\n formField = inject(FormField, { optional: true });\n value: ModelSignal<string | number> = model<string | number>('');\n valid = computed(() => {\n const state = this.formField?.state()\n if (!state) return true;\n const isInvalid = state.invalid();\n const hasBeenTouched = state.touched();\n return !(isInvalid && hasBeenTouched);\n });\n // internal\n changed = output<string | number>();\n debouncer = new Subject<string | number>();\n\n id = computed<string>(() => UuidUtils.buildUid());\n input = viewChild<ElementRef<HTMLInputElement>>('input');\n focus=signal<boolean>(false);\n styleClass = input<string>('');\n _styleClass = computed<string>(() => {\n return [\n 'inu-input',\n 'inu-input-text',\n this.disabled() ? 'disabled' : '',\n !this.valid() ? 'invalid' : '',\n this.focus() ? 'focus' : '',\n this.styleClass()!\n ].join(' ');\n })\n\n //==================================================================================================================\n // INIT\n //==================================================================================================================\n constructor() {\n this.debouncer.pipe(\n debounceTime(50),\n takeUntilDestroyed()\n ).subscribe(val => {\n this.value.set(val);\n this.changed.emit(val);\n });\n }\n\n protected onChanged(event: KeyboardEvent) {\n const input = this.input()?.nativeElement;\n if (!input) {\n return;\n }\n let value: number | string = input.value;\n if ('number' === this.type()) {\n try {\n value = Number(value);\n } catch (e) {\n }\n }\n\n this.debouncer.next(value)\n }\n\n protected onFocus() {\n this.focus.set(true);\n }\n\n protected onFocusOut() {\n this.focus.set(false);\n }\n}\n","<div [class]=\"_styleClass()\">\n <div class=\"inu-input-text-label\">\n @if(icon()){\n <inu-icon [icon]=\"icon()!\" [size]=\"1\"></inu-icon>\n }\n @if (label()) {\n <label [for]=\"id()\">{{ label()! }}</label>\n }\n @if (_required()) {\n <inu-icon icon=\"required\" [size]=\"0.5\"></inu-icon>\n }\n </div>\n\n <input [id]=\"id()\"\n [name]=\"name()!\"\n [type]=\"type()\"\n [value]=\"value()\"\n [disabled]=\"disabled()\"\n (focusin)=\"onFocus()\"\n (focusout)=\"onFocusOut()\"\n (blur)=\"formField?.state()?.markAsTouched()\"\n (keyup)=\"onChanged($event)\" #input>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MA6Ba,YAAY,CAAA;;;;;AAOd,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,oDAAC;AACvB,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC;AACjB,IAAA,IAAI,GAAG,KAAK,CAAC,EAAE,gDAAC;AAChB,IAAA,IAAI,GAAG,KAAK,CAAC,EAAE,gDAAC;AAChB,IAAA,IAAI,GAAmE,KAAK,CAAC,MAAM,gDAAC;IACpF,SAAS,GAAG,KAAK,CAAC,KAAK,sDAAG,KAAK,EAAE,UAAU,EAAA,CAAE;;IAItD,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACjD,IAAA,KAAK,GAAiC,KAAK,CAAkB,EAAE,iDAAC;AAChE,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAK;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;AACrC,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,IAAI;AACvB,QAAA,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,EAAE;AACjC,QAAA,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,EAAE;AACtC,QAAA,OAAO,EAAE,SAAS,IAAI,cAAc,CAAC;AACvC,IAAA,CAAC,iDAAC;;IAEF,OAAO,GAAG,MAAM,EAAmB;AACnC,IAAA,SAAS,GAAG,IAAI,OAAO,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,MAAA,EAAA,CAAA,oxBAAA,CAAA,EAAA;yzBAkC+C,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3DzD;;AAEG;;;;"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, viewChild, computed, effect, HostListener, Component } from '@angular/core';
|
|
3
|
+
import { InuTemplateRegistryService } from 'inugami-ng/directives';
|
|
4
|
+
import { SVG_MATH, SVG_BUILDER, SvgAssetUtils, SVG_TRANSFORM } from 'inugami-ng/services';
|
|
5
|
+
|
|
6
|
+
class InuSvgAsset {
|
|
7
|
+
//====================================================================================================================
|
|
8
|
+
// ATTRIBUTES
|
|
9
|
+
//====================================================================================================================
|
|
10
|
+
assetSet = input('', ...(ngDevMode ? [{ debugName: "assetSet" }] : []));
|
|
11
|
+
asset = input(undefined, ...(ngDevMode ? [{ debugName: "asset" }] : []));
|
|
12
|
+
type = input('default', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
13
|
+
state = input('default', ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
14
|
+
styleclass = input('', ...(ngDevMode ? [{ debugName: "styleclass" }] : []));
|
|
15
|
+
//
|
|
16
|
+
component = viewChild('component', ...(ngDevMode ? [{ debugName: "component" }] : []));
|
|
17
|
+
container = viewChild('container', ...(ngDevMode ? [{ debugName: "container" }] : []));
|
|
18
|
+
_styleClass = computed(() => {
|
|
19
|
+
return [
|
|
20
|
+
'inu-svg',
|
|
21
|
+
'inu-svg-asset',
|
|
22
|
+
this.styleclass() ? this.styleclass() : ''
|
|
23
|
+
].join(' ');
|
|
24
|
+
}, ...(ngDevMode ? [{ debugName: "_styleClass" }] : []));
|
|
25
|
+
//--- SVG components
|
|
26
|
+
height = 64;
|
|
27
|
+
width = 64;
|
|
28
|
+
parent = null;
|
|
29
|
+
locator = null;
|
|
30
|
+
defs = null;
|
|
31
|
+
canvas = null;
|
|
32
|
+
graph = null;
|
|
33
|
+
//====================================================================================================================
|
|
34
|
+
// INIT
|
|
35
|
+
//====================================================================================================================
|
|
36
|
+
constructor() {
|
|
37
|
+
effect(() => {
|
|
38
|
+
this.asset();
|
|
39
|
+
this.type();
|
|
40
|
+
this.state();
|
|
41
|
+
if (this.graph) {
|
|
42
|
+
this.updateValues();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
ngOnChanges(changes) {
|
|
47
|
+
this.updateValues();
|
|
48
|
+
}
|
|
49
|
+
ngAfterViewInit() {
|
|
50
|
+
const component = this.component();
|
|
51
|
+
const container = this.container();
|
|
52
|
+
if (component && container) {
|
|
53
|
+
this.resolveParentSize(component, container);
|
|
54
|
+
this.initializeLayout(container);
|
|
55
|
+
this.resize();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
onResize() {
|
|
59
|
+
const component = this.component();
|
|
60
|
+
const container = this.container();
|
|
61
|
+
if (component && container) {
|
|
62
|
+
this.resolveParentSize(component, container);
|
|
63
|
+
this.resize();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//====================================================================================================================
|
|
67
|
+
// RENDERING
|
|
68
|
+
//====================================================================================================================
|
|
69
|
+
resolveParentSize(component, container) {
|
|
70
|
+
if (component?.nativeElement && component?.nativeElement.parentNode && component?.nativeElement.parentNode.parentNode) {
|
|
71
|
+
this.parent = component?.nativeElement.parentNode.parentNode;
|
|
72
|
+
}
|
|
73
|
+
if (this.parent) {
|
|
74
|
+
let parentSize = SVG_MATH.size(this.parent);
|
|
75
|
+
this.height = parentSize.height;
|
|
76
|
+
this.width = parentSize.width;
|
|
77
|
+
}
|
|
78
|
+
container?.nativeElement.setAttribute('style', `display: block; height:${this.height}px;width:${this.width}px`);
|
|
79
|
+
}
|
|
80
|
+
initializeLayout(container) {
|
|
81
|
+
this.defs = SVG_BUILDER.createDefs(container?.nativeElement);
|
|
82
|
+
this.locator = SVG_BUILDER.createGroup(container?.nativeElement, { styleClass: 'locator' });
|
|
83
|
+
this.canvas = SVG_BUILDER.createGroup(this.locator, { styleClass: 'canvas' });
|
|
84
|
+
const filter = SVG_BUILDER.createFilter(this.defs, 'shadow', { style: 'color-interpolation-filters: sRGB;' });
|
|
85
|
+
const gaussian = SVG_BUILDER.createNode('feGaussianBlur', filter);
|
|
86
|
+
if (gaussian) {
|
|
87
|
+
gaussian.setAttribute('stdDeviation', '1');
|
|
88
|
+
}
|
|
89
|
+
if (this.canvas) {
|
|
90
|
+
this.graph = SVG_BUILDER.createGroup(this.canvas, { styleClass: 'graph' });
|
|
91
|
+
}
|
|
92
|
+
this.updateValues();
|
|
93
|
+
}
|
|
94
|
+
//====================================================================================================================
|
|
95
|
+
// UPDATE VALUES
|
|
96
|
+
//====================================================================================================================
|
|
97
|
+
updateValues() {
|
|
98
|
+
const asset = this.asset();
|
|
99
|
+
if (!asset || !this.graph) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
this.graph.replaceChildren();
|
|
103
|
+
const type = this.type();
|
|
104
|
+
let state = this.state();
|
|
105
|
+
let currentType = asset.types.find(t => t.name == type);
|
|
106
|
+
if (!currentType) {
|
|
107
|
+
currentType = asset.types.find(t => t.name == 'default');
|
|
108
|
+
}
|
|
109
|
+
if (!currentType) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
let currentState = currentType.states.find(t => t.name == state);
|
|
113
|
+
if (!currentState) {
|
|
114
|
+
state = 'default';
|
|
115
|
+
}
|
|
116
|
+
const node = SVG_BUILDER.createGroup(this.graph);
|
|
117
|
+
SvgAssetUtils.createAsset({
|
|
118
|
+
parent: this.graph,
|
|
119
|
+
node: node,
|
|
120
|
+
asset: {
|
|
121
|
+
assetSet: this.assetSet(),
|
|
122
|
+
assetName: asset.name,
|
|
123
|
+
type: type,
|
|
124
|
+
state: state,
|
|
125
|
+
x: 0,
|
|
126
|
+
y: 0
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
setTimeout(() => this.resize(), 0);
|
|
130
|
+
}
|
|
131
|
+
//====================================================================================================================
|
|
132
|
+
// TOOLS
|
|
133
|
+
//====================================================================================================================
|
|
134
|
+
resize() {
|
|
135
|
+
if (this.locator && this.parent) {
|
|
136
|
+
SVG_TRANSFORM.center(this.locator, this.parent, true, true);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InuSvgAsset, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.8", type: InuSvgAsset, isStandalone: true, selector: "inu-svg-asset", inputs: { assetSet: { classPropertyName: "assetSet", publicName: "assetSet", isSignal: true, isRequired: false, transformFunction: null }, asset: { classPropertyName: "asset", publicName: "asset", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, styleclass: { classPropertyName: "styleclass", publicName: "styleclass", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()" } }, providers: [InuTemplateRegistryService], viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, isSignal: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
141
|
+
<div [class]="_styleClass()" #component>
|
|
142
|
+
<svg #container xmlns="http://www.w3.org/2000/svg"></svg>
|
|
143
|
+
</div>
|
|
144
|
+
`, isInline: true, styles: [""] });
|
|
145
|
+
}
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: InuSvgAsset, decorators: [{
|
|
147
|
+
type: Component,
|
|
148
|
+
args: [{ selector: 'inu-svg-asset', standalone: true, providers: [InuTemplateRegistryService], imports: [], template: `
|
|
149
|
+
<div [class]="_styleClass()" #component>
|
|
150
|
+
<svg #container xmlns="http://www.w3.org/2000/svg"></svg>
|
|
151
|
+
</div>
|
|
152
|
+
` }]
|
|
153
|
+
}], ctorParameters: () => [], propDecorators: { assetSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "assetSet", required: false }] }], asset: [{ type: i0.Input, args: [{ isSignal: true, alias: "asset", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], styleclass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleclass", required: false }] }], component: [{ type: i0.ViewChild, args: ['component', { isSignal: true }] }], container: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], onResize: [{
|
|
154
|
+
type: HostListener,
|
|
155
|
+
args: ['window:resize']
|
|
156
|
+
}] } });
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Generated bundle index. Do not edit.
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
export { InuSvgAsset };
|
|
163
|
+
//# sourceMappingURL=inugami-ng-components-inu-svg-asset.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inugami-ng-components-inu-svg-asset.mjs","sources":["../../../projects/inugami-ng/components/inu-svg-asset/inu-svg-asset.ts","../../../projects/inugami-ng/components/inu-svg-asset/inugami-ng-components-inu-svg-asset.ts"],"sourcesContent":["import {\n AfterViewInit,\n Component,\n computed,\n effect,\n ElementRef,\n HostListener,\n input,\n OnChanges, signal,\n SimpleChanges,\n viewChild\n} from '@angular/core';\nimport {InuTemplateRegistryService} from 'inugami-ng/directives';\nimport {SVG_ASSETS, SVG_BUILDER, SVG_MATH, SVG_TRANSFORM, SvgAssetUtils} from 'inugami-ng/services';\nimport {SvgAsset} from 'inugami-svg-assets';\nimport {SvgAssetDTOOptions} from 'inugami-ng/models';\n\n@Component({\n selector: 'inu-svg-asset',\n standalone: true,\n providers: [InuTemplateRegistryService],\n imports: [],\n template: `\n <div [class]=\"_styleClass()\" #component>\n <svg #container xmlns=\"http://www.w3.org/2000/svg\"></svg>\n </div>\n `,\n styleUrl: './inu-svg-asset.scss',\n})\nexport class InuSvgAsset implements AfterViewInit, OnChanges {\n\n //====================================================================================================================\n // ATTRIBUTES\n //====================================================================================================================\n assetSet = input<string>('');\n asset = input<SvgAsset | undefined>(undefined);\n type = input<string | undefined>('default');\n state = input<string | undefined>('default');\n styleclass = input<string>('');\n //\n private component = viewChild<ElementRef<HTMLElement>>('component');\n private container = viewChild<ElementRef<HTMLElement>>('container');\n _styleClass = computed<string>(() => {\n return [\n 'inu-svg',\n 'inu-svg-asset',\n this.styleclass() ? this.styleclass() : ''\n ].join(' ');\n })\n\n //--- SVG components\n height: number = 64;\n width: number = 64;\n parent: HTMLElement | null = null;\n locator: SVGElement | null = null;\n defs: SVGElement | null = null;\n canvas: SVGElement | null = null;\n graph: SVGElement | null = null;\n\n //====================================================================================================================\n // INIT\n //====================================================================================================================\n\n constructor() {\n effect(() => {\n this.asset();\n this.type();\n this.state();\n\n if (this.graph) {\n this.updateValues();\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this.updateValues();\n }\n\n ngAfterViewInit(): void {\n const component = this.component();\n const container = this.container();\n if (component && container) {\n this.resolveParentSize(component, container);\n this.initializeLayout(container);\n this.resize();\n }\n }\n\n @HostListener('window:resize')\n onResize() {\n const component = this.component();\n const container = this.container();\n if (component && container) {\n this.resolveParentSize(component, container);\n this.resize();\n }\n }\n\n\n //====================================================================================================================\n // RENDERING\n //====================================================================================================================\n private resolveParentSize(component: ElementRef<HTMLElement>, container: ElementRef<HTMLElement>) {\n if (component?.nativeElement && component?.nativeElement.parentNode && component?.nativeElement.parentNode.parentNode) {\n this.parent = component?.nativeElement.parentNode.parentNode as HTMLElement;\n }\n\n if (this.parent) {\n let parentSize = SVG_MATH.size(this.parent);\n this.height = parentSize.height;\n this.width = parentSize.width;\n }\n\n container?.nativeElement.setAttribute('style', `display: block; height:${this.height}px;width:${this.width}px`);\n }\n\n private initializeLayout(container: ElementRef<HTMLElement>) {\n this.defs = SVG_BUILDER.createDefs(container?.nativeElement);\n this.locator = SVG_BUILDER.createGroup(container?.nativeElement, {styleClass: 'locator'});\n this.canvas = SVG_BUILDER.createGroup(this.locator, {styleClass: 'canvas'});\n\n const filter = SVG_BUILDER.createFilter(this.defs, 'shadow', {style: 'color-interpolation-filters: sRGB;'});\n const gaussian = SVG_BUILDER.createNode('feGaussianBlur', filter);\n if (gaussian) {\n gaussian.setAttribute('stdDeviation', '1');\n }\n if (this.canvas) {\n this.graph = SVG_BUILDER.createGroup(this.canvas, {styleClass: 'graph'});\n }\n\n this.updateValues();\n }\n\n\n //====================================================================================================================\n // UPDATE VALUES\n //====================================================================================================================\n public updateValues() {\n const asset = this.asset();\n if (!asset || !this.graph) {\n return;\n }\n this.graph.replaceChildren();\n\n const type = this.type();\n let state = this.state();\n let currentType = asset.types.find(t => t.name == type);\n if (!currentType) {\n currentType = asset.types.find(t => t.name == 'default');\n }\n if (!currentType) {\n return;\n }\n let currentState = currentType.states.find(t => t.name == state);\n if (!currentState) {\n state = 'default';\n }\n\n const node = SVG_BUILDER.createGroup(this.graph);\n SvgAssetUtils.createAsset(<SvgAssetDTOOptions>{\n parent: this.graph,\n node: node,\n asset: {\n assetSet: this.assetSet(),\n assetName: asset.name,\n type: type,\n state: state,\n x: 0,\n y: 0\n }\n });\n\n setTimeout(() => this.resize(), 0);\n }\n\n\n //====================================================================================================================\n // TOOLS\n //====================================================================================================================\n public resize(): void {\n if (this.locator && this.parent) {\n SVG_TRANSFORM.center(this.locator, this.parent, true, true);\n }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