@lenne.tech/ng-base 14.9.0 → 14.9.1

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.
Files changed (27) hide show
  1. package/base-cms/pages/base-cms/base-cms.component.d.ts +6 -0
  2. package/base-components/base-components.module.d.ts +6 -4
  3. package/base-components/components/fab-button/fab-button.component.d.ts +16 -0
  4. package/base-components/components/model-form/model-form.component.d.ts +8 -1
  5. package/base-components/components/model-table/model-table.component.d.ts +2 -1
  6. package/base-components/public-api.d.ts +1 -0
  7. package/esm2020/base-cms/pages/base-cms/base-cms.component.mjs +12 -3
  8. package/esm2020/base-components/base-components.module.mjs +8 -3
  9. package/esm2020/base-components/components/breadcrumb/breadcrumb.component.mjs +3 -2
  10. package/esm2020/base-components/components/fab-button/fab-button.component.mjs +21 -0
  11. package/esm2020/base-components/components/model-form/model-form.component.mjs +27 -3
  12. package/esm2020/base-components/components/model-table/model-table.component.mjs +8 -4
  13. package/esm2020/base-components/public-api.mjs +2 -1
  14. package/esm2020/base-prototype/pages/profile/profile.component.mjs +1 -1
  15. package/fesm2015/lenne.tech-ng-base-base-cms.mjs +11 -2
  16. package/fesm2015/lenne.tech-ng-base-base-cms.mjs.map +1 -1
  17. package/fesm2015/lenne.tech-ng-base-base-components.mjs +56 -9
  18. package/fesm2015/lenne.tech-ng-base-base-components.mjs.map +1 -1
  19. package/fesm2015/lenne.tech-ng-base-base-prototype.mjs +1 -1
  20. package/fesm2015/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
  21. package/fesm2020/lenne.tech-ng-base-base-cms.mjs +11 -2
  22. package/fesm2020/lenne.tech-ng-base-base-cms.mjs.map +1 -1
  23. package/fesm2020/lenne.tech-ng-base-base-components.mjs +55 -8
  24. package/fesm2020/lenne.tech-ng-base-base-components.mjs.map +1 -1
  25. package/fesm2020/lenne.tech-ng-base-base-prototype.mjs +1 -1
  26. package/fesm2020/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
  27. package/package.json +1 -1
