my-km-components 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/my-km-components.mjs +276 -0
- package/fesm2022/my-km-components.mjs.map +1 -0
- package/package.json +30 -20
- package/types/my-km-components.d.ts +159 -0
- package/assets/sass/_corner-focus.scss +0 -50
- package/my-km-components-0.0.1.tgz +0 -0
- package/ng-package.json +0 -7
- package/services/km.service.ts +0 -14
- package/src/directives/km-block.directive.ts +0 -39
- package/src/directives/km-block.style.scss +0 -41
- package/src/lib/km-color-combo/km-color-combo.component.html +0 -28
- package/src/lib/km-color-combo/km-color-combo.component.scss +0 -0
- package/src/lib/km-color-combo/km-color-combo.component.ts +0 -52
- package/src/lib/km-generic-card/km-generic-card.html +0 -49
- package/src/lib/km-generic-card/km-generic-card.interface.ts +0 -16
- package/src/lib/km-generic-card/km-generic-card.scss +0 -15
- package/src/lib/km-generic-card/km-generic-card.ts +0 -43
- package/src/lib/km-input/km-input.component.html +0 -30
- package/src/lib/km-input/km-input.component.scss +0 -5
- package/src/lib/km-input/km-input.component.ts +0 -30
- package/src/lib/km-input-group/km-input-group.component.html +0 -24
- package/src/lib/km-input-group/km-input-group.component.scss +0 -0
- package/src/lib/km-input-group/km-input-group.component.ts +0 -44
- package/src/lib/km-modal/km-modal.html +0 -38
- package/src/lib/km-modal/km-modal.scss +0 -26
- package/src/lib/km-modal/km-modal.ts +0 -40
- package/src/lib/km-select/km-select.component.html +0 -40
- package/src/lib/km-select/km-select.component.scss +0 -0
- package/src/lib/km-select/km-select.component.ts +0 -49
- package/src/public-api.ts +0 -10
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import * as i3 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { model, input, computed, ChangeDetectionStrategy, Component, output, signal, Injectable, inject, ElementRef, Renderer2, effect, Directive } from '@angular/core';
|
|
5
|
+
import * as i1 from '@angular/forms';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import * as i2 from '@ng-select/ng-select';
|
|
8
|
+
import { NgSelectModule } from '@ng-select/ng-select';
|
|
9
|
+
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';
|
|
10
|
+
|
|
11
|
+
class KmSelectComponent {
|
|
12
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
13
|
+
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
14
|
+
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
15
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
16
|
+
readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), alias: 'readonly' });
|
|
17
|
+
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
18
|
+
items = input.required(...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
19
|
+
multiple = input(true, ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
20
|
+
bindLabel = input('label', ...(ngDevMode ? [{ debugName: "bindLabel" }] : /* istanbul ignore next */ []));
|
|
21
|
+
bindValue = input('value', ...(ngDevMode ? [{ debugName: "bindValue" }] : /* istanbul ignore next */ []));
|
|
22
|
+
placeholder = input('Select...', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
23
|
+
class = input('custom', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
24
|
+
limit = input(3, ...(ngDevMode ? [{ debugName: "limit" }] : /* istanbul ignore next */ []));
|
|
25
|
+
label = input('Label', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
26
|
+
searchable = input(true, ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
|
|
27
|
+
clearable = input(true, ...(ngDevMode ? [{ debugName: "clearable" }] : /* istanbul ignore next */ []));
|
|
28
|
+
displayArray = computed(() => {
|
|
29
|
+
const val = this.value();
|
|
30
|
+
if (!val)
|
|
31
|
+
return [];
|
|
32
|
+
return Array.isArray(val) ? val : [val];
|
|
33
|
+
}, ...(ngDevMode ? [{ debugName: "displayArray" }] : /* istanbul ignore next */ []));
|
|
34
|
+
change = (event) => {
|
|
35
|
+
this.touched.set(true);
|
|
36
|
+
this.value.set(event[this.bindValue()]);
|
|
37
|
+
};
|
|
38
|
+
clear = () => {
|
|
39
|
+
this.value.set(null);
|
|
40
|
+
};
|
|
41
|
+
remainingCount = computed(() => Math.max(0, this.displayArray().length - this.limit()), ...(ngDevMode ? [{ debugName: "remainingCount" }] : /* istanbul ignore next */ []));
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: KmSelectComponent, isStandalone: true, selector: "km-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, bindLabel: { classPropertyName: "bindLabel", publicName: "bindLabel", isSignal: true, isRequired: false, transformFunction: null }, bindValue: { classPropertyName: "bindValue", publicName: "bindValue", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange" }, ngImport: i0, template: "<label class=\"form-label fw-700\">{{ label() }}</label>\r\n<ng-select\r\n [ngModel]=\"value()\"\r\n [class]=\"class()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n [items]=\"items()\"\r\n [multiple]=\"multiple()\"\r\n [bindLabel]=\"bindLabel()\"\r\n appendTo=\"body\"\r\n [bindValue]=\"bindValue()\"\r\n [placeholder]=\"placeholder()\"\r\n [searchable]=\"searchable()\"\r\n [clearable]=\"clearable()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"change($event)\"\r\n (clear)=\"value.set(null)\"\r\n [readonly]=\"readOnly()\"\r\n [closeOnSelect]=\"!multiple()\"\r\n>\r\n @if (multiple()) {\r\n <ng-template ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\r\n @for (item of items | slice: 0 : 2; track item) {\r\n <div class=\"ng-value\">\r\n <span class=\"ng-value-label\">{{ $any(item)[bindLabel()].value }}</span>\r\n <span class=\"ng-value-icon right\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\r\n </div>\r\n }\r\n @if (items.length > 2) {\r\n <div class=\"ng-value\">\r\n <span class=\"ng-value-label\">{{ items.length - 2 }} more...</span>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n</ng-select>\r\n@if (invalid() && touched() && errors().length > 0) {\r\n @for (error of errors(); track error.kind) {\r\n <small class=\"invalid-feedback\">{{ error.message }}</small>\r\n }\r\n}\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i2.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "dropdownPosition", "appendTo", "outsideClickEvent", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "tabFocusOnClearButton", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "clearKeepsDisabledOptions", "deselectOnClick", "clearSearchOnAdd", "compareWith", "keyDownFn", "popover", "bindLabel", "bindValue", "appearance", "isOpen", "items"], outputs: ["bindLabelChange", "bindValueChange", "appearanceChange", "isOpenChange", "itemsChange", "blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["ngSelect"] }, { kind: "directive", type: i2.NgMultiLabelTemplateDirective, selector: "[ng-multi-label-tmp]" }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i3.SlicePipe, name: "slice" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmSelectComponent, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{ selector: 'km-select', imports: [FormsModule, NgSelectModule, CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"form-label fw-700\">{{ label() }}</label>\r\n<ng-select\r\n [ngModel]=\"value()\"\r\n [class]=\"class()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n [items]=\"items()\"\r\n [multiple]=\"multiple()\"\r\n [bindLabel]=\"bindLabel()\"\r\n appendTo=\"body\"\r\n [bindValue]=\"bindValue()\"\r\n [placeholder]=\"placeholder()\"\r\n [searchable]=\"searchable()\"\r\n [clearable]=\"clearable()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"change($event)\"\r\n (clear)=\"value.set(null)\"\r\n [readonly]=\"readOnly()\"\r\n [closeOnSelect]=\"!multiple()\"\r\n>\r\n @if (multiple()) {\r\n <ng-template ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\r\n @for (item of items | slice: 0 : 2; track item) {\r\n <div class=\"ng-value\">\r\n <span class=\"ng-value-label\">{{ $any(item)[bindLabel()].value }}</span>\r\n <span class=\"ng-value-icon right\" (click)=\"clear(item)\" aria-hidden=\"true\">\u00D7</span>\r\n </div>\r\n }\r\n @if (items.length > 2) {\r\n <div class=\"ng-value\">\r\n <span class=\"ng-value-label\">{{ items.length - 2 }} more...</span>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n</ng-select>\r\n@if (invalid() && touched() && errors().length > 0) {\r\n @for (error of errors(); track error.kind) {\r\n <small class=\"invalid-feedback\">{{ error.message }}</small>\r\n }\r\n}\r\n" }]
|
|
48
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], bindLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindLabel", required: false }] }], bindValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindValue", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }] } });
|
|
49
|
+
|
|
50
|
+
class KmInputComponent {
|
|
51
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
52
|
+
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
53
|
+
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
54
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
55
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
56
|
+
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
57
|
+
inputType = input('text', ...(ngDevMode ? [{ debugName: "inputType" }] : /* istanbul ignore next */ []));
|
|
58
|
+
placeholder = input('Εισάγετε μια τιμή', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
59
|
+
label = input('Label', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
60
|
+
showLabel = input(true, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
61
|
+
formControlSize = input('sm', ...(ngDevMode ? [{ debugName: "formControlSize" }] : /* istanbul ignore next */ []));
|
|
62
|
+
change(event) {
|
|
63
|
+
this.value.set(event.target.value);
|
|
64
|
+
}
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: KmInputComponent, isStandalone: true, selector: "km-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, inputType: { classPropertyName: "inputType", publicName: "inputType", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, formControlSize: { classPropertyName: "formControlSize", publicName: "formControlSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange" }, ngImport: i0, template: "<div class=\"mb-2\">\r\n @if (showLabel()) {\r\n <label class=\"form-label fw-700\"\r\n >{{ label() }}\r\n @if (required()) {\r\n <span class=\"text-danger\" ngbTooltip=\"\u0395\u03AF\u03BD\u03B1\u03B9 \u03C5\u03C0\u03BF\u03C7\u03C1\u03B5\u03C9\u03C4\u03B9\u03BA\u03CC\" triggers=\"hover\">*</span>\r\n }\r\n </label>\r\n }\r\n <div class=\"input-wrapper\">\r\n <input\r\n class=\"form-control form-control-{{ formControlSize() }}\"\r\n [type]=\"inputType()\"\r\n [placeholder]=\"placeholder()\"\r\n (input)=\"change($event)\"\r\n [value]=\"value()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n (blur)=\"touched.set(true)\"\r\n />\r\n <span class=\"corner top-left\"></span>\r\n <span class=\"corner top-right\"></span>\r\n <span class=\"corner bottom-left\"></span>\r\n <span class=\"corner bottom-right\"></span>\r\n </div>\r\n @if (invalid() && touched() && errors().length > 0) {\r\n @for (error of errors(); track error.kind) {\r\n <small class=\"invalid-feedback\">{{ error.message }}</small>\r\n }\r\n }\r\n</div>\r\n", styles: [".input-wrapper{position:relative}.input-wrapper .corner{position:absolute;width:10px;height:10px;opacity:0;transition:opacity .2s ease;pointer-events:none;z-index:1}.input-wrapper .corner.top-left{top:0;left:0;border-top:2px solid var(--bs-primary, #0d6efd);border-left:2px solid var(--bs-primary, #0d6efd)}.input-wrapper .corner.top-right{top:0;right:0;border-top:2px solid var(--bs-primary, #0d6efd);border-right:2px solid var(--bs-primary, #0d6efd)}.input-wrapper .corner.bottom-left{bottom:0;left:0;border-bottom:2px solid var(--bs-primary, #0d6efd);border-left:2px solid var(--bs-primary, #0d6efd)}.input-wrapper .corner.bottom-right{bottom:0;right:0;border-bottom:2px solid var(--bs-primary, #0d6efd);border-right:2px solid var(--bs-primary, #0d6efd)}.input-wrapper input:focus~.corner,.input-wrapper textarea:focus~.corner{opacity:1}\n"], dependencies: [{ kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
67
|
+
}
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmInputComponent, decorators: [{
|
|
69
|
+
type: Component,
|
|
70
|
+
args: [{ selector: 'km-input', imports: [NgbTooltip], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-2\">\r\n @if (showLabel()) {\r\n <label class=\"form-label fw-700\"\r\n >{{ label() }}\r\n @if (required()) {\r\n <span class=\"text-danger\" ngbTooltip=\"\u0395\u03AF\u03BD\u03B1\u03B9 \u03C5\u03C0\u03BF\u03C7\u03C1\u03B5\u03C9\u03C4\u03B9\u03BA\u03CC\" triggers=\"hover\">*</span>\r\n }\r\n </label>\r\n }\r\n <div class=\"input-wrapper\">\r\n <input\r\n class=\"form-control form-control-{{ formControlSize() }}\"\r\n [type]=\"inputType()\"\r\n [placeholder]=\"placeholder()\"\r\n (input)=\"change($event)\"\r\n [value]=\"value()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n (blur)=\"touched.set(true)\"\r\n />\r\n <span class=\"corner top-left\"></span>\r\n <span class=\"corner top-right\"></span>\r\n <span class=\"corner bottom-left\"></span>\r\n <span class=\"corner bottom-right\"></span>\r\n </div>\r\n @if (invalid() && touched() && errors().length > 0) {\r\n @for (error of errors(); track error.kind) {\r\n <small class=\"invalid-feedback\">{{ error.message }}</small>\r\n }\r\n }\r\n</div>\r\n", styles: [".input-wrapper{position:relative}.input-wrapper .corner{position:absolute;width:10px;height:10px;opacity:0;transition:opacity .2s ease;pointer-events:none;z-index:1}.input-wrapper .corner.top-left{top:0;left:0;border-top:2px solid var(--bs-primary, #0d6efd);border-left:2px solid var(--bs-primary, #0d6efd)}.input-wrapper .corner.top-right{top:0;right:0;border-top:2px solid var(--bs-primary, #0d6efd);border-right:2px solid var(--bs-primary, #0d6efd)}.input-wrapper .corner.bottom-left{bottom:0;left:0;border-bottom:2px solid var(--bs-primary, #0d6efd);border-left:2px solid var(--bs-primary, #0d6efd)}.input-wrapper .corner.bottom-right{bottom:0;right:0;border-bottom:2px solid var(--bs-primary, #0d6efd);border-right:2px solid var(--bs-primary, #0d6efd)}.input-wrapper input:focus~.corner,.input-wrapper textarea:focus~.corner{opacity:1}\n"] }]
|
|
71
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], inputType: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputType", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], formControlSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "formControlSize", required: false }] }] } });
|
|
72
|
+
|
|
73
|
+
class KmColorComboComponent {
|
|
74
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
75
|
+
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
76
|
+
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
77
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
78
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
79
|
+
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
80
|
+
showLabel = input(true, ...(ngDevMode ? [{ debugName: "showLabel" }] : /* istanbul ignore next */ []));
|
|
81
|
+
label = input('Label', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
82
|
+
getTextColor(hexColor) {
|
|
83
|
+
if (!hexColor)
|
|
84
|
+
return '#000000'; // Default to black if no color
|
|
85
|
+
// Remove the '#' if it exists
|
|
86
|
+
const hex = hexColor.replace('#', '');
|
|
87
|
+
// Convert 3-char hex to 6-char if needed (e.g., #abc to #aabbcc)
|
|
88
|
+
const fullHex = hex.length === 3
|
|
89
|
+
? hex
|
|
90
|
+
.split('')
|
|
91
|
+
.map((c) => c + c)
|
|
92
|
+
.join('')
|
|
93
|
+
: hex;
|
|
94
|
+
// Parse the RGB values
|
|
95
|
+
const r = parseInt(fullHex.substring(0, 2), 16);
|
|
96
|
+
const g = parseInt(fullHex.substring(2, 4), 16);
|
|
97
|
+
const b = parseInt(fullHex.substring(4, 6), 16);
|
|
98
|
+
// Calculate YIQ contrast (Standard formula for human eye brightness perception)
|
|
99
|
+
const yiq = (r * 299 + g * 587 + b * 114) / 1000;
|
|
100
|
+
// If the background is light (yiq >= 128), return black text. Otherwise, white text.
|
|
101
|
+
return yiq >= 128 ? '#000000' : '#ffffff';
|
|
102
|
+
}
|
|
103
|
+
change(event) {
|
|
104
|
+
this.value.set(event.target.value);
|
|
105
|
+
}
|
|
106
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmColorComboComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
107
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: KmColorComboComponent, isStandalone: true, selector: "km-color-combo", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange" }, ngImport: i0, template: "<div class=\"mb-2\">\n @if (showLabel()) {\n <label class=\"form-label fw-700\"\n >{{ label() }}\n @if (required()) {\n <span class=\"text-danger\" ngbTooltip=\"\u0395\u03AF\u03BD\u03B1\u03B9 \u03C5\u03C0\u03BF\u03C7\u03C1\u03B5\u03C9\u03C4\u03B9\u03BA\u03CC\" triggers=\"hover\">*</span>\n }\n </label>\n }\n\n <div class=\"input-group input-group-sm\">\n <input\n type=\"color\"\n class=\"form-control form-control-color\"\n (input)=\"change($event)\"\n [value]=\"value()\"\n title=\"\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03C7\u03C1\u03CE\u03BC\u03B1\"\n (blur)=\"touched.set(true)\"\n />\n <span\n class=\"input-group-text font-monospace\"\n [style.backgroundColor]=\"value()\"\n [style.color]=\"getTextColor(value() ?? '')\"\n >\n {{ value() }}\n </span>\n </div>\n</div>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
108
|
+
}
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmColorComboComponent, decorators: [{
|
|
110
|
+
type: Component,
|
|
111
|
+
args: [{ selector: 'km-color-combo', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-2\">\n @if (showLabel()) {\n <label class=\"form-label fw-700\"\n >{{ label() }}\n @if (required()) {\n <span class=\"text-danger\" ngbTooltip=\"\u0395\u03AF\u03BD\u03B1\u03B9 \u03C5\u03C0\u03BF\u03C7\u03C1\u03B5\u03C9\u03C4\u03B9\u03BA\u03CC\" triggers=\"hover\">*</span>\n }\n </label>\n }\n\n <div class=\"input-group input-group-sm\">\n <input\n type=\"color\"\n class=\"form-control form-control-color\"\n (input)=\"change($event)\"\n [value]=\"value()\"\n title=\"\u0395\u03C0\u03B9\u03BB\u03AD\u03BE\u03C4\u03B5 \u03C7\u03C1\u03CE\u03BC\u03B1\"\n (blur)=\"touched.set(true)\"\n />\n <span\n class=\"input-group-text font-monospace\"\n [style.backgroundColor]=\"value()\"\n [style.color]=\"getTextColor(value() ?? '')\"\n >\n {{ value() }}\n </span>\n </div>\n</div>\n" }]
|
|
112
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
|
|
113
|
+
|
|
114
|
+
class KmInputGroupComponent {
|
|
115
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
116
|
+
invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
117
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
118
|
+
touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
|
|
119
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
120
|
+
errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
121
|
+
readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), alias: 'readonly' });
|
|
122
|
+
actionClicked = output();
|
|
123
|
+
placeholder = input('Εισάγετε τιμή', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
124
|
+
label = input('Label', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
125
|
+
addonText = input('', ...(ngDevMode ? [{ debugName: "addonText" }] : /* istanbul ignore next */ []));
|
|
126
|
+
type = input('text', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
127
|
+
icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
128
|
+
buttonClass = input('', ...(ngDevMode ? [{ debugName: "buttonClass" }] : /* istanbul ignore next */ []));
|
|
129
|
+
onActionClicked() {
|
|
130
|
+
this.actionClicked.emit();
|
|
131
|
+
}
|
|
132
|
+
change(event) {
|
|
133
|
+
if (this.disabled())
|
|
134
|
+
return;
|
|
135
|
+
if (this.readOnly())
|
|
136
|
+
return;
|
|
137
|
+
this.touched.set(true);
|
|
138
|
+
this.value.set(event.target.value);
|
|
139
|
+
}
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmInputGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: KmInputGroupComponent, isStandalone: true, selector: "km-input-group", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, addonText: { classPropertyName: "addonText", publicName: "addonText", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, buttonClass: { classPropertyName: "buttonClass", publicName: "buttonClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touched: "touchedChange", actionClicked: "actionClicked" }, ngImport: i0, template: "<div class=\"mb-2\">\r\n <label class=\"form-label fw-700\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <div class=\"input-group\">\r\n <input\r\n [type]=\"type()\"\r\n [placeholder]=\"placeholder()\"\r\n (change)=\"change($event)\"\r\n [value]=\"value()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n (blur)=\"touched.set(true)\"\r\n [disabled]=\"disabled()\"\r\n class=\"form-control form-control-sm\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n <button type=\"button\" [class]=\"buttonClass()\" (click)=\"onActionClicked()\">\r\n <i [class]=\"icon()\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
142
|
+
}
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmInputGroupComponent, decorators: [{
|
|
144
|
+
type: Component,
|
|
145
|
+
args: [{ selector: 'km-input-group', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-2\">\r\n <label class=\"form-label fw-700\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <div class=\"input-group\">\r\n <input\r\n [type]=\"type()\"\r\n [placeholder]=\"placeholder()\"\r\n (change)=\"change($event)\"\r\n [value]=\"value()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n (blur)=\"touched.set(true)\"\r\n [disabled]=\"disabled()\"\r\n class=\"form-control form-control-sm\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n <button type=\"button\" [class]=\"buttonClass()\" (click)=\"onActionClicked()\">\r\n <i [class]=\"icon()\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n" }]
|
|
146
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], actionClicked: [{ type: i0.Output, args: ["actionClicked"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], addonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "addonText", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], buttonClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonClass", required: false }] }] } });
|
|
147
|
+
|
|
148
|
+
class KmModal {
|
|
149
|
+
title = input('Τίτλος παραθύρου', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
150
|
+
saveLabel = input('Αποθήκευση', ...(ngDevMode ? [{ debugName: "saveLabel" }] : /* istanbul ignore next */ []));
|
|
151
|
+
cancelLabel = input('Ακύρωση', ...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
|
|
152
|
+
closeLabel = input('Κλείσιμο', ...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
|
|
153
|
+
resetLabel = input('Επαναφορά', ...(ngDevMode ? [{ debugName: "resetLabel" }] : /* istanbul ignore next */ []));
|
|
154
|
+
showSave = input(true, ...(ngDevMode ? [{ debugName: "showSave" }] : /* istanbul ignore next */ []));
|
|
155
|
+
showReset = input(false, ...(ngDevMode ? [{ debugName: "showReset" }] : /* istanbul ignore next */ []));
|
|
156
|
+
showClose = input('Κλείσιμο', ...(ngDevMode ? [{ debugName: "showClose" }] : /* istanbul ignore next */ []));
|
|
157
|
+
saveDisabled = input(false, ...(ngDevMode ? [{ debugName: "saveDisabled" }] : /* istanbul ignore next */ []));
|
|
158
|
+
save = output();
|
|
159
|
+
cancel = output();
|
|
160
|
+
closeClicked = output();
|
|
161
|
+
reset = output();
|
|
162
|
+
saveClicked() {
|
|
163
|
+
this.save.emit();
|
|
164
|
+
}
|
|
165
|
+
cancelClicked() {
|
|
166
|
+
this.cancel.emit();
|
|
167
|
+
}
|
|
168
|
+
resetClicked() {
|
|
169
|
+
this.reset.emit();
|
|
170
|
+
}
|
|
171
|
+
close() {
|
|
172
|
+
this.closeClicked.emit();
|
|
173
|
+
}
|
|
174
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
175
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: KmModal, isStandalone: true, selector: "km-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, saveLabel: { classPropertyName: "saveLabel", publicName: "saveLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null }, showSave: { classPropertyName: "showSave", publicName: "showSave", isSignal: true, isRequired: false, transformFunction: null }, showReset: { classPropertyName: "showReset", publicName: "showReset", isSignal: true, isRequired: false, transformFunction: null }, showClose: { classPropertyName: "showClose", publicName: "showClose", isSignal: true, isRequired: false, transformFunction: null }, saveDisabled: { classPropertyName: "saveDisabled", publicName: "saveDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { save: "save", cancel: "cancel", closeClicked: "closeClicked", reset: "reset" }, ngImport: i0, template: "<div class=\"compact-modal\">\r\n <div class=\"modal-header d-flex align-items-center bg-light border-bottom-1\">\r\n <h6 class=\"modal-title text-truncate me-3\">{{ title() }}</h6>\r\n\r\n <div class=\"ms-auto d-flex gap-1\">\r\n <ng-content select=\"[header-actions]\"></ng-content>\r\n\r\n <button type=\"button\" class=\"btn-close ms-2\" (click)=\"cancelClicked()\" aria-label=\"Close\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"modal-footer border-top-0\">\r\n @if(showReset()){\r\n <button type=\"button\" class=\"btn btn-sm-custom btn-link text-muted me-auto px-0\" (click)=\"reset.emit()\">\r\n {{ resetLabel() }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"btn btn-sm-custom btn-secondary px-3\" (click)=\"cancelClicked()\">\r\n {{ cancelLabel() }}\r\n </button>\r\n\r\n @if(showSave()){\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-sm-custom btn-primary px-4\"\r\n [disabled]=\"saveDisabled()\"\r\n (click)=\"save.emit()\"\r\n >\r\n {{ saveLabel() }}\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".compact-modal .modal-header{padding:.3rem 1rem;min-height:32px}.compact-modal .modal-body{padding:.75rem 1rem}.compact-modal .modal-footer{padding:.4rem 1rem;background-color:#f8f9fa}.compact-modal .modal-title{font-size:1rem;font-weight:600}.compact-modal .btn-sm-custom{padding:.2rem .5rem;font-size:.85rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
176
|
+
}
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmModal, decorators: [{
|
|
178
|
+
type: Component,
|
|
179
|
+
args: [{ selector: 'km-modal', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"compact-modal\">\r\n <div class=\"modal-header d-flex align-items-center bg-light border-bottom-1\">\r\n <h6 class=\"modal-title text-truncate me-3\">{{ title() }}</h6>\r\n\r\n <div class=\"ms-auto d-flex gap-1\">\r\n <ng-content select=\"[header-actions]\"></ng-content>\r\n\r\n <button type=\"button\" class=\"btn-close ms-2\" (click)=\"cancelClicked()\" aria-label=\"Close\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"modal-footer border-top-0\">\r\n @if(showReset()){\r\n <button type=\"button\" class=\"btn btn-sm-custom btn-link text-muted me-auto px-0\" (click)=\"reset.emit()\">\r\n {{ resetLabel() }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"btn btn-sm-custom btn-secondary px-3\" (click)=\"cancelClicked()\">\r\n {{ cancelLabel() }}\r\n </button>\r\n\r\n @if(showSave()){\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-sm-custom btn-primary px-4\"\r\n [disabled]=\"saveDisabled()\"\r\n (click)=\"save.emit()\"\r\n >\r\n {{ saveLabel() }}\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".compact-modal .modal-header{padding:.3rem 1rem;min-height:32px}.compact-modal .modal-body{padding:.75rem 1rem}.compact-modal .modal-footer{padding:.4rem 1rem;background-color:#f8f9fa}.compact-modal .modal-title{font-size:1rem;font-weight:600}.compact-modal .btn-sm-custom{padding:.2rem .5rem;font-size:.85rem}\n"] }]
|
|
180
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], saveLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveLabel", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], resetLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetLabel", required: false }] }], showSave: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSave", required: false }] }], showReset: [{ type: i0.Input, args: [{ isSignal: true, alias: "showReset", required: false }] }], showClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClose", required: false }] }], saveDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "saveDisabled", required: false }] }], save: [{ type: i0.Output, args: ["save"] }], cancel: [{ type: i0.Output, args: ["cancel"] }], closeClicked: [{ type: i0.Output, args: ["closeClicked"] }], reset: [{ type: i0.Output, args: ["reset"] }] } });
|
|
181
|
+
|
|
182
|
+
class KmService {
|
|
183
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
184
|
+
getLoading() {
|
|
185
|
+
return this.loading();
|
|
186
|
+
}
|
|
187
|
+
setLoading(value) {
|
|
188
|
+
this.loading.set(value);
|
|
189
|
+
}
|
|
190
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
191
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmService, providedIn: 'root' });
|
|
192
|
+
}
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmService, decorators: [{
|
|
194
|
+
type: Injectable,
|
|
195
|
+
args: [{ providedIn: 'root' }]
|
|
196
|
+
}] });
|
|
197
|
+
|
|
198
|
+
class KmBlockDirective {
|
|
199
|
+
KmBlockUI = input(false, ...(ngDevMode ? [{ debugName: "KmBlockUI" }] : /* istanbul ignore next */ []));
|
|
200
|
+
el = inject(ElementRef);
|
|
201
|
+
renderer = inject(Renderer2);
|
|
202
|
+
constructor() {
|
|
203
|
+
this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
|
|
204
|
+
effect(() => {
|
|
205
|
+
this.KmBlockUI() ? this.block() : this.unblock();
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
block() {
|
|
209
|
+
this.renderer.addClass(this.el.nativeElement, 'block-loading');
|
|
210
|
+
// Create the overlay div
|
|
211
|
+
const overlay = this.renderer.createElement('div');
|
|
212
|
+
this.renderer.addClass(overlay, 'block-overlay');
|
|
213
|
+
this.renderer.setAttribute(overlay, 'id', 'block-overlay-node');
|
|
214
|
+
// Optional: Add a spinner icon or text
|
|
215
|
+
overlay.innerHTML = '<div class="spinner"></div>';
|
|
216
|
+
this.renderer.appendChild(this.el.nativeElement, overlay);
|
|
217
|
+
}
|
|
218
|
+
unblock() {
|
|
219
|
+
this.renderer.removeClass(this.el.nativeElement, 'block-loading');
|
|
220
|
+
const overlay = this.el.nativeElement.querySelector('#block-overlay-node');
|
|
221
|
+
if (overlay) {
|
|
222
|
+
this.renderer.removeChild(this.el.nativeElement, overlay);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
226
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.7", type: KmBlockDirective, isStandalone: true, selector: "[KmBlockUI]", inputs: { KmBlockUI: { classPropertyName: "KmBlockUI", publicName: "KmBlockUI", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
227
|
+
}
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmBlockDirective, decorators: [{
|
|
229
|
+
type: Directive,
|
|
230
|
+
args: [{
|
|
231
|
+
selector: '[KmBlockUI]',
|
|
232
|
+
}]
|
|
233
|
+
}], ctorParameters: () => [], propDecorators: { KmBlockUI: [{ type: i0.Input, args: [{ isSignal: true, alias: "KmBlockUI", required: false }] }] } });
|
|
234
|
+
|
|
235
|
+
class KmGenericCard {
|
|
236
|
+
panelTitle = input('', ...(ngDevMode ? [{ debugName: "panelTitle" }] : /* istanbul ignore next */ []));
|
|
237
|
+
subtitle = input('', ...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
238
|
+
visible = input(true, ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
239
|
+
isCollapsed = signal(false, ...(ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []));
|
|
240
|
+
isVisible = signal(this.visible(), ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
|
|
241
|
+
showBackButton = input(false, ...(ngDevMode ? [{ debugName: "showBackButton" }] : /* istanbul ignore next */ []));
|
|
242
|
+
buttons = input(...(ngDevMode ? [undefined, { debugName: "buttons" }] : /* istanbul ignore next */ []));
|
|
243
|
+
formValid = input(undefined, ...(ngDevMode ? [{ debugName: "formValid" }] : /* istanbul ignore next */ []));
|
|
244
|
+
backClicked = output();
|
|
245
|
+
service = inject(KmService);
|
|
246
|
+
clicked = output();
|
|
247
|
+
toggleCollapse() {
|
|
248
|
+
this.isCollapsed.set(!this.isCollapsed());
|
|
249
|
+
}
|
|
250
|
+
closePanel() {
|
|
251
|
+
this.isVisible.set(false);
|
|
252
|
+
}
|
|
253
|
+
onButtonClicked() {
|
|
254
|
+
this.clicked.emit();
|
|
255
|
+
}
|
|
256
|
+
onBackClicked() {
|
|
257
|
+
this.backClicked.emit();
|
|
258
|
+
}
|
|
259
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmGenericCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
260
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: KmGenericCard, isStandalone: true, selector: "km-generic-card", inputs: { panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, showBackButton: { classPropertyName: "showBackButton", publicName: "showBackButton", isSignal: true, isRequired: false, transformFunction: null }, buttons: { classPropertyName: "buttons", publicName: "buttons", isSignal: true, isRequired: false, transformFunction: null }, formValid: { classPropertyName: "formValid", publicName: "formValid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { backClicked: "backClicked", clicked: "clicked" }, ngImport: i0, template: "<div class=\"panel\" [KmBlockUI]=\"service.getLoading()\">\r\n <div class=\"panel-hdr\">\r\n <h2>\r\n {{ panelTitle() }}\r\n <span class=\"fw-300\"\r\n ><i>{{ subtitle() }}</i></span\r\n >\r\n </h2>\r\n <div class=\"panel-toolbar\">\r\n @for (button of buttons()?.buttons; track $index) {\r\n <button\r\n (click)=\"button.clicked()\"\r\n [disabled]=\"button.disabled\"\r\n [ngbTooltip]=\"button.tooltip\"\r\n triggers=\"hover\"\r\n class=\"btn {{\r\n button.color\r\n }} btn-sm btn-icon rounded-circle waves-effect waves-themed gap-5\"\r\n >\r\n <i [class]=\"button.icon\"></i>\r\n </button>\r\n }\r\n @if (showBackButton()) {\r\n <button\r\n (click)=\"backClicked.emit()\"\r\n ngbTooltip=\"\u0395\u03C0\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE\"\r\n triggers=\"hover\"\r\n class=\"btn btn-dark btn-sm btn-icon rounded-circle waves-effect waves-themed\"\r\n >\r\n <i class=\"fa-light fa-arrow-left\"></i>\r\n </button>\r\n }\r\n\r\n <button\r\n (click)=\"toggleCollapse()\"\r\n ngbTooltip=\"{{ isCollapsed() ? '\u0391\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1' : '\u039A\u03BB\u03B5\u03B9\u03C3\u03B9\u03BC\u03BF' }}\"\r\n class=\"btn btn-outline-dark btn-sm btn-icon rounded-circle waves-effect waves-themed\"\r\n >\r\n <i [class]=\"isCollapsed() ? 'fa-light fa-plus' : 'fa-light fa-minus'\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"panel-container\" [class.show]=\"!isCollapsed()\" [hidden]=\"isCollapsed()\">\r\n <div class=\"panel-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host .panel-toolbar{display:flex;flex-direction:row;gap:8px;padding:0;align-items:center;justify-content:start;margin-right:15px}:host .panel-content{overflow-x:scroll;max-height:calc(100vh - 200px)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: KmBlockDirective, selector: "[KmBlockUI]", inputs: ["KmBlockUI"] }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
261
|
+
}
|
|
262
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: KmGenericCard, decorators: [{
|
|
263
|
+
type: Component,
|
|
264
|
+
args: [{ selector: 'km-generic-card', imports: [CommonModule, KmBlockDirective, NgbTooltip], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"panel\" [KmBlockUI]=\"service.getLoading()\">\r\n <div class=\"panel-hdr\">\r\n <h2>\r\n {{ panelTitle() }}\r\n <span class=\"fw-300\"\r\n ><i>{{ subtitle() }}</i></span\r\n >\r\n </h2>\r\n <div class=\"panel-toolbar\">\r\n @for (button of buttons()?.buttons; track $index) {\r\n <button\r\n (click)=\"button.clicked()\"\r\n [disabled]=\"button.disabled\"\r\n [ngbTooltip]=\"button.tooltip\"\r\n triggers=\"hover\"\r\n class=\"btn {{\r\n button.color\r\n }} btn-sm btn-icon rounded-circle waves-effect waves-themed gap-5\"\r\n >\r\n <i [class]=\"button.icon\"></i>\r\n </button>\r\n }\r\n @if (showBackButton()) {\r\n <button\r\n (click)=\"backClicked.emit()\"\r\n ngbTooltip=\"\u0395\u03C0\u03B9\u03C3\u03C4\u03C1\u03BF\u03C6\u03AE\"\r\n triggers=\"hover\"\r\n class=\"btn btn-dark btn-sm btn-icon rounded-circle waves-effect waves-themed\"\r\n >\r\n <i class=\"fa-light fa-arrow-left\"></i>\r\n </button>\r\n }\r\n\r\n <button\r\n (click)=\"toggleCollapse()\"\r\n ngbTooltip=\"{{ isCollapsed() ? '\u0391\u03BD\u03BF\u03B9\u03B3\u03BC\u03B1' : '\u039A\u03BB\u03B5\u03B9\u03C3\u03B9\u03BC\u03BF' }}\"\r\n class=\"btn btn-outline-dark btn-sm btn-icon rounded-circle waves-effect waves-themed\"\r\n >\r\n <i [class]=\"isCollapsed() ? 'fa-light fa-plus' : 'fa-light fa-minus'\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"panel-container\" [class.show]=\"!isCollapsed()\" [hidden]=\"isCollapsed()\">\r\n <div class=\"panel-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host .panel-toolbar{display:flex;flex-direction:row;gap:8px;padding:0;align-items:center;justify-content:start;margin-right:15px}:host .panel-content{overflow-x:scroll;max-height:calc(100vh - 200px)}\n"] }]
|
|
265
|
+
}], propDecorators: { panelTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelTitle", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], showBackButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBackButton", required: false }] }], buttons: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttons", required: false }] }], formValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "formValid", required: false }] }], backClicked: [{ type: i0.Output, args: ["backClicked"] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
|
|
266
|
+
|
|
267
|
+
/*
|
|
268
|
+
* Public API Surface of my-km-components
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Generated bundle index. Do not edit.
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
export { KmBlockDirective, KmColorComboComponent, KmGenericCard, KmInputComponent, KmInputGroupComponent, KmModal, KmSelectComponent, KmService };
|
|
276
|
+
//# sourceMappingURL=my-km-components.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my-km-components.mjs","sources":["../../../projects/my-km-components/src/lib/km-select/km-select.component.ts","../../../projects/my-km-components/src/lib/km-select/km-select.component.html","../../../projects/my-km-components/src/lib/km-input/km-input.component.ts","../../../projects/my-km-components/src/lib/km-input/km-input.component.html","../../../projects/my-km-components/src/lib/km-color-combo/km-color-combo.component.ts","../../../projects/my-km-components/src/lib/km-color-combo/km-color-combo.component.html","../../../projects/my-km-components/src/lib/km-input-group/km-input-group.component.ts","../../../projects/my-km-components/src/lib/km-input-group/km-input-group.component.html","../../../projects/my-km-components/src/lib/km-modal/km-modal.ts","../../../projects/my-km-components/src/lib/km-modal/km-modal.html","../../../projects/my-km-components/src/services/km.service.ts","../../../projects/my-km-components/src/directives/km-block.directive.ts","../../../projects/my-km-components/src/lib/km-generic-card/km-generic-card.ts","../../../projects/my-km-components/src/lib/km-generic-card/km-generic-card.html","../../../projects/my-km-components/src/public-api.ts","../../../projects/my-km-components/src/my-km-components.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, computed, input, model } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { FormValueControl, ValidationError } from '@angular/forms/signals';\r\nimport { NgSelectModule } from '@ng-select/ng-select';\r\n\r\n@Component({\r\n selector: 'km-select',\r\n imports: [FormsModule, NgSelectModule, CommonModule],\r\n templateUrl: './km-select.component.html',\r\n styleUrl: './km-select.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class KmSelectComponent implements FormValueControl<string | number | null> {\r\n value = model<string | number | null>(null);\r\n readonly invalid = input<boolean>(false);\r\n readonly touched = model<boolean>(false);\r\n readonly disabled = input<boolean>(false);\r\n readonly readOnly = input<boolean>(false, { alias: 'readonly' });\r\n readonly errors = input<readonly ValidationError[]>([]);\r\n\r\n items = input.required<any[]>();\r\n multiple = input<boolean>(true);\r\n bindLabel = input<string>('label');\r\n bindValue = input<string>('value');\r\n placeholder = input<string>('Select...');\r\n class = input<string>('custom');\r\n limit = input<number>(3);\r\n label = input<string>('Label');\r\n\r\n searchable = input<boolean>(true);\r\n clearable = input<boolean>(true);\r\n\r\n displayArray = computed(() => {\r\n const val = this.value();\r\n if (!val) return [];\r\n return Array.isArray(val) ? val : [val];\r\n });\r\n\r\n change = (event: any) => {\r\n this.touched.set(true);\r\n this.value.set(event[this.bindValue()]);\r\n };\r\n\r\n clear = () => {\r\n this.value.set(null);\r\n };\r\n\r\n remainingCount = computed(() => Math.max(0, this.displayArray().length - this.limit()));\r\n}\r\n","<label class=\"form-label fw-700\">{{ label() }}</label>\r\n<ng-select\r\n [ngModel]=\"value()\"\r\n [class]=\"class()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n [items]=\"items()\"\r\n [multiple]=\"multiple()\"\r\n [bindLabel]=\"bindLabel()\"\r\n appendTo=\"body\"\r\n [bindValue]=\"bindValue()\"\r\n [placeholder]=\"placeholder()\"\r\n [searchable]=\"searchable()\"\r\n [clearable]=\"clearable()\"\r\n [disabled]=\"disabled()\"\r\n (change)=\"change($event)\"\r\n (clear)=\"value.set(null)\"\r\n [readonly]=\"readOnly()\"\r\n [closeOnSelect]=\"!multiple()\"\r\n>\r\n @if (multiple()) {\r\n <ng-template ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\r\n @for (item of items | slice: 0 : 2; track item) {\r\n <div class=\"ng-value\">\r\n <span class=\"ng-value-label\">{{ $any(item)[bindLabel()].value }}</span>\r\n <span class=\"ng-value-icon right\" (click)=\"clear(item)\" aria-hidden=\"true\">×</span>\r\n </div>\r\n }\r\n @if (items.length > 2) {\r\n <div class=\"ng-value\">\r\n <span class=\"ng-value-label\">{{ items.length - 2 }} more...</span>\r\n </div>\r\n }\r\n </ng-template>\r\n }\r\n</ng-select>\r\n@if (invalid() && touched() && errors().length > 0) {\r\n @for (error of errors(); track error.kind) {\r\n <small class=\"invalid-feedback\">{{ error.message }}</small>\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, Component, input, model } from '@angular/core';\r\nimport { FormValueControl, ValidationError } from '@angular/forms/signals';\r\nimport { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';\r\n\r\n@Component({\r\n selector: 'km-input',\r\n imports: [NgbTooltip],\r\n templateUrl: './km-input.component.html',\r\n styleUrl: './km-input.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class KmInputComponent implements FormValueControl<string | null> {\r\n readonly value = model<string | null>(null);\r\n\r\n readonly invalid = input<boolean>(false);\r\n readonly touched = model<boolean>(false);\r\n readonly disabled = input<boolean>(false);\r\n readonly required = input<boolean>(false);\r\n readonly errors = input<readonly ValidationError[]>([]);\r\n\r\n inputType = input<string>('text');\r\n placeholder = input<string>('Εισάγετε μια τιμή');\r\n label = input<string>('Label');\r\n showLabel = input<boolean>(true);\r\n\r\n formControlSize = input<string>('sm');\r\n\r\n change(event: any) {\r\n this.value.set(event.target.value);\r\n }\r\n}\r\n","<div class=\"mb-2\">\r\n @if (showLabel()) {\r\n <label class=\"form-label fw-700\"\r\n >{{ label() }}\r\n @if (required()) {\r\n <span class=\"text-danger\" ngbTooltip=\"Είναι υποχρεωτικό\" triggers=\"hover\">*</span>\r\n }\r\n </label>\r\n }\r\n <div class=\"input-wrapper\">\r\n <input\r\n class=\"form-control form-control-{{ formControlSize() }}\"\r\n [type]=\"inputType()\"\r\n [placeholder]=\"placeholder()\"\r\n (input)=\"change($event)\"\r\n [value]=\"value()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n (blur)=\"touched.set(true)\"\r\n />\r\n <span class=\"corner top-left\"></span>\r\n <span class=\"corner top-right\"></span>\r\n <span class=\"corner bottom-left\"></span>\r\n <span class=\"corner bottom-right\"></span>\r\n </div>\r\n @if (invalid() && touched() && errors().length > 0) {\r\n @for (error of errors(); track error.kind) {\r\n <small class=\"invalid-feedback\">{{ error.message }}</small>\r\n }\r\n }\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, computed, input, model } from '@angular/core';\nimport { FormValueControl, ValidationError } from '@angular/forms/signals';\n\n@Component({\n selector: 'km-color-combo',\n imports: [],\n templateUrl: './km-color-combo.component.html',\n styleUrl: './km-color-combo.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class KmColorComboComponent implements FormValueControl<string | null> {\n readonly value = model<string | null>(null);\n\n readonly invalid = input<boolean>(false);\n readonly touched = model<boolean>(false);\n readonly disabled = input<boolean>(false);\n readonly required = input<boolean>(false);\n readonly errors = input<readonly ValidationError[]>([]);\n\n showLabel = input<boolean>(true);\n label = input<string>('Label');\n\n getTextColor(hexColor: string): string {\n if (!hexColor) return '#000000'; // Default to black if no color\n\n // Remove the '#' if it exists\n const hex = hexColor.replace('#', '');\n\n // Convert 3-char hex to 6-char if needed (e.g., #abc to #aabbcc)\n const fullHex =\n hex.length === 3\n ? hex\n .split('')\n .map((c) => c + c)\n .join('')\n : hex;\n\n // Parse the RGB values\n const r = parseInt(fullHex.substring(0, 2), 16);\n const g = parseInt(fullHex.substring(2, 4), 16);\n const b = parseInt(fullHex.substring(4, 6), 16);\n\n // Calculate YIQ contrast (Standard formula for human eye brightness perception)\n const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\n // If the background is light (yiq >= 128), return black text. Otherwise, white text.\n return yiq >= 128 ? '#000000' : '#ffffff';\n }\n\n change(event: any) {\n this.value.set(event.target.value);\n }\n}\n","<div class=\"mb-2\">\n @if (showLabel()) {\n <label class=\"form-label fw-700\"\n >{{ label() }}\n @if (required()) {\n <span class=\"text-danger\" ngbTooltip=\"Είναι υποχρεωτικό\" triggers=\"hover\">*</span>\n }\n </label>\n }\n\n <div class=\"input-group input-group-sm\">\n <input\n type=\"color\"\n class=\"form-control form-control-color\"\n (input)=\"change($event)\"\n [value]=\"value()\"\n title=\"Επιλέξτε χρώμα\"\n (blur)=\"touched.set(true)\"\n />\n <span\n class=\"input-group-text font-monospace\"\n [style.backgroundColor]=\"value()\"\n [style.color]=\"getTextColor(value() ?? '')\"\n >\n {{ value() }}\n </span>\n </div>\n</div>\n","import { ChangeDetectionStrategy, Component, input, model, output } from '@angular/core';\r\nimport { FormValueControl } from '@angular/forms/signals';\r\nimport { KmInputComponent } from '../km-input/km-input.component';\r\n\r\n@Component({\r\n selector: 'km-input-group',\r\n imports: [],\r\n templateUrl: './km-input-group.component.html',\r\n styleUrl: './km-input-group.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class KmInputGroupComponent implements FormValueControl<number | null> {\r\n readonly value = model<number | null>(null);\r\n\r\n readonly invalid = input<boolean>(false);\r\n readonly required = input<boolean>(false);\r\n readonly touched = model<boolean>(false);\r\n readonly disabled = input<boolean>(false);\r\n readonly errors = input<readonly any[]>([]);\r\n readonly readOnly = input<boolean>(false, { alias: 'readonly' });\r\n actionClicked = output<void>();\r\n\r\n placeholder = input<string>('Εισάγετε τιμή');\r\n label = input<string>('Label');\r\n addonText = input<string>('');\r\n type = input<string>('text');\r\n icon = input<string>('');\r\n buttonClass = input<string>('');\r\n\r\n onActionClicked() {\r\n this.actionClicked.emit();\r\n }\r\n\r\n change(event: any) {\r\n if (this.disabled()) return;\r\n if (this.readOnly()) return;\r\n this.touched.set(true);\r\n this.value.set(event.target.value);\r\n }\r\n}\r\n","<div class=\"mb-2\">\r\n <label class=\"form-label fw-700\">\r\n {{ label() }}\r\n @if (required()) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n </label>\r\n <div class=\"input-group\">\r\n <input\r\n [type]=\"type()\"\r\n [placeholder]=\"placeholder()\"\r\n (change)=\"change($event)\"\r\n [value]=\"value()\"\r\n [class.is-invalid]=\"invalid() && touched()\"\r\n (blur)=\"touched.set(true)\"\r\n [disabled]=\"disabled()\"\r\n class=\"form-control form-control-sm\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n <button type=\"button\" [class]=\"buttonClass()\" (click)=\"onActionClicked()\">\r\n <i [class]=\"icon()\"></i>\r\n </button>\r\n </div>\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'km-modal',\r\n imports: [],\r\n templateUrl: './km-modal.html',\r\n styleUrl: './km-modal.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class KmModal {\r\n title = input('Τίτλος παραθύρου');\r\n saveLabel = input('Αποθήκευση');\r\n cancelLabel = input('Ακύρωση');\r\n closeLabel = input('Κλείσιμο');\r\n resetLabel = input('Επαναφορά');\r\n showSave = input<boolean>(true);\r\n showReset = input<boolean>(false);\r\n showClose = input('Κλείσιμο');\r\n saveDisabled = input<boolean>(false);\r\n\r\n save = output();\r\n cancel = output();\r\n closeClicked = output();\r\n reset = output();\r\n\r\n saveClicked() {\r\n this.save.emit();\r\n }\r\n\r\n cancelClicked() {\r\n this.cancel.emit();\r\n }\r\n\r\n resetClicked() {\r\n this.reset.emit();\r\n }\r\n\r\n close() {\r\n this.closeClicked.emit();\r\n }\r\n}\r\n","<div class=\"compact-modal\">\r\n <div class=\"modal-header d-flex align-items-center bg-light border-bottom-1\">\r\n <h6 class=\"modal-title text-truncate me-3\">{{ title() }}</h6>\r\n\r\n <div class=\"ms-auto d-flex gap-1\">\r\n <ng-content select=\"[header-actions]\"></ng-content>\r\n\r\n <button type=\"button\" class=\"btn-close ms-2\" (click)=\"cancelClicked()\" aria-label=\"Close\"></button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div class=\"modal-footer border-top-0\">\r\n @if(showReset()){\r\n <button type=\"button\" class=\"btn btn-sm-custom btn-link text-muted me-auto px-0\" (click)=\"reset.emit()\">\r\n {{ resetLabel() }}\r\n </button>\r\n }\r\n\r\n <button type=\"button\" class=\"btn btn-sm-custom btn-secondary px-3\" (click)=\"cancelClicked()\">\r\n {{ cancelLabel() }}\r\n </button>\r\n\r\n @if(showSave()){\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-sm-custom btn-primary px-4\"\r\n [disabled]=\"saveDisabled()\"\r\n (click)=\"save.emit()\"\r\n >\r\n {{ saveLabel() }}\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n","import { Injectable, signal } from '@angular/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class KmService {\r\n private loading = signal<boolean>(false);\r\n\r\n getLoading(): boolean {\r\n return this.loading();\r\n }\r\n\r\n setLoading(value: boolean): void {\r\n this.loading.set(value);\r\n }\r\n}\r\n","import { Directive, ElementRef, effect, inject, input, Renderer2 } from '@angular/core'\r\n\r\n@Directive({\r\n selector: '[KmBlockUI]',\r\n})\r\nexport class KmBlockDirective {\r\n KmBlockUI = input<boolean>(false)\r\n private el = inject(ElementRef)\r\n private renderer = inject(Renderer2)\r\n\r\n constructor() {\r\n this.renderer.setStyle(this.el.nativeElement, 'position', 'relative')\r\n effect(() => {\r\n this.KmBlockUI() ? this.block() : this.unblock()\r\n })\r\n }\r\n\r\n private block() {\r\n this.renderer.addClass(this.el.nativeElement, 'block-loading')\r\n\r\n // Create the overlay div\r\n const overlay = this.renderer.createElement('div')\r\n this.renderer.addClass(overlay, 'block-overlay')\r\n this.renderer.setAttribute(overlay, 'id', 'block-overlay-node')\r\n\r\n // Optional: Add a spinner icon or text\r\n overlay.innerHTML = '<div class=\"spinner\"></div>'\r\n\r\n this.renderer.appendChild(this.el.nativeElement, overlay)\r\n }\r\n\r\n private unblock() {\r\n this.renderer.removeClass(this.el.nativeElement, 'block-loading')\r\n const overlay = this.el.nativeElement.querySelector('#block-overlay-node')\r\n if (overlay) {\r\n this.renderer.removeChild(this.el.nativeElement, overlay)\r\n }\r\n }\r\n}\r\n","import { ChangeDetectionStrategy, Component, inject, input, output, signal } from '@angular/core';\r\nimport { KmGenericCardButtonInterface, KmGenericCardInterface } from './km-generic-card.interface';\r\nimport { CommonModule } from '@angular/common';\r\nimport { KmService } from '../../services/km.service';\r\nimport { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';\r\nimport { KmBlockDirective } from '../../directives/km-block.directive';\r\n\r\n@Component({\r\n selector: 'km-generic-card',\r\n imports: [CommonModule, KmBlockDirective, NgbTooltip],\r\n templateUrl: './km-generic-card.html',\r\n styleUrl: './km-generic-card.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class KmGenericCard {\r\n panelTitle = input<string>('');\r\n subtitle = input<string>('');\r\n visible = input<boolean>(true);\r\n isCollapsed = signal<boolean>(false);\r\n isVisible = signal<boolean>(this.visible());\r\n showBackButton = input<boolean>(false);\r\n buttons = input<KmGenericCardInterface>();\r\n formValid = input<boolean | undefined>(undefined);\r\n backClicked = output<void>();\r\n service = inject(KmService);\r\n\r\n clicked = output<void>();\r\n\r\n toggleCollapse() {\r\n this.isCollapsed.set(!this.isCollapsed());\r\n }\r\n closePanel() {\r\n this.isVisible.set(false);\r\n }\r\n\r\n onButtonClicked() {\r\n this.clicked.emit();\r\n }\r\n\r\n onBackClicked() {\r\n this.backClicked.emit();\r\n }\r\n}\r\n","<div class=\"panel\" [KmBlockUI]=\"service.getLoading()\">\r\n <div class=\"panel-hdr\">\r\n <h2>\r\n {{ panelTitle() }}\r\n <span class=\"fw-300\"\r\n ><i>{{ subtitle() }}</i></span\r\n >\r\n </h2>\r\n <div class=\"panel-toolbar\">\r\n @for (button of buttons()?.buttons; track $index) {\r\n <button\r\n (click)=\"button.clicked()\"\r\n [disabled]=\"button.disabled\"\r\n [ngbTooltip]=\"button.tooltip\"\r\n triggers=\"hover\"\r\n class=\"btn {{\r\n button.color\r\n }} btn-sm btn-icon rounded-circle waves-effect waves-themed gap-5\"\r\n >\r\n <i [class]=\"button.icon\"></i>\r\n </button>\r\n }\r\n @if (showBackButton()) {\r\n <button\r\n (click)=\"backClicked.emit()\"\r\n ngbTooltip=\"Επιστροφή\"\r\n triggers=\"hover\"\r\n class=\"btn btn-dark btn-sm btn-icon rounded-circle waves-effect waves-themed\"\r\n >\r\n <i class=\"fa-light fa-arrow-left\"></i>\r\n </button>\r\n }\r\n\r\n <button\r\n (click)=\"toggleCollapse()\"\r\n ngbTooltip=\"{{ isCollapsed() ? 'Ανοιγμα' : 'Κλεισιμο' }}\"\r\n class=\"btn btn-outline-dark btn-sm btn-icon rounded-circle waves-effect waves-themed\"\r\n >\r\n <i [class]=\"isCollapsed() ? 'fa-light fa-plus' : 'fa-light fa-minus'\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"panel-container\" [class.show]=\"!isCollapsed()\" [hidden]=\"isCollapsed()\">\r\n <div class=\"panel-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n","/*\r\n * Public API Surface of my-km-components\r\n */\r\n\r\nexport * from './lib/km-select/km-select.component';\r\nexport * from './lib/km-input/km-input.component';\r\nexport * from './lib/km-color-combo/km-color-combo.component';\r\nexport * from './lib/km-input-group/km-input-group.component';\r\nexport * from './lib/km-modal/km-modal';\r\nexport * from './lib/km-generic-card/km-generic-card';\r\nexport * from './directives/km-block.directive';\r\nexport * from './services/km.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAaa,iBAAiB,CAAA;AAC5B,IAAA,KAAK,GAAG,KAAK,CAAyB,IAAI,4EAAC;AAClC,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;AAC/B,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;AAC/B,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;IAChC,QAAQ,GAAG,KAAK,CAAU,KAAK,gFAAI,KAAK,EAAE,UAAU,EAAA,CAAG;AACvD,IAAA,MAAM,GAAG,KA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A,gBAAA,EAAA,WAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,WAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,OAAA,EAAA,QAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAKzC,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAClB,CAAC,YAAY,EAAE,gBAAgB,EAAE,UAAU,CAAC,EAAA,eAAA,EAGpC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0wDAAA,EAAA,MAAA,EAAA,CAAA,4MAAA,CAAA,EAAA;;;AEZjD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-km-components",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^21.2.0",
|
|
6
|
-
"@angular/core": "^21.2.0",
|
|
7
|
-
"@ng-bootstrap/ng-bootstrap": "^20.0.0",
|
|
8
|
-
"@ng-select/ng-select": "^21.7.0"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/viverosimo/km-components.git"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"tslib": "^2.3.0"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "my-km-components",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^21.2.0",
|
|
6
|
+
"@angular/core": "^21.2.0",
|
|
7
|
+
"@ng-bootstrap/ng-bootstrap": "^20.0.0",
|
|
8
|
+
"@ng-select/ng-select": "^21.7.0"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/viverosimo/km-components.git"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"tslib": "^2.3.0"
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"module": "fesm2022/my-km-components.mjs",
|
|
19
|
+
"typings": "types/my-km-components.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./types/my-km-components.d.ts",
|
|
26
|
+
"default": "./fesm2022/my-km-components.mjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"type": "module"
|
|
30
|
+
}
|