@umbraco-engage/backoffice 17.2.0-rc1 → 17.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/ab-testing/test/entities.js +3 -1
  2. package/dist/core/components/data-cleanup-log/data-cleanup-log.element.d.ts +3 -2
  3. package/dist/core/components/data-cleanup-log/data-cleanup-log.element.js +274 -78
  4. package/dist/core/components/data-generation-log/data-generation-log.element.js +29 -13
  5. package/dist/core/lang/en.js +1 -1
  6. package/dist/core/property/property-value-validator.controller.js +1 -68
  7. package/dist/generated/client/client.gen.js +3 -3
  8. package/dist/generated/client/types.gen.d.ts +1 -1
  9. package/dist/generated/client/utils.gen.js +1 -1
  10. package/dist/generated/core/serverSentEvents.gen.d.ts +1 -1
  11. package/dist/generated/core/serverSentEvents.gen.js +3 -4
  12. package/dist/generated/core/types.gen.d.ts +1 -1
  13. package/dist/generated/core/utils.gen.js +1 -1
  14. package/dist/generated/index.d.ts +1 -1
  15. package/dist/generated/sdk.gen.d.ts +3 -2
  16. package/dist/generated/sdk.gen.js +7 -0
  17. package/dist/generated/types.gen.d.ts +53 -6
  18. package/dist/settings/screens/traffic-filter-screen.element.js +1 -1
  19. package/dist/settings/traffic-filter/entities.d.ts +1 -1
  20. package/dist/settings/traffic-filter/repository/detail/traffic-filter-detail-server.data-source.d.ts +1 -1
  21. package/dist/settings/traffic-filter/repository/detail/traffic-filter-detail-server.data-source.js +1 -1
  22. package/dist/settings/traffic-filter/repository/detail/traffic-filter-detail.repository.d.ts +2 -2
  23. package/dist/settings/traffic-filter/repository/detail/traffic-filter-detail.repository.js +1 -1
  24. package/dist/settings/traffic-filter/repository/detail/traffic-filter-detail.store.d.ts +1 -1
  25. package/dist/settings/traffic-filter/workspace/manifests.js +1 -1
  26. package/dist/settings/traffic-filter/workspace/traffic-filter-workspace-context.token.d.ts +1 -1
  27. package/dist/settings/traffic-filter/workspace/traffic-filter-workspace-editor.element.js +2 -2
  28. package/dist/settings/traffic-filter/workspace/traffic-filter-workspace.context.d.ts +3 -3
  29. package/dist/settings/traffic-filter/workspace/traffic-filter-workspace.context.js +8 -5
  30. package/dist/settings/workspace/views/overview/components/reporting-configuration-panel.element.js +4 -1
  31. package/dist/settings/workspace/views/overview/modal/element/data-cleanup-log-modal.element.d.ts +1 -1
  32. package/dist/settings/workspace/views/overview/modal/element/data-cleanup-log-modal.element.js +6 -6
  33. package/dist/settings/workspace/views/overview/modal/element/data-generation-log-modal.element.js +1 -1
  34. package/dist/settings/workspace/views/permissions/components/document-permissions.element.js +2 -2
  35. package/dist/tsconfig.build.tsbuildinfo +1 -1
  36. package/dist/umbraco-package.json +1 -1
  37. package/package.json +1 -1
@@ -79,6 +79,8 @@ export const AbTestSetupProperties = [
79
79
  labelKey: "addVariants",
80
80
  descriptionKey: "addVariantsDescription",
81
81
  editor: "Engage.PropertyEditorUi.VariantPicker",
82
- visible: [{ alias: "testType", oneOf: ["ContentType", "MultiPage", "SinglePage"] }],
82
+ visible: [
83
+ { alias: "testType", oneOf: ["ContentType", "MultiPage", "SinglePage"] },
84
+ ],
83
85
  },
84
86
  ];
