@fluid-topics/ft-reader-feedback 2.1.18 → 2.1.20

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.
@@ -4,18 +4,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html, nothing } from "lit";
8
- import { property, query, state } from "lit/decorators.js";
7
+ import { html, nothing, } from "lit";
8
+ import { property, query, state, } from "lit/decorators.js";
9
9
  import { parseDate, redux, } from "@fluid-topics/ft-wc-utils";
10
10
  import { styles } from "./ft-reader-feedback.styles";
11
- import { FtRatingType } from "@fluid-topics/public-api";
11
+ import { FtRatingType, } from "@fluid-topics/public-api";
12
12
  import { FtTypography } from "@fluid-topics/ft-typography";
13
- import { FtSwitch, FtSwitchOption } from "@fluid-topics/ft-switch";
13
+ import { FtSwitch, FtSwitchOption, } from "@fluid-topics/ft-switch";
14
14
  import { FtTextArea } from "@fluid-topics/ft-text-area";
15
15
  import { repeat } from "lit/directives/repeat.js";
16
16
  import { FtButton } from "@fluid-topics/ft-button";
17
- import { defaultMessages, feedback } from "./utils/IntegratedFeedbackComponentMessages";
18
- import { withI18n } from "@fluid-topics/ft-i18n";
17
+ import { defaultMessages, feedback, } from "./utils/IntegratedFeedbackComponentMessages";
18
+ import { withI18n, } from "@fluid-topics/ft-i18n";
19
19
  import { FtTextField } from "@fluid-topics/ft-text-field";
20
20
  import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
21
21
  import { FtReaderFeatures } from "@fluid-topics/ft-reader-context";
@@ -118,7 +118,7 @@ export class FtReaderFeedback extends withI18n(FtReaderComponent) {
118
118
  return html `
119
119
  <div class="ft-reader-feedback--stars" part="rating rating-stars">
120
120
  ${repeat(new Array(5), (_, index) => index, (_, index) => {
121
- let active = this.ratingTypeOfDoneRatingOfThisContent === FtRatingType.STARS && this.ratingValue > index;
121
+ const active = this.ratingTypeOfDoneRatingOfThisContent === FtRatingType.STARS && this.ratingValue > index;
122
122
  const ratingValue = index + 1;
123
123
  return html `
124
124
  <ft-button round part="rating-stars-${ratingValue}"
@@ -140,7 +140,7 @@ export class FtReaderFeedback extends withI18n(FtReaderComponent) {
140
140
  <ft-switch unselectable
141
141
  @change=${(e) => this.rate(e.detail)}
142
142
  part="rating rating-like"
143
- label=${this.i18n(this.i18nProperties.ratingSectionTitle)}>
143
+ label="${this.i18n(this.i18nProperties.ratingSectionTitle)}">
144
144
  <ft-switch-option .value=${1}
145
145
  ?selected=${liked}
146
146
  .iconVariant=${this.iconVariant}
@@ -202,12 +202,12 @@ export class FtReaderFeedback extends withI18n(FtReaderComponent) {
202
202
  </a>
203
203
  `;
204
204
  }
205
- let moreOptionsButton = this.withMoreOptionsButton && (((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.mailsSentByFluidTopics) || ((_b = this.configuration) === null || _b === void 0 ? void 0 : _b.mailsSentByFluidTopicsForUnauthenticatedUsers))
205
+ const moreOptionsButton = this.withMoreOptionsButton && (((_a = this.configuration) === null || _a === void 0 ? void 0 : _a.mailsSentByFluidTopics) || ((_b = this.configuration) === null || _b === void 0 ? void 0 : _b.mailsSentByFluidTopicsForUnauthenticatedUsers))
206
206
  ? html `
207
207
  <ft-button outlined
208
208
  type="button" name="more-options"
209
209
  class="ft-reader-feedback--more-options"
210
- @click="${this.onOpenMoreDetails}"
210
+ @click=${this.onOpenMoreDetails}
211
211
  part="more-options">
212
212
  ${feedback.messages.moreOptionsButton()}
213
213
  </ft-button>
@@ -215,17 +215,17 @@ export class FtReaderFeedback extends withI18n(FtReaderComponent) {
215
215
  : nothing;
216
216
  return html `
217
217
  <form class="ft-reader-feedback--feedback" part="feedback-container" autocomplete="on"
218
- @submit="${(e) => this.onFormSubmitEvent(e, !!mailLink)}">
218
+ @submit=${(e) => this.onFormSubmitEvent(e, !!mailLink)}>
219
219
  <ft-typography variant="title-dense" part="section-title" class="ft-reader-feedback--section-title">
220
220
  ${this.i18n(this.i18nProperties.feedbackSectionTitle)}
221
221
  </ft-typography>
222
222
  ${((_d = (_c = this.session) === null || _c === void 0 ? void 0 : _c.profile) === null || _d === void 0 ? void 0 : _d.userId) == null && ((_e = this.configuration) === null || _e === void 0 ? void 0 : _e.mailsSentByFluidTopicsForUnauthenticatedUsers) ? html `
223
223
  <ft-text-field outlined name="email" type="email" autocomplete="email"
224
224
  class="ft-reader-feedback--from-input"
225
- label=${feedback.messages.feedbackfromEmail()}
225
+ label="${feedback.messages.feedbackfromEmail()}"
226
226
  @change=${(e) => this.from = e.detail.trim()}
227
227
  ?error=${this.from && !this.validFromEmail()}
228
- helper=${this.from && !this.validFromEmail() ? feedback.messages.feedbackfromEmailInvalid() : ""}
228
+ helper="${this.from && !this.validFromEmail() ? feedback.messages.feedbackfromEmailInvalid() : ""}"
229
229
  />
230
230
  ` : nothing}
231
231
  <ft-text-area outlined
@@ -337,7 +337,7 @@ __decorate([
337
337
  __decorate([
338
338
  redux({
339
339
  store: "reader",
340
- selector: (state) => { var _a; return (_a = state.configuration) === null || _a === void 0 ? void 0 : _a.feedback; }
340
+ selector: (state) => { var _a; return (_a = state.configuration) === null || _a === void 0 ? void 0 : _a.feedback; },
341
341
  })
342
342
  ], FtReaderFeedback.prototype, "configuration", void 0);
343
343
  __decorate([