@fluid-topics/ft-reader-context 1.2.12 → 1.2.14

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.
@@ -63,5 +63,4 @@ export declare enum FtReaderFeatures {
63
63
  }
64
64
  export interface FtReaderFeatureAccessData {
65
65
  session?: FtSession;
66
- ratingType?: FtRatingType | FtRatingTypeKeys;
67
66
  }
@@ -65,6 +65,6 @@ export declare abstract class FtReaderService extends FtServiceWithCache {
65
65
  fontsStylesheet(): string;
66
66
  themeStylesheet(): string;
67
67
  buildBreadcrumb(tocId: string): Array<FtReaderBreadcrumb>;
68
- isFeatureAccessible(feature: FtReaderFeatures, { session, ratingType }: FtReaderFeatureAccessData): boolean;
68
+ isFeatureAccessible(feature: FtReaderFeatures, { session }: FtReaderFeatureAccessData): boolean;
69
69
  makeAbsolute(endpoint: string): string;
70
70
  }
@@ -1,4 +1,4 @@
1
- import { FtRatingType, FtUserRole, userHasRole } from "@fluid-topics/public-api";
1
+ import { FtUserRole, userHasRole } from "@fluid-topics/public-api";
2
2
  import { FtReaderFeatures } from "../model";
3
3
  import { ftAppInfoStore, FtServiceWithCache } from "@fluid-topics/ft-app-context";
4
4
  export class FtReaderService extends FtServiceWithCache {
@@ -197,7 +197,7 @@ export class FtReaderService extends FtServiceWithCache {
197
197
  }
198
198
  return breadcrumb;
199
199
  }
200
- isFeatureAccessible(feature, { session, ratingType }) {
200
+ isFeatureAccessible(feature, { session }) {
201
201
  var _a;
202
202
  if (!this.isFeatureAvailable(feature)) {
203
203
  return false;
@@ -206,7 +206,7 @@ export class FtReaderService extends FtServiceWithCache {
206
206
  case FtReaderFeatures.FEEDBACK:
207
207
  return userHasRole(session !== null && session !== void 0 ? session : [], FtUserRole.FEEDBACK_USER);
208
208
  case FtReaderFeatures.RATING:
209
- return userHasRole(session !== null && session !== void 0 ? session : [], FtUserRole.RATING_USER) && ratingType != null && ratingType !== FtRatingType.NO_RATING;
209
+ return userHasRole(session !== null && session !== void 0 ? session : [], FtUserRole.RATING_USER);
210
210
  case FtReaderFeatures.PRINT:
211
211
  return userHasRole(session !== null && session !== void 0 ? session : [], FtUserRole.PRINT_USER);
212
212
  case FtReaderFeatures.BOOKMARK:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-context",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "Context block for integrated reader components",
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.2.12",
23
- "@fluid-topics/ft-wc-utils": "1.2.12",
22
+ "@fluid-topics/ft-app-context": "1.2.14",
23
+ "@fluid-topics/ft-wc-utils": "1.2.14",
24
24
  "@reduxjs/toolkit": "^1.6.2",
25
25
  "lit": "3.1.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@fluid-topics/public-api": "1.0.79"
28
+ "@fluid-topics/public-api": "1.0.80"
29
29
  },
30
- "gitHead": "a32b515ab03f4e6ffd796a7149856513d5b71400"
30
+ "gitHead": "65d295da2a5a17f24ca4957f74595755a2550c3d"
31
31
  }