@lenne.tech/ng-base 13.28.0 → 13.30.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.
Files changed (33) hide show
  1. package/base-cms/pages/base-cms/base-cms.component.d.ts +11 -4
  2. package/base-components/components/model-form/model-form.component.d.ts +11 -3
  3. package/base-components/components/model-table/model-table.component.d.ts +2 -3
  4. package/base-components/components/refence-input/refence-input.component.d.ts +39 -6
  5. package/base-components/components/tags/tags.component.d.ts +13 -4
  6. package/esm2020/base-cms/pages/base-cms/base-cms.component.mjs +22 -11
  7. package/esm2020/base-components/components/model-form/model-form.component.mjs +96 -54
  8. package/esm2020/base-components/components/model-form-sub/model-form-sub.component.mjs +3 -3
  9. package/esm2020/base-components/components/model-table/model-table.component.mjs +9 -6
  10. package/esm2020/base-components/components/refence-input/refence-input.component.mjs +108 -10
  11. package/esm2020/base-components/components/skeleton-loader/skeleton-loader.component.mjs +1 -2
  12. package/esm2020/base-components/components/tags/tags.component.mjs +48 -16
  13. package/esm2020/base-prototype/pages/profile/profile.component.mjs +1 -1
  14. package/esm2020/shared/classes/graphql-meta.class.mjs +8 -1
  15. package/esm2020/shared/interfaces/graphql-crud-type.interface.mjs +1 -1
  16. package/fesm2015/lenne.tech-ng-base-base-cms.mjs +22 -11
  17. package/fesm2015/lenne.tech-ng-base-base-cms.mjs.map +1 -1
  18. package/fesm2015/lenne.tech-ng-base-base-components.mjs +278 -89
  19. package/fesm2015/lenne.tech-ng-base-base-components.mjs.map +1 -1
  20. package/fesm2015/lenne.tech-ng-base-base-prototype.mjs +1 -1
  21. package/fesm2015/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
  22. package/fesm2015/lenne.tech-ng-base-shared.mjs +7 -0
  23. package/fesm2015/lenne.tech-ng-base-shared.mjs.map +1 -1
  24. package/fesm2020/lenne.tech-ng-base-base-cms.mjs +21 -10
  25. package/fesm2020/lenne.tech-ng-base-base-cms.mjs.map +1 -1
  26. package/fesm2020/lenne.tech-ng-base-base-components.mjs +256 -82
  27. package/fesm2020/lenne.tech-ng-base-base-components.mjs.map +1 -1
  28. package/fesm2020/lenne.tech-ng-base-base-prototype.mjs +1 -1
  29. package/fesm2020/lenne.tech-ng-base-base-prototype.mjs.map +1 -1
  30. package/fesm2020/lenne.tech-ng-base-shared.mjs +7 -0
  31. package/fesm2020/lenne.tech-ng-base-shared.mjs.map +1 -1
  32. package/package.json +1 -1
  33. package/shared/interfaces/graphql-crud-type.interface.d.ts +1 -0
@@ -5,6 +5,7 @@ import { CommonModule } from '@angular/common';
5
5
  import { ReactiveFormsModule } from '@angular/forms';
6
6
  import * as i1 from '@lenne.tech/ng-base/shared';
7
7
  import { BasicUser } from '@lenne.tech/ng-base/shared';
8
+ import { Subscription } from 'rxjs';
8
9
  import * as i2 from '@angular/router';
9
10
  import { RouterModule } from '@angular/router';
10
11
  import * as i3 from '@lenne.tech/ng-base/base-components';
