@mj-biz-apps/common-ng 5.4.0

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.
Files changed (82) hide show
  1. package/README.md +276 -0
  2. package/dist/lib/components/address-editor/address-editor.component.d.ts +249 -0
  3. package/dist/lib/components/address-editor/address-editor.component.d.ts.map +1 -0
  4. package/dist/lib/components/address-editor/address-editor.component.js +981 -0
  5. package/dist/lib/components/address-editor/address-editor.component.js.map +1 -0
  6. package/dist/lib/components/contact-method-list/contact-method-list.component.d.ts +256 -0
  7. package/dist/lib/components/contact-method-list/contact-method-list.component.d.ts.map +1 -0
  8. package/dist/lib/components/contact-method-list/contact-method-list.component.js +788 -0
  9. package/dist/lib/components/contact-method-list/contact-method-list.component.js.map +1 -0
  10. package/dist/lib/components/org-hierarchy-tree/org-hierarchy-tree.component.d.ts +119 -0
  11. package/dist/lib/components/org-hierarchy-tree/org-hierarchy-tree.component.d.ts.map +1 -0
  12. package/dist/lib/components/org-hierarchy-tree/org-hierarchy-tree.component.js +295 -0
  13. package/dist/lib/components/org-hierarchy-tree/org-hierarchy-tree.component.js.map +1 -0
  14. package/dist/lib/components/relationship-list/relationship-list.component.d.ts +392 -0
  15. package/dist/lib/components/relationship-list/relationship-list.component.d.ts.map +1 -0
  16. package/dist/lib/components/relationship-list/relationship-list.component.js +1171 -0
  17. package/dist/lib/components/relationship-list/relationship-list.component.js.map +1 -0
  18. package/dist/lib/custom/Organization/organization-form.component.d.ts +24 -0
  19. package/dist/lib/custom/Organization/organization-form.component.d.ts.map +1 -0
  20. package/dist/lib/custom/Organization/organization-form.component.js +244 -0
  21. package/dist/lib/custom/Organization/organization-form.component.js.map +1 -0
  22. package/dist/lib/custom/Person/person-form.component.d.ts +24 -0
  23. package/dist/lib/custom/Person/person-form.component.d.ts.map +1 -0
  24. package/dist/lib/custom/Person/person-form.component.js +231 -0
  25. package/dist/lib/custom/Person/person-form.component.js.map +1 -0
  26. package/dist/lib/custom/custom-forms.module.d.ts +17 -0
  27. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -0
  28. package/dist/lib/custom/custom-forms.module.js +64 -0
  29. package/dist/lib/custom/custom-forms.module.js.map +1 -0
  30. package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.d.ts +10 -0
  31. package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.d.ts.map +1 -0
  32. package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.js +94 -0
  33. package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.js.map +1 -0
  34. package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.d.ts +10 -0
  35. package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.d.ts.map +1 -0
  36. package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.js +70 -0
  37. package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.js.map +1 -0
  38. package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.d.ts +10 -0
  39. package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.d.ts.map +1 -0
  40. package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.js +86 -0
  41. package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.js.map +1 -0
  42. package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.d.ts +10 -0
  43. package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.d.ts.map +1 -0
  44. package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.js +70 -0
  45. package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.js.map +1 -0
  46. package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.d.ts +10 -0
  47. package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.d.ts.map +1 -0
  48. package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.js +86 -0
  49. package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.js.map +1 -0
  50. package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.d.ts +10 -0
  51. package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.d.ts.map +1 -0
  52. package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.js +190 -0
  53. package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.js.map +1 -0
  54. package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.d.ts +10 -0
  55. package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.d.ts.map +1 -0
  56. package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.js +80 -0
  57. package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.js.map +1 -0
  58. package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.d.ts +10 -0
  59. package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.d.ts.map +1 -0
  60. package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.js +184 -0
  61. package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.js.map +1 -0
  62. package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.d.ts +10 -0
  63. package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.d.ts.map +1 -0
  64. package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.js +78 -0
  65. package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.js.map +1 -0
  66. package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.d.ts +10 -0
  67. package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.d.ts.map +1 -0
  68. package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.js +90 -0
  69. package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.js.map +1 -0
  70. package/dist/lib/generated/class-registrations-manifest.d.ts +22 -0
  71. package/dist/lib/generated/class-registrations-manifest.d.ts.map +1 -0
  72. package/dist/lib/generated/class-registrations-manifest.js +39 -0
  73. package/dist/lib/generated/class-registrations-manifest.js.map +1 -0
  74. package/dist/lib/generated/generated-forms.module.d.ts +28 -0
  75. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -0
  76. package/dist/lib/generated/generated-forms.module.js +94 -0
  77. package/dist/lib/generated/generated-forms.module.js.map +1 -0
  78. package/dist/public-api.d.ts +23 -0
  79. package/dist/public-api.d.ts.map +1 -0
  80. package/dist/public-api.js +30 -0
  81. package/dist/public-api.js.map +1 -0
  82. package/package.json +46 -0
