angular-dumb-lib 0.0.19 → 0.0.20
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/esm2022/lib/angular-dumb-lib.component.mjs +9 -9
- package/esm2022/lib/angular-dumb-lib.module.mjs +1 -1
- package/esm2022/lib/components/atoms/button/button.component.mjs +3 -3
- package/esm2022/lib/components/atoms/input/input.component.mjs +3 -3
- package/esm2022/lib/components/atoms/loading/loading.component.mjs +5 -5
- package/esm2022/lib/components/atoms/menu-widget/menu-widget.component.mjs +4 -4
- package/esm2022/lib/components/atoms/selection/selection.component.mjs +1 -1
- package/esm2022/lib/components/molecules/cards/cards.component.mjs +3 -3
- package/esm2022/lib/components/molecules/content-design/content-design.component.mjs +3 -3
- package/esm2022/lib/components/molecules/form/form.component.mjs +18 -16
- package/esm2022/lib/components/molecules/formated-text/formated-text.component.mjs +3 -3
- package/esm2022/lib/components/molecules/modal/modal.component.mjs +7 -3
- package/esm2022/lib/components/molecules/paginator/paginator.component.mjs +5 -4
- package/esm2022/lib/components/molecules/table/table.component.mjs +3 -3
- package/esm2022/lib/components/pages/footer/footer.component.mjs +3 -3
- package/esm2022/lib/components/pages/login/login.component.mjs +3 -5
- package/esm2022/lib/components/pages/menu/menu.component.mjs +32 -7
- package/esm2022/lib/shared/constants/constant.mjs +1 -1
- package/esm2022/lib/shared/enums/enum.mjs +15 -9
- package/esm2022/lib/shared/interfaces/interface.mjs +1 -1
- package/esm2022/lib/shared/utils/common.utils.mjs +34 -1
- package/esm2022/public-api.mjs +1 -1
- package/fesm2022/angular-dumb-lib.mjs +135 -67
- package/fesm2022/angular-dumb-lib.mjs.map +1 -1
- package/lib/components/atoms/loading/loading.component.d.ts +2 -2
- package/lib/components/atoms/menu-widget/menu-widget.component.d.ts +2 -1
- package/lib/components/molecules/form/form.component.d.ts +2 -0
- package/lib/components/molecules/modal/modal.component.d.ts +3 -1
- package/lib/components/pages/menu/menu.component.d.ts +13 -4
- package/lib/shared/enums/enum.d.ts +6 -1
- package/lib/shared/interfaces/interface.d.ts +11 -2
- package/lib/shared/utils/common.utils.d.ts +9 -0
- package/package.json +1 -1
- package/src/lib/assets/styles.scss +12 -12
- package/esm2022/lib/components/atoms/formated-text/formated-text.component.mjs +0 -22
- package/lib/components/atoms/formated-text/formated-text.component.d.ts +0 -12
|
@@ -4,6 +4,7 @@ import * as i1 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
7
8
|
import * as i1$1 from '@angular/platform-browser';
|
|
8
9
|
import * as i2$1 from 'primeng/table';
|
|
9
10
|
import { TableModule } from 'primeng/table';
|
|
@@ -25,18 +26,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
25
26
|
|
|
26
27
|
class AngularDumbLibComponent {
|
|
27
28
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AngularDumbLibComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AngularDumbLibComponent, selector: "lib-angular-dumb-lib", ngImport: i0, template: `
|
|
29
|
-
<p>
|
|
30
|
-
angular-dumb-lib works!
|
|
31
|
-
</p>
|
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AngularDumbLibComponent, selector: "lib-angular-dumb-lib", ngImport: i0, template: `
|
|
30
|
+
<p>
|
|
31
|
+
angular-dumb-lib works!
|
|
32
|
+
</p>
|
|
32
33
|
`, isInline: true }); }
|
|
33
34
|
}
|
|
34
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AngularDumbLibComponent, decorators: [{
|
|
35
36
|
type: Component,
|
|
36
|
-
args: [{ selector: 'lib-angular-dumb-lib', template: `
|
|
37
|
-
<p>
|
|
38
|
-
angular-dumb-lib works!
|
|
39
|
-
</p>
|
|
37
|
+
args: [{ selector: 'lib-angular-dumb-lib', template: `
|
|
38
|
+
<p>
|
|
39
|
+
angular-dumb-lib works!
|
|
40
|
+
</p>
|
|
40
41
|
` }]
|
|
41
42
|
}] });
|
|
42
43
|
|
|
@@ -113,14 +114,14 @@ var SelectionType;
|
|
|
113
114
|
SelectionType["radio"] = "radio";
|
|
114
115
|
SelectionType["checkbox"] = "checkbox";
|
|
115
116
|
})(SelectionType || (SelectionType = {}));
|
|
116
|
-
var
|
|
117
|
-
(function (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
})(
|
|
117
|
+
var Size;
|
|
118
|
+
(function (Size) {
|
|
119
|
+
Size["Xbig"] = "xbig";
|
|
120
|
+
Size["Big"] = "big";
|
|
121
|
+
Size["Medium"] = "medium";
|
|
122
|
+
Size["Small"] = "small";
|
|
123
|
+
Size["Xsmall"] = "xsmall";
|
|
124
|
+
})(Size || (Size = {}));
|
|
124
125
|
var MenuDirection;
|
|
125
126
|
(function (MenuDirection) {
|
|
126
127
|
MenuDirection["vertical"] = "vertical";
|
|
@@ -137,6 +138,12 @@ var LoadingType;
|
|
|
137
138
|
LoadingType["black"] = "black";
|
|
138
139
|
LoadingType["white"] = "white";
|
|
139
140
|
})(LoadingType || (LoadingType = {}));
|
|
141
|
+
var CRUDType;
|
|
142
|
+
(function (CRUDType) {
|
|
143
|
+
CRUDType["create"] = "create";
|
|
144
|
+
CRUDType["update"] = "update";
|
|
145
|
+
CRUDType["delete"] = "delete";
|
|
146
|
+
})(CRUDType || (CRUDType = {}));
|
|
140
147
|
|
|
141
148
|
class ButtonComponent {
|
|
142
149
|
constructor() {
|
|
@@ -155,11 +162,11 @@ class ButtonComponent {
|
|
|
155
162
|
this.clickEvent.emit();
|
|
156
163
|
}
|
|
157
164
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
158
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonComponent, isStandalone: true, selector: "app-button", inputs: { config: "config" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<button\
|
|
165
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonComponent, isStandalone: true, selector: "app-button", inputs: { config: "config" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<button\n type=\"{{config.type}}\"\n class=\"btn btn-primary\"\n [disabled]=\"config.isDisabled\"\n [ngClass]=\"{'active': config.isActive,\n 'normal': config.designType === 'normal',\n 'contrast': config.designType === 'contrast'}\"\n (click)=\"onButtonClick()\">\n <div class=\"button-content\">\n <ng-container *ngIf=\"config.iconValue\">\n <i class=\"material-icons\" data-toggle=\"tooltip\" title=\"Delete\">{{config.iconValue}}</i>\n </ng-container>\n <span>{{ config.label }}</span>\n </div>\n</button>\n", styles: ["button.btn.btn-primary{padding:.5rem 1rem;border:none;border-radius:50px;cursor:pointer;height:3rem}button.btn.btn-primary .button-content{display:flex;flex-direction:row;justify-content:center;align-items:center;height:100%}button.btn.btn-primary:disabled{background-color:#ccc!important;color:#666!important;cursor:not-allowed!important;border-color:#666!important}button.btn.btn-primary.normal{background-color:#f6ad15;color:#fff}button.btn.btn-primary.normal:hover:not(:disabled){background-color:#e09a14}button.btn.btn-primary.contrast{color:#f6ad15;border:1px solid #d58f13}button.btn.btn-primary.contrast:hover:not(:disabled){background-color:#f4d87e;color:#1a1a1a}button.btn.btn-primary.active{background-color:#e09a14;color:#fff}button.btn.btn-primary.active:hover:not(:disabled){background-color:#e09a14;color:#fff}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
159
166
|
}
|
|
160
167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
161
168
|
type: Component,
|
|
162
|
-
args: [{ selector: 'app-button', standalone: true, imports: [CommonModule], template: "<button\
|
|
169
|
+
args: [{ selector: 'app-button', standalone: true, imports: [CommonModule], template: "<button\n type=\"{{config.type}}\"\n class=\"btn btn-primary\"\n [disabled]=\"config.isDisabled\"\n [ngClass]=\"{'active': config.isActive,\n 'normal': config.designType === 'normal',\n 'contrast': config.designType === 'contrast'}\"\n (click)=\"onButtonClick()\">\n <div class=\"button-content\">\n <ng-container *ngIf=\"config.iconValue\">\n <i class=\"material-icons\" data-toggle=\"tooltip\" title=\"Delete\">{{config.iconValue}}</i>\n </ng-container>\n <span>{{ config.label }}</span>\n </div>\n</button>\n", styles: ["button.btn.btn-primary{padding:.5rem 1rem;border:none;border-radius:50px;cursor:pointer;height:3rem}button.btn.btn-primary .button-content{display:flex;flex-direction:row;justify-content:center;align-items:center;height:100%}button.btn.btn-primary:disabled{background-color:#ccc!important;color:#666!important;cursor:not-allowed!important;border-color:#666!important}button.btn.btn-primary.normal{background-color:#f6ad15;color:#fff}button.btn.btn-primary.normal:hover:not(:disabled){background-color:#e09a14}button.btn.btn-primary.contrast{color:#f6ad15;border:1px solid #d58f13}button.btn.btn-primary.contrast:hover:not(:disabled){background-color:#f4d87e;color:#1a1a1a}button.btn.btn-primary.active{background-color:#e09a14;color:#fff}button.btn.btn-primary.active:hover:not(:disabled){background-color:#e09a14;color:#fff}\n"] }]
|
|
163
170
|
}], ctorParameters: function () { return []; }, propDecorators: { config: [{
|
|
164
171
|
type: Input
|
|
165
172
|
}], clickEvent: [{
|
|
@@ -351,7 +358,7 @@ class InputComponent {
|
|
|
351
358
|
provide: NG_VALUE_ACCESSOR,
|
|
352
359
|
useExisting: forwardRef(() => InputComponent),
|
|
353
360
|
multi: true
|
|
354
|
-
}], ngImport: i0, template: "<div class=\"input-item\" [ngClass]=\"config.direction\">\
|
|
361
|
+
}], ngImport: i0, template: "<div class=\"input-item\" [ngClass]=\"config.direction\">\n <label *ngIf=\"config.label\">\n {{ config.label }}\n <span *ngIf=\"config.required\" class=\"required-indicator\">*</span>\n </label>\n\n <div class=\"input-container\">\n <input *ngIf=\"config.type !== 'textarea' && config.type !== 'richText' && config.type !== 'image'\"\n [type]=\"config.type\"\n [name]=\"config.name\"\n [required]=\"config.required\"\n [(ngModel)]=\"value\"\n [placeholder] = \"config.placeholder\"\n [ngClass]=\"{'input-error': !config.isValid}\">\n <textarea *ngIf=\"config.type === 'textarea'\"\n [name]=\"config.name\"\n [required]=\"config.required\"\n [(ngModel)]=\"value\"\n [placeholder] = \"config.placeholder\"\n [ngClass]=\"{'input-error': !config.isValid}\">\n </textarea>\n <i *ngIf=\"!config.isValid\" class=\"material-icons warning-icon\">error</i>\n </div>\n\n <div *ngIf=\"config.type === 'image'\">\n <img *ngIf=\"value\" [src]=\"value\" alt=\"Selected Image\" class=\"preview-image\"/>\n </div>\n</div>\n", styles: [".input-item{display:flex;width:100%;gap:10px}.input-item .input-container{display:flex;width:inherit}.input-item .input-container .input-error{border-color:red}.input-item label{display:flex;align-items:center}.input-item.horizontal{flex-direction:row}.input-item.horizontal label{width:30%}.input-item.vertical{flex-direction:column}.input-item .preview-image{max-width:150px;max-height:150px;border:1px solid #ccc;margin-top:8px}.input-item .required-indicator,.input-item .warning-icon{display:flex;align-items:center;color:red;margin-left:4px}.input-item .warning-icon{font-weight:700}.input-item input,.input-item textarea{padding:.5rem;border:1px solid #ccc;border-radius:.25rem;width:-webkit-fill-available}.input-item quill-editor{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
355
362
|
}
|
|
356
363
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputComponent, decorators: [{
|
|
357
364
|
type: Component,
|
|
@@ -359,14 +366,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
359
366
|
provide: NG_VALUE_ACCESSOR,
|
|
360
367
|
useExisting: forwardRef(() => InputComponent),
|
|
361
368
|
multi: true
|
|
362
|
-
}], imports: [CommonModule, FormsModule], template: "<div class=\"input-item\" [ngClass]=\"config.direction\">\
|
|
369
|
+
}], imports: [CommonModule, FormsModule], template: "<div class=\"input-item\" [ngClass]=\"config.direction\">\n <label *ngIf=\"config.label\">\n {{ config.label }}\n <span *ngIf=\"config.required\" class=\"required-indicator\">*</span>\n </label>\n\n <div class=\"input-container\">\n <input *ngIf=\"config.type !== 'textarea' && config.type !== 'richText' && config.type !== 'image'\"\n [type]=\"config.type\"\n [name]=\"config.name\"\n [required]=\"config.required\"\n [(ngModel)]=\"value\"\n [placeholder] = \"config.placeholder\"\n [ngClass]=\"{'input-error': !config.isValid}\">\n <textarea *ngIf=\"config.type === 'textarea'\"\n [name]=\"config.name\"\n [required]=\"config.required\"\n [(ngModel)]=\"value\"\n [placeholder] = \"config.placeholder\"\n [ngClass]=\"{'input-error': !config.isValid}\">\n </textarea>\n <i *ngIf=\"!config.isValid\" class=\"material-icons warning-icon\">error</i>\n </div>\n\n <div *ngIf=\"config.type === 'image'\">\n <img *ngIf=\"value\" [src]=\"value\" alt=\"Selected Image\" class=\"preview-image\"/>\n </div>\n</div>\n", styles: [".input-item{display:flex;width:100%;gap:10px}.input-item .input-container{display:flex;width:inherit}.input-item .input-container .input-error{border-color:red}.input-item label{display:flex;align-items:center}.input-item.horizontal{flex-direction:row}.input-item.horizontal label{width:30%}.input-item.vertical{flex-direction:column}.input-item .preview-image{max-width:150px;max-height:150px;border:1px solid #ccc;margin-top:8px}.input-item .required-indicator,.input-item .warning-icon{display:flex;align-items:center;color:red;margin-left:4px}.input-item .warning-icon{font-weight:700}.input-item input,.input-item textarea{padding:.5rem;border:1px solid #ccc;border-radius:.25rem;width:-webkit-fill-available}.input-item quill-editor{width:100%}\n"] }]
|
|
363
370
|
}], ctorParameters: function () { return []; }, propDecorators: { config: [{
|
|
364
371
|
type: Input
|
|
365
372
|
}] } });
|
|
366
373
|
|
|
367
374
|
class LoadingComponent {
|
|
368
375
|
constructor() {
|
|
369
|
-
this.size =
|
|
376
|
+
this.size = Size.Medium;
|
|
370
377
|
this.imageSrc = LoadingType.black;
|
|
371
378
|
this.loadingImage = 'https://innocons.s3.ap-southeast-1.amazonaws.com/wp-content/uploads/2024/10/13083249/Loader-White.gif';
|
|
372
379
|
}
|
|
@@ -384,11 +391,11 @@ class LoadingComponent {
|
|
|
384
391
|
}
|
|
385
392
|
}
|
|
386
393
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
387
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LoadingComponent, isStandalone: true, selector: "app-loading", inputs: { size: "size", imageSrc: "imageSrc" }, ngImport: i0, template: "<div [ngClass]=\"size\" class=\"loading-content\">\
|
|
394
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LoadingComponent, isStandalone: true, selector: "app-loading", inputs: { size: "size", imageSrc: "imageSrc" }, ngImport: i0, template: "<div [ngClass]=\"size\" class=\"loading-content\">\n <img [src]=\"loadingImage\" />\n</div>\n", styles: [":host{width:100%;height:100%;display:table;text-align:center}.loading-content{display:table-cell;vertical-align:middle}.xbig img{width:256px;height:256px}.big img{width:128px;height:128px}.medium img{width:64px;height:64px}.small img{width:32px;height:32px}.xsmall img{width:16px;height:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
388
395
|
}
|
|
389
396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingComponent, decorators: [{
|
|
390
397
|
type: Component,
|
|
391
|
-
args: [{ selector: 'app-loading', standalone: true, imports: [CommonModule], template: "<div [ngClass]=\"size\" class=\"loading-content\">\
|
|
398
|
+
args: [{ selector: 'app-loading', standalone: true, imports: [CommonModule], template: "<div [ngClass]=\"size\" class=\"loading-content\">\n <img [src]=\"loadingImage\" />\n</div>\n", styles: [":host{width:100%;height:100%;display:table;text-align:center}.loading-content{display:table-cell;vertical-align:middle}.xbig img{width:256px;height:256px}.big img{width:128px;height:128px}.medium img{width:64px;height:64px}.small img{width:32px;height:32px}.xsmall img{width:16px;height:16px}\n"] }]
|
|
392
399
|
}], ctorParameters: function () { return []; }, propDecorators: { size: [{
|
|
393
400
|
type: Input
|
|
394
401
|
}], imageSrc: [{
|
|
@@ -571,6 +578,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
571
578
|
type: Input
|
|
572
579
|
}] } });
|
|
573
580
|
|
|
581
|
+
function isDefined(obj) {
|
|
582
|
+
return obj !== undefined && obj !== null;
|
|
583
|
+
}
|
|
584
|
+
function isNullOrWhilespace(obj) {
|
|
585
|
+
return !isDefined(obj) || obj.trim().length === 0;
|
|
586
|
+
}
|
|
587
|
+
function groupBy(arr, key) {
|
|
588
|
+
return arr.reduce((groups, item) => {
|
|
589
|
+
(groups[key(item)] ||= []).push(item);
|
|
590
|
+
return groups;
|
|
591
|
+
}, {});
|
|
592
|
+
}
|
|
593
|
+
function withValuesOf(value, callback) {
|
|
594
|
+
Object.values(value).forEach(val => {
|
|
595
|
+
callback(val);
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
function as(obj) {
|
|
599
|
+
return obj;
|
|
600
|
+
}
|
|
601
|
+
function makeDestroy() {
|
|
602
|
+
const _destroy$ = new Subject();
|
|
603
|
+
_destroy$.next(null);
|
|
604
|
+
_destroy$.complete();
|
|
605
|
+
return (source) => source.pipe(takeUntil(_destroy$));
|
|
606
|
+
}
|
|
607
|
+
function mapEnumToDropdownOptions(enumObj) {
|
|
608
|
+
return Object.keys(enumObj).map(key => ({
|
|
609
|
+
label: enumObj[key],
|
|
610
|
+
value: key // The key of the enum (e.g., 'Item1')
|
|
611
|
+
}));
|
|
612
|
+
}
|
|
574
613
|
function truncateContent(content, maxLength) {
|
|
575
614
|
// Remove HTML tags
|
|
576
615
|
const plainText = content.replace(/<[^>]+>/g, ''); // This regex removes HTML tags
|
|
@@ -606,11 +645,11 @@ class ContentDesignComponent {
|
|
|
606
645
|
}
|
|
607
646
|
}
|
|
608
647
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContentDesignComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
609
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContentDesignComponent, isStandalone: true, selector: "app-content-design", inputs: { content: "content", contentLength: "contentLength" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<div class=\"content-designer\" [ngClass]=\"content.contentDirection\">\
|
|
648
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContentDesignComponent, isStandalone: true, selector: "app-content-design", inputs: { content: "content", contentLength: "contentLength" }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<div class=\"content-designer\" [ngClass]=\"content.contentDirection\">\n <ng-container *ngIf=\"content?.mapAddress; else imageTemplate\">\n <div class=\"map\">\n <iframe\n width=\"600\"\n height=\"450\"\n style=\"border:0;\"\n allowfullscreen=\"\"\n loading=\"lazy\"\n referrerpolicy=\"no-referrer-when-downgrade\"\n [src]=\"sanitizedMapAddress\">\n </iframe>\n </div>\n </ng-container>\n\n <ng-template #imageTemplate>\n <div *ngIf=\"content.coverImage\" class=\"image\">\n <img [src]=\"content.coverImage\" alt=\"Cover Image\">\n </div>\n </ng-template>\n\n <div class=\"content\">\n <h2 *ngIf=\"content.title\">{{ content.title }}</h2>\n <p *ngIf=\"content.content\">{{ truncateContent(content.content) }}</p>\n <ng-container [ngTemplateOutlet]=\"content.template\"></ng-container>\n <app-button *ngIf=\"content.button\" [config] = \"content.button\"\n (clickEvent)=\"onButtonClick(content.button.action)\">\n </app-button>\n </div>\n</div>\n", styles: [".content-designer{display:flex;gap:20px;flex-wrap:wrap;justify-content:space-between;align-items:center;text-align:center}.content-designer img{max-width:100%;height:auto}.content-designer .content{display:flex;flex-direction:column}.content-designer .content p{text-align:justify}.content-designer.left,.content-designer.right{flex-direction:row}.content-designer.left .image,.content-designer.left .content,.content-designer.right .image,.content-designer.right .content{flex:1;width:50%}.content-designer.left .content,.content-designer.right .content{text-align:justify}.content-designer.left .image,.content-designer.right .image{display:flex}.content-designer.left{flex-direction:row-reverse}.content-designer.left .image{justify-content:end}.content-designer.right .image{justify-content:start}.content-designer.up,.content-designer.down{flex-direction:column}.content-designer.up .image,.content-designer.down .image{width:100%;height:300px;overflow:hidden;justify-content:center;align-items:center}.content-designer.up .image image,.content-designer.down .image image{height:100%;width:auto;object-fit:cover}.content-designer.up{flex-direction:column-reverse}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["config"], outputs: ["clickEvent"] }] }); }
|
|
610
649
|
}
|
|
611
650
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContentDesignComponent, decorators: [{
|
|
612
651
|
type: Component,
|
|
613
|
-
args: [{ selector: 'app-content-design', standalone: true, imports: [CommonModule, ButtonComponent], template: "<div class=\"content-designer\" [ngClass]=\"content.contentDirection\">\
|
|
652
|
+
args: [{ selector: 'app-content-design', standalone: true, imports: [CommonModule, ButtonComponent], template: "<div class=\"content-designer\" [ngClass]=\"content.contentDirection\">\n <ng-container *ngIf=\"content?.mapAddress; else imageTemplate\">\n <div class=\"map\">\n <iframe\n width=\"600\"\n height=\"450\"\n style=\"border:0;\"\n allowfullscreen=\"\"\n loading=\"lazy\"\n referrerpolicy=\"no-referrer-when-downgrade\"\n [src]=\"sanitizedMapAddress\">\n </iframe>\n </div>\n </ng-container>\n\n <ng-template #imageTemplate>\n <div *ngIf=\"content.coverImage\" class=\"image\">\n <img [src]=\"content.coverImage\" alt=\"Cover Image\">\n </div>\n </ng-template>\n\n <div class=\"content\">\n <h2 *ngIf=\"content.title\">{{ content.title }}</h2>\n <p *ngIf=\"content.content\">{{ truncateContent(content.content) }}</p>\n <ng-container [ngTemplateOutlet]=\"content.template\"></ng-container>\n <app-button *ngIf=\"content.button\" [config] = \"content.button\"\n (clickEvent)=\"onButtonClick(content.button.action)\">\n </app-button>\n </div>\n</div>\n", styles: [".content-designer{display:flex;gap:20px;flex-wrap:wrap;justify-content:space-between;align-items:center;text-align:center}.content-designer img{max-width:100%;height:auto}.content-designer .content{display:flex;flex-direction:column}.content-designer .content p{text-align:justify}.content-designer.left,.content-designer.right{flex-direction:row}.content-designer.left .image,.content-designer.left .content,.content-designer.right .image,.content-designer.right .content{flex:1;width:50%}.content-designer.left .content,.content-designer.right .content{text-align:justify}.content-designer.left .image,.content-designer.right .image{display:flex}.content-designer.left{flex-direction:row-reverse}.content-designer.left .image{justify-content:end}.content-designer.right .image{justify-content:start}.content-designer.up,.content-designer.down{flex-direction:column}.content-designer.up .image,.content-designer.down .image{width:100%;height:300px;overflow:hidden;justify-content:center;align-items:center}.content-designer.up .image image,.content-designer.down .image image{height:100%;width:auto;object-fit:cover}.content-designer.up{flex-direction:column-reverse}\n"] }]
|
|
614
653
|
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; }, propDecorators: { content: [{
|
|
615
654
|
type: Input
|
|
616
655
|
}], contentLength: [{
|
|
@@ -632,11 +671,11 @@ class CardsComponent {
|
|
|
632
671
|
}
|
|
633
672
|
}
|
|
634
673
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
635
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CardsComponent, isStandalone: true, selector: "app-cards", inputs: { cardContents: "cardContents" }, outputs: { getCardConfig: "getCardConfig" }, ngImport: i0, template: "<div class=\"cards-content\">\
|
|
674
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CardsComponent, isStandalone: true, selector: "app-cards", inputs: { cardContents: "cardContents" }, outputs: { getCardConfig: "getCardConfig" }, ngImport: i0, template: "<div class=\"cards-content\">\n <ng-container *ngFor=\"let content of cardContents\">\n <div class=\"card {{content.name}}\">\n <app-content-design (clickEvent)=\"clickEvent($event)\"\n [content] = \"content\">\n </app-content-design>\n </div>\n </ng-container>\n</div>\n\n\n\n", styles: [".cards-content{display:flex;flex-direction:row;gap:20px}.content{width:33%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ContentDesignComponent, selector: "app-content-design", inputs: ["content", "contentLength"], outputs: ["clickEvent"] }] }); }
|
|
636
675
|
}
|
|
637
676
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CardsComponent, decorators: [{
|
|
638
677
|
type: Component,
|
|
639
|
-
args: [{ selector: 'app-cards', standalone: true, imports: [CommonModule, ContentDesignComponent], template: "<div class=\"cards-content\">\
|
|
678
|
+
args: [{ selector: 'app-cards', standalone: true, imports: [CommonModule, ContentDesignComponent], template: "<div class=\"cards-content\">\n <ng-container *ngFor=\"let content of cardContents\">\n <div class=\"card {{content.name}}\">\n <app-content-design (clickEvent)=\"clickEvent($event)\"\n [content] = \"content\">\n </app-content-design>\n </div>\n </ng-container>\n</div>\n\n\n\n", styles: [".cards-content{display:flex;flex-direction:row;gap:20px}.content{width:33%}\n"] }]
|
|
640
679
|
}], ctorParameters: function () { return []; }, propDecorators: { cardContents: [{
|
|
641
680
|
type: Input
|
|
642
681
|
}], getCardConfig: [{
|
|
@@ -650,13 +689,14 @@ const selectionInputTypes = [InputType.checkbox, InputType.radio, InputType.sele
|
|
|
650
689
|
|
|
651
690
|
class FormComponent {
|
|
652
691
|
constructor() {
|
|
653
|
-
this.
|
|
654
|
-
|
|
655
|
-
};
|
|
692
|
+
this.inputConfigs = [];
|
|
693
|
+
this.buttonConfig = { label: "Submit" };
|
|
694
|
+
this.validationMessages = {};
|
|
656
695
|
this.formSubmit = new EventEmitter();
|
|
657
696
|
this.formChange = new EventEmitter();
|
|
697
|
+
// ✅ Expose InputGroupType to the template
|
|
698
|
+
this.InputGroupType = InputGroupType;
|
|
658
699
|
}
|
|
659
|
-
// Define the editor configuration
|
|
660
700
|
onSubmit() {
|
|
661
701
|
if (this.formGroup.valid) {
|
|
662
702
|
this.formSubmit.emit(this.formGroup.value);
|
|
@@ -670,28 +710,29 @@ class FormComponent {
|
|
|
670
710
|
}
|
|
671
711
|
checkFormConfigType(inputType) {
|
|
672
712
|
if (inputType) {
|
|
673
|
-
if (textualInputTypes.includes(inputType))
|
|
713
|
+
if (textualInputTypes.includes(inputType))
|
|
674
714
|
return InputGroupType.textual;
|
|
675
|
-
|
|
676
|
-
if (selectionInputTypes.includes(inputType)) {
|
|
715
|
+
if (selectionInputTypes.includes(inputType))
|
|
677
716
|
return InputGroupType.selection;
|
|
678
|
-
|
|
679
|
-
if (inputType === InputType.file) {
|
|
717
|
+
if (inputType === InputType.file)
|
|
680
718
|
return InputGroupType.file;
|
|
681
|
-
|
|
682
|
-
if (inputType === InputType.datetime) {
|
|
719
|
+
if (inputType === InputType.datetime)
|
|
683
720
|
return InputGroupType.datetime;
|
|
684
|
-
}
|
|
685
721
|
}
|
|
686
722
|
return InputGroupType.textual;
|
|
687
723
|
}
|
|
724
|
+
trackByFn(index, item) {
|
|
725
|
+
return item.name;
|
|
726
|
+
}
|
|
688
727
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
689
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormComponent, isStandalone: true, selector: "app-form", inputs: { formGroup: "formGroup", inputConfigs: "inputConfigs", buttonConfig: "buttonConfig", validationMessages: "validationMessages" }, outputs: { formSubmit: "formSubmit", formChange: "formChange" }, ngImport: i0, template: "<form (ngSubmit)=\"onSubmit()\"
|
|
728
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormComponent, isStandalone: true, selector: "app-form", inputs: { formGroup: "formGroup", inputConfigs: "inputConfigs", buttonConfig: "buttonConfig", validationMessages: "validationMessages" }, outputs: { formSubmit: "formSubmit", formChange: "formChange" }, ngImport: i0, template: "<form (ngSubmit)=\"onSubmit()\" [formGroup]=\"formGroup\">\n <ng-container *ngIf=\"inputConfigs && inputConfigs.length > 0; else noInputs\">\n <ng-container *ngFor=\"let inputConfig of inputConfigs; trackBy: trackByFn\">\n\n <!-- Input Field -->\n <app-input\n *ngIf=\"checkFormConfigType(inputConfig.type) === InputGroupType.textual\"\n [formControlName]=\"inputConfig.name\"\n [config]=\"inputConfig\"\n [required]=\"inputConfig.required\"\n (valueChange)=\"onValueChange(inputConfig.name, $event)\">\n </app-input>\n\n <!-- Selection Field -->\n <app-selection\n *ngIf=\"checkFormConfigType(inputConfig.type) === InputGroupType.selection\"\n [formControlName]=\"inputConfig.name\"\n [label]=\"inputConfig.label ?? ''\"\n [options]=\"inputConfig.options\"\n (valueChange)=\"onValueChange(inputConfig.name, $event)\">\n </app-selection>\n\n <!-- File Selection -->\n <app-file-selection\n *ngIf=\"checkFormConfigType(inputConfig.type) === InputGroupType.file\"\n [formControlName]=\"inputConfig.name\"\n [label]=\"inputConfig.label ?? inputConfig.name\"\n (valueChange)=\"onValueChange(inputConfig.name, $event)\">\n </app-file-selection>\n\n <!-- Validation Messages -->\n <div *ngIf=\"formGroup.controls[inputConfig.name]?.invalid && formGroup.controls[inputConfig.name]?.touched\" class=\"error-message\">\n {{ validationMessages[inputConfig.name] || 'Invalid input' }}\n </div>\n\n </ng-container>\n </ng-container>\n\n <!-- Submit Button -->\n <app-button [config]=\"buttonConfig\"></app-button>\n</form>\n\n<!-- No Inputs Placeholder -->\n<ng-template #noInputs>\n <p>No inputs configured.</p>\n</ng-template>\n", styles: ["form{display:flex;flex-direction:column;gap:15px}label{display:block;margin-bottom:.5rem}input,textarea{width:100%;padding:.5rem;border:1px solid #ccc;border-radius:.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: InputComponent, selector: "app-input", inputs: ["config"] }, { kind: "component", type: SelectionComponent, selector: "app-selection", inputs: ["label", "options", "selectedValue", "selectedValues", "isMultiSelect", "displayType"], outputs: ["selectedChange"] }, { kind: "component", type: FileSelectionComponent, selector: "app-file-selection", inputs: ["label", "chooseFileLabel", "imageUrl", "fileName"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["config"], outputs: ["clickEvent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
|
|
690
729
|
}
|
|
691
730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, decorators: [{
|
|
692
731
|
type: Component,
|
|
693
|
-
args: [{ selector: 'app-form', standalone: true, imports: [
|
|
694
|
-
|
|
732
|
+
args: [{ selector: 'app-form', standalone: true, imports: [
|
|
733
|
+
CommonModule, InputComponent, SelectionComponent,
|
|
734
|
+
FileSelectionComponent, ButtonComponent, FormsModule, ReactiveFormsModule
|
|
735
|
+
], template: "<form (ngSubmit)=\"onSubmit()\" [formGroup]=\"formGroup\">\n <ng-container *ngIf=\"inputConfigs && inputConfigs.length > 0; else noInputs\">\n <ng-container *ngFor=\"let inputConfig of inputConfigs; trackBy: trackByFn\">\n\n <!-- Input Field -->\n <app-input\n *ngIf=\"checkFormConfigType(inputConfig.type) === InputGroupType.textual\"\n [formControlName]=\"inputConfig.name\"\n [config]=\"inputConfig\"\n [required]=\"inputConfig.required\"\n (valueChange)=\"onValueChange(inputConfig.name, $event)\">\n </app-input>\n\n <!-- Selection Field -->\n <app-selection\n *ngIf=\"checkFormConfigType(inputConfig.type) === InputGroupType.selection\"\n [formControlName]=\"inputConfig.name\"\n [label]=\"inputConfig.label ?? ''\"\n [options]=\"inputConfig.options\"\n (valueChange)=\"onValueChange(inputConfig.name, $event)\">\n </app-selection>\n\n <!-- File Selection -->\n <app-file-selection\n *ngIf=\"checkFormConfigType(inputConfig.type) === InputGroupType.file\"\n [formControlName]=\"inputConfig.name\"\n [label]=\"inputConfig.label ?? inputConfig.name\"\n (valueChange)=\"onValueChange(inputConfig.name, $event)\">\n </app-file-selection>\n\n <!-- Validation Messages -->\n <div *ngIf=\"formGroup.controls[inputConfig.name]?.invalid && formGroup.controls[inputConfig.name]?.touched\" class=\"error-message\">\n {{ validationMessages[inputConfig.name] || 'Invalid input' }}\n </div>\n\n </ng-container>\n </ng-container>\n\n <!-- Submit Button -->\n <app-button [config]=\"buttonConfig\"></app-button>\n</form>\n\n<!-- No Inputs Placeholder -->\n<ng-template #noInputs>\n <p>No inputs configured.</p>\n</ng-template>\n", styles: ["form{display:flex;flex-direction:column;gap:15px}label{display:block;margin-bottom:.5rem}input,textarea{width:100%;padding:.5rem;border:1px solid #ccc;border-radius:.25rem}\n"] }]
|
|
695
736
|
}], propDecorators: { formGroup: [{
|
|
696
737
|
type: Input
|
|
697
738
|
}], inputConfigs: [{
|
|
@@ -708,6 +749,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
708
749
|
|
|
709
750
|
class ModalComponent {
|
|
710
751
|
constructor() {
|
|
752
|
+
this.size = Size.Medium;
|
|
711
753
|
this.okConfig = {
|
|
712
754
|
label: "Ok"
|
|
713
755
|
};
|
|
@@ -736,13 +778,15 @@ class ModalComponent {
|
|
|
736
778
|
this.closeModal();
|
|
737
779
|
}
|
|
738
780
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
739
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ModalComponent, isStandalone: true, selector: "app-modal", inputs: { modalEvent: "modalEvent" }, ngImport: i0, template: "<div class=\"modal-overlay\" (click)=\"handleOverlayClick($event)\" *ngIf=\"modalEvent?.isModalVisible\">\
|
|
781
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ModalComponent, isStandalone: true, selector: "app-modal", inputs: { modalEvent: "modalEvent", size: "size" }, ngImport: i0, template: "<div class=\"modal-overlay\" (click)=\"handleOverlayClick($event)\" *ngIf=\"modalEvent?.isModalVisible\">\n <div class=\"modal-content\" [ngClass]=\"size\" (click)=\"handleContentClick($event)\">\n <div class=\"modal-header\">\n <h2>{{modalEvent.title }}</h2>\n <button class=\"close-btn\" (click)=\"closeModal()\">\n <i class=\"material-icons\">close</i>\n </button>\n </div>\n <div class=\"modal-body\">\n <div *ngIf=\"modalEvent.params && modalEvent.params['content']\">{{modalEvent.params['content'] }}</div>\n <ng-container *ngTemplateOutlet=\"modalEvent.template; context: modalEvent.params\"></ng-container>\n <div *ngIf=\"!modalEvent?.isDialog\" class=\"buttons\">\n <app-button [config]=\"okConfig\" (clickEvent)=\"ok()\"></app-button>\n <app-button [config]=\"cancelConfig\" (clickEvent)=\"cancel()\"></app-button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".modal-overlay{display:flex;align-items:center;justify-content:center;position:fixed;inset:0;width:100%;height:100%;background-color:#00000080;z-index:50}.modal-content{display:flex;flex-direction:column;background-color:#fff;color:#000;border-radius:8px;padding:2rem;width:100%;max-height:calc(100vh - 10rem)}.modal-content.small{width:30%;max-width:300px}.modal-content.medium{width:50%;max-width:600px}.modal-content.large{width:80%;max-width:900px}.modal-content.dark-mode{background-color:#27272a;color:#d1d5db}.modal-content .modal-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;position:sticky;top:0;background-color:inherit;z-index:10;border-bottom:1px solid #e5e7eb}.modal-content .modal-header h2{font-size:2rem;font-weight:700;margin:0}.modal-content .modal-header .close-btn{background:none;border:none;font-size:1.5rem;cursor:pointer;display:flex;align-items:center}.modal-content .modal-header .close-btn i.material-icons{font-size:24px;color:#888;transition:color .2s}.modal-content .modal-header .close-btn:hover i.material-icons{color:#444}.modal-content .modal-body{flex-grow:1;overflow-y:auto;padding:1rem 0;scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.modal-content .modal-body::-webkit-scrollbar{width:10px}.modal-content .modal-body::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.modal-content .modal-body::-webkit-scrollbar-thumb{background:#888;border-radius:10px;border:2px solid #f1f1f1;-webkit-transition:background .2s;transition:background .2s}.modal-content .modal-body::-webkit-scrollbar-thumb:hover{background:#555}.modal-content .buttons{display:flex;justify-content:flex-end;gap:15px;padding:1.5rem 0;border-top:1px solid #e5e7eb}p{color:#4b5563;margin-bottom:1.5rem}.dark-mode p{color:#d1d5db}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["config"], outputs: ["clickEvent"] }] }); }
|
|
740
782
|
}
|
|
741
783
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ModalComponent, decorators: [{
|
|
742
784
|
type: Component,
|
|
743
|
-
args: [{ selector: 'app-modal', standalone: true, imports: [CommonModule, ButtonComponent], template: "<div class=\"modal-overlay\" (click)=\"handleOverlayClick($event)\" *ngIf=\"modalEvent?.isModalVisible\">\
|
|
785
|
+
args: [{ selector: 'app-modal', standalone: true, imports: [CommonModule, ButtonComponent], template: "<div class=\"modal-overlay\" (click)=\"handleOverlayClick($event)\" *ngIf=\"modalEvent?.isModalVisible\">\n <div class=\"modal-content\" [ngClass]=\"size\" (click)=\"handleContentClick($event)\">\n <div class=\"modal-header\">\n <h2>{{modalEvent.title }}</h2>\n <button class=\"close-btn\" (click)=\"closeModal()\">\n <i class=\"material-icons\">close</i>\n </button>\n </div>\n <div class=\"modal-body\">\n <div *ngIf=\"modalEvent.params && modalEvent.params['content']\">{{modalEvent.params['content'] }}</div>\n <ng-container *ngTemplateOutlet=\"modalEvent.template; context: modalEvent.params\"></ng-container>\n <div *ngIf=\"!modalEvent?.isDialog\" class=\"buttons\">\n <app-button [config]=\"okConfig\" (clickEvent)=\"ok()\"></app-button>\n <app-button [config]=\"cancelConfig\" (clickEvent)=\"cancel()\"></app-button>\n </div>\n </div>\n </div>\n</div>\n", styles: [".modal-overlay{display:flex;align-items:center;justify-content:center;position:fixed;inset:0;width:100%;height:100%;background-color:#00000080;z-index:50}.modal-content{display:flex;flex-direction:column;background-color:#fff;color:#000;border-radius:8px;padding:2rem;width:100%;max-height:calc(100vh - 10rem)}.modal-content.small{width:30%;max-width:300px}.modal-content.medium{width:50%;max-width:600px}.modal-content.large{width:80%;max-width:900px}.modal-content.dark-mode{background-color:#27272a;color:#d1d5db}.modal-content .modal-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:1rem;position:sticky;top:0;background-color:inherit;z-index:10;border-bottom:1px solid #e5e7eb}.modal-content .modal-header h2{font-size:2rem;font-weight:700;margin:0}.modal-content .modal-header .close-btn{background:none;border:none;font-size:1.5rem;cursor:pointer;display:flex;align-items:center}.modal-content .modal-header .close-btn i.material-icons{font-size:24px;color:#888;transition:color .2s}.modal-content .modal-header .close-btn:hover i.material-icons{color:#444}.modal-content .modal-body{flex-grow:1;overflow-y:auto;padding:1rem 0;scrollbar-width:thin;scrollbar-color:#888 #f1f1f1}.modal-content .modal-body::-webkit-scrollbar{width:10px}.modal-content .modal-body::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.modal-content .modal-body::-webkit-scrollbar-thumb{background:#888;border-radius:10px;border:2px solid #f1f1f1;-webkit-transition:background .2s;transition:background .2s}.modal-content .modal-body::-webkit-scrollbar-thumb:hover{background:#555}.modal-content .buttons{display:flex;justify-content:flex-end;gap:15px;padding:1.5rem 0;border-top:1px solid #e5e7eb}p{color:#4b5563;margin-bottom:1.5rem}.dark-mode p{color:#d1d5db}\n"] }]
|
|
744
786
|
}], ctorParameters: function () { return []; }, propDecorators: { modalEvent: [{
|
|
745
787
|
type: Input
|
|
788
|
+
}], size: [{
|
|
789
|
+
type: Input
|
|
746
790
|
}] } });
|
|
747
791
|
|
|
748
792
|
class PaginatorComponent {
|
|
@@ -752,7 +796,8 @@ class PaginatorComponent {
|
|
|
752
796
|
label: 'Go to page',
|
|
753
797
|
direction: InputDirection.horizontal,
|
|
754
798
|
name: 'inputConfig',
|
|
755
|
-
required: false
|
|
799
|
+
required: false,
|
|
800
|
+
validator: ''
|
|
756
801
|
};
|
|
757
802
|
this.previousButtonConfig = {
|
|
758
803
|
iconValue: 'chevron_left',
|
|
@@ -844,11 +889,11 @@ class PaginatorComponent {
|
|
|
844
889
|
};
|
|
845
890
|
}
|
|
846
891
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
847
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PaginatorComponent, isStandalone: true, selector: "app-paginator", inputs: { totalRecords: "totalRecords" }, outputs: { paginator: "paginator" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"table-footer\">\
|
|
892
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PaginatorComponent, isStandalone: true, selector: "app-paginator", inputs: { totalRecords: "totalRecords" }, outputs: { paginator: "paginator" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"table-footer\">\n <div class=\"number-of-page\">\n <app-selection [options] = \"itemsPerPageList\"\n [selectedValue]=\"this.itemsPerPage\"\n (selectedChange) = \"onChangeNumberOfPage($event)\">\n </app-selection>\n <app-input [config]=\"inputConfig\"></app-input>\n </div>\n <div class=\"paginator\">\n <app-button (clickEvent)=\"selectPage(selectedPage - 1)\"\n [config]=\"previousButtonConfig\"/>\n\n <!-- Page Numbers -->\n <ng-container *ngFor=\"let page of pageNumbers\">\n <app-button\n (clickEvent)=\"selectPage(page)\"\n [config]=\"getPageButtonConfig(page)\">\n </app-button>\n </ng-container>\n\n <!-- Next Button -->\n <app-button (clickEvent)=\"selectPage(selectedPage + 1)\"\n [config]=\"nextButtonConfig\"/>\n </div>\n</div>\n", styles: ["body{color:#566787;background:#f5f5f5;font-family:Varela Round,sans-serif;font-size:13px}.table-footer{display:flex;padding:10px 0}.table-footer .number-of-page{width:70%;display:flex;align-items:center;gap:20px}.table-footer .paginator{display:flex;justify-content:flex-end;width:100%}.table-footer .paginator app-button{margin:0 2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["config"], outputs: ["clickEvent"] }, { kind: "component", type: SelectionComponent, selector: "app-selection", inputs: ["label", "options", "selectedValue", "selectedValues", "isMultiSelect", "displayType"], outputs: ["selectedChange"] }, { kind: "component", type: InputComponent, selector: "app-input", inputs: ["config"] }] }); }
|
|
848
893
|
}
|
|
849
894
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
850
895
|
type: Component,
|
|
851
|
-
args: [{ selector: 'app-paginator', standalone: true, imports: [CommonModule, ButtonComponent, SelectionComponent, InputComponent], template: "<div class=\"table-footer\">\
|
|
896
|
+
args: [{ selector: 'app-paginator', standalone: true, imports: [CommonModule, ButtonComponent, SelectionComponent, InputComponent], template: "<div class=\"table-footer\">\n <div class=\"number-of-page\">\n <app-selection [options] = \"itemsPerPageList\"\n [selectedValue]=\"this.itemsPerPage\"\n (selectedChange) = \"onChangeNumberOfPage($event)\">\n </app-selection>\n <app-input [config]=\"inputConfig\"></app-input>\n </div>\n <div class=\"paginator\">\n <app-button (clickEvent)=\"selectPage(selectedPage - 1)\"\n [config]=\"previousButtonConfig\"/>\n\n <!-- Page Numbers -->\n <ng-container *ngFor=\"let page of pageNumbers\">\n <app-button\n (clickEvent)=\"selectPage(page)\"\n [config]=\"getPageButtonConfig(page)\">\n </app-button>\n </ng-container>\n\n <!-- Next Button -->\n <app-button (clickEvent)=\"selectPage(selectedPage + 1)\"\n [config]=\"nextButtonConfig\"/>\n </div>\n</div>\n", styles: ["body{color:#566787;background:#f5f5f5;font-family:Varela Round,sans-serif;font-size:13px}.table-footer{display:flex;padding:10px 0}.table-footer .number-of-page{width:70%;display:flex;align-items:center;gap:20px}.table-footer .paginator{display:flex;justify-content:flex-end;width:100%}.table-footer .paginator app-button{margin:0 2px}\n"] }]
|
|
852
897
|
}], ctorParameters: function () { return []; }, propDecorators: { totalRecords: [{
|
|
853
898
|
type: Input
|
|
854
899
|
}], paginator: [{
|
|
@@ -874,11 +919,11 @@ class TableComponent {
|
|
|
874
919
|
this.paginator.emit(paging);
|
|
875
920
|
}
|
|
876
921
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
877
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TableComponent, isStandalone: true, selector: "app-table", inputs: { items: "items", columns: "columns", totalRecords: "totalRecords", tableName: "tableName", loadingState: "loadingState" }, outputs: { paginator: "paginator" }, queries: [{ propertyName: "bodyTemplate", first: true, predicate: ["bodyTemplate"], descendants: true }], ngImport: i0, template: "<div class=\"container-xl table-wrapper\">\
|
|
922
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TableComponent, isStandalone: true, selector: "app-table", inputs: { items: "items", columns: "columns", totalRecords: "totalRecords", tableName: "tableName", loadingState: "loadingState" }, outputs: { paginator: "paginator" }, queries: [{ propertyName: "bodyTemplate", first: true, predicate: ["bodyTemplate"], descendants: true }], ngImport: i0, template: "<div class=\"container-xl table-wrapper\">\n <div class=\"table-title\">\n <h2><b>{{tableName }}</b></h2>\n </div>\n <div class=\"loading-wrapper\">\n <ng-container *ngIf=\"!(loadingState | async); else loading; then table\">\n </ng-container>\n </div>\n <app-paginator [totalRecords] = \"totalRecords\" (paginator)=\"changePaginator($event)\"></app-paginator>\n</div>\n\n<ng-template #loading>\n <div class=\"loading-wrapper\">\n <app-loading></app-loading>\n </div>\n</ng-template>\n\n<ng-template #table>\n <ng-container *ngIf=\"totalRecords == 0; then emptyContent; else tableContent\">\n </ng-container>\n</ng-template>\n\n<ng-template #tableContent>\n <p-table [value]=\"items\" class=\"table table-striped table-hover\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th>\n <ng-content select=\"[selectAllCheckbox]\"></ng-content>\n </th>\n <ng-container *ngFor=\" let col of columns\">\n <th>{{col.name }}</th>\n </ng-container>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item>\n <ng-container [ngTemplateOutlet]=\"bodyTemplate\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n </ng-template>\n </p-table>\n</ng-template>\n\n<ng-template #emptyContent>\n <div class=\"no-record-message\">\n <div>No records</div>\n </div>\n</ng-template>\n", styles: [":host{width:100%}body{color:#566787;background:#f5f5f5;font-family:Varela Round,sans-serif;font-size:13px}.table-responsive{margin:30px 0}.table-wrapper{background:#fff;border-radius:3px;box-shadow:0 1px 1px #0000000d}.table-title{background:#435d7d;color:#fff;border-radius:3px 3px 0 0;padding:0 12px;display:flex}.table-title .table-name{width:70%}.table-title .table-add{width:30%;display:flex;align-items:center;justify-content:flex-end}.table-title .table-add a{cursor:pointer}.table-title h2{font-size:24px}.table-title .btn-group{float:right}.table-title .btn{color:#fff;float:right;font-size:13px;min-width:50px;border-radius:2px;border:none;outline:none!important;margin-left:10px}.table-title .btn i{float:left;font-size:21px;margin-right:5px}.table-title .btn span{float:left;margin-top:2px}::ng-deep .table tr th,::ng-deep .table tr td{border-color:#e9e9e9;padding:12px 15px;vertical-align:middle}::ng-deep .table tr th:first-child{width:60px;display:flex}::ng-deep .table tr th:last-child{width:150px}table.table-striped tbody tr:nth-of-type(odd){background-color:#fcfcfc}table.table-striped.table-hover tbody tr:hover{background:#f5f5f5}::ng-deep .table th{text-align:left}::ng-deep .table th i{font-size:13px;margin:0 5px;cursor:pointer}::ng-deep .table td:last-child i{opacity:.9;font-size:22px;margin:0 5px}::ng-deep .table td a{font-weight:700;color:#566787;display:inline-block;text-decoration:none;outline:none!important}.hint-text{float:left;margin-top:10px;font-size:13px}.no-record-message{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.excel{display:flex}.excel a{display:inline-flex;align-items:center}.loading-wrapper{height:calc(100vh - 220px);display:flex;flex-direction:column;width:100%;overflow-y:auto;overflow-x:hidden}.loading-wrapper::-webkit-scrollbar{width:12px}.loading-wrapper::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px;box-shadow:inset 0 0 5px #0000001a}.loading-wrapper::-webkit-scrollbar-thumb{background:#888;border-radius:10px;border:3px solid #f1f1f1;-webkit-transition:background .3s;transition:background .3s}.loading-wrapper::-webkit-scrollbar-thumb:hover{background:#555}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: LoadingComponent, selector: "app-loading", inputs: ["size", "imageSrc"] }, { kind: "component", type: PaginatorComponent, selector: "app-paginator", inputs: ["totalRecords"], outputs: ["paginator"] }] }); }
|
|
878
923
|
}
|
|
879
924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableComponent, decorators: [{
|
|
880
925
|
type: Component,
|
|
881
|
-
args: [{ selector: 'app-table', standalone: true, imports: [CommonModule, TableModule, LoadingComponent, PaginatorComponent], template: "<div class=\"container-xl table-wrapper\">\
|
|
926
|
+
args: [{ selector: 'app-table', standalone: true, imports: [CommonModule, TableModule, LoadingComponent, PaginatorComponent], template: "<div class=\"container-xl table-wrapper\">\n <div class=\"table-title\">\n <h2><b>{{tableName }}</b></h2>\n </div>\n <div class=\"loading-wrapper\">\n <ng-container *ngIf=\"!(loadingState | async); else loading; then table\">\n </ng-container>\n </div>\n <app-paginator [totalRecords] = \"totalRecords\" (paginator)=\"changePaginator($event)\"></app-paginator>\n</div>\n\n<ng-template #loading>\n <div class=\"loading-wrapper\">\n <app-loading></app-loading>\n </div>\n</ng-template>\n\n<ng-template #table>\n <ng-container *ngIf=\"totalRecords == 0; then emptyContent; else tableContent\">\n </ng-container>\n</ng-template>\n\n<ng-template #tableContent>\n <p-table [value]=\"items\" class=\"table table-striped table-hover\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th>\n <ng-content select=\"[selectAllCheckbox]\"></ng-content>\n </th>\n <ng-container *ngFor=\" let col of columns\">\n <th>{{col.name }}</th>\n </ng-container>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-item>\n <ng-container [ngTemplateOutlet]=\"bodyTemplate\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n </ng-template>\n </p-table>\n</ng-template>\n\n<ng-template #emptyContent>\n <div class=\"no-record-message\">\n <div>No records</div>\n </div>\n</ng-template>\n", styles: [":host{width:100%}body{color:#566787;background:#f5f5f5;font-family:Varela Round,sans-serif;font-size:13px}.table-responsive{margin:30px 0}.table-wrapper{background:#fff;border-radius:3px;box-shadow:0 1px 1px #0000000d}.table-title{background:#435d7d;color:#fff;border-radius:3px 3px 0 0;padding:0 12px;display:flex}.table-title .table-name{width:70%}.table-title .table-add{width:30%;display:flex;align-items:center;justify-content:flex-end}.table-title .table-add a{cursor:pointer}.table-title h2{font-size:24px}.table-title .btn-group{float:right}.table-title .btn{color:#fff;float:right;font-size:13px;min-width:50px;border-radius:2px;border:none;outline:none!important;margin-left:10px}.table-title .btn i{float:left;font-size:21px;margin-right:5px}.table-title .btn span{float:left;margin-top:2px}::ng-deep .table tr th,::ng-deep .table tr td{border-color:#e9e9e9;padding:12px 15px;vertical-align:middle}::ng-deep .table tr th:first-child{width:60px;display:flex}::ng-deep .table tr th:last-child{width:150px}table.table-striped tbody tr:nth-of-type(odd){background-color:#fcfcfc}table.table-striped.table-hover tbody tr:hover{background:#f5f5f5}::ng-deep .table th{text-align:left}::ng-deep .table th i{font-size:13px;margin:0 5px;cursor:pointer}::ng-deep .table td:last-child i{opacity:.9;font-size:22px;margin:0 5px}::ng-deep .table td a{font-weight:700;color:#566787;display:inline-block;text-decoration:none;outline:none!important}.hint-text{float:left;margin-top:10px;font-size:13px}.no-record-message{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.excel{display:flex}.excel a{display:inline-flex;align-items:center}.loading-wrapper{height:calc(100vh - 220px);display:flex;flex-direction:column;width:100%;overflow-y:auto;overflow-x:hidden}.loading-wrapper::-webkit-scrollbar{width:12px}.loading-wrapper::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px;box-shadow:inset 0 0 5px #0000001a}.loading-wrapper::-webkit-scrollbar-thumb{background:#888;border-radius:10px;border:3px solid #f1f1f1;-webkit-transition:background .3s;transition:background .3s}.loading-wrapper::-webkit-scrollbar-thumb:hover{background:#555}\n"] }]
|
|
882
927
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { items: [{
|
|
883
928
|
type: Input
|
|
884
929
|
}], columns: [{
|
|
@@ -922,11 +967,11 @@ class FormatedTextComponent {
|
|
|
922
967
|
}
|
|
923
968
|
ngOnInit() { }
|
|
924
969
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormatedTextComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
925
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormatedTextComponent, isStandalone: true, selector: "app-formated-text", inputs: { content: "content" }, ngImport: i0, template: "<app-content-design [content] = \"content\"></app-content-design>\
|
|
970
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormatedTextComponent, isStandalone: true, selector: "app-formated-text", inputs: { content: "content" }, ngImport: i0, template: "<app-content-design [content] = \"content\"></app-content-design>\n<br/>\n<div [innerHTML]=\"safeContent\"></div>\n", styles: [""], dependencies: [{ kind: "component", type: ContentDesignComponent, selector: "app-content-design", inputs: ["content", "contentLength"], outputs: ["clickEvent"] }] }); }
|
|
926
971
|
}
|
|
927
972
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormatedTextComponent, decorators: [{
|
|
928
973
|
type: Component,
|
|
929
|
-
args: [{ selector: 'app-formated-text', standalone: true, imports: [ContentDesignComponent], template: "<app-content-design [content] = \"content\"></app-content-design>\
|
|
974
|
+
args: [{ selector: 'app-formated-text', standalone: true, imports: [ContentDesignComponent], template: "<app-content-design [content] = \"content\"></app-content-design>\n<br/>\n<div [innerHTML]=\"safeContent\"></div>\n" }]
|
|
930
975
|
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; }, propDecorators: { content: [{
|
|
931
976
|
type: Input
|
|
932
977
|
}] } });
|
|
@@ -936,11 +981,11 @@ class FooterComponent {
|
|
|
936
981
|
ngOnInit() {
|
|
937
982
|
}
|
|
938
983
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
939
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FooterComponent, isStandalone: true, selector: "app-footer", ngImport: i0, template: "<footer class=\"footer\">\
|
|
984
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FooterComponent, isStandalone: true, selector: "app-footer", ngImport: i0, template: "<footer class=\"footer\">\n <div class=\"footer-container\">\n <div class=\"footer-section\">\n <h3>About Us</h3>\n <p>We are a company dedicated to providing excellent services and products to our customers.</p>\n </div>\n\n <div class=\"footer-section\">\n <h3>Quick Links</h3>\n <ul>\n <li><a href=\"#\">Home</a></li>\n <li><a href=\"#\">Services</a></li>\n <li><a href=\"#\">Contact</a></li>\n <li><a href=\"#\">Privacy Policy</a></li>\n </ul>\n </div>\n\n <div class=\"footer-section\">\n <h3>Follow Us</h3>\n <div class=\"social-icons\">\n <a href=\"#\" aria-label=\"Facebook\"><i class=\"fab fa-facebook-f\"></i></a>\n <a href=\"#\" aria-label=\"Twitter\"><i class=\"fab fa-twitter\"></i></a>\n <a href=\"#\" aria-label=\"Instagram\"><i class=\"fab fa-instagram\"></i></a>\n <a href=\"#\" aria-label=\"LinkedIn\"><i class=\"fab fa-linkedin-in\"></i></a>\n </div>\n </div>\n </div>\n\n <div class=\"footer-bottom\">\n <p>© 2024 Your Company. All Rights Reserved.</p>\n </div>\n</footer>\n", styles: [".footer{background-color:#333;color:#fff;padding:20px 0;text-align:center;font-family:Roboto,sans-serif}.footer-container{display:flex;justify-content:space-around;flex-wrap:wrap;max-width:1200px;margin:0 auto}.footer-section{flex:1;margin:15px;min-width:200px}.footer-section h3{margin-bottom:15px;font-size:18px}.footer-section p,.footer-section ul,.footer-section a{font-size:14px;color:#ccc;text-decoration:none}.footer-section ul{list-style:none;padding:0}.footer-section ul li{margin:5px 0}.footer-section ul li a:hover{color:#fff}.social-icons{margin-top:10px}.social-icons a{display:inline-block;color:#ccc;margin:0 10px;font-size:20px}.social-icons a:hover{color:#fff}.footer-bottom{margin-top:20px;border-top:1px solid #444;padding-top:10px;font-size:12px}\n"] }); }
|
|
940
985
|
}
|
|
941
986
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FooterComponent, decorators: [{
|
|
942
987
|
type: Component,
|
|
943
|
-
args: [{ selector: 'app-footer', standalone: true, template: "<footer class=\"footer\">\
|
|
988
|
+
args: [{ selector: 'app-footer', standalone: true, template: "<footer class=\"footer\">\n <div class=\"footer-container\">\n <div class=\"footer-section\">\n <h3>About Us</h3>\n <p>We are a company dedicated to providing excellent services and products to our customers.</p>\n </div>\n\n <div class=\"footer-section\">\n <h3>Quick Links</h3>\n <ul>\n <li><a href=\"#\">Home</a></li>\n <li><a href=\"#\">Services</a></li>\n <li><a href=\"#\">Contact</a></li>\n <li><a href=\"#\">Privacy Policy</a></li>\n </ul>\n </div>\n\n <div class=\"footer-section\">\n <h3>Follow Us</h3>\n <div class=\"social-icons\">\n <a href=\"#\" aria-label=\"Facebook\"><i class=\"fab fa-facebook-f\"></i></a>\n <a href=\"#\" aria-label=\"Twitter\"><i class=\"fab fa-twitter\"></i></a>\n <a href=\"#\" aria-label=\"Instagram\"><i class=\"fab fa-instagram\"></i></a>\n <a href=\"#\" aria-label=\"LinkedIn\"><i class=\"fab fa-linkedin-in\"></i></a>\n </div>\n </div>\n </div>\n\n <div class=\"footer-bottom\">\n <p>© 2024 Your Company. All Rights Reserved.</p>\n </div>\n</footer>\n", styles: [".footer{background-color:#333;color:#fff;padding:20px 0;text-align:center;font-family:Roboto,sans-serif}.footer-container{display:flex;justify-content:space-around;flex-wrap:wrap;max-width:1200px;margin:0 auto}.footer-section{flex:1;margin:15px;min-width:200px}.footer-section h3{margin-bottom:15px;font-size:18px}.footer-section p,.footer-section ul,.footer-section a{font-size:14px;color:#ccc;text-decoration:none}.footer-section ul{list-style:none;padding:0}.footer-section ul li{margin:5px 0}.footer-section ul li a:hover{color:#fff}.social-icons{margin-top:10px}.social-icons a{display:inline-block;color:#ccc;margin:0 10px;font-size:20px}.social-icons a:hover{color:#fff}.footer-bottom{margin-top:20px;border-top:1px solid #444;padding-top:10px;font-size:12px}\n"] }]
|
|
944
989
|
}], ctorParameters: function () { return []; } });
|
|
945
990
|
|
|
946
991
|
class LoginComponent {
|
|
@@ -950,19 +995,17 @@ class LoginComponent {
|
|
|
950
995
|
}
|
|
951
996
|
// After the view initializes, we render the button
|
|
952
997
|
ngAfterViewInit() {
|
|
953
|
-
// Clear any existing content in the container
|
|
954
|
-
this.buttonContainer.clear();
|
|
955
998
|
// Render the provided button template inside the container
|
|
956
999
|
if (this.buttonTemplate) {
|
|
957
1000
|
this.buttonContainer.createEmbeddedView(this.buttonTemplate);
|
|
958
1001
|
}
|
|
959
1002
|
}
|
|
960
1003
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
961
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LoginComponent, isStandalone: true, selector: "app-login", inputs: { buttonTemplate: "buttonTemplate" }, viewQueries: [{ propertyName: "buttonContainer", first: true, predicate: ["buttonContainer"], descendants: true }], ngImport: i0, template: "<div class=\"login-page\">\
|
|
1004
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LoginComponent, isStandalone: true, selector: "app-login", inputs: { buttonTemplate: "buttonTemplate" }, viewQueries: [{ propertyName: "buttonContainer", first: true, predicate: ["buttonContainer"], descendants: true }], ngImport: i0, template: "<div class=\"login-page\">\n <div class=\"icon-area\">\n <div class=\"icon\">\n <span>innocons</span>\n </div>\n </div>\n <div class=\"login-button\" id=\"buttonDiv\">\n <ng-template #buttonContainer></ng-template>\n </div>\n</div>\n", styles: [".login-button{width:100%;align-items:center;justify-content:center;display:flex}.login-page{height:100%;width:100%;flex-direction:row;display:flex}.icon-area{width:38%;background-color:#2a76d7;height:100%;display:flex}.icon{width:100%;align-items:center;justify-content:center;display:flex}.icon span{color:#fff;font-size:xxx-large;font-family:fantasy}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
962
1005
|
}
|
|
963
1006
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoginComponent, decorators: [{
|
|
964
1007
|
type: Component,
|
|
965
|
-
args: [{ selector: 'app-login', standalone: true, imports: [CommonModule], template: "<div class=\"login-page\">\
|
|
1008
|
+
args: [{ selector: 'app-login', standalone: true, imports: [CommonModule], template: "<div class=\"login-page\">\n <div class=\"icon-area\">\n <div class=\"icon\">\n <span>innocons</span>\n </div>\n </div>\n <div class=\"login-button\" id=\"buttonDiv\">\n <ng-template #buttonContainer></ng-template>\n </div>\n</div>\n", styles: [".login-button{width:100%;align-items:center;justify-content:center;display:flex}.login-page{height:100%;width:100%;flex-direction:row;display:flex}.icon-area{width:38%;background-color:#2a76d7;height:100%;display:flex}.icon{width:100%;align-items:center;justify-content:center;display:flex}.icon span{color:#fff;font-size:xxx-large;font-family:fantasy}\n"] }]
|
|
966
1009
|
}], ctorParameters: function () { return []; }, propDecorators: { buttonTemplate: [{
|
|
967
1010
|
type: Input
|
|
968
1011
|
}], buttonContainer: [{
|
|
@@ -974,7 +1017,7 @@ class MenuWidgetComponent {
|
|
|
974
1017
|
constructor() {
|
|
975
1018
|
// Input for menu items
|
|
976
1019
|
this.items = [];
|
|
977
|
-
this.position = {
|
|
1020
|
+
this.position = { left: '0px' };
|
|
978
1021
|
// Output for item selection event
|
|
979
1022
|
this.itemSelected = new EventEmitter();
|
|
980
1023
|
}
|
|
@@ -988,11 +1031,11 @@ class MenuWidgetComponent {
|
|
|
988
1031
|
}
|
|
989
1032
|
}
|
|
990
1033
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
991
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MenuWidgetComponent, isStandalone: true, selector: "app-menu-widget", inputs: { items: "items", position: "position" }, outputs: { itemSelected: "itemSelected" }, ngImport: i0, template: "<div class=\"menu-widget\" [ngStyle]=\"{ top: position.top, left: position.left }\">\n <ul>\n <li *ngFor=\"let item of items\"\n [class.disabled]=\"item.isToggled\"\n (click)=\"onItemClick(item)\">\n {{ item.label }}\n </li>\n </ul>\n</div>\n", styles: [".menu-widget{position:absolute;background-color:#fff;border:1px solid #ccc;padding:10px;list-style:none;box-shadow:0 2px 10px #0000001a;z-index:1000}.menu-widget ul{margin:0;padding:0;list-style:none}.menu-widget li{padding:8px 12px;cursor:pointer;transition:background-color .2s ease}.menu-widget li:hover{background-color:#f0f0f0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
1034
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MenuWidgetComponent, isStandalone: true, selector: "app-menu-widget", inputs: { items: "items", position: "position" }, outputs: { itemSelected: "itemSelected" }, ngImport: i0, template: "<div class=\"menu-widget\" [ngStyle]=\"{ top: position.top ?? 'auto', left: position.left, bottom: position.bottom ?? 'auto' }\">\n <ul>\n <li *ngFor=\"let item of items\"\n [class.disabled]=\"item.isToggled\"\n (click)=\"onItemClick(item)\">\n {{ item.label }}\n </li>\n </ul>\n</div>\n", styles: [".menu-widget{position:absolute;background-color:#fff;border:1px solid #ccc;padding:10px;list-style:none;box-shadow:0 2px 10px #0000001a;z-index:1000}.menu-widget ul{margin:0;padding:0;list-style:none}.menu-widget li{padding:8px 12px;cursor:pointer;transition:background-color .2s ease}.menu-widget li:hover{background-color:#f0f0f0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
992
1035
|
}
|
|
993
1036
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuWidgetComponent, decorators: [{
|
|
994
1037
|
type: Component,
|
|
995
|
-
args: [{ selector: 'app-menu-widget', standalone: true, imports: [CommonModule], template: "<div class=\"menu-widget\" [ngStyle]=\"{ top: position.top, left: position.left }\">\n <ul>\n <li *ngFor=\"let item of items\"\n [class.disabled]=\"item.isToggled\"\n (click)=\"onItemClick(item)\">\n {{ item.label }}\n </li>\n </ul>\n</div>\n", styles: [".menu-widget{position:absolute;background-color:#fff;border:1px solid #ccc;padding:10px;list-style:none;box-shadow:0 2px 10px #0000001a;z-index:1000}.menu-widget ul{margin:0;padding:0;list-style:none}.menu-widget li{padding:8px 12px;cursor:pointer;transition:background-color .2s ease}.menu-widget li:hover{background-color:#f0f0f0}\n"] }]
|
|
1038
|
+
args: [{ selector: 'app-menu-widget', standalone: true, imports: [CommonModule], template: "<div class=\"menu-widget\" [ngStyle]=\"{ top: position.top ?? 'auto', left: position.left, bottom: position.bottom ?? 'auto' }\">\n <ul>\n <li *ngFor=\"let item of items\"\n [class.disabled]=\"item.isToggled\"\n (click)=\"onItemClick(item)\">\n {{ item.label }}\n </li>\n </ul>\n</div>\n", styles: [".menu-widget{position:absolute;background-color:#fff;border:1px solid #ccc;padding:10px;list-style:none;box-shadow:0 2px 10px #0000001a;z-index:1000}.menu-widget ul{margin:0;padding:0;list-style:none}.menu-widget li{padding:8px 12px;cursor:pointer;transition:background-color .2s ease}.menu-widget li:hover{background-color:#f0f0f0}\n"] }]
|
|
996
1039
|
}], propDecorators: { items: [{
|
|
997
1040
|
type: Input
|
|
998
1041
|
}], position: [{
|
|
@@ -1005,17 +1048,22 @@ class MenuComponent {
|
|
|
1005
1048
|
constructor() {
|
|
1006
1049
|
this.menuItems = [];
|
|
1007
1050
|
this.logoUrl = '';
|
|
1051
|
+
this.logoRouter = '/';
|
|
1008
1052
|
this.direction = MenuDirection.horizontal;
|
|
1009
1053
|
this.languageMenuItems = [];
|
|
1010
1054
|
this.languageSelected = new EventEmitter();
|
|
1011
1055
|
this.loginSelected = new EventEmitter();
|
|
1012
|
-
this.
|
|
1013
|
-
this.
|
|
1056
|
+
this.logoutSelected = new EventEmitter();
|
|
1057
|
+
this.languageMenuPosition = { left: '0px' };
|
|
1058
|
+
this.loginMenuPosition = { left: '0px' };
|
|
1014
1059
|
this.isLanguageMenuVisible = false;
|
|
1015
1060
|
this.isLoginMenuVisible = false;
|
|
1016
1061
|
this.loginItems = [
|
|
1017
1062
|
{ label: 'login', value: 'login', callback: () => this.login(), },
|
|
1018
1063
|
];
|
|
1064
|
+
this.logoutItems = [
|
|
1065
|
+
{ label: 'logout', value: 'logout', callback: () => this.logout(), },
|
|
1066
|
+
];
|
|
1019
1067
|
}
|
|
1020
1068
|
ngOnInit() { }
|
|
1021
1069
|
// Getters for menu direction
|
|
@@ -1044,6 +1092,9 @@ class MenuComponent {
|
|
|
1044
1092
|
onLoginMenuItemSelected(item) {
|
|
1045
1093
|
item.callback;
|
|
1046
1094
|
}
|
|
1095
|
+
onLogoutMenuItemSelected(item) {
|
|
1096
|
+
item.callback;
|
|
1097
|
+
}
|
|
1047
1098
|
// Hide menu if clicked outside of the relevant areas
|
|
1048
1099
|
handleClickOutside(event) {
|
|
1049
1100
|
const target = event.target;
|
|
@@ -1061,32 +1112,49 @@ class MenuComponent {
|
|
|
1061
1112
|
// Calculate the position for the widget
|
|
1062
1113
|
calculatePosition(triggerElement, offset = 50) {
|
|
1063
1114
|
const rect = triggerElement.getBoundingClientRect();
|
|
1115
|
+
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
|
1116
|
+
const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
|
|
1117
|
+
if (this.direction === MenuDirection.horizontal) {
|
|
1118
|
+
return {
|
|
1119
|
+
top: `${rect.bottom + scrollTop}px`,
|
|
1120
|
+
left: `${rect.left + scrollLeft - offset}px`
|
|
1121
|
+
};
|
|
1122
|
+
}
|
|
1064
1123
|
return {
|
|
1065
|
-
|
|
1066
|
-
|
|
1124
|
+
left: `${rect.left + scrollLeft + 210}px`,
|
|
1125
|
+
bottom: `${window.innerHeight - rect.bottom}px`
|
|
1067
1126
|
};
|
|
1068
1127
|
}
|
|
1069
1128
|
login() {
|
|
1070
1129
|
this.loginSelected.emit();
|
|
1071
1130
|
}
|
|
1131
|
+
logout() {
|
|
1132
|
+
this.logoutSelected.emit();
|
|
1133
|
+
}
|
|
1072
1134
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1073
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MenuComponent, isStandalone: true, selector: "app-menu", inputs: { menuItems: "menuItems", logoUrl: "logoUrl", direction: "direction", languageMenuItems: "languageMenuItems" }, outputs: { languageSelected: "languageSelected", loginSelected: "loginSelected" }, host: { listeners: { "document:click": "handleClickOutside($event)" } }, ngImport: i0, template: "<nav class=\"menu\" [ngClass]=\"{ 'vertical': isVertical, 'horizontal': !isVertical }\">\
|
|
1135
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MenuComponent, isStandalone: true, selector: "app-menu", inputs: { menuItems: "menuItems", logoUrl: "logoUrl", logoRouter: "logoRouter", direction: "direction", languageMenuItems: "languageMenuItems", loginUser: "loginUser" }, outputs: { languageSelected: "languageSelected", loginSelected: "loginSelected", logoutSelected: "logoutSelected" }, host: { listeners: { "document:click": "handleClickOutside($event)" } }, ngImport: i0, template: "<nav class=\"menu\" [ngClass]=\"{ 'vertical': isVertical, 'horizontal': !isVertical }\">\n <div class=\"logo\">\n <a [routerLink]=\"logoRouter\">\n <img [src]=\"logoUrl\" alt=\"Logo\" />\n </a>\n </div>\n <ul>\n <li *ngFor=\"let item of menuItems\">\n <a [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\">{{ item.label }}</a>\n </li>\n </ul>\n <div class=\"actions\">\n <!-- Language selector -->\n <div class=\"language\" (click)=\"toggleLanguageMenu($event)\">\n <span class=\"material-icons\" aria-hidden=\"true\">language</span>\n </div>\n <app-menu-widget *ngIf=\"isLanguageMenuVisible\"\n [items]=\"languageMenuItems\"\n (itemSelected)=\"onLanguageSelected($event)\"\n [position]=\"languageMenuPosition\">\n </app-menu-widget>\n\n <!-- Login menu -->\n <div class=\"login\" (click)=\"toggleLoginMenu($event)\">\n <ng-container *ngIf=\"loginUser?.picture; else defaultIcon\">\n <img [src]=\"loginUser?.picture\" alt=\"User Avatar\" class=\"user-avatar\" />\n </ng-container>\n <ng-template #defaultIcon>\n <span class=\"material-icons\" aria-hidden=\"true\">person</span>\n </ng-template>\n </div>\n <app-menu-widget *ngIf=\"isLoginMenuVisible && !loginUser\"\n [items]=\"loginItems\"\n (itemSelected)=\"onLoginMenuItemSelected($event)\"\n [position]=\"loginMenuPosition\">\n </app-menu-widget>\n <app-menu-widget *ngIf=\"isLoginMenuVisible && loginUser\"\n [items]=\"logoutItems\"\n (itemSelected)=\"onLogoutMenuItemSelected($event)\"\n [position]=\"loginMenuPosition\">\n </app-menu-widget>\n </div>\n</nav>\n", styles: [":host{display:flex}.menu{background-color:#f8f9fa;padding:10px;box-shadow:0 2px 5px #0000001a}.menu.vertical{display:flex;justify-content:space-between;flex-direction:column;width:200px}.menu.vertical ul{list-style-type:none;padding:0;height:100%}.menu.vertical ul li{padding:8px 0}.menu.vertical ul li:hover{background-color:#e9ecef;cursor:pointer}.menu.vertical .actions{display:flex;flex-direction:column;align-items:baseline}.menu.horizontal{display:flex;flex-direction:row;width:100%;height:80px}.menu.horizontal ul{display:flex;list-style-type:none;padding:0;margin:0;flex-grow:1;align-items:center}.menu.horizontal ul li a{padding:18px 26px}.menu.horizontal ul li a:hover{background-color:#e9ecef;cursor:pointer}.menu .logo img{width:100%;height:100%;max-height:60px}.menu .actions{display:flex;align-items:center}.menu .actions .language,.menu .actions .login{margin-left:10px}.menu .actions .language img,.menu .actions .login img{border-radius:50%}a{text-decoration:none;color:inherit;display:block;padding:10px;transition:background-color .3s ease}a.active{color:#f6ad15;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2$2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: MenuWidgetComponent, selector: "app-menu-widget", inputs: ["items", "position"], outputs: ["itemSelected"] }] }); }
|
|
1074
1136
|
}
|
|
1075
1137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MenuComponent, decorators: [{
|
|
1076
1138
|
type: Component,
|
|
1077
|
-
args: [{ selector: 'app-menu', standalone: true, imports: [CommonModule, RouterModule, MenuWidgetComponent], template: "<nav class=\"menu\" [ngClass]=\"{ 'vertical': isVertical, 'horizontal': !isVertical }\">\
|
|
1139
|
+
args: [{ selector: 'app-menu', standalone: true, imports: [CommonModule, RouterModule, MenuWidgetComponent], template: "<nav class=\"menu\" [ngClass]=\"{ 'vertical': isVertical, 'horizontal': !isVertical }\">\n <div class=\"logo\">\n <a [routerLink]=\"logoRouter\">\n <img [src]=\"logoUrl\" alt=\"Logo\" />\n </a>\n </div>\n <ul>\n <li *ngFor=\"let item of menuItems\">\n <a [routerLink]=\"item.route\"\n routerLinkActive=\"active\"\n [routerLinkActiveOptions]=\"{ exact: true }\">{{ item.label }}</a>\n </li>\n </ul>\n <div class=\"actions\">\n <!-- Language selector -->\n <div class=\"language\" (click)=\"toggleLanguageMenu($event)\">\n <span class=\"material-icons\" aria-hidden=\"true\">language</span>\n </div>\n <app-menu-widget *ngIf=\"isLanguageMenuVisible\"\n [items]=\"languageMenuItems\"\n (itemSelected)=\"onLanguageSelected($event)\"\n [position]=\"languageMenuPosition\">\n </app-menu-widget>\n\n <!-- Login menu -->\n <div class=\"login\" (click)=\"toggleLoginMenu($event)\">\n <ng-container *ngIf=\"loginUser?.picture; else defaultIcon\">\n <img [src]=\"loginUser?.picture\" alt=\"User Avatar\" class=\"user-avatar\" />\n </ng-container>\n <ng-template #defaultIcon>\n <span class=\"material-icons\" aria-hidden=\"true\">person</span>\n </ng-template>\n </div>\n <app-menu-widget *ngIf=\"isLoginMenuVisible && !loginUser\"\n [items]=\"loginItems\"\n (itemSelected)=\"onLoginMenuItemSelected($event)\"\n [position]=\"loginMenuPosition\">\n </app-menu-widget>\n <app-menu-widget *ngIf=\"isLoginMenuVisible && loginUser\"\n [items]=\"logoutItems\"\n (itemSelected)=\"onLogoutMenuItemSelected($event)\"\n [position]=\"loginMenuPosition\">\n </app-menu-widget>\n </div>\n</nav>\n", styles: [":host{display:flex}.menu{background-color:#f8f9fa;padding:10px;box-shadow:0 2px 5px #0000001a}.menu.vertical{display:flex;justify-content:space-between;flex-direction:column;width:200px}.menu.vertical ul{list-style-type:none;padding:0;height:100%}.menu.vertical ul li{padding:8px 0}.menu.vertical ul li:hover{background-color:#e9ecef;cursor:pointer}.menu.vertical .actions{display:flex;flex-direction:column;align-items:baseline}.menu.horizontal{display:flex;flex-direction:row;width:100%;height:80px}.menu.horizontal ul{display:flex;list-style-type:none;padding:0;margin:0;flex-grow:1;align-items:center}.menu.horizontal ul li a{padding:18px 26px}.menu.horizontal ul li a:hover{background-color:#e9ecef;cursor:pointer}.menu .logo img{width:100%;height:100%;max-height:60px}.menu .actions{display:flex;align-items:center}.menu .actions .language,.menu .actions .login{margin-left:10px}.menu .actions .language img,.menu .actions .login img{border-radius:50%}a{text-decoration:none;color:inherit;display:block;padding:10px;transition:background-color .3s ease}a.active{color:#f6ad15;font-weight:700}\n"] }]
|
|
1078
1140
|
}], ctorParameters: function () { return []; }, propDecorators: { menuItems: [{
|
|
1079
1141
|
type: Input
|
|
1080
1142
|
}], logoUrl: [{
|
|
1081
1143
|
type: Input
|
|
1144
|
+
}], logoRouter: [{
|
|
1145
|
+
type: Input
|
|
1082
1146
|
}], direction: [{
|
|
1083
1147
|
type: Input
|
|
1084
1148
|
}], languageMenuItems: [{
|
|
1085
1149
|
type: Input
|
|
1150
|
+
}], loginUser: [{
|
|
1151
|
+
type: Input
|
|
1086
1152
|
}], languageSelected: [{
|
|
1087
1153
|
type: Output
|
|
1088
1154
|
}], loginSelected: [{
|
|
1089
1155
|
type: Output
|
|
1156
|
+
}], logoutSelected: [{
|
|
1157
|
+
type: Output
|
|
1090
1158
|
}], handleClickOutside: [{
|
|
1091
1159
|
type: HostListener,
|
|
1092
1160
|
args: ['document:click', ['$event']]
|
|
@@ -1137,5 +1205,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1137
1205
|
* Generated bundle index. Do not edit.
|
|
1138
1206
|
*/
|
|
1139
1207
|
|
|
1140
|
-
export { AngularDumbLibComponent, AngularDumbLibModule, AngularDumbLibService, ButtonComponent, ButtonType, CardsComponent, ContentDesignComponent, ContentDirection, DatetimePickerComponent, DesignType, DetailComponent, FileSelectionComponent, FooterComponent, FormComponent, FormatedTextComponent, InputComponent, InputDirection, InputGroupType, InputType, LoadingComponent,
|
|
1208
|
+
export { AngularDumbLibComponent, AngularDumbLibModule, AngularDumbLibService, ButtonComponent, ButtonType, CRUDType, CardsComponent, ContentDesignComponent, ContentDirection, DatetimePickerComponent, DesignType, DetailComponent, FileSelectionComponent, FooterComponent, FormComponent, FormatedTextComponent, InputComponent, InputDirection, InputGroupType, InputType, LoadingComponent, LoadingType, LoginComponent, MenuComponent, MenuDirection, ModalComponent, PaginatorComponent, ScrollToTopComponent, SelectionComponent, SelectionType, Size, SliderComponent, TableComponent, TagsComponent, VersionComponent, WidgetPosition };
|
|
1141
1209
|
//# sourceMappingURL=angular-dumb-lib.mjs.map
|