diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 2.zip b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 2.zip new file mode 100644 index 0000000..3e9e1e5 Binary files /dev/null and b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 2.zip differ diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 3.zip b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 3.zip new file mode 100644 index 0000000..b312836 Binary files /dev/null and b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 3.zip differ diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 4.zip b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 4.zip new file mode 100644 index 0000000..3a8f3b9 Binary files /dev/null and b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder 4.zip differ 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 index 1e3c430..f1ae359 100644 --- 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 @@ -50,6 +50,9 @@ + Html + + htmljson @@ -91,7 +94,9 @@ - + + @@ -128,8 +133,8 @@ - @@ -359,6 +364,10 @@ +
+ + +
+
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 index 4f6d789..f49ca07 100644 --- 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 @@ -9,6 +9,8 @@ import { Design_lbrarycardvariable } from './Design_lbrary_cardvariable'; import { UserInfoService } from 'src/app/services/user-info.service'; import { SiteTreeservice } from '../SiteBuilderGrid/SiteTree.service'; import { COMMON_CSS } from '../WireframesUi/common-css'; +import { Download_Css } from '../WireframesUi/download-css'; +// import { Download_Css } from '../WireframesUi/download-css'; declare var JsBarcode: any; @Component({ selector: 'app-Design_lbrary', @@ -79,11 +81,13 @@ export class Design_lbraryComponent implements OnInit { htmljson: [null], css: [null], - templatetype:[null], - uitype:[null], + templatetype: [null], + uitype: [null], javacode: [null], typerender: [null], techstack: [null], + html: [null], + @@ -352,12 +356,16 @@ export class Design_lbraryComponent implements OnInit { // this.modalHtmlPreview = true; // }); // } - openHtmlPreview(id: number): void { console.log('preview html start..'); this.siteTreeService.generateHtmlwithcss(id).subscribe((response: any) => { const bodyContent = response.msg || '
Empty
'; // fallback + + // Store raw content for download/copy + const rawHtmlContent = bodyContent; + + // Full HTML with styles and controls const fullHtml = ` @@ -366,38 +374,204 @@ export class Design_lbraryComponent implements OnInit { HTML Preview - ${bodyContent} +
+ + + +
+ +
Copied to clipboard!
+ +
+ ${bodyContent} +
+ +