@@ -20,11 +21,11 @@ class BaseCmsComponent {
20
21
  this.router = router;
21
22
  this.authService = authService;
22
23
  this.types = [];
23
- this.route.params.subscribe((value) => {
24
+ this.subscription = new Subscription();
25
+ this.subscription.add(this.route.params.subscribe((value) => {
24
26
  if (value['modelName']) {
25
- const restricted = this.moduleConfig.modelConfig[value['modelName']]?.restricted;
26
- const excluded = this.moduleConfig.modelConfig[value['modelName']]?.excluded;
27
- if ((restricted !== null && !restricted) || (excluded !== null && !excluded)) {
27
+ const exclude = this.moduleConfig.modelConfig[value['modelName']]?.exclude;
28
+ if (exclude !== null && !exclude) {
28
29
  this.modelName = value['modelName'];
29
30
  }
30
31
  else {
@@ -36,11 +37,14 @@ class BaseCmsComponent {
36
37
  if (value['id']) {
37
38
  this.id = value['id'];
38
39
  }
39
- });
40
+ }));
40
41
  }
41
42
  async ngOnInit() {
42
43
  await this.init();
43
44
  }
45
+ ngOnDestroy() {
46
+ this.subscription.unsubscribe();
47
+ }
44
48
  /**
45
49
  * It returns a promise that resolves to an array of GraphqlCrudType objects
46
50
  *
@@ -58,7 +62,7 @@ class BaseCmsComponent {
58
62
  }
59
63
  const types = meta.getTypes();
60
64
  // Check for excluded types
61
- const filteredTypes = types.filter((e) => !this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.excluded);
65
+ const filteredTypes = types.filter((e) => !this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.exclude);
62
66
  // Check for restricted types
63
67
  this.types = filteredTypes.filter((e) => {
64
68
  if (this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.restricted) {
@@ -135,9 +139,16 @@ class BaseCmsComponent {
135
139
  return type ? type.delete : false;
136
140
  }
137
141
  /**
138
- * If the id is truthy, navigate to the id, otherwise navigate to the parent route
142
+ * If the model name is found in the type array, return the duplicate property of the type object
139
143
  *
140
- * @param id - The id of the selected item.
144
+ * @returns A boolean value.
145
+ */
146
+ isDuplicatePossible() {
147
+ const type = this.getTypeByModelName();
148
+ return type ? type.duplicate : false;
149
+ }
150
+ /**
151
+ * If the id is truthy, navigate to the id, otherwise navigate to the parent route
141
152
  */
142
153
  idSelected(id) {
143
154
  if (id) {
@@ -149,10 +160,10 @@ class BaseCmsComponent {
149
160
  }
150
161
  }
151
162
  BaseCmsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: BaseCmsComponent, deps: [{ token: BASE_CMS_MODULE_CONFIG }, { token: i1.GraphQLMetaService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i1.AuthService }], target: i0.ɵɵFactoryTarget.Component });
152
- BaseCmsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", 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\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive\" 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 ? '../../' : '../') + type?.name?.toLowerCase()\"\n [ngClass]=\"{ active: type?.name?.toLowerCase() === this.modelName?.toLowerCase() }\"\n >\n {{\n moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n : moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.label\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.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[modelName?.toLowerCase()]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[modelName?.toLowerCase()] || {}\"\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 ></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"], components: [{ type: i3.ModelTableComponent, selector: "base-model-table", inputs: ["modelName", "objectId", "createMode", "logging", "create", "update", "delete", "config", "fieldConfig"], outputs: ["idSelected", "createModeChanged"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
163
+ BaseCmsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.3", 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 ? '../../' : '../') + type?.name?.toLowerCase()\"\n [ngClass]=\"{ active: type?.name?.toLowerCase() === this.modelName?.toLowerCase() }\"\n >\n {{\n moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n : moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.label\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.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[modelName?.toLowerCase()]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[modelName?.toLowerCase()] || {}\"\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"], components: [{ type: i3.ModelTableComponent, selector: "base-model-table", inputs: ["modelName", "objectId", "createMode", "logging", "create", "update", "delete", "duplicate", "config", "fieldConfig"], outputs: ["idSelected", "createModeChanged"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
153
164
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.3", ngImport: i0, type: BaseCmsComponent, decorators: [{
154
165
  type: Component,
155
- 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\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive\" 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 ? '../../' : '../') + type?.name?.toLowerCase()\"\n [ngClass]=\"{ active: type?.name?.toLowerCase() === this.modelName?.toLowerCase() }\"\n >\n {{\n moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n : moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.label\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.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[modelName?.toLowerCase()]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[modelName?.toLowerCase()] || {}\"\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 ></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"] }]
166
+ 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 ? '../../' : '../') + type?.name?.toLowerCase()\"\n [ngClass]=\"{ active: type?.name?.toLowerCase() === this.modelName?.toLowerCase() }\"\n >\n {{\n moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n : moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.label\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.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[modelName?.toLowerCase()]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[modelName?.toLowerCase()] || {}\"\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"] }]
156
167
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
157
168
  type: Inject,
158
169
  args: [BASE_CMS_MODULE_CONFIG]
