@lenne.tech/ng-base 14.0.3 → 14.1.0
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/base-components/base-components.module.d.ts +20 -17
- package/base-components/components/model-form/model-form.component.d.ts +9 -4
- package/base-components/components/model-form-sub/model-form-sub.component.d.ts +7 -3
- package/base-components/components/model-table/model-table.component.d.ts +14 -5
- package/base-components/components/refence-input/refence-input.component.d.ts +10 -4
- package/{shared → base-components}/directives/back-button.directive.d.ts +1 -1
- package/{src → base-components}/directives/context-menu.directive.d.ts +0 -0
- package/{shared → base-components}/directives/sort.directive.d.ts +2 -2
- package/base-components/public-api.d.ts +3 -0
- package/esm2020/base-components/base-components.module.mjs +16 -1
- package/esm2020/base-components/components/model-form/model-form.component.mjs +87 -58
- package/esm2020/base-components/components/model-form-sub/model-form-sub.component.mjs +9 -3
- package/esm2020/base-components/components/model-table/model-table.component.mjs +30 -13
- package/esm2020/base-components/components/refence-input/refence-input.component.mjs +28 -22
- package/esm2020/base-components/components/tags/tags.component.mjs +2 -2
- package/esm2020/base-components/components/upload-image/upload-image.component.mjs +3 -5
- package/esm2020/{shared → base-components}/directives/back-button.directive.mjs +2 -2
- package/esm2020/base-components/directives/context-menu.directive.mjs +108 -0
- package/esm2020/base-components/directives/sort.directive.mjs +54 -0
- package/esm2020/base-components/public-api.mjs +5 -1
- package/esm2020/public-api.mjs +1 -2
- package/esm2020/shared/classes/graphql-meta.class.mjs +52 -28
- package/esm2020/shared/classes/graphql-type.class.mjs +2 -1
- package/esm2020/shared/classes/sort.class.mjs +1 -8
- package/esm2020/shared/public-api.mjs +2 -4
- package/esm2020/shared/services/cms.service.mjs +75 -0
- package/esm2020/shared/services/graphql.service.mjs +30 -36
- package/esm2020/src/base.module.mjs +1 -5
- package/fesm2015/lenne.tech-ng-base-base-components.mjs +361 -114
- package/fesm2015/lenne.tech-ng-base-base-components.mjs.map +1 -1
- package/fesm2015/lenne.tech-ng-base-shared.mjs +203 -190
- package/fesm2015/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/fesm2015/lenne.tech-ng-base.mjs +2 -113
- package/fesm2015/lenne.tech-ng-base.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-base-components.mjs +340 -99
- package/fesm2020/lenne.tech-ng-base-base-components.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-shared.mjs +201 -188
- package/fesm2020/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base.mjs +2 -112
- package/fesm2020/lenne.tech-ng-base.mjs.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/shared/classes/graphql-meta.class.d.ts +7 -4
- package/shared/classes/graphql-type.class.d.ts +1 -0
- package/shared/classes/sort.class.d.ts +0 -7
- package/shared/public-api.d.ts +1 -2
- package/shared/services/cms.service.d.ts +23 -0
- package/shared/services/graphql.service.d.ts +4 -4
- package/src/base.module.d.ts +9 -10
- package/esm2020/shared/directives/sort.directive.mjs +0 -54
- package/esm2020/src/directives/context-menu.directive.mjs +0 -109
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, Input, Output, ViewChild, NgModule } from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, Input, Output, ViewChild, Directive, Inject, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { UntypedFormControl, Validators, UntypedFormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i2 from '@angular/common';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
7
7
|
import { trigger, transition, query, style, animate } from '@angular/animations';
|
|
8
8
|
import { Subscription } from 'rxjs';
|
|
9
9
|
import * as i1$1 from '@lenne.tech/ng-base/shared';
|
|
10
|
-
import { ToastType, GraphQLRequestType, BasicUser } from '@lenne.tech/ng-base/shared';
|
|
10
|
+
import { ToastType, Sort, GraphQLRequestType, BasicUser } from '@lenne.tech/ng-base/shared';
|
|
11
11
|
import * as i2$1 from '@angular/router';
|
|
12
12
|
import * as i1$2 from '@angular/common/http';
|
|
13
13
|
import { HttpHeaders } from '@angular/common/http';
|
|
@@ -323,7 +323,7 @@ class TagsComponent {
|
|
|
323
323
|
*/
|
|
324
324
|
filterOptions() {
|
|
325
325
|
return this.options
|
|
326
|
-
? this.options.filter((e) => (!this.inputValue || e?.text?.includes(this.inputValue)) && !this.control.value
|
|
326
|
+
? this.options.filter((e) => (!this.inputValue || e?.text?.includes(this.inputValue)) && !this.control.value?.includes(e.value))
|
|
327
327
|
: [];
|
|
328
328
|
}
|
|
329
329
|
/**
|
|
@@ -443,6 +443,162 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
443
443
|
args: [{ selector: 'base-breadcrumb', template: "<ul class=\"pt-3\">\n <li *ngFor=\"let breadcrumb of breadcrumbs$ | async\">\n <a [routerLink]=\"breadcrumb.url\">{{ breadcrumb.label }}</a>\n </li>\n</ul>\n", styles: ["ul{list-style:none;margin:0;padding:0}ul li{display:inline}ul li:before{content:\">\";margin:0 6px}ul li:first-child:before{content:\"\";margin:0}\n"] }]
|
|
444
444
|
}], ctorParameters: function () { return [{ type: i1$1.BreadcrumbService }]; } });
|
|
445
445
|
|
|
446
|
+
class SortDirective {
|
|
447
|
+
constructor(renderer, targetElem, document) {
|
|
448
|
+
this.renderer = renderer;
|
|
449
|
+
this.targetElem = targetElem;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Sorts columns on click
|
|
453
|
+
*/
|
|
454
|
+
sortColumn() {
|
|
455
|
+
const items = document.getElementsByTagName('th');
|
|
456
|
+
for (let i = 0; i < items.length; i++) {
|
|
457
|
+
items[i].classList.remove('asc');
|
|
458
|
+
items[i].classList.remove('desc');
|
|
459
|
+
}
|
|
460
|
+
const sort = new Sort();
|
|
461
|
+
const elem = this.targetElem.nativeElement;
|
|
462
|
+
const order = elem.getAttribute('data-order');
|
|
463
|
+
const type = elem.getAttribute('data-type');
|
|
464
|
+
const property = elem.getAttribute('data-name');
|
|
465
|
+
if (order === 'desc') {
|
|
466
|
+
this.baseSort.sort(sort.startSort(property, order, type));
|
|
467
|
+
elem.setAttribute('data-order', 'asc');
|
|
468
|
+
elem.classList.remove('desc');
|
|
469
|
+
elem.classList.add('asc');
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
this.baseSort.sort(sort.startSort(property, order, type));
|
|
473
|
+
elem.setAttribute('data-order', 'desc');
|
|
474
|
+
elem.classList.remove('asc');
|
|
475
|
+
elem.classList.add('desc');
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
SortDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: SortDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
480
|
+
SortDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: SortDirective, selector: "[baseSort]", inputs: { baseSort: "baseSort" }, host: { listeners: { "click": "sortColumn()" } }, ngImport: i0 });
|
|
481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: SortDirective, decorators: [{
|
|
482
|
+
type: Directive,
|
|
483
|
+
args: [{
|
|
484
|
+
selector: '[baseSort]',
|
|
485
|
+
}]
|
|
486
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: Document, decorators: [{
|
|
487
|
+
type: Inject,
|
|
488
|
+
args: [DOCUMENT]
|
|
489
|
+
}] }]; }, propDecorators: { baseSort: [{
|
|
490
|
+
type: Input
|
|
491
|
+
}], sortColumn: [{
|
|
492
|
+
type: HostListener,
|
|
493
|
+
args: ['click']
|
|
494
|
+
}] } });
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Directive vor context menu
|
|
498
|
+
* See https://stackblitz.com/edit/angular-custom-context-menu
|
|
499
|
+
*/
|
|
500
|
+
class ContextMenuDirective {
|
|
501
|
+
constructor(el) {
|
|
502
|
+
this.el = el;
|
|
503
|
+
this.xGap = 0;
|
|
504
|
+
this.yGap = 0;
|
|
505
|
+
this.overflowSpace = 10;
|
|
506
|
+
this.selectors = '*';
|
|
507
|
+
this.clickedElement = null;
|
|
508
|
+
this.previousDisplayStatus = null;
|
|
509
|
+
}
|
|
510
|
+
ngOnInit() {
|
|
511
|
+
if (this.ltContextMenu) {
|
|
512
|
+
this.previousDisplayStatus = this.ltContextMenu.style.display;
|
|
513
|
+
}
|
|
514
|
+
// Add a click listener to the window,
|
|
515
|
+
// so that we can close the context menu on left click
|
|
516
|
+
window.addEventListener('click', () => {
|
|
517
|
+
this.showContextMenu(null, false);
|
|
518
|
+
});
|
|
519
|
+
// Close context menu when escape is pressed
|
|
520
|
+
window.addEventListener('keydown', (e) => {
|
|
521
|
+
if (e.code === 'Escape') {
|
|
522
|
+
this.showContextMenu(null, false);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
// Add an event listener to listen to the 'contextmenu' event
|
|
526
|
+
this.el.nativeElement.addEventListener('contextmenu', (e) => {
|
|
527
|
+
// Prevent the default context menu to popup
|
|
528
|
+
if (e.preventDefault) {
|
|
529
|
+
e.preventDefault();
|
|
530
|
+
}
|
|
531
|
+
// Shows our own context menu
|
|
532
|
+
this.showContextMenu(e, true);
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
// Shows or hides our custom context menu, which is specified as a input
|
|
536
|
+
showContextMenu(event, show) {
|
|
537
|
+
const cm = this.ltContextMenu;
|
|
538
|
+
if (cm) {
|
|
539
|
+
// Try to open context menu
|
|
540
|
+
if (show && event && event instanceof MouseEvent) {
|
|
541
|
+
// Get valid clicked structureElement
|
|
542
|
+
const clickedElement = event?.target?.closest(this.selectors);
|
|
543
|
+
if (clickedElement) {
|
|
544
|
+
this.clickedElement = clickedElement;
|
|
545
|
+
setTimeout(() => {
|
|
546
|
+
// Set display status
|
|
547
|
+
cm.style.display = 'block';
|
|
548
|
+
// Calculate top position
|
|
549
|
+
let top = event.y + this.yGap;
|
|
550
|
+
if (top + cm.offsetHeight + 10 > document.documentElement.clientHeight) {
|
|
551
|
+
top = document.documentElement.clientHeight - cm.offsetHeight - this.overflowSpace;
|
|
552
|
+
}
|
|
553
|
+
// Calculate left position
|
|
554
|
+
let left = event.x + this.xGap;
|
|
555
|
+
if (left + cm.offsetWidth + 10 > document.documentElement.clientWidth) {
|
|
556
|
+
left = document.documentElement.clientWidth - cm.offsetWidth - this.overflowSpace;
|
|
557
|
+
}
|
|
558
|
+
// Set position
|
|
559
|
+
cm.style.top = top + 'px';
|
|
560
|
+
cm.style.left = left + 'px';
|
|
561
|
+
// Show
|
|
562
|
+
cm.style.opacity = '1.0';
|
|
563
|
+
cm.style['pointer-events'] = 'auto';
|
|
564
|
+
}, 1);
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
// Close context menu
|
|
569
|
+
this.clickedElement = null;
|
|
570
|
+
if (this.previousDisplayStatus) {
|
|
571
|
+
cm.style.display = this.previousDisplayStatus;
|
|
572
|
+
}
|
|
573
|
+
cm.style.opacity = '0.01';
|
|
574
|
+
cm.style['pointer-events'] = 'none';
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
ContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ContextMenuDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
579
|
+
ContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: ContextMenuDirective, selector: "[ltContextMenu]", inputs: { contextMenuData: "contextMenuData", ltContextMenu: "ltContextMenu", xGap: "xGap", yGap: "yGap", overflowSpace: "overflowSpace", selectors: "selectors" }, outputs: { clickedElement: "clickedElement" }, exportAs: ["contextMenuData"], ngImport: i0 });
|
|
580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ContextMenuDirective, decorators: [{
|
|
581
|
+
type: Directive,
|
|
582
|
+
args: [{
|
|
583
|
+
selector: '[ltContextMenu]',
|
|
584
|
+
exportAs: 'contextMenuData',
|
|
585
|
+
}]
|
|
586
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { contextMenuData: [{
|
|
587
|
+
type: Input
|
|
588
|
+
}], ltContextMenu: [{
|
|
589
|
+
type: Input
|
|
590
|
+
}], xGap: [{
|
|
591
|
+
type: Input
|
|
592
|
+
}], yGap: [{
|
|
593
|
+
type: Input
|
|
594
|
+
}], overflowSpace: [{
|
|
595
|
+
type: Input
|
|
596
|
+
}], selectors: [{
|
|
597
|
+
type: Input
|
|
598
|
+
}], clickedElement: [{
|
|
599
|
+
type: Output
|
|
600
|
+
}] } });
|
|
601
|
+
|
|
446
602
|
class UploadImageComponent {
|
|
447
603
|
constructor(httpClient, authService) {
|
|
448
604
|
this.httpClient = httpClient;
|
|
@@ -530,7 +686,6 @@ class UploadImageComponent {
|
|
|
530
686
|
data.append('file', this.selectedFile);
|
|
531
687
|
const httpOptions = {
|
|
532
688
|
headers: new HttpHeaders({
|
|
533
|
-
'Content-Type': 'application/json',
|
|
534
689
|
Authorization: 'Bearer ' + this.authService.token,
|
|
535
690
|
}),
|
|
536
691
|
};
|
|
@@ -554,7 +709,6 @@ class UploadImageComponent {
|
|
|
554
709
|
if (id) {
|
|
555
710
|
const httpOptions = {
|
|
556
711
|
headers: new HttpHeaders({
|
|
557
|
-
'Content-Type': 'application/json',
|
|
558
712
|
Authorization: 'Bearer ' + this.authService.token,
|
|
559
713
|
}),
|
|
560
714
|
};
|
|
@@ -569,10 +723,10 @@ class UploadImageComponent {
|
|
|
569
723
|
}
|
|
570
724
|
}
|
|
571
725
|
UploadImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UploadImageComponent, deps: [{ token: i1$2.HttpClient }, { token: i1$1.AuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
572
|
-
UploadImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: UploadImageComponent, selector: "base-upload-image", inputs: { id: "id", name: "name", label: "label", supportText: "supportText", required: "required", dragText: "dragText", validExtensions: "validExtensions", control: "control", url: "url", uploadPath: "uploadPath", deletePath: "deletePath", path: "path" }, outputs: { imageUploaded: "imageUploaded", imageDeleted: "imageDeleted" }, ngImport: i0, template: "<div class=\"form-group mt-3\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <div\n class=\"drag-area\"\n (dragover)=\"dragOver($event)\"\n (dragleave)=\"dragLeave($event)\"\n (drop)=\"drop($event)\"\n [ngClass]=\"{ active: dragActive }\"\n >\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n\n <ng-container *ngIf=\"selectedFile && !control?.value && !loading\">\n <img [src]=\"fileUrl\" *ngIf=\"selectedFile\" />\n <button class=\"btn btn-danger\" (click)=\"deleteFile()\">L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"control?.value && !loading\">\n <img [src]=\"url + path + control?.value\" />\n <button class=\"btn btn-danger\" (click)=\"deleteFile(control?.value)\">L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"!selectedFile && !control?.value && !loading\">\n <div class=\"icon\">\n <i class=\"bi bi-images\"></i>\n </div>\n\n <span class=\"header\">{{ dragText }}</span>\n <span class=\"header\">or <span class=\"button\" (click)=\"fileInput.click()\">browse</span></span>\n <input type=\"file\" (change)=\"selectFile($event)\" hidden #fileInput />\n <span class=\"support\">{{ supportText }}</span>\n </ng-container>\n </div>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n </div>\n</div>\n", styles: [":host{--base-upload-image-area-bg: #ffffff;--base-upload-image-area-border-color: #e1e1e1;--base-upload-image-area-height: 400px}.required:after{content:\" *\"}.drag-area{height:var(--base-upload-image-area-height);border:2px dashed var(--base-upload-image-area-border-color);background-color:var(--base-upload-image-area-bg);display:flex;flex-direction:column;justify-content:center;align-items:center;margin:10px auto;padding:20px}.drag-area img{height:100%;max-height:300px;max-width:100%;object-fit:scale-down}.drag-area .btn-danger{margin-top:auto}.drag-area .icon{font-size:50px;color:var(--bs-primary)}.drag-area .header{font-size:20px;font-weight:500}.drag-area .support{font-size:12px;color:#e1e1e1;margin:10px 0 15px}.drag-area .button{font-size:20px;font-weight:500;color:var(--bs-primary);cursor:pointer}.active{border:2px solid var(--bs-primary)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
726
|
+
UploadImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: UploadImageComponent, selector: "base-upload-image", inputs: { id: "id", name: "name", label: "label", supportText: "supportText", required: "required", dragText: "dragText", validExtensions: "validExtensions", control: "control", url: "url", uploadPath: "uploadPath", deletePath: "deletePath", path: "path" }, outputs: { imageUploaded: "imageUploaded", imageDeleted: "imageDeleted" }, ngImport: i0, template: "<div class=\"form-group mt-3\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <div\n class=\"drag-area\"\n (dragover)=\"dragOver($event)\"\n (dragleave)=\"dragLeave($event)\"\n (drop)=\"drop($event)\"\n [ngClass]=\"{ active: dragActive }\"\n >\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n\n <ng-container *ngIf=\"selectedFile && !control?.value && !loading\">\n <img [src]=\"fileUrl\" *ngIf=\"selectedFile\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile()\">L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"control?.value && !loading\">\n <img [src]=\"url + path + control?.value\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile(control?.value)\">L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"!selectedFile && !control?.value && !loading\">\n <div class=\"icon\">\n <i class=\"bi bi-images\"></i>\n </div>\n\n <span class=\"header\">{{ dragText }}</span>\n <span class=\"header\">or <span class=\"button\" (click)=\"fileInput.click()\">browse</span></span>\n <input type=\"file\" (change)=\"selectFile($event)\" hidden #fileInput />\n <span class=\"support\">{{ supportText }}</span>\n </ng-container>\n </div>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n </div>\n</div>\n", styles: [":host{--base-upload-image-area-bg: #ffffff;--base-upload-image-area-border-color: #e1e1e1;--base-upload-image-area-height: 400px}.required:after{content:\" *\"}.drag-area{height:var(--base-upload-image-area-height);border:2px dashed var(--base-upload-image-area-border-color);background-color:var(--base-upload-image-area-bg);display:flex;flex-direction:column;justify-content:center;align-items:center;margin:10px auto;padding:20px}.drag-area img{height:100%;max-height:300px;max-width:100%;object-fit:scale-down}.drag-area .btn-danger{margin-top:auto}.drag-area .icon{font-size:50px;color:var(--bs-primary)}.drag-area .header{font-size:20px;font-weight:500}.drag-area .support{font-size:12px;color:#e1e1e1;margin:10px 0 15px}.drag-area .button{font-size:20px;font-weight:500;color:var(--bs-primary);cursor:pointer}.active{border:2px solid var(--bs-primary)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
573
727
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: UploadImageComponent, decorators: [{
|
|
574
728
|
type: Component,
|
|
575
|
-
args: [{ selector: 'base-upload-image', template: "<div class=\"form-group mt-3\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <div\n class=\"drag-area\"\n (dragover)=\"dragOver($event)\"\n (dragleave)=\"dragLeave($event)\"\n (drop)=\"drop($event)\"\n [ngClass]=\"{ active: dragActive }\"\n >\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n\n <ng-container *ngIf=\"selectedFile && !control?.value && !loading\">\n <img [src]=\"fileUrl\" *ngIf=\"selectedFile\" />\n <button class=\"btn btn-danger\" (click)=\"deleteFile()\">L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"control?.value && !loading\">\n <img [src]=\"url + path + control?.value\" />\n <button class=\"btn btn-danger\" (click)=\"deleteFile(control?.value)\">L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"!selectedFile && !control?.value && !loading\">\n <div class=\"icon\">\n <i class=\"bi bi-images\"></i>\n </div>\n\n <span class=\"header\">{{ dragText }}</span>\n <span class=\"header\">or <span class=\"button\" (click)=\"fileInput.click()\">browse</span></span>\n <input type=\"file\" (change)=\"selectFile($event)\" hidden #fileInput />\n <span class=\"support\">{{ supportText }}</span>\n </ng-container>\n </div>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n </div>\n</div>\n", styles: [":host{--base-upload-image-area-bg: #ffffff;--base-upload-image-area-border-color: #e1e1e1;--base-upload-image-area-height: 400px}.required:after{content:\" *\"}.drag-area{height:var(--base-upload-image-area-height);border:2px dashed var(--base-upload-image-area-border-color);background-color:var(--base-upload-image-area-bg);display:flex;flex-direction:column;justify-content:center;align-items:center;margin:10px auto;padding:20px}.drag-area img{height:100%;max-height:300px;max-width:100%;object-fit:scale-down}.drag-area .btn-danger{margin-top:auto}.drag-area .icon{font-size:50px;color:var(--bs-primary)}.drag-area .header{font-size:20px;font-weight:500}.drag-area .support{font-size:12px;color:#e1e1e1;margin:10px 0 15px}.drag-area .button{font-size:20px;font-weight:500;color:var(--bs-primary);cursor:pointer}.active{border:2px solid var(--bs-primary)}\n"] }]
|
|
729
|
+
args: [{ selector: 'base-upload-image', template: "<div class=\"form-group mt-3\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n <div\n class=\"drag-area\"\n (dragover)=\"dragOver($event)\"\n (dragleave)=\"dragLeave($event)\"\n (drop)=\"drop($event)\"\n [ngClass]=\"{ active: dragActive }\"\n >\n <div class=\"d-flex justify-content-center\" *ngIf=\"loading\">\n <div class=\"spinner-border text-primary\" role=\"status\">\n <span class=\"visually-hidden\">Loading...</span>\n </div>\n </div>\n\n <ng-container *ngIf=\"selectedFile && !control?.value && !loading\">\n <img [src]=\"fileUrl\" *ngIf=\"selectedFile\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile()\">L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"control?.value && !loading\">\n <img [src]=\"url + path + control?.value\" />\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteFile(control?.value)\">L\u00F6schen</button>\n </ng-container>\n\n <ng-container *ngIf=\"!selectedFile && !control?.value && !loading\">\n <div class=\"icon\">\n <i class=\"bi bi-images\"></i>\n </div>\n\n <span class=\"header\">{{ dragText }}</span>\n <span class=\"header\">or <span class=\"button\" (click)=\"fileInput.click()\">browse</span></span>\n <input type=\"file\" (change)=\"selectFile($event)\" hidden #fileInput />\n <span class=\"support\">{{ supportText }}</span>\n </ng-container>\n </div>\n\n <div class=\"invalid-feedback m-2\" *ngIf=\"control?.invalid && (control?.dirty || control?.touched)\">\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control?.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n </div>\n</div>\n", styles: [":host{--base-upload-image-area-bg: #ffffff;--base-upload-image-area-border-color: #e1e1e1;--base-upload-image-area-height: 400px}.required:after{content:\" *\"}.drag-area{height:var(--base-upload-image-area-height);border:2px dashed var(--base-upload-image-area-border-color);background-color:var(--base-upload-image-area-bg);display:flex;flex-direction:column;justify-content:center;align-items:center;margin:10px auto;padding:20px}.drag-area img{height:100%;max-height:300px;max-width:100%;object-fit:scale-down}.drag-area .btn-danger{margin-top:auto}.drag-area .icon{font-size:50px;color:var(--bs-primary)}.drag-area .header{font-size:20px;font-weight:500}.drag-area .support{font-size:12px;color:#e1e1e1;margin:10px 0 15px}.drag-area .button{font-size:20px;font-weight:500;color:var(--bs-primary);cursor:pointer}.active{border:2px solid var(--bs-primary)}\n"] }]
|
|
576
730
|
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: i1$1.AuthService }]; }, propDecorators: { id: [{
|
|
577
731
|
type: Input
|
|
578
732
|
}], name: [{
|
|
@@ -615,8 +769,23 @@ class RefenceInputComponent {
|
|
|
615
769
|
this.textField = 'name';
|
|
616
770
|
this.objects = [];
|
|
617
771
|
this.optionsForTagInput = [];
|
|
772
|
+
this.subscription = new Subscription();
|
|
618
773
|
}
|
|
619
774
|
async ngOnInit() {
|
|
775
|
+
this.getReferences();
|
|
776
|
+
this.subscription.add(this.control.valueChanges.subscribe(() => {
|
|
777
|
+
if (!this.currentValue) {
|
|
778
|
+
this.setValue();
|
|
779
|
+
}
|
|
780
|
+
}));
|
|
781
|
+
}
|
|
782
|
+
ngOnDestroy() {
|
|
783
|
+
this.subscription.unsubscribe();
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* It gets the references from the GraphQL server and sets the value of the select
|
|
787
|
+
*/
|
|
788
|
+
getReferences() {
|
|
620
789
|
this.graphQLService
|
|
621
790
|
.graphQl(this.method, {
|
|
622
791
|
fields: this.fields,
|
|
@@ -626,15 +795,12 @@ class RefenceInputComponent {
|
|
|
626
795
|
if (result) {
|
|
627
796
|
this.objects = result;
|
|
628
797
|
this.setObjectsAsOptions();
|
|
629
|
-
|
|
798
|
+
if (!this.currentValue) {
|
|
799
|
+
this.setValue();
|
|
800
|
+
}
|
|
630
801
|
}
|
|
631
802
|
});
|
|
632
803
|
}
|
|
633
|
-
async ngOnChanges(changes) {
|
|
634
|
-
if (changes['control'] && this.objects) {
|
|
635
|
-
await this.setValue();
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
804
|
/**
|
|
639
805
|
* If the current value is not valid, set the control to an invalid state
|
|
640
806
|
*/
|
|
@@ -669,22 +835,15 @@ class RefenceInputComponent {
|
|
|
669
835
|
* the objects array is empty, then set the currentValue to the control's value
|
|
670
836
|
*/
|
|
671
837
|
setValue() {
|
|
672
|
-
|
|
673
|
-
if (this.control?.value
|
|
674
|
-
|
|
675
|
-
if (foundElement) {
|
|
676
|
-
this.currentValue = foundElement[this.textField];
|
|
677
|
-
resolve(true);
|
|
678
|
-
}
|
|
679
|
-
else {
|
|
680
|
-
this.currentValue = this.control.value;
|
|
681
|
-
resolve(true);
|
|
682
|
-
}
|
|
838
|
+
if (this.control?.value && this.objects?.length > 0) {
|
|
839
|
+
if (this.control?.value?.id) {
|
|
840
|
+
this.control.setValue(this.control.value.id);
|
|
683
841
|
}
|
|
684
|
-
|
|
685
|
-
|
|
842
|
+
const foundElement = this.objects.find((e) => e[this.valueField] === this.control.value);
|
|
843
|
+
if (foundElement) {
|
|
844
|
+
this.currentValue = foundElement[this.textField];
|
|
686
845
|
}
|
|
687
|
-
}
|
|
846
|
+
}
|
|
688
847
|
}
|
|
689
848
|
/**
|
|
690
849
|
* It sets the value of the control to the id of the selected option
|
|
@@ -732,7 +891,7 @@ class RefenceInputComponent {
|
|
|
732
891
|
}
|
|
733
892
|
}
|
|
734
893
|
RefenceInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RefenceInputComponent, deps: [{ token: i1$1.GraphQLService }], target: i0.ɵɵFactoryTarget.Component });
|
|
735
|
-
RefenceInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: RefenceInputComponent, selector: "base-refence-input", inputs: { id: "id", name: "name", label: "label", isList: "isList", placeholder: "placeholder", autocomplete: "autocomplete", tabIndex: "tabIndex", control: "control", required: "required", method: "method", fields: "fields", valueField: "valueField", textField: "textField" },
|
|
894
|
+
RefenceInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: RefenceInputComponent, selector: "base-refence-input", inputs: { id: "id", name: "name", label: "label", isList: "isList", placeholder: "placeholder", autocomplete: "autocomplete", tabIndex: "tabIndex", control: "control", required: "required", method: "method", fields: "fields", valueField: "valueField", textField: "textField" }, ngImport: i0, template: "<ng-container *ngIf=\"!isList\">\n <div class=\"form-group mb-3\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n\n <div class=\"position-relative\">\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"id\"\n [name]=\"name\"\n class=\"form-control\"\n [(ngModel)]=\"currentValue\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (keyup)=\"enterKey($event)\"\n />\n <div class=\"options\" *ngIf=\"objects && selectedElement\">\n <div class=\"option-item\" *ngFor=\"let object of filterOptions()\" (click)=\"set(object[valueField])\">\n {{ object[textField] }}\n </div>\n </div>\n </div>\n\n <div\n class=\"d-block invalid-feedback m-2\"\n *ngIf=\"control?.invalid && (control?.dirty || control?.touched) && !selectedElement\"\n >\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['invalidReference']\">Bitte w\u00E4hle einen g\u00FCltigen Wert aus.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n <div *ngIf=\"control?.errors?.['matching']\">Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isList\">\n <base-tags\n [id]=\"id\"\n [label]=\"label\"\n [name]=\"name\"\n [control]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [custom]=\"false\"\n [options]=\"optionsForTagInput\"\n ></base-tags>\n</ng-container>\n", styles: [".options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999}.options .option-item{padding:10px;cursor:pointer}.options .option-item:hover{color:var(--bs-primary)}\n"], dependencies: [{ kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TagsComponent, selector: "base-tags", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "options", "custom", "removeByKey", "required"] }] });
|
|
736
895
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: RefenceInputComponent, decorators: [{
|
|
737
896
|
type: Component,
|
|
738
897
|
args: [{ selector: 'base-refence-input', template: "<ng-container *ngIf=\"!isList\">\n <div class=\"form-group mb-3\">\n <label [for]=\"id\" class=\"form-label\" [ngClass]=\"{ required: required }\" *ngIf=\"label\">{{ label }}</label>\n\n <div class=\"position-relative\">\n <input [formControl]=\"control\" hidden />\n <input\n [id]=\"id\"\n [name]=\"name\"\n class=\"form-control\"\n [(ngModel)]=\"currentValue\"\n [ngClass]=\"{ 'is-invalid': control?.invalid && control?.touched }\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onFocus()\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [autocomplete]=\"autocomplete ?? null\"\n [tabIndex]=\"tabIndex ?? null\"\n (keyup)=\"enterKey($event)\"\n />\n <div class=\"options\" *ngIf=\"objects && selectedElement\">\n <div class=\"option-item\" *ngFor=\"let object of filterOptions()\" (click)=\"set(object[valueField])\">\n {{ object[textField] }}\n </div>\n </div>\n </div>\n\n <div\n class=\"d-block invalid-feedback m-2\"\n *ngIf=\"control?.invalid && (control?.dirty || control?.touched) && !selectedElement\"\n >\n <div *ngIf=\"control?.errors?.['required']\">Dieses Feld ist ein Pflichtfeld.</div>\n <div *ngIf=\"control?.errors?.['invalidReference']\">Bitte w\u00E4hle einen g\u00FCltigen Wert aus.</div>\n <div *ngIf=\"control?.errors?.['minlength']\">\n Die Mindestl\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['minlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['maxlength']\">\n Die maximale L\u00E4nge f\u00FCr dieses Feld betr\u00E4gt\n {{control.errors?.['maxlength']?.requiredLength}} Zeichen.\n </div>\n <div *ngIf=\"control?.errors?.['email']\">Bitte eine g\u00FCltige E-Mail Adresse angeben.</div>\n <div *ngIf=\"control?.errors?.['matching']\">Die Passw\u00F6rter m\u00FCssen \u00FCberein stimmen.</div>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isList\">\n <base-tags\n [id]=\"id\"\n [label]=\"label\"\n [name]=\"name\"\n [control]=\"control\"\n [required]=\"required\"\n [placeholder]=\"placeholder\"\n [custom]=\"false\"\n [options]=\"optionsForTagInput\"\n ></base-tags>\n</ng-container>\n", styles: [".options{position:absolute;display:block;top:100%;left:0;right:0;border-top:0;background-color:#fff;box-shadow:0 2px 5px #00000029,0 2px 10px #0000001f;transition:all .5s;z-index:999}.options .option-item{padding:10px;cursor:pointer}.options .option-item:hover{color:var(--bs-primary)}\n"] }]
|
|
@@ -781,6 +940,12 @@ class ModelFormSubComponent {
|
|
|
781
940
|
// Set user for roles check
|
|
782
941
|
this.user = BasicUser.map(this.authService.currentUser);
|
|
783
942
|
}
|
|
943
|
+
/**
|
|
944
|
+
* If the field has fields, return true, otherwise return false.
|
|
945
|
+
*/
|
|
946
|
+
checkFieldHasFields(field) {
|
|
947
|
+
return Object.keys(field.fields)?.length !== 0;
|
|
948
|
+
}
|
|
784
949
|
/**
|
|
785
950
|
* It takes a string, capitalizes the first letter, and returns the new string
|
|
786
951
|
*
|
|
@@ -820,10 +985,10 @@ class ModelFormSubComponent {
|
|
|
820
985
|
}
|
|
821
986
|
}
|
|
822
987
|
ModelFormSubComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelFormSubComponent, deps: [{ token: i1$1.AuthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
823
|
-
ModelFormSubComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: { fields: "fields", form: "form", config: "config" }, outputs: { imageChanged: "imageChanged" }, ngImport: i0, template: "<div class=\"mt-3\" *ngFor=\"let key of keys\">\n <ng-container *ngIf=\"!fields[key]?.type && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\">\n <fieldset class=\"border rounded-3 p-3\">\n <legend class=\"float-none w-auto px-3\">\n {{ config[key]?.label ? config[key].label : capitalizeFirstLetter(key) }}\n </legend>\n <base-model-form-sub\n [fields]=\"fields[key]\"\n [config]=\"config[key]?.fields || {}\"\n [form]=\"form.get(key)\"\n ></base-model-form-sub>\n </fieldset>\n </ng-container>\n\n <ng-container *ngIf=\"fields[key]?.type && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\">\n <ng-container *ngIf=\"fields[key]?.isEnum\">\n <base-select\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [options]=\"prepareEnumForSelect(fields[key]?.validEnums, config[key]?.enumValues)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\"\n ></base-select>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isEnum\">\n <ng-container [ngSwitch]=\"config[key]?.type ? config[key]?.type : fields[key]?.type\">\n <ng-container *ngSwitchCase=\"'String'\">\n <ng-container *ngIf=\"fields[key]?.isList && !config[key]?.exclude\">\n <base-tags\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-tags>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isList && !config[key]?.exclude\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'text'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Image'\">\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [url]=\"config[key]?.url\"\n [path]=\"config[key]?.path || '/files/'\"\n [uploadPath]=\"config[key]?.uploadPath || '/files/upload'\"\n [deletePath]=\"config[key]?.deletePath || '/files/'\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [dragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n (imageDeleted)=\"imageChanged.emit()\"\n (imageUploaded)=\"imageChanged.emit()\"\n ></base-upload-image>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Reference'\">\n <base-refence-input\n [id]=\"key\"\n [name]=\"key\"\n [isList]=\"fields[key]?.isList\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [method]=\"config[key]?.method || 'find'\"\n [fields]=\"config[key]?.fields || ['id', 'name']\"\n [valueField]=\"config[key]?.valueField || 'id'\"\n [textField]=\"config[key]?.nameField || 'name'\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-refence-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <base-checkbox\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-checkbox>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'LongText'\">\n <base-textarea\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-textarea>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Float'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'number'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Password'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'password'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Color'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'color'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'datetime-local'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: InputComponent, selector: "base-input", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required"], outputs: ["enter"] }, { kind: "component", type: SelectComponent, selector: "base-select", inputs: ["id", "name", "label", "placeholder", "control", "tabIndex", "required", "multiple", "search", "options"] }, { kind: "component", type: CheckboxComponent, selector: "base-checkbox", inputs: ["id", "name", "label", "value", "control", "required"] }, { kind: "component", type: TextareaComponent, selector: "base-textarea", inputs: ["id", "name", "label", "placeholder", "control", "rows", "required", "tabIndex"] }, { kind: "component", type: TagsComponent, selector: "base-tags", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "options", "custom", "removeByKey", "required"] }, { kind: "component", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["fields", "form", "config"], outputs: ["imageChanged"] }, { kind: "component", type: UploadImageComponent, selector: "base-upload-image", inputs: ["id", "name", "label", "supportText", "required", "dragText", "validExtensions", "control", "url", "uploadPath", "deletePath", "path"], outputs: ["imageUploaded", "imageDeleted"] }, { kind: "component", type: RefenceInputComponent, selector: "base-refence-input", inputs: ["id", "name", "label", "isList", "placeholder", "autocomplete", "tabIndex", "control", "required", "method", "fields", "valueField", "textField"] }] });
|
|
988
|
+
ModelFormSubComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: { fields: "fields", form: "form", config: "config" }, outputs: { imageChanged: "imageChanged" }, ngImport: i0, template: "<div class=\"mt-3\" *ngFor=\"let key of keys\">\n <ng-container\n *ngIf=\"checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\"\n >\n <fieldset class=\"border rounded-3 p-3 mt-3\">\n <legend class=\"float-none w-auto px-3\">\n {{ config[key]?.label ? config[key].label : capitalizeFirstLetter(key) }}\n </legend>\n <base-model-form-sub\n [fields]=\"fields[key].fields\"\n [config]=\"config[key]?.fields || {}\"\n [form]=\"form.get(key)\"\n ></base-model-form-sub>\n </fieldset>\n </ng-container>\n\n <ng-container\n *ngIf=\"!checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\"\n >\n <ng-container *ngIf=\"fields[key]?.isEnum && !config[key]?.exclude\">\n <base-select\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [options]=\"prepareEnumForSelect(fields[key]?.validEnums, config[key]?.enumValues)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\"\n ></base-select>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isEnum && !config[key]?.exclude\">\n <ng-container [ngSwitch]=\"config[key]?.type ? config[key]?.type : fields[key]?.type\">\n <ng-container *ngSwitchCase=\"'String'\">\n <ng-container *ngIf=\"fields[key]?.isList && !config[key]?.exclude\">\n <base-tags\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-tags>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isList && !config[key]?.exclude\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'text'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Image'\">\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [url]=\"config[key]?.url\"\n [path]=\"config[key]?.path || '/files/'\"\n [uploadPath]=\"config[key]?.uploadPath || '/files/upload'\"\n [deletePath]=\"config[key]?.deletePath || '/files/'\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [dragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n (imageDeleted)=\"imageChanged.emit(key)\"\n (imageUploaded)=\"imageChanged.emit(key)\"\n ></base-upload-image>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Reference'\">\n <base-refence-input\n [id]=\"key\"\n [name]=\"key\"\n [isList]=\"fields[key]?.isList\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [method]=\"config[key]?.method || 'find'\"\n [fields]=\"config[key]?.fields || ['id', 'name']\"\n [valueField]=\"config[key]?.valueField || 'id'\"\n [textField]=\"config[key]?.nameField || 'name'\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-refence-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <base-checkbox\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-checkbox>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'LongText'\">\n <base-textarea\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-textarea>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Float'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'number'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Password'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'password'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Color'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'color'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'URL'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'url'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Email'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'email'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'datetime-local'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: InputComponent, selector: "base-input", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required"], outputs: ["enter"] }, { kind: "component", type: SelectComponent, selector: "base-select", inputs: ["id", "name", "label", "placeholder", "control", "tabIndex", "required", "multiple", "search", "options"] }, { kind: "component", type: CheckboxComponent, selector: "base-checkbox", inputs: ["id", "name", "label", "value", "control", "required"] }, { kind: "component", type: TextareaComponent, selector: "base-textarea", inputs: ["id", "name", "label", "placeholder", "control", "rows", "required", "tabIndex"] }, { kind: "component", type: TagsComponent, selector: "base-tags", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "options", "custom", "removeByKey", "required"] }, { kind: "component", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["fields", "form", "config"], outputs: ["imageChanged"] }, { kind: "component", type: UploadImageComponent, selector: "base-upload-image", inputs: ["id", "name", "label", "supportText", "required", "dragText", "validExtensions", "control", "url", "uploadPath", "deletePath", "path"], outputs: ["imageUploaded", "imageDeleted"] }, { kind: "component", type: RefenceInputComponent, selector: "base-refence-input", inputs: ["id", "name", "label", "isList", "placeholder", "autocomplete", "tabIndex", "control", "required", "method", "fields", "valueField", "textField"] }] });
|
|
824
989
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelFormSubComponent, decorators: [{
|
|
825
990
|
type: Component,
|
|
826
|
-
args: [{ selector: 'base-model-form-sub', template: "<div class=\"mt-3\" *ngFor=\"let key of keys\">\n <ng-container
|
|
991
|
+
args: [{ selector: 'base-model-form-sub', template: "<div class=\"mt-3\" *ngFor=\"let key of keys\">\n <ng-container\n *ngIf=\"checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\"\n >\n <fieldset class=\"border rounded-3 p-3 mt-3\">\n <legend class=\"float-none w-auto px-3\">\n {{ config[key]?.label ? config[key].label : capitalizeFirstLetter(key) }}\n </legend>\n <base-model-form-sub\n [fields]=\"fields[key].fields\"\n [config]=\"config[key]?.fields || {}\"\n [form]=\"form.get(key)\"\n ></base-model-form-sub>\n </fieldset>\n </ng-container>\n\n <ng-container\n *ngIf=\"!checkFieldHasFields(fields[key]) && (config[key]?.roles ? user?.hasAllRoles(config[key]?.roles) : true)\"\n >\n <ng-container *ngIf=\"fields[key]?.isEnum && !config[key]?.exclude\">\n <base-select\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || 'Bitte einen Wert ausw\u00E4hlen'\"\n [options]=\"prepareEnumForSelect(fields[key]?.validEnums, config[key]?.enumValues)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\"\n ></base-select>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isEnum && !config[key]?.exclude\">\n <ng-container [ngSwitch]=\"config[key]?.type ? config[key]?.type : fields[key]?.type\">\n <ng-container *ngSwitchCase=\"'String'\">\n <ng-container *ngIf=\"fields[key]?.isList && !config[key]?.exclude\">\n <base-tags\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-tags>\n </ng-container>\n\n <ng-container *ngIf=\"!fields[key]?.isList && !config[key]?.exclude\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'text'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Image'\">\n <base-upload-image\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [url]=\"config[key]?.url\"\n [path]=\"config[key]?.path || '/files/'\"\n [uploadPath]=\"config[key]?.uploadPath || '/files/upload'\"\n [deletePath]=\"config[key]?.deletePath || '/files/'\"\n [supportText]=\"config[key]?.supportText || 'Unterst\u00FCtzte Formate: JPEG, JPG, PNG'\"\n [dragText]=\"config[key]?.dragText || 'Drag & Drop'\"\n [validExtensions]=\"config[key]?.validExtensions || ['image/jpeg', 'image/jpg', 'image/png']\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n (imageDeleted)=\"imageChanged.emit(key)\"\n (imageUploaded)=\"imageChanged.emit(key)\"\n ></base-upload-image>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Reference'\">\n <base-refence-input\n [id]=\"key\"\n [name]=\"key\"\n [isList]=\"fields[key]?.isList\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [method]=\"config[key]?.method || 'find'\"\n [fields]=\"config[key]?.fields || ['id', 'name']\"\n [valueField]=\"config[key]?.valueField || 'id'\"\n [textField]=\"config[key]?.nameField || 'name'\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-refence-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <base-checkbox\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-checkbox>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'LongText'\">\n <base-textarea\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-textarea>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Float'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'number'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Password'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'password'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Color'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [type]=\"'color'\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'URL'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'url'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Email'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'email'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <base-input\n [id]=\"key\"\n [name]=\"key\"\n [label]=\"config[key]?.label ? config[key].label : capitalizeFirstLetter(key)\"\n [placeholder]=\"config[key]?.placeholder || ''\"\n [type]=\"'datetime-local'\"\n [control]=\"transformToControl(form?.get(key))\"\n [required]=\"\n config[key] && config[key]?.required !== undefined ? config[key]?.required : fields[key].isRequired\n \"\n ></base-input>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n" }]
|
|
827
992
|
}], ctorParameters: function () { return [{ type: i1$1.AuthService }]; }, propDecorators: { fields: [{
|
|
828
993
|
type: Input
|
|
829
994
|
}], form: [{
|
|
@@ -835,13 +1000,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
835
1000
|
}] } });
|
|
836
1001
|
|
|
837
1002
|
class ModelFormComponent {
|
|
838
|
-
constructor(graphQLMetaService, graphQLService, formsService, authService, router, route) {
|
|
1003
|
+
constructor(graphQLMetaService, graphQLService, formsService, authService, router, route, cmsService) {
|
|
839
1004
|
this.graphQLMetaService = graphQLMetaService;
|
|
840
1005
|
this.graphQLService = graphQLService;
|
|
841
1006
|
this.formsService = formsService;
|
|
842
1007
|
this.authService = authService;
|
|
843
1008
|
this.router = router;
|
|
844
1009
|
this.route = route;
|
|
1010
|
+
this.cmsService = cmsService;
|
|
845
1011
|
this.delete = true;
|
|
846
1012
|
this.duplicate = false;
|
|
847
1013
|
this.logging = false;
|
|
@@ -874,8 +1040,8 @@ class ModelFormComponent {
|
|
|
874
1040
|
this.operation = this.id ? 'update' : 'create';
|
|
875
1041
|
this.fields = this.meta.getArgs(this.operation + this.capitalizeFirstLetter(this.modelName), {
|
|
876
1042
|
type: GraphQLRequestType.MUTATION,
|
|
877
|
-
});
|
|
878
|
-
this.fields = this.fields['input'];
|
|
1043
|
+
}).fields;
|
|
1044
|
+
this.fields = this.fields['input'].fields;
|
|
879
1045
|
this.keys = Object.keys(this.fields);
|
|
880
1046
|
if (this.logging) {
|
|
881
1047
|
console.log('ModelFormComponent::init->fields', this.fields);
|
|
@@ -918,12 +1084,20 @@ class ModelFormComponent {
|
|
|
918
1084
|
// Process patchFields for reference input
|
|
919
1085
|
for (const [key, value] of Object.entries(this.config)) {
|
|
920
1086
|
// If it not an array
|
|
921
|
-
if (this.config[key]?.
|
|
922
|
-
this.form.get(key)
|
|
1087
|
+
if (this.config[key]?.type === 'Reference' && !this.fields[key]?.isList) {
|
|
1088
|
+
if (this.form.get(key)) {
|
|
1089
|
+
this.form
|
|
1090
|
+
.get(key)
|
|
1091
|
+
.patchValue(response[this.config[key]?.patchField ? this.config[key]?.patchField : key]?.id);
|
|
1092
|
+
}
|
|
923
1093
|
}
|
|
924
1094
|
// If value is an array
|
|
925
|
-
if (this.config[key]?.
|
|
926
|
-
this.form.get(key)
|
|
1095
|
+
if (this.config[key]?.type === 'Reference' && this.fields[key]?.isList) {
|
|
1096
|
+
if (this.form.get(key)) {
|
|
1097
|
+
this.form
|
|
1098
|
+
.get(key)
|
|
1099
|
+
.patchValue(response[this.config[key]?.patchField ? this.config[key]?.patchField : key]?.map((e) => e?.id));
|
|
1100
|
+
}
|
|
927
1101
|
}
|
|
928
1102
|
}
|
|
929
1103
|
if (this.logging) {
|
|
@@ -946,16 +1120,19 @@ class ModelFormComponent {
|
|
|
946
1120
|
createRequestObject(fields) {
|
|
947
1121
|
const requestFields = [];
|
|
948
1122
|
for (const [key, value] of Object.entries(fields)) {
|
|
949
|
-
if (
|
|
950
|
-
|
|
1123
|
+
if (this.config[key]?.exclude !== undefined && this.config[key]?.exclude) {
|
|
1124
|
+
continue;
|
|
1125
|
+
}
|
|
1126
|
+
if (Object.keys(fields[key]?.fields)?.length === 0) {
|
|
1127
|
+
if (this.config[key]?.type !== 'Reference') {
|
|
951
1128
|
requestFields.push(key);
|
|
952
1129
|
}
|
|
953
1130
|
else {
|
|
954
|
-
requestFields.push({ [this.config[key]?.patchField]: ['id'] });
|
|
1131
|
+
requestFields.push({ [this.config[key]?.patchField ? this.config[key]?.patchField : key]: ['id'] });
|
|
955
1132
|
}
|
|
956
1133
|
}
|
|
957
1134
|
else {
|
|
958
|
-
const subkeys = this.createRequestObject(fields[key]);
|
|
1135
|
+
const subkeys = this.createRequestObject(fields[key].fields);
|
|
959
1136
|
const resultObject = {};
|
|
960
1137
|
resultObject[key] = subkeys;
|
|
961
1138
|
requestFields.push(resultObject);
|
|
@@ -974,13 +1151,13 @@ class ModelFormComponent {
|
|
|
974
1151
|
createForm(fields) {
|
|
975
1152
|
const group = {};
|
|
976
1153
|
for (const [key, value] of Object.entries(fields)) {
|
|
977
|
-
if (value?.
|
|
978
|
-
group[key] = new UntypedFormControl(
|
|
1154
|
+
if (Object.keys(value?.fields)?.length === 0) {
|
|
1155
|
+
group[key] = new UntypedFormControl(null, (this.config[key] && this.config[key]?.required !== undefined ? this.config[key]?.required : value.isRequired)
|
|
979
1156
|
? Validators.required
|
|
980
1157
|
: []);
|
|
981
1158
|
}
|
|
982
1159
|
else {
|
|
983
|
-
group[key] = this.createForm(fields[key]);
|
|
1160
|
+
group[key] = this.createForm(fields[key].fields);
|
|
984
1161
|
}
|
|
985
1162
|
}
|
|
986
1163
|
if (this.logging) {
|
|
@@ -992,49 +1169,22 @@ class ModelFormComponent {
|
|
|
992
1169
|
* It calls the graphQLService to delete the object with the id of the object that is currently being edited
|
|
993
1170
|
*/
|
|
994
1171
|
deleteObject() {
|
|
995
|
-
|
|
996
|
-
this.
|
|
997
|
-
|
|
998
|
-
arguments: { id: this.id },
|
|
999
|
-
fields: ['id'],
|
|
1000
|
-
type: GraphQLRequestType.MUTATION,
|
|
1001
|
-
})
|
|
1002
|
-
.subscribe({
|
|
1003
|
-
next: (value) => {
|
|
1004
|
-
this.finished.emit(null);
|
|
1005
|
-
},
|
|
1006
|
-
error: (err) => {
|
|
1007
|
-
console.error('Error on delete object', err);
|
|
1008
|
-
},
|
|
1009
|
-
});
|
|
1010
|
-
}
|
|
1172
|
+
this.cmsService.deleteObject(this.id, this.modelName).then(() => {
|
|
1173
|
+
this.finished.emit(null);
|
|
1174
|
+
});
|
|
1011
1175
|
}
|
|
1012
1176
|
/**
|
|
1013
1177
|
* It sends a GraphQL mutation to the server to duplicate the object
|
|
1014
1178
|
*/
|
|
1015
1179
|
async duplicateObject() {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
.subscribe({
|
|
1025
|
-
next: (value) => {
|
|
1026
|
-
if (value?.id) {
|
|
1027
|
-
this.router.navigate(['../' + value.id], { relativeTo: this.route });
|
|
1028
|
-
}
|
|
1029
|
-
else {
|
|
1030
|
-
this.finished.emit(null);
|
|
1031
|
-
}
|
|
1032
|
-
},
|
|
1033
|
-
error: (err) => {
|
|
1034
|
-
console.error('Error on duplicate object', err);
|
|
1035
|
-
},
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1180
|
+
this.cmsService.duplicateObject(this.id, this.modelName).then((value) => {
|
|
1181
|
+
if (value?.id) {
|
|
1182
|
+
this.router.navigate(['../' + value.id], { relativeTo: this.route });
|
|
1183
|
+
}
|
|
1184
|
+
else {
|
|
1185
|
+
this.finished.emit(null);
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1038
1188
|
}
|
|
1039
1189
|
/**
|
|
1040
1190
|
* It takes a string, capitalizes the first letter, and returns the modified string
|
|
@@ -1043,7 +1193,7 @@ class ModelFormComponent {
|
|
|
1043
1193
|
* @returns The first letter of the string is being capitalized and the rest of the string is being returned.
|
|
1044
1194
|
*/
|
|
1045
1195
|
capitalizeFirstLetter(value) {
|
|
1046
|
-
return
|
|
1196
|
+
return this.cmsService.capitalizeFirstLetter(value);
|
|
1047
1197
|
}
|
|
1048
1198
|
/**
|
|
1049
1199
|
* It takes an AbstractControl and returns a FormControl
|
|
@@ -1054,6 +1204,39 @@ class ModelFormComponent {
|
|
|
1054
1204
|
transformToControl(control) {
|
|
1055
1205
|
return control;
|
|
1056
1206
|
}
|
|
1207
|
+
/**
|
|
1208
|
+
* It takes the key of the form control that has changed, gets the value of that form control, creates an object with the
|
|
1209
|
+
* key and value, and then sends that object to the GraphQL server to update the database
|
|
1210
|
+
*/
|
|
1211
|
+
imageChanged(key) {
|
|
1212
|
+
const data = {};
|
|
1213
|
+
data[key] = this.form.get(key).value;
|
|
1214
|
+
if (this.logging) {
|
|
1215
|
+
console.log('ModelFormComponent::imageChanged->body', data);
|
|
1216
|
+
}
|
|
1217
|
+
if (this.id) {
|
|
1218
|
+
try {
|
|
1219
|
+
this.graphQLService
|
|
1220
|
+
.graphQl('update' + this.capitalizeFirstLetter(this.modelName), {
|
|
1221
|
+
arguments: { id: this.id, input: data },
|
|
1222
|
+
fields: ['id'],
|
|
1223
|
+
type: GraphQLRequestType.MUTATION,
|
|
1224
|
+
})
|
|
1225
|
+
.subscribe({
|
|
1226
|
+
next: (value) => {
|
|
1227
|
+
if (this.logging) {
|
|
1228
|
+
console.log('ModelFormComponent::imageChanged->success', value);
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1233
|
+
catch (e) {
|
|
1234
|
+
if (this.logging) {
|
|
1235
|
+
console.log('ModelFormComponent::imageChanged->error', e);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1057
1240
|
/**
|
|
1058
1241
|
* It takes the form, validates it, and then sends it to the GraphQL server
|
|
1059
1242
|
*
|
|
@@ -1085,6 +1268,17 @@ class ModelFormComponent {
|
|
|
1085
1268
|
this.config[key]?.exclude) {
|
|
1086
1269
|
delete data[key];
|
|
1087
1270
|
}
|
|
1271
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
1272
|
+
data[key] = Object.keys(data[key])
|
|
1273
|
+
.filter((k) => data[key][k] != null)
|
|
1274
|
+
.reduce((a, k) => ({ ...a, [k]: data[key][k] }), {});
|
|
1275
|
+
if (Object.keys(data[key])?.length === 0) {
|
|
1276
|
+
if (this.logging) {
|
|
1277
|
+
console.log('Object is empty from result');
|
|
1278
|
+
}
|
|
1279
|
+
data[key] = null;
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1088
1282
|
// Set type for graphql method
|
|
1089
1283
|
if (this.fields[key]?.type === 'Float') {
|
|
1090
1284
|
data[key] = Number(value);
|
|
@@ -1118,12 +1312,12 @@ class ModelFormComponent {
|
|
|
1118
1312
|
});
|
|
1119
1313
|
}
|
|
1120
1314
|
}
|
|
1121
|
-
ModelFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelFormComponent, deps: [{ token: i1$1.GraphQLMetaService }, { token: i1$1.GraphQLService }, { token: i1$1.FormsService }, { token: i1$1.AuthService }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
1122
|
-
ModelFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ModelFormComponent, selector: "base-model-form", inputs: { modelName: "modelName", label: "label", id: "id", delete: "delete", duplicate: "duplicate", logging: "logging", config: "config" }, outputs: { finished: "finished" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"w-100\" *ngIf=\"form\">\n <div class=\"d-flex flex-row justify-content-between mt-3\">\n <h2>\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <div>\n <button class=\"btn btn-outline-primary me-2\" *ngIf=\"id && duplicate && !loading\" (click)=\"duplicateObject()\">\n Duplizieren\n </button>\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"submit(false)\" *ngIf=\"!loading\">\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <base-model-form-sub
|
|
1315
|
+
ModelFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelFormComponent, deps: [{ token: i1$1.GraphQLMetaService }, { token: i1$1.GraphQLService }, { token: i1$1.FormsService }, { token: i1$1.AuthService }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }, { token: i1$1.CmsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1316
|
+
ModelFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ModelFormComponent, selector: "base-model-form", inputs: { modelName: "modelName", label: "label", id: "id", delete: "delete", duplicate: "duplicate", logging: "logging", config: "config" }, outputs: { finished: "finished" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"w-100\" *ngIf=\"form\">\n <div class=\"d-flex flex-row justify-content-between mt-3\">\n <h2 class=\"mb-0\">\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <div class=\"d-flex flex-row align-items-center justify-content-end\">\n <button class=\"btn btn-outline-primary me-2\" *ngIf=\"id && duplicate && !loading\" (click)=\"duplicateObject()\">\n Duplizieren\n </button>\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"submit(false)\" *ngIf=\"!loading\">\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <base-model-form-sub\n [fields]=\"fields\"\n [config]=\"config\"\n [form]=\"form\"\n (imageChanged)=\"imageChanged($event)\"\n ></base-model-form-sub>\n\n <div class=\"d-flex mt-4\" [ngClass]=\"id && delete ? 'justify-content-between' : 'justify-content-end'\">\n <div *ngIf=\"id && delete\">\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteObject()\">L\u00F6schen</button>\n </div>\n <div>\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"submit(false)\" *ngIf=\"!loading\">\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n </form>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["fields", "form", "config"], outputs: ["imageChanged"] }] });
|
|
1123
1317
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelFormComponent, decorators: [{
|
|
1124
1318
|
type: Component,
|
|
1125
|
-
args: [{ selector: 'base-model-form', template: "<div class=\"w-100\" *ngIf=\"form\">\n <div class=\"d-flex flex-row justify-content-between mt-3\">\n <h2>\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <div>\n <button class=\"btn btn-outline-primary me-2\" *ngIf=\"id && duplicate && !loading\" (click)=\"duplicateObject()\">\n Duplizieren\n </button>\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"submit(false)\" *ngIf=\"!loading\">\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <base-model-form-sub
|
|
1126
|
-
}], ctorParameters: function () { return [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }, { type: i1$1.FormsService }, { type: i1$1.AuthService }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }]; }, propDecorators: { modelName: [{
|
|
1319
|
+
args: [{ selector: 'base-model-form', template: "<div class=\"w-100\" *ngIf=\"form\">\n <div class=\"d-flex flex-row justify-content-between mt-3\">\n <h2 class=\"mb-0\">\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <div class=\"d-flex flex-row align-items-center justify-content-end\">\n <button class=\"btn btn-outline-primary me-2\" *ngIf=\"id && duplicate && !loading\" (click)=\"duplicateObject()\">\n Duplizieren\n </button>\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"submit(false)\" *ngIf=\"!loading\">\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n\n <form [formGroup]=\"form\">\n <base-model-form-sub\n [fields]=\"fields\"\n [config]=\"config\"\n [form]=\"form\"\n (imageChanged)=\"imageChanged($event)\"\n ></base-model-form-sub>\n\n <div class=\"d-flex mt-4\" [ngClass]=\"id && delete ? 'justify-content-between' : 'justify-content-end'\">\n <div *ngIf=\"id && delete\">\n <button class=\"btn btn-danger\" type=\"button\" (click)=\"deleteObject()\">L\u00F6schen</button>\n </div>\n <div>\n <button class=\"btn btn-primary\" type=\"button\" (click)=\"submit(false)\" *ngIf=\"!loading\">\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}\n </button>\n <button class=\"btn btn-primary\" type=\"button\" disabled *ngIf=\"loading\">\n <span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>\n {{ operation === 'create' ? 'Erstellen' : 'Speichern' }}...\n </button>\n </div>\n </div>\n </form>\n</div>\n" }]
|
|
1320
|
+
}], ctorParameters: function () { return [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }, { type: i1$1.FormsService }, { type: i1$1.AuthService }, { type: i2$1.Router }, { type: i2$1.ActivatedRoute }, { type: i1$1.CmsService }]; }, propDecorators: { modelName: [{
|
|
1127
1321
|
type: Input
|
|
1128
1322
|
}], label: [{
|
|
1129
1323
|
type: Input
|
|
@@ -1142,9 +1336,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
1142
1336
|
}] } });
|
|
1143
1337
|
|
|
1144
1338
|
class ModelTableComponent {
|
|
1145
|
-
constructor(graphQLMetaService, graphQLService) {
|
|
1339
|
+
constructor(graphQLMetaService, graphQLService, cmsService) {
|
|
1146
1340
|
this.graphQLMetaService = graphQLMetaService;
|
|
1147
1341
|
this.graphQLService = graphQLService;
|
|
1342
|
+
this.cmsService = cmsService;
|
|
1148
1343
|
this.createMode = false;
|
|
1149
1344
|
this.logging = false;
|
|
1150
1345
|
this.create = true;
|
|
@@ -1153,6 +1348,7 @@ class ModelTableComponent {
|
|
|
1153
1348
|
this.duplicate = true;
|
|
1154
1349
|
this.config = {};
|
|
1155
1350
|
this.fieldConfig = {};
|
|
1351
|
+
this.uniqueField = 'id';
|
|
1156
1352
|
this.idSelected = new EventEmitter();
|
|
1157
1353
|
this.createModeChanged = new EventEmitter();
|
|
1158
1354
|
this.tableFields = {
|
|
@@ -1209,7 +1405,7 @@ class ModelTableComponent {
|
|
|
1209
1405
|
if (this.config?.tableFields) {
|
|
1210
1406
|
this.tableFields = this.config.tableFields;
|
|
1211
1407
|
}
|
|
1212
|
-
const possibleFields = this.meta.getFields(this.queryName);
|
|
1408
|
+
const possibleFields = this.meta.getFields(this.queryName).fields;
|
|
1213
1409
|
const keys = Object.keys(possibleFields);
|
|
1214
1410
|
const tableFieldKeys = Object.keys(this.tableFields);
|
|
1215
1411
|
tableFieldKeys?.forEach((field) => {
|
|
@@ -1272,22 +1468,35 @@ class ModelTableComponent {
|
|
|
1272
1468
|
this.idSelected.emit(this.selectedId);
|
|
1273
1469
|
}
|
|
1274
1470
|
}
|
|
1471
|
+
/**
|
|
1472
|
+
* It calls the duplicateObject function in the cmsService, passing in the id of the object to be duplicated and the
|
|
1473
|
+
* modelName of the object
|
|
1474
|
+
*/
|
|
1475
|
+
async duplicateObject(id) {
|
|
1476
|
+
await this.cmsService.duplicateObject(id, this.modelName);
|
|
1477
|
+
this.loadObjects(this.availableFields);
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
* It calls the deleteObject function in the cmsService, passing in the id of the object to delete and the name of the
|
|
1481
|
+
* model
|
|
1482
|
+
*/
|
|
1483
|
+
async deleteObject(id) {
|
|
1484
|
+
await this.cmsService.deleteObject(id, this.modelName);
|
|
1485
|
+
this.loadObjects(this.availableFields);
|
|
1486
|
+
}
|
|
1275
1487
|
/**
|
|
1276
1488
|
* It takes a string, capitalizes the first letter, and returns the modified string
|
|
1277
|
-
*
|
|
1278
|
-
* @param value - The string to capitalize.
|
|
1279
|
-
* @returns The first letter of the string is being capitalized and the rest of the string is being returned.
|
|
1280
1489
|
*/
|
|
1281
1490
|
capitalizeFirstLetter(value) {
|
|
1282
|
-
return
|
|
1491
|
+
return this.cmsService.capitalizeFirstLetter(value);
|
|
1283
1492
|
}
|
|
1284
1493
|
}
|
|
1285
|
-
ModelTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelTableComponent, deps: [{ token: i1$1.GraphQLMetaService }, { token: i1$1.GraphQLService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1286
|
-
ModelTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ModelTableComponent, selector: "base-model-table", inputs: { modelName: "modelName", objectId: "objectId", createMode: "createMode", logging: "logging", create: "create", update: "update", delete: "delete", duplicate: "duplicate", config: "config", fieldConfig: "fieldConfig" }, outputs: { idSelected: "idSelected", createModeChanged: "createModeChanged" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!selectedId && !createMode\">\n <div class=\"w-100 d-flex flex-row justify-content-between mb-4\">\n <h2 *ngIf=\"modelName\">\n {{ config?.plural ? config?.plural : config?.label ? config?.label : capitalizeFirstLetter(modelName) + 's' }}\n </h2>\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-primary\" (click)=\"createNewObject()\" *ngIf=\"create\">Erstellen</button>\n </div>\n </div>\n <table class=\"table table-hover
|
|
1494
|
+
ModelTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelTableComponent, deps: [{ token: i1$1.GraphQLMetaService }, { token: i1$1.GraphQLService }, { token: i1$1.CmsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1495
|
+
ModelTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: ModelTableComponent, selector: "base-model-table", inputs: { modelName: "modelName", objectId: "objectId", createMode: "createMode", logging: "logging", create: "create", update: "update", delete: "delete", duplicate: "duplicate", config: "config", fieldConfig: "fieldConfig" }, outputs: { idSelected: "idSelected", createModeChanged: "createModeChanged" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"!selectedId && !createMode\">\n <div class=\"w-100 d-flex flex-row justify-content-between align-items-center mb-4\">\n <h2 class=\"mb-0\" *ngIf=\"modelName\">\n {{ config?.plural ? config?.plural : config?.label ? config?.label : capitalizeFirstLetter(modelName) + 's' }}\n </h2>\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-primary\" (click)=\"createNewObject()\" *ngIf=\"create\">Erstellen</button>\n </div>\n </div>\n\n <div\n class=\"table-responsive\"\n [ltContextMenu]=\"contextMenu\"\n [selectors]=\"'.object-col'\"\n #contextMenuData=\"contextMenuData\"\n >\n <table class=\"table table-hover bg-white\">\n <thead>\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let field of availableFields\"\n [baseSort]=\"objects\"\n data-order=\"desc\"\n [attr.data-name]=\"field\"\n >\n {{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr class=\"object-col\" *ngFor=\"let object of objects\" [id]=\"object[uniqueField]\">\n <td class=\"cursor-pointer\" *ngFor=\"let field of availableFields\" (click)=\"selectId(object)\">\n <ng-container *ngIf=\"tableFields[field]?.dateFormat\">\n {{ object[field] | date: tableFields[field]?.dateFormat }} Uhr\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat\">\n {{ object[field] }}\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"context-menu\" #contextMenu>\n <div class=\"context-menu-item\" (click)=\"selectId({ id: contextMenuData.clickedElement?.id })\">Bearbeiten</div>\n <div class=\"context-menu-item\" *ngIf=\"duplicate\" (click)=\"duplicateObject(contextMenuData.clickedElement?.id)\">\n Duplizieren\n </div>\n <div class=\"context-menu-item\" *ngIf=\"delete\" (click)=\"deleteObject(contextMenuData.clickedElement?.id)\">\n L\u00F6schen\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"w-100\" *ngIf=\"selectedId || createMode\">\n <button class=\"btn btn-outline-primary mb-3\" (click)=\"selectId('')\">Zur\u00FCck</button>\n <base-model-form\n [modelName]=\"modelName\"\n [label]=\"config?.label\"\n [config]=\"fieldConfig\"\n [logging]=\"logging\"\n [id]=\"selectedId\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n [duplicate]=\"duplicate\"\n ></base-model-form>\n</div>\n", styles: [".cursor-pointer{cursor:pointer}.asc:after,.desc:after{border-style:solid;border-width:.2em .2em 0 0;content:\"\";display:inline-block;height:.45em;left:5px;position:relative;transform:rotate(-45deg);vertical-align:middle;width:.45em}.asc:after{transform:rotate(135deg)}td{vertical-align:middle}.bi,th{cursor:pointer;-webkit-user-select:none;user-select:none}.table>:not(:first-child){border-top:0}table{border-radius:.25rem;border-color:#e2e8f0!important}table thead{text-transform:uppercase;font-size:12px}table thead th{padding:12px 24px}table tbody tr td{font-weight:400!important;font-size:16px;padding:16px 24px}.context-menu{opacity:.01%;pointer-events:none;background-color:#fff;border:1px solid #ccc;box-shadow:1px 1px 10px #0000001a;padding:10px 0;position:fixed;top:0;left:0;width:200px}.context-menu-item{cursor:pointer;padding:8px 15px}.context-menu-item:hover{color:var(--bs-primary)}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: SortDirective, selector: "[baseSort]", inputs: ["baseSort"] }, { kind: "directive", type: ContextMenuDirective, selector: "[ltContextMenu]", inputs: ["contextMenuData", "ltContextMenu", "xGap", "yGap", "overflowSpace", "selectors"], outputs: ["clickedElement"], exportAs: ["contextMenuData"] }, { kind: "component", type: ModelFormComponent, selector: "base-model-form", inputs: ["modelName", "label", "id", "delete", "duplicate", "logging", "config"], outputs: ["finished"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }] });
|
|
1287
1496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelTableComponent, decorators: [{
|
|
1288
1497
|
type: Component,
|
|
1289
|
-
args: [{ selector: 'base-model-table', template: "<div *ngIf=\"!selectedId && !createMode\">\n <div class=\"w-100 d-flex flex-row justify-content-between mb-4\">\n <h2 *ngIf=\"modelName\">\n {{ config?.plural ? config?.plural : config?.label ? config?.label : capitalizeFirstLetter(modelName) + 's' }}\n </h2>\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-primary\" (click)=\"createNewObject()\" *ngIf=\"create\">Erstellen</button>\n </div>\n </div>\n <table class=\"table table-hover
|
|
1290
|
-
}], ctorParameters: function () { return [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }]; }, propDecorators: { modelName: [{
|
|
1498
|
+
args: [{ selector: 'base-model-table', template: "<div *ngIf=\"!selectedId && !createMode\">\n <div class=\"w-100 d-flex flex-row justify-content-between align-items-center mb-4\">\n <h2 class=\"mb-0\" *ngIf=\"modelName\">\n {{ config?.plural ? config?.plural : config?.label ? config?.label : capitalizeFirstLetter(modelName) + 's' }}\n </h2>\n <div class=\"d-flex align-items-center\">\n <button class=\"btn btn-primary\" (click)=\"createNewObject()\" *ngIf=\"create\">Erstellen</button>\n </div>\n </div>\n\n <div\n class=\"table-responsive\"\n [ltContextMenu]=\"contextMenu\"\n [selectors]=\"'.object-col'\"\n #contextMenuData=\"contextMenuData\"\n >\n <table class=\"table table-hover bg-white\">\n <thead>\n <tr>\n <th\n scope=\"col\"\n *ngFor=\"let field of availableFields\"\n [baseSort]=\"objects\"\n data-order=\"desc\"\n [attr.data-name]=\"field\"\n >\n {{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr class=\"object-col\" *ngFor=\"let object of objects\" [id]=\"object[uniqueField]\">\n <td class=\"cursor-pointer\" *ngFor=\"let field of availableFields\" (click)=\"selectId(object)\">\n <ng-container *ngIf=\"tableFields[field]?.dateFormat\">\n {{ object[field] | date: tableFields[field]?.dateFormat }} Uhr\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat\">\n {{ object[field] }}\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"context-menu\" #contextMenu>\n <div class=\"context-menu-item\" (click)=\"selectId({ id: contextMenuData.clickedElement?.id })\">Bearbeiten</div>\n <div class=\"context-menu-item\" *ngIf=\"duplicate\" (click)=\"duplicateObject(contextMenuData.clickedElement?.id)\">\n Duplizieren\n </div>\n <div class=\"context-menu-item\" *ngIf=\"delete\" (click)=\"deleteObject(contextMenuData.clickedElement?.id)\">\n L\u00F6schen\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"w-100\" *ngIf=\"selectedId || createMode\">\n <button class=\"btn btn-outline-primary mb-3\" (click)=\"selectId('')\">Zur\u00FCck</button>\n <base-model-form\n [modelName]=\"modelName\"\n [label]=\"config?.label\"\n [config]=\"fieldConfig\"\n [logging]=\"logging\"\n [id]=\"selectedId\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n [duplicate]=\"duplicate\"\n ></base-model-form>\n</div>\n", styles: [".cursor-pointer{cursor:pointer}.asc:after,.desc:after{border-style:solid;border-width:.2em .2em 0 0;content:\"\";display:inline-block;height:.45em;left:5px;position:relative;transform:rotate(-45deg);vertical-align:middle;width:.45em}.asc:after{transform:rotate(135deg)}td{vertical-align:middle}.bi,th{cursor:pointer;-webkit-user-select:none;user-select:none}.table>:not(:first-child){border-top:0}table{border-radius:.25rem;border-color:#e2e8f0!important}table thead{text-transform:uppercase;font-size:12px}table thead th{padding:12px 24px}table tbody tr td{font-weight:400!important;font-size:16px;padding:16px 24px}.context-menu{opacity:.01%;pointer-events:none;background-color:#fff;border:1px solid #ccc;box-shadow:1px 1px 10px #0000001a;padding:10px 0;position:fixed;top:0;left:0;width:200px}.context-menu-item{cursor:pointer;padding:8px 15px}.context-menu-item:hover{color:var(--bs-primary)}\n"] }]
|
|
1499
|
+
}], ctorParameters: function () { return [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }, { type: i1$1.CmsService }]; }, propDecorators: { modelName: [{
|
|
1291
1500
|
type: Input
|
|
1292
1501
|
}], objectId: [{
|
|
1293
1502
|
type: Input
|
|
@@ -1313,10 +1522,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
1313
1522
|
type: Output
|
|
1314
1523
|
}] } });
|
|
1315
1524
|
|
|
1525
|
+
class BackButtonDirective {
|
|
1526
|
+
constructor(navigation) {
|
|
1527
|
+
this.navigation = navigation;
|
|
1528
|
+
}
|
|
1529
|
+
onClick() {
|
|
1530
|
+
this.navigation.back();
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
BackButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BackButtonDirective, deps: [{ token: i1$1.NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1534
|
+
BackButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.0", type: BackButtonDirective, selector: "[baseBackButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
1535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BackButtonDirective, decorators: [{
|
|
1536
|
+
type: Directive,
|
|
1537
|
+
args: [{
|
|
1538
|
+
selector: '[baseBackButton]',
|
|
1539
|
+
}]
|
|
1540
|
+
}], ctorParameters: function () { return [{ type: i1$1.NavigationService }]; }, propDecorators: { onClick: [{
|
|
1541
|
+
type: HostListener,
|
|
1542
|
+
args: ['click']
|
|
1543
|
+
}] } });
|
|
1544
|
+
|
|
1316
1545
|
// Modules
|
|
1317
1546
|
const imports = [FormsModule, ReactiveFormsModule, CommonModule];
|
|
1318
1547
|
// Imported and exported elements
|
|
1319
1548
|
const elements = [
|
|
1549
|
+
// Directives
|
|
1550
|
+
SortDirective,
|
|
1551
|
+
BackButtonDirective,
|
|
1552
|
+
ContextMenuDirective,
|
|
1320
1553
|
// Components
|
|
1321
1554
|
InputComponent,
|
|
1322
1555
|
SelectComponent,
|
|
@@ -1337,6 +1570,10 @@ class BaseComponentsModule {
|
|
|
1337
1570
|
}
|
|
1338
1571
|
BaseComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BaseComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1339
1572
|
BaseComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.0", ngImport: i0, type: BaseComponentsModule, declarations: [
|
|
1573
|
+
// Directives
|
|
1574
|
+
SortDirective,
|
|
1575
|
+
BackButtonDirective,
|
|
1576
|
+
ContextMenuDirective,
|
|
1340
1577
|
// Components
|
|
1341
1578
|
InputComponent,
|
|
1342
1579
|
SelectComponent,
|
|
@@ -1352,6 +1589,10 @@ BaseComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
|
|
|
1352
1589
|
ModelFormSubComponent,
|
|
1353
1590
|
UploadImageComponent,
|
|
1354
1591
|
RefenceInputComponent], imports: [FormsModule, ReactiveFormsModule, CommonModule], exports: [
|
|
1592
|
+
// Directives
|
|
1593
|
+
SortDirective,
|
|
1594
|
+
BackButtonDirective,
|
|
1595
|
+
ContextMenuDirective,
|
|
1355
1596
|
// Components
|
|
1356
1597
|
InputComponent,
|
|
1357
1598
|
SelectComponent,
|
|
@@ -1385,5 +1626,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
|
|
|
1385
1626
|
* Generated bundle index. Do not edit.
|
|
1386
1627
|
*/
|
|
1387
1628
|
|
|
1388
|
-
export { BaseComponentsModule, BreadcrumbComponent, CheckboxComponent, InputComponent, LoadingBarComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, RefenceInputComponent, SelectComponent, SkeletonLoaderComponent, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
|
|
1629
|
+
export { BackButtonDirective, BaseComponentsModule, BreadcrumbComponent, CheckboxComponent, ContextMenuDirective, InputComponent, LoadingBarComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, RefenceInputComponent, SelectComponent, SkeletonLoaderComponent, SortDirective, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
|
|
1389
1630
|
//# sourceMappingURL=lenne.tech-ng-base-base-components.mjs.map
|