@memberjunction/ng-versions 0.0.1 → 4.1.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 (30) hide show
  1. package/README.md +125 -43
  2. package/dist/lib/label-create/label-create.component.d.ts +71 -0
  3. package/dist/lib/label-create/label-create.component.d.ts.map +1 -0
  4. package/dist/lib/label-create/label-create.component.js +776 -0
  5. package/dist/lib/label-create/label-create.component.js.map +1 -0
  6. package/dist/lib/label-detail/label-detail.component.d.ts +186 -0
  7. package/dist/lib/label-detail/label-detail.component.d.ts.map +1 -0
  8. package/dist/lib/label-detail/label-detail.component.js +2076 -0
  9. package/dist/lib/label-detail/label-detail.component.js.map +1 -0
  10. package/dist/lib/panel/slide-panel.component.d.ts +35 -0
  11. package/dist/lib/panel/slide-panel.component.d.ts.map +1 -0
  12. package/dist/lib/panel/slide-panel.component.js +199 -0
  13. package/dist/lib/panel/slide-panel.component.js.map +1 -0
  14. package/dist/lib/record-micro-view/record-micro-view.component.d.ts +114 -0
  15. package/dist/lib/record-micro-view/record-micro-view.component.d.ts.map +1 -0
  16. package/dist/lib/record-micro-view/record-micro-view.component.js +824 -0
  17. package/dist/lib/record-micro-view/record-micro-view.component.js.map +1 -0
  18. package/dist/lib/types.d.ts +22 -0
  19. package/dist/lib/types.d.ts.map +1 -0
  20. package/dist/lib/types.js +5 -0
  21. package/dist/lib/types.js.map +1 -0
  22. package/dist/lib/versions.module.d.ts +14 -0
  23. package/dist/lib/versions.module.d.ts.map +1 -0
  24. package/dist/lib/versions.module.js +48 -0
  25. package/dist/lib/versions.module.js.map +1 -0
  26. package/dist/public-api.d.ts +7 -0
  27. package/dist/public-api.d.ts.map +1 -0
  28. package/dist/public-api.js +7 -0
  29. package/dist/public-api.js.map +1 -0
  30. package/package.json +37 -7