@@ -24,6 +24,9 @@ class BaseCmsComponent {
24
24
  this.cmsService = cmsService;
25
25
  this.types = [];
26
26
  this.subscription = new Subscription();
27
+ this.sideBarWidth = '22%';
28
+ this.responsiveToggle = false;
29
+ this.calcSideBarWidth();
27
30
  this.subscription.add(this.route.params.subscribe((value) => {
28
31
  var _a;
29
32
  if (value['modelName']) {
@@ -197,12 +200,18 @@ class BaseCmsComponent {
197
200
  lowerCaseFirstLetter(value) {
198
201
  return this.cmsService.lowerCaseFirstLetter(value);
199
202
  }
203
+ /**
204
+ * Calculates sidebar width based on screen size
205
+ */
206
+ calcSideBarWidth() {
207
+ this.sideBarWidth = window.innerWidth < 768 ? '8%' : '22%';
208
+ }
200
209
  }
201
210
  BaseCmsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BaseCmsComponent, deps: [{ token: BASE_CMS_MODULE_CONFIG }, { token: i1.GraphQLMetaService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i1.AuthService }, { token: i1.CmsService }], target: i0.ɵɵFactoryTarget.Component });
202
- BaseCmsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: BaseCmsComponent, selector: "app-base-cms", ngImport: i0, template: "<div class=\"main\">\n <div class=\"sidebar\">\n <div class=\"d-flex flex-column flex-shrink-0 p-3 h-100\">\n <ng-container *ngIf=\"moduleConfig.branding\">\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n *ngIf=\"!moduleConfig?.logoUrl\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n <hr />\n </ng-container>\n <ul class=\"nav nav-pills flex-column mb-auto\" *ngIf=\"types\">\n <li class=\"nav-item\" *ngFor=\"let type of types\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"sidebar-content\">\n <div class=\"p-5 mb-3\">\n <base-model-table\n [config]=\"moduleConfig?.modelConfig[camelModelName]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n ></base-model-table>\n </div>\n </div>\n</div>\n", styles: [".active{color:var(--bs-primary)!important;background-color:rgba(var(--bs-primary-rgb),.2)!important;font-weight:700}.nav-link{color:var(--bs-body-color)}.sidebar{box-shadow:#7090b014 14px 17px 40px 4px;transition:all .2s linear 0s;z-index:99}.main{display:flex;flex-direction:row;overflow:hidden;height:100%}.main .sidebar{flex:1 0 22%;max-width:300px}.main .sidebar-content{flex-grow:999;overflow-y:auto;background-color:#f5f7fe}.nav-flush .nav-link{border-radius:0}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: i4.ModelTableComponent, selector: "base-model-table", inputs: ["modelName", "objectId", "createMode", "logging", "create", "update", "delete", "duplicate", "config", "fieldConfig"], outputs: ["idSelected", "createModeChanged"] }] });
211
+ BaseCmsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: BaseCmsComponent, selector: "app-base-cms", ngImport: i0, template: "<div class=\"main\">\n <div class=\"sidebar\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? sideBarWidth : '100%' }\">\n <div class=\"d-none d-md-flex flex-column flex-shrink-0 p-3 h-100\">\n <ng-container *ngIf=\"moduleConfig.branding\">\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n *ngIf=\"!moduleConfig?.logoUrl\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n <hr />\n </ng-container>\n <ul class=\"nav nav-pills flex-column mb-auto\" *ngIf=\"types\">\n <li class=\"nav-item\" *ngFor=\"let type of types\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n <div class=\"d-flex flex-column d-md-none p-3 h-100\">\n <div class=\"d-flex justify-content-end\">\n <i\n class=\"bi\"\n [ngClass]=\"{ 'bi-chevron-left': !responsiveToggle, 'bi-chevron-right': responsiveToggle }\"\n (click)=\"responsiveToggle = !responsiveToggle\"\n ></i>\n </div>\n <ul\n class=\"nav nav-pills responsive-pills flex-column mb-auto\"\n [ngClass]=\"{ 'w-100-transition': responsiveToggle }\"\n *ngIf=\"types\"\n >\n <li class=\"nav-item\" *ngFor=\"let type of types\" (click)=\"responsiveToggle = !responsiveToggle\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"sidebar-content\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? 'unset' : '0' }\">\n <div class=\"p-3 p-md-5 mb-3\">\n <base-model-table\n [config]=\"moduleConfig?.modelConfig[camelModelName]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n [showFavButton]=\"!responsiveToggle\"\n ></base-model-table>\n </div>\n </div>\n</div>\n", styles: [".active{color:var(--bs-primary)!important;background-color:rgba(var(--bs-primary-rgb),.2)!important;font-weight:700}.nav-link{color:var(--bs-body-color)}.sidebar{box-shadow:#7090b014 14px 17px 40px 4px;transition:all .2s linear 0s;z-index:99}.main{display:flex;flex-direction:row;overflow:hidden;height:100%}.main .sidebar{flex-grow:1}@media only screen and (min-width: 992px){.main .sidebar{max-width:300px}}.main .sidebar-content{flex-grow:999;overflow-y:auto;background-color:#f5f7fe;min-height:100vh}.nav-flush .nav-link{border-radius:0}.responsive-pills{width:0;text-align:center;overflow:hidden}.w-100-transition{width:100%;transition:width .2s}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: i4.ModelTableComponent, selector: "base-model-table", inputs: ["modelName", "objectId", "createMode", "logging", "create", "update", "delete", "duplicate", "config", "fieldConfig", "showFavButton"], outputs: ["idSelected", "createModeChanged"] }] });
203
212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BaseCmsComponent, decorators: [{
204
213
  type: Component,
205
- args: [{ selector: 'app-base-cms', template: "<div class=\"main\">\n <div class=\"sidebar\">\n <div class=\"d-flex flex-column flex-shrink-0 p-3 h-100\">\n <ng-container *ngIf=\"moduleConfig.branding\">\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n *ngIf=\"!moduleConfig?.logoUrl\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n <hr />\n </ng-container>\n <ul class=\"nav nav-pills flex-column mb-auto\" *ngIf=\"types\">\n <li class=\"nav-item\" *ngFor=\"let type of types\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"sidebar-content\">\n <div class=\"p-5 mb-3\">\n <base-model-table\n [config]=\"moduleConfig?.modelConfig[camelModelName]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n ></base-model-table>\n </div>\n </div>\n</div>\n", styles: [".active{color:var(--bs-primary)!important;background-color:rgba(var(--bs-primary-rgb),.2)!important;font-weight:700}.nav-link{color:var(--bs-body-color)}.sidebar{box-shadow:#7090b014 14px 17px 40px 4px;transition:all .2s linear 0s;z-index:99}.main{display:flex;flex-direction:row;overflow:hidden;height:100%}.main .sidebar{flex:1 0 22%;max-width:300px}.main .sidebar-content{flex-grow:999;overflow-y:auto;background-color:#f5f7fe}.nav-flush .nav-link{border-radius:0}\n"] }]
214
+ args: [{ selector: 'app-base-cms', template: "<div class=\"main\">\n <div class=\"sidebar\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? sideBarWidth : '100%' }\">\n <div class=\"d-none d-md-flex flex-column flex-shrink-0 p-3 h-100\">\n <ng-container *ngIf=\"moduleConfig.branding\">\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n *ngIf=\"!moduleConfig?.logoUrl\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n <hr />\n </ng-container>\n <ul class=\"nav nav-pills flex-column mb-auto\" *ngIf=\"types\">\n <li class=\"nav-item\" *ngFor=\"let type of types\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n <div class=\"d-flex flex-column d-md-none p-3 h-100\">\n <div class=\"d-flex justify-content-end\">\n <i\n class=\"bi\"\n [ngClass]=\"{ 'bi-chevron-left': !responsiveToggle, 'bi-chevron-right': responsiveToggle }\"\n (click)=\"responsiveToggle = !responsiveToggle\"\n ></i>\n </div>\n <ul\n class=\"nav nav-pills responsive-pills flex-column mb-auto\"\n [ngClass]=\"{ 'w-100-transition': responsiveToggle }\"\n *ngIf=\"types\"\n >\n <li class=\"nav-item\" *ngFor=\"let type of types\" (click)=\"responsiveToggle = !responsiveToggle\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"sidebar-content\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? 'unset' : '0' }\">\n <div class=\"p-3 p-md-5 mb-3\">\n <base-model-table\n [config]=\"moduleConfig?.modelConfig[camelModelName]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n [showFavButton]=\"!responsiveToggle\"\n ></base-model-table>\n </div>\n </div>\n</div>\n", styles: [".active{color:var(--bs-primary)!important;background-color:rgba(var(--bs-primary-rgb),.2)!important;font-weight:700}.nav-link{color:var(--bs-body-color)}.sidebar{box-shadow:#7090b014 14px 17px 40px 4px;transition:all .2s linear 0s;z-index:99}.main{display:flex;flex-direction:row;overflow:hidden;height:100%}.main .sidebar{flex-grow:1}@media only screen and (min-width: 992px){.main .sidebar{max-width:300px}}.main .sidebar-content{flex-grow:999;overflow-y:auto;background-color:#f5f7fe;min-height:100vh}.nav-flush .nav-link{border-radius:0}.responsive-pills{width:0;text-align:center;overflow:hidden}.w-100-transition{width:100%;transition:width .2s}\n"] }]
206
215
  }], ctorParameters: function () {
207
216
  return [{ type: undefined, decorators: [{
208
217
  type: Inject,
@@ -1 +1 @@
1
- {"version":3,"file":"lenne.tech-ng-base-base-cms.mjs","sources":["../../../projects/ng-base/base-cms/interfaces/base-cms-module-config.interface.ts","../../../projects/ng-base/base-cms/pages/base-cms/base-cms.component.ts","../../../projects/ng-base/base-cms/pages/base-cms/base-cms.component.html","../../../projects/ng-base/base-cms/base-cms-routing.module.ts","../../../projects/ng-base/base-cms/base-cms.module.ts","../../../projects/ng-base/base-cms/public-api.ts","../../../projects/ng-base/base-cms/lenne.tech-ng-base-base-cms.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport interface BaseCMSModuleConfig {\n modelConfig?: { [key: string]: any };\n fieldConfig?: { [key: string]: any };\n logging?: boolean;\n logoUrl?: string;\n branding?: boolean;\n}\n\nexport const BASE_CMS_MODULE_CONFIG = new InjectionToken('BASE_CMS_MODULE_CONFIG');\n","import { Component, Inject, OnDestroy, OnInit } from '@angular/core';\nimport {\n AuthService,\n BasicUser,\n CmsService,\n GraphqlCrudType,\n GraphQLMeta,\n GraphQLMetaService,\n} from '@lenne.tech/ng-base/shared';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BASE_CMS_MODULE_CONFIG, BaseCMSModuleConfig } from '../../interfaces/base-cms-module-config.interface';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-base-cms',\n templateUrl: './base-cms.component.html',\n styleUrls: ['./base-cms.component.scss'],\n})\nexport class BaseCmsComponent implements OnInit, OnDestroy {\n meta: GraphQLMeta;\n modelName: string;\n camelModelName: string;\n id: string;\n types: GraphqlCrudType[] = [];\n subscription = new Subscription();\n\n constructor(\n @Inject(BASE_CMS_MODULE_CONFIG) public moduleConfig: BaseCMSModuleConfig,\n private graphQLMetaService: GraphQLMetaService,\n private route: ActivatedRoute,\n private router: Router,\n private authService: AuthService,\n private cmsService: CmsService\n ) {\n this.subscription.add(\n this.route.params.subscribe((value) => {\n if (value['modelName']) {\n const exclude = this.moduleConfig.modelConfig[value['modelName']]?.exclude;\n\n if (exclude !== null && !exclude) {\n this.modelName = value['modelName'];\n this.camelModelName = this.toCamelCase(this.modelName);\n } else {\n this.init().then((types: GraphqlCrudType[]) => {\n this.router.navigate(['../' + this.toKebabCase(types[0].name)], { relativeTo: this.route });\n });\n }\n }\n\n if (value['id']) {\n this.id = value['id'];\n }\n })\n );\n }\n\n async ngOnInit() {\n await this.init();\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n /**\n * It returns a promise that resolves to an array of GraphqlCrudType objects\n *\n * @returns The types that are available to the user.\n */\n init(): Promise<GraphqlCrudType[]> {\n return new Promise((resolve, reject) => {\n this.graphQLMetaService.getMeta().subscribe((meta) => {\n this.meta = meta;\n\n if (this.route.snapshot?.params?.['modelName']) {\n this.modelName = this.route.snapshot?.params?.['modelName'];\n this.camelModelName = this.toCamelCase(this.modelName);\n }\n\n if (this.route.snapshot?.params?.['id']) {\n this.id = this.route.snapshot?.params?.['id'];\n }\n\n const types = meta.getTypes(this.moduleConfig?.logging);\n\n // Check for excluded types\n let filteredTypes = types.filter((e) => !this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.exclude);\n\n // Sort types\n filteredTypes = filteredTypes.sort((a, b) => {\n return (\n (this.moduleConfig?.modelConfig[a.name.toLowerCase()]?.order\n ? this.moduleConfig?.modelConfig[a.name.toLowerCase()]?.order\n : 99) -\n (this.moduleConfig?.modelConfig[b.name.toLowerCase()]?.order\n ? this.moduleConfig?.modelConfig[b.name.toLowerCase()]?.order\n : 99)\n );\n });\n\n // Check for restricted types\n this.types = filteredTypes.filter((e) => {\n if (this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.restricted) {\n if (!this.authService?.currentUser) {\n return false;\n }\n const user = this.authService?.currentUser;\n const mappedUser = BasicUser.map(user);\n\n return mappedUser?.hasAllRoles(this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.roles);\n } else {\n return true;\n }\n });\n\n if (this.moduleConfig?.logging) {\n console.log('BaseCmsComponent::init->types', this.types);\n console.log('BaseCmsComponent::init->camelModelName', this.camelModelName);\n console.log('BaseCmsComponent::init->fieldConfig', this.moduleConfig?.fieldConfig);\n }\n\n resolve(this.types);\n\n if (!this.modelName && this.types) {\n this.router.navigate(['./' + this.toKebabCase(this.types[0].name)], { relativeTo: this.route });\n }\n });\n });\n }\n\n /**\n * If the model name is set and the types are set, then return the type that matches the model name\n *\n * @returns The type object that matches the model name.\n */\n getTypeByModelName() {\n if (this.modelName && this.types) {\n return this.types.find((e) => this.toKebabCase(e.name) === this.toKebabCase(this.modelName));\n } else {\n return null;\n }\n }\n\n /**\n * When the createModeChanged event is emitted, if the createMode is true, navigate to the new route\n *\n * @param createMode - boolean - This is a boolean value that indicates whether the user is in create mode or\n * not.\n */\n onCreateModeChanged(createMode: boolean) {\n if (createMode) {\n this.router.navigate(['./' + 'neu'], { relativeTo: this.route });\n }\n }\n\n /**\n * If the type exists, return the create property of the type, otherwise return false.\n *\n * @returns A boolean value.\n */\n isCreatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.create : false;\n }\n\n /**\n * If the model name is found in the type map, return the update property of the type object\n *\n * @returns A boolean value.\n */\n isUpdatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.update : false;\n }\n\n /**\n * If the type is defined, return the delete property of the type, otherwise return false\n *\n * @returns A boolean value.\n */\n isDeletePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.delete : false;\n }\n\n /**\n * If the model name is found in the type array, return the duplicate property of the type object\n *\n * @returns A boolean value.\n */\n isDuplicatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.duplicate : false;\n }\n\n /**\n * If the id is truthy, navigate to the id, otherwise navigate to the parent route\n */\n idSelected(id: string) {\n if (id) {\n this.router.navigate(['./' + id], { relativeTo: this.route });\n } else {\n this.router.navigate(['..'], { relativeTo: this.route });\n }\n }\n\n /**\n * Transform string to kebab case\n */\n toKebabCase(str: string) {\n return str?.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n }\n\n /**\n * Transform string to camel case\n */\n toCamelCase(str: string) {\n return str?.replace(/-./g, (match) => match[1].toUpperCase());\n }\n\n /**\n * Transform first letter to lower case\n */\n lowerCaseFirstLetter(value: string) {\n return this.cmsService.lowerCaseFirstLetter(value);\n }\n}\n","<div class=\"main\">\n <div class=\"sidebar\">\n <div class=\"d-flex flex-column flex-shrink-0 p-3 h-100\">\n <ng-container *ngIf=\"moduleConfig.branding\">\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n *ngIf=\"!moduleConfig?.logoUrl\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n <hr />\n </ng-container>\n <ul class=\"nav nav-pills flex-column mb-auto\" *ngIf=\"types\">\n <li class=\"nav-item\" *ngFor=\"let type of types\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"sidebar-content\">\n <div class=\"p-5 mb-3\">\n <base-model-table\n [config]=\"moduleConfig?.modelConfig[camelModelName]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n ></base-model-table>\n </div>\n </div>\n</div>\n","import { RouterModule, Routes } from '@angular/router';\nimport { NgModule } from '@angular/core';\nimport { BaseCmsComponent } from './pages/base-cms/base-cms.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: BaseCmsComponent,\n },\n {\n path: ':modelName',\n component: BaseCmsComponent,\n },\n {\n path: ':modelName/:id',\n component: BaseCmsComponent,\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class BaseCMSRoutingModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { BaseCmsComponent } from './pages/base-cms/base-cms.component';\nimport { BaseCMSRoutingModule } from './base-cms-routing.module';\nimport { BaseComponentsModule } from '@lenne.tech/ng-base/base-components';\nimport { BASE_CMS_MODULE_CONFIG, BaseCMSModuleConfig } from './interfaces/base-cms-module-config.interface';\n\nexport function CMSConfigFactory() {\n return {\n modelConfig: {},\n fieldConfig: {},\n branding: true,\n logoUrl: '',\n logging: false,\n ...BaseCMSModule.config,\n };\n}\n\n@NgModule({\n imports: [\n // Modules\n CommonModule,\n ReactiveFormsModule,\n BaseCMSRoutingModule,\n BaseComponentsModule,\n ],\n declarations: [BaseCmsComponent],\n exports: [],\n providers: [\n {\n provide: BASE_CMS_MODULE_CONFIG,\n useFactory: CMSConfigFactory,\n },\n ],\n})\nexport class BaseCMSModule {\n static config: BaseCMSModuleConfig;\n}\n","/**\n * Exports for public API\n */\n\n// Module\nexport * from './base-cms.module';\n\n// Pages\nexport * from './pages/base-cms/base-cms.component';\n\n// Interface\nexport * from './interfaces/base-cms-module-config.interface';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAUa,sBAAsB,GAAG,IAAI,cAAc,CAAC,wBAAwB;;MCQpE,gBAAgB,CAAA;IAQ3B,WACyC,CAAA,YAAiC,EAChE,kBAAsC,EACtC,KAAqB,EACrB,MAAc,EACd,WAAwB,EACxB,UAAsB,EAAA;AALS,QA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EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAPb,SAAA,EAAA;AACT,QAAA;AACE,YAAA,OAAO,EAAE,sBAAsB;AAC/B,YAAA,UAAU,EAAE,gBAAgB;AAC7B,SAAA;AACF,KAAA,EAAA,OAAA,EAAA;;QAZC,YAAY;QACZ,mBAAmB;QACnB,oBAAoB;QACpB,oBAAoB;AAAA,KAAA,EAAA,CAAA,CAAA;2FAWX,aAAa,EAAA,UAAA,EAAA,CAAA;kBAjBzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;;wBAEP,YAAY;wBACZ,mBAAmB;wBACnB,oBAAoB;wBACpB,oBAAoB;AACrB,qBAAA;oBACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,UAAU,EAAE,gBAAgB;AAC7B,yBAAA;AACF,qBAAA;iBACF,CAAA;;;ACnCD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"lenne.tech-ng-base-base-cms.mjs","sources":["../../../projects/ng-base/base-cms/interfaces/base-cms-module-config.interface.ts","../../../projects/ng-base/base-cms/pages/base-cms/base-cms.component.ts","../../../projects/ng-base/base-cms/pages/base-cms/base-cms.component.html","../../../projects/ng-base/base-cms/base-cms-routing.module.ts","../../../projects/ng-base/base-cms/base-cms.module.ts","../../../projects/ng-base/base-cms/public-api.ts","../../../projects/ng-base/base-cms/lenne.tech-ng-base-base-cms.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport interface BaseCMSModuleConfig {\n modelConfig?: { [key: string]: any };\n fieldConfig?: { [key: string]: any };\n logging?: boolean;\n logoUrl?: string;\n branding?: boolean;\n}\n\nexport const BASE_CMS_MODULE_CONFIG = new InjectionToken('BASE_CMS_MODULE_CONFIG');\n","import { Component, Inject, OnDestroy, OnInit } from '@angular/core';\nimport {\n AuthService,\n BasicUser,\n CmsService,\n GraphqlCrudType,\n GraphQLMeta,\n GraphQLMetaService,\n} from '@lenne.tech/ng-base/shared';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { BASE_CMS_MODULE_CONFIG, BaseCMSModuleConfig } from '../../interfaces/base-cms-module-config.interface';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'app-base-cms',\n templateUrl: './base-cms.component.html',\n styleUrls: ['./base-cms.component.scss'],\n})\nexport class BaseCmsComponent implements OnInit, OnDestroy {\n meta: GraphQLMeta;\n modelName: string;\n camelModelName: string;\n id: string;\n types: GraphqlCrudType[] = [];\n subscription = new Subscription();\n sideBarWidth = '22%';\n responsiveToggle = false;\n\n constructor(\n @Inject(BASE_CMS_MODULE_CONFIG) public moduleConfig: BaseCMSModuleConfig,\n private graphQLMetaService: GraphQLMetaService,\n private route: ActivatedRoute,\n private router: Router,\n private authService: AuthService,\n private cmsService: CmsService\n ) {\n this.calcSideBarWidth();\n this.subscription.add(\n this.route.params.subscribe((value) => {\n if (value['modelName']) {\n const exclude = this.moduleConfig.modelConfig[value['modelName']]?.exclude;\n\n if (exclude !== null && !exclude) {\n this.modelName = value['modelName'];\n this.camelModelName = this.toCamelCase(this.modelName);\n } else {\n this.init().then((types: GraphqlCrudType[]) => {\n this.router.navigate(['../' + this.toKebabCase(types[0].name)], { relativeTo: this.route });\n });\n }\n }\n\n if (value['id']) {\n this.id = value['id'];\n }\n })\n );\n }\n\n async ngOnInit() {\n await this.init();\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n\n /**\n * It returns a promise that resolves to an array of GraphqlCrudType objects\n *\n * @returns The types that are available to the user.\n */\n init(): Promise<GraphqlCrudType[]> {\n return new Promise((resolve, reject) => {\n this.graphQLMetaService.getMeta().subscribe((meta) => {\n this.meta = meta;\n\n if (this.route.snapshot?.params?.['modelName']) {\n this.modelName = this.route.snapshot?.params?.['modelName'];\n this.camelModelName = this.toCamelCase(this.modelName);\n }\n\n if (this.route.snapshot?.params?.['id']) {\n this.id = this.route.snapshot?.params?.['id'];\n }\n\n const types = meta.getTypes(this.moduleConfig?.logging);\n\n // Check for excluded types\n let filteredTypes = types.filter((e) => !this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.exclude);\n\n // Sort types\n filteredTypes = filteredTypes.sort((a, b) => {\n return (\n (this.moduleConfig?.modelConfig[a.name.toLowerCase()]?.order\n ? this.moduleConfig?.modelConfig[a.name.toLowerCase()]?.order\n : 99) -\n (this.moduleConfig?.modelConfig[b.name.toLowerCase()]?.order\n ? this.moduleConfig?.modelConfig[b.name.toLowerCase()]?.order\n : 99)\n );\n });\n\n // Check for restricted types\n this.types = filteredTypes.filter((e) => {\n if (this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.restricted) {\n if (!this.authService?.currentUser) {\n return false;\n }\n const user = this.authService?.currentUser;\n const mappedUser = BasicUser.map(user);\n\n return mappedUser?.hasAllRoles(this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.roles);\n } else {\n return true;\n }\n });\n\n if (this.moduleConfig?.logging) {\n console.log('BaseCmsComponent::init->types', this.types);\n console.log('BaseCmsComponent::init->camelModelName', this.camelModelName);\n console.log('BaseCmsComponent::init->fieldConfig', this.moduleConfig?.fieldConfig);\n }\n\n resolve(this.types);\n\n if (!this.modelName && this.types) {\n this.router.navigate(['./' + this.toKebabCase(this.types[0].name)], { relativeTo: this.route });\n }\n });\n });\n }\n\n /**\n * If the model name is set and the types are set, then return the type that matches the model name\n *\n * @returns The type object that matches the model name.\n */\n getTypeByModelName() {\n if (this.modelName && this.types) {\n return this.types.find((e) => this.toKebabCase(e.name) === this.toKebabCase(this.modelName));\n } else {\n return null;\n }\n }\n\n /**\n * When the createModeChanged event is emitted, if the createMode is true, navigate to the new route\n *\n * @param createMode - boolean - This is a boolean value that indicates whether the user is in create mode or\n * not.\n */\n onCreateModeChanged(createMode: boolean) {\n if (createMode) {\n this.router.navigate(['./' + 'neu'], { relativeTo: this.route });\n }\n }\n\n /**\n * If the type exists, return the create property of the type, otherwise return false.\n *\n * @returns A boolean value.\n */\n isCreatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.create : false;\n }\n\n /**\n * If the model name is found in the type map, return the update property of the type object\n *\n * @returns A boolean value.\n */\n isUpdatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.update : false;\n }\n\n /**\n * If the type is defined, return the delete property of the type, otherwise return false\n *\n * @returns A boolean value.\n */\n isDeletePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.delete : false;\n }\n\n /**\n * If the model name is found in the type array, return the duplicate property of the type object\n *\n * @returns A boolean value.\n */\n isDuplicatePossible(): boolean {\n const type = this.getTypeByModelName();\n return type ? type.duplicate : false;\n }\n\n /**\n * If the id is truthy, navigate to the id, otherwise navigate to the parent route\n */\n idSelected(id: string) {\n if (id) {\n this.router.navigate(['./' + id], { relativeTo: this.route });\n } else {\n this.router.navigate(['..'], { relativeTo: this.route });\n }\n }\n\n /**\n * Transform string to kebab case\n */\n toKebabCase(str: string) {\n return str?.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n }\n\n /**\n * Transform string to camel case\n */\n toCamelCase(str: string) {\n return str?.replace(/-./g, (match) => match[1].toUpperCase());\n }\n\n /**\n * Transform first letter to lower case\n */\n lowerCaseFirstLetter(value: string) {\n return this.cmsService.lowerCaseFirstLetter(value);\n }\n\n /**\n * Calculates sidebar width based on screen size\n */\n calcSideBarWidth() {\n this.sideBarWidth = window.innerWidth < 768 ? '8%' : '22%';\n }\n}\n","<div class=\"main\">\n <div class=\"sidebar\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? sideBarWidth : '100%' }\">\n <div class=\"d-none d-md-flex flex-column flex-shrink-0 p-3 h-100\">\n <ng-container *ngIf=\"moduleConfig.branding\">\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none\"\n *ngIf=\"!moduleConfig?.logoUrl\"\n >\n <span class=\"d-block fs-4\"><b class=\"text-primary\">Base</b>CMS</span>\n <small class=\"fw-lighter\">The auto generated GraphQL CMS</small>\n </a>\n\n <a\n href=\"/\"\n class=\"d-flex flex-column align-items-start mb-3 mt-3 me-md-auto link-dark text-decoration-none w-100\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive w-100\" alt=\"Logo\" />\n </a>\n <hr />\n </ng-container>\n <ul class=\"nav nav-pills flex-column mb-auto\" *ngIf=\"types\">\n <li class=\"nav-item\" *ngFor=\"let type of types\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n <div class=\"d-flex flex-column d-md-none p-3 h-100\">\n <div class=\"d-flex justify-content-end\">\n <i\n class=\"bi\"\n [ngClass]=\"{ 'bi-chevron-left': !responsiveToggle, 'bi-chevron-right': responsiveToggle }\"\n (click)=\"responsiveToggle = !responsiveToggle\"\n ></i>\n </div>\n <ul\n class=\"nav nav-pills responsive-pills flex-column mb-auto\"\n [ngClass]=\"{ 'w-100-transition': responsiveToggle }\"\n *ngIf=\"types\"\n >\n <li class=\"nav-item\" *ngFor=\"let type of types\" (click)=\"responsiveToggle = !responsiveToggle\">\n <a\n class=\"nav-link\"\n aria-current=\"page\"\n [routerLink]=\"(id ? '../../' : '../') + toKebabCase(type?.name)\"\n [ngClass]=\"{ active: toKebabCase(type?.name) === toKebabCase(this.modelName) }\"\n >\n {{\n moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.plural\n : moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n ? moduleConfig?.modelConfig[lowerCaseFirstLetter(type?.name)]?.label\n : type.name + 's'\n }}\n </a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class=\"sidebar-content\" [ngStyle]=\"{ 'flex-basis': !responsiveToggle ? 'unset' : '0' }\">\n <div class=\"p-3 p-md-5 mb-3\">\n <base-model-table\n [config]=\"moduleConfig?.modelConfig[camelModelName]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[camelModelName] || {}\"\n [modelName]=\"modelName\"\n [logging]=\"moduleConfig?.logging\"\n [objectId]=\"id !== 'neu' ? id : ''\"\n [createMode]=\"id === 'neu'\"\n (createModeChanged)=\"onCreateModeChanged($event)\"\n (idSelected)=\"idSelected($event)\"\n [create]=\"isCreatePossible()\"\n [update]=\"isUpdatePossible()\"\n [delete]=\"isDeletePossible()\"\n [duplicate]=\"isDuplicatePossible()\"\n [showFavButton]=\"!responsiveToggle\"\n ></base-model-table>\n </div>\n </div>\n</div>\n","import { RouterModule, Routes } from '@angular/router';\nimport { NgModule } from '@angular/core';\nimport { BaseCmsComponent } from './pages/base-cms/base-cms.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: BaseCmsComponent,\n },\n {\n path: ':modelName',\n component: BaseCmsComponent,\n },\n {\n path: ':modelName/:id',\n component: BaseCmsComponent,\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class BaseCMSRoutingModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { BaseCmsComponent } from './pages/base-cms/base-cms.component';\nimport { BaseCMSRoutingModule } from './base-cms-routing.module';\nimport { BaseComponentsModule } from '@lenne.tech/ng-base/base-components';\nimport { BASE_CMS_MODULE_CONFIG, BaseCMSModuleConfig } from './interfaces/base-cms-module-config.interface';\n\nexport function CMSConfigFactory() {\n return {\n modelConfig: {},\n fieldConfig: {},\n branding: true,\n logoUrl: '',\n logging: false,\n ...BaseCMSModule.config,\n };\n}\n\n@NgModule({\n imports: [\n // Modules\n CommonModule,\n ReactiveFormsModule,\n BaseCMSRoutingModule,\n BaseComponentsModule,\n ],\n declarations: [BaseCmsComponent],\n exports: [],\n providers: [\n {\n provide: BASE_CMS_MODULE_CONFIG,\n useFactory: CMSConfigFactory,\n },\n ],\n})\nexport class BaseCMSModule {\n static config: BaseCMSModuleConfig;\n}\n","/**\n * Exports for public API\n */\n\n// Module\nexport * from './base-cms.module';\n\n// Pages\nexport * from './pages/base-cms/base-cms.component';\n\n// Interface\nexport * from './interfaces/base-cms-module-config.interface';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAUa,sBAAsB,GAAG,IAAI,cAAc,CAAC,wBAAwB;;MCQpE,gBAAgB,CAAA;IAU3B,WACyC,CAAA,YAAiC,EAChE,kBAAsC,EACtC,KAAqB,EACrB,MAAc,EACd,WAAwB,EACxB,UAAsB,EAAA;AALS,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAqB;AAChE,QAAA,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAoB;AACtC,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;AACrB,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AACd,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;AACxB,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AAXhC,QAAA,IAAK,CAAA,KAAA,GAAsB,EAAE,CAAC;AAC9B,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAClC,QAAA,IAA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,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAPb,SAAA,EAAA;AACT,QAAA;AACE,YAAA,OAAO,EAAE,sBAAsB;AAC/B,YAAA,UAAU,EAAE,gBAAgB;AAC7B,SAAA;AACF,KAAA,EAAA,OAAA,EAAA;;QAZC,YAAY;QACZ,mBAAmB;QACnB,oBAAoB;QACpB,oBAAoB;AAAA,KAAA,EAAA,CAAA,CAAA;2FAWX,aAAa,EAAA,UAAA,EAAA,CAAA;kBAjBzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;;wBAEP,YAAY;wBACZ,mBAAmB;wBACnB,oBAAoB;wBACpB,oBAAoB;AACrB,qBAAA;oBACD,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,UAAU,EAAE,gBAAgB;AAC7B,yBAAA;AACF,qBAAA;iBACF,CAAA;;;ACnCD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -8,8 +8,9 @@ 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, Sort, GraphQLRequestType, BasicUser, fullEmail, Validation } from '@lenne.tech/ng-base/shared';
11
- import { __awaiter } from 'tslib';
12
11
  import * as i2$1 from '@angular/router';
12
+ import { RouterModule } from '@angular/router';
13
+ import { __awaiter } from 'tslib';
13
14
  import * as i1$2 from '@angular/common/http';
14
15
  import { HttpHeaders } from '@angular/common/http';
15
16
 
@@ -462,7 +463,7 @@ class BreadcrumbComponent {
462
463
  }
463
464
  }
464
465
  BreadcrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BreadcrumbComponent, deps: [{ token: i1$1.BreadcrumbService }], target: i0.ɵɵFactoryTarget.Component });
465
- BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: BreadcrumbComponent, selector: "base-breadcrumb", ngImport: i0, 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"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
466
+ BreadcrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: BreadcrumbComponent, selector: "base-breadcrumb", ngImport: i0, 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"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] });
466
467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: BreadcrumbComponent, decorators: [{
467
468
  type: Component,
468
469
  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"] }]
@@ -1094,6 +1095,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
1094
1095
  type: Output
1095
1096
  }] } });
1096
1097
 
1098
+ class FabButtonComponent {
1099
+ constructor() {
1100
+ this.fabIcon = 'bi-three-dots';
1101
+ this.toggle = false;
1102
+ }
1103
+ }
1104
+ FabButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FabButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1105
+ FabButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.0", type: FabButtonComponent, selector: "base-fab-button", inputs: { fabIcon: "fabIcon", buttons: "buttons" }, ngImport: i0, template: "<div class=\"fab-container\" [ngClass]=\"{ 'fab-container-active': toggle }\">\n <div class=\"fab shadow\">\n <div class=\"fab-content\" (click)=\"toggle = !toggle\">\n <i class=\"bi\" [ngClass]=\"fabIcon\"></i>\n </div>\n </div>\n <div\n class=\"sub-button shadow\"\n *ngFor=\"let button of buttons\"\n (click)=\"button.event.emit(true); toggle = !toggle\"\n [ngStyle]=\"{ backgroundColor: button.color }\"\n >\n <a [routerLink]=\"button.routerLink\">\n <i class=\"bi\" [ngClass]=\"button.icon\"></i>\n </a>\n </div>\n</div>\n", styles: [".fab-container{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;-webkit-user-select:none;user-select:none;position:absolute;bottom:10px;right:10px}.fab-container-active{height:100%}.fab-container-active .sub-button:nth-child(2){transform:translateY(-80px)}.fab-container-active .sub-button:nth-child(3){transform:translateY(-140px)}.fab-container-active .sub-button:nth-child(4){transform:translateY(-200px)}.fab-container-active .sub-button:nth-child(5){transform:translateY(-260px)}.fab-container-active .sub-button:nth-child(6){transform:translateY(-320px)}.fab-container .fab{position:relative;height:60px;width:60px;background-color:var(--bs-primary);border-radius:50%;z-index:2}.fab-container .fab:before{content:\" \";position:absolute;bottom:0;right:0;height:30px;width:30px;background-color:inherit;border-radius:0 0 10px;z-index:-1}.fab-container .fab .fab-content{display:flex;align-items:center;justify-content:center;height:inherit;width:inherit;border-radius:50%}.fab-container .fab .fab-content .bi{color:#fff;font-size:32px}.fab-container .sub-button{position:absolute;display:flex;align-items:center;justify-content:center;bottom:10px;right:10px;height:40px;width:40px;background-color:var(--bs-primary);border-radius:50%;transition:all .3s ease}.fab-container .sub-button:hover{cursor:pointer}.fab-container .sub-button .bi{color:#fff;padding-top:6px}\n"], dependencies: [{ 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
1106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: FabButtonComponent, decorators: [{
1107
+ type: Component,
1108
+ args: [{ selector: 'base-fab-button', template: "<div class=\"fab-container\" [ngClass]=\"{ 'fab-container-active': toggle }\">\n <div class=\"fab shadow\">\n <div class=\"fab-content\" (click)=\"toggle = !toggle\">\n <i class=\"bi\" [ngClass]=\"fabIcon\"></i>\n </div>\n </div>\n <div\n class=\"sub-button shadow\"\n *ngFor=\"let button of buttons\"\n (click)=\"button.event.emit(true); toggle = !toggle\"\n [ngStyle]=\"{ backgroundColor: button.color }\"\n >\n <a [routerLink]=\"button.routerLink\">\n <i class=\"bi\" [ngClass]=\"button.icon\"></i>\n </a>\n </div>\n</div>\n", styles: [".fab-container{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;-webkit-user-select:none;user-select:none;position:absolute;bottom:10px;right:10px}.fab-container-active{height:100%}.fab-container-active .sub-button:nth-child(2){transform:translateY(-80px)}.fab-container-active .sub-button:nth-child(3){transform:translateY(-140px)}.fab-container-active .sub-button:nth-child(4){transform:translateY(-200px)}.fab-container-active .sub-button:nth-child(5){transform:translateY(-260px)}.fab-container-active .sub-button:nth-child(6){transform:translateY(-320px)}.fab-container .fab{position:relative;height:60px;width:60px;background-color:var(--bs-primary);border-radius:50%;z-index:2}.fab-container .fab:before{content:\" \";position:absolute;bottom:0;right:0;height:30px;width:30px;background-color:inherit;border-radius:0 0 10px;z-index:-1}.fab-container .fab .fab-content{display:flex;align-items:center;justify-content:center;height:inherit;width:inherit;border-radius:50%}.fab-container .fab .fab-content .bi{color:#fff;font-size:32px}.fab-container .sub-button{position:absolute;display:flex;align-items:center;justify-content:center;bottom:10px;right:10px;height:40px;width:40px;background-color:var(--bs-primary);border-radius:50%;transition:all .3s ease}.fab-container .sub-button:hover{cursor:pointer}.fab-container .sub-button .bi{color:#fff;padding-top:6px}\n"] }]
1109
+ }], propDecorators: { fabIcon: [{
1110
+ type: Input
1111
+ }], buttons: [{
1112
+ type: Input
1113
+ }] } });
1114
+
1097
1115
  class ModelFormComponent {
1098
1116
  constructor(graphQLMetaService, graphQLService, formsService, authService, router, route, cmsService, toastService) {
1099
1117
  this.graphQLMetaService = graphQLMetaService;
@@ -1109,9 +1127,11 @@ class ModelFormComponent {
1109
1127
  this.duplicate = false;
1110
1128
  this.logging = false;
1111
1129
  this.config = {};
1130
+ this.showFavButton = true;
1112
1131
  this.finished = new EventEmitter();
1113
1132
  this._loading = false;
1114
1133
  this.keys = [];
1134
+ this.fabButtons = [];
1115
1135
  }
1116
1136
  set loading(value) {
1117
1137
  if (!value) {
@@ -1132,6 +1152,7 @@ class ModelFormComponent {
1132
1152
  this.init();
1133
1153
  }
1134
1154
  });
1155
+ this.initFabActions();
1135
1156
  }
1136
1157
  ngOnChanges(changes) {
1137
1158
  // Reinit form for new model or load and patch form with new id
@@ -1477,12 +1498,30 @@ class ModelFormComponent {
1477
1498
  });
1478
1499
  });
1479
1500
  }
1501
+ /**
1502
+ * Init fab buttons for mobile devices
1503
+ */
1504
+ initFabActions() {
1505
+ const saveEvent = new EventEmitter();
1506
+ this.fabButtons.push({ icon: 'bi-check-lg', color: 'var(--bs-success)', event: saveEvent });
1507
+ saveEvent.subscribe(() => this.submit(false));
1508
+ if (this.duplicate) {
1509
+ const event = new EventEmitter();
1510
+ this.fabButtons.push({ icon: 'bi-back', color: 'var(--bs-info)', event });
1511
+ event.subscribe(() => this.duplicateObject());
1512
+ }
1513
+ if (this.operation === 'update') {
1514
+ const event = new EventEmitter();
1515
+ this.fabButtons.push({ icon: 'bi-x-lg', color: 'var(--bs-danger)', event });
1516
+ event.subscribe(() => this.deleteObject());
1517
+ }
1518
+ }
1480
1519
  }
1481
1520
  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 }, { token: i1$1.ToastService }], target: i0.ɵɵFactoryTarget.Component });
1482
- 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", onlyUpdateMode: "onlyUpdateMode", 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\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\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\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\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"] }] });
1521
+ 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", onlyUpdateMode: "onlyUpdateMode", duplicate: "duplicate", logging: "logging", config: "config", showFavButton: "showFavButton" }, 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 <div class=\"responsive-back\">\n <i class=\"d-block d-lg-none bi bi-arrow-left\" routerLink=\"../\"></i>\n </div>\n <h2 class=\"mb-0\">\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <div class=\"d-none d-lg-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\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\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-none d-lg-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\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\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\n<div class=\"d-block d-lg-none responsive-action-button\" *ngIf=\"showFavButton\">\n <base-fab-button [buttons]=\"fabButtons\"></base-fab-button>\n</div>\n", styles: [".responsive-back{display:flex;align-items:center;margin-right:6px}.responsive-back .bi-arrow-left{font-size:28px}h2{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.responsive-action-button{position:fixed;bottom:15px;right:15px}\n"], 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: "directive", type: i2$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: ModelFormSubComponent, selector: "base-model-form-sub", inputs: ["fields", "form", "config"], outputs: ["imageChanged"] }, { kind: "component", type: FabButtonComponent, selector: "base-fab-button", inputs: ["fabIcon", "buttons"] }] });
1483
1522
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelFormComponent, decorators: [{
1484
1523
  type: Component,
1485
- 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\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\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\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\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" }]
1524
+ 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 <div class=\"responsive-back\">\n <i class=\"d-block d-lg-none bi bi-arrow-left\" routerLink=\"../\"></i>\n </div>\n <h2 class=\"mb-0\">\n {{ label ? label : capitalizeFirstLetter(modelName) }} {{ operation === 'update' ? 'bearbeiten' : 'erstellen' }}\n </h2>\n\n <div class=\"d-none d-lg-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\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\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-none d-lg-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\n class=\"btn btn-primary\"\n type=\"button\"\n [disabled]=\"!form.touched && !form.dirty\"\n (click)=\"submit(false)\"\n *ngIf=\"!_loading\"\n >\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\n<div class=\"d-block d-lg-none responsive-action-button\" *ngIf=\"showFavButton\">\n <base-fab-button [buttons]=\"fabButtons\"></base-fab-button>\n</div>\n", styles: [".responsive-back{display:flex;align-items:center;margin-right:6px}.responsive-back .bi-arrow-left{font-size:28px}h2{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.responsive-action-button{position:fixed;bottom:15px;right:15px}\n"] }]
1486
1525
  }], 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 }, { type: i1$1.ToastService }]; }, propDecorators: { modelName: [{
1487
1526
  type: Input
1488
1527
  }], label: [{
@@ -1499,6 +1538,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
1499
1538
  type: Input
1500
1539
  }], config: [{
1501
1540
  type: Input
1541
+ }], showFavButton: [{
1542
+ type: Input
1502
1543
  }], finished: [{
1503
1544
  type: Output
1504
1545
  }] } });
