ngx-edu-sharing-ui 10.0.24 → 11.0.0

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.
Files changed (38) hide show
  1. package/assets/scss/branding.scss +4 -2
  2. package/assets/scss/material-theme.scss +19 -11
  3. package/assets/scss/mixins.scss +8 -5
  4. package/assets/scss/variables.scss +9 -1
  5. package/fesm2022/ngx-edu-sharing-ui.mjs +890 -678
  6. package/fesm2022/ngx-edu-sharing-ui.mjs.map +1 -1
  7. package/lib/common/edu-sharing-ui-common.module.d.ts +27 -24
  8. package/lib/directives/icon.directive.d.ts +3 -1
  9. package/lib/edu-sharing-ui-configuration.d.ts +7 -0
  10. package/lib/edu-sharing-ui.module.d.ts +2 -2
  11. package/lib/index.d.ts +7 -0
  12. package/lib/info-message/info-message.component.d.ts +13 -0
  13. package/lib/list-items/list-text/list-text.component.d.ts +1 -1
  14. package/lib/list-items/list-widget.d.ts +1 -1
  15. package/lib/mds/mds-helper.service.d.ts +20 -3
  16. package/lib/mds-viewer/mds-editor-instance-service.abstract.d.ts +1 -1
  17. package/lib/mds-viewer/mds-viewer.component.d.ts +1 -1
  18. package/lib/mds-viewer/widget/mds-widget.component.d.ts +11 -8
  19. package/lib/node-entries/entries-model.d.ts +10 -1
  20. package/lib/node-entries/node-entries-card/node-entries-card.component.d.ts +1 -1
  21. package/lib/node-entries/node-entries-table/node-entries-table.component.d.ts +2 -0
  22. package/lib/node-entries/node-entries-wrapper.component.d.ts +21 -3
  23. package/lib/node-entries/node-entries.component.d.ts +5 -2
  24. package/lib/node-entries/node-entries.module.d.ts +1 -1
  25. package/lib/pipes/node-image.pipe.d.ts +1 -1
  26. package/lib/pipes/node-url.pipe.d.ts +11 -0
  27. package/lib/pipes/toolpermission.pipe.d.ts +10 -0
  28. package/lib/services/node-entries.service.d.ts +5 -1
  29. package/lib/services/node-helper.service.d.ts +11 -5
  30. package/lib/services/options-helper-data.service.d.ts +3 -3
  31. package/lib/services/render-helper.service.d.ts +2 -1
  32. package/lib/services/ui.service.d.ts +1 -0
  33. package/lib/translations/translation-loader.d.ts +3 -3
  34. package/lib/types/accessibillity.d.ts +1 -0
  35. package/lib/types/injection-tokens.d.ts +9 -16
  36. package/lib/types/list-item.d.ts +1 -1
  37. package/lib/types/option-item.d.ts +59 -20
  38. package/package.json +2 -1
@@ -2,20 +2,24 @@ import { ApiHelpersService, ConfigService, NetworkService, Node, User } from 'ng
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
- import { Params } from '@angular/router';
5
+ import { Params, Router } from '@angular/router';
6
6
  import { NodesRightMode } from '../types/option-item';
7
+ import { PlatformLocation } from '@angular/common';
8
+ import { EduSharingUiConfiguration } from '../edu-sharing-ui-configuration';
7
9
  import * as i0 from "@angular/core";
