@fluid-topics/ft-reader-feedback 1.0.49 → 1.0.51

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.
@@ -145,7 +145,7 @@ class FtReaderMapFeedback extends withI18n(FtReaderComponent) {
145
145
  var _a;
146
146
  try {
147
147
  if (!this.editorMode) {
148
- await ((_a = this.service) === null || _a === void 0 ? void 0 : _a.sendMapFeedback(ratingEvent.detail));
148
+ await ((_a = this.service) === null || _a === void 0 ? void 0 : _a.sendMapFeedback(ratingEvent.detail.message, ratingEvent.detail.from));
149
149
  this.dispatchEvent(new FtNotificationEvent({
150
150
  type: "info",
151
151
  message: feedback.messages.feedbackSuccess()
@@ -142,7 +142,7 @@ class FtReaderTopicFeedback extends withI18n(FtReaderTopicComponent) {
142
142
  var _a;
143
143
  try {
144
144
  if (!this.editorMode && this.tocNode) {
145
- await ((_a = this.service) === null || _a === void 0 ? void 0 : _a.sendTopicFeedback(this.tocNode.tocId, ratingEvent.detail));
145
+ await ((_a = this.service) === null || _a === void 0 ? void 0 : _a.sendTopicFeedback(this.tocNode.tocId, ratingEvent.detail.message, ratingEvent.detail.from));
146
146
  this.dispatchEvent(new FtNotificationEvent({
147
147
  type: "info",
148
148
  message: feedback.messages.feedbackSuccess()
@@ -10,6 +10,8 @@ export interface IntegratedFeedbackComponentMessages extends I18nMessages {
10
10
  ratedToday(): string;
11
11
  ratedOn(date: Date): string;
12
12
  feedbackInputLabel(): string;
13
+ feedbackfromEmail(): string;
14
+ feedbackfromEmailInvalid(): string;
13
15
  okButton(): string;
14
16
  feedbackSuccess(): string;
15
17
  feedbackFailure(): string;
@@ -12,6 +12,8 @@ export const defaultMessages = {
12
12
  ratedToday: "Rated today",
13
13
  ratedOn: "Rated on {0, date}",
14
14
  feedbackInputLabel: "How can we improve it?",
15
+ feedbackfromEmail: "Your email",
16
+ feedbackfromEmailInvalid: "Please enter a valid email address",
15
17
  okButton: "Send feedback",
16
18
  cancelButton: "Cancel",
17
19
  feedbackSuccess: "Feedback successfully sent. Thank you!",
@@ -25,8 +25,8 @@ export class FeedbackMailLinkBuilder {
25
25
  .filter(m => m != null && m.values.length > 0);
26
26
  }
27
27
  build(feedbackMessage) {
28
- var _a, _b;
29
- if (feedbackMessage.length === 0 || this.isAuthenticated && (this.configuration == null || ((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.mailsSentByFluidTopics))) {
28
+ var _a, _b, _c;
29
+ if (feedbackMessage.length === 0 || this.isAuthenticated && (this.configuration == null || ((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.mailsSentByFluidTopics)) || ((_b = this.configuration) === null || _b === void 0 ? void 0 : _b.mailsSentByFluidTopicsForUnauthenticatedUsers)) {
30
30
  return undefined;
31
31
  }
32
32
  const subject = encodeURIComponent(this.subject + " " + this.subjectMetadata);
@@ -39,6 +39,6 @@ ${feedbackMessage}
39
39
 
40
40
  _________________________________________________________________
41
41
  ${server.messages["mail.feedback.disclaimer"]()}`);
42
- return `mailto:${(_b = this.configuration) === null || _b === void 0 ? void 0 : _b.recipients.join(",")}?subject=${subject}&body=${body}`;
42
+ return `mailto:${(_c = this.configuration) === null || _c === void 0 ? void 0 : _c.recipients.join(",")}?subject=${subject}&body=${body}`;
43
43
  }
44
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-feedback",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "description": "Feedback forms for a map and its topics in an integrated reader",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,10 +19,10 @@
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.0.49",
23
- "@fluid-topics/ft-reader-context": "1.0.49",
24
- "@fluid-topics/ft-wc-utils": "1.0.49",
22
+ "@fluid-topics/ft-app-context": "1.0.51",
23
+ "@fluid-topics/ft-reader-context": "1.0.51",
24
+ "@fluid-topics/ft-wc-utils": "1.0.51",
25
25
  "lit": "2.7.2"
26
26
  },
27
- "gitHead": "77eac237aeec17a50f5bcc09890746d9a9f097f0"
27
+ "gitHead": "ea2d0683e542dd824889f183d48d0ed68fca794a"
28
28
  }