@memberjunction/ng-explorer-settings 2.70.0 → 2.72.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/application-management/application-dialog/application-dialog.component.d.ts +60 -0
- package/dist/lib/application-management/application-dialog/application-dialog.component.d.ts.map +1 -0
- package/dist/lib/application-management/application-dialog/application-dialog.component.js +584 -0
- package/dist/lib/application-management/application-dialog/application-dialog.component.js.map +1 -0
- package/dist/lib/application-management/application-management.component.d.ts +4 -2
- package/dist/lib/application-management/application-management.component.d.ts.map +1 -1
- package/dist/lib/application-management/application-management.component.js +79 -35
- package/dist/lib/application-management/application-management.component.js.map +1 -1
- package/dist/lib/entity-permissions/entity-permissions.component.d.ts +3 -1
- package/dist/lib/entity-permissions/entity-permissions.component.d.ts.map +1 -1
- package/dist/lib/entity-permissions/entity-permissions.component.js +43 -66
- package/dist/lib/entity-permissions/entity-permissions.component.js.map +1 -1
- package/dist/lib/entity-permissions/permission-dialog/permission-dialog.component.d.ts +50 -0
- package/dist/lib/entity-permissions/permission-dialog/permission-dialog.component.d.ts.map +1 -0
- package/dist/lib/entity-permissions/permission-dialog/permission-dialog.component.js +464 -0
- package/dist/lib/entity-permissions/permission-dialog/permission-dialog.component.js.map +1 -0
- package/dist/lib/role-management/role-dialog/role-dialog.component.d.ts +38 -0
- package/dist/lib/role-management/role-dialog/role-dialog.component.d.ts.map +1 -0
- package/dist/lib/role-management/role-dialog/role-dialog.component.js +329 -0
- package/dist/lib/role-management/role-dialog/role-dialog.component.js.map +1 -0
- package/dist/lib/role-management/role-management.component.d.ts +4 -0
- package/dist/lib/role-management/role-management.component.d.ts.map +1 -1
- package/dist/lib/role-management/role-management.component.js +114 -72
- package/dist/lib/role-management/role-management.component.js.map +1 -1
- package/dist/lib/settings/settings.component.js +8 -8
- package/dist/lib/settings/settings.component.js.map +1 -1
- package/dist/lib/shared/components/settings-card/settings-card.component.d.ts.map +1 -1
- package/dist/lib/shared/components/settings-card/settings-card.component.js +11 -8
- package/dist/lib/shared/components/settings-card/settings-card.component.js.map +1 -1
- package/dist/lib/user-management/user-dialog/user-dialog.component.d.ts +44 -0
- package/dist/lib/user-management/user-dialog/user-dialog.component.d.ts.map +1 -0
- package/dist/lib/user-management/user-dialog/user-dialog.component.js +470 -0
- package/dist/lib/user-management/user-dialog/user-dialog.component.js.map +1 -0
- package/dist/lib/user-management/user-management.component.d.ts +9 -0
- package/dist/lib/user-management/user-management.component.d.ts.map +1 -1
- package/dist/lib/user-management/user-management.component.js +213 -98
- package/dist/lib/user-management/user-management.component.js.map +1 -1
- package/package.json +13 -13
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, inject, HostListener, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule, ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';
|
|
4
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
5
|
+
import { WindowModule } from '@progress/kendo-angular-dialog';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/common";
|
|
8
|
+
import * as i2 from "@angular/forms";
|
|
9
|
+
import * as i3 from "@progress/kendo-angular-dialog";
|
|
10
|
+
const _forTrack0 = ($index, $item) => $item.entity.ID;
|
|
11
|
+
const _forTrack1 = ($index, $item) => $item.ID;
|
|
12
|
+
const _c0 = () => ({ standalone: true });
|
|
13
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵelementStart(0, "div", 8)(1, "div", 31);
|
|
15
|
+
i0.ɵɵelement(2, "i", 32);
|
|
16
|
+
i0.ɵɵelementStart(3, "div");
|
|
17
|
+
i0.ɵɵtext(4);
|
|
18
|
+
i0.ɵɵelementEnd()()();
|
|
19
|
+
} if (rf & 2) {
|
|
20
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
21
|
+
i0.ɵɵadvance(4);
|
|
22
|
+
i0.ɵɵtextInterpolate(ctx_r1.error);
|
|
23
|
+
} }
|
|
24
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_24_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
+
i0.ɵɵtext(0, " Application name is required ");
|
|
26
|
+
} }
|
|
27
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_24_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
28
|
+
i0.ɵɵtext(0, " Application name cannot exceed 100 characters ");
|
|
29
|
+
} }
|
|
30
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_24_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
i0.ɵɵelementStart(0, "div", 18);
|
|
32
|
+
i0.ɵɵelement(1, "i", 33);
|
|
33
|
+
i0.ɵɵtemplate(2, ApplicationDialogComponent_kendo_window_0_Conditional_24_Conditional_2_Template, 1, 0)(3, ApplicationDialogComponent_kendo_window_0_Conditional_24_Conditional_3_Template, 1, 0);
|
|
34
|
+
i0.ɵɵelementEnd();
|
|
35
|
+
} if (rf & 2) {
|
|
36
|
+
let tmp_2_0;
|
|
37
|
+
let tmp_3_0;
|
|
38
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
39
|
+
i0.ɵɵadvance(2);
|
|
40
|
+
i0.ɵɵconditional(((tmp_2_0 = ctx_r1.applicationForm.get("name")) == null ? null : tmp_2_0.errors == null ? null : tmp_2_0.errors["required"]) ? 2 : -1);
|
|
41
|
+
i0.ɵɵadvance();
|
|
42
|
+
i0.ɵɵconditional(((tmp_3_0 = ctx_r1.applicationForm.get("name")) == null ? null : tmp_3_0.errors == null ? null : tmp_3_0.errors["maxlength"]) ? 3 : -1);
|
|
43
|
+
} }
|
|
44
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
45
|
+
i0.ɵɵelement(0, "i", 43);
|
|
46
|
+
} if (rf & 2) {
|
|
47
|
+
const config_r4 = i0.ɵɵnextContext().$implicit;
|
|
48
|
+
i0.ɵɵproperty("title", config_r4.entity.Description);
|
|
49
|
+
i0.ɵɵattribute("data-tooltip", config_r4.entity.Description);
|
|
50
|
+
} }
|
|
51
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
53
|
+
i0.ɵɵelementStart(0, "div", 37)(1, "div", 38)(2, "div", 39);
|
|
54
|
+
i0.ɵɵelement(3, "i", 40);
|
|
55
|
+
i0.ɵɵelementEnd();
|
|
56
|
+
i0.ɵɵelementStart(4, "div", 41)(5, "div", 42);
|
|
57
|
+
i0.ɵɵtext(6);
|
|
58
|
+
i0.ɵɵtemplate(7, ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Conditional_7_Template, 1, 2, "i", 43);
|
|
59
|
+
i0.ɵɵelementEnd()()();
|
|
60
|
+
i0.ɵɵelementStart(8, "div", 44)(9, "div", 45)(10, "label", 46)(11, "input", 47);
|
|
61
|
+
i0.ɵɵtwoWayListener("ngModelChange", function ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Template_input_ngModelChange_11_listener($event) { const config_r4 = i0.ɵɵrestoreView(_r3).$implicit; i0.ɵɵtwoWayBindingSet(config_r4.defaultForNewUser, $event) || (config_r4.defaultForNewUser = $event); return i0.ɵɵresetView($event); });
|
|
62
|
+
i0.ɵɵlistener("change", function ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Template_input_change_11_listener() { const config_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onDefaultForNewUserChange(config_r4)); });
|
|
63
|
+
i0.ɵɵelementEnd();
|
|
64
|
+
i0.ɵɵelementStart(12, "span", 48);
|
|
65
|
+
i0.ɵɵtext(13, "Default for new users");
|
|
66
|
+
i0.ɵɵelementEnd()()();
|
|
67
|
+
i0.ɵɵelementStart(14, "div", 49);
|
|
68
|
+
i0.ɵɵtext(15);
|
|
69
|
+
i0.ɵɵelementEnd()();
|
|
70
|
+
i0.ɵɵelementStart(16, "div", 50)(17, "button", 51);
|
|
71
|
+
i0.ɵɵlistener("click", function ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Template_button_click_17_listener() { const ɵ$index_97_r5 = i0.ɵɵrestoreView(_r3).$index; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.moveEntityUp(ɵ$index_97_r5)); });
|
|
72
|
+
i0.ɵɵelement(18, "i", 52);
|
|
73
|
+
i0.ɵɵelementEnd();
|
|
74
|
+
i0.ɵɵelementStart(19, "button", 53);
|
|
75
|
+
i0.ɵɵlistener("click", function ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Template_button_click_19_listener() { const ɵ$index_97_r5 = i0.ɵɵrestoreView(_r3).$index; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.moveEntityDown(ɵ$index_97_r5)); });
|
|
76
|
+
i0.ɵɵelement(20, "i", 54);
|
|
77
|
+
i0.ɵɵelementEnd();
|
|
78
|
+
i0.ɵɵelementStart(21, "button", 55);
|
|
79
|
+
i0.ɵɵlistener("click", function ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Template_button_click_21_listener() { const config_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.removeEntity(config_r4)); });
|
|
80
|
+
i0.ɵɵelement(22, "i", 29);
|
|
81
|
+
i0.ɵɵelementEnd()()();
|
|
82
|
+
} if (rf & 2) {
|
|
83
|
+
const config_r4 = ctx.$implicit;
|
|
84
|
+
const ɵ$index_97_r5 = ctx.$index;
|
|
85
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
86
|
+
i0.ɵɵclassProp("is-new", config_r4.isNew)("has-changes", config_r4.hasChanges);
|
|
87
|
+
i0.ɵɵadvance(6);
|
|
88
|
+
i0.ɵɵtextInterpolate1(" ", config_r4.entity.Name, " ");
|
|
89
|
+
i0.ɵɵadvance();
|
|
90
|
+
i0.ɵɵconditional(config_r4.entity.Description ? 7 : -1);
|
|
91
|
+
i0.ɵɵadvance(4);
|
|
92
|
+
i0.ɵɵtwoWayProperty("ngModel", config_r4.defaultForNewUser);
|
|
93
|
+
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(11, _c0));
|
|
94
|
+
i0.ɵɵadvance(4);
|
|
95
|
+
i0.ɵɵtextInterpolate(config_r4.sequence);
|
|
96
|
+
i0.ɵɵadvance(2);
|
|
97
|
+
i0.ɵɵproperty("disabled", ɵ$index_97_r5 === 0);
|
|
98
|
+
i0.ɵɵadvance(2);
|
|
99
|
+
i0.ɵɵproperty("disabled", ɵ$index_97_r5 === ctx_r1.applicationEntities.length - 1);
|
|
100
|
+
} }
|
|
101
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_40_Template(rf, ctx) { if (rf & 1) {
|
|
102
|
+
i0.ɵɵelementStart(0, "div", 23)(1, "h4", 34);
|
|
103
|
+
i0.ɵɵtext(2);
|
|
104
|
+
i0.ɵɵelementEnd();
|
|
105
|
+
i0.ɵɵelementStart(3, "div", 35);
|
|
106
|
+
i0.ɵɵrepeaterCreate(4, ApplicationDialogComponent_kendo_window_0_Conditional_40_For_5_Template, 23, 12, "div", 36, _forTrack0);
|
|
107
|
+
i0.ɵɵelementEnd()();
|
|
108
|
+
} if (rf & 2) {
|
|
109
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
110
|
+
i0.ɵɵadvance(2);
|
|
111
|
+
i0.ɵɵtextInterpolate1("Assigned Entities (", ctx_r1.applicationEntities.length, ")");
|
|
112
|
+
i0.ɵɵadvance(2);
|
|
113
|
+
i0.ɵɵrepeater(ctx_r1.applicationEntities);
|
|
114
|
+
} }
|
|
115
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_41_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
117
|
+
i0.ɵɵelement(1, "i", 22);
|
|
118
|
+
i0.ɵɵelementStart(2, "p");
|
|
119
|
+
i0.ɵɵtext(3, "No entities assigned to this application");
|
|
120
|
+
i0.ɵɵelementEnd();
|
|
121
|
+
i0.ɵɵelementStart(4, "p", 56);
|
|
122
|
+
i0.ɵɵtext(5, "Add entities from the available list below");
|
|
123
|
+
i0.ɵɵelementEnd()();
|
|
124
|
+
} }
|
|
125
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_42_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
126
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
127
|
+
i0.ɵɵelementStart(0, "div", 59);
|
|
128
|
+
i0.ɵɵlistener("click", function ApplicationDialogComponent_kendo_window_0_Conditional_42_For_5_Template_div_click_0_listener() { const entity_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.addEntity(entity_r7)); });
|
|
129
|
+
i0.ɵɵelementStart(1, "div", 60);
|
|
130
|
+
i0.ɵɵelement(2, "i", 61);
|
|
131
|
+
i0.ɵɵelementStart(3, "span", 62);
|
|
132
|
+
i0.ɵɵtext(4);
|
|
133
|
+
i0.ɵɵelementEnd()()();
|
|
134
|
+
} if (rf & 2) {
|
|
135
|
+
const entity_r7 = ctx.$implicit;
|
|
136
|
+
i0.ɵɵadvance(4);
|
|
137
|
+
i0.ɵɵtextInterpolate(entity_r7.Name);
|
|
138
|
+
} }
|
|
139
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_42_Template(rf, ctx) { if (rf & 1) {
|
|
140
|
+
i0.ɵɵelementStart(0, "div", 25)(1, "h4", 34);
|
|
141
|
+
i0.ɵɵtext(2);
|
|
142
|
+
i0.ɵɵelementEnd();
|
|
143
|
+
i0.ɵɵelementStart(3, "div", 57);
|
|
144
|
+
i0.ɵɵrepeaterCreate(4, ApplicationDialogComponent_kendo_window_0_Conditional_42_For_5_Template, 5, 1, "div", 58, _forTrack1);
|
|
145
|
+
i0.ɵɵelementEnd()();
|
|
146
|
+
} if (rf & 2) {
|
|
147
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
148
|
+
i0.ɵɵadvance(2);
|
|
149
|
+
i0.ɵɵtextInterpolate1("Available Entities (", ctx_r1.availableEntities.length, ")");
|
|
150
|
+
i0.ɵɵadvance(2);
|
|
151
|
+
i0.ɵɵrepeater(ctx_r1.availableEntities);
|
|
152
|
+
} }
|
|
153
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_43_Template(rf, ctx) { if (rf & 1) {
|
|
154
|
+
i0.ɵɵelementStart(0, "div", 26);
|
|
155
|
+
i0.ɵɵelement(1, "i", 63);
|
|
156
|
+
i0.ɵɵelementStart(2, "p");
|
|
157
|
+
i0.ɵɵtext(3, "All entities have been assigned to this application");
|
|
158
|
+
i0.ɵɵelementEnd()();
|
|
159
|
+
} }
|
|
160
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_44_Template(rf, ctx) { if (rf & 1) {
|
|
161
|
+
i0.ɵɵelementStart(0, "div", 8)(1, "div", 9)(2, "div", 10)(3, "h3", 11);
|
|
162
|
+
i0.ɵɵelement(4, "i", 12);
|
|
163
|
+
i0.ɵɵtext(5, " System Information ");
|
|
164
|
+
i0.ɵɵelementEnd();
|
|
165
|
+
i0.ɵɵelementStart(6, "p", 13);
|
|
166
|
+
i0.ɵɵtext(7, "Application metadata and audit information");
|
|
167
|
+
i0.ɵɵelementEnd()();
|
|
168
|
+
i0.ɵɵelementStart(8, "div", 14)(9, "div", 64)(10, "div", 65)(11, "span", 66);
|
|
169
|
+
i0.ɵɵtext(12, "Created:");
|
|
170
|
+
i0.ɵɵelementEnd();
|
|
171
|
+
i0.ɵɵelementStart(13, "span", 67);
|
|
172
|
+
i0.ɵɵtext(14);
|
|
173
|
+
i0.ɵɵpipe(15, "date");
|
|
174
|
+
i0.ɵɵelementEnd()();
|
|
175
|
+
i0.ɵɵelementStart(16, "div", 65)(17, "span", 66);
|
|
176
|
+
i0.ɵɵtext(18, "Last Updated:");
|
|
177
|
+
i0.ɵɵelementEnd();
|
|
178
|
+
i0.ɵɵelementStart(19, "span", 67);
|
|
179
|
+
i0.ɵɵtext(20);
|
|
180
|
+
i0.ɵɵpipe(21, "date");
|
|
181
|
+
i0.ɵɵelementEnd()();
|
|
182
|
+
i0.ɵɵelementStart(22, "div", 65)(23, "span", 66);
|
|
183
|
+
i0.ɵɵtext(24, "Application ID:");
|
|
184
|
+
i0.ɵɵelementEnd();
|
|
185
|
+
i0.ɵɵelementStart(25, "span", 67);
|
|
186
|
+
i0.ɵɵtext(26);
|
|
187
|
+
i0.ɵɵelementEnd()();
|
|
188
|
+
i0.ɵɵelementStart(27, "div", 65)(28, "span", 66);
|
|
189
|
+
i0.ɵɵtext(29, "Total Entities:");
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
i0.ɵɵelementStart(30, "span", 67);
|
|
192
|
+
i0.ɵɵtext(31);
|
|
193
|
+
i0.ɵɵelementEnd()()()()()();
|
|
194
|
+
} if (rf & 2) {
|
|
195
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
196
|
+
i0.ɵɵadvance(14);
|
|
197
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(15, 4, ctx_r1.data == null ? null : ctx_r1.data.application == null ? null : ctx_r1.data.application.__mj_CreatedAt, "medium"));
|
|
198
|
+
i0.ɵɵadvance(6);
|
|
199
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(21, 7, ctx_r1.data == null ? null : ctx_r1.data.application == null ? null : ctx_r1.data.application.__mj_UpdatedAt, "medium"));
|
|
200
|
+
i0.ɵɵadvance(6);
|
|
201
|
+
i0.ɵɵtextInterpolate(ctx_r1.data == null ? null : ctx_r1.data.application == null ? null : ctx_r1.data.application.ID);
|
|
202
|
+
i0.ɵɵadvance(5);
|
|
203
|
+
i0.ɵɵtextInterpolate(ctx_r1.applicationEntities.length);
|
|
204
|
+
} }
|
|
205
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_50_Template(rf, ctx) { if (rf & 1) {
|
|
206
|
+
i0.ɵɵelement(0, "i", 68);
|
|
207
|
+
i0.ɵɵtext(1, " Saving... ");
|
|
208
|
+
} }
|
|
209
|
+
function ApplicationDialogComponent_kendo_window_0_Conditional_51_Template(rf, ctx) { if (rf & 1) {
|
|
210
|
+
i0.ɵɵelement(0, "i", 69);
|
|
211
|
+
i0.ɵɵtext(1);
|
|
212
|
+
} if (rf & 2) {
|
|
213
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
214
|
+
i0.ɵɵadvance();
|
|
215
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.isEditMode ? "Update Application" : "Create Application", " ");
|
|
216
|
+
} }
|
|
217
|
+
function ApplicationDialogComponent_kendo_window_0_Template(rf, ctx) { if (rf & 1) {
|
|
218
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
219
|
+
i0.ɵɵelementStart(0, "kendo-window", 1);
|
|
220
|
+
i0.ɵɵlistener("close", function ApplicationDialogComponent_kendo_window_0_Template_kendo_window_close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
221
|
+
i0.ɵɵelementStart(1, "kendo-window-titlebar")(2, "div", 2)(3, "h2", 3);
|
|
222
|
+
i0.ɵɵelement(4, "i", 4);
|
|
223
|
+
i0.ɵɵtext(5);
|
|
224
|
+
i0.ɵɵelementEnd();
|
|
225
|
+
i0.ɵɵelementStart(6, "p", 5);
|
|
226
|
+
i0.ɵɵtext(7);
|
|
227
|
+
i0.ɵɵelementEnd()()();
|
|
228
|
+
i0.ɵɵelementStart(8, "div", 6)(9, "form", 7);
|
|
229
|
+
i0.ɵɵlistener("ngSubmit", function ApplicationDialogComponent_kendo_window_0_Template_form_ngSubmit_9_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSubmit()); });
|
|
230
|
+
i0.ɵɵtemplate(10, ApplicationDialogComponent_kendo_window_0_Conditional_10_Template, 5, 1, "div", 8);
|
|
231
|
+
i0.ɵɵelementStart(11, "div", 8)(12, "div", 9)(13, "div", 10)(14, "h3", 11);
|
|
232
|
+
i0.ɵɵelement(15, "i", 12);
|
|
233
|
+
i0.ɵɵtext(16, " Application Information ");
|
|
234
|
+
i0.ɵɵelementEnd();
|
|
235
|
+
i0.ɵɵelementStart(17, "p", 13);
|
|
236
|
+
i0.ɵɵtext(18, "Define the application's basic properties");
|
|
237
|
+
i0.ɵɵelementEnd()();
|
|
238
|
+
i0.ɵɵelementStart(19, "div", 14)(20, "div", 15)(21, "label", 16);
|
|
239
|
+
i0.ɵɵtext(22, "Application Name");
|
|
240
|
+
i0.ɵɵelementEnd();
|
|
241
|
+
i0.ɵɵelement(23, "input", 17);
|
|
242
|
+
i0.ɵɵtemplate(24, ApplicationDialogComponent_kendo_window_0_Conditional_24_Template, 4, 2, "div", 18);
|
|
243
|
+
i0.ɵɵelementEnd();
|
|
244
|
+
i0.ɵɵelementStart(25, "div", 15)(26, "label", 19);
|
|
245
|
+
i0.ɵɵtext(27, "Description");
|
|
246
|
+
i0.ɵɵelementEnd();
|
|
247
|
+
i0.ɵɵelement(28, "textarea", 20);
|
|
248
|
+
i0.ɵɵelementStart(29, "div", 21);
|
|
249
|
+
i0.ɵɵtext(30, " Provide a clear description of what this application does and its main features. ");
|
|
250
|
+
i0.ɵɵelementEnd()()()()();
|
|
251
|
+
i0.ɵɵelementStart(31, "div", 8)(32, "div", 9)(33, "div", 10)(34, "h3", 11);
|
|
252
|
+
i0.ɵɵelement(35, "i", 22);
|
|
253
|
+
i0.ɵɵtext(36, " Application Entities ");
|
|
254
|
+
i0.ɵɵelementEnd();
|
|
255
|
+
i0.ɵɵelementStart(37, "p", 13);
|
|
256
|
+
i0.ɵɵtext(38, "Manage which entities are included in this application");
|
|
257
|
+
i0.ɵɵelementEnd()();
|
|
258
|
+
i0.ɵɵelementStart(39, "div", 14);
|
|
259
|
+
i0.ɵɵtemplate(40, ApplicationDialogComponent_kendo_window_0_Conditional_40_Template, 6, 1, "div", 23)(41, ApplicationDialogComponent_kendo_window_0_Conditional_41_Template, 6, 0, "div", 24)(42, ApplicationDialogComponent_kendo_window_0_Conditional_42_Template, 6, 1, "div", 25)(43, ApplicationDialogComponent_kendo_window_0_Conditional_43_Template, 4, 0, "div", 26);
|
|
260
|
+
i0.ɵɵelementEnd()()();
|
|
261
|
+
i0.ɵɵtemplate(44, ApplicationDialogComponent_kendo_window_0_Conditional_44_Template, 32, 10, "div", 8);
|
|
262
|
+
i0.ɵɵelementStart(45, "div", 27)(46, "button", 28);
|
|
263
|
+
i0.ɵɵlistener("click", function ApplicationDialogComponent_kendo_window_0_Template_button_click_46_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onCancel()); });
|
|
264
|
+
i0.ɵɵelement(47, "i", 29);
|
|
265
|
+
i0.ɵɵtext(48, " Cancel ");
|
|
266
|
+
i0.ɵɵelementEnd();
|
|
267
|
+
i0.ɵɵelementStart(49, "button", 30);
|
|
268
|
+
i0.ɵɵtemplate(50, ApplicationDialogComponent_kendo_window_0_Conditional_50_Template, 2, 0)(51, ApplicationDialogComponent_kendo_window_0_Conditional_51_Template, 2, 1);
|
|
269
|
+
i0.ɵɵelementEnd()()()()();
|
|
270
|
+
} if (rf & 2) {
|
|
271
|
+
let tmp_10_0;
|
|
272
|
+
let tmp_11_0;
|
|
273
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
274
|
+
i0.ɵɵproperty("width", 900)("height", 700)("resizable", false)("draggable", true)("keepContent", true);
|
|
275
|
+
i0.ɵɵadvance(5);
|
|
276
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.isEditMode ? "Edit Application" : "Create New Application", " ");
|
|
277
|
+
i0.ɵɵadvance(2);
|
|
278
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.isEditMode ? "Update application information and settings" : "Add a new application to the system", " ");
|
|
279
|
+
i0.ɵɵadvance(2);
|
|
280
|
+
i0.ɵɵproperty("formGroup", ctx_r1.applicationForm);
|
|
281
|
+
i0.ɵɵadvance();
|
|
282
|
+
i0.ɵɵconditional(ctx_r1.error ? 10 : -1);
|
|
283
|
+
i0.ɵɵadvance(13);
|
|
284
|
+
i0.ɵɵclassProp("error", ((tmp_10_0 = ctx_r1.applicationForm.get("name")) == null ? null : tmp_10_0.invalid) && ((tmp_10_0 = ctx_r1.applicationForm.get("name")) == null ? null : tmp_10_0.touched));
|
|
285
|
+
i0.ɵɵadvance();
|
|
286
|
+
i0.ɵɵconditional(((tmp_11_0 = ctx_r1.applicationForm.get("name")) == null ? null : tmp_11_0.invalid) && ((tmp_11_0 = ctx_r1.applicationForm.get("name")) == null ? null : tmp_11_0.touched) ? 24 : -1);
|
|
287
|
+
i0.ɵɵadvance(16);
|
|
288
|
+
i0.ɵɵconditional(ctx_r1.applicationEntities.length > 0 ? 40 : 41);
|
|
289
|
+
i0.ɵɵadvance(2);
|
|
290
|
+
i0.ɵɵconditional(ctx_r1.availableEntities.length > 0 ? 42 : 43);
|
|
291
|
+
i0.ɵɵadvance(2);
|
|
292
|
+
i0.ɵɵconditional(ctx_r1.isEditMode ? 44 : -1);
|
|
293
|
+
i0.ɵɵadvance(5);
|
|
294
|
+
i0.ɵɵproperty("disabled", ctx_r1.applicationForm.invalid || ctx_r1.isLoading);
|
|
295
|
+
i0.ɵɵadvance();
|
|
296
|
+
i0.ɵɵconditional(ctx_r1.isLoading ? 50 : 51);
|
|
297
|
+
} }
|
|
298
|
+
export class ApplicationDialogComponent {
|
|
299
|
+
data = null;
|
|
300
|
+
visible = false;
|
|
301
|
+
result = new EventEmitter();
|
|
302
|
+
fb = inject(FormBuilder);
|
|
303
|
+
metadata = new Metadata();
|
|
304
|
+
applicationForm;
|
|
305
|
+
isLoading = false;
|
|
306
|
+
error = null;
|
|
307
|
+
// Entity management
|
|
308
|
+
applicationEntities = [];
|
|
309
|
+
availableEntities = [];
|
|
310
|
+
allEntities = [];
|
|
311
|
+
constructor() {
|
|
312
|
+
this.applicationForm = this.fb.group({
|
|
313
|
+
name: ['', [Validators.required, Validators.maxLength(100)]],
|
|
314
|
+
description: ['']
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
ngOnInit() {
|
|
318
|
+
// Initial setup
|
|
319
|
+
}
|
|
320
|
+
ngOnChanges(changes) {
|
|
321
|
+
if (changes['visible'] && this.visible) {
|
|
322
|
+
this.initializeDialog();
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
ngOnDestroy() {
|
|
326
|
+
// Cleanup if needed
|
|
327
|
+
}
|
|
328
|
+
async initializeDialog() {
|
|
329
|
+
if (!this.visible)
|
|
330
|
+
return;
|
|
331
|
+
try {
|
|
332
|
+
this.isLoading = true;
|
|
333
|
+
this.error = null;
|
|
334
|
+
// Load all entities first
|
|
335
|
+
await this.loadAllEntities();
|
|
336
|
+
if (this.data?.application && this.isEditMode) {
|
|
337
|
+
await this.loadApplicationData();
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
this.resetForm();
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
catch (error) {
|
|
344
|
+
console.error('Error initializing dialog:', error);
|
|
345
|
+
this.error = error.message || 'Failed to load dialog data';
|
|
346
|
+
}
|
|
347
|
+
finally {
|
|
348
|
+
this.isLoading = false;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
async loadAllEntities() {
|
|
352
|
+
const rv = new RunView();
|
|
353
|
+
const result = await rv.RunView({
|
|
354
|
+
EntityName: 'Entities',
|
|
355
|
+
ResultType: 'entity_object',
|
|
356
|
+
OrderBy: 'Name ASC'
|
|
357
|
+
});
|
|
358
|
+
this.allEntities = result.Success ? result.Results : [];
|
|
359
|
+
}
|
|
360
|
+
resetForm() {
|
|
361
|
+
this.applicationForm.reset({
|
|
362
|
+
name: '',
|
|
363
|
+
description: ''
|
|
364
|
+
});
|
|
365
|
+
this.applicationEntities = [];
|
|
366
|
+
this.availableEntities = [...this.allEntities];
|
|
367
|
+
this.error = null;
|
|
368
|
+
}
|
|
369
|
+
onEscapeKey(event) {
|
|
370
|
+
if (this.visible) {
|
|
371
|
+
this.onCancel();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
get windowTitle() {
|
|
375
|
+
return this.isEditMode ? 'Edit Application' : 'Create New Application';
|
|
376
|
+
}
|
|
377
|
+
get isEditMode() {
|
|
378
|
+
return this.data?.mode === 'edit';
|
|
379
|
+
}
|
|
380
|
+
async loadApplicationData() {
|
|
381
|
+
if (!this.data?.application)
|
|
382
|
+
return;
|
|
383
|
+
const app = this.data.application;
|
|
384
|
+
this.applicationForm.patchValue({
|
|
385
|
+
name: app.Name,
|
|
386
|
+
description: app.Description
|
|
387
|
+
});
|
|
388
|
+
// Load existing ApplicationEntity records
|
|
389
|
+
await this.loadApplicationEntities(app.ID);
|
|
390
|
+
}
|
|
391
|
+
async loadApplicationEntities(applicationId) {
|
|
392
|
+
try {
|
|
393
|
+
const rv = new RunView();
|
|
394
|
+
const result = await rv.RunView({
|
|
395
|
+
EntityName: 'Application Entities',
|
|
396
|
+
ExtraFilter: `ApplicationID='${applicationId}'`,
|
|
397
|
+
ResultType: 'entity_object',
|
|
398
|
+
OrderBy: 'Sequence ASC'
|
|
399
|
+
});
|
|
400
|
+
if (result.Success && result.Results) {
|
|
401
|
+
this.applicationEntities = [];
|
|
402
|
+
const usedEntityIds = new Set();
|
|
403
|
+
for (const appEntity of result.Results) {
|
|
404
|
+
const entity = this.allEntities.find(e => e.ID === appEntity.EntityID);
|
|
405
|
+
if (entity) {
|
|
406
|
+
this.applicationEntities.push({
|
|
407
|
+
entity,
|
|
408
|
+
applicationEntity: appEntity,
|
|
409
|
+
sequence: appEntity.Sequence || 0,
|
|
410
|
+
defaultForNewUser: appEntity.DefaultForNewUser || false,
|
|
411
|
+
isNew: false,
|
|
412
|
+
hasChanges: false
|
|
413
|
+
});
|
|
414
|
+
usedEntityIds.add(entity.ID);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
// Set available entities (excluding already assigned ones)
|
|
418
|
+
this.availableEntities = this.allEntities.filter(e => !usedEntityIds.has(e.ID));
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
catch (error) {
|
|
422
|
+
console.warn('Failed to load application entities:', error);
|
|
423
|
+
this.availableEntities = [...this.allEntities];
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
addEntity(entity) {
|
|
427
|
+
// Add entity to application
|
|
428
|
+
this.applicationEntities.push({
|
|
429
|
+
entity,
|
|
430
|
+
sequence: this.applicationEntities.length + 1,
|
|
431
|
+
defaultForNewUser: false,
|
|
432
|
+
isNew: true,
|
|
433
|
+
hasChanges: false
|
|
434
|
+
});
|
|
435
|
+
// Update all sequences to be consecutive
|
|
436
|
+
this.updateSequences();
|
|
437
|
+
// Remove from available entities
|
|
438
|
+
this.availableEntities = this.availableEntities.filter(e => e.ID !== entity.ID);
|
|
439
|
+
}
|
|
440
|
+
removeEntity(config) {
|
|
441
|
+
// Remove from application entities
|
|
442
|
+
this.applicationEntities = this.applicationEntities.filter(ae => ae.entity.ID !== config.entity.ID);
|
|
443
|
+
// Update all sequences to be consecutive
|
|
444
|
+
this.updateSequences();
|
|
445
|
+
// Add back to available entities if not already there
|
|
446
|
+
if (!this.availableEntities.find(e => e.ID === config.entity.ID)) {
|
|
447
|
+
this.availableEntities.push(config.entity);
|
|
448
|
+
this.availableEntities.sort((a, b) => (a.Name || '').localeCompare(b.Name || ''));
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
moveEntityUp(index) {
|
|
452
|
+
if (index > 0) {
|
|
453
|
+
const temp = this.applicationEntities[index];
|
|
454
|
+
this.applicationEntities[index] = this.applicationEntities[index - 1];
|
|
455
|
+
this.applicationEntities[index - 1] = temp;
|
|
456
|
+
this.updateSequences();
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
moveEntityDown(index) {
|
|
460
|
+
if (index < this.applicationEntities.length - 1) {
|
|
461
|
+
const temp = this.applicationEntities[index];
|
|
462
|
+
this.applicationEntities[index] = this.applicationEntities[index + 1];
|
|
463
|
+
this.applicationEntities[index + 1] = temp;
|
|
464
|
+
this.updateSequences();
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
updateSequences() {
|
|
468
|
+
this.applicationEntities.forEach((config, index) => {
|
|
469
|
+
config.sequence = index + 1;
|
|
470
|
+
if (!config.isNew) {
|
|
471
|
+
config.hasChanges = true;
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
onDefaultForNewUserChange(config) {
|
|
476
|
+
if (!config.isNew) {
|
|
477
|
+
config.hasChanges = true;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
get hasEntityChanges() {
|
|
481
|
+
return this.applicationEntities.some(ae => ae.isNew || ae.hasChanges);
|
|
482
|
+
}
|
|
483
|
+
async onSubmit() {
|
|
484
|
+
if (this.applicationForm.invalid) {
|
|
485
|
+
this.markFormGroupTouched(this.applicationForm);
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
this.isLoading = true;
|
|
489
|
+
this.error = null;
|
|
490
|
+
try {
|
|
491
|
+
let application;
|
|
492
|
+
if (this.isEditMode && this.data?.application) {
|
|
493
|
+
// Edit existing application
|
|
494
|
+
application = this.data.application;
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
// Create new application
|
|
498
|
+
application = await this.metadata.GetEntityObject('Applications');
|
|
499
|
+
application.NewRecord();
|
|
500
|
+
}
|
|
501
|
+
// Update application properties
|
|
502
|
+
const formValue = this.applicationForm.value;
|
|
503
|
+
application.Name = formValue.name;
|
|
504
|
+
application.Description = formValue.description || null;
|
|
505
|
+
// Save application
|
|
506
|
+
const saveResult = await application.Save();
|
|
507
|
+
if (!saveResult) {
|
|
508
|
+
throw new Error(application.LatestResult?.Message || 'Failed to save application');
|
|
509
|
+
}
|
|
510
|
+
// Save application entities if there are changes
|
|
511
|
+
if (this.hasEntityChanges) {
|
|
512
|
+
await this.saveApplicationEntities(application.ID);
|
|
513
|
+
}
|
|
514
|
+
this.result.emit({ action: 'save', application });
|
|
515
|
+
}
|
|
516
|
+
catch (error) {
|
|
517
|
+
console.error('Error saving application:', error);
|
|
518
|
+
this.error = error.message || 'An unexpected error occurred';
|
|
519
|
+
}
|
|
520
|
+
finally {
|
|
521
|
+
this.isLoading = false;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
async saveApplicationEntities(applicationId) {
|
|
525
|
+
// Save or update each ApplicationEntity record
|
|
526
|
+
for (const config of this.applicationEntities) {
|
|
527
|
+
if (config.isNew || config.hasChanges) {
|
|
528
|
+
let appEntity;
|
|
529
|
+
if (config.isNew) {
|
|
530
|
+
// Create new ApplicationEntity
|
|
531
|
+
appEntity = await this.metadata.GetEntityObject('Application Entities');
|
|
532
|
+
appEntity.NewRecord();
|
|
533
|
+
appEntity.ApplicationID = applicationId;
|
|
534
|
+
appEntity.EntityID = config.entity.ID;
|
|
535
|
+
}
|
|
536
|
+
else if (config.applicationEntity) {
|
|
537
|
+
// Update existing ApplicationEntity
|
|
538
|
+
appEntity = config.applicationEntity;
|
|
539
|
+
}
|
|
540
|
+
else {
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
appEntity.Sequence = config.sequence;
|
|
544
|
+
appEntity.DefaultForNewUser = config.defaultForNewUser;
|
|
545
|
+
const saveResult = await appEntity.Save();
|
|
546
|
+
if (!saveResult) {
|
|
547
|
+
console.warn(`Failed to save ApplicationEntity for ${config.entity.Name}:`, appEntity.LatestResult?.Message);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
onCancel() {
|
|
553
|
+
this.result.emit({ action: 'cancel' });
|
|
554
|
+
}
|
|
555
|
+
markFormGroupTouched(formGroup) {
|
|
556
|
+
Object.keys(formGroup.controls).forEach(key => {
|
|
557
|
+
const control = formGroup.get(key);
|
|
558
|
+
control?.markAsTouched();
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
static ɵfac = function ApplicationDialogComponent_Factory(t) { return new (t || ApplicationDialogComponent)(); };
|
|
562
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ApplicationDialogComponent, selectors: [["mj-application-dialog"]], hostBindings: function ApplicationDialogComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
563
|
+
i0.ɵɵlistener("keydown.escape", function ApplicationDialogComponent_keydown_escape_HostBindingHandler($event) { return ctx.onEscapeKey($event); }, false, i0.ɵɵresolveDocument);
|
|
564
|
+
} }, inputs: { data: "data", visible: "visible" }, outputs: { result: "result" }, standalone: true, features: [i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature], decls: 1, vars: 1, consts: [["kendoWindowContainer", "", 3, "width", "height", "resizable", "draggable", "keepContent", "close", 4, "ngIf"], ["kendoWindowContainer", "", 3, "close", "width", "height", "resizable", "draggable", "keepContent"], [1, "dialog-header"], [1, "dialog-title"], [1, "fa-solid", "fa-grid-2"], [1, "dialog-subtitle"], [1, "dialog-content"], [3, "ngSubmit", "formGroup"], [1, "content-section"], [1, "form-section"], [1, "section-header"], [1, "section-title"], [1, "fa-solid", "fa-info-circle"], [1, "section-description"], [1, "form-grid"], [1, "form-field"], ["for", "name", 1, "field-label", "required"], ["id", "name", "type", "text", "formControlName", "name", "placeholder", "My Application", 1, "field-input"], [1, "field-error"], ["for", "description", 1, "field-label"], ["id", "description", "formControlName", "description", "placeholder", "Describe the application's purpose and functionality...", "rows", "6", 1, "field-textarea"], [1, "field-hint"], [1, "fa-solid", "fa-database"], [1, "assigned-entities"], [1, "no-entities"], [1, "available-entities"], [1, "all-assigned"], [1, "dialog-footer"], ["type", "button", 1, "btn", "btn-secondary", 3, "click"], [1, "fa-solid", "fa-times"], ["type", "submit", 1, "btn", "btn-primary", 3, "disabled"], [1, "alert", "alert-error"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "fa-solid", "fa-exclamation-circle"], [1, "subsection-title"], [1, "entities-list"], [1, "entity-item", 3, "is-new", "has-changes"], [1, "entity-item"], [1, "entity-info"], [1, "entity-icon"], [1, "fa-solid", "fa-table"], [1, "entity-details"], [1, "entity-name"], [1, "fa-solid", "fa-info-circle", "entity-info-icon", 3, "title"], [1, "entity-config"], [1, "config-item"], [1, "config-label"], ["type", "checkbox", 1, "config-checkbox", 3, "ngModelChange", "change", "ngModel", "ngModelOptions"], [1, "checkbox-text"], [1, "sequence-badge"], [1, "entity-actions"], ["type", "button", "title", "Move up", 1, "btn-icon", "btn-neutral", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-up"], ["type", "button", "title", "Move down", 1, "btn-icon", "btn-neutral", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-down"], ["type", "button", "title", "Remove entity", 1, "btn-icon", "btn-danger", 3, "click"], [1, "empty-subtext"], [1, "entities-grid"], [1, "entity-chip"], [1, "entity-chip", 3, "click"], [1, "chip-content"], [1, "fa-solid", "fa-plus"], [1, "chip-name"], [1, "fa-solid", "fa-check-circle"], [1, "info-grid"], [1, "info-item"], [1, "info-label"], [1, "info-value"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-save"]], template: function ApplicationDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
565
|
+
i0.ɵɵtemplate(0, ApplicationDialogComponent_kendo_window_0_Template, 52, 17, "kendo-window", 0);
|
|
566
|
+
} if (rf & 2) {
|
|
567
|
+
i0.ɵɵproperty("ngIf", ctx.visible);
|
|
568
|
+
} }, dependencies: [CommonModule, i1.NgIf, i1.DatePipe, FormsModule, i2.ɵNgNoValidate, i2.DefaultValueAccessor, i2.CheckboxControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.NgModel, ReactiveFormsModule, i2.FormGroupDirective, i2.FormControlName, WindowModule, i3.WindowComponent, i3.WindowTitleBarComponent, i3.WindowContainerDirective], styles: ["/* Modern Dialog Styling - Matching Dashboard Design */\n:host ::ng-deep .k-window {\n border: none;\n border-radius: 12px;\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22);\n background: #ffffff;\n overflow: hidden;\n}\n\n:host ::ng-deep .k-window-titlebar {\n background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);\n border: none;\n padding: 24px 32px;\n min-height: 70px;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-title {\n display: none; /* Hide default title */\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions {\n position: absolute;\n top: 24px;\n right: 24px;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions .k-button {\n background: rgba(255, 255, 255, 0.1);\n border: 1px solid rgba(255, 255, 255, 0.2);\n color: #ffffff;\n border-radius: 6px;\n width: 32px;\n height: 32px;\n min-width: auto;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions .k-button:hover {\n background: rgba(255, 255, 255, 0.2);\n border-color: rgba(255, 255, 255, 0.3);\n}\n\n:host ::ng-deep .k-window-content {\n padding: 0;\n background: #ffffff;\n}\n\n/* Custom Title Bar */\n.dialog-header {\n position: relative;\n color: #ffffff;\n}\n\n.dialog-header .dialog-title {\n font-size: 18px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 16px;\n margin: 0;\n}\n\n.dialog-header .dialog-title i {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.15);\n border-radius: 6px;\n font-size: 14px;\n}\n\n.dialog-header .dialog-subtitle {\n margin: 4px 0 0 0;\n font-size: 12px;\n opacity: 0.85;\n font-weight: 400;\n}\n\n/* Modal Content Areas */\n.dialog-content {\n padding: 0;\n background: #ffffff;\n}\n\n.dialog-content .content-section {\n padding: 32px;\n}\n\n.dialog-content .content-section:not(:last-child) {\n border-bottom: 1px solid #e0e0e0;\n}\n\n.dialog-footer {\n padding: 24px 32px;\n background: #fafafa;\n border-top: 1px solid #e0e0e0;\n display: flex;\n justify-content: flex-end;\n gap: 16px;\n}\n\n/* Form Sections */\n.form-section .section-header {\n margin-bottom: 24px;\n}\n\n.form-section .section-header .section-title {\n font-size: 16px;\n font-weight: 600;\n color: #212121;\n margin: 0 0 4px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.form-section .section-header .section-title i {\n color: #2196f3;\n font-size: 14px;\n}\n\n.form-section .section-header .section-description {\n font-size: 12px;\n color: #666666;\n margin: 0;\n}\n\n.form-grid {\n display: grid;\n gap: 24px;\n}\n\n.form-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n}\n\n@media (max-width: 640px) {\n .form-row {\n grid-template-columns: 1fr;\n gap: 16px;\n }\n}\n\n/* Modern Form Fields */\n.form-field {\n margin-bottom: 24px;\n}\n\n.form-field:last-child {\n margin-bottom: 0;\n}\n\n.form-field .field-label {\n display: block;\n font-size: 12px;\n font-weight: 500;\n color: #212121;\n margin-bottom: 8px;\n}\n\n.form-field .field-label.required::after {\n content: ' *';\n color: #f44336;\n}\n\n.form-field .field-input,\n.form-field .field-select,\n.form-field .field-textarea {\n width: 100%;\n padding: 0 16px;\n border: 1px solid #bdbdbd;\n border-radius: 6px;\n font-size: 14px;\n background: #ffffff;\n transition: all 0.15s ease;\n}\n\n.form-field .field-input:focus,\n.form-field .field-select:focus,\n.form-field .field-textarea:focus {\n outline: none;\n border-color: #2196f3;\n box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);\n}\n\n.form-field .field-input.error,\n.form-field .field-select.error,\n.form-field .field-textarea.error {\n border-color: #f44336;\n}\n\n.form-field .field-input.error:focus,\n.form-field .field-select.error:focus,\n.form-field .field-textarea.error:focus {\n border-color: #f44336;\n box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);\n}\n\n.form-field .field-input::placeholder,\n.form-field .field-select::placeholder,\n.form-field .field-textarea::placeholder {\n color: #9e9e9e;\n}\n\n.form-field .field-input,\n.form-field .field-select {\n height: 36px;\n}\n\n.form-field .field-textarea {\n min-height: 100px;\n padding: 16px;\n resize: vertical;\n line-height: 1.4;\n}\n\n.form-field .field-select {\n background-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e\");\n background-position: right 16px center;\n background-repeat: no-repeat;\n background-size: 16px;\n padding-right: calc(16px + 24px);\n appearance: none;\n cursor: pointer;\n}\n\n.form-field .field-error {\n margin-top: 8px;\n font-size: 11px;\n color: #f44336;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.form-field .field-error i {\n font-size: 10px;\n}\n\n.form-field .field-hint {\n margin-top: 8px;\n font-size: 11px;\n color: #666666;\n line-height: 1.4;\n}\n\n/* Alert Messages */\n.alert {\n padding: 16px 24px;\n border-radius: 8px;\n margin-bottom: 24px;\n display: flex;\n align-items: flex-start;\n gap: 16px;\n}\n\n.alert i {\n font-size: 16px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.alert.alert-error {\n background: rgba(244, 67, 54, 0.1);\n border: 1px solid rgba(244, 67, 54, 0.2);\n color: #c62828;\n}\n\n.alert.alert-error i {\n color: #f44336;\n}\n\n.alert.alert-warning {\n background: rgba(255, 193, 7, 0.1);\n border: 1px solid rgba(255, 193, 7, 0.2);\n color: #b7800d;\n}\n\n.alert.alert-warning i {\n color: #ffc107;\n}\n\n.alert.alert-info {\n background: rgba(0, 188, 212, 0.1);\n border: 1px solid rgba(0, 188, 212, 0.2);\n color: #00838f;\n}\n\n.alert.alert-info i {\n color: #00bcd4;\n}\n\n/* Button Styles */\n.dialog-footer .btn {\n padding: 8px 24px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n border: 1px solid transparent;\n cursor: pointer;\n transition: all 0.15s ease;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-height: 36px;\n}\n\n.dialog-footer .btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.dialog-footer .btn:disabled i.fa-spinner {\n animation: spin 1s linear infinite;\n}\n\n.dialog-footer .btn.btn-secondary {\n background: #ffffff;\n color: #666666;\n border-color: #bdbdbd;\n}\n\n.dialog-footer .btn.btn-secondary:hover:not(:disabled) {\n background: #f8f9fa;\n border-color: #757575;\n color: #212121;\n}\n\n.dialog-footer .btn.btn-primary {\n background: #2196f3;\n color: #ffffff;\n}\n\n.dialog-footer .btn.btn-primary:hover:not(:disabled) {\n background: #1976d2;\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);\n transform: translateY(-1px);\n}\n\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n/* Entity Management Styles */\n.subsection-title {\n font-size: 14px;\n font-weight: 600;\n color: #212121;\n margin: 0 0 16px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.assigned-entities {\n margin-bottom: 32px;\n}\n\n.assigned-entities .entities-list {\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n overflow: hidden;\n background: #ffffff;\n}\n\n.entity-item {\n display: flex;\n align-items: center;\n padding: 16px 24px;\n border-bottom: 1px solid #fafafa;\n transition: all 0.15s ease;\n}\n\n.entity-item:last-child {\n border-bottom: none;\n}\n\n.entity-item:hover {\n background: rgba(33, 150, 243, 0.02);\n}\n\n.entity-item.is-new {\n background: rgba(76, 175, 80, 0.05);\n border-left: 3px solid #4caf50;\n}\n\n.entity-item.has-changes {\n background: rgba(0, 188, 212, 0.05);\n border-left: 3px solid #00bcd4;\n}\n\n.entity-item .entity-info {\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n.entity-item .entity-info .entity-icon {\n width: 40px;\n height: 40px;\n background: rgba(33, 150, 243, 0.1);\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #2196f3;\n flex-shrink: 0;\n}\n\n.entity-item .entity-info .entity-details {\n flex: 1;\n min-width: 0;\n}\n\n.entity-item .entity-info .entity-details .entity-name {\n font-weight: 500;\n color: #212121;\n margin-bottom: 2px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-item .entity-info .entity-details .entity-name .entity-info-icon {\n color: #00bcd4;\n font-size: 14px;\n cursor: help;\n opacity: 0.7;\n transition: all 0.15s ease;\n}\n\n.entity-item .entity-info .entity-details .entity-name .entity-info-icon:hover {\n opacity: 1;\n transform: scale(1.1);\n}\n\n.entity-item .entity-info .entity-details .entity-description {\n font-size: 12px;\n color: #666666;\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.entity-item .entity-config {\n display: flex;\n align-items: center;\n gap: 24px;\n margin: 0 24px;\n}\n\n.entity-item .entity-config .config-item .config-label {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: 12px;\n color: #666666;\n margin: 0;\n}\n\n.entity-item .entity-config .config-item .config-label .config-checkbox {\n width: 16px;\n height: 16px;\n cursor: pointer;\n}\n\n.entity-item .entity-config .sequence-badge {\n background: #2196f3;\n color: #ffffff;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 11px;\n font-weight: 500;\n min-width: 24px;\n text-align: center;\n}\n\n.entity-item .entity-actions {\n display: flex;\n gap: 4px;\n}\n\n.no-entities,\n.all-assigned {\n text-align: center;\n padding: 32px;\n color: #666666;\n}\n\n.no-entities i,\n.all-assigned i {\n font-size: 2rem;\n color: #bdbdbd;\n margin-bottom: 16px;\n}\n\n.no-entities p,\n.all-assigned p {\n margin: 0 0 4px 0;\n font-weight: 500;\n}\n\n.no-entities .empty-subtext,\n.all-assigned .empty-subtext {\n font-size: 12px;\n color: #9e9e9e;\n margin: 0;\n}\n\n.available-entities .entities-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 8px;\n}\n\n@media (max-width: 640px) {\n .available-entities .entities-grid {\n grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n }\n}\n\n.entity-chip {\n padding: 16px;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n background: #ffffff;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.entity-chip .chip-content {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-chip .chip-content i {\n color: #2196f3;\n font-size: 14px;\n}\n\n.entity-chip .chip-content .chip-name {\n font-size: 12px;\n color: #212121;\n font-weight: 500;\n}\n\n.entity-chip:hover {\n border-color: #2196f3;\n background: rgba(33, 150, 243, 0.05);\n transform: translateY(-1px);\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n/* Info Grid for System Information */\n.info-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 16px;\n}\n\n@media (max-width: 640px) {\n .info-grid {\n grid-template-columns: 1fr;\n }\n}\n\n.info-grid .info-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.info-grid .info-item .info-label {\n font-size: 11px;\n color: #666666;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.info-grid .info-item .info-value {\n font-size: 12px;\n color: #212121;\n font-weight: 500;\n}\n\n/* Enhanced Button Icons */\n.btn-icon {\n width: 32px;\n height: 32px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.15s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n}\n\n.btn-icon:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.btn-icon.btn-neutral {\n background: rgba(189, 189, 189, 0.1);\n color: #666666;\n}\n\n.btn-icon.btn-neutral:hover:not(:disabled) {\n background: rgba(189, 189, 189, 0.2);\n color: #212121;\n transform: scale(1.05);\n}\n\n.btn-icon.btn-danger {\n background: rgba(244, 67, 54, 0.1);\n color: #f44336;\n}\n\n.btn-icon.btn-danger:hover:not(:disabled) {\n background: rgba(244, 67, 54, 0.2);\n transform: scale(1.05);\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n :host ::ng-deep .k-window {\n margin: 16px;\n max-width: none;\n width: calc(100vw - 24px) !important;\n height: calc(100vh - 24px) !important;\n }\n \n :host ::ng-deep .k-window-titlebar {\n padding: 16px 24px;\n min-height: 60px;\n }\n \n .dialog-content .content-section {\n padding: 24px 16px;\n }\n \n .dialog-footer {\n padding: 16px 24px;\n flex-direction: column-reverse;\n }\n \n .dialog-footer .btn {\n width: 100%;\n justify-content: center;\n }\n}"], encapsulation: 2 });
|
|
569
|
+
}
|
|
570
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ApplicationDialogComponent, [{
|
|
571
|
+
type: Component,
|
|
572
|
+
args: [{ selector: 'mj-application-dialog', standalone: true, imports: [CommonModule, FormsModule, ReactiveFormsModule, WindowModule], encapsulation: ViewEncapsulation.None, template: "<kendo-window\n *ngIf=\"visible\"\n [width]=\"900\"\n [height]=\"700\"\n [resizable]=\"false\"\n [draggable]=\"true\"\n [keepContent]=\"true\"\n (close)=\"onCancel()\"\n kendoWindowContainer>\n \n <kendo-window-titlebar>\n <div class=\"dialog-header\">\n <h2 class=\"dialog-title\">\n <i class=\"fa-solid fa-grid-2\"></i>\n {{ isEditMode ? 'Edit Application' : 'Create New Application' }}\n </h2>\n <p class=\"dialog-subtitle\">\n {{ isEditMode ? 'Update application information and settings' : 'Add a new application to the system' }}\n </p>\n </div>\n </kendo-window-titlebar>\n\n <div class=\"dialog-content\">\n <form [formGroup]=\"applicationForm\" (ngSubmit)=\"onSubmit()\">\n \n @if (error) {\n <div class=\"content-section\">\n <div class=\"alert alert-error\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <div>{{ error }}</div>\n </div>\n </div>\n }\n\n <!-- Basic Information Section -->\n <div class=\"content-section\">\n <div class=\"form-section\">\n <div class=\"section-header\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Application Information\n </h3>\n <p class=\"section-description\">Define the application's basic properties</p>\n </div>\n \n <div class=\"form-grid\">\n <div class=\"form-field\">\n <label class=\"field-label required\" for=\"name\">Application Name</label>\n <input \n id=\"name\"\n type=\"text\" \n class=\"field-input\" \n formControlName=\"name\"\n placeholder=\"My Application\"\n [class.error]=\"applicationForm.get('name')?.invalid && applicationForm.get('name')?.touched\"\n />\n @if (applicationForm.get('name')?.invalid && applicationForm.get('name')?.touched) {\n <div class=\"field-error\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n @if (applicationForm.get('name')?.errors?.['required']) {\n Application name is required\n }\n @if (applicationForm.get('name')?.errors?.['maxlength']) {\n Application name cannot exceed 100 characters\n }\n </div>\n }\n </div>\n\n <div class=\"form-field\">\n <label class=\"field-label\" for=\"description\">Description</label>\n <textarea \n id=\"description\"\n class=\"field-textarea\" \n formControlName=\"description\"\n placeholder=\"Describe the application's purpose and functionality...\"\n rows=\"6\"\n ></textarea>\n <div class=\"field-hint\">\n Provide a clear description of what this application does and its main features.\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Entity Management Section -->\n <div class=\"content-section\">\n <div class=\"form-section\">\n <div class=\"section-header\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-database\"></i>\n Application Entities\n </h3>\n <p class=\"section-description\">Manage which entities are included in this application</p>\n </div>\n \n <div class=\"form-grid\">\n <!-- Assigned Entities -->\n @if (applicationEntities.length > 0) {\n <div class=\"assigned-entities\">\n <h4 class=\"subsection-title\">Assigned Entities ({{ applicationEntities.length }})</h4>\n <div class=\"entities-list\">\n @for (config of applicationEntities; track config.entity.ID; let i = $index) {\n <div class=\"entity-item\" [class.is-new]=\"config.isNew\" [class.has-changes]=\"config.hasChanges\">\n <div class=\"entity-info\">\n <div class=\"entity-icon\">\n <i class=\"fa-solid fa-table\"></i>\n </div>\n <div class=\"entity-details\">\n <div class=\"entity-name\">\n {{ config.entity.Name }}\n @if (config.entity.Description) {\n <i class=\"fa-solid fa-info-circle entity-info-icon\" \n [title]=\"config.entity.Description\"\n [attr.data-tooltip]=\"config.entity.Description\"></i>\n }\n </div>\n </div>\n </div>\n \n <div class=\"entity-config\">\n <div class=\"config-item\">\n <label class=\"config-label\">\n <input \n type=\"checkbox\" \n [(ngModel)]=\"config.defaultForNewUser\"\n [ngModelOptions]=\"{standalone: true}\"\n (change)=\"onDefaultForNewUserChange(config)\"\n class=\"config-checkbox\"\n />\n <span class=\"checkbox-text\">Default for new users</span>\n </label>\n </div>\n <div class=\"sequence-badge\">{{ config.sequence }}</div>\n </div>\n \n <div class=\"entity-actions\">\n <button \n type=\"button\" \n class=\"btn-icon btn-neutral\"\n (click)=\"moveEntityUp(i)\"\n [disabled]=\"i === 0\"\n title=\"Move up\"\n >\n <i class=\"fa-solid fa-chevron-up\"></i>\n </button>\n <button \n type=\"button\" \n class=\"btn-icon btn-neutral\"\n (click)=\"moveEntityDown(i)\"\n [disabled]=\"i === applicationEntities.length - 1\"\n title=\"Move down\"\n >\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n <button \n type=\"button\" \n class=\"btn-icon btn-danger\"\n (click)=\"removeEntity(config)\"\n title=\"Remove entity\"\n >\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"no-entities\">\n <i class=\"fa-solid fa-database\"></i>\n <p>No entities assigned to this application</p>\n <p class=\"empty-subtext\">Add entities from the available list below</p>\n </div>\n }\n \n <!-- Available Entities -->\n @if (availableEntities.length > 0) {\n <div class=\"available-entities\">\n <h4 class=\"subsection-title\">Available Entities ({{ availableEntities.length }})</h4>\n <div class=\"entities-grid\">\n @for (entity of availableEntities; track entity.ID) {\n <div class=\"entity-chip\" (click)=\"addEntity(entity)\">\n <div class=\"chip-content\">\n <i class=\"fa-solid fa-plus\"></i>\n <span class=\"chip-name\">{{ entity.Name }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n } @else {\n <div class=\"all-assigned\">\n <i class=\"fa-solid fa-check-circle\"></i>\n <p>All entities have been assigned to this application</p>\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Application Info Section -->\n @if (isEditMode) {\n <div class=\"content-section\">\n <div class=\"form-section\">\n <div class=\"section-header\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-info-circle\"></i>\n System Information\n </h3>\n <p class=\"section-description\">Application metadata and audit information</p>\n </div>\n \n <div class=\"form-grid\">\n <div class=\"info-grid\">\n <div class=\"info-item\">\n <span class=\"info-label\">Created:</span>\n <span class=\"info-value\">{{ data?.application?.__mj_CreatedAt | date:'medium' }}</span>\n </div>\n <div class=\"info-item\">\n <span class=\"info-label\">Last Updated:</span>\n <span class=\"info-value\">{{ data?.application?.__mj_UpdatedAt | date:'medium' }}</span>\n </div>\n <div class=\"info-item\">\n <span class=\"info-label\">Application ID:</span>\n <span class=\"info-value\">{{ data?.application?.ID }}</span>\n </div>\n <div class=\"info-item\">\n <span class=\"info-label\">Total Entities:</span>\n <span class=\"info-value\">{{ applicationEntities.length }}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n <div class=\"dialog-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n Cancel\n </button>\n <button \n type=\"submit\" \n class=\"btn btn-primary\" \n [disabled]=\"applicationForm.invalid || isLoading\"\n >\n @if (isLoading) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Saving...\n } @else {\n <i class=\"fa-solid fa-save\"></i>\n {{ isEditMode ? 'Update Application' : 'Create Application' }}\n }\n </button>\n </div>\n </form>\n </div>\n</kendo-window>", styles: ["/* Modern Dialog Styling - Matching Dashboard Design */\n:host ::ng-deep .k-window {\n border: none;\n border-radius: 12px;\n box-shadow: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22);\n background: #ffffff;\n overflow: hidden;\n}\n\n:host ::ng-deep .k-window-titlebar {\n background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);\n border: none;\n padding: 24px 32px;\n min-height: 70px;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-title {\n display: none; /* Hide default title */\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions {\n position: absolute;\n top: 24px;\n right: 24px;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions .k-button {\n background: rgba(255, 255, 255, 0.1);\n border: 1px solid rgba(255, 255, 255, 0.2);\n color: #ffffff;\n border-radius: 6px;\n width: 32px;\n height: 32px;\n min-width: auto;\n}\n\n:host ::ng-deep .k-window-titlebar .k-window-actions .k-button:hover {\n background: rgba(255, 255, 255, 0.2);\n border-color: rgba(255, 255, 255, 0.3);\n}\n\n:host ::ng-deep .k-window-content {\n padding: 0;\n background: #ffffff;\n}\n\n/* Custom Title Bar */\n.dialog-header {\n position: relative;\n color: #ffffff;\n}\n\n.dialog-header .dialog-title {\n font-size: 18px;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 16px;\n margin: 0;\n}\n\n.dialog-header .dialog-title i {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(255, 255, 255, 0.15);\n border-radius: 6px;\n font-size: 14px;\n}\n\n.dialog-header .dialog-subtitle {\n margin: 4px 0 0 0;\n font-size: 12px;\n opacity: 0.85;\n font-weight: 400;\n}\n\n/* Modal Content Areas */\n.dialog-content {\n padding: 0;\n background: #ffffff;\n}\n\n.dialog-content .content-section {\n padding: 32px;\n}\n\n.dialog-content .content-section:not(:last-child) {\n border-bottom: 1px solid #e0e0e0;\n}\n\n.dialog-footer {\n padding: 24px 32px;\n background: #fafafa;\n border-top: 1px solid #e0e0e0;\n display: flex;\n justify-content: flex-end;\n gap: 16px;\n}\n\n/* Form Sections */\n.form-section .section-header {\n margin-bottom: 24px;\n}\n\n.form-section .section-header .section-title {\n font-size: 16px;\n font-weight: 600;\n color: #212121;\n margin: 0 0 4px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.form-section .section-header .section-title i {\n color: #2196f3;\n font-size: 14px;\n}\n\n.form-section .section-header .section-description {\n font-size: 12px;\n color: #666666;\n margin: 0;\n}\n\n.form-grid {\n display: grid;\n gap: 24px;\n}\n\n.form-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 24px;\n}\n\n@media (max-width: 640px) {\n .form-row {\n grid-template-columns: 1fr;\n gap: 16px;\n }\n}\n\n/* Modern Form Fields */\n.form-field {\n margin-bottom: 24px;\n}\n\n.form-field:last-child {\n margin-bottom: 0;\n}\n\n.form-field .field-label {\n display: block;\n font-size: 12px;\n font-weight: 500;\n color: #212121;\n margin-bottom: 8px;\n}\n\n.form-field .field-label.required::after {\n content: ' *';\n color: #f44336;\n}\n\n.form-field .field-input,\n.form-field .field-select,\n.form-field .field-textarea {\n width: 100%;\n padding: 0 16px;\n border: 1px solid #bdbdbd;\n border-radius: 6px;\n font-size: 14px;\n background: #ffffff;\n transition: all 0.15s ease;\n}\n\n.form-field .field-input:focus,\n.form-field .field-select:focus,\n.form-field .field-textarea:focus {\n outline: none;\n border-color: #2196f3;\n box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);\n}\n\n.form-field .field-input.error,\n.form-field .field-select.error,\n.form-field .field-textarea.error {\n border-color: #f44336;\n}\n\n.form-field .field-input.error:focus,\n.form-field .field-select.error:focus,\n.form-field .field-textarea.error:focus {\n border-color: #f44336;\n box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);\n}\n\n.form-field .field-input::placeholder,\n.form-field .field-select::placeholder,\n.form-field .field-textarea::placeholder {\n color: #9e9e9e;\n}\n\n.form-field .field-input,\n.form-field .field-select {\n height: 36px;\n}\n\n.form-field .field-textarea {\n min-height: 100px;\n padding: 16px;\n resize: vertical;\n line-height: 1.4;\n}\n\n.form-field .field-select {\n background-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e\");\n background-position: right 16px center;\n background-repeat: no-repeat;\n background-size: 16px;\n padding-right: calc(16px + 24px);\n appearance: none;\n cursor: pointer;\n}\n\n.form-field .field-error {\n margin-top: 8px;\n font-size: 11px;\n color: #f44336;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.form-field .field-error i {\n font-size: 10px;\n}\n\n.form-field .field-hint {\n margin-top: 8px;\n font-size: 11px;\n color: #666666;\n line-height: 1.4;\n}\n\n/* Alert Messages */\n.alert {\n padding: 16px 24px;\n border-radius: 8px;\n margin-bottom: 24px;\n display: flex;\n align-items: flex-start;\n gap: 16px;\n}\n\n.alert i {\n font-size: 16px;\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.alert.alert-error {\n background: rgba(244, 67, 54, 0.1);\n border: 1px solid rgba(244, 67, 54, 0.2);\n color: #c62828;\n}\n\n.alert.alert-error i {\n color: #f44336;\n}\n\n.alert.alert-warning {\n background: rgba(255, 193, 7, 0.1);\n border: 1px solid rgba(255, 193, 7, 0.2);\n color: #b7800d;\n}\n\n.alert.alert-warning i {\n color: #ffc107;\n}\n\n.alert.alert-info {\n background: rgba(0, 188, 212, 0.1);\n border: 1px solid rgba(0, 188, 212, 0.2);\n color: #00838f;\n}\n\n.alert.alert-info i {\n color: #00bcd4;\n}\n\n/* Button Styles */\n.dialog-footer .btn {\n padding: 8px 24px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n border: 1px solid transparent;\n cursor: pointer;\n transition: all 0.15s ease;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-height: 36px;\n}\n\n.dialog-footer .btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.dialog-footer .btn:disabled i.fa-spinner {\n animation: spin 1s linear infinite;\n}\n\n.dialog-footer .btn.btn-secondary {\n background: #ffffff;\n color: #666666;\n border-color: #bdbdbd;\n}\n\n.dialog-footer .btn.btn-secondary:hover:not(:disabled) {\n background: #f8f9fa;\n border-color: #757575;\n color: #212121;\n}\n\n.dialog-footer .btn.btn-primary {\n background: #2196f3;\n color: #ffffff;\n}\n\n.dialog-footer .btn.btn-primary:hover:not(:disabled) {\n background: #1976d2;\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);\n transform: translateY(-1px);\n}\n\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n/* Entity Management Styles */\n.subsection-title {\n font-size: 14px;\n font-weight: 600;\n color: #212121;\n margin: 0 0 16px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.assigned-entities {\n margin-bottom: 32px;\n}\n\n.assigned-entities .entities-list {\n border: 1px solid #e0e0e0;\n border-radius: 8px;\n overflow: hidden;\n background: #ffffff;\n}\n\n.entity-item {\n display: flex;\n align-items: center;\n padding: 16px 24px;\n border-bottom: 1px solid #fafafa;\n transition: all 0.15s ease;\n}\n\n.entity-item:last-child {\n border-bottom: none;\n}\n\n.entity-item:hover {\n background: rgba(33, 150, 243, 0.02);\n}\n\n.entity-item.is-new {\n background: rgba(76, 175, 80, 0.05);\n border-left: 3px solid #4caf50;\n}\n\n.entity-item.has-changes {\n background: rgba(0, 188, 212, 0.05);\n border-left: 3px solid #00bcd4;\n}\n\n.entity-item .entity-info {\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n.entity-item .entity-info .entity-icon {\n width: 40px;\n height: 40px;\n background: rgba(33, 150, 243, 0.1);\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #2196f3;\n flex-shrink: 0;\n}\n\n.entity-item .entity-info .entity-details {\n flex: 1;\n min-width: 0;\n}\n\n.entity-item .entity-info .entity-details .entity-name {\n font-weight: 500;\n color: #212121;\n margin-bottom: 2px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-item .entity-info .entity-details .entity-name .entity-info-icon {\n color: #00bcd4;\n font-size: 14px;\n cursor: help;\n opacity: 0.7;\n transition: all 0.15s ease;\n}\n\n.entity-item .entity-info .entity-details .entity-name .entity-info-icon:hover {\n opacity: 1;\n transform: scale(1.1);\n}\n\n.entity-item .entity-info .entity-details .entity-description {\n font-size: 12px;\n color: #666666;\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.entity-item .entity-config {\n display: flex;\n align-items: center;\n gap: 24px;\n margin: 0 24px;\n}\n\n.entity-item .entity-config .config-item .config-label {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n font-size: 12px;\n color: #666666;\n margin: 0;\n}\n\n.entity-item .entity-config .config-item .config-label .config-checkbox {\n width: 16px;\n height: 16px;\n cursor: pointer;\n}\n\n.entity-item .entity-config .sequence-badge {\n background: #2196f3;\n color: #ffffff;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 11px;\n font-weight: 500;\n min-width: 24px;\n text-align: center;\n}\n\n.entity-item .entity-actions {\n display: flex;\n gap: 4px;\n}\n\n.no-entities,\n.all-assigned {\n text-align: center;\n padding: 32px;\n color: #666666;\n}\n\n.no-entities i,\n.all-assigned i {\n font-size: 2rem;\n color: #bdbdbd;\n margin-bottom: 16px;\n}\n\n.no-entities p,\n.all-assigned p {\n margin: 0 0 4px 0;\n font-weight: 500;\n}\n\n.no-entities .empty-subtext,\n.all-assigned .empty-subtext {\n font-size: 12px;\n color: #9e9e9e;\n margin: 0;\n}\n\n.available-entities .entities-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 8px;\n}\n\n@media (max-width: 640px) {\n .available-entities .entities-grid {\n grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n }\n}\n\n.entity-chip {\n padding: 16px;\n border: 1px solid #bdbdbd;\n border-radius: 8px;\n background: #ffffff;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.entity-chip .chip-content {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-chip .chip-content i {\n color: #2196f3;\n font-size: 14px;\n}\n\n.entity-chip .chip-content .chip-name {\n font-size: 12px;\n color: #212121;\n font-weight: 500;\n}\n\n.entity-chip:hover {\n border-color: #2196f3;\n background: rgba(33, 150, 243, 0.05);\n transform: translateY(-1px);\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);\n}\n\n/* Info Grid for System Information */\n.info-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n gap: 16px;\n}\n\n@media (max-width: 640px) {\n .info-grid {\n grid-template-columns: 1fr;\n }\n}\n\n.info-grid .info-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.info-grid .info-item .info-label {\n font-size: 11px;\n color: #666666;\n font-weight: 500;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.info-grid .info-item .info-value {\n font-size: 12px;\n color: #212121;\n font-weight: 500;\n}\n\n/* Enhanced Button Icons */\n.btn-icon {\n width: 32px;\n height: 32px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.15s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n}\n\n.btn-icon:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.btn-icon.btn-neutral {\n background: rgba(189, 189, 189, 0.1);\n color: #666666;\n}\n\n.btn-icon.btn-neutral:hover:not(:disabled) {\n background: rgba(189, 189, 189, 0.2);\n color: #212121;\n transform: scale(1.05);\n}\n\n.btn-icon.btn-danger {\n background: rgba(244, 67, 54, 0.1);\n color: #f44336;\n}\n\n.btn-icon.btn-danger:hover:not(:disabled) {\n background: rgba(244, 67, 54, 0.2);\n transform: scale(1.05);\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n :host ::ng-deep .k-window {\n margin: 16px;\n max-width: none;\n width: calc(100vw - 24px) !important;\n height: calc(100vh - 24px) !important;\n }\n \n :host ::ng-deep .k-window-titlebar {\n padding: 16px 24px;\n min-height: 60px;\n }\n \n .dialog-content .content-section {\n padding: 24px 16px;\n }\n \n .dialog-footer {\n padding: 16px 24px;\n flex-direction: column-reverse;\n }\n \n .dialog-footer .btn {\n width: 100%;\n justify-content: center;\n }\n}"] }]
|
|
573
|
+
}], () => [], { data: [{
|
|
574
|
+
type: Input
|
|
575
|
+
}], visible: [{
|
|
576
|
+
type: Input
|
|
577
|
+
}], result: [{
|
|
578
|
+
type: Output
|
|
579
|
+
}], onEscapeKey: [{
|
|
580
|
+
type: HostListener,
|
|
581
|
+
args: ['document:keydown.escape', ['$event']]
|
|
582
|
+
}] }); })();
|
|
583
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ApplicationDialogComponent, { className: "ApplicationDialogComponent", filePath: "src/lib/application-management/application-dialog/application-dialog.component.ts", lineNumber: 35 }); })();
|
|
584
|
+
//# sourceMappingURL=application-dialog.component.js.map
|