ngx-edu-sharing-ui 10.0.7 → 10.0.8

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.
@@ -1,8 +1,9 @@
1
- import { ApiHelpersService, ConfigService, User, NetworkService, Node } from 'ngx-edu-sharing-api';
1
+ import { ApiHelpersService, ConfigService, NetworkService, Node, User } from 'ngx-edu-sharing-api';
2
2
  import { TranslateService } from '@ngx-translate/core';
3
3
  import * as Workflow from '../types/workflow';
4
4
  import { RepoUrlService } from './repo-url.service';
5
5
  import { Params } from '@angular/router';
6
+ import { NodesRightMode } from '../types/option-item';
6
7
  import * as i0 from "@angular/core";
7
8
  export declare class NodeHelperService {
8
9
  protected translate: TranslateService;
@@ -62,6 +63,13 @@ export declare class NodeHelperService {
62
63
  * (published copy that has been revoked)
63
64
  */
64
65
  isNodeRevoked(node: Node): boolean;
66
+ /**
67
+ * returns true if all nodes have the requested right
68
+ * mode (only works for collection refs):
69
+ * Local: check only rights of the node itself
70
+ * Effective: check only rights of the original node this refers to (collection ref). If it is not a collection ref, fallback to local
71
+ */
72
+ getNodesRight(nodes: Node[], right: string, mode?: NodesRightMode): boolean;
65
73
  static ɵfac: i0.ɵɵFactoryDeclaration<NodeHelperService, [null, null, null, null, null, { optional: true; }]>;
66
74
  static ɵprov: i0.ɵɵInjectableDeclaration<NodeHelperService>;
67
75
  }
@@ -1,21 +1,22 @@
1
- import { ApplicationRef } from '@angular/core';
1
+ import { ApplicationRef, Injector } from '@angular/core';
2
2
  import { ActivatedRoute } from '@angular/router';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { Observable } from 'rxjs';
5
- import { ConfigService, SessionStorageService } from 'ngx-edu-sharing-api';
5
+ import { ConfigService } from 'ngx-edu-sharing-api';
6
6
  import { AppService } from '../services/abstract/app.service';
7
+ import { I18nConfig } from '../types/injection-tokens';
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class TranslationsService {
9
10
  private config;
11
+ private injector;
10
12
  private route;
11
- private storage;
13
+ private i18nConfig;
12
14
  private translate;
13
- private sessionStorage;
14
15
  private ref;
15
16
  private appService;
16
17
  private language;
17
18
  private languageLoaded;
18
- constructor(config: ConfigService, route: ActivatedRoute, storage: SessionStorageService, translate: TranslateService, sessionStorage: SessionStorageService, ref: ApplicationRef, appService: AppService);
19
+ constructor(config: ConfigService, injector: Injector, route: ActivatedRoute, i18nConfig: I18nConfig, translate: TranslateService, ref: ApplicationRef, appService: AppService);
19
20
  /**
20
21
  * Determines and configures the language to use and triggers loading of translations with
21
22
  * ngx-translate.
@@ -29,6 +30,6 @@ export declare class TranslationsService {
29
30
  getLanguage(): string;
30
31
  getISOLanguage(): string;
31
32
  getLocale(): string;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<TranslationsService, [null, null, null, null, null, null, { optional: true; }]>;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationsService, [null, null, { optional: true; }, { optional: true; }, null, null, { optional: true; }]>;
33
34
  static ɵprov: i0.ɵɵInjectableDeclaration<TranslationsService>;
34
35
  }
@@ -6,6 +6,17 @@ import { InjectionToken } from '@angular/core';
6
6
  * is the case when it is embedded as a web component into another website.
7
7
  */
8
8
  export declare const ASSETS_BASE_PATH: InjectionToken<string>;
9
+ export declare class I18nConfig {
10
+ /**
11
+ * shall the user profile be read
12
+ * If not set, defaults to true
13
+ */
14
+ obeyUserProfile?: boolean;
15
+ }
16
+ /**
17
+ * additional configuration options
18
+ */
19
+ export declare const I18N_CONFIG: InjectionToken<I18nConfig>;
9
20
  /**
10
21
  * custom additional uris to fetch language files from
11
22
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-edu-sharing-ui",
3
- "version": "10.0.7",
3
+ "version": "10.0.8",
4
4
  "license": "GNU GPL v2",
5
5
  "description": "Angular components for Edu-Sharing UX parts",
6
6
  "peerDependencies": {