8
10
  export declare class NodeHelperService {
9
11
  protected translate: TranslateService;
10
12
  protected apiHelpersService: ApiHelpersService;
11
13
  protected networkService: NetworkService;
12
14
  protected configService: ConfigService;
15
+ protected configuration: EduSharingUiConfiguration;
13
16
  protected repoUrlService: RepoUrlService;
14
- private assetsBasePath;
17
+ protected platformLocation: PlatformLocation;
18
+ protected router: Router;
15
19
  readonly LICENSE_URLS: {
16
20
  [key: string]: string;
17
21
  };
18
- constructor(translate: TranslateService, apiHelpersService: ApiHelpersService, networkService: NetworkService, configService: ConfigService, repoUrlService: RepoUrlService, assetsBasePath: string);
22
+ constructor(translate: TranslateService, apiHelpersService: ApiHelpersService, networkService: NetworkService, configService: ConfigService, configuration: EduSharingUiConfiguration, repoUrlService: RepoUrlService, platformLocation: PlatformLocation, router: Router);
19
23
  getCollectionScopeInfo(node: Node): {
20
24
  icon: string;
21
25
  scopeName: string;
@@ -53,10 +57,11 @@ export declare class NodeHelperService {
53
57
  getWorkflowStatus(node: Node, useFromConfig?: boolean): Workflow.WorkflowDefinitionStatus;
54
58
  getDefaultWorkflowStatus(useFromConfig?: boolean): Workflow.WorkflowDefinitionStatus;
55
59
  getWorkflows(): Workflow.WorkflowDefinition[];
60
+ getFilenameWithoutExtension(filename: string): string;
56
61
  copyDataToNode<T extends Node | User>(target: T, source: T): void;
57
62
  isNodeCollection(node: Node): boolean;
58
63
  getSourceIconPath(src: string): string;
59
- getNodeLink(mode: 'routerLink' | 'queryParams', node: Node): string | Params;
64
+ getNodeLink(mode: 'routerLink' | 'queryParams' | 'plain', node: Node): string | Params;
60
65
  /**
61
66
  * Returns true if this node is a copy of another node, just used as a publish target.
62
67
  */
@@ -73,6 +78,7 @@ export declare class NodeHelperService {
73
78
  * Effective: check only rights of the original node this refers to (collection ref). If it is not a collection ref, fallback to local
74
79
  */
75
80
  getNodesRight(nodes: Node[], right: string, mode?: NodesRightMode): boolean;
76
- static ɵfac: i0.ɵɵFactoryDeclaration<NodeHelperService, [null, null, null, null, null, { optional: true; }]>;
81
+ isOerLicense(value: string): boolean;
82
+ static ɵfac: i0.ɵɵFactoryDeclaration<NodeHelperService, [null, null, null, null, null, null, null, { optional: true; }]>;
77
83
  static ɵprov: i0.ɵɵInjectableDeclaration<NodeHelperService>;
78
84
  }
@@ -21,7 +21,7 @@ export interface OptionsHelperComponents {
21
21
  list?: ListEventInterface<NodeEntriesDataType>;
22
22
  }
23
23
  export interface OptionData {
24
- scope: Scope;
24
+ scope: Scope | string;
25
25
  activeObjects?: Node[] | any[];
26
26
  selectedObjects?: Node[] | any[];
27
27
  allObjects?: Node[] | any[];
@@ -63,7 +63,7 @@ export declare class OptionsHelperDataService implements OnDestroy {
63
63
  private addVirtualObjects;
64
64
  registerGlobalKeyboardShortcuts(): void;
65
65
  private handleKeyboardEvent;
66
- filterOptions(options: OptionItem[], target: Target, objects?: Node[] | any): Promise<OptionItem[]>;
66
+ filterOptions(options: OptionItem[], target: Target, objects?: Node[] | any): OptionItem[] | Promise<OptionItem[]>;
67
67
  /**
68
68
  * shortcut to simply disable all options on the given compoennts
69
69
  * @param actionbar
@@ -71,7 +71,7 @@ export declare class OptionsHelperDataService implements OnDestroy {
71
71
  */
72
72
  clearComponents(actionbar: ActionbarComponent, list?: ListEventInterface<Node>): void;
73
73
  pasteNode(nodes?: Node[]): void;
74
- static ɵfac: i0.ɵɵFactoryDeclaration<OptionsHelperDataService, [null, null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<OptionsHelperDataService, [null, { optional: true; }, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
75
75
  static ɵprov: i0.ɵɵInjectableDeclaration<OptionsHelperDataService>;
76
76
  }
77
77
  export {};
@@ -17,8 +17,9 @@ export declare class RenderHelperService {
17
17
  private userService;
18
18
  private optionsHelperDataService;
19
19
  constructor(injector: Injector, aboutService: AboutService, nodeApiUnwrapped: NodeServiceUnwrapped, configuration: EduSharingUiConfiguration, userService: UserService, optionsHelperDataService: OptionsHelperDataService);
20
- getRenderData(nodeId: string, version?: string): Promise<CombinedRenderData>;
20
+ getRenderData(nodeId: string, version?: string, repository?: string): Promise<CombinedRenderData>;
21
21
  getRenderDataForLms(encodedNode: string, signature: string, jwt: string, renderUrl: string, encodedUser: string): Promise<CombinedRenderData>;
22
+ prepareRootUrl(): Promise<void>;
22
23
  static ɵfac: i0.ɵɵFactoryDeclaration<RenderHelperService, [null, null, null, null, null, { optional: true; }]>;
23
24
  static ɵprov: i0.ɵɵInjectableDeclaration<RenderHelperService>;
24
25
  }
@@ -81,6 +81,7 @@ export declare class UIService {
81
81
  * @param smoothness lower numbers indicate less smoothness, higher more smoothness
82
82
  */
83
83
  scrollSmoothElement(pos: number, element: Element, smoothness?: number, axis?: string): Promise<void>;
84
+ goToLogin(scope?: string, next?: string): void;
84
85
  static ɵfac: i0.ɵɵFactoryDeclaration<UIService, never>;
85
86
  static ɵprov: i0.ɵɵInjectableDeclaration<UIService>;
86
87
  }
@@ -3,19 +3,19 @@ import { TranslateLoader } from '@ngx-translate/core';
3
3
  import { ConfigService } from 'ngx-edu-sharing-api';
4
4
  import { Observable } from 'rxjs';
5
5
  import { EduSharingUiConfiguration } from '../edu-sharing-ui-configuration';
6
+ import { I18nConfig } from '../types/injection-tokens';
6
7
  export declare const TRANSLATION_LIST: string[];
7
8
  type Dictionary = {
8
9
  [key: string]: string | Dictionary;
9
10
  };
10
11
  export declare class TranslationLoader implements TranslateLoader {
11
- private assetsBasePath;
12
- private additionalI18nProvider;
13
12
  private http;
14
13
  private configService;
15
14
  private configuration;
15
+ private i18nConfig;
16
16
  private prefix;
17
17
  private suffix;
18
- static create(http: HttpClient, configService: ConfigService, configuration: EduSharingUiConfiguration, assetsBasePath?: string, additionalI18nProvider?: (lang: string) => string[]): TranslationLoader;
18
+ static create(http: HttpClient, configService: ConfigService, configuration: EduSharingUiConfiguration, i18nConfig: I18nConfig): TranslationLoader;
19
19
  private constructor();
20
20
  private readonly source;
21
21
  /**
@@ -3,6 +3,7 @@ export declare class AccessibilitySettings {
3
3
  toastDuration: ToastDuration;
4
4
  contrastMode: boolean;
5
5
  indicatorIcons: boolean;
6
+ dragAndDropOptions: boolean;
6
7
  }
7
8
  export declare enum ToastDuration {
8
9
  Seconds_3 = 3,
@@ -1,28 +1,21 @@
1
1
  import { InjectionToken } from '@angular/core';
2
- /**
3
- * A custom base path for the assets directory.
4
- *
5
- * This is useful when the application cannot be served from the base HREF set in index.html. This
6
- * is the case when it is embedded as a web component into another website.
7
- */
8
- export declare const ASSETS_BASE_PATH: InjectionToken<string>;
9
2
  export declare class I18nConfig {
10
3
  /**
11
4
  * shall the user profile be read
12
5
  * If not set, defaults to true
13
6
  */
14
7
  obeyUserProfile?: boolean;
8
+ /**
9
+ * custom additional uris to fetch language files from
10
+ *
11
+ * Might be used if additional angular modules require language data
12
+ *
13
+ * Example
14
+ * {provide: I18N_CONFIG, useValue: { ... }},
15
+ */
16
+ additionalI18nProvider?: (lang: string) => string[];
15
17
  }
16
18
  /**
17
19
  * additional configuration options
18
20
  */
19
21
  export declare const I18N_CONFIG: InjectionToken<I18nConfig>;
20
- /**
21
- * custom additional uris to fetch language files from
22
- *
23
- * Might be used if additional angular modules require language data
24
- *
25
- * Example
26
- *{provide: ADDITIONAL_I18N_PROVIDER, useValue: (lang: string) => { return ['/edu-sharing/assets/i18n/myI18n/' + lang + '.json']}},
27
- */
28
- export declare const ADDITIONAL_I18N_PROVIDER: InjectionToken<(lang: string) => string[]>;
@@ -1,6 +1,6 @@
1
1
  import { Sort, SortDirection } from '@angular/material/sort';
2
2
  import { EventEmitter } from '@angular/core';
3
- export type ListItemType = 'NODE' | 'NODE_PROPOSAL' | 'COLLECTION' | 'ORG' | 'GROUP' | 'USER';
3
+ export type ListItemType = 'NODE' | 'NODE_PROPOSAL' | 'COLLECTION' | 'ORG' | 'GROUP' | 'USER' | 'EVENT' | 'SHARE';
4
4
  /**
5
5
  * A list item info, which is basically a column
6
6
  * Example:
@@ -25,20 +25,6 @@ export declare class OptionItem {
25
25
  * @type {boolean}
26
26
  */
27
27
  showAsAction: boolean;
28
- /**
29
- * If true, this option will be shown as a toggle on the right side (provide iconToggle as a toggle icon)
30
- * @type {boolean}
31
- */
32
- isToggle: boolean;
33
- /**
34
- * Only when @isToggle. is the toggle currently visible
35
- */
36
- isToggleVisible: boolean;
37
- /**
38
- * Only when @isToggle. Where to place the toggle, before or after all other actions
39
- * @type {boolean}
40
- */
41
- togglePosition: 'before' | 'after';
42
28
  /**
43
29
  * If true, shows a line at the top.
44
30
  *
@@ -137,7 +123,7 @@ export declare class OptionItem {
137
123
  permissionsRightMode: NodesRightMode;
138
124
  toolpermissions: string[];
139
125
  toolpermissionsMode: HideMode;
140
- scopes: Scope[];
126
+ scopes: (Scope | string)[];
141
127
  /**
142
128
  *
143
129
  * @param name the option name, which is used for the translation
@@ -148,6 +134,54 @@ export declare class OptionItem {
148
134
  */
149
135
  constructor(name: string, icon: string, callback: (object?: Node | any, objects?: (Node | any)[]) => void);
150
136
  }
137
+ type ToogleStates = {
138
+ /**
139
+ * icon when the toggle is in enabled state
140
+ */
141
+ enabled: string;
142
+ /**
143
+ * icon when the toggle is in disabled state
144
+ */
145
+ disabled: string;
146
+ };
147
+ export declare class OptionItemToggle extends OptionItem {
148
+ /**
149
+ * set individual names for a toggle based on its state
150
+ */
151
+ toggleNames: ToogleStates;
152
+ /**
153
+ * set individual icons for a toggle based on its state
154
+ */
155
+ toggleIcons: ToogleStates;
156
+ /**
157
+ * is toggle enabled or disabled?
158
+ */
159
+ toggleState: boolean;
160
+ readonly isToggle = true;
161
+ /**
162
+ * @Deprecated: please use the @OptionItemToggle class
163
+ * Only when @isToggle. is the toggle currently visible
164
+ */
165
+ isToggleVisible: boolean;
166
+ /**
167
+ * Where to place the toggle, before or after all other actions
168
+ * @type {boolean}
169
+ */
170
+ togglePosition: 'before' | 'after';
171
+ constructor(
172
+ /**
173
+ * set individual names for a toggle based on its state
174
+ */
175
+ toggleNames: ToogleStates,
176
+ /**
177
+ * set individual icons for a toggle based on its state
178
+ */
179
+ toggleIcons: ToogleStates,
180
+ /**
181
+ * is toggle enabled or disabled?
182
+ */
183
+ toggleState: boolean, callback?: (object?: Node | any, objects?: (Node | any)[]) => void);
184
+ }
151
185
  export declare class CustomOptions {
152
186
  /**
153
187
  * If true, all existing or available options for the object stay
@@ -188,6 +222,9 @@ export declare enum Scope {
188
222
  UserProfile = "UserProfile",
189
223
  Stream = "Stream",
190
224
  CreateMenu = "CreateMenu",
225
+ DashboardSwimlane = "DashboardSwimlane",
226
+ EditorialPage = "EditorialPage",
227
+ EditorialSidebar = "EditorialSidebar",
191
228
  MediacenterNodesList = "MediacenterNodesList",
192
229
  Admin = "Admin",// Admin Tools / Debugging
193
230
  DebugShowAll = "DebugShowAll"
@@ -203,7 +240,7 @@ export declare enum ElementType {
203
240
  Person = 7,
204
241
  Group = 8,
205
242
  SavedSearch = 9,
206
- Unknown = 10
243
+ NoneOrUnknown = 10
207
244
  }
208
245
  export declare class OptionGroup {
209
246
  id: string;
@@ -240,10 +277,11 @@ export declare enum Constrain {
240
277
  ClipboardContent = 10,// Only visible when the clipboard has content
241
278
  AddObjects = 11,// Only visible when it is possible to add objects into the current list
242
279
  HomeRepository = 12,// Only visible when the nodes are from the local (home) repository
243
- User = 13,// Only visible when a user is present and logged in
244
- NoScope = 14,// Only visible when no current scope (i.e "safe" scope) is set
245
- ReurlMode = 15,// Only visible when a reurl is present (called to pick object from lms)
246
- LTIMode = 16
280
+ GuestOrNotLoggedIn = 13,// Only visible when a user is NOT present (guest or not logged in)
281
+ User = 14,// Only visible when a user is present and logged in
282
+ NoScope = 15,// Only visible when no current scope (i.e "safe" scope) is set
283
+ ReurlMode = 16,// Only visible when a reurl is present (called to pick object from lms)
284
+ LTIMode = 17
247
285
  }
248
286
  export declare enum Target {
249
287
  List = 0,// Target is the ListTableComponent
@@ -251,3 +289,4 @@ export declare enum Target {
251
289
  Actionbar = 2,
252
290
  CreateMenu = 3
253
291
  }
292
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-edu-sharing-ui",
3
- "version": "10.0.24",
3
+ "version": "11.0.0",
4
4
  "license": "GNU GPL v2",
5
5
  "description": "Angular components for Edu-Sharing UX parts",
6
6
  "peerDependencies": {
@@ -9,6 +9,7 @@
9
9
  "@angular/core": ">=18.0.0 ",
10
10
  "@angular/material": ">=18.0.0",
11
11
  "material-design-icons": "^3.0.1",
12
+ "ngx-edu-sharing-api": ">=11.0.0",
12
13
  "ngx-rendering-service-api": ">=0.0.41",
13
14
  "@ngx-translate/core": ">=15.0.0",
14
15
  "angular-material-css-vars": "^6.0.0 || ^7.0.0",