@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,25 +1,78 @@
1
- import { AfterViewInit, ElementRef, Injector } from '@angular/core';
2
- import { AbstractControl, ValidationErrors } from '@angular/forms';
3
- import { Moment } from 'moment';
4
1
  import { SacFormLayoutCommon } from '../controls/layout/formlayout';
2
+ import { TooltipPosition } from '../utilities/enums';
5
3
  import { SacBaseModelControl } from './basemodelcontrol';
4
+ import { ChangeDetectorRef, DoCheck, ElementRef, Injector, OnDestroy, OnInit } from '@angular/core';
5
+ import { AbstractControl, ValidationErrors } from '@angular/forms';
6
+ import * as moment_ from 'moment';
6
7
  /**
7
8
  * Base Klasse für Date/Time Controls
8
9
  */
9
- export declare abstract class SacBaseDateTimeControl extends SacBaseModelControl<Date> implements AfterViewInit {
10
+ export declare abstract class SacBaseDateTimeControl extends SacBaseModelControl<Date> implements OnInit, OnDestroy, DoCheck {
10
11
  protected elementRef: ElementRef;
12
+ private readonly cdRef;
13
+ /**
14
+ * Helper class to display tooltip on correct position
15
+ */
16
+ private readonly popupHelper;
11
17
  /**
12
18
  * das property enthielt das Value als string. Default ist ''
13
19
  */
14
20
  protected _valueAsString: string;
21
+ /**
22
+ * Containers for the datetime picker
23
+ */
24
+ protected pickercontainer: ElementRef<HTMLElement>;
25
+ /**
26
+ * Property for enum in Angular HTML template
27
+ */
28
+ TooltipPosition: typeof TooltipPosition;
29
+ /**
30
+ * Definiert ob der Date Selector angezeigt wird
31
+ */
32
+ _showselector: boolean;
15
33
  /**
16
34
  * Definiert das Control als Required
17
35
  */
18
36
  isrequired: boolean;
37
+ /**
38
+ * Moment JS Instance
39
+ */
40
+ moment: any;
41
+ /**
42
+ * Arrow Item of Picker Element. Required to set the position of arrow correctly
43
+ */
44
+ pickerPosition: typeof TooltipPosition;
45
+ pickerarrow: ElementRef<HTMLElement> | null;
46
+ /**
47
+ * Name of the container for content (e.g. icon) on which the tooltip is displayed.
48
+ */
49
+ pickerbutton: ElementRef<HTMLElement>;
19
50
  /**
20
51
  * TextBox Placeholder
21
52
  */
22
53
  placeholder: string;
54
+ /**
55
+ * Position of the picker arrow at the left
56
+ */
57
+ posArrowLeft: number | null;
58
+ /**
59
+ * Position of the picker arrow at the top
60
+ */
61
+ posArrowTop: number | null;
62
+ /**
63
+ * Position of the picker at the left
64
+ */
65
+ posPopupLeft: number;
66
+ /**
67
+ * Position of the picker at the top
68
+ */
69
+ posPopupTop: number;
70
+ /**
71
+ * Position of the datetime picker. Values: left|top|right|bottom|auto
72
+ *
73
+ * Value 'auto' can be combined with another value.
74
+ */
75
+ position: string;
23
76
  /**
24
77
  * Resource Key für Validation Message DateTimeFormat bei Control
25
78
  */
@@ -42,23 +95,50 @@ export declare abstract class SacBaseDateTimeControl extends SacBaseModelControl
42
95
  * @param injector Injector for injecting services
43
96
  * @param elementRef reference to html element
44
97
  */
45
- constructor(formlayout: SacFormLayoutCommon, injector: Injector, elementRef: ElementRef);
98
+ constructor(formlayout: SacFormLayoutCommon, injector: Injector, elementRef: ElementRef, cdRef: ChangeDetectorRef);
46
99
  /**
47
- * Das Input bekommt das value von typ string
100
+ * Setter for the name of the container for the tooltip. Is required as the tooltip can be hidden via ngIf.
48
101
  */
49
- set valuestring(v: string);
102
+ set picker(picker: ElementRef);
103
+ get tooltop(): ElementRef;
50
104
  /**
51
105
  * getter für valuestring
52
106
  */
53
107
  get valuestring(): string;
108
+ /**
109
+ * Das Input bekommt das value von typ string
110
+ */
111
+ set valuestring(v: string);
112
+ /**
113
+ * Die methode returns dateTime in string
114
+ */
115
+ abstract GetDateTimeFormatString(): string;
116
+ /**
117
+ * Returns the position of the tooltip
118
+ */
119
+ GetPickerPosition(): TooltipPosition;
120
+ /**
121
+ * Die methode modifiziert das eingegebene Value von typ Moment
122
+ */
123
+ abstract ModifyParsedDateTimeValue(v: moment_.Moment): moment_.Moment;
54
124
  /**
55
125
  * JSON Date String in ein UTC DateTime Object konvertieren, welches vom Control verwendete werden kann
56
126
  */
57
- getDate(timestamp: any): any;
127
+ getDate(timestamp: any): moment.Moment;
128
+ /**
129
+ * Calculates the height of the tooltip
130
+ */
131
+ getPickerHeight(): number;
132
+ /**
133
+ * Calculates the width of the picker
134
+ */
135
+ getPickerWidth(): number;
136
+ ngDoCheck(): void;
137
+ ngOnDestroy(): void;
58
138
  /**
59
139
  * Init Event
60
140
  */
61
- ngAfterViewInit(): void;
141
+ ngOnInit(): void;
62
142
  /**
63
143
  * setzt das value von typ string zu property valuestring
64
144
  */
@@ -71,13 +151,19 @@ export declare abstract class SacBaseDateTimeControl extends SacBaseModelControl
71
151
  * Overwrite WriteValue to Set correct Date Object
72
152
  */
73
153
  writeValue(value: Date | string): void;
154
+ protected getArrowHeight(): number;
155
+ protected getArrowWidth(): number;
74
156
  /**
75
- * Die methode returns dateTime in string
157
+ * Calculates the position of the tooltip from links
76
158
  */
77
- abstract GetDateTimeFormatString(): string;
159
+ protected getPositionLeft(): number;
78
160
  /**
79
- * Die methode modifiziert das eingegebene Value von typ Moment
161
+ * Calculates the position of the tooltip from the top
162
+ */
163
+ protected getPositionTop(): number;
164
+ /**
165
+ * method if content has changed and proportions need to be reset in the UI.
80
166
  */
81
- abstract ModifyParsedDateTimeValue(v: Moment): Moment;
82
- private SetDateTimeFormat;
167
+ private readonly onContentChange;
168
+ private setDateTimeFormat;
83
169
  }
@@ -27,10 +27,6 @@ export declare abstract class SacInputBase<VALUE> extends SacBaseModelControl<VA
27
27
  * Definiert das Feld als valid/invalid von eingegebenen regex-pattern
28
28
  */
29
29
  regexvalidation: string;
30
- /**
31
- * Text welcher als Tooltip angezeigt wird.
32
- */
33
- tooltiptext: string;
34
30
  /**
35
31
  * Methode validiert Input wenn KeyPress-Event passiert
36
32
  */
@@ -1,21 +1,25 @@
1
- import { AfterViewInit, Injector, OnInit } from '@angular/core';
2
- import { AbstractControl, ControlValueAccessor, FormControl, ValidationErrors, Validator } from '@angular/forms';
3
- import { Observable } from 'rxjs';
4
1
  import { SacFormLayoutCommon } from '../controls/layout/formlayout';
5
2
  import { ControlHeight } from '../enums/ControlHeight';
6
3
  import { ISacConfigurationService } from '../interfaces/ISacConfigurationService';
4
+ import { ISacIconService } from '../interfaces/ISacIconService';
7
5
  import { ISacLabelSizes } from '../interfaces/ISacLabelSizes';
8
6
  import { ISacLocalisationService } from '../interfaces/ISacLocalisationService';
9
7
  import { ISacValidationKeyService } from '../interfaces/ISacValidationKeyService';
8
+ import { Injector, OnInit } from '@angular/core';
9
+ import { AbstractControl, ControlValueAccessor, FormControl, ValidationErrors, Validator } from '@angular/forms';
10
+ import { Observable } from 'rxjs';
10
11
  /**
11
12
  * Abstract Klasse für SacBaseModelControl. Implements ControlValueAccessor, Validator, OnInit
12
13
  */
13
- export declare abstract class SacBaseModelControl<VALUE> implements ControlValueAccessor, Validator, OnInit, AfterViewInit {
14
- private injector;
14
+ export declare abstract class SacBaseModelControl<VALUE> implements ControlValueAccessor, Validator, OnInit {
15
+ private readonly injector;
15
16
  /**
16
17
  * Inline Errors für das Control
17
18
  */
18
19
  private _inlineerrorenabled;
20
+ /**
21
+ * Label Text
22
+ */
19
23
  private _label;
20
24
  /**
21
25
  * Service for loading default settings for the controls
@@ -45,6 +49,10 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
45
49
  * Form layout instance if exists
46
50
  */
47
51
  protected formlayout: SacFormLayoutCommon;
52
+ /**
53
+ * icon service
54
+ */
55
+ protected iconService: ISacIconService;
48
56
  /**
49
57
  * Service für Error Localisation
50
58
  */
@@ -53,6 +61,10 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
53
61
  * ngControl
54
62
  */
55
63
  protected ngControl: FormControl;
64
+ /**
65
+ * ControlHeight enum for use in HTML markup
66
+ */
67
+ ControlHeight: typeof ControlHeight;
56
68
  /**
57
69
  * Defines the standard height of the components
58
70
  */
@@ -65,6 +77,14 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
65
77
  * Deaktiviert das Label im Template
66
78
  */
67
79
  disablelabel: boolean;
80
+ /**
81
+ * Text to support the user during input.
82
+ */
83
+ helptext: string;
84
+ /**
85
+ * Mode for display helptext
86
+ */
87
+ helptextmode: 'tooltip' | 'text' | null;
68
88
  /**
69
89
  * defines that error messages are displayed under the controls
70
90
  */
@@ -101,10 +121,6 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
101
121
  * Name des Controls
102
122
  */
103
123
  name: string;
104
- /**
105
- * ControlHeight enum for use in HTML markup
106
- */
107
- ControlHeight: typeof ControlHeight;
108
124
  /**
109
125
  * Leere Implementation von "propagateChange". Muss gemacht werden, damit kein Fehler entsteht
110
126
  */
@@ -113,6 +129,10 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
113
129
  * Leere Implementation von "propagateTouch". Muss gemacht werden, damit kein Fehler entsteht
114
130
  */
115
131
  propagateTouch: any;
132
+ /**
133
+ * Detach label text and tooltip from each other in Label so that label and tooltip can be aligned differently. This is in Bootstrap 3 not supported!
134
+ */
135
+ splitlabelandhelptext: boolean | null;
116
136
  /**
117
137
  * Service to receive standard validation message keys and texts
118
138
  */
@@ -124,23 +144,21 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
124
144
  */
125
145
  constructor(formlayout: SacFormLayoutCommon, injector: Injector);
126
146
  /**
127
- * Aktiviert oder Deaktiviert die Inline Errors für das Control
147
+ * Get Icon for Helptext Tooltip
128
148
  */
129
- set inlineerrorenabled(value: boolean | null);
149
+ get HelptextTooltipIcon(): string;
130
150
  /**
131
- * Definiert den Label Text
151
+ * Methode ergibt Boolean Wert für dirty
132
152
  */
133
- set label(v: string);
153
+ get dirty(): boolean;
134
154
  /**
135
- * Set Methode für NgModel Binding in Html Markup
136
- * Input wird benötigt, damit der Wert auch über das Markup gesetzt werden kann.
155
+ * Show error messages inline
137
156
  */
138
- set value(v: VALUE);
157
+ get inlineerrorenabled(): boolean | null;
139
158
  /**
140
- * Methode ergibt Boolean Wert für dirty
159
+ * Aktiviert oder Deaktiviert die Inline Errors für das Control
141
160
  */
142
- get dirty(): boolean;
143
- get inlineerrorenabled(): boolean | null;
161
+ set inlineerrorenabled(value: boolean | null);
144
162
  /**
145
163
  * Methode ergibt boolean Wert wenn Form invalid oder nicht invalid ist
146
164
  */
@@ -157,6 +175,10 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
157
175
  * Definiert den Label Text
158
176
  */
159
177
  get label(): string;
178
+ /**
179
+ * Definiert den Label Text
180
+ */
181
+ set label(v: string);
160
182
  /**
161
183
  * returns an object with all label sizes. These values can then be transferred to corresponding CSS classes using a pipe
162
184
  */
@@ -170,13 +192,14 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
170
192
  */
171
193
  get value(): VALUE;
172
194
  /**
173
- * Methode ergibt Error anhand von gegebenen Kriterien
195
+ * Set Methode für NgModel Binding in Html Markup
196
+ * Input wird benötigt, damit der Wert auch über das Markup gesetzt werden kann.
174
197
  */
175
- GetErrorMessage(): Observable<string>;
198
+ set value(v: VALUE);
176
199
  /**
177
- * In Angular 10 the Control Label for Reactive Forms can be set first time here. With Angular 13 is supported by init in OnInit
200
+ * Methode ergibt Error anhand von gegebenen Kriterien
178
201
  */
179
- ngAfterViewInit(): void;
202
+ GetErrorMessage(): Observable<string>;
180
203
  /**
181
204
  * Init Event
182
205
  */
@@ -210,14 +233,14 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
210
233
  * Validator Methode
211
234
  */
212
235
  validate(c: AbstractControl): ValidationErrors | null;
213
- /**
214
- * Methode zum schreiben von Werten aus dem Model in das Control
215
- */
216
- writeValue(value: VALUE): void;
217
236
  /**
218
237
  * Abstrakte Validator Methode
219
238
  */
220
239
  abstract validateData(c: AbstractControl): ValidationErrors | null;
240
+ /**
241
+ * Methode zum schreiben von Werten aus dem Model in das Control
242
+ */
243
+ writeValue(value: VALUE): void;
221
244
  /**
222
245
  * Method can Overwriten in Parent Classes
223
246
  * @param value Wert welcher in den korrekten Typ konvertiert werden soll
@@ -241,6 +264,10 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
241
264
  * Set component height from property or parent layout control
242
265
  */
243
266
  private setComponentHeight;
267
+ /**
268
+ * Set mode for helptext. Can be tooltip or text
269
+ */
270
+ private setHelpTextMode;
244
271
  /**
245
272
  * Set adaptive label property from parent layout control
246
273
  */
@@ -249,4 +276,5 @@ export declare abstract class SacBaseModelControl<VALUE> implements ControlValue
249
276
  * Set label sizes from property or parent layout control
250
277
  */
251
278
  private setLabelSizes;
279
+ private setLabelSplitMode;
252
280
  }
@@ -1,21 +1,17 @@
1
+ import { SacFormLayoutCommon } from '../controls/layout/formlayout';
2
+ import { ISacLocalisationService } from '../interfaces/ISacLocalisationService';
3
+ import { ISacUploadEventCompleteState } from '../interfaces/ISacUploadEventCompleteState';
4
+ import { SacBaseModelControl } from './basemodelcontrol';
1
5
  import { EventEmitter, Injector, NgZone, OnDestroy, OnInit, Renderer2 } from '@angular/core';
2
6
  import { AbstractControl, ValidationErrors } from '@angular/forms';
3
7
  import { UploadState, UploadxService } from 'ngx-uploadx';
4
8
  import { Observable } from 'rxjs';
5
- import { SacFormLayoutCommon } from '../controls/layout/formlayout';
6
- import { ISacIconService } from '../interfaces/ISacIconService';
7
- import { ISacLocalisationService } from '../interfaces/ISacLocalisationService';
8
- import { SacBaseModelControl } from './basemodelcontrol';
9
9
  /**
10
10
  * Base Klasse für Uploader Control
11
11
  */
12
12
  export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<VALUE> implements OnInit, OnDestroy {
13
13
  private renderer;
14
14
  private ngZone;
15
- /**
16
- * File Input Control
17
- */
18
- private uploadInput;
19
15
  /**
20
16
  * Erlaubte Dateitypen
21
17
  */
@@ -32,54 +28,62 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
32
28
  * API Endpoint
33
29
  */
34
30
  private _endpoint;
31
+ /**
32
+ * Token for Bearer Authentication
33
+ */
34
+ private _token;
35
35
  /**
36
36
  * Upload Settings
37
37
  */
38
38
  private options;
39
39
  /**
40
- * icon service to receive icons for uploader
40
+ * File Input Control
41
41
  */
42
- protected iconService: ISacIconService;
42
+ private uploadInput;
43
43
  /**
44
44
  * Upload Service
45
45
  */
46
46
  protected uploadService: UploadxService;
47
+ /**
48
+ * Handling von neuen Files im Input Control
49
+ */
50
+ fileListener: () => void;
47
51
  /**
48
52
  * Definiert das Control als Required
49
53
  */
50
54
  isrequired: boolean;
51
55
  /**
52
- * Max. Dateigrösse für Files die hochgeladen werden können. 0 deaktiviert den Filter
56
+ * Listener für Files
53
57
  */
54
- maxfilesize: number;
58
+ listenerFn: () => void;
55
59
  /**
56
- * Resource Key für Validation Message Required bei Control
60
+ * Service für Error Localisation
57
61
  */
58
- validationmessagerequired: string;
62
+ lngResourceService: ISacLocalisationService;
59
63
  /**
60
- * Resource Key für Validation Message Required in Validation Summary
64
+ * Max. Dateigrösse für Files die hochgeladen werden können. 0 deaktiviert den Filter
61
65
  */
62
- validationmessagesummaryrequired: string;
66
+ maxfilesize: number;
63
67
  /**
64
- * Event wenn ein Error in der Komponente ausgelöst wird.
68
+ * Event when an error is triggered in the component.
65
69
  */
66
70
  onfileerror: EventEmitter<string>;
67
71
  /**
68
- * Handling von neuen Files im Input Control
72
+ * Event when a file has been uploaded. The event is triggered for multiple uploads per file.
69
73
  */
70
- fileListener: () => void;
74
+ onuploadcomplete: EventEmitter<ISacUploadEventCompleteState>;
71
75
  /**
72
- * Listener für Files
76
+ * Array von Uploads
73
77
  */
74
- listenerFn: () => void;
78
+ uploads: SacUploadFile[];
75
79
  /**
76
- * Service für Error Localisation
80
+ * Resource Key für Validation Message Required bei Control
77
81
  */
78
- lngResourceService: ISacLocalisationService;
82
+ validationmessagerequired: string;
79
83
  /**
80
- * Array von Uploads
84
+ * Resource Key für Validation Message Required in Validation Summary
81
85
  */
82
- uploads: SacUploadFile[];
86
+ validationmessagesummaryrequired: string;
83
87
  /**
84
88
  * Constructor
85
89
  * @param formlayout SacFormLayoutCommon to define scoped layout settings
@@ -88,22 +92,6 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
88
92
  * @param ngZone ngzone for handling external scripts
89
93
  */
90
94
  constructor(formlayout: SacFormLayoutCommon, injector: Injector, renderer: Renderer2, ngZone: NgZone);
91
- /**
92
- * Erlaubte Dateitypen für den Upload. Format: ".xxx,.yyy,.zzz"
93
- */
94
- set allowedtypes(types: string);
95
- /**
96
- * Files nach der Auswahl automatisch hochladen
97
- */
98
- set autoupload(v: boolean);
99
- /**
100
- * Uploads können unterbrochen werden
101
- */
102
- set enablepause(v: boolean);
103
- /**
104
- * Definiert den Registration Endpoint für Uploads.
105
- */
106
- set endpoint(v: string);
107
95
  /**
108
96
  * Icon for browse button
109
97
  */
@@ -125,9 +113,40 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
125
113
  */
126
114
  get IconUpload(): string;
127
115
  get allowedtypes(): string;
116
+ /**
117
+ * Erlaubte Dateitypen für den Upload. Format: ".xxx,.yyy,.zzz"
118
+ */
119
+ set allowedtypes(types: string);
128
120
  get autoupload(): boolean;
121
+ /**
122
+ * Files nach der Auswahl automatisch hochladen
123
+ */
124
+ set autoupload(v: boolean);
129
125
  get enablepause(): boolean;
126
+ /**
127
+ * Uploads können unterbrochen werden
128
+ */
129
+ set enablepause(v: boolean);
130
130
  get endpoint(): string;
131
+ /**
132
+ * Definiert den Registration Endpoint für Uploads.
133
+ */
134
+ set endpoint(v: string);
135
+ /**
136
+ * Token for Bearer Authentication
137
+ */
138
+ get token(): string | null;
139
+ /**
140
+ * Token for Bearer Authentication
141
+ */
142
+ set token(v: string | null);
143
+ /**
144
+ * Methode kann für Controls verwendet werden, zusätzliche Validierungen bei hinzufügen der Files zu machen
145
+ *
146
+ * @param file File das hinzugefügt wurde.
147
+ * @returns Valdierung ist erfolgreich
148
+ */
149
+ abstract CustomAddValidation(file: UploadState): boolean;
131
150
  /**
132
151
  * Name der Datei die Hochgeladen wird
133
152
  * @returns Observable des Dateinamens.
@@ -163,6 +182,12 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
163
182
  * @returns Upload Fortschritt. Wert von 0-100
164
183
  */
165
184
  Progress(): number;
185
+ /**
186
+ * Methode welche die Upload ID's in das Model setzt oder löscht
187
+ *
188
+ * @param file Type von File ID's
189
+ */
190
+ abstract SetUploadValue(file: UploadState): void;
166
191
  /**
167
192
  * Cancel single upload
168
193
  * @param uploadId ID of File to cancel
@@ -177,7 +202,7 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
177
202
  */
178
203
  ngOnDestroy(): void;
179
204
  /**
180
- * Initialisiert das Control
205
+ * Initializes the control
181
206
  */
182
207
  ngOnInit(): void;
183
208
  /**
@@ -195,6 +220,10 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
195
220
  * Pause all Uploads
196
221
  */
197
222
  pauseAll(): void;
223
+ /**
224
+ * Sets the bearer token in the upload service
225
+ */
226
+ setToken(value: string): void;
198
227
  /**
199
228
  * Upload Single File
200
229
  *
@@ -210,19 +239,6 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
210
239
  * @param c Control das validiert werden soll
211
240
  */
212
241
  validateData(c: AbstractControl): ValidationErrors | null;
213
- /**
214
- * Methode kann für Controls verwendet werden, zusätzliche Validierungen bei hinzufügen der Files zu machen
215
- *
216
- * @param file File das hinzugefügt wurde.
217
- * @returns Valdierung ist erfolgreich
218
- */
219
- abstract CustomAddValidation(file: UploadState): boolean;
220
- /**
221
- * Methode welche die Upload ID's in das Model setzt oder löscht
222
- *
223
- * @param file Type von File ID's
224
- */
225
- abstract SetUploadValue(file: UploadState): void;
226
242
  private UpdateFileCount;
227
243
  /**
228
244
  * Returns the number of uploaded files
@@ -1,13 +1,14 @@
1
+ import { OnInit } from '@angular/core';
1
2
  import { AbstractControl, ValidationErrors } from '@angular/forms';
2
3
  import { SacBaseModelControl } from '../../common/basemodelcontrol';
3
4
  /**
4
5
  * Basis Komponente für SacCheckboxCommon. Extends SacBaseModelControl
5
6
  */
6
- export declare class SacCheckboxCommon extends SacBaseModelControl<boolean> {
7
+ export declare class SacCheckboxCommon extends SacBaseModelControl<boolean> implements OnInit {
7
8
  /**
8
- * Text welcher als Tooltip angezeigt wird.
9
+ * Defines the display for a checkbox
9
10
  */
10
- tooltiptext: string;
11
+ checkboxstyle: 'checkbox' | 'switch' | null;
11
12
  /**
12
13
  * Text vom Checkbox-Control. Der Text wird rechts von der Checkbox angezeigt.
13
14
  */
@@ -16,8 +17,16 @@ export declare class SacCheckboxCommon extends SacBaseModelControl<boolean> {
16
17
  * Defines that the checkbox can be used in a list of checkboxes and is not handled as a single form control
17
18
  */
18
19
  stacked: boolean;
20
+ /**
21
+ * Init Event
22
+ */
23
+ ngOnInit(): void;
19
24
  /**
20
25
  * Control hat keinen Validator
21
26
  */
22
27
  validateData(c: AbstractControl): ValidationErrors | null;
28
+ /**
29
+ * Adopts the default display if no display has been defined on the component.
30
+ */
31
+ private setCheckboxStyle;
23
32
  }