@simpleangularcontrols/sac-common 10.0.0-rc.2 → 10.0.0-rc.21

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 (140) hide show
  1. package/bundles/simpleangularcontrols-sac-common.umd.js +2232 -1604
  2. package/bundles/simpleangularcontrols-sac-common.umd.js.map +1 -1
  3. package/bundles/simpleangularcontrols-sac-common.umd.min.js +1 -1
  4. package/bundles/simpleangularcontrols-sac-common.umd.min.js.map +1 -1
  5. package/common/basedatetimecontrol.d.ts +100 -14
  6. package/common/baseinputcontrol.d.ts +0 -4
  7. package/common/basemodelcontrol.d.ts +55 -27
  8. package/common/baseuploadcontrol.d.ts +71 -55
  9. package/controls/checkbox/checkbox.d.ts +12 -3
  10. package/controls/checkbox/radiobutton.d.ts +61 -26
  11. package/controls/contextmenu/contextmenu.d.ts +26 -19
  12. package/controls/contextmenu/contextmenu.interface.d.ts +3 -0
  13. package/controls/contextmenu/contextmenuitem.d.ts +5 -0
  14. package/controls/contextmenu/contextmenuitembutton.d.ts +21 -20
  15. package/controls/datetime/date.d.ts +28 -31
  16. package/controls/datetime/datetime.d.ts +27 -31
  17. package/controls/datetime/time.d.ts +26 -30
  18. package/controls/dialog/dialog.d.ts +31 -43
  19. package/controls/grid/grid.d.ts +38 -36
  20. package/controls/grid/gridbutton.d.ts +13 -13
  21. package/controls/grid/gridcolumn.d.ts +8 -8
  22. package/controls/grid/gridcolumnaction.d.ts +3 -3
  23. package/controls/grid/gridcolumnbase.d.ts +45 -37
  24. package/controls/grid/gridimage.d.ts +2 -2
  25. package/controls/grid/model.d.ts +51 -42
  26. package/controls/grid/paging.d.ts +41 -43
  27. package/controls/input/input.d.ts +3 -3
  28. package/controls/input/inputarea.d.ts +5 -5
  29. package/controls/input/inputpassword.d.ts +7 -7
  30. package/controls/input/inputsearch.d.ts +13 -4
  31. package/controls/layout/formlayout.d.ts +17 -1
  32. package/controls/list/buildvaluestring.d.ts +6 -0
  33. package/controls/list/dropdown.d.ts +9 -51
  34. package/controls/list/dropdownoptions.d.ts +38 -0
  35. package/controls/multilanguage/multilanguageinput.d.ts +2 -2
  36. package/controls/multilanguage/multilanguageinputarea.d.ts +4 -4
  37. package/controls/static/formcontainer.d.ts +7 -3
  38. package/controls/tooltip/tooltip.d.ts +76 -69
  39. package/controls/treeview/treeview.d.ts +107 -107
  40. package/esm2015/common/basedatetimecontrol.js +185 -30
  41. package/esm2015/common/baseinputcontrol.js +2 -7
  42. package/esm2015/common/basemodelcontrol.js +109 -57
  43. package/esm2015/common/baseuploadcontrol.js +92 -59
  44. package/esm2015/controls/checkbox/checkbox.js +29 -6
  45. package/esm2015/controls/checkbox/radiobutton.js +94 -45
  46. package/esm2015/controls/contextmenu/contextmenu.interface.js +1 -0
  47. package/esm2015/controls/contextmenu/contextmenu.interface.ngfactory.js +7 -0
  48. package/esm2015/controls/contextmenu/contextmenu.js +22 -23
  49. package/esm2015/controls/contextmenu/contextmenuitem.js +13 -2
  50. package/esm2015/controls/contextmenu/contextmenuitembutton.js +34 -25
  51. package/esm2015/controls/datetime/date.js +44 -43
  52. package/esm2015/controls/datetime/datetime.js +43 -43
  53. package/esm2015/controls/datetime/time.js +43 -43
  54. package/esm2015/controls/dialog/dialog.js +41 -83
  55. package/esm2015/controls/grid/grid.js +21 -21
  56. package/esm2015/controls/grid/gridbutton.js +19 -13
  57. package/esm2015/controls/grid/gridcolumn.js +14 -7
  58. package/esm2015/controls/grid/gridcolumnaction.js +6 -5
  59. package/esm2015/controls/grid/gridcolumnbase.js +67 -55
  60. package/esm2015/controls/grid/gridimage.js +3 -3
  61. package/esm2015/controls/grid/model.js +51 -30
  62. package/esm2015/controls/grid/paging.js +40 -42
  63. package/esm2015/controls/input/input.js +6 -8
  64. package/esm2015/controls/input/inputarea.js +19 -12
  65. package/esm2015/controls/input/inputpassword.js +12 -12
  66. package/esm2015/controls/input/inputsearch.js +35 -6
  67. package/esm2015/controls/layout/formlayout.js +20 -8
  68. package/esm2015/controls/list/buildvaluestring.js +18 -0
  69. package/esm2015/controls/{treeview/ngtreeitemaction.ngfactory.js → list/buildvaluestring.ngfactory.js} +1 -1
  70. package/esm2015/controls/list/dropdown.js +16 -114
  71. package/esm2015/controls/list/dropdownoptions.js +72 -0
  72. package/esm2015/controls/{treeview/treeviewchild.ngfactory.js → list/dropdownoptions.ngfactory.js} +1 -1
  73. package/esm2015/controls/multilanguage/multilanguageinput.js +8 -14
  74. package/esm2015/controls/multilanguage/multilanguageinputarea.js +9 -15
  75. package/esm2015/controls/static/formcontainer.js +16 -5
  76. package/esm2015/controls/tooltip/tooltip.js +126 -245
  77. package/esm2015/controls/treeview/treeview.js +276 -231
  78. package/esm2015/interfaces/ISacConfigurationService.js +1 -1
  79. package/esm2015/interfaces/ISacIconService.js +1 -1
  80. package/esm2015/interfaces/ISacUploadEventCompleteState.js +1 -0
  81. package/esm2015/interfaces/ISacUploadEventCompleteState.ngfactory.js +7 -0
  82. package/esm2015/interfaces/ISacValidationKeyService.js +1 -1
  83. package/esm2015/interfaces/treeviewaction.interface.js +1 -0
  84. package/esm2015/interfaces/treeviewaction.interface.ngfactory.js +7 -0
  85. package/esm2015/public_api.js +15 -8
  86. package/esm2015/services/sac-configuration.service.js +31 -5
  87. package/esm2015/services/sac-icon.service.js +37 -1
  88. package/esm2015/services/sac-localisation.service.js +69 -180
  89. package/esm2015/services/sac-validationkey.service.js +12 -9
  90. package/esm2015/simpleangularcontrols-sac-common.js +1 -7
  91. package/esm2015/utilities/enums.js +5 -1
  92. package/esm2015/utilities/guid.js +4 -2
  93. package/esm2015/utilities/popuphelper.js +343 -0
  94. package/esm2015/utilities/popuphelper.ngfactory.js +7 -0
  95. package/esm2015/validation/equals.validator.js +14 -0
  96. package/esm2015/validation/equals.validator.ngfactory.js +7 -0
  97. package/esm2015/validation/isDateValid.js +9 -1
  98. package/esm2015/validation/mintextlength.validator.js +23 -0
  99. package/esm2015/validation/mintextlength.validator.ngfactory.js +7 -0
  100. package/esm2015/validation/notequals.validator.js +14 -0
  101. package/esm2015/validation/{minlength.validator.ngfactory.js → notequals.validator.ngfactory.js} +1 -1
  102. package/esm2015/validation/validation.class.js +35 -6
  103. package/fesm2015/simpleangularcontrols-sac-common.js +2070 -1498
  104. package/fesm2015/simpleangularcontrols-sac-common.js.map +1 -1
  105. package/interfaces/ISacConfigurationService.d.ts +20 -0
  106. package/interfaces/ISacIconService.d.ts +24 -0
  107. package/interfaces/ISacUploadEventCompleteState.d.ts +5 -0
  108. package/interfaces/ISacUploadEventCompleteState.ngfactory.d.ts +1 -0
  109. package/interfaces/ISacValidationKeyService.d.ts +2 -2
  110. package/interfaces/treeviewaction.interface.d.ts +4 -0
  111. package/interfaces/treeviewaction.interface.ngfactory.d.ts +1 -0
  112. package/package.json +2 -2
  113. package/public_api.d.ts +13 -6
  114. package/services/sac-configuration.service.d.ts +40 -0
  115. package/services/sac-icon.service.d.ts +49 -1
  116. package/services/sac-localisation.service.d.ts +10 -10
  117. package/services/sac-validationkey.service.d.ts +7 -7
  118. package/simpleangularcontrols-sac-common-10.0.0-rc.21.tgz +0 -0
  119. package/simpleangularcontrols-sac-common.d.ts +0 -6
  120. package/simpleangularcontrols-sac-common.metadata.json +1 -1
  121. package/utilities/enums.d.ts +3 -1
  122. package/utilities/popuphelper.d.ts +83 -0
  123. package/utilities/popuphelper.ngfactory.d.ts +1 -0
  124. package/validation/equals.validator.d.ts +2 -0
  125. package/validation/equals.validator.ngfactory.d.ts +1 -0
  126. package/validation/mintextlength.validator.d.ts +2 -0
  127. package/validation/mintextlength.validator.ngfactory.d.ts +1 -0
  128. package/validation/notequals.validator.d.ts +2 -0
  129. package/validation/notequals.validator.ngfactory.d.ts +1 -0
  130. package/validation/validation.class.d.ts +22 -3
  131. package/controls/treeview/ngtreeitemaction.d.ts +0 -40
  132. package/controls/treeview/treeviewchild.d.ts +0 -12
  133. package/esm2015/controls/treeview/ngtreeitemaction.js +0 -60
  134. package/esm2015/controls/treeview/treeviewchild.js +0 -18
  135. package/esm2015/validation/minlength.validator.js +0 -21
  136. package/simpleangularcontrols-sac-common-10.0.0-rc.2.tgz +0 -0
  137. package/validation/minlength.validator.d.ts +0 -2
  138. /package/controls/{treeview/ngtreeitemaction.ngfactory.d.ts → contextmenu/contextmenu.interface.ngfactory.d.ts} +0 -0
  139. /package/controls/{treeview/treeviewchild.ngfactory.d.ts → list/buildvaluestring.ngfactory.d.ts} +0 -0
  140. /package/{validation/minlength.validator.ngfactory.d.ts → controls/list/dropdownoptions.ngfactory.d.ts} +0 -0
