@rangertechnologies/ngnxt 2.1.87 → 2.1.89

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.
@@ -10262,7 +10262,7 @@ class FormBuilderService {
10262
10262
  if (savedFormElements) {
10263
10263
  this.formElements = JSON.parse(savedFormElements);
10264
10264
  this.formElementsSubject.next([...this.formElements]);
10265
- this.book = JSON.parse(localStorage.getItem('book') || '{}');
10265
+ // this.book = JSON.parse(localStorage.getItem('book') || '{}');
10266
10266
  this.unique_id = localStorage.getItem('unique_id');
10267
10267
  }
10268
10268
  }
@@ -10275,11 +10275,8 @@ class FormBuilderService {
10275
10275
  }
10276
10276
  // Add a new element to the form
10277
10277
  addElement(element) {
10278
- debugger;
10279
10278
  // const savedFormElements = localStorage.getItem('formElements');
10280
- console.log("length", this.formElements.length);
10281
10279
  if (this.formElements.length == 0) {
10282
- console.log("savedFormElements", this.formElements);
10283
10280
  // this.formElements = JSON.parse(savedFormElements);
10284
10281
  // this.formElementsSubject.next([...this.formElements]);
10285
10282
  // this.book = JSON.parse(localStorage.getItem('book') || '{}');
@@ -10305,11 +10302,11 @@ class FormBuilderService {
10305
10302
  };
10306
10303
  }
10307
10304
  // this.unique_id = uuidv4();
10308
- localStorage.setItem('book', JSON.stringify(this.book));
10305
+ // localStorage.setItem('book', JSON.stringify(this.book));
10309
10306
  localStorage.setItem('unique_id', this.unique_id);
10310
10307
  }
10311
10308
  this.formElements.push(element);
10312
- localStorage.setItem('formElements', JSON.stringify(this.formElements));
10309
+ // localStorage.setItem('formElements', JSON.stringify(this.formElements));
10313
10310
  // this.formElementsSubject.next([...this.formElements]);
10314
10311
  }
10315
10312
  updateElement(index, updates) {
@@ -10341,7 +10338,7 @@ class FormBuilderService {
10341
10338
  }
10342
10339
  this.formElements[index] = updatedElement;
10343
10340
  this.formElementsSubject.next([...this.formElements]);
10344
- localStorage.setItem('formElements', JSON.stringify(this.formElements));
10341
+ // localStorage.setItem('formElements', JSON.stringify(this.formElements));
10345
10342
  }
10346
10343
  }
