diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.html new file mode 100644 index 0000000..687e4ce --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.html @@ -0,0 +1,508 @@ + +
+
+
+

DesignLbrary

+
+
+ + + +
+
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + Template + Type + + + + Ui Type + + + + + + + htmljson + + + + css + + + + javacode + + + Active + + + + + Action + + + + + + {{user. name }} + + + + + + {{user.templatetype }} + + {{user.uitype }} + + + + + + + + + + + + + + + + + {{user. active }} + + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + +
+ + + Users per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} users + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] }} + {{afterText(item.fieldtext)}} +
+ +
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ] | date}} + {{afterText(item.fieldtext)}} +
+
+ {{beforeText(item.fieldtext)}} + {{ app[transform(item.fieldtext) ]}} + {{afterText(item.fieldtext)}} +
+ +
+
+
+ + +
+ +
+ +
+ File Preview +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.ts new file mode 100644 index 0000000..35f2100 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.ts @@ -0,0 +1,348 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Design_lbraryservice} from './Design_lbrary.service'; +import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms'; +import { ExtensionService } from 'src/app/services/fnd/extension.service'; +import { DashboardContentModel2 } from 'src/app/models/builder/dashboard'; +import { Design_lbrarycardvariable } from './Design_lbrary_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Design_lbrary', + templateUrl: './Design_lbrary.component.html', + styleUrls: ['./Design_lbrary.component.scss'] +}) +export class Design_lbraryComponent implements OnInit { + cardButton = Design_lbrarycardvariable.cardButton; + cardmodeldata = Design_lbrarycardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Design_lbrarycardvariable.cardButton; + cardmodal; changeView(){ + this.isCardview = !this.isCardview; + } + beforeText(fieldtext: string): string { // Extract the text before the first '<' + const index = fieldtext.indexOf('<'); + return index !== -1 ? fieldtext.substring(0, index) : fieldtext; + } + afterText(fieldtext: string): string { // Extract the text after the last '>' + const index = fieldtext.lastIndexOf('>'); + return index !== -1 ? fieldtext.substring(index + 1) : ''; + } + transform(fieldtext: string): string { + const match = fieldtext.match(/<([^>]*)>/); + return match ? match[1] : ''; // Extract the text between '<' and '>' + } + userrole; + rowSelected :any= {}; + modaldelete=false; + modalEdit=false; + modalAdd= false; + public entryForm: FormGroup; + loading = false; + product; + modalOpenedforNewLine = false; + newLine:any; + additionalFieldsFromBackend: any[] = []; + formcode = 'Design_lbrary_formCode' +tableName = 'Design_lbrary'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Design_lbraryservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// component button + ngOnInit(): void { + if(this.cardmodeldata !== ''){ + this.cardmodal = JSON.parse(this.cardmodeldata); + this.dashboardArray = this.cardmodal.dashboard.slice(); + console.log(this.dashboardArray) + } + this.userrole=this.userInfoService.getRoles(); + this.getData(); + this.entryForm = this._fb.group({ +name : [null], + +description : [null], + +active : [false], + +htmljson : [null], + +css : [null], + +javacode : [null], + + + + + + + + + + + + + + + }); // component_button200 + // form code start + this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { + console.log(data); + const jsonArray = data.map((str) => JSON.parse(str)); + this.additionalFieldsFromBackend = jsonArray; + this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Design_lbrary_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + + + + + + + } + + + + + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + + + + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + + + + + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + + + + + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + + + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModaldescription = false; +goToReplaceStringdescription(row){ +this.rowSelected = row; this.rsModaldescription =true; } + + + +rsModalhtmljson = false; +goToReplaceStringhtmljson(row){ +this.rowSelected = row; this.rsModalhtmljson =true; } + +rsModalcss = false; +goToReplaceStringcss(row){ +this.rowSelected = row; this.rsModalcss =true; } + +rsModaljavacode = false; +goToReplaceStringjavacode(row){ +this.rowSelected = row; this.rsModaljavacode =true; } + +// updateaction +} + + + + + + + + + + + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.service.ts new file mode 100644 index 0000000..96cc0bf --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.service.ts @@ -0,0 +1,45 @@ +import { Injectable } from '@angular/core'; +import { Observable } from "rxjs"; +import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http"; +import { ApiRequestService } from "src/app/services/api/api-request.service"; +import { environment } from 'src/environments/environment'; +@Injectable({ + providedIn: 'root' +}) +export class Design_lbraryservice{ + private baseURL = "Design_lbrary/Design_lbrary" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } + getAll(page?: number, size?: number): Observable { + return this.apiRequest.get(this.baseURL); + } + getById(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.get(_http); + } + create(data: any): Observable { + return this.apiRequest.post(this.baseURL, data); + } + update(id: number, data: any): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.put(_http, data); + } + delete(id: number): Observable { + const _http = this.baseURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + + + + + + + + + +// updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary_cardvariable.ts new file mode 100644 index 0000000..66ea23d --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary_cardvariable.ts @@ -0,0 +1,4 @@ +export const Design_lbrarycardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/HomePage/Templete1/homepage-editor.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/HomePage/Templete1/homepage-editor.component.html index b7e0cf0..84595b5 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/HomePage/Templete1/homepage-editor.component.html +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/HomePage/Templete1/homepage-editor.component.html @@ -1,4 +1,4 @@ - + @@ -123,310 +123,3 @@ --> - - - - SafeValue must use [property]=binding: - - -
-
-
- (see https://g.co/ng/security#xss) - - diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/common-css.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/common-css.ts index e2e91af..1507044 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/common-css.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/common-css.ts @@ -2496,5 +2496,195 @@ button.light { cursor: pointer; } +/* blog thumbnail grid*/ + +.blog-thumbnail-grid { + padding: 40px; + font-family: 'Segoe UI', sans-serif; + background: #f9f9f9; +} + +.blog-thumbnail-grid h2 { + text-align: center; + margin-bottom: 30px; + font-size: 28px; + font-weight: bold; + color: #222; +} + +.blog-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); + gap: 20px; +} + +.blog-card { + border: 1px solid #eee; + border-radius: 8px; + overflow: hidden; + background: #fff; + transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s; + display: flex; + flex-direction: column; +} + +.blog-card:hover { + transform: translateY(-8px); + box-shadow: 0 8px 16px rgba(0,0,0,0.1); +} + +.blog-card img { + width: 100%; + height: 180px; + object-fit: cover; + background-color: #ddd; +} + +.blog-card-content { + padding: 15px; + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.blog-card-content p { + color: gray; + font-size: 13px; + margin-bottom: 8px; +} + +.blog-card-content h4 { + margin: 0 0 10px 0; + font-size: 16px; +} + +.blog-card-content h4 a { + text-decoration: none; + color: black; +} + +.blog-card-content .read-more { + margin-top: auto; + font-size: 14px; + color: #007bff; + text-decoration: none; +} + +.blog-card-content .read-more:hover { + text-decoration: underline; +} + +/* 🌓 Dark Mode */ +.dark-mode .blog-thumbnail-grid { + background: #1a1a1a; +} + +.dark-mode .blog-thumbnail-grid h2 { + color: #fff; +} + +.dark-mode .blog-card { + background: #2a2a2a; + border: 1px solid #444; +} + +.dark-mode .blog-card-content p, +.dark-mode .blog-card-content h4 a { + color: #ddd; +} + +.dark-mode .blog-card-content .read-more { + color: #1e90ff; +} + +.dark-mode .blog-card:hover { + box-shadow: 0 8px 16px rgba(255,255,255,0.1); +} + +/* 📱 Responsive Tuning */ +@media (max-width: 600px) { + .blog-thumbnail-grid { + padding: 20px; + } + .blog-grid { + grid-template-columns: 1fr; + } +} + +/* ✅ Clean and responsive logo section */ +.logo-cloud { + padding: 60px 20px; + background-color: #ffffff; + text-align: center; +} + +.logo-cloud-heading h2 { + font-size: 2.2rem; + font-weight: 700; + color: #222; + margin-bottom: 40px; +} + +.logo-cloud-logos { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: 30px; +} + +.logo-item { + display: flex; + justify-content: center; + align-items: center; +} + + + +.placeholder-img { + width: 120px; + height: 120px; + background-repeat: no-repeat; + background-image: url('/src/assets/images/placeholder.png'); + background-position: center center; + background-size: contain; + border: 1px solid #ccc; + border-radius: 4px; +} + + +/* Responsive */ +@media (max-width: 768px) { + .placeholder-img { + width: 80px; + height: 80px; + } +} + + +/* 🟰 New Theme specific background for wellness */ +.theme-wellness { + background-color: #f0f8f5; /* Light green spa-like background */ +} + +/* 🟰 CTA Button Specific Styling */ +.logo-cta .cta-button { + padding: 10px 20px; + background: #222; + color: #fff; + text-decoration: none; + font-weight: bold; + border-radius: 4px; + display: inline-block; + transition: background 0.3s ease; + margin-top: 20px; +} + +.logo-cta .cta-button:hover { + background: #555; +} + + `; diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.ts index 9c52b0a..07836d6 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.ts @@ -648,6 +648,16 @@ HTML Only. No CSS. this.toastr.success('✅ Navbar updated for all nav-1 instances!'); } + onLogoUpload(event: any, logo: any) { + const file = event.target.files[0]; + const reader = new FileReader(); + reader.onload = (e: any) => { + logo.src = e.target.result; // Save Base64 string in JSON + }; + reader.readAsDataURL(file); + } + + // applyNavbarChanges(pageName: string) { // const links = this.navbarLinks[pageName] || []; // const htmlContent = this.pageSections[pageName]?.FullPage?.toString() || ''; diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index 742221d..c77eb70 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -98,6 +98,7 @@ import { MappingruleeditComponent } from './datamanagement/mappingrule/mappingru import { TreeVisualizerComponent } from './fnd/SiteTreeBuilder/tree-visualizer.component'; import { SiteTreeComponent } from './fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.component'; import { EditstepperComponent } from './BuilderComponents/vpspack/Visa_application/VisaOrderWorkflow/editstepper.component'; +import { Design_lbraryComponent } from './fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component'; @@ -270,6 +271,8 @@ const routes: Routes = [ // buildercomponents + {path:'Design_lbrary',component:Design_lbraryComponent}, + { path: 'sitetree', component: SiteTreeComponent, }, { path: 'stepper', component: EditstepperComponent }, diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index 5de9635..b4e682d 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -125,6 +125,7 @@ import { HomepageEditorComponent } from './fnd/SiteTreeBuilder/HomePage/Templete import { SiteTreeComponent } from './fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.component'; import { TreeNodeComponent } from './fnd/SiteTreeBuilder/TreeNode/tree-node.component'; import { EditstepperComponent } from './BuilderComponents/vpspack/Visa_application/VisaOrderWorkflow/editstepper.component'; +import { Design_lbraryComponent } from './fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component'; @NgModule({ @@ -145,6 +146,8 @@ import { EditstepperComponent } from './BuilderComponents/vpspack/Visa_applicati // buildercomponents + + Design_lbraryComponent, SiteTreeComponent, EditstepperComponent, HomepageEditorComponent, diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/images/placeholder.svg b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/images/placeholder.svg new file mode 100644 index 0000000..b176b55 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/images/placeholder.svg @@ -0,0 +1,7 @@ + + + + + Svg Vector Icons : http://www.onlinewebfonts.com/icon + + \ No newline at end of file