@memberjunction/ng-entity-viewer 6.2.0-edge.5 → 6.2.0-edge.7
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/README.md +28 -0
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.d.ts +48 -1
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.d.ts.map +1 -1
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js +631 -279
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js.map +1 -1
- package/dist/lib/entity-cards/entity-cards.component.d.ts +2 -0
- package/dist/lib/entity-cards/entity-cards.component.d.ts.map +1 -1
- package/dist/lib/entity-cards/entity-cards.component.js +30 -2
- package/dist/lib/entity-cards/entity-cards.component.js.map +1 -1
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +162 -3
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/entity-data-grid/entity-data-grid.component.js +976 -300
- package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
- package/dist/lib/entity-data-grid/open-in-excel.d.ts +40 -0
- package/dist/lib/entity-data-grid/open-in-excel.d.ts.map +1 -0
- package/dist/lib/entity-data-grid/open-in-excel.js +60 -0
- package/dist/lib/entity-data-grid/open-in-excel.js.map +1 -0
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts +42 -0
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.d.ts.map +1 -1
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js +109 -11
- package/dist/lib/entity-record-detail-panel/entity-record-detail-panel.component.js.map +1 -1
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts +51 -3
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
- package/dist/lib/entity-viewer/entity-viewer.component.js +222 -53
- package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
- package/dist/lib/entity-viewer/view-property-chips.d.ts +17 -0
- package/dist/lib/entity-viewer/view-property-chips.d.ts.map +1 -0
- package/dist/lib/entity-viewer/view-property-chips.js +42 -0
- package/dist/lib/entity-viewer/view-property-chips.js.map +1 -0
- package/dist/lib/recycle-bin/recycle-bin-chip.component.d.ts.map +1 -1
- package/dist/lib/recycle-bin/recycle-bin-chip.component.js +5 -4
- package/dist/lib/recycle-bin/recycle-bin-chip.component.js.map +1 -1
- package/dist/lib/recycle-bin/recycle-bin.component.js +3 -3
- package/dist/lib/recycle-bin/recycle-bin.component.js.map +1 -1
- package/dist/lib/utils/record.util.d.ts +44 -1
- package/dist/lib/utils/record.util.d.ts.map +1 -1
- package/dist/lib/utils/record.util.js +142 -0
- package/dist/lib/utils/record.util.js.map +1 -1
- package/dist/lib/view-config-panel/view-config-panel.component.d.ts +408 -55
- package/dist/lib/view-config-panel/view-config-panel.component.d.ts.map +1 -1
- package/dist/lib/view-config-panel/view-config-panel.component.js +3922 -993
- package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
- package/dist/lib/view-properties-editor/view-properties-editor.component.d.ts +52 -0
- package/dist/lib/view-properties-editor/view-properties-editor.component.d.ts.map +1 -0
- package/dist/lib/view-properties-editor/view-properties-editor.component.js +445 -0
- package/dist/lib/view-properties-editor/view-properties-editor.component.js.map +1 -0
- package/dist/lib/view-selector/view-selector.component.d.ts +28 -1
- package/dist/lib/view-selector/view-selector.component.d.ts.map +1 -1
- package/dist/lib/view-selector/view-selector.component.js +322 -168
- package/dist/lib/view-selector/view-selector.component.js.map +1 -1
- package/dist/lib/view-types/descriptors/calendar-view-type.d.ts +22 -0
- package/dist/lib/view-types/descriptors/calendar-view-type.d.ts.map +1 -0
- package/dist/lib/view-types/descriptors/calendar-view-type.js +38 -0
- package/dist/lib/view-types/descriptors/calendar-view-type.js.map +1 -0
- package/dist/lib/view-types/index.d.ts +3 -2
- package/dist/lib/view-types/index.d.ts.map +1 -1
- package/dist/lib/view-types/index.js +5 -2
- package/dist/lib/view-types/index.js.map +1 -1
- package/dist/lib/view-types/renderers/calendar-placement.d.ts +97 -0
- package/dist/lib/view-types/renderers/calendar-placement.d.ts.map +1 -0
- package/dist/lib/view-types/renderers/calendar-placement.js +145 -0
- package/dist/lib/view-types/renderers/calendar-placement.js.map +1 -0
- package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.d.ts +36 -0
- package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.d.ts.map +1 -0
- package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.js +167 -0
- package/dist/lib/view-types/renderers/calendar-view-prop-sheet.component.js.map +1 -0
- package/dist/lib/view-types/renderers/calendar-view-renderer.component.d.ts +107 -0
- package/dist/lib/view-types/renderers/calendar-view-renderer.component.d.ts.map +1 -0
- package/dist/lib/view-types/renderers/calendar-view-renderer.component.js +501 -0
- package/dist/lib/view-types/renderers/calendar-view-renderer.component.js.map +1 -0
- package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts +9 -1
- package/dist/lib/view-types/renderers/grid-view-renderer.component.d.ts.map +1 -1
- package/dist/lib/view-types/renderers/grid-view-renderer.component.js +24 -5
- package/dist/lib/view-types/renderers/grid-view-renderer.component.js.map +1 -1
- package/dist/lib/view-types/renderers/map-view-renderer.component.d.ts.map +1 -1
- package/dist/lib/view-types/renderers/map-view-renderer.component.js +3 -3
- package/dist/lib/view-types/renderers/map-view-renderer.component.js.map +1 -1
- package/dist/lib/view-types/view-type.contracts.d.ts +6 -0
- package/dist/lib/view-types/view-type.contracts.d.ts.map +1 -1
- package/dist/lib/view-types/view-type.contracts.js.map +1 -1
- package/dist/lib/view-workspace/view-workspace.component.d.ts +54 -1
- package/dist/lib/view-workspace/view-workspace.component.d.ts.map +1 -1
- package/dist/lib/view-workspace/view-workspace.component.js +274 -27
- package/dist/lib/view-workspace/view-workspace.component.js.map +1 -1
- package/dist/module.d.ts +35 -31
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +21 -3
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +5 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +5 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +23 -21
|
@@ -2,13 +2,14 @@ import { Component, Input, Output, EventEmitter, ViewChild, ViewContainerRef, re
|
|
|
2
2
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
|
5
|
-
import { RunView, LogError } from '@memberjunction/core';
|
|
5
|
+
import { RunView, LogError, ViewPropertyValuesKey } from '@memberjunction/core';
|
|
6
6
|
import { UUIDsEqual } from '@memberjunction/global';
|
|
7
7
|
import { UserInfoEngine } from '@memberjunction/core-entities';
|
|
8
8
|
import { BuildCompositeKey, BuildPkString } from '../utils/record.util';
|
|
9
9
|
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
10
10
|
import { ResolveViewerConfig } from '../types';
|
|
11
11
|
import { ViewTypeEngine } from '../view-types';
|
|
12
|
+
import { BuildViewPropertyChips } from './view-property-chips';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
import * as i1 from "@memberjunction/ng-shared-generic";
|
|
14
15
|
import * as i2 from "@memberjunction/ng-ui-components";
|
|
@@ -16,21 +17,22 @@ import * as i3 from "../recycle-bin/recycle-bin-chip.component";
|
|
|
16
17
|
import * as i4 from "../view-type-switcher/view-type-switcher.component";
|
|
17
18
|
import * as i5 from "@angular/common";
|
|
18
19
|
const _c0 = ["dynamicViewHost"];
|
|
20
|
+
const _forTrack0 = ($index, $item) => $item.Name;
|
|
19
21
|
function EntityViewerComponent_Conditional_1_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
20
22
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
21
|
-
i0.ɵɵelementStart(0, "button",
|
|
23
|
+
i0.ɵɵelementStart(0, "button", 19);
|
|
22
24
|
i0.ɵɵlistener("click", function EntityViewerComponent_Conditional_1_Conditional_1_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.ClearFilter()); });
|
|
23
|
-
i0.ɵɵelement(1, "i",
|
|
25
|
+
i0.ɵɵelement(1, "i", 20);
|
|
24
26
|
i0.ɵɵelementEnd();
|
|
25
27
|
} }
|
|
26
28
|
function EntityViewerComponent_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
27
29
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
28
|
-
i0.ɵɵelementStart(0, "div",
|
|
29
|
-
i0.ɵɵelement(1, "i",
|
|
30
|
-
i0.ɵɵelementStart(2, "input",
|
|
30
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
31
|
+
i0.ɵɵelement(1, "i", 16);
|
|
32
|
+
i0.ɵɵelementStart(2, "input", 17);
|
|
31
33
|
i0.ɵɵlistener("input", function EntityViewerComponent_Conditional_1_Conditional_1_Template_input_input_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnFilterChange($event.target.value)); });
|
|
32
34
|
i0.ɵɵelementEnd();
|
|
33
|
-
i0.ɵɵconditionalCreate(3, EntityViewerComponent_Conditional_1_Conditional_1_Conditional_3_Template, 2, 0, "button",
|
|
35
|
+
i0.ɵɵconditionalCreate(3, EntityViewerComponent_Conditional_1_Conditional_1_Conditional_3_Template, 2, 0, "button", 18);
|
|
34
36
|
i0.ɵɵelementEnd();
|
|
35
37
|
} if (rf & 2) {
|
|
36
38
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -61,7 +63,7 @@ function EntityViewerComponent_Conditional_1_Conditional_2_Conditional_2_Templat
|
|
|
61
63
|
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(2, 1, ctx_r1.TotalRecordCount), " records");
|
|
62
64
|
} }
|
|
63
65
|
function EntityViewerComponent_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
64
|
-
i0.ɵɵelementStart(0, "div",
|
|
66
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
65
67
|
i0.ɵɵconditionalCreate(1, EntityViewerComponent_Conditional_1_Conditional_2_Conditional_1_Template, 4, 6, "span")(2, EntityViewerComponent_Conditional_1_Conditional_2_Conditional_2_Template, 3, 3, "span");
|
|
66
68
|
i0.ɵɵelementEnd();
|
|
67
69
|
} if (rf & 2) {
|
|
@@ -71,7 +73,7 @@ function EntityViewerComponent_Conditional_1_Conditional_2_Template(rf, ctx) { i
|
|
|
71
73
|
} }
|
|
72
74
|
function EntityViewerComponent_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
73
75
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
74
|
-
i0.ɵɵelementStart(0, "mj-view-type-switcher",
|
|
76
|
+
i0.ɵɵelementStart(0, "mj-view-type-switcher", 21);
|
|
75
77
|
i0.ɵɵlistener("ViewTypeSelected", function EntityViewerComponent_Conditional_1_Conditional_3_Template_mj_view_type_switcher_ViewTypeSelected_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SelectViewTypeById($event.viewTypeId)); });
|
|
76
78
|
i0.ɵɵelementEnd();
|
|
77
79
|
} if (rf & 2) {
|
|
@@ -79,17 +81,17 @@ function EntityViewerComponent_Conditional_1_Conditional_3_Template(rf, ctx) { i
|
|
|
79
81
|
i0.ɵɵproperty("Provider", ctx_r1.Provider)("Entity", ctx_r1.EffectiveEntity)("ActiveViewTypeID", ctx_r1.ActiveViewTypeId);
|
|
80
82
|
} }
|
|
81
83
|
function EntityViewerComponent_Conditional_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
82
|
-
i0.ɵɵelement(0, "mj-recycle-bin-chip",
|
|
84
|
+
i0.ɵɵelement(0, "mj-recycle-bin-chip", 15);
|
|
83
85
|
} if (rf & 2) {
|
|
84
86
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
85
|
-
i0.ɵɵproperty("EntityName", (ctx_r1.EffectiveEntity == null ? null : ctx_r1.EffectiveEntity.Name) ?? null);
|
|
87
|
+
i0.ɵɵproperty("Provider", ctx_r1.Provider)("EntityName", (ctx_r1.EffectiveEntity == null ? null : ctx_r1.EffectiveEntity.Name) ?? null);
|
|
86
88
|
} }
|
|
87
89
|
function EntityViewerComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
88
90
|
i0.ɵɵelementStart(0, "div", 2);
|
|
89
|
-
i0.ɵɵconditionalCreate(1, EntityViewerComponent_Conditional_1_Conditional_1_Template, 4, 3, "div",
|
|
90
|
-
i0.ɵɵconditionalCreate(2, EntityViewerComponent_Conditional_1_Conditional_2_Template, 3, 1, "div",
|
|
91
|
-
i0.ɵɵconditionalCreate(3, EntityViewerComponent_Conditional_1_Conditional_3_Template, 1, 3, "mj-view-type-switcher",
|
|
92
|
-
i0.ɵɵconditionalCreate(4, EntityViewerComponent_Conditional_1_Conditional_4_Template, 1,
|
|
91
|
+
i0.ɵɵconditionalCreate(1, EntityViewerComponent_Conditional_1_Conditional_1_Template, 4, 3, "div", 12);
|
|
92
|
+
i0.ɵɵconditionalCreate(2, EntityViewerComponent_Conditional_1_Conditional_2_Template, 3, 1, "div", 13);
|
|
93
|
+
i0.ɵɵconditionalCreate(3, EntityViewerComponent_Conditional_1_Conditional_3_Template, 1, 3, "mj-view-type-switcher", 14);
|
|
94
|
+
i0.ɵɵconditionalCreate(4, EntityViewerComponent_Conditional_1_Conditional_4_Template, 1, 2, "mj-recycle-bin-chip", 15);
|
|
93
95
|
i0.ɵɵelementEnd();
|
|
94
96
|
} if (rf & 2) {
|
|
95
97
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -102,16 +104,61 @@ function EntityViewerComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
102
104
|
i0.ɵɵadvance();
|
|
103
105
|
i0.ɵɵconditional(ctx_r1.ShowRecycleBin ? 4 : -1);
|
|
104
106
|
} }
|
|
105
|
-
function
|
|
106
|
-
i0.ɵɵelement(0, "
|
|
107
|
+
function EntityViewerComponent_Conditional_2_For_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
108
|
+
i0.ɵɵelement(0, "i", 25);
|
|
109
|
+
} }
|
|
110
|
+
function EntityViewerComponent_Conditional_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
+
i0.ɵɵelementStart(0, "span", 24);
|
|
112
|
+
i0.ɵɵconditionalCreate(1, EntityViewerComponent_Conditional_2_For_2_Conditional_1_Template, 1, 0, "i", 25);
|
|
113
|
+
i0.ɵɵelementStart(2, "span", 26);
|
|
114
|
+
i0.ɵɵtext(3);
|
|
115
|
+
i0.ɵɵelementEnd();
|
|
116
|
+
i0.ɵɵelementStart(4, "span", 27);
|
|
117
|
+
i0.ɵɵtext(5);
|
|
118
|
+
i0.ɵɵelementEnd()();
|
|
119
|
+
} if (rf & 2) {
|
|
120
|
+
const chip_r5 = ctx.$implicit;
|
|
121
|
+
i0.ɵɵclassProp("server-set", chip_r5.ServerSet);
|
|
122
|
+
i0.ɵɵattribute("title", chip_r5.Description);
|
|
123
|
+
i0.ɵɵadvance();
|
|
124
|
+
i0.ɵɵconditional(chip_r5.ServerSet ? 1 : -1);
|
|
125
|
+
i0.ɵɵadvance(2);
|
|
126
|
+
i0.ɵɵtextInterpolate(chip_r5.Name);
|
|
127
|
+
i0.ɵɵadvance(2);
|
|
128
|
+
i0.ɵɵtextInterpolate(chip_r5.Value);
|
|
129
|
+
} }
|
|
130
|
+
function EntityViewerComponent_Conditional_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
131
|
+
i0.ɵɵelementStart(0, "span", 23);
|
|
132
|
+
i0.ɵɵelement(1, "i", 28);
|
|
133
|
+
i0.ɵɵtext(2);
|
|
134
|
+
i0.ɵɵelementEnd();
|
|
135
|
+
} if (rf & 2) {
|
|
136
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
137
|
+
i0.ɵɵadvance(2);
|
|
138
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.ViewRunError, " ");
|
|
139
|
+
} }
|
|
140
|
+
function EntityViewerComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
141
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
142
|
+
i0.ɵɵrepeaterCreate(1, EntityViewerComponent_Conditional_2_For_2_Template, 6, 6, "span", 22, _forTrack0);
|
|
143
|
+
i0.ɵɵconditionalCreate(3, EntityViewerComponent_Conditional_2_Conditional_3_Template, 3, 1, "span", 23);
|
|
144
|
+
i0.ɵɵelementEnd();
|
|
145
|
+
} if (rf & 2) {
|
|
146
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
147
|
+
i0.ɵɵadvance();
|
|
148
|
+
i0.ɵɵrepeater(ctx_r1.PropertyChips);
|
|
149
|
+
i0.ɵɵadvance(2);
|
|
150
|
+
i0.ɵɵconditional(ctx_r1.ViewRunError ? 3 : -1);
|
|
107
151
|
} }
|
|
108
152
|
function EntityViewerComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
109
153
|
i0.ɵɵelement(0, "mj-empty-state", 9);
|
|
154
|
+
} }
|
|
155
|
+
function EntityViewerComponent_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
156
|
+
i0.ɵɵelement(0, "mj-empty-state", 10);
|
|
110
157
|
} if (rf & 2) {
|
|
111
158
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
112
159
|
i0.ɵɵproperty("Variant", ctx_r1.IsNoRecordsFiltered ? "no-results" : "empty")("Title", ctx_r1.NoRecordsTitle);
|
|
113
160
|
} }
|
|
114
|
-
function
|
|
161
|
+
function EntityViewerComponent_ng_template_11_Template(rf, ctx) { }
|
|
115
162
|
/**
|
|
116
163
|
* EntityViewerComponent - Full-featured composite component for viewing entity data
|
|
117
164
|
*
|
|
@@ -171,6 +218,7 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
171
218
|
_filterText = null;
|
|
172
219
|
_sortState = null;
|
|
173
220
|
_viewEntity = null;
|
|
221
|
+
_alternateBaseView = null;
|
|
174
222
|
_initialized = false;
|
|
175
223
|
/**
|
|
176
224
|
* When true, the next {@link LoadData} loads the full record set (up to
|
|
@@ -418,6 +466,9 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
418
466
|
this.selectDynamicRenderer(activeOption);
|
|
419
467
|
}
|
|
420
468
|
}
|
|
469
|
+
if (this._initialized) {
|
|
470
|
+
this.pushDynamicRendererInputs();
|
|
471
|
+
}
|
|
421
472
|
if (this._initialized && this._entity && !this._records) {
|
|
422
473
|
// Apply view's sort state if available, then defer the reload.
|
|
423
474
|
// Deferring ensures all sibling input bindings (gridState, etc.) are
|
|
@@ -427,6 +478,72 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
427
478
|
this.deferReload();
|
|
428
479
|
}
|
|
429
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* ID of the persisted `MJ: User Views` record backing the current view, or `null` for a dynamic /
|
|
483
|
+
* unsaved view. Pushed to view-type plug-ins so saved-view affordances (e.g. Open in Excel) work.
|
|
484
|
+
*/
|
|
485
|
+
get EffectiveSavedViewID() {
|
|
486
|
+
const view = this._viewEntity;
|
|
487
|
+
if (!view || view.IsSaved === false) {
|
|
488
|
+
return null;
|
|
489
|
+
}
|
|
490
|
+
return view.ID?.trim() || null;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Optional semantic `Name` of a registered alternate base view on the entity (`MJ: Entity Alternate Base Views.Name`).
|
|
494
|
+
* When provided, takes precedence over `ViewEntity.AlternateBaseView` for all `RunView` / `RunViews` queries.
|
|
495
|
+
*/
|
|
496
|
+
get AlternateBaseView() {
|
|
497
|
+
return this._alternateBaseView;
|
|
498
|
+
}
|
|
499
|
+
set AlternateBaseView(value) {
|
|
500
|
+
const normalized = value?.trim() || null;
|
|
501
|
+
const previous = this._alternateBaseView;
|
|
502
|
+
this._alternateBaseView = normalized;
|
|
503
|
+
if (this._initialized && normalized !== previous) {
|
|
504
|
+
this.pushDynamicRendererInputs();
|
|
505
|
+
if (this._entity && !this._records) {
|
|
506
|
+
this.resetPaginationState(false);
|
|
507
|
+
this.deferReload();
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Effective alternate base view semantic name: explicit `[AlternateBaseView]` input wins over
|
|
513
|
+
* `ViewEntity.AlternateBaseView`.
|
|
514
|
+
*/
|
|
515
|
+
get EffectiveAlternateBaseView() {
|
|
516
|
+
const raw = this._alternateBaseView ?? this.ViewEntity?.AlternateBaseView ?? null;
|
|
517
|
+
return raw?.trim() || null;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Values for the view's declared properties (`MJ: User Views.Properties`), keyed by property
|
|
521
|
+
* name. Used only when the view declares properties: the viewer then runs the view by its ID with
|
|
522
|
+
* these values, so the server applies the view's own filter and every property, including those
|
|
523
|
+
* only the server may set. The server refuses a value for a property that does not allow override.
|
|
524
|
+
*/
|
|
525
|
+
get Properties() {
|
|
526
|
+
return this._properties;
|
|
527
|
+
}
|
|
528
|
+
set Properties(value) {
|
|
529
|
+
const changed = ViewPropertyValuesKey(value ?? undefined) !== ViewPropertyValuesKey(this._properties ?? undefined);
|
|
530
|
+
this._properties = value;
|
|
531
|
+
if (changed && this._initialized && this._entity && !this._records && this.ViewHasProperties) {
|
|
532
|
+
this.resetPaginationState();
|
|
533
|
+
this.deferReload();
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
_properties = null;
|
|
537
|
+
/** True when the current view declares properties, so its rows are loaded by running it by ID. */
|
|
538
|
+
get ViewHasProperties() {
|
|
539
|
+
return (this._viewEntity?.PropertiesObject?.length ?? 0) > 0;
|
|
540
|
+
}
|
|
541
|
+
/** The read-only chips above the grid: one per view property, with the value this run gives it. */
|
|
542
|
+
get PropertyChips() {
|
|
543
|
+
return this.ViewHasProperties ? BuildViewPropertyChips(this._viewEntity?.PropertiesObject, this._properties) : [];
|
|
544
|
+
}
|
|
545
|
+
/** The server's message when a view with properties could not be run (for example, a refused value). */
|
|
546
|
+
ViewRunError = null;
|
|
430
547
|
_gridState = null;
|
|
431
548
|
/**
|
|
432
549
|
* True when {@link _gridState} was CAPTURED FROM THE RENDERER (the user resized, reordered or
|
|
@@ -598,6 +715,13 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
598
715
|
* it has been persisted). Notification only.
|
|
599
716
|
*/
|
|
600
717
|
AfterViewTypeChange = new EventEmitter();
|
|
718
|
+
/**
|
|
719
|
+
* Emitted whenever the active view type changes — including the initial registry reconciliation
|
|
720
|
+
* (where {@link AfterViewTypeChange} is intentionally suppressed because the user didn't initiate
|
|
721
|
+
* a switch). Hosts use this to sync fallback chrome (such as a fallback Export button for view
|
|
722
|
+
* types whose descriptor does not set `ProvidesOwnExport`).
|
|
723
|
+
*/
|
|
724
|
+
ActiveViewTypeResolved = new EventEmitter();
|
|
601
725
|
/**
|
|
602
726
|
* Emitted (cancelable) BEFORE a plug-in renderer's configuration change is applied/persisted.
|
|
603
727
|
*/
|
|
@@ -1098,7 +1222,8 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1098
1222
|
_pendingReloadKeepsPage = false;
|
|
1099
1223
|
/**
|
|
1100
1224
|
* Fetches the FULL result set for the current entity/view (up to {@link EXPORT_MAX_RECORDS}),
|
|
1101
|
-
* honoring the active sort, business filter (WhereClause
|
|
1225
|
+
* honoring the active sort, business filter (`WhereClause`, or running by `ViewID` with
|
|
1226
|
+
* `Properties` when the view declares properties) and user search — used by the grid's
|
|
1102
1227
|
* export and add-all-to-list flows so they aren't capped at the on-screen page (bugs C1/E3). Bound
|
|
1103
1228
|
* as an arrow property so it can be pushed to a dynamically-mounted renderer's `exportDataProvider`
|
|
1104
1229
|
* input without losing `this`. If the true result count exceeds the cap, the user is warned that
|
|
@@ -1127,14 +1252,13 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1127
1252
|
.join(', ');
|
|
1128
1253
|
}
|
|
1129
1254
|
const result = await rv.RunView({
|
|
1130
|
-
|
|
1255
|
+
...this.BuildViewTargetParams(entity),
|
|
1131
1256
|
ResultType: 'simple',
|
|
1132
1257
|
// No page window — load every matching row up to the safety cap, honoring the same
|
|
1133
|
-
// business filter
|
|
1258
|
+
// business filter, view properties and user search as the paged load path.
|
|
1134
1259
|
MaxRows: EntityViewerComponent.EXPORT_MAX_RECORDS,
|
|
1135
1260
|
StartRow: 0,
|
|
1136
1261
|
OrderBy: orderBy,
|
|
1137
|
-
ExtraFilter: this.ViewEntity?.WhereClause || undefined,
|
|
1138
1262
|
UserSearchString: config.serverSideFiltering && !this.ViewEntity?.SmartFilterEnabled
|
|
1139
1263
|
? this.DebouncedFilterText || undefined
|
|
1140
1264
|
: undefined
|
|
@@ -1142,9 +1266,9 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1142
1266
|
if (result.Success) {
|
|
1143
1267
|
// Non-silent cap: if the entity has more matching rows than we're allowed to pull at once,
|
|
1144
1268
|
// tell the user the operation covered the first N — don't let it look like the full set.
|
|
1145
|
-
if (result.TotalRowCount > EntityViewerComponent.EXPORT_MAX_RECORDS) {
|
|
1269
|
+
if ((result.TotalRowCount ?? 0) > EntityViewerComponent.EXPORT_MAX_RECORDS) {
|
|
1146
1270
|
MJNotificationService.Instance.CreateSimpleNotification(`This operation is limited to the first ${EntityViewerComponent.EXPORT_MAX_RECORDS.toLocaleString()} of ` +
|
|
1147
|
-
`${result.TotalRowCount.toLocaleString()} matching records. Narrow the view with a filter to include the rest.`, 'warning', 6000);
|
|
1271
|
+
`${(result.TotalRowCount ?? 0).toLocaleString()} matching records. Narrow the view with a filter to include the rest.`, 'warning', 6000);
|
|
1148
1272
|
}
|
|
1149
1273
|
return result.Results;
|
|
1150
1274
|
}
|
|
@@ -1154,6 +1278,30 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1154
1278
|
}
|
|
1155
1279
|
return this.InternalRecords;
|
|
1156
1280
|
};
|
|
1281
|
+
/**
|
|
1282
|
+
* The params that aim a run at this view's rows. A view with properties runs by its ID, with
|
|
1283
|
+
* {@link Properties}, so the server applies the view's own filter and every property, including
|
|
1284
|
+
* those only it may set. Every other view keeps the dynamic run it has always had: the entity
|
|
1285
|
+
* plus the view's WhereClause as ExtraFilter.
|
|
1286
|
+
*/
|
|
1287
|
+
BuildViewTargetParams(entity) {
|
|
1288
|
+
const view = this._viewEntity;
|
|
1289
|
+
const altBaseView = this.EffectiveAlternateBaseView || undefined;
|
|
1290
|
+
const abvSpread = altBaseView ? { AlternateBaseView: altBaseView } : {};
|
|
1291
|
+
if (!view || !this.ViewHasProperties) {
|
|
1292
|
+
return { EntityName: entity.Name, ExtraFilter: view?.WhereClause || undefined, ...abvSpread };
|
|
1293
|
+
}
|
|
1294
|
+
return {
|
|
1295
|
+
EntityName: entity.Name,
|
|
1296
|
+
ViewID: view.ID,
|
|
1297
|
+
ViewEntity: view,
|
|
1298
|
+
Properties: { ...(this._properties ?? {}) },
|
|
1299
|
+
...abvSpread,
|
|
1300
|
+
// A stored view returns only its saved columns; ask for what the dynamic run returns, so
|
|
1301
|
+
// every view type and the export get the same columns either way.
|
|
1302
|
+
Fields: entity.Fields.filter(f => !f.IsBinaryFieldType).map(f => f.Name),
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1157
1305
|
/**
|
|
1158
1306
|
* Load data for the current entity with server-side filtering/sorting/pagination
|
|
1159
1307
|
*/
|
|
@@ -1205,9 +1353,9 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1205
1353
|
// — the container never inspects which plug-in is mounted.
|
|
1206
1354
|
const maxRows = this._loadAllRecords ? EntityViewerComponent.LOAD_ALL_MAX_RECORDS : config.pageSize;
|
|
1207
1355
|
const startRow = this._loadAllRecords ? 0 : this.Pagination.currentPage * config.pageSize;
|
|
1208
|
-
//
|
|
1209
|
-
//
|
|
1210
|
-
const
|
|
1356
|
+
// The view's WhereClause is the "business filter" (or, for a view with properties, the view
|
|
1357
|
+
// itself run by ID) - UserSearchString is additive
|
|
1358
|
+
const target = this.BuildViewTargetParams(entity);
|
|
1211
1359
|
const userSearchString = config.serverSideFiltering && !this.ViewEntity?.SmartFilterEnabled
|
|
1212
1360
|
? this.DebouncedFilterText || undefined
|
|
1213
1361
|
: undefined;
|
|
@@ -1216,18 +1364,16 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1216
1364
|
// page length whenever the server skipped COUNT.
|
|
1217
1365
|
const [result, countResult] = await rv.RunViews([
|
|
1218
1366
|
{
|
|
1219
|
-
|
|
1367
|
+
...target,
|
|
1220
1368
|
ResultType: 'simple',
|
|
1221
1369
|
MaxRows: maxRows,
|
|
1222
1370
|
StartRow: startRow,
|
|
1223
1371
|
OrderBy: orderBy,
|
|
1224
|
-
ExtraFilter: extraFilter,
|
|
1225
1372
|
UserSearchString: userSearchString,
|
|
1226
1373
|
},
|
|
1227
1374
|
{
|
|
1228
|
-
|
|
1375
|
+
...target,
|
|
1229
1376
|
ResultType: 'count_only',
|
|
1230
|
-
ExtraFilter: extraFilter,
|
|
1231
1377
|
UserSearchString: userSearchString,
|
|
1232
1378
|
IgnoreMaxRows: true,
|
|
1233
1379
|
},
|
|
@@ -1236,12 +1382,13 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1236
1382
|
if (loadId !== this._loadSequence) {
|
|
1237
1383
|
return;
|
|
1238
1384
|
}
|
|
1385
|
+
this.ViewRunError = !result.Success && target.ViewID ? result.ErrorMessage || 'The view could not be run.' : null;
|
|
1239
1386
|
if (result.Success) {
|
|
1240
1387
|
// Always replace records (page-based navigation, not accumulation)
|
|
1241
1388
|
this.InternalRecords = result.Results;
|
|
1242
1389
|
const total = countResult?.Success && countResult.TotalRowCount != null
|
|
1243
1390
|
? countResult.TotalRowCount
|
|
1244
|
-
: result.TotalRowCount;
|
|
1391
|
+
: result.TotalRowCount ?? 0;
|
|
1245
1392
|
this.TotalRecordCount = total;
|
|
1246
1393
|
this.FilteredRecordCount = this.InternalRecords.length;
|
|
1247
1394
|
// Update pagination state
|
|
@@ -1259,19 +1406,24 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1259
1406
|
});
|
|
1260
1407
|
}
|
|
1261
1408
|
else {
|
|
1262
|
-
|
|
1263
|
-
this.InternalRecords = [];
|
|
1264
|
-
}
|
|
1409
|
+
this.InternalRecords = [];
|
|
1265
1410
|
this.TotalRecordCount = 0;
|
|
1266
1411
|
this.FilteredRecordCount = 0;
|
|
1412
|
+
this.Pagination.totalRecords = 0;
|
|
1413
|
+
if (result.ErrorMessage) {
|
|
1414
|
+
LogError(`[EntityViewer] Failed to load data for "${entity.Name}": ${result.ErrorMessage}`);
|
|
1415
|
+
MJNotificationService.Instance?.CreateSimpleNotification(result.ErrorMessage, 'error', 5000);
|
|
1416
|
+
}
|
|
1267
1417
|
}
|
|
1268
1418
|
}
|
|
1269
1419
|
catch (error) {
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
}
|
|
1420
|
+
this.ViewRunError = this.ViewHasProperties ? (error instanceof Error ? error.message : String(error)) : null;
|
|
1421
|
+
this.InternalRecords = [];
|
|
1273
1422
|
this.TotalRecordCount = 0;
|
|
1274
1423
|
this.FilteredRecordCount = 0;
|
|
1424
|
+
this.Pagination.totalRecords = 0;
|
|
1425
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
1426
|
+
LogError(`[EntityViewer] Exception loading data for "${entity.Name}": ${errMsg}`);
|
|
1275
1427
|
}
|
|
1276
1428
|
finally {
|
|
1277
1429
|
// Use ngZone.run() to ensure state changes trigger change detection.
|
|
@@ -1468,7 +1620,10 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1468
1620
|
get ActiveViewTypeHasOwnExport() {
|
|
1469
1621
|
const opt = this.ActiveDynamicOption;
|
|
1470
1622
|
if (!opt) {
|
|
1471
|
-
|
|
1623
|
+
// Before ViewTypeEngine finishes initial resolution, no renderer is mounted yet and Grid is
|
|
1624
|
+
// the default view type; return true so hosts don't flash a duplicate fallback Export button
|
|
1625
|
+
// ahead of ActiveViewTypeResolved.
|
|
1626
|
+
return true;
|
|
1472
1627
|
}
|
|
1473
1628
|
// Primary signal: the descriptor's declarative capability flag. Belt-and-suspenders: also match
|
|
1474
1629
|
// the grid's stable DriverClass key, in case a descriptor was resolved via the hardcoded fallback
|
|
@@ -1624,6 +1779,9 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1624
1779
|
this.resetPaginationState(false);
|
|
1625
1780
|
this.LoadData();
|
|
1626
1781
|
}
|
|
1782
|
+
if (typeChanged) {
|
|
1783
|
+
this.ActiveViewTypeResolved.emit();
|
|
1784
|
+
}
|
|
1627
1785
|
if (emit) {
|
|
1628
1786
|
if (this.AutoSaveView) {
|
|
1629
1787
|
void this.persistActiveViewType(option);
|
|
@@ -1900,6 +2058,8 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
1900
2058
|
this.setDynamicInput(ref, 'page', this.Pagination.currentPage + 1);
|
|
1901
2059
|
this.setDynamicInput(ref, 'pageSize', this.Pagination.pageSize);
|
|
1902
2060
|
this.setDynamicInput(ref, 'isLoading', this.IsLoading);
|
|
2061
|
+
this.setDynamicInput(ref, 'alternateBaseView', this.EffectiveAlternateBaseView);
|
|
2062
|
+
this.setDynamicInput(ref, 'SavedViewID', this.EffectiveSavedViewID);
|
|
1903
2063
|
}
|
|
1904
2064
|
// ========================================
|
|
1905
2065
|
// CANONICAL GRID-STATE BRIDGE
|
|
@@ -2121,24 +2281,27 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
2121
2281
|
} if (rf & 2) {
|
|
2122
2282
|
let _t;
|
|
2123
2283
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dynamicViewHost = _t.first);
|
|
2124
|
-
} }, hostAttrs: [2, "display", "block", "height", "100%"], inputs: { Entity: "Entity", EntityName: "EntityName", EntityID: "EntityID", ViewID: "ViewID", Records: "Records", Config: "Config", SelectedRecordID: "SelectedRecordID", FilterText: "FilterText", SortState: "SortState", ViewEntity: "ViewEntity", GridState: "GridState", ShowRecycleBin: "ShowRecycleBin", ViewTypeID: "ViewTypeID", ViewTypeConfigs: "ViewTypeConfigs", AutoSaveView: "AutoSaveView" }, outputs: { RecordSelected: "RecordSelected", RecordOpened: "RecordOpened", DataLoaded: "DataLoaded", FilterTextChange: "FilterTextChange", FilteredCountChanged: "FilteredCountChanged", OpenRelatedRecordRequested: "OpenRelatedRecordRequested", CreateRecordRequested: "CreateRecordRequested", ConfigureRequested: "ConfigureRequested", BeforeViewTypeChange: "BeforeViewTypeChange", AfterViewTypeChange: "AfterViewTypeChange", BeforeViewTypeConfigChange: "BeforeViewTypeConfigChange", AfterViewTypeConfigChange: "AfterViewTypeConfigChange" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
2284
|
+
} }, hostAttrs: [2, "display", "block", "height", "100%"], inputs: { Entity: "Entity", EntityName: "EntityName", EntityID: "EntityID", ViewID: "ViewID", Records: "Records", Config: "Config", SelectedRecordID: "SelectedRecordID", FilterText: "FilterText", SortState: "SortState", ViewEntity: "ViewEntity", AlternateBaseView: "AlternateBaseView", Properties: "Properties", GridState: "GridState", ShowRecycleBin: "ShowRecycleBin", ViewTypeID: "ViewTypeID", ViewTypeConfigs: "ViewTypeConfigs", AutoSaveView: "AutoSaveView" }, outputs: { RecordSelected: "RecordSelected", RecordOpened: "RecordOpened", DataLoaded: "DataLoaded", FilterTextChange: "FilterTextChange", FilteredCountChanged: "FilteredCountChanged", OpenRelatedRecordRequested: "OpenRelatedRecordRequested", CreateRecordRequested: "CreateRecordRequested", ConfigureRequested: "ConfigureRequested", BeforeViewTypeChange: "BeforeViewTypeChange", AfterViewTypeChange: "AfterViewTypeChange", ActiveViewTypeResolved: "ActiveViewTypeResolved", BeforeViewTypeConfigChange: "BeforeViewTypeConfigChange", AfterViewTypeConfigChange: "AfterViewTypeConfigChange" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 13, vars: 11, consts: [["dynamicViewHost", ""], [1, "entity-viewer-container"], [1, "viewer-header"], ["role", "list", "aria-label", "View properties", 1, "view-properties-row"], [1, "viewer-content"], [1, "loading-container", 3, "hidden"], ["size", "medium", 3, "text"], [1, "loading-overlay", 3, "hidden"], ["size", "small", 3, "text"], ["Icon", "fa-solid fa-database", "Title", "Select an entity to view records", 1, "empty-state-fill"], [1, "empty-state-fill", 3, "Variant", "Title"], [1, "dynamic-view-host", 3, "hidden"], [1, "filter-container"], [1, "record-count"], [3, "Provider", "Entity", "ActiveViewTypeID"], [3, "Provider", "EntityName"], [1, "fa-solid", "fa-search", "filter-icon"], ["type", "text", 1, "filter-input", 3, "input", "placeholder", "value"], ["title", "Clear filter", 1, "clear-filter-btn"], ["title", "Clear filter", 1, "clear-filter-btn", 3, "click"], [1, "fa-solid", "fa-times"], [3, "ViewTypeSelected", "Provider", "Entity", "ActiveViewTypeID"], ["role", "listitem", 1, "view-property-chip", 3, "server-set"], ["role", "alert", 1, "view-properties-error"], ["role", "listitem", 1, "view-property-chip"], ["aria-hidden", "true", 1, "fa-solid", "fa-lock"], [1, "view-property-name"], [1, "view-property-value"], ["aria-hidden", "true", 1, "fa-solid", "fa-triangle-exclamation"]], template: function EntityViewerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2125
2285
|
i0.ɵɵelementStart(0, "div", 1);
|
|
2126
2286
|
i0.ɵɵconditionalCreate(1, EntityViewerComponent_Conditional_1_Template, 5, 4, "div", 2);
|
|
2127
|
-
i0.ɵɵ
|
|
2128
|
-
i0.ɵɵ
|
|
2287
|
+
i0.ɵɵconditionalCreate(2, EntityViewerComponent_Conditional_2_Template, 4, 1, "div", 3);
|
|
2288
|
+
i0.ɵɵelementStart(3, "div", 4)(4, "div", 5);
|
|
2289
|
+
i0.ɵɵelement(5, "mj-loading", 6);
|
|
2129
2290
|
i0.ɵɵelementEnd();
|
|
2130
|
-
i0.ɵɵelementStart(
|
|
2131
|
-
i0.ɵɵelement(
|
|
2291
|
+
i0.ɵɵelementStart(6, "div", 7);
|
|
2292
|
+
i0.ɵɵelement(7, "mj-loading", 8);
|
|
2132
2293
|
i0.ɵɵelementEnd();
|
|
2133
|
-
i0.ɵɵconditionalCreate(
|
|
2134
|
-
i0.ɵɵconditionalCreate(
|
|
2135
|
-
i0.ɵɵelementStart(
|
|
2136
|
-
i0.ɵɵtemplate(
|
|
2294
|
+
i0.ɵɵconditionalCreate(8, EntityViewerComponent_Conditional_8_Template, 1, 0, "mj-empty-state", 9);
|
|
2295
|
+
i0.ɵɵconditionalCreate(9, EntityViewerComponent_Conditional_9_Template, 1, 2, "mj-empty-state", 10);
|
|
2296
|
+
i0.ɵɵelementStart(10, "div", 11);
|
|
2297
|
+
i0.ɵɵtemplate(11, EntityViewerComponent_ng_template_11_Template, 0, 0, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
2137
2298
|
i0.ɵɵelementEnd()()();
|
|
2138
2299
|
} if (rf & 2) {
|
|
2139
2300
|
i0.ɵɵstyleProp("height", ctx.EffectiveConfig.height);
|
|
2140
2301
|
i0.ɵɵadvance();
|
|
2141
2302
|
i0.ɵɵconditional(ctx.EffectiveConfig.showFilter || ctx.EffectiveConfig.showViewModeToggle || ctx.EffectiveConfig.showRecordCount ? 1 : -1);
|
|
2303
|
+
i0.ɵɵadvance();
|
|
2304
|
+
i0.ɵɵconditional(ctx.PropertyChips.length > 0 ? 2 : -1);
|
|
2142
2305
|
i0.ɵɵadvance(2);
|
|
2143
2306
|
i0.ɵɵproperty("hidden", !(ctx.IsLoading && ctx.FilteredRecords.length === 0));
|
|
2144
2307
|
i0.ɵɵadvance();
|
|
@@ -2148,18 +2311,18 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
2148
2311
|
i0.ɵɵadvance();
|
|
2149
2312
|
i0.ɵɵproperty("text", ctx.LoadingMessage);
|
|
2150
2313
|
i0.ɵɵadvance();
|
|
2151
|
-
i0.ɵɵconditional(!ctx.EffectiveEntity ?
|
|
2314
|
+
i0.ɵɵconditional(!ctx.EffectiveEntity ? 8 : -1);
|
|
2152
2315
|
i0.ɵɵadvance();
|
|
2153
|
-
i0.ɵɵconditional(ctx.EffectiveEntity && ctx.FilteredRecords.length === 0 && !ctx.IsLoading && !ctx.IsDynamicViewActive ?
|
|
2316
|
+
i0.ɵɵconditional(ctx.EffectiveEntity && ctx.FilteredRecords.length === 0 && !ctx.IsLoading && !ctx.IsDynamicViewActive ? 9 : -1);
|
|
2154
2317
|
i0.ɵɵadvance();
|
|
2155
2318
|
i0.ɵɵproperty("hidden", !ctx.EffectiveEntity);
|
|
2156
|
-
} }, dependencies: [i1.LoadingComponent, i2.MJEmptyStateComponent, i3.RecycleBinChipComponent, i4.ViewTypeSwitcherComponent, i5.DecimalPipe], styles: [".entity-viewer-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: var(--mj-bg-surface-card);\n}\n\n\n.viewer-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 12px 16px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n flex-shrink: 0;\n}\n\n\n.filter-container[_ngcontent-%COMP%] {\n flex: 1;\n max-width: 400px;\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.filter-icon[_ngcontent-%COMP%] {\n position: absolute;\n left: 12px;\n color: var(--mj-text-disabled);\n font-size: 14px;\n pointer-events: none;\n}\n\n.filter-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 36px 8px 36px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 14px;\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.filter-input[_ngcontent-%COMP%]:focus {\n border-color: var(--mj-brand-primary);\n}\n\n.filter-input[_ngcontent-%COMP%]::placeholder {\n color: var(--mj-text-disabled);\n}\n\n.clear-filter-btn[_ngcontent-%COMP%] {\n position: absolute;\n right: 8px;\n width: 20px;\n height: 20px;\n border: none;\n background: transparent;\n border-radius: 50%;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-disabled);\n transition: all 0.15s ease;\n}\n\n.clear-filter-btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n}\n\n\n.record-count[_ngcontent-%COMP%] {\n font-size: 13px;\n color: var(--mj-text-muted);\n white-space: nowrap;\n}\n\n\n.view-mode-toggle[_ngcontent-%COMP%] {\n display: flex;\n background: var(--mj-bg-surface-card);\n border-radius: 6px;\n padding: 2px;\n}\n\n.toggle-btn[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-muted);\n transition: all 0.15s ease;\n}\n\n.toggle-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-secondary);\n}\n\n.toggle-btn.active[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n\n.view-type-dropdown[_ngcontent-%COMP%] {\n position: relative;\n display: inline-flex;\n}\n\n.view-type-dropdown-trigger[_ngcontent-%COMP%] {\n width: auto;\n gap: 6px;\n padding: 0 10px;\n}\n\n.view-type-dropdown-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n}\n\n.view-type-dropdown-caret[_ngcontent-%COMP%] {\n font-size: 10px;\n opacity: 0.7;\n}\n\n.view-type-dropdown-menu[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 20;\n min-width: 180px;\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px color-mix(in srgb, var(--mj-text-primary) 14%, transparent);\n padding: 4px;\n display: flex;\n flex-direction: column;\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 10px;\n border: none;\n background: transparent;\n border-radius: 6px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 13px;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.view-type-dropdown-item.active[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n width: 16px;\n text-align: center;\n}\n\n\n.dynamic-view-host[_ngcontent-%COMP%] {\n height: 100%;\n width: 100%;\n overflow: auto;\n}\n\n\n.viewer-content[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n position: relative;\n background: var(--mj-bg-surface);\n}\n\n\n.loading-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n\n.loading-overlay[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: color-mix(in srgb, var(--mj-bg-surface) 80%, transparent);\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n\n.loading-container[hidden][_ngcontent-%COMP%], \n.loading-overlay[hidden][_ngcontent-%COMP%] {\n display: none !important;\n}\n\n\n.empty-state-fill[_ngcontent-%COMP%] {\n height: 100%;\n}\n\n\n.dynamic-view-host[hidden][_ngcontent-%COMP%] {\n display: none !important;\n}"] });
|
|
2319
|
+
} }, dependencies: [i1.LoadingComponent, i2.MJEmptyStateComponent, i3.RecycleBinChipComponent, i4.ViewTypeSwitcherComponent, i5.DecimalPipe], styles: [".entity-viewer-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: var(--mj-bg-surface-card);\n}\n\n\n.viewer-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 12px 16px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n flex-shrink: 0;\n}\n\n\n.view-properties-row[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-2) var(--mj-space-4);\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-subtle);\n flex-shrink: 0;\n}\n\n.view-property-chip[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-1);\n padding: 3px 10px;\n border-radius: var(--mj-radius-full);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n font-size: var(--mj-text-xs);\n}\n\n.view-property-name[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n}\n\n.view-property-value[_ngcontent-%COMP%] {\n color: var(--mj-text-primary);\n font-weight: 600;\n}\n\n.view-property-chip.server-set[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-info) 8%, var(--mj-bg-surface));\n border-color: color-mix(in srgb, var(--mj-status-info) 25%, var(--mj-border-default));\n}\n\n.view-property-chip.server-set[_ngcontent-%COMP%] .view-property-value[_ngcontent-%COMP%] {\n color: var(--mj-text-secondary);\n font-weight: 500;\n}\n\n.view-properties-error[_ngcontent-%COMP%] {\n color: var(--mj-status-error-text);\n font-size: var(--mj-text-xs);\n}\n\n\n.filter-container[_ngcontent-%COMP%] {\n flex: 1;\n max-width: 400px;\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.filter-icon[_ngcontent-%COMP%] {\n position: absolute;\n left: 12px;\n color: var(--mj-text-disabled);\n font-size: 14px;\n pointer-events: none;\n}\n\n.filter-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 36px 8px 36px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 14px;\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.filter-input[_ngcontent-%COMP%]:focus {\n border-color: var(--mj-brand-primary);\n}\n\n.filter-input[_ngcontent-%COMP%]::placeholder {\n color: var(--mj-text-disabled);\n}\n\n.clear-filter-btn[_ngcontent-%COMP%] {\n position: absolute;\n right: 8px;\n width: 20px;\n height: 20px;\n border: none;\n background: transparent;\n border-radius: 50%;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-disabled);\n transition: all 0.15s ease;\n}\n\n.clear-filter-btn[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n}\n\n\n.record-count[_ngcontent-%COMP%] {\n font-size: 13px;\n color: var(--mj-text-muted);\n white-space: nowrap;\n}\n\n\n.view-mode-toggle[_ngcontent-%COMP%] {\n display: flex;\n background: var(--mj-bg-surface-card);\n border-radius: 6px;\n padding: 2px;\n}\n\n.toggle-btn[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-muted);\n transition: all 0.15s ease;\n}\n\n.toggle-btn[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-secondary);\n}\n\n.toggle-btn.active[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n\n.view-type-dropdown[_ngcontent-%COMP%] {\n position: relative;\n display: inline-flex;\n}\n\n.view-type-dropdown-trigger[_ngcontent-%COMP%] {\n width: auto;\n gap: 6px;\n padding: 0 10px;\n}\n\n.view-type-dropdown-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n}\n\n.view-type-dropdown-caret[_ngcontent-%COMP%] {\n font-size: 10px;\n opacity: 0.7;\n}\n\n.view-type-dropdown-menu[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 20;\n min-width: 180px;\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px color-mix(in srgb, var(--mj-text-primary) 14%, transparent);\n padding: 4px;\n display: flex;\n flex-direction: column;\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 10px;\n border: none;\n background: transparent;\n border-radius: 6px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 13px;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.view-type-dropdown-item.active[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.view-type-dropdown-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n width: 16px;\n text-align: center;\n}\n\n\n\n\n\n\n.dynamic-view-host[_ngcontent-%COMP%] {\n height: 100%;\n width: 100%;\n overflow: auto;\n position: relative;\n}\n\n\n.viewer-content[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n position: relative;\n background: var(--mj-bg-surface);\n}\n\n\n.loading-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n\n.loading-overlay[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: color-mix(in srgb, var(--mj-bg-surface) 80%, transparent);\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n\n.loading-container[hidden][_ngcontent-%COMP%], \n.loading-overlay[hidden][_ngcontent-%COMP%] {\n display: none !important;\n}\n\n\n.empty-state-fill[_ngcontent-%COMP%] {\n height: 100%;\n}\n\n\n.dynamic-view-host[hidden][_ngcontent-%COMP%] {\n display: none !important;\n}"] });
|
|
2157
2320
|
}
|
|
2158
2321
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityViewerComponent, [{
|
|
2159
2322
|
type: Component,
|
|
2160
2323
|
args: [{ standalone: false, selector: 'mj-entity-viewer', host: {
|
|
2161
2324
|
'style': 'display: block; height: 100%;'
|
|
2162
|
-
}, template: "<div class=\"entity-viewer-container\" [style.height]=\"EffectiveConfig.height\">\n <!-- Header -->\n @if (EffectiveConfig.showFilter || EffectiveConfig.showViewModeToggle || EffectiveConfig.showRecordCount) {\n <div class=\"viewer-header\">\n <!-- Filter Input -->\n @if (EffectiveConfig.showFilter) {\n <div class=\"filter-container\">\n <i class=\"fa-solid fa-search filter-icon\"></i>\n <input\n type=\"text\"\n class=\"filter-input\"\n [placeholder]=\"EffectiveConfig.filterPlaceholder\"\n [value]=\"EffectiveFilterText\"\n (input)=\"OnFilterChange($any($event.target).value)\"\n />\n @if (EffectiveFilterText) {\n <button class=\"clear-filter-btn\" (click)=\"ClearFilter()\" title=\"Clear filter\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n }\n\n <!-- Record Count -->\n @if (EffectiveConfig.showRecordCount && EffectiveEntity) {\n <div class=\"record-count\">\n @if (FilteredRecordCount !== TotalRecordCount) {\n <span>{{ FilteredRecordCount | number }} of {{ TotalRecordCount | number }} records</span>\n } @else {\n <span>{{ TotalRecordCount | number }} records</span>\n }\n </div>\n }\n\n <!-- View Type Toggle \u2014 the reusable switcher, driven entirely by the MJ: View Types\n registry (ViewTypeEngine). The available types and their icons come from metadata\n (ViewType.Icon), filtered by each descriptor's availability predicate. Selecting routes\n back through SelectViewTypeById, which mounts the chosen descriptor's RendererComponent\n into #dynamicViewHost. The container has zero knowledge of any view type's chrome. -->\n @if (EffectiveConfig.showViewModeToggle) {\n <mj-view-type-switcher\n [Provider]=\"Provider\"\n [Entity]=\"EffectiveEntity\"\n [ActiveViewTypeID]=\"ActiveViewTypeId\"\n (ViewTypeSelected)=\"SelectViewTypeById($event.viewTypeId)\">\n </mj-view-type-switcher>\n }\n\n <!-- Recycle Bin chip (auto-hides when entity has no deleted records, no tracking,\n or user lacks Delete permission) -->\n @if (ShowRecycleBin) {\n <mj-recycle-bin-chip [EntityName]=\"EffectiveEntity?.Name ?? null\"></mj-recycle-bin-chip>\n }\n </div>\n }\n\n <!-- Content -->\n <div class=\"viewer-content\">\n <!-- Loading container - full page when no data exists -->\n <div class=\"loading-container\" [hidden]=\"!(IsLoading && FilteredRecords.length === 0)\">\n <mj-loading [text]=\"LoadingMessage\" size=\"medium\"></mj-loading>\n </div>\n\n <!-- Loading overlay - shown on top of content when loading with existing data -->\n <div class=\"loading-overlay\" [hidden]=\"!(IsLoading && FilteredRecords.length > 0)\">\n <mj-loading [text]=\"LoadingMessage\" size=\"small\"></mj-loading>\n </div>\n\n <!-- Empty state: no entity selected -->\n @if (!EffectiveEntity) {\n <mj-empty-state\n class=\"empty-state-fill\"\n Icon=\"fa-solid fa-database\"\n Title=\"Select an entity to view records\" />\n }\n\n <!-- Empty state: no records found. Suppressed while a plug-in is active \u2014 every plug-in renders\n its own empty/loading state, so the container never shows a generic \"no records\" over it. -->\n @if (EffectiveEntity && FilteredRecords.length === 0 && !IsLoading && !IsDynamicViewActive) {\n <mj-empty-state\n class=\"empty-state-fill\"\n [Variant]=\"IsNoRecordsFiltered ? 'no-results' : 'empty'\"\n [Title]=\"NoRecordsTitle\" />\n }\n\n <!-- Plug-in (dynamic) view renderer host \u2014 the ONLY render path. The active descriptor's\n RendererComponent is created into #dynamicViewHost via ViewContainerRef and fed the generic\n IViewRenderer contract. Shown whenever there's an entity; the plug-in owns all its chrome. -->\n <div class=\"dynamic-view-host\" [hidden]=\"!EffectiveEntity\">\n <ng-template #dynamicViewHost></ng-template>\n </div>\n </div>\n\n</div>\n", styles: [".entity-viewer-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: var(--mj-bg-surface-card);\n}\n\n/* Header */\n.viewer-header {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 12px 16px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n flex-shrink: 0;\n}\n\n/* Filter */\n.filter-container {\n flex: 1;\n max-width: 400px;\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.filter-icon {\n position: absolute;\n left: 12px;\n color: var(--mj-text-disabled);\n font-size: 14px;\n pointer-events: none;\n}\n\n.filter-input {\n width: 100%;\n padding: 8px 36px 8px 36px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 14px;\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.filter-input:focus {\n border-color: var(--mj-brand-primary);\n}\n\n.filter-input::placeholder {\n color: var(--mj-text-disabled);\n}\n\n.clear-filter-btn {\n position: absolute;\n right: 8px;\n width: 20px;\n height: 20px;\n border: none;\n background: transparent;\n border-radius: 50%;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-disabled);\n transition: all 0.15s ease;\n}\n\n.clear-filter-btn:hover {\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n}\n\n/* Record Count */\n.record-count {\n font-size: 13px;\n color: var(--mj-text-muted);\n white-space: nowrap;\n}\n\n/* View Mode Toggle */\n.view-mode-toggle {\n display: flex;\n background: var(--mj-bg-surface-card);\n border-radius: 6px;\n padding: 2px;\n}\n\n.toggle-btn {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-muted);\n transition: all 0.15s ease;\n}\n\n.toggle-btn:hover {\n color: var(--mj-text-secondary);\n}\n\n.toggle-btn.active {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* Compact view-type dropdown \u2014 used when there are more view types than the strip threshold */\n.view-type-dropdown {\n position: relative;\n display: inline-flex;\n}\n\n.view-type-dropdown-trigger {\n width: auto;\n gap: 6px;\n padding: 0 10px;\n}\n\n.view-type-dropdown-label {\n font-size: 13px;\n font-weight: 500;\n}\n\n.view-type-dropdown-caret {\n font-size: 10px;\n opacity: 0.7;\n}\n\n.view-type-dropdown-menu {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 20;\n min-width: 180px;\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px color-mix(in srgb, var(--mj-text-primary) 14%, transparent);\n padding: 4px;\n display: flex;\n flex-direction: column;\n}\n\n.view-type-dropdown-item {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 10px;\n border: none;\n background: transparent;\n border-radius: 6px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 13px;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.view-type-dropdown-item:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.view-type-dropdown-item.active {\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.view-type-dropdown-item i {\n width: 16px;\n text-align: center;\n}\n\n/* Host for dynamically-mounted plug-in view renderers (Cluster, third-party) */\n.dynamic-view-host {\n height: 100%;\n width: 100%;\n overflow: auto;\n}\n\n/* Content */\n.viewer-content {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n position: relative;\n background: var(--mj-bg-surface);\n}\n\n/* Loading State - full-page centered loading for initial load when no data exists */\n.loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n/* Loading overlay - semi-transparent overlay on top of existing content during refresh */\n.loading-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: color-mix(in srgb, var(--mj-bg-surface) 80%, transparent);\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Ensure [hidden] attribute works properly on loading elements */\n.loading-container[hidden],\n.loading-overlay[hidden] {\n display: none !important;\n}\n\n/* Empty State \u2014 fill the content pane vertically */\n.empty-state-fill {\n height: 100%;\n}\n\n/* Hide the dynamic host when no plug-in is mounted (no entity) */\n.dynamic-view-host[hidden] {\n display: none !important;\n}\n"] }]
|
|
2325
|
+
}, template: "<div class=\"entity-viewer-container\" [style.height]=\"EffectiveConfig.height\">\n <!-- Header -->\n @if (EffectiveConfig.showFilter || EffectiveConfig.showViewModeToggle || EffectiveConfig.showRecordCount) {\n <div class=\"viewer-header\">\n <!-- Filter Input -->\n @if (EffectiveConfig.showFilter) {\n <div class=\"filter-container\">\n <i class=\"fa-solid fa-search filter-icon\"></i>\n <input\n type=\"text\"\n class=\"filter-input\"\n [placeholder]=\"EffectiveConfig.filterPlaceholder\"\n [value]=\"EffectiveFilterText\"\n (input)=\"OnFilterChange($any($event.target).value)\"\n />\n @if (EffectiveFilterText) {\n <button class=\"clear-filter-btn\" (click)=\"ClearFilter()\" title=\"Clear filter\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n }\n\n <!-- Record Count -->\n @if (EffectiveConfig.showRecordCount && EffectiveEntity) {\n <div class=\"record-count\">\n @if (FilteredRecordCount !== TotalRecordCount) {\n <span>{{ FilteredRecordCount | number }} of {{ TotalRecordCount | number }} records</span>\n } @else {\n <span>{{ TotalRecordCount | number }} records</span>\n }\n </div>\n }\n\n <!-- View Type Toggle \u2014 the reusable switcher, driven entirely by the MJ: View Types\n registry (ViewTypeEngine). The available types and their icons come from metadata\n (ViewType.Icon), filtered by each descriptor's availability predicate. Selecting routes\n back through SelectViewTypeById, which mounts the chosen descriptor's RendererComponent\n into #dynamicViewHost. The container has zero knowledge of any view type's chrome. -->\n @if (EffectiveConfig.showViewModeToggle) {\n <mj-view-type-switcher\n [Provider]=\"Provider\"\n [Entity]=\"EffectiveEntity\"\n [ActiveViewTypeID]=\"ActiveViewTypeId\"\n (ViewTypeSelected)=\"SelectViewTypeById($event.viewTypeId)\">\n </mj-view-type-switcher>\n }\n\n <!-- Recycle Bin chip (auto-hides when entity has no deleted records, no tracking,\n or user lacks Delete permission) -->\n @if (ShowRecycleBin) {\n <mj-recycle-bin-chip [Provider]=\"Provider\" [EntityName]=\"EffectiveEntity?.Name ?? null\"></mj-recycle-bin-chip>\n }\n </div>\n }\n\n <!-- View properties: read-only, one chip per property; a server-set one never shows its value -->\n @if (PropertyChips.length > 0) {\n <div class=\"view-properties-row\" role=\"list\" aria-label=\"View properties\">\n @for (chip of PropertyChips; track chip.Name) {\n <span class=\"view-property-chip\" role=\"listitem\" [class.server-set]=\"chip.ServerSet\" [attr.title]=\"chip.Description\">\n @if (chip.ServerSet) {\n <i class=\"fa-solid fa-lock\" aria-hidden=\"true\"></i>\n }\n <span class=\"view-property-name\">{{ chip.Name }}</span>\n <span class=\"view-property-value\">{{ chip.Value }}</span>\n </span>\n }\n @if (ViewRunError) {\n <span class=\"view-properties-error\" role=\"alert\">\n <i class=\"fa-solid fa-triangle-exclamation\" aria-hidden=\"true\"></i> {{ ViewRunError }}\n </span>\n }\n </div>\n }\n\n <!-- Content -->\n <div class=\"viewer-content\">\n <!-- Loading container - full page when no data exists -->\n <div class=\"loading-container\" [hidden]=\"!(IsLoading && FilteredRecords.length === 0)\">\n <mj-loading [text]=\"LoadingMessage\" size=\"medium\"></mj-loading>\n </div>\n\n <!-- Loading overlay - shown on top of content when loading with existing data -->\n <div class=\"loading-overlay\" [hidden]=\"!(IsLoading && FilteredRecords.length > 0)\">\n <mj-loading [text]=\"LoadingMessage\" size=\"small\"></mj-loading>\n </div>\n\n <!-- Empty state: no entity selected -->\n @if (!EffectiveEntity) {\n <mj-empty-state\n class=\"empty-state-fill\"\n Icon=\"fa-solid fa-database\"\n Title=\"Select an entity to view records\" />\n }\n\n <!-- Empty state: no records found. Suppressed while a plug-in is active \u2014 every plug-in renders\n its own empty/loading state, so the container never shows a generic \"no records\" over it. -->\n @if (EffectiveEntity && FilteredRecords.length === 0 && !IsLoading && !IsDynamicViewActive) {\n <mj-empty-state\n class=\"empty-state-fill\"\n [Variant]=\"IsNoRecordsFiltered ? 'no-results' : 'empty'\"\n [Title]=\"NoRecordsTitle\" />\n }\n\n <!-- Plug-in (dynamic) view renderer host \u2014 the ONLY render path. The active descriptor's\n RendererComponent is created into #dynamicViewHost via ViewContainerRef and fed the generic\n IViewRenderer contract. Shown whenever there's an entity; the plug-in owns all its chrome. -->\n <div class=\"dynamic-view-host\" [hidden]=\"!EffectiveEntity\">\n <ng-template #dynamicViewHost></ng-template>\n </div>\n </div>\n\n</div>\n", styles: [".entity-viewer-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: var(--mj-bg-surface-card);\n}\n\n/* Header */\n.viewer-header {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 12px 16px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n flex-shrink: 0;\n}\n\n/* View properties (read-only chips) */\n.view-properties-row {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-2) var(--mj-space-4);\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-subtle);\n flex-shrink: 0;\n}\n\n.view-property-chip {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-1);\n padding: 3px 10px;\n border-radius: var(--mj-radius-full);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n font-size: var(--mj-text-xs);\n}\n\n.view-property-name {\n color: var(--mj-text-muted);\n}\n\n.view-property-value {\n color: var(--mj-text-primary);\n font-weight: 600;\n}\n\n.view-property-chip.server-set {\n background: color-mix(in srgb, var(--mj-status-info) 8%, var(--mj-bg-surface));\n border-color: color-mix(in srgb, var(--mj-status-info) 25%, var(--mj-border-default));\n}\n\n.view-property-chip.server-set .view-property-value {\n color: var(--mj-text-secondary);\n font-weight: 500;\n}\n\n.view-properties-error {\n color: var(--mj-status-error-text);\n font-size: var(--mj-text-xs);\n}\n\n/* Filter */\n.filter-container {\n flex: 1;\n max-width: 400px;\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.filter-icon {\n position: absolute;\n left: 12px;\n color: var(--mj-text-disabled);\n font-size: 14px;\n pointer-events: none;\n}\n\n.filter-input {\n width: 100%;\n padding: 8px 36px 8px 36px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 14px;\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.filter-input:focus {\n border-color: var(--mj-brand-primary);\n}\n\n.filter-input::placeholder {\n color: var(--mj-text-disabled);\n}\n\n.clear-filter-btn {\n position: absolute;\n right: 8px;\n width: 20px;\n height: 20px;\n border: none;\n background: transparent;\n border-radius: 50%;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-disabled);\n transition: all 0.15s ease;\n}\n\n.clear-filter-btn:hover {\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-secondary);\n}\n\n/* Record Count */\n.record-count {\n font-size: 13px;\n color: var(--mj-text-muted);\n white-space: nowrap;\n}\n\n/* View Mode Toggle */\n.view-mode-toggle {\n display: flex;\n background: var(--mj-bg-surface-card);\n border-radius: 6px;\n padding: 2px;\n}\n\n.toggle-btn {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n border-radius: 4px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--mj-text-muted);\n transition: all 0.15s ease;\n}\n\n.toggle-btn:hover {\n color: var(--mj-text-secondary);\n}\n\n.toggle-btn.active {\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n\n/* Compact view-type dropdown \u2014 used when there are more view types than the strip threshold */\n.view-type-dropdown {\n position: relative;\n display: inline-flex;\n}\n\n.view-type-dropdown-trigger {\n width: auto;\n gap: 6px;\n padding: 0 10px;\n}\n\n.view-type-dropdown-label {\n font-size: 13px;\n font-weight: 500;\n}\n\n.view-type-dropdown-caret {\n font-size: 10px;\n opacity: 0.7;\n}\n\n.view-type-dropdown-menu {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n z-index: 20;\n min-width: 180px;\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px color-mix(in srgb, var(--mj-text-primary) 14%, transparent);\n padding: 4px;\n display: flex;\n flex-direction: column;\n}\n\n.view-type-dropdown-item {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 8px 10px;\n border: none;\n background: transparent;\n border-radius: 6px;\n cursor: pointer;\n color: var(--mj-text-secondary);\n font-size: 13px;\n text-align: left;\n transition: background 0.12s ease, color 0.12s ease;\n}\n\n.view-type-dropdown-item:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.view-type-dropdown-item.active {\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.view-type-dropdown-item i {\n width: 16px;\n text-align: center;\n}\n\n/* Host for dynamically-mounted plug-in view renderers (Grid, Cards, Timeline, Map, Calendar).\n Intentionally NO z-index or isolation here so fixed-position modals/drawers inside\n mj-entity-data-grid (Recycle Bin, Export, Merge, List Management) escape into the\n document stacking context above Data Explorer's .content-header (z-index: 2) and\n .shell-header (z-index: 500). Map/Leaflet isolation lives on mj-map-view-renderer. */\n.dynamic-view-host {\n height: 100%;\n width: 100%;\n overflow: auto;\n position: relative;\n}\n\n/* Content */\n.viewer-content {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n position: relative;\n background: var(--mj-bg-surface);\n}\n\n/* Loading State - full-page centered loading for initial load when no data exists */\n.loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n}\n\n/* Loading overlay - semi-transparent overlay on top of existing content during refresh */\n.loading-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: color-mix(in srgb, var(--mj-bg-surface) 80%, transparent);\n z-index: 10;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* Ensure [hidden] attribute works properly on loading elements */\n.loading-container[hidden],\n.loading-overlay[hidden] {\n display: none !important;\n}\n\n/* Empty State \u2014 fill the content pane vertically */\n.empty-state-fill {\n height: 100%;\n}\n\n/* Hide the dynamic host when no plug-in is mounted (no entity) */\n.dynamic-view-host[hidden] {\n display: none !important;\n}\n"] }]
|
|
2163
2326
|
}], () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i0.ElementRef }], { Entity: [{
|
|
2164
2327
|
type: Input
|
|
2165
2328
|
}], EntityName: [{
|
|
@@ -2180,6 +2343,10 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
2180
2343
|
type: Input
|
|
2181
2344
|
}], ViewEntity: [{
|
|
2182
2345
|
type: Input
|
|
2346
|
+
}], AlternateBaseView: [{
|
|
2347
|
+
type: Input
|
|
2348
|
+
}], Properties: [{
|
|
2349
|
+
type: Input
|
|
2183
2350
|
}], GridState: [{
|
|
2184
2351
|
type: Input
|
|
2185
2352
|
}], ShowRecycleBin: [{
|
|
@@ -2210,6 +2377,8 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
2210
2377
|
type: Output
|
|
2211
2378
|
}], AfterViewTypeChange: [{
|
|
2212
2379
|
type: Output
|
|
2380
|
+
}], ActiveViewTypeResolved: [{
|
|
2381
|
+
type: Output
|
|
2213
2382
|
}], BeforeViewTypeConfigChange: [{
|
|
2214
2383
|
type: Output
|
|
2215
2384
|
}], AfterViewTypeConfigChange: [{
|
|
@@ -2218,5 +2387,5 @@ export class EntityViewerComponent extends BaseAngularComponent {
|
|
|
2218
2387
|
type: ViewChild,
|
|
2219
2388
|
args: ['dynamicViewHost', { read: ViewContainerRef }]
|
|
2220
2389
|
}] }); })();
|
|
2221
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityViewerComponent, { className: "EntityViewerComponent", filePath: "src/lib/entity-viewer/entity-viewer.component.ts", lineNumber:
|
|
2390
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EntityViewerComponent, { className: "EntityViewerComponent", filePath: "src/lib/entity-viewer/entity-viewer.component.ts", lineNumber: 137 }); })();
|
|
2222
2391
|
//# sourceMappingURL=entity-viewer.component.js.map
|