10347
10344
  setSelectedElement(index) {
@@ -10351,7 +10348,6 @@ class FormBuilderService {
10351
10348
  return this.formElements;
10352
10349
  }
10353
10350
  downloadElement() {
10354
- console.log("book", this.book);
10355
10351
  this.book.bookQuestionsMap[this.unique_id].subQuestions = this.formElements;
10356
10352
  let tempElement = {};
10357
10353
  this.formElements.forEach((element) => {
@@ -10377,7 +10373,7 @@ class FormBuilderService {
10377
10373
  }
10378
10374
  });
10379
10375
  this.formElements = this.tempElem;
10380
- localStorage.setItem('formElements', JSON.stringify(this.formElements));
10376
+ // localStorage.setItem('formElements', JSON.stringify(this.formElements));
10381
10377
  this.formElementsSubject.next([...this.formElements]);
10382
10378
  }
10383
10379
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -10416,9 +10412,7 @@ class ElementComponent {
10416
10412
  // Subscribe to the formElements$ observable
10417
10413
  this.formBuilderService.formElements$.subscribe((elements) => {
10418
10414
  this.formElements = elements; // Update the local array with the latest data
10419
- console.log('Form Elements:', this.formElements);
10420
10415
  });
10421
- console.log("bookletJSON==" + this.bookletJSON);
10422
10416
  if (this.bookletJSON) {
10423
10417
  // AP-23JAN25 - empty string to clear the local storage
10424
10418
  localStorage.setItem('status', ("edit"));
@@ -10497,7 +10491,6 @@ class ElementComponent {
10497
10491
  }
10498
10492
  // Remove an element by index
10499
10493
  removeElement(field, index) {
10500
- console.log('remove', index);
10501
10494
  this.formBuilderService.removeElementComponent(field.id);
10502
10495
  this.formElements = this.formBuilderService.getElements();
10503
10496
  }
@@ -10584,7 +10577,6 @@ class PropertiesComponent {
10584
10577
  onAlignSelect(value) {
10585
10578
  if (this.selectedElement) {
10586
10579
  this.selectedElement.textAlign = value;
10587
- console.log(`Selected alignment: ${value}`);
10588
10580
  }
10589
10581
  }
10590
10582
  onStyleSelect(value) {
@@ -10594,7 +10586,6 @@ class PropertiesComponent {
10594
10586
  this.selectedElement.styles = this.selectedElement.styles || [];
10595
10587
  // Ensure only one style is selected at a time
10596
10588
  this.selectedElement.styles = [value];
10597
- console.log('Updated styles:', this.selectedElement.styles);
10598
10589
  }
10599
10590
  isStyleActive(value) {
10600
10591
  return this.selectedElement?.styles?.includes(value) || false;
@@ -10912,7 +10903,6 @@ class PropertiesComponent {
10912
10903
  this.selectedElementIndex = index;
10913
10904
  if (index >= 0) {
10914
10905
  const elements = this.formBuilderService.getElements();
10915
- console.log('Selected element:', elements);
10916
10906
  this.selectedElement = elements[index];
10917
10907
  }
10918
10908
  });
@@ -11033,6 +11023,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11033
11023
  args: [{ selector: 'app-menu', template: "<!-- AP 22JAN25 - Top menu ,Left side menu -->\r\n<!-- menu.component.html -->\r\n<div class=\"top-bar\">\r\n <button class=\"button share-button\">Share</button>\r\n <button class=\"button publish-button\">Publish</button>\r\n</div>\r\n<div class=\"menu-sidebar\">\r\n <!-- Logo Section -->\r\n <div class=\"menu-logo\">\r\n <img src=\"../assets/Nxt.png\">\r\n </div>\r\n\r\n <!-- Menu Items -->\r\n <ul class=\"menu-list\">\r\n <li\r\n *ngFor=\"let item of menuItems; let i = index\"\r\n class=\"menu-item\"\r\n [class.active]=\"activeIndex === i\"\r\n (click)=\"setActiveMenu(i)\"\r\n [attr.aria-label]=\"item.label\"\r\n >\r\n <!-- Dynamic Icon -->\r\n <img [src]=\"item.icon\" alt=\"Menu Icon\" class=\"menu-icon\" />\r\n </li>\r\n </ul>\r\n\r\n <!-- Profile Section -->\r\n <div class=\"menu-profile\">\r\n <img src=\"../assets/icons/ProfileImage.svg\" />\r\n </div>\r\n</div>\r\n\r\n", styles: [".top-bar{display:flex;justify-content:flex-end;padding:15px;background-color:#fff;border-bottom:1px solid #ccc;width:100%;position:absolute;top:-3px}.button{padding:10px 20px;margin-left:10px;font-size:1rem;border:none;border-radius:5px;cursor:pointer;transition:background-color .3s ease}.share-button{background-color:#e5e8ed;color:#384652}.share-button:hover,.publish-button{background-color:#3374f2;color:#fff}.publish-button:hover{background-color:#005f73}.menu-sidebar{width:74px;height:100vh;background-color:#fff;color:#94a3b8;display:flex;flex-direction:column;align-items:center;position:absolute;top:0;box-shadow:2px 0 5px #0000001a}.menu-logo img{width:40px;margin:20px 0}.menu-list{list-style-type:none;padding:0;margin-top:48px;flex:1}.menu-item{width:50px;height:50px;display:flex;justify-content:center;align-items:center;margin:10px 0;cursor:pointer;border-radius:8px;transition:background .3s ease}.menu-item.active,.menu-item:hover{background-color:#ffb300;border-radius:50px;color:#fff}.icon{font-size:20px}.menu-profile img{width:40px;border-radius:50%;margin-bottom:20px}\n"] }]
11034
11024
  }] });
11035
11025
 
11026
+ // AP-29JAN25
11027
+ class FormComponent {
11028
+ // Input data for app-element
11029
+ // bookletJson: any = {}; // Replace with your actual JSON object
11030
+ // bookletId: string = '123'; // Replace with your actual booklet ID
11031
+ bookletJSON;
11032
+ bookletId;
11033
+ formButtonHandler = new EventEmitter();
11034
+ // Input data for app-properties
11035
+ // api: string = 'https://example.com/api'; // Replace with your actual API endpoint
11036
+ // apiMethod: string = 'GET'; // Replace with your actual API method
11037
+ selectedElementType = 'button'; // Replace with the default selected element type
11038
+ // Event handler for app-element
11039
+ formButtonHandlerClick(event) {
11040
+ this.formButtonHandler.emit(event);
11041
+ }
11042
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11043
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FormComponent, selector: "app-form-builder", inputs: { bookletJSON: "bookletJSON", bookletId: "bookletId" }, outputs: { formButtonHandler: "formButtonHandler" }, ngImport: i0, template: "<!-- AP-29JAN25 -->\r\n<div class=\"form-container row\">\r\n <!-- app-element Component -->\r\n <app-element class=\"col-md-8\" [bookletJSON]=\"bookletJSON\" [bookletId]=\"bookletId\"></app-element>\r\n \r\n <!-- app-properties Component -->\r\n <app-properties class=\"col-md-4\" (formButtonHandler)=\"formButtonHandlerClick($event)\"></app-properties>\r\n </div>\r\n ", styles: [""], dependencies: [{ kind: "component", type: ElementComponent, selector: "app-element", inputs: ["bookletJSON", "bookletId"], outputs: ["elementButtonClicked"] }, { kind: "component", type: PropertiesComponent, selector: "app-properties", inputs: ["selectedElementType"], outputs: ["formButtonHandler"] }] });
11044
+ }
11045
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormComponent, decorators: [{
11046
+ type: Component,
11047
+ args: [{ selector: 'app-form-builder', template: "<!-- AP-29JAN25 -->\r\n<div class=\"form-container row\">\r\n <!-- app-element Component -->\r\n <app-element class=\"col-md-8\" [bookletJSON]=\"bookletJSON\" [bookletId]=\"bookletId\"></app-element>\r\n \r\n <!-- app-properties Component -->\r\n <app-properties class=\"col-md-4\" (formButtonHandler)=\"formButtonHandlerClick($event)\"></app-properties>\r\n </div>\r\n " }]
11048
+ }], propDecorators: { bookletJSON: [{
11049
+ type: Input
11050
+ }], bookletId: [{
11051
+ type: Input
11052
+ }], formButtonHandler: [{
11053
+ type: Output
11054
+ }] } });
11055
+
11036
11056
  // export const MY_CUSTOM_FORMATS = {