@@ -1,138 +1,145 @@
1
- import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
1
  import { TooltipPosition } from '../../utilities/enums';
2
+ import { AfterViewChecked, ChangeDetectorRef, DoCheck, ElementRef, OnDestroy, OnInit } from '@angular/core';
3
3
  /**
4
4
  * Tooltip Component
5
5
  *
6
- * Benötigt im HTML Markup folgende Identifier
7
- * - container: Container für ng-content in welchem das Element angezeigt wird, wo der Tooltip angehängt wird.
8
- * - tooltip: Container für Tooltip
6
+ * Requires the following identifiers in the HTML markup
7
+ * - container: Container for ng-content in which the element is displayed where the tooltip is attached.
8
+ * - tooltip: Container for tooltip
9
9
  *
10
- * Tooltip muss in 2 Schritten angezeigt werden. In einem ersten Schritt wird der Tooltip Markup erzeugt mit (ngIf). In einem 2. Schritt
11
- * kann der Tooltip dann über die CSS visibility angezeigt werden. Wird dies nicht so gemacht, kann es bei gewissen Browsern zu einem Flacker Effekt führen.
10
+ * Tooltip must be displayed in 2 steps. In a first step the tooltip markup is created with (ngIf). In a 2nd step
11
+ * the tooltip can then be displayed via the CSS visibility. If this is not done, it can lead to a flickering effect in certain browsers.
12
12
  *
13
13
  */