@@ -1536,6 +1577,7 @@ class ModelTableComponent {
1536
1577
  this.duplicate = true;
1537
1578
  this.config = {};
1538
1579
  this.fieldConfig = {};
1580
+ this.showFavButton = true;
1539
1581
  this.uniqueField = 'id';
1540
1582
  this.idSelected = new EventEmitter();
1541
1583
  this.createModeChanged = new EventEmitter();
@@ -1706,10 +1748,10 @@ class ModelTableComponent {
1706
1748
  }
1707
1749
  }
1708
1750
  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 });
1709
- 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 {{\n config?.plural ? config?.plural : config?.label ? config?.label : capitalizeFirstLetter(camelModelName) + 's'\n }}\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]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses: 60 }}\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]=\"camelModelName\"\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", "onlyUpdateMode", "duplicate", "logging", "config"], outputs: ["finished"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: EllipsesPipe, name: "baseEllipses" }] });
1751
+ 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", showFavButton: "showFavButton" }, 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-2 mb-lg-4\">\n <h2 class=\"mb-0\" *ngIf=\"modelName\">\n {{\n config?.plural ? config?.plural : config?.label ? config?.label : capitalizeFirstLetter(camelModelName) + 's'\n }}\n </h2>\n <div class=\"d-flex align-items-center d-none d-lg-block\">\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 d-none d-lg-table\">\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]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses: 60 }}\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"d-flex d-lg-none flex-column flex-grow-1\">\n <div class=\"table-card\" *ngFor=\"let object of objects\" [id]=\"object[uniqueField]\">\n <div class=\"table-card-entry\" *ngFor=\"let field of availableFields; let i = index\" (click)=\"selectId(object)\">\n <b *ngIf=\"i > 0\"\n >{{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}:</b\n >\n <p [ngClass]=\"{ 'table-card-entry-first': i === 0 }\">\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]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses: 60 }}\n </ng-container>\n </p>\n </div>\n </div>\n </div>\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=\"d-none d-lg-block btn btn-outline-primary mb-3\" (click)=\"selectId('')\">Zur\u00FCck</button>\n <base-model-form\n [modelName]=\"camelModelName\"\n [label]=\"config?.label\"\n [config]=\"fieldConfig\"\n [logging]=\"logging\"\n [id]=\"selectedId\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n [duplicate]=\"duplicate\"\n [showFavButton]=\"showFavButton\"\n ></base-model-form>\n</div>\n\n<div class=\"responsive-action-button\">\n <base-fab-button\n [fabIcon]=\"'bi-plus'\"\n (click)=\"createNewObject()\"\n *ngIf=\"!(selectedId || createMode) && showFavButton\"\n ></base-fab-button>\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-menu-item{cursor:pointer;padding:8px 15px}.context-menu-menu-item:hover{color:var(--bs-primary)}.table-card{background:var(--bs-white);padding:10px;margin-bottom:10px}.table-card-entry{margin-top:4px}.table-card-entry-first{font-size:18px;font-weight:800;color:var(--bs-primary)}.responsive-action-button{position:fixed;bottom:15px;right:15px}\n"], dependencies: [{ 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: "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", "onlyUpdateMode", "duplicate", "logging", "config", "showFavButton"], outputs: ["finished"] }, { kind: "component", type: FabButtonComponent, selector: "base-fab-button", inputs: ["fabIcon", "buttons"] }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: EllipsesPipe, name: "baseEllipses" }] });
1710
1752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImport: i0, type: ModelTableComponent, decorators: [{
1711
1753
  type: Component,
1712
- 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 {{\n config?.plural ? config?.plural : config?.label ? config?.label : capitalizeFirstLetter(camelModelName) + 's'\n }}\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]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses: 60 }}\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]=\"camelModelName\"\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"] }]
1754
+ 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-2 mb-lg-4\">\n <h2 class=\"mb-0\" *ngIf=\"modelName\">\n {{\n config?.plural ? config?.plural : config?.label ? config?.label : capitalizeFirstLetter(camelModelName) + 's'\n }}\n </h2>\n <div class=\"d-flex align-items-center d-none d-lg-block\">\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 d-none d-lg-table\">\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]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses: 60 }}\n </ng-container>\n </td>\n </tr>\n </tbody>\n </table>\n\n <div class=\"d-flex d-lg-none flex-column flex-grow-1\">\n <div class=\"table-card\" *ngFor=\"let object of objects\" [id]=\"object[uniqueField]\">\n <div class=\"table-card-entry\" *ngFor=\"let field of availableFields; let i = index\" (click)=\"selectId(object)\">\n <b *ngIf=\"i > 0\"\n >{{ tableFields[field]?.label ? tableFields[field]?.label : capitalizeFirstLetter(field) }}:</b\n >\n <p [ngClass]=\"{ 'table-card-entry-first': i === 0 }\">\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]?.enumValues\">\n {{ tableFields[field]?.enumValues[object[field]]?.text }}\n </ng-container>\n\n <ng-container *ngIf=\"!tableFields[field]?.dateFormat && !tableFields[field]?.enumValues\">\n {{ object[field] | baseEllipses: 60 }}\n </ng-container>\n </p>\n </div>\n </div>\n </div>\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=\"d-none d-lg-block btn btn-outline-primary mb-3\" (click)=\"selectId('')\">Zur\u00FCck</button>\n <base-model-form\n [modelName]=\"camelModelName\"\n [label]=\"config?.label\"\n [config]=\"fieldConfig\"\n [logging]=\"logging\"\n [id]=\"selectedId\"\n (finished)=\"selectId('')\"\n [delete]=\"delete\"\n [duplicate]=\"duplicate\"\n [showFavButton]=\"showFavButton\"\n ></base-model-form>\n</div>\n\n<div class=\"responsive-action-button\">\n <base-fab-button\n [fabIcon]=\"'bi-plus'\"\n (click)=\"createNewObject()\"\n *ngIf=\"!(selectedId || createMode) && showFavButton\"\n ></base-fab-button>\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-menu-item{cursor:pointer;padding:8px 15px}.context-menu-menu-item:hover{color:var(--bs-primary)}.table-card{background:var(--bs-white);padding:10px;margin-bottom:10px}.table-card-entry{margin-top:4px}.table-card-entry-first{font-size:18px;font-weight:800;color:var(--bs-primary)}.responsive-action-button{position:fixed;bottom:15px;right:15px}\n"] }]
1713
1755
  }], ctorParameters: function () { return [{ type: i1$1.GraphQLMetaService }, { type: i1$1.GraphQLService }, { type: i1$1.CmsService }]; }, propDecorators: { modelName: [{
1714
1756
  type: Input
1715
1757
  }], objectId: [{
@@ -1730,6 +1772,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
1730
1772
  type: Input
1731
1773
  }], fieldConfig: [{
1732
1774
  type: Input
1775
+ }], showFavButton: [{
1776
+ type: Input
1733
1777
  }], idSelected: [{
1734
1778
  type: Output
1735
1779
  }], createModeChanged: [{
@@ -1869,7 +1913,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
1869
1913
  }] } });
