@lenne.tech/ng-base 13.16.0 → 13.19.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-cms/base-cms.module.d.ts +6 -6
- package/base-cms/interfaces/base-cms-module-config.interface.d.ts +6 -6
- package/base-cms/pages/base-cms/base-cms.component.d.ts +0 -7
- package/base-components/base-components.module.d.ts +5 -3
- package/base-components/components/model-form/model-form.component.d.ts +13 -2
- package/base-components/components/model-form-sub/model-form-sub.component.d.ts +26 -0
- package/base-components/components/model-table/model-table.component.d.ts +4 -3
- package/base-components/components/upload-image/upload-image.component.d.ts +70 -0
- package/base-components/public-api.d.ts +2 -0
- package/base-prototype/base-prototype.module.d.ts +7 -6
- package/base-prototype/pages/profile/profile.component.d.ts +34 -0
- package/base-prototype/public-api.d.ts +1 -0
- package/esm2020/base-cms/base-cms.module.mjs +3 -4
- package/esm2020/base-cms/interfaces/base-cms-module-config.interface.mjs +1 -1
- package/esm2020/base-cms/pages/base-cms/base-cms.component.mjs +10 -24
- package/esm2020/base-components/base-components.module.mjs +11 -3
- package/esm2020/base-components/components/model-form/model-form.component.mjs +47 -12
- package/esm2020/base-components/components/model-form-sub/model-form-sub.component.mjs +47 -0
- package/esm2020/base-components/components/model-table/model-table.component.mjs +14 -10
- package/esm2020/base-components/components/upload-image/upload-image.component.mjs +138 -0
- package/esm2020/base-components/public-api.mjs +3 -1
- package/esm2020/base-prototype/base-prototype.module.mjs +8 -4
- package/esm2020/base-prototype/pages/profile/profile.component.mjs +45 -0
- package/esm2020/base-prototype/public-api.mjs +2 -1
- package/esm2020/shared/classes/graphql-meta.class.mjs +14 -2
- package/esm2020/shared/classes/sort.class.mjs +47 -0
- package/esm2020/shared/directives/sort.directive.mjs +54 -0
- package/esm2020/shared/public-api.mjs +4 -1
- package/esm2020/shared/services/graphql.service.mjs +6 -1
- package/esm2020/shared/services/user.service.mjs +2 -1
- package/fesm2015/lenne.tech-ng-base-base-cms.mjs +16 -30
- package/fesm2015/lenne.tech-ng-base-base-cms.mjs.map +1 -1
- package/fesm2015/lenne.tech-ng-base-base-components.mjs +246 -21
- package/fesm2015/lenne.tech-ng-base-base-components.mjs.map +1 -1
- package/fesm2015/lenne.tech-ng-base-base-prototype.mjs +49 -5
- package/fesm2015/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
- package/fesm2015/lenne.tech-ng-base-shared.mjs +122 -3
- package/fesm2015/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-base-cms.mjs +11 -26
- package/fesm2020/lenne.tech-ng-base-base-cms.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-base-components.mjs +240 -18
- package/fesm2020/lenne.tech-ng-base-base-components.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-base-prototype.mjs +49 -5
- package/fesm2020/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-shared.mjs +119 -3
- package/fesm2020/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/package.json +3 -2
- package/shared/classes/sort.class.d.ts +19 -0
- package/shared/directives/sort.directive.d.ts +14 -0
- package/shared/public-api.d.ts +2 -0
|
@@ -8,6 +8,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
10
|
import { ToastType, GraphQLRequestType } from '@lenne.tech/ng-base/shared';
|
|
11
|
+
import * as i1$2 from '@angular/common/http';
|
|
11
12
|
|
|
12
13
|
class InputComponent {
|
|
13
14
|
constructor() {
|
|
@@ -369,6 +370,180 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
369
370
|
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"] }]
|
|
370
371
|
}], ctorParameters: function () { return [{ type: i1$1.BreadcrumbService }]; } });
|
|
371
372
|
|
|
373
|
+
class UploadImageComponent {
|
|
374
|
+
constructor(httpClient) {
|
|
375
|
+
this.httpClient = httpClient;
|
|
376
|
+
this.supportText = 'Supports: JPEG, JPG, PNG';
|
|
377
|
+
this.required = false;
|
|
378
|
+
this.dragText = 'Drag & Drop';
|
|
379
|
+
this.validExtensions = ['image/jpeg', 'image/jpg', 'image/png'];
|
|
380
|
+
this.url = 'http://localhost:3000';
|
|
381
|
+
this.uploadPath = '/files/upload';
|
|
382
|
+
this.deletePath = '/files/';
|
|
383
|
+
this.path = '/files/';
|
|
384
|
+
this.dragActive = false;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* The dragOver function is called when the user drags a file over the dropzone. It prevents the default action of the
|
|
388
|
+
* event, and sets the dragText to 'Release to Upload' and the dragActive to true
|
|
389
|
+
*
|
|
390
|
+
* @param event - any - This is the event that is triggered when the user drags a file over the dropzone.
|
|
391
|
+
*/
|
|
392
|
+
dragOver(event) {
|
|
393
|
+
event.preventDefault();
|
|
394
|
+
this.dragText = 'Release to Upload';
|
|
395
|
+
this.dragActive = true;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* When the user drags a file over the drop zone, the dragActive variable is set to true, which will change the color of
|
|
399
|
+
* the drop zone to green
|
|
400
|
+
*
|
|
401
|
+
* @param event - The event object that is passed to the dragLeave event.
|
|
402
|
+
*/
|
|
403
|
+
dragLeave(event) {
|
|
404
|
+
this.dragText = 'Drag & Drop';
|
|
405
|
+
this.dragActive = false;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* The function takes an event as a parameter, prevents the default action of the event, sets the URL of the image to the
|
|
409
|
+
* file that was dragged and dropped, sets the text of the drag and drop area to the default text, and sets the
|
|
410
|
+
* dragActive variable to false
|
|
411
|
+
*
|
|
412
|
+
* @param event - any - This is the event that is triggered when the user drags and drops a file.
|
|
413
|
+
*/
|
|
414
|
+
drop(event) {
|
|
415
|
+
event.preventDefault();
|
|
416
|
+
this.setUrl(event.dataTransfer.files[0]);
|
|
417
|
+
this.dragText = 'Drag & Drop';
|
|
418
|
+
this.dragActive = false;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* It takes a file as an argument, checks if the file type is valid, and if it is, it creates a new FileReader object,
|
|
422
|
+
* sets the onload function to set the fileUrl to the result of the fileReader, sets the selectedFile to the file, and
|
|
423
|
+
* calls the upload function
|
|
424
|
+
*
|
|
425
|
+
* @param file - any - this is the file that is selected by the user.
|
|
426
|
+
*/
|
|
427
|
+
setUrl(file) {
|
|
428
|
+
if (this.validExtensions.includes(file.type)) {
|
|
429
|
+
const fileReader = new FileReader();
|
|
430
|
+
fileReader.onload = () => {
|
|
431
|
+
this.fileUrl = fileReader.result;
|
|
432
|
+
this.selectedFile = file;
|
|
433
|
+
this.upload();
|
|
434
|
+
};
|
|
435
|
+
fileReader.readAsDataURL(file);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* The function takes an event as an argument, and then sets the url of the file to the first file in the event's
|
|
440
|
+
* target's files array
|
|
441
|
+
*
|
|
442
|
+
* @param event - any - The event that is triggered when the user selects a file.
|
|
443
|
+
*/
|
|
444
|
+
selectFile(event) {
|
|
445
|
+
this.setUrl(event.target.files[0]);
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* We create a new FormData object, append the selected file to it, and then send it to the server
|
|
449
|
+
*/
|
|
450
|
+
upload() {
|
|
451
|
+
const data = new FormData();
|
|
452
|
+
data.append('file', this.selectedFile);
|
|
453
|
+
this.httpClient.post(this.url + this.uploadPath, data).subscribe((result) => {
|
|
454
|
+
if (result?.id) {
|
|
455
|
+
this.control.setValue(result.id);
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* It deletes the file from the server and sets the selectedFile and fileUrl to null
|
|
461
|
+
*
|
|
462
|
+
* @param [id] - The id of the file to delete.
|
|
463
|
+
*/
|
|
464
|
+
deleteFile(id) {
|
|
465
|
+
this.selectedFile = null;
|
|
466
|
+
this.fileUrl = null;
|
|
467
|
+
if (id) {
|
|
468
|
+
this.httpClient.delete(this.url + this.deletePath + id).subscribe((result) => {
|
|
469
|
+
this.selectedFile = null;
|
|
470
|
+
this.fileUrl = null;
|
|
471
|
+
this.control.setValue('');
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
UploadImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: UploadImageComponent, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
|
|
477
|
+
UploadImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", 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" }, ngImport: i0, template: "<div class=\"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 <ng-container *ngIf=\"selectedFile && !control?.value\">\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\">\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\">\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</div>\n", styles: [".required:after{content:\" *\"}.drag-area{height:400px;border:2px dashed #e1e1e1;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%}.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"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: UploadImageComponent, decorators: [{
|
|
479
|
+
type: Component,
|
|
480
|
+
args: [{ selector: 'base-upload-image', template: "<div class=\"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 <ng-container *ngIf=\"selectedFile && !control?.value\">\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\">\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\">\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</div>\n", styles: [".required:after{content:\" *\"}.drag-area{height:400px;border:2px dashed #e1e1e1;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%}.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"] }]
|
|
481
|
+
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; }, propDecorators: { id: [{
|
|
482
|
+
type: Input
|
|
483
|
+
}], name: [{
|
|
484
|
+
type: Input
|
|
485
|
+
}], label: [{
|
|
486
|
+
type: Input
|
|
487
|
+
}], supportText: [{
|
|
488
|
+
type: Input
|
|
489
|
+
}], required: [{
|
|
490
|
+
type: Input
|
|
491
|
+
}], dragText: [{
|
|
492
|
+
type: Input
|
|
493
|
+
}], validExtensions: [{
|
|
494
|
+
type: Input
|
|
495
|
+
}], control: [{
|
|
496
|
+
type: Input
|
|
497
|
+
}], url: [{
|
|
498
|
+
type: Input
|
|
499
|
+
}], uploadPath: [{
|
|
500
|
+
type: Input
|
|
501
|
+
}], deletePath: [{
|
|
502
|
+
type: Input
|
|
503
|
+
}], path: [{
|
|
504
|
+
type: Input
|
|
505
|
+
}] } });
|
|
506
|
+
|
|
507
|
+
class ModelFormSubComponent {
|
|
508
|
+
constructor() {
|
|
509
|
+
this.config = {};
|
|
510
|
+
this.keys = [];
|
|
511
|
+
}
|
|
512
|
+
ngOnInit() {
|
|
513
|
+
this.keys = Object.keys(this.fields);
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* It takes a string, capitalizes the first letter, and returns the new string
|
|
517
|
+
*
|
|
518
|
+
* @param value - The string that you want to capitalize the first letter of.
|
|
519
|
+
* @returns The first letter of the string is being capitalized and the rest of the string is being returned.
|
|
520
|
+
*/
|
|
521
|
+
capitalizeFirstLetter(value) {
|
|
522
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* It takes an AbstractControl and returns a FormControl
|
|
526
|
+
*
|
|
527
|
+
* @param control - AbstractControl | null | undefined
|
|
528
|
+
* @returns A FormControl
|
|
529
|
+
*/
|
|
530
|
+
transformToControl(control) {
|
|
531
|
+
return control;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
ModelFormSubComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ModelFormSubComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
535
|
+
ModelFormSubComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: { fields: "fields", form: "form", config: "config" }, ngImport: i0, template: "<div class=\"mt-3\" *ngFor=\"let key of keys\">\n <ng-container *ngIf=\"!fields[key]?.type\">\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\">\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]=\"fields[key].isRequired\"\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]=\"fields[key].isRequired\"\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]=\"fields[key].isRequired\"\n ></base-upload-image>\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]=\"fields[key].isRequired\"\n ></base-checkbox>\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]=\"fields[key].isRequired\"\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]=\"fields[key].isRequired\"\n ></base-input>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n", styles: [""], components: [{ type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["fields", "form", "config"] }, { type: TagsComponent, selector: "base-tags", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "options", "custom", "removeByKey", "required"] }, { type: InputComponent, selector: "base-input", inputs: ["id", "name", "label", "placeholder", "autocomplete", "tabIndex", "control", "type", "required"] }, { type: UploadImageComponent, selector: "base-upload-image", inputs: ["id", "name", "label", "supportText", "required", "dragText", "validExtensions", "control", "url", "uploadPath", "deletePath", "path"] }, { type: CheckboxComponent, selector: "base-checkbox", inputs: ["id", "name", "label", "value", "control", "required"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ModelFormSubComponent, decorators: [{
|
|
537
|
+
type: Component,
|
|
538
|
+
args: [{ selector: 'base-model-form-sub', template: "<div class=\"mt-3\" *ngFor=\"let key of keys\">\n <ng-container *ngIf=\"!fields[key]?.type\">\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\">\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]=\"fields[key].isRequired\"\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]=\"fields[key].isRequired\"\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]=\"fields[key].isRequired\"\n ></base-upload-image>\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]=\"fields[key].isRequired\"\n ></base-checkbox>\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]=\"fields[key].isRequired\"\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]=\"fields[key].isRequired\"\n ></base-input>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n", styles: [""] }]
|
|
539
|
+
}], propDecorators: { fields: [{
|
|
540
|
+
type: Input
|
|
541
|
+
}], form: [{
|
|
542
|
+
type: Input
|
|
543
|
+
}], config: [{
|
|
544
|
+
type: Input
|
|
545
|
+
}] } });
|
|
546
|
+
|
|
372
547
|
class ModelFormComponent {
|
|
373
548
|
constructor(graphQLMetaService, graphQLService, formsService) {
|
|
374
549
|
this.graphQLMetaService = graphQLMetaService;
|
|
@@ -376,6 +551,7 @@ class ModelFormComponent {
|
|
|
376
551
|
this.formsService = formsService;
|
|
377
552
|
this.delete = true;
|
|
378
553
|
this.logging = false;
|
|
554
|
+
this.config = {};
|
|
379
555
|
this.finished = new EventEmitter();
|
|
380
556
|
this.loading = false;
|
|
381
557
|
this.keys = [];
|
|
@@ -409,12 +585,15 @@ class ModelFormComponent {
|
|
|
409
585
|
console.log('ModelFormComponent::init->fields', this.fields);
|
|
410
586
|
console.log('ModelFormComponent::init->keys', this.keys);
|
|
411
587
|
}
|
|
412
|
-
this.createForm(this.fields);
|
|
588
|
+
this.form = this.createForm(this.fields);
|
|
413
589
|
if (this.id) {
|
|
414
590
|
this.getObjectById(this.id);
|
|
415
591
|
}
|
|
416
592
|
}
|
|
417
593
|
}
|
|
594
|
+
getKeysFromSubObject(key) {
|
|
595
|
+
return Object.keys(this.fields[key]);
|
|
596
|
+
}
|
|
418
597
|
/**
|
|
419
598
|
* It takes an id, and then calls the graphQLService to get the object from the database
|
|
420
599
|
*
|
|
@@ -423,11 +602,12 @@ class ModelFormComponent {
|
|
|
423
602
|
getObjectById(id) {
|
|
424
603
|
if (this.logging) {
|
|
425
604
|
console.log('ModelFormComponent::getObjectById->id', id);
|
|
605
|
+
console.log('ModelFormComponent::getObjectById->requestFields', this.createRequestObject(this.fields));
|
|
426
606
|
}
|
|
427
607
|
this.graphQLService
|
|
428
608
|
.graphQl('get' + this.capitalizeFirstLetter(this.modelName), {
|
|
429
609
|
arguments: { id },
|
|
430
|
-
fields: this.
|
|
610
|
+
fields: this.createRequestObject(this.fields),
|
|
431
611
|
type: GraphQLRequestType.QUERY,
|
|
432
612
|
})
|
|
433
613
|
.subscribe({
|
|
@@ -443,6 +623,28 @@ class ModelFormComponent {
|
|
|
443
623
|
},
|
|
444
624
|
});
|
|
445
625
|
}
|
|
626
|
+
/**
|
|
627
|
+
* It takes a GraphQL type collection and returns an array of strings and objects
|
|
628
|
+
*
|
|
629
|
+
* @param fields - IGraphQLTypeCollection - This is the object that is returned from the
|
|
630
|
+
* introspection query.
|
|
631
|
+
* @returns An array of strings and objects.
|
|
632
|
+
*/
|
|
633
|
+
createRequestObject(fields) {
|
|
634
|
+
const requestFields = [];
|
|
635
|
+
for (const [key, value] of Object.entries(fields)) {
|
|
636
|
+
if (fields[key]?.type) {
|
|
637
|
+
requestFields.push(key);
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
const subkeys = this.createRequestObject(fields[key]);
|
|
641
|
+
const resultObject = {};
|
|
642
|
+
resultObject[key] = subkeys;
|
|
643
|
+
requestFields.push(resultObject);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
return requestFields;
|
|
647
|
+
}
|
|
446
648
|
/**
|
|
447
649
|
* It takes a collection of GraphQL types and creates a form group with a form control for each type
|
|
448
650
|
*
|
|
@@ -452,10 +654,13 @@ class ModelFormComponent {
|
|
|
452
654
|
const group = {};
|
|
453
655
|
for (const [key, value] of Object.entries(fields)) {
|
|
454
656
|
if (fields[key]?.type) {
|
|
455
|
-
group[key] = new FormControl('', value.isRequired ? Validators.required : []);
|
|
657
|
+
group[key] = new FormControl(fields[key]?.type === 'Float' ? 0 : '', value.isRequired ? Validators.required : []);
|
|
658
|
+
}
|
|
659
|
+
else {
|
|
660
|
+
group[key] = this.createForm(fields[key]);
|
|
456
661
|
}
|
|
457
662
|
}
|
|
458
|
-
|
|
663
|
+
return new FormGroup(group);
|
|
459
664
|
}
|
|
460
665
|
/**
|
|
461
666
|
* It calls the graphQLService to delete the object with the id of the object that is currently being edited
|
|
@@ -513,6 +718,9 @@ class ModelFormComponent {
|
|
|
513
718
|
this.loading = false;
|
|
514
719
|
return;
|
|
515
720
|
}
|
|
721
|
+
if (this.logging) {
|
|
722
|
+
console.log('ModelFormComponent::submit->formValue', this.form.value);
|
|
723
|
+
}
|
|
516
724
|
this.graphQLService
|
|
517
725
|
.graphQl(this.operation + this.capitalizeFirstLetter(this.modelName), {
|
|
518
726
|
arguments: this.operation === 'update' ? { id: this.id, input: this.form.value } : { input: this.form.value },
|
|
@@ -532,18 +740,22 @@ class ModelFormComponent {
|
|
|
532
740
|
}
|
|
533
741
|
}
|
|
534
742
|
ModelFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ModelFormComponent, deps: [{ token: i1$1.GraphQLMetaService }, { token: i1$1.GraphQLService }, { token: i1$1.FormsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
535
|
-
ModelFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: ModelFormComponent, selector: "base-model-form", inputs: { modelName: "modelName", id: "id", delete: "delete", logging: "logging" }, outputs: { finished: "finished" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"w-100\" *ngIf=\"form\">\n <
|
|
743
|
+
ModelFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: ModelFormComponent, selector: "base-model-form", inputs: { modelName: "modelName", label: "label", id: "id", delete: "delete", logging: "logging", config: "config" }, outputs: { finished: "finished" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"w-100\" *ngIf=\"form\">\n <h2>\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <form [formGroup]=\"form\">\n <base-model-form-sub [fields]=\"fields\" [config]=\"config\" [form]=\"form\"></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()\" *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: [""], components: [{ type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["fields", "form", "config"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
536
744
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ModelFormComponent, decorators: [{
|
|
537
745
|
type: Component,
|
|
538
|
-
args: [{ selector: 'base-model-form', template: "<div class=\"w-100\" *ngIf=\"form\">\n <
|
|
746
|
+
args: [{ selector: 'base-model-form', template: "<div class=\"w-100\" *ngIf=\"form\">\n <h2>\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <form [formGroup]=\"form\">\n <base-model-form-sub [fields]=\"fields\" [config]=\"config\" [form]=\"form\"></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()\" *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: [""] }]
|
|
539
747
|
}], ctorParameters: function () { return [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }, { type: i1$1.FormsService }]; }, propDecorators: { modelName: [{
|
|
540
748
|
type: Input
|
|
749
|
+
}], label: [{
|
|
750
|
+
type: Input
|
|
541
751
|
}], id: [{
|
|
542
752
|
type: Input
|
|
543
753
|
}], delete: [{
|
|
544
754
|
type: Input
|
|
545
755
|
}], logging: [{
|
|
546
756
|
type: Input
|
|
757
|
+
}], config: [{
|
|
758
|
+
type: Input
|
|
547
759
|
}], finished: [{
|
|
548
760
|
type: Output
|
|
549
761
|
}] } });
|
|
@@ -556,10 +768,11 @@ class ModelTableComponent {
|
|
|
556
768
|
this.create = true;
|
|
557
769
|
this.update = true;
|
|
558
770
|
this.delete = true;
|
|
559
|
-
this.
|
|
560
|
-
this.
|
|
771
|
+
this.config = {};
|
|
772
|
+
this.fieldConfig = {};
|
|
561
773
|
this.idSelected = new EventEmitter();
|
|
562
774
|
this.createModeChanged = new EventEmitter();
|
|
775
|
+
this.tableFields = ['id', 'name', 'title', 'description', 'email', 'createdAt', 'updatedAt'];
|
|
563
776
|
this.objects = [];
|
|
564
777
|
this.availableFields = [];
|
|
565
778
|
this.selectedId = '';
|
|
@@ -581,7 +794,7 @@ class ModelTableComponent {
|
|
|
581
794
|
}
|
|
582
795
|
if (changes['objectId'] && this.meta) {
|
|
583
796
|
if (this.selectedId !== this.objectId) {
|
|
584
|
-
if (this.logging) {
|
|
797
|
+
if (this.config?.logging) {
|
|
585
798
|
console.log('ModelTableComponent::ngOnChanges->selectedId', this.selectedId);
|
|
586
799
|
}
|
|
587
800
|
this.selectedId = this.objectId;
|
|
@@ -594,6 +807,9 @@ class ModelTableComponent {
|
|
|
594
807
|
*/
|
|
595
808
|
init() {
|
|
596
809
|
this.availableFields = [];
|
|
810
|
+
if (this.config?.tableFields) {
|
|
811
|
+
this.tableFields = this.config.tableFields;
|
|
812
|
+
}
|
|
597
813
|
const possibleFields = this.meta.getFields('find' + this.capitalizeFirstLetter(this.modelName) + 's');
|
|
598
814
|
const keys = Object.keys(possibleFields);
|
|
599
815
|
this.tableFields?.forEach((field) => {
|
|
@@ -601,7 +817,7 @@ class ModelTableComponent {
|
|
|
601
817
|
this.availableFields.push(field);
|
|
602
818
|
}
|
|
603
819
|
});
|
|
604
|
-
if (this.logging) {
|
|
820
|
+
if (this.config?.logging) {
|
|
605
821
|
console.log('ModelTableComponent::init->possibleFields', possibleFields);
|
|
606
822
|
console.log('ModelTableComponent::init->keys', keys);
|
|
607
823
|
console.log('ModelTableComponent::init->availableFields', this.availableFields);
|
|
@@ -630,7 +846,7 @@ class ModelTableComponent {
|
|
|
630
846
|
})
|
|
631
847
|
.subscribe({
|
|
632
848
|
next: (value) => {
|
|
633
|
-
if (this.logging) {
|
|
849
|
+
if (this.config?.logging) {
|
|
634
850
|
console.log('ModelTableComponent::loadObjects->value', value);
|
|
635
851
|
}
|
|
636
852
|
this.objects = value;
|
|
@@ -667,10 +883,10 @@ class ModelTableComponent {
|
|
|
667
883
|
}
|
|
668
884
|
}
|
|
669
885
|
ModelTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ModelTableComponent, deps: [{ token: i1$1.GraphQLMetaService }, { token: i1$1.GraphQLService }], target: i0.ɵɵFactoryTarget.Component });
|
|
670
|
-
ModelTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: ModelTableComponent, selector: "base-model-table", inputs: { modelName: "modelName", objectId: "objectId", createMode: "createMode", create: "create", update: "update", delete: "delete",
|
|
886
|
+
ModelTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", type: ModelTableComponent, selector: "base-model-table", inputs: { modelName: "modelName", objectId: "objectId", createMode: "createMode", create: "create", update: "update", delete: "delete", 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 table-responsive bg-white\">\n <thead>\n <tr>\n <th scope=\"col\" *ngFor=\"let field of availableFields\">{{ capitalizeFirstLetter(field) }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let object of objects\">\n <td class=\"cursor-pointer\" *ngFor=\"let field of availableFields\" (click)=\"selectId(object)\">\n {{ object[field] }}\n </td>\n </tr>\n </tbody>\n </table>\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]=\"config?.logging\"\n [id]=\"selectedId\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n ></base-model-form>\n</div>\n", styles: [".cursor-pointer{cursor:pointer}.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}\n"], components: [{ type: ModelFormComponent, selector: "base-model-form", inputs: ["modelName", "label", "id", "delete", "logging", "config"], outputs: ["finished"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
671
887
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: ModelTableComponent, decorators: [{
|
|
672
888
|
type: Component,
|
|
673
|
-
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 <
|
|
889
|
+
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 table-responsive bg-white\">\n <thead>\n <tr>\n <th scope=\"col\" *ngFor=\"let field of availableFields\">{{ capitalizeFirstLetter(field) }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let object of objects\">\n <td class=\"cursor-pointer\" *ngFor=\"let field of availableFields\" (click)=\"selectId(object)\">\n {{ object[field] }}\n </td>\n </tr>\n </tbody>\n </table>\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]=\"config?.logging\"\n [id]=\"selectedId\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n ></base-model-form>\n</div>\n", styles: [".cursor-pointer{cursor:pointer}.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}\n"] }]
|
|
674
890
|
}], ctorParameters: function () { return [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }]; }, propDecorators: { modelName: [{
|
|
675
891
|
type: Input
|
|
676
892
|
}], objectId: [{
|
|
@@ -683,9 +899,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
683
899
|
type: Input
|
|
684
900
|
}], delete: [{
|
|
685
901
|
type: Input
|
|
686
|
-
}],
|
|
902
|
+
}], config: [{
|
|
687
903
|
type: Input
|
|
688
|
-
}],
|
|
904
|
+
}], fieldConfig: [{
|
|
689
905
|
type: Input
|
|
690
906
|
}], idSelected: [{
|
|
691
907
|
type: Output
|
|
@@ -709,6 +925,8 @@ const elements = [
|
|
|
709
925
|
BreadcrumbComponent,
|
|
710
926
|
ModelFormComponent,
|
|
711
927
|
ModelTableComponent,
|
|
928
|
+
ModelFormSubComponent,
|
|
929
|
+
UploadImageComponent,
|
|
712
930
|
];
|
|
713
931
|
class BaseComponentsModule {
|
|
714
932
|
}
|
|
@@ -725,7 +943,9 @@ BaseComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
|
|
|
725
943
|
SkeletonLoaderComponent,
|
|
726
944
|
BreadcrumbComponent,
|
|
727
945
|
ModelFormComponent,
|
|
728
|
-
ModelTableComponent
|
|
946
|
+
ModelTableComponent,
|
|
947
|
+
ModelFormSubComponent,
|
|
948
|
+
UploadImageComponent], imports: [FormsModule, ReactiveFormsModule, CommonModule], exports: [
|
|
729
949
|
// Components
|
|
730
950
|
InputComponent,
|
|
731
951
|
SelectComponent,
|
|
@@ -737,7 +957,9 @@ BaseComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
|
|
|
737
957
|
SkeletonLoaderComponent,
|
|
738
958
|
BreadcrumbComponent,
|
|
739
959
|
ModelFormComponent,
|
|
740
|
-
ModelTableComponent
|
|
960
|
+
ModelTableComponent,
|
|
961
|
+
ModelFormSubComponent,
|
|
962
|
+
UploadImageComponent] });
|
|
741
963
|
BaseComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: BaseComponentsModule, imports: [imports] });
|
|
742
964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: BaseComponentsModule, decorators: [{
|
|
743
965
|
type: NgModule,
|
|
@@ -756,5 +978,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImpor
|
|
|
756
978
|
* Generated bundle index. Do not edit.
|
|
757
979
|
*/
|
|
758
980
|
|
|
759
|
-
export { BaseComponentsModule, BreadcrumbComponent, CheckboxComponent, InputComponent, LoadingBarComponent, ModelFormComponent, ModelTableComponent, SelectComponent, SkeletonLoaderComponent, TagsComponent, TextareaComponent, ToastComponent };
|
|
981
|
+
export { BaseComponentsModule, BreadcrumbComponent, CheckboxComponent, InputComponent, LoadingBarComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, SelectComponent, SkeletonLoaderComponent, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
|
|
760
982
|
//# sourceMappingURL=lenne.tech-ng-base-base-components.mjs.map
|