@snteam/amplify-angular-core 1.0.13 → 1.0.15

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.
@@ -27,6 +27,10 @@ import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDia
27
27
  import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
28
28
  import * as i4$2 from '@angular/router';
29
29
  import { ActivatedRoute, Router } from '@angular/router';
30
+ import * as i1$1 from '@angular/material/expansion';
31
+ import { MatExpansionModule } from '@angular/material/expansion';
32
+ import * as i3$4 from '@angular/material/card';
33
+ import { MatCardModule } from '@angular/material/card';
30
34
 
31
35
  class AmplifyAngularCore {
32
36
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AmplifyAngularCore, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1397,6 +1401,7 @@ class DynamicFormComponent {
1397
1401
  hideRelationships = false;
1398
1402
  hideSaveButton = false;
1399
1403
  amplifyOutputs; // Add amplify outputs input
1404
+ formViewId; // Add FormView ID input
1400
1405
  itemOutput = new EventEmitter();
1401
1406
  submitOutput = new EventEmitter();
1402
1407
  formLoaded = new EventEmitter();
@@ -1406,6 +1411,8 @@ class DynamicFormComponent {
1406
1411
  payLoad;
1407
1412
  form;
1408
1413
  questions = [];
1414
+ formView; // Store the FormView data
1415
+ formViewFields = []; // Store the FormViewField data
1409
1416
  materialInputs = [];
1410
1417
  switchInputs = [];
1411
1418
  formGroupInputs = ['formgroup'];
@@ -1431,22 +1438,62 @@ class DynamicFormComponent {
1431
1438
  console.log('DynamicFormComponent route params:', params);
1432
1439
  const routeModel = params.get('model');
1433
1440
  const routeId = params.get('id');
1434
- console.log('DynamicFormComponent routeModel:', routeModel, 'routeId:', routeId);
1441
+ const routeFormViewId = params.get('formViewId'); // Check for formViewId in route
1442
+ console.log('DynamicFormComponent routeModel:', routeModel, 'routeId:', routeId, 'routeFormViewId:', routeFormViewId);
1435
1443
  this.mdl = routeModel || this.model;
1436
1444
  this.id = routeId || this.itemId;
1437
- console.log('DynamicFormComponent final mdl:', this.mdl, 'id:', this.id);
1438
- if (this.id == '-1' || !this.id) {
1439
- console.log('DynamicFormComponent calling setQuestionsAndForm for new item');
1440
- this.setQuestionsAndForm();
1445
+ this.formViewId = routeFormViewId || this.formViewId;
1446
+ console.log('DynamicFormComponent final mdl:', this.mdl, 'id:', this.id, 'formViewId:', this.formViewId);
1447
+ // If we have a formViewId, load the FormView first
1448
+ if (this.formViewId) {
1449
+ this.loadFormView();
1441
1450
  }
1442
1451
  else {
1443
- console.log('DynamicFormComponent calling getItem for existing item');
1444
- this.getItem();
1452
+ // Original behavior - load all model fields
1453
+ if (this.id == '-1' || !this.id) {
1454
+ console.log('DynamicFormComponent calling setQuestionsAndForm for new item');
1455
+ this.setQuestionsAndForm();
1456
+ }
1457
+ else {
1458
+ console.log('DynamicFormComponent calling getItem for existing item');
1459
+ this.getItem();
1460
+ }
1445
1461
  }
1446
1462
  });
1447
1463
  }
1448
- setFormBuilderForm() {
1449
- this.form = this.afb.buildFormForModel(this.mdl);
1464
+ async loadFormView() {
1465
+ if (!this.formViewId)
1466
+ return;
1467
+ try {
1468
+ console.log('DynamicFormComponent: Loading FormView:', this.formViewId);
1469
+ // Get the FormView with its fields
1470
+ const { data: formView } = await this.ams.getItemForModel('FormView', this.formViewId);
1471
+ this.formView = formView;
1472
+ if (this.formView && this.formView.tableConfigId) {
1473
+ this.mdl = 'TableConfig'; // Set the model based on FormView's table
1474
+ // Get the FormViewFields for this FormView
1475
+ const formViewFields = await this.ams.listItemsForModel('FormViewField');
1476
+ if (formViewFields) {
1477
+ formViewFields.subscribe({
1478
+ next: ({ items }) => {
1479
+ this.formViewFields = items.filter((field) => field.formViewId === this.formViewId)
1480
+ .sort((a, b) => (a.order || 0) - (b.order || 0));
1481
+ console.log('DynamicFormComponent: FormViewFields loaded:', this.formViewFields);
1482
+ // Now proceed with form setup
1483
+ if (this.id == '-1' || !this.id) {
1484
+ this.setQuestionsAndForm();
1485
+ }
1486
+ else {
1487
+ this.getItem();
1488
+ }
1489
+ }
1490
+ });
1491
+ }
1492
+ }
1493
+ }
1494
+ catch (error) {
1495
+ console.error('DynamicFormComponent: Error loading FormView:', error);
1496
+ }
1450
1497
  }
1451
1498
  async getItem() {
1452
1499
  const { data: item } = await this.ams.getItemForModel(this.mdl, this.id);
@@ -1462,8 +1509,16 @@ class DynamicFormComponent {
1462
1509
  if (!this.questions || this.questions.length == 0) {
1463
1510
  console.log('DynamicFormComponent: Getting questions for model:', this.mdl);
1464
1511
  try {
1465
- this.questions = this.qcs.getQuestionsForModelFields(this.mdl);
1466
- console.log('DynamicFormComponent: Questions received:', this.questions);
1512
+ if (this.formViewFields && this.formViewFields.length > 0) {
1513
+ // Use FormView fields to generate questions
1514
+ this.questions = this.getQuestionsFromFormViewFields();
1515
+ console.log('DynamicFormComponent: Questions from FormView received:', this.questions);
1516
+ }
1517
+ else {
1518
+ // Original behavior - use all model fields
1519
+ this.questions = this.qcs.getQuestionsForModelFields(this.mdl);
1520
+ console.log('DynamicFormComponent: Questions from model received:', this.questions);
1521
+ }
1467
1522
  }
1468
1523
  catch (error) {
1469
1524
  console.error('DynamicFormComponent: Error getting questions for model:', this.mdl, error);
@@ -1490,6 +1545,29 @@ class DynamicFormComponent {
1490
1545
  this.formLoaded.emit(this.form);
1491
1546
  console.log('this.item', this.item);
1492
1547
  }
1548
+ getQuestionsFromFormViewFields() {
1549
+ const questions = [];
1550
+ for (const formViewField of this.formViewFields) {
1551
+ // Create a mock field object that matches the structure expected by QuestionControlService
1552
+ const mockFieldObj = {
1553
+ name: formViewField.fieldName,
1554
+ type: formViewField.fieldType,
1555
+ isRequired: formViewField.required || false,
1556
+ attributes: []
1557
+ };
1558
+ const question = this.qcs.getFieldForFieldObj(mockFieldObj, this.mdl);
1559
+ if (question) {
1560
+ // Override the label if a custom displayLabel is provided
1561
+ if (formViewField.displayLabel) {
1562
+ question.label = formViewField.displayLabel;
1563
+ }
1564
+ // Set required status from FormViewField
1565
+ question.required = formViewField.required || false;
1566
+ questions.push(question);
1567
+ }
1568
+ }
1569
+ return questions;
1570
+ }
1493
1571
  setQuestionValueFromItem(question, item) {
1494
1572
  if (!item)
1495
1573
  item = this.item;
@@ -1718,7 +1796,7 @@ class DynamicFormComponent {
1718
1796
  return true;
1719
1797
  }
1720
1798
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DynamicFormComponent, deps: [{ token: QuestionControlService }, { token: AmplifyFormBuilderService }, { token: i3$1.Location }, { token: i4$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1721
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DynamicFormComponent, isStandalone: true, selector: "snteam-dynamic-form", inputs: { model: "model", itemId: "itemId", valueMap: "valueMap", hideRelationships: "hideRelationships", hideSaveButton: "hideSaveButton", amplifyOutputs: "amplifyOutputs" }, outputs: { itemOutput: "itemOutput", submitOutput: "submitOutput", formLoaded: "formLoaded" }, ngImport: i0, template: "<div class=\"dynamic-form-holder\">\n @if (form && questions) {\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"form\">\n @for (question of questions; track question) {\n @if (this.switchInputs.includes(question.controlType) || this.materialInputs.includes(question.controlType) || this.refInputs.includes(question.controlType)) {\n <div class=\"form-row\">\n <snteam-dynamic-form-question [question]=\"question\" [formGroup]=\"form\"></snteam-dynamic-form-question>\n </div>\n }\n @if (this.formGroupInputs.includes(question.controlType)) {\n <div class=\"group-row\">\n <snteam-dynamic-form-group [question]=\"question\" [formGroup]=\"form\" [formGroupName]=\"question.key\"></snteam-dynamic-form-group>\n </div>\n }\n }\n @if (!hideSaveButton) {\n <div class=\"form-row\">\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"!form.valid\">Save</button>\n </div>\n }\n </form>\n } @else {\n <div class=\"loading\">Loading...</div>\n }\n\n @if(item && !hideRelationships){\n <div class=\"relationship-holder\">\n <snteam-record-relationships [model]=\"mdl\" [id]=\"id\" [item]=\"item\" [amplifyOutputs]=\"outputs\"></snteam-record-relationships>\n </div>\n }\n</div>", styles: [".dynamic-form-holder{padding:20px;width:100%;display:flex;justify-content:space-between;gap:20px}form{width:100%;flex-basis:40%}.relationship-holder{flex-basis:40%}.full-width{width:100%}.form-row,.group-row{margin-top:20px}.loading{padding:20px;text-align:center;color:#666}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DynamicFormQuestionComponent, selector: "snteam-dynamic-form-question", inputs: ["question", "formGroup"] }, { kind: "component", type: DynamicFormGroupComponent, selector: "snteam-dynamic-form-group", inputs: ["formGroupName", "question", "formGroup"] }, { kind: "component", type: RecordRelationshipsComponent, selector: "snteam-record-relationships", inputs: ["model", "id", "item", "amplifyOutputs"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatSnackBarModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }] });
1799
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DynamicFormComponent, isStandalone: true, selector: "snteam-dynamic-form", inputs: { model: "model", itemId: "itemId", valueMap: "valueMap", hideRelationships: "hideRelationships", hideSaveButton: "hideSaveButton", amplifyOutputs: "amplifyOutputs", formViewId: "formViewId" }, outputs: { itemOutput: "itemOutput", submitOutput: "submitOutput", formLoaded: "formLoaded" }, ngImport: i0, template: "<div class=\"dynamic-form-holder\">\n @if (form && questions) {\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"form\">\n @for (question of questions; track question) {\n @if (this.switchInputs.includes(question.controlType) || this.materialInputs.includes(question.controlType) || this.refInputs.includes(question.controlType)) {\n <div class=\"form-row\">\n <snteam-dynamic-form-question [question]=\"question\" [formGroup]=\"form\"></snteam-dynamic-form-question>\n </div>\n }\n @if (this.formGroupInputs.includes(question.controlType)) {\n <div class=\"group-row\">\n <snteam-dynamic-form-group [question]=\"question\" [formGroup]=\"form\" [formGroupName]=\"question.key\"></snteam-dynamic-form-group>\n </div>\n }\n }\n @if (!hideSaveButton) {\n <div class=\"form-row\">\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"!form.valid\">Save</button>\n </div>\n }\n </form>\n } @else {\n <div class=\"loading\">Loading...</div>\n }\n\n @if(item && !hideRelationships){\n <div class=\"relationship-holder\">\n <snteam-record-relationships [model]=\"mdl\" [id]=\"id\" [item]=\"item\" [amplifyOutputs]=\"outputs\"></snteam-record-relationships>\n </div>\n }\n</div>", styles: [".dynamic-form-holder{padding:20px;width:100%;display:flex;justify-content:space-between;gap:20px}form{width:100%;flex-basis:40%}.relationship-holder{flex-basis:40%}.full-width{width:100%}.form-row,.group-row{margin-top:20px}.loading{padding:20px;text-align:center;color:#666}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DynamicFormQuestionComponent, selector: "snteam-dynamic-form-question", inputs: ["question", "formGroup"] }, { kind: "component", type: DynamicFormGroupComponent, selector: "snteam-dynamic-form-group", inputs: ["formGroupName", "question", "formGroup"] }, { kind: "component", type: RecordRelationshipsComponent, selector: "snteam-record-relationships", inputs: ["model", "id", "item", "amplifyOutputs"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatSnackBarModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }] });
1722
1800
  }
1723
1801
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DynamicFormComponent, decorators: [{
1724
1802
  type: Component,
@@ -1748,6 +1826,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1748
1826
  type: Input
1749
1827
  }], amplifyOutputs: [{
1750
1828
  type: Input
1829
+ }], formViewId: [{
1830
+ type: Input
1751
1831
  }], itemOutput: [{
1752
1832
  type: Output
1753
1833
  }], submitOutput: [{
@@ -1852,6 +1932,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1852
1932
  type: Output
1853
1933
  }] } });
1854
1934
 
1935
+ class ConfigurationsComponent {
1936
+ amplifyOutputs;
1937
+ qcs = inject(QuestionControlService);
1938
+ // Track which models exist in the schema
1939
+ hasTableConfig = false;
1940
+ hasFormView = false;
1941
+ hasListView = false;
1942
+ ngOnInit() {
1943
+ this.checkAvailableModels();
1944
+ }
1945
+ get outputs() {
1946
+ return this.amplifyOutputs || this.qcs.outputs;
1947
+ }
1948
+ checkAvailableModels() {
1949
+ if (!this.outputs || !this.outputs.data || !this.outputs.data.model_introspection) {
1950
+ console.warn('ConfigurationsComponent: No model introspection data available');
1951
+ return;
1952
+ }
1953
+ const models = this.outputs.data.model_introspection.models;
1954
+ console.log('ConfigurationsComponent: Available models:', Object.keys(models));
1955
+ this.hasTableConfig = 'TableConfig' in models;
1956
+ this.hasFormView = 'FormView' in models;
1957
+ this.hasListView = 'ListView' in models;
1958
+ console.log('ConfigurationsComponent: Model availability:', {
1959
+ TableConfig: this.hasTableConfig,
1960
+ FormView: this.hasFormView,
1961
+ ListView: this.hasListView
1962
+ });
1963
+ }
1964
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfigurationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1965
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ConfigurationsComponent, isStandalone: true, selector: "snteam-configurations", inputs: { amplifyOutputs: "amplifyOutputs" }, ngImport: i0, template: "<div class=\"configurations-container\">\n <h2>System Configurations</h2>\n \n <mat-accordion multi=\"true\">\n \n <!-- Table Configs Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>table_chart</mat-icon>\n <span class=\"panel-title\">Table Configs</span>\n </mat-panel-title>\n <mat-panel-description>\n Manage table configurations and settings\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasTableConfig) {\n <snteam-list-view \n [modelName]=\"'TableConfig'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>TableConfig Model Not Found</h3>\n <p>The TableConfig model is not available in your Amplify schema. Please add it to your data model to manage table configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n <!-- Form Views Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>dynamic_form</mat-icon>\n <span class=\"panel-title\">Form Views</span>\n </mat-panel-title>\n <mat-panel-description>\n Configure custom form layouts and field selections\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasFormView) {\n <snteam-list-view \n [modelName]=\"'FormView'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>FormView Model Not Found</h3>\n <p>The FormView model is not available in your Amplify schema. Please add it to your data model to create custom form configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n <!-- List Views Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>view_list</mat-icon>\n <span class=\"panel-title\">List Views</span>\n </mat-panel-title>\n <mat-panel-description>\n Customize list displays and column configurations\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasListView) {\n <snteam-list-view \n [modelName]=\"'ListView'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>ListView Model Not Found</h3>\n <p>The ListView model is not available in your Amplify schema. Please add it to your data model to create custom list view configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n </mat-accordion>\n</div>", styles: [".configurations-container{padding:20px;max-width:1200px;margin:0 auto}.configurations-container h2{margin-bottom:24px;color:#333;font-weight:500}.mat-expansion-panel{margin-bottom:16px;border-radius:8px;box-shadow:0 2px 4px #0000001a}.mat-expansion-panel-header{padding:16px 24px}.panel-title{margin-left:12px;font-weight:500;font-size:16px}.mat-panel-description{color:#666;font-size:14px}.panel-content{padding:16px 24px 24px;background-color:#fafafa}.error-card{text-align:center;padding:24px;background-color:#fff;border:2px dashed #ddd;border-radius:8px}.error-card mat-card-content{padding:0}.error-icon{font-size:48px;width:48px;height:48px;color:#ff9800;margin-bottom:16px}.error-card h3{margin:0 0 12px;color:#333;font-weight:500}.error-card p{color:#666;line-height:1.5;max-width:500px;margin:0 auto 20px}.help-button{margin-top:8px}.help-button mat-icon{margin-right:8px}@media (max-width: 768px){.configurations-container{padding:16px}.panel-content{padding:12px 16px 16px}.error-card{padding:16px}.error-icon{font-size:36px;width:36px;height:36px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i1$1.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i1$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i1$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i1$1.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i1$1.MatExpansionPanelDescription, selector: "mat-panel-description" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$4.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: ListViewComponent, selector: "snteam-list-view", inputs: ["modelName", "customItemTemplate", "hideNewButton", "title", "useRouter"], outputs: ["itemClick", "newClick", "itemsLoaded"] }] });
1966
+ }
1967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ConfigurationsComponent, decorators: [{
1968
+ type: Component,
1969
+ args: [{ selector: 'snteam-configurations', standalone: true, imports: [
1970
+ CommonModule,
1971
+ MatExpansionModule,
1972
+ MatIconModule,
1973
+ MatCardModule,
1974
+ MatButtonModule,
1975
+ ListViewComponent
1976
+ ], template: "<div class=\"configurations-container\">\n <h2>System Configurations</h2>\n \n <mat-accordion multi=\"true\">\n \n <!-- Table Configs Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>table_chart</mat-icon>\n <span class=\"panel-title\">Table Configs</span>\n </mat-panel-title>\n <mat-panel-description>\n Manage table configurations and settings\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasTableConfig) {\n <snteam-list-view \n [modelName]=\"'TableConfig'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>TableConfig Model Not Found</h3>\n <p>The TableConfig model is not available in your Amplify schema. Please add it to your data model to manage table configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n <!-- Form Views Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>dynamic_form</mat-icon>\n <span class=\"panel-title\">Form Views</span>\n </mat-panel-title>\n <mat-panel-description>\n Configure custom form layouts and field selections\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasFormView) {\n <snteam-list-view \n [modelName]=\"'FormView'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>FormView Model Not Found</h3>\n <p>The FormView model is not available in your Amplify schema. Please add it to your data model to create custom form configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n <!-- List Views Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>view_list</mat-icon>\n <span class=\"panel-title\">List Views</span>\n </mat-panel-title>\n <mat-panel-description>\n Customize list displays and column configurations\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasListView) {\n <snteam-list-view \n [modelName]=\"'ListView'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>ListView Model Not Found</h3>\n <p>The ListView model is not available in your Amplify schema. Please add it to your data model to create custom list view configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n </mat-accordion>\n</div>", styles: [".configurations-container{padding:20px;max-width:1200px;margin:0 auto}.configurations-container h2{margin-bottom:24px;color:#333;font-weight:500}.mat-expansion-panel{margin-bottom:16px;border-radius:8px;box-shadow:0 2px 4px #0000001a}.mat-expansion-panel-header{padding:16px 24px}.panel-title{margin-left:12px;font-weight:500;font-size:16px}.mat-panel-description{color:#666;font-size:14px}.panel-content{padding:16px 24px 24px;background-color:#fafafa}.error-card{text-align:center;padding:24px;background-color:#fff;border:2px dashed #ddd;border-radius:8px}.error-card mat-card-content{padding:0}.error-icon{font-size:48px;width:48px;height:48px;color:#ff9800;margin-bottom:16px}.error-card h3{margin:0 0 12px;color:#333;font-weight:500}.error-card p{color:#666;line-height:1.5;max-width:500px;margin:0 auto 20px}.help-button{margin-top:8px}.help-button mat-icon{margin-right:8px}@media (max-width: 768px){.configurations-container{padding:16px}.panel-content{padding:12px 16px 16px}.error-card{padding:16px}.error-icon{font-size:36px;width:36px;height:36px}}\n"] }]
1977
+ }], propDecorators: { amplifyOutputs: [{
1978
+ type: Input
1979
+ }] } });
1980
+
1855
1981
  /*
1856
1982
  * Public API Surface of @snteam/amplify-angular-core
1857
1983
  */
@@ -1861,5 +1987,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
1861
1987
  * Generated bundle index. Do not edit.
1862
1988
  */
1863
1989
 
1864
- export { AddRelationshipDialogComponent, AmplifyAngularCore, AmplifyFormBuilderService, AmplifyModelService, AsyncDropdownQuestion, DatePickerQuestion, DateTimePickerQuestion, DropdownQuestion, DynamicFormComponent, DynamicFormGroupComponent, DynamicFormQuestionComponent, DynamicNestedFormQuestionComponent, DynamicRelationshipBuilderComponent, EmailQuestion, FormGroupQuestion, ListViewComponent, MyErrorStateMatcher, NumberQuestion, PhoneQuestion, QuestionBase, QuestionControlService, RecordRelationshipsComponent, SliderQuestion, TextboxQuestion, TimePickerQuestion, ValToTitlePipe, phoneNumberValidator };
1990
+ export { AddRelationshipDialogComponent, AmplifyAngularCore, AmplifyFormBuilderService, AmplifyModelService, AsyncDropdownQuestion, ConfigurationsComponent, DatePickerQuestion, DateTimePickerQuestion, DropdownQuestion, DynamicFormComponent, DynamicFormGroupComponent, DynamicFormQuestionComponent, DynamicNestedFormQuestionComponent, DynamicRelationshipBuilderComponent, EmailQuestion, FormGroupQuestion, ListViewComponent, MyErrorStateMatcher, NumberQuestion, PhoneQuestion, QuestionBase, QuestionControlService, RecordRelationshipsComponent, SliderQuestion, TextboxQuestion, TimePickerQuestion, ValToTitlePipe, phoneNumberValidator };
1865
1991
  //# sourceMappingURL=snteam-amplify-angular-core.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"snteam-amplify-angular-core.mjs","sources":["../../../projects/amplify-angular-core/src/lib/amplify-angular-core.ts","../../../projects/amplify-angular-core/src/lib/services/amplify-form-builder.service.ts","../../../projects/amplify-angular-core/src/lib/pipes/val-to-title.pipe.ts","../../../projects/amplify-angular-core/src/lib/services/amplify-model.service.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form-question/dynamic-form-question.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form-question/dynamic-form-question.component.html","../../../projects/amplify-angular-core/src/lib/components/dynamic-nested-form-question/dynamic-nested-form-question.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-nested-form-question/dynamic-nested-form-question.component.html","../../../projects/amplify-angular-core/src/lib/components/dynamic-form-group/dynamic-form-group.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form-group/dynamic-form-group.component.html","../../../projects/amplify-angular-core/src/lib/components/add-relationship-dialog/add-relationship-dialog.component.ts","../../../projects/amplify-angular-core/src/lib/components/add-relationship-dialog/add-relationship-dialog.component.html","../../../projects/amplify-angular-core/src/lib/components/dynamic-relationship-builder/dynamic-relationship-builder.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-relationship-builder/dynamic-relationship-builder.component.html","../../../projects/amplify-angular-core/src/lib/components/record-relationships/record-relationships.component.ts","../../../projects/amplify-angular-core/src/lib/components/record-relationships/record-relationships.component.html","../../../projects/amplify-angular-core/src/lib/classes/questions.ts","../../../projects/amplify-angular-core/src/lib/classes/validators.ts","../../../projects/amplify-angular-core/src/lib/services/question-control.service.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form/dynamic-form.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form/dynamic-form.component.html","../../../projects/amplify-angular-core/src/lib/components/list-view/list-view.component.ts","../../../projects/amplify-angular-core/src/lib/components/list-view/list-view.component.html","../../../projects/amplify-angular-core/src/public-api.ts","../../../projects/amplify-angular-core/src/snteam-amplify-angular-core.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'snteam-amplify-angular-core',\n imports: [],\n template: `\n <p>\n amplify-angular-core works!\n </p>\n `,\n styles: ``,\n})\nexport class AmplifyAngularCore {\n\n}\n","import { Injectable } from '@angular/core';\nimport { FormBuilder, FormGroup, FormControl, Validators, AbstractControl } from '@angular/forms';\nimport {\n QuestionBase,\n TextboxQuestion,\n NumberQuestion,\n DatePickerQuestion,\n DropdownQuestion,\n FormGroupQuestion\n} from '../classes/questions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AmplifyFormBuilderService {\n\n skipFields: string[] = ['createdAt', 'updatedAt'];\n\n materialInputs: string[] = [\n 'textbox',\n 'int',\n 'number',\n 'color',\n 'email',\n 'month',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week'\n ];\n \n switchInputs: string[] = ['dropdown'];\n refInputs: string[] = ['async-dropdown'];\n formGroupInputs: string[] = ['formgroup']; // we skip these and handle them in the form\n datePickerInputs = ['date', 'datepicker', 'datetime-local'];\n\n private outputs: any;\n\n constructor(private fb: FormBuilder) { }\n\n /**\n * Initialize the service with Amplify outputs\n * This should be called by the consuming application after Amplify.configure()\n */\n initializeOutputs(outputs: any) {\n this.outputs = outputs;\n }\n\n getInputTypeFromFieldType(type: string): string | undefined {\n if (this.materialInputs.includes(type)) return 'materialInputs';\n if (this.switchInputs.includes(type)) return 'switchInputs';\n if (this.refInputs.includes(type)) return 'refInputs';\n if (this.formGroupInputs.includes(type)) return 'formGroupInputs';\n if (this.datePickerInputs.includes(type)) return 'datePickerInputs';\n\n return undefined;\n }\n\n getMaterialInputs(): string[] {\n return this.materialInputs;\n }\n\n getSwitchInputs(): string[] {\n return this.switchInputs;\n }\n\n getRefInputs(): string[] {\n return this.refInputs;\n }\n\n getErrorStrForControl(ctrl: AbstractControl, label?: string): string {\n const errorMap: { [key: string]: string } = {\n email: 'Please enter a valid email address',\n invalidPhoneNumber: 'Please enter a phone number in (111) 222-3333 format.',\n required: (label || 'This field') + ' is required.'\n };\n\n if (!ctrl.errors) return '';\n \n let errStrs: string[] = [];\n let keys = Object.keys(ctrl.errors);\n \n for (let err of keys) {\n if (errorMap[err]) {\n errStrs.push(errorMap[err]);\n } else {\n errStrs.push(`Invalid ${err}`);\n }\n }\n \n return errStrs.join(', ');\n }\n\n /** Shared Methods for FormControls **/\n getPathFromRoot(searchKey: string, controls: any, pathArr?: string[]): string {\n if (!pathArr) pathArr = [];\n\n const isInControls = Object.keys(controls).find(name => name === searchKey);\n if (isInControls) {\n pathArr.push(searchKey);\n return pathArr.join('.');\n } else {\n const tempArr: string[] = [];\n const entries = Object.entries(controls);\n \n for (let e of entries) {\n let controlName = e[0];\n let controlObj = e[1];\n \n if (controlObj instanceof FormGroup) {\n console.log('getPathFromRoot controlName', typeof controlName, controlName, 'controlObj', controlObj);\n tempArr.push(controlName);\n console.log('getPathFromRoot', controlName, 'is a FormGroup in path tempArr', tempArr);\n \n const childControls = (controls[controlName] as FormGroup).controls;\n console.log('getPathFromRoot childControls', childControls);\n \n let childPath = this.getPathFromRoot(searchKey, childControls, [...pathArr, ...tempArr]);\n if (childPath !== '') return childPath;\n }\n }\n return '';\n }\n }\n\n /** FormBuilder Methods **/\n\n private _getFormGroupFromFieldsArr(fields: any): FormGroup {\n if (!this.outputs) {\n console.error('AmplifyFormBuilderService: Outputs not initialized. Call initializeOutputs() first.');\n return this.fb.group({});\n }\n\n console.log('_getFormGroupFromFieldsArr fields', fields);\n const formGroup = this.fb.group({});\n const fieldsArr = Object.values(fields);\n \n fieldsArr.forEach((field: any) => {\n if (this.skipFields.indexOf(field.name) > -1) return;\n\n if (typeof field.type === 'object') {\n if (field.type.model) {\n formGroup.addControl(field.name, this._getControlForField(field));\n }\n if (field.type.nonModel) {\n formGroup.addControl(field.name, this._getGroupControlForNonModel(field));\n }\n } else {\n formGroup.addControl(field.name, this._getControlForField(field));\n }\n });\n \n return formGroup;\n }\n\n private _getGroupControlForNonModel(field: any): FormGroup {\n if (!this.outputs) {\n console.error('AmplifyFormBuilderService: Outputs not initialized. Call initializeOutputs() first.');\n return this.fb.group({});\n }\n\n const nonModel = field.type.nonModel;\n const fields = this.outputs.data.model_introspection.nonModels[nonModel as keyof typeof this.outputs.data.model_introspection.nonModels].fields;\n return this._getFormGroupFromFieldsArr(fields);\n }\n\n private _getControlForField(field: any): FormControl {\n const validators = field.required ? [Validators.required] : [];\n return new FormControl(field.value || '', validators);\n }\n\n buildFormForModel(model: string): FormGroup {\n if (!this.outputs) {\n console.error('AmplifyFormBuilderService: Outputs not initialized. Call initializeOutputs() first.');\n return this.fb.group({});\n }\n\n const config = this.outputs.data.model_introspection.models[model as keyof typeof this.outputs.data.model_introspection.models].fields;\n const formGroup = this._getFormGroupFromFieldsArr(config);\n return formGroup;\n }\n}","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'valToTitle',\n standalone: true\n})\nexport class ValToTitlePipe implements PipeTransform {\n\n transform(value: string): string {\n if (!value) {\n return '';\n }\n\n let fixed = value.replace(new RegExp('_', 'g'), ' ').split(' ')\n .map(w => w.length > 0 ? w[0].toUpperCase() + w.substring(1).toLowerCase() : '')\n .join(' ');\n\n return fixed;\n }\n}","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AmplifyModelService {\n\n private client: any;\n\n constructor() { \n // Client will be initialized when Amplify is configured by the consuming application\n }\n\n /**\n * Initialize the service with the Amplify client\n * This should be called by the consuming application after Amplify.configure()\n */\n initializeClient<T>(schema?: T) {\n // Dynamic import to avoid build-time dependency\n try {\n // This will be provided by the consuming application\n this.client = (globalThis as any).amplifyClient;\n if (!this.client) {\n console.warn('AmplifyModelService: No client provided. Call with generateClient result.');\n }\n } catch (error) {\n console.error('Failed to initialize Amplify client:', error);\n }\n }\n\n /**\n * Set the client directly (for consuming applications)\n */\n setClient(client: any) {\n this.client = client;\n }\n\n getMenuLinksFromModels(outputs: any, config?: { skipModels?: string[] }): any[] {\n const defaultConfig = { skipModels: ['ServiceCustomer', 'ServiceProduct', 'Todo'] };\n const finalConfig = { ...defaultConfig, ...config };\n\n let pageButtons: any[] = [{ label: 'Home', route: '/' }];\n let models = outputs.data.model_introspection.models;\n\n Object.values(models).forEach((model: any) => {\n if (finalConfig.skipModels!.includes(model.name)) return;\n console.log('model', model);\n pageButtons.push({ label: model.name, route: '/list/' + model.name });\n });\n console.log('models', models);\n\n return pageButtons;\n }\n\n /**\n * TODO: Make this generate dynamically using refModel Names and types\n * TODO: Bring the refModel generation in here.\n * Edit this function with form fields...\n * \n * ... probably don't need this...\n */\n getEmptyObjectForModel(model: string): any {\n switch (model) {\n case 'Customer':\n return {\n name: '',\n contact: {},\n services: [],\n contact_preference: '',\n notes: [],\n };\n case 'Service':\n return {\n cost: 0.00,\n price: 0.00,\n customers: [],\n products: [],\n id: '',\n title: ''\n };\n default:\n return {};\n }\n }\n\n getRelationshipChoices(config: any, selectedOptions?: any[]): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let filter: any = {};\n /*if (selectedOptions){ //TODO: FILTER OUT SELECTED ITEMS\n filter = {id: {nin: [...selectedOptions]}};\n }*/\n console.log('getRelationshipChoices filter', filter);\n\n try {\n const modelName = config.partnerModelName;\n if (this.client.models[modelName]) {\n return this.client.models[modelName].observeQuery({ filter: filter });\n } else {\n console.error(`Model ${modelName} not found in client`);\n return null;\n }\n } catch (error) {\n console.error('error fetching ' + config.partnerModelName + 'items', error);\n return null;\n }\n }\n\n getRefChoices(config: any, itemId: string, selectedOptions?: any[]): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let filter = this.getRelationshipFilter(config, itemId, selectedOptions);\n console.log('getRefChoices getRelationshipFilter model', config.partnerModelName, 'filter', filter);\n \n try {\n const modelName = config.partnerModelName;\n if (this.client.models[modelName]) {\n return this.client.models[modelName].observeQuery({ filter: filter });\n } else {\n console.error(`Model ${modelName} not found in client`);\n return null;\n }\n } catch (error) {\n console.error('error fetching ' + config.partnerModelName + 'items', error);\n return null;\n }\n }\n\n async deleteRelationship(relModel: string, relId: string): Promise<any> {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let obj = { id: relId };\n \n if (this.client.models[relModel]) {\n return this.client.models[relModel].delete(obj);\n } else {\n console.error(`Relationship model ${relModel} not found in client`);\n return null;\n }\n }\n\n createRelationship(relModel: string, relItem: any): Promise<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n console.log('createRelationship starting for relModel', relModel, 'relItem', relItem);\n \n if (this.client.models[relModel]) {\n return this.client.models[relModel].create(relItem);\n } else {\n console.error(`Relationship model ${relModel} not found in client`);\n return null;\n }\n }\n\n getRelationshipFilter(config: any, baseId?: string, removeIds?: string[]): any {\n let condition: any = {};\n condition[config.associatedWith] = { eq: baseId };\n \n if (removeIds && removeIds.length > 0) {\n let conditionArr = [\n condition,\n { id: { ne: removeIds } }\n ];\n let andCondition = { and: conditionArr };\n console.log('getRelationshipFilter has andCondition', andCondition);\n return andCondition;\n } else {\n condition[config.associatedWith] = { eq: baseId };\n console.log('getRelationshipFilter config', config, 'condition', condition);\n return condition;\n }\n }\n\n getAmplifySelectionSet(config: any, baseId: string): any {\n switch (config.fieldName) {\n case 'service':\n return ['id', 'service.title', 'service.price', 'service.id'] as const;\n case 'customer':\n return ['id', 'customer.*'] as const;\n default: \n return [];\n }\n }\n\n setRelatedSub(config: any, baseId: string): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let filter = this.getRelationshipFilter(config, baseId);\n const modelName = config.relationshipModelName;\n \n if (this.client.models[modelName]) {\n return this.client.models[modelName].onCreate({ filter: filter });\n } else {\n console.error(`Relationship model ${modelName} not found in client`);\n return null;\n }\n }\n\n /**\n * @param config {object} - see dynamic-relationship-builder.component getDetailsForManyToMany() for example of building config\n */\n getRelatedItems(config: any, baseId: string): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let filter = this.getRelationshipFilter(config, baseId);\n let selectionSet = this.getAmplifySelectionSet(config, baseId);\n const modelName = config.relationshipModelName;\n\n if (this.client.models[modelName]) {\n return this.client.models[modelName].observeQuery({ \n filter: filter, \n selectionSet: [...selectionSet] \n });\n } else {\n console.error(`Relationship model ${modelName} not found in client`);\n return null;\n }\n }\n\n createItemPromise(model: string, payload: any): Promise<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n if (this.client.models[model]) {\n return this.client.models[model].create(payload);\n } else {\n console.error(`Model ${model} not found in client`);\n return null;\n }\n }\n\n updateItemForModel(model: string, payload: any): Promise<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n if (this.client.models[model]) {\n return this.client.models[model].update(payload);\n } else {\n console.error(`Model ${model} not found in client`);\n return null;\n }\n }\n\n getItemForModel(model: string, id: string): Promise<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n if (this.client.models[model]) {\n return this.client.models[model].get({ id: id });\n } else {\n console.error(`Model ${model} not found in client`);\n return null;\n }\n }\n\n listItemsForModel(model: string): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n console.log('this.listItems starting');\n \n try {\n if (this.client.models[model]) {\n return this.client.models[model].observeQuery();\n } else {\n console.error(`Model ${model} not found in client`);\n return null;\n }\n } catch (error) {\n console.error('error fetching ' + model, error);\n return null;\n }\n }\n}","import { ChangeDetectionStrategy, Component, Input, OnInit, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n FormControl,\n FormControlName,\n FormGroupDirective,\n NgForm,\n Validators,\n FormsModule,\n ReactiveFormsModule,\n FormGroup\n} from '@angular/forms';\nimport { AmplifyFormBuilderService } from '../../services/amplify-form-builder.service';\nimport { AmplifyModelService } from '../../services/amplify-model.service';\nimport { CommonModule } from '@angular/common';\nimport { ValToTitlePipe } from '../../pipes/val-to-title.pipe';\nimport { QuestionBase } from '../../classes/questions';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { provideNativeDateAdapter } from '@angular/material/core';\n\n\n@Component({\n selector: 'snteam-dynamic-form-question',\n standalone: true,\n providers: [provideNativeDateAdapter()],\n imports: [CommonModule, ReactiveFormsModule, ValToTitlePipe, MatFormFieldModule, MatInputModule, MatSelectModule, MatDatepickerModule],\n templateUrl: './dynamic-form-question.component.html',\n styleUrl: './dynamic-form-question.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DynamicFormQuestionComponent implements OnInit {\n @Input() question!: any; //QuestionBase<string>;\n @Input() formGroup!: FormGroup;\n\n formControlPath: string = '';\n materialInputs: string[] = [];\n switchInputs: string[] = [];\n refInputs: string[] = [];\n form!: any;\n ctrl!: any;\n items$!: Observable<any>\n\n afbs = inject(AmplifyFormBuilderService);\n\n constructor(private rootFormGroup: FormGroupDirective, private ams: AmplifyModelService) { }\n\n ngOnInit() {\n console.log('DynamicFormQuestionComponent question', this.question);\n this.form = this.rootFormGroup.control;\n this.ctrl = this.rootFormGroup.control.get(this.question.key);\n\n if (this.question.controlType == 'async-dropdown') {\n console.log('DynamicFormQuestionComponent has async-dropdown!');\n //this.items$ = this.ams.getRefChoices(this.question.targetModel);\n }\n }\n\n showError(): string {\n return this.afbs.getErrorStrForControl(this.ctrl, this.question.label);\n }\n}","<form [formGroup]=\"form\">\n @switch (afbs.getInputTypeFromFieldType(question.controlType)) {\n @case ('materialInputs'){\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <input matInput [formControlName]=\"question.key\" [id]=\"question.key\" [type]=\"question.type\">\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('datePickerInputs') {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <input matInput [matDatepicker]=\"picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('switchInputs') {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\">\n @for (opt of question.options; track opt) {\n <mat-option [value]=\"opt.key\">{{opt.value | valToTitle}}</mat-option>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('refInputs') {\n @if (question.multiple){\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\" multiple>\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title | valToTitle}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n @else {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\">\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title | valToTitle}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n }\n }\n</form>","import { Component, Input, OnInit, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n FormControl,\n FormControlName,\n FormGroupDirective,\n NgForm,\n Validators,\n FormsModule,\n ReactiveFormsModule,\n FormGroup\n} from '@angular/forms';\nimport { AmplifyFormBuilderService } from '../../services/amplify-form-builder.service';\nimport { CommonModule } from '@angular/common';\nimport { ValToTitlePipe } from '../../pipes/val-to-title.pipe';\nimport { QuestionBase } from '../../classes/questions';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport {MatSelectModule} from '@angular/material/select';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { provideNativeDateAdapter } from '@angular/material/core';\n\n\n@Component({\n selector: 'snteam-dynamic-nested-form-question',\n standalone: true,\n providers: [provideNativeDateAdapter()],\n imports: [CommonModule, ReactiveFormsModule, ValToTitlePipe, MatFormFieldModule, MatInputModule, MatSelectModule, MatDatepickerModule],\n templateUrl: './dynamic-nested-form-question.component.html',\n styleUrl: './dynamic-nested-form-question.component.css'\n})\nexport class DynamicNestedFormQuestionComponent {\n\n @Input() groupName!: string;\n @Input() question!: any; //QuestionBase<string>;\n @Input() formGroup!: FormGroup;\n\n formControlPath: string = '';\n form!: any;\n ctrl!: any;\n items$!: Observable<any>;\n afbs = inject(AmplifyFormBuilderService);\n\n\n constructor(private rootFormGroup: FormGroupDirective) {}\n\n ngOnInit() {\n console.log('DynamicNestedFormQuestionComponent question', this.question);\n var searchKey = this.groupName;\n var controls = this.rootFormGroup.control.controls;\n var pathStr = this.afbs.getPathFromRoot(searchKey, controls)//this.getPathFromRoot();\n this.form = this.rootFormGroup.control;\n this.formControlPath = pathStr + '.' + this.question.key;\n this.ctrl = this.rootFormGroup.control.get(this.formControlPath);\n if (this.question.key == 'services') console.log('DynamicNestedFormQuestionComponent has services');\n }\n\n showError():string {\n return this.afbs.getErrorStrForControl(this.ctrl, this.question.label);\n }\n}","<form autocomplete=\"off\" [formGroup]=\"formGroup\">\n <div [formGroupName]=\"groupName\">\n\n @switch (afbs.getInputTypeFromFieldType(question.controlType)) {\n @case ('materialInputs'){\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <input matInput [formControlName]=\"question.key\" [id]=\"question.key\" [type]=\"question.type\">\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('datePickerInputs') {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <input matInput [matDatepicker]=\"picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('switchInputs') {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\">\n @for (opt of question.options; track opt) {\n <mat-option [value]=\"opt.key\">{{opt.value | valToTitle}}</mat-option>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('refInputs') {\n @if (question.multiple){\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\" multiple>\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title | valToTitle}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n @else {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\">\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title | valToTitle}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n }\n }\n\n\n </div>\n</form>","import { Component, Input, OnInit } from '@angular/core';\nimport {\n FormControl,\n FormGroupDirective,\n NgForm,\n Validators,\n FormsModule,\n ReactiveFormsModule,\n FormGroup,\n AbstractControl\n} from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { ValToTitlePipe } from '../../pipes/val-to-title.pipe';\n\nimport { MatDividerModule } from '@angular/material/divider';\nimport { AmplifyFormBuilderService } from '../../services/amplify-form-builder.service';\nimport { DynamicNestedFormQuestionComponent } from '../dynamic-nested-form-question/dynamic-nested-form-question.component';\n\n@Component({\n selector: 'snteam-dynamic-form-group',\n standalone: true,\n imports: [CommonModule, ReactiveFormsModule,\n MatDividerModule,\n ValToTitlePipe, DynamicNestedFormQuestionComponent],\n templateUrl: './dynamic-form-group.component.html',\n styleUrl: './dynamic-form-group.component.css'\n})\nexport class DynamicFormGroupComponent {\n @Input() formGroupName!: string;\n @Input() question!: any; //QuestionBase<string>;\n @Input() formGroup!: FormGroup;\n\n materialInputs: string[] = [];\n switchInputs: string[] = [];\n refInputs: string[] = [];\n formGroupInputs: string[] = ['formgroup'];\n form!: any;\n ctrl!: any;\n\n constructor(private rootFormGroup: FormGroupDirective, private afbs: AmplifyFormBuilderService) { }\n\n getControlName(c: AbstractControl): string | null {\n if (c.parent) {\n const formGroup: any = c.parent.controls;\n return Object.keys(formGroup).find(name => c === formGroup[name]) || null;\n }\n return null;\n }\n\n getPathFromRoot(controls?: any, pathArr?: string[]): string {\n if (!controls) controls = this.rootFormGroup.control.controls;\n if (!pathArr) pathArr = [];\n\n var isInControls = Object.keys(controls).find(name => name === this.question.key);\n if (isInControls) {\n pathArr.push(this.question.key);\n return pathArr.join('.');\n } else {\n var tempArr: string[] = [];\n var entries = Object.entries(controls);\n for (let e of entries) {\n let controlName = e[0];\n let controlObj = e[1];\n if (controlObj instanceof FormGroup) {\n //if (tempArr.length > 10) return '';\n tempArr.push(controlName);\n var childControls = controls[controlName].controls;\n let childPath = this.getPathFromRoot(childControls, tempArr);\n if (childPath != '') return childPath;\n };\n }\n return '';\n }\n\n return '';\n\n }\n\n ngOnInit() {\n //console.log('DynamicFormGroupComponent key starting:', this.question.key);\n\n this.materialInputs = this.afbs.getMaterialInputs();\n this.switchInputs = this.afbs.getSwitchInputs();\n this.refInputs = this.afbs.getRefInputs();\n\n if (this.formGroupName) {\n var searchKey = this.question.key;\n var controls = this.rootFormGroup.control.controls;\n var pathStr = this.afbs.getPathFromRoot(searchKey, controls)//this.getPathFromRoot();\n this.form = this.rootFormGroup.control.get(pathStr) as FormGroup;\n var controlName = this.getControlName(this.form);\n this.ctrl = this.rootFormGroup.control.get(this.question.key);\n console.log('DynamicFormGroupComponent init vals:', {\n formGroupName: this.formGroupName,\n question: this.question,\n key: this.question.key,\n searchKey: searchKey,\n controls: controls,\n pathStr: pathStr,\n controlName: controlName,\n ctrl: this.ctrl\n })\n }\n else {\n //console.log('DynamicFormGroupComponent will get main control form');\n this.form = this.rootFormGroup.control;\n }\n //console.log('DynamicFormGroupComponent question', this.question, 'form', this.form, 'formGroupName', typeof this.formGroupName, this.formGroupName);\n }\n}","<form autocomplete=\"off\" [formGroup]=\"form\">\n <h2>{{question.key | valToTitle}}</h2>\n <mat-divider></mat-divider>\n @for (q of $any(question).questions; track q) {\n @if (q.controlType != 'formgroup') {\n <div class=\"form-row\">\n <snteam-dynamic-nested-form-question [question]=\"q\" [formGroup]=\"formGroup\" [groupName]=\"question.key\"></snteam-dynamic-nested-form-question>\n </div>\n }\n @if (q.controlType == 'formgroup') {\n <div class=\"group-row\">\n <snteam-dynamic-form-group [question]=\"q\" [formGroup]=\"form\" [formGroupName]=\"q.key\"></snteam-dynamic-form-group>\n </div>\n }\n }\n <mat-divider></mat-divider>\n</form>","import { ChangeDetectionStrategy, Component, OnInit, inject, model, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport {\n MAT_DIALOG_DATA,\n MatDialog,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n MatDialogTitle,\n} from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { AmplifyModelService } from '../../services/amplify-model.service';\n\nexport interface DialogData {\n modelItem: any;\n rel: any;\n selectedItems: any[];\n}\n\n@Component({\n selector: 'snteam-add-relationship-dialog',\n standalone: true,\n imports: [\n CommonModule,\n MatFormFieldModule,\n MatInputModule,\n FormsModule,\n MatSelectModule,\n MatButtonModule,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatDialogClose,],\n templateUrl: './add-relationship-dialog.component.html',\n styleUrl: './add-relationship-dialog.component.css'\n})\nexport class AddRelationshipDialogComponent implements OnInit {\n readonly dialogRef = inject(MatDialogRef<AddRelationshipDialogComponent>);\n readonly data = inject<DialogData>(MAT_DIALOG_DATA);\n readonly modelItem = model(this.data.modelItem);\n private ams = inject(AmplifyModelService);\n items$!: Observable<any>;\n\n ngOnInit() {\n console.log('AddRelationshipDialogComponent init this.data', this.data);\n let selectedIdsArr: string[] = [];\n if (this.data.selectedItems && this.data.selectedItems.length > 0){\n this.data.selectedItems.forEach(item => {\n console.log('item', item, 'this.data.rel', this.data.rel);\n selectedIdsArr.push(item[this.data.rel.fieldName].id);\n });\n }\n console.log('AddRelationshipDialogComponent selectedIdsArr', selectedIdsArr);\n const relationshipChoices = this.ams.getRelationshipChoices(this.data.rel, selectedIdsArr);\n if (relationshipChoices) {\n this.items$ = relationshipChoices;\n }\n console.log('AddRelationshipDialogComponent this.items$', this.items$);\n }\n\n onNoClick(): void {\n this.dialogRef.close();\n }\n}","<h2 mat-dialog-title>Add New {{data.rel.partnerModelName}}</h2>\n<mat-dialog-content>\n <mat-select [(ngModel)]=\"modelItem\">\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">Cancel</button>\n <button mat-button [mat-dialog-close]=\"modelItem()\" cdkFocusInitial>Add</button>\n</mat-dialog-actions>","import { Component, Input, OnInit, ChangeDetectionStrategy, inject, model, signal } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport {\n MAT_DIALOG_DATA,\n MatDialog,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n MatDialogTitle,\n} from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { AmplifyModelService } from '../../services/amplify-model.service';\n\nimport { AddRelationshipDialogComponent } from '../add-relationship-dialog/add-relationship-dialog.component';\n\n// Note: These imports will need to be updated based on the actual Amplify setup in the consuming application\n// import type { Schema } from '../../../../amplify/data/resource';\n// import outputs from '../../../../amplify_outputs.json';\n\n@Component({\n selector: 'snteam-dynamic-relationship-builder',\n standalone: true,\n imports: [MatToolbarModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, MatListModule,\n FormsModule,\n CommonModule],\n templateUrl: './dynamic-relationship-builder.component.html',\n styleUrl: './dynamic-relationship-builder.component.css'\n})\nexport class DynamicRelationshipBuilderComponent implements OnInit {\n @Input() m2m!: any;\n @Input() item!: any;\n @Input() model!: string;\n\n m2mItems: any;\n\n constructor(private ams: AmplifyModelService) { }\n\n modelItem!: any;// = signal('');\n readonly dialog = inject(MatDialog);\n\n ngOnInit() {\n console.log('DynamicRelationshipBuilderComponent model', this.m2m);\n this.listItems();\n this.setCreateSubscription();\n }\n\n async perhapsAddM2MItem (item: any){\n let m2mItem:any = {id: item.id};\n const { data: retItem } = await item[this.m2m.fieldName]();\n m2mItem[this.m2m.fieldName] = retItem;\n\n let existingInd = this.m2mItems.findIndex((x: any) => x.id == item.id);\n if (existingInd > -1){\n if (!this.m2mItems[existingInd][this.m2m.fieldName]) {\n console.log('would delete existing', this.m2mItems[existingInd]);\n this.m2mItems.splice(existingInd, 1);\n }\n }\n this.m2mItems.push(m2mItem);\n //console.log('perhapsAddM2MItem', item, 'm2m', this.m2m);\n }\n\n setCreateSubscription() {\n this.ams.setRelatedSub(this.m2m, this.item.id)?.subscribe({\n next: (data) => this.perhapsAddM2MItem(data),//(console.log('setRelatedSub m2mItems', this.m2mItems, 'data', data),\n error: (error) => console.warn(error),\n });\n }\n\n listItems() {\n this.ams.getRelatedItems(this.m2m, this.item.id)?.subscribe({\n next: ({ items, isSynced }) => {\n this.m2mItems = items;\n },\n });\n }\n\n /**\n Customize this function to include all desired models from your file\n */\n setModelItem(model?: string) {\n let mdl = model || this.model;\n console.log('setModelItem mdl', mdl);\n this.modelItem = signal<any>(this.ams.getEmptyObjectForModel(mdl));\n }\n\n async deleteRelatedItem(item: any) {\n console.log('deleteRelatedItem for item', item, 'm2m', this.m2m);\n //this.ams.deleteRelationship(this.m2m.relationshipModelName, item.id);\n await this.ams.deleteRelationship(this.m2m.relationshipModelName, item.id);\n }\n\n openDialog(rel: any): void {\n console.log('openDialog clicked for rel', rel);\n this.setModelItem(rel.partnerModelName);\n\n const dialogRef = this.dialog.open(AddRelationshipDialogComponent, {\n data: { rel: rel, modelItem: this.modelItem(), selectedItems: this.m2mItems },\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) this.handleDialogResult(result, rel);\n });\n }\n\n handleDialogResult(result: any, rel: any) {\n if (!result) return;\n console.log('handleDialogResult', result, 'rel', rel);\n if (result !== undefined) {\n this.modelItem.set(result);\n }\n\n let relIdName = rel.partnerModelName.toLowerCase() + 'Id';\n let thisIdName = rel.baseModelName.toLowerCase() + 'Id';\n\n let newRelObj: any = {};\n newRelObj[relIdName] = result.id;\n newRelObj[thisIdName] = this.item.id;\n\n this.ams.createRelationship(rel.relationshipModelName, newRelObj);\n }\n}","<div class=\"record-relationship-holder\">\n <div class=\"relationship-type\">\n <mat-toolbar>\n <span>{{m2m.partnerModelName}} Management</span>\n <span class=\"rel-title-spacer\"></span>\n <button mat-icon-button attr.aria-label=\"Add {{m2m.name}}\" (click)=\"openDialog(m2m)\">\n <mat-icon>add</mat-icon>\n </button>\n </mat-toolbar>\n @if(m2mItems && m2mItems.length > 0){\n <mat-list>\n @for (item of m2mItems; track item?.id) {\n @if(item[m2m.fieldName]){\n <mat-list-item>\n <span matListItemTitle>{{item[m2m.fieldName].name || item[m2m.fieldName].title}}</span>\n <button mat-icon-button (click)=\"deleteRelatedItem(item)\" matListItemMeta>\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n }\n </mat-list>\n }\n @else {\n Add your first {{m2m.partnerModelName}}\n }\n </div>\n</div>","import { Component, Input, OnInit, ChangeDetectionStrategy, inject, model, signal } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport {\n MAT_DIALOG_DATA,\n MatDialog,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n MatDialogTitle,\n} from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { AmplifyModelService } from '../../services/amplify-model.service';\n\nimport { DynamicRelationshipBuilderComponent } from '../dynamic-relationship-builder/dynamic-relationship-builder.component';\nimport { AddRelationshipDialogComponent } from '../add-relationship-dialog/add-relationship-dialog.component';\n\n// Note: These imports will need to be updated based on the actual Amplify setup in the consuming application\n// import type { Schema } from '../../../../amplify/data/resource';\n// import outputs from '../../../../amplify_outputs.json';\n\n@Component({\n selector: 'snteam-record-relationships',\n standalone: true,\n imports: [MatToolbarModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, MatListModule,\n DynamicRelationshipBuilderComponent,\n FormsModule,\n CommonModule],\n templateUrl: './record-relationships.component.html',\n styleUrl: './record-relationships.component.css'\n})\nexport class RecordRelationshipsComponent implements OnInit {\n\n @Input() model: string = '';\n @Input() id?: string;\n @Input() item?: any;\n @Input() amplifyOutputs?: any; // Allow injection of amplify outputs\n\n constructor(private ams: AmplifyModelService) { }\n\n m2mDetailArrays: any[] = [];\n\n //readonly animal = signal('');\n modelItem!: any;// = signal('');\n readonly dialog = inject(MatDialog);\n\n ngOnInit() {\n console.log('DynamicRelationshipBuilderComponent model', this.model, 'id', this.id, 'item', this.item);\n //this.setModelItem();\n\n if (!this.amplifyOutputs) {\n console.warn('RecordRelationshipsComponent: amplifyOutputs not provided. Component may not function correctly.');\n return;\n }\n\n console.log('DynamicRelationshipBuilderComponent outputs.data.model_introspection.models', this.amplifyOutputs.data.model_introspection.models);\n var fields = this.amplifyOutputs.data.model_introspection.models[this.model as keyof typeof this.amplifyOutputs.data.model_introspection.models].fields;\n var values = Object.values(fields);\n\n for (var v in values) {\n var fieldObj: any = values[v];\n if (typeof fieldObj.type != 'object') continue;\n if (!fieldObj.type.model) continue;\n\n let m2mDetails = this.getDetailsForManyToMany(fieldObj, this.model);\n\n if (m2mDetails) {\n this.m2mDetailArrays.push(m2mDetails);\n }\n\n console.log('DynamicRelationshipBuilderComponent ref field', fieldObj);\n console.log('DynamicRelationshipBuilderComponent m2mDetails', m2mDetails);\n }\n console.log('DynamicRelationshipBuilderComponent m2mDetailArrays', this.m2mDetailArrays);\n }\n\n /**\n Customize this function to include all desired models from your file\n */\n setModelItem(model?: string) {\n let mdl = model || this.model;\n console.log('setModelItem mdl', mdl);\n signal<any>(this.ams.getEmptyObjectForModel(mdl));\n }\n\n getFieldNameForAssociatedWithModel(relationshipModelName: string, associatedWith: string) {\n if (!this.amplifyOutputs) return;\n \n var relationshipModel = this.amplifyOutputs.data.model_introspection.models[relationshipModelName as keyof typeof this.amplifyOutputs.data.model_introspection.models].fields;\n console.log('getFieldNameForAssociatedWithModel relationshipModel', relationshipModel);\n var fieldVals = Object.values(relationshipModel);\n for (let field of fieldVals) {\n const fieldAny = field as any;\n console.log('getFieldNameForAssociatedWithModel field', field);\n if (!fieldAny.association) continue;\n if (fieldAny.association.targetNames.indexOf(associatedWith) > -1) continue;\n // there should only be two fields with associations.\n // if we get here we are in the field we want\n return fieldAny.name;\n }\n }\n\n getDetailsForManyToMany(fieldObj: any, baseModelName: string): any {\n if (!this.amplifyOutputs) return null;\n \n let relationshipModelName = fieldObj.type.model;\n let associatedWith = fieldObj.association.associatedWith[0]; //TODO this may not work for more complex Schemas!!!\n\n console.log('getDetailsForManyToMany relationshipModelName', relationshipModelName, 'baseModelName', baseModelName);\n this.getFieldNameForAssociatedWithModel(relationshipModelName, associatedWith);\n\n // TODO: MAKE THIS AUTO REFRESH... maybe make this a signal?\n let ret: any = {\n relationshipModelName: relationshipModelName,\n baseModelName: baseModelName,\n fieldName: this.getFieldNameForAssociatedWithModel(relationshipModelName, associatedWith),\n associatedWith: associatedWith\n }\n var relationshipModel = this.amplifyOutputs.data.model_introspection.models[relationshipModelName as keyof typeof this.amplifyOutputs.data.model_introspection.models].fields;\n\n var vals = Object.values(relationshipModel);\n for (var i in vals) {\n const val: any = vals[i];\n if (typeof val.type != 'object') continue;\n if (!val.type.model) continue;\n if (val.type.model == baseModelName) continue;\n\n console.log('vals[i]', vals[i]);\n var modelName = val.type.model;\n let refModel = this.amplifyOutputs.data.model_introspection.models[modelName as keyof typeof this.amplifyOutputs.data.model_introspection.models].fields;\n\n ret.partnerModelName = modelName;\n //this.ams.getRelatedItems(ret, this.item.id);\n }\n console.log('getDetailsForManyToMany ret', ret);\n return ret;\n }\n\n deleteRelatedItem(item: any) {\n console.log('deleteRelatedItem for item', item);\n }\n\n openDialog(rel: any): void {\n console.log('openDialog clicked for rel', rel);\n this.setModelItem(rel.partnerModelName);\n\n const dialogRef = this.dialog.open(AddRelationshipDialogComponent, {\n data: { rel: rel, modelItem: this.modelItem() },\n });\n\n dialogRef.afterClosed().subscribe(result => {\n console.log('The dialog was closed');\n this.handleDialogResult(result, rel);\n });\n }\n\n handleDialogResult(result: any, rel: any) {\n console.log('handleDialogResult', result, 'rel', rel);\n if (result !== undefined) {\n this.modelItem.set(result);\n }\n\n let relIdName = rel.partnerModelName.toLowerCase() + 'Id';\n let thisIdName = rel.baseModelName.toLowerCase() + 'Id';\n\n let newRelObj: any = {};\n newRelObj[relIdName] = result.id;\n newRelObj[thisIdName] = this.id || this.item.id;\n\n this.ams.createRelationship(rel.relationshipModelName, newRelObj);\n }\n}","<div class=\"relationship-builder-holder\">\n @if(item){\n <div class=\"relationship-builder\">\n @for (m2m of m2mDetailArrays; track m2m) {\n <snteam-dynamic-relationship-builder [m2m]=\"m2m\" [item]=\"item\" [model]=\"model\"></snteam-dynamic-relationship-builder>\n }\n </div>\n }\n @else {\n <div class=\"blank-relationship-builder\">Create the {{model}} first, then add relationships</div>\n }\n</div>","import { FormControl, FormGroup, Validators, ValidatorFn } from '@angular/forms';\n\nexport class QuestionBase<T> {\n model: string;\n value: T | undefined;\n key: string;\n label: string;\n required: boolean;\n order: number;\n controlType: string;\n type: string;\n options: { key: string, value: string }[];\n tooltip?: string;\n validators?: ValidatorFn[];\n\n constructor(options: {\n model?: string;\n value?: T;\n key?: string;\n label?: string;\n required?: boolean;\n order?: number;\n controlType?: string;\n type?: string;\n options?: { key: string, value: string }[];\n tooltip?: string;\n validators?: ValidatorFn[];\n } = {}) {\n this.model = options.model || '';\n this.value = options.value;\n this.key = options.key || '';\n this.label = options.label || '';\n this.required = !!options.required;\n this.order = options.order === undefined ? 1 : options.order;\n this.controlType = options.controlType || '';\n this.type = options.type || '';\n this.options = options.options || [];\n this.tooltip = options.tooltip || '';\n this.validators = options.validators;\n }\n}\n\nexport class TimePickerQuestion<T> extends QuestionBase<T> {\n override controlType = 'time';\n\n constructor(options: any = {}) {\n super(options);\n }\n}\n\nexport class DatePickerQuestion<T> extends QuestionBase<T> {\n override controlType = 'date';\n min: Date;\n max: Date;\n startDate: Date;\n\n constructor(options: any = {}) {\n super(options);\n this.min = new Date(options['min']) ?? new Date('January 01, 1900 00:00:00');\n var thisYear = new Date().getUTCFullYear;\n this.max = new Date(options['max']) ?? new Date('December 31 ' + thisYear + ' 23:59:59');\n this.startDate = new Date(options['startDate']) ?? new Date();\n }\n}\n\nexport class DateTimePickerQuestion<T> extends QuestionBase<T> {\n override controlType = 'date-time';\n min: Date;\n max: Date;\n startDate: Date;\n\n constructor(options: any = {}) {\n super(options);\n this.min = new Date(options['min']) ?? new Date('January 01, 1900 00:00:00');\n var thisYear = new Date().getUTCFullYear;\n this.max = new Date(options['max']) ?? new Date('December 31 ' + thisYear + ' 23:59:59');\n this.startDate = new Date(options['startDate']) ?? new Date();\n }\n}\n\nexport class SliderQuestion<T> extends QuestionBase<T> {\n override controlType = 'slider';\n min: number;\n max: number;\n\n constructor(options: any = {}) {\n super(options);\n this.min = options['min'] || 0;\n this.max = options['max'] || 100;\n }\n}\n\nexport class NumberQuestion<T> extends QuestionBase<T> {\n override controlType = 'number';\n}\n\nexport class TextboxQuestion<T> extends QuestionBase<T> {\n override controlType = 'textbox';\n}\n\nexport class EmailQuestion<T> extends QuestionBase<T> {\n override controlType = 'email';\n}\n\nexport class PhoneQuestion<T> extends QuestionBase<T> {\n override controlType = 'tel';\n}\n\nexport class DropdownQuestion<T> extends QuestionBase<T> {\n override controlType = 'dropdown';\n}\n\nexport class AsyncDropdownQuestion<T> extends QuestionBase<T> {\n override controlType = 'async-dropdown';\n targetModel: string;\n multiple: boolean;\n ddbKey: string;\n \n constructor(options: any = {}) {\n super(options);\n this.targetModel = options['targetModel'];\n this.multiple = options['multiple'];\n this.ddbKey = options['ddbKey'];\n }\n}\n\nexport class FormGroupQuestion<T> extends QuestionBase<T> {\n override controlType = 'formgroup';\n formGroup: FormGroup;\n questions: QuestionBase<T>[] | null = [];\n \n constructor(options: any = {}) {\n super(options);\n this.formGroup = options['formGroup'];\n this.questions = options['questions'];\n }\n}","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\n// Simple phone number validator (can be customized further)\nexport function phoneNumberValidator(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const phoneNumber = control.value;\n\n // Use a regular expression to validate the phone number format\n const regex = /^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$/;\n if (!phoneNumber || regex.test(phoneNumber)) {\n return null; // Valid phone number\n } else {\n return { invalidPhoneNumber: true }; // Invalid phone number\n }\n };\n}","import { Injectable } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport {\n QuestionBase,\n TextboxQuestion,\n NumberQuestion,\n DatePickerQuestion,\n DropdownQuestion,\n AsyncDropdownQuestion,\n FormGroupQuestion,\n PhoneQuestion,\n EmailQuestion\n} from '../classes/questions';\n\nimport { phoneNumberValidator } from '../classes/validators';\nimport { AmplifyModelService } from './amplify-model.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class QuestionControlService {\n\n private outputs: any;\n\n constructor(private ams: AmplifyModelService) { }\n\n /**\n * Initialize the service with Amplify outputs\n * This should be called by the consuming application after Amplify.configure()\n */\n initializeOutputs(outputs: any) {\n console.log('QuestionControlService: initializeOutputs called with:', outputs);\n this.outputs = outputs;\n console.log('QuestionControlService: outputs stored:', this.outputs);\n }\n\n getFieldForFieldObj(fieldObj: any, model: any): QuestionBase<any> | null {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return null;\n }\n\n console.log('getFieldForFieldObj starting for type', fieldObj.type, 'fieldObj', fieldObj);\n \n switch (fieldObj.type) {\n case 'String':\n return this._addStringQuestion(fieldObj, model);\n case 'Int':\n case 'Float':\n return this._addNumberQuestion(fieldObj, model);\n case 'AWSDate':\n case 'AWSDateTime':\n return this._addDatePickerQuestion(fieldObj, model);\n case 'AWSEmail':\n return this._addEmailQuestion(fieldObj, model);\n case 'AWSPhone':\n return this._addPhoneQuestion(fieldObj, model);\n }\n\n if (typeof fieldObj.type === 'object') {\n if (fieldObj.type.model) {\n return this.getRefModel(fieldObj, model);\n }\n if (fieldObj.type.nonModel) {\n let groupQuestions = this.getNonModelQuestions(fieldObj, model);\n var formGroup = this.toFormGroup(groupQuestions);\n return this._addFormGroupQuestion(fieldObj, formGroup, groupQuestions);\n }\n if (fieldObj.type.enum) {\n return this.getEnumQuestion(fieldObj, model);\n }\n }\n\n return null;\n }\n\n getLabelForFieldName(name: string): string {\n return name.toLowerCase().split('_').map((word: string) => {\n return word.charAt(0).toUpperCase() + word.slice(1);\n }).join(' ');\n }\n\n getQuestionsForModelFields(model: string): QuestionBase<any>[] {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return [];\n }\n\n if (!model) {\n console.error('QuestionControlService: No model name provided');\n return [];\n }\n\n console.log('outputs.data.model_introspection', this.outputs.data.model_introspection);\n console.log('Looking for model:', model);\n \n if (!this.outputs.data || !this.outputs.data.model_introspection || !this.outputs.data.model_introspection.models) {\n console.error('QuestionControlService: Invalid outputs structure', this.outputs);\n return [];\n }\n \n console.log('Available models:', Object.keys(this.outputs.data.model_introspection.models));\n \n const modelData = this.outputs.data.model_introspection.models[model as keyof typeof this.outputs.data.model_introspection.models];\n if (!modelData) {\n console.error(`Model \"${model}\" not found in model introspection. Available models:`, Object.keys(this.outputs.data.model_introspection.models));\n return [];\n }\n \n console.log('Found model data:', modelData);\n \n const fields = modelData.fields;\n if (!fields) {\n console.error(`Fields not found for model \"${model}\"`, modelData);\n return [];\n }\n \n console.log('Found fields:', fields);\n \n const questions: QuestionBase<any>[] = [];\n const values = Object.values(fields);\n const skipFields = ['createdAt', 'updatedAt', 'id'];\n \n for (const fieldObj of values) {\n if (skipFields.indexOf((fieldObj as any).name) > -1) continue;\n\n if (typeof (fieldObj as any).type === 'object' && (fieldObj as any).type.model) {\n continue; // skip model relationship fields\n }\n\n const q = this.getFieldForFieldObj(fieldObj, model);\n if (q) {\n questions.push(q);\n } else {\n console.log('no question returned for fieldObj', fieldObj, 'model', model);\n }\n }\n \n console.log('getQuestionsForModelFields questions', questions);\n return questions;\n }\n\n /** nonModel, form section Methods **/\n getNonModelQuestions(fieldObj: any, model: any): QuestionBase<any>[] {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return [];\n }\n\n const nonModel = fieldObj.type.nonModel;\n const fields = this.outputs.data.model_introspection.nonModels[nonModel as keyof typeof this.outputs.data.model_introspection.nonModels].fields;\n const questions: QuestionBase<any>[] = [];\n const values = Object.values(fields);\n const skipFields = ['createdAt', 'updatedAt'];\n \n for (const nestedFieldObj of values) {\n const question = this.getFieldForFieldObj(nestedFieldObj, model);\n if (question) {\n questions.push(question);\n }\n }\n \n console.log('getNonModelQuestions questions', questions);\n return questions;\n }\n\n getEnumQuestion(fieldObj: any, model: any): DropdownQuestion<any> | null {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return null;\n }\n\n const enumName = fieldObj.type.enum;\n const e = this.outputs.data.model_introspection.enums[enumName as keyof typeof this.outputs.data.model_introspection.enums];\n console.log('getEnumQuestion e', e);\n \n const choices: any[] = [];\n e.values.forEach((val: string) => {\n choices.push({ key: val, value: val });\n });\n \n return this._addDropdownQuestion(fieldObj, choices, model);\n }\n\n /** Reference Field Methods **/\n getRefModel(fieldObj: any, callingModel: string): AsyncDropdownQuestion<any> | null {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return null;\n }\n\n console.log('getRefModel starting for fieldObj', fieldObj);\n \n const referenceModel = fieldObj.type.model;\n const relModel = this.outputs.data.model_introspection.models[referenceModel as keyof typeof this.outputs.data.model_introspection.models].fields;\n\n const vals = Object.values(relModel);\n for (const val of vals) {\n const fieldVal = val as any;\n if (typeof fieldVal.type !== 'object') continue;\n if (!fieldVal.type.model) continue;\n if (fieldVal.type.model === callingModel) continue;\n\n const modelName = fieldVal.type.model;\n return this._addRefDropdownQuestion(fieldObj, callingModel, modelName);\n }\n\n return null;\n }\n\n private _addFormGroupQuestion(fieldObj: any, formGroup: FormGroup, questions: QuestionBase<any>[]): FormGroupQuestion<any> {\n const name = fieldObj.name.toString();\n return new FormGroupQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'formgroup',\n formGroup: formGroup,\n questions: questions\n });\n }\n\n private _addDropdownQuestion(fieldObj: any, items: any[], model: string): DropdownQuestion<any> {\n console.log('_addDropdownQuestion for fieldObj', fieldObj, 'items', items);\n \n const name = fieldObj.name.toString();\n return new DropdownQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n options: items,\n type: 'dropdown',\n model: model\n });\n }\n\n private _addRefDropdownQuestion(fieldObj: any, model: string, targetModel: string): AsyncDropdownQuestion<any> {\n console.log('_addRefDropdownQuestion for fieldObj', fieldObj);\n \n const name = fieldObj.name.toString();\n return new AsyncDropdownQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'dropdown',\n model: model,\n targetModel: targetModel,\n multiple: fieldObj.association?.connectionType === \"HAS_MANY\"\n });\n }\n\n private _addDatePickerQuestion(fieldObj: any, model: string): DatePickerQuestion<any> {\n const name = fieldObj.name.toString();\n return new DatePickerQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'date',\n model: model\n });\n }\n\n private _addNumberQuestion(fieldObj: any, model: string): NumberQuestion<any> {\n const name = fieldObj.name.toString();\n return new NumberQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'number',\n model: model\n });\n }\n\n private _addStringQuestion(fieldObj: any, model: string): TextboxQuestion<any> {\n const name = fieldObj.name.toString();\n return new TextboxQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'textbox',\n model: model\n });\n }\n\n private _addEmailQuestion(fieldObj: any, model: string): EmailQuestion<any> {\n const name = fieldObj.name.toString();\n return new EmailQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'email',\n validators: [Validators.email],\n model: model\n });\n }\n\n private _addPhoneQuestion(fieldObj: any, model: string): PhoneQuestion<any> {\n const name = fieldObj.name.toString();\n return new PhoneQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'tel',\n validators: [phoneNumberValidator()],\n model: model\n });\n }\n\n toFormGroup(questions: (QuestionBase<any> | FormGroupQuestion<any>)[]): FormGroup {\n const group: any = {};\n\n questions.forEach(question => {\n if (!question) return;\n \n if ('questions' in question && question.questions) {\n group[question.key] = this.toFormGroup(question.questions as QuestionBase<any>[]);\n } else {\n const validators = [];\n \n if (question.required) {\n validators.push(Validators.required);\n }\n \n if (question.validators) {\n validators.push(...question.validators);\n }\n\n group[question.key] = new FormControl(question.value || '', validators);\n }\n });\n \n return new FormGroup(group);\n }\n}","import { Location } from '@angular/common';\nimport { Component, Input, OnInit, inject, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ActivatedRoute } from '@angular/router';\nimport {\n FormControl,\n FormGroupDirective,\n NgForm,\n ReactiveFormsModule,\n FormGroup\n} from '@angular/forms';\nimport { DynamicFormQuestionComponent } from '../dynamic-form-question/dynamic-form-question.component';\nimport { DynamicNestedFormQuestionComponent } from '../dynamic-nested-form-question/dynamic-nested-form-question.component';\nimport { DynamicFormGroupComponent } from '../dynamic-form-group/dynamic-form-group.component';\nimport { QuestionControlService } from '../../services/question-control.service';\nimport { AmplifyFormBuilderService } from '../../services/amplify-form-builder.service';\nimport { AmplifyModelService } from '../../services/amplify-model.service';\nimport { RecordRelationshipsComponent } from '../record-relationships/record-relationships.component';\nimport { QuestionBase, FormGroupQuestion } from '../../classes/questions';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatSnackBarModule, MatSnackBar } from '@angular/material/snack-bar';\nimport { MatButtonModule } from '@angular/material/button';\n\n/** Error when invalid control is dirty, touched, or submitted. */\nexport class MyErrorStateMatcher implements ErrorStateMatcher {\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n const isSubmitted = form && form.submitted;\n return !!(control && control.invalid && (control.dirty || control.touched || isSubmitted));\n }\n}\n\n@Component({\n standalone: true,\n selector: 'snteam-dynamic-form',\n imports: [\n CommonModule,\n DynamicFormQuestionComponent,\n DynamicNestedFormQuestionComponent,\n DynamicFormGroupComponent,\n RecordRelationshipsComponent,\n ReactiveFormsModule,\n MatFormFieldModule, \n MatInputModule, \n MatSelectModule, \n MatSnackBarModule, \n MatDividerModule,\n MatButtonModule\n ],\n templateUrl: './dynamic-form.component.html',\n styleUrl: './dynamic-form.component.css'\n})\nexport class DynamicFormComponent implements OnInit {\n\n @Input() model: string = \"\";\n @Input() itemId: string = \"\";\n @Input() valueMap?: any;\n @Input() hideRelationships: boolean = false;\n @Input() hideSaveButton: boolean = false;\n @Input() amplifyOutputs?: any; // Add amplify outputs input\n \n @Output() itemOutput = new EventEmitter<any>();\n @Output() submitOutput = new EventEmitter<any>();\n @Output() formLoaded = new EventEmitter<FormGroup>();\n\n mdl: string = '';\n id: string = '';\n item: any;\n payLoad: any;\n form!: any;\n questions: (QuestionBase<any> | FormGroupQuestion<any>)[] | null = [];\n\n materialInputs: string[] = [];\n switchInputs: string[] = [];\n formGroupInputs: string[] = ['formgroup'];\n refInputs: string[] = [];\n\n private ams = inject(AmplifyModelService);\n private _snackBar = inject(MatSnackBar);\n\n constructor(\n private qcs: QuestionControlService,\n private afb: AmplifyFormBuilderService,\n private location: Location,\n private route: ActivatedRoute\n ) { }\n\n get outputs() {\n return this.amplifyOutputs || (this.qcs as any).outputs;\n }\n\n ngOnInit() {\n console.log('DynamicFormComponent ngOnInit starting');\n this.materialInputs = this.afb.getMaterialInputs();\n this.switchInputs = this.afb.getSwitchInputs();\n this.refInputs = this.afb.getRefInputs();\n \n // Read from route parameters if available, otherwise use inputs\n this.route.paramMap.subscribe((params) => {\n console.log('DynamicFormComponent route params:', params);\n const routeModel = params.get('model');\n const routeId = params.get('id');\n \n console.log('DynamicFormComponent routeModel:', routeModel, 'routeId:', routeId);\n \n this.mdl = routeModel || this.model;\n this.id = routeId || this.itemId;\n\n console.log('DynamicFormComponent final mdl:', this.mdl, 'id:', this.id);\n\n if (this.id == '-1' || !this.id) {\n console.log('DynamicFormComponent calling setQuestionsAndForm for new item');\n this.setQuestionsAndForm();\n } else {\n console.log('DynamicFormComponent calling getItem for existing item');\n this.getItem();\n }\n });\n }\n\n setFormBuilderForm() {\n this.form = this.afb.buildFormForModel(this.mdl);\n }\n\n async getItem() {\n const { data: item } = await this.ams.getItemForModel(this.mdl, this.id);\n this.item = item;\n this.itemOutput.emit(this.item);\n this.setQuestionsAndForm();\n }\n\n setQuestionsAndForm() {\n if (!this.mdl) {\n console.error('DynamicFormComponent: No model specified');\n return;\n }\n\n if (!this.questions || this.questions.length == 0) {\n console.log('DynamicFormComponent: Getting questions for model:', this.mdl);\n try {\n this.questions = this.qcs.getQuestionsForModelFields(this.mdl);\n console.log('DynamicFormComponent: Questions received:', this.questions);\n } catch (error) {\n console.error('DynamicFormComponent: Error getting questions for model:', this.mdl, error);\n return;\n }\n }\n\n // Reset question values first\n for (let question of this.questions) {\n question.value = undefined; // Clear previous values\n }\n\n if (this.item) {\n for (let question of this.questions) {\n this.setQuestionValueFromItem(question);\n }\n }\n\n // Apply valueMap if provided\n if (this.valueMap) {\n for (let question of this.questions) {\n this.setQuestionValueFromValueMap(question, this.valueMap);\n }\n }\n\n // Always recreate the form to ensure it reflects current question values\n this.form = this.qcs.toFormGroup(this.questions as QuestionBase<any>[]);\n this.formLoaded.emit(this.form);\n console.log('this.item', this.item);\n }\n\n setQuestionValueFromItem(question: any, item?: any) {\n if (!item) item = this.item;\n if (question.controlType == 'formgroup') {\n for (let q of question.questions) {\n this.setQuestionValueFromItem(q, item[question.key]);\n }\n }\n else if (item[question.key]) {\n question.value = item[question.key];\n } else {\n console.log('setQuestionValueFromItem no item found and not formgroup');\n }\n }\n\n setQuestionValueFromValueMap(question: any, valueMap: any) {\n if (question.controlType == 'formgroup') {\n for (let q of question.questions) {\n this.setQuestionValueFromValueMap(q, valueMap);\n }\n }\n else if (valueMap[question.key] !== undefined) {\n question.value = valueMap[question.key];\n }\n }\n\n getValueForKey(obj: any, key: string): any | null {\n if (obj === null || typeof obj !== 'object') {\n return null;\n }\n\n if (key in obj) {\n return obj[key];\n }\n\n for (const k in obj) {\n const result = this.getValueForKey(obj[k], key);\n if (result !== null) {\n return result;\n }\n }\n\n return null;\n }\n\n setValueForKey(obj: any, key: string, val: any) {\n if (obj === null || typeof obj !== 'object') {\n return;\n }\n\n if (key in obj) {\n obj[key] = val;\n }\n\n for (const k in obj) {\n if (typeof obj[k] == 'object') {\n this.setValueForKey(obj[k], key, val);\n }\n }\n }\n\n setRefQuestionValuesInPayload(questions?: any, payLoadObj?: any) {\n let qs = questions || this.questions;\n\n let refQs = qs.filter((x: any) => x.controlType == 'async-dropdown');\n if (refQs) {\n refQs.forEach((refQ: any) => {\n let keyVal = this.getValueForKey(this.payLoad, refQ.key);\n if (Array.isArray(keyVal)) {\n let relArr: any[] = [];\n for (var v in keyVal) {\n let valObj: any = {};\n valObj[refQ.targetModel.toLowerCase() + 'Id'] = keyVal[v];\n valObj[this.mdl.toLowerCase() + 'Id'] = this.id;\n relArr.push(valObj);\n }\n this.setValueForKey(this.payLoad, refQ.key, relArr)\n }\n else {\n console.log('qs keyVal is not array');\n }\n });\n }\n\n let groupQs = qs.filter((x: any) => x.controlType == 'formgroup');\n if (groupQs) {\n for (let groupQ of groupQs) {\n console.log('qs checking groupQ', groupQ);\n this.setRefQuestionValuesInPayload(groupQ.questions);\n }\n }\n console.log('qs payload', this.payLoad);\n }\n\n questionsIncludesRefType(questions?: any): boolean {\n let qs = questions || this.questions;\n\n let refQ = qs.find((x: any) => x.controlType == 'async-dropdown');\n if (refQ) return true;\n\n let groupQs = qs.filter((x: any) => x.controlType == 'formgroup');\n if (groupQs) {\n for (let groupQ of groupQs) {\n if (this.questionsIncludesRefType(groupQ.questions)) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n formHasRelationshipQuestions(): boolean {\n return this.questionsIncludesRefType();\n }\n\n onSubmit() {\n this.payLoad = this.form.getRawValue();\n\n if (this.item && this.item.id) {\n this.payLoad.id = this.item.id;\n console.log('will update because this.item.id', this.item.id);\n this.updateItem();\n }\n else {\n console.log('will create because !this.item.id', this.item);\n this.createItem();\n }\n \n this.submitOutput.emit(this.payLoad);\n console.log('onSubmit payload', this.payLoad, 'this.item', this.item, 'this.form', this.form);\n }\n\n async updateItem() {\n this.prepPayloadObj();\n console.log('updateItem prepped payload', this.payLoad);\n try {\n const { data: item } = await this.ams.updateItemForModel(this.mdl, this.payLoad);\n console.log('updateItem finished res', item);\n \n if (!item) {\n this._snackBar.open('Error updating ' + this.mdl, 'Dismiss');\n return;\n }\n \n this.item = item;\n this.itemOutput.emit(this.item);\n \n // Show success message\n this._snackBar.open(`${this.mdl} updated successfully`, 'Dismiss', {\n duration: 3000\n });\n \n this.setQuestionsAndForm();\n } catch (error) {\n console.error('error in updateItem', error);\n this._snackBar.open('Error updating ' + this.mdl, 'Dismiss');\n }\n }\n\n getQuestionForKey(key: string, questions?: any) {\n let searchQs = questions || this.questions;\n let q = searchQs.find((x: any) => x.key == key);\n if (q) return q;\n\n let groupQs = searchQs.filter((x: any) => x.controlType == 'formgroup');\n if (groupQs) {\n for (let groupQ of groupQs) {\n console.log('searchQs checking groupQ', groupQ);\n q = this.getQuestionForKey(key, groupQ.questions);\n if (q) return q;\n }\n }\n return;\n }\n\n prepPayloadObj(obj?: any) {\n let prepObj = obj || this.payLoad;\n console.log('prepPayloadObj starting for prepObj', prepObj);\n for (let prop in prepObj) {\n let q = this.getQuestionForKey(prop);\n if (q) {\n console.log('q', q);\n if (q.controlType == \"formgroup\") {\n this.prepPayloadObj(prepObj[prop])\n }\n else {\n if (!q.required && prepObj[prop] == '') {\n delete prepObj[prop];\n }\n }\n }\n else {\n console.log('prepPayloadObj no q for prop', prop);\n }\n }\n }\n\n async createItem() {\n this.prepPayloadObj();\n console.log('createItem prepped payload', this.payLoad);\n try {\n let res = await this.ams.createItemPromise(this.mdl, this.payLoad);\n console.log('createItem finished res', res);\n if (!res) {\n this._snackBar.open('Error creating ' + this.mdl, 'Dismiss');\n return;\n }\n\n if (res.errors && res.errors.length > 0) {\n let messages: string[] = [];\n res.errors.forEach((err: any) => {\n messages.push(err.message);\n })\n this._snackBar.open(messages.join('\\n'), 'Dismiss');\n }\n else {\n this.item = res.data;\n this.itemOutput.emit(this.item);\n \n // Update the URL to reflect the new item ID\n if (this.item && this.item.id) {\n this.changePathIdParam(this.item.id);\n this.id = this.item.id; // Update the component's id property\n }\n \n // Show success message\n this._snackBar.open(`${this.mdl} created successfully`, 'Dismiss', {\n duration: 3000\n });\n \n this.setQuestionsAndForm();\n }\n } catch (error) {\n console.error('error in createItem', error);\n }\n }\n\n changePathIdParam(newParamValue: string) {\n const currentUrl = this.location.path();\n let paramValArr = currentUrl.split('/');\n let currentId = paramValArr[paramValArr.length -1];\n const newUrl = currentUrl.replace(currentId, newParamValue);\n this.location.replaceState(newUrl);\n }\n\n isValid(question?: any, q?: any, q2?: any) {\n if (question && q && q2) return this.form.get(question.key + '.' + q.key + '.' + q2.key);\n if (question && q && !q2) return this.form.get(question.key + '.' + q.key);\n if (question && !q && !q2) return this.form.get(question.key);\n return true;\n }\n}","<div class=\"dynamic-form-holder\">\n @if (form && questions) {\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"form\">\n @for (question of questions; track question) {\n @if (this.switchInputs.includes(question.controlType) || this.materialInputs.includes(question.controlType) || this.refInputs.includes(question.controlType)) {\n <div class=\"form-row\">\n <snteam-dynamic-form-question [question]=\"question\" [formGroup]=\"form\"></snteam-dynamic-form-question>\n </div>\n }\n @if (this.formGroupInputs.includes(question.controlType)) {\n <div class=\"group-row\">\n <snteam-dynamic-form-group [question]=\"question\" [formGroup]=\"form\" [formGroupName]=\"question.key\"></snteam-dynamic-form-group>\n </div>\n }\n }\n @if (!hideSaveButton) {\n <div class=\"form-row\">\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"!form.valid\">Save</button>\n </div>\n }\n </form>\n } @else {\n <div class=\"loading\">Loading...</div>\n }\n\n @if(item && !hideRelationships){\n <div class=\"relationship-holder\">\n <snteam-record-relationships [model]=\"mdl\" [id]=\"id\" [item]=\"item\" [amplifyOutputs]=\"outputs\"></snteam-record-relationships>\n </div>\n }\n</div>","import { Component, OnInit, Input, inject, TemplateRef, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatListModule } from '@angular/material/list';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { AmplifyModelService } from '../../services/amplify-model.service';\n\n@Component({\n selector: 'snteam-list-view',\n standalone: true,\n imports: [CommonModule, MatListModule, MatButtonModule, MatIconModule],\n templateUrl: './list-view.component.html',\n styleUrl: './list-view.component.css'\n})\nexport class ListViewComponent implements OnInit {\n private ams = inject(AmplifyModelService);\n private route = inject(ActivatedRoute);\n private router = inject(Router);\n \n @Input() modelName: string = '';\n @Input() customItemTemplate?: TemplateRef<any>;\n @Input() hideNewButton: boolean = false;\n @Input() title?: string;\n @Input() useRouter: boolean = true;\n \n @Output() itemClick = new EventEmitter<any>();\n @Output() newClick = new EventEmitter<void>();\n @Output() itemsLoaded = new EventEmitter<any[]>();\n \n itemsArr: any[] = [];\n loading: boolean = true;\n error: string | null = null;\n\n ngOnInit(): void {\n // Check if modelName is provided via route parameter\n const routeModel = this.route.snapshot.paramMap.get('model');\n if (routeModel) {\n this.modelName = routeModel;\n }\n \n if (this.modelName) {\n this.listItems();\n }\n }\n\n listItems() {\n console.log('ListViewComponent listItems starting for model:', this.modelName);\n if (this.modelName) {\n this.loading = true;\n this.error = null;\n \n const observable = this.ams.listItemsForModel(this.modelName);\n if (observable) {\n observable.subscribe({\n next: ({ items, isSynced }) => {\n this.itemsArr = items;\n this.loading = false;\n this.itemsLoaded.emit(this.itemsArr);\n console.log('ListViewComponent items loaded:', this.itemsArr);\n },\n error: (err) => {\n console.error('Error loading items:', err);\n this.error = 'Failed to load items';\n this.loading = false;\n }\n });\n } else {\n this.error = 'Service not initialized';\n this.loading = false;\n }\n }\n }\n\n onItemClick(item: any) {\n console.log('ListViewComponent itemClick', item);\n this.itemClick.emit(item);\n }\n\n onNewClick() {\n console.log('ListViewComponent newClick');\n if (this.useRouter) {\n this.router.navigate(['/form/' + this.modelName + '/-1']);\n } else {\n this.newClick.emit();\n }\n }\n\n getDisplayText(item: any): string {\n // Try common display fields\n return item.name || item.title || item.label || item.id || 'Unnamed Item';\n }\n\n refresh() {\n this.listItems();\n }\n}","<div class=\"list-view-container\">\n <div class=\"header\">\n <h2>{{ title || modelName }}</h2>\n @if (!hideNewButton) {\n <button mat-raised-button color=\"primary\" (click)=\"onNewClick()\">\n <mat-icon>add</mat-icon>\n New {{ modelName }}\n </button>\n }\n </div>\n\n @if (loading) {\n <div class=\"loading\">Loading {{ modelName }}...</div>\n }\n\n @if (error) {\n <div class=\"error\">\n {{ error }}\n <button mat-button (click)=\"refresh()\">Retry</button>\n </div>\n }\n\n @if (!loading && !error && itemsArr.length === 0) {\n <div class=\"empty-state\">\n <p>No {{ modelName }} found</p>\n @if (!hideNewButton) {\n <button mat-raised-button color=\"primary\" (click)=\"onNewClick()\">\n Create First {{ modelName }}\n </button>\n }\n </div>\n }\n\n @if (!loading && !error && itemsArr.length > 0) {\n <mat-list class=\"items-list\">\n @for (item of itemsArr; track item.id) {\n <mat-list-item (click)=\"onItemClick(item)\" class=\"clickable-item\">\n @if (customItemTemplate) {\n <ng-container [ngTemplateOutlet]=\"customItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n } @else {\n <span matListItemTitle>{{ getDisplayText(item) }}</span>\n <span matListItemLine>{{ item.description || item.createdAt | date }}</span>\n }\n </mat-list-item>\n }\n </mat-list>\n }\n</div>","/*\n * Public API Surface of @snteam/amplify-angular-core\n */\n\n// Legacy exports for backward compatibility\nexport * from './lib/amplify-angular-core';\n\n// ===== MAIN COMPONENTS =====\n// Primary components for building dynamic forms and list views\nexport * from './lib/components/dynamic-form/dynamic-form.component';\nexport * from './lib/components/list-view/list-view.component';\n\n// ===== SUPPORTING COMPONENTS =====\n// Components used internally by main components for form rendering\nexport * from './lib/components/dynamic-form-question/dynamic-form-question.component';\nexport * from './lib/components/dynamic-form-group/dynamic-form-group.component';\nexport * from './lib/components/dynamic-nested-form-question/dynamic-nested-form-question.component';\nexport * from './lib/components/record-relationships/record-relationships.component';\nexport * from './lib/components/dynamic-relationship-builder/dynamic-relationship-builder.component';\nexport * from './lib/components/add-relationship-dialog/add-relationship-dialog.component';\n\n// ===== SERVICES =====\n// Core services for Amplify integration and form building\nexport * from './lib/services/amplify-model.service';\nexport * from './lib/services/amplify-form-builder.service';\nexport * from './lib/services/question-control.service';\n\n// ===== CLASSES AND TYPES =====\n// Question classes for dynamic form generation\nexport * from './lib/classes/questions';\n// Validation utilities\nexport * from './lib/classes/validators';\n\n// ===== PIPES =====\n// Utility pipes for data transformation\nexport * from './lib/pipes/val-to-title.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.AmplifyModelService","i3","i4","i2.AmplifyFormBuilderService","i2","i1.AmplifyModelService","i5","i1.QuestionControlService","i6","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYa,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAl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3,"file":"snteam-amplify-angular-core.mjs","sources":["../../../projects/amplify-angular-core/src/lib/amplify-angular-core.ts","../../../projects/amplify-angular-core/src/lib/services/amplify-form-builder.service.ts","../../../projects/amplify-angular-core/src/lib/pipes/val-to-title.pipe.ts","../../../projects/amplify-angular-core/src/lib/services/amplify-model.service.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form-question/dynamic-form-question.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form-question/dynamic-form-question.component.html","../../../projects/amplify-angular-core/src/lib/components/dynamic-nested-form-question/dynamic-nested-form-question.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-nested-form-question/dynamic-nested-form-question.component.html","../../../projects/amplify-angular-core/src/lib/components/dynamic-form-group/dynamic-form-group.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form-group/dynamic-form-group.component.html","../../../projects/amplify-angular-core/src/lib/components/add-relationship-dialog/add-relationship-dialog.component.ts","../../../projects/amplify-angular-core/src/lib/components/add-relationship-dialog/add-relationship-dialog.component.html","../../../projects/amplify-angular-core/src/lib/components/dynamic-relationship-builder/dynamic-relationship-builder.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-relationship-builder/dynamic-relationship-builder.component.html","../../../projects/amplify-angular-core/src/lib/components/record-relationships/record-relationships.component.ts","../../../projects/amplify-angular-core/src/lib/components/record-relationships/record-relationships.component.html","../../../projects/amplify-angular-core/src/lib/classes/questions.ts","../../../projects/amplify-angular-core/src/lib/classes/validators.ts","../../../projects/amplify-angular-core/src/lib/services/question-control.service.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form/dynamic-form.component.ts","../../../projects/amplify-angular-core/src/lib/components/dynamic-form/dynamic-form.component.html","../../../projects/amplify-angular-core/src/lib/components/list-view/list-view.component.ts","../../../projects/amplify-angular-core/src/lib/components/list-view/list-view.component.html","../../../projects/amplify-angular-core/src/lib/components/configurations/configurations.component.ts","../../../projects/amplify-angular-core/src/lib/components/configurations/configurations.component.html","../../../projects/amplify-angular-core/src/public-api.ts","../../../projects/amplify-angular-core/src/snteam-amplify-angular-core.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'snteam-amplify-angular-core',\n imports: [],\n template: `\n <p>\n amplify-angular-core works!\n </p>\n `,\n styles: ``,\n})\nexport class AmplifyAngularCore {\n\n}\n","import { Injectable } from '@angular/core';\nimport { FormBuilder, FormGroup, FormControl, Validators, AbstractControl } from '@angular/forms';\nimport {\n QuestionBase,\n TextboxQuestion,\n NumberQuestion,\n DatePickerQuestion,\n DropdownQuestion,\n FormGroupQuestion\n} from '../classes/questions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AmplifyFormBuilderService {\n\n skipFields: string[] = ['createdAt', 'updatedAt'];\n\n materialInputs: string[] = [\n 'textbox',\n 'int',\n 'number',\n 'color',\n 'email',\n 'month',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week'\n ];\n \n switchInputs: string[] = ['dropdown'];\n refInputs: string[] = ['async-dropdown'];\n formGroupInputs: string[] = ['formgroup']; // we skip these and handle them in the form\n datePickerInputs = ['date', 'datepicker', 'datetime-local'];\n\n private outputs: any;\n\n constructor(private fb: FormBuilder) { }\n\n /**\n * Initialize the service with Amplify outputs\n * This should be called by the consuming application after Amplify.configure()\n */\n initializeOutputs(outputs: any) {\n this.outputs = outputs;\n }\n\n getInputTypeFromFieldType(type: string): string | undefined {\n if (this.materialInputs.includes(type)) return 'materialInputs';\n if (this.switchInputs.includes(type)) return 'switchInputs';\n if (this.refInputs.includes(type)) return 'refInputs';\n if (this.formGroupInputs.includes(type)) return 'formGroupInputs';\n if (this.datePickerInputs.includes(type)) return 'datePickerInputs';\n\n return undefined;\n }\n\n getMaterialInputs(): string[] {\n return this.materialInputs;\n }\n\n getSwitchInputs(): string[] {\n return this.switchInputs;\n }\n\n getRefInputs(): string[] {\n return this.refInputs;\n }\n\n getErrorStrForControl(ctrl: AbstractControl, label?: string): string {\n const errorMap: { [key: string]: string } = {\n email: 'Please enter a valid email address',\n invalidPhoneNumber: 'Please enter a phone number in (111) 222-3333 format.',\n required: (label || 'This field') + ' is required.'\n };\n\n if (!ctrl.errors) return '';\n \n let errStrs: string[] = [];\n let keys = Object.keys(ctrl.errors);\n \n for (let err of keys) {\n if (errorMap[err]) {\n errStrs.push(errorMap[err]);\n } else {\n errStrs.push(`Invalid ${err}`);\n }\n }\n \n return errStrs.join(', ');\n }\n\n /** Shared Methods for FormControls **/\n getPathFromRoot(searchKey: string, controls: any, pathArr?: string[]): string {\n if (!pathArr) pathArr = [];\n\n const isInControls = Object.keys(controls).find(name => name === searchKey);\n if (isInControls) {\n pathArr.push(searchKey);\n return pathArr.join('.');\n } else {\n const tempArr: string[] = [];\n const entries = Object.entries(controls);\n \n for (let e of entries) {\n let controlName = e[0];\n let controlObj = e[1];\n \n if (controlObj instanceof FormGroup) {\n console.log('getPathFromRoot controlName', typeof controlName, controlName, 'controlObj', controlObj);\n tempArr.push(controlName);\n console.log('getPathFromRoot', controlName, 'is a FormGroup in path tempArr', tempArr);\n \n const childControls = (controls[controlName] as FormGroup).controls;\n console.log('getPathFromRoot childControls', childControls);\n \n let childPath = this.getPathFromRoot(searchKey, childControls, [...pathArr, ...tempArr]);\n if (childPath !== '') return childPath;\n }\n }\n return '';\n }\n }\n\n /** FormBuilder Methods **/\n\n private _getFormGroupFromFieldsArr(fields: any): FormGroup {\n if (!this.outputs) {\n console.error('AmplifyFormBuilderService: Outputs not initialized. Call initializeOutputs() first.');\n return this.fb.group({});\n }\n\n console.log('_getFormGroupFromFieldsArr fields', fields);\n const formGroup = this.fb.group({});\n const fieldsArr = Object.values(fields);\n \n fieldsArr.forEach((field: any) => {\n if (this.skipFields.indexOf(field.name) > -1) return;\n\n if (typeof field.type === 'object') {\n if (field.type.model) {\n formGroup.addControl(field.name, this._getControlForField(field));\n }\n if (field.type.nonModel) {\n formGroup.addControl(field.name, this._getGroupControlForNonModel(field));\n }\n } else {\n formGroup.addControl(field.name, this._getControlForField(field));\n }\n });\n \n return formGroup;\n }\n\n private _getGroupControlForNonModel(field: any): FormGroup {\n if (!this.outputs) {\n console.error('AmplifyFormBuilderService: Outputs not initialized. Call initializeOutputs() first.');\n return this.fb.group({});\n }\n\n const nonModel = field.type.nonModel;\n const fields = this.outputs.data.model_introspection.nonModels[nonModel as keyof typeof this.outputs.data.model_introspection.nonModels].fields;\n return this._getFormGroupFromFieldsArr(fields);\n }\n\n private _getControlForField(field: any): FormControl {\n const validators = field.required ? [Validators.required] : [];\n return new FormControl(field.value || '', validators);\n }\n\n buildFormForModel(model: string): FormGroup {\n if (!this.outputs) {\n console.error('AmplifyFormBuilderService: Outputs not initialized. Call initializeOutputs() first.');\n return this.fb.group({});\n }\n\n const config = this.outputs.data.model_introspection.models[model as keyof typeof this.outputs.data.model_introspection.models].fields;\n const formGroup = this._getFormGroupFromFieldsArr(config);\n return formGroup;\n }\n}","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'valToTitle',\n standalone: true\n})\nexport class ValToTitlePipe implements PipeTransform {\n\n transform(value: string): string {\n if (!value) {\n return '';\n }\n\n let fixed = value.replace(new RegExp('_', 'g'), ' ').split(' ')\n .map(w => w.length > 0 ? w[0].toUpperCase() + w.substring(1).toLowerCase() : '')\n .join(' ');\n\n return fixed;\n }\n}","import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AmplifyModelService {\n\n private client: any;\n\n constructor() { \n // Client will be initialized when Amplify is configured by the consuming application\n }\n\n /**\n * Initialize the service with the Amplify client\n * This should be called by the consuming application after Amplify.configure()\n */\n initializeClient<T>(schema?: T) {\n // Dynamic import to avoid build-time dependency\n try {\n // This will be provided by the consuming application\n this.client = (globalThis as any).amplifyClient;\n if (!this.client) {\n console.warn('AmplifyModelService: No client provided. Call with generateClient result.');\n }\n } catch (error) {\n console.error('Failed to initialize Amplify client:', error);\n }\n }\n\n /**\n * Set the client directly (for consuming applications)\n */\n setClient(client: any) {\n this.client = client;\n }\n\n getMenuLinksFromModels(outputs: any, config?: { skipModels?: string[] }): any[] {\n const defaultConfig = { skipModels: ['ServiceCustomer', 'ServiceProduct', 'Todo'] };\n const finalConfig = { ...defaultConfig, ...config };\n\n let pageButtons: any[] = [{ label: 'Home', route: '/' }];\n let models = outputs.data.model_introspection.models;\n\n Object.values(models).forEach((model: any) => {\n if (finalConfig.skipModels!.includes(model.name)) return;\n console.log('model', model);\n pageButtons.push({ label: model.name, route: '/list/' + model.name });\n });\n console.log('models', models);\n\n return pageButtons;\n }\n\n /**\n * TODO: Make this generate dynamically using refModel Names and types\n * TODO: Bring the refModel generation in here.\n * Edit this function with form fields...\n * \n * ... probably don't need this...\n */\n getEmptyObjectForModel(model: string): any {\n switch (model) {\n case 'Customer':\n return {\n name: '',\n contact: {},\n services: [],\n contact_preference: '',\n notes: [],\n };\n case 'Service':\n return {\n cost: 0.00,\n price: 0.00,\n customers: [],\n products: [],\n id: '',\n title: ''\n };\n default:\n return {};\n }\n }\n\n getRelationshipChoices(config: any, selectedOptions?: any[]): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let filter: any = {};\n /*if (selectedOptions){ //TODO: FILTER OUT SELECTED ITEMS\n filter = {id: {nin: [...selectedOptions]}};\n }*/\n console.log('getRelationshipChoices filter', filter);\n\n try {\n const modelName = config.partnerModelName;\n if (this.client.models[modelName]) {\n return this.client.models[modelName].observeQuery({ filter: filter });\n } else {\n console.error(`Model ${modelName} not found in client`);\n return null;\n }\n } catch (error) {\n console.error('error fetching ' + config.partnerModelName + 'items', error);\n return null;\n }\n }\n\n getRefChoices(config: any, itemId: string, selectedOptions?: any[]): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let filter = this.getRelationshipFilter(config, itemId, selectedOptions);\n console.log('getRefChoices getRelationshipFilter model', config.partnerModelName, 'filter', filter);\n \n try {\n const modelName = config.partnerModelName;\n if (this.client.models[modelName]) {\n return this.client.models[modelName].observeQuery({ filter: filter });\n } else {\n console.error(`Model ${modelName} not found in client`);\n return null;\n }\n } catch (error) {\n console.error('error fetching ' + config.partnerModelName + 'items', error);\n return null;\n }\n }\n\n async deleteRelationship(relModel: string, relId: string): Promise<any> {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let obj = { id: relId };\n \n if (this.client.models[relModel]) {\n return this.client.models[relModel].delete(obj);\n } else {\n console.error(`Relationship model ${relModel} not found in client`);\n return null;\n }\n }\n\n createRelationship(relModel: string, relItem: any): Promise<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n console.log('createRelationship starting for relModel', relModel, 'relItem', relItem);\n \n if (this.client.models[relModel]) {\n return this.client.models[relModel].create(relItem);\n } else {\n console.error(`Relationship model ${relModel} not found in client`);\n return null;\n }\n }\n\n getRelationshipFilter(config: any, baseId?: string, removeIds?: string[]): any {\n let condition: any = {};\n condition[config.associatedWith] = { eq: baseId };\n \n if (removeIds && removeIds.length > 0) {\n let conditionArr = [\n condition,\n { id: { ne: removeIds } }\n ];\n let andCondition = { and: conditionArr };\n console.log('getRelationshipFilter has andCondition', andCondition);\n return andCondition;\n } else {\n condition[config.associatedWith] = { eq: baseId };\n console.log('getRelationshipFilter config', config, 'condition', condition);\n return condition;\n }\n }\n\n getAmplifySelectionSet(config: any, baseId: string): any {\n switch (config.fieldName) {\n case 'service':\n return ['id', 'service.title', 'service.price', 'service.id'] as const;\n case 'customer':\n return ['id', 'customer.*'] as const;\n default: \n return [];\n }\n }\n\n setRelatedSub(config: any, baseId: string): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let filter = this.getRelationshipFilter(config, baseId);\n const modelName = config.relationshipModelName;\n \n if (this.client.models[modelName]) {\n return this.client.models[modelName].onCreate({ filter: filter });\n } else {\n console.error(`Relationship model ${modelName} not found in client`);\n return null;\n }\n }\n\n /**\n * @param config {object} - see dynamic-relationship-builder.component getDetailsForManyToMany() for example of building config\n */\n getRelatedItems(config: any, baseId: string): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n let filter = this.getRelationshipFilter(config, baseId);\n let selectionSet = this.getAmplifySelectionSet(config, baseId);\n const modelName = config.relationshipModelName;\n\n if (this.client.models[modelName]) {\n return this.client.models[modelName].observeQuery({ \n filter: filter, \n selectionSet: [...selectionSet] \n });\n } else {\n console.error(`Relationship model ${modelName} not found in client`);\n return null;\n }\n }\n\n createItemPromise(model: string, payload: any): Promise<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n if (this.client.models[model]) {\n return this.client.models[model].create(payload);\n } else {\n console.error(`Model ${model} not found in client`);\n return null;\n }\n }\n\n updateItemForModel(model: string, payload: any): Promise<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n if (this.client.models[model]) {\n return this.client.models[model].update(payload);\n } else {\n console.error(`Model ${model} not found in client`);\n return null;\n }\n }\n\n getItemForModel(model: string, id: string): Promise<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n if (this.client.models[model]) {\n return this.client.models[model].get({ id: id });\n } else {\n console.error(`Model ${model} not found in client`);\n return null;\n }\n }\n\n listItemsForModel(model: string): Observable<any> | null {\n if (!this.client) {\n console.error('AmplifyModelService: Client not initialized. Call initializeClient() first.');\n return null;\n }\n\n console.log('this.listItems starting');\n \n try {\n if (this.client.models[model]) {\n return this.client.models[model].observeQuery();\n } else {\n console.error(`Model ${model} not found in client`);\n return null;\n }\n } catch (error) {\n console.error('error fetching ' + model, error);\n return null;\n }\n }\n}","import { ChangeDetectionStrategy, Component, Input, OnInit, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n FormControl,\n FormControlName,\n FormGroupDirective,\n NgForm,\n Validators,\n FormsModule,\n ReactiveFormsModule,\n FormGroup\n} from '@angular/forms';\nimport { AmplifyFormBuilderService } from '../../services/amplify-form-builder.service';\nimport { AmplifyModelService } from '../../services/amplify-model.service';\nimport { CommonModule } from '@angular/common';\nimport { ValToTitlePipe } from '../../pipes/val-to-title.pipe';\nimport { QuestionBase } from '../../classes/questions';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { provideNativeDateAdapter } from '@angular/material/core';\n\n\n@Component({\n selector: 'snteam-dynamic-form-question',\n standalone: true,\n providers: [provideNativeDateAdapter()],\n imports: [CommonModule, ReactiveFormsModule, ValToTitlePipe, MatFormFieldModule, MatInputModule, MatSelectModule, MatDatepickerModule],\n templateUrl: './dynamic-form-question.component.html',\n styleUrl: './dynamic-form-question.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DynamicFormQuestionComponent implements OnInit {\n @Input() question!: any; //QuestionBase<string>;\n @Input() formGroup!: FormGroup;\n\n formControlPath: string = '';\n materialInputs: string[] = [];\n switchInputs: string[] = [];\n refInputs: string[] = [];\n form!: any;\n ctrl!: any;\n items$!: Observable<any>\n\n afbs = inject(AmplifyFormBuilderService);\n\n constructor(private rootFormGroup: FormGroupDirective, private ams: AmplifyModelService) { }\n\n ngOnInit() {\n console.log('DynamicFormQuestionComponent question', this.question);\n this.form = this.rootFormGroup.control;\n this.ctrl = this.rootFormGroup.control.get(this.question.key);\n\n if (this.question.controlType == 'async-dropdown') {\n console.log('DynamicFormQuestionComponent has async-dropdown!');\n //this.items$ = this.ams.getRefChoices(this.question.targetModel);\n }\n }\n\n showError(): string {\n return this.afbs.getErrorStrForControl(this.ctrl, this.question.label);\n }\n}","<form [formGroup]=\"form\">\n @switch (afbs.getInputTypeFromFieldType(question.controlType)) {\n @case ('materialInputs'){\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <input matInput [formControlName]=\"question.key\" [id]=\"question.key\" [type]=\"question.type\">\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('datePickerInputs') {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <input matInput [matDatepicker]=\"picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('switchInputs') {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\">\n @for (opt of question.options; track opt) {\n <mat-option [value]=\"opt.key\">{{opt.value | valToTitle}}</mat-option>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('refInputs') {\n @if (question.multiple){\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\" multiple>\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title | valToTitle}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n @else {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\">\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title | valToTitle}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n }\n }\n</form>","import { Component, Input, OnInit, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n FormControl,\n FormControlName,\n FormGroupDirective,\n NgForm,\n Validators,\n FormsModule,\n ReactiveFormsModule,\n FormGroup\n} from '@angular/forms';\nimport { AmplifyFormBuilderService } from '../../services/amplify-form-builder.service';\nimport { CommonModule } from '@angular/common';\nimport { ValToTitlePipe } from '../../pipes/val-to-title.pipe';\nimport { QuestionBase } from '../../classes/questions';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport {MatSelectModule} from '@angular/material/select';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { provideNativeDateAdapter } from '@angular/material/core';\n\n\n@Component({\n selector: 'snteam-dynamic-nested-form-question',\n standalone: true,\n providers: [provideNativeDateAdapter()],\n imports: [CommonModule, ReactiveFormsModule, ValToTitlePipe, MatFormFieldModule, MatInputModule, MatSelectModule, MatDatepickerModule],\n templateUrl: './dynamic-nested-form-question.component.html',\n styleUrl: './dynamic-nested-form-question.component.css'\n})\nexport class DynamicNestedFormQuestionComponent {\n\n @Input() groupName!: string;\n @Input() question!: any; //QuestionBase<string>;\n @Input() formGroup!: FormGroup;\n\n formControlPath: string = '';\n form!: any;\n ctrl!: any;\n items$!: Observable<any>;\n afbs = inject(AmplifyFormBuilderService);\n\n\n constructor(private rootFormGroup: FormGroupDirective) {}\n\n ngOnInit() {\n console.log('DynamicNestedFormQuestionComponent question', this.question);\n var searchKey = this.groupName;\n var controls = this.rootFormGroup.control.controls;\n var pathStr = this.afbs.getPathFromRoot(searchKey, controls)//this.getPathFromRoot();\n this.form = this.rootFormGroup.control;\n this.formControlPath = pathStr + '.' + this.question.key;\n this.ctrl = this.rootFormGroup.control.get(this.formControlPath);\n if (this.question.key == 'services') console.log('DynamicNestedFormQuestionComponent has services');\n }\n\n showError():string {\n return this.afbs.getErrorStrForControl(this.ctrl, this.question.label);\n }\n}","<form autocomplete=\"off\" [formGroup]=\"formGroup\">\n <div [formGroupName]=\"groupName\">\n\n @switch (afbs.getInputTypeFromFieldType(question.controlType)) {\n @case ('materialInputs'){\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <input matInput [formControlName]=\"question.key\" [id]=\"question.key\" [type]=\"question.type\">\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('datePickerInputs') {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <input matInput [matDatepicker]=\"picker\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('switchInputs') {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\">\n @for (opt of question.options; track opt) {\n <mat-option [value]=\"opt.key\">{{opt.value | valToTitle}}</mat-option>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n\n @case ('refInputs') {\n @if (question.multiple){\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\" multiple>\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title | valToTitle}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n @else {\n <mat-form-field class=\"full-width\" appearance=\"outline\">\n <mat-label [attr.for]=\"question.key\">{{ question.label }}</mat-label>\n <mat-select [id]=\"question.key\" [formControlName]=\"question.key\">\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title | valToTitle}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n @if (ctrl.errors) {\n <mat-error>{{showError()}}</mat-error>\n }\n </mat-form-field>\n }\n }\n }\n\n\n </div>\n</form>","import { Component, Input, OnInit } from '@angular/core';\nimport {\n FormControl,\n FormGroupDirective,\n NgForm,\n Validators,\n FormsModule,\n ReactiveFormsModule,\n FormGroup,\n AbstractControl\n} from '@angular/forms';\nimport { CommonModule } from '@angular/common';\n\nimport { ValToTitlePipe } from '../../pipes/val-to-title.pipe';\n\nimport { MatDividerModule } from '@angular/material/divider';\nimport { AmplifyFormBuilderService } from '../../services/amplify-form-builder.service';\nimport { DynamicNestedFormQuestionComponent } from '../dynamic-nested-form-question/dynamic-nested-form-question.component';\n\n@Component({\n selector: 'snteam-dynamic-form-group',\n standalone: true,\n imports: [CommonModule, ReactiveFormsModule,\n MatDividerModule,\n ValToTitlePipe, DynamicNestedFormQuestionComponent],\n templateUrl: './dynamic-form-group.component.html',\n styleUrl: './dynamic-form-group.component.css'\n})\nexport class DynamicFormGroupComponent {\n @Input() formGroupName!: string;\n @Input() question!: any; //QuestionBase<string>;\n @Input() formGroup!: FormGroup;\n\n materialInputs: string[] = [];\n switchInputs: string[] = [];\n refInputs: string[] = [];\n formGroupInputs: string[] = ['formgroup'];\n form!: any;\n ctrl!: any;\n\n constructor(private rootFormGroup: FormGroupDirective, private afbs: AmplifyFormBuilderService) { }\n\n getControlName(c: AbstractControl): string | null {\n if (c.parent) {\n const formGroup: any = c.parent.controls;\n return Object.keys(formGroup).find(name => c === formGroup[name]) || null;\n }\n return null;\n }\n\n getPathFromRoot(controls?: any, pathArr?: string[]): string {\n if (!controls) controls = this.rootFormGroup.control.controls;\n if (!pathArr) pathArr = [];\n\n var isInControls = Object.keys(controls).find(name => name === this.question.key);\n if (isInControls) {\n pathArr.push(this.question.key);\n return pathArr.join('.');\n } else {\n var tempArr: string[] = [];\n var entries = Object.entries(controls);\n for (let e of entries) {\n let controlName = e[0];\n let controlObj = e[1];\n if (controlObj instanceof FormGroup) {\n //if (tempArr.length > 10) return '';\n tempArr.push(controlName);\n var childControls = controls[controlName].controls;\n let childPath = this.getPathFromRoot(childControls, tempArr);\n if (childPath != '') return childPath;\n };\n }\n return '';\n }\n\n return '';\n\n }\n\n ngOnInit() {\n //console.log('DynamicFormGroupComponent key starting:', this.question.key);\n\n this.materialInputs = this.afbs.getMaterialInputs();\n this.switchInputs = this.afbs.getSwitchInputs();\n this.refInputs = this.afbs.getRefInputs();\n\n if (this.formGroupName) {\n var searchKey = this.question.key;\n var controls = this.rootFormGroup.control.controls;\n var pathStr = this.afbs.getPathFromRoot(searchKey, controls)//this.getPathFromRoot();\n this.form = this.rootFormGroup.control.get(pathStr) as FormGroup;\n var controlName = this.getControlName(this.form);\n this.ctrl = this.rootFormGroup.control.get(this.question.key);\n console.log('DynamicFormGroupComponent init vals:', {\n formGroupName: this.formGroupName,\n question: this.question,\n key: this.question.key,\n searchKey: searchKey,\n controls: controls,\n pathStr: pathStr,\n controlName: controlName,\n ctrl: this.ctrl\n })\n }\n else {\n //console.log('DynamicFormGroupComponent will get main control form');\n this.form = this.rootFormGroup.control;\n }\n //console.log('DynamicFormGroupComponent question', this.question, 'form', this.form, 'formGroupName', typeof this.formGroupName, this.formGroupName);\n }\n}","<form autocomplete=\"off\" [formGroup]=\"form\">\n <h2>{{question.key | valToTitle}}</h2>\n <mat-divider></mat-divider>\n @for (q of $any(question).questions; track q) {\n @if (q.controlType != 'formgroup') {\n <div class=\"form-row\">\n <snteam-dynamic-nested-form-question [question]=\"q\" [formGroup]=\"formGroup\" [groupName]=\"question.key\"></snteam-dynamic-nested-form-question>\n </div>\n }\n @if (q.controlType == 'formgroup') {\n <div class=\"group-row\">\n <snteam-dynamic-form-group [question]=\"q\" [formGroup]=\"form\" [formGroupName]=\"q.key\"></snteam-dynamic-form-group>\n </div>\n }\n }\n <mat-divider></mat-divider>\n</form>","import { ChangeDetectionStrategy, Component, OnInit, inject, model, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport {\n MAT_DIALOG_DATA,\n MatDialog,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n MatDialogTitle,\n} from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { AmplifyModelService } from '../../services/amplify-model.service';\n\nexport interface DialogData {\n modelItem: any;\n rel: any;\n selectedItems: any[];\n}\n\n@Component({\n selector: 'snteam-add-relationship-dialog',\n standalone: true,\n imports: [\n CommonModule,\n MatFormFieldModule,\n MatInputModule,\n FormsModule,\n MatSelectModule,\n MatButtonModule,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n MatDialogClose,],\n templateUrl: './add-relationship-dialog.component.html',\n styleUrl: './add-relationship-dialog.component.css'\n})\nexport class AddRelationshipDialogComponent implements OnInit {\n readonly dialogRef = inject(MatDialogRef<AddRelationshipDialogComponent>);\n readonly data = inject<DialogData>(MAT_DIALOG_DATA);\n readonly modelItem = model(this.data.modelItem);\n private ams = inject(AmplifyModelService);\n items$!: Observable<any>;\n\n ngOnInit() {\n console.log('AddRelationshipDialogComponent init this.data', this.data);\n let selectedIdsArr: string[] = [];\n if (this.data.selectedItems && this.data.selectedItems.length > 0){\n this.data.selectedItems.forEach(item => {\n console.log('item', item, 'this.data.rel', this.data.rel);\n selectedIdsArr.push(item[this.data.rel.fieldName].id);\n });\n }\n console.log('AddRelationshipDialogComponent selectedIdsArr', selectedIdsArr);\n const relationshipChoices = this.ams.getRelationshipChoices(this.data.rel, selectedIdsArr);\n if (relationshipChoices) {\n this.items$ = relationshipChoices;\n }\n console.log('AddRelationshipDialogComponent this.items$', this.items$);\n }\n\n onNoClick(): void {\n this.dialogRef.close();\n }\n}","<h2 mat-dialog-title>Add New {{data.rel.partnerModelName}}</h2>\n<mat-dialog-content>\n <mat-select [(ngModel)]=\"modelItem\">\n @if (items$ | async; as items) {\n @for (item of items.items; track item?.id) {\n <mat-option [value]=\"item\">{{item.title}}</mat-option>\n }\n } @else {\n <p>Loading Items...</p>\n }\n </mat-select>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"onNoClick()\">Cancel</button>\n <button mat-button [mat-dialog-close]=\"modelItem()\" cdkFocusInitial>Add</button>\n</mat-dialog-actions>","import { Component, Input, OnInit, ChangeDetectionStrategy, inject, model, signal } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport {\n MAT_DIALOG_DATA,\n MatDialog,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n MatDialogTitle,\n} from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { AmplifyModelService } from '../../services/amplify-model.service';\n\nimport { AddRelationshipDialogComponent } from '../add-relationship-dialog/add-relationship-dialog.component';\n\n// Note: These imports will need to be updated based on the actual Amplify setup in the consuming application\n// import type { Schema } from '../../../../amplify/data/resource';\n// import outputs from '../../../../amplify_outputs.json';\n\n@Component({\n selector: 'snteam-dynamic-relationship-builder',\n standalone: true,\n imports: [MatToolbarModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, MatListModule,\n FormsModule,\n CommonModule],\n templateUrl: './dynamic-relationship-builder.component.html',\n styleUrl: './dynamic-relationship-builder.component.css'\n})\nexport class DynamicRelationshipBuilderComponent implements OnInit {\n @Input() m2m!: any;\n @Input() item!: any;\n @Input() model!: string;\n\n m2mItems: any;\n\n constructor(private ams: AmplifyModelService) { }\n\n modelItem!: any;// = signal('');\n readonly dialog = inject(MatDialog);\n\n ngOnInit() {\n console.log('DynamicRelationshipBuilderComponent model', this.m2m);\n this.listItems();\n this.setCreateSubscription();\n }\n\n async perhapsAddM2MItem (item: any){\n let m2mItem:any = {id: item.id};\n const { data: retItem } = await item[this.m2m.fieldName]();\n m2mItem[this.m2m.fieldName] = retItem;\n\n let existingInd = this.m2mItems.findIndex((x: any) => x.id == item.id);\n if (existingInd > -1){\n if (!this.m2mItems[existingInd][this.m2m.fieldName]) {\n console.log('would delete existing', this.m2mItems[existingInd]);\n this.m2mItems.splice(existingInd, 1);\n }\n }\n this.m2mItems.push(m2mItem);\n //console.log('perhapsAddM2MItem', item, 'm2m', this.m2m);\n }\n\n setCreateSubscription() {\n this.ams.setRelatedSub(this.m2m, this.item.id)?.subscribe({\n next: (data) => this.perhapsAddM2MItem(data),//(console.log('setRelatedSub m2mItems', this.m2mItems, 'data', data),\n error: (error) => console.warn(error),\n });\n }\n\n listItems() {\n this.ams.getRelatedItems(this.m2m, this.item.id)?.subscribe({\n next: ({ items, isSynced }) => {\n this.m2mItems = items;\n },\n });\n }\n\n /**\n Customize this function to include all desired models from your file\n */\n setModelItem(model?: string) {\n let mdl = model || this.model;\n console.log('setModelItem mdl', mdl);\n this.modelItem = signal<any>(this.ams.getEmptyObjectForModel(mdl));\n }\n\n async deleteRelatedItem(item: any) {\n console.log('deleteRelatedItem for item', item, 'm2m', this.m2m);\n //this.ams.deleteRelationship(this.m2m.relationshipModelName, item.id);\n await this.ams.deleteRelationship(this.m2m.relationshipModelName, item.id);\n }\n\n openDialog(rel: any): void {\n console.log('openDialog clicked for rel', rel);\n this.setModelItem(rel.partnerModelName);\n\n const dialogRef = this.dialog.open(AddRelationshipDialogComponent, {\n data: { rel: rel, modelItem: this.modelItem(), selectedItems: this.m2mItems },\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) this.handleDialogResult(result, rel);\n });\n }\n\n handleDialogResult(result: any, rel: any) {\n if (!result) return;\n console.log('handleDialogResult', result, 'rel', rel);\n if (result !== undefined) {\n this.modelItem.set(result);\n }\n\n let relIdName = rel.partnerModelName.toLowerCase() + 'Id';\n let thisIdName = rel.baseModelName.toLowerCase() + 'Id';\n\n let newRelObj: any = {};\n newRelObj[relIdName] = result.id;\n newRelObj[thisIdName] = this.item.id;\n\n this.ams.createRelationship(rel.relationshipModelName, newRelObj);\n }\n}","<div class=\"record-relationship-holder\">\n <div class=\"relationship-type\">\n <mat-toolbar>\n <span>{{m2m.partnerModelName}} Management</span>\n <span class=\"rel-title-spacer\"></span>\n <button mat-icon-button attr.aria-label=\"Add {{m2m.name}}\" (click)=\"openDialog(m2m)\">\n <mat-icon>add</mat-icon>\n </button>\n </mat-toolbar>\n @if(m2mItems && m2mItems.length > 0){\n <mat-list>\n @for (item of m2mItems; track item?.id) {\n @if(item[m2m.fieldName]){\n <mat-list-item>\n <span matListItemTitle>{{item[m2m.fieldName].name || item[m2m.fieldName].title}}</span>\n <button mat-icon-button (click)=\"deleteRelatedItem(item)\" matListItemMeta>\n <mat-icon>delete</mat-icon>\n </button>\n </mat-list-item>\n }\n }\n </mat-list>\n }\n @else {\n Add your first {{m2m.partnerModelName}}\n }\n </div>\n</div>","import { Component, Input, OnInit, ChangeDetectionStrategy, inject, model, signal } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport {\n MAT_DIALOG_DATA,\n MatDialog,\n MatDialogActions,\n MatDialogClose,\n MatDialogContent,\n MatDialogRef,\n MatDialogTitle,\n} from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { AmplifyModelService } from '../../services/amplify-model.service';\n\nimport { DynamicRelationshipBuilderComponent } from '../dynamic-relationship-builder/dynamic-relationship-builder.component';\nimport { AddRelationshipDialogComponent } from '../add-relationship-dialog/add-relationship-dialog.component';\n\n// Note: These imports will need to be updated based on the actual Amplify setup in the consuming application\n// import type { Schema } from '../../../../amplify/data/resource';\n// import outputs from '../../../../amplify_outputs.json';\n\n@Component({\n selector: 'snteam-record-relationships',\n standalone: true,\n imports: [MatToolbarModule, MatButtonModule, MatIconModule, MatFormFieldModule, MatInputModule, MatListModule,\n DynamicRelationshipBuilderComponent,\n FormsModule,\n CommonModule],\n templateUrl: './record-relationships.component.html',\n styleUrl: './record-relationships.component.css'\n})\nexport class RecordRelationshipsComponent implements OnInit {\n\n @Input() model: string = '';\n @Input() id?: string;\n @Input() item?: any;\n @Input() amplifyOutputs?: any; // Allow injection of amplify outputs\n\n constructor(private ams: AmplifyModelService) { }\n\n m2mDetailArrays: any[] = [];\n\n //readonly animal = signal('');\n modelItem!: any;// = signal('');\n readonly dialog = inject(MatDialog);\n\n ngOnInit() {\n console.log('DynamicRelationshipBuilderComponent model', this.model, 'id', this.id, 'item', this.item);\n //this.setModelItem();\n\n if (!this.amplifyOutputs) {\n console.warn('RecordRelationshipsComponent: amplifyOutputs not provided. Component may not function correctly.');\n return;\n }\n\n console.log('DynamicRelationshipBuilderComponent outputs.data.model_introspection.models', this.amplifyOutputs.data.model_introspection.models);\n var fields = this.amplifyOutputs.data.model_introspection.models[this.model as keyof typeof this.amplifyOutputs.data.model_introspection.models].fields;\n var values = Object.values(fields);\n\n for (var v in values) {\n var fieldObj: any = values[v];\n if (typeof fieldObj.type != 'object') continue;\n if (!fieldObj.type.model) continue;\n\n let m2mDetails = this.getDetailsForManyToMany(fieldObj, this.model);\n\n if (m2mDetails) {\n this.m2mDetailArrays.push(m2mDetails);\n }\n\n console.log('DynamicRelationshipBuilderComponent ref field', fieldObj);\n console.log('DynamicRelationshipBuilderComponent m2mDetails', m2mDetails);\n }\n console.log('DynamicRelationshipBuilderComponent m2mDetailArrays', this.m2mDetailArrays);\n }\n\n /**\n Customize this function to include all desired models from your file\n */\n setModelItem(model?: string) {\n let mdl = model || this.model;\n console.log('setModelItem mdl', mdl);\n signal<any>(this.ams.getEmptyObjectForModel(mdl));\n }\n\n getFieldNameForAssociatedWithModel(relationshipModelName: string, associatedWith: string) {\n if (!this.amplifyOutputs) return;\n \n var relationshipModel = this.amplifyOutputs.data.model_introspection.models[relationshipModelName as keyof typeof this.amplifyOutputs.data.model_introspection.models].fields;\n console.log('getFieldNameForAssociatedWithModel relationshipModel', relationshipModel);\n var fieldVals = Object.values(relationshipModel);\n for (let field of fieldVals) {\n const fieldAny = field as any;\n console.log('getFieldNameForAssociatedWithModel field', field);\n if (!fieldAny.association) continue;\n if (fieldAny.association.targetNames.indexOf(associatedWith) > -1) continue;\n // there should only be two fields with associations.\n // if we get here we are in the field we want\n return fieldAny.name;\n }\n }\n\n getDetailsForManyToMany(fieldObj: any, baseModelName: string): any {\n if (!this.amplifyOutputs) return null;\n \n let relationshipModelName = fieldObj.type.model;\n let associatedWith = fieldObj.association.associatedWith[0]; //TODO this may not work for more complex Schemas!!!\n\n console.log('getDetailsForManyToMany relationshipModelName', relationshipModelName, 'baseModelName', baseModelName);\n this.getFieldNameForAssociatedWithModel(relationshipModelName, associatedWith);\n\n // TODO: MAKE THIS AUTO REFRESH... maybe make this a signal?\n let ret: any = {\n relationshipModelName: relationshipModelName,\n baseModelName: baseModelName,\n fieldName: this.getFieldNameForAssociatedWithModel(relationshipModelName, associatedWith),\n associatedWith: associatedWith\n }\n var relationshipModel = this.amplifyOutputs.data.model_introspection.models[relationshipModelName as keyof typeof this.amplifyOutputs.data.model_introspection.models].fields;\n\n var vals = Object.values(relationshipModel);\n for (var i in vals) {\n const val: any = vals[i];\n if (typeof val.type != 'object') continue;\n if (!val.type.model) continue;\n if (val.type.model == baseModelName) continue;\n\n console.log('vals[i]', vals[i]);\n var modelName = val.type.model;\n let refModel = this.amplifyOutputs.data.model_introspection.models[modelName as keyof typeof this.amplifyOutputs.data.model_introspection.models].fields;\n\n ret.partnerModelName = modelName;\n //this.ams.getRelatedItems(ret, this.item.id);\n }\n console.log('getDetailsForManyToMany ret', ret);\n return ret;\n }\n\n deleteRelatedItem(item: any) {\n console.log('deleteRelatedItem for item', item);\n }\n\n openDialog(rel: any): void {\n console.log('openDialog clicked for rel', rel);\n this.setModelItem(rel.partnerModelName);\n\n const dialogRef = this.dialog.open(AddRelationshipDialogComponent, {\n data: { rel: rel, modelItem: this.modelItem() },\n });\n\n dialogRef.afterClosed().subscribe(result => {\n console.log('The dialog was closed');\n this.handleDialogResult(result, rel);\n });\n }\n\n handleDialogResult(result: any, rel: any) {\n console.log('handleDialogResult', result, 'rel', rel);\n if (result !== undefined) {\n this.modelItem.set(result);\n }\n\n let relIdName = rel.partnerModelName.toLowerCase() + 'Id';\n let thisIdName = rel.baseModelName.toLowerCase() + 'Id';\n\n let newRelObj: any = {};\n newRelObj[relIdName] = result.id;\n newRelObj[thisIdName] = this.id || this.item.id;\n\n this.ams.createRelationship(rel.relationshipModelName, newRelObj);\n }\n}","<div class=\"relationship-builder-holder\">\n @if(item){\n <div class=\"relationship-builder\">\n @for (m2m of m2mDetailArrays; track m2m) {\n <snteam-dynamic-relationship-builder [m2m]=\"m2m\" [item]=\"item\" [model]=\"model\"></snteam-dynamic-relationship-builder>\n }\n </div>\n }\n @else {\n <div class=\"blank-relationship-builder\">Create the {{model}} first, then add relationships</div>\n }\n</div>","import { FormControl, FormGroup, Validators, ValidatorFn } from '@angular/forms';\n\nexport class QuestionBase<T> {\n model: string;\n value: T | undefined;\n key: string;\n label: string;\n required: boolean;\n order: number;\n controlType: string;\n type: string;\n options: { key: string, value: string }[];\n tooltip?: string;\n validators?: ValidatorFn[];\n\n constructor(options: {\n model?: string;\n value?: T;\n key?: string;\n label?: string;\n required?: boolean;\n order?: number;\n controlType?: string;\n type?: string;\n options?: { key: string, value: string }[];\n tooltip?: string;\n validators?: ValidatorFn[];\n } = {}) {\n this.model = options.model || '';\n this.value = options.value;\n this.key = options.key || '';\n this.label = options.label || '';\n this.required = !!options.required;\n this.order = options.order === undefined ? 1 : options.order;\n this.controlType = options.controlType || '';\n this.type = options.type || '';\n this.options = options.options || [];\n this.tooltip = options.tooltip || '';\n this.validators = options.validators;\n }\n}\n\nexport class TimePickerQuestion<T> extends QuestionBase<T> {\n override controlType = 'time';\n\n constructor(options: any = {}) {\n super(options);\n }\n}\n\nexport class DatePickerQuestion<T> extends QuestionBase<T> {\n override controlType = 'date';\n min: Date;\n max: Date;\n startDate: Date;\n\n constructor(options: any = {}) {\n super(options);\n this.min = new Date(options['min']) ?? new Date('January 01, 1900 00:00:00');\n var thisYear = new Date().getUTCFullYear;\n this.max = new Date(options['max']) ?? new Date('December 31 ' + thisYear + ' 23:59:59');\n this.startDate = new Date(options['startDate']) ?? new Date();\n }\n}\n\nexport class DateTimePickerQuestion<T> extends QuestionBase<T> {\n override controlType = 'date-time';\n min: Date;\n max: Date;\n startDate: Date;\n\n constructor(options: any = {}) {\n super(options);\n this.min = new Date(options['min']) ?? new Date('January 01, 1900 00:00:00');\n var thisYear = new Date().getUTCFullYear;\n this.max = new Date(options['max']) ?? new Date('December 31 ' + thisYear + ' 23:59:59');\n this.startDate = new Date(options['startDate']) ?? new Date();\n }\n}\n\nexport class SliderQuestion<T> extends QuestionBase<T> {\n override controlType = 'slider';\n min: number;\n max: number;\n\n constructor(options: any = {}) {\n super(options);\n this.min = options['min'] || 0;\n this.max = options['max'] || 100;\n }\n}\n\nexport class NumberQuestion<T> extends QuestionBase<T> {\n override controlType = 'number';\n}\n\nexport class TextboxQuestion<T> extends QuestionBase<T> {\n override controlType = 'textbox';\n}\n\nexport class EmailQuestion<T> extends QuestionBase<T> {\n override controlType = 'email';\n}\n\nexport class PhoneQuestion<T> extends QuestionBase<T> {\n override controlType = 'tel';\n}\n\nexport class DropdownQuestion<T> extends QuestionBase<T> {\n override controlType = 'dropdown';\n}\n\nexport class AsyncDropdownQuestion<T> extends QuestionBase<T> {\n override controlType = 'async-dropdown';\n targetModel: string;\n multiple: boolean;\n ddbKey: string;\n \n constructor(options: any = {}) {\n super(options);\n this.targetModel = options['targetModel'];\n this.multiple = options['multiple'];\n this.ddbKey = options['ddbKey'];\n }\n}\n\nexport class FormGroupQuestion<T> extends QuestionBase<T> {\n override controlType = 'formgroup';\n formGroup: FormGroup;\n questions: QuestionBase<T>[] | null = [];\n \n constructor(options: any = {}) {\n super(options);\n this.formGroup = options['formGroup'];\n this.questions = options['questions'];\n }\n}","import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\n\n// Simple phone number validator (can be customized further)\nexport function phoneNumberValidator(): ValidatorFn {\n return (control: AbstractControl): ValidationErrors | null => {\n const phoneNumber = control.value;\n\n // Use a regular expression to validate the phone number format\n const regex = /^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$/;\n if (!phoneNumber || regex.test(phoneNumber)) {\n return null; // Valid phone number\n } else {\n return { invalidPhoneNumber: true }; // Invalid phone number\n }\n };\n}","import { Injectable } from '@angular/core';\nimport { FormControl, FormGroup, Validators } from '@angular/forms';\nimport {\n QuestionBase,\n TextboxQuestion,\n NumberQuestion,\n DatePickerQuestion,\n DropdownQuestion,\n AsyncDropdownQuestion,\n FormGroupQuestion,\n PhoneQuestion,\n EmailQuestion\n} from '../classes/questions';\n\nimport { phoneNumberValidator } from '../classes/validators';\nimport { AmplifyModelService } from './amplify-model.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class QuestionControlService {\n\n private outputs: any;\n\n constructor(private ams: AmplifyModelService) { }\n\n /**\n * Initialize the service with Amplify outputs\n * This should be called by the consuming application after Amplify.configure()\n */\n initializeOutputs(outputs: any) {\n console.log('QuestionControlService: initializeOutputs called with:', outputs);\n this.outputs = outputs;\n console.log('QuestionControlService: outputs stored:', this.outputs);\n }\n\n getFieldForFieldObj(fieldObj: any, model: any): QuestionBase<any> | null {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return null;\n }\n\n console.log('getFieldForFieldObj starting for type', fieldObj.type, 'fieldObj', fieldObj);\n \n switch (fieldObj.type) {\n case 'String':\n return this._addStringQuestion(fieldObj, model);\n case 'Int':\n case 'Float':\n return this._addNumberQuestion(fieldObj, model);\n case 'AWSDate':\n case 'AWSDateTime':\n return this._addDatePickerQuestion(fieldObj, model);\n case 'AWSEmail':\n return this._addEmailQuestion(fieldObj, model);\n case 'AWSPhone':\n return this._addPhoneQuestion(fieldObj, model);\n }\n\n if (typeof fieldObj.type === 'object') {\n if (fieldObj.type.model) {\n return this.getRefModel(fieldObj, model);\n }\n if (fieldObj.type.nonModel) {\n let groupQuestions = this.getNonModelQuestions(fieldObj, model);\n var formGroup = this.toFormGroup(groupQuestions);\n return this._addFormGroupQuestion(fieldObj, formGroup, groupQuestions);\n }\n if (fieldObj.type.enum) {\n return this.getEnumQuestion(fieldObj, model);\n }\n }\n\n return null;\n }\n\n getLabelForFieldName(name: string): string {\n return name.toLowerCase().split('_').map((word: string) => {\n return word.charAt(0).toUpperCase() + word.slice(1);\n }).join(' ');\n }\n\n getQuestionsForModelFields(model: string): QuestionBase<any>[] {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return [];\n }\n\n if (!model) {\n console.error('QuestionControlService: No model name provided');\n return [];\n }\n\n console.log('outputs.data.model_introspection', this.outputs.data.model_introspection);\n console.log('Looking for model:', model);\n \n if (!this.outputs.data || !this.outputs.data.model_introspection || !this.outputs.data.model_introspection.models) {\n console.error('QuestionControlService: Invalid outputs structure', this.outputs);\n return [];\n }\n \n console.log('Available models:', Object.keys(this.outputs.data.model_introspection.models));\n \n const modelData = this.outputs.data.model_introspection.models[model as keyof typeof this.outputs.data.model_introspection.models];\n if (!modelData) {\n console.error(`Model \"${model}\" not found in model introspection. Available models:`, Object.keys(this.outputs.data.model_introspection.models));\n return [];\n }\n \n console.log('Found model data:', modelData);\n \n const fields = modelData.fields;\n if (!fields) {\n console.error(`Fields not found for model \"${model}\"`, modelData);\n return [];\n }\n \n console.log('Found fields:', fields);\n \n const questions: QuestionBase<any>[] = [];\n const values = Object.values(fields);\n const skipFields = ['createdAt', 'updatedAt', 'id'];\n \n for (const fieldObj of values) {\n if (skipFields.indexOf((fieldObj as any).name) > -1) continue;\n\n if (typeof (fieldObj as any).type === 'object' && (fieldObj as any).type.model) {\n continue; // skip model relationship fields\n }\n\n const q = this.getFieldForFieldObj(fieldObj, model);\n if (q) {\n questions.push(q);\n } else {\n console.log('no question returned for fieldObj', fieldObj, 'model', model);\n }\n }\n \n console.log('getQuestionsForModelFields questions', questions);\n return questions;\n }\n\n /** nonModel, form section Methods **/\n getNonModelQuestions(fieldObj: any, model: any): QuestionBase<any>[] {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return [];\n }\n\n const nonModel = fieldObj.type.nonModel;\n const fields = this.outputs.data.model_introspection.nonModels[nonModel as keyof typeof this.outputs.data.model_introspection.nonModels].fields;\n const questions: QuestionBase<any>[] = [];\n const values = Object.values(fields);\n const skipFields = ['createdAt', 'updatedAt'];\n \n for (const nestedFieldObj of values) {\n const question = this.getFieldForFieldObj(nestedFieldObj, model);\n if (question) {\n questions.push(question);\n }\n }\n \n console.log('getNonModelQuestions questions', questions);\n return questions;\n }\n\n getEnumQuestion(fieldObj: any, model: any): DropdownQuestion<any> | null {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return null;\n }\n\n const enumName = fieldObj.type.enum;\n const e = this.outputs.data.model_introspection.enums[enumName as keyof typeof this.outputs.data.model_introspection.enums];\n console.log('getEnumQuestion e', e);\n \n const choices: any[] = [];\n e.values.forEach((val: string) => {\n choices.push({ key: val, value: val });\n });\n \n return this._addDropdownQuestion(fieldObj, choices, model);\n }\n\n /** Reference Field Methods **/\n getRefModel(fieldObj: any, callingModel: string): AsyncDropdownQuestion<any> | null {\n if (!this.outputs) {\n console.error('QuestionControlService: Outputs not initialized. Call initializeOutputs() first.');\n return null;\n }\n\n console.log('getRefModel starting for fieldObj', fieldObj);\n \n const referenceModel = fieldObj.type.model;\n const relModel = this.outputs.data.model_introspection.models[referenceModel as keyof typeof this.outputs.data.model_introspection.models].fields;\n\n const vals = Object.values(relModel);\n for (const val of vals) {\n const fieldVal = val as any;\n if (typeof fieldVal.type !== 'object') continue;\n if (!fieldVal.type.model) continue;\n if (fieldVal.type.model === callingModel) continue;\n\n const modelName = fieldVal.type.model;\n return this._addRefDropdownQuestion(fieldObj, callingModel, modelName);\n }\n\n return null;\n }\n\n private _addFormGroupQuestion(fieldObj: any, formGroup: FormGroup, questions: QuestionBase<any>[]): FormGroupQuestion<any> {\n const name = fieldObj.name.toString();\n return new FormGroupQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'formgroup',\n formGroup: formGroup,\n questions: questions\n });\n }\n\n private _addDropdownQuestion(fieldObj: any, items: any[], model: string): DropdownQuestion<any> {\n console.log('_addDropdownQuestion for fieldObj', fieldObj, 'items', items);\n \n const name = fieldObj.name.toString();\n return new DropdownQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n options: items,\n type: 'dropdown',\n model: model\n });\n }\n\n private _addRefDropdownQuestion(fieldObj: any, model: string, targetModel: string): AsyncDropdownQuestion<any> {\n console.log('_addRefDropdownQuestion for fieldObj', fieldObj);\n \n const name = fieldObj.name.toString();\n return new AsyncDropdownQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'dropdown',\n model: model,\n targetModel: targetModel,\n multiple: fieldObj.association?.connectionType === \"HAS_MANY\"\n });\n }\n\n private _addDatePickerQuestion(fieldObj: any, model: string): DatePickerQuestion<any> {\n const name = fieldObj.name.toString();\n return new DatePickerQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'date',\n model: model\n });\n }\n\n private _addNumberQuestion(fieldObj: any, model: string): NumberQuestion<any> {\n const name = fieldObj.name.toString();\n return new NumberQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'number',\n model: model\n });\n }\n\n private _addStringQuestion(fieldObj: any, model: string): TextboxQuestion<any> {\n const name = fieldObj.name.toString();\n return new TextboxQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'textbox',\n model: model\n });\n }\n\n private _addEmailQuestion(fieldObj: any, model: string): EmailQuestion<any> {\n const name = fieldObj.name.toString();\n return new EmailQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'email',\n validators: [Validators.email],\n model: model\n });\n }\n\n private _addPhoneQuestion(fieldObj: any, model: string): PhoneQuestion<any> {\n const name = fieldObj.name.toString();\n return new PhoneQuestion({\n key: name,\n label: this.getLabelForFieldName(fieldObj.name),\n required: fieldObj.isRequired,\n type: 'tel',\n validators: [phoneNumberValidator()],\n model: model\n });\n }\n\n toFormGroup(questions: (QuestionBase<any> | FormGroupQuestion<any>)[]): FormGroup {\n const group: any = {};\n\n questions.forEach(question => {\n if (!question) return;\n \n if ('questions' in question && question.questions) {\n group[question.key] = this.toFormGroup(question.questions as QuestionBase<any>[]);\n } else {\n const validators = [];\n \n if (question.required) {\n validators.push(Validators.required);\n }\n \n if (question.validators) {\n validators.push(...question.validators);\n }\n\n group[question.key] = new FormControl(question.value || '', validators);\n }\n });\n \n return new FormGroup(group);\n }\n}","import { Location } from '@angular/common';\nimport { Component, Input, OnInit, inject, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ActivatedRoute } from '@angular/router';\nimport {\n FormControl,\n FormGroupDirective,\n NgForm,\n ReactiveFormsModule,\n FormGroup\n} from '@angular/forms';\nimport { DynamicFormQuestionComponent } from '../dynamic-form-question/dynamic-form-question.component';\nimport { DynamicNestedFormQuestionComponent } from '../dynamic-nested-form-question/dynamic-nested-form-question.component';\nimport { DynamicFormGroupComponent } from '../dynamic-form-group/dynamic-form-group.component';\nimport { QuestionControlService } from '../../services/question-control.service';\nimport { AmplifyFormBuilderService } from '../../services/amplify-form-builder.service';\nimport { AmplifyModelService } from '../../services/amplify-model.service';\nimport { RecordRelationshipsComponent } from '../record-relationships/record-relationships.component';\nimport { QuestionBase, FormGroupQuestion } from '../../classes/questions';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatSnackBarModule, MatSnackBar } from '@angular/material/snack-bar';\nimport { MatButtonModule } from '@angular/material/button';\n\n/** Error when invalid control is dirty, touched, or submitted. */\nexport class MyErrorStateMatcher implements ErrorStateMatcher {\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n const isSubmitted = form && form.submitted;\n return !!(control && control.invalid && (control.dirty || control.touched || isSubmitted));\n }\n}\n\n@Component({\n standalone: true,\n selector: 'snteam-dynamic-form',\n imports: [\n CommonModule,\n DynamicFormQuestionComponent,\n DynamicNestedFormQuestionComponent,\n DynamicFormGroupComponent,\n RecordRelationshipsComponent,\n ReactiveFormsModule,\n MatFormFieldModule, \n MatInputModule, \n MatSelectModule, \n MatSnackBarModule, \n MatDividerModule,\n MatButtonModule\n ],\n templateUrl: './dynamic-form.component.html',\n styleUrl: './dynamic-form.component.css'\n})\nexport class DynamicFormComponent implements OnInit {\n\n @Input() model: string = \"\";\n @Input() itemId: string = \"\";\n @Input() valueMap?: any;\n @Input() hideRelationships: boolean = false;\n @Input() hideSaveButton: boolean = false;\n @Input() amplifyOutputs?: any; // Add amplify outputs input\n @Input() formViewId?: string; // Add FormView ID input\n \n @Output() itemOutput = new EventEmitter<any>();\n @Output() submitOutput = new EventEmitter<any>();\n @Output() formLoaded = new EventEmitter<FormGroup>();\n\n mdl: string = '';\n id: string = '';\n item: any;\n payLoad: any;\n form!: any;\n questions: (QuestionBase<any> | FormGroupQuestion<any>)[] | null = [];\n formView: any; // Store the FormView data\n formViewFields: any[] = []; // Store the FormViewField data\n\n materialInputs: string[] = [];\n switchInputs: string[] = [];\n formGroupInputs: string[] = ['formgroup'];\n refInputs: string[] = [];\n\n private ams = inject(AmplifyModelService);\n private _snackBar = inject(MatSnackBar);\n\n constructor(\n private qcs: QuestionControlService,\n private afb: AmplifyFormBuilderService,\n private location: Location,\n private route: ActivatedRoute\n ) { }\n\n get outputs() {\n return this.amplifyOutputs || (this.qcs as any).outputs;\n }\n\n ngOnInit() {\n console.log('DynamicFormComponent ngOnInit starting');\n this.materialInputs = this.afb.getMaterialInputs();\n this.switchInputs = this.afb.getSwitchInputs();\n this.refInputs = this.afb.getRefInputs();\n \n // Read from route parameters if available, otherwise use inputs\n this.route.paramMap.subscribe((params) => {\n console.log('DynamicFormComponent route params:', params);\n const routeModel = params.get('model');\n const routeId = params.get('id');\n const routeFormViewId = params.get('formViewId'); // Check for formViewId in route\n \n console.log('DynamicFormComponent routeModel:', routeModel, 'routeId:', routeId, 'routeFormViewId:', routeFormViewId);\n \n this.mdl = routeModel || this.model;\n this.id = routeId || this.itemId;\n this.formViewId = routeFormViewId || this.formViewId;\n\n console.log('DynamicFormComponent final mdl:', this.mdl, 'id:', this.id, 'formViewId:', this.formViewId);\n\n // If we have a formViewId, load the FormView first\n if (this.formViewId) {\n this.loadFormView();\n } else {\n // Original behavior - load all model fields\n if (this.id == '-1' || !this.id) {\n console.log('DynamicFormComponent calling setQuestionsAndForm for new item');\n this.setQuestionsAndForm();\n } else {\n console.log('DynamicFormComponent calling getItem for existing item');\n this.getItem();\n }\n }\n });\n }\n\n async loadFormView() {\n if (!this.formViewId) return;\n \n try {\n console.log('DynamicFormComponent: Loading FormView:', this.formViewId);\n \n // Get the FormView with its fields\n const { data: formView } = await this.ams.getItemForModel('FormView', this.formViewId);\n this.formView = formView;\n \n if (this.formView && this.formView.tableConfigId) {\n this.mdl = 'TableConfig'; // Set the model based on FormView's table\n \n // Get the FormViewFields for this FormView\n const formViewFields = await this.ams.listItemsForModel('FormViewField');\n if (formViewFields) {\n formViewFields.subscribe({\n next: ({ items }) => {\n this.formViewFields = items.filter((field: any) => field.formViewId === this.formViewId)\n .sort((a: any, b: any) => (a.order || 0) - (b.order || 0));\n console.log('DynamicFormComponent: FormViewFields loaded:', this.formViewFields);\n \n // Now proceed with form setup\n if (this.id == '-1' || !this.id) {\n this.setQuestionsAndForm();\n } else {\n this.getItem();\n }\n }\n });\n }\n }\n } catch (error) {\n console.error('DynamicFormComponent: Error loading FormView:', error);\n }\n }\n\n async getItem() {\n const { data: item } = await this.ams.getItemForModel(this.mdl, this.id);\n this.item = item;\n this.itemOutput.emit(this.item);\n this.setQuestionsAndForm();\n }\n\n setQuestionsAndForm() {\n if (!this.mdl) {\n console.error('DynamicFormComponent: No model specified');\n return;\n }\n\n if (!this.questions || this.questions.length == 0) {\n console.log('DynamicFormComponent: Getting questions for model:', this.mdl);\n try {\n if (this.formViewFields && this.formViewFields.length > 0) {\n // Use FormView fields to generate questions\n this.questions = this.getQuestionsFromFormViewFields();\n console.log('DynamicFormComponent: Questions from FormView received:', this.questions);\n } else {\n // Original behavior - use all model fields\n this.questions = this.qcs.getQuestionsForModelFields(this.mdl);\n console.log('DynamicFormComponent: Questions from model received:', this.questions);\n }\n } catch (error) {\n console.error('DynamicFormComponent: Error getting questions for model:', this.mdl, error);\n return;\n }\n }\n\n // Reset question values first\n for (let question of this.questions) {\n question.value = undefined; // Clear previous values\n }\n\n if (this.item) {\n for (let question of this.questions) {\n this.setQuestionValueFromItem(question);\n }\n }\n\n // Apply valueMap if provided\n if (this.valueMap) {\n for (let question of this.questions) {\n this.setQuestionValueFromValueMap(question, this.valueMap);\n }\n }\n\n // Always recreate the form to ensure it reflects current question values\n this.form = this.qcs.toFormGroup(this.questions as QuestionBase<any>[]);\n this.formLoaded.emit(this.form);\n console.log('this.item', this.item);\n }\n\n getQuestionsFromFormViewFields(): QuestionBase<any>[] {\n const questions: QuestionBase<any>[] = [];\n \n for (const formViewField of this.formViewFields) {\n // Create a mock field object that matches the structure expected by QuestionControlService\n const mockFieldObj = {\n name: formViewField.fieldName,\n type: formViewField.fieldType,\n isRequired: formViewField.required || false,\n attributes: []\n };\n \n const question = this.qcs.getFieldForFieldObj(mockFieldObj, this.mdl);\n if (question) {\n // Override the label if a custom displayLabel is provided\n if (formViewField.displayLabel) {\n question.label = formViewField.displayLabel;\n }\n \n // Set required status from FormViewField\n question.required = formViewField.required || false;\n \n questions.push(question);\n }\n }\n \n return questions;\n }\n\n setQuestionValueFromItem(question: any, item?: any) {\n if (!item) item = this.item;\n if (question.controlType == 'formgroup') {\n for (let q of question.questions) {\n this.setQuestionValueFromItem(q, item[question.key]);\n }\n }\n else if (item[question.key]) {\n question.value = item[question.key];\n } else {\n console.log('setQuestionValueFromItem no item found and not formgroup');\n }\n }\n\n setQuestionValueFromValueMap(question: any, valueMap: any) {\n if (question.controlType == 'formgroup') {\n for (let q of question.questions) {\n this.setQuestionValueFromValueMap(q, valueMap);\n }\n }\n else if (valueMap[question.key] !== undefined) {\n question.value = valueMap[question.key];\n }\n }\n\n getValueForKey(obj: any, key: string): any | null {\n if (obj === null || typeof obj !== 'object') {\n return null;\n }\n\n if (key in obj) {\n return obj[key];\n }\n\n for (const k in obj) {\n const result = this.getValueForKey(obj[k], key);\n if (result !== null) {\n return result;\n }\n }\n\n return null;\n }\n\n setValueForKey(obj: any, key: string, val: any) {\n if (obj === null || typeof obj !== 'object') {\n return;\n }\n\n if (key in obj) {\n obj[key] = val;\n }\n\n for (const k in obj) {\n if (typeof obj[k] == 'object') {\n this.setValueForKey(obj[k], key, val);\n }\n }\n }\n\n setRefQuestionValuesInPayload(questions?: any, payLoadObj?: any) {\n let qs = questions || this.questions;\n\n let refQs = qs.filter((x: any) => x.controlType == 'async-dropdown');\n if (refQs) {\n refQs.forEach((refQ: any) => {\n let keyVal = this.getValueForKey(this.payLoad, refQ.key);\n if (Array.isArray(keyVal)) {\n let relArr: any[] = [];\n for (var v in keyVal) {\n let valObj: any = {};\n valObj[refQ.targetModel.toLowerCase() + 'Id'] = keyVal[v];\n valObj[this.mdl.toLowerCase() + 'Id'] = this.id;\n relArr.push(valObj);\n }\n this.setValueForKey(this.payLoad, refQ.key, relArr)\n }\n else {\n console.log('qs keyVal is not array');\n }\n });\n }\n\n let groupQs = qs.filter((x: any) => x.controlType == 'formgroup');\n if (groupQs) {\n for (let groupQ of groupQs) {\n console.log('qs checking groupQ', groupQ);\n this.setRefQuestionValuesInPayload(groupQ.questions);\n }\n }\n console.log('qs payload', this.payLoad);\n }\n\n questionsIncludesRefType(questions?: any): boolean {\n let qs = questions || this.questions;\n\n let refQ = qs.find((x: any) => x.controlType == 'async-dropdown');\n if (refQ) return true;\n\n let groupQs = qs.filter((x: any) => x.controlType == 'formgroup');\n if (groupQs) {\n for (let groupQ of groupQs) {\n if (this.questionsIncludesRefType(groupQ.questions)) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n formHasRelationshipQuestions(): boolean {\n return this.questionsIncludesRefType();\n }\n\n onSubmit() {\n this.payLoad = this.form.getRawValue();\n\n if (this.item && this.item.id) {\n this.payLoad.id = this.item.id;\n console.log('will update because this.item.id', this.item.id);\n this.updateItem();\n }\n else {\n console.log('will create because !this.item.id', this.item);\n this.createItem();\n }\n \n this.submitOutput.emit(this.payLoad);\n console.log('onSubmit payload', this.payLoad, 'this.item', this.item, 'this.form', this.form);\n }\n\n async updateItem() {\n this.prepPayloadObj();\n console.log('updateItem prepped payload', this.payLoad);\n try {\n const { data: item } = await this.ams.updateItemForModel(this.mdl, this.payLoad);\n console.log('updateItem finished res', item);\n \n if (!item) {\n this._snackBar.open('Error updating ' + this.mdl, 'Dismiss');\n return;\n }\n \n this.item = item;\n this.itemOutput.emit(this.item);\n \n // Show success message\n this._snackBar.open(`${this.mdl} updated successfully`, 'Dismiss', {\n duration: 3000\n });\n \n this.setQuestionsAndForm();\n } catch (error) {\n console.error('error in updateItem', error);\n this._snackBar.open('Error updating ' + this.mdl, 'Dismiss');\n }\n }\n\n getQuestionForKey(key: string, questions?: any) {\n let searchQs = questions || this.questions;\n let q = searchQs.find((x: any) => x.key == key);\n if (q) return q;\n\n let groupQs = searchQs.filter((x: any) => x.controlType == 'formgroup');\n if (groupQs) {\n for (let groupQ of groupQs) {\n console.log('searchQs checking groupQ', groupQ);\n q = this.getQuestionForKey(key, groupQ.questions);\n if (q) return q;\n }\n }\n return;\n }\n\n prepPayloadObj(obj?: any) {\n let prepObj = obj || this.payLoad;\n console.log('prepPayloadObj starting for prepObj', prepObj);\n for (let prop in prepObj) {\n let q = this.getQuestionForKey(prop);\n if (q) {\n console.log('q', q);\n if (q.controlType == \"formgroup\") {\n this.prepPayloadObj(prepObj[prop])\n }\n else {\n if (!q.required && prepObj[prop] == '') {\n delete prepObj[prop];\n }\n }\n }\n else {\n console.log('prepPayloadObj no q for prop', prop);\n }\n }\n }\n\n async createItem() {\n this.prepPayloadObj();\n console.log('createItem prepped payload', this.payLoad);\n try {\n let res = await this.ams.createItemPromise(this.mdl, this.payLoad);\n console.log('createItem finished res', res);\n if (!res) {\n this._snackBar.open('Error creating ' + this.mdl, 'Dismiss');\n return;\n }\n\n if (res.errors && res.errors.length > 0) {\n let messages: string[] = [];\n res.errors.forEach((err: any) => {\n messages.push(err.message);\n })\n this._snackBar.open(messages.join('\\n'), 'Dismiss');\n }\n else {\n this.item = res.data;\n this.itemOutput.emit(this.item);\n \n // Update the URL to reflect the new item ID\n if (this.item && this.item.id) {\n this.changePathIdParam(this.item.id);\n this.id = this.item.id; // Update the component's id property\n }\n \n // Show success message\n this._snackBar.open(`${this.mdl} created successfully`, 'Dismiss', {\n duration: 3000\n });\n \n this.setQuestionsAndForm();\n }\n } catch (error) {\n console.error('error in createItem', error);\n }\n }\n\n changePathIdParam(newParamValue: string) {\n const currentUrl = this.location.path();\n let paramValArr = currentUrl.split('/');\n let currentId = paramValArr[paramValArr.length -1];\n const newUrl = currentUrl.replace(currentId, newParamValue);\n this.location.replaceState(newUrl);\n }\n\n isValid(question?: any, q?: any, q2?: any) {\n if (question && q && q2) return this.form.get(question.key + '.' + q.key + '.' + q2.key);\n if (question && q && !q2) return this.form.get(question.key + '.' + q.key);\n if (question && !q && !q2) return this.form.get(question.key);\n return true;\n }\n}","<div class=\"dynamic-form-holder\">\n @if (form && questions) {\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"form\">\n @for (question of questions; track question) {\n @if (this.switchInputs.includes(question.controlType) || this.materialInputs.includes(question.controlType) || this.refInputs.includes(question.controlType)) {\n <div class=\"form-row\">\n <snteam-dynamic-form-question [question]=\"question\" [formGroup]=\"form\"></snteam-dynamic-form-question>\n </div>\n }\n @if (this.formGroupInputs.includes(question.controlType)) {\n <div class=\"group-row\">\n <snteam-dynamic-form-group [question]=\"question\" [formGroup]=\"form\" [formGroupName]=\"question.key\"></snteam-dynamic-form-group>\n </div>\n }\n }\n @if (!hideSaveButton) {\n <div class=\"form-row\">\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"!form.valid\">Save</button>\n </div>\n }\n </form>\n } @else {\n <div class=\"loading\">Loading...</div>\n }\n\n @if(item && !hideRelationships){\n <div class=\"relationship-holder\">\n <snteam-record-relationships [model]=\"mdl\" [id]=\"id\" [item]=\"item\" [amplifyOutputs]=\"outputs\"></snteam-record-relationships>\n </div>\n }\n</div>","import { Component, OnInit, Input, inject, TemplateRef, Output, EventEmitter } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatListModule } from '@angular/material/list';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { AmplifyModelService } from '../../services/amplify-model.service';\n\n@Component({\n selector: 'snteam-list-view',\n standalone: true,\n imports: [CommonModule, MatListModule, MatButtonModule, MatIconModule],\n templateUrl: './list-view.component.html',\n styleUrl: './list-view.component.css'\n})\nexport class ListViewComponent implements OnInit {\n private ams = inject(AmplifyModelService);\n private route = inject(ActivatedRoute);\n private router = inject(Router);\n \n @Input() modelName: string = '';\n @Input() customItemTemplate?: TemplateRef<any>;\n @Input() hideNewButton: boolean = false;\n @Input() title?: string;\n @Input() useRouter: boolean = true;\n \n @Output() itemClick = new EventEmitter<any>();\n @Output() newClick = new EventEmitter<void>();\n @Output() itemsLoaded = new EventEmitter<any[]>();\n \n itemsArr: any[] = [];\n loading: boolean = true;\n error: string | null = null;\n\n ngOnInit(): void {\n // Check if modelName is provided via route parameter\n const routeModel = this.route.snapshot.paramMap.get('model');\n if (routeModel) {\n this.modelName = routeModel;\n }\n \n if (this.modelName) {\n this.listItems();\n }\n }\n\n listItems() {\n console.log('ListViewComponent listItems starting for model:', this.modelName);\n if (this.modelName) {\n this.loading = true;\n this.error = null;\n \n const observable = this.ams.listItemsForModel(this.modelName);\n if (observable) {\n observable.subscribe({\n next: ({ items, isSynced }) => {\n this.itemsArr = items;\n this.loading = false;\n this.itemsLoaded.emit(this.itemsArr);\n console.log('ListViewComponent items loaded:', this.itemsArr);\n },\n error: (err) => {\n console.error('Error loading items:', err);\n this.error = 'Failed to load items';\n this.loading = false;\n }\n });\n } else {\n this.error = 'Service not initialized';\n this.loading = false;\n }\n }\n }\n\n onItemClick(item: any) {\n console.log('ListViewComponent itemClick', item);\n this.itemClick.emit(item);\n }\n\n onNewClick() {\n console.log('ListViewComponent newClick');\n if (this.useRouter) {\n this.router.navigate(['/form/' + this.modelName + '/-1']);\n } else {\n this.newClick.emit();\n }\n }\n\n getDisplayText(item: any): string {\n // Try common display fields\n return item.name || item.title || item.label || item.id || 'Unnamed Item';\n }\n\n refresh() {\n this.listItems();\n }\n}","<div class=\"list-view-container\">\n <div class=\"header\">\n <h2>{{ title || modelName }}</h2>\n @if (!hideNewButton) {\n <button mat-raised-button color=\"primary\" (click)=\"onNewClick()\">\n <mat-icon>add</mat-icon>\n New {{ modelName }}\n </button>\n }\n </div>\n\n @if (loading) {\n <div class=\"loading\">Loading {{ modelName }}...</div>\n }\n\n @if (error) {\n <div class=\"error\">\n {{ error }}\n <button mat-button (click)=\"refresh()\">Retry</button>\n </div>\n }\n\n @if (!loading && !error && itemsArr.length === 0) {\n <div class=\"empty-state\">\n <p>No {{ modelName }} found</p>\n @if (!hideNewButton) {\n <button mat-raised-button color=\"primary\" (click)=\"onNewClick()\">\n Create First {{ modelName }}\n </button>\n }\n </div>\n }\n\n @if (!loading && !error && itemsArr.length > 0) {\n <mat-list class=\"items-list\">\n @for (item of itemsArr; track item.id) {\n <mat-list-item (click)=\"onItemClick(item)\" class=\"clickable-item\">\n @if (customItemTemplate) {\n <ng-container [ngTemplateOutlet]=\"customItemTemplate\" [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n } @else {\n <span matListItemTitle>{{ getDisplayText(item) }}</span>\n <span matListItemLine>{{ item.description || item.createdAt | date }}</span>\n }\n </mat-list-item>\n }\n </mat-list>\n }\n</div>","import { Component, Input, OnInit, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { ListViewComponent } from '../list-view/list-view.component';\nimport { QuestionControlService } from '../../services/question-control.service';\n\n@Component({\n selector: 'snteam-configurations',\n standalone: true,\n imports: [\n CommonModule,\n MatExpansionModule,\n MatIconModule,\n MatCardModule,\n MatButtonModule,\n ListViewComponent\n ],\n templateUrl: './configurations.component.html',\n styleUrl: './configurations.component.css'\n})\nexport class ConfigurationsComponent implements OnInit {\n @Input() amplifyOutputs?: any;\n\n private qcs = inject(QuestionControlService);\n\n // Track which models exist in the schema\n hasTableConfig = false;\n hasFormView = false;\n hasListView = false;\n\n ngOnInit() {\n this.checkAvailableModels();\n }\n\n get outputs() {\n return this.amplifyOutputs || (this.qcs as any).outputs;\n }\n\n checkAvailableModels() {\n if (!this.outputs || !this.outputs.data || !this.outputs.data.model_introspection) {\n console.warn('ConfigurationsComponent: No model introspection data available');\n return;\n }\n\n const models = this.outputs.data.model_introspection.models;\n console.log('ConfigurationsComponent: Available models:', Object.keys(models));\n\n this.hasTableConfig = 'TableConfig' in models;\n this.hasFormView = 'FormView' in models;\n this.hasListView = 'ListView' in models;\n\n console.log('ConfigurationsComponent: Model availability:', {\n TableConfig: this.hasTableConfig,\n FormView: this.hasFormView,\n ListView: this.hasListView\n });\n }\n}","<div class=\"configurations-container\">\n <h2>System Configurations</h2>\n \n <mat-accordion multi=\"true\">\n \n <!-- Table Configs Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>table_chart</mat-icon>\n <span class=\"panel-title\">Table Configs</span>\n </mat-panel-title>\n <mat-panel-description>\n Manage table configurations and settings\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasTableConfig) {\n <snteam-list-view \n [modelName]=\"'TableConfig'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>TableConfig Model Not Found</h3>\n <p>The TableConfig model is not available in your Amplify schema. Please add it to your data model to manage table configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n <!-- Form Views Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>dynamic_form</mat-icon>\n <span class=\"panel-title\">Form Views</span>\n </mat-panel-title>\n <mat-panel-description>\n Configure custom form layouts and field selections\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasFormView) {\n <snteam-list-view \n [modelName]=\"'FormView'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>FormView Model Not Found</h3>\n <p>The FormView model is not available in your Amplify schema. Please add it to your data model to create custom form configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n <!-- List Views Section -->\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon>view_list</mat-icon>\n <span class=\"panel-title\">List Views</span>\n </mat-panel-title>\n <mat-panel-description>\n Customize list displays and column configurations\n </mat-panel-description>\n </mat-expansion-panel-header>\n \n <div class=\"panel-content\">\n @if (hasListView) {\n <snteam-list-view \n [modelName]=\"'ListView'\"\n [useRouter]=\"true\">\n </snteam-list-view>\n } @else {\n <mat-card class=\"error-card\">\n <mat-card-content>\n <mat-icon class=\"error-icon\">error_outline</mat-icon>\n <h3>ListView Model Not Found</h3>\n <p>The ListView model is not available in your Amplify schema. Please add it to your data model to create custom list view configurations.</p>\n <button mat-raised-button color=\"primary\" class=\"help-button\">\n <mat-icon>help</mat-icon>\n View Documentation\n </button>\n </mat-card-content>\n </mat-card>\n }\n </div>\n </mat-expansion-panel>\n\n </mat-accordion>\n</div>","/*\n * Public API Surface of @snteam/amplify-angular-core\n */\n\n// Legacy exports for backward compatibility\nexport * from './lib/amplify-angular-core';\n\n// ===== MAIN COMPONENTS =====\n// Primary components for building dynamic forms and list views\nexport * from './lib/components/dynamic-form/dynamic-form.component';\nexport * from './lib/components/list-view/list-view.component';\nexport * from './lib/components/configurations/configurations.component';\n\n// ===== SUPPORTING COMPONENTS =====\n// Components used internally by main components for form rendering\nexport * from './lib/components/dynamic-form-question/dynamic-form-question.component';\nexport * from './lib/components/dynamic-form-group/dynamic-form-group.component';\nexport * from './lib/components/dynamic-nested-form-question/dynamic-nested-form-question.component';\nexport * from './lib/components/record-relationships/record-relationships.component';\nexport * from './lib/components/dynamic-relationship-builder/dynamic-relationship-builder.component';\nexport * from './lib/components/add-relationship-dialog/add-relationship-dialog.component';\n\n// ===== SERVICES =====\n// Core services for Amplify integration and form building\nexport * from './lib/services/amplify-model.service';\nexport * from './lib/services/amplify-form-builder.service';\nexport * from './lib/services/question-control.service';\n\n// ===== CLASSES AND TYPES =====\n// Question classes for dynamic form generation\nexport * from './lib/classes/questions';\n// Validation utilities\nexport * from './lib/classes/validators';\n\n// ===== PIPES =====\n// Utility pipes for data transformation\nexport * from './lib/pipes/val-to-title.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.AmplifyModelService","i3","i4","i2.AmplifyFormBuilderService","i2","i1.AmplifyModelService","i5","i1.QuestionControlService","i6","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYa,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,YAAA,EAAA,IAAA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A,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACb,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAH,IAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,cAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACb,eAAe,sXACf,iBAAiB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,OAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,WAAA,EAAA,UAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKR,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAdnC,SAAS;+BACE,uBAAuB,EAAA,UAAA,EACrB,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,kBAAkB;wBAClB,aAAa;wBACb,aAAa;wBACb,eAAe;wBACf;AACD,qBAAA,EAAA,QAAA,EAAA,67HAAA,EAAA,MAAA,EAAA,CAAA,yiCAAA,CAAA,EAAA;;sBAKA;;;AEzBH;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -215,6 +215,7 @@ declare class DynamicFormComponent implements OnInit {
215
215
  hideRelationships: boolean;
216
216
  hideSaveButton: boolean;
217
217
  amplifyOutputs?: any;
218
+ formViewId?: string;
218
219
  itemOutput: EventEmitter<any>;
219
220
  submitOutput: EventEmitter<any>;
220
221
  formLoaded: EventEmitter<FormGroup<any>>;
@@ -224,6 +225,8 @@ declare class DynamicFormComponent implements OnInit {
224
225
  payLoad: any;
225
226
  form: any;
226
227
  questions: (QuestionBase<any> | FormGroupQuestion<any>)[] | null;
228
+ formView: any;
229
+ formViewFields: any[];
227
230
  materialInputs: string[];
228
231
  switchInputs: string[];
229
232
  formGroupInputs: string[];
@@ -233,9 +236,10 @@ declare class DynamicFormComponent implements OnInit {
233
236
  constructor(qcs: QuestionControlService, afb: AmplifyFormBuilderService, location: Location, route: ActivatedRoute);
234
237
  get outputs(): any;
235
238
  ngOnInit(): void;
236
- setFormBuilderForm(): void;
239
+ loadFormView(): Promise<void>;
237
240
  getItem(): Promise<void>;
238
241
  setQuestionsAndForm(): void;
242
+ getQuestionsFromFormViewFields(): QuestionBase<any>[];
239
243
  setQuestionValueFromItem(question: any, item?: any): void;
240
244
  setQuestionValueFromValueMap(question: any, valueMap: any): void;
241
245
  getValueForKey(obj: any, key: string): any | null;
@@ -251,7 +255,7 @@ declare class DynamicFormComponent implements OnInit {
251
255
  changePathIdParam(newParamValue: string): void;
252
256
  isValid(question?: any, q?: any, q2?: any): any;
253
257
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormComponent, never>;
254
- static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "snteam-dynamic-form", never, { "model": { "alias": "model"; "required": false; }; "itemId": { "alias": "itemId"; "required": false; }; "valueMap": { "alias": "valueMap"; "required": false; }; "hideRelationships": { "alias": "hideRelationships"; "required": false; }; "hideSaveButton": { "alias": "hideSaveButton"; "required": false; }; "amplifyOutputs": { "alias": "amplifyOutputs"; "required": false; }; }, { "itemOutput": "itemOutput"; "submitOutput": "submitOutput"; "formLoaded": "formLoaded"; }, never, never, true, never>;
258
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicFormComponent, "snteam-dynamic-form", never, { "model": { "alias": "model"; "required": false; }; "itemId": { "alias": "itemId"; "required": false; }; "valueMap": { "alias": "valueMap"; "required": false; }; "hideRelationships": { "alias": "hideRelationships"; "required": false; }; "hideSaveButton": { "alias": "hideSaveButton"; "required": false; }; "amplifyOutputs": { "alias": "amplifyOutputs"; "required": false; }; "formViewId": { "alias": "formViewId"; "required": false; }; }, { "itemOutput": "itemOutput"; "submitOutput": "submitOutput"; "formLoaded": "formLoaded"; }, never, never, true, never>;
255
259
  }
256
260
 
257
261
  declare class ListViewComponent implements OnInit {
@@ -279,6 +283,19 @@ declare class ListViewComponent implements OnInit {
279
283
  static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent, "snteam-list-view", never, { "modelName": { "alias": "modelName"; "required": false; }; "customItemTemplate": { "alias": "customItemTemplate"; "required": false; }; "hideNewButton": { "alias": "hideNewButton"; "required": false; }; "title": { "alias": "title"; "required": false; }; "useRouter": { "alias": "useRouter"; "required": false; }; }, { "itemClick": "itemClick"; "newClick": "newClick"; "itemsLoaded": "itemsLoaded"; }, never, never, true, never>;
280
284
  }
281
285
 
286
+ declare class ConfigurationsComponent implements OnInit {
287
+ amplifyOutputs?: any;
288
+ private qcs;
289
+ hasTableConfig: boolean;
290
+ hasFormView: boolean;
291
+ hasListView: boolean;
292
+ ngOnInit(): void;
293
+ get outputs(): any;
294
+ checkAvailableModels(): void;
295
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationsComponent, never>;
296
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConfigurationsComponent, "snteam-configurations", never, { "amplifyOutputs": { "alias": "amplifyOutputs"; "required": false; }; }, {}, never, never, true, never>;
297
+ }
298
+
282
299
  declare class DynamicFormQuestionComponent implements OnInit {
283
300
  private rootFormGroup;
284
301
  private ams;
@@ -409,5 +426,5 @@ declare class ValToTitlePipe implements PipeTransform {
409
426
  static ɵpipe: i0.ɵɵPipeDeclaration<ValToTitlePipe, "valToTitle", true>;
410
427
  }
411
428
 
412
- export { AddRelationshipDialogComponent, AmplifyAngularCore, AmplifyFormBuilderService, AmplifyModelService, AsyncDropdownQuestion, DatePickerQuestion, DateTimePickerQuestion, DropdownQuestion, DynamicFormComponent, DynamicFormGroupComponent, DynamicFormQuestionComponent, DynamicNestedFormQuestionComponent, DynamicRelationshipBuilderComponent, EmailQuestion, FormGroupQuestion, ListViewComponent, MyErrorStateMatcher, NumberQuestion, PhoneQuestion, QuestionBase, QuestionControlService, RecordRelationshipsComponent, SliderQuestion, TextboxQuestion, TimePickerQuestion, ValToTitlePipe, phoneNumberValidator };
429
+ export { AddRelationshipDialogComponent, AmplifyAngularCore, AmplifyFormBuilderService, AmplifyModelService, AsyncDropdownQuestion, ConfigurationsComponent, DatePickerQuestion, DateTimePickerQuestion, DropdownQuestion, DynamicFormComponent, DynamicFormGroupComponent, DynamicFormQuestionComponent, DynamicNestedFormQuestionComponent, DynamicRelationshipBuilderComponent, EmailQuestion, FormGroupQuestion, ListViewComponent, MyErrorStateMatcher, NumberQuestion, PhoneQuestion, QuestionBase, QuestionControlService, RecordRelationshipsComponent, SliderQuestion, TextboxQuestion, TimePickerQuestion, ValToTitlePipe, phoneNumberValidator };
413
430
  export type { DialogData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snteam/amplify-angular-core",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Angular 20 components for building dynamic forms and list views with AWS Amplify Data",
5
5
  "keywords": [
6
6
  "angular",