@@ -0,0 +1,981 @@
1
+ import { Component, Input, Output, EventEmitter, inject, ChangeDetectorRef } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { Metadata, RunView } from '@memberjunction/core';
5
+ import { GraphQLActionClient } from '@memberjunction/graphql-dataprovider';
6
+ import { ActionEngineBase } from '@memberjunction/actions-base';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@angular/forms";
9
+ const _forTrack0 = ($index, $item) => $item.Link.ID;
10
+ const _forTrack1 = ($index, $item) => $item.ID;
11
+ const _forTrack2 = ($index, $item) => $item.Code;
12
+ function AddressEditorComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
13
+ i0.ɵɵelementStart(0, "span", 3);
14
+ i0.ɵɵtext(1);
15
+ i0.ɵɵelementEnd();
16
+ } if (rf & 2) {
17
+ const ctx_r0 = i0.ɵɵnextContext();
18
+ i0.ɵɵadvance();
19
+ i0.ɵɵtextInterpolate1("(", ctx_r0.AddressItems.length, ")");
20
+ } }
21
+ function AddressEditorComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
22
+ i0.ɵɵelementStart(0, "div", 4)(1, "div", 5);
23
+ i0.ɵɵelement(2, "i", 6);
24
+ i0.ɵɵtext(3, " Loading addresses... ");
25
+ i0.ɵɵelementEnd()();
26
+ } }
27
+ function AddressEditorComponent_Conditional_6_Conditional_1_Template(rf, ctx) { if (rf & 1) {
28
+ i0.ɵɵelementStart(0, "div", 7);
29
+ i0.ɵɵelement(1, "i", 2);
30
+ i0.ɵɵtext(2, " No addresses linked yet ");
31
+ i0.ɵɵelementEnd();
32
+ } }
33
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_11_Template(rf, ctx) { if (rf & 1) {
34
+ i0.ɵɵelementStart(0, "span", 17);
35
+ i0.ɵɵelement(1, "i", 19);
36
+ i0.ɵɵtext(2, " Primary");
37
+ i0.ɵɵelementEnd();
38
+ } }
39
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_12_Conditional_1_Template(rf, ctx) { if (rf & 1) {
40
+ const _r3 = i0.ɵɵgetCurrentView();
41
+ i0.ɵɵelementStart(0, "button", 25);
42
+ i0.ɵɵlistener("click", function AddressEditorComponent_Conditional_6_For_3_Conditional_12_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ɵ$index_29_r4 = i0.ɵɵnextContext(2).$index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onSetPrimary(ɵ$index_29_r4)); });
43
+ i0.ɵɵelement(1, "i", 26);
44
+ i0.ɵɵelementEnd();
45
+ } }
46
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_12_Template(rf, ctx) { if (rf & 1) {
47
+ const _r2 = i0.ɵɵgetCurrentView();
48
+ i0.ɵɵelementStart(0, "div", 18);
49
+ i0.ɵɵconditionalCreate(1, AddressEditorComponent_Conditional_6_For_3_Conditional_12_Conditional_1_Template, 2, 0, "button", 20);
50
+ i0.ɵɵelementStart(2, "button", 21);
51
+ i0.ɵɵlistener("click", function AddressEditorComponent_Conditional_6_For_3_Conditional_12_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r2); const ɵ$index_29_r4 = i0.ɵɵnextContext().$index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onEdit(ɵ$index_29_r4)); });
52
+ i0.ɵɵelement(3, "i", 22);
53
+ i0.ɵɵelementEnd();
54
+ i0.ɵɵelementStart(4, "button", 23);
55
+ i0.ɵɵlistener("click", function AddressEditorComponent_Conditional_6_For_3_Conditional_12_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r2); const ɵ$index_29_r4 = i0.ɵɵnextContext().$index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onDelete(ɵ$index_29_r4)); });
56
+ i0.ɵɵelement(5, "i", 24);
57
+ i0.ɵɵelementEnd()();
58
+ } if (rf & 2) {
59
+ const item_r5 = i0.ɵɵnextContext().$implicit;
60
+ i0.ɵɵadvance();
61
+ i0.ɵɵconditional(!item_r5.Link.IsPrimary ? 1 : -1);
62
+ } }
63
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_13_For_7_Template(rf, ctx) { if (rf & 1) {
64
+ i0.ɵɵelementStart(0, "option", 30);
65
+ i0.ɵɵtext(1);
66
+ i0.ɵɵelementEnd();
67
+ } if (rf & 2) {
68
+ const t_r7 = ctx.$implicit;
69
+ i0.ɵɵproperty("value", t_r7.ID);
70
+ i0.ɵɵadvance();
71
+ i0.ɵɵtextInterpolate(t_r7.Name);
72
+ } }
73
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Conditional_20_Template(rf, ctx) { if (rf & 1) {
74
+ i0.ɵɵelement(0, "i", 35);
75
+ } }
76
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Conditional_21_Template(rf, ctx) { if (rf & 1) {
77
+ i0.ɵɵelementStart(0, "span", 36);
78
+ i0.ɵɵtext(1, "not found");
79
+ i0.ɵɵelementEnd();
80
+ } }
81
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_13_For_36_Template(rf, ctx) { if (rf & 1) {
82
+ i0.ɵɵelementStart(0, "option", 30);
83
+ i0.ɵɵtext(1);
84
+ i0.ɵɵelementEnd();
85
+ } if (rf & 2) {
86
+ const c_r8 = ctx.$implicit;
87
+ i0.ɵɵproperty("value", c_r8.Code);
88
+ i0.ɵɵadvance();
89
+ i0.ɵɵtextInterpolate2("", c_r8.Code, " - ", c_r8.Name);
90
+ } }
91
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Conditional_43_Template(rf, ctx) { if (rf & 1) {
92
+ i0.ɵɵelement(0, "i", 48);
93
+ } }
94
+ function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template(rf, ctx) { if (rf & 1) {
95
+ const _r6 = i0.ɵɵgetCurrentView();
96
+ i0.ɵɵelementStart(0, "div", 8)(1, "div", 27)(2, "div", 28)(3, "label");
97
+ i0.ɵɵtext(4, "Type");
98
+ i0.ɵɵelementEnd();
99
+ i0.ɵɵelementStart(5, "select", 29);
100
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_select_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.TypeID, $event) || (ctx_r0.EditForm.TypeID = $event); return i0.ɵɵresetView($event); });
101
+ i0.ɵɵrepeaterCreate(6, AddressEditorComponent_Conditional_6_For_3_Conditional_13_For_7_Template, 2, 2, "option", 30, _forTrack1);
102
+ i0.ɵɵelementEnd()();
103
+ i0.ɵɵelementStart(8, "div", 31)(9, "label");
104
+ i0.ɵɵtext(10, "Line 1");
105
+ i0.ɵɵelementEnd();
106
+ i0.ɵɵelementStart(11, "input", 32);
107
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_input_ngModelChange_11_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.Line1, $event) || (ctx_r0.EditForm.Line1 = $event); return i0.ɵɵresetView($event); });
108
+ i0.ɵɵelementEnd()();
109
+ i0.ɵɵelementStart(12, "div", 33)(13, "label");
110
+ i0.ɵɵtext(14, "Line 2");
111
+ i0.ɵɵelementEnd();
112
+ i0.ɵɵelementStart(15, "input", 34);
113
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_input_ngModelChange_15_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.Line2, $event) || (ctx_r0.EditForm.Line2 = $event); return i0.ɵɵresetView($event); });
114
+ i0.ɵɵelementEnd()()();
115
+ i0.ɵɵelementStart(16, "div", 27)(17, "div", 31)(18, "label");
116
+ i0.ɵɵtext(19, " City ");
117
+ i0.ɵɵconditionalCreate(20, AddressEditorComponent_Conditional_6_For_3_Conditional_13_Conditional_20_Template, 1, 0, "i", 35);
118
+ i0.ɵɵconditionalCreate(21, AddressEditorComponent_Conditional_6_For_3_Conditional_13_Conditional_21_Template, 2, 0, "span", 36);
119
+ i0.ɵɵelementEnd();
120
+ i0.ɵɵelementStart(22, "input", 37);
121
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_input_ngModelChange_22_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.City, $event) || (ctx_r0.EditForm.City = $event); return i0.ɵɵresetView($event); });
122
+ i0.ɵɵelementEnd()();
123
+ i0.ɵɵelementStart(23, "div", 38)(24, "label");
124
+ i0.ɵɵtext(25, "State");
125
+ i0.ɵɵelementEnd();
126
+ i0.ɵɵelementStart(26, "input", 39);
127
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_input_ngModelChange_26_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.StateProvince, $event) || (ctx_r0.EditForm.StateProvince = $event); return i0.ɵɵresetView($event); });
128
+ i0.ɵɵelementEnd()();
129
+ i0.ɵɵelementStart(27, "div", 40)(28, "label");
130
+ i0.ɵɵtext(29, "Postal");
131
+ i0.ɵɵelementEnd();
132
+ i0.ɵɵelementStart(30, "input", 41);
133
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_input_ngModelChange_30_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.PostalCode, $event) || (ctx_r0.EditForm.PostalCode = $event); return i0.ɵɵresetView($event); });
134
+ i0.ɵɵlistener("blur", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_input_blur_30_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onPostalCodeBlur()); });
135
+ i0.ɵɵelementEnd()();
136
+ i0.ɵɵelementStart(31, "div", 42)(32, "label");
137
+ i0.ɵɵtext(33, "Country");
138
+ i0.ɵɵelementEnd();
139
+ i0.ɵɵelementStart(34, "select", 29);
140
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_select_ngModelChange_34_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.Country, $event) || (ctx_r0.EditForm.Country = $event); return i0.ɵɵresetView($event); });
141
+ i0.ɵɵrepeaterCreate(35, AddressEditorComponent_Conditional_6_For_3_Conditional_13_For_36_Template, 2, 3, "option", 30, _forTrack2);
142
+ i0.ɵɵelementEnd()();
143
+ i0.ɵɵelementStart(37, "div", 43)(38, "input", 44);
144
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_input_ngModelChange_38_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.IsPrimary, $event) || (ctx_r0.EditForm.IsPrimary = $event); return i0.ɵɵresetView($event); });
145
+ i0.ɵɵelementEnd();
146
+ i0.ɵɵelementStart(39, "label", 45);
147
+ i0.ɵɵtext(40, "Primary");
148
+ i0.ɵɵelementEnd()()();
149
+ i0.ɵɵelementStart(41, "div", 46)(42, "button", 47);
150
+ i0.ɵɵlistener("click", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_button_click_42_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onSave()); });
151
+ i0.ɵɵconditionalCreate(43, AddressEditorComponent_Conditional_6_For_3_Conditional_13_Conditional_43_Template, 1, 0, "i", 48);
152
+ i0.ɵɵtext(44, " Save ");
153
+ i0.ɵɵelementEnd();
154
+ i0.ɵɵelementStart(45, "button", 49);
155
+ i0.ɵɵlistener("click", function AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template_button_click_45_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onCancelEdit()); });
156
+ i0.ɵɵtext(46, "Cancel");
157
+ i0.ɵɵelementEnd()()();
158
+ } if (rf & 2) {
159
+ const ɵ$index_29_r4 = i0.ɵɵnextContext().$index;
160
+ const ctx_r0 = i0.ɵɵnextContext(2);
161
+ i0.ɵɵadvance(5);
162
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.TypeID);
163
+ i0.ɵɵadvance();
164
+ i0.ɵɵrepeater(ctx_r0.AddressTypes);
165
+ i0.ɵɵadvance(5);
166
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.Line1);
167
+ i0.ɵɵadvance(4);
168
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.Line2);
169
+ i0.ɵɵadvance(5);
170
+ i0.ɵɵconditional(ctx_r0.LookingUpPostalCode ? 20 : -1);
171
+ i0.ɵɵadvance();
172
+ i0.ɵɵconditional(ctx_r0.PostalCodeNotFound ? 21 : -1);
173
+ i0.ɵɵadvance();
174
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.City);
175
+ i0.ɵɵadvance(4);
176
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.StateProvince);
177
+ i0.ɵɵadvance(4);
178
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.PostalCode);
179
+ i0.ɵɵadvance(4);
180
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.Country);
181
+ i0.ɵɵadvance();
182
+ i0.ɵɵrepeater(ctx_r0.Countries);
183
+ i0.ɵɵadvance(3);
184
+ i0.ɵɵproperty("id", "primary-edit-" + ɵ$index_29_r4);
185
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.IsPrimary);
186
+ i0.ɵɵadvance();
187
+ i0.ɵɵproperty("for", "primary-edit-" + ɵ$index_29_r4);
188
+ i0.ɵɵadvance(3);
189
+ i0.ɵɵproperty("disabled", ctx_r0.Saving);
190
+ i0.ɵɵadvance();
191
+ i0.ɵɵconditional(ctx_r0.Saving ? 43 : -1);
192
+ } }
193
+ function AddressEditorComponent_Conditional_6_For_3_Template(rf, ctx) { if (rf & 1) {
194
+ i0.ɵɵelementStart(0, "div", 10)(1, "div", 11);
195
+ i0.ɵɵelement(2, "i");
196
+ i0.ɵɵelementEnd();
197
+ i0.ɵɵelementStart(3, "div", 12)(4, "div", 13);
198
+ i0.ɵɵtext(5);
199
+ i0.ɵɵelementEnd();
200
+ i0.ɵɵelementStart(6, "div", 14);
201
+ i0.ɵɵtext(7);
202
+ i0.ɵɵelementEnd()();
203
+ i0.ɵɵelementStart(8, "div", 15)(9, "span", 16);
204
+ i0.ɵɵtext(10);
205
+ i0.ɵɵelementEnd();
206
+ i0.ɵɵconditionalCreate(11, AddressEditorComponent_Conditional_6_For_3_Conditional_11_Template, 3, 0, "span", 17);
207
+ i0.ɵɵelementEnd();
208
+ i0.ɵɵconditionalCreate(12, AddressEditorComponent_Conditional_6_For_3_Conditional_12_Template, 6, 1, "div", 18);
209
+ i0.ɵɵelementEnd();
210
+ i0.ɵɵconditionalCreate(13, AddressEditorComponent_Conditional_6_For_3_Conditional_13_Template, 47, 14, "div", 8);
211
+ } if (rf & 2) {
212
+ const item_r5 = ctx.$implicit;
213
+ const ɵ$index_29_r4 = ctx.$index;
214
+ const ctx_r0 = i0.ɵɵnextContext(2);
215
+ i0.ɵɵclassProp("primary", item_r5.Link.IsPrimary);
216
+ i0.ɵɵadvance(2);
217
+ i0.ɵɵclassMap(ctx_r0.getAddressTypeIcon(item_r5.Link.AddressTypeID));
218
+ i0.ɵɵadvance(3);
219
+ i0.ɵɵtextInterpolate(ctx_r0.formatAddressLine1(item_r5.Address));
220
+ i0.ɵɵadvance(2);
221
+ i0.ɵɵtextInterpolate(ctx_r0.formatAddressLine2(item_r5.Address));
222
+ i0.ɵɵadvance(3);
223
+ i0.ɵɵtextInterpolate(item_r5.Link.AddressType);
224
+ i0.ɵɵadvance();
225
+ i0.ɵɵconditional(item_r5.Link.IsPrimary ? 11 : -1);
226
+ i0.ɵɵadvance();
227
+ i0.ɵɵconditional(ctx_r0.EditMode ? 12 : -1);
228
+ i0.ɵɵadvance();
229
+ i0.ɵɵconditional(ctx_r0.EditingIndex === ɵ$index_29_r4 ? 13 : -1);
230
+ } }
231
+ function AddressEditorComponent_Conditional_6_Conditional_4_For_7_Template(rf, ctx) { if (rf & 1) {
232
+ i0.ɵɵelementStart(0, "option", 30);
233
+ i0.ɵɵtext(1);
234
+ i0.ɵɵelementEnd();
235
+ } if (rf & 2) {
236
+ const t_r10 = ctx.$implicit;
237
+ i0.ɵɵproperty("value", t_r10.ID);
238
+ i0.ɵɵadvance();
239
+ i0.ɵɵtextInterpolate(t_r10.Name);
240
+ } }
241
+ function AddressEditorComponent_Conditional_6_Conditional_4_Conditional_20_Template(rf, ctx) { if (rf & 1) {
242
+ i0.ɵɵelement(0, "i", 35);
243
+ } }
244
+ function AddressEditorComponent_Conditional_6_Conditional_4_Conditional_21_Template(rf, ctx) { if (rf & 1) {
245
+ i0.ɵɵelementStart(0, "span", 36);
246
+ i0.ɵɵtext(1, "not found");
247
+ i0.ɵɵelementEnd();
248
+ } }
249
+ function AddressEditorComponent_Conditional_6_Conditional_4_For_36_Template(rf, ctx) { if (rf & 1) {
250
+ i0.ɵɵelementStart(0, "option", 30);
251
+ i0.ɵɵtext(1);
252
+ i0.ɵɵelementEnd();
253
+ } if (rf & 2) {
254
+ const c_r11 = ctx.$implicit;
255
+ i0.ɵɵproperty("value", c_r11.Code);
256
+ i0.ɵɵadvance();
257
+ i0.ɵɵtextInterpolate2("", c_r11.Code, " - ", c_r11.Name);
258
+ } }
259
+ function AddressEditorComponent_Conditional_6_Conditional_4_Conditional_43_Template(rf, ctx) { if (rf & 1) {
260
+ i0.ɵɵelement(0, "i", 48);
261
+ } }
262
+ function AddressEditorComponent_Conditional_6_Conditional_4_Template(rf, ctx) { if (rf & 1) {
263
+ const _r9 = i0.ɵɵgetCurrentView();
264
+ i0.ɵɵelementStart(0, "div", 8)(1, "div", 27)(2, "div", 28)(3, "label");
265
+ i0.ɵɵtext(4, "Type");
266
+ i0.ɵɵelementEnd();
267
+ i0.ɵɵelementStart(5, "select", 29);
268
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_Conditional_4_Template_select_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.TypeID, $event) || (ctx_r0.EditForm.TypeID = $event); return i0.ɵɵresetView($event); });
269
+ i0.ɵɵrepeaterCreate(6, AddressEditorComponent_Conditional_6_Conditional_4_For_7_Template, 2, 2, "option", 30, _forTrack1);
270
+ i0.ɵɵelementEnd()();
271
+ i0.ɵɵelementStart(8, "div", 31)(9, "label");
272
+ i0.ɵɵtext(10, "Line 1");
273
+ i0.ɵɵelementEnd();
274
+ i0.ɵɵelementStart(11, "input", 32);
275
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_Conditional_4_Template_input_ngModelChange_11_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.Line1, $event) || (ctx_r0.EditForm.Line1 = $event); return i0.ɵɵresetView($event); });
276
+ i0.ɵɵelementEnd()();
277
+ i0.ɵɵelementStart(12, "div", 33)(13, "label");
278
+ i0.ɵɵtext(14, "Line 2");
279
+ i0.ɵɵelementEnd();
280
+ i0.ɵɵelementStart(15, "input", 34);
281
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_Conditional_4_Template_input_ngModelChange_15_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.Line2, $event) || (ctx_r0.EditForm.Line2 = $event); return i0.ɵɵresetView($event); });
282
+ i0.ɵɵelementEnd()()();
283
+ i0.ɵɵelementStart(16, "div", 27)(17, "div", 31)(18, "label");
284
+ i0.ɵɵtext(19, " City ");
285
+ i0.ɵɵconditionalCreate(20, AddressEditorComponent_Conditional_6_Conditional_4_Conditional_20_Template, 1, 0, "i", 35);
286
+ i0.ɵɵconditionalCreate(21, AddressEditorComponent_Conditional_6_Conditional_4_Conditional_21_Template, 2, 0, "span", 36);
287
+ i0.ɵɵelementEnd();
288
+ i0.ɵɵelementStart(22, "input", 37);
289
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_Conditional_4_Template_input_ngModelChange_22_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.City, $event) || (ctx_r0.EditForm.City = $event); return i0.ɵɵresetView($event); });
290
+ i0.ɵɵelementEnd()();
291
+ i0.ɵɵelementStart(23, "div", 38)(24, "label");
292
+ i0.ɵɵtext(25, "State");
293
+ i0.ɵɵelementEnd();
294
+ i0.ɵɵelementStart(26, "input", 39);
295
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_Conditional_4_Template_input_ngModelChange_26_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.StateProvince, $event) || (ctx_r0.EditForm.StateProvince = $event); return i0.ɵɵresetView($event); });
296
+ i0.ɵɵelementEnd()();
297
+ i0.ɵɵelementStart(27, "div", 40)(28, "label");
298
+ i0.ɵɵtext(29, "Postal");
299
+ i0.ɵɵelementEnd();
300
+ i0.ɵɵelementStart(30, "input", 41);
301
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_Conditional_4_Template_input_ngModelChange_30_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.PostalCode, $event) || (ctx_r0.EditForm.PostalCode = $event); return i0.ɵɵresetView($event); });
302
+ i0.ɵɵlistener("blur", function AddressEditorComponent_Conditional_6_Conditional_4_Template_input_blur_30_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onPostalCodeBlur()); });
303
+ i0.ɵɵelementEnd()();
304
+ i0.ɵɵelementStart(31, "div", 42)(32, "label");
305
+ i0.ɵɵtext(33, "Country");
306
+ i0.ɵɵelementEnd();
307
+ i0.ɵɵelementStart(34, "select", 29);
308
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_Conditional_4_Template_select_ngModelChange_34_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.Country, $event) || (ctx_r0.EditForm.Country = $event); return i0.ɵɵresetView($event); });
309
+ i0.ɵɵrepeaterCreate(35, AddressEditorComponent_Conditional_6_Conditional_4_For_36_Template, 2, 3, "option", 30, _forTrack2);
310
+ i0.ɵɵelementEnd()();
311
+ i0.ɵɵelementStart(37, "div", 43)(38, "input", 50);
312
+ i0.ɵɵtwoWayListener("ngModelChange", function AddressEditorComponent_Conditional_6_Conditional_4_Template_input_ngModelChange_38_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r0.EditForm.IsPrimary, $event) || (ctx_r0.EditForm.IsPrimary = $event); return i0.ɵɵresetView($event); });
313
+ i0.ɵɵelementEnd();
314
+ i0.ɵɵelementStart(39, "label", 51);
315
+ i0.ɵɵtext(40, "Primary");
316
+ i0.ɵɵelementEnd()()();
317
+ i0.ɵɵelementStart(41, "div", 46)(42, "button", 47);
318
+ i0.ɵɵlistener("click", function AddressEditorComponent_Conditional_6_Conditional_4_Template_button_click_42_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onSave()); });
319
+ i0.ɵɵconditionalCreate(43, AddressEditorComponent_Conditional_6_Conditional_4_Conditional_43_Template, 1, 0, "i", 48);
320
+ i0.ɵɵtext(44, " Save ");
321
+ i0.ɵɵelementEnd();
322
+ i0.ɵɵelementStart(45, "button", 49);
323
+ i0.ɵɵlistener("click", function AddressEditorComponent_Conditional_6_Conditional_4_Template_button_click_45_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCancelEdit()); });
324
+ i0.ɵɵtext(46, "Cancel");
325
+ i0.ɵɵelementEnd()()();
326
+ } if (rf & 2) {
327
+ const ctx_r0 = i0.ɵɵnextContext(2);
328
+ i0.ɵɵadvance(5);
329
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.TypeID);
330
+ i0.ɵɵadvance();
331
+ i0.ɵɵrepeater(ctx_r0.AddressTypes);
332
+ i0.ɵɵadvance(5);
333
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.Line1);
334
+ i0.ɵɵadvance(4);
335
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.Line2);
336
+ i0.ɵɵadvance(5);
337
+ i0.ɵɵconditional(ctx_r0.LookingUpPostalCode ? 20 : -1);
338
+ i0.ɵɵadvance();
339
+ i0.ɵɵconditional(ctx_r0.PostalCodeNotFound ? 21 : -1);
340
+ i0.ɵɵadvance();
341
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.City);
342
+ i0.ɵɵadvance(4);
343
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.StateProvince);
344
+ i0.ɵɵadvance(4);
345
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.PostalCode);
346
+ i0.ɵɵadvance(4);
347
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.Country);
348
+ i0.ɵɵadvance();
349
+ i0.ɵɵrepeater(ctx_r0.Countries);
350
+ i0.ɵɵadvance(3);
351
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.EditForm.IsPrimary);
352
+ i0.ɵɵadvance(4);
353
+ i0.ɵɵproperty("disabled", ctx_r0.Saving);
354
+ i0.ɵɵadvance();
355
+ i0.ɵɵconditional(ctx_r0.Saving ? 43 : -1);
356
+ } }
357
+ function AddressEditorComponent_Conditional_6_Conditional_5_Template(rf, ctx) { if (rf & 1) {
358
+ const _r12 = i0.ɵɵgetCurrentView();
359
+ i0.ɵɵelementStart(0, "div", 9)(1, "button", 52);
360
+ i0.ɵɵlistener("click", function AddressEditorComponent_Conditional_6_Conditional_5_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r12); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onAdd()); });
361
+ i0.ɵɵelement(2, "i", 53);
362
+ i0.ɵɵtext(3, " Add Address ");
363
+ i0.ɵɵelementEnd()();
364
+ } }
365
+ function AddressEditorComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
366
+ i0.ɵɵelementStart(0, "div", 4);
367
+ i0.ɵɵconditionalCreate(1, AddressEditorComponent_Conditional_6_Conditional_1_Template, 3, 0, "div", 7);
368
+ i0.ɵɵrepeaterCreate(2, AddressEditorComponent_Conditional_6_For_3_Template, 14, 10, null, null, _forTrack0);
369
+ i0.ɵɵconditionalCreate(4, AddressEditorComponent_Conditional_6_Conditional_4_Template, 47, 12, "div", 8);
370
+ i0.ɵɵconditionalCreate(5, AddressEditorComponent_Conditional_6_Conditional_5_Template, 4, 0, "div", 9);
371
+ i0.ɵɵelementEnd();
372
+ } if (rf & 2) {
373
+ const ctx_r0 = i0.ɵɵnextContext();
374
+ i0.ɵɵadvance();
375
+ i0.ɵɵconditional(ctx_r0.AddressItems.length === 0 && ctx_r0.EditingIndex !== -1 ? 1 : -1);
376
+ i0.ɵɵadvance();
377
+ i0.ɵɵrepeater(ctx_r0.AddressItems);
378
+ i0.ɵɵadvance(2);
379
+ i0.ɵɵconditional(ctx_r0.EditingIndex === -1 ? 4 : -1);
380
+ i0.ɵɵadvance();
381
+ i0.ɵɵconditional(ctx_r0.EditingIndex === null && ctx_r0.EditMode ? 5 : -1);
382
+ } }
383
+ /**
384
+ * Manages CRUD operations for addresses linked to any MemberJunction entity record.
385
+ *
386
+ * This component implements the MJ two-table address pattern:
387
+ * - **Address** stores the physical location data (line 1, city, country, etc.).
388
+ * - **AddressLink** binds an address to a specific entity and record, and carries
389
+ * the address type (Home, Work, etc.) and the primary flag.
390
+ *
391
+ * The component automatically loads addresses and address types when both
392
+ * {@link EntityName} and {@link RecordID} inputs are set, and provides
393
+ * inline add/edit/delete functionality with primary-address management.
394
+ *
395
+ * @example
396
+ * ```html
397
+ * <bizapps-address-editor
398
+ * EntityName="MJ.BizApps.Common: People"
399
+ * [RecordID]="personId">
400
+ * </bizapps-address-editor>
401
+ * ```
402
+ */
403
+ export class AddressEditorComponent {
404
+ cdr = inject(ChangeDetectorRef);
405
+ constructor() {
406
+ // Fire-and-forget to prewarm the ActionEngine cache so postal code lookup is fast
407
+ ActionEngineBase.Instance.Config(false);
408
+ }
409
+ /** ISO 3166-1 alpha-2 country codes for the country dropdown. */
410
+ Countries = [
411
+ { Code: 'US', Name: 'United States' }, { Code: 'CA', Name: 'Canada' }, { Code: 'GB', Name: 'United Kingdom' },
412
+ { Code: 'AU', Name: 'Australia' }, { Code: 'DE', Name: 'Germany' }, { Code: 'FR', Name: 'France' },
413
+ { Code: 'ES', Name: 'Spain' }, { Code: 'IT', Name: 'Italy' }, { Code: 'NL', Name: 'Netherlands' },
414
+ { Code: 'BE', Name: 'Belgium' }, { Code: 'AT', Name: 'Austria' }, { Code: 'CH', Name: 'Switzerland' },
415
+ { Code: 'SE', Name: 'Sweden' }, { Code: 'NO', Name: 'Norway' }, { Code: 'DK', Name: 'Denmark' },
416
+ { Code: 'FI', Name: 'Finland' }, { Code: 'IE', Name: 'Ireland' }, { Code: 'PT', Name: 'Portugal' },
417
+ { Code: 'PL', Name: 'Poland' }, { Code: 'CZ', Name: 'Czech Republic' }, { Code: 'GR', Name: 'Greece' },
418
+ { Code: 'HU', Name: 'Hungary' }, { Code: 'RO', Name: 'Romania' }, { Code: 'BG', Name: 'Bulgaria' },
419
+ { Code: 'HR', Name: 'Croatia' }, { Code: 'SK', Name: 'Slovakia' }, { Code: 'SI', Name: 'Slovenia' },
420
+ { Code: 'LT', Name: 'Lithuania' }, { Code: 'LV', Name: 'Latvia' }, { Code: 'EE', Name: 'Estonia' },
421
+ { Code: 'LU', Name: 'Luxembourg' }, { Code: 'MT', Name: 'Malta' }, { Code: 'CY', Name: 'Cyprus' },
422
+ { Code: 'IS', Name: 'Iceland' }, { Code: 'JP', Name: 'Japan' }, { Code: 'KR', Name: 'South Korea' },
423
+ { Code: 'CN', Name: 'China' }, { Code: 'TW', Name: 'Taiwan' }, { Code: 'HK', Name: 'Hong Kong' },
424
+ { Code: 'SG', Name: 'Singapore' }, { Code: 'IN', Name: 'India' }, { Code: 'PK', Name: 'Pakistan' },
425
+ { Code: 'BD', Name: 'Bangladesh' }, { Code: 'PH', Name: 'Philippines' }, { Code: 'TH', Name: 'Thailand' },
426
+ { Code: 'VN', Name: 'Vietnam' }, { Code: 'MY', Name: 'Malaysia' }, { Code: 'ID', Name: 'Indonesia' },
427
+ { Code: 'NZ', Name: 'New Zealand' }, { Code: 'MX', Name: 'Mexico' }, { Code: 'BR', Name: 'Brazil' },
428
+ { Code: 'AR', Name: 'Argentina' }, { Code: 'CL', Name: 'Chile' }, { Code: 'CO', Name: 'Colombia' },
429
+ { Code: 'PE', Name: 'Peru' }, { Code: 'VE', Name: 'Venezuela' }, { Code: 'EC', Name: 'Ecuador' },
430
+ { Code: 'UY', Name: 'Uruguay' }, { Code: 'PY', Name: 'Paraguay' }, { Code: 'BO', Name: 'Bolivia' },
431
+ { Code: 'CR', Name: 'Costa Rica' }, { Code: 'PA', Name: 'Panama' }, { Code: 'DO', Name: 'Dominican Republic' },
432
+ { Code: 'GT', Name: 'Guatemala' }, { Code: 'HN', Name: 'Honduras' }, { Code: 'SV', Name: 'El Salvador' },
433
+ { Code: 'NI', Name: 'Nicaragua' }, { Code: 'CU', Name: 'Cuba' }, { Code: 'JM', Name: 'Jamaica' },
434
+ { Code: 'TT', Name: 'Trinidad and Tobago' }, { Code: 'PR', Name: 'Puerto Rico' },
435
+ { Code: 'ZA', Name: 'South Africa' }, { Code: 'NG', Name: 'Nigeria' }, { Code: 'KE', Name: 'Kenya' },
436
+ { Code: 'EG', Name: 'Egypt' }, { Code: 'MA', Name: 'Morocco' }, { Code: 'GH', Name: 'Ghana' },
437
+ { Code: 'TZ', Name: 'Tanzania' }, { Code: 'ET', Name: 'Ethiopia' }, { Code: 'UG', Name: 'Uganda' },
438
+ { Code: 'IL', Name: 'Israel' }, { Code: 'AE', Name: 'United Arab Emirates' }, { Code: 'SA', Name: 'Saudi Arabia' },
439
+ { Code: 'QA', Name: 'Qatar' }, { Code: 'KW', Name: 'Kuwait' }, { Code: 'BH', Name: 'Bahrain' },
440
+ { Code: 'OM', Name: 'Oman' }, { Code: 'JO', Name: 'Jordan' }, { Code: 'LB', Name: 'Lebanon' },
441
+ { Code: 'TR', Name: 'Turkey' }, { Code: 'RU', Name: 'Russia' }, { Code: 'UA', Name: 'Ukraine' },
442
+ ];
443
+ /**
444
+ * Controls whether add, edit, delete, and set-primary actions are available.
445
+ * When `false`, the component renders in read-only display mode.
446
+ * Typically bound to the parent form's `EditMode` property.
447
+ */
448
+ EditMode = false;
449
+ /** Emitted after any mutation (save, delete, set-primary) so the parent can refresh derived data. */
450
+ DataChanged = new EventEmitter();
451
+ _entityName = '';
452
+ _recordID = '';
453
+ /**
454
+ * The MemberJunction entity name (schema-qualified) of the parent record
455
+ * whose addresses are being managed.
456
+ *
457
+ * Setting this property triggers a data reload when {@link RecordID} is
458
+ * also available, unless the value has not changed.
459
+ *
460
+ * @example `'MJ.BizApps.Common: People'`
461
+ */
462
+ set EntityName(value) {
463
+ const prev = this._entityName;
464
+ this._entityName = value;
465
+ if (value && value !== prev && this._recordID) {
466
+ this.loadData();
467
+ }
468
+ }
469
+ get EntityName() { return this._entityName; }
470
+ /**
471
+ * The primary key (ID) of the parent record whose addresses are being managed.
472
+ *
473
+ * Setting this property triggers a data reload when {@link EntityName} is
474
+ * also available, unless the value has not changed.
475
+ *
476
+ * @example `'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'`
477
+ */
478
+ set RecordID(value) {
479
+ const prev = this._recordID;
480
+ this._recordID = value;
481
+ if (value && value !== prev && this._entityName) {
482
+ this.loadData();
483
+ }
484
+ }
485
+ get RecordID() { return this._recordID; }
486
+ /**
487
+ * The list of address items currently displayed, each pairing an
488
+ * AddressLink with its corresponding Address entity. Sorted with
489
+ * primary addresses first.
490
+ */
491
+ AddressItems = [];
492
+ /**
493
+ * All active address types available for selection in the type dropdown.
494
+ * Loaded from the `MJ.BizApps.Common: Address Types` entity, sorted by
495
+ * `DefaultRank ASC`.
496
+ */
497
+ AddressTypes = [];
498
+ /**
499
+ * Tracks the current editing state:
500
+ * - `null` -- not editing (display mode)
501
+ * - `-1` -- adding a new address
502
+ * - `>= 0` -- editing the address at that array index
503
+ */
504
+ EditingIndex = null;
505
+ /**
506
+ * The form model bound to the inline add/edit panel via two-way binding.
507
+ * Reset to defaults when adding, or populated from the existing record
508
+ * when editing.
509
+ */
510
+ EditForm = this.createEmptyForm();
511
+ /**
512
+ * Indicates whether the component is performing the initial data load.
513
+ * The template shows a loading spinner while this is `true`.
514
+ */
515
+ Loading = false;
516
+ /**
517
+ * Indicates whether a save, delete, or set-primary operation is in progress.
518
+ * Used to disable action buttons and show spinner feedback while `true`.
519
+ */
520
+ Saving = false;
521
+ /** The resolved MJ EntityID for the current {@link EntityName}. */
522
+ resolvedEntityID = '';
523
+ /** Cached action ID for the Postal Code Lookup action. */
524
+ postalCodeLookupActionID = null;
525
+ /** Whether a postal code lookup is currently in progress. */
526
+ LookingUpPostalCode = false;
527
+ /** Whether the last postal code lookup returned no results. */
528
+ PostalCodeNotFound = false;
529
+ /** The postal code value when the form was opened, used to detect changes. */
530
+ originalPostalCode = '';
531
+ /** Creates a blank {@link AddressEditForm} with sensible defaults. */
532
+ createEmptyForm() {
533
+ return {
534
+ TypeID: '',
535
+ IsPrimary: false,
536
+ Line1: '',
537
+ Line2: '',
538
+ City: '',
539
+ StateProvince: '',
540
+ PostalCode: '',
541
+ Country: 'US'
542
+ };
543
+ }
544
+ /**
545
+ * Looks up city and state from a postal code using the Postal Code Lookup
546
+ * MJ Action (backed by Google Geocoding API). Called on blur of the postal
547
+ * code input field.
548
+ *
549
+ * For new addresses: triggers when City or State are empty.
550
+ * For edits: triggers when the postal code changed from the original value.
551
+ */
552
+ async onPostalCodeBlur() {
553
+ const postalCode = this.EditForm.PostalCode?.trim();
554
+ if (!postalCode || postalCode.length < 3)
555
+ return;
556
+ const postalCodeChanged = postalCode !== this.originalPostalCode.trim();
557
+ const cityOrStateEmpty = !this.EditForm.City || !this.EditForm.StateProvince;
558
+ // Skip if postal code hasn't changed and city/state are already filled
559
+ if (!postalCodeChanged && !cityOrStateEmpty)
560
+ return;
561
+ this.LookingUpPostalCode = true;
562
+ this.PostalCodeNotFound = false;
563
+ this.cdr.detectChanges();
564
+ try {
565
+ const actionID = await this.getPostalCodeLookupActionID();
566
+ if (!actionID)
567
+ return;
568
+ const provider = Metadata.Provider;
569
+ const actionClient = new GraphQLActionClient(provider);
570
+ const params = [
571
+ { Name: 'PostalCode', Value: postalCode, Type: 'Input' },
572
+ { Name: 'Country', Value: this.EditForm.Country || 'US', Type: 'Both' },
573
+ ];
574
+ const result = await actionClient.RunAction(actionID, params);
575
+ if (result.Success && result.Message) {
576
+ // The action returns JSON-stringified address in Message
577
+ const address = JSON.parse(result.Message);
578
+ const city = address.City || '';
579
+ const state = address.State || '';
580
+ if (!city && !state) {
581
+ // Google resolved the country but not a specific city/state for this postal code
582
+ this.PostalCodeNotFound = true;
583
+ }
584
+ else if (postalCodeChanged) {
585
+ if (city)
586
+ this.EditForm.City = city;
587
+ if (state)
588
+ this.EditForm.StateProvince = state;
589
+ this.originalPostalCode = postalCode;
590
+ }
591
+ else {
592
+ if (!this.EditForm.City && city)
593
+ this.EditForm.City = city;
594
+ if (!this.EditForm.StateProvince && state)
595
+ this.EditForm.StateProvince = state;
596
+ }
597
+ }
598
+ else {
599
+ this.PostalCodeNotFound = true;
600
+ }
601
+ }
602
+ catch (err) {
603
+ console.error('AddressEditor: Postal code lookup failed', err);
604
+ this.PostalCodeNotFound = true;
605
+ }
606
+ finally {
607
+ this.LookingUpPostalCode = false;
608
+ this.cdr.detectChanges();
609
+ }
610
+ }
611
+ /** Resolves and caches the Action ID for "Postal Code Lookup" using ActionEngineBase metadata. */
612
+ async getPostalCodeLookupActionID() {
613
+ if (this.postalCodeLookupActionID)
614
+ return this.postalCodeLookupActionID;
615
+ await ActionEngineBase.Instance.Config(false);
616
+ const action = ActionEngineBase.Instance.GetActionByName('Postal Code Lookup');
617
+ this.postalCodeLookupActionID = action?.ID ?? null;
618
+ return this.postalCodeLookupActionID;
619
+ }
620
+ /**
621
+ * Loads address links, their associated addresses, and available address
622
+ * types from the server. Resets editing state before loading.
623
+ */
624
+ async loadData() {
625
+ this.Loading = true;
626
+ this.EditingIndex = null;
627
+ this.cdr.detectChanges();
628
+ try {
629
+ const md = new Metadata();
630
+ // Resolve EntityName -> EntityID
631
+ const entity = md.Entities.find(e => e.Name === this._entityName);
632
+ if (!entity) {
633
+ console.error(`AddressEditor: Entity "${this._entityName}" not found`);
634
+ return;
635
+ }
636
+ this.resolvedEntityID = entity.ID;
637
+ const rv = new RunView();
638
+ // Load address links and address types in parallel
639
+ const [linksResult, typesResult] = await rv.RunViews([
640
+ {
641
+ EntityName: 'MJ.BizApps.Common: Address Links',
642
+ ExtraFilter: `EntityID='${this.resolvedEntityID}' AND RecordID='${this._recordID}'`,
643
+ ResultType: 'entity_object'
644
+ },
645
+ {
646
+ EntityName: 'MJ.BizApps.Common: Address Types',
647
+ ExtraFilter: 'IsActive=1',
648
+ OrderBy: 'DefaultRank ASC',
649
+ ResultType: 'entity_object'
650
+ }
651
+ ]);
652
+ const links = linksResult.Success ? linksResult.Results : [];
653
+ this.AddressTypes = typesResult.Success ? typesResult.Results : [];
654
+ // Load all referenced addresses in one batch if we have links
655
+ if (links.length > 0) {
656
+ const addressIDs = links.map(l => `'${l.AddressID}'`).join(',');
657
+ const addressResult = await rv.RunView({
658
+ EntityName: 'MJ.BizApps.Common: Addresses',
659
+ ExtraFilter: `ID IN (${addressIDs})`,
660
+ ResultType: 'entity_object'
661
+ });
662
+ const addressMap = new Map();
663
+ if (addressResult.Success) {
664
+ for (const addr of addressResult.Results) {
665
+ addressMap.set(addr.ID, addr);
666
+ }
667
+ }
668
+ this.AddressItems = links
669
+ .filter(link => addressMap.has(link.AddressID))
670
+ .map(link => ({
671
+ Link: link,
672
+ Address: addressMap.get(link.AddressID)
673
+ }));
674
+ // Sort: primary first, then by rank/type
675
+ this.AddressItems.sort((a, b) => {
676
+ if (a.Link.IsPrimary && !b.Link.IsPrimary)
677
+ return -1;
678
+ if (!a.Link.IsPrimary && b.Link.IsPrimary)
679
+ return 1;
680
+ return 0;
681
+ });
682
+ }
683
+ else {
684
+ this.AddressItems = [];
685
+ }
686
+ // Set default type for add form
687
+ if (this.AddressTypes.length > 0) {
688
+ this.EditForm.TypeID = this.AddressTypes[0].ID;
689
+ }
690
+ }
691
+ catch (err) {
692
+ console.error('AddressEditor: Error loading data', err);
693
+ }
694
+ finally {
695
+ this.Loading = false;
696
+ this.cdr.detectChanges();
697
+ }
698
+ }
699
+ /**
700
+ * Resolves the Font Awesome icon class for a given address type.
701
+ *
702
+ * Falls back to `'fa-solid fa-location-dot'` when the type is not found
703
+ * or has no icon configured.
704
+ *
705
+ * @param typeID - The AddressType record ID to look up
706
+ * @returns The CSS class string for the icon (e.g., `'fa-solid fa-home'`)
707
+ */
708
+ getAddressTypeIcon(typeID) {
709
+ const addrType = this.AddressTypes.find(t => t.ID === typeID);
710
+ return addrType?.IconClass || 'fa-solid fa-location-dot';
711
+ }
712
+ /**
713
+ * Formats the first line of an address display string.
714
+ *
715
+ * Combines Line1 and Line2 (if present) with a comma separator.
716
+ *
717
+ * @param address - The Address entity to format
718
+ * @returns A formatted string such as `'123 Main St, Suite 200'`
719
+ */
720
+ formatAddressLine1(address) {
721
+ const parts = [address.Line1];
722
+ if (address.Line2)
723
+ parts.push(address.Line2);
724
+ return parts.join(', ');
725
+ }
726
+ /**
727
+ * Formats the second line of an address display string.
728
+ *
729
+ * Combines City, StateProvince, PostalCode, and Country into a standard
730
+ * comma-separated format.
731
+ *
732
+ * @param address - The Address entity to format
733
+ * @returns A formatted string such as `'San Francisco, CA, 94105, US'`
734
+ */
735
+ formatAddressLine2(address) {
736
+ const parts = [];
737
+ if (address.City)
738
+ parts.push(address.City);
739
+ if (address.StateProvince)
740
+ parts.push(address.StateProvince);
741
+ if (address.PostalCode)
742
+ parts.push(address.PostalCode);
743
+ let line = parts.join(', ');
744
+ if (address.Country)
745
+ line += ', ' + address.Country;
746
+ return line;
747
+ }
748
+ /**
749
+ * Opens the inline add form for creating a new address.
750
+ *
751
+ * Resets the edit form to defaults, pre-selects the first available
752
+ * address type, and auto-checks the "Primary" flag when no addresses
753
+ * exist yet.
754
+ */
755
+ onAdd() {
756
+ this.EditForm = this.createEmptyForm();
757
+ if (this.AddressTypes.length > 0) {
758
+ this.EditForm.TypeID = this.AddressTypes[0].ID;
759
+ }
760
+ // Default to primary if no addresses exist
761
+ if (this.AddressItems.length === 0) {
762
+ this.EditForm.IsPrimary = true;
763
+ }
764
+ this.originalPostalCode = '';
765
+ this.EditingIndex = -1;
766
+ this.cdr.detectChanges();
767
+ }
768
+ /**
769
+ * Opens the inline edit form for an existing address, populating the
770
+ * form fields from the current address and link data.
771
+ *
772
+ * @param index - The zero-based index of the address item in {@link AddressItems}
773
+ */
774
+ onEdit(index) {
775
+ const item = this.AddressItems[index];
776
+ this.EditForm = {
777
+ TypeID: item.Link.AddressTypeID,
778
+ IsPrimary: item.Link.IsPrimary,
779
+ Line1: item.Address.Line1,
780
+ Line2: item.Address.Line2 || '',
781
+ City: item.Address.City,
782
+ StateProvince: item.Address.StateProvince || '',
783
+ PostalCode: item.Address.PostalCode || '',
784
+ Country: item.Address.Country
785
+ };
786
+ this.originalPostalCode = this.EditForm.PostalCode;
787
+ this.EditingIndex = index;
788
+ this.cdr.detectChanges();
789
+ }
790
+ /**
791
+ * Cancels the current add or edit operation and returns to display mode.
792
+ */
793
+ onCancelEdit() {
794
+ this.EditingIndex = null;
795
+ this.cdr.detectChanges();
796
+ }
797
+ /**
798
+ * Persists the current form data, handling both new address creation and
799
+ * existing address updates.
800
+ *
801
+ * When the "Primary" flag is set, all other addresses for the same
802
+ * parent record are demoted. After saving, the address list is reloaded.
803
+ */
804
+ async onSave() {
805
+ if (!this.EditForm.Line1 || !this.EditForm.City)
806
+ return;
807
+ this.Saving = true;
808
+ this.cdr.detectChanges();
809
+ try {
810
+ const md = new Metadata();
811
+ if (this.EditingIndex !== null && this.EditingIndex >= 0) {
812
+ // Editing existing
813
+ await this.saveExisting(md);
814
+ }
815
+ else {
816
+ // Adding new
817
+ await this.saveNew(md);
818
+ }
819
+ // If setting as primary, clear other primaries
820
+ if (this.EditForm.IsPrimary) {
821
+ await this.clearOtherPrimaries();
822
+ }
823
+ // Reload data
824
+ await this.loadData();
825
+ this.DataChanged.emit();
826
+ }
827
+ catch (err) {
828
+ console.error('AddressEditor: Error saving', err);
829
+ }
830
+ finally {
831
+ this.Saving = false;
832
+ this.cdr.detectChanges();
833
+ }
834
+ }
835
+ /** Updates an existing Address and its AddressLink with form data. */
836
+ async saveExisting(md) {
837
+ const item = this.AddressItems[this.EditingIndex];
838
+ // Update address
839
+ item.Address.Line1 = this.EditForm.Line1;
840
+ item.Address.Line2 = this.EditForm.Line2 || null;
841
+ item.Address.City = this.EditForm.City;
842
+ item.Address.StateProvince = this.EditForm.StateProvince || null;
843
+ item.Address.PostalCode = this.EditForm.PostalCode || null;
844
+ item.Address.Country = this.EditForm.Country;
845
+ await item.Address.Save();
846
+ // Update link
847
+ item.Link.AddressTypeID = this.EditForm.TypeID;
848
+ item.Link.IsPrimary = this.EditForm.IsPrimary;
849
+ await item.Link.Save();
850
+ }
851
+ /** Creates a new Address record and its associated AddressLink. */
852
+ async saveNew(md) {
853
+ // Create new Address
854
+ const address = await md.GetEntityObject('MJ.BizApps.Common: Addresses');
855
+ address.NewRecord();
856
+ address.Line1 = this.EditForm.Line1;
857
+ address.Line2 = this.EditForm.Line2 || null;
858
+ address.City = this.EditForm.City;
859
+ address.StateProvince = this.EditForm.StateProvince || null;
860
+ address.PostalCode = this.EditForm.PostalCode || null;
861
+ address.Country = this.EditForm.Country;
862
+ const addrSaved = await address.Save();
863
+ if (!addrSaved) {
864
+ console.error('AddressEditor: Failed to save address');
865
+ return;
866
+ }
867
+ // Create AddressLink
868
+ const link = await md.GetEntityObject('MJ.BizApps.Common: Address Links');
869
+ link.NewRecord();
870
+ link.AddressID = address.ID;
871
+ link.EntityID = this.resolvedEntityID;
872
+ link.RecordID = this._recordID;
873
+ link.AddressTypeID = this.EditForm.TypeID;
874
+ link.IsPrimary = this.EditForm.IsPrimary;
875
+ const linkSaved = await link.Save();
876
+ if (!linkSaved) {
877
+ console.error('AddressEditor: Failed to save address link');
878
+ }
879
+ }
880
+ /** Removes the primary flag from all other address links for this record. */
881
+ async clearOtherPrimaries() {
882
+ const currentEditingLinkID = this.EditingIndex !== null && this.EditingIndex >= 0
883
+ ? this.AddressItems[this.EditingIndex].Link.ID
884
+ : null;
885
+ for (const item of this.AddressItems) {
886
+ if (item.Link.IsPrimary && item.Link.ID !== currentEditingLinkID) {
887
+ item.Link.IsPrimary = false;
888
+ await item.Link.Save();
889
+ }
890
+ }
891
+ }
892
+ /**
893
+ * Promotes the address at the given index to primary, demoting all others.
894
+ *
895
+ * After the update, the address list is reloaded so that sort order
896
+ * reflects the new primary designation.
897
+ *
898
+ * @param index - The zero-based index of the address item in {@link AddressItems}
899
+ */
900
+ async onSetPrimary(index) {
901
+ this.Saving = true;
902
+ this.cdr.detectChanges();
903
+ try {
904
+ // Clear all primaries
905
+ for (const item of this.AddressItems) {
906
+ if (item.Link.IsPrimary) {
907
+ item.Link.IsPrimary = false;
908
+ await item.Link.Save();
909
+ }
910
+ }
911
+ // Set new primary
912
+ this.AddressItems[index].Link.IsPrimary = true;
913
+ await this.AddressItems[index].Link.Save();
914
+ await this.loadData();
915
+ this.DataChanged.emit();
916
+ }
917
+ catch (err) {
918
+ console.error('AddressEditor: Error setting primary', err);
919
+ }
920
+ finally {
921
+ this.Saving = false;
922
+ this.cdr.detectChanges();
923
+ }
924
+ }
925
+ /**
926
+ * Deletes the address at the given index, removing both the AddressLink
927
+ * and the orphaned Address record.
928
+ *
929
+ * After deletion, the address list is reloaded.
930
+ *
931
+ * @param index - The zero-based index of the address item in {@link AddressItems}
932
+ */
933
+ async onDelete(index) {
934
+ const item = this.AddressItems[index];
935
+ this.Saving = true;
936
+ this.cdr.detectChanges();
937
+ try {
938
+ // Delete the link
939
+ await item.Link.Delete();
940
+ // Also delete the address record (it's orphaned now)
941
+ await item.Address.Delete();
942
+ await this.loadData();
943
+ this.DataChanged.emit();
944
+ }
945
+ catch (err) {
946
+ console.error('AddressEditor: Error deleting address', err);
947
+ }
948
+ finally {
949
+ this.Saving = false;
950
+ this.cdr.detectChanges();
951
+ }
952
+ }
953
+ static ɵfac = function AddressEditorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AddressEditorComponent)(); };
954
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddressEditorComponent, selectors: [["bizapps-address-editor"]], inputs: { EditMode: "EditMode", EntityName: "EntityName", RecordID: "RecordID" }, outputs: { DataChanged: "DataChanged" }, decls: 7, vars: 2, consts: [[1, "section-header"], [1, "section-label"], [1, "fa-solid", "fa-map-marker-alt"], [1, "count"], [1, "addr-table"], [1, "loading-row"], [1, "fa-solid", "fa-spinner"], [1, "empty-state"], [1, "addr-table-edit-panel"], [1, "addr-table-footer"], [1, "addr-table-row"], [1, "addr-table-icon"], [1, "addr-table-content"], [1, "addr-table-main"], [1, "addr-table-sub"], [1, "addr-table-badges"], [1, "badge", "badge-type"], [1, "badge", "badge-primary"], [1, "addr-table-actions"], [1, "fa-solid", "fa-star"], ["title", "Set as Primary", 1, "btn-ghost"], ["title", "Edit", 1, "btn-ghost", 3, "click"], [1, "fa-solid", "fa-pen"], ["title", "Remove", 1, "btn-ghost", "danger", 3, "click"], [1, "fa-solid", "fa-trash"], ["title", "Set as Primary", 1, "btn-ghost", 3, "click"], [1, "fa-regular", "fa-star"], [1, "form-row"], [1, "form-field", "type-field"], [3, "ngModelChange", "ngModel"], [3, "value"], [1, "form-field"], ["type", "text", "placeholder", "Street address", 3, "ngModelChange", "ngModel"], [1, "form-field", "line2-field"], ["type", "text", "placeholder", "Apt, suite", 3, "ngModelChange", "ngModel"], [1, "fa-solid", "fa-spinner", "fa-spin", "lookup-spinner"], [1, "lookup-not-found"], ["type", "text", "placeholder", "City", 3, "ngModelChange", "ngModel"], [1, "form-field", "state-field"], ["type", "text", "placeholder", "ST", 3, "ngModelChange", "ngModel"], [1, "form-field", "postal-field"], ["type", "text", "placeholder", "Zip", 3, "ngModelChange", "blur", "ngModel"], [1, "form-field", "country-field"], [1, "checkbox-field"], ["type", "checkbox", 3, "ngModelChange", "id", "ngModel"], [3, "for"], [1, "form-actions"], [1, "btn", "btn-primary", "btn-sm", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "btn", "btn-cancel", "btn-sm", 3, "click"], ["type", "checkbox", "id", "primary-add", 3, "ngModelChange", "ngModel"], ["for", "primary-add"], [1, "btn", "btn-outline", "full-width", 3, "click"], [1, "fa-solid", "fa-plus"]], template: function AddressEditorComponent_Template(rf, ctx) { if (rf & 1) {
955
+ i0.ɵɵelementStart(0, "div", 0)(1, "span", 1);
956
+ i0.ɵɵelement(2, "i", 2);
957
+ i0.ɵɵtext(3, " Addresses ");
958
+ i0.ɵɵconditionalCreate(4, AddressEditorComponent_Conditional_4_Template, 2, 1, "span", 3);
959
+ i0.ɵɵelementEnd()();
960
+ i0.ɵɵconditionalCreate(5, AddressEditorComponent_Conditional_5_Template, 4, 0, "div", 4)(6, AddressEditorComponent_Conditional_6_Template, 6, 3, "div", 4);
961
+ } if (rf & 2) {
962
+ i0.ɵɵadvance(4);
963
+ i0.ɵɵconditional(!ctx.Loading && ctx.AddressItems.length > 0 ? 4 : -1);
964
+ i0.ɵɵadvance();
965
+ i0.ɵɵconditional(ctx.Loading ? 5 : 6);
966
+ } }, dependencies: [CommonModule, FormsModule, i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.CheckboxControlValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel], styles: ["\n\n\n\n\n\n[_nghost-%COMP%] {\n display: block;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n color: #333;\n}\n\n.section-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n\n.section-label[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 600;\n color: #333;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #1976d2;\n}\n\n.count[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #888;\n font-weight: 400;\n}\n\n\n\n.addr-table[_ngcontent-%COMP%] {\n width: 100%;\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n overflow: hidden;\n}\n\n\n\n.addr-table-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n padding: 12px 16px;\n border-bottom: 1px solid #f0f0f0;\n gap: 12px;\n transition: background 0.1s ease;\n}\n\n.addr-table-row[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.addr-table-row[_ngcontent-%COMP%]:hover {\n background: #fafafa;\n}\n\n.addr-table-row.primary[_ngcontent-%COMP%] {\n background: #f1f8e9;\n}\n\n\n\n.addr-table-icon[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n background: #e3f2fd;\n color: #1565c0;\n font-size: 14px;\n flex-shrink: 0;\n}\n\n\n\n.addr-table-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.addr-table-main[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.addr-table-sub[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #888;\n margin-top: 2px;\n}\n\n\n\n.addr-table-badges[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n flex-shrink: 0;\n}\n\n.badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 10px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.badge-type[_ngcontent-%COMP%] {\n background: #e3f2fd;\n color: #1565c0;\n}\n\n.badge-primary[_ngcontent-%COMP%] {\n background: #e8f5e9;\n color: #2e7d32;\n}\n\n\n\n.addr-table-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n flex-shrink: 0;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.addr-table-row[_ngcontent-%COMP%]:hover .addr-table-actions[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n\n\n.btn-ghost[_ngcontent-%COMP%] {\n background: transparent;\n color: #999;\n padding: 6px 8px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 13px;\n transition: all 0.15s ease;\n}\n\n.btn-ghost[_ngcontent-%COMP%]:hover {\n color: #333;\n background: #f5f5f5;\n}\n\n.btn-ghost.danger[_ngcontent-%COMP%]:hover {\n color: #c62828;\n background: #ffebee;\n}\n\n\n\n.addr-table-edit-panel[_ngcontent-%COMP%] {\n padding: 16px;\n background: #f8f9ff;\n border-bottom: 2px solid #1976d2;\n}\n\n\n\n.addr-table-footer[_ngcontent-%COMP%] {\n padding: 10px 16px;\n border-top: 1px solid #e0e0e0;\n background: #fafafa;\n}\n\n\n\n.btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n border: none;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-primary[_ngcontent-%COMP%] {\n background: #1976d2;\n color: white;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover {\n background: #1565c0;\n}\n\n.btn-outline[_ngcontent-%COMP%] {\n background: transparent;\n border: 1px dashed #ccc;\n color: #666;\n}\n\n.btn-outline[_ngcontent-%COMP%]:hover {\n border-color: #1976d2;\n color: #1976d2;\n background: #f5f9ff;\n}\n\n.btn-outline.full-width[_ngcontent-%COMP%] {\n width: 100%;\n justify-content: center;\n}\n\n.btn-cancel[_ngcontent-%COMP%] {\n background: #f5f5f5;\n color: #666;\n border: 1px solid #e0e0e0;\n}\n\n.btn-cancel[_ngcontent-%COMP%]:hover {\n background: #eeeeee;\n}\n\n.btn-sm[_ngcontent-%COMP%] {\n padding: 6px 14px;\n font-size: 12px;\n}\n\n\n\n.form-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n margin-bottom: 12px;\n}\n\n.form-field[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: block;\n font-size: 12px;\n font-weight: 600;\n color: #666;\n margin-bottom: 4px;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%], \n.form-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e0e0e0;\n border-radius: 6px;\n font-size: 14px;\n font-family: inherit;\n background: white;\n}\n\n.form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, \n.form-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #1976d2;\n box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);\n}\n\n.form-field.type-field[_ngcontent-%COMP%] {\n max-width: 150px;\n}\n\n.form-field.line2-field[_ngcontent-%COMP%] {\n max-width: 150px;\n}\n\n.form-field.state-field[_ngcontent-%COMP%] {\n max-width: 80px;\n}\n\n.form-field.postal-field[_ngcontent-%COMP%] {\n max-width: 130px;\n}\n\n.form-field.country-field[_ngcontent-%COMP%] {\n max-width: 180px;\n}\n\n.checkbox-field[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 22px;\n}\n\n.checkbox-field[_ngcontent-%COMP%] input[type=\"checkbox\"][_ngcontent-%COMP%] {\n width: 16px;\n height: 16px;\n cursor: pointer;\n}\n\n.checkbox-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #555;\n cursor: pointer;\n}\n\n.form-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n text-align: center;\n padding: 32px 16px;\n color: #888;\n font-size: 14px;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 24px;\n color: #ccc;\n margin-bottom: 8px;\n display: block;\n}\n\n\n\n.loading-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n color: #888;\n font-size: 13px;\n gap: 8px;\n}\n\n.loading-row[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n animation: _ngcontent-%COMP%_spin 1s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n.lookup-spinner[_ngcontent-%COMP%] {\n font-size: 10px;\n color: #1976d2;\n margin-left: 4px;\n}\n\n.lookup-not-found[_ngcontent-%COMP%] {\n font-size: 10px;\n color: #e65100;\n margin-left: 4px;\n font-weight: 600;\n}"] });
967
+ }
968
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressEditorComponent, [{
969
+ type: Component,
970
+ args: [{ standalone: true, imports: [CommonModule, FormsModule], selector: 'bizapps-address-editor', template: "<!-- AddressEditor - Compact Table Design (Option B) -->\n\n<div class=\"section-header\">\n <span class=\"section-label\">\n <i class=\"fa-solid fa-map-marker-alt\"></i>\n Addresses\n @if (!Loading && AddressItems.length > 0) {\n <span class=\"count\">({{ AddressItems.length }})</span>\n }\n </span>\n</div>\n\n@if (Loading) {\n <div class=\"addr-table\">\n <div class=\"loading-row\">\n <i class=\"fa-solid fa-spinner\"></i> Loading addresses...\n </div>\n </div>\n} @else {\n <div class=\"addr-table\">\n @if (AddressItems.length === 0 && EditingIndex !== -1) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-map-marker-alt\"></i>\n No addresses linked yet\n </div>\n }\n\n @for (item of AddressItems; track item.Link.ID; let i = $index) {\n <!-- Address Row -->\n <div class=\"addr-table-row\" [class.primary]=\"item.Link.IsPrimary\">\n <div class=\"addr-table-icon\">\n <i [class]=\"getAddressTypeIcon(item.Link.AddressTypeID)\"></i>\n </div>\n <div class=\"addr-table-content\">\n <div class=\"addr-table-main\">{{ formatAddressLine1(item.Address) }}</div>\n <div class=\"addr-table-sub\">{{ formatAddressLine2(item.Address) }}</div>\n </div>\n <div class=\"addr-table-badges\">\n <span class=\"badge badge-type\">{{ item.Link.AddressType }}</span>\n @if (item.Link.IsPrimary) {\n <span class=\"badge badge-primary\"><i class=\"fa-solid fa-star\"></i> Primary</span>\n }\n </div>\n @if (EditMode) {\n <div class=\"addr-table-actions\">\n @if (!item.Link.IsPrimary) {\n <button class=\"btn-ghost\" title=\"Set as Primary\" (click)=\"onSetPrimary(i)\">\n <i class=\"fa-regular fa-star\"></i>\n </button>\n }\n <button class=\"btn-ghost\" title=\"Edit\" (click)=\"onEdit(i)\">\n <i class=\"fa-solid fa-pen\"></i>\n </button>\n <button class=\"btn-ghost danger\" title=\"Remove\" (click)=\"onDelete(i)\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n\n <!-- Inline Edit Panel (shown when editing this row) -->\n @if (EditingIndex === i) {\n <div class=\"addr-table-edit-panel\">\n <div class=\"form-row\">\n <div class=\"form-field type-field\">\n <label>Type</label>\n <select [(ngModel)]=\"EditForm.TypeID\">\n @for (t of AddressTypes; track t.ID) {\n <option [value]=\"t.ID\">{{ t.Name }}</option>\n }\n </select>\n </div>\n <div class=\"form-field\">\n <label>Line 1</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.Line1\" placeholder=\"Street address\">\n </div>\n <div class=\"form-field line2-field\">\n <label>Line 2</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.Line2\" placeholder=\"Apt, suite\">\n </div>\n </div>\n <div class=\"form-row\">\n <div class=\"form-field\">\n <label>\n City\n @if (LookingUpPostalCode) { <i class=\"fa-solid fa-spinner fa-spin lookup-spinner\"></i> }\n @if (PostalCodeNotFound) { <span class=\"lookup-not-found\">not found</span> }\n </label>\n <input type=\"text\" [(ngModel)]=\"EditForm.City\" placeholder=\"City\">\n </div>\n <div class=\"form-field state-field\">\n <label>State</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.StateProvince\" placeholder=\"ST\">\n </div>\n <div class=\"form-field postal-field\">\n <label>Postal</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.PostalCode\" placeholder=\"Zip\" (blur)=\"onPostalCodeBlur()\">\n </div>\n <div class=\"form-field country-field\">\n <label>Country</label>\n <select [(ngModel)]=\"EditForm.Country\">\n @for (c of Countries; track c.Code) {\n <option [value]=\"c.Code\">{{ c.Code }} - {{ c.Name }}</option>\n }\n </select>\n </div>\n <div class=\"checkbox-field\">\n <input type=\"checkbox\" [id]=\"'primary-edit-' + i\" [(ngModel)]=\"EditForm.IsPrimary\">\n <label [for]=\"'primary-edit-' + i\">Primary</label>\n </div>\n </div>\n <div class=\"form-actions\">\n <button class=\"btn btn-primary btn-sm\" (click)=\"onSave()\" [disabled]=\"Saving\">\n @if (Saving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n Save\n </button>\n <button class=\"btn btn-cancel btn-sm\" (click)=\"onCancelEdit()\">Cancel</button>\n </div>\n </div>\n }\n }\n\n <!-- Add New Panel (shown when EditingIndex === -1) -->\n @if (EditingIndex === -1) {\n <div class=\"addr-table-edit-panel\">\n <div class=\"form-row\">\n <div class=\"form-field type-field\">\n <label>Type</label>\n <select [(ngModel)]=\"EditForm.TypeID\">\n @for (t of AddressTypes; track t.ID) {\n <option [value]=\"t.ID\">{{ t.Name }}</option>\n }\n </select>\n </div>\n <div class=\"form-field\">\n <label>Line 1</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.Line1\" placeholder=\"Street address\">\n </div>\n <div class=\"form-field line2-field\">\n <label>Line 2</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.Line2\" placeholder=\"Apt, suite\">\n </div>\n </div>\n <div class=\"form-row\">\n <div class=\"form-field\">\n <label>\n City\n @if (LookingUpPostalCode) { <i class=\"fa-solid fa-spinner fa-spin lookup-spinner\"></i> }\n @if (PostalCodeNotFound) { <span class=\"lookup-not-found\">not found</span> }\n </label>\n <input type=\"text\" [(ngModel)]=\"EditForm.City\" placeholder=\"City\">\n </div>\n <div class=\"form-field state-field\">\n <label>State</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.StateProvince\" placeholder=\"ST\">\n </div>\n <div class=\"form-field postal-field\">\n <label>Postal</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.PostalCode\" placeholder=\"Zip\" (blur)=\"onPostalCodeBlur()\">\n </div>\n <div class=\"form-field country-field\">\n <label>Country</label>\n <select [(ngModel)]=\"EditForm.Country\">\n @for (c of Countries; track c.Code) {\n <option [value]=\"c.Code\">{{ c.Code }} - {{ c.Name }}</option>\n }\n </select>\n </div>\n <div class=\"checkbox-field\">\n <input type=\"checkbox\" id=\"primary-add\" [(ngModel)]=\"EditForm.IsPrimary\">\n <label for=\"primary-add\">Primary</label>\n </div>\n </div>\n <div class=\"form-actions\">\n <button class=\"btn btn-primary btn-sm\" (click)=\"onSave()\" [disabled]=\"Saving\">\n @if (Saving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n Save\n </button>\n <button class=\"btn btn-cancel btn-sm\" (click)=\"onCancelEdit()\">Cancel</button>\n </div>\n </div>\n }\n\n <!-- Add Button Footer -->\n @if (EditingIndex === null && EditMode) {\n <div class=\"addr-table-footer\">\n <button class=\"btn btn-outline full-width\" (click)=\"onAdd()\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Address\n </button>\n </div>\n }\n </div>\n}\n", styles: ["/* ============================================\n AddressEditor - Compact Table Design\n Pixel-perfect match to Option B mockup\n ============================================ */\n\n:host {\n display: block;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n color: #333;\n}\n\n.section-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n\n.section-label {\n font-size: 15px;\n font-weight: 600;\n color: #333;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.section-label i {\n color: #1976d2;\n}\n\n.count {\n font-size: 12px;\n color: #888;\n font-weight: 400;\n}\n\n/* Table container */\n.addr-table {\n width: 100%;\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n overflow: hidden;\n}\n\n/* Table rows */\n.addr-table-row {\n display: flex;\n align-items: center;\n padding: 12px 16px;\n border-bottom: 1px solid #f0f0f0;\n gap: 12px;\n transition: background 0.1s ease;\n}\n\n.addr-table-row:last-child {\n border-bottom: none;\n}\n\n.addr-table-row:hover {\n background: #fafafa;\n}\n\n.addr-table-row.primary {\n background: #f1f8e9;\n}\n\n/* Icon */\n.addr-table-icon {\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n background: #e3f2fd;\n color: #1565c0;\n font-size: 14px;\n flex-shrink: 0;\n}\n\n/* Content */\n.addr-table-content {\n flex: 1;\n min-width: 0;\n}\n\n.addr-table-main {\n font-size: 14px;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.addr-table-sub {\n font-size: 12px;\n color: #888;\n margin-top: 2px;\n}\n\n/* Badges */\n.addr-table-badges {\n display: flex;\n gap: 6px;\n flex-shrink: 0;\n}\n\n.badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 10px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.badge-type {\n background: #e3f2fd;\n color: #1565c0;\n}\n\n.badge-primary {\n background: #e8f5e9;\n color: #2e7d32;\n}\n\n/* Actions */\n.addr-table-actions {\n display: flex;\n gap: 4px;\n flex-shrink: 0;\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n\n.addr-table-row:hover .addr-table-actions {\n opacity: 1;\n}\n\n/* Ghost buttons */\n.btn-ghost {\n background: transparent;\n color: #999;\n padding: 6px 8px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 13px;\n transition: all 0.15s ease;\n}\n\n.btn-ghost:hover {\n color: #333;\n background: #f5f5f5;\n}\n\n.btn-ghost.danger:hover {\n color: #c62828;\n background: #ffebee;\n}\n\n/* Edit panel */\n.addr-table-edit-panel {\n padding: 16px;\n background: #f8f9ff;\n border-bottom: 2px solid #1976d2;\n}\n\n/* Footer */\n.addr-table-footer {\n padding: 10px 16px;\n border-top: 1px solid #e0e0e0;\n background: #fafafa;\n}\n\n/* Buttons */\n.btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n border: none;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-primary {\n background: #1976d2;\n color: white;\n}\n\n.btn-primary:hover {\n background: #1565c0;\n}\n\n.btn-outline {\n background: transparent;\n border: 1px dashed #ccc;\n color: #666;\n}\n\n.btn-outline:hover {\n border-color: #1976d2;\n color: #1976d2;\n background: #f5f9ff;\n}\n\n.btn-outline.full-width {\n width: 100%;\n justify-content: center;\n}\n\n.btn-cancel {\n background: #f5f5f5;\n color: #666;\n border: 1px solid #e0e0e0;\n}\n\n.btn-cancel:hover {\n background: #eeeeee;\n}\n\n.btn-sm {\n padding: 6px 14px;\n font-size: 12px;\n}\n\n/* Form */\n.form-row {\n display: flex;\n gap: 12px;\n margin-bottom: 12px;\n}\n\n.form-field {\n flex: 1;\n}\n\n.form-field label {\n display: block;\n font-size: 12px;\n font-weight: 600;\n color: #666;\n margin-bottom: 4px;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.form-field input,\n.form-field select {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e0e0e0;\n border-radius: 6px;\n font-size: 14px;\n font-family: inherit;\n background: white;\n}\n\n.form-field input:focus,\n.form-field select:focus {\n outline: none;\n border-color: #1976d2;\n box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);\n}\n\n.form-field.type-field {\n max-width: 150px;\n}\n\n.form-field.line2-field {\n max-width: 150px;\n}\n\n.form-field.state-field {\n max-width: 80px;\n}\n\n.form-field.postal-field {\n max-width: 130px;\n}\n\n.form-field.country-field {\n max-width: 180px;\n}\n\n.checkbox-field {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 22px;\n}\n\n.checkbox-field input[type=\"checkbox\"] {\n width: 16px;\n height: 16px;\n cursor: pointer;\n}\n\n.checkbox-field label {\n font-size: 13px;\n color: #555;\n cursor: pointer;\n}\n\n.form-actions {\n display: flex;\n gap: 8px;\n margin-top: 8px;\n}\n\n/* Empty state */\n.empty-state {\n text-align: center;\n padding: 32px 16px;\n color: #888;\n font-size: 14px;\n}\n\n.empty-state i {\n font-size: 24px;\n color: #ccc;\n margin-bottom: 8px;\n display: block;\n}\n\n/* Loading */\n.loading-row {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n color: #888;\n font-size: 13px;\n gap: 8px;\n}\n\n.loading-row i {\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n.lookup-spinner {\n font-size: 10px;\n color: #1976d2;\n margin-left: 4px;\n}\n\n.lookup-not-found {\n font-size: 10px;\n color: #e65100;\n margin-left: 4px;\n font-weight: 600;\n}\n"] }]
971
+ }], () => [], { EditMode: [{
972
+ type: Input
973
+ }], DataChanged: [{
974
+ type: Output
975
+ }], EntityName: [{
976
+ type: Input
977
+ }], RecordID: [{
978
+ type: Input
979
+ }] }); })();
980
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AddressEditorComponent, { className: "AddressEditorComponent", filePath: "lib/components/address-editor/address-editor.component.ts", lineNumber: 89 }); })();
981
+ //# sourceMappingURL=address-editor.component.js.map