@fluid-topics/ft-reader-feedback 2.1.19 → 2.1.21
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-base-feedback.d.ts +55 -0
- package/build/ft-base-feedback.js +332 -0
- package/build/{ft-reader-feedback.properties.d.ts → ft-base-feedback.properties.d.ts} +1 -1
- package/build/ft-base-feedback.styles.d.ts +13 -0
- package/build/ft-base-feedback.styles.js +67 -0
- package/build/ft-reader-feedback.d.ts +2 -57
- package/build/ft-reader-feedback.js +5 -344
- package/build/ft-reader-feedback.light.js +695 -702
- package/build/ft-reader-feedback.min.js +669 -676
- package/build/ft-reader-feedback.styles.d.ts +2 -12
- package/build/ft-reader-feedback.styles.js +2 -63
- package/build/ft-reader-map-feedback.d.ts +8 -4
- package/build/ft-reader-map-feedback.js +28 -15
- package/build/ft-reader-topic-feedback.d.ts +8 -4
- package/build/ft-reader-topic-feedback.js +26 -13
- package/build/index.d.ts +6 -1
- package/build/index.js +6 -1
- package/build/utils/InDesignerFeedbackComponentMessages.js +2 -2
- package/build/utils/IntegratedFeedbackComponentMessages.d.ts +4 -0
- package/build/utils/IntegratedFeedbackComponentMessages.js +5 -1
- package/build/utils/ServerMessages.d.ts +2 -0
- package/build/utils/ServerMessages.js +1 -1
- package/build/utils/events.js +5 -5
- package/build/utils/mail.js +4 -4
- package/package.json +6 -6
- /package/build/{ft-reader-feedback.properties.js → ft-base-feedback.properties.js} +0 -0
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
ratedDateColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
4
|
-
sendFeedbackColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
5
|
-
sendFeedbackBackgroundColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
6
|
-
filledRatingColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
7
|
-
emptyRatingColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
8
|
-
mainTitleFontSize: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
9
|
-
sectionTitleFontSize: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
10
|
-
starsBackgroundColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
11
|
-
};
|
|
12
|
-
export declare const styles: import("lit").CSSResult;
|
|
1
|
+
import { FtBaseFeedbackCssVariables } from "./ft-base-feedback.styles";
|
|
2
|
+
export declare const FtReaderFeedbackCssVariables: FtBaseFeedbackCssVariables;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { FtButtonCssVariables } from "@fluid-topics/ft-button/build/ft-button.styles";
|
|
4
|
-
import { FtSwitchCssVariables } from "@fluid-topics/ft-switch/build/ft-switch.styles";
|
|
5
|
-
import { FtTypographyTitleCssVariables, FtTypographyTitleDenseCssVariables } from "@fluid-topics/ft-typography/build/ft-typography.styles";
|
|
1
|
+
import { designSystemVariables, FtCssVariableFactory, } from "@fluid-topics/ft-wc-utils";
|
|
2
|
+
import { FtTypographyTitleCssVariables, FtTypographyTitleDenseCssVariables, } from "@fluid-topics/ft-typography/build/ft-typography.styles";
|
|
6
3
|
export const FtReaderFeedbackCssVariables = {
|
|
7
4
|
feedbackInputMinWidth: FtCssVariableFactory.create("--ft-reader-feedback-input-min-width", "", "SIZE", "300px"),
|
|
8
5
|
ratedDateColor: FtCssVariableFactory.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
|
|
@@ -14,61 +11,3 @@ export const FtReaderFeedbackCssVariables = {
|
|
|
14
11
|
sectionTitleFontSize: FtCssVariableFactory.external(FtTypographyTitleDenseCssVariables.fontSize, "Typography"),
|
|
15
12
|
starsBackgroundColor: FtCssVariableFactory.create("--ft-reader-feedback-stars-background-color", "", "COLOR", designSystemVariables.colorSurface),
|
|
16
13
|
};
|
|
17
|
-
// language=CSS
|
|
18
|
-
export const styles = css `
|
|
19
|
-
.ft-reader-feedback {
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
gap: 16px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.ft-reader-feedback--stars {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: row;
|
|
29
|
-
align-items: center;
|
|
30
|
-
margin-left: -6px;
|
|
31
|
-
${setVariable(FtButtonCssVariables.backgroundColor, FtReaderFeedbackCssVariables.starsBackgroundColor)}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.ft-reader-feedback--rating, .ft-reader-feedback--feedback {
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ft-reader-feedback--rating .ft-reader-feedback--section-title {
|
|
40
|
-
margin-bottom: 8px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ft-reader-feedback--rating {
|
|
44
|
-
${setVariable(FtButtonCssVariables.color, FtReaderFeedbackCssVariables.emptyRatingColor)};
|
|
45
|
-
${setVariable(FtButtonCssVariables.rippleColor, FtReaderFeedbackCssVariables.filledRatingColor)};
|
|
46
|
-
${setVariable(FtSwitchCssVariables.textColor, FtReaderFeedbackCssVariables.emptyRatingColor)};
|
|
47
|
-
${setVariable(FtSwitchCssVariables.selectedTextColor, FtReaderFeedbackCssVariables.filledRatingColor)};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.ft-reader-feedback--rating .ft-reader-feedback--active {
|
|
51
|
-
${setVariable(FtButtonCssVariables.color, FtReaderFeedbackCssVariables.filledRatingColor)};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.ft-reader-feedback--feedback {
|
|
55
|
-
gap: 8px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.ft-reader-feedback--rating-date {
|
|
59
|
-
color: ${FtReaderFeedbackCssVariables.ratedDateColor};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.ft-reader-feedback--feedback ft-text-area {
|
|
63
|
-
min-width: ${FtReaderFeedbackCssVariables.feedbackInputMinWidth};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.ft-reader-feedback--send-feedback, .ft-reader-feedback--feedback-link {
|
|
67
|
-
${setVariable(FtButtonCssVariables.color, FtReaderFeedbackCssVariables.sendFeedbackColor)};
|
|
68
|
-
${setVariable(FtButtonCssVariables.backgroundColor, FtReaderFeedbackCssVariables.sendFeedbackBackgroundColor)};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
[part="buttons-container"] {
|
|
72
|
-
align-self: flex-end;
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
2
|
import { Debouncer, ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
3
|
-
import {
|
|
3
|
+
import { FtFeedbackProperties } from "./ft-base-feedback.properties";
|
|
4
4
|
import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
|
|
5
|
-
import {
|
|
6
|
-
import { FtMap, FtPublicationRatingSummary, FtReaderFeedbackConfiguration, FtSession } from "@fluid-topics/public-api";
|
|
5
|
+
import { FtReaderFeedback } from "./ft-reader-feedback";
|
|
6
|
+
import { FtMap, FtPublicationRatingSummary, FtRatingType, FtReaderFeedbackConfiguration, FtSession } from "@fluid-topics/public-api";
|
|
7
7
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
8
8
|
import { FeedbackMailLinkBuilder } from "./utils/mail";
|
|
9
9
|
import { GuestLocalStorage } from "@fluid-topics/ft-app-context";
|
|
10
10
|
import { SendFeedbackEvent } from "./utils/events";
|
|
11
|
+
import { FeedbackI18nProperties } from "./ft-base-feedback";
|
|
11
12
|
declare const FtReaderMapFeedback_base: typeof FtReaderComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
|
|
12
|
-
export declare class FtReaderMapFeedback extends FtReaderMapFeedback_base implements
|
|
13
|
+
export declare class FtReaderMapFeedback extends FtReaderMapFeedback_base implements FtFeedbackProperties {
|
|
13
14
|
private readonly guestStorage;
|
|
14
15
|
static elementDefinitions: ElementDefinitionsMap;
|
|
15
16
|
private static storedRatingIfAuthenticated;
|
|
@@ -31,6 +32,9 @@ export declare class FtReaderMapFeedback extends FtReaderMapFeedback_base implem
|
|
|
31
32
|
feedbackLinkBuilder: FeedbackMailLinkBuilder;
|
|
32
33
|
mailSubject: string;
|
|
33
34
|
i18nProperties: FeedbackI18nProperties;
|
|
35
|
+
get canAccessFeedback(): boolean | undefined;
|
|
36
|
+
get canRateThisContent(): boolean | undefined;
|
|
37
|
+
get configuredRatingType(): FtRatingType.NO_RATING | "STARS" | "LIKE" | "DICHOTOMOUS" | "NO_RATING";
|
|
34
38
|
constructor(guestStorage?: GuestLocalStorage<FtPublicationRatingSummary>);
|
|
35
39
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
36
40
|
protected willUpdate(props: PropertyValues): void;
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, } from "lit";
|
|
8
8
|
import { property, query, } from "lit/decorators.js";
|
|
9
9
|
import { Debouncer, FtNotificationEvent, redux, reduxEventListener, } from "@fluid-topics/ft-wc-utils";
|
|
10
|
-
import { FtReaderComponent, } from "@fluid-topics/ft-reader-context/build/registration";
|
|
11
|
-
import { FtReaderFeedback
|
|
10
|
+
import { FtReaderComponent, FtReaderFeatures, } from "@fluid-topics/ft-reader-context/build/registration";
|
|
11
|
+
import { FtReaderFeedback } from "./ft-reader-feedback";
|
|
12
12
|
import { FtRatingType, } from "@fluid-topics/public-api";
|
|
13
13
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
14
14
|
import { FeedbackMailLinkBuilder } from "./utils/mail";
|
|
@@ -19,6 +19,19 @@ import { i18n, withI18n, } from "@fluid-topics/ft-i18n";
|
|
|
19
19
|
import { defaultDesignerMessages, designer, } from "./utils/InDesignerFeedbackComponentMessages";
|
|
20
20
|
import { OpenMapFeedbackDrawerEvent, SendMailerMapFeedbackEvent, } from "./utils/events";
|
|
21
21
|
export class FtReaderMapFeedback extends withI18n(FtReaderComponent) {
|
|
22
|
+
get canAccessFeedback() {
|
|
23
|
+
var _a;
|
|
24
|
+
return (_a = this.service) === null || _a === void 0 ? void 0 : _a.isFeatureAccessible(FtReaderFeatures.FEEDBACK, { session: this.session });
|
|
25
|
+
}
|
|
26
|
+
get canRateThisContent() {
|
|
27
|
+
var _a;
|
|
28
|
+
const canAccessRating = (_a = this.service) === null || _a === void 0 ? void 0 : _a.isFeatureAccessible(FtReaderFeatures.RATING, { session: this.session });
|
|
29
|
+
return canAccessRating && this.configuredRatingType != FtRatingType.NO_RATING;
|
|
30
|
+
}
|
|
31
|
+
get configuredRatingType() {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return (_b = (_a = this.ratingSummary) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : FtRatingType.NO_RATING;
|
|
34
|
+
}
|
|
22
35
|
constructor(guestStorage = new GuestLocalStorage()) {
|
|
23
36
|
super();
|
|
24
37
|
this.guestStorage = guestStorage;
|
|
@@ -55,20 +68,20 @@ export class FtReaderMapFeedback extends withI18n(FtReaderComponent) {
|
|
|
55
68
|
render() {
|
|
56
69
|
return html `
|
|
57
70
|
<ft-reader-feedback
|
|
58
|
-
ratingAllowed
|
|
59
|
-
.i18nProperties=${this.i18nProperties}
|
|
60
|
-
.editorMode=${this.editorMode}
|
|
61
71
|
?hideTitle=${this.hideTitle}
|
|
62
72
|
?withMoreOptionsButton=${this.withMoreOptionsButton}
|
|
73
|
+
iconVariant="${this.iconVariant}"
|
|
74
|
+
emptyStarIcon="${this.emptyStarIcon}"
|
|
75
|
+
filledStarIcon="${this.filledStarIcon}"
|
|
76
|
+
emptyLikeIcon="${this.emptyLikeIcon}"
|
|
77
|
+
filledLikeIcon="${this.filledLikeIcon}"
|
|
78
|
+
emptyDislikeIcon="${this.emptyDislikeIcon}"
|
|
79
|
+
filledDislikeIcon="${this.filledDislikeIcon}"
|
|
80
|
+
?canAccessFeedback=${this.canAccessFeedback}
|
|
81
|
+
?canRateThisContent=${this.canRateThisContent}
|
|
82
|
+
.i18nProperties=${this.i18nProperties}
|
|
63
83
|
.ratingSummary=${this.ratingSummary}
|
|
64
|
-
.
|
|
65
|
-
.iconVariant=${this.iconVariant}
|
|
66
|
-
.emptyStarIcon=${this.emptyStarIcon}
|
|
67
|
-
.filledStarIcon=${this.filledStarIcon}
|
|
68
|
-
.emptyLikeIcon=${this.emptyLikeIcon}
|
|
69
|
-
.filledLikeIcon=${this.filledLikeIcon}
|
|
70
|
-
.emptyDislikeIcon=${this.emptyDislikeIcon}
|
|
71
|
-
.filledDislikeIcon=${this.filledDislikeIcon}
|
|
84
|
+
.configuration=${this.configuration}
|
|
72
85
|
.feedbackMailLinkBuilder=${(feedbackMessage) => this.feedbackLinkBuilder.build(feedbackMessage)}
|
|
73
86
|
@rate=${this.rate}
|
|
74
87
|
@send-feedback=${this.sendFeedback}
|
|
@@ -86,7 +99,7 @@ export class FtReaderMapFeedback extends withI18n(FtReaderComponent) {
|
|
|
86
99
|
if (props.has("editorMode") && this.editorMode) {
|
|
87
100
|
this.addI18nContext(designer, defaultDesignerMessages);
|
|
88
101
|
}
|
|
89
|
-
if (["map", "configuration", "
|
|
102
|
+
if (["map", "configuration", "session", "mailSubject"].some((p) => props.has(p)) && this.map && this.configuration) {
|
|
90
103
|
this.feedbackLinkBuilder.update(this.mailSubject, (_c = (_b = this.service) === null || _b === void 0 ? void 0 : _b.getLink()) !== null && _c !== void 0 ? _c : "", this.map.metadata, this.configuration, ((_e = (_d = this.session) === null || _d === void 0 ? void 0 : _d.profile) === null || _e === void 0 ? void 0 : _e.userId) != null);
|
|
91
104
|
}
|
|
92
105
|
if (["session", "map"].some((p) => props.has(p)) && this.session && this.map) {
|
|
@@ -247,7 +260,7 @@ __decorate([
|
|
|
247
260
|
query("ft-reader-feedback")
|
|
248
261
|
], FtReaderMapFeedback.prototype, "readerFeedback", void 0);
|
|
249
262
|
__decorate([
|
|
250
|
-
i18n(server.properties["mail.map_feedback.subject"]((self) => { var _a; return [(_a = self.map) === null || _a === void 0 ? void 0 : _a.title]; }))
|
|
263
|
+
i18n(server.properties["mail.map_feedback.subject"]((self) => { var _a, _b; return [(_b = (_a = self.map) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : ""]; }))
|
|
251
264
|
], FtReaderMapFeedback.prototype, "mailSubject", void 0);
|
|
252
265
|
__decorate([
|
|
253
266
|
reduxEventListener({ eventName: "rating-changed" })
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { PropertyValues } from "lit";
|
|
2
2
|
import { Debouncer, ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { FtFeedbackProperties } from "./ft-base-feedback.properties";
|
|
4
|
+
import { FtReaderFeedback } from "./ft-reader-feedback";
|
|
5
5
|
import { FtReaderTopicComponent } from "@fluid-topics/ft-reader-topic-context/build/registration";
|
|
6
|
-
import { FtMap, FtReaderFeedbackConfiguration, FtSession } from "@fluid-topics/public-api";
|
|
6
|
+
import { FtMap, FtRatingType, FtReaderFeedbackConfiguration, FtSession } from "@fluid-topics/public-api";
|
|
7
7
|
import { FtTopicRatingSummary } from "@fluid-topics/ft-reader-context/build/store/model";
|
|
8
8
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
9
9
|
import { FeedbackMailLinkBuilder } from "./utils/mail";
|
|
10
10
|
import { GuestLocalStorage } from "@fluid-topics/ft-app-context";
|
|
11
11
|
import { SendFeedbackEvent } from "./utils/events";
|
|
12
|
+
import { FeedbackI18nProperties } from "./ft-base-feedback";
|
|
12
13
|
declare const FtReaderTopicFeedback_base: typeof FtReaderTopicComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
|
|
13
|
-
export declare class FtReaderTopicFeedback extends FtReaderTopicFeedback_base implements
|
|
14
|
+
export declare class FtReaderTopicFeedback extends FtReaderTopicFeedback_base implements FtFeedbackProperties {
|
|
14
15
|
private readonly guestStorage;
|
|
15
16
|
static elementDefinitions: ElementDefinitionsMap;
|
|
16
17
|
private static storedRatingIfAuthenticated;
|
|
@@ -32,6 +33,9 @@ export declare class FtReaderTopicFeedback extends FtReaderTopicFeedback_base im
|
|
|
32
33
|
feedbackLinkBuilder: FeedbackMailLinkBuilder;
|
|
33
34
|
mailSubject: string;
|
|
34
35
|
i18nProperties: FeedbackI18nProperties;
|
|
36
|
+
get canAccessFeedback(): boolean | undefined;
|
|
37
|
+
get canRateThisContent(): boolean | undefined;
|
|
38
|
+
get configuredRatingType(): FtRatingType | "STARS" | "LIKE" | "DICHOTOMOUS" | "NO_RATING";
|
|
35
39
|
constructor(guestStorage?: GuestLocalStorage<FtTopicRatingSummary>);
|
|
36
40
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
37
41
|
protected willUpdate(props: PropertyValues): void;
|
|
@@ -10,6 +10,7 @@ import { Debouncer, FtNotificationEvent, redux, reduxEventListener, } from "@flu
|
|
|
10
10
|
import { FtReaderFeedback, } from "./ft-reader-feedback";
|
|
11
11
|
import { FtReaderTopicComponent } from "@fluid-topics/ft-reader-topic-context/build/registration";
|
|
12
12
|
import { FtRatingType, } from "@fluid-topics/public-api";
|
|
13
|
+
import { FtReaderFeatures } from "@fluid-topics/ft-reader-context/build/store/model";
|
|
13
14
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
14
15
|
import { FeedbackMailLinkBuilder } from "./utils/mail";
|
|
15
16
|
import { ftAppInfoStore, GuestLocalStorage, } from "@fluid-topics/ft-app-context";
|
|
@@ -19,6 +20,19 @@ import { i18n, withI18n, } from "@fluid-topics/ft-i18n";
|
|
|
19
20
|
import { defaultDesignerMessages, designer, } from "./utils/InDesignerFeedbackComponentMessages";
|
|
20
21
|
import { OpenTopicFeedbackDrawerEvent, SendMailerTopicFeedbackEvent, } from "./utils/events";
|
|
21
22
|
export class FtReaderTopicFeedback extends withI18n(FtReaderTopicComponent) {
|
|
23
|
+
get canAccessFeedback() {
|
|
24
|
+
var _a;
|
|
25
|
+
return (_a = this.service) === null || _a === void 0 ? void 0 : _a.isFeatureAccessible(FtReaderFeatures.FEEDBACK, { session: this.session });
|
|
26
|
+
}
|
|
27
|
+
get canRateThisContent() {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
const canAccessRating = (_a = this.service) === null || _a === void 0 ? void 0 : _a.isFeatureAccessible(FtReaderFeatures.RATING, { session: this.session });
|
|
30
|
+
return canAccessRating && ((_b = this.tocNode) === null || _b === void 0 ? void 0 : _b.hasRating) && this.configuredRatingType != FtRatingType.NO_RATING;
|
|
31
|
+
}
|
|
32
|
+
get configuredRatingType() {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
return (_b = (_a = this.ratingSummary) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : FtRatingType.NO_RATING;
|
|
35
|
+
}
|
|
22
36
|
constructor(guestStorage = new GuestLocalStorage()) {
|
|
23
37
|
super();
|
|
24
38
|
this.guestStorage = guestStorage;
|
|
@@ -53,23 +67,22 @@ export class FtReaderTopicFeedback extends withI18n(FtReaderTopicComponent) {
|
|
|
53
67
|
this.addStore(ftAppInfoStore);
|
|
54
68
|
}
|
|
55
69
|
render() {
|
|
56
|
-
var _a;
|
|
57
70
|
return html `
|
|
58
71
|
<ft-reader-feedback
|
|
59
|
-
.i18nProperties=${this.i18nProperties}
|
|
60
|
-
?ratingAllowed=${(_a = this.tocNode) === null || _a === void 0 ? void 0 : _a.hasRating}
|
|
61
|
-
.editorMode=${this.editorMode}
|
|
62
72
|
?hideTitle=${this.hideTitle}
|
|
63
73
|
?withMoreOptionsButton=${this.withMoreOptionsButton}
|
|
74
|
+
iconVariant="${this.iconVariant}"
|
|
75
|
+
emptyStarIcon="${this.emptyStarIcon}"
|
|
76
|
+
filledStarIcon="${this.filledStarIcon}"
|
|
77
|
+
emptyLikeIcon="${this.emptyLikeIcon}"
|
|
78
|
+
filledLikeIcon="${this.filledLikeIcon}"
|
|
79
|
+
emptyDislikeIcon="${this.emptyDislikeIcon}"
|
|
80
|
+
filledDislikeIcon="${this.filledDislikeIcon}"
|
|
81
|
+
?canAccessFeedback=${this.canAccessFeedback}
|
|
82
|
+
?canRateThisContent=${this.canRateThisContent}
|
|
83
|
+
.i18nProperties=${this.i18nProperties}
|
|
64
84
|
.ratingSummary=${this.ratingSummary}
|
|
65
|
-
.
|
|
66
|
-
.iconVariant=${this.iconVariant}
|
|
67
|
-
.emptyStarIcon=${this.emptyStarIcon}
|
|
68
|
-
.filledStarIcon=${this.filledStarIcon}
|
|
69
|
-
.emptyLikeIcon=${this.emptyLikeIcon}
|
|
70
|
-
.filledLikeIcon=${this.filledLikeIcon}
|
|
71
|
-
.emptyDislikeIcon=${this.emptyDislikeIcon}
|
|
72
|
-
.filledDislikeIcon=${this.filledDislikeIcon}
|
|
85
|
+
.configuration=${this.configuration}
|
|
73
86
|
.feedbackMailLinkBuilder=${(feedbackMessage) => this.feedbackLinkBuilder.build(feedbackMessage)}
|
|
74
87
|
@rate=${this.rate}
|
|
75
88
|
@send-feedback=${this.sendFeedback}
|
|
@@ -255,7 +268,7 @@ __decorate([
|
|
|
255
268
|
query("ft-reader-feedback")
|
|
256
269
|
], FtReaderTopicFeedback.prototype, "readerFeedback", void 0);
|
|
257
270
|
__decorate([
|
|
258
|
-
i18n(server.properties["mail.feedback.subject"]((self) => { var _a, _b; return [(_a = self.tocNode) === null || _a === void 0 ? void 0 : _a.title, (
|
|
271
|
+
i18n(server.properties["mail.feedback.subject"]((self) => { var _a, _b, _c, _d; return [(_b = (_a = self.tocNode) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : "", (_d = (_c = self.map) === null || _c === void 0 ? void 0 : _c.title) !== null && _d !== void 0 ? _d : ""]; }))
|
|
259
272
|
], FtReaderTopicFeedback.prototype, "mailSubject", void 0);
|
|
260
273
|
__decorate([
|
|
261
274
|
reduxEventListener({ eventName: "rating-changed" })
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export * from "./ft-reader-feedback.styles";
|
|
2
|
-
export * from "./ft-
|
|
2
|
+
export * from "./ft-base-feedback.properties";
|
|
3
3
|
export * from "./ft-reader-map-feedback";
|
|
4
4
|
export * from "./ft-reader-topic-feedback";
|
|
5
|
+
export * from "./utils/InDesignerFeedbackComponentMessages";
|
|
6
|
+
export * from "./utils/IntegratedFeedbackComponentMessages";
|
|
7
|
+
export * from "./utils/ServerMessages";
|
|
8
|
+
export * from "./utils/events";
|
|
9
|
+
export * from "./utils/mail";
|
|
5
10
|
import "./define";
|
package/build/index.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export * from "./ft-reader-feedback.styles";
|
|
2
|
-
export * from "./ft-
|
|
2
|
+
export * from "./ft-base-feedback.properties";
|
|
3
3
|
export * from "./ft-reader-map-feedback";
|
|
4
4
|
export * from "./ft-reader-topic-feedback";
|
|
5
|
+
export * from "./utils/InDesignerFeedbackComponentMessages";
|
|
6
|
+
export * from "./utils/IntegratedFeedbackComponentMessages";
|
|
7
|
+
export * from "./utils/ServerMessages";
|
|
8
|
+
export * from "./utils/events";
|
|
9
|
+
export * from "./utils/mail";
|
|
5
10
|
import "./define";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I18nMessageContext } from "@fluid-topics/ft-i18n";
|
|
1
|
+
import { I18nMessageContext, } from "@fluid-topics/ft-i18n";
|
|
2
2
|
export const designer = I18nMessageContext.build("inDesignerFeedbackComponent");
|
|
3
3
|
export const defaultDesignerMessages = {
|
|
4
|
-
feedbackAndRatingDisabledInEditor: "Feedback and ratings performed here are not taken into account."
|
|
4
|
+
feedbackAndRatingDisabledInEditor: "Feedback and ratings performed here are not taken into account.",
|
|
5
5
|
};
|
|
@@ -26,6 +26,10 @@ export interface IntegratedFeedbackComponentMessages extends I18nMessages {
|
|
|
26
26
|
topicRatingSectionTitle(): string;
|
|
27
27
|
topicFeedbackSectionTitle(): string;
|
|
28
28
|
topicDichotomousRatingSectionTitle(): string;
|
|
29
|
+
viewerFeedbackMainTitle(): string;
|
|
30
|
+
viewerRatingSectionTitle(): string;
|
|
31
|
+
viewerFeedbackSectionTitle(): string;
|
|
32
|
+
viewerDichotomousRatingSectionTitle(): string;
|
|
29
33
|
}
|
|
30
34
|
export declare const feedback: I18nMessageContext<IntegratedFeedbackComponentMessages>;
|
|
31
35
|
export declare const defaultMessages: DefaultI18nMessages<IntegratedFeedbackComponentMessages>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I18nMessageContext } from "@fluid-topics/ft-i18n";
|
|
1
|
+
import { I18nMessageContext, } from "@fluid-topics/ft-i18n";
|
|
2
2
|
export const feedback = I18nMessageContext.build("integratedFeedbackComponent");
|
|
3
3
|
export const defaultMessages = {
|
|
4
4
|
starsRating: "{0} stars",
|
|
@@ -29,4 +29,8 @@ export const defaultMessages = {
|
|
|
29
29
|
topicRatingSectionTitle: "Rate this content",
|
|
30
30
|
topicDichotomousRatingSectionTitle: "Did this content solve your problem?",
|
|
31
31
|
topicFeedbackSectionTitle: "Write your review",
|
|
32
|
+
viewerFeedbackMainTitle: "Send feedback",
|
|
33
|
+
viewerRatingSectionTitle: "Rate this content",
|
|
34
|
+
viewerDichotomousRatingSectionTitle: "Did this content solve your problem?",
|
|
35
|
+
viewerFeedbackSectionTitle: "Write your review",
|
|
32
36
|
};
|
|
@@ -4,6 +4,8 @@ interface ServerMessages extends I18nMessages {
|
|
|
4
4
|
["mail.feedback.title"](topicTitle: string, mapTitle: string): string;
|
|
5
5
|
["mail.map_feedback.subject"](mapTitle: string): string;
|
|
6
6
|
["mail.map_feedback.title"](mapTitle: string): string;
|
|
7
|
+
["mail.file_feedback.subject"](displayName: string, fileName: string): string;
|
|
8
|
+
["mail.file_feedback.title"](displayName: string, fileName: string): string;
|
|
7
9
|
["mail.feedback.disclaimer"](): string;
|
|
8
10
|
["mail.feedback.ratingStarsMessage0"](): string;
|
|
9
11
|
["mail.feedback.ratingStarsMessage1"](): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { I18nMessageContext } from "@fluid-topics/ft-i18n";
|
|
1
|
+
import { I18nMessageContext, } from "@fluid-topics/ft-i18n";
|
|
2
2
|
export const server = I18nMessageContext.fromGwt("server");
|
package/build/utils/events.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class SendFeedbackEvent extends CustomEvent {
|
|
2
2
|
constructor(detail) {
|
|
3
3
|
super("send-feedback", {
|
|
4
|
-
detail
|
|
4
|
+
detail,
|
|
5
5
|
});
|
|
6
6
|
}
|
|
7
7
|
}
|
|
@@ -10,7 +10,7 @@ export class OpenTopicFeedbackDrawerEvent extends CustomEvent {
|
|
|
10
10
|
super("ft-reader-topic-feedback", {
|
|
11
11
|
composed: true,
|
|
12
12
|
bubbles: true,
|
|
13
|
-
detail
|
|
13
|
+
detail,
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -19,7 +19,7 @@ export class OpenMapFeedbackDrawerEvent extends CustomEvent {
|
|
|
19
19
|
super("ft-reader-feedback", {
|
|
20
20
|
composed: true,
|
|
21
21
|
bubbles: true,
|
|
22
|
-
detail
|
|
22
|
+
detail,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -28,7 +28,7 @@ export class SendMailerTopicFeedbackEvent extends CustomEvent {
|
|
|
28
28
|
super("ft-reader-mailer-topic-feedback", {
|
|
29
29
|
composed: true,
|
|
30
30
|
bubbles: true,
|
|
31
|
-
detail: { topic }
|
|
31
|
+
detail: { topic },
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -36,7 +36,7 @@ export class SendMailerMapFeedbackEvent extends CustomEvent {
|
|
|
36
36
|
constructor() {
|
|
37
37
|
super("ft-reader-mailer-map-feedback", {
|
|
38
38
|
composed: true,
|
|
39
|
-
bubbles: true
|
|
39
|
+
bubbles: true,
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}
|
package/build/utils/mail.js
CHANGED
|
@@ -14,15 +14,15 @@ export class FeedbackMailLinkBuilder {
|
|
|
14
14
|
this.configuration = configuration;
|
|
15
15
|
this.isAuthenticated = isAuthenticated;
|
|
16
16
|
this.subjectMetadata = this.filterMetadata(metadata, configuration.subjectMetadataIds)
|
|
17
|
-
.map(m => "[" + m.values[m.values.length - 1] + "]")
|
|
17
|
+
.map((m) => "[" + m.values[m.values.length - 1] + "]")
|
|
18
18
|
.join("");
|
|
19
19
|
this.bodyMetadata = this.filterMetadata(metadata, (_a = configuration.bodyMetadataIds) !== null && _a !== void 0 ? _a : [])
|
|
20
|
-
.map(m => "[" + m.values.join(", ") + "]")
|
|
20
|
+
.map((m) => "[" + m.values.join(", ") + "]")
|
|
21
21
|
.join(" ");
|
|
22
22
|
}
|
|
23
23
|
filterMetadata(metadata, metadataIds) {
|
|
24
|
-
return metadataIds.map(key => metadata.find(m => m.key === key))
|
|
25
|
-
.filter(m => m != null && m.values.length > 0);
|
|
24
|
+
return metadataIds.map((key) => metadata.find((m) => m.key === key))
|
|
25
|
+
.filter((m) => m != null && m.values.length > 0);
|
|
26
26
|
}
|
|
27
27
|
shouldUseMailer() {
|
|
28
28
|
var _a, _b;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-feedback",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.21",
|
|
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": "2.1.
|
|
23
|
-
"@fluid-topics/ft-reader-context": "2.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
22
|
+
"@fluid-topics/ft-app-context": "2.1.21",
|
|
23
|
+
"@fluid-topics/ft-reader-context": "2.1.21",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "2.1.21",
|
|
25
25
|
"lit": "3.1.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@fluid-topics/public-api": "1.0.
|
|
28
|
+
"@fluid-topics/public-api": "1.0.136"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a0f619df74c0665183d73df09e75b1eddc2a2a1f"
|
|
31
31
|
}
|
|
File without changes
|