@@ -1,11 +1,12 @@
1
1
  import { UmbLitElement } from "@umbraco-cms/backoffice/lit-element";
2
- import type { DataCleanupLogDtoModel } from "../../../generated/index.js";
2
+ import type { DataCleanupRunDtoModel } from "../../../generated/index.js";
3
3
  declare const elementName = "ue-data-cleanup-log";
4
4
  export declare class UeDataCleanupLogElement extends UmbLitElement {
5
5
  #private;
6
- results: Array<DataCleanupLogDtoModel>;
6
+ runs: Array<DataCleanupRunDtoModel>;
7
7
  private _errorDialogContent?;
8
8
  private _copyButtonState?;
9
+ private _expandedRuns;
9
10
  render(): import("lit-html").TemplateResult<1>;
10
11
  static styles: import("lit").CSSResult[];
11
12
  }
@@ -12,26 +12,36 @@ const elementName = "ue-data-cleanup-log";
12
12
  let UeDataCleanupLogElement = class UeDataCleanupLogElement extends UmbLitElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
- this.results = [];
15
+ this.runs = [];
16
+ this._expandedRuns = new Set();
16
17
  }
17
- #formatDuration(durationMs, options) {
18
+ #toggleExpand(runId) {
19
+ if (this._expandedRuns.has(runId)) {
20
+ this._expandedRuns.delete(runId);
21
+ }
22
+ else {
23
+ this._expandedRuns.add(runId);
24
+ }
25
+ this.requestUpdate();
26
+ }
27
+ #formatExecutorName(executor) {
28
+ return executor.replace(/Service$/, "").replace(/([a-z])([A-Z])/g, "$1 $2");
29
+ }
30
+ #formatDuration(durationMs) {
18
31
  if (durationMs < 1000) {
19
- if (false === "DurationFormat" in Intl) {
20
- return `${durationMs} milliseconds`;
21
- }
22
- const formatOptions = {
23
- style: "long",
24
- ...options,
25
- };
26
- // TODO: This is a hack to get around the fact that the DurationFormat is not yet available in the TypeScript typings (see CMS codebase)
27
- const formatter = new Intl
28
- .DurationFormat(this.localize.lang(), formatOptions);
29
- return formatter.format({
30
- milliseconds: durationMs,
31
- });
32
+ return `${Math.round(durationMs)}ms`;
32
33
  }
33
- const now = Date.now();
34
- return this.localize.duration(new Date(now), new Date(now + durationMs), options);
34
+ const totalSeconds = Math.round(durationMs / 1000);
35
+ const hours = Math.floor(totalSeconds / 3600);
36
+ const minutes = Math.floor((totalSeconds % 3600) / 60);
37
+ const seconds = totalSeconds % 60;
38
+ const parts = [];
39
+ if (hours > 0)
40
+ parts.push(`${hours}h`);
41
+ if (minutes > 0)
42
+ parts.push(`${minutes}m`);
43
+ parts.push(`${seconds}s`);
44
+ return parts.join("");
35
45
  }
36
46
  #formatDateRange(started, finished) {
37
47
  if (!started)
@@ -47,7 +57,7 @@ let UeDataCleanupLogElement = class UeDataCleanupLogElement extends UmbLitElemen
47
57
  if (sameDate)
48
58
  return formattedStart;
49
59
  const formattedFinish = this.localize.date(finished, UeTimeFormatOptions);
50
- return `${formattedStart} ${formattedFinish}`;
60
+ return `${formattedStart} \u2013 ${formattedFinish}`;
51
61
  }
52
62
  #showErrorDialog(errorMessage) {
53
63
  this._copyButtonState = undefined;
@@ -72,45 +82,108 @@ let UeDataCleanupLogElement = class UeDataCleanupLogElement extends UmbLitElemen
72
82
  this._copyButtonState = "failed";
73
83
  }
74
84
  }
