@memberjunction/ng-entity-action-ux 6.2.0-edge.4 → 6.2.0-edge.6
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/record-process-runner/record-process-runner-ux.component.d.ts +24 -14
- package/dist/lib/record-process-runner/record-process-runner-ux.component.d.ts.map +1 -1
- package/dist/lib/record-process-runner/record-process-runner-ux.component.js +182 -88
- package/dist/lib/record-process-runner/record-process-runner-ux.component.js.map +1 -1
- package/dist/lib/write-back-preview.d.ts +34 -0
- package/dist/lib/write-back-preview.d.ts.map +1 -0
- package/dist/lib/write-back-preview.js +62 -0
- package/dist/lib/write-back-preview.js.map +1 -0
- package/package.json +9 -9
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type RecordProcessRunNowOutput } from '@memberjunction/core-entities';
|
|
1
2
|
import { BaseEntityActionRuntimeUX } from '../base-entity-action-runtime-ux';
|
|
3
|
+
import { type PreviewChange } from '../write-back-preview';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
/** The run summary the runner renders, mapped from the operation's typed output. */
|
|
4
6
|
interface RunSummary {
|
|
@@ -8,26 +10,22 @@ interface RunSummary {
|
|
|
8
10
|
Succeeded: number;
|
|
9
11
|
Errored: number;
|
|
10
12
|
Skipped: number;
|
|
11
|
-
Status?:
|
|
13
|
+
Status?: RecordProcessRunNowOutput['status'];
|
|
12
14
|
ErrorMessage?: string;
|
|
15
|
+
/** A dry run whose real run would be refused (e.g. its Feature Pipeline version is not activated): why. */
|
|
16
|
+
WouldRefuse?: string;
|
|
13
17
|
}
|
|
14
18
|
/** The driver's flow state. */
|
|
15
19
|
type RunnerState = 'loading' | 'preview' | 'applying' | 'done' | 'error';
|
|
16
|
-
/** One computed field change (mirrors the engine's `FieldChange` for the bits the UI shows). */
|
|
17
|
-
interface DiffChange {
|
|
18
|
-
Field: string;
|
|
19
|
-
OldValue: unknown;
|
|
20
|
-
NewValue: unknown;
|
|
21
|
-
Applied: boolean;
|
|
22
|
-
Changed: boolean;
|
|
23
|
-
Error?: string;
|
|
24
|
-
}
|
|
25
20
|
/** A per-record row of the preview table. */
|
|
26
21
|
interface RecordDiffRow {
|
|
27
22
|
RecordID: string;
|
|
28
23
|
Status: string;
|
|
29
|
-
Changes:
|
|
30
|
-
|
|
24
|
+
Changes: PreviewChange[];
|
|
25
|
+
/** What the real write would fail on, or the run's own error for the record. */
|
|
26
|
+
Errors: string[];
|
|
27
|
+
/** Outputs the answer withheld below their confidence floor (not changes; see {@link WriteBackPreviewModel.WithheldLines}). */
|
|
28
|
+
Withheld: string[];
|
|
31
29
|
}
|
|
32
30
|
export declare class RecordProcessRunnerUXComponent extends BaseEntityActionRuntimeUX {
|
|
33
31
|
private cdr;
|
|
@@ -44,12 +42,14 @@ export declare class RecordProcessRunnerUXComponent extends BaseEntityActionRunt
|
|
|
44
42
|
get Title(): string;
|
|
45
43
|
get EntityLabel(): string;
|
|
46
44
|
get HasChanges(): boolean;
|
|
45
|
+
/** Apply is offered only for changes a real run would make: never when the real run would be refused. */
|
|
46
|
+
get CanApply(): boolean;
|
|
47
47
|
get SkippedCount(): number;
|
|
48
48
|
get ErroredCount(): number;
|
|
49
49
|
get DoneMessage(): string;
|
|
50
50
|
/** Step 1: run a dry-run on the server and load the resulting per-record diff. */
|
|
51
51
|
Start(): Promise<void>;
|
|
52
|
-
/** Step 2: the user confirmed — run for real. */
|
|
52
|
+
/** Step 2: the user confirmed — run for real. Never when the preview said the real run would be refused. */
|
|
53
53
|
Apply(): Promise<void>;
|
|
54
54
|
/** Closes after a successful apply, telling the host to refresh. */
|
|
55
55
|
Finish(): void;
|
|
@@ -63,8 +63,18 @@ export declare class RecordProcessRunnerUXComponent extends BaseEntityActionRunt
|
|
|
63
63
|
* transport on the client, in-process on the server — so there is no bespoke resolver/client.
|
|
64
64
|
*/
|
|
65
65
|
private runOp;
|
|
66
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Reads `MJ: Process Run Details` for the dry-run and builds the per-record diff rows. A FieldRules run's detail
|
|
68
|
+
* carries its own `Changes`; a write-back run's carries the `writeBack` preview ({@link WriteBackPreviewModel}).
|
|
69
|
+
*/
|
|
67
70
|
private loadDiff;
|
|
71
|
+
/** A FieldRules run's row: the changes the engine computed that it would apply. */
|
|
72
|
+
private fieldRulesRow;
|
|
73
|
+
/**
|
|
74
|
+
* A write-back run's row. What the real write would fail on is the record's error; the run detail's own message
|
|
75
|
+
* (which repeats it) is shown only when the preview names nothing.
|
|
76
|
+
*/
|
|
77
|
+
private writeBackRow;
|
|
68
78
|
/** Builds the engine scope from the host-supplied context (delegates to the pure helper). */
|
|
69
79
|
private buildScope;
|
|
70
80
|
private recordProcessID;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-process-runner-ux.component.d.ts","sourceRoot":"","sources":["../../../src/lib/record-process-runner/record-process-runner-ux.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-process-runner-ux.component.d.ts","sourceRoot":"","sources":["../../../src/lib/record-process-runner/record-process-runner-ux.component.ts"],"names":[],"mappings":"AAaA,OAAO,EAGH,KAAK,yBAAyB,EAEjC,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;;AAElF,oFAAoF;AACpF,UAAU,UAAU;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2GAA2G;IAC3G,WAAW,CAAC,EAAE,MAAM,CAAC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AAO,GAAG,MAAM;IAI/B;;;;OAIG;YACW,KAAK;IAmBnB;;;OAGG;YACW,QAAQ;IAiCtB,mFAAmF;IACnF,OAAO,CAAC,aAAa;IAQrB;;;OAGG;IACH,OAAO,CAAC,YAAY;IAMpB,6FAA6F;IAC7F,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,OAAO;yCAjLN,8BAA8B;2CAA9B,8BAA8B;CAsL1C"}
|
|
@@ -21,9 +21,9 @@ import { RecordProcessRunNowOperation, } from '@memberjunction/core-entities';
|
|
|
21
21
|
import { MJDialogComponent, MJDialogActionsComponent, MJButtonDirective, MJProgressBarComponent, MJEmptyStateComponent } from '@memberjunction/ng-ui-components';
|
|
22
22
|
import { BaseEntityActionRuntimeUX } from '../base-entity-action-runtime-ux';
|
|
23
23
|
import { BuildRecordProcessScope, DisplayValue } from '../scope';
|
|
24
|
+
import { WriteBackPreviewModel } from '../write-back-preview';
|
|
24
25
|
import * as i0 from "@angular/core";
|
|
25
26
|
const _forTrack0 = ($index, $item) => $item.RecordID;
|
|
26
|
-
const _forTrack1 = ($index, $item) => $item.Field;
|
|
27
27
|
function RecordProcessRunnerUXComponent_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
28
28
|
i0.ɵɵelementStart(0, "div", 2);
|
|
29
29
|
i0.ɵɵelement(1, "mj-progress-bar", 7);
|
|
@@ -80,8 +80,25 @@ function RecordProcessRunnerUXComponent_Case_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
80
80
|
i0.ɵɵadvance();
|
|
81
81
|
i0.ɵɵconditional((ctx_r0.AppliedResult == null ? null : ctx_r0.AppliedResult.Errored) ? 5 : -1);
|
|
82
82
|
} }
|
|
83
|
-
function
|
|
84
|
-
i0.ɵɵelementStart(0, "
|
|
83
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
84
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
85
|
+
i0.ɵɵelement(1, "i", 18);
|
|
86
|
+
i0.ɵɵelementStart(2, "div")(3, "strong");
|
|
87
|
+
i0.ɵɵtext(4, "Applying these changes would be refused");
|
|
88
|
+
i0.ɵɵelementEnd();
|
|
89
|
+
i0.ɵɵelementStart(5, "p");
|
|
90
|
+
i0.ɵɵtext(6);
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
i0.ɵɵelementStart(7, "p");
|
|
93
|
+
i0.ɵɵtext(8, "The preview below shows what this version would write once it may run.");
|
|
94
|
+
i0.ɵɵelementEnd()()();
|
|
95
|
+
} if (rf & 2) {
|
|
96
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
97
|
+
i0.ɵɵadvance(6);
|
|
98
|
+
i0.ɵɵtextInterpolate(ctx_r0.PreviewResult == null ? null : ctx_r0.PreviewResult.WouldRefuse);
|
|
99
|
+
} }
|
|
100
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
+
i0.ɵɵelementStart(0, "span", 15);
|
|
85
102
|
i0.ɵɵtext(1);
|
|
86
103
|
i0.ɵɵelementEnd();
|
|
87
104
|
} if (rf & 2) {
|
|
@@ -89,8 +106,8 @@ function RecordProcessRunnerUXComponent_Case_6_Conditional_5_Template(rf, ctx) {
|
|
|
89
106
|
i0.ɵɵadvance();
|
|
90
107
|
i0.ɵɵtextInterpolate1("", ctx_r0.SkippedCount, " unchanged");
|
|
91
108
|
} }
|
|
92
|
-
function
|
|
93
|
-
i0.ɵɵelementStart(0, "span",
|
|
109
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
110
|
+
i0.ɵɵelementStart(0, "span", 16);
|
|
94
111
|
i0.ɵɵtext(1);
|
|
95
112
|
i0.ɵɵelementEnd();
|
|
96
113
|
} if (rf & 2) {
|
|
@@ -98,63 +115,94 @@ function RecordProcessRunnerUXComponent_Case_6_Conditional_6_Template(rf, ctx) {
|
|
|
98
115
|
i0.ɵɵadvance();
|
|
99
116
|
i0.ɵɵtextInterpolate1("", ctx_r0.ErroredCount, " error(s)");
|
|
100
117
|
} }
|
|
101
|
-
function
|
|
102
|
-
i0.ɵɵelement(0, "mj-empty-state",
|
|
118
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
119
|
+
i0.ɵɵelement(0, "mj-empty-state", 17);
|
|
103
120
|
} if (rf & 2) {
|
|
104
121
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
105
122
|
i0.ɵɵproperty("Message", "The rules did not match any of the selected " + ctx_r0.EntityLabel + ".");
|
|
106
123
|
} }
|
|
107
|
-
function
|
|
108
|
-
i0.ɵɵelementStart(0, "
|
|
109
|
-
i0.ɵɵtext(
|
|
124
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
125
|
+
i0.ɵɵelementStart(0, "span", 28);
|
|
126
|
+
i0.ɵɵtext(1);
|
|
110
127
|
i0.ɵɵelementEnd();
|
|
111
|
-
|
|
128
|
+
} if (rf & 2) {
|
|
129
|
+
const c_r2 = i0.ɵɵnextContext().$implicit;
|
|
130
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
131
|
+
i0.ɵɵadvance();
|
|
132
|
+
i0.ɵɵtextInterpolate(ctx_r0.Display(c_r2.NewValue));
|
|
133
|
+
} }
|
|
134
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_5_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
135
|
+
i0.ɵɵelementStart(0, "span", 29);
|
|
136
|
+
i0.ɵɵtext(1);
|
|
137
|
+
i0.ɵɵelementEnd();
|
|
138
|
+
i0.ɵɵelement(2, "i", 30);
|
|
139
|
+
i0.ɵɵelementStart(3, "span", 28);
|
|
112
140
|
i0.ɵɵtext(4);
|
|
113
141
|
i0.ɵɵelementEnd();
|
|
114
|
-
i0.ɵɵelement(5, "i", 26);
|
|
115
|
-
i0.ɵɵelementStart(6, "span", 27);
|
|
116
|
-
i0.ɵɵtext(7);
|
|
117
|
-
i0.ɵɵelementEnd()();
|
|
118
142
|
} if (rf & 2) {
|
|
119
|
-
const c_r2 =
|
|
143
|
+
const c_r2 = i0.ɵɵnextContext().$implicit;
|
|
120
144
|
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
121
|
-
i0.ɵɵadvance(
|
|
122
|
-
i0.ɵɵtextInterpolate(c_r2.Field);
|
|
123
|
-
i0.ɵɵadvance(2);
|
|
145
|
+
i0.ɵɵadvance();
|
|
124
146
|
i0.ɵɵtextInterpolate(ctx_r0.Display(c_r2.OldValue));
|
|
125
147
|
i0.ɵɵadvance(3);
|
|
126
148
|
i0.ɵɵtextInterpolate(ctx_r0.Display(c_r2.NewValue));
|
|
127
149
|
} }
|
|
128
|
-
function
|
|
129
|
-
i0.ɵɵelementStart(0, "div",
|
|
150
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
151
|
+
i0.ɵɵelementStart(0, "div", 24)(1, "span", 27);
|
|
152
|
+
i0.ɵɵtext(2);
|
|
153
|
+
i0.ɵɵelementEnd();
|
|
154
|
+
i0.ɵɵconditionalCreate(3, RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_5_Conditional_3_Template, 2, 1, "span", 28)(4, RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_5_Conditional_4_Template, 5, 2);
|
|
155
|
+
i0.ɵɵelementEnd();
|
|
156
|
+
} if (rf & 2) {
|
|
157
|
+
const c_r2 = ctx.$implicit;
|
|
158
|
+
i0.ɵɵadvance(2);
|
|
159
|
+
i0.ɵɵtextInterpolate(c_r2.Field);
|
|
160
|
+
i0.ɵɵadvance();
|
|
161
|
+
i0.ɵɵconditional(c_r2.IsAddition ? 3 : 4);
|
|
162
|
+
} }
|
|
163
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
164
|
+
i0.ɵɵelementStart(0, "div", 25);
|
|
130
165
|
i0.ɵɵtext(1);
|
|
131
166
|
i0.ɵɵelementEnd();
|
|
132
167
|
} if (rf & 2) {
|
|
133
|
-
const
|
|
168
|
+
const message_r3 = ctx.$implicit;
|
|
134
169
|
i0.ɵɵadvance();
|
|
135
|
-
i0.ɵɵtextInterpolate(
|
|
170
|
+
i0.ɵɵtextInterpolate(message_r3);
|
|
136
171
|
} }
|
|
137
|
-
function
|
|
138
|
-
i0.ɵɵelementStart(0, "div",
|
|
172
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
173
|
+
i0.ɵɵelementStart(0, "div", 26);
|
|
174
|
+
i0.ɵɵelement(1, "i", 31);
|
|
139
175
|
i0.ɵɵtext(2);
|
|
140
176
|
i0.ɵɵelementEnd();
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
i0.ɵɵ
|
|
177
|
+
} if (rf & 2) {
|
|
178
|
+
const line_r4 = ctx.$implicit;
|
|
179
|
+
i0.ɵɵadvance(2);
|
|
180
|
+
i0.ɵɵtextInterpolate1("", line_r4, " ");
|
|
181
|
+
} }
|
|
182
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
183
|
+
i0.ɵɵelementStart(0, "div", 20)(1, "div", 22);
|
|
184
|
+
i0.ɵɵtext(2);
|
|
185
|
+
i0.ɵɵelementEnd();
|
|
186
|
+
i0.ɵɵelementStart(3, "div", 23);
|
|
187
|
+
i0.ɵɵrepeaterCreate(4, RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_5_Template, 5, 2, "div", 24, i0.ɵɵrepeaterTrackByIndex);
|
|
188
|
+
i0.ɵɵrepeaterCreate(6, RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_7_Template, 2, 1, "div", 25, i0.ɵɵrepeaterTrackByIndex);
|
|
189
|
+
i0.ɵɵrepeaterCreate(8, RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_For_9_Template, 3, 1, "div", 26, i0.ɵɵrepeaterTrackByIndex);
|
|
144
190
|
i0.ɵɵelementEnd()();
|
|
145
191
|
} if (rf & 2) {
|
|
146
|
-
const
|
|
192
|
+
const row_r5 = ctx.$implicit;
|
|
147
193
|
i0.ɵɵadvance();
|
|
148
|
-
i0.ɵɵproperty("title",
|
|
194
|
+
i0.ɵɵproperty("title", row_r5.RecordID);
|
|
149
195
|
i0.ɵɵadvance();
|
|
150
|
-
i0.ɵɵtextInterpolate(
|
|
196
|
+
i0.ɵɵtextInterpolate(row_r5.RecordID);
|
|
151
197
|
i0.ɵɵadvance(2);
|
|
152
|
-
i0.ɵɵrepeater(
|
|
198
|
+
i0.ɵɵrepeater(row_r5.Changes);
|
|
153
199
|
i0.ɵɵadvance(2);
|
|
154
|
-
i0.ɵɵ
|
|
200
|
+
i0.ɵɵrepeater(row_r5.Errors);
|
|
201
|
+
i0.ɵɵadvance(2);
|
|
202
|
+
i0.ɵɵrepeater(row_r5.Withheld);
|
|
155
203
|
} }
|
|
156
|
-
function
|
|
157
|
-
i0.ɵɵelementStart(0, "p",
|
|
204
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_9_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
205
|
+
i0.ɵɵelementStart(0, "p", 21);
|
|
158
206
|
i0.ɵɵtext(1);
|
|
159
207
|
i0.ɵɵelementEnd();
|
|
160
208
|
} if (rf & 2) {
|
|
@@ -162,11 +210,11 @@ function RecordProcessRunnerUXComponent_Case_6_Conditional_8_Conditional_3_Templ
|
|
|
162
210
|
i0.ɵɵadvance();
|
|
163
211
|
i0.ɵɵtextInterpolate1("Showing the first ", ctx_r0.DiffRows.length, " changed records. The apply step covers the full scope.");
|
|
164
212
|
} }
|
|
165
|
-
function
|
|
166
|
-
i0.ɵɵelementStart(0, "div",
|
|
167
|
-
i0.ɵɵrepeaterCreate(1,
|
|
213
|
+
function RecordProcessRunnerUXComponent_Case_6_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
214
|
+
i0.ɵɵelementStart(0, "div", 19);
|
|
215
|
+
i0.ɵɵrepeaterCreate(1, RecordProcessRunnerUXComponent_Case_6_Conditional_9_For_2_Template, 10, 2, "div", 20, _forTrack0);
|
|
168
216
|
i0.ɵɵelementEnd();
|
|
169
|
-
i0.ɵɵconditionalCreate(3,
|
|
217
|
+
i0.ɵɵconditionalCreate(3, RecordProcessRunnerUXComponent_Case_6_Conditional_9_Conditional_3_Template, 2, 1, "p", 21);
|
|
170
218
|
} if (rf & 2) {
|
|
171
219
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
172
220
|
i0.ɵɵadvance();
|
|
@@ -175,34 +223,36 @@ function RecordProcessRunnerUXComponent_Case_6_Conditional_8_Template(rf, ctx) {
|
|
|
175
223
|
i0.ɵɵconditional(ctx_r0.Truncated ? 3 : -1);
|
|
176
224
|
} }
|
|
177
225
|
function RecordProcessRunnerUXComponent_Case_6_Template(rf, ctx) { if (rf & 1) {
|
|
178
|
-
i0.ɵɵ
|
|
179
|
-
i0.ɵɵ
|
|
226
|
+
i0.ɵɵconditionalCreate(0, RecordProcessRunnerUXComponent_Case_6_Conditional_0_Template, 9, 1, "div", 11);
|
|
227
|
+
i0.ɵɵelementStart(1, "div", 12)(2, "span", 13);
|
|
228
|
+
i0.ɵɵtext(3);
|
|
180
229
|
i0.ɵɵelementEnd();
|
|
181
|
-
i0.ɵɵelementStart(
|
|
182
|
-
i0.ɵɵtext(
|
|
230
|
+
i0.ɵɵelementStart(4, "span", 14);
|
|
231
|
+
i0.ɵɵtext(5);
|
|
183
232
|
i0.ɵɵelementEnd();
|
|
184
|
-
i0.ɵɵconditionalCreate(5, RecordProcessRunnerUXComponent_Case_6_Conditional_5_Template, 2, 1, "span", 14);
|
|
185
233
|
i0.ɵɵconditionalCreate(6, RecordProcessRunnerUXComponent_Case_6_Conditional_6_Template, 2, 1, "span", 15);
|
|
234
|
+
i0.ɵɵconditionalCreate(7, RecordProcessRunnerUXComponent_Case_6_Conditional_7_Template, 2, 1, "span", 16);
|
|
186
235
|
i0.ɵɵelementEnd();
|
|
187
|
-
i0.ɵɵconditionalCreate(
|
|
236
|
+
i0.ɵɵconditionalCreate(8, RecordProcessRunnerUXComponent_Case_6_Conditional_8_Template, 1, 1, "mj-empty-state", 17)(9, RecordProcessRunnerUXComponent_Case_6_Conditional_9_Template, 4, 1);
|
|
188
237
|
} if (rf & 2) {
|
|
189
238
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
190
|
-
i0.ɵɵ
|
|
239
|
+
i0.ɵɵconditional((ctx_r0.PreviewResult == null ? null : ctx_r0.PreviewResult.WouldRefuse) ? 0 : -1);
|
|
240
|
+
i0.ɵɵadvance(3);
|
|
191
241
|
i0.ɵɵtextInterpolate3("", ctx_r0.ChangedRecordCount, " of ", (ctx_r0.PreviewResult == null ? null : ctx_r0.PreviewResult.Processed) ?? 0, " ", ctx_r0.EntityLabel, " will change");
|
|
192
242
|
i0.ɵɵadvance(2);
|
|
193
|
-
i0.ɵɵtextInterpolate1("", ctx_r0.TotalChangeCount, "
|
|
243
|
+
i0.ɵɵtextInterpolate1("", ctx_r0.TotalChangeCount, " change(s)");
|
|
194
244
|
i0.ɵɵadvance();
|
|
195
|
-
i0.ɵɵconditional(ctx_r0.SkippedCount ?
|
|
245
|
+
i0.ɵɵconditional(ctx_r0.SkippedCount ? 6 : -1);
|
|
196
246
|
i0.ɵɵadvance();
|
|
197
|
-
i0.ɵɵconditional(ctx_r0.ErroredCount ?
|
|
247
|
+
i0.ɵɵconditional(ctx_r0.ErroredCount ? 7 : -1);
|
|
198
248
|
i0.ɵɵadvance();
|
|
199
|
-
i0.ɵɵconditional(ctx_r0.DiffRows.length === 0 ?
|
|
249
|
+
i0.ɵɵconditional(ctx_r0.DiffRows.length === 0 ? 8 : 9);
|
|
200
250
|
} }
|
|
201
251
|
function RecordProcessRunnerUXComponent_Case_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
202
|
-
const
|
|
203
|
-
i0.ɵɵelementStart(0, "button",
|
|
204
|
-
i0.ɵɵlistener("click", function RecordProcessRunnerUXComponent_Case_8_Conditional_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
205
|
-
i0.ɵɵelement(1, "i",
|
|
252
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
253
|
+
i0.ɵɵelementStart(0, "button", 33);
|
|
254
|
+
i0.ɵɵlistener("click", function RecordProcessRunnerUXComponent_Case_8_Conditional_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.Apply()); });
|
|
255
|
+
i0.ɵɵelement(1, "i", 34);
|
|
206
256
|
i0.ɵɵtext(2);
|
|
207
257
|
i0.ɵɵelementEnd();
|
|
208
258
|
} if (rf & 2) {
|
|
@@ -211,27 +261,27 @@ function RecordProcessRunnerUXComponent_Case_8_Conditional_0_Template(rf, ctx) {
|
|
|
211
261
|
i0.ɵɵtextInterpolate1(" Apply ", ctx_r0.TotalChangeCount, " change(s) ");
|
|
212
262
|
} }
|
|
213
263
|
function RecordProcessRunnerUXComponent_Case_8_Template(rf, ctx) { if (rf & 1) {
|
|
214
|
-
const
|
|
264
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
215
265
|
i0.ɵɵconditionalCreate(0, RecordProcessRunnerUXComponent_Case_8_Conditional_0_Template, 3, 1, "button", 5);
|
|
216
|
-
i0.ɵɵelementStart(1, "button",
|
|
217
|
-
i0.ɵɵlistener("click", function RecordProcessRunnerUXComponent_Case_8_Template_button_click_1_listener() { i0.ɵɵrestoreView(
|
|
266
|
+
i0.ɵɵelementStart(1, "button", 32);
|
|
267
|
+
i0.ɵɵlistener("click", function RecordProcessRunnerUXComponent_Case_8_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnCancel()); });
|
|
218
268
|
i0.ɵɵtext(2, "Cancel");
|
|
219
269
|
i0.ɵɵelementEnd();
|
|
220
270
|
} if (rf & 2) {
|
|
221
271
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
222
|
-
i0.ɵɵconditional(ctx_r0.
|
|
272
|
+
i0.ɵɵconditional(ctx_r0.CanApply ? 0 : -1);
|
|
223
273
|
} }
|
|
224
274
|
function RecordProcessRunnerUXComponent_Case_9_Template(rf, ctx) { if (rf & 1) {
|
|
225
|
-
const
|
|
226
|
-
i0.ɵɵelementStart(0, "button",
|
|
227
|
-
i0.ɵɵlistener("click", function RecordProcessRunnerUXComponent_Case_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
275
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
276
|
+
i0.ɵɵelementStart(0, "button", 33);
|
|
277
|
+
i0.ɵɵlistener("click", function RecordProcessRunnerUXComponent_Case_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.Finish()); });
|
|
228
278
|
i0.ɵɵtext(1, "Done");
|
|
229
279
|
i0.ɵɵelementEnd();
|
|
230
280
|
} }
|
|
231
281
|
function RecordProcessRunnerUXComponent_Case_10_Template(rf, ctx) { if (rf & 1) {
|
|
232
|
-
const
|
|
233
|
-
i0.ɵɵelementStart(0, "button",
|
|
234
|
-
i0.ɵɵlistener("click", function RecordProcessRunnerUXComponent_Case_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
282
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
283
|
+
i0.ɵɵelementStart(0, "button", 32);
|
|
284
|
+
i0.ɵɵlistener("click", function RecordProcessRunnerUXComponent_Case_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.OnCancel()); });
|
|
235
285
|
i0.ɵɵtext(1, "Close");
|
|
236
286
|
i0.ɵɵelementEnd();
|
|
237
287
|
} }
|
|
@@ -251,6 +301,8 @@ let RecordProcessRunnerUXComponent = class RecordProcessRunnerUXComponent extend
|
|
|
251
301
|
get Title() { return this.Context?.ActionLabel || 'Run Record Process'; }
|
|
252
302
|
get EntityLabel() { return this.Context?.EntityInfo?.DisplayName || this.Context?.EntityInfo?.Name || 'records'; }
|
|
253
303
|
get HasChanges() { return this.ChangedRecordCount > 0; }
|
|
304
|
+
/** Apply is offered only for changes a real run would make: never when the real run would be refused. */
|
|
305
|
+
get CanApply() { return this.HasChanges && !this.PreviewResult?.WouldRefuse; }
|
|
254
306
|
get SkippedCount() { return this.PreviewResult?.Skipped ?? 0; }
|
|
255
307
|
get ErroredCount() { return this.PreviewResult?.Errored ?? 0; }
|
|
256
308
|
get DoneMessage() {
|
|
@@ -281,10 +333,10 @@ let RecordProcessRunnerUXComponent = class RecordProcessRunnerUXComponent extend
|
|
|
281
333
|
this.toError(e instanceof Error ? e.message : String(e));
|
|
282
334
|
}
|
|
283
335
|
}
|
|
284
|
-
/** Step 2: the user confirmed — run for real. */
|
|
336
|
+
/** Step 2: the user confirmed — run for real. Never when the preview said the real run would be refused. */
|
|
285
337
|
async Apply() {
|
|
286
338
|
const recordProcessID = this.recordProcessID();
|
|
287
|
-
if (!recordProcessID)
|
|
339
|
+
if (!recordProcessID || this.PreviewResult?.WouldRefuse)
|
|
288
340
|
return;
|
|
289
341
|
this.State = 'applying';
|
|
290
342
|
this.cdr.detectChanges();
|
|
@@ -335,13 +387,18 @@ let RecordProcessRunnerUXComponent = class RecordProcessRunnerUXComponent extend
|
|
|
335
387
|
Skipped: o?.skipped ?? 0,
|
|
336
388
|
Status: o?.status,
|
|
337
389
|
ErrorMessage: result.ErrorMessage ?? o?.errorMessage ?? (o && o.status !== 'Completed' ? `Run ended with status '${o.status}'` : undefined),
|
|
390
|
+
WouldRefuse: o?.wouldRefuse || undefined,
|
|
338
391
|
};
|
|
339
392
|
}
|
|
340
|
-
/**
|
|
393
|
+
/**
|
|
394
|
+
* Reads `MJ: Process Run Details` for the dry-run and builds the per-record diff rows. A FieldRules run's detail
|
|
395
|
+
* carries its own `Changes`; a write-back run's carries the `writeBack` preview ({@link WriteBackPreviewModel}).
|
|
396
|
+
*/
|
|
341
397
|
async loadDiff(processRunID) {
|
|
342
398
|
const rv = await RunView.FromMetadataProvider(this.Context?.Provider ?? Metadata.Provider).RunView({
|
|
343
399
|
EntityName: 'MJ: Process Run Details',
|
|
344
|
-
|
|
400
|
+
// skipped details are never rendered (the summary carries their count), so they must not spend the row budget
|
|
401
|
+
ExtraFilter: `ProcessRunID='${processRunID}' AND Status <> 'Skipped'`,
|
|
345
402
|
Fields: ['RecordID', 'Status', 'ResultPayload', 'ErrorMessage'],
|
|
346
403
|
OrderBy: 'RecordID',
|
|
347
404
|
MaxRows: RecordProcessRunnerUXComponent_1.MAX_PREVIEW_ROWS,
|
|
@@ -353,20 +410,38 @@ let RecordProcessRunnerUXComponent = class RecordProcessRunnerUXComponent extend
|
|
|
353
410
|
let changedRecords = 0;
|
|
354
411
|
let totalChanges = 0;
|
|
355
412
|
for (const detail of rv.Results) {
|
|
356
|
-
const payload = detail.ResultPayload ? SafeJSONParse(detail.ResultPayload) : undefined;
|
|
357
|
-
const
|
|
358
|
-
if (
|
|
413
|
+
const payload = detail.ResultPayload ? SafeJSONParse(detail.ResultPayload) || undefined : undefined;
|
|
414
|
+
const row = payload?.writeBack ? this.writeBackRow(detail, payload.writeBack) : this.fieldRulesRow(detail, payload);
|
|
415
|
+
if (row.Changes.length > 0) {
|
|
359
416
|
changedRecords++;
|
|
360
|
-
totalChanges +=
|
|
417
|
+
totalChanges += row.Changes.length;
|
|
361
418
|
}
|
|
362
|
-
|
|
363
|
-
|
|
419
|
+
// a record whose only news is a withheld output is listed too: the dialog says why it does not change
|
|
420
|
+
if (row.Changes.length > 0 || row.Errors.length > 0 || row.Withheld.length > 0) {
|
|
421
|
+
rows.push(row);
|
|
364
422
|
}
|
|
365
423
|
}
|
|
366
424
|
this.DiffRows = rows;
|
|
367
425
|
this.ChangedRecordCount = changedRecords;
|
|
368
426
|
this.TotalChangeCount = totalChanges;
|
|
369
|
-
this.Truncated =
|
|
427
|
+
this.Truncated = rv.Results.length >= RecordProcessRunnerUXComponent_1.MAX_PREVIEW_ROWS;
|
|
428
|
+
}
|
|
429
|
+
/** A FieldRules run's row: the changes the engine computed that it would apply. */
|
|
430
|
+
fieldRulesRow(detail, payload) {
|
|
431
|
+
const changes = (payload?.Changes || []).filter((c) => c.Applied && c.Changed && !c.Error);
|
|
432
|
+
return {
|
|
433
|
+
RecordID: detail.RecordID, Status: detail.Status, Changes: changes,
|
|
434
|
+
Errors: detail.ErrorMessage ? [detail.ErrorMessage] : [], Withheld: [],
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* A write-back run's row. What the real write would fail on is the record's error; the run detail's own message
|
|
439
|
+
* (which repeats it) is shown only when the preview names nothing.
|
|
440
|
+
*/
|
|
441
|
+
writeBackRow(detail, writeBack) {
|
|
442
|
+
const preview = WriteBackPreviewModel.Build(detail.RecordID, writeBack);
|
|
443
|
+
const errors = preview.Errors.length > 0 ? preview.Errors : detail.ErrorMessage ? [detail.ErrorMessage] : [];
|
|
444
|
+
return { RecordID: detail.RecordID, Status: detail.Status, Changes: preview.Changes, Errors: errors, Withheld: preview.Withheld };
|
|
370
445
|
}
|
|
371
446
|
/** Builds the engine scope from the host-supplied context (delegates to the pure helper). */
|
|
372
447
|
buildScope() {
|
|
@@ -382,11 +457,11 @@ let RecordProcessRunnerUXComponent = class RecordProcessRunnerUXComponent extend
|
|
|
382
457
|
this.cdr.detectChanges();
|
|
383
458
|
}
|
|
384
459
|
static ɵfac = /*@__PURE__*/ (() => { let ɵRecordProcessRunnerUXComponent_BaseFactory; return function RecordProcessRunnerUXComponent_Factory(__ngFactoryType__) { return (ɵRecordProcessRunnerUXComponent_BaseFactory || (ɵRecordProcessRunnerUXComponent_BaseFactory = i0.ɵɵgetInheritedFactory(RecordProcessRunnerUXComponent)))(__ngFactoryType__ || RecordProcessRunnerUXComponent); }; })();
|
|
385
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecordProcessRunnerUXComponent, selectors: [["mj-record-process-runner-ux"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 6, consts: [[3, "Close", "Visible", "Width", "Title", "Closeable"], [1, "rp-runner"], [1, "rp-status"], [1, "rp-error"], [1, "rp-done"], ["mjButton", "", "variant", "primary"], ["mjButton", ""], ["Type", "infinite"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "fa-solid", "fa-circle-check"], [1, "rp-warn"], [1, "rp-summary"], [1, "rp-pill", "rp-pill--primary"], [1, "rp-pill"], [1, "rp-pill", "rp-pill--muted"], [1, "rp-pill", "rp-pill--error"], ["Size", "compact", "Variant", "success", "Icon", "fa-regular fa-circle-check", "Title", "Nothing to change", 1, "rp-empty", 3, "Message"], ["role", "table", 1, "rp-diff"], ["role", "row", 1, "rp-diff-record"], [1, "rp-truncated"], [1, "rp-diff-key", 3, "title"], [1, "rp-diff-changes"], [1, "rp-change"], [1, "rp-change", "rp-change--error"], [1, "rp-field"], [1, "rp-old"], [1, "fa-solid", "fa-arrow-right-long", "rp-arrow"], [1, "
|
|
460
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RecordProcessRunnerUXComponent, selectors: [["mj-record-process-runner-ux"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 6, consts: [[3, "Close", "Visible", "Width", "Title", "Closeable"], [1, "rp-runner"], [1, "rp-status"], [1, "rp-error"], [1, "rp-done"], ["mjButton", "", "variant", "primary"], ["mjButton", ""], ["Type", "infinite"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "fa-solid", "fa-circle-check"], [1, "rp-warn"], ["role", "alert", 1, "rp-refusal"], [1, "rp-summary"], [1, "rp-pill", "rp-pill--primary"], [1, "rp-pill"], [1, "rp-pill", "rp-pill--muted"], [1, "rp-pill", "rp-pill--error"], ["Size", "compact", "Variant", "success", "Icon", "fa-regular fa-circle-check", "Title", "Nothing to change", 1, "rp-empty", 3, "Message"], [1, "fa-solid", "fa-ban"], ["role", "table", 1, "rp-diff"], ["role", "row", 1, "rp-diff-record"], [1, "rp-truncated"], [1, "rp-diff-key", 3, "title"], [1, "rp-diff-changes"], [1, "rp-change"], [1, "rp-change", "rp-change--error"], [1, "rp-change", "rp-change--withheld"], [1, "rp-field"], [1, "rp-new"], [1, "rp-old"], [1, "fa-solid", "fa-arrow-right-long", "rp-arrow"], [1, "fa-solid", "fa-circle-info"], ["mjButton", "", 3, "click"], ["mjButton", "", "variant", "primary", 3, "click"], [1, "fa-solid", "fa-check"]], template: function RecordProcessRunnerUXComponent_Template(rf, ctx) { if (rf & 1) {
|
|
386
461
|
i0.ɵɵelementStart(0, "mj-dialog", 0);
|
|
387
462
|
i0.ɵɵlistener("Close", function RecordProcessRunnerUXComponent_Template_mj_dialog_Close_0_listener() { return ctx.OnCancel(); });
|
|
388
463
|
i0.ɵɵelementStart(1, "div", 1);
|
|
389
|
-
i0.ɵɵconditionalCreate(2, RecordProcessRunnerUXComponent_Case_2_Template, 4, 0, "div", 2)(3, RecordProcessRunnerUXComponent_Case_3_Template, 4, 2, "div", 2)(4, RecordProcessRunnerUXComponent_Case_4_Template, 7, 1, "div", 3)(5, RecordProcessRunnerUXComponent_Case_5_Template, 6, 2, "div", 4)(6, RecordProcessRunnerUXComponent_Case_6_Template,
|
|
464
|
+
i0.ɵɵconditionalCreate(2, RecordProcessRunnerUXComponent_Case_2_Template, 4, 0, "div", 2)(3, RecordProcessRunnerUXComponent_Case_3_Template, 4, 2, "div", 2)(4, RecordProcessRunnerUXComponent_Case_4_Template, 7, 1, "div", 3)(5, RecordProcessRunnerUXComponent_Case_5_Template, 6, 2, "div", 4)(6, RecordProcessRunnerUXComponent_Case_6_Template, 10, 8);
|
|
390
465
|
i0.ɵɵelementEnd();
|
|
391
466
|
i0.ɵɵelementStart(7, "mj-dialog-actions");
|
|
392
467
|
i0.ɵɵconditionalCreate(8, RecordProcessRunnerUXComponent_Case_8_Template, 3, 1)(9, RecordProcessRunnerUXComponent_Case_9_Template, 2, 0, "button", 5)(10, RecordProcessRunnerUXComponent_Case_10_Template, 2, 0, "button", 6);
|
|
@@ -399,7 +474,7 @@ let RecordProcessRunnerUXComponent = class RecordProcessRunnerUXComponent extend
|
|
|
399
474
|
i0.ɵɵconditional((tmp_4_0 = ctx.State) === "loading" ? 2 : tmp_4_0 === "applying" ? 3 : tmp_4_0 === "error" ? 4 : tmp_4_0 === "done" ? 5 : tmp_4_0 === "preview" ? 6 : -1);
|
|
400
475
|
i0.ɵɵadvance(6);
|
|
401
476
|
i0.ɵɵconditional((tmp_5_0 = ctx.State) === "preview" ? 8 : tmp_5_0 === "done" ? 9 : tmp_5_0 === "error" ? 10 : -1);
|
|
402
|
-
} }, dependencies: [MJDialogComponent, MJDialogActionsComponent, MJButtonDirective, MJProgressBarComponent, MJEmptyStateComponent], styles: [".rp-runner[_ngcontent-%COMP%] { min-height: 120px; color: var(--mj-text-primary); }\n .rp-status[_ngcontent-%COMP%] { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 12px; color: var(--mj-text-secondary); }\n .rp-status[_ngcontent-%COMP%] mj-progress-bar[_ngcontent-%COMP%] { width: 60%; }\n .rp-error[_ngcontent-%COMP%], .rp-done[_ngcontent-%COMP%] { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--mj-radius-md, 8px); }\n .rp-error[_ngcontent-%COMP%] { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-done[_ngcontent-%COMP%] { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .rp-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .rp-done[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 22px; margin-top: 2px; }\n .rp-error[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .rp-done[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 4px 0 0; }\n .rp-warn[_ngcontent-%COMP%] { color: var(--mj-status-warning-text); }\n .rp-summary[_ngcontent-%COMP%] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }\n .rp-pill[_ngcontent-%COMP%] { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n .rp-pill--primary[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface)); color: var(--mj-brand-primary); }\n .rp-pill--error[_ngcontent-%COMP%] { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-pill--muted[_ngcontent-%COMP%] { background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); }\n .rp-empty[_ngcontent-%COMP%] { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--mj-text-muted); }\n .rp-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 26px; color: var(--mj-status-success); }\n .rp-diff[_ngcontent-%COMP%] { max-height: 420px; overflow-y: auto; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md, 8px); }\n .rp-diff-record[_ngcontent-%COMP%] { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--mj-border-subtle); }\n .rp-diff-record[_ngcontent-%COMP%]:last-child { border-bottom: none; }\n .rp-diff-key[_ngcontent-%COMP%] { font-family: var(--mj-font-mono, monospace); font-size: 12px; color: var(--mj-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .rp-change[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; font-size: 13px; }\n .rp-change--error[_ngcontent-%COMP%] { color: var(--mj-status-error-text); }\n .rp-field[_ngcontent-%COMP%] { font-weight: 600; min-width: 120px; }\n .rp-old[_ngcontent-%COMP%] { color: var(--mj-text-muted); text-decoration: line-through; }\n .rp-new[_ngcontent-%COMP%] { color: var(--mj-status-success-text); font-weight: 600; }\n .rp-arrow[_ngcontent-%COMP%] { color: var(--mj-text-disabled); font-size: 11px; }\n .rp-truncated[_ngcontent-%COMP%] { margin-top: 10px; font-size: 12px; color: var(--mj-text-muted); }\n button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { margin-right: 6px; }"], changeDetection: 0 });
|
|
477
|
+
} }, dependencies: [MJDialogComponent, MJDialogActionsComponent, MJButtonDirective, MJProgressBarComponent, MJEmptyStateComponent], styles: [".rp-runner[_ngcontent-%COMP%] { min-height: 120px; color: var(--mj-text-primary); }\n .rp-status[_ngcontent-%COMP%] { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 12px; color: var(--mj-text-secondary); }\n .rp-status[_ngcontent-%COMP%] mj-progress-bar[_ngcontent-%COMP%] { width: 60%; }\n .rp-error[_ngcontent-%COMP%], .rp-done[_ngcontent-%COMP%] { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--mj-radius-md, 8px); }\n .rp-error[_ngcontent-%COMP%] { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-done[_ngcontent-%COMP%] { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .rp-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .rp-done[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 22px; margin-top: 2px; }\n .rp-error[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .rp-done[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 4px 0 0; }\n .rp-warn[_ngcontent-%COMP%] { color: var(--mj-status-warning-text); }\n .rp-refusal[_ngcontent-%COMP%] { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--mj-radius-md, 8px); background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n .rp-refusal[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 20px; margin-top: 2px; }\n .rp-refusal[_ngcontent-%COMP%] p[_ngcontent-%COMP%] { margin: 4px 0 0; }\n .rp-summary[_ngcontent-%COMP%] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }\n .rp-pill[_ngcontent-%COMP%] { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n .rp-pill--primary[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface)); color: var(--mj-brand-primary); }\n .rp-pill--error[_ngcontent-%COMP%] { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-pill--muted[_ngcontent-%COMP%] { background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); }\n .rp-empty[_ngcontent-%COMP%] { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--mj-text-muted); }\n .rp-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 26px; color: var(--mj-status-success); }\n .rp-diff[_ngcontent-%COMP%] { max-height: 420px; overflow-y: auto; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md, 8px); }\n .rp-diff-record[_ngcontent-%COMP%] { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--mj-border-subtle); }\n .rp-diff-record[_ngcontent-%COMP%]:last-child { border-bottom: none; }\n .rp-diff-key[_ngcontent-%COMP%] { font-family: var(--mj-font-mono, monospace); font-size: 12px; color: var(--mj-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .rp-change[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; font-size: 13px; }\n .rp-change--error[_ngcontent-%COMP%] { color: var(--mj-status-error-text); }\n .rp-change--withheld[_ngcontent-%COMP%] { color: var(--mj-text-muted); }\n .rp-field[_ngcontent-%COMP%] { font-weight: 600; min-width: 120px; }\n .rp-old[_ngcontent-%COMP%] { color: var(--mj-text-muted); text-decoration: line-through; }\n .rp-new[_ngcontent-%COMP%] { color: var(--mj-status-success-text); font-weight: 600; }\n .rp-arrow[_ngcontent-%COMP%] { color: var(--mj-text-disabled); font-size: 11px; }\n .rp-truncated[_ngcontent-%COMP%] { margin-top: 10px; font-size: 12px; color: var(--mj-text-muted); }\n button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { margin-right: 6px; }"], changeDetection: 0 });
|
|
403
478
|
};
|
|
404
479
|
RecordProcessRunnerUXComponent = RecordProcessRunnerUXComponent_1 = __decorate([
|
|
405
480
|
RegisterClass(BaseEntityActionRuntimeUX, 'RecordProcessRunnerUX')
|
|
@@ -444,9 +519,19 @@ export { RecordProcessRunnerUXComponent };
|
|
|
444
519
|
</div>
|
|
445
520
|
}
|
|
446
521
|
@case ('preview') {
|
|
522
|
+
@if (PreviewResult?.WouldRefuse) {
|
|
523
|
+
<div class="rp-refusal" role="alert">
|
|
524
|
+
<i class="fa-solid fa-ban"></i>
|
|
525
|
+
<div>
|
|
526
|
+
<strong>Applying these changes would be refused</strong>
|
|
527
|
+
<p>{{ PreviewResult?.WouldRefuse }}</p>
|
|
528
|
+
<p>The preview below shows what this version would write once it may run.</p>
|
|
529
|
+
</div>
|
|
530
|
+
</div>
|
|
531
|
+
}
|
|
447
532
|
<div class="rp-summary">
|
|
448
533
|
<span class="rp-pill rp-pill--primary">{{ ChangedRecordCount }} of {{ PreviewResult?.Processed ?? 0 }} {{ EntityLabel }} will change</span>
|
|
449
|
-
<span class="rp-pill">{{ TotalChangeCount }}
|
|
534
|
+
<span class="rp-pill">{{ TotalChangeCount }} change(s)</span>
|
|
450
535
|
@if (SkippedCount) { <span class="rp-pill rp-pill--muted">{{ SkippedCount }} unchanged</span> }
|
|
451
536
|
@if (ErroredCount) { <span class="rp-pill rp-pill--error">{{ ErroredCount }} error(s)</span> }
|
|
452
537
|
</div>
|
|
@@ -462,16 +547,25 @@ export { RecordProcessRunnerUXComponent };
|
|
|
462
547
|
<div class="rp-diff-record" role="row">
|
|
463
548
|
<div class="rp-diff-key" [title]="row.RecordID">{{ row.RecordID }}</div>
|
|
464
549
|
<div class="rp-diff-changes">
|
|
465
|
-
@for (c of row.Changes; track
|
|
550
|
+
@for (c of row.Changes; track $index) {
|
|
466
551
|
<div class="rp-change">
|
|
467
552
|
<span class="rp-field">{{ c.Field }}</span>
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
553
|
+
@if (c.IsAddition) {
|
|
554
|
+
<span class="rp-new">{{ Display(c.NewValue) }}</span>
|
|
555
|
+
} @else {
|
|
556
|
+
<span class="rp-old">{{ Display(c.OldValue) }}</span>
|
|
557
|
+
<i class="fa-solid fa-arrow-right-long rp-arrow"></i>
|
|
558
|
+
<span class="rp-new">{{ Display(c.NewValue) }}</span>
|
|
559
|
+
}
|
|
471
560
|
</div>
|
|
472
561
|
}
|
|
473
|
-
@
|
|
474
|
-
<div class="rp-change rp-change--error">{{
|
|
562
|
+
@for (message of row.Errors; track $index) {
|
|
563
|
+
<div class="rp-change rp-change--error">{{ message }}</div>
|
|
564
|
+
}
|
|
565
|
+
@for (line of row.Withheld; track $index) {
|
|
566
|
+
<div class="rp-change rp-change--withheld">
|
|
567
|
+
<i class="fa-solid fa-circle-info"></i>{{ line }}
|
|
568
|
+
</div>
|
|
475
569
|
}
|
|
476
570
|
</div>
|
|
477
571
|
</div>
|
|
@@ -488,7 +582,7 @@ export { RecordProcessRunnerUXComponent };
|
|
|
488
582
|
<mj-dialog-actions>
|
|
489
583
|
@switch (State) {
|
|
490
584
|
@case ('preview') {
|
|
491
|
-
@if (
|
|
585
|
+
@if (CanApply) {
|
|
492
586
|
<button mjButton variant="primary" (click)="Apply()">
|
|
493
587
|
<i class="fa-solid fa-check"></i> Apply {{ TotalChangeCount }} change(s)
|
|
494
588
|
</button>
|
|
@@ -500,7 +594,7 @@ export { RecordProcessRunnerUXComponent };
|
|
|
500
594
|
}
|
|
501
595
|
</mj-dialog-actions>
|
|
502
596
|
</mj-dialog>
|
|
503
|
-
`, styles: ["\n .rp-runner { min-height: 120px; color: var(--mj-text-primary); }\n .rp-status { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 12px; color: var(--mj-text-secondary); }\n .rp-status mj-progress-bar { width: 60%; }\n .rp-error, .rp-done { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--mj-radius-md, 8px); }\n .rp-error { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-done { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .rp-error i, .rp-done i { font-size: 22px; margin-top: 2px; }\n .rp-error p, .rp-done p { margin: 4px 0 0; }\n .rp-warn { color: var(--mj-status-warning-text); }\n .rp-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }\n .rp-pill { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n .rp-pill--primary { background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface)); color: var(--mj-brand-primary); }\n .rp-pill--error { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-pill--muted { background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); }\n .rp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--mj-text-muted); }\n .rp-empty i { font-size: 26px; color: var(--mj-status-success); }\n .rp-diff { max-height: 420px; overflow-y: auto; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md, 8px); }\n .rp-diff-record { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--mj-border-subtle); }\n .rp-diff-record:last-child { border-bottom: none; }\n .rp-diff-key { font-family: var(--mj-font-mono, monospace); font-size: 12px; color: var(--mj-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .rp-change { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; font-size: 13px; }\n .rp-change--error { color: var(--mj-status-error-text); }\n .rp-field { font-weight: 600; min-width: 120px; }\n .rp-old { color: var(--mj-text-muted); text-decoration: line-through; }\n .rp-new { color: var(--mj-status-success-text); font-weight: 600; }\n .rp-arrow { color: var(--mj-text-disabled); font-size: 11px; }\n .rp-truncated { margin-top: 10px; font-size: 12px; color: var(--mj-text-muted); }\n button i { margin-right: 6px; }\n "] }]
|
|
597
|
+
`, styles: ["\n .rp-runner { min-height: 120px; color: var(--mj-text-primary); }\n .rp-status { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 12px; color: var(--mj-text-secondary); }\n .rp-status mj-progress-bar { width: 60%; }\n .rp-error, .rp-done { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--mj-radius-md, 8px); }\n .rp-error { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-done { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .rp-error i, .rp-done i { font-size: 22px; margin-top: 2px; }\n .rp-error p, .rp-done p { margin: 4px 0 0; }\n .rp-warn { color: var(--mj-status-warning-text); }\n .rp-refusal { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--mj-radius-md, 8px); background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n .rp-refusal i { font-size: 20px; margin-top: 2px; }\n .rp-refusal p { margin: 4px 0 0; }\n .rp-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }\n .rp-pill { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n .rp-pill--primary { background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface)); color: var(--mj-brand-primary); }\n .rp-pill--error { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-pill--muted { background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); }\n .rp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--mj-text-muted); }\n .rp-empty i { font-size: 26px; color: var(--mj-status-success); }\n .rp-diff { max-height: 420px; overflow-y: auto; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md, 8px); }\n .rp-diff-record { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--mj-border-subtle); }\n .rp-diff-record:last-child { border-bottom: none; }\n .rp-diff-key { font-family: var(--mj-font-mono, monospace); font-size: 12px; color: var(--mj-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .rp-change { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; font-size: 13px; }\n .rp-change--error { color: var(--mj-status-error-text); }\n .rp-change--withheld { color: var(--mj-text-muted); }\n .rp-field { font-weight: 600; min-width: 120px; }\n .rp-old { color: var(--mj-text-muted); text-decoration: line-through; }\n .rp-new { color: var(--mj-status-success-text); font-weight: 600; }\n .rp-arrow { color: var(--mj-text-disabled); font-size: 11px; }\n .rp-truncated { margin-top: 10px; font-size: 12px; color: var(--mj-text-muted); }\n button i { margin-right: 6px; }\n "] }]
|
|
504
598
|
}], null, null); })();
|
|
505
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecordProcessRunnerUXComponent, { className: "RecordProcessRunnerUXComponent", filePath: "lib/record-process-runner/record-process-runner-ux.component.ts", lineNumber:
|
|
599
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RecordProcessRunnerUXComponent, { className: "RecordProcessRunnerUXComponent", filePath: "lib/record-process-runner/record-process-runner-ux.component.ts", lineNumber: 219 }); })();
|
|
506
600
|
//# sourceMappingURL=record-process-runner-ux.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-process-runner-ux.component.js","sourceRoot":"","sources":["../../../src/lib/record-process-runner/record-process-runner-ux.component.ts"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EACH,4BAA4B,GAI/B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACjK,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;;;;;IA6DzC,8BAAuB;IACnB,qCAAmD;IACnD,yBAAG;IAAA,mFAAyD;IAChE,AADgE,iBAAI,EAC9D;;;IAGN,8BAAuB;IACnB,qCAAmD;IACnD,yBAAG;IAAA,YAA+D;IACtE,AADsE,iBAAI,EACpE;;;IADC,eAA+D;IAA/D,2GAA+D;;;IAItE,8BAAsB;IAClB,uBAAgD;IAE5C,AADJ,2BAAK,aACO;IAAA,yCAAyB;IAAA,iBAAS;IAC1C,yBAAG;IAAA,YAAkB;IAE7B,AADI,AADyB,iBAAI,EACvB,EACJ;;;IAFK,eAAkB;IAAlB,yCAAkB;;;IAUjB,6BAAmB;IAAA,YAAyD;IAAA,iBAAI;;;IAA7D,cAAyD;IAAzD,8HAAyD;;;IALxF,8BAAqB;IACjB,uBAAwC;IAEpC,AADJ,2BAAK,aACO;IAAA,YAAiB;IAAA,iBAAS;IAClC,sGAA8B;IAItC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EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB;;AA8H9G,8BAA8B;IAnI1C,aAAa,CAAC,yBAAyB,EAAE,uBAAuB,CAAC;GAmIrD,8BAA8B,CA2J1C;;iFA3JY,8BAA8B;cAlI1C,SAAS;2BACI,6BAA6B,cAC3B,IAAI,mBACC,uBAAuB,CAAC,MAAM,WACtC,CAAC,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB,CAAC,YAC9G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6FT;;kFAgCQ,8BAA8B","sourcesContent":["/**\n * @fileoverview The flagship runtime-UX driver: runs a `MJ: Record Processes` (typically a FieldRules\n * bulk-update) as a safe, two-step flow — a server dry-run computes the exact per-record diff, the user\n * reviews it, and only on confirm does the real write happen. Registered as `RecordProcessRunnerUX`; an\n * entity action points its `RuntimeUXDriverClass` here and the host mounts it. All server work goes through\n * the typed {@link GraphQLRecordProcessClient}; the rich diff is read with `RunView` over\n * `MJ: Process Run Details`.\n * @module @memberjunction/ng-entity-action-ux\n */\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject } from '@angular/core';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { RegisterClass, SafeJSONParse } from '@memberjunction/global';\nimport {\n RecordProcessRunNowOperation,\n type RecordProcessRunNowInput,\n type RecordProcessRunNowOutput,\n type RecordProcessScopeOverride,\n} from '@memberjunction/core-entities';\nimport type { RemoteOpResult } from '@memberjunction/core';\nimport { MJDialogComponent, MJDialogActionsComponent, MJButtonDirective, MJProgressBarComponent, MJEmptyStateComponent } from '@memberjunction/ng-ui-components';\nimport { BaseEntityActionRuntimeUX } from '../base-entity-action-runtime-ux';\nimport { BuildRecordProcessScope, DisplayValue } from '../scope';\n\n/** The run summary the runner renders, mapped from the operation's typed output. */\ninterface RunSummary {\n Success: boolean;\n ProcessRunID?: string;\n Processed: number;\n Succeeded: number;\n Errored: number;\n Skipped: number;\n Status?: string;\n ErrorMessage?: string;\n}\n\n/** The driver's flow state. */\ntype RunnerState = 'loading' | 'preview' | 'applying' | 'done' | 'error';\n\n/** One computed field change (mirrors the engine's `FieldChange` for the bits the UI shows). */\ninterface DiffChange {\n Field: string;\n OldValue: unknown;\n NewValue: unknown;\n Applied: boolean;\n Changed: boolean;\n Error?: string;\n}\n\n/** The JSON payload persisted on each `MJ: Process Run Details.ResultPayload` for a FieldRules run. */\ninterface DiffPayload {\n DryRun: boolean;\n Changes: DiffChange[];\n ChangedFields: string[];\n}\n\n/** A per-record row of the preview table. */\ninterface RecordDiffRow {\n RecordID: string;\n Status: string;\n Changes: DiffChange[];\n ErrorMessage?: string;\n}\n\n/** Raw `MJ: Process Run Details` projection used to build the diff. */\ninterface RawDetail {\n RecordID: string;\n Status: string;\n ResultPayload?: string;\n ErrorMessage?: string;\n}\n\n@RegisterClass(BaseEntityActionRuntimeUX, 'RecordProcessRunnerUX')\n@Component({\n selector: 'mj-record-process-runner-ux',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MJDialogComponent, MJDialogActionsComponent, MJButtonDirective, MJProgressBarComponent, MJEmptyStateComponent],\n template: `\n <mj-dialog [Visible]=\"true\" [Width]=\"760\" [Title]=\"Title\" [Closeable]=\"State !== 'applying'\" (Close)=\"OnCancel()\">\n <div class=\"rp-runner\">\n @switch (State) {\n @case ('loading') {\n <div class=\"rp-status\">\n <mj-progress-bar Type=\"infinite\"></mj-progress-bar>\n <p>Computing a safe preview — no changes have been made yet…</p>\n </div>\n }\n @case ('applying') {\n <div class=\"rp-status\">\n <mj-progress-bar Type=\"infinite\"></mj-progress-bar>\n <p>Applying changes to {{ ChangedRecordCount }} {{ EntityLabel }}…</p>\n </div>\n }\n @case ('error') {\n <div class=\"rp-error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <div>\n <strong>Couldn't run this process</strong>\n <p>{{ ErrorMessage }}</p>\n </div>\n </div>\n }\n @case ('done') {\n <div class=\"rp-done\">\n <i class=\"fa-solid fa-circle-check\"></i>\n <div>\n <strong>{{ DoneMessage }}</strong>\n @if (AppliedResult?.Errored) {\n <p class=\"rp-warn\">{{ AppliedResult?.Errored }} record(s) reported an error.</p>\n }\n </div>\n </div>\n }\n @case ('preview') {\n <div class=\"rp-summary\">\n <span class=\"rp-pill rp-pill--primary\">{{ ChangedRecordCount }} of {{ PreviewResult?.Processed ?? 0 }} {{ EntityLabel }} will change</span>\n <span class=\"rp-pill\">{{ TotalChangeCount }} field update(s)</span>\n @if (SkippedCount) { <span class=\"rp-pill rp-pill--muted\">{{ SkippedCount }} unchanged</span> }\n @if (ErroredCount) { <span class=\"rp-pill rp-pill--error\">{{ ErroredCount }} error(s)</span> }\n </div>\n\n @if (DiffRows.length === 0) {\n <mj-empty-state class=\"rp-empty\" Size=\"compact\" Variant=\"success\"\n Icon=\"fa-regular fa-circle-check\"\n Title=\"Nothing to change\"\n [Message]=\"'The rules did not match any of the selected ' + EntityLabel + '.'\" />\n } @else {\n <div class=\"rp-diff\" role=\"table\">\n @for (row of DiffRows; track row.RecordID) {\n <div class=\"rp-diff-record\" role=\"row\">\n <div class=\"rp-diff-key\" [title]=\"row.RecordID\">{{ row.RecordID }}</div>\n <div class=\"rp-diff-changes\">\n @for (c of row.Changes; track c.Field) {\n <div class=\"rp-change\">\n <span class=\"rp-field\">{{ c.Field }}</span>\n <span class=\"rp-old\">{{ Display(c.OldValue) }}</span>\n <i class=\"fa-solid fa-arrow-right-long rp-arrow\"></i>\n <span class=\"rp-new\">{{ Display(c.NewValue) }}</span>\n </div>\n }\n @if (row.ErrorMessage) {\n <div class=\"rp-change rp-change--error\">{{ row.ErrorMessage }}</div>\n }\n </div>\n </div>\n }\n </div>\n @if (Truncated) {\n <p class=\"rp-truncated\">Showing the first {{ DiffRows.length }} changed records. The apply step covers the full scope.</p>\n }\n }\n }\n }\n </div>\n\n <mj-dialog-actions>\n @switch (State) {\n @case ('preview') {\n @if (HasChanges) {\n <button mjButton variant=\"primary\" (click)=\"Apply()\">\n <i class=\"fa-solid fa-check\"></i> Apply {{ TotalChangeCount }} change(s)\n </button>\n }\n <button mjButton (click)=\"OnCancel()\">Cancel</button>\n }\n @case ('done') { <button mjButton variant=\"primary\" (click)=\"Finish()\">Done</button> }\n @case ('error') { <button mjButton (click)=\"OnCancel()\">Close</button> }\n }\n </mj-dialog-actions>\n </mj-dialog>\n `,\n styles: [`\n .rp-runner { min-height: 120px; color: var(--mj-text-primary); }\n .rp-status { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 12px; color: var(--mj-text-secondary); }\n .rp-status mj-progress-bar { width: 60%; }\n .rp-error, .rp-done { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--mj-radius-md, 8px); }\n .rp-error { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-done { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .rp-error i, .rp-done i { font-size: 22px; margin-top: 2px; }\n .rp-error p, .rp-done p { margin: 4px 0 0; }\n .rp-warn { color: var(--mj-status-warning-text); }\n .rp-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }\n .rp-pill { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n .rp-pill--primary { background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface)); color: var(--mj-brand-primary); }\n .rp-pill--error { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-pill--muted { background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); }\n .rp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--mj-text-muted); }\n .rp-empty i { font-size: 26px; color: var(--mj-status-success); }\n .rp-diff { max-height: 420px; overflow-y: auto; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md, 8px); }\n .rp-diff-record { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--mj-border-subtle); }\n .rp-diff-record:last-child { border-bottom: none; }\n .rp-diff-key { font-family: var(--mj-font-mono, monospace); font-size: 12px; color: var(--mj-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .rp-change { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; font-size: 13px; }\n .rp-change--error { color: var(--mj-status-error-text); }\n .rp-field { font-weight: 600; min-width: 120px; }\n .rp-old { color: var(--mj-text-muted); text-decoration: line-through; }\n .rp-new { color: var(--mj-status-success-text); font-weight: 600; }\n .rp-arrow { color: var(--mj-text-disabled); font-size: 11px; }\n .rp-truncated { margin-top: 10px; font-size: 12px; color: var(--mj-text-muted); }\n button i { margin-right: 6px; }\n `],\n})\nexport class RecordProcessRunnerUXComponent extends BaseEntityActionRuntimeUX {\n private cdr = inject(ChangeDetectorRef);\n\n /** Cap on preview rows we render (the apply step always covers the full scope). */\n private static readonly MAX_PREVIEW_ROWS = 500;\n\n public State: RunnerState = 'loading';\n public ErrorMessage = '';\n public DiffRows: RecordDiffRow[] = [];\n public PreviewResult?: RunSummary;\n public AppliedResult?: RunSummary;\n public ChangedRecordCount = 0;\n public TotalChangeCount = 0;\n public Truncated = false;\n\n get Title(): string { return this.Context?.ActionLabel || 'Run Record Process'; }\n get EntityLabel(): string { return this.Context?.EntityInfo?.DisplayName || this.Context?.EntityInfo?.Name || 'records'; }\n get HasChanges(): boolean { return this.ChangedRecordCount > 0; }\n get SkippedCount(): number { return this.PreviewResult?.Skipped ?? 0; }\n get ErroredCount(): number { return this.PreviewResult?.Errored ?? 0; }\n get DoneMessage(): string {\n const r = this.AppliedResult;\n return r ? `Updated ${r.Succeeded} ${this.EntityLabel}.` : 'Done.';\n }\n\n /** Step 1: run a dry-run on the server and load the resulting per-record diff. */\n async Start(): Promise<void> {\n const recordProcessID = this.recordProcessID();\n if (!recordProcessID) {\n this.toError('This action has no RecordProcessID configured.');\n return;\n }\n try {\n const preview = await this.runOp(recordProcessID, true);\n this.PreviewResult = preview;\n if (!preview.Success) {\n this.toError(preview.ErrorMessage || 'The preview could not be computed.');\n return;\n }\n if (preview.ProcessRunID) {\n await this.loadDiff(preview.ProcessRunID);\n }\n this.State = 'preview';\n this.cdr.detectChanges();\n } catch (e) {\n this.toError(e instanceof Error ? e.message : String(e));\n }\n }\n\n /** Step 2: the user confirmed — run for real. */\n async Apply(): Promise<void> {\n const recordProcessID = this.recordProcessID();\n if (!recordProcessID) return;\n this.State = 'applying';\n this.cdr.detectChanges();\n try {\n const result = await this.runOp(recordProcessID, false);\n this.AppliedResult = result;\n if (!result.Success) {\n this.toError(result.ErrorMessage || 'The changes could not be applied.');\n return;\n }\n this.State = 'done';\n this.cdr.detectChanges();\n } catch (e) {\n this.toError(e instanceof Error ? e.message : String(e));\n }\n }\n\n /** Closes after a successful apply, telling the host to refresh. */\n Finish(): void {\n this.Completed.emit({ Completed: true, RefreshData: true, Message: this.DoneMessage });\n }\n\n /** Dismiss without applying (also used for the error/close button). */\n OnCancel(): void {\n if (this.State === 'applying') return; // don't allow dismiss mid-write\n this.Cancelled.emit();\n }\n\n /** Renders a value for the diff table (delegates to the pure helper). */\n Display(value: unknown): string {\n return DisplayValue(value);\n }\n\n /**\n * Runs the `RecordProcess.RunNow` Remote Operation and maps its typed output to a {@link RunSummary}.\n * `Execute` routes through the host's provider — marshalled over the generic `ExecuteRemoteOperation`\n * transport on the client, in-process on the server — so there is no bespoke resolver/client.\n */\n private async runOp(recordProcessID: string, dryRun: boolean): Promise<RunSummary> {\n const input: RecordProcessRunNowInput = { recordProcessID, scope: this.buildScope(), dryRun };\n const result: RemoteOpResult<RecordProcessRunNowOutput> =\n await new RecordProcessRunNowOperation().Execute(input, { provider: this.Context?.Provider ?? undefined });\n const o = result.Output;\n const completed = result.Success && o?.status === 'Completed';\n return {\n Success: completed,\n ProcessRunID: o?.processRunID,\n Processed: o?.processed ?? 0,\n Succeeded: o?.success ?? 0,\n Errored: o?.error ?? 0,\n Skipped: o?.skipped ?? 0,\n Status: o?.status,\n ErrorMessage: result.ErrorMessage ?? o?.errorMessage ?? (o && o.status !== 'Completed' ? `Run ended with status '${o.status}'` : undefined),\n };\n }\n\n /** Reads `MJ: Process Run Details` for the dry-run and builds the per-record diff rows. */\n private async loadDiff(processRunID: string): Promise<void> {\n const rv = await RunView.FromMetadataProvider(this.Context?.Provider ?? Metadata.Provider).RunView({\n EntityName: 'MJ: Process Run Details',\n ExtraFilter: `ProcessRunID='${processRunID}'`,\n Fields: ['RecordID', 'Status', 'ResultPayload', 'ErrorMessage'],\n OrderBy: 'RecordID',\n MaxRows: RecordProcessRunnerUXComponent.MAX_PREVIEW_ROWS,\n ResultType: 'simple',\n });\n if (!rv.Success) return;\n\n const rows: RecordDiffRow[] = [];\n let changedRecords = 0;\n let totalChanges = 0;\n for (const detail of rv.Results as RawDetail[]) {\n const payload = detail.ResultPayload ? SafeJSONParse<DiffPayload>(detail.ResultPayload) : undefined;\n const changes = (payload?.Changes ?? []).filter((c) => c.Applied && c.Changed && !c.Error);\n if (changes.length > 0) {\n changedRecords++;\n totalChanges += changes.length;\n }\n if (changes.length > 0 || detail.ErrorMessage) {\n rows.push({ RecordID: detail.RecordID, Status: detail.Status, Changes: changes, ErrorMessage: detail.ErrorMessage });\n }\n }\n this.DiffRows = rows;\n this.ChangedRecordCount = changedRecords;\n this.TotalChangeCount = totalChanges;\n this.Truncated = (this.PreviewResult?.Processed ?? 0) > RecordProcessRunnerUXComponent.MAX_PREVIEW_ROWS;\n }\n\n /** Builds the engine scope from the host-supplied context (delegates to the pure helper). */\n private buildScope(): RecordProcessScopeOverride {\n return BuildRecordProcessScope(this.Context);\n }\n\n private recordProcessID(): string | undefined {\n const id = this.Context?.Config?.['RecordProcessID'];\n return typeof id === 'string' && id.length > 0 ? id : undefined;\n }\n\n private toError(message: string): void {\n this.ErrorMessage = message;\n this.State = 'error';\n this.cdr.detectChanges();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"record-process-runner-ux.component.js","sourceRoot":"","sources":["../../../src/lib/record-process-runner/record-process-runner-ux.component.ts"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,EACH,4BAA4B,GAI/B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACjK,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAsB,MAAM,uBAAuB,CAAC;;;;IAoD1D,8BAAuB;IACnB,qCAAmD;IACnD,yBAAG;IAAA,mFAAyD;IAChE,AADgE,iBAAI,EAC9D;;;IAGN,8BAAuB;IACnB,qCAAmD;IACnD,yBAAG;IAAA,YAA+D;IACtE,AADsE,iBAAI,EACpE;;;IADC,eAA+D;IAA/D,2GAA+D;;;IAItE,8BAAsB;IAClB,uBAAgD;IAE5C,AADJ,2BAAK,aACO;IAAA,yCAAyB;IAAA,iBAAS;IAC1C,yBAAG;IAAA,YAAkB;IAE7B,AADI,AADyB,iBAAI,EACvB,EACJ;;;IAFK,eAAkB;IAAlB,yCAAkB;;;IAUjB,6BAAmB;IAAA,YAAyD;IAAA,iBAAI;;;IAA7D,cAAyD;IAAzD,8HAAyD;;;IALxF,8BAAqB;IACjB,uBAAwC;IAEpC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,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;QACrB,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;qSArLQ,8BAA8B,yBAA9B,8BAA8B;6DAA9B,8BAA8B;YAnJnC,oCAAkH;YAArB,8GAAS,cAAU,IAAC;YAC7G,8BAAuB;YAkCf,AAXA,AATA,AANA,AANA,yFAAmB,mEAMC,mEAMH,mEASD,0DAWG;YA2D3B,iBAAM;YAEN,yCAAmB;YAWX,AADA,AARA,+EAAmB,sEAQH,wEACC;YAG7B,AADI,iBAAoB,EACZ;;;;YA9G8C,AAAhB,AAAd,AAAjB,8BAAgB,cAAc,oBAAgB,uCAAmC;YAEpF,eA2FC;YA3FD,2CAAA,SAAS,mBAAT,UAAU,mBAAV,OAAO,mBAAP,MAAM,mBAAN,SAAS,UA2FR;YAID,eAWC;YAXD,2CAAA,SAAS,mBAAT,MAAM,mBAAN,OAAO,WAWN;4BA9GH,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB;;AAqJ9G,8BAA8B;IA1J1C,aAAa,CAAC,yBAAyB,EAAE,uBAAuB,CAAC;GA0JrD,8BAA8B,CAsL1C;;iFAtLY,8BAA8B;cAzJ1C,SAAS;2BACI,6BAA6B,cAC3B,IAAI,mBACC,uBAAuB,CAAC,MAAM,WACtC,CAAC,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB,CAAC,YAC9G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgHT;;kFAoCQ,8BAA8B","sourcesContent":["/**\n * @fileoverview The flagship runtime-UX driver: runs a `MJ: Record Processes` (typically a FieldRules\n * bulk-update) as a safe, two-step flow — a server dry-run computes the exact per-record diff, the user\n * reviews it, and only on confirm does the real write happen. Registered as `RecordProcessRunnerUX`; an\n * entity action points its `RuntimeUXDriverClass` here and the host mounts it. All server work goes through\n * the typed {@link GraphQLRecordProcessClient}; the rich diff is read with `RunView` over\n * `MJ: Process Run Details`.\n * @module @memberjunction/ng-entity-action-ux\n */\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject } from '@angular/core';\nimport { Metadata, RunView } from '@memberjunction/core';\nimport { RegisterClass, SafeJSONParse } from '@memberjunction/global';\nimport type { FieldRulesResultPayload, WriteBackResult, WriteBackRunPayload } from '@memberjunction/record-set-processor-base';\nimport {\n RecordProcessRunNowOperation,\n type RecordProcessRunNowInput,\n type RecordProcessRunNowOutput,\n type RecordProcessScopeOverride,\n} from '@memberjunction/core-entities';\nimport type { RemoteOpResult } from '@memberjunction/core';\nimport { MJDialogComponent, MJDialogActionsComponent, MJButtonDirective, MJProgressBarComponent, MJEmptyStateComponent } from '@memberjunction/ng-ui-components';\nimport { BaseEntityActionRuntimeUX } from '../base-entity-action-runtime-ux';\nimport { BuildRecordProcessScope, DisplayValue } from '../scope';\nimport { WriteBackPreviewModel, type PreviewChange } from '../write-back-preview';\n\n/** The run summary the runner renders, mapped from the operation's typed output. */\ninterface RunSummary {\n Success: boolean;\n ProcessRunID?: string;\n Processed: number;\n Succeeded: number;\n Errored: number;\n Skipped: number;\n Status?: RecordProcessRunNowOutput['status'];\n ErrorMessage?: string;\n /** A dry run whose real run would be refused (e.g. its Feature Pipeline version is not activated): why. */\n WouldRefuse?: string;\n}\n\n/** The driver's flow state. */\ntype RunnerState = 'loading' | 'preview' | 'applying' | 'done' | 'error';\n\n/** A run detail's payload: a FieldRules run's per-record diff, or a write-back run's `{ output, writeBack }`. Each carries only its own part. */\ntype RunDetailPayload = Partial<FieldRulesResultPayload> & WriteBackRunPayload;\n\n/** A per-record row of the preview table. */\ninterface RecordDiffRow {\n RecordID: string;\n Status: string;\n Changes: PreviewChange[];\n /** What the real write would fail on, or the run's own error for the record. */\n Errors: string[];\n /** Outputs the answer withheld below their confidence floor (not changes; see {@link WriteBackPreviewModel.WithheldLines}). */\n Withheld: string[];\n}\n\n/** Raw `MJ: Process Run Details` projection used to build the diff. */\ninterface RawDetail {\n RecordID: string;\n Status: string;\n ResultPayload?: string;\n ErrorMessage?: string;\n}\n\n@RegisterClass(BaseEntityActionRuntimeUX, 'RecordProcessRunnerUX')\n@Component({\n selector: 'mj-record-process-runner-ux',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MJDialogComponent, MJDialogActionsComponent, MJButtonDirective, MJProgressBarComponent, MJEmptyStateComponent],\n template: `\n <mj-dialog [Visible]=\"true\" [Width]=\"760\" [Title]=\"Title\" [Closeable]=\"State !== 'applying'\" (Close)=\"OnCancel()\">\n <div class=\"rp-runner\">\n @switch (State) {\n @case ('loading') {\n <div class=\"rp-status\">\n <mj-progress-bar Type=\"infinite\"></mj-progress-bar>\n <p>Computing a safe preview — no changes have been made yet…</p>\n </div>\n }\n @case ('applying') {\n <div class=\"rp-status\">\n <mj-progress-bar Type=\"infinite\"></mj-progress-bar>\n <p>Applying changes to {{ ChangedRecordCount }} {{ EntityLabel }}…</p>\n </div>\n }\n @case ('error') {\n <div class=\"rp-error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <div>\n <strong>Couldn't run this process</strong>\n <p>{{ ErrorMessage }}</p>\n </div>\n </div>\n }\n @case ('done') {\n <div class=\"rp-done\">\n <i class=\"fa-solid fa-circle-check\"></i>\n <div>\n <strong>{{ DoneMessage }}</strong>\n @if (AppliedResult?.Errored) {\n <p class=\"rp-warn\">{{ AppliedResult?.Errored }} record(s) reported an error.</p>\n }\n </div>\n </div>\n }\n @case ('preview') {\n @if (PreviewResult?.WouldRefuse) {\n <div class=\"rp-refusal\" role=\"alert\">\n <i class=\"fa-solid fa-ban\"></i>\n <div>\n <strong>Applying these changes would be refused</strong>\n <p>{{ PreviewResult?.WouldRefuse }}</p>\n <p>The preview below shows what this version would write once it may run.</p>\n </div>\n </div>\n }\n <div class=\"rp-summary\">\n <span class=\"rp-pill rp-pill--primary\">{{ ChangedRecordCount }} of {{ PreviewResult?.Processed ?? 0 }} {{ EntityLabel }} will change</span>\n <span class=\"rp-pill\">{{ TotalChangeCount }} change(s)</span>\n @if (SkippedCount) { <span class=\"rp-pill rp-pill--muted\">{{ SkippedCount }} unchanged</span> }\n @if (ErroredCount) { <span class=\"rp-pill rp-pill--error\">{{ ErroredCount }} error(s)</span> }\n </div>\n\n @if (DiffRows.length === 0) {\n <mj-empty-state class=\"rp-empty\" Size=\"compact\" Variant=\"success\"\n Icon=\"fa-regular fa-circle-check\"\n Title=\"Nothing to change\"\n [Message]=\"'The rules did not match any of the selected ' + EntityLabel + '.'\" />\n } @else {\n <div class=\"rp-diff\" role=\"table\">\n @for (row of DiffRows; track row.RecordID) {\n <div class=\"rp-diff-record\" role=\"row\">\n <div class=\"rp-diff-key\" [title]=\"row.RecordID\">{{ row.RecordID }}</div>\n <div class=\"rp-diff-changes\">\n @for (c of row.Changes; track $index) {\n <div class=\"rp-change\">\n <span class=\"rp-field\">{{ c.Field }}</span>\n @if (c.IsAddition) {\n <span class=\"rp-new\">{{ Display(c.NewValue) }}</span>\n } @else {\n <span class=\"rp-old\">{{ Display(c.OldValue) }}</span>\n <i class=\"fa-solid fa-arrow-right-long rp-arrow\"></i>\n <span class=\"rp-new\">{{ Display(c.NewValue) }}</span>\n }\n </div>\n }\n @for (message of row.Errors; track $index) {\n <div class=\"rp-change rp-change--error\">{{ message }}</div>\n }\n @for (line of row.Withheld; track $index) {\n <div class=\"rp-change rp-change--withheld\">\n <i class=\"fa-solid fa-circle-info\"></i>{{ line }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n @if (Truncated) {\n <p class=\"rp-truncated\">Showing the first {{ DiffRows.length }} changed records. The apply step covers the full scope.</p>\n }\n }\n }\n }\n </div>\n\n <mj-dialog-actions>\n @switch (State) {\n @case ('preview') {\n @if (CanApply) {\n <button mjButton variant=\"primary\" (click)=\"Apply()\">\n <i class=\"fa-solid fa-check\"></i> Apply {{ TotalChangeCount }} change(s)\n </button>\n }\n <button mjButton (click)=\"OnCancel()\">Cancel</button>\n }\n @case ('done') { <button mjButton variant=\"primary\" (click)=\"Finish()\">Done</button> }\n @case ('error') { <button mjButton (click)=\"OnCancel()\">Close</button> }\n }\n </mj-dialog-actions>\n </mj-dialog>\n `,\n styles: [`\n .rp-runner { min-height: 120px; color: var(--mj-text-primary); }\n .rp-status { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 12px; color: var(--mj-text-secondary); }\n .rp-status mj-progress-bar { width: 60%; }\n .rp-error, .rp-done { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--mj-radius-md, 8px); }\n .rp-error { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-done { background: var(--mj-status-success-bg); color: var(--mj-status-success-text); }\n .rp-error i, .rp-done i { font-size: 22px; margin-top: 2px; }\n .rp-error p, .rp-done p { margin: 4px 0 0; }\n .rp-warn { color: var(--mj-status-warning-text); }\n .rp-refusal { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--mj-radius-md, 8px); background: var(--mj-status-warning-bg); color: var(--mj-status-warning-text); }\n .rp-refusal i { font-size: 20px; margin-top: 2px; }\n .rp-refusal p { margin: 4px 0 0; }\n .rp-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }\n .rp-pill { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--mj-bg-surface-sunken); color: var(--mj-text-secondary); }\n .rp-pill--primary { background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface)); color: var(--mj-brand-primary); }\n .rp-pill--error { background: var(--mj-status-error-bg); color: var(--mj-status-error-text); }\n .rp-pill--muted { background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); }\n .rp-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px; color: var(--mj-text-muted); }\n .rp-empty i { font-size: 26px; color: var(--mj-status-success); }\n .rp-diff { max-height: 420px; overflow-y: auto; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md, 8px); }\n .rp-diff-record { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--mj-border-subtle); }\n .rp-diff-record:last-child { border-bottom: none; }\n .rp-diff-key { font-family: var(--mj-font-mono, monospace); font-size: 12px; color: var(--mj-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .rp-change { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; font-size: 13px; }\n .rp-change--error { color: var(--mj-status-error-text); }\n .rp-change--withheld { color: var(--mj-text-muted); }\n .rp-field { font-weight: 600; min-width: 120px; }\n .rp-old { color: var(--mj-text-muted); text-decoration: line-through; }\n .rp-new { color: var(--mj-status-success-text); font-weight: 600; }\n .rp-arrow { color: var(--mj-text-disabled); font-size: 11px; }\n .rp-truncated { margin-top: 10px; font-size: 12px; color: var(--mj-text-muted); }\n button i { margin-right: 6px; }\n `],\n})\nexport class RecordProcessRunnerUXComponent extends BaseEntityActionRuntimeUX {\n private cdr = inject(ChangeDetectorRef);\n\n /** Cap on preview rows we render (the apply step always covers the full scope). */\n private static readonly MAX_PREVIEW_ROWS = 500;\n\n public State: RunnerState = 'loading';\n public ErrorMessage = '';\n public DiffRows: RecordDiffRow[] = [];\n public PreviewResult?: RunSummary;\n public AppliedResult?: RunSummary;\n public ChangedRecordCount = 0;\n public TotalChangeCount = 0;\n public Truncated = false;\n\n get Title(): string { return this.Context?.ActionLabel || 'Run Record Process'; }\n get EntityLabel(): string { return this.Context?.EntityInfo?.DisplayName || this.Context?.EntityInfo?.Name || 'records'; }\n get HasChanges(): boolean { return this.ChangedRecordCount > 0; }\n /** Apply is offered only for changes a real run would make: never when the real run would be refused. */\n get CanApply(): boolean { return this.HasChanges && !this.PreviewResult?.WouldRefuse; }\n get SkippedCount(): number { return this.PreviewResult?.Skipped ?? 0; }\n get ErroredCount(): number { return this.PreviewResult?.Errored ?? 0; }\n get DoneMessage(): string {\n const r = this.AppliedResult;\n return r ? `Updated ${r.Succeeded} ${this.EntityLabel}.` : 'Done.';\n }\n\n /** Step 1: run a dry-run on the server and load the resulting per-record diff. */\n async Start(): Promise<void> {\n const recordProcessID = this.recordProcessID();\n if (!recordProcessID) {\n this.toError('This action has no RecordProcessID configured.');\n return;\n }\n try {\n const preview = await this.runOp(recordProcessID, true);\n this.PreviewResult = preview;\n if (!preview.Success) {\n this.toError(preview.ErrorMessage || 'The preview could not be computed.');\n return;\n }\n if (preview.ProcessRunID) {\n await this.loadDiff(preview.ProcessRunID);\n }\n this.State = 'preview';\n this.cdr.detectChanges();\n } catch (e) {\n this.toError(e instanceof Error ? e.message : String(e));\n }\n }\n\n /** Step 2: the user confirmed — run for real. Never when the preview said the real run would be refused. */\n async Apply(): Promise<void> {\n const recordProcessID = this.recordProcessID();\n if (!recordProcessID || this.PreviewResult?.WouldRefuse) return;\n this.State = 'applying';\n this.cdr.detectChanges();\n try {\n const result = await this.runOp(recordProcessID, false);\n this.AppliedResult = result;\n if (!result.Success) {\n this.toError(result.ErrorMessage || 'The changes could not be applied.');\n return;\n }\n this.State = 'done';\n this.cdr.detectChanges();\n } catch (e) {\n this.toError(e instanceof Error ? e.message : String(e));\n }\n }\n\n /** Closes after a successful apply, telling the host to refresh. */\n Finish(): void {\n this.Completed.emit({ Completed: true, RefreshData: true, Message: this.DoneMessage });\n }\n\n /** Dismiss without applying (also used for the error/close button). */\n OnCancel(): void {\n if (this.State === 'applying') return; // don't allow dismiss mid-write\n this.Cancelled.emit();\n }\n\n /** Renders a value for the diff table (delegates to the pure helper). */\n Display(value: unknown): string {\n return DisplayValue(value);\n }\n\n /**\n * Runs the `RecordProcess.RunNow` Remote Operation and maps its typed output to a {@link RunSummary}.\n * `Execute` routes through the host's provider — marshalled over the generic `ExecuteRemoteOperation`\n * transport on the client, in-process on the server — so there is no bespoke resolver/client.\n */\n private async runOp(recordProcessID: string, dryRun: boolean): Promise<RunSummary> {\n const input: RecordProcessRunNowInput = { recordProcessID, scope: this.buildScope(), dryRun };\n const result: RemoteOpResult<RecordProcessRunNowOutput> =\n await new RecordProcessRunNowOperation().Execute(input, { provider: this.Context?.Provider ?? undefined });\n const o = result.Output;\n const completed = result.Success && o?.status === 'Completed';\n return {\n Success: completed,\n ProcessRunID: o?.processRunID,\n Processed: o?.processed ?? 0,\n Succeeded: o?.success ?? 0,\n Errored: o?.error ?? 0,\n Skipped: o?.skipped ?? 0,\n Status: o?.status,\n ErrorMessage: result.ErrorMessage ?? o?.errorMessage ?? (o && o.status !== 'Completed' ? `Run ended with status '${o.status}'` : undefined),\n WouldRefuse: o?.wouldRefuse || undefined,\n };\n }\n\n /**\n * Reads `MJ: Process Run Details` for the dry-run and builds the per-record diff rows. A FieldRules run's detail\n * carries its own `Changes`; a write-back run's carries the `writeBack` preview ({@link WriteBackPreviewModel}).\n */\n private async loadDiff(processRunID: string): Promise<void> {\n const rv = await RunView.FromMetadataProvider(this.Context?.Provider ?? Metadata.Provider).RunView<RawDetail>({\n EntityName: 'MJ: Process Run Details',\n // skipped details are never rendered (the summary carries their count), so they must not spend the row budget\n ExtraFilter: `ProcessRunID='${processRunID}' AND Status <> 'Skipped'`,\n Fields: ['RecordID', 'Status', 'ResultPayload', 'ErrorMessage'],\n OrderBy: 'RecordID',\n MaxRows: RecordProcessRunnerUXComponent.MAX_PREVIEW_ROWS,\n ResultType: 'simple',\n });\n if (!rv.Success) return;\n\n const rows: RecordDiffRow[] = [];\n let changedRecords = 0;\n let totalChanges = 0;\n for (const detail of rv.Results) {\n const payload = detail.ResultPayload ? SafeJSONParse<RunDetailPayload>(detail.ResultPayload) || undefined : undefined;\n const row = payload?.writeBack ? this.writeBackRow(detail, payload.writeBack) : this.fieldRulesRow(detail, payload);\n if (row.Changes.length > 0) {\n changedRecords++;\n totalChanges += row.Changes.length;\n }\n // a record whose only news is a withheld output is listed too: the dialog says why it does not change\n if (row.Changes.length > 0 || row.Errors.length > 0 || row.Withheld.length > 0) {\n rows.push(row);\n }\n }\n this.DiffRows = rows;\n this.ChangedRecordCount = changedRecords;\n this.TotalChangeCount = totalChanges;\n this.Truncated = rv.Results.length >= RecordProcessRunnerUXComponent.MAX_PREVIEW_ROWS;\n }\n\n /** A FieldRules run's row: the changes the engine computed that it would apply. */\n private fieldRulesRow(detail: RawDetail, payload: RunDetailPayload | undefined): RecordDiffRow {\n const changes: PreviewChange[] = (payload?.Changes || []).filter((c) => c.Applied && c.Changed && !c.Error);\n return {\n RecordID: detail.RecordID, Status: detail.Status, Changes: changes,\n Errors: detail.ErrorMessage ? [detail.ErrorMessage] : [], Withheld: [],\n };\n }\n\n /**\n * A write-back run's row. What the real write would fail on is the record's error; the run detail's own message\n * (which repeats it) is shown only when the preview names nothing.\n */\n private writeBackRow(detail: RawDetail, writeBack: WriteBackResult): RecordDiffRow {\n const preview = WriteBackPreviewModel.Build(detail.RecordID, writeBack);\n const errors = preview.Errors.length > 0 ? preview.Errors : detail.ErrorMessage ? [detail.ErrorMessage] : [];\n return { RecordID: detail.RecordID, Status: detail.Status, Changes: preview.Changes, Errors: errors, Withheld: preview.Withheld };\n }\n\n /** Builds the engine scope from the host-supplied context (delegates to the pure helper). */\n private buildScope(): RecordProcessScopeOverride {\n return BuildRecordProcessScope(this.Context);\n }\n\n private recordProcessID(): string | undefined {\n const id = this.Context?.Config?.['RecordProcessID'];\n return typeof id === 'string' && id.length > 0 ? id : undefined;\n }\n\n private toError(message: string): void {\n this.ErrorMessage = message;\n this.State = 'error';\n this.cdr.detectChanges();\n }\n}\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { WriteBackResult } from '@memberjunction/record-set-processor-base';
|
|
2
|
+
/** One change the preview shows: a field's old and new value, or a value, row or tag the write stores. */
|
|
3
|
+
export interface PreviewChange {
|
|
4
|
+
Field: string;
|
|
5
|
+
/** `unknown`: whatever the entity field holds. */
|
|
6
|
+
OldValue: unknown;
|
|
7
|
+
NewValue: unknown;
|
|
8
|
+
Applied: boolean;
|
|
9
|
+
Changed: boolean;
|
|
10
|
+
Error?: string;
|
|
11
|
+
/** True for a value, row or tag the write stores: it has no old value to show. */
|
|
12
|
+
IsAddition?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** What a record's write-back preview adds to the dialog's rows. */
|
|
15
|
+
export interface WriteBackPreviewRows {
|
|
16
|
+
Changes: PreviewChange[];
|
|
17
|
+
Errors: string[];
|
|
18
|
+
Withheld: string[];
|
|
19
|
+
}
|
|
20
|
+
/** Builds the dialog rows for a write-back run's preview. */
|
|
21
|
+
export declare class WriteBackPreviewModel {
|
|
22
|
+
/** The changes and errors one record's preview shows; a record whose real write would fail has no changes. */
|
|
23
|
+
static Build(recordID: string, writeBack: WriteBackResult): WriteBackPreviewRows;
|
|
24
|
+
/** One line per withheld output: a field (kept when its column does not allow null) or a child mapping (rows unchanged). */
|
|
25
|
+
static WithheldLines(writeBack: WriteBackResult): string[];
|
|
26
|
+
/** A child row the write stores, its values shown without the link back to the processed record. */
|
|
27
|
+
private static childChange;
|
|
28
|
+
/** A tag's change: a matched tag is linked, an auto-grow tag created; a tag constrained growth cannot place changes nothing. */
|
|
29
|
+
private static tagChange;
|
|
30
|
+
/** A processor-deferred value an output with no write target would store: its previous value and the proposed one (no previous value is an addition). */
|
|
31
|
+
private static valueChange;
|
|
32
|
+
private static addition;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=write-back-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-back-preview.d.ts","sourceRoot":"","sources":["../../src/lib/write-back-preview.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAuB,eAAe,EAAyB,MAAM,2CAA2C,CAAC;AAG7H,0GAA0G;AAC1G,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,6DAA6D;AAC7D,qBAAa,qBAAqB;IAC9B,8GAA8G;WAChG,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,GAAG,oBAAoB;IAcvF,4HAA4H;WAC9G,aAAa,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,EAAE;IASjE,oGAAoG;IACpG,OAAO,CAAC,MAAM,CAAC,WAAW;IAO1B,gIAAgI;IAChI,OAAO,CAAC,MAAM,CAAC,SAAS;IAOxB,yJAAyJ;IACzJ,OAAO,CAAC,MAAM,CAAC,WAAW;IAW1B,OAAO,CAAC,MAAM,CAAC,QAAQ;CAG1B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The runner dialog's rows for a write-back run's dry-run preview (`writeBack` on each
|
|
3
|
+
* `MJ: Process Run Details.ResultPayload`: only what the real write would change).
|
|
4
|
+
* @module @memberjunction/ng-entity-action-ux
|
|
5
|
+
*/
|
|
6
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
7
|
+
import { DisplayValue } from './scope';
|
|
8
|
+
/** Builds the dialog rows for a write-back run's preview. */
|
|
9
|
+
export class WriteBackPreviewModel {
|
|
10
|
+
/** The changes and errors one record's preview shows; a record whose real write would fail has no changes. */
|
|
11
|
+
static Build(recordID, writeBack) {
|
|
12
|
+
const errors = writeBack.previewErrors || [];
|
|
13
|
+
if (errors.length > 0) {
|
|
14
|
+
return { Changes: [], Errors: [...errors], Withheld: [] };
|
|
15
|
+
}
|
|
16
|
+
const changes = [
|
|
17
|
+
...Object.entries(writeBack.previewFields || {}).map(([field, value]) => WriteBackPreviewModel.addition(field, value)),
|
|
18
|
+
...(writeBack.previewChildren || []).map((values) => WriteBackPreviewModel.childChange(recordID, values)),
|
|
19
|
+
...(writeBack.previewTags || []).flatMap((t) => WriteBackPreviewModel.tagChange(t)),
|
|
20
|
+
...(writeBack.previewValues || []).map(WriteBackPreviewModel.valueChange),
|
|
21
|
+
];
|
|
22
|
+
return { Changes: changes, Errors: [], Withheld: WriteBackPreviewModel.WithheldLines(writeBack) };
|
|
23
|
+
}
|
|
24
|
+
/** One line per withheld output: a field (kept when its column does not allow null) or a child mapping (rows unchanged). */
|
|
25
|
+
static WithheldLines(writeBack) {
|
|
26
|
+
const kept = new Set((writeBack.withheldKeptFields || []).map((f) => f.toLowerCase()));
|
|
27
|
+
const fields = (writeBack.withheldFields || []).map((f) => kept.has(f.toLowerCase())
|
|
28
|
+
? `${f}: withheld (below confidence); kept, the column does not allow null`
|
|
29
|
+
: `${f}: withheld (below confidence)`);
|
|
30
|
+
const children = (writeBack.withheldChildEntities || []).map((e) => `${e}: withheld (below confidence); rows unchanged`);
|
|
31
|
+
return [...fields, ...children];
|
|
32
|
+
}
|
|
33
|
+
/** A child row the write stores, its values shown without the link back to the processed record. */
|
|
34
|
+
static childChange(recordID, values) {
|
|
35
|
+
const shown = Object.entries(values)
|
|
36
|
+
.filter(([, value]) => !(typeof value === 'string' && UUIDsEqual(value, recordID)))
|
|
37
|
+
.map(([field, value]) => `${field}: ${DisplayValue(value)}`).join('; ');
|
|
38
|
+
return WriteBackPreviewModel.addition('Child row', shown);
|
|
39
|
+
}
|
|
40
|
+
/** A tag's change: a matched tag is linked, an auto-grow tag created; a tag constrained growth cannot place changes nothing. */
|
|
41
|
+
static tagChange(tag) {
|
|
42
|
+
if (tag.matched) {
|
|
43
|
+
return [WriteBackPreviewModel.addition('Tag', tag.resolvedTagName || tag.tagText)];
|
|
44
|
+
}
|
|
45
|
+
return tag.created ? [WriteBackPreviewModel.addition('Tag', `${tag.tagText} (new tag)`)] : [];
|
|
46
|
+
}
|
|
47
|
+
/** A processor-deferred value an output with no write target would store: its previous value and the proposed one (no previous value is an addition). */
|
|
48
|
+
static valueChange(p) {
|
|
49
|
+
return {
|
|
50
|
+
Field: p.Label || p.Name,
|
|
51
|
+
OldValue: p.Previous,
|
|
52
|
+
NewValue: p.Proposed,
|
|
53
|
+
Applied: true,
|
|
54
|
+
Changed: true,
|
|
55
|
+
IsAddition: p.Previous === null || p.Previous === undefined,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static addition(label, value) {
|
|
59
|
+
return { Field: label, OldValue: undefined, NewValue: value, Applied: true, Changed: true, IsAddition: true };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=write-back-preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-back-preview.js","sourceRoot":"","sources":["../../src/lib/write-back-preview.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsBvC,6DAA6D;AAC7D,MAAM,OAAO,qBAAqB;IAC9B,8GAA8G;IACvG,MAAM,CAAC,KAAK,CAAC,QAAgB,EAAE,SAA0B;QAC5D,MAAM,MAAM,GAAG,SAAS,CAAC,aAAa,IAAI,EAAE,CAAC;QAC7C,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;QAC9D,CAAC;QACD,MAAM,OAAO,GAAoB;YAC7B,GAAG,MAAM,CAAC,O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AC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI;YACxB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS;SAC9D,CAAC;IACN,CAAC;IAEO,MAAM,CAAC,QAAQ,CAAC,KAAa,EAAE,KAAc;QACjD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAClH,CAAC;CACJ","sourcesContent":["/**\n * @fileoverview The runner dialog's rows for a write-back run's dry-run preview (`writeBack` on each\n * `MJ: Process Run Details.ResultPayload`: only what the real write would change).\n * @module @memberjunction/ng-entity-action-ux\n */\nimport { UUIDsEqual } from '@memberjunction/global';\nimport type { TagWriteBackPreview, WriteBackResult, WriteBackValuePreview } from '@memberjunction/record-set-processor-base';\nimport { DisplayValue } from './scope';\n\n/** One change the preview shows: a field's old and new value, or a value, row or tag the write stores. */\nexport interface PreviewChange {\n Field: string;\n /** `unknown`: whatever the entity field holds. */\n OldValue: unknown;\n NewValue: unknown;\n Applied: boolean;\n Changed: boolean;\n Error?: string;\n /** True for a value, row or tag the write stores: it has no old value to show. */\n IsAddition?: boolean;\n}\n\n/** What a record's write-back preview adds to the dialog's rows. */\nexport interface WriteBackPreviewRows {\n Changes: PreviewChange[];\n Errors: string[];\n Withheld: string[];\n}\n\n/** Builds the dialog rows for a write-back run's preview. */\nexport class WriteBackPreviewModel {\n /** The changes and errors one record's preview shows; a record whose real write would fail has no changes. */\n public static Build(recordID: string, writeBack: WriteBackResult): WriteBackPreviewRows {\n const errors = writeBack.previewErrors || [];\n if (errors.length > 0) {\n return { Changes: [], Errors: [...errors], Withheld: [] };\n }\n const changes: PreviewChange[] = [\n ...Object.entries(writeBack.previewFields || {}).map(([field, value]) => WriteBackPreviewModel.addition(field, value)),\n ...(writeBack.previewChildren || []).map((values) => WriteBackPreviewModel.childChange(recordID, values)),\n ...(writeBack.previewTags || []).flatMap((t) => WriteBackPreviewModel.tagChange(t)),\n ...(writeBack.previewValues || []).map(WriteBackPreviewModel.valueChange),\n ];\n return { Changes: changes, Errors: [], Withheld: WriteBackPreviewModel.WithheldLines(writeBack) };\n }\n\n /** One line per withheld output: a field (kept when its column does not allow null) or a child mapping (rows unchanged). */\n public static WithheldLines(writeBack: WriteBackResult): string[] {\n const kept = new Set((writeBack.withheldKeptFields || []).map((f) => f.toLowerCase()));\n const fields = (writeBack.withheldFields || []).map((f) => kept.has(f.toLowerCase())\n ? `${f}: withheld (below confidence); kept, the column does not allow null`\n : `${f}: withheld (below confidence)`);\n const children = (writeBack.withheldChildEntities || []).map((e) => `${e}: withheld (below confidence); rows unchanged`);\n return [...fields, ...children];\n }\n\n /** A child row the write stores, its values shown without the link back to the processed record. */\n private static childChange(recordID: string, values: Record<string, unknown>): PreviewChange {\n const shown = Object.entries(values)\n .filter(([, value]) => !(typeof value === 'string' && UUIDsEqual(value, recordID)))\n .map(([field, value]) => `${field}: ${DisplayValue(value)}`).join('; ');\n return WriteBackPreviewModel.addition('Child row', shown);\n }\n\n /** A tag's change: a matched tag is linked, an auto-grow tag created; a tag constrained growth cannot place changes nothing. */\n private static tagChange(tag: TagWriteBackPreview): PreviewChange[] {\n if (tag.matched) {\n return [WriteBackPreviewModel.addition('Tag', tag.resolvedTagName || tag.tagText)];\n }\n return tag.created ? [WriteBackPreviewModel.addition('Tag', `${tag.tagText} (new tag)`)] : [];\n }\n\n /** A processor-deferred value an output with no write target would store: its previous value and the proposed one (no previous value is an addition). */\n private static valueChange(p: WriteBackValuePreview): PreviewChange {\n return {\n Field: p.Label || p.Name,\n OldValue: p.Previous,\n NewValue: p.Proposed,\n Applied: true,\n Changed: true,\n IsAddition: p.Previous === null || p.Previous === undefined,\n };\n }\n\n private static addition(label: string, value: unknown): PreviewChange {\n return { Field: label, OldValue: undefined, NewValue: value, Applied: true, Changed: true, IsAddition: true };\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-entity-action-ux",
|
|
3
|
-
"version": "6.2.0-edge.
|
|
3
|
+
"version": "6.2.0-edge.6",
|
|
4
4
|
"description": "MemberJunction: Pluggable runtime-UX framework for entity actions — a registry-resolved component seam that lets an entity action mount a rich, interactive UI (e.g. the Record Process bulk-update runner) instead of firing blind.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@angular/compiler-cli": "21.2.22",
|
|
22
22
|
"rimraf": "^5.0.0",
|
|
23
23
|
"vitest": "^4.0.18",
|
|
24
|
-
"@memberjunction/ng-test-utils": "6.2.0-edge.
|
|
24
|
+
"@memberjunction/ng-test-utils": "6.2.0-edge.6"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@angular/common": "^21.2.22",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"rxjs": "^7.8.2"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@memberjunction/core": "6.2.0-edge.
|
|
34
|
-
"@memberjunction/core-entities": "6.2.0-edge.
|
|
35
|
-
"@memberjunction/global": "6.2.0-edge.
|
|
36
|
-
"@memberjunction/graphql-dataprovider": "6.2.0-edge.
|
|
37
|
-
"@memberjunction/ng-base-types": "6.2.0-edge.
|
|
38
|
-
"@memberjunction/ng-ui-components": "6.2.0-edge.
|
|
39
|
-
"@memberjunction/record-set-processor-base": "6.2.0-edge.
|
|
33
|
+
"@memberjunction/core": "6.2.0-edge.6",
|
|
34
|
+
"@memberjunction/core-entities": "6.2.0-edge.6",
|
|
35
|
+
"@memberjunction/global": "6.2.0-edge.6",
|
|
36
|
+
"@memberjunction/graphql-dataprovider": "6.2.0-edge.6",
|
|
37
|
+
"@memberjunction/ng-base-types": "6.2.0-edge.6",
|
|
38
|
+
"@memberjunction/ng-ui-components": "6.2.0-edge.6",
|
|
39
|
+
"@memberjunction/record-set-processor-base": "6.2.0-edge.6",
|
|
40
40
|
"tslib": "^2.8.1"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|