@rangertechnologies/ngnxt 2.1.87 → 2.1.88
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.
- package/esm2022/lib/nxt-app.module.mjs +10 -5
- package/esm2022/lib/pages/builder/element/element.component.mjs +1 -4
- package/esm2022/lib/pages/builder/form/form.component.mjs +34 -0
- package/esm2022/lib/pages/builder/properties/properties.component.mjs +1 -4
- package/esm2022/lib/services/form-builder.service.mjs +6 -10
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/rangertechnologies-ngnxt.mjs +45 -20
- package/fesm2022/rangertechnologies-ngnxt.mjs.map +1 -1
- package/lib/nxt-app.module.d.ts +16 -15
- package/lib/pages/builder/form/form.component.d.ts +11 -0
- package/package.json +4 -1
- package/public-api.d.ts +1 -0
- package/rangertechnologies-ngnxt-2.1.88.tgz +0 -0
- package/src/lib/style.css +1819 -0
- package/rangertechnologies-ngnxt-2.1.87.tgz +0 -0
|
@@ -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
|
});
|
|
@@ -11077,7 +11067,8 @@ class NxtAppModule {
|
|
|
11077
11067
|
//AP 22JAN2025 Added the below components
|
|
11078
11068
|
ElementComponent,
|
|
11079
11069
|
PropertiesComponent,
|
|
11080
|
-
MenuComponent
|
|
11070
|
+
MenuComponent,
|
|
11071
|
+
FormComponent], imports: [i1$2.QuillModule, // RS 06JAN2025 Initializes the QuillModule with default settings for integrating the Quill editor.
|
|
11081
11072
|
CustomRichTextComponent,
|
|
11082
11073
|
CommonModule, FormsModule,
|
|
11083
11074
|
// BrowserModule,
|
|
@@ -11103,7 +11094,8 @@ class NxtAppModule {
|
|
|
11103
11094
|
I18nComponent,
|
|
11104
11095
|
ElementComponent,
|
|
11105
11096
|
PropertiesComponent,
|
|
11106
|
-
MenuComponent
|
|
11097
|
+
MenuComponent,
|
|
11098
|
+
FormComponent
|
|
11107
11099
|
// CustomRichTextComponent
|
|
11108
11100
|
] });
|
|
11109
11101
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NxtAppModule, providers: [
|
|
@@ -11240,7 +11232,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
11240
11232
|
//AP 22JAN2025 Added the below components
|
|
11241
11233
|
ElementComponent,
|
|
11242
11234
|
PropertiesComponent,
|
|
11243
|
-
MenuComponent
|
|
11235
|
+
MenuComponent,
|
|
11236
|
+
FormComponent
|
|
11244
11237
|
],
|
|
11245
11238
|
imports: [
|
|
11246
11239
|
QuillModule.forRoot(), // RS 06JAN2025 Initializes the QuillModule with default settings for integrating the Quill editor.
|
|
@@ -11351,7 +11344,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
11351
11344
|
I18nComponent,
|
|
11352
11345
|
ElementComponent,
|
|
11353
11346
|
PropertiesComponent,
|
|
11354
|
-
MenuComponent
|
|
11347
|
+
MenuComponent,
|
|
11348
|
+
FormComponent
|
|
11355
11349
|
// CustomRichTextComponent
|
|
11356
11350
|
],
|
|
11357
11351
|
providers: [
|
|
@@ -11366,13 +11360,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
11366
11360
|
}]
|
|
11367
11361
|
}] });
|
|
11368
11362
|
|
|
11363
|
+
// AP-29JAN25
|
|
11364
|
+
class FormComponent {
|
|
11365
|
+
// Input data for app-element
|
|
11366
|
+
// bookletJson: any = {}; // Replace with your actual JSON object
|
|
11367
|
+
// bookletId: string = '123'; // Replace with your actual booklet ID
|
|
11368
|
+
bookletJSON;
|
|
11369
|
+
bookletId;
|
|
11370
|
+
formButtonHandler = new EventEmitter();
|
|
11371
|
+
// Input data for app-properties
|
|
11372
|
+
// api: string = 'https://example.com/api'; // Replace with your actual API endpoint
|
|
11373
|
+
// apiMethod: string = 'GET'; // Replace with your actual API method
|
|
11374
|
+
selectedElementType = 'button'; // Replace with the default selected element type
|
|
11375
|
+
// Event handler for app-element
|
|
11376
|
+
formButtonHandlerClick(event) {
|
|
11377
|
+
this.formButtonHandler.emit(event);
|
|
11378
|
+
}
|
|
11379
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11380
|
+
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"] }] });
|
|
11381
|
+
}
|
|
11382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormComponent, decorators: [{
|
|
11383
|
+
type: Component,
|
|
11384
|
+
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 " }]
|
|
11385
|
+
}], propDecorators: { bookletJSON: [{
|
|
11386
|
+
type: Input
|
|
11387
|
+
}], bookletId: [{
|
|
11388
|
+
type: Input
|
|
11389
|
+
}], formButtonHandler: [{
|
|
11390
|
+
type: Output
|
|
11391
|
+
}] } });
|
|
11392
|
+
|
|
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
|