@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
|
@@ -2,9 +2,8 @@ import { ENGAGE_CONTENT_SCORE_ENTITY_TYPE, ENGAGE_CONTENT_SCORE_WORKSPACE_ALIAS,
|
|
|
2
2
|
import { ENGAGE_CONTENT_SCORING_DETAIL_REPOSITORY_ALIAS } from "../repository/detail/constants.js";
|
|
3
3
|
import { UmbId } from "@umbraco-cms/backoffice/id";
|
|
4
4
|
import { appendToFrozenArray, UmbArrayState, } from "@umbraco-cms/backoffice/observable-api";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { UeWorkspaceContextBase } from "../../../core/index.js";
|
|
5
|
+
import { UeWorkspaceContextBase, } from "../../../core/index.js";
|
|
6
|
+
import { UeCustomerJourneyDetailRepository, UePersonaGroupDetailRepository, } from "../../index.js";
|
|
8
7
|
export class UeContentScoringWorkspaceContext extends UeWorkspaceContextBase {
|
|
9
8
|
#personaRepository;
|
|
10
9
|
#journeyRepository;
|
|
@@ -21,12 +20,6 @@ export class UeContentScoringWorkspaceContext extends UeWorkspaceContextBase {
|
|
|
21
20
|
this.IS_CONTENT_SCORING_WORKSPACE_CONTEXT = true;
|
|
22
21
|
this.#personaRepository = new UePersonaGroupDetailRepository(this);
|
|
23
22
|
this.#journeyRepository = new UeCustomerJourneyDetailRepository(this);
|
|
24
|
-
this.items = this._data.createObservablePartOfCurrent((x) => x?.items);
|
|
25
|
-
this.#personas = new UmbArrayState([], (x) => x.unique);
|
|
26
|
-
this.personas = this.#personas.asObservable();
|
|
27
|
-
this.#journeys = new UmbArrayState([], (x) => x.unique);
|
|
28
|
-
this.journeys = this.#journeys.asObservable();
|
|
29
|
-
this.#hostUnique = hostUnique;
|
|
30
23
|
this.#init = Promise.all([
|
|
31
24
|
this.#personaRepository
|
|
32
25
|
.requestAll()
|
|
@@ -35,43 +28,41 @@ export class UeContentScoringWorkspaceContext extends UeWorkspaceContextBase {
|
|
|
35
28
|
.requestAll()
|
|
36
29
|
.then((resp) => this.#journeys.setValue(resp.data ?? [])),
|
|
37
30
|
]);
|
|
31
|
+
this.items = this._data.createObservablePartOfCurrent((x) => x?.items);
|
|
32
|
+
this.#personas = new UmbArrayState([], (x) => x.unique);
|
|
33
|
+
this.personas = this.#personas.asObservable();
|
|
34
|
+
this.#journeys = new UmbArrayState([], (x) => x.unique);
|
|
35
|
+
this.journeys = this.#journeys.asObservable();
|
|
36
|
+
this.#hostUnique = hostUnique;
|
|
38
37
|
}
|
|
39
38
|
async hostConnected() {
|
|
40
39
|
super.hostConnected();
|
|
41
40
|
await this.#init;
|
|
42
|
-
|
|
41
|
+
this.load(this.#hostUnique);
|
|
43
42
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
items: appendToFrozenArray(items, {
|
|
57
|
-
score: Number(value),
|
|
58
|
-
entityId: item.id,
|
|
59
|
-
entityUnique: item.unique,
|
|
43
|
+
updateScores(value, typeMatch) {
|
|
44
|
+
let items = this._data.getCurrent()?.items ?? [];
|
|
45
|
+
value.forEach((scoreModel) => {
|
|
46
|
+
const existing = items.find((x) => x.id === scoreModel.id && x.type === typeMatch);
|
|
47
|
+
if (existing) {
|
|
48
|
+
items = appendToFrozenArray(items, { ...existing, ...{ score: scoreModel.score } }, (x) => x.id === existing.id && x.type === typeMatch);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
items = appendToFrozenArray(items, {
|
|
52
|
+
score: scoreModel.score,
|
|
53
|
+
entityId: scoreModel.entityId,
|
|
54
|
+
entityUnique: scoreModel.entityId.toString(),
|
|
60
55
|
documentUnique: this.#hostUnique,
|
|
61
56
|
type: typeMatch,
|
|
62
57
|
id: 0,
|
|
63
58
|
unique: UmbId.new(),
|
|
64
|
-
})
|
|
65
|
-
}
|
|
66
|
-
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
this._data.updateCurrent({ items });
|
|
67
63
|
}
|
|
68
64
|
async requestSave() {
|
|
69
65
|
this._data.updateCurrent({ unique: this.#hostUnique });
|
|
70
66
|
super.requestSave();
|
|
71
67
|
}
|
|
72
|
-
destroy() {
|
|
73
|
-
this.#personaRepository.destroy();
|
|
74
|
-
this.#journeyRepository.destroy();
|
|
75
|
-
super.destroy();
|
|
76
|
-
}
|
|
77
68
|
}
|
|
@@ -6,7 +6,6 @@ export interface UeGroupedItemWorkspaceContext<EntityModel, EntityItemModel> ext
|
|
|
6
6
|
current: Observable<EntityModel | undefined>;
|
|
7
7
|
properties: Observable<UePropertyConfigData<EntityModel> | undefined>;
|
|
8
8
|
advancedProperties: Observable<UePropertyConfigData<EntityModel> | undefined>;
|
|
9
|
-
editHeadline: Observable<string | undefined>;
|
|
10
9
|
load: (unique: string) => Promise<void>;
|
|
11
10
|
createItem: () => EntityItemModel;
|
|
12
11
|
getGroup: (unique: string) => EntityModel | undefined;
|
|
@@ -20,5 +19,4 @@ export interface UeGroupedItemWorkspaceContext<EntityModel, EntityItemModel> ext
|
|
|
20
19
|
sortItems: (sortOrder: Array<string>) => void;
|
|
21
20
|
getProperties: () => UePropertyConfigData<EntityModel> | undefined;
|
|
22
21
|
getAdvancedProperties: () => UePropertyConfigData<EntityModel> | undefined;
|
|
23
|
-
getEditHeadline: () => string | undefined;
|
|
24
22
|
}
|
|
@@ -9,24 +9,21 @@ export declare class UeGroupedItemsWorkspaceContextBase<EntityModel extends UeGr
|
|
|
9
9
|
current: import("rxjs").Observable<EntityModel | undefined>;
|
|
10
10
|
properties: import("rxjs").Observable<UePropertyConfigData<EntityModel> | undefined>;
|
|
11
11
|
advancedProperties: import("rxjs").Observable<UePropertyConfigData<EntityModel> | undefined>;
|
|
12
|
-
editHeadline: import("rxjs").Observable<string | undefined>;
|
|
13
12
|
init: Promise<unknown>;
|
|
14
13
|
readonly path: string;
|
|
15
|
-
readonly entityType: string;
|
|
16
14
|
constructor(host: UmbControllerHost, args: {
|
|
17
15
|
workspaceAlias: string;
|
|
18
16
|
entityType: string;
|
|
17
|
+
itemEntityType: string;
|
|
19
18
|
detailRepositoryConstructor: UeDetailRepositoryConstructor<EntityModel>;
|
|
20
19
|
properties: UePropertyConfigData<EntityModel>;
|
|
21
20
|
advancedProperties?: UePropertyConfigData<EntityModel>;
|
|
22
|
-
editHeadline?: string;
|
|
23
21
|
});
|
|
24
22
|
readonly unique: import("rxjs").Observable<string>;
|
|
25
23
|
getUnique(): string | null | undefined;
|
|
26
24
|
getEntityType(): string;
|
|
27
25
|
getData(): Array<EntityModel> | undefined;
|
|
28
26
|
getCurrent(): EntityModel | undefined;
|
|
29
|
-
getEditHeadline(): string | undefined;
|
|
30
27
|
setPath(unique?: string): void;
|
|
31
28
|
load(unique: string): Promise<void>;
|
|
32
29
|
createGroup(): Promise<EntityModel | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UmbId } from "@umbraco-cms/backoffice/id";
|
|
2
|
-
import { appendToFrozenArray, UmbArrayState, UmbObjectState,
|
|
2
|
+
import { appendToFrozenArray, UmbArrayState, UmbObjectState, } from "@umbraco-cms/backoffice/observable-api";
|
|
3
3
|
import { UmbValidationController } from "@umbraco-cms/backoffice/validation";
|
|
4
4
|
import { UmbSubmittableWorkspaceContextBase } from "@umbraco-cms/backoffice/workspace";
|
|
5
5
|
export class UeGroupedItemsWorkspaceContextBase extends UmbSubmittableWorkspaceContextBase {
|
|
@@ -8,7 +8,8 @@ export class UeGroupedItemsWorkspaceContextBase extends UmbSubmittableWorkspaceC
|
|
|
8
8
|
#current;
|
|
9
9
|
#properties;
|
|
10
10
|
#advancedProperties;
|
|
11
|
-
#
|
|
11
|
+
#itemEntityType;
|
|
12
|
+
#entityType;
|
|
12
13
|
constructor(host, args) {
|
|
13
14
|
super(host, args.workspaceAlias);
|
|
14
15
|
this.IS_GROUPED_ITEMS_WORKSPACE_CONTEXT = true;
|
|
@@ -20,15 +21,13 @@ export class UeGroupedItemsWorkspaceContextBase extends UmbSubmittableWorkspaceC
|
|
|
20
21
|
this.properties = this.#properties.asObservable();
|
|
21
22
|
this.#advancedProperties = new UmbObjectState(undefined);
|
|
22
23
|
this.advancedProperties = this.#advancedProperties.asObservable();
|
|
23
|
-
this.#editHeadline = new UmbStringState(undefined);
|
|
24
|
-
this.editHeadline = this.#editHeadline.asObservable();
|
|
25
24
|
this.unique = this.#data.asObservablePart(() => "");
|
|
26
25
|
this.#detailRepository = new args.detailRepositoryConstructor(host);
|
|
27
|
-
this
|
|
26
|
+
this.#entityType = args.entityType;
|
|
27
|
+
this.#itemEntityType = args.itemEntityType;
|
|
28
28
|
this.path = window.location.pathname;
|
|
29
29
|
this.#properties.setValue(args.properties);
|
|
30
30
|
this.#advancedProperties.setValue(args.advancedProperties);
|
|
31
|
-
this.#editHeadline.setValue(args.editHeadline);
|
|
32
31
|
this.addValidationContext(new UmbValidationController(host));
|
|
33
32
|
this.init = this.#detailRepository.requestAll().then((resp) => {
|
|
34
33
|
this.#data.setValue(resp.data ?? []);
|
|
@@ -41,7 +40,7 @@ export class UeGroupedItemsWorkspaceContextBase extends UmbSubmittableWorkspaceC
|
|
|
41
40
|
return "";
|
|
42
41
|
}
|
|
43
42
|
getEntityType() {
|
|
44
|
-
return this
|
|
43
|
+
return this.#entityType;
|
|
45
44
|
}
|
|
46
45
|
getData() {
|
|
47
46
|
return this.#data.getValue();
|
|
@@ -49,9 +48,6 @@ export class UeGroupedItemsWorkspaceContextBase extends UmbSubmittableWorkspaceC
|
|
|
49
48
|
getCurrent() {
|
|
50
49
|
return this.#current.getValue();
|
|
51
50
|
}
|
|
52
|
-
getEditHeadline() {
|
|
53
|
-
return this.#editHeadline.getValue();
|
|
54
|
-
}
|
|
55
51
|
setPath(unique) {
|
|
56
52
|
if (!unique)
|
|
57
53
|
return;
|
|
@@ -74,7 +70,7 @@ export class UeGroupedItemsWorkspaceContextBase extends UmbSubmittableWorkspaceC
|
|
|
74
70
|
return {
|
|
75
71
|
color: { label: "", value: "" },
|
|
76
72
|
unique: UmbId.new(),
|
|
77
|
-
entityType: this
|
|
73
|
+
entityType: this.#itemEntityType,
|
|
78
74
|
};
|
|
79
75
|
}
|
|
80
76
|
setCurrent(data) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_CONTEXT } from "../index.js";
|
|
2
|
+
import { UmbControllerHost } from "@umbraco-cms/backoffice/controller-api";
|
|
3
|
+
import { UmbEntityActionArgs } from "@umbraco-cms/backoffice/entity-action";
|
|
4
|
+
import { UeEntityDeleteBaseAction } from "../../actions/index.js";
|
|
5
|
+
export declare class EngageDeleteJourneyStepAction extends UeEntityDeleteBaseAction<any, typeof ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_CONTEXT.TYPE> {
|
|
6
|
+
constructor(host: UmbControllerHost, args: UmbEntityActionArgs<any>);
|
|
7
|
+
}
|
|
8
|
+
export default EngageDeleteJourneyStepAction;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_CONTEXT } from "../index.js";
|
|
2
|
+
import { UeEntityDeleteBaseAction } from "../../actions/index.js";
|
|
3
|
+
export class EngageDeleteJourneyStepAction extends UeEntityDeleteBaseAction {
|
|
4
|
+
constructor(host, args) {
|
|
5
|
+
super({
|
|
6
|
+
host,
|
|
7
|
+
args,
|
|
8
|
+
contextToken: ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_CONTEXT,
|
|
9
|
+
deleteHandler: (unique) => this.workspaceContext?.deleteItem(unique),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export default EngageDeleteJourneyStepAction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UmbControllerHost } from "@umbraco-cms/backoffice/controller-api";
|
|
2
|
+
import { UmbEntityActionArgs } from "@umbraco-cms/backoffice/entity-action";
|
|
3
|
+
import { UeCustomerJourneyStepDetailModel } from "../../entities.js";
|
|
4
|
+
import { EngageGroupedItemEditActionBase } from "../../actions/index.js";
|
|
5
|
+
export declare class EngageEditJourneyStepAction extends EngageGroupedItemEditActionBase<UeCustomerJourneyStepDetailModel> {
|
|
6
|
+
constructor(host: UmbControllerHost, args: UmbEntityActionArgs<any>);
|
|
7
|
+
}
|
|
8
|
+
export default EngageEditJourneyStepAction;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CustomerJourneyStepDetailProperties } from "../entities.js";
|
|
2
|
+
import { EngageGroupedItemEditActionBase } from "../../actions/index.js";
|
|
3
|
+
export class EngageEditJourneyStepAction extends EngageGroupedItemEditActionBase {
|
|
4
|
+
constructor(host, args) {
|
|
5
|
+
super({
|
|
6
|
+
host,
|
|
7
|
+
args,
|
|
8
|
+
properties: CustomerJourneyStepDetailProperties,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export default EngageEditJourneyStepAction;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const manifests: ({
|
|
2
|
+
type: string;
|
|
3
|
+
kind: string;
|
|
4
|
+
alias: string;
|
|
5
|
+
name: string;
|
|
6
|
+
api: () => Promise<typeof import("./delete.action.js")>;
|
|
7
|
+
forEntityTypes: string[];
|
|
8
|
+
weight: number;
|
|
9
|
+
meta?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
type: string;
|
|
12
|
+
kind: string;
|
|
13
|
+
alias: string;
|
|
14
|
+
name: string;
|
|
15
|
+
api: () => Promise<typeof import("./edit.action.js")>;
|
|
16
|
+
forEntityTypes: string[];
|
|
17
|
+
weight: number;
|
|
18
|
+
meta: {
|
|
19
|
+
label: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
};
|
|
22
|
+
})[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE } from "../constants.js";
|
|
2
|
+
export const manifests = [
|
|
3
|
+
{
|
|
4
|
+
type: "entityAction",
|
|
5
|
+
kind: "delete",
|
|
6
|
+
alias: "Engage.EntityAction.CustomerJourneyStep.DeleteAction",
|
|
7
|
+
name: "Engage Customer Journey Step Delete Action",
|
|
8
|
+
api: () => import("./delete.action.js"),
|
|
9
|
+
forEntityTypes: [ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE],
|
|
10
|
+
weight: 150,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: "entityAction",
|
|
14
|
+
kind: "default",
|
|
15
|
+
alias: "Engage.EntityAction.CustomerJourneyStep.EditAction",
|
|
16
|
+
name: "Engage Customer Journey Step Edit Action",
|
|
17
|
+
api: () => import("./edit.action.js"),
|
|
18
|
+
forEntityTypes: [ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE],
|
|
19
|
+
weight: 1000,
|
|
20
|
+
meta: {
|
|
21
|
+
label: "#engage_personalization_editJourneyStep",
|
|
22
|
+
icon: "icon-edit",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const ENGAGE_CUSTOMER_JOURNEY_ENTITY_TYPE = "engage-customer-journey-group";
|
|
2
|
-
export declare const ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE = "
|
|
2
|
+
export declare const ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE = "engage-content-scoring-customer-journey-step";
|
|
3
3
|
export declare const ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_ALIAS = "Engage.Workspace.CustomerJourney";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const ENGAGE_CUSTOMER_JOURNEY_ENTITY_TYPE = "engage-customer-journey-group";
|
|
2
|
-
export const ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE = "
|
|
2
|
+
export const ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE = "engage-content-scoring-customer-journey-step";
|
|
3
3
|
export const ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_ALIAS = "Engage.Workspace.CustomerJourney";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { manifests as repositoryManifests } from "./repository/manifests.js";
|
|
2
2
|
import { manifests as componentManifests } from "./components/manifests.js";
|
|
3
|
+
import { manifests as actionManifests } from "./actions/manifests.js";
|
|
3
4
|
import { ENGAGE_CUSTOMER_JOURNEY_ENTITY_TYPE } from "./constants.js";
|
|
4
5
|
export const manifests = [
|
|
5
6
|
...repositoryManifests,
|
|
6
7
|
...componentManifests,
|
|
8
|
+
...actionManifests,
|
|
7
9
|
{
|
|
8
10
|
type: "entityAction",
|
|
9
11
|
kind: "delete",
|
|
@@ -22,7 +24,7 @@ export const manifests = [
|
|
|
22
24
|
forEntityTypes: [ENGAGE_CUSTOMER_JOURNEY_ENTITY_TYPE],
|
|
23
25
|
weight: 200,
|
|
24
26
|
meta: {
|
|
25
|
-
label: "#
|
|
27
|
+
label: "#engage_personalization_editJourney",
|
|
26
28
|
icon: "icon-edit",
|
|
27
29
|
additionalOptions: true,
|
|
28
30
|
},
|
package/dist/personalization/journeys/workspace/customer-journey-workspace-editor.element.d.ts
CHANGED
|
@@ -11,9 +11,6 @@ export declare class UeCustomerJourneyWorkspaceEditorElement extends UeGroupedIt
|
|
|
11
11
|
headline: string;
|
|
12
12
|
addGroupLabel: string;
|
|
13
13
|
itemLabel: string;
|
|
14
|
-
personalizationSection: string;
|
|
15
|
-
editModalHeadline: string;
|
|
16
|
-
icon: string;
|
|
17
14
|
constructor();
|
|
18
15
|
}
|
|
19
16
|
export default UeCustomerJourneyWorkspaceEditorElement;
|
package/dist/personalization/journeys/workspace/customer-journey-workspace-editor.element.js
CHANGED
|
@@ -4,7 +4,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { CustomerJourneyAdvancedSettingProperties, CustomerJourneyDetailProperties, } from "../entities.js";
|
|
8
7
|
import { ENGAGE_GROUPED_ITEM_WORKSPACE_CONTEXT } from "../../context/index.js";
|
|
9
8
|
import { UeGroupedItemWorkspaceEditorBaseElement } from "../../components/index.js";
|
|
10
9
|
import { UeCustomerJourneyWorkspaceContext } from "./customer-journey-workspace.context.js";
|
|
@@ -24,15 +23,7 @@ let UeCustomerJourneyWorkspaceEditorElement = class UeCustomerJourneyWorkspaceEd
|
|
|
24
23
|
this.headline = this.localize.term("engage_personalization_journeys");
|
|
25
24
|
this.addGroupLabel = this.localize.term("engage_personalization_addJourney");
|
|
26
25
|
this.itemLabel = this.localize.term("engage_personalization_steps");
|
|
27
|
-
this.
|
|
28
|
-
this.editModalHeadline = this.localize.term("engage_personalization_editJourney");
|
|
29
|
-
this.icon = "icon-map";
|
|
30
|
-
this.provideContext(ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_CONTEXT, new UeCustomerJourneyWorkspaceContext({
|
|
31
|
-
host: this,
|
|
32
|
-
properties: CustomerJourneyDetailProperties,
|
|
33
|
-
advancedProperties: CustomerJourneyAdvancedSettingProperties,
|
|
34
|
-
editHeadline: this.editModalHeadline,
|
|
35
|
-
}));
|
|
26
|
+
this.provideContext(ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_CONTEXT, new UeCustomerJourneyWorkspaceContext(this));
|
|
36
27
|
}
|
|
37
28
|
};
|
|
38
29
|
UeCustomerJourneyWorkspaceEditorElement = __decorate([
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { UeGroupedItemsWorkspaceContextBase } from "../../context/grouped-items-workspace.context.js";
|
|
2
2
|
import type { UeCustomerJourneyDetailModel, UeCustomerJourneyStepDetailModel } from "../../entities.js";
|
|
3
3
|
import type { UmbControllerHost } from "@umbraco-cms/backoffice/controller-api";
|
|
4
|
-
import type { UePropertyConfigData } from "../../../core/index.js";
|
|
5
4
|
export declare class UeCustomerJourneyWorkspaceContext extends UeGroupedItemsWorkspaceContextBase<UeCustomerJourneyDetailModel, UeCustomerJourneyStepDetailModel> {
|
|
6
5
|
readonly IS_CUSTOMER_JOURNEY_WORKSPACE_CONTEXT = true;
|
|
7
|
-
constructor(
|
|
8
|
-
host: UmbControllerHost;
|
|
9
|
-
properties: UePropertyConfigData<UeCustomerJourneyDetailModel>;
|
|
10
|
-
advancedProperties?: UePropertyConfigData<UeCustomerJourneyDetailModel>;
|
|
11
|
-
editHeadline?: string;
|
|
12
|
-
});
|
|
6
|
+
constructor(host: UmbControllerHost);
|
|
13
7
|
}
|
|
14
8
|
export { UeCustomerJourneyWorkspaceContext as api };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { ENGAGE_CUSTOMER_JOURNEY_ENTITY_TYPE, ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_ALIAS, } from "../constants.js";
|
|
1
|
+
import { ENGAGE_CUSTOMER_JOURNEY_ENTITY_TYPE, ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE, ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_ALIAS, } from "../constants.js";
|
|
2
2
|
import { UeGroupedItemsWorkspaceContextBase } from "../../context/grouped-items-workspace.context.js";
|
|
3
3
|
import { UeCustomerJourneyDetailRepository } from "../repository/detail/index.js";
|
|
4
|
+
import { CustomerJourneyAdvancedSettingProperties, CustomerJourneyDetailProperties, } from "../index.js";
|
|
4
5
|
export class UeCustomerJourneyWorkspaceContext extends UeGroupedItemsWorkspaceContextBase {
|
|
5
|
-
constructor(
|
|
6
|
-
super(
|
|
6
|
+
constructor(host) {
|
|
7
|
+
super(host, {
|
|
7
8
|
workspaceAlias: ENGAGE_CUSTOMER_JOURNEY_WORKSPACE_ALIAS,
|
|
8
9
|
entityType: ENGAGE_CUSTOMER_JOURNEY_ENTITY_TYPE,
|
|
10
|
+
itemEntityType: ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE,
|
|
9
11
|
detailRepositoryConstructor: UeCustomerJourneyDetailRepository,
|
|
10
|
-
properties:
|
|
11
|
-
advancedProperties:
|
|
12
|
-
editHeadline: args.editHeadline,
|
|
12
|
+
properties: CustomerJourneyDetailProperties,
|
|
13
|
+
advancedProperties: CustomerJourneyAdvancedSettingProperties,
|
|
13
14
|
});
|
|
14
15
|
this.IS_CUSTOMER_JOURNEY_WORKSPACE_CONTEXT = true;
|
|
15
16
|
}
|
package/dist/personalization/journeys/workspace/views/edit/customer-journey-editor.element.js
CHANGED
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, customElement, css
|
|
7
|
+
import { html, customElement, css } from "@umbraco-cms/backoffice/external/lit";
|
|
8
8
|
import { UmbLitElement } from "@umbraco-cms/backoffice/lit-element";
|
|
9
9
|
const elementName = "ue-customer-journey-editor";
|
|
10
10
|
let UeCustomerJourneyWorkspaceViewEditElement = class UeCustomerJourneyWorkspaceViewEditElement extends UmbLitElement {
|
|
@@ -12,7 +12,9 @@ let UeCustomerJourneyWorkspaceViewEditElement = class UeCustomerJourneyWorkspace
|
|
|
12
12
|
return html ` <uui-box>
|
|
13
13
|
<div id="content">
|
|
14
14
|
<ue-customer-journey-detail-editor></ue-customer-journey-detail-editor>
|
|
15
|
-
<ue-customer-journey-steps-list-editor
|
|
15
|
+
<ue-customer-journey-steps-list-editor
|
|
16
|
+
sortable
|
|
17
|
+
></ue-customer-journey-steps-list-editor>
|
|
16
18
|
</div>
|
|
17
19
|
</uui-box>`;
|
|
18
20
|
}
|
|
@@ -3,6 +3,7 @@ import type { UeCustomerJourneyStepDetailModel } from "../../../../entities.js";
|
|
|
3
3
|
declare const elementName = "ue-customer-journey-steps-list-editor";
|
|
4
4
|
export declare class UeCustomerJourneyListEditorElement extends UeGroupedItemListEditorBaseElement<UeCustomerJourneyStepDetailModel> {
|
|
5
5
|
constructor();
|
|
6
|
+
onAdd(idx?: number): Promise<void>;
|
|
6
7
|
}
|
|
7
8
|
declare global {
|
|
8
9
|
interface HTMLElementTagNameMap {
|
|
@@ -5,15 +5,25 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { UeGroupedItemListEditorBaseElement } from "../../../../components/grouped-item/grouped-item-list-editor-base.element.js";
|
|
8
|
-
import { CustomerJourneyStepDetailProperties } from "../../../entities.js";
|
|
9
8
|
import { ENGAGE_GROUPED_ITEM_WORKSPACE_CONTEXT } from "../../../../context/index.js";
|
|
10
9
|
import { customElement } from "@umbraco-cms/backoffice/external/lit";
|
|
10
|
+
import { EngageEditJourneyStepAction } from "../../../actions/edit.action.js";
|
|
11
|
+
import { ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE } from "../../../constants.js";
|
|
11
12
|
const elementName = "ue-customer-journey-steps-list-editor";
|
|
12
13
|
let UeCustomerJourneyListEditorElement = class UeCustomerJourneyListEditorElement extends UeGroupedItemListEditorBaseElement {
|
|
13
14
|
constructor() {
|
|
14
|
-
super(
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
super(ENGAGE_GROUPED_ITEM_WORKSPACE_CONTEXT, "#engage_personalization_addJourneyStep");
|
|
16
|
+
}
|
|
17
|
+
async onAdd(idx) {
|
|
18
|
+
const action = new EngageEditJourneyStepAction(this, {
|
|
19
|
+
entityType: ENGAGE_CUSTOMER_JOURNEY_STEP_ENTITY_TYPE,
|
|
20
|
+
meta: {
|
|
21
|
+
position: idx,
|
|
22
|
+
label: this.addLabel,
|
|
23
|
+
},
|
|
24
|
+
unique: "",
|
|
25
|
+
});
|
|
26
|
+
await action.execute();
|
|
17
27
|
}
|
|
18
28
|
};
|
|
19
29
|
UeCustomerJourneyListEditorElement = __decorate([
|
|
@@ -63,10 +63,10 @@ let UePersonalizedVariantsEditorViewElement = class UePersonalizedVariantsEditor
|
|
|
63
63
|
},
|
|
64
64
|
}))
|
|
65
65
|
.onReject(async () => {
|
|
66
|
-
|
|
66
|
+
this.#workspaceContext?.requestItems();
|
|
67
67
|
})
|
|
68
68
|
.onSubmit(async () => {
|
|
69
|
-
|
|
69
|
+
document.location.reload();
|
|
70
70
|
})
|
|
71
71
|
.observeRouteBuilder((routeBuilder) => {
|
|
72
72
|
this.#modalPath = routeBuilder({});
|
|
@@ -25,6 +25,7 @@ export class UePersonalizedVariantWorkspaceContext extends UeWorkspaceContextBas
|
|
|
25
25
|
edit: UePersonalizedVariantWorkspaceEditorElement,
|
|
26
26
|
create: UePersonalizedVariantWorkspaceEditorElement,
|
|
27
27
|
},
|
|
28
|
+
withRedirectOnCreate: false,
|
|
28
29
|
actions: [UeWorkspaceActions.SAVE, UeWorkspaceActions.SUBMIT],
|
|
29
30
|
});
|
|
30
31
|
this.IS_PERSONALIZED_VARIANT_WORKSPACE_CONTEXT = true;
|
|
@@ -99,9 +100,9 @@ export class UePersonalizedVariantWorkspaceContext extends UeWorkspaceContextBas
|
|
|
99
100
|
}
|
|
100
101
|
async requestSave() {
|
|
101
102
|
await super.requestSave();
|
|
102
|
-
await this.#afterUpdate(
|
|
103
|
+
await this.#afterUpdate();
|
|
103
104
|
}
|
|
104
|
-
async #afterUpdate(
|
|
105
|
+
async #afterUpdate() {
|
|
105
106
|
if (!this.documentWorkspace)
|
|
106
107
|
return;
|
|
107
108
|
const segmentAlias = this.getData()?.umbracoSegmentAlias;
|
|
@@ -119,11 +120,6 @@ export class UePersonalizedVariantWorkspaceContext extends UeWorkspaceContextBas
|
|
|
119
120
|
segment: segmentAlias,
|
|
120
121
|
},
|
|
121
122
|
}));
|
|
122
|
-
// TODO => this is unavoidable as we need to re-request segments, which
|
|
123
|
-
// only happens in the document workspace ctor.
|
|
124
|
-
if (skipReload)
|
|
125
|
-
return;
|
|
126
|
-
document.location.reload();
|
|
127
123
|
}
|
|
128
124
|
destroy() {
|
|
129
125
|
this.#segmentsRepository.destroy();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ENGAGE_PERSONA_GROUP_WORKSPACE_CONTEXT } from "../index.js";
|
|
2
|
+
import { UmbControllerHost } from "@umbraco-cms/backoffice/controller-api";
|
|
3
|
+
import { UmbEntityActionArgs } from "@umbraco-cms/backoffice/entity-action";
|
|
4
|
+
import { UeEntityDeleteBaseAction } from "../../actions/index.js";
|
|
5
|
+
export declare class EngageDeletePersonaAction extends UeEntityDeleteBaseAction<any, typeof ENGAGE_PERSONA_GROUP_WORKSPACE_CONTEXT.TYPE> {
|
|
6
|
+
constructor(host: UmbControllerHost, args: UmbEntityActionArgs<any>);
|
|
7
|
+
}
|
|
8
|
+
export default EngageDeletePersonaAction;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ENGAGE_PERSONA_GROUP_WORKSPACE_CONTEXT } from "../index.js";
|
|
2
|
+
import { UeEntityDeleteBaseAction } from "../../actions/index.js";
|
|
3
|
+
export class EngageDeletePersonaAction extends UeEntityDeleteBaseAction {
|
|
4
|
+
constructor(host, args) {
|
|
5
|
+
super({
|
|
6
|
+
host,
|
|
7
|
+
args,
|
|
8
|
+
contextToken: ENGAGE_PERSONA_GROUP_WORKSPACE_CONTEXT,
|
|
9
|
+
deleteHandler: (unique) => this.workspaceContext?.deleteItem(unique),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export default EngageDeletePersonaAction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UmbControllerHost } from "@umbraco-cms/backoffice/controller-api";
|
|
2
|
+
import { UmbEntityActionArgs } from "@umbraco-cms/backoffice/entity-action";
|
|
3
|
+
import { EngageGroupedItemEditActionBase } from "../../actions/index.js";
|
|
4
|
+
import { UePersonaDetailModel } from "../../entities.js";
|
|
5
|
+
export declare class EngageEditPersonaItemAction extends EngageGroupedItemEditActionBase<UePersonaDetailModel> {
|
|
6
|
+
constructor(host: UmbControllerHost, args: UmbEntityActionArgs<any>);
|
|
7
|
+
}
|
|
8
|
+
export default EngageEditPersonaItemAction;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EngageGroupedItemEditActionBase } from "../../actions/index.js";
|
|
2
|
+
import { PersonaDetailProperties } from "../entities.js";
|
|
3
|
+
export class EngageEditPersonaItemAction extends EngageGroupedItemEditActionBase {
|
|
4
|
+
constructor(host, args) {
|
|
5
|
+
super({
|
|
6
|
+
host,
|
|
7
|
+
args,
|
|
8
|
+
properties: PersonaDetailProperties,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export default EngageEditPersonaItemAction;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const manifests: ({
|
|
2
|
+
type: string;
|
|
3
|
+
kind: string;
|
|
4
|
+
alias: string;
|
|
5
|
+
name: string;
|
|
6
|
+
api: () => Promise<typeof import("./delete.action.js")>;
|
|
7
|
+
forEntityTypes: string[];
|
|
8
|
+
weight: number;
|
|
9
|
+
meta?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
type: string;
|
|
12
|
+
kind: string;
|
|
13
|
+
alias: string;
|
|
14
|
+
name: string;
|
|
15
|
+
api: () => Promise<typeof import("./edit.action.js")>;
|
|
16
|
+
forEntityTypes: string[];
|
|
17
|
+
weight: number;
|
|
18
|
+
meta: {
|
|
19
|
+
label: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
};
|
|
22
|
+
})[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ENGAGE_PERSONA_ENTITY_TYPE } from "../index.js";
|
|
2
|
+
export const manifests = [
|
|
3
|
+
{
|
|
4
|
+
type: "entityAction",
|
|
5
|
+
kind: "delete",
|
|
6
|
+
alias: "Engage.EntityAction.PersonaItem.DeleteAction",
|
|
7
|
+
name: "Engage PersonaItem Delete Action",
|
|
8
|
+
api: () => import("./delete.action.js"),
|
|
9
|
+
forEntityTypes: [ENGAGE_PERSONA_ENTITY_TYPE],
|
|
10
|
+
weight: 150,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: "entityAction",
|
|
14
|
+
kind: "default",
|
|
15
|
+
alias: "Engage.EntityAction.PersonaItem.EditAction",
|
|
16
|
+
name: "Engage PersonaItem Edit Action",
|
|
17
|
+
api: () => import("./edit.action.js"),
|
|
18
|
+
forEntityTypes: [ENGAGE_PERSONA_ENTITY_TYPE],
|
|
19
|
+
weight: 1000,
|
|
20
|
+
meta: {
|
|
21
|
+
label: "#engage_personalization_editPersona",
|
|
22
|
+
icon: "icon-edit",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ENGAGE_PERSONA_GROUP_ENTITY_TYPE = "persona-group";
|
|
2
|
-
export declare const ENGAGE_PERSONA_ENTITY_TYPE = "
|
|
1
|
+
export declare const ENGAGE_PERSONA_GROUP_ENTITY_TYPE = "engage-persona-group";
|
|
2
|
+
export declare const ENGAGE_PERSONA_ENTITY_TYPE = "engage-content-scoring-persona";
|
|
3
3
|
export declare const ENGAGE_PERSONA_GROUP_WORKSPACE_ALIAS = "Engage.Workspace.PersonaGroup";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const ENGAGE_PERSONA_GROUP_ENTITY_TYPE = "persona-group";
|
|
2
|
-
export const ENGAGE_PERSONA_ENTITY_TYPE = "
|
|
1
|
+
export const ENGAGE_PERSONA_GROUP_ENTITY_TYPE = "engage-persona-group";
|
|
2
|
+
export const ENGAGE_PERSONA_ENTITY_TYPE = "engage-content-scoring-persona";
|
|
3
3
|
export const ENGAGE_PERSONA_GROUP_WORKSPACE_ALIAS = "Engage.Workspace.PersonaGroup";
|