1870
1914
 
1871
1915
  // Modules
1872
- const imports = [FormsModule, ReactiveFormsModule, CommonModule];
1916
+ const imports = [FormsModule, ReactiveFormsModule, CommonModule, RouterModule];
1873
1917
  // Imported and exported elements
1874
1918
  const elements = [
1875
1919
  // Directives
@@ -1893,6 +1937,7 @@ const elements = [
1893
1937
  RefenceInputComponent,
1894
1938
  ChangePasswordComponent,
1895
1939
  DeleteAccountComponent,
1940
+ FabButtonComponent,
1896
1941
  // Pipes
1897
1942
  EllipsesPipe,
1898
1943
  ];
@@ -1921,9 +1966,10 @@ BaseComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
1921
1966
  RefenceInputComponent,
1922
1967
  ChangePasswordComponent,
1923
1968
  DeleteAccountComponent,
1969
+ FabButtonComponent,
1924
1970
  // Pipes
1925
1971
  EllipsesPipe
1926
- ], imports: [FormsModule, ReactiveFormsModule, CommonModule], exports: [
1972
+ ], imports: [FormsModule, ReactiveFormsModule, CommonModule, RouterModule], exports: [
1927
1973
  // Directives
1928
1974
  SortDirective,
1929
1975
  BackButtonDirective,
@@ -1945,6 +1991,7 @@ BaseComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
1945
1991
  RefenceInputComponent,
1946
1992
  ChangePasswordComponent,
1947
1993
  DeleteAccountComponent,
1994
+ FabButtonComponent,
1948
1995
  // Pipes
1949
1996
  EllipsesPipe
1950
1997
  ] });
@@ -1966,5 +2013,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.0", ngImpor
1966
2013
  * Generated bundle index. Do not edit.
1967
2014
  */
1968
2015
 
1969
- export { BackButtonDirective, BaseComponentsModule, BreadcrumbComponent, ChangePasswordComponent, CheckboxComponent, ContextMenuDirective, DeleteAccountComponent, EllipsesPipe, InputComponent, LoadingBarComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, RefenceInputComponent, SelectComponent, SkeletonLoaderComponent, SortDirective, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
2016
+ export { BackButtonDirective, BaseComponentsModule, BreadcrumbComponent, ChangePasswordComponent, CheckboxComponent, ContextMenuDirective, DeleteAccountComponent, EllipsesPipe, FabButtonComponent, InputComponent, LoadingBarComponent, ModelFormComponent, ModelFormSubComponent, ModelTableComponent, RefenceInputComponent, SelectComponent, SkeletonLoaderComponent, SortDirective, TagsComponent, TextareaComponent, ToastComponent, UploadImageComponent };
1970
2017
  //# sourceMappingURL=lenne.tech-ng-base-base-components.mjs.map