@umbraco-engage/backoffice 17.0.0-rc1 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ab-testing/test/collection/elements/ab-test-variant-name-column-layout.element.d.ts +4 -2
- package/dist/ab-testing/test/components/ab-testing-test-card.element.js +3 -0
- package/dist/ab-testing/test/components/split-url-picker/ab-testing-test-split-url-picker.element.js +4 -2
- package/dist/ab-testing/test/components/test-advice/ab-testing-test-indication.element.js +2 -2
- package/dist/ab-testing/test/components/variant-picker/ab-testing-test-variant-picker.element.js +44 -5
- package/dist/ab-testing/test/conditions/constants.d.ts +1 -0
- package/dist/ab-testing/test/conditions/constants.js +1 -0
- package/dist/ab-testing/test/conditions/document-save-and-publish-visibility.condition.d.ts +7 -0
- package/dist/ab-testing/test/conditions/document-save-and-publish-visibility.condition.js +12 -0
- package/dist/ab-testing/test/conditions/index.d.ts +1 -0
- package/dist/ab-testing/test/conditions/index.js +1 -0
- package/dist/ab-testing/test/conditions/manifests.d.ts +7 -0
- package/dist/ab-testing/test/conditions/manifests.js +10 -0
- package/dist/ab-testing/test/index.d.ts +1 -0
- package/dist/ab-testing/test/index.js +1 -0
- package/dist/ab-testing/test/manifests.d.ts +6 -1
- package/dist/ab-testing/test/manifests.js +2 -0
- package/dist/ab-testing/test/repository/detail/ab-testing-test-detail-server.data-source.d.ts +1 -1
- package/dist/ab-testing/test/repository/detail/ab-testing-test-detail-server.data-source.js +2 -3
- package/dist/ab-testing/test/workspace/ab-testing-test-workspace.context.d.ts +1 -1
- package/dist/ab-testing/test/workspace/ab-testing-test-workspace.context.js +2 -6
- package/dist/ab-testing/test/workspace/actions/ab-test-action-base.d.ts +0 -1
- package/dist/ab-testing/test/workspace/actions/ab-test-action-base.js +0 -9
- package/dist/ab-testing/test/workspace/actions/index.d.ts +0 -1
- package/dist/ab-testing/test/workspace/actions/index.js +0 -1
- package/dist/ab-testing/test/workspace/actions/manifests.js +5 -13
- package/dist/ab-testing/test/workspace/actions/unschedule-test-action.js +0 -1
- package/dist/ab-testing/test/workspace/conditions/ab-testing-can-disable.condition.d.ts +8 -0
- package/dist/ab-testing/test/workspace/conditions/ab-testing-can-disable.condition.js +25 -0
- package/dist/ab-testing/test/workspace/conditions/ab-testing-can-preview.condition.d.ts +8 -0
- package/dist/ab-testing/test/workspace/conditions/ab-testing-can-preview.condition.js +31 -0
- package/dist/ab-testing/test/workspace/conditions/constants.d.ts +2 -0
- package/dist/ab-testing/test/workspace/conditions/constants.js +2 -0
- package/dist/ab-testing/test/workspace/conditions/manifests.js +13 -1
- package/dist/ab-testing/test/workspace/entity-actions/disable-variant.action.d.ts +8 -0
- package/dist/ab-testing/test/workspace/entity-actions/disable-variant.action.js +37 -0
- package/dist/ab-testing/test/workspace/entity-actions/manifests.d.ts +29 -0
- package/dist/ab-testing/test/workspace/entity-actions/manifests.js +34 -0
- package/dist/ab-testing/test/workspace/entity-actions/preview-variant.action.d.ts +8 -0
- package/dist/ab-testing/test/workspace/entity-actions/preview-variant.action.js +32 -0
- package/dist/ab-testing/test/workspace/manifests.d.ts +9 -2
- package/dist/ab-testing/test/workspace/manifests.js +5 -2
- package/dist/ab-testing/test/workspace/views/edit/ab-testing-test-editor.element.js +30 -6
- package/dist/ab-testing/test/workspace/views/scoring/ab-testing-test-scoring.element.js +49 -79
- package/dist/analytics/analytics-context.js +4 -0
- package/dist/analytics/components/heatmap/heatmap.element.d.ts +0 -2
- package/dist/analytics/components/heatmap/heatmap.element.js +24 -29
- package/dist/analytics/screens/heatmap-screen.element.js +23 -3
- package/dist/core/components/group-box/group-box.element.js +12 -5
- package/dist/core/components/scoring/entities.d.ts +4 -0
- package/dist/core/components/scoring/scoring-base.element.d.ts +3 -2
- package/dist/core/components/scoring/scoring-base.element.js +147 -25
- package/dist/core/components/tooltip/tooltip-element.js +2 -2
- package/dist/core/context/entities.d.ts +1 -0
- package/dist/core/context/workspace-context-base.d.ts +1 -1
- package/dist/core/context/workspace-context-base.js +12 -9
- package/dist/core/entities.d.ts +1 -0
- package/dist/core/lang/{en-us.js → en.js} +8 -1
- package/dist/core/lang/manifests.js +1 -1
- package/dist/core/path/edit-variant-workspace-path-pattern.class.js +8 -0
- package/dist/core/property/property-dataset-renderer.controller.d.ts +4 -0
- package/dist/core/property/property-dataset-renderer.controller.js +9 -0
- package/dist/generated/client/client.gen.d.ts +2 -0
- package/dist/generated/client/client.gen.js +228 -0
- package/dist/generated/client/index.d.ts +8 -0
- package/dist/generated/client/index.js +6 -0
- package/dist/generated/client/types.gen.d.ts +117 -0
- package/dist/generated/client/types.gen.js +2 -0
- package/dist/generated/client/utils.gen.d.ts +33 -0
- package/dist/generated/client/utils.gen.js +233 -0
- package/dist/generated/client.gen.d.ts +2 -2
- package/dist/generated/client.gen.js +2 -5
- package/dist/generated/core/auth.gen.d.ts +18 -0
- package/dist/generated/core/auth.gen.js +14 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/core/bodySerializer.gen.js +57 -0
- package/dist/generated/core/params.gen.d.ts +43 -0
- package/dist/generated/core/params.gen.js +100 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/core/pathSerializer.gen.js +114 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/core/queryKeySerializer.gen.js +99 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/core/serverSentEvents.gen.js +135 -0
- package/dist/generated/core/types.gen.d.ts +78 -0
- package/dist/generated/core/types.gen.js +2 -0
- package/dist/generated/core/utils.gen.d.ts +19 -0
- package/dist/generated/core/utils.gen.js +87 -0
- package/dist/generated/sdk.gen.d.ts +135 -135
- package/dist/generated/sdk.gen.js +134 -804
- package/dist/generated/types.gen.d.ts +73 -8
- package/dist/index.js +6 -5
- package/dist/personalization/actions/entity-delete-base.action.d.ts +41 -0
- package/dist/personalization/actions/entity-delete-base.action.js +45 -0
- package/dist/personalization/actions/grouped-item-delete.action.d.ts +3 -3
- package/dist/personalization/actions/grouped-item-delete.action.js +9 -20
- package/dist/personalization/actions/grouped-item-edit.action.d.ts +3 -2
- package/dist/personalization/actions/grouped-item-edit.action.js +13 -20
- package/dist/personalization/actions/grouped-item-entity-edit-base.action.d.ts +13 -0
- package/dist/personalization/actions/grouped-item-entity-edit-base.action.js +45 -0
- package/dist/personalization/actions/index.d.ts +3 -3
- package/dist/personalization/actions/index.js +3 -3
- package/dist/personalization/actions/{applied-personalization-base.action.d.ts → personalization-base.action.d.ts} +2 -2
- package/dist/personalization/actions/{applied-personalization-base.action.js → personalization-base.action.js} +8 -6
- package/dist/personalization/applied-personalization/actions/delete.action.d.ts +2 -3
- package/dist/personalization/applied-personalization/actions/delete.action.js +8 -17
- package/dist/personalization/applied-personalization/actions/edit.action.d.ts +1 -1
- package/dist/personalization/applied-personalization/actions/edit.action.js +1 -1
- package/dist/personalization/applied-personalization/actions/preview.action.d.ts +1 -1
- package/dist/personalization/applied-personalization/actions/preview.action.js +1 -1
- package/dist/personalization/applied-personalization/index.d.ts +0 -1
- package/dist/personalization/applied-personalization/index.js +0 -1
- package/dist/personalization/campaign-scoring/campaign-group/collection/actions/campaign-group-delete.action.d.ts +9 -0
- package/dist/personalization/campaign-scoring/campaign-group/collection/actions/campaign-group-delete.action.js +16 -0
- package/dist/personalization/campaign-scoring/campaign-group/collection/manifests.js +9 -0
- package/dist/personalization/campaign-scoring/campaign-group/repository/detail/index.d.ts +1 -1
- package/dist/personalization/campaign-scoring/campaign-group/repository/detail/index.js +1 -1
- package/dist/personalization/campaign-scoring/campaign-group/repository/item/index.d.ts +1 -1
- package/dist/personalization/campaign-scoring/campaign-group/repository/item/index.js +1 -1
- package/dist/personalization/components/grouped-item/grouped-item-detail-editor-base.element.d.ts +3 -4
- package/dist/personalization/components/grouped-item/grouped-item-detail-editor-base.element.js +1 -6
- package/dist/personalization/components/grouped-item/grouped-item-list-editor-base.element.d.ts +8 -8
- package/dist/personalization/components/grouped-item/grouped-item-list-editor-base.element.js +33 -81
- package/dist/personalization/components/grouped-item/grouped-item-workspace-editor-base.element.d.ts +6 -11
- package/dist/personalization/components/grouped-item/grouped-item-workspace-editor-base.element.js +8 -13
- package/dist/personalization/components/grouped-scoring/collection/group-table-collection-view-base.element.js +15 -0
- package/dist/personalization/content-scoring/workspace/content-scoring-workspace-editor.element.d.ts +2 -2
- package/dist/personalization/content-scoring/workspace/content-scoring-workspace-editor.element.js +56 -130
- package/dist/personalization/content-scoring/workspace/content-scoring-workspace.context.d.ts +5 -5
- package/dist/personalization/content-scoring/workspace/content-scoring-workspace.context.js +25 -34
- package/dist/personalization/context/grouped-items-workspace-context.interface.d.ts +0 -2
- package/dist/personalization/context/grouped-items-workspace.context.d.ts +1 -4
- package/dist/personalization/context/grouped-items-workspace.context.js +7 -11
- package/dist/personalization/journeys/actions/delete.action.d.ts +8 -0
- package/dist/personalization/journeys/actions/delete.action.js +13 -0
- package/dist/personalization/journeys/actions/edit.action.d.ts +8 -0
- package/dist/personalization/journeys/actions/edit.action.js +12 -0
- package/dist/personalization/journeys/actions/manifests.d.ts +22 -0
- package/dist/personalization/journeys/actions/manifests.js +25 -0
- package/dist/personalization/journeys/constants.d.ts +1 -1
- package/dist/personalization/journeys/constants.js +1 -1
- package/dist/personalization/journeys/manifests.js +3 -1
- package/dist/personalization/journeys/workspace/customer-journey-workspace-editor.element.d.ts +0 -3
- package/dist/personalization/journeys/workspace/customer-journey-workspace-editor.element.js +1 -10
- package/dist/personalization/journeys/workspace/customer-journey-workspace.context.d.ts +1 -7
- package/dist/personalization/journeys/workspace/customer-journey-workspace.context.js +7 -6
- package/dist/personalization/journeys/workspace/views/edit/customer-journey-editor.element.js +4 -2
- package/dist/personalization/journeys/workspace/views/edit/customer-journey-steps-list-editor.element.d.ts +1 -0
- package/dist/personalization/journeys/workspace/views/edit/customer-journey-steps-list-editor.element.js +14 -4
- package/dist/personalization/personalized-variants/editor-view/personalized-variants-editor-view.element.js +2 -2
- package/dist/personalization/personalized-variants/workspace/personalized-variant-workspace.context.js +3 -7
- package/dist/personalization/personas/actions/delete.action.d.ts +8 -0
- package/dist/personalization/personas/actions/delete.action.js +13 -0
- package/dist/personalization/personas/actions/edit.action.d.ts +8 -0
- package/dist/personalization/personas/actions/edit.action.js +12 -0
- package/dist/personalization/personas/actions/manifests.d.ts +22 -0
- package/dist/personalization/personas/actions/manifests.js +25 -0
- package/dist/personalization/personas/constants.d.ts +2 -2
- package/dist/personalization/personas/constants.js +2 -2
- package/dist/personalization/personas/manifests.js +6 -4
- package/dist/personalization/personas/repository/detail/persona-group-detail-server.data-source.js +0 -2
- package/dist/personalization/personas/workspace/persona-group-workspace-editor.element.d.ts +0 -3
- package/dist/personalization/personas/workspace/persona-group-workspace-editor.element.js +1 -10
- package/dist/personalization/personas/workspace/persona-group-workspace.context.d.ts +1 -7
- package/dist/personalization/personas/workspace/persona-group-workspace.context.js +7 -6
- package/dist/personalization/personas/workspace/views/edit/persona-group-personas-list-editor.element.d.ts +1 -0
- package/dist/personalization/personas/workspace/views/edit/persona-group-personas-list-editor.element.js +14 -4
- package/dist/personalization/referral-scoring/manifests.js +1 -4
- package/dist/personalization/referral-scoring/referral-group/actions/delete.action.d.ts +9 -0
- package/dist/personalization/referral-scoring/referral-group/actions/delete.action.js +16 -0
- package/dist/personalization/referral-scoring/referral-group/manifests.js +10 -0
- package/dist/personalization/segments/actions/delete.action.d.ts +3 -4
- package/dist/personalization/segments/actions/delete.action.js +9 -21
- package/dist/personalization/segments/rules/base/segment-rule-base-grouped-extended-checkbox.element.d.ts +1 -1
- package/dist/profiles/insights/campaigns/campaigns-list.element.d.ts +1 -0
- package/dist/profiles/insights/campaigns/campaigns-list.element.js +9 -1
- package/dist/profiles/insights/customer-journeys/customer-journeys.element.js +3 -2
- package/dist/profiles/insights/engage-profile-insight.interface.js +7 -1
- package/dist/profiles/insights/goals/goals-table-collection-view.element.js +1 -1
- package/dist/profiles/insights/manifests.js +2 -0
- package/dist/profiles/insights/persona-groups/persona-groups.element.js +3 -2
- package/dist/reporting/components/reporting-chart-card/reporting-chart-card.element.d.ts +1 -0
- package/dist/reporting/components/reporting-chart-card/reporting-chart-card.element.js +5 -1
- package/dist/reporting/components/segment-selector/reporting-segment-selector.element.js +10 -20
- package/dist/start-page/components/license-viewer.element.js +4 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/umbraco-package.json +1 -1
- package/package.json +8 -5
- package/dist/ab-testing/test/workspace/actions/submit-test-action.d.ts +0 -8
- package/dist/ab-testing/test/workspace/actions/submit-test-action.js +0 -11
- package/dist/personalization/applied-personalization/actions/index.d.ts +0 -3
- package/dist/personalization/applied-personalization/actions/index.js +0 -3
- /package/dist/core/lang/{en-us.d.ts → en.d.ts} +0 -0
|
@@ -9,7 +9,7 @@ export declare abstract class UeScoringBaseElement<GroupModel extends UeScoreabl
|
|
|
9
9
|
protected items: GroupModel[];
|
|
10
10
|
value: UeEntityScoreModel[];
|
|
11
11
|
config?: UeScoringElementConfig;
|
|
12
|
-
|
|
12
|
+
readonly: boolean;
|
|
13
13
|
private _hideDivider;
|
|
14
14
|
constructor(repositoryCtor: UeDetailRepositoryConstructor<GroupModel>, dividerText?: string);
|
|
15
15
|
connectedCallback(): Promise<void>;
|
|
@@ -17,7 +17,8 @@ export declare abstract class UeScoringBaseElement<GroupModel extends UeScoreabl
|
|
|
17
17
|
target: HTMLInputElement;
|
|
18
18
|
}, id: number, upperScoreLimit: number): void;
|
|
19
19
|
getValue(id: number): number;
|
|
20
|
+
getItem(id: number): UeEntityScoreModel | undefined;
|
|
20
21
|
renderGroup(group: GroupModel): import("lit-html").TemplateResult<1>;
|
|
21
22
|
render(): import("lit-html").TemplateResult<1> | undefined;
|
|
22
|
-
static styles: import("lit").CSSResult;
|
|
23
|
+
static styles: import("lit").CSSResult[];
|
|
23
24
|
}
|
|
@@ -9,6 +9,7 @@ import { UmbLitElement } from "@umbraco-cms/backoffice/lit-element";
|
|
|
9
9
|
import { appendToFrozenArray } from "@umbraco-cms/backoffice/observable-api";
|
|
10
10
|
import { UmbChangeEvent } from "@umbraco-cms/backoffice/event";
|
|
11
11
|
import { UmbId } from "@umbraco-cms/backoffice/id";
|
|
12
|
+
import { UUITextStyles } from "@umbraco-cms/backoffice/external/uui";
|
|
12
13
|
export class UeScoringBaseElement extends UmbLitElement {
|
|
13
14
|
#dividerText;
|
|
14
15
|
constructor(repositoryCtor, dividerText) {
|
|
@@ -16,7 +17,7 @@ export class UeScoringBaseElement extends UmbLitElement {
|
|
|
16
17
|
this.defaultUpperScoreLimit = 10;
|
|
17
18
|
this.items = [];
|
|
18
19
|
this.value = [];
|
|
19
|
-
this.
|
|
20
|
+
this.readonly = false;
|
|
20
21
|
this._hideDivider = false;
|
|
21
22
|
this.repository = new repositoryCtor(this);
|
|
22
23
|
this.#dividerText = dividerText;
|
|
@@ -49,13 +50,93 @@ export class UeScoringBaseElement extends UmbLitElement {
|
|
|
49
50
|
getValue(id) {
|
|
50
51
|
return this.value?.find((x) => x.entityId === id)?.score ?? 0;
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
return
|
|
53
|
+
getItem(id) {
|
|
54
|
+
return this.value?.find((x) => x.entityId === id);
|
|
55
|
+
}
|
|
56
|
+
#renderReadonly(src, group) {
|
|
57
|
+
const item = this.getItem(src.id);
|
|
58
|
+
// if no item, the score is 0
|
|
59
|
+
// but we still want to show the empty default state
|
|
60
|
+
if (!item) {
|
|
61
|
+
return html `
|
|
62
|
+
<div slot="primary">
|
|
63
|
+
<uui-tag look="secondary"> 0 </uui-tag>
|
|
64
|
+
</div>
|
|
65
|
+
<uui-progress-bar progress="0" slot="secondary"></uui-progress-bar>
|
|
66
|
+
`;
|
|
67
|
+
}
|
|
68
|
+
const itemFromGroup = group.items.find((x) => x.id === item.entityId);
|
|
69
|
+
const groupItemIds = group.items.map((x) => x.id);
|
|
70
|
+
// we need all items ordered to calculate deviation as we compare the max to the second highest
|
|
71
|
+
// but all other items compare to the max.
|
|
72
|
+
const sortedGroupItems = this.value
|
|
73
|
+
.filter((x) => groupItemIds.includes(x.entityId))
|
|
74
|
+
.sort((a, b) => b.score - a.score);
|
|
75
|
+
let diff = 0;
|
|
76
|
+
// for non-max items, compare to the max.
|
|
77
|
+
if (sortedGroupItems[0]?.entityId !== item.entityId) {
|
|
78
|
+
diff = sortedGroupItems[0].score - item.score;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
// for the max item, chekk if it meets the minimum deviation compared to the second highest
|
|
82
|
+
diff = item.score - (sortedGroupItems[1]?.score ?? 0);
|
|
83
|
+
}
|
|
84
|
+
let minDiff = group.minimumDeviation ?? 1;
|
|
85
|
+
if (group.minimumDeviationType === "Percent") {
|
|
86
|
+
minDiff = item.score * (minDiff / 100);
|
|
87
|
+
}
|
|
88
|
+
const withinDeviation = diff < minDiff;
|
|
89
|
+
// if progress is >= 100, but isActive is false, assume deviation not met
|
|
90
|
+
const progress = (item.score / (group.minimumParticipationScoreThreshold ?? 1)) * 100;
|
|
91
|
+
const meetsThreshold = progress >= 100;
|
|
92
|
+
const activeColor = meetsThreshold
|
|
93
|
+
? !item.isActive
|
|
94
|
+
? "var(--uui-color-border-emphasis)"
|
|
95
|
+
: itemFromGroup?.color?.value
|
|
96
|
+
: "default";
|
|
97
|
+
const progressColor = meetsThreshold
|
|
98
|
+
? !item.isActive
|
|
99
|
+
? "var(--uui-color-border-emphasis)"
|
|
100
|
+
: itemFromGroup?.color?.value
|
|
101
|
+
: "var(--uui-color-border)";
|
|
102
|
+
let tooltip;
|
|
103
|
+
if (item.isActive) {
|
|
104
|
+
tooltip = this.localize.term("engage_scoringTooltipActiveItem", itemFromGroup?.title);
|
|
105
|
+
}
|
|
106
|
+
else if (meetsThreshold && !item.isActive && withinDeviation) {
|
|
107
|
+
tooltip = this.localize.term("engage_scoringTooltipInactiveMeetsThresholdWithinDeviation", itemFromGroup?.title);
|
|
108
|
+
}
|
|
109
|
+
else if (meetsThreshold && !withinDeviation && !item.isActive) {
|
|
110
|
+
const activeItemId = this.value.find((x) => x.isActive && groupItemIds.includes(x.entityId))?.entityId;
|
|
111
|
+
const activeItem = group.items.find((x) => x.id === activeItemId);
|
|
112
|
+
tooltip = this.localize.term("engage_scoringTooltipInactiveMeetsThresholdNotWithinDeviation", itemFromGroup?.title, activeItem?.title);
|
|
113
|
+
}
|
|
114
|
+
return html `<div
|
|
115
|
+
slot="primary"
|
|
116
|
+
style="display:flex; align-items:center"
|
|
117
|
+
popovertarget="popover-${item.entityId}"
|
|
118
|
+
>
|
|
119
|
+
<uui-tag
|
|
120
|
+
style="--color: ${activeColor}"
|
|
121
|
+
look=${meetsThreshold ? "primary" : "secondary"}
|
|
122
|
+
>
|
|
123
|
+
${item.score}
|
|
124
|
+
</uui-tag>
|
|
125
|
+
${when(tooltip, () => html ` <uui-popover-container id="popover-${item.entityId}">
|
|
126
|
+
<ue-tooltip hint> ${tooltip}</ue-tooltip>
|
|
127
|
+
</uui-popover-container>`)}
|
|
128
|
+
</div>
|
|
129
|
+
<uui-progress-bar
|
|
130
|
+
style="--uui-color-positive: ${progressColor}"
|
|
131
|
+
progress=${progress}
|
|
132
|
+
slot="secondary"
|
|
133
|
+
></uui-progress-bar> `;
|
|
54
134
|
}
|
|
55
135
|
#renderEditor(item, group) {
|
|
56
136
|
if (group.upperScoreLimit &&
|
|
57
137
|
group.upperScoreLimit > this.defaultUpperScoreLimit) {
|
|
58
138
|
return html `<uui-input
|
|
139
|
+
slot="primary"
|
|
59
140
|
type="number"
|
|
60
141
|
max=${group.upperScoreLimit}
|
|
61
142
|
min="0"
|
|
@@ -64,25 +145,41 @@ export class UeScoringBaseElement extends UmbLitElement {
|
|
|
64
145
|
></uui-input>`;
|
|
65
146
|
}
|
|
66
147
|
return html `<umb-input-slider
|
|
148
|
+
slot="primary"
|
|
67
149
|
.max=${group.upperScoreLimit ?? this.defaultUpperScoreLimit}
|
|
68
150
|
@change=${(e) => this.onValueChange(e, item.id, group.upperScoreLimit)}
|
|
69
151
|
.valueLow=${this.getValue(item.id)}
|
|
70
152
|
></umb-input-slider>`;
|
|
71
153
|
}
|
|
72
154
|
renderGroup(group) {
|
|
73
|
-
return html `<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
155
|
+
return html `<div class="scoring-group">
|
|
156
|
+
<div id="header" class="uui-text">
|
|
157
|
+
<h5 class="uui-h5">${group.title}</h5>
|
|
158
|
+
${when(group.upperScoreLimit !== this.defaultUpperScoreLimit &&
|
|
159
|
+
!this.readonly, () => this.localize.term("engage_scoreFromTo", group.upperScoreLimit))}
|
|
160
|
+
</div>
|
|
161
|
+
|
|
77
162
|
${group.items.map((item) => html `<ue-group-box
|
|
78
163
|
style="${`--engage-bar-color: ${item.color?.value}`}"
|
|
79
164
|
.name=${item.title}
|
|
80
|
-
.description=${item.description}
|
|
165
|
+
.description=${this.readonly ? null : item.description}
|
|
81
166
|
.iconUrl=${item.iconUrl}
|
|
82
167
|
>
|
|
83
|
-
${when(this.
|
|
168
|
+
${when(this.readonly, () => this.#renderReadonly(item, group), () => this.#renderEditor(item, group))}
|
|
84
169
|
</ue-group-box>`)}
|
|
85
|
-
|
|
170
|
+
${when(this.readonly, () => html ` <small>
|
|
171
|
+
<span
|
|
172
|
+
>Minimal deviation:
|
|
173
|
+
${group.minimumDeviation}${group.minimumDeviationType ===
|
|
174
|
+
"Percent"
|
|
175
|
+
? "%"
|
|
176
|
+
: ""}</span
|
|
177
|
+
><span>|</span
|
|
178
|
+
><span>
|
|
179
|
+
Threshold value: ${group.minimumParticipationScoreThreshold}</span
|
|
180
|
+
>
|
|
181
|
+
</small>`)}
|
|
182
|
+
</div>`;
|
|
86
183
|
}
|
|
87
184
|
render() {
|
|
88
185
|
if (!this.items.length)
|
|
@@ -90,23 +187,48 @@ export class UeScoringBaseElement extends UmbLitElement {
|
|
|
90
187
|
return html ` ${when(this._hideDivider === false, () => html `<ue-divider .text=${this.#dividerText}></ue-divider>`)}
|
|
91
188
|
${this.items.map((group) => this.renderGroup(group))}`;
|
|
92
189
|
}
|
|
93
|
-
static { this.styles =
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
190
|
+
static { this.styles = [
|
|
191
|
+
UUITextStyles,
|
|
192
|
+
css `
|
|
193
|
+
.scoring-group {
|
|
194
|
+
height: var(--content-height, auto);
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: column;
|
|
197
|
+
}
|
|
97
198
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
199
|
+
ue-group-box + ue-group-box {
|
|
200
|
+
margin-top: var(--uui-size-2);
|
|
201
|
+
}
|
|
101
202
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
203
|
+
.scoring-group + .scoring-group {
|
|
204
|
+
margin-top: var(--group-gap, var(--uui-size-space-5));
|
|
205
|
+
}
|
|
105
206
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
207
|
+
uui-tag {
|
|
208
|
+
align-self: center;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
small {
|
|
212
|
+
display: flex;
|
|
213
|
+
padding-top: var(--uui-size-3);
|
|
214
|
+
margin-top: auto;
|
|
215
|
+
gap: var(--uui-size-2);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
small span {
|
|
219
|
+
display: block;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* from uui-box */
|
|
223
|
+
#header {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: space-between;
|
|
227
|
+
padding-right: var(--uui-size-space-5);
|
|
228
|
+
margin-bottom: var(--uui-size-space-2);
|
|
229
|
+
}
|
|
230
|
+
`,
|
|
231
|
+
]; }
|
|
110
232
|
}
|
|
111
233
|
__decorate([
|
|
112
234
|
state()
|
|
@@ -119,7 +241,7 @@ __decorate([
|
|
|
119
241
|
], UeScoringBaseElement.prototype, "config", void 0);
|
|
120
242
|
__decorate([
|
|
121
243
|
property({ type: Boolean, reflect: true })
|
|
122
|
-
], UeScoringBaseElement.prototype, "
|
|
244
|
+
], UeScoringBaseElement.prototype, "readonly", void 0);
|
|
123
245
|
__decorate([
|
|
124
246
|
state()
|
|
125
247
|
], UeScoringBaseElement.prototype, "_hideDivider", void 0);
|
|
@@ -32,8 +32,8 @@ let UeTooltipElement = class UeTooltipElement extends UmbLitElement {
|
|
|
32
32
|
this.#unbindListeners();
|
|
33
33
|
}
|
|
34
34
|
#bindListeners() {
|
|
35
|
-
this.#trigger = this.getHostElement().closest("[popovertarget]")
|
|
36
|
-
this.#host = this.getHostElement().closest("uui-popover-container")
|
|
35
|
+
this.#trigger = this.getHostElement().closest("[popovertarget]");
|
|
36
|
+
this.#host = this.getHostElement().closest("uui-popover-container");
|
|
37
37
|
if (!this.#trigger || !this.#host) {
|
|
38
38
|
console.warn("UeTooltipElement[hint] requires a uui-popover-container and a popovertarget element to function properly.");
|
|
39
39
|
return;
|
|
@@ -12,6 +12,6 @@ export declare abstract class UeWorkspaceContextBase<WorkspaceDataModelType exte
|
|
|
12
12
|
constructor(host: UmbControllerHost, args: UeValidatedWorkspaceContextArgs);
|
|
13
13
|
update(data: Partial<WorkspaceDataModelType>): void;
|
|
14
14
|
getPropertyValue<T = any>(alias: keyof WorkspaceDataModelType & string): T | undefined;
|
|
15
|
-
requestSave(
|
|
15
|
+
requestSave(): Promise<void>;
|
|
16
16
|
delete(unique: string): Promise<void>;
|
|
17
17
|
}
|
|
@@ -23,7 +23,7 @@ export class UeWorkspaceContextBase extends UmbEntityDetailWorkspaceContextBase
|
|
|
23
23
|
// we don't use the value anywhere, hence the garbage-in below.
|
|
24
24
|
// Note this is obsolete, and will be removed in v18, so will need to be revisited.
|
|
25
25
|
this.setParent({ entityType: "engage-entity-root", unique: "" });
|
|
26
|
-
this.#setRoutes(args.routedComponents);
|
|
26
|
+
this.#setRoutes(args.routedComponents, args.withRedirectOnCreate ?? true);
|
|
27
27
|
this.#registerActions(args.actions);
|
|
28
28
|
}
|
|
29
29
|
#registerActions(actions) {
|
|
@@ -54,7 +54,7 @@ export class UeWorkspaceContextBase extends UmbEntityDetailWorkspaceContextBase
|
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
#setRoutes(routedComponents) {
|
|
57
|
+
#setRoutes(routedComponents, withRedirectOnCreate) {
|
|
58
58
|
if (!routedComponents)
|
|
59
59
|
return;
|
|
60
60
|
this.routes.setRoutes([
|
|
@@ -62,7 +62,9 @@ export class UeWorkspaceContextBase extends UmbEntityDetailWorkspaceContextBase
|
|
|
62
62
|
path: "edit/:id",
|
|
63
63
|
component: routedComponents.edit,
|
|
64
64
|
setup: async (_component, info) => {
|
|
65
|
-
|
|
65
|
+
withRedirectOnCreate
|
|
66
|
+
? this.removeUmbControllerByAlias(UmbWorkspaceIsNewRedirectControllerAlias)
|
|
67
|
+
: {};
|
|
66
68
|
await this.load(info.match.params.id);
|
|
67
69
|
},
|
|
68
70
|
},
|
|
@@ -73,7 +75,9 @@ export class UeWorkspaceContextBase extends UmbEntityDetailWorkspaceContextBase
|
|
|
73
75
|
await this.createScaffold({
|
|
74
76
|
parent: { entityType: "engage-entity-root", unique: "" },
|
|
75
77
|
});
|
|
76
|
-
|
|
78
|
+
withRedirectOnCreate
|
|
79
|
+
? new UmbWorkspaceIsNewRedirectController(this, this, this.getHostElement().shadowRoot.querySelector("umb-router-slot"))
|
|
80
|
+
: {};
|
|
77
81
|
},
|
|
78
82
|
},
|
|
79
83
|
]);
|
|
@@ -89,15 +93,14 @@ export class UeWorkspaceContextBase extends UmbEntityDetailWorkspaceContextBase
|
|
|
89
93
|
}
|
|
90
94
|
// save must also validate, so we borrow the implementation from the CMS submit, which closes
|
|
91
95
|
// editor modals, which we do not want as we have separated save and save-and-close
|
|
92
|
-
|
|
93
|
-
async requestSave(isUpdate = false) {
|
|
96
|
+
async requestSave() {
|
|
94
97
|
const data = this._data.getCurrent();
|
|
95
98
|
if (!data)
|
|
96
99
|
return;
|
|
97
|
-
return this.#validateAndSave(() => this.#save(data
|
|
100
|
+
return this.#validateAndSave(() => this.#save(data), (reason) => this.invalidSubmit(reason));
|
|
98
101
|
}
|
|
99
|
-
async #save(data
|
|
100
|
-
const result = this.getIsNew()
|
|
102
|
+
async #save(data) {
|
|
103
|
+
const result = this.getIsNew()
|
|
101
104
|
? this._create(data, { unique: "", entityType: "engage-entity-root" })
|
|
102
105
|
: this._update(data);
|
|
103
106
|
return result;
|
package/dist/core/entities.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export default {
|
|
|
44
44
|
confirmDisableUeMessage: "If Umbraco Engage is disabled, no data will be collected and no personalization or A/B testing is applied.",
|
|
45
45
|
contains: "Contains",
|
|
46
46
|
containsVerb: "contains",
|
|
47
|
+
conversionRate: "Conversion rate",
|
|
47
48
|
core: "Core",
|
|
48
49
|
count: "Count",
|
|
49
50
|
county: "County",
|
|
@@ -178,6 +179,7 @@ export default {
|
|
|
178
179
|
province: "Province",
|
|
179
180
|
scoreFromTo: (from) => `Score from 0 to ${from}`,
|
|
180
181
|
showProfile: `Show profile`,
|
|
182
|
+
ratio: "Ratio",
|
|
181
183
|
referralgroups: `Referral groups`,
|
|
182
184
|
referralGroup: "Referral group",
|
|
183
185
|
referrals: "Referrals",
|
|
@@ -198,6 +200,9 @@ export default {
|
|
|
198
200
|
score: "Score",
|
|
199
201
|
scoredcampaigns: (count) => `Scored campaigns${count !== undefined ? ` (${count})` : ""}`,
|
|
200
202
|
scoredreferrals: (count) => `Scored referrals${count !== undefined ? ` (${count})` : ""}`,
|
|
203
|
+
scoringTooltipActiveItem: (name) => `'${name}' has met both the scoring threshold and minimal deviation and is the active item in this group`,
|
|
204
|
+
scoringTooltipInactiveMeetsThresholdWithinDeviation: (name) => `'${name}' has met the scoring threshold but the minimal deviation is not met`,
|
|
205
|
+
scoringTooltipInactiveMeetsThresholdNotWithinDeviation: (name, activeItem) => `'${name}' has met the scoring threshold but '${activeItem}' is active as it has the highest score with a valid minimal deviation`,
|
|
201
206
|
searchTerms: "Search terms",
|
|
202
207
|
selectLanguage: "Select a culture",
|
|
203
208
|
segmentinsights: "Segment insights",
|
|
@@ -305,6 +310,7 @@ export default {
|
|
|
305
310
|
settingsDescription: "Which conversion goal do you want to improve and which percentage of your visitors should be subjected to the test?",
|
|
306
311
|
showArchivedProjects: "Show archived projects",
|
|
307
312
|
startedOn: "Started on",
|
|
313
|
+
startsOn: "Starts on",
|
|
308
314
|
startTest: "Start an A/B test for this page",
|
|
309
315
|
startTestDescription: "This will default to a Single Page test which allows you to A/B test Umbraco content.",
|
|
310
316
|
stoppedOn: "Stopped on",
|
|
@@ -407,8 +413,9 @@ export default {
|
|
|
407
413
|
videoUrl: "Video URL",
|
|
408
414
|
visitors: "Visitors",
|
|
409
415
|
yesterday: "Yesterday",
|
|
410
|
-
"last-7-days": "Last 7 days",
|
|
411
416
|
last30days: "Last 30 days",
|
|
417
|
+
"last-7-days": "Last 7 days",
|
|
418
|
+
"last-30-days": "Last 30 days",
|
|
412
419
|
"this-month": "This month",
|
|
413
420
|
"last-month": "Last month",
|
|
414
421
|
"this-year": "This year",
|
|
@@ -15,12 +15,20 @@ export class UePathPattern extends UmbPathPattern {
|
|
|
15
15
|
this.#fallback = fallback;
|
|
16
16
|
}
|
|
17
17
|
generateAbsolute(params) {
|
|
18
|
+
this.#checkSegmentation(params);
|
|
18
19
|
return ((this.#base.indexOf(":") !== -1
|
|
19
20
|
? ueUrlPatternToString(this.#base, params, this.#fallback)
|
|
20
21
|
: this.#base) +
|
|
21
22
|
ueUrlPatternToString(this.#local, params, this.#fallback));
|
|
22
23
|
}
|
|
23
24
|
generateLocal(params) {
|
|
25
|
+
this.#checkSegmentation(params);
|
|
24
26
|
return ueUrlPatternToString(this.#local, params, this.#fallback);
|
|
25
27
|
}
|
|
28
|
+
// if no segment provided, we don't want to open split view, so we adjust the local pattern
|
|
29
|
+
#checkSegmentation(params) {
|
|
30
|
+
if (!params.segment) {
|
|
31
|
+
this.#local = "edit/:unique/:culture";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
26
34
|
}
|
|
@@ -4,6 +4,9 @@ import type { UmbControllerHost } from "@umbraco-cms/backoffice/controller-api";
|
|
|
4
4
|
import { UmbLocalizationController } from "@umbraco-cms/backoffice/localization-api";
|
|
5
5
|
import type { UmbPropertyValueData } from "@umbraco-cms/backoffice/property";
|
|
6
6
|
import type { UeDatasetHostWorkspaceContext, UePropertyConfigData } from "./types.js";
|
|
7
|
+
export interface PropertyConfiguration {
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
7
10
|
export declare class UePropertyDataSetRendererController<EntityType, ContextEntityType extends {
|
|
8
11
|
[K in keyof ContextEntityType]: ContextEntityType[K];
|
|
9
12
|
} | EntityType = EntityType, HostContextType extends UeDatasetHostWorkspaceContext<ContextEntityType> = UeDatasetHostWorkspaceContext<ContextEntityType>> extends UmbControllerBase {
|
|
@@ -14,6 +17,7 @@ export declare class UePropertyDataSetRendererController<EntityType, ContextEnti
|
|
|
14
17
|
properties: UePropertyConfigData<EntityType>;
|
|
15
18
|
constructor(host: UmbControllerHost, contextToken: UmbContextToken<any, HostContextType>, properties: UePropertyConfigData<EntityType>, dataPath?: keyof ContextEntityType & string);
|
|
16
19
|
withItems(forProperty: keyof EntityType & string, optionGenerator: (data: EntityType | undefined, src?: Array<never>) => Array<Option>): this;
|
|
20
|
+
withConfiguration(forProperty: keyof EntityType & string, configurationGenerator: (data: EntityType | undefined) => PropertyConfiguration): this;
|
|
17
21
|
render(): import("lit-html").TemplateResult<1>;
|
|
18
22
|
destroy(): void;
|
|
19
23
|
}
|
|
@@ -9,6 +9,7 @@ export class UePropertyDataSetRendererController extends UmbControllerBase {
|
|
|
9
9
|
#hostElm;
|
|
10
10
|
#validationContext;
|
|
11
11
|
#optionGenerators;
|
|
12
|
+
#propertyConfiguration;
|
|
12
13
|
#validators;
|
|
13
14
|
#dataPath;
|
|
14
15
|
constructor(host, contextToken, properties, dataPath) {
|
|
@@ -16,6 +17,7 @@ export class UePropertyDataSetRendererController extends UmbControllerBase {
|
|
|
16
17
|
this.localize = new UmbLocalizationController(this);
|
|
17
18
|
this.value = [];
|
|
18
19
|
this.#optionGenerators = {};
|
|
20
|
+
this.#propertyConfiguration = {};
|
|
19
21
|
this.#validators = [];
|
|
20
22
|
this.#hostElm = host.getHostElement();
|
|
21
23
|
this.properties = properties;
|
|
@@ -40,6 +42,11 @@ export class UePropertyDataSetRendererController extends UmbControllerBase {
|
|
|
40
42
|
this.#optionGenerators[this.#camel(forProperty)] = optionGenerator;
|
|
41
43
|
return this;
|
|
42
44
|
}
|
|
45
|
+
withConfiguration(forProperty, configurationGenerator) {
|
|
46
|
+
this.#propertyConfiguration[this.#camel(forProperty)] =
|
|
47
|
+
configurationGenerator;
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
43
50
|
#getByDataPath(obj) {
|
|
44
51
|
if (!this.#dataPath)
|
|
45
52
|
return obj;
|
|
@@ -142,6 +149,7 @@ export class UePropertyDataSetRendererController extends UmbControllerBase {
|
|
|
142
149
|
alias: prop.alias,
|
|
143
150
|
})}].value`;
|
|
144
151
|
const editor = typeof prop.editor === "string" ? prop.editor : prop.editor(this.data);
|
|
152
|
+
const disabled = this.#propertyConfiguration[alias]?.(this.data)?.disabled;
|
|
145
153
|
return html `<umb-property
|
|
146
154
|
.dataPath=${dataPath}
|
|
147
155
|
alias=${alias}
|
|
@@ -153,6 +161,7 @@ export class UePropertyDataSetRendererController extends UmbControllerBase {
|
|
|
153
161
|
.config=${prop.config}
|
|
154
162
|
.appearance=${prop.appearance}
|
|
155
163
|
.validation=${prop.validation}
|
|
164
|
+
?readonly=${disabled}
|
|
156
165
|
></umb-property>`;
|
|
157
166
|
}
|
|
158
167
|
#getPropertyValue(obj) {
|