@rtsee/presentation 0.0.109 → 0.0.110
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/presentation/src/models/RTSeeStory.d.ts +40 -1
- package/dist/presentation/src/models/RTSeeStory.d.ts.map +1 -1
- package/dist/presentation/src/models/RTSeeStory.js +161 -0
- package/dist/presentation/src/models/RTSeeStory.js.map +1 -1
- package/dist/presentation/src/models/editor/RTSeeIllustrator.d.ts +57 -0
- package/dist/presentation/src/models/editor/RTSeeIllustrator.d.ts.map +1 -0
- package/dist/presentation/src/models/editor/RTSeeIllustrator.js +443 -0
- package/dist/presentation/src/models/editor/RTSeeIllustrator.js.map +1 -0
- package/dist/presentation/src/models/editor/RTSeeInteractiveStoryEditorVm.d.ts +92 -0
- package/dist/presentation/src/models/editor/RTSeeInteractiveStoryEditorVm.d.ts.map +1 -0
- package/dist/presentation/src/models/editor/RTSeeInteractiveStoryEditorVm.js +494 -0
- package/dist/presentation/src/models/editor/RTSeeInteractiveStoryEditorVm.js.map +1 -0
- package/dist/presentation/src/models/editor/RTSeeStoryElementsEditor.d.ts +71 -0
- package/dist/presentation/src/models/editor/RTSeeStoryElementsEditor.d.ts.map +1 -0
- package/dist/presentation/src/models/editor/RTSeeStoryElementsEditor.js +163 -0
- package/dist/presentation/src/models/editor/RTSeeStoryElementsEditor.js.map +1 -0
- package/dist/presentation/src/models/editor/index.d.ts +4 -0
- package/dist/presentation/src/models/editor/index.d.ts.map +1 -0
- package/dist/presentation/src/models/editor/index.js +4 -0
- package/dist/presentation/src/models/editor/index.js.map +1 -0
- package/dist/presentation/src/models/index.d.ts +3 -0
- package/dist/presentation/src/models/index.d.ts.map +1 -1
- package/dist/presentation/src/models/index.js +3 -0
- package/dist/presentation/src/models/index.js.map +1 -1
- package/dist/presentation/src/models/manage/RTSeeManageStories.d.ts +3 -0
- package/dist/presentation/src/models/manage/RTSeeManageStories.d.ts.map +1 -1
- package/dist/presentation/src/models/manage/RTSeeManageStories.js +15 -0
- package/dist/presentation/src/models/manage/RTSeeManageStories.js.map +1 -1
- package/dist/presentation/src/models/remote-actions/PresentationRemoteActions.d.ts +2 -1
- package/dist/presentation/src/models/remote-actions/PresentationRemoteActions.d.ts.map +1 -1
- package/dist/presentation/src/models/remote-actions/PresentationRemoteActions.js +3 -0
- package/dist/presentation/src/models/remote-actions/PresentationRemoteActions.js.map +1 -1
- package/dist/presentation/src/models/remote-actions/StoryElementsRemoteActions.d.ts +44 -0
- package/dist/presentation/src/models/remote-actions/StoryElementsRemoteActions.d.ts.map +1 -0
- package/dist/presentation/src/models/remote-actions/StoryElementsRemoteActions.js +70 -0
- package/dist/presentation/src/models/remote-actions/StoryElementsRemoteActions.js.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryArtifact.d.ts +11 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryArtifact.d.ts.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryArtifact.js +12 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryArtifact.js.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryAuthor.d.ts +14 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryAuthor.d.ts.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryAuthor.js +44 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryAuthor.js.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryCharacter.d.ts +11 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryCharacter.d.ts.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryCharacter.js +12 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryCharacter.js.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryCrudEntity.d.ts +42 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryCrudEntity.d.ts.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryCrudEntity.js +106 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryCrudEntity.js.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryElementEntity.d.ts +18 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryElementEntity.d.ts.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryElementEntity.js +60 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryElementEntity.js.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryLocation.d.ts +11 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryLocation.d.ts.map +1 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryLocation.js +12 -0
- package/dist/presentation/src/models/story-elements/RTSeeStoryLocation.js.map +1 -0
- package/dist/presentation/src/models/story-elements/index.d.ts +7 -0
- package/dist/presentation/src/models/story-elements/index.d.ts.map +1 -0
- package/dist/presentation/src/models/story-elements/index.js +7 -0
- package/dist/presentation/src/models/story-elements/index.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
export var RTSeeStoryEditorSection;
|
|
3
|
+
(function (RTSeeStoryEditorSection) {
|
|
4
|
+
RTSeeStoryEditorSection["details"] = "details";
|
|
5
|
+
RTSeeStoryEditorSection["characters"] = "characters";
|
|
6
|
+
RTSeeStoryEditorSection["artifacts"] = "artifacts";
|
|
7
|
+
RTSeeStoryEditorSection["locations"] = "locations";
|
|
8
|
+
RTSeeStoryEditorSection["slides"] = "slides";
|
|
9
|
+
RTSeeStoryEditorSection["author"] = "author";
|
|
10
|
+
})(RTSeeStoryEditorSection || (RTSeeStoryEditorSection = {}));
|
|
11
|
+
/**
|
|
12
|
+
* Orchestrates the thumbnails list and the (single) expanded edit form of one kind of
|
|
13
|
+
* story element (characters, artifacts or locations).
|
|
14
|
+
*/
|
|
15
|
+
export class RTSeeStoryElementsEditor extends EventEmitter {
|
|
16
|
+
section;
|
|
17
|
+
label;
|
|
18
|
+
expanded = null;
|
|
19
|
+
form = null;
|
|
20
|
+
// ui
|
|
21
|
+
saveInProgress = false;
|
|
22
|
+
removeInProgress = false;
|
|
23
|
+
error = null;
|
|
24
|
+
options;
|
|
25
|
+
constructor(options) {
|
|
26
|
+
super();
|
|
27
|
+
this.options = options;
|
|
28
|
+
this.section = options.section;
|
|
29
|
+
this.label = options.label;
|
|
30
|
+
}
|
|
31
|
+
get items() {
|
|
32
|
+
return this.options.getItems();
|
|
33
|
+
}
|
|
34
|
+
get isCreating() {
|
|
35
|
+
return !!this.expanded && this.expanded.isNew;
|
|
36
|
+
}
|
|
37
|
+
get busy() {
|
|
38
|
+
return this.saveInProgress || this.removeInProgress;
|
|
39
|
+
}
|
|
40
|
+
isExpanded(entity) {
|
|
41
|
+
return !!this.expanded && this.expanded === entity;
|
|
42
|
+
}
|
|
43
|
+
/** Expands the edit form of an existing element */
|
|
44
|
+
expand(entity) {
|
|
45
|
+
if (this.isExpanded(entity)) {
|
|
46
|
+
this.collapse();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.open(entity);
|
|
50
|
+
}
|
|
51
|
+
/** Expands the edit form of a new (blank) element */
|
|
52
|
+
expandNew() {
|
|
53
|
+
this.open(this.options.createEntity(this.options.getBlankData()));
|
|
54
|
+
}
|
|
55
|
+
collapse() {
|
|
56
|
+
this.expanded = null;
|
|
57
|
+
this.form = null;
|
|
58
|
+
this.error = null;
|
|
59
|
+
}
|
|
60
|
+
/** Submits the expanded form */
|
|
61
|
+
submit() {
|
|
62
|
+
this.form?.submit();
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Creates / updates the expanded element.
|
|
66
|
+
* A new element is attached to the story (server side when the story already exists).
|
|
67
|
+
*/
|
|
68
|
+
async save(model) {
|
|
69
|
+
const entity = this.expanded;
|
|
70
|
+
if (!entity || this.busy) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (this.form && !this.form.isValid) {
|
|
74
|
+
this.error = "Please fix the highlighted fields";
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const isNew = entity.isNew;
|
|
78
|
+
const storyId = this.options.getStoryId();
|
|
79
|
+
this.saveInProgress = true;
|
|
80
|
+
this.error = null;
|
|
81
|
+
try {
|
|
82
|
+
await entity.save(
|
|
83
|
+
// the form does not edit the gallery, keep the current images
|
|
84
|
+
{ ...model, id: entity.id, images: entity.images }, isNew && storyId ? { storyId } : undefined);
|
|
85
|
+
if (isNew) {
|
|
86
|
+
this.options.attach(entity);
|
|
87
|
+
// story is not persisted yet / was not linked server side
|
|
88
|
+
if (!storyId) {
|
|
89
|
+
await this.options.saveStory();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
this.emit(isNew ? "created" : "updated", entity);
|
|
93
|
+
this.collapse();
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
this.error = entity.lastError || this.getErrorMessage(e);
|
|
97
|
+
}
|
|
98
|
+
finally {
|
|
99
|
+
this.saveInProgress = false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Removes the element from the story only (the element is kept for other stories) */
|
|
103
|
+
async detach(entity) {
|
|
104
|
+
if (this.busy) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
this.removeInProgress = true;
|
|
108
|
+
this.error = null;
|
|
109
|
+
try {
|
|
110
|
+
this.options.detach(entity.id);
|
|
111
|
+
await this.options.saveStory();
|
|
112
|
+
if (this.isExpanded(entity)) {
|
|
113
|
+
this.collapse();
|
|
114
|
+
}
|
|
115
|
+
this.emit("detached", entity);
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
this.options.attach(entity);
|
|
119
|
+
this.error = this.getErrorMessage(e);
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
this.removeInProgress = false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** Deletes the element permanently (from all the stories) */
|
|
126
|
+
async delete(entity) {
|
|
127
|
+
if (this.busy) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (entity.isNew) {
|
|
131
|
+
this.collapse();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.removeInProgress = true;
|
|
135
|
+
this.error = null;
|
|
136
|
+
try {
|
|
137
|
+
await entity.remove();
|
|
138
|
+
this.options.detach(entity.id);
|
|
139
|
+
if (this.isExpanded(entity)) {
|
|
140
|
+
this.collapse();
|
|
141
|
+
}
|
|
142
|
+
this.emit("deleted", entity);
|
|
143
|
+
}
|
|
144
|
+
catch (e) {
|
|
145
|
+
this.error = entity.lastError || this.getErrorMessage(e);
|
|
146
|
+
}
|
|
147
|
+
finally {
|
|
148
|
+
this.removeInProgress = false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
open(entity) {
|
|
152
|
+
this.error = null;
|
|
153
|
+
this.expanded = entity;
|
|
154
|
+
this.form = this.options.createForm(entity.toJson(), (model) => {
|
|
155
|
+
void this.save(model);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
getErrorMessage(e) {
|
|
159
|
+
const error = e;
|
|
160
|
+
return error?.friendlyMessage || error?.message || `${e}`;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=RTSeeStoryElementsEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeeStoryElementsEditor.js","sourceRoot":"","sources":["../../../../../src/models/editor/RTSeeStoryElementsEditor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,oDAAyB,CAAA;IACzB,kDAAuB,CAAA;IACvB,kDAAuB,CAAA;IACvB,4CAAiB,CAAA;IACjB,4CAAiB,CAAA;AACnB,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC;AA2BD;;;GAGG;AACH,MAAM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IAAI,GAAG,CAAC,EAAE,CAAC;IAC5D,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/models/editor/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/models/editor/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC"}
|
|
@@ -5,4 +5,7 @@ export * from "./RTSeeStorySlide";
|
|
|
5
5
|
export * from "./RTSeeStoryCategory";
|
|
6
6
|
export * from "./RTSeePresentationSettings";
|
|
7
7
|
export * from "./remote-actions/PresentationRemoteActions";
|
|
8
|
+
export * from "./remote-actions/StoryElementsRemoteActions";
|
|
9
|
+
export * from "./story-elements";
|
|
10
|
+
export * from "./editor";
|
|
8
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4CAA4C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC"}
|
|
@@ -5,4 +5,7 @@ export * from "./RTSeeStorySlide";
|
|
|
5
5
|
export * from "./RTSeeStoryCategory";
|
|
6
6
|
export * from "./RTSeePresentationSettings";
|
|
7
7
|
export * from "./remote-actions/PresentationRemoteActions";
|
|
8
|
+
export * from "./remote-actions/StoryElementsRemoteActions";
|
|
9
|
+
export * from "./story-elements";
|
|
10
|
+
export * from "./editor";
|
|
8
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4CAA4C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { IEntitiesRemoteActions, IRTSeeStory, ITagsRemoteActions } from "@rtsee/common";
|
|
2
2
|
import { IPresentationRemoteActions, IRTSeeManageStoriesOptions, RTSeeManageStory } from "@rtsee/presentation";
|
|
3
3
|
import { IPeer, IRTSeeSignalingClientBase } from "@rtsee/core";
|
|
4
|
+
import { RTSeeInteractiveStoryEditorVm } from "../editor/RTSeeInteractiveStoryEditorVm";
|
|
4
5
|
export declare class RTSeeManageStories {
|
|
5
6
|
stories: IRTSeeStory[];
|
|
6
7
|
selectedStory: RTSeeManageStory | null;
|
|
8
|
+
interactiveStoryEditor: RTSeeInteractiveStoryEditorVm | null;
|
|
7
9
|
peer: IPeer;
|
|
8
10
|
companionUrl: string;
|
|
9
11
|
signalingClient: IRTSeeSignalingClientBase;
|
|
@@ -15,6 +17,7 @@ export declare class RTSeeManageStories {
|
|
|
15
17
|
init(): void;
|
|
16
18
|
getStoryById(storyId: string): IRTSeeStory | null;
|
|
17
19
|
selectStory(storyId: string): void;
|
|
20
|
+
selectInteractiveStory(storyId: string): Promise<void>;
|
|
18
21
|
onReorder(): void;
|
|
19
22
|
cloneStory(id: string): Promise<IRTSeeStory>;
|
|
20
23
|
selectNewStory(): IRTSeeStory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RTSeeManageStories.d.ts","sourceRoot":"","sources":["../../../../../src/models/manage/RTSeeManageStories.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,WAAW,EACY,kBAAkB,EAE1C,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"RTSeeManageStories.d.ts","sourceRoot":"","sources":["../../../../../src/models/manage/RTSeeManageStories.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,WAAW,EACY,kBAAkB,EAE1C,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAExF,qBAAa,kBAAkB;IAC7B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAC9C,sBAAsB,EAAE,6BAA6B,GAAG,IAAI,CAAQ;IACpE,IAAI,EAAE,KAAK,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,yBAAyB,CAAC;IAC3C,0BAA0B,EAAE,0BAA0B,CAAC;IACvD,qBAAqB,EAAE,sBAAsB,GAAG,kBAAkB,CAAC;IACnE,aAAa,EAAE,OAAO,CAAS;IAE/B,qBAAqB,EAAE,OAAO,CAAS;gBAE3B,OAAO,EAAE,0BAA0B;IAa/C,IAAI,IAAI,IAAI;IAQZ,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;IAIjD,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB5D,SAAS;IAIH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAMlD,cAAc,IAAI,WAAW;YAmBf,kBAAkB;YAiBlB,WAAW;YAgBX,aAAa;IAK3B,OAAO,CAAC,gBAAgB;CAwBzB"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { PresentationSignalingEvents, } from "@rtsee/common";
|
|
2
2
|
import { RTSeeManageStory, } from "@rtsee/presentation";
|
|
3
|
+
import { RTSeeInteractiveStoryEditorVm } from "../editor/RTSeeInteractiveStoryEditorVm";
|
|
3
4
|
export class RTSeeManageStories {
|
|
4
5
|
stories;
|
|
5
6
|
selectedStory = null;
|
|
7
|
+
interactiveStoryEditor = null;
|
|
6
8
|
peer;
|
|
7
9
|
companionUrl;
|
|
8
10
|
signalingClient;
|
|
@@ -34,6 +36,19 @@ export class RTSeeManageStories {
|
|
|
34
36
|
selectStory(storyId) {
|
|
35
37
|
void this.loadAndSelectStory(storyId);
|
|
36
38
|
}
|
|
39
|
+
async selectInteractiveStory(storyId) {
|
|
40
|
+
this.interactiveStoryEditor = new RTSeeInteractiveStoryEditorVm({
|
|
41
|
+
storyId,
|
|
42
|
+
peer: this.peer,
|
|
43
|
+
companionUrl: this.companionUrl,
|
|
44
|
+
signalingClient: this.signalingClient,
|
|
45
|
+
entitiesRemoteActions: this.entitiesRemoteActions
|
|
46
|
+
});
|
|
47
|
+
this.interactiveStoryEditor.on('story-saved', () => {
|
|
48
|
+
void this.reloadStories();
|
|
49
|
+
});
|
|
50
|
+
await this.interactiveStoryEditor.init();
|
|
51
|
+
}
|
|
37
52
|
onReorder() {
|
|
38
53
|
console.log(this.stories);
|
|
39
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RTSeeManageStories.js","sourceRoot":"","sources":["../../../../../src/models/manage/RTSeeManageStories.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"RTSeeManageStories.js","sourceRoot":"","sources":["../../../../../src/models/manage/RTSeeManageStories.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAExF,MAAM,OAAO,kBAAkB;IAC7B,OAAO,CAAgB;IACvB,aAAa,GAA4B,IAAI,CAAC;IAC9C,sBAAsB,GAAyC,IAAI,CAAC;IACpE,IAAI,CAAQ;IACZ,YAAY,CAAS;IACrB,eAAe,CAA4B;IAC3C,0BAA0B,CAA6B;IACvD,qBAAqB,CAA8C;IACnE,aAAa,G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,CAAC,qBAAqB;SAClD,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,gBAAgB,EAAE,GAAG,EAAE;YAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,CAAC,EAAE,CACnB,GAAG,2BAA2B,CAAC,YAAY,UAAU,EACrD,CAAC,KAAkB,EAAE,EAAE;YACrB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAC1B,KAAK,IAAI,CAAC,aAAa,EAAE,CAAC;QAC5B,CAAC,CACF,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IRTSeeSignalingClientBase, RTSeeSignalRequest } from "@rtsee/core";
|
|
2
2
|
import { IRTSeeStory, IRTSeeStoryCategoriesRequestOptions, IRTSeeStoryCategory, IRTSeeStoryCategoryResponse, IRTSeeStoryLabel, IRTSeeStoryLabelRequestOptions, IRTSeeStorySlide, IRTSeeStoryTopic, IRTSeeStoryTopicRequestOptions, IStoriesQuery, IStoriesQueryResponse, IStoryQuery, IStorySlidesQuery, IStorySlidesQueryResponse } from "@rtsee/common";
|
|
3
|
-
|
|
3
|
+
import { IPresentationStoryElementsRemoteActions } from "./StoryElementsRemoteActions";
|
|
4
|
+
export interface IPresentationRemoteActions extends IPresentationStoryElementsRemoteActions {
|
|
4
5
|
getStories: RTSeeSignalRequest<IStoriesQueryResponse, IStoriesQuery>;
|
|
5
6
|
getStory: RTSeeSignalRequest<IRTSeeStory, string>;
|
|
6
7
|
createStory: RTSeeSignalRequest<IRTSeeStory, Omit<IRTSeeStory, "id">>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationRemoteActions.d.ts","sourceRoot":"","sources":["../../../../../src/models/remote-actions/PresentationRemoteActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,WAAW,EACX,mCAAmC,EACnC,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,8BAA8B,EAC9B,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EAE1B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"PresentationRemoteActions.d.ts","sourceRoot":"","sources":["../../../../../src/models/remote-actions/PresentationRemoteActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,WAAW,EACX,mCAAmC,EACnC,mBAAmB,EACnB,2BAA2B,EAC3B,gBAAgB,EAChB,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,8BAA8B,EAC9B,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EAE1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,uCAAuC,EACxC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,0BACf,SAAQ,uCAAuC;IAE/C,UAAU,EAAE,kBAAkB,CAAC,qBAAqB,EAAE,aAAa,CAAC,CAAC;IACrE,QAAQ,EAAE,kBAAkB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAClD,WAAW,EAAE,kBAAkB,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;IACtE,UAAU,EAAE,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACzD,SAAS,EAAE,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACxD,WAAW,EAAE,kBAAkB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAGrD,aAAa,EAAE,kBAAkB,CAC/B,2BAA2B,EAC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,CAAC,CAAC;IAClE,WAAW,EAAE,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;CAC3D;AAED,wBAAgB,4BAA4B,CAC1C,eAAe,EAAE,yBAAyB,GACzC,0BAA0B,CAsI5B"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { RTSeeSignalRequest } from "@rtsee/core";
|
|
2
2
|
import { PresentationSignalingEvents, } from "@rtsee/common";
|
|
3
|
+
import { getPresentationStoryElementsRemoteActions, } from "./StoryElementsRemoteActions";
|
|
3
4
|
export function getPresentationRemoteActions(signalingClient) {
|
|
4
5
|
return {
|
|
6
|
+
// characters, artifacts, locations & authors
|
|
7
|
+
...getPresentationStoryElementsRemoteActions(signalingClient),
|
|
5
8
|
// stories
|
|
6
9
|
getStories: new RTSeeSignalRequest({
|
|
7
10
|
signalingClient,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationRemoteActions.js","sourceRoot":"","sources":["../../../../../src/models/remote-actions/PresentationRemoteActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAeL,2BAA2B,GAC5B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"PresentationRemoteActions.js","sourceRoot":"","sources":["../../../../../src/models/remote-actions/PresentationRemoteActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAeL,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,yCAAyC,GAE1C,MAAM,8BAA8B,CAAC;AA4DtC,MAAM,UAAU,4BAA4B,CAC1C,eAA0C;IAE1C,OAAO;QACL,6CAA6C;QAC7C,GAAG,yCAAyC,CAAC,eAAe,CAAC;QAE7D,UAAU;QACV,UAAU,EAAE,IAAI,kBAAkB,CAAuC;YACvE,eAAe;YACf,SAAS,EAAE,2BAA2B,CAAC,WAAW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core";
|
|
2
|
+
import { IRTSeeStoryArtifact, IRTSeeStoryArtifactCreateOptions, IRTSeeStoryArtifactsResponse, IRTSeeStoryAuthor, IRTSeeStoryAuthorCreateOptions, IRTSeeStoryAuthorsQuery, IRTSeeStoryAuthorsResponse, IRTSeeStoryCharacter, IRTSeeStoryCharacterCreateOptions, IRTSeeStoryCharactersResponse, IRTSeeStoryElementSaveOptions, IRTSeeStoryElementsQuery, IRTSeeStoryLocation, IRTSeeStoryLocationCreateOptions, IRTSeeStoryLocationsResponse } from "@rtsee/common";
|
|
3
|
+
/**
|
|
4
|
+
* Generic CRUD remote actions of a story element (character / artifact / location / author).
|
|
5
|
+
*/
|
|
6
|
+
export interface IStoryElementRemoteActions<T, TCreate, TEdit, TQuery, TList> {
|
|
7
|
+
getList: RTSeeSignalRequest<TList, TQuery>;
|
|
8
|
+
get: RTSeeSignalRequest<T, string>;
|
|
9
|
+
create: RTSeeSignalRequest<T, TCreate>;
|
|
10
|
+
edit: RTSeeSignalRequest<T, TEdit>;
|
|
11
|
+
delete: RTSeeSignalRequest<T, string>;
|
|
12
|
+
}
|
|
13
|
+
export type IStoryCharacterRemoteActions = IStoryElementRemoteActions<IRTSeeStoryCharacter, IRTSeeStoryCharacterCreateOptions, IRTSeeStoryElementSaveOptions<IRTSeeStoryCharacter>, IRTSeeStoryElementsQuery, IRTSeeStoryCharactersResponse>;
|
|
14
|
+
export type IStoryArtifactRemoteActions = IStoryElementRemoteActions<IRTSeeStoryArtifact, IRTSeeStoryArtifactCreateOptions, IRTSeeStoryElementSaveOptions<IRTSeeStoryArtifact>, IRTSeeStoryElementsQuery, IRTSeeStoryArtifactsResponse>;
|
|
15
|
+
export type IStoryLocationRemoteActions = IStoryElementRemoteActions<IRTSeeStoryLocation, IRTSeeStoryLocationCreateOptions, IRTSeeStoryElementSaveOptions<IRTSeeStoryLocation>, IRTSeeStoryElementsQuery, IRTSeeStoryLocationsResponse>;
|
|
16
|
+
export type IStoryAuthorRemoteActions = IStoryElementRemoteActions<IRTSeeStoryAuthor, IRTSeeStoryAuthorCreateOptions, IRTSeeStoryAuthor, IRTSeeStoryAuthorsQuery, IRTSeeStoryAuthorsResponse>;
|
|
17
|
+
export interface IPresentationStoryElementsRemoteActions {
|
|
18
|
+
getCharacters: RTSeeSignalRequest<IRTSeeStoryCharactersResponse, IRTSeeStoryElementsQuery>;
|
|
19
|
+
getCharacter: RTSeeSignalRequest<IRTSeeStoryCharacter, string>;
|
|
20
|
+
createCharacter: RTSeeSignalRequest<IRTSeeStoryCharacter, IRTSeeStoryCharacterCreateOptions>;
|
|
21
|
+
editCharacter: RTSeeSignalRequest<IRTSeeStoryCharacter, IRTSeeStoryElementSaveOptions<IRTSeeStoryCharacter>>;
|
|
22
|
+
deleteCharacter: RTSeeSignalRequest<IRTSeeStoryCharacter, string>;
|
|
23
|
+
getArtifacts: RTSeeSignalRequest<IRTSeeStoryArtifactsResponse, IRTSeeStoryElementsQuery>;
|
|
24
|
+
getArtifact: RTSeeSignalRequest<IRTSeeStoryArtifact, string>;
|
|
25
|
+
createArtifact: RTSeeSignalRequest<IRTSeeStoryArtifact, IRTSeeStoryArtifactCreateOptions>;
|
|
26
|
+
editArtifact: RTSeeSignalRequest<IRTSeeStoryArtifact, IRTSeeStoryElementSaveOptions<IRTSeeStoryArtifact>>;
|
|
27
|
+
deleteArtifact: RTSeeSignalRequest<IRTSeeStoryArtifact, string>;
|
|
28
|
+
getLocations: RTSeeSignalRequest<IRTSeeStoryLocationsResponse, IRTSeeStoryElementsQuery>;
|
|
29
|
+
getLocation: RTSeeSignalRequest<IRTSeeStoryLocation, string>;
|
|
30
|
+
createLocation: RTSeeSignalRequest<IRTSeeStoryLocation, IRTSeeStoryLocationCreateOptions>;
|
|
31
|
+
editLocation: RTSeeSignalRequest<IRTSeeStoryLocation, IRTSeeStoryElementSaveOptions<IRTSeeStoryLocation>>;
|
|
32
|
+
deleteLocation: RTSeeSignalRequest<IRTSeeStoryLocation, string>;
|
|
33
|
+
getAuthors: RTSeeSignalRequest<IRTSeeStoryAuthorsResponse, IRTSeeStoryAuthorsQuery>;
|
|
34
|
+
getAuthor: RTSeeSignalRequest<IRTSeeStoryAuthor, string>;
|
|
35
|
+
createAuthor: RTSeeSignalRequest<IRTSeeStoryAuthor, IRTSeeStoryAuthorCreateOptions>;
|
|
36
|
+
editAuthor: RTSeeSignalRequest<IRTSeeStoryAuthor, IRTSeeStoryAuthor>;
|
|
37
|
+
deleteAuthor: RTSeeSignalRequest<IRTSeeStoryAuthor, string>;
|
|
38
|
+
}
|
|
39
|
+
export declare function getPresentationStoryElementsRemoteActions(signalingClient: IRTSeeSignalingClientBase): IPresentationStoryElementsRemoteActions;
|
|
40
|
+
export declare function getStoryCharacterRemoteActions(actions: IPresentationStoryElementsRemoteActions): IStoryCharacterRemoteActions;
|
|
41
|
+
export declare function getStoryArtifactRemoteActions(actions: IPresentationStoryElementsRemoteActions): IStoryArtifactRemoteActions;
|
|
42
|
+
export declare function getStoryLocationRemoteActions(actions: IPresentationStoryElementsRemoteActions): IStoryLocationRemoteActions;
|
|
43
|
+
export declare function getStoryAuthorRemoteActions(actions: IPresentationStoryElementsRemoteActions): IStoryAuthorRemoteActions;
|
|
44
|
+
//# sourceMappingURL=StoryElementsRemoteActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoryElementsRemoteActions.d.ts","sourceRoot":"","sources":["../../../../../src/models/remote-actions/StoryElementsRemoteActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,gCAAgC,EAChC,4BAA4B,EAC5B,iBAAiB,EACjB,8BAA8B,EAC9B,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,iCAAiC,EACjC,6BAA6B,EAC7B,6BAA6B,EAC7B,wBAAwB,EACxB,mBAAmB,EACnB,gCAAgC,EAChC,4BAA4B,EAE7B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,CACvD,eAAe,EAAE,yBAAyB,GACzC,uCAAuC,CA8BzC;AAED,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,uCAAuC,GAC/C,4BAA4B,CAQ9B;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,uCAAuC,GAC/C,2BAA2B,CAQ7B;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,uCAAuC,GAC/C,2BAA2B,CAQ7B;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,uCAAuC,GAC/C,yBAAyB,CAQ3B"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { RTSeeSignalRequest } from "@rtsee/core";
|
|
2
|
+
import { PresentationSignalingEvents } from "@rtsee/common";
|
|
3
|
+
function request(signalingClient, eventName) {
|
|
4
|
+
return new RTSeeSignalRequest({ signalingClient, eventName });
|
|
5
|
+
}
|
|
6
|
+
export function getPresentationStoryElementsRemoteActions(signalingClient) {
|
|
7
|
+
return {
|
|
8
|
+
// characters
|
|
9
|
+
getCharacters: request(signalingClient, PresentationSignalingEvents.GET_CHARACTERS),
|
|
10
|
+
getCharacter: request(signalingClient, PresentationSignalingEvents.GET_CHARACTER),
|
|
11
|
+
createCharacter: request(signalingClient, PresentationSignalingEvents.CREATE_CHARACTER),
|
|
12
|
+
editCharacter: request(signalingClient, PresentationSignalingEvents.EDIT_CHARACTER),
|
|
13
|
+
deleteCharacter: request(signalingClient, PresentationSignalingEvents.DELETE_CHARACTER),
|
|
14
|
+
// artifacts
|
|
15
|
+
getArtifacts: request(signalingClient, PresentationSignalingEvents.GET_ARTIFACTS),
|
|
16
|
+
getArtifact: request(signalingClient, PresentationSignalingEvents.GET_ARTIFACT),
|
|
17
|
+
createArtifact: request(signalingClient, PresentationSignalingEvents.CREATE_ARTIFACT),
|
|
18
|
+
editArtifact: request(signalingClient, PresentationSignalingEvents.EDIT_ARTIFACT),
|
|
19
|
+
deleteArtifact: request(signalingClient, PresentationSignalingEvents.DELETE_ARTIFACT),
|
|
20
|
+
// locations
|
|
21
|
+
getLocations: request(signalingClient, PresentationSignalingEvents.GET_LOCATIONS),
|
|
22
|
+
getLocation: request(signalingClient, PresentationSignalingEvents.GET_LOCATION),
|
|
23
|
+
createLocation: request(signalingClient, PresentationSignalingEvents.CREATE_LOCATION),
|
|
24
|
+
editLocation: request(signalingClient, PresentationSignalingEvents.EDIT_LOCATION),
|
|
25
|
+
deleteLocation: request(signalingClient, PresentationSignalingEvents.DELETE_LOCATION),
|
|
26
|
+
// authors
|
|
27
|
+
getAuthors: request(signalingClient, PresentationSignalingEvents.GET_AUTHORS),
|
|
28
|
+
getAuthor: request(signalingClient, PresentationSignalingEvents.GET_AUTHOR),
|
|
29
|
+
createAuthor: request(signalingClient, PresentationSignalingEvents.CREATE_AUTHOR),
|
|
30
|
+
editAuthor: request(signalingClient, PresentationSignalingEvents.EDIT_AUTHOR),
|
|
31
|
+
deleteAuthor: request(signalingClient, PresentationSignalingEvents.DELETE_AUTHOR),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function getStoryCharacterRemoteActions(actions) {
|
|
35
|
+
return {
|
|
36
|
+
getList: actions.getCharacters,
|
|
37
|
+
get: actions.getCharacter,
|
|
38
|
+
create: actions.createCharacter,
|
|
39
|
+
edit: actions.editCharacter,
|
|
40
|
+
delete: actions.deleteCharacter,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function getStoryArtifactRemoteActions(actions) {
|
|
44
|
+
return {
|
|
45
|
+
getList: actions.getArtifacts,
|
|
46
|
+
get: actions.getArtifact,
|
|
47
|
+
create: actions.createArtifact,
|
|
48
|
+
edit: actions.editArtifact,
|
|
49
|
+
delete: actions.deleteArtifact,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function getStoryLocationRemoteActions(actions) {
|
|
53
|
+
return {
|
|
54
|
+
getList: actions.getLocations,
|
|
55
|
+
get: actions.getLocation,
|
|
56
|
+
create: actions.createLocation,
|
|
57
|
+
edit: actions.editLocation,
|
|
58
|
+
delete: actions.deleteLocation,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export function getStoryAuthorRemoteActions(actions) {
|
|
62
|
+
return {
|
|
63
|
+
getList: actions.getAuthors,
|
|
64
|
+
get: actions.getAuthor,
|
|
65
|
+
create: actions.createAuthor,
|
|
66
|
+
edit: actions.editAuthor,
|
|
67
|
+
delete: actions.deleteAuthor,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=StoryElementsRemoteActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoryElementsRemoteActions.js","sourceRoot":"","sources":["../../../../../src/models/remote-actions/StoryElementsRemoteActions.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAgBL,2BAA2B,EAC5B,MAAM,eAAe,CAAC;AAoFvB,SAAS,OAAO,CACd,eAA0C,EAC1C,SAAsC;IAEtC,OAAO,IAAI,kBAAkB,CAAO,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,yCAAyC,CACvD,eAA0C;IAE1C,OAAO;QACL,aAAa;QACb,aAAa,EAAE,OAAO,CAAC,eAAe,EAAE,2BAA2B,CAAC,cAAc,CAAC;QACnF,YAAY,EAAE,OAAO,CAAC,eAAe,EAAE,2BAA2B,CAAC,aAAa,CAAC;QACjF,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE,2BAA2B,CAAC,gBAAgB,CAAC;QACvF,aAAa,EAAE,OAAO,CAAC,eAAe,EAAE,2BAA2B,CAAC,cAAc,CAAC;QACnF,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE,2BAA2B,CAAC,gBAAgB,CAAC;QAEvF,YAAY;QACZ,YAAY,EAAE,OAAO,CAAC,eAAe,EAAE,2BAA2B,CAAC,aAAa,CAAC;QACjF,WAAW,EAAE,OAAO,CAAC,eA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,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,OAAgD;IAEhD,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,YAAY;QAC7B,GAAG,EAAE,OAAO,CAAC,WAAW;QACxB,MAAM,EAAE,OAAO,CAAC,cAAc;QAC9B,IAAI,EAAE,OAAO,CAAC,YAAY;QAC1B,MAAM,EAAE,OAAO,CAAC,cAAc;KAC/B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,OAAgD;IAEhD,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,YAAY;QAC7B,GAAG,EAAE,OAAO,CAAC,WAAW;QACxB,MAAM,EAAE,OAAO,CAAC,cAAc;QAC9B,IAAI,EAAE,OAAO,CAAC,YAAY;QAC1B,MAAM,EAAE,OAAO,CAAC,cAAc;KAC/B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,OAAgD;IAEhD,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,UAAU;QAC3B,GAAG,EAAE,OAAO,CAAC,SAAS;QACtB,MAAM,EAAE,OAAO,CAAC,YAAY;QAC5B,IAAI,EAAE,OAAO,CAAC,UAAU;QACxB,MAAM,EAAE,OAAO,CAAC,YAAY;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IRTSeeStoryArtifact } from "@rtsee/common";
|
|
2
|
+
import { IStoryArtifactRemoteActions } from "../remote-actions/StoryElementsRemoteActions";
|
|
3
|
+
import { IRTSeeStoryCrudEntityOptions } from "./RTSeeStoryCrudEntity";
|
|
4
|
+
import { RTSeeStoryElementEntity } from "./RTSeeStoryElementEntity";
|
|
5
|
+
export type IRTSeeStoryArtifactOptions = IRTSeeStoryCrudEntityOptions<IRTSeeStoryArtifact>;
|
|
6
|
+
/** Meaningful / memorable object of a story; can belong to multiple stories */
|
|
7
|
+
export declare class RTSeeStoryArtifact extends RTSeeStoryElementEntity<IRTSeeStoryArtifact> implements IRTSeeStoryArtifact {
|
|
8
|
+
constructor(options: IRTSeeStoryArtifactOptions);
|
|
9
|
+
protected getCrudActions(): IStoryArtifactRemoteActions;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=RTSeeStoryArtifact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeeStoryArtifact.d.ts","sourceRoot":"","sources":["../../../../../src/models/story-elements/RTSeeStoryArtifact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAEL,2BAA2B,EAC5B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,MAAM,0BAA0B,GACpC,4BAA4B,CAAC,mBAAmB,CAAC,CAAC;AAEpD,+EAA+E;AAC/E,qBAAa,kBACX,SAAQ,uBAAuB,CAAC,mBAAmB,CACnD,YAAW,mBAAmB;gBAElB,OAAO,EAAE,0BAA0B;IAI/C,SAAS,CAAC,cAAc,IAAI,2BAA2B;CAGxD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getStoryArtifactRemoteActions, } from "../remote-actions/StoryElementsRemoteActions";
|
|
2
|
+
import { RTSeeStoryElementEntity } from "./RTSeeStoryElementEntity";
|
|
3
|
+
/** Meaningful / memorable object of a story; can belong to multiple stories */
|
|
4
|
+
export class RTSeeStoryArtifact extends RTSeeStoryElementEntity {
|
|
5
|
+
constructor(options) {
|
|
6
|
+
super(options);
|
|
7
|
+
}
|
|
8
|
+
getCrudActions() {
|
|
9
|
+
return getStoryArtifactRemoteActions(this.ensureActions());
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=RTSeeStoryArtifact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeeStoryArtifact.js","sourceRoot":"","sources":["../../../../../src/models/story-elements/RTSeeStoryArtifact.ts"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,GAE9B,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAKpE,+EAA+E;AAC/E,MAAM,OAAO,kBACX,SAAQ,uBAA4C;IAGpD,YAAY,OAAmC;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAES,cAAc;QACtB,OAAO,6BAA6B,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IRTSeeStoryAuthor } from "@rtsee/common";
|
|
2
|
+
import { IStoryAuthorRemoteActions } from "../remote-actions/StoryElementsRemoteActions";
|
|
3
|
+
import { IRTSeeStoryCrudEntityOptions, RTSeeStoryCrudEntity } from "./RTSeeStoryCrudEntity";
|
|
4
|
+
export type IRTSeeStoryAuthorOptions = IRTSeeStoryCrudEntityOptions<IRTSeeStoryAuthor>;
|
|
5
|
+
/** Literary author of a story (not the platform user who owns the story) */
|
|
6
|
+
export declare class RTSeeStoryAuthor extends RTSeeStoryCrudEntity<IRTSeeStoryAuthor> implements IRTSeeStoryAuthor {
|
|
7
|
+
description: string;
|
|
8
|
+
constructor(options: IRTSeeStoryAuthorOptions);
|
|
9
|
+
applyData(data: IRTSeeStoryAuthor): void;
|
|
10
|
+
toJson(): IRTSeeStoryAuthor;
|
|
11
|
+
protected getCrudActions(): IStoryAuthorRemoteActions;
|
|
12
|
+
static getBlankData(applicationId: string): IRTSeeStoryAuthor;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=RTSeeStoryAuthor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeeStoryAuthor.d.ts","sourceRoot":"","sources":["../../../../../src/models/story-elements/RTSeeStoryAuthor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAEL,yBAAyB,EAC1B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,wBAAwB,GAClC,4BAA4B,CAAC,iBAAiB,CAAC,CAAC;AAElD,4EAA4E;AAC5E,qBAAa,gBACX,SAAQ,oBAAoB,CAAC,iBAAiB,CAC9C,YAAW,iBAAiB;IAE5B,WAAW,EAAE,MAAM,CAAC;gBAER,OAAO,EAAE,wBAAwB;IAO7C,SAAS,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI;IAYxC,MAAM,IAAI,iBAAiB;IAQ3B,SAAS,CAAC,cAAc,IAAI,yBAAyB;IAIrD,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,iBAAiB;CAY9D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { getStoryAuthorRemoteActions, } from "../remote-actions/StoryElementsRemoteActions";
|
|
2
|
+
import { RTSeeStoryCrudEntity, } from "./RTSeeStoryCrudEntity";
|
|
3
|
+
/** Literary author of a story (not the platform user who owns the story) */
|
|
4
|
+
export class RTSeeStoryAuthor extends RTSeeStoryCrudEntity {
|
|
5
|
+
description;
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
this.description = "";
|
|
9
|
+
this.applyData(options.data);
|
|
10
|
+
}
|
|
11
|
+
applyData(data) {
|
|
12
|
+
this.init(data);
|
|
13
|
+
this.id = data.id || this.id || "";
|
|
14
|
+
this.name = data.name || "";
|
|
15
|
+
this.imageUrl = data.imageUrl || null;
|
|
16
|
+
this.configurationId = data.configurationId || this.configurationId || "";
|
|
17
|
+
this.description = data.description || "";
|
|
18
|
+
this.tagIds = data.tagIds || [];
|
|
19
|
+
this.tags = data.tags || [];
|
|
20
|
+
}
|
|
21
|
+
toJson() {
|
|
22
|
+
return {
|
|
23
|
+
...super.toJson(),
|
|
24
|
+
imageUrl: this.imageUrl || "",
|
|
25
|
+
description: this.description,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
getCrudActions() {
|
|
29
|
+
return getStoryAuthorRemoteActions(this.ensureActions());
|
|
30
|
+
}
|
|
31
|
+
static getBlankData(applicationId) {
|
|
32
|
+
return {
|
|
33
|
+
id: "",
|
|
34
|
+
applicationId,
|
|
35
|
+
configurationId: "",
|
|
36
|
+
name: "",
|
|
37
|
+
imageUrl: "",
|
|
38
|
+
description: "",
|
|
39
|
+
tagIds: [],
|
|
40
|
+
tags: [],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=RTSeeStoryAuthor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeeStoryAuthor.js","sourceRoot":"","sources":["../../../../../src/models/story-elements/RTSeeStoryAuthor.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,GAE5B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAEL,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAKhC,4EAA4E;AAC5E,MAAM,OAAO,gBACX,SAAQ,oBAAuC;IAG/C,WAAW,CAAS;IAEpB,YAAY,OAAiC;QAC3C,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,CAAC,IAAuB;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC;QACtC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,IAAI,EAAE,CAAC;QAC1E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED,MAAM;QACJ,OAAO;YACL,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,EAAE;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;IAES,cAAc;QACtB,OAAO,2BAA2B,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,aAAqB;QACvC,OAAO;YACL,EAAE,EAAE,EAAE;YACN,aAAa;YACb,eAAe,EAAE,EAAE;YACnB,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,EAAE;SACT,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IRTSeeStoryCharacter } from "@rtsee/common";
|
|
2
|
+
import { IStoryCharacterRemoteActions } from "../remote-actions/StoryElementsRemoteActions";
|
|
3
|
+
import { IRTSeeStoryCrudEntityOptions } from "./RTSeeStoryCrudEntity";
|
|
4
|
+
import { RTSeeStoryElementEntity } from "./RTSeeStoryElementEntity";
|
|
5
|
+
export type IRTSeeStoryCharacterOptions = IRTSeeStoryCrudEntityOptions<IRTSeeStoryCharacter>;
|
|
6
|
+
/** Hero / villain / helper of a story; can belong to multiple stories */
|
|
7
|
+
export declare class RTSeeStoryCharacter extends RTSeeStoryElementEntity<IRTSeeStoryCharacter> implements IRTSeeStoryCharacter {
|
|
8
|
+
constructor(options: IRTSeeStoryCharacterOptions);
|
|
9
|
+
protected getCrudActions(): IStoryCharacterRemoteActions;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=RTSeeStoryCharacter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RTSeeStoryCharacter.d.ts","sourceRoot":"","sources":["../../../../../src/models/story-elements/RTSeeStoryCharacter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAEL,4BAA4B,EAC7B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,MAAM,2BAA2B,GACrC,4BAA4B,CAAC,oBAAoB,CAAC,CAAC;AAErD,yEAAyE;AACzE,qBAAa,mBACX,SAAQ,uBAAuB,CAAC,oBAAoB,CACpD,YAAW,oBAAoB;gBAEnB,OAAO,EAAE,2BAA2B;IAIhD,SAAS,CAAC,cAAc,IAAI,4BAA4B;CAGzD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getStoryCharacterRemoteActions, } from "../remote-actions/StoryElementsRemoteActions";
|
|
2
|
+
import { RTSeeStoryElementEntity } from "./RTSeeStoryElementEntity";
|
|
3
|
+
/** Hero / villain / helper of a story; can belong to multiple stories */
|
|
4
|
+
export class RTSeeStoryCharacter extends RTSeeStoryElementEntity {
|
|
5
|
+
constructor(options) {
|
|
6
|
+
super(options);
|
|
7
|
+
}
|
|
8
|
+
getCrudActions() {
|
|
9
|
+
return getStoryCharacterRemoteActions(this.ensureActions());
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=RTSeeStoryCharacter.js.map
|