@memberjunction/ng-base-forms 4.0.0 → 4.2.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.
- package/dist/lib/base-form-component.d.ts +103 -215
- package/dist/lib/base-form-component.d.ts.map +1 -1
- package/dist/lib/base-form-component.js +384 -541
- package/dist/lib/base-form-component.js.map +1 -1
- package/dist/lib/container/record-form-container.component.d.ts +165 -0
- package/dist/lib/container/record-form-container.component.d.ts.map +1 -0
- package/dist/lib/container/record-form-container.component.js +534 -0
- package/dist/lib/container/record-form-container.component.js.map +1 -0
- package/dist/lib/explorer-entity-data-grid.component.d.ts +7 -5
- package/dist/lib/explorer-entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/explorer-entity-data-grid.component.js +15 -9
- package/dist/lib/explorer-entity-data-grid.component.js.map +1 -1
- package/dist/lib/field/form-field.component.d.ts +268 -0
- package/dist/lib/field/form-field.component.d.ts.map +1 -0
- package/dist/lib/field/form-field.component.js +1194 -0
- package/dist/lib/field/form-field.component.js.map +1 -0
- package/dist/lib/form-state.interface.d.ts +2 -0
- package/dist/lib/form-state.interface.d.ts.map +1 -1
- package/dist/lib/form-state.interface.js.map +1 -1
- package/dist/lib/form-state.service.d.ts +14 -0
- package/dist/lib/form-state.service.d.ts.map +1 -1
- package/dist/lib/form-state.service.js +19 -0
- package/dist/lib/form-state.service.js.map +1 -1
- package/dist/lib/panel/collapsible-panel.component.d.ts +139 -0
- package/dist/lib/panel/collapsible-panel.component.d.ts.map +1 -0
- package/dist/lib/panel/collapsible-panel.component.js +468 -0
- package/dist/lib/panel/collapsible-panel.component.js.map +1 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts +170 -0
- package/dist/lib/toolbar/form-toolbar.component.d.ts.map +1 -0
- package/dist/lib/toolbar/form-toolbar.component.js +830 -0
- package/dist/lib/toolbar/form-toolbar.component.js.map +1 -0
- package/dist/lib/types/form-events.d.ts +90 -0
- package/dist/lib/types/form-events.d.ts.map +1 -0
- package/dist/lib/types/form-events.js +45 -0
- package/dist/lib/types/form-events.js.map +1 -0
- package/dist/lib/types/form-types.d.ts +150 -0
- package/dist/lib/types/form-types.d.ts.map +1 -0
- package/dist/lib/types/form-types.js +12 -0
- package/dist/lib/types/form-types.js.map +1 -0
- package/dist/lib/types/navigation-events.d.ts +88 -0
- package/dist/lib/types/navigation-events.d.ts.map +1 -0
- package/dist/lib/types/navigation-events.js +2 -0
- package/dist/lib/types/navigation-events.js.map +1 -0
- package/dist/lib/types/toolbar-config.d.ts +66 -0
- package/dist/lib/types/toolbar-config.d.ts.map +1 -0
- package/dist/lib/types/toolbar-config.js +38 -0
- package/dist/lib/types/toolbar-config.js.map +1 -0
- package/dist/module.d.ts +28 -20
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +47 -74
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +20 -8
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +24 -9
- package/dist/public-api.js.map +1 -1
- package/package.json +20 -23
- package/README.md +0 -449
- package/dist/lib/base-field-component.d.ts +0 -152
- package/dist/lib/base-field-component.d.ts.map +0 -1
- package/dist/lib/base-field-component.js +0 -669
- package/dist/lib/base-field-component.js.map +0 -1
- package/dist/lib/base-form-context.d.ts +0 -23
- package/dist/lib/base-form-context.d.ts.map +0 -1
- package/dist/lib/base-form-context.js +0 -10
- package/dist/lib/base-form-context.js.map +0 -1
- package/dist/lib/collapsible-panel.component.d.ts +0 -68
- package/dist/lib/collapsible-panel.component.d.ts.map +0 -1
- package/dist/lib/collapsible-panel.component.js +0 -330
- package/dist/lib/collapsible-panel.component.js.map +0 -1
- package/dist/lib/form-section-controls.component.d.ts +0 -35
- package/dist/lib/form-section-controls.component.d.ts.map +0 -1
- package/dist/lib/form-section-controls.component.js +0 -273
- package/dist/lib/form-section-controls.component.js.map +0 -1
- package/dist/lib/link-field.component.d.ts +0 -62
- package/dist/lib/link-field.component.d.ts.map +0 -1
- package/dist/lib/link-field.component.js +0 -392
- package/dist/lib/link-field.component.js.map +0 -1
|
@@ -0,0 +1,830 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef, inject } from '@angular/core';
|
|
2
|
+
import { DEFAULT_TOOLBAR_CONFIG } from '../types/toolbar-config';
|
|
3
|
+
import { BeforeSaveEventArgs, BeforeDeleteEventArgs, BeforeCancelEventArgs, BeforeHistoryViewEventArgs, BeforeListManagementEventArgs } from '../types/form-events';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
const _c0 = [[["", "toolbar-additional-controls", ""]]];
|
|
7
|
+
const _c1 = ["[toolbar-additional-controls]"];
|
|
8
|
+
const _forTrack0 = ($index, $item) => $item.Key;
|
|
9
|
+
const _forTrack1 = ($index, $item) => $item.ID;
|
|
10
|
+
function MjFormToolbarComponent_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
+
i0.ɵɵelement(0, "i", 10);
|
|
12
|
+
i0.ɵɵelementStart(1, "span", 11)(2, "strong");
|
|
13
|
+
i0.ɵɵtext(3);
|
|
14
|
+
i0.ɵɵelementEnd();
|
|
15
|
+
i0.ɵɵtext(4);
|
|
16
|
+
i0.ɵɵelementEnd();
|
|
17
|
+
} if (rf & 2) {
|
|
18
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
19
|
+
i0.ɵɵadvance(3);
|
|
20
|
+
i0.ɵɵtextInterpolate(ctx_r1.DirtyFieldDisplayNames.length);
|
|
21
|
+
i0.ɵɵadvance();
|
|
22
|
+
i0.ɵɵtextInterpolate2(" field", ctx_r1.DirtyFieldDisplayNames.length === 1 ? "" : "s", " modified \u2014 ", ctx_r1.DirtyFieldDisplayNames.join(", "), " ");
|
|
23
|
+
} }
|
|
24
|
+
function MjFormToolbarComponent_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
+
i0.ɵɵelement(0, "i", 12);
|
|
26
|
+
i0.ɵɵelementStart(1, "span", 13);
|
|
27
|
+
i0.ɵɵtext(2);
|
|
28
|
+
i0.ɵɵelementEnd();
|
|
29
|
+
} if (rf & 2) {
|
|
30
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
31
|
+
i0.ɵɵadvance(2);
|
|
32
|
+
i0.ɵɵtextInterpolate1("Editing: ", ctx_r1.RecordDisplayName);
|
|
33
|
+
} }
|
|
34
|
+
function MjFormToolbarComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
36
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
37
|
+
i0.ɵɵconditionalCreate(1, MjFormToolbarComponent_Conditional_0_Conditional_1_Template, 5, 3)(2, MjFormToolbarComponent_Conditional_0_Conditional_2_Template, 3, 1);
|
|
38
|
+
i0.ɵɵelement(3, "div", 3);
|
|
39
|
+
i0.ɵɵelementStart(4, "div", 4)(5, "button", 5);
|
|
40
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_0_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnSave()); });
|
|
41
|
+
i0.ɵɵelement(6, "i", 6);
|
|
42
|
+
i0.ɵɵelementStart(7, "span", 7);
|
|
43
|
+
i0.ɵɵtext(8, "Save Changes");
|
|
44
|
+
i0.ɵɵelementEnd()();
|
|
45
|
+
i0.ɵɵelementStart(9, "button", 8);
|
|
46
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_0_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCancel()); });
|
|
47
|
+
i0.ɵɵelement(10, "i", 9);
|
|
48
|
+
i0.ɵɵelementStart(11, "span", 7);
|
|
49
|
+
i0.ɵɵtext(12, "Discard");
|
|
50
|
+
i0.ɵɵelementEnd()()()();
|
|
51
|
+
} if (rf & 2) {
|
|
52
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
53
|
+
i0.ɵɵadvance();
|
|
54
|
+
i0.ɵɵconditional(ctx_r1.DirtyFieldDisplayNames.length > 0 ? 1 : 2);
|
|
55
|
+
i0.ɵɵadvance(4);
|
|
56
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSaving);
|
|
57
|
+
i0.ɵɵadvance(4);
|
|
58
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSaving);
|
|
59
|
+
} }
|
|
60
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
62
|
+
i0.ɵɵelementStart(0, "button", 25);
|
|
63
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnEdit()); });
|
|
64
|
+
i0.ɵɵelement(1, "i", 12);
|
|
65
|
+
i0.ɵɵelementEnd();
|
|
66
|
+
} }
|
|
67
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
68
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
69
|
+
i0.ɵɵelementStart(0, "button", 26);
|
|
70
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnDeleteClick()); });
|
|
71
|
+
i0.ɵɵelement(1, "i", 27);
|
|
72
|
+
i0.ɵɵelementEnd();
|
|
73
|
+
} }
|
|
74
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
75
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
76
|
+
i0.ɵɵelementStart(0, "button", 28);
|
|
77
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnFavoriteToggle()); });
|
|
78
|
+
i0.ɵɵelement(1, "i");
|
|
79
|
+
i0.ɵɵelementEnd();
|
|
80
|
+
} if (rf & 2) {
|
|
81
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
82
|
+
i0.ɵɵproperty("title", ctx_r1.IsFavorite ? "Remove Favorite" : "Make Favorite");
|
|
83
|
+
i0.ɵɵadvance();
|
|
84
|
+
i0.ɵɵclassMap(ctx_r1.IsFavorite ? "fa-solid fa-star mj-icon--favorite" : "fa-regular fa-star");
|
|
85
|
+
} }
|
|
86
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
87
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
88
|
+
i0.ɵɵelementStart(0, "button", 29);
|
|
89
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnHistory()); });
|
|
90
|
+
i0.ɵɵelement(1, "i", 30);
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
} }
|
|
93
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_6_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
94
|
+
i0.ɵɵelementStart(0, "span", 33);
|
|
95
|
+
i0.ɵɵtext(1);
|
|
96
|
+
i0.ɵɵelementEnd();
|
|
97
|
+
} if (rf & 2) {
|
|
98
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
99
|
+
i0.ɵɵadvance();
|
|
100
|
+
i0.ɵɵtextInterpolate(ctx_r1.ListCount);
|
|
101
|
+
} }
|
|
102
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
103
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
104
|
+
i0.ɵɵelementStart(0, "button", 31);
|
|
105
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnListManagement()); });
|
|
106
|
+
i0.ɵɵelement(1, "i", 32);
|
|
107
|
+
i0.ɵɵconditionalCreate(2, MjFormToolbarComponent_Conditional_1_Conditional_6_Conditional_2_Template, 2, 1, "span", 33);
|
|
108
|
+
i0.ɵɵelementEnd();
|
|
109
|
+
} if (rf & 2) {
|
|
110
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
111
|
+
i0.ɵɵproperty("title", ctx_r1.ListCount > 0 ? "Member of " + ctx_r1.ListCount + " list(s)" : "Add to a list");
|
|
112
|
+
i0.ɵɵadvance(2);
|
|
113
|
+
i0.ɵɵconditional(ctx_r1.ListCount > 0 ? 2 : -1);
|
|
114
|
+
} }
|
|
115
|
+
function MjFormToolbarComponent_Conditional_1_For_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
117
|
+
i0.ɵɵelementStart(0, "button", 35);
|
|
118
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_For_8_Conditional_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const button_r9 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnCustomButtonClick(button_r9)); });
|
|
119
|
+
i0.ɵɵelement(1, "i");
|
|
120
|
+
i0.ɵɵelementEnd();
|
|
121
|
+
} if (rf & 2) {
|
|
122
|
+
const button_r9 = i0.ɵɵnextContext().$implicit;
|
|
123
|
+
i0.ɵɵclassMap(button_r9.CssClass || "");
|
|
124
|
+
i0.ɵɵproperty("disabled", button_r9.Disabled || false)("title", button_r9.Description);
|
|
125
|
+
i0.ɵɵadvance();
|
|
126
|
+
i0.ɵɵclassMap(button_r9.Icon);
|
|
127
|
+
} }
|
|
128
|
+
function MjFormToolbarComponent_Conditional_1_For_8_Template(rf, ctx) { if (rf & 1) {
|
|
129
|
+
i0.ɵɵconditionalCreate(0, MjFormToolbarComponent_Conditional_1_For_8_Conditional_0_Template, 2, 6, "button", 34);
|
|
130
|
+
} if (rf & 2) {
|
|
131
|
+
const button_r9 = ctx.$implicit;
|
|
132
|
+
i0.ɵɵconditional(button_r9.Visible !== false ? 0 : -1);
|
|
133
|
+
} }
|
|
134
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
135
|
+
i0.ɵɵelement(0, "div", 21);
|
|
136
|
+
} }
|
|
137
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_10_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
138
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
139
|
+
i0.ɵɵelementStart(0, "a", 37);
|
|
140
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_10_For_2_Template_a_click_0_listener($event) { const parent_r11 = i0.ɵɵrestoreView(_r10).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnParentBadgeClick(parent_r11, $event)); });
|
|
141
|
+
i0.ɵɵelement(1, "i", 38);
|
|
142
|
+
i0.ɵɵtext(2);
|
|
143
|
+
i0.ɵɵelementEnd();
|
|
144
|
+
i0.ɵɵelementStart(3, "span", 39);
|
|
145
|
+
i0.ɵɵelement(4, "i", 40);
|
|
146
|
+
i0.ɵɵelementEnd();
|
|
147
|
+
} if (rf & 2) {
|
|
148
|
+
const parent_r11 = ctx.$implicit;
|
|
149
|
+
i0.ɵɵproperty("title", "View parent: " + parent_r11.Name);
|
|
150
|
+
i0.ɵɵadvance(2);
|
|
151
|
+
i0.ɵɵtextInterpolate1(" ", parent_r11.Name, " ");
|
|
152
|
+
} }
|
|
153
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
154
|
+
i0.ɵɵelementStart(0, "div", 22);
|
|
155
|
+
i0.ɵɵrepeaterCreate(1, MjFormToolbarComponent_Conditional_1_Conditional_10_For_2_Template, 5, 2, null, null, _forTrack1);
|
|
156
|
+
i0.ɵɵelementStart(3, "span", 36);
|
|
157
|
+
i0.ɵɵtext(4);
|
|
158
|
+
i0.ɵɵelementEnd()();
|
|
159
|
+
} if (rf & 2) {
|
|
160
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
161
|
+
i0.ɵɵadvance();
|
|
162
|
+
i0.ɵɵrepeater(ctx_r1.ParentChain);
|
|
163
|
+
i0.ɵɵadvance(3);
|
|
164
|
+
i0.ɵɵtextInterpolate(ctx_r1.EntityInfo == null ? null : ctx_r1.EntityInfo.Name);
|
|
165
|
+
} }
|
|
166
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_12_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
167
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
168
|
+
i0.ɵɵelementStart(0, "button", 51);
|
|
169
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_12_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnClearFilter()); });
|
|
170
|
+
i0.ɵɵelement(1, "i", 52);
|
|
171
|
+
i0.ɵɵelementEnd();
|
|
172
|
+
} }
|
|
173
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_12_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
174
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
175
|
+
i0.ɵɵelementStart(0, "button", 53);
|
|
176
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_12_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnResetSectionOrder()); });
|
|
177
|
+
i0.ɵɵelement(1, "i", 54);
|
|
178
|
+
i0.ɵɵelementEnd();
|
|
179
|
+
} }
|
|
180
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
181
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
182
|
+
i0.ɵɵelementStart(0, "div", 23)(1, "div", 41)(2, "input", 42);
|
|
183
|
+
i0.ɵɵlistener("input", function MjFormToolbarComponent_Conditional_1_Conditional_12_Template_input_input_2_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnFilterInput($event)); });
|
|
184
|
+
i0.ɵɵelementEnd();
|
|
185
|
+
i0.ɵɵconditionalCreate(3, MjFormToolbarComponent_Conditional_1_Conditional_12_Conditional_3_Template, 2, 0, "button", 43);
|
|
186
|
+
i0.ɵɵelementEnd();
|
|
187
|
+
i0.ɵɵelementStart(4, "button", 44);
|
|
188
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_12_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnExpandAll()); });
|
|
189
|
+
i0.ɵɵelement(5, "i", 45);
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
i0.ɵɵelementStart(6, "button", 46);
|
|
192
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_12_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnCollapseAll()); });
|
|
193
|
+
i0.ɵɵelement(7, "i", 47);
|
|
194
|
+
i0.ɵɵelementEnd();
|
|
195
|
+
i0.ɵɵconditionalCreate(8, MjFormToolbarComponent_Conditional_1_Conditional_12_Conditional_8_Template, 2, 0, "button", 48);
|
|
196
|
+
i0.ɵɵelementStart(9, "button", 49);
|
|
197
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_1_Conditional_12_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnToggleWidthMode()); });
|
|
198
|
+
i0.ɵɵelement(10, "i");
|
|
199
|
+
i0.ɵɵelementEnd();
|
|
200
|
+
i0.ɵɵelementStart(11, "span", 50);
|
|
201
|
+
i0.ɵɵtext(12);
|
|
202
|
+
i0.ɵɵelementEnd()();
|
|
203
|
+
} if (rf & 2) {
|
|
204
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
205
|
+
i0.ɵɵadvance(2);
|
|
206
|
+
i0.ɵɵproperty("value", ctx_r1.SearchFilter);
|
|
207
|
+
i0.ɵɵadvance();
|
|
208
|
+
i0.ɵɵconditional(ctx_r1.SearchFilter ? 3 : -1);
|
|
209
|
+
i0.ɵɵadvance();
|
|
210
|
+
i0.ɵɵproperty("disabled", ctx_r1.ExpandedSectionCount >= ctx_r1.VisibleSectionCount);
|
|
211
|
+
i0.ɵɵadvance(2);
|
|
212
|
+
i0.ɵɵproperty("disabled", ctx_r1.ExpandedSectionCount === 0);
|
|
213
|
+
i0.ɵɵadvance(2);
|
|
214
|
+
i0.ɵɵconditional(ctx_r1.HasCustomSectionOrder ? 8 : -1);
|
|
215
|
+
i0.ɵɵadvance();
|
|
216
|
+
i0.ɵɵproperty("title", ctx_r1.WidthMode === "centered" ? "Expand to full width" : "Center content");
|
|
217
|
+
i0.ɵɵadvance();
|
|
218
|
+
i0.ɵɵclassMap(ctx_r1.WidthMode === "centered" ? "fa-solid fa-arrows-left-right-to-line" : "fa-solid fa-compress");
|
|
219
|
+
i0.ɵɵadvance(2);
|
|
220
|
+
i0.ɵɵtextInterpolate2("", ctx_r1.ExpandedSectionCount, "/", ctx_r1.TotalSectionCount);
|
|
221
|
+
} }
|
|
222
|
+
function MjFormToolbarComponent_Conditional_1_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
223
|
+
i0.ɵɵelementContainer(0, 24);
|
|
224
|
+
} if (rf & 2) {
|
|
225
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
226
|
+
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.AdditionalActionsTemplate);
|
|
227
|
+
} }
|
|
228
|
+
function MjFormToolbarComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
229
|
+
i0.ɵɵelementStart(0, "div", 14)(1, "div", 15);
|
|
230
|
+
i0.ɵɵconditionalCreate(2, MjFormToolbarComponent_Conditional_1_Conditional_2_Template, 2, 0, "button", 16);
|
|
231
|
+
i0.ɵɵconditionalCreate(3, MjFormToolbarComponent_Conditional_1_Conditional_3_Template, 2, 0, "button", 17);
|
|
232
|
+
i0.ɵɵconditionalCreate(4, MjFormToolbarComponent_Conditional_1_Conditional_4_Template, 2, 3, "button", 18);
|
|
233
|
+
i0.ɵɵconditionalCreate(5, MjFormToolbarComponent_Conditional_1_Conditional_5_Template, 2, 0, "button", 19);
|
|
234
|
+
i0.ɵɵconditionalCreate(6, MjFormToolbarComponent_Conditional_1_Conditional_6_Template, 3, 2, "button", 20);
|
|
235
|
+
i0.ɵɵrepeaterCreate(7, MjFormToolbarComponent_Conditional_1_For_8_Template, 1, 1, null, null, _forTrack0);
|
|
236
|
+
i0.ɵɵelementEnd();
|
|
237
|
+
i0.ɵɵconditionalCreate(9, MjFormToolbarComponent_Conditional_1_Conditional_9_Template, 1, 0, "div", 21);
|
|
238
|
+
i0.ɵɵconditionalCreate(10, MjFormToolbarComponent_Conditional_1_Conditional_10_Template, 5, 1, "div", 22);
|
|
239
|
+
i0.ɵɵelement(11, "div", 3);
|
|
240
|
+
i0.ɵɵconditionalCreate(12, MjFormToolbarComponent_Conditional_1_Conditional_12_Template, 13, 10, "div", 23);
|
|
241
|
+
i0.ɵɵconditionalCreate(13, MjFormToolbarComponent_Conditional_1_Conditional_13_Template, 1, 1, "ng-container", 24);
|
|
242
|
+
i0.ɵɵprojection(14);
|
|
243
|
+
i0.ɵɵelementEnd();
|
|
244
|
+
} if (rf & 2) {
|
|
245
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
246
|
+
i0.ɵɵclassProp("mj-forms-toolbar--sticky", ctx_r1.Config.StickyToolbar);
|
|
247
|
+
i0.ɵɵadvance(2);
|
|
248
|
+
i0.ɵɵconditional(ctx_r1.Config.ShowEditButton && ctx_r1.UserCanEdit ? 2 : -1);
|
|
249
|
+
i0.ɵɵadvance();
|
|
250
|
+
i0.ɵɵconditional(ctx_r1.Config.ShowDeleteButton && ctx_r1.UserCanDelete ? 3 : -1);
|
|
251
|
+
i0.ɵɵadvance();
|
|
252
|
+
i0.ɵɵconditional(ctx_r1.Config.ShowFavoriteButton && ctx_r1.FavoriteInitDone ? 4 : -1);
|
|
253
|
+
i0.ɵɵadvance();
|
|
254
|
+
i0.ɵɵconditional(ctx_r1.Config.ShowHistoryButton && ctx_r1.TracksChanges ? 5 : -1);
|
|
255
|
+
i0.ɵɵadvance();
|
|
256
|
+
i0.ɵɵconditional(ctx_r1.Config.ShowListButton ? 6 : -1);
|
|
257
|
+
i0.ɵɵadvance();
|
|
258
|
+
i0.ɵɵrepeater(ctx_r1.Config.CustomButtons);
|
|
259
|
+
i0.ɵɵadvance(2);
|
|
260
|
+
i0.ɵɵconditional(ctx_r1.Config.ShowEntityHierarchy && ctx_r1.HasParentEntities ? 9 : -1);
|
|
261
|
+
i0.ɵɵadvance();
|
|
262
|
+
i0.ɵɵconditional(ctx_r1.Config.ShowEntityHierarchy && ctx_r1.HasParentEntities ? 10 : -1);
|
|
263
|
+
i0.ɵɵadvance(2);
|
|
264
|
+
i0.ɵɵconditional(ctx_r1.Config.ShowSectionControls ? 12 : -1);
|
|
265
|
+
i0.ɵɵadvance();
|
|
266
|
+
i0.ɵɵconditional(ctx_r1.AdditionalActionsTemplate ? 13 : -1);
|
|
267
|
+
} }
|
|
268
|
+
function MjFormToolbarComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
269
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
270
|
+
i0.ɵɵelementStart(0, "div", 55);
|
|
271
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_2_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDiscardCancel()); });
|
|
272
|
+
i0.ɵɵelementStart(1, "div", 56);
|
|
273
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_2_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r15); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
274
|
+
i0.ɵɵelementStart(2, "div", 57)(3, "h3");
|
|
275
|
+
i0.ɵɵtext(4, "Discard Changes?");
|
|
276
|
+
i0.ɵɵelementEnd();
|
|
277
|
+
i0.ɵɵelementStart(5, "button", 58);
|
|
278
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_2_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDiscardCancel()); });
|
|
279
|
+
i0.ɵɵelement(6, "i", 52);
|
|
280
|
+
i0.ɵɵelementEnd()();
|
|
281
|
+
i0.ɵɵelementStart(7, "div", 59)(8, "p");
|
|
282
|
+
i0.ɵɵtext(9, "You have ");
|
|
283
|
+
i0.ɵɵelementStart(10, "strong");
|
|
284
|
+
i0.ɵɵtext(11);
|
|
285
|
+
i0.ɵɵelementEnd();
|
|
286
|
+
i0.ɵɵtext(12);
|
|
287
|
+
i0.ɵɵelementEnd()();
|
|
288
|
+
i0.ɵɵelementStart(13, "div", 60)(14, "button", 61);
|
|
289
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_2_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDiscardConfirm()); });
|
|
290
|
+
i0.ɵɵelement(15, "i", 9);
|
|
291
|
+
i0.ɵɵtext(16, " Discard Changes ");
|
|
292
|
+
i0.ɵɵelementEnd();
|
|
293
|
+
i0.ɵɵelementStart(17, "button", 62);
|
|
294
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_2_Template_button_click_17_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDiscardCancel()); });
|
|
295
|
+
i0.ɵɵtext(18, " Keep Editing ");
|
|
296
|
+
i0.ɵɵelementEnd()()()();
|
|
297
|
+
} if (rf & 2) {
|
|
298
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
299
|
+
i0.ɵɵadvance(11);
|
|
300
|
+
i0.ɵɵtextInterpolate(ctx_r1.DirtyFieldDisplayNames.length);
|
|
301
|
+
i0.ɵɵadvance();
|
|
302
|
+
i0.ɵɵtextInterpolate2(" unsaved change", ctx_r1.DirtyFieldDisplayNames.length === 1 ? "" : "s", ". Are you sure you want to discard ", ctx_r1.DirtyFieldDisplayNames.length === 1 ? "it" : "them", "?");
|
|
303
|
+
} }
|
|
304
|
+
function MjFormToolbarComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
305
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
306
|
+
i0.ɵɵelementStart(0, "div", 55);
|
|
307
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDeleteCancel()); });
|
|
308
|
+
i0.ɵɵelementStart(1, "div", 56);
|
|
309
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_3_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r16); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
310
|
+
i0.ɵɵelementStart(2, "div", 57)(3, "h3");
|
|
311
|
+
i0.ɵɵtext(4, "Confirm Deletion");
|
|
312
|
+
i0.ɵɵelementEnd();
|
|
313
|
+
i0.ɵɵelementStart(5, "button", 58);
|
|
314
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_3_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDeleteCancel()); });
|
|
315
|
+
i0.ɵɵelement(6, "i", 52);
|
|
316
|
+
i0.ɵɵelementEnd()();
|
|
317
|
+
i0.ɵɵelementStart(7, "div", 59)(8, "p");
|
|
318
|
+
i0.ɵɵtext(9, "Are you sure you want to delete this record? This action cannot be undone.");
|
|
319
|
+
i0.ɵɵelementEnd()();
|
|
320
|
+
i0.ɵɵelementStart(10, "div", 60)(11, "button", 61);
|
|
321
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_3_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDeleteConfirm()); });
|
|
322
|
+
i0.ɵɵelement(12, "i", 63);
|
|
323
|
+
i0.ɵɵtext(13, " Delete ");
|
|
324
|
+
i0.ɵɵelementEnd();
|
|
325
|
+
i0.ɵɵelementStart(14, "button", 62);
|
|
326
|
+
i0.ɵɵlistener("click", function MjFormToolbarComponent_Conditional_3_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnDeleteCancel()); });
|
|
327
|
+
i0.ɵɵtext(15, " Cancel ");
|
|
328
|
+
i0.ɵɵelementEnd()()()();
|
|
329
|
+
} }
|
|
330
|
+
/**
|
|
331
|
+
* Configurable form toolbar component.
|
|
332
|
+
*
|
|
333
|
+
* Renders action buttons (edit, save, delete, favorite, history, lists),
|
|
334
|
+
* the IS-A entity hierarchy breadcrumb, and section controls (search, expand/collapse).
|
|
335
|
+
*
|
|
336
|
+
* All navigation actions are emitted as events - the toolbar never calls any routing
|
|
337
|
+
* service directly. The host application subscribes and maps to its own navigation.
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
* ```html
|
|
341
|
+
* <mj-form-toolbar
|
|
342
|
+
* [record]="record"
|
|
343
|
+
* [editMode]="editMode"
|
|
344
|
+
* [config]="toolbarConfig"
|
|
345
|
+
* (Navigate)="onNavigate($event)"
|
|
346
|
+
* (EditModeChange)="editMode = $event"
|
|
347
|
+
* (SaveRequested)="onSave()"
|
|
348
|
+
* (DeleteRequested)="onDelete()">
|
|
349
|
+
* </mj-form-toolbar>
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
export class MjFormToolbarComponent {
|
|
353
|
+
cdr = inject(ChangeDetectorRef);
|
|
354
|
+
// ---- Deprecated form reference (backward compat) ----
|
|
355
|
+
_formRef;
|
|
356
|
+
/**
|
|
357
|
+
* @deprecated Use `<mj-record-form-container>` or pass individual inputs instead.
|
|
358
|
+
* Accepts a form component reference for backward compatibility.
|
|
359
|
+
* When set, the toolbar reads Record, EditMode, etc. from this reference.
|
|
360
|
+
*/
|
|
361
|
+
set Form(value) { this._formRef = value; }
|
|
362
|
+
get Form() { return this._formRef; }
|
|
363
|
+
/** @deprecated Use [Form] or individual inputs instead */
|
|
364
|
+
set _deprecatedForm(value) { this.Form = value; }
|
|
365
|
+
// ---- Inputs ----
|
|
366
|
+
/** The entity record being displayed/edited */
|
|
367
|
+
Record;
|
|
368
|
+
/** Whether the form is in edit mode */
|
|
369
|
+
EditMode = false;
|
|
370
|
+
/** Whether the current user has edit permission */
|
|
371
|
+
UserCanEdit = false;
|
|
372
|
+
/** Whether the current user has delete permission */
|
|
373
|
+
UserCanDelete = false;
|
|
374
|
+
/** Whether the record is currently a favorite */
|
|
375
|
+
IsFavorite = false;
|
|
376
|
+
/** Whether favorite init has completed (prevents flash of wrong icon) */
|
|
377
|
+
FavoriteInitDone = false;
|
|
378
|
+
/** Whether the record has unsaved changes */
|
|
379
|
+
IsDirty = false;
|
|
380
|
+
/** Names of dirty fields for display in save bar */
|
|
381
|
+
DirtyFieldNames = [];
|
|
382
|
+
/** Count of lists this record belongs to */
|
|
383
|
+
ListCount = 0;
|
|
384
|
+
/** Entity info for IS-A hierarchy and metadata */
|
|
385
|
+
EntityInfo = null;
|
|
386
|
+
/** Toolbar configuration controlling visibility and behavior */
|
|
387
|
+
Config = DEFAULT_TOOLBAR_CONFIG;
|
|
388
|
+
/** Whether to show the toolbar in a saving/loading state */
|
|
389
|
+
IsSaving = false;
|
|
390
|
+
// Section controls inputs
|
|
391
|
+
VisibleSectionCount = 0;
|
|
392
|
+
TotalSectionCount = 0;
|
|
393
|
+
ExpandedSectionCount = 0;
|
|
394
|
+
SearchFilter = '';
|
|
395
|
+
ShowEmptyFields = false;
|
|
396
|
+
WidthMode = 'centered';
|
|
397
|
+
HasCustomSectionOrder = false;
|
|
398
|
+
/** Optional template for additional toolbar actions */
|
|
399
|
+
AdditionalActionsTemplate = null;
|
|
400
|
+
// ---- Outputs ----
|
|
401
|
+
/** Emitted for all navigation actions (record links, hierarchy clicks, etc.) */
|
|
402
|
+
Navigate = new EventEmitter();
|
|
403
|
+
/** Request to enter or exit edit mode */
|
|
404
|
+
EditModeChange = new EventEmitter();
|
|
405
|
+
/** Emitted BEFORE save - can be cancelled by setting event.Cancel = true */
|
|
406
|
+
BeforeSave = new EventEmitter();
|
|
407
|
+
/** Request to save the current record */
|
|
408
|
+
SaveRequested = new EventEmitter();
|
|
409
|
+
/** Emitted BEFORE cancel - can be cancelled by setting event.Cancel = true */
|
|
410
|
+
BeforeCancel = new EventEmitter();
|
|
411
|
+
/** Request to cancel editing and revert changes */
|
|
412
|
+
CancelRequested = new EventEmitter();
|
|
413
|
+
/** Emitted BEFORE delete - can be cancelled by setting event.Cancel = true */
|
|
414
|
+
BeforeDelete = new EventEmitter();
|
|
415
|
+
/** Request to delete the current record */
|
|
416
|
+
DeleteRequested = new EventEmitter();
|
|
417
|
+
/** Request to toggle favorite status */
|
|
418
|
+
FavoriteToggled = new EventEmitter();
|
|
419
|
+
/** Emitted BEFORE history view - can be cancelled by setting event.Cancel = true */
|
|
420
|
+
BeforeHistoryView = new EventEmitter();
|
|
421
|
+
/** Request to show record change history */
|
|
422
|
+
HistoryRequested = new EventEmitter();
|
|
423
|
+
/** Emitted BEFORE list management - can be cancelled by setting event.Cancel = true */
|
|
424
|
+
BeforeListManagement = new EventEmitter();
|
|
425
|
+
/** Request to show list management */
|
|
426
|
+
ListManagementRequested = new EventEmitter();
|
|
427
|
+
/** Request to show dirty field changes */
|
|
428
|
+
ShowChangesRequested = new EventEmitter();
|
|
429
|
+
/** Emitted when a custom toolbar button is clicked */
|
|
430
|
+
CustomButtonClick = new EventEmitter();
|
|
431
|
+
// Section control outputs
|
|
432
|
+
FilterChange = new EventEmitter();
|
|
433
|
+
ExpandAllRequested = new EventEmitter();
|
|
434
|
+
CollapseAllRequested = new EventEmitter();
|
|
435
|
+
ShowEmptyFieldsChange = new EventEmitter();
|
|
436
|
+
WidthModeChange = new EventEmitter();
|
|
437
|
+
ResetSectionOrderRequested = new EventEmitter();
|
|
438
|
+
// ---- Internal state ----
|
|
439
|
+
ShowDeleteDialog = false;
|
|
440
|
+
ShowDiscardDialog = false;
|
|
441
|
+
// ---- Lifecycle ----
|
|
442
|
+
ngDoCheck() {
|
|
443
|
+
if (!this._formRef)
|
|
444
|
+
return;
|
|
445
|
+
this.SyncFromFormRef();
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Sync toolbar state from the legacy form reference.
|
|
449
|
+
* Only active when [Form] is set (backward-compat mode).
|
|
450
|
+
*/
|
|
451
|
+
SyncFromFormRef() {
|
|
452
|
+
const ref = this._formRef;
|
|
453
|
+
const rec = ref['record'];
|
|
454
|
+
let changed = false;
|
|
455
|
+
if (rec && rec !== this.Record) {
|
|
456
|
+
this.Record = rec;
|
|
457
|
+
this.EntityInfo = rec.EntityInfo;
|
|
458
|
+
changed = true;
|
|
459
|
+
}
|
|
460
|
+
if (rec) {
|
|
461
|
+
const dirty = rec.Dirty;
|
|
462
|
+
if (dirty !== this.IsDirty) {
|
|
463
|
+
this.IsDirty = dirty;
|
|
464
|
+
changed = true;
|
|
465
|
+
}
|
|
466
|
+
if (dirty) {
|
|
467
|
+
const dirtyNames = rec.Fields.filter(f => f.Dirty).map(f => f.Name);
|
|
468
|
+
if (dirtyNames.length !== this.DirtyFieldNames.length) {
|
|
469
|
+
this.DirtyFieldNames = dirtyNames;
|
|
470
|
+
changed = true;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
const editMode = !!ref['EditMode'];
|
|
475
|
+
if (editMode !== this.EditMode) {
|
|
476
|
+
this.EditMode = editMode;
|
|
477
|
+
changed = true;
|
|
478
|
+
}
|
|
479
|
+
const canEdit = !!ref['UserCanEdit'];
|
|
480
|
+
if (canEdit !== this.UserCanEdit) {
|
|
481
|
+
this.UserCanEdit = canEdit;
|
|
482
|
+
changed = true;
|
|
483
|
+
}
|
|
484
|
+
const canDelete = !!ref['UserCanDelete'];
|
|
485
|
+
if (canDelete !== this.UserCanDelete) {
|
|
486
|
+
this.UserCanDelete = canDelete;
|
|
487
|
+
changed = true;
|
|
488
|
+
}
|
|
489
|
+
const isFavorite = !!ref['IsFavorite'];
|
|
490
|
+
if (isFavorite !== this.IsFavorite) {
|
|
491
|
+
this.IsFavorite = isFavorite;
|
|
492
|
+
changed = true;
|
|
493
|
+
}
|
|
494
|
+
const favDone = !!ref['FavoriteInitDone'];
|
|
495
|
+
if (favDone !== this.FavoriteInitDone) {
|
|
496
|
+
this.FavoriteInitDone = favDone;
|
|
497
|
+
changed = true;
|
|
498
|
+
}
|
|
499
|
+
if (changed) {
|
|
500
|
+
this.cdr.markForCheck();
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
/** Whether entity tracks record changes (for history button) */
|
|
504
|
+
get TracksChanges() {
|
|
505
|
+
return this.EntityInfo?.TrackRecordChanges === true;
|
|
506
|
+
}
|
|
507
|
+
/** IS-A parent chain for breadcrumb display */
|
|
508
|
+
get ParentChain() {
|
|
509
|
+
if (!this.EntityInfo)
|
|
510
|
+
return [];
|
|
511
|
+
return this.EntityInfo.ParentChain.slice().reverse();
|
|
512
|
+
}
|
|
513
|
+
/** Whether this entity has parent entities (IS-A child) */
|
|
514
|
+
get HasParentEntities() {
|
|
515
|
+
return this.ParentChain.length > 0;
|
|
516
|
+
}
|
|
517
|
+
/** Child entity types for dropdown */
|
|
518
|
+
get ChildEntities() {
|
|
519
|
+
return this.EntityInfo?.ChildEntities ?? [];
|
|
520
|
+
}
|
|
521
|
+
/** Whether this entity has child entity types (IS-A parent) */
|
|
522
|
+
get HasChildEntities() {
|
|
523
|
+
return this.ChildEntities.length > 0;
|
|
524
|
+
}
|
|
525
|
+
/** Display-friendly names of dirty fields for the edit banner */
|
|
526
|
+
get DirtyFieldDisplayNames() {
|
|
527
|
+
if (!this.Record?.EntityInfo || this.DirtyFieldNames.length === 0)
|
|
528
|
+
return [];
|
|
529
|
+
return this.DirtyFieldNames.map(name => {
|
|
530
|
+
const field = this.Record.EntityInfo.Fields.find(f => f.Name === name);
|
|
531
|
+
return field?.DisplayNameOrName ?? name;
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
/** Display name for the edit banner */
|
|
535
|
+
get RecordDisplayName() {
|
|
536
|
+
if (!this.Record)
|
|
537
|
+
return '';
|
|
538
|
+
const info = this.Record.EntityInfo;
|
|
539
|
+
if (info?.NameField) {
|
|
540
|
+
const name = this.Record.Get(info.NameField.Name);
|
|
541
|
+
if (name)
|
|
542
|
+
return String(name);
|
|
543
|
+
}
|
|
544
|
+
return this.Record.PrimaryKey.ToConcatenatedString();
|
|
545
|
+
}
|
|
546
|
+
// ---- Actions ----
|
|
547
|
+
OnEdit() {
|
|
548
|
+
if (this.DispatchToFormRef('StartEditMode'))
|
|
549
|
+
return;
|
|
550
|
+
this.EditModeChange.emit(true);
|
|
551
|
+
}
|
|
552
|
+
OnSave() {
|
|
553
|
+
// Use microtask timing to avoid ExpressionChangedAfterItHasBeenCheckedError
|
|
554
|
+
Promise.resolve().then(() => {
|
|
555
|
+
// Emit Before event - handler can cancel by setting event.Cancel = true
|
|
556
|
+
const beforeEvent = new BeforeSaveEventArgs(true);
|
|
557
|
+
this.BeforeSave.emit(beforeEvent);
|
|
558
|
+
if (beforeEvent.Cancel)
|
|
559
|
+
return;
|
|
560
|
+
if (this.DispatchToFormRef('SaveRecord', true))
|
|
561
|
+
return;
|
|
562
|
+
this.SaveRequested.emit();
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
OnCancel() {
|
|
566
|
+
// If there are unsaved changes, show confirmation dialog
|
|
567
|
+
if (this.IsDirty) {
|
|
568
|
+
this.ShowDiscardDialog = true;
|
|
569
|
+
this.cdr.markForCheck();
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
// No changes - cancel immediately
|
|
573
|
+
this.EmitCancel();
|
|
574
|
+
}
|
|
575
|
+
OnDiscardConfirm() {
|
|
576
|
+
this.ShowDiscardDialog = false;
|
|
577
|
+
this.EmitCancel();
|
|
578
|
+
this.cdr.markForCheck();
|
|
579
|
+
}
|
|
580
|
+
OnDiscardCancel() {
|
|
581
|
+
this.ShowDiscardDialog = false;
|
|
582
|
+
this.cdr.markForCheck();
|
|
583
|
+
}
|
|
584
|
+
EmitCancel() {
|
|
585
|
+
// Emit Before event - handler can cancel by setting event.Cancel = true
|
|
586
|
+
const beforeEvent = new BeforeCancelEventArgs();
|
|
587
|
+
this.BeforeCancel.emit(beforeEvent);
|
|
588
|
+
if (beforeEvent.Cancel)
|
|
589
|
+
return;
|
|
590
|
+
if (this.DispatchToFormRef('CancelEdit'))
|
|
591
|
+
return;
|
|
592
|
+
this.CancelRequested.emit();
|
|
593
|
+
}
|
|
594
|
+
OnDeleteClick() {
|
|
595
|
+
this.ShowDeleteDialog = true;
|
|
596
|
+
this.cdr.markForCheck();
|
|
597
|
+
}
|
|
598
|
+
OnDeleteConfirm() {
|
|
599
|
+
this.ShowDeleteDialog = false;
|
|
600
|
+
// Emit Before event - handler can cancel by setting event.Cancel = true
|
|
601
|
+
const beforeEvent = new BeforeDeleteEventArgs();
|
|
602
|
+
this.BeforeDelete.emit(beforeEvent);
|
|
603
|
+
if (beforeEvent.Cancel) {
|
|
604
|
+
this.cdr.markForCheck();
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
if (this.DispatchToFormRef('OnDeleteRequested')) {
|
|
608
|
+
this.cdr.markForCheck();
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
this.DeleteRequested.emit();
|
|
612
|
+
this.cdr.markForCheck();
|
|
613
|
+
}
|
|
614
|
+
OnDeleteCancel() {
|
|
615
|
+
this.ShowDeleteDialog = false;
|
|
616
|
+
this.cdr.markForCheck();
|
|
617
|
+
}
|
|
618
|
+
OnFavoriteToggle() {
|
|
619
|
+
if (this.DispatchToFormRef('OnFavoriteToggled'))
|
|
620
|
+
return;
|
|
621
|
+
this.FavoriteToggled.emit();
|
|
622
|
+
}
|
|
623
|
+
OnHistory() {
|
|
624
|
+
// Emit Before event - handler can cancel by setting event.Cancel = true
|
|
625
|
+
const beforeEvent = new BeforeHistoryViewEventArgs();
|
|
626
|
+
this.BeforeHistoryView.emit(beforeEvent);
|
|
627
|
+
if (beforeEvent.Cancel)
|
|
628
|
+
return;
|
|
629
|
+
if (this.DispatchToFormRef('OnHistoryRequested'))
|
|
630
|
+
return;
|
|
631
|
+
this.HistoryRequested.emit();
|
|
632
|
+
}
|
|
633
|
+
OnListManagement() {
|
|
634
|
+
// Emit Before event - handler can cancel by setting event.Cancel = true
|
|
635
|
+
const beforeEvent = new BeforeListManagementEventArgs();
|
|
636
|
+
this.BeforeListManagement.emit(beforeEvent);
|
|
637
|
+
if (beforeEvent.Cancel)
|
|
638
|
+
return;
|
|
639
|
+
if (this.DispatchToFormRef('OnListManagementRequested'))
|
|
640
|
+
return;
|
|
641
|
+
this.ListManagementRequested.emit();
|
|
642
|
+
}
|
|
643
|
+
OnCustomButtonClick(button) {
|
|
644
|
+
if (button.Disabled)
|
|
645
|
+
return;
|
|
646
|
+
this.CustomButtonClick.emit({
|
|
647
|
+
ButtonKey: button.Key,
|
|
648
|
+
Button: button
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
OnShowChanges() {
|
|
652
|
+
if (this.DispatchToFormRef('ShowChanges'))
|
|
653
|
+
return;
|
|
654
|
+
this.ShowChangesRequested.emit();
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Try to call a method on the legacy form reference.
|
|
658
|
+
* Returns true if the method was found and called, false otherwise.
|
|
659
|
+
*/
|
|
660
|
+
DispatchToFormRef(methodName, ...args) {
|
|
661
|
+
if (!this._formRef)
|
|
662
|
+
return false;
|
|
663
|
+
const ref = this._formRef;
|
|
664
|
+
const method = ref[methodName];
|
|
665
|
+
if (typeof method === 'function') {
|
|
666
|
+
method.call(this._formRef, ...args);
|
|
667
|
+
return true;
|
|
668
|
+
}
|
|
669
|
+
return false;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Navigate to a parent entity record in the IS-A hierarchy.
|
|
673
|
+
*/
|
|
674
|
+
OnParentBadgeClick(parentEntity, event) {
|
|
675
|
+
if (!this.Record)
|
|
676
|
+
return;
|
|
677
|
+
this.Navigate.emit({
|
|
678
|
+
Kind: 'entity-hierarchy',
|
|
679
|
+
EntityName: parentEntity.Name,
|
|
680
|
+
PrimaryKey: this.Record.PrimaryKey,
|
|
681
|
+
Direction: 'parent'
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* Navigate to a child entity type list view.
|
|
686
|
+
*/
|
|
687
|
+
OnChildEntityClick(childEntity) {
|
|
688
|
+
if (!this.Record)
|
|
689
|
+
return;
|
|
690
|
+
this.Navigate.emit({
|
|
691
|
+
Kind: 'child-entity-type',
|
|
692
|
+
ChildEntityName: childEntity.Name,
|
|
693
|
+
ParentEntityName: this.EntityInfo.Name,
|
|
694
|
+
ParentRecordId: this.Record.PrimaryKey.ToConcatenatedString()
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
// ---- Section Controls ----
|
|
698
|
+
OnFilterInput(event) {
|
|
699
|
+
const input = event.target;
|
|
700
|
+
this.FilterChange.emit(input.value);
|
|
701
|
+
}
|
|
702
|
+
OnClearFilter() {
|
|
703
|
+
this.FilterChange.emit('');
|
|
704
|
+
}
|
|
705
|
+
OnExpandAll() {
|
|
706
|
+
this.ExpandAllRequested.emit();
|
|
707
|
+
}
|
|
708
|
+
OnCollapseAll() {
|
|
709
|
+
this.CollapseAllRequested.emit();
|
|
710
|
+
}
|
|
711
|
+
OnToggleEmptyFields() {
|
|
712
|
+
this.ShowEmptyFieldsChange.emit(!this.ShowEmptyFields);
|
|
713
|
+
}
|
|
714
|
+
OnToggleWidthMode() {
|
|
715
|
+
const newMode = this.WidthMode === 'centered' ? 'full-width' : 'centered';
|
|
716
|
+
this.WidthModeChange.emit(newMode);
|
|
717
|
+
}
|
|
718
|
+
OnResetSectionOrder() {
|
|
719
|
+
this.ResetSectionOrderRequested.emit();
|
|
720
|
+
}
|
|
721
|
+
static ɵfac = function MjFormToolbarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MjFormToolbarComponent)(); };
|
|
722
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MjFormToolbarComponent, selectors: [["mj-form-toolbar"]], inputs: { Form: "Form", _deprecatedForm: [0, "form", "_deprecatedForm"], Record: "Record", EditMode: "EditMode", UserCanEdit: "UserCanEdit", UserCanDelete: "UserCanDelete", IsFavorite: "IsFavorite", FavoriteInitDone: "FavoriteInitDone", IsDirty: "IsDirty", DirtyFieldNames: "DirtyFieldNames", ListCount: "ListCount", EntityInfo: "EntityInfo", Config: "Config", IsSaving: "IsSaving", VisibleSectionCount: "VisibleSectionCount", TotalSectionCount: "TotalSectionCount", ExpandedSectionCount: "ExpandedSectionCount", SearchFilter: "SearchFilter", ShowEmptyFields: "ShowEmptyFields", WidthMode: "WidthMode", HasCustomSectionOrder: "HasCustomSectionOrder", AdditionalActionsTemplate: "AdditionalActionsTemplate" }, outputs: { Navigate: "Navigate", EditModeChange: "EditModeChange", BeforeSave: "BeforeSave", SaveRequested: "SaveRequested", BeforeCancel: "BeforeCancel", CancelRequested: "CancelRequested", BeforeDelete: "BeforeDelete", DeleteRequested: "DeleteRequested", FavoriteToggled: "FavoriteToggled", BeforeHistoryView: "BeforeHistoryView", HistoryRequested: "HistoryRequested", BeforeListManagement: "BeforeListManagement", ListManagementRequested: "ListManagementRequested", ShowChangesRequested: "ShowChangesRequested", CustomButtonClick: "CustomButtonClick", FilterChange: "FilterChange", ExpandAllRequested: "ExpandAllRequested", CollapseAllRequested: "CollapseAllRequested", ShowEmptyFieldsChange: "ShowEmptyFieldsChange", WidthModeChange: "WidthModeChange", ResetSectionOrderRequested: "ResetSectionOrderRequested" }, standalone: false, ngContentSelectors: _c1, decls: 4, vars: 4, consts: [[1, "mj-forms-edit-banner"], [1, "mj-forms-toolbar", 3, "mj-forms-toolbar--sticky"], [1, "mj-dialog-overlay"], [1, "mj-forms-toolbar-spacer"], [1, "mj-forms-edit-banner-actions"], ["title", "Save Changes", 1, "mj-forms-btn", "mj-forms-btn--primary", 3, "click", "disabled"], [1, "fa-solid", "fa-floppy-disk"], [1, "mj-forms-btn-text"], ["title", "Discard Changes", 1, "mj-forms-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-rotate-left"], [1, "fa-solid", "fa-circle-exclamation", "mj-forms-edit-banner-icon--dirty"], [1, "mj-forms-edit-banner-dirty"], [1, "fa-solid", "fa-pen-to-square"], [1, "mj-forms-edit-banner-text"], [1, "mj-forms-toolbar"], [1, "mj-forms-toolbar-group"], ["title", "Edit this Record", 1, "mj-forms-btn"], ["title", "Delete this Record", 1, "mj-forms-btn"], [1, "mj-forms-btn", 3, "title"], ["title", "Record Changes", 1, "mj-forms-btn"], [1, "mj-forms-btn", "mj-forms-btn--list", 3, "title"], [1, "mj-forms-toolbar-separator"], [1, "mj-entity-hierarchy"], [1, "mj-forms-toolbar-group", "mj-section-controls"], [3, "ngTemplateOutlet"], ["title", "Edit this Record", 1, "mj-forms-btn", 3, "click"], ["title", "Delete this Record", 1, "mj-forms-btn", 3, "click"], [1, "fa-regular", "fa-trash-can"], [1, "mj-forms-btn", 3, "click", "title"], ["title", "Record Changes", 1, "mj-forms-btn", 3, "click"], [1, "fa-regular", "fa-clock"], [1, "mj-forms-btn", "mj-forms-btn--list", 3, "click", "title"], [1, "fa-regular", "fa-bookmark"], [1, "mj-list-count-badge"], [1, "mj-forms-btn", 3, "class", "disabled", "title"], [1, "mj-forms-btn", 3, "click", "disabled", "title"], [1, "mj-entity-badge", "mj-entity-badge--current"], [1, "mj-entity-badge", "mj-entity-badge--parent", 3, "click", "title"], [1, "fa-solid", "fa-arrow-up"], [1, "mj-hierarchy-arrow"], [1, "fa-solid", "fa-chevron-right"], [1, "mj-forms-search-wrapper"], ["type", "text", "placeholder", "Search sections...", 1, "mj-section-search", 3, "input", "value"], ["title", "Clear search", 1, "mj-clear-search"], ["title", "Expand all sections", 1, "mj-forms-btn", "mj-forms-btn--ghost", "mj-forms-btn--icon-only", 3, "click", "disabled"], [1, "fa-solid", "fa-angles-down"], ["title", "Collapse all sections", 1, "mj-forms-btn", "mj-forms-btn--ghost", "mj-forms-btn--icon-only", 3, "click", "disabled"], [1, "fa-solid", "fa-angles-up"], ["title", "Reset section order", 1, "mj-forms-btn", "mj-forms-btn--ghost", "mj-forms-btn--icon-only"], [1, "mj-forms-btn", "mj-forms-btn--ghost", "mj-forms-btn--icon-only", 3, "click", "title"], [1, "mj-section-count-pill"], ["title", "Clear search", 1, "mj-clear-search", 3, "click"], [1, "fa-solid", "fa-xmark"], ["title", "Reset section order", 1, "mj-forms-btn", "mj-forms-btn--ghost", "mj-forms-btn--icon-only", 3, "click"], [1, "fa-solid", "fa-arrow-rotate-left"], [1, "mj-dialog-overlay", 3, "click"], [1, "mj-dialog", 3, "click"], [1, "mj-dialog-header"], [1, "mj-dialog-close", 3, "click"], [1, "mj-dialog-body"], [1, "mj-dialog-footer"], [1, "mj-forms-btn", "mj-forms-btn--danger", 3, "click"], [1, "mj-forms-btn", 3, "click"], [1, "fa-solid", "fa-trash-can"]], template: function MjFormToolbarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
723
|
+
i0.ɵɵprojectionDef(_c0);
|
|
724
|
+
i0.ɵɵconditionalCreate(0, MjFormToolbarComponent_Conditional_0_Template, 13, 3, "div", 0);
|
|
725
|
+
i0.ɵɵconditionalCreate(1, MjFormToolbarComponent_Conditional_1_Template, 15, 11, "div", 1);
|
|
726
|
+
i0.ɵɵconditionalCreate(2, MjFormToolbarComponent_Conditional_2_Template, 19, 3, "div", 2);
|
|
727
|
+
i0.ɵɵconditionalCreate(3, MjFormToolbarComponent_Conditional_3_Template, 16, 0, "div", 2);
|
|
728
|
+
} if (rf & 2) {
|
|
729
|
+
i0.ɵɵconditional(ctx.EditMode && ctx.Config.ShowEditBanner ? 0 : -1);
|
|
730
|
+
i0.ɵɵadvance();
|
|
731
|
+
i0.ɵɵconditional(!ctx.EditMode ? 1 : -1);
|
|
732
|
+
i0.ɵɵadvance();
|
|
733
|
+
i0.ɵɵconditional(ctx.ShowDiscardDialog ? 2 : -1);
|
|
734
|
+
i0.ɵɵadvance();
|
|
735
|
+
i0.ɵɵconditional(ctx.ShowDeleteDialog ? 3 : -1);
|
|
736
|
+
} }, dependencies: [i1.NgTemplateOutlet], styles: ["\n\n\n\n[_nghost-%COMP%] {\n --mj-forms-toolbar-bg: #f9fafb;\n --mj-card-bg: #ffffff;\n --mj-accent: #667eea;\n --mj-accent-light: rgba(102, 126, 234, 0.08);\n --mj-text-primary: #1f2937;\n --mj-text-secondary: #6b7280;\n --mj-text-muted: #9ca3af;\n --mj-border: #e5e7eb;\n --mj-error: #ef4444;\n --mj-warning: #f59e0b;\n --mj-isa-parent: #8b5cf6;\n --mj-isa-child: #06b6d4;\n --mj-transition: 200ms;\n\n display: block;\n}\n\n\n\n\n\n.mj-forms-edit-banner[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 16px 16px;\n background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);\n border-bottom: 2px solid var(--mj-accent);\n font-size: 13px;\n color: var(--mj-accent);\n font-weight: 500;\n}\n\n.mj-forms-edit-banner[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.mj-forms-edit-banner-icon--dirty[_ngcontent-%COMP%] {\n color: var(--mj-warning);\n font-size: 16px;\n}\n\n.mj-forms-edit-banner-text[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.mj-forms-edit-banner-dirty[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #374151;\n}\n\n.mj-forms-edit-banner-dirty[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n color: var(--mj-warning);\n font-weight: 700;\n}\n\n.mj-forms-edit-banner-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n}\n\n\n\n\n\n.mj-forms-toolbar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 22px 16px;\n background: var(--mj-forms-toolbar-bg);\n border-bottom: 2px solid var(--mj-border);\n flex-wrap: wrap;\n z-index: 40;\n}\n\n.mj-forms-toolbar--sticky[_ngcontent-%COMP%] {\n position: sticky;\n top: 0;\n}\n\n.mj-forms-toolbar--disabled[_ngcontent-%COMP%] {\n pointer-events: none;\n opacity: 0.7;\n}\n\n.mj-forms-toolbar-group[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-forms-toolbar-separator[_ngcontent-%COMP%] {\n width: 1px;\n height: 24px;\n background: var(--mj-border);\n margin: 0 4px;\n}\n\n.mj-forms-toolbar-spacer[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n\n\n\n\n.mj-forms-btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n font-size: 13px;\n font-weight: 500;\n border: 1px solid var(--mj-border);\n background: var(--mj-card-bg);\n color: var(--mj-text-primary);\n border-radius: 6px;\n cursor: pointer;\n transition: all var(--mj-transition) ease;\n white-space: nowrap;\n font-family: inherit;\n line-height: 1;\n}\n\n.mj-forms-btn[_ngcontent-%COMP%]:hover {\n background: #f3f4f6;\n border-color: #9ca3af;\n box-shadow: 0 1px 3px rgba(0,0,0,0.08);\n}\n\n.mj-forms-btn[_ngcontent-%COMP%]:active {\n transform: translateY(0);\n box-shadow: none;\n}\n\n.mj-forms-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mj-forms-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 15px;\n line-height: 1;\n}\n\n.mj-forms-btn--primary[_ngcontent-%COMP%] {\n background: var(--mj-accent);\n color: white;\n border-color: var(--mj-accent);\n}\n\n.mj-forms-btn--primary[_ngcontent-%COMP%]:hover {\n background: #5a6fd6;\n border-color: #5a6fd6;\n box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);\n}\n\n.mj-forms-btn--danger[_ngcontent-%COMP%] {\n color: var(--mj-error);\n border-color: #fecaca;\n background: #fef2f2;\n}\n\n.mj-forms-btn--danger[_ngcontent-%COMP%]:hover {\n background: #fee2e2;\n border-color: var(--mj-error);\n}\n\n.mj-forms-btn--ghost[_ngcontent-%COMP%] {\n border-color: transparent;\n background: transparent;\n}\n\n.mj-forms-btn--ghost[_ngcontent-%COMP%]:hover {\n background: var(--mj-accent-light);\n border-color: transparent;\n}\n\n.mj-forms-btn--icon-only[_ngcontent-%COMP%] {\n padding: 7px 9px;\n}\n\n.mj-forms-btn--sm[_ngcontent-%COMP%] {\n padding: 5px 12px;\n font-size: 12px;\n}\n\n.mj-forms-btn--sm[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n.mj-forms-btn-text[_ngcontent-%COMP%] {\n margin-left: 2px;\n}\n\n.mj-icon--favorite[_ngcontent-%COMP%] {\n color: #f59e0b;\n}\n\n\n\n.mj-forms-btn--list[_ngcontent-%COMP%] {\n position: relative;\n}\n\n.mj-list-count-badge[_ngcontent-%COMP%] {\n position: absolute;\n top: -6px;\n right: -6px;\n min-width: 16px;\n height: 16px;\n padding: 0 4px;\n font-size: 10px;\n font-weight: 700;\n color: white;\n background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--mj-forms-toolbar-bg);\n}\n\n\n\n\n\n.mj-entity-hierarchy[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-entity-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: pointer;\n transition: all var(--mj-transition) ease;\n text-decoration: none;\n border: 1px solid transparent;\n}\n\n.mj-entity-badge[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n}\n\n.mj-entity-badge--parent[_ngcontent-%COMP%] {\n background: #f3f0ff;\n color: var(--mj-isa-parent);\n border-color: #e0d5ff;\n}\n\n.mj-entity-badge--parent[_ngcontent-%COMP%]:hover {\n background: #e8e0ff;\n border-color: var(--mj-isa-parent);\n box-shadow: 0 2px 6px rgba(139, 92, 246, 0.15);\n}\n\n.mj-entity-badge--current[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 13px;\n color: var(--mj-text-primary);\n padding: 4px 8px;\n background: #f3f4f6;\n border-radius: 6px;\n cursor: default;\n}\n\n.mj-entity-badge--child[_ngcontent-%COMP%] {\n background: #ecfeff;\n color: var(--mj-isa-child);\n border-color: #cffafe;\n}\n\n.mj-entity-badge--child[_ngcontent-%COMP%]:hover {\n background: #cffafe;\n border-color: var(--mj-isa-child);\n box-shadow: 0 2px 6px rgba(6, 182, 212, 0.15);\n}\n\n.mj-child-count[_ngcontent-%COMP%] {\n background: var(--mj-isa-child);\n color: white;\n font-size: 10px;\n padding: 1px 5px;\n border-radius: 8px;\n font-weight: 700;\n}\n\n.mj-hierarchy-arrow[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n font-size: 10px;\n}\n\n\n\n\n\n\n\n\n.mj-section-controls[_ngcontent-%COMP%] {\n gap: 6px;\n}\n\n.mj-forms-search-wrapper[_ngcontent-%COMP%] {\n position: relative;\n display: inline-flex;\n align-items: center;\n}\n\n.mj-section-search[_ngcontent-%COMP%] {\n max-width: 180px;\n font-size: 13px;\n padding: 6px 28px 6px 8px;\n border: 1px solid var(--mj-border);\n border-radius: 6px;\n background: white;\n outline: none;\n font-family: inherit;\n transition: all var(--mj-transition);\n}\n\n.mj-section-search[_ngcontent-%COMP%]:focus {\n border-color: var(--mj-accent);\n box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);\n}\n\n.mj-section-search[_ngcontent-%COMP%]::placeholder {\n color: var(--mj-text-muted);\n font-style: italic;\n}\n\n.mj-clear-search[_ngcontent-%COMP%] {\n position: absolute;\n right: 4px;\n padding: 4px;\n background: none;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n font-size: 12px;\n line-height: 1;\n}\n\n.mj-clear-search[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-secondary);\n}\n\n.mj-section-count-pill[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #4b5563;\n font-weight: 600;\n padding: 4px 10px;\n background: #e5e7eb;\n border: 1px solid var(--mj-border);\n border-radius: 10px;\n white-space: nowrap;\n}\n\n\n\n\n\n.mj-dialog-overlay[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.4);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n animation: _ngcontent-%COMP%_mj-fade-in 150ms ease;\n}\n\n.mj-dialog[_ngcontent-%COMP%] {\n background: var(--mj-card-bg);\n border-radius: 12px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);\n min-width: 400px;\n max-width: 550px;\n animation: _ngcontent-%COMP%_mj-slide-up 200ms ease;\n}\n\n.mj-dialog-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n border-bottom: 1px solid var(--mj-border);\n}\n\n.mj-dialog-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n}\n\n.mj-dialog-close[_ngcontent-%COMP%] {\n background: none;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n padding: 4px;\n font-size: 16px;\n transition: color var(--mj-transition);\n}\n\n.mj-dialog-close[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-primary);\n}\n\n.mj-dialog-body[_ngcontent-%COMP%] {\n padding: 20px;\n font-size: 14px;\n color: var(--mj-text-secondary);\n line-height: 1.6;\n}\n\n.mj-dialog-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n}\n\n.mj-dialog-footer[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n padding: 16px 20px;\n border-top: 1px solid var(--mj-border);\n}\n\n@keyframes _ngcontent-%COMP%_mj-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes _ngcontent-%COMP%_mj-slide-up {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}"], changeDetection: 0 });
|
|
737
|
+
}
|
|
738
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MjFormToolbarComponent, [{
|
|
739
|
+
type: Component,
|
|
740
|
+
args: [{ standalone: false, selector: 'mj-form-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- ============================================\n EDIT MODE BANNER (shows above toolbar when editing)\n ============================================ -->\n@if (EditMode && Config.ShowEditBanner) {\n <div class=\"mj-forms-edit-banner\">\n @if (DirtyFieldDisplayNames.length > 0) {\n <i class=\"fa-solid fa-circle-exclamation mj-forms-edit-banner-icon--dirty\"></i>\n <span class=\"mj-forms-edit-banner-dirty\">\n <strong>{{ DirtyFieldDisplayNames.length }}</strong>\n field{{ DirtyFieldDisplayNames.length === 1 ? '' : 's' }} modified\n — {{ DirtyFieldDisplayNames.join(', ') }}\n </span>\n } @else {\n <i class=\"fa-solid fa-pen-to-square\"></i>\n <span class=\"mj-forms-edit-banner-text\">Editing: {{ RecordDisplayName }}</span>\n }\n <div class=\"mj-forms-toolbar-spacer\"></div>\n <div class=\"mj-forms-edit-banner-actions\">\n <button class=\"mj-forms-btn mj-forms-btn--primary\" (click)=\"OnSave()\" [disabled]=\"IsSaving\" title=\"Save Changes\">\n <i class=\"fa-solid fa-floppy-disk\"></i>\n <span class=\"mj-forms-btn-text\">Save Changes</span>\n </button>\n <button class=\"mj-forms-btn\" (click)=\"OnCancel()\" [disabled]=\"IsSaving\" title=\"Discard Changes\">\n <i class=\"fa-solid fa-rotate-left\"></i>\n <span class=\"mj-forms-btn-text\">Discard</span>\n </button>\n </div>\n </div>\n}\n\n<!-- ============================================\n MAIN TOOLBAR (read mode only \u2014 hidden in edit mode)\n ============================================ -->\n@if (!EditMode) {\n <div class=\"mj-forms-toolbar\" [class.mj-forms-toolbar--sticky]=\"Config.StickyToolbar\">\n\n <!-- Action buttons -->\n <div class=\"mj-forms-toolbar-group\">\n @if (Config.ShowEditButton && UserCanEdit) {\n <button class=\"mj-forms-btn\" (click)=\"OnEdit()\" title=\"Edit this Record\">\n <i class=\"fa-solid fa-pen-to-square\"></i>\n </button>\n }\n @if (Config.ShowDeleteButton && UserCanDelete) {\n <button class=\"mj-forms-btn\" (click)=\"OnDeleteClick()\" title=\"Delete this Record\">\n <i class=\"fa-regular fa-trash-can\"></i>\n </button>\n }\n @if (Config.ShowFavoriteButton && FavoriteInitDone) {\n <button class=\"mj-forms-btn\" (click)=\"OnFavoriteToggle()\" [title]=\"IsFavorite ? 'Remove Favorite' : 'Make Favorite'\">\n <i [class]=\"IsFavorite ? 'fa-solid fa-star mj-icon--favorite' : 'fa-regular fa-star'\"></i>\n </button>\n }\n @if (Config.ShowHistoryButton && TracksChanges) {\n <button class=\"mj-forms-btn\" (click)=\"OnHistory()\" title=\"Record Changes\">\n <i class=\"fa-regular fa-clock\"></i>\n </button>\n }\n @if (Config.ShowListButton) {\n <button class=\"mj-forms-btn mj-forms-btn--list\" (click)=\"OnListManagement()\"\n [title]=\"ListCount > 0 ? 'Member of ' + ListCount + ' list(s)' : 'Add to a list'\">\n <i class=\"fa-regular fa-bookmark\"></i>\n @if (ListCount > 0) {\n <span class=\"mj-list-count-badge\">{{ ListCount }}</span>\n }\n </button>\n }\n\n <!-- Custom toolbar buttons -->\n @for (button of Config.CustomButtons; track button.Key) {\n @if (button.Visible !== false) {\n <button class=\"mj-forms-btn\"\n [class]=\"button.CssClass || ''\"\n [disabled]=\"button.Disabled || false\"\n [title]=\"button.Description\"\n (click)=\"OnCustomButtonClick(button)\">\n <i [class]=\"button.Icon\"></i>\n </button>\n }\n }\n </div>\n\n <!-- Separator before hierarchy -->\n @if (Config.ShowEntityHierarchy && HasParentEntities) {\n <div class=\"mj-forms-toolbar-separator\"></div>\n }\n\n <!-- IS-A Entity Hierarchy Breadcrumb -->\n @if (Config.ShowEntityHierarchy && HasParentEntities) {\n <div class=\"mj-entity-hierarchy\">\n @for (parent of ParentChain; track parent.ID) {\n <a class=\"mj-entity-badge mj-entity-badge--parent\"\n [title]=\"'View parent: ' + parent.Name\"\n (click)=\"OnParentBadgeClick(parent, $event)\">\n <i class=\"fa-solid fa-arrow-up\"></i>\n {{ parent.Name }}\n </a>\n <span class=\"mj-hierarchy-arrow\"><i class=\"fa-solid fa-chevron-right\"></i></span>\n }\n <span class=\"mj-entity-badge mj-entity-badge--current\">{{ EntityInfo?.Name }}</span>\n </div>\n }\n\n <!-- Spacer pushes section controls to the right -->\n <div class=\"mj-forms-toolbar-spacer\"></div>\n\n <!-- Section Controls -->\n @if (Config.ShowSectionControls) {\n <div class=\"mj-forms-toolbar-group mj-section-controls\">\n <div class=\"mj-forms-search-wrapper\">\n <input type=\"text\"\n class=\"mj-section-search\"\n [value]=\"SearchFilter\"\n (input)=\"OnFilterInput($event)\"\n placeholder=\"Search sections...\">\n @if (SearchFilter) {\n <button class=\"mj-clear-search\" (click)=\"OnClearFilter()\" title=\"Clear search\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n </div>\n <button class=\"mj-forms-btn mj-forms-btn--ghost mj-forms-btn--icon-only\"\n [disabled]=\"ExpandedSectionCount >= VisibleSectionCount\"\n (click)=\"OnExpandAll()\" title=\"Expand all sections\">\n <i class=\"fa-solid fa-angles-down\"></i>\n </button>\n <button class=\"mj-forms-btn mj-forms-btn--ghost mj-forms-btn--icon-only\"\n [disabled]=\"ExpandedSectionCount === 0\"\n (click)=\"OnCollapseAll()\" title=\"Collapse all sections\">\n <i class=\"fa-solid fa-angles-up\"></i>\n </button>\n @if (HasCustomSectionOrder) {\n <button class=\"mj-forms-btn mj-forms-btn--ghost mj-forms-btn--icon-only\" (click)=\"OnResetSectionOrder()\" title=\"Reset section order\">\n <i class=\"fa-solid fa-arrow-rotate-left\"></i>\n </button>\n }\n <button class=\"mj-forms-btn mj-forms-btn--ghost mj-forms-btn--icon-only\"\n (click)=\"OnToggleWidthMode()\"\n [title]=\"WidthMode === 'centered' ? 'Expand to full width' : 'Center content'\">\n <i [class]=\"WidthMode === 'centered' ? 'fa-solid fa-arrows-left-right-to-line' : 'fa-solid fa-compress'\"></i>\n </button>\n <span class=\"mj-section-count-pill\">{{ ExpandedSectionCount }}/{{ TotalSectionCount }}</span>\n </div>\n }\n\n <!-- Additional actions slot -->\n @if (AdditionalActionsTemplate) {\n <ng-container [ngTemplateOutlet]=\"AdditionalActionsTemplate\"></ng-container>\n }\n <ng-content select=\"[toolbar-additional-controls]\"></ng-content>\n </div>\n}\n\n<!-- ============================================\n DISCARD CHANGES CONFIRMATION DIALOG\n ============================================ -->\n@if (ShowDiscardDialog) {\n <div class=\"mj-dialog-overlay\" (click)=\"OnDiscardCancel()\">\n <div class=\"mj-dialog\" (click)=\"$event.stopPropagation()\">\n <div class=\"mj-dialog-header\">\n <h3>Discard Changes?</h3>\n <button class=\"mj-dialog-close\" (click)=\"OnDiscardCancel()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"mj-dialog-body\">\n <p>You have <strong>{{ DirtyFieldDisplayNames.length }}</strong> unsaved change{{ DirtyFieldDisplayNames.length === 1 ? '' : 's' }}. Are you sure you want to discard {{ DirtyFieldDisplayNames.length === 1 ? 'it' : 'them' }}?</p>\n </div>\n <div class=\"mj-dialog-footer\">\n <button class=\"mj-forms-btn mj-forms-btn--danger\" (click)=\"OnDiscardConfirm()\">\n <i class=\"fa-solid fa-rotate-left\"></i>\n Discard Changes\n </button>\n <button class=\"mj-forms-btn\" (click)=\"OnDiscardCancel()\">\n Keep Editing\n </button>\n </div>\n </div>\n </div>\n}\n\n<!-- ============================================\n DELETE CONFIRMATION DIALOG\n ============================================ -->\n@if (ShowDeleteDialog) {\n <div class=\"mj-dialog-overlay\" (click)=\"OnDeleteCancel()\">\n <div class=\"mj-dialog\" (click)=\"$event.stopPropagation()\">\n <div class=\"mj-dialog-header\">\n <h3>Confirm Deletion</h3>\n <button class=\"mj-dialog-close\" (click)=\"OnDeleteCancel()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"mj-dialog-body\">\n <p>Are you sure you want to delete this record? This action cannot be undone.</p>\n </div>\n <div class=\"mj-dialog-footer\">\n <button class=\"mj-forms-btn mj-forms-btn--danger\" (click)=\"OnDeleteConfirm()\">\n <i class=\"fa-solid fa-trash-can\"></i>\n Delete\n </button>\n <button class=\"mj-forms-btn\" (click)=\"OnDeleteCancel()\">\n Cancel\n </button>\n </div>\n </div>\n </div>\n}\n", styles: ["/* ============================================\n CSS VARIABLES (theming hooks)\n ============================================ */\n:host {\n --mj-forms-toolbar-bg: #f9fafb;\n --mj-card-bg: #ffffff;\n --mj-accent: #667eea;\n --mj-accent-light: rgba(102, 126, 234, 0.08);\n --mj-text-primary: #1f2937;\n --mj-text-secondary: #6b7280;\n --mj-text-muted: #9ca3af;\n --mj-border: #e5e7eb;\n --mj-error: #ef4444;\n --mj-warning: #f59e0b;\n --mj-isa-parent: #8b5cf6;\n --mj-isa-child: #06b6d4;\n --mj-transition: 200ms;\n\n display: block;\n}\n\n/* ============================================\n EDIT BANNER\n ============================================ */\n.mj-forms-edit-banner {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 16px 16px;\n background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);\n border-bottom: 2px solid var(--mj-accent);\n font-size: 13px;\n color: var(--mj-accent);\n font-weight: 500;\n}\n\n.mj-forms-edit-banner > i {\n font-size: 14px;\n}\n\n.mj-forms-edit-banner-icon--dirty {\n color: var(--mj-warning);\n font-size: 16px;\n}\n\n.mj-forms-edit-banner-text {\n font-size: 14px;\n}\n\n.mj-forms-edit-banner-dirty {\n font-size: 14px;\n color: #374151;\n}\n\n.mj-forms-edit-banner-dirty strong {\n color: var(--mj-warning);\n font-weight: 700;\n}\n\n.mj-forms-edit-banner-actions {\n display: flex;\n gap: 8px;\n}\n\n/* ============================================\n MAIN TOOLBAR\n ============================================ */\n.mj-forms-toolbar {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 22px 16px;\n background: var(--mj-forms-toolbar-bg);\n border-bottom: 2px solid var(--mj-border);\n flex-wrap: wrap;\n z-index: 40;\n}\n\n.mj-forms-toolbar--sticky {\n position: sticky;\n top: 0;\n}\n\n.mj-forms-toolbar--disabled {\n pointer-events: none;\n opacity: 0.7;\n}\n\n.mj-forms-toolbar-group {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-forms-toolbar-separator {\n width: 1px;\n height: 24px;\n background: var(--mj-border);\n margin: 0 4px;\n}\n\n.mj-forms-toolbar-spacer {\n flex: 1;\n}\n\n/* ============================================\n BUTTONS\n ============================================ */\n.mj-forms-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n font-size: 13px;\n font-weight: 500;\n border: 1px solid var(--mj-border);\n background: var(--mj-card-bg);\n color: var(--mj-text-primary);\n border-radius: 6px;\n cursor: pointer;\n transition: all var(--mj-transition) ease;\n white-space: nowrap;\n font-family: inherit;\n line-height: 1;\n}\n\n.mj-forms-btn:hover {\n background: #f3f4f6;\n border-color: #9ca3af;\n box-shadow: 0 1px 3px rgba(0,0,0,0.08);\n}\n\n.mj-forms-btn:active {\n transform: translateY(0);\n box-shadow: none;\n}\n\n.mj-forms-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.mj-forms-btn i {\n font-size: 15px;\n line-height: 1;\n}\n\n.mj-forms-btn--primary {\n background: var(--mj-accent);\n color: white;\n border-color: var(--mj-accent);\n}\n\n.mj-forms-btn--primary:hover {\n background: #5a6fd6;\n border-color: #5a6fd6;\n box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);\n}\n\n.mj-forms-btn--danger {\n color: var(--mj-error);\n border-color: #fecaca;\n background: #fef2f2;\n}\n\n.mj-forms-btn--danger:hover {\n background: #fee2e2;\n border-color: var(--mj-error);\n}\n\n.mj-forms-btn--ghost {\n border-color: transparent;\n background: transparent;\n}\n\n.mj-forms-btn--ghost:hover {\n background: var(--mj-accent-light);\n border-color: transparent;\n}\n\n.mj-forms-btn--icon-only {\n padding: 7px 9px;\n}\n\n.mj-forms-btn--sm {\n padding: 5px 12px;\n font-size: 12px;\n}\n\n.mj-forms-btn--sm i {\n font-size: 12px;\n}\n\n.mj-forms-btn-text {\n margin-left: 2px;\n}\n\n.mj-icon--favorite {\n color: #f59e0b;\n}\n\n/* List button with count badge */\n.mj-forms-btn--list {\n position: relative;\n}\n\n.mj-list-count-badge {\n position: absolute;\n top: -6px;\n right: -6px;\n min-width: 16px;\n height: 16px;\n padding: 0 4px;\n font-size: 10px;\n font-weight: 700;\n color: white;\n background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--mj-forms-toolbar-bg);\n}\n\n/* ============================================\n IS-A ENTITY HIERARCHY\n ============================================ */\n.mj-entity-hierarchy {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-entity-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n font-size: 12px;\n font-weight: 600;\n border-radius: 6px;\n cursor: pointer;\n transition: all var(--mj-transition) ease;\n text-decoration: none;\n border: 1px solid transparent;\n}\n\n.mj-entity-badge i {\n font-size: 11px;\n}\n\n.mj-entity-badge--parent {\n background: #f3f0ff;\n color: var(--mj-isa-parent);\n border-color: #e0d5ff;\n}\n\n.mj-entity-badge--parent:hover {\n background: #e8e0ff;\n border-color: var(--mj-isa-parent);\n box-shadow: 0 2px 6px rgba(139, 92, 246, 0.15);\n}\n\n.mj-entity-badge--current {\n font-weight: 600;\n font-size: 13px;\n color: var(--mj-text-primary);\n padding: 4px 8px;\n background: #f3f4f6;\n border-radius: 6px;\n cursor: default;\n}\n\n.mj-entity-badge--child {\n background: #ecfeff;\n color: var(--mj-isa-child);\n border-color: #cffafe;\n}\n\n.mj-entity-badge--child:hover {\n background: #cffafe;\n border-color: var(--mj-isa-child);\n box-shadow: 0 2px 6px rgba(6, 182, 212, 0.15);\n}\n\n.mj-child-count {\n background: var(--mj-isa-child);\n color: white;\n font-size: 10px;\n padding: 1px 5px;\n border-radius: 8px;\n font-weight: 700;\n}\n\n.mj-hierarchy-arrow {\n color: var(--mj-text-muted);\n font-size: 10px;\n}\n\n/* (dirty summary removed \u2014 now inline in edit banner) */\n\n/* ============================================\n SECTION CONTROLS\n ============================================ */\n.mj-section-controls {\n gap: 6px;\n}\n\n.mj-forms-search-wrapper {\n position: relative;\n display: inline-flex;\n align-items: center;\n}\n\n.mj-section-search {\n max-width: 180px;\n font-size: 13px;\n padding: 6px 28px 6px 8px;\n border: 1px solid var(--mj-border);\n border-radius: 6px;\n background: white;\n outline: none;\n font-family: inherit;\n transition: all var(--mj-transition);\n}\n\n.mj-section-search:focus {\n border-color: var(--mj-accent);\n box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);\n}\n\n.mj-section-search::placeholder {\n color: var(--mj-text-muted);\n font-style: italic;\n}\n\n.mj-clear-search {\n position: absolute;\n right: 4px;\n padding: 4px;\n background: none;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n font-size: 12px;\n line-height: 1;\n}\n\n.mj-clear-search:hover {\n color: var(--mj-text-secondary);\n}\n\n.mj-section-count-pill {\n font-size: 12px;\n color: #4b5563;\n font-weight: 600;\n padding: 4px 10px;\n background: #e5e7eb;\n border: 1px solid var(--mj-border);\n border-radius: 10px;\n white-space: nowrap;\n}\n\n/* ============================================\n DIALOG (lightweight inline)\n ============================================ */\n.mj-dialog-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.4);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n animation: mj-fade-in 150ms ease;\n}\n\n.mj-dialog {\n background: var(--mj-card-bg);\n border-radius: 12px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);\n min-width: 400px;\n max-width: 550px;\n animation: mj-slide-up 200ms ease;\n}\n\n.mj-dialog-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n border-bottom: 1px solid var(--mj-border);\n}\n\n.mj-dialog-header h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n}\n\n.mj-dialog-close {\n background: none;\n border: none;\n color: var(--mj-text-muted);\n cursor: pointer;\n padding: 4px;\n font-size: 16px;\n transition: color var(--mj-transition);\n}\n\n.mj-dialog-close:hover {\n color: var(--mj-text-primary);\n}\n\n.mj-dialog-body {\n padding: 20px;\n font-size: 14px;\n color: var(--mj-text-secondary);\n line-height: 1.6;\n}\n\n.mj-dialog-body p {\n margin: 0;\n}\n\n.mj-dialog-footer {\n display: flex;\n gap: 8px;\n padding: 16px 20px;\n border-top: 1px solid var(--mj-border);\n}\n\n@keyframes mj-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n@keyframes mj-slide-up {\n from { transform: translateY(8px); opacity: 0; }\n to { transform: translateY(0); opacity: 1; }\n}\n"] }]
|
|
741
|
+
}], null, { Form: [{
|
|
742
|
+
type: Input
|
|
743
|
+
}], _deprecatedForm: [{
|
|
744
|
+
type: Input,
|
|
745
|
+
args: ['form']
|
|
746
|
+
}], Record: [{
|
|
747
|
+
type: Input
|
|
748
|
+
}], EditMode: [{
|
|
749
|
+
type: Input
|
|
750
|
+
}], UserCanEdit: [{
|
|
751
|
+
type: Input
|
|
752
|
+
}], UserCanDelete: [{
|
|
753
|
+
type: Input
|
|
754
|
+
}], IsFavorite: [{
|
|
755
|
+
type: Input
|
|
756
|
+
}], FavoriteInitDone: [{
|
|
757
|
+
type: Input
|
|
758
|
+
}], IsDirty: [{
|
|
759
|
+
type: Input
|
|
760
|
+
}], DirtyFieldNames: [{
|
|
761
|
+
type: Input
|
|
762
|
+
}], ListCount: [{
|
|
763
|
+
type: Input
|
|
764
|
+
}], EntityInfo: [{
|
|
765
|
+
type: Input
|
|
766
|
+
}], Config: [{
|
|
767
|
+
type: Input
|
|
768
|
+
}], IsSaving: [{
|
|
769
|
+
type: Input
|
|
770
|
+
}], VisibleSectionCount: [{
|
|
771
|
+
type: Input
|
|
772
|
+
}], TotalSectionCount: [{
|
|
773
|
+
type: Input
|
|
774
|
+
}], ExpandedSectionCount: [{
|
|
775
|
+
type: Input
|
|
776
|
+
}], SearchFilter: [{
|
|
777
|
+
type: Input
|
|
778
|
+
}], ShowEmptyFields: [{
|
|
779
|
+
type: Input
|
|
780
|
+
}], WidthMode: [{
|
|
781
|
+
type: Input
|
|
782
|
+
}], HasCustomSectionOrder: [{
|
|
783
|
+
type: Input
|
|
784
|
+
}], AdditionalActionsTemplate: [{
|
|
785
|
+
type: Input
|
|
786
|
+
}], Navigate: [{
|
|
787
|
+
type: Output
|
|
788
|
+
}], EditModeChange: [{
|
|
789
|
+
type: Output
|
|
790
|
+
}], BeforeSave: [{
|
|
791
|
+
type: Output
|
|
792
|
+
}], SaveRequested: [{
|
|
793
|
+
type: Output
|
|
794
|
+
}], BeforeCancel: [{
|
|
795
|
+
type: Output
|
|
796
|
+
}], CancelRequested: [{
|
|
797
|
+
type: Output
|
|
798
|
+
}], BeforeDelete: [{
|
|
799
|
+
type: Output
|
|
800
|
+
}], DeleteRequested: [{
|
|
801
|
+
type: Output
|
|
802
|
+
}], FavoriteToggled: [{
|
|
803
|
+
type: Output
|
|
804
|
+
}], BeforeHistoryView: [{
|
|
805
|
+
type: Output
|
|
806
|
+
}], HistoryRequested: [{
|
|
807
|
+
type: Output
|
|
808
|
+
}], BeforeListManagement: [{
|
|
809
|
+
type: Output
|
|
810
|
+
}], ListManagementRequested: [{
|
|
811
|
+
type: Output
|
|
812
|
+
}], ShowChangesRequested: [{
|
|
813
|
+
type: Output
|
|
814
|
+
}], CustomButtonClick: [{
|
|
815
|
+
type: Output
|
|
816
|
+
}], FilterChange: [{
|
|
817
|
+
type: Output
|
|
818
|
+
}], ExpandAllRequested: [{
|
|
819
|
+
type: Output
|
|
820
|
+
}], CollapseAllRequested: [{
|
|
821
|
+
type: Output
|
|
822
|
+
}], ShowEmptyFieldsChange: [{
|
|
823
|
+
type: Output
|
|
824
|
+
}], WidthModeChange: [{
|
|
825
|
+
type: Output
|
|
826
|
+
}], ResetSectionOrderRequested: [{
|
|
827
|
+
type: Output
|
|
828
|
+
}] }); })();
|
|
829
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MjFormToolbarComponent, { className: "MjFormToolbarComponent", filePath: "src/lib/toolbar/form-toolbar.component.ts", lineNumber: 45 }); })();
|
|
830
|
+
//# sourceMappingURL=form-toolbar.component.js.map
|