@fluid-topics/ft-reader-feedback 0.3.56 → 0.3.58
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.
|
@@ -73,10 +73,10 @@ export class FtReaderMapFeedback extends FtReaderComponent {
|
|
|
73
73
|
}
|
|
74
74
|
updateData() {
|
|
75
75
|
this.updateDebouncer.run(async () => {
|
|
76
|
-
var _a, _b;
|
|
76
|
+
var _a, _b, _c;
|
|
77
77
|
this.user = await ((_a = this.service) === null || _a === void 0 ? void 0 : _a.getSession().then(s => s.profile));
|
|
78
|
-
if (this.map) {
|
|
79
|
-
this.ratingSummary = await ((
|
|
78
|
+
if (this.map && (((_b = this.user) === null || _b === void 0 ? void 0 : _b.userId) || this.ratingSummary == null)) {
|
|
79
|
+
this.ratingSummary = await ((_c = this.service) === null || _c === void 0 ? void 0 : _c.getMapRating());
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -67,10 +67,10 @@ export class FtReaderTopicFeedback extends FtReaderTopicComponent {
|
|
|
67
67
|
this.updateData();
|
|
68
68
|
}
|
|
69
69
|
async updateData() {
|
|
70
|
-
var _a, _b;
|
|
70
|
+
var _a, _b, _c;
|
|
71
71
|
this.user = await ((_a = this.service) === null || _a === void 0 ? void 0 : _a.getSession().then(s => s.profile));
|
|
72
|
-
if (this.tocNode) {
|
|
73
|
-
this.ratingSummary = await ((
|
|
72
|
+
if (this.tocNode && (((_b = this.user) === null || _b === void 0 ? void 0 : _b.userId) || this.ratingSummary == null)) {
|
|
73
|
+
this.ratingSummary = await ((_c = this.service) === null || _c === void 0 ? void 0 : _c.getTopicRating(this.tocNode.tocId));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
rate(ratingEvent) {
|
package/build/utils/labels.js
CHANGED
|
@@ -17,6 +17,7 @@ const DEFAULT_LABELS = {
|
|
|
17
17
|
feedbackFailure: "Failed to send feedback. Please try again later.",
|
|
18
18
|
ratingSuccess: "Rating successfully sent. Thank you!",
|
|
19
19
|
ratingFailure: "Failed to send rating. Please try again later.",
|
|
20
|
+
feedbackAndRatingDisabledInEditor: "Feedback and ratings performed here are not taken into account.",
|
|
20
21
|
};
|
|
21
22
|
const DEFAULT_MAP_LABELS = {
|
|
22
23
|
...DEFAULT_LABELS,
|
|
@@ -25,7 +26,6 @@ const DEFAULT_MAP_LABELS = {
|
|
|
25
26
|
dichotomousRatingSectionTitle: "Did it solve your problem?",
|
|
26
27
|
feedbackSectionTitle: "Write your review",
|
|
27
28
|
mailSubject: "Feedback about “{0}”",
|
|
28
|
-
feedbackAndRatingDisabledInEditor: "Feedback & rating disabled in the reader designer",
|
|
29
29
|
};
|
|
30
30
|
const DEFAULT_TOPIC_LABELS = {
|
|
31
31
|
...DEFAULT_LABELS,
|
|
@@ -34,7 +34,6 @@ const DEFAULT_TOPIC_LABELS = {
|
|
|
34
34
|
dichotomousRatingSectionTitle: "Did this content solve your problem?",
|
|
35
35
|
feedbackSectionTitle: "Write your review",
|
|
36
36
|
mailSubject: "Feedback about “{0}” in “{1}”",
|
|
37
|
-
feedbackAndRatingDisabledInEditor: "Feedback & rating disabled in the topic template designer",
|
|
38
37
|
};
|
|
39
38
|
export const topicLabelResolver = new ParametrizedLabelResolver(DEFAULT_TOPIC_LABELS, {});
|
|
40
39
|
export const mapLabelResolver = new ParametrizedLabelResolver(DEFAULT_MAP_LABELS, {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-feedback",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.58",
|
|
4
4
|
"description": "Feedback forms for a map and its topics in an integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "0.3.58",
|
|
23
23
|
"lit": "2.2.8"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "c053ee1216238ba6b2c62e5add329343f735c77e"
|
|
26
26
|
}
|