14
- export declare class SacTooltipCommon implements OnInit, OnDestroy {
15
- private cdRef;
16
- private ref;
14
+ export declare abstract class SacTooltipCommon implements OnInit, OnDestroy, AfterViewChecked, DoCheck {
15
+ private readonly cdRef;
16
+ private readonly ref;
17
17
  /**
18
- * Property für Enum in Angular HTML Template
18
+ * Helper class to display tooltip on correct position
19
19
  */
20
- TooltipPosition: typeof TooltipPosition;
20
+ private readonly popupHelper;
21
21
  /**
22
- * Definiert ob der Tooltip sichtbar ist
22
+ * Inline mode for tooltip
23
23
  */
24
- private _isTooltipVisible;
24
+ private _inlinemode;
25
25
  /**
26
- * Position des Tooltips oben
26
+ * Defines whether the tooltip is visible
27
27
  */
28
- TopPos: number;
28
+ private _isTooltipVisible;
29
29
  /**
30
- * Position des Tooltips links
30
+ * Containers for the tooltip
31
31
  */
32
- LeftPos: number;
32
+ private tooltipcontainer;
33
33
  /**
34
- * Position des Tooltips. Werte: left|top|right|bottom|auto
35
- *
36
- * Wert 'auto' kann mit einem anderen Wert kombiniert werden.
34
+ * Position of the tooltip on the left
37
35
  */
38
- position: string;
36
+ IsTooltipContentVisible: boolean;
39
37
  /**
40
- * Text für ToolTip
38
+ * Position des Tooltips links
41
39
  */
42
- tooltiptext: string;
40
+ LeftPos: number;
43
41
  /**
44
- * Inline Mode für Tooltip
42
+ * Property for enum in Angular HTML template
45
43
  */
46
- private _inlinemode;
44
+ TooltipPosition: typeof TooltipPosition;
47
45
  /**
48
- * Definiert ob der Tooltip sichtbar sein soll
46
+ * Position of the tooltip at the top
49
47
  */
50
- IsTooltipContentVisible: boolean;
48
+ TopPos: number;
51
49
  /**
52
- * Setter für Inline Mode für Tooltip
50
+ * Name of the container for content (e.g. icon) on which the tooltip is displayed.
53
51
  */
54
- set inlinemode(value: boolean);
52
+ content: ElementRef<HTMLElement>;
55
53
  /**
56
- * Getter für Inline Mode für Tooltip
54
+ * Position of the picker arrow at the left
57
55
  */
58
- get inlinemode(): boolean;
56
+ posArrowLeft: number | null;
59
57
  /**
60
- * Name des Containers für Content (z.B. Icon) auf welchem der Tooltip angezeigt wird.
58
+ * Position of the picker arrow at the top
61
59
  */
62
- content: ElementRef<HTMLElement>;
60
+ posArrowTop: number | null;
63
61
  /**
64
- * Name des Containers für den Tooltip
62
+ * Position of the tooltip. Values: left|top|right|bottom|auto
63
+ *
64
+ * Value 'auto' can be combined with another value.
65
65
  */
66
- private tooltipcontainer;
66
+ position: string;
67
67
  /**
68
- * Setter für Name des Containers für den Tooltip. Wird benötigt, da Tooltip via NGIF ausgeblendet werden kann.
68
+ * Text for ToolTip
69
69
  */
70
- set tooltip(content: ElementRef);
70
+ tooltiptext: string;
71
71
  /**
72
72
  * Konstruktor
73
73
  * @param ref Element Referenz
74
74
  */
75
75
  constructor(cdRef: ChangeDetectorRef, ref: ElementRef);
76
76
  /**
77
- * Ervent wenn das Control initialisert wird
78
- */
79
- ngOnInit(): void;
80
- /**
81
- * Event wenn das Control zerstört wird.
77
+ * Property for inline mode for tooltip. Sets the display mode on the wrapper element to `inline`
82
78
  */
83
- ngOnDestroy(): void;
79
+ get inlinemode(): boolean;
84
80
  /**
85
- * Berechnet die Position des Tooltips von Oben
81
+ * Setter for inline mode for tooltip
86
82
  */
87
- private getTopPosition;
83
+ set inlinemode(value: boolean);
88
84
  /**
89
- * Berechnet die Position des Tooltips von Links
85
+ * Setter for the name of the container for the tooltip. Is required as the tooltip can be hidden via ngIf.
90
86
  */
91
- private getLeftPosition;
87
+ set tooltip(content: ElementRef);
88
+ get tooltop(): ElementRef;
92
89
  /**
93
- * Berechnet die Höhe des Tooltips
90
+ * Returns the position of the tooltip
94
91
  */
95
- private getToolTipHeight;
92
+ GetTooltipPosition(): TooltipPosition;
96
93
  /**
97
- * Berechnet die Breite die Tooltips
94
+ * Hide tooltip
98
95
  */
99
- private getToolTipWidth;
96
+ HideTooltip(): void;
100
97
  /**
101
- * Definiert ob der Tooltip im Markup vorhanden ist
98
+ * Defines whether the tooltip is present in the markup
102
99
  */
103
100
  IsTooltipVisible(): boolean;
104
101
  /**
105
- * Tooltip anzeigen
102
+ * Show tooltip
106
103
  */
107
104
  ShowTooltip(): void;
108
105
  /**
109
- * Tooltip ausblenden
106
+ * Calculates the height of the tooltip
110
107
  */
111
- HideTooltip(): void;
108
+ getToolTipHeight(): number;
112
109
  /**
113
- * Methode wenn Content geändert hat und Proporties im UI neu gesetzt werden müssen.
110
+ * Calculates the width of the tooltips
114
111
  */
115
- private onContentChange;
112
+ getToolTipWidth(): number;
116
113
  /**
117
- * Gibt die Position des Tooltips zurück
114
+ * Detect Changes after view checked. Prevent ExpressionChangedAfterItHasBeenCheckedError error
118
115
  */
119
- GetTooltipPosition(): TooltipPosition;
116
+ ngAfterViewChecked(): void;
120
117
  /**
121
- * Definiert ob AutoPosition aktiv ist
118
+ * Detect UI Changes to Calculate Tooltip correct
122
119
  */
123
- private IsAutoPosition;
120
+ ngDoCheck(): void;
124
121
  /**
125
- * Gibt die definierte Position für den Tooltip zurück
122
+ * Event when the control is destroyed.
126
123
  */
127
- private GetPosition;
124
+ ngOnDestroy(): void;
128
125
  /**
129
- * Gibt zurück, ob die Position konfiguriert wurde
130
- *
131
- * @param position Position auf welche geprüft wird
126
+ * Event when the control is initialized
127
+ */
128
+ ngOnInit(): void;
129
+ /**
130
+ * Offset for Tooltip. Required for BS4/BS5 to create padding
132
131
  */
133
- private HasPosition;
132
+ protected abstract getTooltipOffset(): number;
133
+ /**
134
+ * Calculates the position of the tooltip from links
135
+ */
136
+ private getLeftPosition;
137
+ /**
138
+ * Calculates the position of the tooltip from the top
139
+ */
140
+ private getTopPosition;
134
141
  /**
135
- * Prüft ob die Position gültig ist, resp. der Tooltip auf die Position platz hat
142
+ * method if content has changed and proportions need to be reset in the UI.
136
143
  */
137
- private ValidatePositions;
144
+ private readonly onContentChange;
138
145
  }
@@ -1,185 +1,185 @@
1
- import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
1
+ import { SacBaseModelControl } from '../../common/basemodelcontrol';
2
+ import { TreeviewAction } from '../../interfaces/treeviewaction.interface';
3
+ import { SacFormLayoutCommon } from '../layout/formlayout';
4
+ import { EventEmitter, Injector, TemplateRef } from '@angular/core';
5
+ import { AbstractControl, ValidationErrors } from '@angular/forms';
2
6
  /**
3
7
  * Basis Komponente für SacTreeView
4
8
  */
5
- export declare class SacTreeViewCommon implements OnInit {
9
+ export declare class SacTreeviewCommon extends SacBaseModelControl<any> {
6
10
  /**
7
- * Das Property enthielt boolean Wert und deffiniert, ob alle Items collapsed sind. Default value: undefined/null
11
+ * Event when Action is clicked on Node. An object of the type 'TreeviewAction' is returned. In the default case, 'action' in this object is always the value 'default'. The value can be changed via the 'templateaction'.
8
12
  */
9
- _collapseAll: boolean;
13
+ actionclicked: EventEmitter<TreeviewAction>;
10
14
  /**
11
- * Das Property enthielt boolean Wert und deffiniert, ob alle Items selected sind. Default value: undefined/null
15
+ * Property on the data object that contains the children of the structure element. Must be an array of objects. The default value is 'children'
12
16
  */
13
- private _selectAll;
17
+ attrchildren: string;
14
18
  /**
15
- * Das Property enthielt array of nodes. Default value: empty array [].
19
+ * Defines the property on the 'data' object with which the actions for a node can be deactivated. A 'disabled' property is used by default.
16
20
  */
17
- nodes: any[];
21
+ attrdisableaction: string;
18
22
  /**
19
- * Das Property enthielt node attribute: 'isCollapsed'. Es wird benutzt beim rendering. Für Expand/Collapsed Sicht des Node(Wert)
23
+ * Property on the 'data' object that stores the expanded state. Property must be of type boolean. Default is 'expanded'
20
24
  */
21
- collapseAttr: string;
25
+ attrexanded: string;
22
26
  /**
23
- * Das Property enthielt node attribute: 'isSelected'. Es wird benutzt beim Vorbereitung des Data des TreeView
27
+ * Property for saving the HoverState on the field. If the property is not present on the node, it is automatically created and removed again. The value can usually be left at the default value unless there is a conflict with a property on the node that is required for other purposes.
24
28
  */
25
- selectAttr: string;
29
+ attrhoverstate: string;
26
30
  /**
27
- * Das Property enthielt node attribute: 'isIndeterminate'. Es wird benutzt beim Vorbereitung des Data des TreeView
31
+ * Property on 'data' object, which contains the icon for the node. By default, the property is not set, which hides the icon in the node.
28
32
  */
29
- inDeterminateAttr: string;
33
+ attricon: string | null;
30
34
  /**
31
- * Providen data for tree.
35
+ * property on the 'data' object contains an ID of the node. The default is 'id'. If the property is set to NULL, the selectedId event is no longer triggered.
32
36
  */
33
- private _data;
37
+ attrid: string | null;
34
38
  /**
35
- * Getter für Data des TreeView
39
+ * Property on 'data' object, which contains the label for the node. Default is 'label'
36
40
  */
37
- get data(): any[];
41
+ attrlabel: string;
38
42
  /**
39
- * Input Property für Data des TreeView
43
+ * Property on 'data' object, which defines whether the node is selected or not. It should be ensured that only 1 node has the value for Selected set to true. Default is 'selected'.
40
44
  */
41
- set data(value: any[]);
45
+ attrselected: string;
42
46
  /**
43
- * Input Property für template des TreeView. Type: TemplateRef<any>.
47
+ * Event when a node is collapsed. Returns the node element as a parameter
44
48
  */
45
- template: TemplateRef<any>;
49
+ collabsed: EventEmitter<any>;
46
50
  /**
47
- * Die Directive erhält die actions für das TreeView
51
+ * The property contains an array of nodes. The data must already map the tree via child properties.
48
52
  */
49
- set treeviewTemplate(v: TemplateRef<any>);
53
+ data: any[];
50
54
  /**
51
- * Getter für das TreeView Template
55
+ * Activates the 'expand' and 'collabse' event even if a node has no children. This is helpful if node elements are to be reloaded at runtime.
52
56
  */
53
- get treeviewTemplate(): TemplateRef<any>;
57
+ enableasynchload: boolean | string;
54
58
  /**
55
- * Input property erhält Icon für das Template
59
+ * Activates Ellipsis on the node labels
56
60
  */
57
- fileicontemplate: TemplateRef<any>;
61
+ enableellipsis: boolean;
58
62
  /**
59
- * Setter property. Deffiniert das FileIcon für das TreeView
63
+ * Event when a node is expanded. Returns the node element as a parameter
60
64
  */
61
- set treefileicon(v: TemplateRef<any>);
65
+ expanded: EventEmitter<any>;
62
66
  /**
63
- * Getter property. Ergibt das FileIcon für das TreeView
67
+ * Defines whether an icon for the expanded/collapsed status should be displayed.
64
68
  */
65
- get treefileicon(): TemplateRef<any>;
69
+ expandedstate: boolean | string;
66
70
  /**
67
- * Input property für den Namen des TreeView. Type string. Default value: ""
71
+ * A node must be selected
68
72
  */
69
- name: string;
70
- /**
71
- * A flag indicating data is flatten in array and prepare is required.(Default
72
- * is false).
73
- */
74
- prepareData: boolean;
75
- /**
76
- * Attribute for Text in Tree
77
- */
78
- textAttr: string;
79
- /**
80
- * Name of ID property in input data.
81
- */
82
- idAttr: string;
73
+ isrequired: boolean;
83
74
  /**
84
- * Name of parent property in input data.
75
+ * Name of the TreeView control
85
76
  */
86
- parentAttr: string;
87
- /**
88
- * Name of children list property in input data.
89
- */
90
- childrenAttr: string;
91
- /**
92
- * Title des Treeview
93
- */
94
- title: any;
95
- /**
96
- * Collapse or expand all parent nodes.
97
- */
98
- set collapseall(value: boolean);
77
+ name: string;
99
78
  /**
100
- * Getter für das collapse property. Ergibt boolean Wert, ob die Items collapsed/expand sind.
79
+ * Event when a node is selected. Returns the id attribute as a parameter. The event is not triggered if 'attrid' is not set.
101
80
  */
102
- get collapseall(): boolean;
81
+ selected: EventEmitter<any>;
103
82
  /**
104
- * Select or deselect all nodes.
83
+ * Event when a node is selected. Returns the node element as a parameter.
105
84
  */
106
- set selectall(value: boolean);
85
+ selectednode: EventEmitter<any>;
107
86
  /**
108
- * Input property - setter. Deffiniert das ID des selektierten Item(node)
87
+ * Defines that the action template is displayed independently of the selected state. If the value is 'true', the action template is displayed for every element.
109
88
  */
110
- set selectedid(v: any);
89
+ showactionalways: any;
111
90
  /**
112
- * Getter. Ergibt das ID des selektierten Item(node)
91
+ * Custom template for actions per node. Template parameters are: 'node'
113
92
  */
114
- get selectedId(): any;
93
+ templateaction: TemplateRef<any>;
115
94
  /**
116
- * Das Property erhält das selektierte Wert(node). Default value: undefined/null
95
+ * Custom template for icon per node. Template parameters are: 'node'
117
96
  */
118
- private _selectedNode;
97
+ templateicon: TemplateRef<any>;
119
98
  /**
120
- * Setter für das selektierte Wert(node). Wenn aufgerufen das ID und TextAttr des selected Node wird emitted
99
+ * Custom template for the label area per node. Template parameters are: 'node' and 'label'
121
100
  */
122
- set selectedNode(v: any);
101
+ templatelabel: TemplateRef<any>;
123
102
  /**
124
- * Getter für das selektierte Wert(node). Ergibt das selektierte Wert(node).
103
+ * Resource Key für Validation Message Required bei Control
125
104
  */
126
- get selectedNode(): any;
105
+ validationmessagerequired: string;
127
106
  /**
128
- * Output Emitter. Emit das ID des selected Node.
107
+ * Resource Key für Validation Message Required in Validation Summary
129
108
  */
130
- selectedidchange: EventEmitter<any>;
109
+ validationmessagesummaryrequired: string;
131
110
  /**
132
- * Output Emitter. Emit das TextAttr des selected Node.
111
+ * Constructor
112
+ * @param injector Service Injector
133
113
  */
134
- selectedtextchanged: EventEmitter<string>;
114
+ constructor(formlayout: SacFormLayoutCommon, injector: Injector);
115
+ get iconAction(): string;
135
116
  /**
136
- * Output Emitter. Emit wenn ein Node selektiert wird.
117
+ * CSS icon for folders in tree there are collabsed
118
+ * @returns css class with icon
137
119
  */
138
- selecteditem: EventEmitter<string>;
120
+ get iconFolderCollabsed(): string;
139
121
  /**
140
- * A lifecycle hook that is called after Angular has initialized all data-bound properties of a directive.
141
- * Define an ngOnInit() method to handle any additional initialization tasks.
122
+ * CSS icon class for folders without subfolders
123
+ * @returns css class with icon
142
124
  */
143
- ngOnInit(): void;
125
+ get iconFolderEmpty(): string;
144
126
  /**
145
- * Funktion setzt alle parent items recusiv zum selected node
146
- * auf collapsed = false
127
+ * CSS icon for folders in tree there are expanded
128
+ * @returns css class with icon
147
129
  */
148
- private openSelectedNode;
130
+ get iconFolderOpen(): string;
149
131
  /**
150
- * Die Methode vorbereitet die Daten für das TreeView. Die Funktion sollte geändert werden abhängig von dem kommenden Daten (wenn array)
132
+ * Creates an array of a certain size. Is required for a For in the UI, as Angular does not support counting loops
133
+ * @param size Size of the array
134
+ * @returns Array
151
135
  */
152
- private LoadTree;
136
+ count(size: number): Array<void>;
137
+ getChildren(node: any): any[];
138
+ getStringField(node: any, fieldname: string): any;
139
+ hasChildren(node: any): boolean;
140
+ isDisabledState(node: any): boolean;
141
+ isExpandedState(node: any): boolean;
142
+ isHoverState(node: any): boolean;
143
+ isSelectedState(node: any): boolean;
153
144
  /**
154
- * Die Methode collapse/expand den selectierten Node
145
+ * Method is called by clicking an action
146
+ * @param action action and node
155
147
  */
156
- onCollapseClick(node: any): void;
148
+ onActionClicked(action: TreeviewAction): void;
157
149
  /**
158
- * Die Methode set den selektierten Node und emit es.
150
+ * Method is called when Node in Tree is clicked
151
+ * @param node Selected Node
159
152
  */
160
- onClick(node: any): void;
153
+ onNodeClicked(node: any): void;
161
154
  /**
162
- * Die Methode wird ein event mit Meldung zu Parent emit-en.
155
+ * Sets the hover state on a node
156
+ * @param node Node on which the status is set
157
+ * @param state Activate or deactivate HoverState
163
158
  */
164
- sendMsgToParent(msg: any): void;
159
+ setHoverState(node: any, state: boolean): void;
165
160
  /**
166
- * Die Methode wird alle Nodes collapse
161
+ * Sets the selected state on a node
162
+ * @param node Node which is marked as Selected
167
163
  */
168
- collapseAllNode(command: any): void;
164
+ setSelectedState(node: any): void;
169
165
  /**
170
- * Funktion gibt node aus der liste zurück, welches das Value auf dem gewünschten Attribut hat
171
- * Wenn node nicht gefunden wird, wird null zurück gegeben
172
- * @param data Liste der nodes
173
- * @param searchValue Das gesuchte value
174
- * @param attr Der namen des Attributs auf dem das value gesucht wird
166
+ * Validates the model state of the control
167
+ * @param c Control instance
168
+ * @returns Returns a validation error, if present. Otherwise, as Result is NULL
175
169
  */
176
- private findNode;
170
+ validateData(c: AbstractControl): ValidationErrors | null;
177
171
  /**
178
- * Die Methode editiert (recursive) alle eingegebene Nodes abhängig von gegebenen Attibute und Value Kriterien.
172
+ * Saves the data from the model binding
173
+ * @param value Id of the selected node
179
174
  */
180
- private _recursiveEdit;
175
+ writeValue(value: any): void;
181
176
  /**
182
- * Die Methode erstellt eine standarte Sicht-Liste von Nodes
177
+ * Searches for a node based on the value in the ID attribute
178
+ * @param node Node
179
+ * @param value Value of the Id attribute
180
+ * @returns Returns the node if it is found. If not, NULL is returned.
183
181
  */
184
- private _getPreparedData;
182
+ private findNodeById;
183
+ private invertExpandedState;
184
+ private resetSelectedState;
185
185
  }