75
- #renderResultRow(result) {
76
- const dateRange = this.#formatDateRange(result.started, result.finished);
77
- const clickable = result.failed && result.errorMessage;
85
+ #renderRunRow(run) {
86
+ const dateRange = this.#formatDateRange(run.started, run.finished);
87
+ const isExpanded = this._expandedRuns.has(run.runId);
88
+ const hasDetails = (run.details?.length ?? 0) > 0;
89
+ const detailsId = `cleanup-run-details-${run.runId}`;
90
+ const cells = html `
91
+ <span class="cell col-expand" role="cell">
92
+ ${when(hasDetails, () => html `<uui-symbol-expand ?open=${isExpanded}></uui-symbol-expand>`)}
93
+ </span>
94
+ <span class="cell col-date" role="cell">${dateRange}</span>
95
+ <span class="cell col-records" role="cell">
96
+ ${this.localize.number(run.totalRecordsAffected)}
97
+ </span>
98
+ <span class="cell col-duration" role="cell">
99
+ ${this.#formatDuration(run.totalDurationMs)}
100
+ </span>
101
+ <span class="cell col-status" role="cell">
102
+ ${when(run.failed, () => html `<uui-tag color="danger" look="primary"
103
+ >${this.localize.term("engage_failed")}</uui-tag
104
+ >`, () => html `<uui-tag color="positive"
105
+ >${this.localize.term("engage_success")}</uui-tag
106
+ >`)}
107
+ </span>
108
+ `;
109
+ return html `
110
+ ${hasDetails
111
+ ? html `<button
112
+ type="button"
113
+ class="row run-row interactive"
114
+ role="row"
115
+ aria-expanded=${isExpanded}
116
+ aria-controls=${detailsId}
117
+ @click=${() => this.#toggleExpand(run.runId)}
118
+ >
119
+ ${cells}
120
+ </button>`
121
+ : html `<div class="row run-row" role="row">${cells}</div>`}
122
+ ${when(isExpanded, () => this.#renderDetailPanel(run, detailsId))}
123
+ `;
124
+ }
125
+ #renderDetailPanel(run, detailsId) {
126
+ const details = run.details ?? [];
78
127
  return html `
79
- <uui-table-row
80
- ?failed=${result.failed}
81
- style=${clickable ? "cursor: pointer" : ""}
82
- @click=${clickable
83
- ? () => this.#showErrorDialog(result.errorMessage)
84
- : nothing}
85
- >
86
- <uui-table-cell>${dateRange}</uui-table-cell>
87
- <uui-table-cell>${result.executor}</uui-table-cell>
88
- <uui-table-cell>${result.tableName}</uui-table-cell>
89
- <uui-table-cell
90
- >${result.recordsAffected != null
91
- ? this.localize.number(result.recordsAffected)
92
- : this.localize.term("engage_notAvailable")}</uui-table-cell
93
- >
94
- <uui-table-cell
95
- >${result.durationMs != null
96
- ? this.#formatDuration(result.durationMs, { style: "short" })
97
- : this.localize.term("engage_notAvailable")}</uui-table-cell
98
- >
99
- <uui-table-cell>
100
- ${when(result.failed, () => html `<uui-tag color="danger" look="primary"
101
- >${this.localize.term("engage_failed")}</uui-tag
102
- >`, () => html `<uui-tag color="positive"
103
- >${this.localize.term("engage_success")}</uui-tag
104
- >`)}
105
- </uui-table-cell>
106
- </uui-table-row>
128
+ <div class="detail-panel" id=${detailsId}>
129
+ <div class="row detail-row detail-row--header" role="row">
130
+ <span class="cell col-expand" role="columnheader"></span>
131
+ <span class="cell col-service" role="columnheader">
132
+ ${this.localize.term("engage_dataCleanupLog_detailsExecutor")}
133
+ </span>
134
+ <span class="cell col-records" role="columnheader">
135
+ ${this.localize.term("engage_dataCleanupLog_detailsRecordsAffected")}
136
+ </span>
137
+ <span class="cell col-duration" role="columnheader">
138
+ ${this.localize.term("engage_dataCleanupLog_detailsDuration")}
139
+ </span>
140
+ <span class="cell col-status" role="columnheader">
141
+ ${this.localize.term("engage_status")}
142
+ </span>
143
+ </div>
144
+ ${details.map((detail) => {
145
+ const detailClickable = detail.failed && detail.errorMessage;
146
+ const cells = html `
147
+ <span class="cell col-expand" role="cell"></span>
148
+ <span class="cell col-service" role="cell">
149
+ ${this.#formatExecutorName(detail.executor)}
150
+ ${when(detail.tableName, () => html `<small class="table-name">${detail.tableName}</small>`)}
151
+ </span>
152
+ <span class="cell col-records" role="cell">
153
+ ${this.localize.number(detail.recordsAffected)}
154
+ </span>
155
+ <span class="cell col-duration" role="cell">
156
+ ${this.#formatDuration(detail.durationMs)}
157
+ </span>
158
+ <span class="cell col-status" role="cell">
159
+ ${when(detail.failed, () => html ` <uui-tag color="danger" look="primary"
160
+ >${this.localize.term("engage_failed")}</uui-tag
161
+ >
162
+ ${detailClickable
163
+ ? html `<uui-icon name="icon-info"></uui-icon>`
164
+ : nothing}`)}
165
+ </span>
166
+ `;
167
+ return detailClickable
168
+ ? html `<button
169
+ type="button"
170
+ class="row detail-row interactive"
171
+ role="row"
172
+ aria-haspopup="dialog"
173
+ @click=${() => this.#showErrorDialog(detail.errorMessage)}
174
+ >
175
+ ${cells}
176
+ </button>`
177
+ : html `<div class="row detail-row" role="row">${cells}</div>`;
178
+ })}
179
+ </div>
107
180
  `;
108
181
  }
109
182
  #renderErrorDialog() {
110
183
  if (!this._errorDialogContent)
111
184
  return nothing;
112
185
  return html `
113
- <uui-modal-dialog>
186
+ <uui-modal-dialog @uui:modal-close=${this.#closeErrorDialog}>
114
187
  <uui-dialog>
115
188
  <uui-dialog-layout headline=${this.localize.term("engage_failed")}>
116
189
  <pre class="error-details">${this._errorDialogContent}</pre>
@@ -136,29 +209,24 @@ let UeDataCleanupLogElement = class UeDataCleanupLogElement extends UmbLitElemen
136
209
  }
137
210
  render() {
138
211
  return html `
139
- <uui-table>
140
- <uui-table-head>
141
- <uui-table-head-cell
142
- >${this.localize.term("engage_date")}</uui-table-head-cell
143
- >
144
- <uui-table-head-cell
145
- >${this.localize.term("engage_dataCleanupLog_detailsExecutor")}</uui-table-head-cell
146
- >
147
- <uui-table-head-cell
148
- >${this.localize.term("engage_dataCleanupLog_detailsTable")}</uui-table-head-cell
149
- >
150
- <uui-table-head-cell
151
- >${this.localize.term("engage_dataCleanupLog_detailsRecordsAffected")}</uui-table-head-cell
152
- >
153
- <uui-table-head-cell
154
- >${this.localize.term("engage_dataCleanupLog_detailsDuration")}</uui-table-head-cell
155
- >
156
- <uui-table-head-cell
157
- >${this.localize.term("engage_status")}</uui-table-head-cell
158
- >
159
- </uui-table-head>
160
- ${this.results.map((r) => this.#renderResultRow(r))}
161
- </uui-table>
212
+ <div class="log-table" role="table">
213
+ <div class="row head" role="row">
214
+ <span class="cell col-expand" role="columnheader"></span>
215
+ <span class="cell col-date" role="columnheader">
216
+ ${this.localize.term("engage_date")}
217
+ </span>
218
+ <span class="cell col-records" role="columnheader">
219
+ ${this.localize.term("engage_dataCleanupLog_recordsAffected")}
220
+ </span>
221
+ <span class="cell col-duration" role="columnheader">
222
+ ${this.localize.term("engage_dataCleanupLog_detailsDuration")}
223
+ </span>
224
+ <span class="cell col-status" role="columnheader">
225
+ ${this.localize.term("engage_status")}
226
+ </span>
227
+ </div>
228
+ ${this.runs.map((r) => this.#renderRunRow(r))}
229
+ </div>
162
230
  ${this.#renderErrorDialog()}
163
231
  `;
164
232
  }
@@ -168,13 +236,138 @@ let UeDataCleanupLogElement = class UeDataCleanupLogElement extends UmbLitElemen
168
236
  display: block;
169
237
  }
170
238
 
171
- uui-table {
239
+ .log-table {
240
+ display: flex;
241
+ flex-direction: column;
172
242
  font-size: var(--uui-type-small-size);
243
+ background-color: var(--uui-color-surface);
244
+ border-radius: var(--uui-border-radius);
245
+ }
246
+
247
+ .row {
248
+ display: flex;
249
+ align-items: stretch;
250
+ border-top: 1px solid var(--uui-color-border);
251
+ }
252
+
253
+ button.row {
254
+ appearance: none;
255
+ background: none;
256
+ border: none;
257
+ border-top: 1px solid var(--uui-color-border);
258
+ color: inherit;
259
+ font: inherit;
260
+ margin: 0;
261
+ padding: 0;
262
+ text-align: left;
263
+ width: 100%;
264
+ }
265
+
266
+ button.row:focus-visible {
267
+ outline: 2px solid var(--uui-color-focus);
268
+ outline-offset: -2px;
269
+ }
270
+
271
+ .row.head {
272
+ border-top: none;
273
+ font-weight: bold;
274
+ }
275
+
276
+ .cell {
277
+ display: flex;
278
+ align-items: center;
279
+ padding: var(--uui-size-3) var(--uui-size-5);
280
+ min-height: calc(var(--uui-size-12) - 2 * var(--uui-size-3));
281
+ box-sizing: border-box;
282
+ overflow: hidden;
283
+ text-overflow: ellipsis;
284
+ white-space: nowrap;
285
+ }
286
+
287
+ .run-row > .cell {
288
+ padding-top: var(--uui-size-5);
289
+ padding-bottom: var(--uui-size-5);
290
+ }
291
+
292
+ .col-expand {
293
+ flex: 0 0 var(--uui-size-12);
294
+ padding-left: var(--uui-size-space-5);
295
+ padding-right: 0;
173
296
  }
174
297
 
175
- [failed] {
176
- background: var(--uui-color-danger);
177
- color: var(--uui-color-danger-contrast);
298
+ .col-date,
299
+ .col-service {
300
+ flex: 1 1 auto;
301
+ min-width: 0;
302
+ gap: var(--uui-size-space-3);
303
+ }
304
+
305
+ .table-name {
306
+ color: var(--uui-color-text-alt);
307
+ }
308
+
309
+ .col-records {
310
+ flex: 0 0 18%;
311
+ }
312
+
313
+ .col-duration {
314
+ flex: 0 0 15%;
315
+ }
316
+
317
+ .col-status {
318
+ flex: 0 0 15%;
319
+ gap: var(--uui-size-space-2);
320
+ }
321
+
322
+ .col-status uui-icon {
323
+ font-size: 1.5em;
324
+ }
325
+
326
+ .run-row.interactive {
327
+ cursor: pointer;
328
+ transition: color 80ms ease;
329
+ }
330
+
331
+ .run-row.interactive:hover {
332
+ color: var(--uui-color-interactive-emphasis);
333
+ }
334
+
335
+ uui-symbol-expand {
336
+ display: inline-flex;
337
+ vertical-align: middle;
338
+ }
339
+
340
+ .detail-panel {
341
+ margin: var(--uui-size-space-2) var(--uui-size-layout-1)
342
+ var(--uui-size-space-6);
343
+ border: 1px solid var(--uui-color-border);
344
+ border-radius: var(--uui-border-radius);
345
+ background-color: var(--uui-color-background);
346
+ overflow: hidden;
347
+ }
348
+
349
+ .detail-panel > .row {
350
+ width: calc(100% + 2 * var(--uui-size-layout-1) + 2px);
351
+ margin-left: calc(-1 * (var(--uui-size-layout-1) + 1px));
352
+ }
353
+
354
+ .detail-panel > .row:first-child {
355
+ border-top: none;
356
+ }
357
+
358
+ .detail-row--header {
359
+ font-weight: 600;
360
+ color: var(--uui-color-text-alt);
361
+ background-color: var(--uui-color-surface-alt);
362
+ }
363
+
364
+ .detail-row.interactive {
365
+ cursor: pointer;
366
+ transition: color 80ms ease;
367
+ }
368
+
369
+ .detail-row.interactive:hover {
370
+ color: var(--uui-color-interactive-emphasis);
178
371
  }
179
372
 
180
373
  .error-details {
@@ -192,13 +385,16 @@ let UeDataCleanupLogElement = class UeDataCleanupLogElement extends UmbLitElemen
192
385
  };
193
386
  __decorate([
194
387
  property({ type: Array })
195
- ], UeDataCleanupLogElement.prototype, "results", void 0);
388
+ ], UeDataCleanupLogElement.prototype, "runs", void 0);
196
389
  __decorate([
197
390
  state()
198
391
  ], UeDataCleanupLogElement.prototype, "_errorDialogContent", void 0);
199
392
  __decorate([
200
393
  state()
201
394
  ], UeDataCleanupLogElement.prototype, "_copyButtonState", void 0);
395
+ __decorate([
396
+ state()
397
+ ], UeDataCleanupLogElement.prototype, "_expandedRuns", void 0);
202
398
  UeDataCleanupLogElement = __decorate([
203
399
  customElement(elementName)
204
400
  ], UeDataCleanupLogElement);
@@ -79,18 +79,18 @@ let UeDataGenerationLogElement = class UeDataGenerationLogElement extends UmbLit
79
79
  return html `
80
80
  <uui-table-row
81
81
  ?failed=${result.failed}
82
- ?clickable=${clickable}
82
+ class=${clickable ? "result-row interactive" : "result-row"}
83
83
  @click=${clickable
84
84
  ? () => this.#showErrorDialog(result.errorMessage)
85
85
  : nothing}
86
86
  >
87
- <uui-table-cell>${dateRange}</uui-table-cell>
88
- <uui-table-cell
87
+ <uui-table-cell class="col-date">${dateRange}</uui-table-cell>
88
+ <uui-table-cell class="col-duration"
89
89
  >${durationMs != null
90
90
  ? this.#formatDuration(durationMs)
91
91
  : this.localize.term("engage_notAvailable")}</uui-table-cell
92
92
  >
93
- <uui-table-cell>
93
+ <uui-table-cell class="col-status">
94
94
  <div class="status-cell">
95
95
  ${when(result.failed, () => html `<uui-tag color="danger" look="primary"
96
96
  >${this.localize.term("engage_failed")}</uui-tag
@@ -136,13 +136,13 @@ let UeDataGenerationLogElement = class UeDataGenerationLogElement extends UmbLit
136
136
  return html `
137
137
  <uui-table>
138
138
  <uui-table-head>
139
- <uui-table-head-cell
139
+ <uui-table-head-cell class="col-date"
140
140
  >${this.localize.term("engage_date")}</uui-table-head-cell
141
141
  >
142
- <uui-table-head-cell
142
+ <uui-table-head-cell class="col-duration"
143
143
  >${this.localize.term("engage_dataGenerationLog_detailsDuration")}</uui-table-head-cell
144
144
  >
145
- <uui-table-head-cell
145
+ <uui-table-head-cell class="col-status"
146
146
  >${this.localize.term("engage_status")}</uui-table-head-cell
147
147
  >
148
148
  </uui-table-head>
@@ -159,19 +159,31 @@ let UeDataGenerationLogElement = class UeDataGenerationLogElement extends UmbLit
159
159
 
160
160
  uui-table {
161
161
  font-size: var(--uui-type-small-size);
162
+ table-layout: fixed;
162
163
  }
163
164
 
164
- [failed] {
165
- background: var(--uui-color-danger);
166
- color: var(--uui-color-danger-contrast);
165
+ .col-date {
166
+ width: auto;
167
167
  }
168
168
 
169
- [failed][clickable] {
169
+ .col-duration {
170
+ width: 20%;
171
+ }
172
+
173
+ .col-status {
174
+ width: 20%;
175
+ }
176
+
177
+ .result-row.interactive {
170
178
  cursor: pointer;
171
179
  }
172
180
 
173
- [failed][clickable]:hover {
174
- background: var(--uui-color-danger-emphasis);
181
+ .result-row.interactive uui-table-cell {
182
+ transition: color 80ms ease;
183
+ }
184
+
185
+ .result-row.interactive:hover uui-table-cell {
186
+ color: var(--uui-color-interactive-emphasis);
175
187
  }
176
188
 
177
189
  .status-cell {
@@ -180,6 +192,10 @@ let UeDataGenerationLogElement = class UeDataGenerationLogElement extends UmbLit
180
192
  gap: var(--uui-size-space-2);
181
193
  }
182
194
 
195
+ .status-cell uui-icon {
196
+ font-size: 1.5em;
197
+ }
198
+
183
199
  .error-details {
184
200
  margin: 0;
185
201
  padding: var(--uui-size-space-4);
@@ -489,8 +489,8 @@ export default {
489
489
  dataCleanupLogDescription: "Click here to see a record of every time the clean-up ran, including what was processed and if any issues occurred.",
490
490
  },
491
491
  engage_dataCleanupLog: {
492
+ recordsAffected: "Records affected",
492
493
  detailsExecutor: "Service",
493
- detailsTable: "Table",
494
494
  detailsRecordsAffected: "Records affected",
495
495
  detailsDuration: "Duration",
496
496
  },
@@ -1,19 +1,13 @@
1
- import { ENGAGE_WORKSPACE_CONTEXT } from "../context/workspace-context.token.js";
2
1
  import { UmbControllerBase } from "@umbraco-cms/backoffice/class-api";
3
- import { UMB_VALIDATION_CONTEXT, UmbDataPathPropertyValueQuery, } from "@umbraco-cms/backoffice/validation";
4
- import { UmbLocalizationController } from "@umbraco-cms/backoffice/localization-api";
2
+ import { UMB_VALIDATION_CONTEXT, } from "@umbraco-cms/backoffice/validation";
5
3
  // given we now validate IP on the server, there may not be any use for custom validation
6
4
  // we can defer to the CMS which will validate mandatory properties.
7
5
  // The only thing we lose is the ability to display messages on properties for patterns etc
8
6
  // but this should be possible with CMS validation, just not yet sure how.
9
7
  export class UePropertyValueValidatorController extends UmbControllerBase {
10
- //
11
8
  #validationContext;
12
- #workspaceContext;
13
- #localize = new UmbLocalizationController(this);
14
9
  #propertyConfig;
15
10
  #isValid = false;
16
- #dataPath;
17
11
  get isValid() {
18
12
  return this.#isValid;
19
13
  }
@@ -23,9 +17,6 @@ export class UePropertyValueValidatorController extends UmbControllerBase {
23
17
  constructor(host, propertyConfig) {
24
18
  super(host);
25
19
  this.#propertyConfig = propertyConfig;
26
- this.#dataPath = `$.values[${UmbDataPathPropertyValueQuery({
27
- alias: this.#propertyConfig.alias,
28
- })}].value`;
29
20
  this.consumeContext(UMB_VALIDATION_CONTEXT, (context) => {
30
21
  if (this.#validationContext) {
31
22
  this.#validationContext.removeValidator(this);
@@ -33,70 +24,12 @@ export class UePropertyValueValidatorController extends UmbControllerBase {
33
24
  this.#validationContext = context;
34
25
  context?.addValidator(this);
35
26
  });
36
- this.consumeContext(ENGAGE_WORKSPACE_CONTEXT, async (context) => {
37
- this.#workspaceContext = context;
38
- });
39
27
  }
40
28
  async validate() {
41
29
  this.#isValid = true;
42
- return;
43
- // if (!this.#propertyConfig?.alias) {
44
- // this.#isValid = false;
45
- // return;
46
- // }
47
- // if (!this.#propertyConfig.validation?.validateAs) {
48
- // this.#isValid = true;
49
- // return;
50
- // }
51
- // const propertyValue = this.#workspaceContext?.getPropertyValue(
52
- // this.#propertyConfig.alias
53
- // );
54
- // // no value? let the CMS validate it if needed
55
- // if (!propertyValue) {
56
- // this.#isValid = true;
57
- // return;
58
- // }
59
- // const valueAsArray = this.#valueAsArray(propertyValue);
60
- // // validate the value based on the validation type
61
- // switch (this.#propertyConfig.validation.validateAs) {
62
- // case "ipAddress": {
63
- // this.#isValid = valueAsArray.every((v) => this.#validateIpAddress(v));
64
- // break;
65
- // }
66
- // default: {
67
- // console.warn(
68
- // `Validation type "${
69
- // this.#propertyConfig.validation.validateAs
70
- // }" is not implemented.`
71
- // );
72
- // this.#isValid = true;
73
- // }
74
- // }
75
- // // Update validation message:
76
- // if (this.#isValid) {
77
- // this.#validationContext?.messages.removeMessagesByTypeAndPath(
78
- // "engage",
79
- // this.#dataPath
80
- // );
81
- // } else {
82
- // this.#validationContext?.messages.addMessage(
83
- // "engage",
84
- // this.#dataPath,
85
- // this.#localize.string(
86
- // this.#propertyConfig.validation.invalidMessage ||
87
- // "#engage_validation_invalid"
88
- // )
89
- // );
90
- // }
91
30
  }
92
31
  reset() {
93
32
  this.#isValid = false;
94
33
  }
95
34
  focusFirstInvalidElement() { }
96
- #valueAsArray(v) {
97
- if (Array.isArray(v)) {
98
- return v;
99
- }
100
- return [v];
101
- }
102
35
  }
@@ -34,11 +34,11 @@ export const createClient = (config = {}) => {
34
34
  if (opts.body === undefined || opts.serializedBody === '') {
35
35
  opts.headers.delete('Content-Type');
36
36
  }
37
- const url = buildUrl(opts);
38
- return { opts, url };
37
+ const resolvedOpts = opts;
38
+ const url = buildUrl(resolvedOpts);
39
+ return { opts: resolvedOpts, url };
39
40
  };
40
41
  const request = async (options) => {
41
- // @ts-expect-error
42
42
  const { opts, url } = await beforeRequest(options);
43
43
  const requestInit = {
44
44
  redirect: 'follow',
@@ -85,7 +85,7 @@ export interface ClientOptions {
85
85
  throwOnError?: boolean;
86
86
  }
87
87
  type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
88
- type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
88
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
89
89
  type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
90
90
  type BuildUrlFn = <TData extends {
91
91
  body?: unknown;