@fluid-topics/ft-reader-feedback 1.1.11 → 1.1.13
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/build/ft-reader-feedback.css.js +0 -21
- package/build/ft-reader-feedback.d.ts +1 -3
- package/build/ft-reader-feedback.js +16 -41
- package/build/ft-reader-feedback.light.js +261 -302
- package/build/ft-reader-feedback.min.js +449 -490
- package/build/ft-reader-map-feedback.d.ts +1 -2
- package/build/ft-reader-map-feedback.js +5 -16
- package/build/ft-reader-topic-feedback.d.ts +1 -2
- package/build/ft-reader-topic-feedback.js +6 -17
- package/build/utils/InDesignerFeedbackComponentMessages.d.ts +0 -4
- package/build/utils/InDesignerFeedbackComponentMessages.js +0 -4
- package/package.json +5 -5
|
@@ -6,7 +6,7 @@ import { FeedbackI18nProperties, FtReaderFeedback } from "./ft-reader-feedback";
|
|
|
6
6
|
import { FtMap, FtPublicationRatingSummary, FtReaderFeedbackConfiguration, FtSession } from "@fluid-topics/public-api";
|
|
7
7
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
8
8
|
import { FeedbackMailLinkBuilder } from "./utils/mail";
|
|
9
|
-
declare const FtReaderMapFeedback_base: typeof FtReaderComponent & (
|
|
9
|
+
declare const FtReaderMapFeedback_base: typeof FtReaderComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
|
|
10
10
|
export declare class FtReaderMapFeedback extends FtReaderMapFeedback_base implements FtReaderFeedbackProperties {
|
|
11
11
|
static elementDefinitions: ElementDefinitionsMap;
|
|
12
12
|
session?: FtSession;
|
|
@@ -28,7 +28,6 @@ export declare class FtReaderMapFeedback extends FtReaderMapFeedback_base implem
|
|
|
28
28
|
i18nProperties: FeedbackI18nProperties;
|
|
29
29
|
constructor();
|
|
30
30
|
protected render(): import("lit").TemplateResult<1>;
|
|
31
|
-
private get componentVisible();
|
|
32
31
|
protected update(props: PropertyValues): void;
|
|
33
32
|
connectedCallback(): void;
|
|
34
33
|
onStoreAvailable(name?: string): void;
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html } from "lit";
|
|
8
8
|
import { property, query, state } from "lit/decorators.js";
|
|
9
9
|
import { Debouncer, FtNotificationEvent, redux } from "@fluid-topics/ft-wc-utils";
|
|
10
|
-
import { FtReaderComponent
|
|
10
|
+
import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
|
|
11
11
|
import { FtReaderFeedback } from "./ft-reader-feedback";
|
|
12
12
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
13
13
|
import { FeedbackMailLinkBuilder } from "./utils/mail";
|
|
@@ -15,7 +15,7 @@ import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
|
|
|
15
15
|
import { server } from "./utils/ServerMessages";
|
|
16
16
|
import { feedback } from "./utils/IntegratedFeedbackComponentMessages";
|
|
17
17
|
import { i18n, withI18n } from "@fluid-topics/ft-i18n";
|
|
18
|
-
import { designer } from "./utils/InDesignerFeedbackComponentMessages";
|
|
18
|
+
import { defaultDesignerMessages, designer } from "./utils/InDesignerFeedbackComponentMessages";
|
|
19
19
|
class FtReaderMapFeedback extends withI18n(FtReaderComponent) {
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
@@ -40,15 +40,6 @@ class FtReaderMapFeedback extends withI18n(FtReaderComponent) {
|
|
|
40
40
|
this.addStore(ftAppInfoStore);
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
if (!this.map || !this.editorMode && !this.componentVisible) {
|
|
44
|
-
return html `
|
|
45
|
-
<style>
|
|
46
|
-
:host {
|
|
47
|
-
display: none !important;
|
|
48
|
-
}
|
|
49
|
-
</style>
|
|
50
|
-
`;
|
|
51
|
-
}
|
|
52
43
|
return html `
|
|
53
44
|
<ft-reader-feedback
|
|
54
45
|
ratingAllowed
|
|
@@ -71,17 +62,15 @@ class FtReaderMapFeedback extends withI18n(FtReaderComponent) {
|
|
|
71
62
|
></ft-reader-feedback>
|
|
72
63
|
`;
|
|
73
64
|
}
|
|
74
|
-
get componentVisible() {
|
|
75
|
-
var _a, _b, _c;
|
|
76
|
-
return ((_a = this.service) === null || _a === void 0 ? void 0 : _a.isFeatureAccessible(FtReaderFeatures.FEEDBACK, { session: this.session }))
|
|
77
|
-
|| ((_b = this.service) === null || _b === void 0 ? void 0 : _b.isFeatureAccessible(FtReaderFeatures.RATING, { session: this.session, ratingType: (_c = this.ratingSummary) === null || _c === void 0 ? void 0 : _c.type }));
|
|
78
|
-
}
|
|
79
65
|
update(props) {
|
|
80
66
|
var _a, _b, _c, _d;
|
|
81
67
|
super.update(props);
|
|
82
68
|
if (props.has("map") && this.map) {
|
|
83
69
|
this.updateData();
|
|
84
70
|
}
|
|
71
|
+
if (props.has("editorMode") && this.editorMode) {
|
|
72
|
+
this.addI18nContext(designer, defaultDesignerMessages);
|
|
73
|
+
}
|
|
85
74
|
if (["map", "configuration", "user", "mailSubject"].some(p => props.has(p)) && this.map && this.configuration) {
|
|
86
75
|
this.feedbackLinkBuilder.update(this.mailSubject, (_b = (_a = this.service) === null || _a === void 0 ? void 0 : _a.getLink()) !== null && _b !== void 0 ? _b : "", this.map.metadata, this.configuration, ((_d = (_c = this.session) === null || _c === void 0 ? void 0 : _c.profile) === null || _d === void 0 ? void 0 : _d.userId) != null);
|
|
87
76
|
}
|
|
@@ -8,7 +8,7 @@ import { FtReaderFeedbackConfiguration } from "@fluid-topics/public-api";
|
|
|
8
8
|
import { FtTopicRatingSummary } from "@fluid-topics/ft-reader-context/build/store/model";
|
|
9
9
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
10
10
|
import { FeedbackMailLinkBuilder } from "./utils/mail";
|
|
11
|
-
declare const FtReaderTopicFeedback_base: typeof FtReaderTopicComponent & (
|
|
11
|
+
declare const FtReaderTopicFeedback_base: typeof FtReaderTopicComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
|
|
12
12
|
export declare class FtReaderTopicFeedback extends FtReaderTopicFeedback_base implements FtReaderFeedbackProperties {
|
|
13
13
|
static elementDefinitions: ElementDefinitionsMap;
|
|
14
14
|
session?: FtSession;
|
|
@@ -30,7 +30,6 @@ export declare class FtReaderTopicFeedback extends FtReaderTopicFeedback_base im
|
|
|
30
30
|
i18nProperties: FeedbackI18nProperties;
|
|
31
31
|
constructor();
|
|
32
32
|
protected render(): import("lit").TemplateResult<1>;
|
|
33
|
-
private get componentVisible();
|
|
34
33
|
protected update(props: PropertyValues): void;
|
|
35
34
|
connectedCallback(): void;
|
|
36
35
|
private updateDebouncer;
|
|
@@ -7,7 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html } from "lit";
|
|
8
8
|
import { property, query, state } from "lit/decorators.js";
|
|
9
9
|
import { Debouncer, FtNotificationEvent, redux } from "@fluid-topics/ft-wc-utils";
|
|
10
|
-
import { FtReaderFeatures } from "@fluid-topics/ft-reader-context/build/registration";
|
|
11
10
|
import { FtReaderFeedback } from "./ft-reader-feedback";
|
|
12
11
|
import { FtReaderTopicComponent } from "@fluid-topics/ft-reader-topic-context/build/registration";
|
|
13
12
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
@@ -16,7 +15,7 @@ import { ftAppInfoStore } from "@fluid-topics/ft-app-context";
|
|
|
16
15
|
import { feedback } from "./utils/IntegratedFeedbackComponentMessages";
|
|
17
16
|
import { server } from "./utils/ServerMessages";
|
|
18
17
|
import { i18n, withI18n } from "@fluid-topics/ft-i18n";
|
|
19
|
-
import { designer } from "./utils/InDesignerFeedbackComponentMessages";
|
|
18
|
+
import { defaultDesignerMessages, designer } from "./utils/InDesignerFeedbackComponentMessages";
|
|
20
19
|
class FtReaderTopicFeedback extends withI18n(FtReaderTopicComponent) {
|
|
21
20
|
constructor() {
|
|
22
21
|
super();
|
|
@@ -41,19 +40,11 @@ class FtReaderTopicFeedback extends withI18n(FtReaderTopicComponent) {
|
|
|
41
40
|
this.addStore(ftAppInfoStore);
|
|
42
41
|
}
|
|
43
42
|
render() {
|
|
44
|
-
|
|
45
|
-
return html `
|
|
46
|
-
<style>
|
|
47
|
-
:host {
|
|
48
|
-
display: none !important;
|
|
49
|
-
}
|
|
50
|
-
</style>
|
|
51
|
-
`;
|
|
52
|
-
}
|
|
43
|
+
var _a;
|
|
53
44
|
return html `
|
|
54
45
|
<ft-reader-feedback
|
|
55
46
|
.i18nProperties=${this.i18nProperties}
|
|
56
|
-
?ratingAllowed=${this.tocNode.hasRating}
|
|
47
|
+
?ratingAllowed=${(_a = this.tocNode) === null || _a === void 0 ? void 0 : _a.hasRating}
|
|
57
48
|
.editorMode=${this.editorMode}
|
|
58
49
|
?hideTitle=${this.hideTitle}
|
|
59
50
|
.ratingSummary=${this.ratingSummary}
|
|
@@ -72,17 +63,15 @@ class FtReaderTopicFeedback extends withI18n(FtReaderTopicComponent) {
|
|
|
72
63
|
></ft-reader-feedback>
|
|
73
64
|
`;
|
|
74
65
|
}
|
|
75
|
-
get componentVisible() {
|
|
76
|
-
var _a, _b, _c;
|
|
77
|
-
return ((_a = this.service) === null || _a === void 0 ? void 0 : _a.isFeatureAccessible(FtReaderFeatures.FEEDBACK, { session: this.session }))
|
|
78
|
-
|| ((_b = this.service) === null || _b === void 0 ? void 0 : _b.isFeatureAccessible(FtReaderFeatures.RATING, { session: this.session, ratingType: (_c = this.ratingSummary) === null || _c === void 0 ? void 0 : _c.type }));
|
|
79
|
-
}
|
|
80
66
|
update(props) {
|
|
81
67
|
var _a, _b, _c, _d;
|
|
82
68
|
super.update(props);
|
|
83
69
|
if (["tocNode", "user"].some(p => props.has(p)) && this.tocNode) {
|
|
84
70
|
this.updateData();
|
|
85
71
|
}
|
|
72
|
+
if (props.has("editorMode") && this.editorMode) {
|
|
73
|
+
this.addI18nContext(designer, defaultDesignerMessages);
|
|
74
|
+
}
|
|
86
75
|
if (["map", "tocNode", "configuration", "user", "mailSubject"].some(p => props.has(p)) && this.map && this.tocNode && this.configuration) {
|
|
87
76
|
this.feedbackLinkBuilder.update(this.mailSubject, (_b = (_a = this.service) === null || _a === void 0 ? void 0 : _a.getLink(this.tocNode.tocId)) !== null && _b !== void 0 ? _b : "", this.map.metadata, this.configuration, ((_d = (_c = this.session) === null || _c === void 0 ? void 0 : _c.profile) === null || _d === void 0 ? void 0 : _d.userId) != null);
|
|
88
77
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { DefaultI18nMessages, I18nMessageContext, I18nMessages } from "@fluid-topics/ft-i18n";
|
|
2
2
|
export interface InDesignerFeedbackComponentMessages extends I18nMessages {
|
|
3
|
-
ratingNotConfigured(): string;
|
|
4
|
-
missingRatingRole(): string;
|
|
5
|
-
missingFeedbackRole(): string;
|
|
6
|
-
inDesignerOnlyNotice(): string;
|
|
7
3
|
feedbackAndRatingDisabledInEditor(): string;
|
|
8
4
|
}
|
|
9
5
|
export declare const designer: I18nMessageContext<InDesignerFeedbackComponentMessages>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { I18nMessageContext } from "@fluid-topics/ft-i18n";
|
|
2
2
|
export const designer = I18nMessageContext.build("inDesignerFeedbackComponent");
|
|
3
3
|
export const defaultDesignerMessages = {
|
|
4
|
-
ratingNotConfigured: "Rating unavailable: no rating configured for this content.",
|
|
5
|
-
missingRatingRole: "Rating unavailable: missing role RATING_USER.",
|
|
6
|
-
missingFeedbackRole: "Feedback unavailable: missing role FEEDBACK_USER.",
|
|
7
|
-
inDesignerOnlyNotice: "This notice will not appear outside this designer.",
|
|
8
4
|
feedbackAndRatingDisabledInEditor: "Feedback and ratings performed here are not taken into account."
|
|
9
5
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-feedback",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "Feedback forms for a map and its topics in an integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "1.1.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "1.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-app-context": "1.1.13",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "1.1.13",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.1.13",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluid-topics/public-api": "1.0.52"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "6678af642af51eb1590bccbeeb0de8cbc5938ab1"
|
|
31
31
|
}
|