@@ -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, OnInit } from '@angular/core';\nimport { AuthService, BasicUser, GraphqlCrudType, GraphQLMeta, GraphQLMetaService } 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';\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 {\n meta: GraphQLMeta;\n modelName: string;\n id: string;\n types: GraphqlCrudType[] = [];\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 ) {\n this.route.params.subscribe((value) => {\n if (value['modelName']) {\n const restricted = this.moduleConfig.modelConfig[value['modelName']]?.restricted;\n const excluded = this.moduleConfig.modelConfig[value['modelName']]?.excluded;\n if ((restricted !== null && !restricted) || (excluded !== null && !excluded)) {\n this.modelName = value['modelName'];\n } else {\n this.init().then((types: GraphqlCrudType[]) => {\n this.router.navigate(['../' + types[0].name.toLowerCase()], { relativeTo: this.route });\n });\n }\n }\n\n if (value['id']) {\n this.id = value['id'];\n }\n });\n }\n\n async ngOnInit() {\n await this.init();\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 }\n\n if (this.route.snapshot?.params?.['id']) {\n this.id = this.route.snapshot?.params?.['id'];\n }\n\n const types = meta.getTypes();\n\n // Check for excluded types\n const filteredTypes = types.filter((e) => !this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.excluded);\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 }\n\n resolve(this.types);\n\n if (!this.modelName && this.types) {\n this.router.navigate(['./' + this.types[0].name.toLowerCase()], { 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) => e.name.toLowerCase() === this.modelName.toLowerCase());\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 id is truthy, navigate to the id, otherwise navigate to the parent route\n *\n * @param id - The id of the selected item.\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","<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\"\n *ngIf=\"moduleConfig?.logoUrl\"\n >\n <img [src]=\"moduleConfig.logoUrl\" class=\"img-responsive\" 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 ? '../../' : '../') + type?.name?.toLowerCase()\"\n [ngClass]=\"{ active: type?.name?.toLowerCase() === this.modelName?.toLowerCase() }\"\n >\n {{\n moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n : moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.label\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.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[modelName?.toLowerCase()]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[modelName?.toLowerCase()] || {}\"\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 ></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;;MCApE,gBAAgB,CAAA;IAM3B,WACyC,CAAA,YAAiC,EAChE,kBAAsC,EACtC,KAAqB,EACrB,MAAc,EACd,WAAwB,EAAA;QAJO,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAqB;QAChE,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAoB;QACtC,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;QACrB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QAPlC,IAAK,CAAA,KAAA,GAAsB,EAAE,CAAC;QAS5B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,KAA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qBAAA;AACF,iBAAA,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 { AuthService, BasicUser, GraphqlCrudType, GraphQLMeta, GraphQLMetaService } 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 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 ) {\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 } else {\n this.init().then((types: GraphqlCrudType[]) => {\n this.router.navigate(['../' + types[0].name.toLowerCase()], { 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 }\n\n if (this.route.snapshot?.params?.['id']) {\n this.id = this.route.snapshot?.params?.['id'];\n }\n\n const types = meta.getTypes();\n\n // Check for excluded types\n const filteredTypes = types.filter((e) => !this.moduleConfig?.modelConfig[e.name.toLowerCase()]?.exclude);\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 }\n\n resolve(this.types);\n\n if (!this.modelName && this.types) {\n this.router.navigate(['./' + this.types[0].name.toLowerCase()], { 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) => e.name.toLowerCase() === this.modelName.toLowerCase());\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","<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 ? '../../' : '../') + type?.name?.toLowerCase()\"\n [ngClass]=\"{ active: type?.name?.toLowerCase() === this.modelName?.toLowerCase() }\"\n >\n {{\n moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.plural\n : moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.label\n ? moduleConfig?.modelConfig[type?.name?.toLowerCase()]?.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[modelName?.toLowerCase()]\"\n [fieldConfig]=\"moduleConfig?.fieldConfig[modelName?.toLowerCase()] || {}\"\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;;MCCpE,gBAAgB,CAAA;IAO3B,WACyC,CAAA,YAAiC,EAChE,kBAAsC,EACtC,KAAqB,EACrB,MAAc,EACd,WAAwB,EAAA;QAJO,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAqB;QAChE,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAoB;QACtC,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;QACrB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QARlC,IAAK,CAAA,KAAA,GAAsB,EAAE,CAAC;AAC9B,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;AAShC,QAAA,IAAI,CAAC,YAAY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