+          
+          
         
         
       `;
 
-      this.htmlContent = fullHtml;
-      console.log('html code ..', this.htmlContent);
-      this.modalHtmlPreview = true;
+      // Open the HTML in a new window/tab
+      const newWindow = window.open('', '_blank');
+      if (newWindow) {
+        newWindow.document.write(fullHtml);
+        newWindow.document.close();
+      } else {
+        // If popup is blocked, inform the user
+        this.toastr.warning('Pop-up blocked. Please allow pop-ups for this site to see the preview.');
+      }
     }, error => {
-      this.htmlContent = `
+      // Handle error by opening a new window with error message
+      const errorHtml = `
         
-        
-        

Error loading HTML.

+ + + + + Error Preview + + + +
+

Error Loading Preview

+

The preview content could not be loaded. Error details:

+
${error ? JSON.stringify(error, null, 2) : 'Unknown error'}
+
+ + `; - this.modalHtmlPreview = true; + + const newWindow = window.open('', '_blank'); + if (newWindow) { + newWindow.document.write(errorHtml); + newWindow.document.close(); + } else { + this.toastr.error('Error loading preview. Pop-up blocked. Please allow pop-ups for this site.'); + } }); } - - } - - - - - - diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.service.ts index 89e353e..a5d5e63 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.service.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.service.ts @@ -64,7 +64,18 @@ export class SiteTreeservice { return this.apiRequest.post(`sureops/deploy?projId=` + projId, data); } + createHtmlfile(siteNmae: String, data: any): Observable { + const _http = this.baseURL + "/createFile?siteBuilderName=" + siteNmae; + return this.apiRequest.post(_http, data); + } - // updateaction + readPages(siteNmae: String, pageNmae: String): Observable { + + const _http = this.baseURL + "/read?siteBuilderName=" + siteNmae + '&filename=' + pageNmae; + + return this.apiRequest.get(_http, undefined, 'text'); + } + + // 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/TreeNode/tree-node.component.css b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.css index ea29224..fc8e929 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.css +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.css @@ -198,7 +198,15 @@ margin-bottom: 8px; color: #333; } - +.offcanvas-backdrop { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.3); + z-index: 1040; +} .section-content { font-size: 13px; color: #555; @@ -385,12 +393,15 @@ } .btn { - padding: 8px 15px; - border-radius: 4px; + padding: 10px 16px; + border-radius: 6px; cursor: pointer; font-weight: 500; border: 1px solid transparent; transition: all 0.2s ease; + display: inline-flex; + align-items: center; + justify-content: center; } .btn-primary { @@ -398,10 +409,19 @@ color: white; } -.btn-primary:hover { +.btn-primary:hover:not([disabled]) { background-color: #0069d9; + transform: translateY(-1px); + box-shadow: 0 2px 5px rgba(0,0,0,0.1); } +.btn-primary[disabled] { + background-color: #7fb6ff; + cursor: not-allowed; +} + + + .btn-secondary { background-color: #6c757d; color: white; @@ -409,20 +429,70 @@ .btn-secondary:hover { background-color: #5a6268; + transform: translateY(-1px); + box-shadow: 0 2px 5px rgba(0,0,0,0.1); } +.form-actions { + display: flex; + justify-content: flex-end; + gap: 10px; +} + +.mt-3 { + margin-top: 1rem; +} + +.mt-4 { + margin-top: 1.5rem; +} + +@keyframes slideIn { + from { right: -400px; } + to { right: 0; } +} + +@keyframes slideOut { + from { right: 0; } + to { right: -400px; } +} + +.offcanvas.show { + animation: slideIn 0.3s forwards; +} + +.offcanvas:not(.show) { + animation: slideOut 0.3s forwards; +} + + .form-control { - display: block; - width: 100%; - padding: 0.375rem 0.75rem; - font-size: 1rem; - line-height: 1.5; - color: #495057; - background-color: #fff; - background-clip: padding-box; + border-radius: 6px; border: 1px solid #ced4da; - border-radius: 0.25rem; - transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + padding: 10px 12px; + transition: all 0.2s ease; +} + +.form-control:focus { + border-color: #80bdff; + box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); +} + +textarea.form-control { + min-height: 120px; + resize: vertical; +} +.custom-section-form { + margin-top: 30px; + padding-top: 20px; + border-top: 1px dashed #ddd; +} + +.custom-section-form h4 { + margin-bottom: 15px; + color: #444; + font-size: 16px; + font-weight: 600; } .mb-3 { @@ -438,7 +508,7 @@ background-color: white; box-shadow: -5px 0 15px rgba(0,0,0,0.1); z-index: 1050; - transition: right 0.3s ease; + transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); overflow-y: auto; } @@ -450,27 +520,47 @@ display: flex; align-items: center; justify-content: space-between; - padding: 15px 20px; - border-bottom: 1px solid #ddd; + padding: 18px 20px; + border-bottom: 1px solid #eaeaea; + background-color: #f8f9fa; } .offcanvas-title { font-size: 18px; font-weight: 600; + color: #333; } .close-btn { background: none; border: none; - font-size: 24px; cursor: pointer; color: #666; + width: 32px; + height: 32px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s ease; +} + +.close-btn:hover { + background-color: #f1f1f1; + color: #333; + transform: rotate(90deg); } .offcanvas-body { padding: 20px; } +.section-templates-container { + max-height: 50vh; + overflow-y: auto; + padding-right: 5px; +} + .section-template { padding: 15px; border: 1px solid #ddd; @@ -478,11 +568,30 @@ margin-bottom: 15px; cursor: pointer; transition: all 0.2s ease; + position: relative; + overflow: hidden; +} + +.section-template:before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 4px; + height: 0; + background-color: #007bff; + transition: height 0.3s ease; } .section-template:hover { background-color: #f8f9fa; border-color: #007bff; + transform: translateY(-2px); + box-shadow: 0 4px 8px rgba(0,0,0,0.05); +} + +.section-template:hover:before { + height: 100%; } .section-template-title { diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.html index f27d129..9919914 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.html +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.html @@ -47,31 +47,40 @@
-
+ + + + +
Add Section
- +
-
-
{{ template.type }}
-
{{ template.description }}
+
+
+
{{ template.type }}
+
{{ template.description }}
+
-
+

Custom Section

@@ -88,6 +97,32 @@
+ + +
+
+
Edit Section: {{ selectedSection?.type }}
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+