@@ -0,0 +1,776 @@
1
+ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
2
+ import { RunView, Metadata } from '@memberjunction/core';
3
+ import { GraphQLDataProvider, GraphQLVersionHistoryClient } from '@memberjunction/graphql-dataprovider';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/forms";
6
+ import * as i2 from "@memberjunction/ng-shared-generic";
7
+ import * as i3 from "@angular/common";
8
+ function MjLabelCreateComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
9
+ i0.ɵɵelementStart(0, "div", 1)(1, "div", 5)(2, "span", 6);
10
+ i0.ɵɵtext(3, "1");
11
+ i0.ɵɵelementEnd();
12
+ i0.ɵɵelementStart(4, "span", 7);
13
+ i0.ɵɵtext(5, "Entity");
14
+ i0.ɵɵelementEnd()();
15
+ i0.ɵɵelement(6, "div", 8);
16
+ i0.ɵɵelementStart(7, "div", 5)(8, "span", 6);
17
+ i0.ɵɵtext(9, "2");
18
+ i0.ɵɵelementEnd();
19
+ i0.ɵɵelementStart(10, "span", 7);
20
+ i0.ɵɵtext(11, "Records");
21
+ i0.ɵɵelementEnd()();
22
+ i0.ɵɵelement(12, "div", 8);
23
+ i0.ɵɵelementStart(13, "div", 5)(14, "span", 6);
24
+ i0.ɵɵtext(15, "3");
25
+ i0.ɵɵelementEnd();
26
+ i0.ɵɵelementStart(16, "span", 7);
27
+ i0.ɵɵtext(17, "Details");
28
+ i0.ɵɵelementEnd()()();
29
+ } if (rf & 2) {
30
+ const ctx_r0 = i0.ɵɵnextContext();
31
+ i0.ɵɵadvance();
32
+ i0.ɵɵclassProp("active", ctx_r0.CreateStep === "entity")("completed", ctx_r0.CreateStep !== "entity");
33
+ i0.ɵɵadvance(5);
34
+ i0.ɵɵclassProp("active", ctx_r0.CreateStep !== "entity");
35
+ i0.ɵɵadvance();
36
+ i0.ɵɵclassProp("active", ctx_r0.CreateStep === "records")("completed", ctx_r0.CreateStep === "details");
37
+ i0.ɵɵadvance(5);
38
+ i0.ɵɵclassProp("active", ctx_r0.CreateStep === "details");
39
+ i0.ɵɵadvance();
40
+ i0.ɵɵclassProp("active", ctx_r0.CreateStep === "details");
41
+ } }
42
+ function MjLabelCreateComponent_Conditional_2_For_8_Conditional_4_Template(rf, ctx) { if (rf & 1) {
43
+ i0.ɵɵelementStart(0, "span", 19);
44
+ i0.ɵɵtext(1);
45
+ i0.ɵɵpipe(2, "slice");
46
+ i0.ɵɵelementEnd();
47
+ } if (rf & 2) {
48
+ const entity_r4 = i0.ɵɵnextContext().$implicit;
49
+ i0.ɵɵadvance();
50
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind3(2, 1, entity_r4.Description, 0, 80));
51
+ } }
52
+ function MjLabelCreateComponent_Conditional_2_For_8_Template(rf, ctx) { if (rf & 1) {
53
+ const _r3 = i0.ɵɵgetCurrentView();
54
+ i0.ɵɵelementStart(0, "div", 16);
55
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_2_For_8_Template_div_click_0_listener() { const entity_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.SelectEntity(entity_r4)); });
56
+ i0.ɵɵelementStart(1, "div", 17)(2, "span", 18);
57
+ i0.ɵɵtext(3);
58
+ i0.ɵɵelementEnd();
59
+ i0.ɵɵconditionalCreate(4, MjLabelCreateComponent_Conditional_2_For_8_Conditional_4_Template, 3, 5, "span", 19);
60
+ i0.ɵɵelementEnd();
61
+ i0.ɵɵelement(5, "i", 20);
62
+ i0.ɵɵelementEnd();
63
+ } if (rf & 2) {
64
+ const entity_r4 = ctx.$implicit;
65
+ i0.ɵɵadvance(3);
66
+ i0.ɵɵtextInterpolate(entity_r4.Name);
67
+ i0.ɵɵadvance();
68
+ i0.ɵɵconditional(entity_r4.Description ? 4 : -1);
69
+ } }
70
+ function MjLabelCreateComponent_Conditional_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
71
+ i0.ɵɵelementStart(0, "div", 15);
72
+ i0.ɵɵtext(1, " No entities match your search. ");
73
+ i0.ɵɵelementEnd();
74
+ } }
75
+ function MjLabelCreateComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
76
+ const _r2 = i0.ɵɵgetCurrentView();
77
+ i0.ɵɵelementStart(0, "div", 2)(1, "p", 9);
78
+ i0.ɵɵtext(2, "Choose an entity type to label records from.");
79
+ i0.ɵɵelementEnd();
80
+ i0.ɵɵelementStart(3, "div", 10);
81
+ i0.ɵɵelement(4, "i", 11);
82
+ i0.ɵɵelementStart(5, "input", 12);
83
+ i0.ɵɵlistener("ngModelChange", function MjLabelCreateComponent_Conditional_2_Template_input_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnEntitySearchChange($event)); });
84
+ i0.ɵɵelementEnd()();
85
+ i0.ɵɵelementStart(6, "div", 13);
86
+ i0.ɵɵrepeaterCreate(7, MjLabelCreateComponent_Conditional_2_For_8_Template, 6, 2, "div", 14, i0.ɵɵrepeaterTrackByIdentity);
87
+ i0.ɵɵconditionalCreate(9, MjLabelCreateComponent_Conditional_2_Conditional_9_Template, 2, 0, "div", 15);
88
+ i0.ɵɵelementEnd()();
89
+ } if (rf & 2) {
90
+ const ctx_r0 = i0.ɵɵnextContext();
91
+ i0.ɵɵadvance(5);
92
+ i0.ɵɵproperty("ngModel", ctx_r0.EntitySearchText);
93
+ i0.ɵɵadvance(2);
94
+ i0.ɵɵrepeater(ctx_r0.FilteredEntities);
95
+ i0.ɵɵadvance(2);
96
+ i0.ɵɵconditional(ctx_r0.FilteredEntities.length === 0 ? 9 : -1);
97
+ } }
98
+ function MjLabelCreateComponent_Conditional_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
99
+ const _r5 = i0.ɵɵgetCurrentView();
100
+ i0.ɵɵelementStart(0, "button", 24);
101
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_3_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.GoBackToEntity()); });
102
+ i0.ɵɵelement(1, "i", 25);
103
+ i0.ɵɵelementEnd();
104
+ } }
105
+ function MjLabelCreateComponent_Conditional_3_Conditional_9_Template(rf, ctx) { if (rf & 1) {
106
+ i0.ɵɵelement(0, "mj-loading", 23);
107
+ } }
108
+ function MjLabelCreateComponent_Conditional_3_Conditional_10_For_11_Conditional_2_Template(rf, ctx) { if (rf & 1) {
109
+ i0.ɵɵelement(0, "i", 39);
110
+ } }
111
+ function MjLabelCreateComponent_Conditional_3_Conditional_10_For_11_Template(rf, ctx) { if (rf & 1) {
112
+ const _r7 = i0.ɵɵgetCurrentView();
113
+ i0.ɵɵelementStart(0, "div", 37);
114
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_3_Conditional_10_For_11_Template_div_click_0_listener() { const record_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.ToggleRecordSelection(record_r8)); });
115
+ i0.ɵɵelementStart(1, "div", 38);
116
+ i0.ɵɵconditionalCreate(2, MjLabelCreateComponent_Conditional_3_Conditional_10_For_11_Conditional_2_Template, 1, 0, "i", 39);
117
+ i0.ɵɵelementEnd();
118
+ i0.ɵɵelementStart(3, "span", 40);
119
+ i0.ɵɵtext(4);
120
+ i0.ɵɵelementEnd()();
121
+ } if (rf & 2) {
122
+ const record_r8 = ctx.$implicit;
123
+ i0.ɵɵclassProp("selected", record_r8.Selected);
124
+ i0.ɵɵadvance(2);
125
+ i0.ɵɵconditional(record_r8.Selected ? 2 : -1);
126
+ i0.ɵɵadvance(2);
127
+ i0.ɵɵtextInterpolate(record_r8.DisplayName);
128
+ } }
129
+ function MjLabelCreateComponent_Conditional_3_Conditional_10_Conditional_12_Template(rf, ctx) { if (rf & 1) {
130
+ i0.ɵɵelementStart(0, "div", 15);
131
+ i0.ɵɵtext(1, " No records found for this entity. ");
132
+ i0.ɵɵelementEnd();
133
+ } }
134
+ function MjLabelCreateComponent_Conditional_3_Conditional_10_Template(rf, ctx) { if (rf & 1) {
135
+ const _r6 = i0.ɵɵgetCurrentView();
136
+ i0.ɵɵelementStart(0, "div", 26)(1, "div", 27);
137
+ i0.ɵɵelement(2, "i", 11);
138
+ i0.ɵɵelementStart(3, "input", 28);
139
+ i0.ɵɵlistener("ngModelChange", function MjLabelCreateComponent_Conditional_3_Conditional_10_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnRecordSearchChange($event)); });
140
+ i0.ɵɵelementEnd()();
141
+ i0.ɵɵelementStart(4, "div", 29)(5, "button", 30);
142
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_3_Conditional_10_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.SelectAllRecords()); });
143
+ i0.ɵɵtext(6, "Select All");
144
+ i0.ɵɵelementEnd();
145
+ i0.ɵɵelementStart(7, "button", 30);
146
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_3_Conditional_10_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.DeselectAllRecords()); });
147
+ i0.ɵɵtext(8, "Clear");
148
+ i0.ɵɵelementEnd()()();
149
+ i0.ɵɵelementStart(9, "div", 31);
150
+ i0.ɵɵrepeaterCreate(10, MjLabelCreateComponent_Conditional_3_Conditional_10_For_11_Template, 5, 4, "div", 32, i0.ɵɵrepeaterTrackByIdentity);
151
+ i0.ɵɵconditionalCreate(12, MjLabelCreateComponent_Conditional_3_Conditional_10_Conditional_12_Template, 2, 0, "div", 15);
152
+ i0.ɵɵelementEnd();
153
+ i0.ɵɵelementStart(13, "div", 33)(14, "span", 34);
154
+ i0.ɵɵtext(15);
155
+ i0.ɵɵelementEnd();
156
+ i0.ɵɵelementStart(16, "button", 35);
157
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_3_Conditional_10_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.GoToDetailsStep()); });
158
+ i0.ɵɵtext(17, " Continue ");
159
+ i0.ɵɵelement(18, "i", 36);
160
+ i0.ɵɵelementEnd()();
161
+ } if (rf & 2) {
162
+ const ctx_r0 = i0.ɵɵnextContext(2);
163
+ i0.ɵɵadvance(3);
164
+ i0.ɵɵproperty("ngModel", ctx_r0.RecordSearchText);
165
+ i0.ɵɵadvance(7);
166
+ i0.ɵɵrepeater(ctx_r0.FilteredRecords);
167
+ i0.ɵɵadvance(2);
168
+ i0.ɵɵconditional(ctx_r0.FilteredRecords.length === 0 && !ctx_r0.IsLoadingRecords ? 12 : -1);
169
+ i0.ɵɵadvance(3);
170
+ i0.ɵɵtextInterpolate1("", ctx_r0.SelectedRecordCount, " selected");
171
+ i0.ɵɵadvance();
172
+ i0.ɵɵproperty("disabled", ctx_r0.SelectedRecordCount === 0);
173
+ } }
174
+ function MjLabelCreateComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
175
+ i0.ɵɵelementStart(0, "div", 2)(1, "div", 21);
176
+ i0.ɵɵconditionalCreate(2, MjLabelCreateComponent_Conditional_3_Conditional_2_Template, 2, 0, "button", 22);
177
+ i0.ɵɵelementStart(3, "div")(4, "p", 9);
178
+ i0.ɵɵtext(5, " Select records from ");
179
+ i0.ɵɵelementStart(6, "strong");
180
+ i0.ɵɵtext(7);
181
+ i0.ɵɵelementEnd();
182
+ i0.ɵɵtext(8, " to label. ");
183
+ i0.ɵɵelementEnd()()();
184
+ i0.ɵɵconditionalCreate(9, MjLabelCreateComponent_Conditional_3_Conditional_9_Template, 1, 0, "mj-loading", 23);
185
+ i0.ɵɵconditionalCreate(10, MjLabelCreateComponent_Conditional_3_Conditional_10_Template, 19, 4);
186
+ i0.ɵɵelementEnd();
187
+ } if (rf & 2) {
188
+ const ctx_r0 = i0.ɵɵnextContext();
189
+ i0.ɵɵadvance(2);
190
+ i0.ɵɵconditional(!ctx_r0.PreselectedEntity ? 2 : -1);
191
+ i0.ɵɵadvance(5);
192
+ i0.ɵɵtextInterpolate(ctx_r0.SelectedEntity == null ? null : ctx_r0.SelectedEntity.Name);
193
+ i0.ɵɵadvance(2);
194
+ i0.ɵɵconditional(ctx_r0.IsLoadingRecords ? 9 : -1);
195
+ i0.ɵɵadvance();
196
+ i0.ɵɵconditional(!ctx_r0.IsLoadingRecords ? 10 : -1);
197
+ } }
198
+ function MjLabelCreateComponent_Conditional_4_Conditional_15_Template(rf, ctx) { if (rf & 1) {
199
+ i0.ɵɵelementStart(0, "div", 42);
200
+ i0.ɵɵelement(1, "i", 52);
201
+ i0.ɵɵelementStart(2, "span");
202
+ i0.ɵɵtext(3);
203
+ i0.ɵɵelementEnd()();
204
+ } if (rf & 2) {
205
+ const ctx_r0 = i0.ɵɵnextContext(2);
206
+ i0.ɵɵadvance(3);
207
+ i0.ɵɵtextInterpolate1("Will create 1 group + ", ctx_r0.SelectedRecordCount, " child labels");
208
+ } }
209
+ function MjLabelCreateComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
210
+ const _r9 = i0.ɵɵgetCurrentView();
211
+ i0.ɵɵelementStart(0, "div", 2)(1, "div", 21)(2, "button", 24);
212
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_4_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.GoBackToRecords()); });
213
+ i0.ɵɵelement(3, "i", 25);
214
+ i0.ɵɵelementEnd();
215
+ i0.ɵɵelementStart(4, "p", 9);
216
+ i0.ɵɵtext(5, "Name your version label.");
217
+ i0.ɵɵelementEnd()();
218
+ i0.ɵɵelementStart(6, "div", 41)(7, "div", 42);
219
+ i0.ɵɵelement(8, "i", 43);
220
+ i0.ɵɵelementStart(9, "span");
221
+ i0.ɵɵtext(10);
222
+ i0.ɵɵelementEnd()();
223
+ i0.ɵɵelementStart(11, "div", 42);
224
+ i0.ɵɵelement(12, "i", 44);
225
+ i0.ɵɵelementStart(13, "span");
226
+ i0.ɵɵtext(14);
227
+ i0.ɵɵelementEnd()();
228
+ i0.ɵɵconditionalCreate(15, MjLabelCreateComponent_Conditional_4_Conditional_15_Template, 4, 1, "div", 42);
229
+ i0.ɵɵelementEnd();
230
+ i0.ɵɵelementStart(16, "div", 45)(17, "label", 46);
231
+ i0.ɵɵtext(18, "Label Name");
232
+ i0.ɵɵelementEnd();
233
+ i0.ɵɵelementStart(19, "input", 47);
234
+ i0.ɵɵtwoWayListener("ngModelChange", function MjLabelCreateComponent_Conditional_4_Template_input_ngModelChange_19_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.LabelName, $event) || (ctx_r0.LabelName = $event); return i0.ɵɵresetView($event); });
235
+ i0.ɵɵelementEnd()();
236
+ i0.ɵɵelementStart(20, "div", 45)(21, "label", 46);
237
+ i0.ɵɵtext(22, "Description (optional)");
238
+ i0.ɵɵelementEnd();
239
+ i0.ɵɵelementStart(23, "textarea", 48);
240
+ i0.ɵɵtwoWayListener("ngModelChange", function MjLabelCreateComponent_Conditional_4_Template_textarea_ngModelChange_23_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.LabelDescription, $event) || (ctx_r0.LabelDescription = $event); return i0.ɵɵresetView($event); });
241
+ i0.ɵɵelementEnd()();
242
+ i0.ɵɵelementStart(24, "div", 49)(25, "button", 35);
243
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_4_Template_button_click_25_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.CreateLabels()); });
244
+ i0.ɵɵelement(26, "i", 50);
245
+ i0.ɵɵtext(27);
246
+ i0.ɵɵelementEnd();
247
+ i0.ɵɵelementStart(28, "button", 51);
248
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_4_Template_button_click_28_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnCancel()); });
249
+ i0.ɵɵtext(29, " Cancel ");
250
+ i0.ɵɵelementEnd()()();
251
+ } if (rf & 2) {
252
+ const ctx_r0 = i0.ɵɵnextContext();
253
+ i0.ɵɵadvance(10);
254
+ i0.ɵɵtextInterpolate(ctx_r0.SelectedEntity == null ? null : ctx_r0.SelectedEntity.Name);
255
+ i0.ɵɵadvance(4);
256
+ i0.ɵɵtextInterpolate2("", ctx_r0.SelectedRecordCount, " record", ctx_r0.SelectedRecordCount > 1 ? "s" : "", " selected");
257
+ i0.ɵɵadvance();
258
+ i0.ɵɵconditional(ctx_r0.SelectedRecordCount > 1 ? 15 : -1);
259
+ i0.ɵɵadvance(4);
260
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.LabelName);
261
+ i0.ɵɵadvance(4);
262
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.LabelDescription);
263
+ i0.ɵɵadvance(2);
264
+ i0.ɵɵproperty("disabled", !ctx_r0.LabelName.trim());
265
+ i0.ɵɵadvance(2);
266
+ i0.ɵɵtextInterpolate1(" Create Label", ctx_r0.SelectedRecordCount > 1 ? "s" : "", " ");
267
+ } }
268
+ function MjLabelCreateComponent_Conditional_5_Conditional_5_Conditional_8_Conditional_4_Template(rf, ctx) { if (rf & 1) {
269
+ i0.ɵɵelementStart(0, "span", 64);
270
+ i0.ɵɵelement(1, "i", 43);
271
+ i0.ɵɵtext(2);
272
+ i0.ɵɵelementEnd();
273
+ } if (rf & 2) {
274
+ const ctx_r0 = i0.ɵɵnextContext(4);
275
+ i0.ɵɵadvance(2);
276
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.CreateProgress.CurrentEntity, " ");
277
+ } }
278
+ function MjLabelCreateComponent_Conditional_5_Conditional_5_Conditional_8_Template(rf, ctx) { if (rf & 1) {
279
+ i0.ɵɵelementStart(0, "div", 63)(1, "span", 64);
280
+ i0.ɵɵelement(2, "i", 65);
281
+ i0.ɵɵtext(3);
282
+ i0.ɵɵelementEnd();
283
+ i0.ɵɵconditionalCreate(4, MjLabelCreateComponent_Conditional_5_Conditional_5_Conditional_8_Conditional_4_Template, 3, 1, "span", 64);
284
+ i0.ɵɵelementEnd();
285
+ } if (rf & 2) {
286
+ const ctx_r0 = i0.ɵɵnextContext(3);
287
+ i0.ɵɵadvance(3);
288
+ i0.ɵɵtextInterpolate2(" ", ctx_r0.CreateProgress.RecordsProcessed, " / ", ctx_r0.CreateProgress.TotalRecords, " records ");
289
+ i0.ɵɵadvance();
290
+ i0.ɵɵconditional(ctx_r0.CreateProgress.CurrentEntity ? 4 : -1);
291
+ } }
292
+ function MjLabelCreateComponent_Conditional_5_Conditional_5_Template(rf, ctx) { if (rf & 1) {
293
+ i0.ɵɵelementStart(0, "div", 56)(1, "div", 58);
294
+ i0.ɵɵelement(2, "div", 59);
295
+ i0.ɵɵelementEnd();
296
+ i0.ɵɵelementStart(3, "div", 60)(4, "span", 61);
297
+ i0.ɵɵtext(5);
298
+ i0.ɵɵelementEnd();
299
+ i0.ɵɵelementStart(6, "span", 62);
300
+ i0.ɵɵtext(7);
301
+ i0.ɵɵelementEnd()();
302
+ i0.ɵɵconditionalCreate(8, MjLabelCreateComponent_Conditional_5_Conditional_5_Conditional_8_Template, 5, 3, "div", 63);
303
+ i0.ɵɵelementEnd();
304
+ } if (rf & 2) {
305
+ const ctx_r0 = i0.ɵɵnextContext(2);
306
+ i0.ɵɵadvance(2);
307
+ i0.ɵɵstyleProp("width", ctx_r0.CreateProgress.Percentage, "%");
308
+ i0.ɵɵadvance(3);
309
+ i0.ɵɵtextInterpolate(ctx_r0.CreateProgress.Message);
310
+ i0.ɵɵadvance(2);
311
+ i0.ɵɵtextInterpolate1("", ctx_r0.CreateProgress.Percentage, "%");
312
+ i0.ɵɵadvance();
313
+ i0.ɵɵconditional(ctx_r0.CreateProgress.RecordsProcessed != null && ctx_r0.CreateProgress.TotalRecords ? 8 : -1);
314
+ } }
315
+ function MjLabelCreateComponent_Conditional_5_Conditional_6_Conditional_2_Template(rf, ctx) { if (rf & 1) {
316
+ i0.ɵɵelementStart(0, "span");
317
+ i0.ɵɵtext(1);
318
+ i0.ɵɵelementEnd();
319
+ } if (rf & 2) {
320
+ const ctx_r0 = i0.ɵɵnextContext(3);
321
+ i0.ɵɵadvance();
322
+ i0.ɵɵtextInterpolate1(" \u00B7 ", ctx_r0.CreatedItemCount, " items captured");
323
+ } }
324
+ function MjLabelCreateComponent_Conditional_5_Conditional_6_Template(rf, ctx) { if (rf & 1) {
325
+ i0.ɵɵelementStart(0, "p", 57);
326
+ i0.ɵɵtext(1);
327
+ i0.ɵɵconditionalCreate(2, MjLabelCreateComponent_Conditional_5_Conditional_6_Conditional_2_Template, 2, 1, "span");
328
+ i0.ɵɵelementEnd();
329
+ } if (rf & 2) {
330
+ const ctx_r0 = i0.ɵɵnextContext(2);
331
+ i0.ɵɵadvance();
332
+ i0.ɵɵtextInterpolate2(" ", ctx_r0.CreatedLabelCount, " label", ctx_r0.CreatedLabelCount !== 1 ? "s" : "", " created ");
333
+ i0.ɵɵadvance();
334
+ i0.ɵɵconditional(ctx_r0.CreatedItemCount > 0 ? 2 : -1);
335
+ } }
336
+ function MjLabelCreateComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
337
+ i0.ɵɵelementStart(0, "div", 3)(1, "div", 53);
338
+ i0.ɵɵelement(2, "i", 54);
339
+ i0.ɵɵelementEnd();
340
+ i0.ɵɵelementStart(3, "h3", 55);
341
+ i0.ɵɵtext(4, "Creating Labels...");
342
+ i0.ɵɵelementEnd();
343
+ i0.ɵɵconditionalCreate(5, MjLabelCreateComponent_Conditional_5_Conditional_5_Template, 9, 5, "div", 56);
344
+ i0.ɵɵconditionalCreate(6, MjLabelCreateComponent_Conditional_5_Conditional_6_Template, 3, 3, "p", 57);
345
+ i0.ɵɵelementEnd();
346
+ } if (rf & 2) {
347
+ const ctx_r0 = i0.ɵɵnextContext();
348
+ i0.ɵɵadvance(5);
349
+ i0.ɵɵconditional(ctx_r0.CreateProgress ? 5 : -1);
350
+ i0.ɵɵadvance();
351
+ i0.ɵɵconditional(!ctx_r0.CreateProgress ? 6 : -1);
352
+ } }
353
+ function MjLabelCreateComponent_Conditional_6_Conditional_1_Conditional_6_Template(rf, ctx) { if (rf & 1) {
354
+ i0.ɵɵelementStart(0, "span");
355
+ i0.ɵɵtext(1);
356
+ i0.ɵɵelementEnd();
357
+ } if (rf & 2) {
358
+ const ctx_r0 = i0.ɵɵnextContext(3);
359
+ i0.ɵɵadvance();
360
+ i0.ɵɵtextInterpolate1(" with ", ctx_r0.CreatedItemCount, " items captured");
361
+ } }
362
+ function MjLabelCreateComponent_Conditional_6_Conditional_1_Template(rf, ctx) { if (rf & 1) {
363
+ i0.ɵɵelementStart(0, "div", 67);
364
+ i0.ɵɵelement(1, "i", 39);
365
+ i0.ɵɵelementEnd();
366
+ i0.ɵɵelementStart(2, "h3", 68);
367
+ i0.ɵɵtext(3, "Labels Created");
368
+ i0.ɵɵelementEnd();
369
+ i0.ɵɵelementStart(4, "p", 69);
370
+ i0.ɵɵtext(5);
371
+ i0.ɵɵconditionalCreate(6, MjLabelCreateComponent_Conditional_6_Conditional_1_Conditional_6_Template, 2, 1, "span");
372
+ i0.ɵɵtext(7, ". ");
373
+ i0.ɵɵelementEnd();
374
+ } if (rf & 2) {
375
+ const ctx_r0 = i0.ɵɵnextContext(2);
376
+ i0.ɵɵadvance(5);
377
+ i0.ɵɵtextInterpolate2(" Successfully created ", ctx_r0.CreatedLabelCount, " label", ctx_r0.CreatedLabelCount !== 1 ? "s" : "", " ");
378
+ i0.ɵɵadvance();
379
+ i0.ɵɵconditional(ctx_r0.CreatedItemCount > 0 ? 6 : -1);
380
+ } }
381
+ function MjLabelCreateComponent_Conditional_6_Conditional_2_Template(rf, ctx) { if (rf & 1) {
382
+ i0.ɵɵelementStart(0, "div", 70);
383
+ i0.ɵɵelement(1, "i", 71);
384
+ i0.ɵɵelementEnd();
385
+ i0.ɵɵelementStart(2, "h3", 68);
386
+ i0.ɵɵtext(3, "Error");
387
+ i0.ɵɵelementEnd();
388
+ i0.ɵɵelementStart(4, "p", 72);
389
+ i0.ɵɵtext(5);
390
+ i0.ɵɵelementEnd();
391
+ } if (rf & 2) {
392
+ const ctx_r0 = i0.ɵɵnextContext(2);
393
+ i0.ɵɵadvance(5);
394
+ i0.ɵɵtextInterpolate(ctx_r0.CreateError);
395
+ } }
396
+ function MjLabelCreateComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
397
+ const _r10 = i0.ɵɵgetCurrentView();
398
+ i0.ɵɵelementStart(0, "div", 4);
399
+ i0.ɵɵconditionalCreate(1, MjLabelCreateComponent_Conditional_6_Conditional_1_Template, 8, 3);
400
+ i0.ɵɵconditionalCreate(2, MjLabelCreateComponent_Conditional_6_Conditional_2_Template, 6, 1);
401
+ i0.ɵɵelementStart(3, "button", 66);
402
+ i0.ɵɵlistener("click", function MjLabelCreateComponent_Conditional_6_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.FinishCreate()); });
403
+ i0.ɵɵtext(4, "Done");
404
+ i0.ɵɵelementEnd()();
405
+ } if (rf & 2) {
406
+ const ctx_r0 = i0.ɵɵnextContext();
407
+ i0.ɵɵadvance();
408
+ i0.ɵɵconditional(!ctx_r0.CreateError ? 1 : -1);
409
+ i0.ɵɵadvance();
410
+ i0.ɵɵconditional(ctx_r0.CreateError ? 2 : -1);
411
+ } }
412
+ export class MjLabelCreateComponent {
413
+ cdr;
414
+ /**
415
+ * When set, skips the entity picker step and pre-selects this entity.
416
+ */
417
+ PreselectedEntity = null;
418
+ /**
419
+ * When set along with PreselectedEntity, auto-selects these record IDs
420
+ * and skips directly to the details step.
421
+ */
422
+ PreselectedRecordIds = [];
423
+ /** Emitted when labels are successfully created. */
424
+ Created = new EventEmitter();
425
+ /** Emitted when the user cancels. */
426
+ Cancel = new EventEmitter();
427
+ // Wizard state
428
+ CreateStep = 'entity';
429
+ // Step 1: Entity selection
430
+ EntitySearchText = '';
431
+ FilteredEntities = [];
432
+ SelectedEntity = null;
433
+ // Step 2: Record selection
434
+ RecordSearchText = '';
435
+ AvailableRecords = [];
436
+ FilteredRecords = [];
437
+ IsLoadingRecords = false;
438
+ // Step 3: Details
439
+ LabelName = '';
440
+ LabelDescription = '';
441
+ // Creating / done state
442
+ IsCreatingLabel = false;
443
+ CreateError = '';
444
+ CreatedLabelCount = 0;
445
+ CreatedItemCount = 0;
446
+ CreateProgress = null;
447
+ metadata = new Metadata();
448
+ constructor(cdr) {
449
+ this.cdr = cdr;
450
+ }
451
+ ngOnInit() {
452
+ this.resetCreateDialog();
453
+ if (this.PreselectedEntity) {
454
+ this.SelectedEntity = this.PreselectedEntity;
455
+ if (this.PreselectedRecordIds.length > 0) {
456
+ this.skipToDetailsWithPreselection();
457
+ }
458
+ else {
459
+ this.CreateStep = 'records';
460
+ this.loadEntityRecords(this.PreselectedEntity);
461
+ }
462
+ }
463
+ else {
464
+ this.FilteredEntities = this.getTrackableEntities();
465
+ }
466
+ }
467
+ // =======================================================================
468
+ // Pre-selection helpers
469
+ // =======================================================================
470
+ async skipToDetailsWithPreselection() {
471
+ await this.loadEntityRecords(this.SelectedEntity);
472
+ this.preselectRecordsByIds(this.PreselectedRecordIds);
473
+ this.CreateStep = 'details';
474
+ this.LabelName = this.suggestLabelName();
475
+ this.cdr.markForCheck();
476
+ }
477
+ preselectRecordsByIds(ids) {
478
+ const idSet = new Set(ids);
479
+ for (const record of this.AvailableRecords) {
480
+ record.Selected = idSet.has(record.ID);
481
+ }
482
+ }
483
+ // =======================================================================
484
+ // Step 1: Entity picker
485
+ // =======================================================================
486
+ OnEntitySearchChange(text) {
487
+ this.EntitySearchText = text;
488
+ const search = text.toLowerCase();
489
+ const all = this.getTrackableEntities();
490
+ this.FilteredEntities = search
491
+ ? all.filter(e => e.Name.toLowerCase().includes(search))
492
+ : all;
493
+ this.cdr.markForCheck();
494
+ }
495
+ SelectEntity(entity) {
496
+ this.SelectedEntity = entity;
497
+ this.CreateStep = 'records';
498
+ this.loadEntityRecords(entity);
499
+ }
500
+ // =======================================================================
501
+ // Step 2: Record selection
502
+ // =======================================================================
503
+ OnRecordSearchChange(text) {
504
+ this.RecordSearchText = text;
505
+ const search = text.toLowerCase();
506
+ this.FilteredRecords = search
507
+ ? this.AvailableRecords.filter(r => r.DisplayName.toLowerCase().includes(search))
508
+ : [...this.AvailableRecords];
509
+ this.cdr.markForCheck();
510
+ }
511
+ ToggleRecordSelection(record) {
512
+ record.Selected = !record.Selected;
513
+ this.cdr.markForCheck();
514
+ }
515
+ SelectAllRecords() {
516
+ for (const r of this.FilteredRecords) {
517
+ r.Selected = true;
518
+ }
519
+ this.cdr.markForCheck();
520
+ }
521
+ DeselectAllRecords() {
522
+ for (const r of this.AvailableRecords) {
523
+ r.Selected = false;
524
+ }
525
+ this.cdr.markForCheck();
526
+ }
527
+ get SelectedRecordCount() {
528
+ return this.AvailableRecords.filter(r => r.Selected).length;
529
+ }
530
+ // =======================================================================
531
+ // Step navigation
532
+ // =======================================================================
533
+ GoToDetailsStep() {
534
+ if (this.SelectedRecordCount === 0)
535
+ return;
536
+ this.CreateStep = 'details';
537
+ this.LabelName = this.suggestLabelName();
538
+ this.cdr.markForCheck();
539
+ }
540
+ GoBackToRecords() {
541
+ this.CreateStep = 'records';
542
+ this.cdr.markForCheck();
543
+ }
544
+ GoBackToEntity() {
545
+ this.CreateStep = 'entity';
546
+ this.SelectedEntity = null;
547
+ this.AvailableRecords = [];
548
+ this.FilteredRecords = [];
549
+ this.cdr.markForCheck();
550
+ }
551
+ // =======================================================================
552
+ // Step 3: Create labels
553
+ // =======================================================================
554
+ async CreateLabels() {
555
+ if (!this.SelectedEntity || !this.LabelName.trim())
556
+ return;
557
+ this.IsCreatingLabel = true;
558
+ this.CreateStep = 'creating';
559
+ this.CreateError = '';
560
+ this.CreatedLabelCount = 0;
561
+ this.CreatedItemCount = 0;
562
+ this.cdr.markForCheck();
563
+ try {
564
+ const selected = this.AvailableRecords.filter(r => r.Selected);
565
+ if (selected.length === 1) {
566
+ await this.createSingleLabel(selected[0]);
567
+ }
568
+ else {
569
+ await this.createGroupedLabels(selected);
570
+ }
571
+ this.CreateStep = 'done';
572
+ }
573
+ catch (e) {
574
+ this.CreateError = e instanceof Error ? e.message : String(e);
575
+ this.CreateStep = 'done';
576
+ }
577
+ finally {
578
+ this.IsCreatingLabel = false;
579
+ this.cdr.markForCheck();
580
+ }
581
+ }
582
+ FinishCreate() {
583
+ this.Created.emit({
584
+ LabelCount: this.CreatedLabelCount,
585
+ ItemCount: this.CreatedItemCount
586
+ });
587
+ }
588
+ OnCancel() {
589
+ this.Cancel.emit();
590
+ }
591
+ // =======================================================================
592
+ // Create helpers
593
+ // =======================================================================
594
+ async createSingleLabel(record) {
595
+ const vhClient = new GraphQLVersionHistoryClient(GraphQLDataProvider.Instance);
596
+ const result = await vhClient.CreateLabel({
597
+ Name: this.LabelName.trim(),
598
+ Description: this.LabelDescription.trim() || undefined,
599
+ Scope: 'Record',
600
+ EntityName: this.SelectedEntity.Name,
601
+ RecordKeys: [{ Key: 'ID', Value: record.ID }],
602
+ IncludeDependencies: true,
603
+ OnProgress: (progress) => {
604
+ this.CreateProgress = progress;
605
+ this.cdr.markForCheck();
606
+ },
607
+ });
608
+ if (!result.Success) {
609
+ throw new Error(result.Error ?? 'Failed to create version label');
610
+ }
611
+ this.CreatedLabelCount = 1;
612
+ this.CreatedItemCount = result.ItemsCaptured ?? 0;
613
+ }
614
+ async createGroupedLabels(records) {
615
+ const vhClient = new GraphQLVersionHistoryClient(GraphQLDataProvider.Instance);
616
+ // Create parent container label (no RecordKey -> acts as a grouping label)
617
+ const parentResult = await vhClient.CreateLabel({
618
+ Name: this.LabelName.trim(),
619
+ Description: this.LabelDescription.trim() || undefined,
620
+ Scope: 'Entity',
621
+ EntityName: this.SelectedEntity.Name,
622
+ });
623
+ if (!parentResult.Success) {
624
+ throw new Error(parentResult.Error ?? 'Failed to create parent version label');
625
+ }
626
+ this.CreatedLabelCount = 1;
627
+ this.CreatedItemCount = parentResult.ItemsCaptured ?? 0;
628
+ this.cdr.markForCheck();
629
+ // Create child labels for each selected record
630
+ for (const record of records) {
631
+ const childResult = await vhClient.CreateLabel({
632
+ Name: `${this.LabelName.trim()} \u2014 ${record.DisplayName}`,
633
+ Description: this.LabelDescription.trim() || undefined,
634
+ Scope: 'Record',
635
+ EntityName: this.SelectedEntity.Name,
636
+ RecordKeys: [{ Key: 'ID', Value: record.ID }],
637
+ ParentID: parentResult.LabelID,
638
+ IncludeDependencies: true,
639
+ OnProgress: (progress) => {
640
+ this.CreateProgress = progress;
641
+ this.cdr.markForCheck();
642
+ },
643
+ });
644
+ if (!childResult.Success) {
645
+ console.error(`Failed to create child label for record ${record.ID}: ${childResult.Error}`);
646
+ continue;
647
+ }
648
+ this.CreatedLabelCount++;
649
+ this.CreatedItemCount += childResult.ItemsCaptured ?? 0;
650
+ this.cdr.markForCheck();
651
+ }
652
+ }
653
+ // =======================================================================
654
+ // Data loading
655
+ // =======================================================================
656
+ async loadEntityRecords(entity) {
657
+ this.IsLoadingRecords = true;
658
+ this.AvailableRecords = [];
659
+ this.FilteredRecords = [];
660
+ this.RecordSearchText = '';
661
+ this.cdr.markForCheck();
662
+ try {
663
+ const rv = new RunView();
664
+ const nameField = this.findNameField(entity);
665
+ const fields = nameField ? ['ID', nameField] : ['ID'];
666
+ const result = await rv.RunView({
667
+ EntityName: entity.Name,
668
+ Fields: fields,
669
+ OrderBy: nameField ?? 'ID',
670
+ MaxRows: 500,
671
+ ResultType: 'simple'
672
+ });
673
+ if (result.Success) {
674
+ this.AvailableRecords = result.Results.map(r => ({
675
+ ID: String(r['ID'] ?? ''),
676
+ DisplayName: nameField
677
+ ? String(r[nameField] ?? r['ID'] ?? '')
678
+ : String(r['ID'] ?? ''),
679
+ Selected: false
680
+ }));
681
+ this.FilteredRecords = [...this.AvailableRecords];
682
+ }
683
+ }
684
+ catch (error) {
685
+ console.error('Error loading entity records:', error);
686
+ }
687
+ finally {
688
+ this.IsLoadingRecords = false;
689
+ this.cdr.markForCheck();
690
+ }
691
+ }
692
+ // =======================================================================
693
+ // Utility helpers
694
+ // =======================================================================
695
+ findNameField(entity) {
696
+ const candidates = ['Name', 'Title', 'DisplayName', 'Label', 'Subject', 'Description'];
697
+ for (const name of candidates) {
698
+ const field = entity.Fields.find(f => f.Name.toLowerCase() === name.toLowerCase() && f.TSType === 'string');
699
+ if (field)
700
+ return field.Name;
701
+ }
702
+ return null;
703
+ }
704
+ getTrackableEntities() {
705
+ return this.metadata.Entities
706
+ .filter(e => e.TrackRecordChanges)
707
+ .sort((a, b) => a.Name.localeCompare(b.Name));
708
+ }
709
+ suggestLabelName() {
710
+ const entityName = this.SelectedEntity?.Name ?? '';
711
+ const selected = this.AvailableRecords.filter(r => r.Selected);
712
+ if (selected.length === 1) {
713
+ return `${selected[0].DisplayName} v1.0`;
714
+ }
715
+ const date = new Date().toLocaleDateString('en-US', {
716
+ month: 'short',
717
+ day: 'numeric',
718
+ year: 'numeric'
719
+ });
720
+ return `${entityName} \u2014 ${date}`;
721
+ }
722
+ resetCreateDialog() {
723
+ this.CreateStep = 'entity';
724
+ this.EntitySearchText = '';
725
+ this.SelectedEntity = null;
726
+ this.RecordSearchText = '';
727
+ this.AvailableRecords = [];
728
+ this.FilteredRecords = [];
729
+ this.IsLoadingRecords = false;
730
+ this.LabelName = '';
731
+ this.LabelDescription = '';
732
+ this.IsCreatingLabel = false;
733
+ this.CreateError = '';
734
+ this.CreatedLabelCount = 0;
735
+ this.CreatedItemCount = 0;
736
+ this.CreateProgress = null;
737
+ }
738
+ static ɵfac = function MjLabelCreateComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MjLabelCreateComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
739
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjLabelCreateComponent, selectors: [["mj-label-create"]], inputs: { PreselectedEntity: "PreselectedEntity", PreselectedRecordIds: "PreselectedRecordIds" }, outputs: { Created: "Created", Cancel: "Cancel" }, standalone: false, decls: 7, vars: 6, consts: [[1, "label-create-container"], [1, "step-indicator"], [1, "dialog-step"], [1, "dialog-step", "creating-step"], [1, "dialog-step", "done-step"], [1, "step"], [1, "step-number"], [1, "step-label"], [1, "step-connector"], [1, "step-description"], [1, "dialog-search"], [1, "fa-solid", "fa-search", "dialog-search-icon"], ["type", "text", "placeholder", "Search entities...", 1, "dialog-search-input", 3, "ngModelChange", "ngModel"], [1, "entity-list"], [1, "entity-option"], [1, "entity-list-empty"], [1, "entity-option", 3, "click"], [1, "entity-option-info"], [1, "entity-option-name"], [1, "entity-option-desc"], [1, "fa-solid", "fa-chevron-right", "entity-option-arrow"], [1, "step-header-row"], [1, "btn-back"], ["text", "Loading records..."], [1, "btn-back", 3, "click"], [1, "fa-solid", "fa-arrow-left"], [1, "records-toolbar"], [1, "dialog-search", 2, "flex", "1"], ["type", "text", "placeholder", "Search records...", 1, "dialog-search-input", 3, "ngModelChange", "ngModel"], [1, "selection-actions"], [1, "btn-text", 3, "click"], [1, "record-list"], [1, "record-option", 3, "selected"], [1, "records-footer"], [1, "selection-count"], [1, "btn-primary", 3, "click", "disabled"], [1, "fa-solid", "fa-arrow-right"], [1, "record-option", 3, "click"], [1, "record-checkbox"], [1, "fa-solid", "fa-check"], [1, "record-name"], [1, "details-summary"], [1, "summary-item"], [1, "fa-solid", "fa-table"], [1, "fa-solid", "fa-check-double"], [1, "form-field"], [1, "form-label"], ["type", "text", "placeholder", "e.g. Customer Support Agent v2.0", 1, "form-input", 3, "ngModelChange", "ngModel"], ["rows", "3", "placeholder", "What does this version represent?", 1, "form-textarea", 3, "ngModelChange", "ngModel"], [1, "details-footer"], [1, "fa-solid", "fa-tag"], [1, "btn-secondary", 3, "click"], [1, "fa-solid", "fa-layer-group"], [1, "creating-animation"], [1, "fa-solid", "fa-tag", "fa-spin", "creating-icon"], [1, "creating-title"], [1, "progress-container"], [1, "creating-progress"], [1, "progress-bar-track"], [1, "progress-bar-fill"], [1, "progress-details"], [1, "progress-message"], [1, "progress-pct"], [1, "progress-stats"], [1, "progress-stat"], [1, "fa-solid", "fa-camera"], [1, "btn-primary", 3, "click"], [1, "done-icon-wrap", "success"], [1, "done-title"], [1, "done-message"], [1, "done-icon-wrap", "error"], [1, "fa-solid", "fa-xmark"], [1, "done-message", "error-text"]], template: function MjLabelCreateComponent_Template(rf, ctx) { if (rf & 1) {
740
+ i0.ɵɵelementStart(0, "div", 0);
741
+ i0.ɵɵconditionalCreate(1, MjLabelCreateComponent_Conditional_1_Template, 18, 14, "div", 1);
742
+ i0.ɵɵconditionalCreate(2, MjLabelCreateComponent_Conditional_2_Template, 10, 2, "div", 2);
743
+ i0.ɵɵconditionalCreate(3, MjLabelCreateComponent_Conditional_3_Template, 11, 4, "div", 2);
744
+ i0.ɵɵconditionalCreate(4, MjLabelCreateComponent_Conditional_4_Template, 30, 8, "div", 2);
745
+ i0.ɵɵconditionalCreate(5, MjLabelCreateComponent_Conditional_5_Template, 7, 2, "div", 3);
746
+ i0.ɵɵconditionalCreate(6, MjLabelCreateComponent_Conditional_6_Template, 5, 2, "div", 4);
747
+ i0.ɵɵelementEnd();
748
+ } if (rf & 2) {
749
+ i0.ɵɵadvance();
750
+ i0.ɵɵconditional(ctx.CreateStep !== "creating" && ctx.CreateStep !== "done" ? 1 : -1);
751
+ i0.ɵɵadvance();
752
+ i0.ɵɵconditional(ctx.CreateStep === "entity" ? 2 : -1);
753
+ i0.ɵɵadvance();
754
+ i0.ɵɵconditional(ctx.CreateStep === "records" ? 3 : -1);
755
+ i0.ɵɵadvance();
756
+ i0.ɵɵconditional(ctx.CreateStep === "details" ? 4 : -1);
757
+ i0.ɵɵadvance();
758
+ i0.ɵɵconditional(ctx.CreateStep === "creating" ? 5 : -1);
759
+ i0.ɵɵadvance();
760
+ i0.ɵɵconditional(ctx.CreateStep === "done" ? 6 : -1);
761
+ } }, dependencies: [i1.DefaultValueAccessor, i1.NgControlStatus, i1.NgModel, i2.LoadingComponent, i3.SlicePipe], styles: ["\n\n.label-create-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n\n\n.step-indicator[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0;\n margin-bottom: 24px;\n padding: 0 20px;\n}\n\n.step[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.step-number[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n font-size: 13px;\n font-weight: 700;\n background: var(--hover-background, #f3f4f6);\n color: var(--text-tertiary, #9ca3af);\n transition: all 0.2s ease;\n}\n\n.step.active[_ngcontent-%COMP%] .step-number[_ngcontent-%COMP%] {\n background: #6366f1;\n color: #ffffff;\n}\n\n.step.completed[_ngcontent-%COMP%] .step-number[_ngcontent-%COMP%] {\n background: #10b981;\n color: #ffffff;\n}\n\n.step-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n color: var(--text-tertiary, #9ca3af);\n}\n\n.step.active[_ngcontent-%COMP%] .step-label[_ngcontent-%COMP%] {\n color: var(--text-primary, #1f2937);\n font-weight: 600;\n}\n\n.step.completed[_ngcontent-%COMP%] .step-label[_ngcontent-%COMP%] {\n color: #10b981;\n}\n\n.step-connector[_ngcontent-%COMP%] {\n width: 40px;\n height: 2px;\n background: var(--border-color, #e5e7eb);\n margin: 0 8px;\n transition: background 0.2s ease;\n}\n\n.step-connector.active[_ngcontent-%COMP%] {\n background: #10b981;\n}\n\n\n\n.dialog-step[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n min-height: 300px;\n}\n\n.step-description[_ngcontent-%COMP%] {\n font-size: 14px;\n color: var(--text-secondary, #6b7280);\n margin: 0;\n}\n\n.step-header-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.btn-back[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n background: none;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n color: var(--text-secondary, #6b7280);\n cursor: pointer;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.btn-back[_ngcontent-%COMP%]:hover {\n background: var(--hover-background, #f3f4f6);\n color: var(--text-primary, #1f2937);\n}\n\n\n\n.dialog-search[_ngcontent-%COMP%] {\n position: relative;\n}\n\n.dialog-search-icon[_ngcontent-%COMP%] {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--text-tertiary, #9ca3af);\n font-size: 13px;\n}\n\n.dialog-search-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 9px 12px 9px 36px;\n background: var(--card-background, #ffffff);\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n font-size: 14px;\n color: var(--text-primary, #1f2937);\n outline: none;\n box-sizing: border-box;\n transition: border-color 0.15s ease;\n}\n\n.dialog-search-input[_ngcontent-%COMP%]:focus {\n border-color: #6366f1;\n}\n\n.dialog-search-input[_ngcontent-%COMP%]::placeholder {\n color: var(--text-tertiary, #9ca3af);\n}\n\n\n\n.entity-list[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n max-height: 320px;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 10px;\n}\n\n.entity-option[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n cursor: pointer;\n transition: background 0.15s ease;\n border-bottom: 1px solid var(--border-color, #e5e7eb);\n}\n\n.entity-option[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.entity-option[_ngcontent-%COMP%]:hover {\n background: var(--hover-background, #f3f4f6);\n}\n\n.entity-option-info[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.entity-option-name[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 500;\n color: var(--text-primary, #1f2937);\n}\n\n.entity-option-desc[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--text-tertiary, #9ca3af);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.entity-option-arrow[_ngcontent-%COMP%] {\n color: var(--text-tertiary, #9ca3af);\n font-size: 12px;\n flex-shrink: 0;\n}\n\n.entity-list-empty[_ngcontent-%COMP%] {\n padding: 40px 20px;\n text-align: center;\n color: var(--text-tertiary, #9ca3af);\n font-size: 14px;\n}\n\n\n\n.records-toolbar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.selection-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n flex-shrink: 0;\n}\n\n.btn-text[_ngcontent-%COMP%] {\n padding: 6px 12px;\n background: none;\n border: none;\n font-size: 13px;\n font-weight: 500;\n color: #6366f1;\n cursor: pointer;\n border-radius: 6px;\n transition: background 0.15s ease;\n}\n\n.btn-text[_ngcontent-%COMP%]:hover {\n background: rgba(99, 102, 241, 0.1);\n}\n\n.record-list[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n max-height: 280px;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 10px;\n}\n\n.record-option[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 16px;\n cursor: pointer;\n transition: background 0.15s ease;\n border-bottom: 1px solid var(--border-color, #e5e7eb);\n}\n\n.record-option[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.record-option[_ngcontent-%COMP%]:hover {\n background: var(--hover-background, #f3f4f6);\n}\n\n.record-option.selected[_ngcontent-%COMP%] {\n background: rgba(99, 102, 241, 0.05);\n}\n\n.record-checkbox[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n border: 2px solid var(--border-color, #d1d5db);\n border-radius: 4px;\n font-size: 11px;\n color: transparent;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.record-option.selected[_ngcontent-%COMP%] .record-checkbox[_ngcontent-%COMP%] {\n background: #6366f1;\n border-color: #6366f1;\n color: #ffffff;\n}\n\n.record-name[_ngcontent-%COMP%] {\n font-size: 14px;\n color: var(--text-primary, #1f2937);\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.records-footer[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-top: 8px;\n}\n\n.selection-count[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n color: var(--text-secondary, #6b7280);\n}\n\n\n\n.details-summary[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n padding: 14px 16px;\n background: var(--hover-background, #f3f4f6);\n border-radius: 10px;\n}\n\n.summary-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--text-secondary, #6b7280);\n}\n\n.summary-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6366f1;\n font-size: 13px;\n}\n\n.form-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.form-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: var(--text-primary, #1f2937);\n}\n\n.form-input[_ngcontent-%COMP%] {\n padding: 10px 14px;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n font-size: 14px;\n color: var(--text-primary, #1f2937);\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.form-input[_ngcontent-%COMP%]:focus {\n border-color: #6366f1;\n box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);\n}\n\n.form-input[_ngcontent-%COMP%]::placeholder {\n color: var(--text-tertiary, #9ca3af);\n}\n\n.form-textarea[_ngcontent-%COMP%] {\n padding: 10px 14px;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n font-size: 14px;\n color: var(--text-primary, #1f2937);\n outline: none;\n resize: vertical;\n font-family: inherit;\n transition: border-color 0.15s ease;\n}\n\n.form-textarea[_ngcontent-%COMP%]:focus {\n border-color: #6366f1;\n box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);\n}\n\n.form-textarea[_ngcontent-%COMP%]::placeholder {\n color: var(--text-tertiary, #9ca3af);\n}\n\n.details-footer[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n padding-top: 8px;\n}\n\n\n\n.btn-primary[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n background: #6366f1;\n color: #ffffff;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover {\n background: #4f46e5;\n}\n\n.btn-primary[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-secondary[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n background: var(--card-background, #ffffff);\n color: var(--text-secondary, #6b7280);\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.btn-secondary[_ngcontent-%COMP%]:hover {\n background: var(--hover-background, #f3f4f6);\n color: var(--text-primary, #1f2937);\n}\n\n\n\n.creating-step[_ngcontent-%COMP%] {\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px 20px;\n}\n\n.creating-animation[_ngcontent-%COMP%] {\n margin-bottom: 16px;\n}\n\n.creating-icon[_ngcontent-%COMP%] {\n font-size: 40px;\n color: #6366f1;\n}\n\n.creating-title[_ngcontent-%COMP%] {\n font-size: 18px;\n font-weight: 600;\n color: var(--text-primary, #1f2937);\n margin: 0 0 8px 0;\n}\n\n.creating-progress[_ngcontent-%COMP%] {\n font-size: 14px;\n color: var(--text-secondary, #6b7280);\n margin: 0;\n}\n\n\n\n.progress-container[_ngcontent-%COMP%] {\n width: 100%;\n max-width: 420px;\n margin: 16px auto 0;\n text-align: left;\n}\n\n.progress-bar-track[_ngcontent-%COMP%] {\n width: 100%;\n height: 8px;\n background: var(--hover-background, #e5e7eb);\n border-radius: 4px;\n overflow: hidden;\n}\n\n.progress-bar-fill[_ngcontent-%COMP%] {\n height: 100%;\n background: linear-gradient(90deg, #6366f1, #818cf8);\n border-radius: 4px;\n transition: width 0.3s ease;\n}\n\n.progress-details[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 8px;\n}\n\n.progress-message[_ngcontent-%COMP%] {\n font-size: 13px;\n color: var(--text-secondary, #6b7280);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex: 1;\n margin-right: 12px;\n}\n\n.progress-pct[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: #6366f1;\n white-space: nowrap;\n}\n\n.progress-stats[_ngcontent-%COMP%] {\n display: flex;\n gap: 16px;\n margin-top: 6px;\n}\n\n.progress-stat[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--text-tertiary, #9ca3af);\n}\n\n.progress-stat[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n}\n\n\n\n.done-step[_ngcontent-%COMP%] {\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px 20px;\n}\n\n.done-icon-wrap[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 50%;\n font-size: 24px;\n margin-bottom: 16px;\n}\n\n.done-icon-wrap.success[_ngcontent-%COMP%] {\n background: rgba(16, 185, 129, 0.1);\n color: #10b981;\n}\n\n.done-icon-wrap.error[_ngcontent-%COMP%] {\n background: rgba(239, 68, 68, 0.1);\n color: #ef4444;\n}\n\n.done-title[_ngcontent-%COMP%] {\n font-size: 18px;\n font-weight: 600;\n color: var(--text-primary, #1f2937);\n margin: 0 0 8px 0;\n}\n\n.done-message[_ngcontent-%COMP%] {\n font-size: 14px;\n color: var(--text-secondary, #6b7280);\n margin: 0 0 20px 0;\n}\n\n.error-text[_ngcontent-%COMP%] {\n color: #ef4444;\n}"], changeDetection: 0 });
762
+ }
763
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjLabelCreateComponent, [{
764
+ type: Component,
765
+ args: [{ standalone: false, selector: 'mj-label-create', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"label-create-container\">\n\n <!-- Step indicator -->\n @if (CreateStep !== 'creating' && CreateStep !== 'done') {\n <div class=\"step-indicator\">\n <div class=\"step\" [class.active]=\"CreateStep === 'entity'\" [class.completed]=\"CreateStep !== 'entity'\">\n <span class=\"step-number\">1</span>\n <span class=\"step-label\">Entity</span>\n </div>\n <div class=\"step-connector\" [class.active]=\"CreateStep !== 'entity'\"></div>\n <div class=\"step\" [class.active]=\"CreateStep === 'records'\" [class.completed]=\"CreateStep === 'details'\">\n <span class=\"step-number\">2</span>\n <span class=\"step-label\">Records</span>\n </div>\n <div class=\"step-connector\" [class.active]=\"CreateStep === 'details'\"></div>\n <div class=\"step\" [class.active]=\"CreateStep === 'details'\">\n <span class=\"step-number\">3</span>\n <span class=\"step-label\">Details</span>\n </div>\n </div>\n }\n\n <!-- Step 1: Pick Entity -->\n @if (CreateStep === 'entity') {\n <div class=\"dialog-step\">\n <p class=\"step-description\">Choose an entity type to label records from.</p>\n <div class=\"dialog-search\">\n <i class=\"fa-solid fa-search dialog-search-icon\"></i>\n <input type=\"text\"\n class=\"dialog-search-input\"\n placeholder=\"Search entities...\"\n [ngModel]=\"EntitySearchText\"\n (ngModelChange)=\"OnEntitySearchChange($event)\" />\n </div>\n <div class=\"entity-list\">\n @for (entity of FilteredEntities; track entity) {\n <div class=\"entity-option\"\n (click)=\"SelectEntity(entity)\">\n <div class=\"entity-option-info\">\n <span class=\"entity-option-name\">{{entity.Name}}</span>\n @if (entity.Description) {\n <span class=\"entity-option-desc\">{{entity.Description | slice:0:80}}</span>\n }\n </div>\n <i class=\"fa-solid fa-chevron-right entity-option-arrow\"></i>\n </div>\n }\n @if (FilteredEntities.length === 0) {\n <div class=\"entity-list-empty\">\n No entities match your search.\n </div>\n }\n </div>\n </div>\n }\n\n <!-- Step 2: Select Records -->\n @if (CreateStep === 'records') {\n <div class=\"dialog-step\">\n <div class=\"step-header-row\">\n @if (!PreselectedEntity) {\n <button class=\"btn-back\" (click)=\"GoBackToEntity()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n </button>\n }\n <div>\n <p class=\"step-description\">\n Select records from <strong>{{SelectedEntity?.Name}}</strong> to label.\n </p>\n </div>\n </div>\n @if (IsLoadingRecords) {\n <mj-loading text=\"Loading records...\"></mj-loading>\n }\n @if (!IsLoadingRecords) {\n <div class=\"records-toolbar\">\n <div class=\"dialog-search\" style=\"flex: 1;\">\n <i class=\"fa-solid fa-search dialog-search-icon\"></i>\n <input type=\"text\"\n class=\"dialog-search-input\"\n placeholder=\"Search records...\"\n [ngModel]=\"RecordSearchText\"\n (ngModelChange)=\"OnRecordSearchChange($event)\" />\n </div>\n <div class=\"selection-actions\">\n <button class=\"btn-text\" (click)=\"SelectAllRecords()\">Select All</button>\n <button class=\"btn-text\" (click)=\"DeselectAllRecords()\">Clear</button>\n </div>\n </div>\n <div class=\"record-list\">\n @for (record of FilteredRecords; track record) {\n <div class=\"record-option\"\n [class.selected]=\"record.Selected\"\n (click)=\"ToggleRecordSelection(record)\">\n <div class=\"record-checkbox\">\n @if (record.Selected) {\n <i class=\"fa-solid fa-check\"></i>\n }\n </div>\n <span class=\"record-name\">{{record.DisplayName}}</span>\n </div>\n }\n @if (FilteredRecords.length === 0 && !IsLoadingRecords) {\n <div class=\"entity-list-empty\">\n No records found for this entity.\n </div>\n }\n </div>\n <div class=\"records-footer\">\n <span class=\"selection-count\">{{SelectedRecordCount}} selected</span>\n <button class=\"btn-primary\"\n [disabled]=\"SelectedRecordCount === 0\"\n (click)=\"GoToDetailsStep()\">\n Continue\n <i class=\"fa-solid fa-arrow-right\"></i>\n </button>\n </div>\n }\n </div>\n }\n\n <!-- Step 3: Label Details -->\n @if (CreateStep === 'details') {\n <div class=\"dialog-step\">\n <div class=\"step-header-row\">\n <button class=\"btn-back\" (click)=\"GoBackToRecords()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n </button>\n <p class=\"step-description\">Name your version label.</p>\n </div>\n <div class=\"details-summary\">\n <div class=\"summary-item\">\n <i class=\"fa-solid fa-table\"></i>\n <span>{{SelectedEntity?.Name}}</span>\n </div>\n <div class=\"summary-item\">\n <i class=\"fa-solid fa-check-double\"></i>\n <span>{{SelectedRecordCount}} record{{SelectedRecordCount > 1 ? 's' : ''}} selected</span>\n </div>\n @if (SelectedRecordCount > 1) {\n <div class=\"summary-item\">\n <i class=\"fa-solid fa-layer-group\"></i>\n <span>Will create 1 group + {{SelectedRecordCount}} child labels</span>\n </div>\n }\n </div>\n <div class=\"form-field\">\n <label class=\"form-label\">Label Name</label>\n <input type=\"text\"\n class=\"form-input\"\n placeholder=\"e.g. Customer Support Agent v2.0\"\n [(ngModel)]=\"LabelName\" />\n </div>\n <div class=\"form-field\">\n <label class=\"form-label\">Description (optional)</label>\n <textarea class=\"form-textarea\"\n rows=\"3\"\n placeholder=\"What does this version represent?\"\n [(ngModel)]=\"LabelDescription\"></textarea>\n </div>\n <div class=\"details-footer\">\n <button class=\"btn-primary\"\n [disabled]=\"!LabelName.trim()\"\n (click)=\"CreateLabels()\">\n <i class=\"fa-solid fa-tag\"></i>\n Create Label{{SelectedRecordCount > 1 ? 's' : ''}}\n </button>\n <button class=\"btn-secondary\" (click)=\"OnCancel()\">\n Cancel\n </button>\n </div>\n </div>\n }\n\n <!-- Creating state -->\n @if (CreateStep === 'creating') {\n <div class=\"dialog-step creating-step\">\n <div class=\"creating-animation\">\n <i class=\"fa-solid fa-tag fa-spin creating-icon\"></i>\n </div>\n <h3 class=\"creating-title\">Creating Labels...</h3>\n <!-- Progress bar -->\n @if (CreateProgress) {\n <div class=\"progress-container\">\n <div class=\"progress-bar-track\">\n <div class=\"progress-bar-fill\" [style.width.%]=\"CreateProgress.Percentage\"></div>\n </div>\n <div class=\"progress-details\">\n <span class=\"progress-message\">{{CreateProgress.Message}}</span>\n <span class=\"progress-pct\">{{CreateProgress.Percentage}}%</span>\n </div>\n @if (CreateProgress.RecordsProcessed != null && CreateProgress.TotalRecords) {\n <div class=\"progress-stats\">\n <span class=\"progress-stat\">\n <i class=\"fa-solid fa-camera\"></i>\n {{CreateProgress.RecordsProcessed}} / {{CreateProgress.TotalRecords}} records\n </span>\n @if (CreateProgress.CurrentEntity) {\n <span class=\"progress-stat\">\n <i class=\"fa-solid fa-table\"></i>\n {{CreateProgress.CurrentEntity}}\n </span>\n }\n </div>\n }\n </div>\n }\n @if (!CreateProgress) {\n <p class=\"creating-progress\">\n {{CreatedLabelCount}} label{{CreatedLabelCount !== 1 ? 's' : ''}} created\n @if (CreatedItemCount > 0) {\n <span> &middot; {{CreatedItemCount}} items captured</span>\n }\n </p>\n }\n </div>\n }\n\n <!-- Done state -->\n @if (CreateStep === 'done') {\n <div class=\"dialog-step done-step\">\n @if (!CreateError) {\n <div class=\"done-icon-wrap success\">\n <i class=\"fa-solid fa-check\"></i>\n </div>\n <h3 class=\"done-title\">Labels Created</h3>\n <p class=\"done-message\">\n Successfully created {{CreatedLabelCount}} label{{CreatedLabelCount !== 1 ? 's' : ''}}\n @if (CreatedItemCount > 0) {\n <span> with {{CreatedItemCount}} items captured</span>\n }.\n </p>\n }\n @if (CreateError) {\n <div class=\"done-icon-wrap error\">\n <i class=\"fa-solid fa-xmark\"></i>\n </div>\n <h3 class=\"done-title\">Error</h3>\n <p class=\"done-message error-text\">{{CreateError}}</p>\n }\n <button class=\"btn-primary\" (click)=\"FinishCreate()\">Done</button>\n </div>\n }\n </div>\n", styles: ["/* Label Create Wizard Container */\n.label-create-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* Step Indicator */\n.step-indicator {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0;\n margin-bottom: 24px;\n padding: 0 20px;\n}\n\n.step {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.step-number {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n font-size: 13px;\n font-weight: 700;\n background: var(--hover-background, #f3f4f6);\n color: var(--text-tertiary, #9ca3af);\n transition: all 0.2s ease;\n}\n\n.step.active .step-number {\n background: #6366f1;\n color: #ffffff;\n}\n\n.step.completed .step-number {\n background: #10b981;\n color: #ffffff;\n}\n\n.step-label {\n font-size: 13px;\n font-weight: 500;\n color: var(--text-tertiary, #9ca3af);\n}\n\n.step.active .step-label {\n color: var(--text-primary, #1f2937);\n font-weight: 600;\n}\n\n.step.completed .step-label {\n color: #10b981;\n}\n\n.step-connector {\n width: 40px;\n height: 2px;\n background: var(--border-color, #e5e7eb);\n margin: 0 8px;\n transition: background 0.2s ease;\n}\n\n.step-connector.active {\n background: #10b981;\n}\n\n/* Dialog Step Content */\n.dialog-step {\n display: flex;\n flex-direction: column;\n gap: 16px;\n min-height: 300px;\n}\n\n.step-description {\n font-size: 14px;\n color: var(--text-secondary, #6b7280);\n margin: 0;\n}\n\n.step-header-row {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.btn-back {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n background: none;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n color: var(--text-secondary, #6b7280);\n cursor: pointer;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.btn-back:hover {\n background: var(--hover-background, #f3f4f6);\n color: var(--text-primary, #1f2937);\n}\n\n/* Dialog Search */\n.dialog-search {\n position: relative;\n}\n\n.dialog-search-icon {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n color: var(--text-tertiary, #9ca3af);\n font-size: 13px;\n}\n\n.dialog-search-input {\n width: 100%;\n padding: 9px 12px 9px 36px;\n background: var(--card-background, #ffffff);\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n font-size: 14px;\n color: var(--text-primary, #1f2937);\n outline: none;\n box-sizing: border-box;\n transition: border-color 0.15s ease;\n}\n\n.dialog-search-input:focus {\n border-color: #6366f1;\n}\n\n.dialog-search-input::placeholder {\n color: var(--text-tertiary, #9ca3af);\n}\n\n/* Entity List */\n.entity-list {\n flex: 1;\n overflow-y: auto;\n max-height: 320px;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 10px;\n}\n\n.entity-option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n cursor: pointer;\n transition: background 0.15s ease;\n border-bottom: 1px solid var(--border-color, #e5e7eb);\n}\n\n.entity-option:last-child {\n border-bottom: none;\n}\n\n.entity-option:hover {\n background: var(--hover-background, #f3f4f6);\n}\n\n.entity-option-info {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.entity-option-name {\n font-size: 14px;\n font-weight: 500;\n color: var(--text-primary, #1f2937);\n}\n\n.entity-option-desc {\n font-size: 12px;\n color: var(--text-tertiary, #9ca3af);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.entity-option-arrow {\n color: var(--text-tertiary, #9ca3af);\n font-size: 12px;\n flex-shrink: 0;\n}\n\n.entity-list-empty {\n padding: 40px 20px;\n text-align: center;\n color: var(--text-tertiary, #9ca3af);\n font-size: 14px;\n}\n\n/* Records */\n.records-toolbar {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.selection-actions {\n display: flex;\n gap: 4px;\n flex-shrink: 0;\n}\n\n.btn-text {\n padding: 6px 12px;\n background: none;\n border: none;\n font-size: 13px;\n font-weight: 500;\n color: #6366f1;\n cursor: pointer;\n border-radius: 6px;\n transition: background 0.15s ease;\n}\n\n.btn-text:hover {\n background: rgba(99, 102, 241, 0.1);\n}\n\n.record-list {\n flex: 1;\n overflow-y: auto;\n max-height: 280px;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 10px;\n}\n\n.record-option {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 16px;\n cursor: pointer;\n transition: background 0.15s ease;\n border-bottom: 1px solid var(--border-color, #e5e7eb);\n}\n\n.record-option:last-child {\n border-bottom: none;\n}\n\n.record-option:hover {\n background: var(--hover-background, #f3f4f6);\n}\n\n.record-option.selected {\n background: rgba(99, 102, 241, 0.05);\n}\n\n.record-checkbox {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n border: 2px solid var(--border-color, #d1d5db);\n border-radius: 4px;\n font-size: 11px;\n color: transparent;\n transition: all 0.15s ease;\n flex-shrink: 0;\n}\n\n.record-option.selected .record-checkbox {\n background: #6366f1;\n border-color: #6366f1;\n color: #ffffff;\n}\n\n.record-name {\n font-size: 14px;\n color: var(--text-primary, #1f2937);\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.records-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-top: 8px;\n}\n\n.selection-count {\n font-size: 13px;\n font-weight: 500;\n color: var(--text-secondary, #6b7280);\n}\n\n/* Details step */\n.details-summary {\n display: flex;\n flex-wrap: wrap;\n gap: 16px;\n padding: 14px 16px;\n background: var(--hover-background, #f3f4f6);\n border-radius: 10px;\n}\n\n.summary-item {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--text-secondary, #6b7280);\n}\n\n.summary-item i {\n color: #6366f1;\n font-size: 13px;\n}\n\n.form-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.form-label {\n font-size: 13px;\n font-weight: 600;\n color: var(--text-primary, #1f2937);\n}\n\n.form-input {\n padding: 10px 14px;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n font-size: 14px;\n color: var(--text-primary, #1f2937);\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.form-input:focus {\n border-color: #6366f1;\n box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);\n}\n\n.form-input::placeholder {\n color: var(--text-tertiary, #9ca3af);\n}\n\n.form-textarea {\n padding: 10px 14px;\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n font-size: 14px;\n color: var(--text-primary, #1f2937);\n outline: none;\n resize: vertical;\n font-family: inherit;\n transition: border-color 0.15s ease;\n}\n\n.form-textarea:focus {\n border-color: #6366f1;\n box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);\n}\n\n.form-textarea::placeholder {\n color: var(--text-tertiary, #9ca3af);\n}\n\n.details-footer {\n display: flex;\n gap: 12px;\n padding-top: 8px;\n}\n\n/* Buttons */\n.btn-primary {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n background: #6366f1;\n color: #ffffff;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.btn-primary:hover {\n background: #4f46e5;\n}\n\n.btn-primary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-secondary {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n background: var(--card-background, #ffffff);\n color: var(--text-secondary, #6b7280);\n border: 1px solid var(--border-color, #e5e7eb);\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.btn-secondary:hover {\n background: var(--hover-background, #f3f4f6);\n color: var(--text-primary, #1f2937);\n}\n\n/* Creating state */\n.creating-step {\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px 20px;\n}\n\n.creating-animation {\n margin-bottom: 16px;\n}\n\n.creating-icon {\n font-size: 40px;\n color: #6366f1;\n}\n\n.creating-title {\n font-size: 18px;\n font-weight: 600;\n color: var(--text-primary, #1f2937);\n margin: 0 0 8px 0;\n}\n\n.creating-progress {\n font-size: 14px;\n color: var(--text-secondary, #6b7280);\n margin: 0;\n}\n\n/* Progress bar */\n.progress-container {\n width: 100%;\n max-width: 420px;\n margin: 16px auto 0;\n text-align: left;\n}\n\n.progress-bar-track {\n width: 100%;\n height: 8px;\n background: var(--hover-background, #e5e7eb);\n border-radius: 4px;\n overflow: hidden;\n}\n\n.progress-bar-fill {\n height: 100%;\n background: linear-gradient(90deg, #6366f1, #818cf8);\n border-radius: 4px;\n transition: width 0.3s ease;\n}\n\n.progress-details {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 8px;\n}\n\n.progress-message {\n font-size: 13px;\n color: var(--text-secondary, #6b7280);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex: 1;\n margin-right: 12px;\n}\n\n.progress-pct {\n font-size: 13px;\n font-weight: 600;\n color: #6366f1;\n white-space: nowrap;\n}\n\n.progress-stats {\n display: flex;\n gap: 16px;\n margin-top: 6px;\n}\n\n.progress-stat {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--text-tertiary, #9ca3af);\n}\n\n.progress-stat i {\n font-size: 11px;\n}\n\n/* Done state */\n.done-step {\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 40px 20px;\n}\n\n.done-icon-wrap {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 50%;\n font-size: 24px;\n margin-bottom: 16px;\n}\n\n.done-icon-wrap.success {\n background: rgba(16, 185, 129, 0.1);\n color: #10b981;\n}\n\n.done-icon-wrap.error {\n background: rgba(239, 68, 68, 0.1);\n color: #ef4444;\n}\n\n.done-title {\n font-size: 18px;\n font-weight: 600;\n color: var(--text-primary, #1f2937);\n margin: 0 0 8px 0;\n}\n\n.done-message {\n font-size: 14px;\n color: var(--text-secondary, #6b7280);\n margin: 0 0 20px 0;\n}\n\n.error-text {\n color: #ef4444;\n}\n"] }]
766
+ }], () => [{ type: i0.ChangeDetectorRef }], { PreselectedEntity: [{
767
+ type: Input
768
+ }], PreselectedRecordIds: [{
769
+ type: Input
770
+ }], Created: [{
771
+ type: Output
772
+ }], Cancel: [{
773
+ type: Output
774
+ }] }); })();
775
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjLabelCreateComponent, { className: "MjLabelCreateComponent", filePath: "src/lib/label-create/label-create.component.ts", lineNumber: 30 }); })();
776
+ //# sourceMappingURL=label-create.component.js.map