11037
11057
  // fullPickerInput: 'DD/MM/YYYY HH:mm:ss',
11038
11058
  // useUtc: true,
@@ -11077,7 +11097,8 @@ class NxtAppModule {
11077
11097
  //AP 22JAN2025 Added the below components
11078
11098
  ElementComponent,
11079
11099
  PropertiesComponent,
11080
- MenuComponent], imports: [i1$2.QuillModule, // RS 06JAN2025 Initializes the QuillModule with default settings for integrating the Quill editor.
11100
+ MenuComponent,
11101
+ FormComponent], imports: [i1$2.QuillModule, // RS 06JAN2025 Initializes the QuillModule with default settings for integrating the Quill editor.
11081
11102
  CustomRichTextComponent,
11082
11103
  CommonModule, FormsModule,
11083
11104
  // BrowserModule,
@@ -11103,7 +11124,8 @@ class NxtAppModule {
11103
11124
  I18nComponent,
11104
11125
  ElementComponent,
11105
11126
  PropertiesComponent,
11106
- MenuComponent
11127
+ MenuComponent,
11128
+ FormComponent
11107
11129
  // CustomRichTextComponent
11108
11130
  ] });
11109
11131
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NxtAppModule, providers: [
@@ -11240,7 +11262,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11240
11262
  //AP 22JAN2025 Added the below components
11241
11263
  ElementComponent,
11242
11264
  PropertiesComponent,
11243
- MenuComponent
11265
+ MenuComponent,
11266
+ FormComponent
11244
11267
  ],
11245
11268
  imports: [
11246
11269
  QuillModule.forRoot(), // RS 06JAN2025 Initializes the QuillModule with default settings for integrating the Quill editor.
@@ -11351,7 +11374,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11351
11374
  I18nComponent,
11352
11375
  ElementComponent,
11353
11376
  PropertiesComponent,
11354
- MenuComponent
11377
+ MenuComponent,
11378
+ FormComponent
11355
11379
  // CustomRichTextComponent
11356
11380
  ],
11357
11381
  providers: [
@@ -11369,10 +11393,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11369
11393
  /*
11370
11394
  * Public API Surface of nxt-app
11371
11395
  */
11396
+ // export * from './lib/style.css';
11372
11397
 
11373
11398
  /**
11374
11399
  * Generated bundle index. Do not edit.
11375
11400
  */
11376
11401
 
11377
- export { BookletComponent, ElementComponent, I18nComponent, I18nPipe, MenuComponent, NxtAppComponent, NxtAppModule, NxtAppService, PropertiesComponent, QuestionbookComponent, QuestionnaireComponent, SalesforceService, SummaryPageComponent };
11402
+ export { BookletComponent, ElementComponent, FormComponent, I18nComponent, I18nPipe, MenuComponent, NxtAppComponent, NxtAppModule, NxtAppService, PropertiesComponent, QuestionbookComponent, QuestionnaireComponent, SalesforceService, SummaryPageComponent };
11378
11403
  //# sourceMappingURL=rangertechnologies-ngnxt.mjs.map