ngx-edu-sharing-ui 10.0.13 → 10.0.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.
@@ -4,6 +4,7 @@ import { MatRipple } from '@angular/material/core';
4
4
  import { MdsValue, MdsWidget, Suggestion } from 'ngx-edu-sharing-api';
5
5
  import { UIService } from '../../services/ui.service';
6
6
  import { ViewInstanceService } from '../view-instance.service';
7
+ import { BehaviorSubject } from 'rxjs';
7
8
  import { MdsViewerService } from '../mds-viewer.service';
8
9
  import * as i0 from "@angular/core";
9
10
  export declare enum MdsType {
@@ -20,6 +21,11 @@ export declare enum MdsType {
20
21
  export interface MdsValueList {
21
22
  values: Suggestion[];
22
23
  }
24
+ export interface MdsViewerWidget {
25
+ definition: MdsWidget;
26
+ getInitalValuesAsync(): Promise<InitialValues>;
27
+ getInitialDisplayValues(): BehaviorSubject<MdsValueList>;
28
+ }
23
29
  export declare enum MdsWidgetType {
24
30
  Text = "text",
25
31
  Number = "number",
@@ -49,6 +55,16 @@ export declare enum MdsWidgetType {
49
55
  DefaultValue = "defaultvalue",
50
56
  FacetList = "facetList"
51
57
  }
58
+ export interface InitialValues {
59
+ /** Values that are initially present in all nodes. */
60
+ readonly jointValues: string[];
61
+ /**
62
+ * Values that are initially present in some but not all nodes.
63
+ *
64
+ * Can be null but will never be set to an empty array.
65
+ */
66
+ readonly individualValues?: string[];
67
+ }
52
68
  export declare enum ValueType {
53
69
  String = 0,
54
70
  MultiValue = 1,
@@ -62,7 +78,7 @@ export declare class MdsWidgetComponent implements OnInit, OnChanges {
62
78
  readonly ROUTER_PREFIX: string;
63
79
  private static readonly inlineEditing;
64
80
  readonly valueType = ValueType.String;
65
- widget: any;
81
+ widget: MdsViewerWidget;
66
82
  showCaption: boolean;
67
83
  /**
68
84
  * allow inline editing
@@ -82,19 +98,19 @@ export declare class MdsWidgetComponent implements OnInit, OnChanges {
82
98
  value: string[];
83
99
  private temporaryValue;
84
100
  constructor(translate: TranslateService, ui: UIService, viewInstance: ViewInstanceService, mdsViewerService: MdsViewerService);
85
- ngOnChanges(changes: SimpleChanges): void;
101
+ ngOnChanges(changes: SimpleChanges): Promise<void>;
86
102
  ngOnInit(): Promise<void>;
87
103
  getDefinition(): MdsWidget;
88
104
  getBasicType(): "number" | "text" | "date" | "vcard" | "slider" | "range" | "duration" | "array" | "tree" | "unknown";
89
105
  supportsInlineEditing(): boolean;
90
106
  private getNodeValues;
91
107
  private getNodeValue;
92
- getValue(data: string[]): any;
108
+ getValue(data: string[]): any[];
93
109
  click(): void;
94
110
  isEmpty(): boolean;
95
111
  formatDate(): string[];
96
112
  formatNumber(): string[];
97
- formatText(): any[];
113
+ formatText(): string[];
98
114
  finishEdit(instance: any, store?: boolean): Promise<void>;
99
115
  isEditable(): boolean;
100
116
  focus(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-edu-sharing-ui",
3
- "version": "10.0.13",
3
+ "version": "10.0.14",
4
4
  "license": "GNU GPL v2",
5
5
  "description": "Angular components for Edu-Sharing UX parts",
6
6
  "peerDependencies": {