@simpleangularcontrols/sac-common 10.0.0-rc.29 → 10.0.0-rc.30
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.
- package/bundles/simpleangularcontrols-sac-common.umd.js +1848 -1249
- package/bundles/simpleangularcontrols-sac-common.umd.js.map +1 -1
- package/bundles/simpleangularcontrols-sac-common.umd.min.js +1 -1
- package/bundles/simpleangularcontrols-sac-common.umd.min.js.map +1 -1
- package/common/basedatetimecontrol.d.ts +47 -21
- package/common/baseinputcontrol.d.ts +10 -8
- package/common/baselistcontrol.d.ts +15 -15
- package/common/basemodelcontrol.d.ts +59 -43
- package/common/baseselectcontrol.d.ts +5 -5
- package/common/baseuploadcontrol.d.ts +77 -57
- package/components/browser/browser.d.ts +86 -89
- package/components/browser/models/browserfile.d.ts +6 -6
- package/components/browser/models/browserfiledeleterequest.d.ts +7 -7
- package/components/browser/models/browserfilerenamerequest.d.ts +10 -10
- package/components/browser/models/browserfileresponse.d.ts +2 -2
- package/components/browser/models/browserfilesaverequest.d.ts +7 -7
- package/components/browser/models/browsernode.d.ts +13 -13
- package/components/browser/models/browsernodedeleterequest.d.ts +6 -6
- package/components/browser/models/browsernodenewrequest.d.ts +7 -7
- package/components/browser/models/browsernoderenamerequest.d.ts +7 -7
- package/components/browser/models/browsernoderequest.d.ts +7 -7
- package/components/browser/models/browsernoderesponse.d.ts +1 -1
- package/controls/buttons/button.d.ts +25 -19
- package/controls/checkbox/checkbox.d.ts +3 -3
- package/controls/checkbox/radiobutton.d.ts +19 -13
- package/controls/checkbox/radiobuttons.d.ts +13 -10
- package/controls/confirm/confirm.button.d.ts +3 -3
- package/controls/confirm/confirm.d.ts +13 -12
- package/controls/confirm/confirm.service.d.ts +14 -14
- package/controls/contextmenu/contextmenu.d.ts +33 -27
- package/controls/contextmenu/contextmenu.interface.d.ts +6 -0
- package/controls/contextmenu/contextmenuanchor.d.ts +4 -4
- package/controls/contextmenu/contextmenucontainer.d.ts +4 -4
- package/controls/contextmenu/contextmenuitembutton.d.ts +12 -12
- package/controls/datetime/date.d.ts +11 -11
- package/controls/datetime/dateselector.d.ts +47 -40
- package/controls/datetime/datetime.d.ts +15 -14
- package/controls/datetime/time.d.ts +22 -12
- package/controls/dialog/dialog.d.ts +28 -22
- package/controls/form/form.d.ts +17 -12
- package/controls/grid/grid.d.ts +1 -0
- package/controls/grid/gridbutton.d.ts +1 -0
- package/controls/grid/gridcolumn.d.ts +5 -1
- package/controls/grid/gridcolumnaction.d.ts +1 -1
- package/controls/grid/gridcolumnbase.d.ts +8 -3
- package/controls/grid/model.d.ts +5 -2
- package/controls/grid/paging.d.ts +2 -3
- package/controls/input/input.d.ts +7 -7
- package/controls/input/inputarea.d.ts +8 -6
- package/controls/input/inputcurrency.d.ts +4 -1
- package/controls/input/inputdecimal.d.ts +14 -14
- package/controls/input/inputemail.d.ts +4 -4
- package/controls/input/inputinteger.d.ts +14 -14
- package/controls/input/inputpassword.d.ts +3 -3
- package/controls/input/inputsearch.d.ts +8 -5
- package/controls/layout/formlayout.d.ts +8 -5
- package/controls/list/buildvaluestring.d.ts +2 -2
- package/controls/list/dropdown.d.ts +23 -22
- package/controls/list/dropdownoptions.d.ts +10 -10
- package/controls/list/listbox.d.ts +25 -23
- package/controls/multilanguage/multilanguageinput.d.ts +25 -25
- package/controls/multilanguage/multilanguageinputarea.d.ts +27 -27
- package/controls/static/formcontainer.d.ts +8 -8
- package/controls/static/staticlabel.d.ts +5 -5
- package/controls/tabs/tab.d.ts +2 -2
- package/controls/tabs/tabitem.d.ts +7 -7
- package/controls/tinymce/tinymce.d.ts +37 -37
- package/controls/tinymce/tinymcedialogsettings.d.ts +6 -6
- package/controls/tinymce/tinymcedialogsettingsmeta.d.ts +2 -2
- package/controls/tinymce/tinymceinstance.d.ts +2 -2
- package/controls/tooltip/tooltip.d.ts +10 -5
- package/controls/treeview/treeview.d.ts +50 -5
- package/controls/upload/dropzonemultiple.d.ts +16 -16
- package/controls/upload/dropzonesingle.d.ts +11 -11
- package/controls/upload/uploadmultiple.d.ts +12 -12
- package/controls/upload/uploadsingle.d.ts +7 -7
- package/controls/validation/validationsummary.d.ts +12 -11
- package/controls/wizard/wizard.d.ts +25 -18
- package/controls/wizard/wizarditem.d.ts +5 -5
- package/enums/ButtonRoleType.d.ts +26 -1
- package/enums/ControlHeight.d.ts +1 -1
- package/enums/IconType.d.ts +1 -1
- package/esm2015/common/basedatetimecontrol.js +47 -22
- package/esm2015/common/baseinputcontrol.js +13 -11
- package/esm2015/common/baselistcontrol.js +21 -17
- package/esm2015/common/basemodelcontrol.js +72 -49
- package/esm2015/common/baseselectcontrol.js +11 -9
- package/esm2015/common/baseuploadcontrol.js +69 -49
- package/esm2015/components/browser/browser.js +93 -105
- package/esm2015/components/browser/models/browserfile.js +1 -1
- package/esm2015/components/browser/models/browserfiledeleterequest.js +6 -4
- package/esm2015/components/browser/models/browserfilerenamerequest.js +6 -4
- package/esm2015/components/browser/models/browserfileresponse.js +1 -1
- package/esm2015/components/browser/models/browserfilesaverequest.js +5 -3
- package/esm2015/components/browser/models/browsernode.js +1 -1
- package/esm2015/components/browser/models/browsernodedeleterequest.js +6 -4
- package/esm2015/components/browser/models/browsernodenewrequest.js +6 -4
- package/esm2015/components/browser/models/browsernoderenamerequest.js +6 -4
- package/esm2015/components/browser/models/browsernoderequest.js +6 -4
- package/esm2015/components/browser/models/browsernoderesponse.js +1 -1
- package/esm2015/controls/buttons/button.js +26 -20
- package/esm2015/controls/checkbox/checkbox.js +3 -3
- package/esm2015/controls/checkbox/radiobutton.js +21 -15
- package/esm2015/controls/checkbox/radiobuttons.js +14 -11
- package/esm2015/controls/confirm/confirm.button.js +4 -4
- package/esm2015/controls/confirm/confirm.js +14 -13
- package/esm2015/controls/confirm/confirm.service.js +21 -21
- package/esm2015/controls/contextmenu/contextmenu.interface.js +1 -1
- package/esm2015/controls/contextmenu/contextmenu.js +29 -23
- package/esm2015/controls/contextmenu/contextmenuanchor.js +4 -4
- package/esm2015/controls/contextmenu/contextmenucontainer.js +4 -4
- package/esm2015/controls/contextmenu/contextmenuitembutton.js +10 -10
- package/esm2015/controls/datetime/date.js +13 -13
- package/esm2015/controls/datetime/dateselector.js +55 -54
- package/esm2015/controls/datetime/datetime.js +17 -16
- package/esm2015/controls/datetime/time.js +24 -14
- package/esm2015/controls/dialog/dialog.js +31 -24
- package/esm2015/controls/form/form.js +18 -13
- package/esm2015/controls/grid/grid.js +2 -1
- package/esm2015/controls/grid/gridbutton.js +2 -1
- package/esm2015/controls/grid/gridcolumn.js +6 -2
- package/esm2015/controls/grid/gridcolumnaction.js +2 -2
- package/esm2015/controls/grid/gridcolumnbase.js +9 -4
- package/esm2015/controls/grid/model.js +5 -2
- package/esm2015/controls/grid/paging.js +6 -7
- package/esm2015/controls/input/input.js +8 -8
- package/esm2015/controls/input/inputarea.js +9 -7
- package/esm2015/controls/input/inputcurrency.js +6 -3
- package/esm2015/controls/input/inputdecimal.js +21 -27
- package/esm2015/controls/input/inputemail.js +5 -5
- package/esm2015/controls/input/inputinteger.js +19 -23
- package/esm2015/controls/input/inputpassword.js +4 -4
- package/esm2015/controls/input/inputsearch.js +9 -6
- package/esm2015/controls/layout/formlayout.js +10 -7
- package/esm2015/controls/list/buildvaluestring.js +6 -6
- package/esm2015/controls/list/dropdown.js +28 -27
- package/esm2015/controls/list/dropdownoptions.js +12 -12
- package/esm2015/controls/list/listbox.js +26 -24
- package/esm2015/controls/multilanguage/multilanguageinput.js +29 -29
- package/esm2015/controls/multilanguage/multilanguageinputarea.js +31 -31
- package/esm2015/controls/static/formcontainer.js +10 -10
- package/esm2015/controls/static/staticlabel.js +7 -7
- package/esm2015/controls/tabs/tab.js +2 -2
- package/esm2015/controls/tabs/tabitem.js +5 -5
- package/esm2015/controls/tinymce/tinymce.js +35 -35
- package/esm2015/controls/tinymce/tinymcedialogsettings.js +4 -4
- package/esm2015/controls/tinymce/tinymcedialogsettingsmeta.js +1 -1
- package/esm2015/controls/tinymce/tinymceinstance.js +1 -1
- package/esm2015/controls/tooltip/tooltip.js +13 -8
- package/esm2015/controls/treeview/treeview.js +52 -7
- package/esm2015/controls/upload/dropzonemultiple.js +18 -18
- package/esm2015/controls/upload/dropzonesingle.js +12 -12
- package/esm2015/controls/upload/uploadmultiple.js +14 -14
- package/esm2015/controls/upload/uploadsingle.js +8 -8
- package/esm2015/controls/validation/validationsummary.js +14 -13
- package/esm2015/controls/wizard/wizard.js +24 -17
- package/esm2015/controls/wizard/wizarditem.js +4 -4
- package/esm2015/enums/ButtonRoleType.js +1 -1
- package/esm2015/enums/ControlHeight.js +2 -2
- package/esm2015/enums/IconType.js +2 -2
- package/esm2015/interfaces/ISacConfigurationService.js +1 -1
- package/esm2015/interfaces/ISacFileBrowserService.js +1 -1
- package/esm2015/interfaces/ISacLabelSizes.js +1 -1
- package/esm2015/interfaces/ISacLanguageService.js +1 -1
- package/esm2015/interfaces/ISacLocalisationService.js +1 -1
- package/esm2015/interfaces/ISacUploadEventCompleteState.js +1 -1
- package/esm2015/interfaces/iabstractcontrollabel.js +1 -1
- package/esm2015/interfaces/iconfirmcomponent.js +1 -1
- package/esm2015/interfaces/idatetimecontrol.js +1 -1
- package/esm2015/interfaces/iuploadcontrol.js +1 -1
- package/esm2015/interfaces/treeviewaction.interface.js +1 -1
- package/esm2015/models/languagemodel.js +5 -3
- package/esm2015/public_api.js +3 -2
- package/esm2015/services/index.js +4 -4
- package/esm2015/services/sac-configuration.service.js +7 -1
- package/esm2015/services/sac-filebrowser.service.js +46 -38
- package/esm2015/services/sac-localisation.service.js +11 -7
- package/esm2015/services/sac-validationkey.service.js +148 -1
- package/esm2015/utilities/convertion.js +7 -5
- package/esm2015/utilities/datatypes.js +6 -4
- package/esm2015/utilities/enums.js +9 -8
- package/esm2015/utilities/guid.js +2 -2
- package/esm2015/utilities/interpolation.js +16 -9
- package/esm2015/utilities/popuphelper.js +62 -25
- package/esm2015/utilities/positioncalculator.js +209 -0
- package/esm2015/utilities/positioncalculator.ngfactory.js +7 -0
- package/esm2015/utilities/positionelements.js +108 -0
- package/esm2015/utilities/positionelements.ngfactory.js +7 -0
- package/esm2015/utilities/testingattribute.pipe.js +17 -2
- package/esm2015/validation/email.validator.js +11 -2
- package/esm2015/validation/equals.validator.js +11 -1
- package/esm2015/validation/index.js +1 -1
- package/esm2015/validation/invaliddate.validator.js +11 -2
- package/esm2015/validation/isDateValid.js +11 -10
- package/esm2015/validation/maxdate.validator.js +14 -4
- package/esm2015/validation/maxtime.validator.js +14 -4
- package/esm2015/validation/maxvalue.validator.js +12 -2
- package/esm2015/validation/mindate.validator.js +14 -4
- package/esm2015/validation/minfiles.validator.js +12 -2
- package/esm2015/validation/mintextlength.validator.js +9 -1
- package/esm2015/validation/mintime.validator.js +14 -4
- package/esm2015/validation/minvalue.validator.js +12 -2
- package/esm2015/validation/multilanguagerequired.validator.js +11 -1
- package/esm2015/validation/multilanguagerequiredany.validator.js +11 -1
- package/esm2015/validation/notequals.validator.js +11 -1
- package/esm2015/validation/pattern.validator.js +12 -2
- package/esm2015/validation/required.validator.js +11 -2
- package/esm2015/validation/validation.class.js +84 -101
- package/esm2015/validation/validationerrorcreator.js +12 -1
- package/esm2015/validation/validationerroritem.js +11 -9
- package/fesm2015/simpleangularcontrols-sac-common.js +1823 -1226
- package/fesm2015/simpleangularcontrols-sac-common.js.map +1 -1
- package/interfaces/ISacConfigurationService.d.ts +9 -1
- package/interfaces/ISacFileBrowserService.d.ts +43 -43
- package/interfaces/ISacLabelSizes.d.ts +15 -12
- package/interfaces/ISacLanguageService.d.ts +3 -3
- package/interfaces/ISacLocalisationService.d.ts +2 -2
- package/interfaces/ISacUploadEventCompleteState.d.ts +6 -0
- package/interfaces/iabstractcontrollabel.d.ts +4 -1
- package/interfaces/iconfirmcomponent.d.ts +6 -6
- package/interfaces/idatetimecontrol.d.ts +10 -1
- package/interfaces/treeviewaction.interface.d.ts +9 -0
- package/models/languagemodel.d.ts +9 -9
- package/package.json +1 -1
- package/public_api.d.ts +2 -1
- package/services/index.d.ts +3 -3
- package/services/sac-configuration.service.d.ts +8 -0
- package/services/sac-filebrowser.service.d.ts +78 -70
- package/services/sac-localisation.service.d.ts +11 -7
- package/services/sac-validationkey.service.d.ts +147 -0
- package/simpleangularcontrols-sac-common-10.0.0-rc.30.tgz +0 -0
- package/simpleangularcontrols-sac-common.metadata.json +1 -1
- package/utilities/convertion.d.ts +4 -4
- package/utilities/datatypes.d.ts +3 -3
- package/utilities/enums.d.ts +8 -1
- package/utilities/guid.d.ts +1 -1
- package/utilities/interpolation.d.ts +9 -8
- package/utilities/popuphelper.d.ts +47 -10
- package/utilities/positioncalculator.d.ts +82 -0
- package/utilities/positionelements.d.ts +30 -0
- package/utilities/positionelements.ngfactory.d.ts +1 -0
- package/utilities/testingattribute.pipe.d.ts +16 -1
- package/validation/email.validator.d.ts +7 -0
- package/validation/equals.validator.d.ts +8 -0
- package/validation/invaliddate.validator.d.ts +7 -0
- package/validation/isDateValid.d.ts +5 -2
- package/validation/maxdate.validator.d.ts +8 -0
- package/validation/maxtime.validator.d.ts +8 -0
- package/validation/maxvalue.validator.d.ts +8 -0
- package/validation/mindate.validator.d.ts +8 -0
- package/validation/minfiles.validator.d.ts +8 -0
- package/validation/mintextlength.validator.d.ts +8 -0
- package/validation/mintime.validator.d.ts +8 -0
- package/validation/minvalue.validator.d.ts +8 -0
- package/validation/multilanguagerequired.validator.d.ts +9 -1
- package/validation/multilanguagerequiredany.validator.d.ts +9 -1
- package/validation/notequals.validator.d.ts +8 -0
- package/validation/pattern.validator.d.ts +8 -0
- package/validation/required.validator.d.ts +7 -0
- package/validation/validation.class.d.ts +83 -100
- package/validation/validationerrorcreator.d.ts +9 -0
- package/validation/validationerroritem.d.ts +16 -16
- package/esm2015/utilities/positioning.js +0 -301
- package/esm2015/utilities/positioning.ngfactory.js +0 -7
- package/simpleangularcontrols-sac-common-10.0.0-rc.29.tgz +0 -0
- package/utilities/positioning.d.ts +0 -82
- /package/utilities/{positioning.ngfactory.d.ts → positioncalculator.ngfactory.d.ts} +0 -0
|
@@ -7,21 +7,21 @@ import { AbstractControl, ValidationErrors } from '@angular/forms';
|
|
|
7
7
|
import { UploadState, UploadxService } from 'ngx-uploadx';
|
|
8
8
|
import { Observable } from 'rxjs';
|
|
9
9
|
/**
|
|
10
|
-
* Base
|
|
10
|
+
* Base class for 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
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Allowed file types
|
|
17
17
|
*/
|
|
18
18
|
private _allowedtypes;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Automatically uploads files
|
|
21
21
|
*/
|
|
22
22
|
private _autoupload;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Allow pausing of uploads
|
|
25
25
|
*/
|
|
26
26
|
private _enablepause;
|
|
27
27
|
/**
|
|
@@ -45,15 +45,15 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
|
|
|
45
45
|
*/
|
|
46
46
|
protected uploadService: UploadxService;
|
|
47
47
|
/**
|
|
48
|
-
* Handling
|
|
48
|
+
* Handling of new files in the input control
|
|
49
49
|
*/
|
|
50
50
|
fileListener: () => void;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Defines the control as required
|
|
53
53
|
*/
|
|
54
54
|
isrequired: boolean;
|
|
55
55
|
/**
|
|
56
|
-
* Listener
|
|
56
|
+
* Listener for files
|
|
57
57
|
*/
|
|
58
58
|
listenerFn: () => void;
|
|
59
59
|
/**
|
|
@@ -61,7 +61,7 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
|
|
|
61
61
|
*/
|
|
62
62
|
lngResourceService: ISacLocalisationService;
|
|
63
63
|
/**
|
|
64
|
-
* Max.
|
|
64
|
+
* Max. file size for files that can be uploaded. 0 disables the filter
|
|
65
65
|
*/
|
|
66
66
|
maxfilesize: number;
|
|
67
67
|
/**
|
|
@@ -73,15 +73,15 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
|
|
|
73
73
|
*/
|
|
74
74
|
onuploadcomplete: EventEmitter<ISacUploadEventCompleteState>;
|
|
75
75
|
/**
|
|
76
|
-
* Array
|
|
76
|
+
* Array of uploads
|
|
77
77
|
*/
|
|
78
78
|
uploads: SacUploadFile[];
|
|
79
79
|
/**
|
|
80
|
-
* Resource
|
|
80
|
+
* Resource key for validation message 'required' at control
|
|
81
81
|
*/
|
|
82
82
|
validationmessagerequired: string;
|
|
83
83
|
/**
|
|
84
|
-
* Resource
|
|
84
|
+
* Resource key for validation message 'required' in validation summary
|
|
85
85
|
*/
|
|
86
86
|
validationmessagesummaryrequired: string;
|
|
87
87
|
/**
|
|
@@ -114,78 +114,95 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
|
|
|
114
114
|
get IconUpload(): string;
|
|
115
115
|
get allowedtypes(): string;
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
117
|
+
* Allowed file types for upload. Format: ".xxx,.yyy,.zzz"
|
|
118
118
|
*/
|
|
119
119
|
set allowedtypes(types: string);
|
|
120
|
+
/**
|
|
121
|
+
* Indicates whether files should be uploaded automatically after selection.
|
|
122
|
+
* @returns true when auto-upload is enabled.
|
|
123
|
+
*/
|
|
120
124
|
get autoupload(): boolean;
|
|
121
125
|
/**
|
|
122
|
-
*
|
|
126
|
+
* Automatically uploads files after selection.
|
|
127
|
+
* @param v true to enable automatic upload.
|
|
123
128
|
*/
|
|
124
129
|
set autoupload(v: boolean);
|
|
130
|
+
/**
|
|
131
|
+
* Indicates whether upload pause is allowed.
|
|
132
|
+
* @returns true when pause support is active.
|
|
133
|
+
*/
|
|
125
134
|
get enablepause(): boolean;
|
|
126
135
|
/**
|
|
127
|
-
* Uploads
|
|
136
|
+
* Uploads can be paused.
|
|
137
|
+
* @param v true to allow pausing uploads.
|
|
128
138
|
*/
|
|
129
139
|
set enablepause(v: boolean);
|
|
140
|
+
/**
|
|
141
|
+
* API endpoint for upload registration.
|
|
142
|
+
* @returns configured endpoint URL.
|
|
143
|
+
*/
|
|
130
144
|
get endpoint(): string;
|
|
131
145
|
/**
|
|
132
|
-
*
|
|
146
|
+
* Defines the registration endpoint for uploads.
|
|
147
|
+
* @param v upload endpoint URL.
|
|
133
148
|
*/
|
|
134
149
|
set endpoint(v: string);
|
|
135
150
|
/**
|
|
136
|
-
*
|
|
151
|
+
* Bearer authentication token used by upload service.
|
|
152
|
+
* @returns current auth token or null.
|
|
137
153
|
*/
|
|
138
154
|
get token(): string | null;
|
|
139
155
|
/**
|
|
140
|
-
*
|
|
156
|
+
* Sets Bearer authentication token for service requests.
|
|
157
|
+
* @param v token string or null to clear token.
|
|
141
158
|
*/
|
|
142
159
|
set token(v: string | null);
|
|
143
160
|
/**
|
|
144
|
-
*
|
|
161
|
+
* Method can be used for controls to perform additional validations when adding files
|
|
145
162
|
*
|
|
146
|
-
* @param file File
|
|
147
|
-
* @returns
|
|
163
|
+
* @param file File that was added.
|
|
164
|
+
* @returns Validation is successful
|
|
148
165
|
*/
|
|
149
166
|
abstract CustomAddValidation(file: UploadState): boolean;
|
|
150
167
|
/**
|
|
151
|
-
* Name
|
|
152
|
-
* @returns Observable
|
|
168
|
+
* Name of the file being uploaded
|
|
169
|
+
* @returns Observable of the file name.
|
|
153
170
|
*/
|
|
154
171
|
Filename(): Observable<string>;
|
|
155
172
|
/**
|
|
156
|
-
*
|
|
157
|
-
* @returns
|
|
173
|
+
* Indicates whether the queue contains elements
|
|
174
|
+
* @returns Elements in the queue
|
|
158
175
|
*/
|
|
159
176
|
HasQueueItem(): boolean;
|
|
160
177
|
/**
|
|
161
|
-
*
|
|
162
|
-
* @returns Upload
|
|
178
|
+
* Indicates whether an upload is complete
|
|
179
|
+
* @returns Upload successful
|
|
163
180
|
*/
|
|
164
181
|
HasSuccessUpload(): boolean;
|
|
165
182
|
/**
|
|
166
|
-
*
|
|
167
|
-
* @returns
|
|
183
|
+
* Checks if an upload is paused
|
|
184
|
+
* @returns Paused upload is present
|
|
168
185
|
*/
|
|
169
186
|
IsPaused(): boolean;
|
|
170
187
|
/**
|
|
171
|
-
*
|
|
172
|
-
* @returns
|
|
188
|
+
* Checks if there are elements in the queue ready for upload.
|
|
189
|
+
* @returns Elements available for upload
|
|
173
190
|
*/
|
|
174
191
|
IsStateToUpload(): boolean;
|
|
175
192
|
/**
|
|
176
|
-
*
|
|
177
|
-
* @returns Upload
|
|
193
|
+
* Checks if a file upload is in progress
|
|
194
|
+
* @returns Upload is in progress
|
|
178
195
|
*/
|
|
179
196
|
IsUploading(): boolean;
|
|
180
197
|
/**
|
|
181
|
-
*
|
|
182
|
-
* @returns Upload
|
|
198
|
+
* Returns the upload progress
|
|
199
|
+
* @returns Upload progress. Value from 0-100
|
|
183
200
|
*/
|
|
184
201
|
Progress(): number;
|
|
185
202
|
/**
|
|
186
|
-
*
|
|
203
|
+
* Method that sets or deletes the upload IDs in the model
|
|
187
204
|
*
|
|
188
|
-
* @param file Type
|
|
205
|
+
* @param file Type of file IDs
|
|
189
206
|
*/
|
|
190
207
|
abstract SetUploadValue(file: UploadState): void;
|
|
191
208
|
/**
|
|
@@ -198,7 +215,7 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
|
|
|
198
215
|
*/
|
|
199
216
|
cancelAll(): void;
|
|
200
217
|
/**
|
|
201
|
-
* Destroy
|
|
218
|
+
* Destroy the control
|
|
202
219
|
*/
|
|
203
220
|
ngOnDestroy(): void;
|
|
204
221
|
/**
|
|
@@ -206,18 +223,18 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
|
|
|
206
223
|
*/
|
|
207
224
|
ngOnInit(): void;
|
|
208
225
|
/**
|
|
209
|
-
* Upload
|
|
226
|
+
* Upload event
|
|
210
227
|
*
|
|
211
|
-
* @param uploadsOutStream Upload
|
|
228
|
+
* @param uploadsOutStream Upload item
|
|
212
229
|
*/
|
|
213
230
|
onUpload(ufile: UploadState): void;
|
|
214
231
|
/**
|
|
215
|
-
* Cancel
|
|
216
|
-
* @param uploadId ID of
|
|
232
|
+
* Cancel single file
|
|
233
|
+
* @param uploadId ID of file to cancel
|
|
217
234
|
*/
|
|
218
235
|
pause(uploadId: any): void;
|
|
219
236
|
/**
|
|
220
|
-
* Pause all
|
|
237
|
+
* Pause all uploads
|
|
221
238
|
*/
|
|
222
239
|
pauseAll(): void;
|
|
223
240
|
/**
|
|
@@ -235,45 +252,48 @@ export declare abstract class SacUploadBase<VALUE> extends SacBaseModelControl<V
|
|
|
235
252
|
*/
|
|
236
253
|
uploadAll(): void;
|
|
237
254
|
/**
|
|
238
|
-
*
|
|
239
|
-
* @param c Control
|
|
255
|
+
* Validates the upload control
|
|
256
|
+
* @param c Control to be validated
|
|
240
257
|
*/
|
|
241
258
|
validateData(c: AbstractControl): ValidationErrors | null;
|
|
242
259
|
/**
|
|
243
260
|
* get max. files that can be uploaded
|
|
244
261
|
*/
|
|
245
262
|
protected abstract GetMaxFiles(): number;
|
|
263
|
+
/**
|
|
264
|
+
* Updates the file count on the form control
|
|
265
|
+
*/
|
|
246
266
|
private UpdateFileCount;
|
|
247
267
|
/**
|
|
248
268
|
* Returns the number of uploaded files
|
|
249
269
|
*/
|
|
250
270
|
private UploadedFileCount;
|
|
251
271
|
/**
|
|
252
|
-
*
|
|
272
|
+
* Checks whether the file extension is valid
|
|
253
273
|
*
|
|
254
|
-
* @param filename
|
|
274
|
+
* @param filename File name
|
|
255
275
|
*/
|
|
256
276
|
private isExtensionValid;
|
|
257
277
|
/**
|
|
258
|
-
*
|
|
278
|
+
* Checks if the file is not too large.
|
|
259
279
|
*
|
|
260
|
-
* @param filesize Max
|
|
280
|
+
* @param filesize Max file size in bytes
|
|
261
281
|
*/
|
|
262
282
|
private isFileSizeValid;
|
|
263
283
|
/**
|
|
264
|
-
*
|
|
284
|
+
* Sets the allowed data types for upload
|
|
265
285
|
*
|
|
266
|
-
* @param types
|
|
286
|
+
* @param types Allowed file extensions
|
|
267
287
|
*/
|
|
268
288
|
private setAllowedTypes;
|
|
269
289
|
/**
|
|
270
|
-
*
|
|
290
|
+
* Sets the upload endpoint
|
|
271
291
|
* @param url Register URI
|
|
272
292
|
*/
|
|
273
293
|
private setEndpoint;
|
|
274
294
|
}
|
|
275
295
|
/**
|
|
276
|
-
*
|
|
296
|
+
* Class for uploading a file in the upload component
|
|
277
297
|
*/
|
|
278
298
|
export declare class SacUploadFile {
|
|
279
299
|
/**
|
|
@@ -281,15 +301,15 @@ export declare class SacUploadFile {
|
|
|
281
301
|
*/
|
|
282
302
|
documentid: string;
|
|
283
303
|
/**
|
|
284
|
-
*
|
|
304
|
+
* File name
|
|
285
305
|
*/
|
|
286
306
|
name: string;
|
|
287
307
|
/**
|
|
288
|
-
* Upload
|
|
308
|
+
* Upload progress
|
|
289
309
|
*/
|
|
290
310
|
progress: number;
|
|
291
311
|
/**
|
|
292
|
-
* Upload
|
|
312
|
+
* Upload status
|
|
293
313
|
*/
|
|
294
314
|
status: string;
|
|
295
315
|
/**
|
|
@@ -297,8 +317,8 @@ export declare class SacUploadFile {
|
|
|
297
317
|
*/
|
|
298
318
|
uploadId: string;
|
|
299
319
|
/**
|
|
300
|
-
*
|
|
301
|
-
* @param ufile Upload
|
|
320
|
+
* Constructor
|
|
321
|
+
* @param ufile Upload state
|
|
302
322
|
*/
|
|
303
323
|
constructor(ufile: UploadState);
|
|
304
324
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { EventEmitter, Injector, OnInit } from '@angular/core';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
1
|
import { ISacLocalisationService } from '../../interfaces/ISacLocalisationService';
|
|
5
2
|
import { ISacValidationKeyService } from '../../interfaces/ISacValidationKeyService';
|
|
6
3
|
import { IBrowserFile } from './models/browserfile';
|
|
7
4
|
import { IBrowserNode } from './models/browsernode';
|
|
5
|
+
import { HttpClient } from '@angular/common/http';
|
|
6
|
+
import { EventEmitter, Injector, OnInit } from '@angular/core';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
8
8
|
/**
|
|
9
|
-
* Base
|
|
9
|
+
* Base component for file browser
|
|
10
10
|
*/
|
|
11
11
|
export declare abstract class SacFileBrowserCommon implements OnInit {
|
|
12
12
|
/**
|
|
13
|
-
* Service
|
|
13
|
+
* Service for file browser access (backend)
|
|
14
14
|
*/
|
|
15
15
|
private browserService;
|
|
16
16
|
/**
|
|
@@ -18,52 +18,51 @@ export declare abstract class SacFileBrowserCommon implements OnInit {
|
|
|
18
18
|
*/
|
|
19
19
|
private iconService;
|
|
20
20
|
/**
|
|
21
|
-
* File
|
|
21
|
+
* File that is already selected when the browser starts
|
|
22
22
|
*/
|
|
23
23
|
private preselecedfile;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* getrennt durch Komma für mehr als eine Erweiterung (Example: ".jpg,.gif")
|
|
25
|
+
* Allowed file extensions for file selection and upload. Use dot notation, separated by commas for multiple extensions (Example: ".jpg,.gif")
|
|
27
26
|
*/
|
|
28
27
|
allowedtypes: string;
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
29
|
+
* Allows deleting a file
|
|
31
30
|
*/
|
|
32
31
|
allowfiledelete: boolean;
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
33
|
+
* Allows renaming a file
|
|
35
34
|
*/
|
|
36
35
|
allowfilerename: boolean;
|
|
37
36
|
/**
|
|
38
|
-
*
|
|
37
|
+
* Allows uploading files
|
|
39
38
|
*/
|
|
40
39
|
allowfileupload: boolean;
|
|
41
40
|
/**
|
|
42
|
-
*
|
|
41
|
+
* Allows creating a new folder
|
|
43
42
|
*/
|
|
44
43
|
allowfoldercreate: boolean;
|
|
45
44
|
/**
|
|
46
|
-
*
|
|
45
|
+
* Allows deleting a folder
|
|
47
46
|
*/
|
|
48
47
|
allowfolderdelete: boolean;
|
|
49
48
|
/**
|
|
50
|
-
*
|
|
49
|
+
* Allows renaming a folder
|
|
51
50
|
*/
|
|
52
51
|
allowfolderrename: boolean;
|
|
53
52
|
/**
|
|
54
|
-
* URL
|
|
53
|
+
* URL for the backend API
|
|
55
54
|
*/
|
|
56
55
|
apiurl: string;
|
|
57
56
|
/**
|
|
58
|
-
* Output
|
|
57
|
+
* Output emitter when a file is selected.
|
|
59
58
|
*/
|
|
60
59
|
file: EventEmitter<string>;
|
|
61
60
|
/**
|
|
62
|
-
* Service
|
|
61
|
+
* Service for error localisation
|
|
63
62
|
*/
|
|
64
63
|
lngResourceService: ISacLocalisationService;
|
|
65
64
|
/**
|
|
66
|
-
* Root
|
|
65
|
+
* Root node item for the tree
|
|
67
66
|
*/
|
|
68
67
|
rootNode: IBrowserNode;
|
|
69
68
|
/**
|
|
@@ -87,15 +86,11 @@ export declare abstract class SacFileBrowserCommon implements OnInit {
|
|
|
87
86
|
*/
|
|
88
87
|
validationKeyService: ISacValidationKeyService;
|
|
89
88
|
/**
|
|
90
|
-
*
|
|
89
|
+
* Constructor
|
|
91
90
|
* @param httpclient Angular HTTP Client
|
|
92
91
|
* @param injector Service Injector
|
|
93
92
|
*/
|
|
94
93
|
constructor(httpclient: HttpClient, injector: Injector);
|
|
95
|
-
/**
|
|
96
|
-
* Setzt den Seleced Node über den Pfad
|
|
97
|
-
*/
|
|
98
|
-
set selectedfile(v: string | null);
|
|
99
94
|
/**
|
|
100
95
|
* CSS icon class for delete icon
|
|
101
96
|
* @returns css class with icon
|
|
@@ -107,7 +102,7 @@ export declare abstract class SacFileBrowserCommon implements OnInit {
|
|
|
107
102
|
*/
|
|
108
103
|
get iconEdit(): string;
|
|
109
104
|
/**
|
|
110
|
-
* CSS icon for folders in tree
|
|
105
|
+
* CSS icon for folders in tree that are collapsed
|
|
111
106
|
* @returns css class with icon
|
|
112
107
|
*/
|
|
113
108
|
get iconFolderCollabsed(): string;
|
|
@@ -132,136 +127,138 @@ export declare abstract class SacFileBrowserCommon implements OnInit {
|
|
|
132
127
|
*/
|
|
133
128
|
get iconRefresh(): string;
|
|
134
129
|
/**
|
|
135
|
-
* Getter
|
|
130
|
+
* Getter for selected file. Bound to an input property
|
|
136
131
|
*/
|
|
137
132
|
get selectedfile(): string | null;
|
|
138
133
|
/**
|
|
139
|
-
*
|
|
134
|
+
* Sets the selected node by the path
|
|
140
135
|
*/
|
|
141
|
-
|
|
136
|
+
set selectedfile(v: string | null);
|
|
137
|
+
/**
|
|
138
|
+
* Abstract confirm method that must be implemented. Called when a file should be deleted.
|
|
139
|
+
* @param file File for which a delete confirmation should be requested
|
|
140
|
+
*/
|
|
141
|
+
abstract confirmDeleteFile(file: IBrowserFile): Observable<boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* Abstract confirm method that must be implemented. Called when a folder should be deleted.
|
|
144
|
+
* @param folder Folder for which a delete confirmation should be requested.
|
|
145
|
+
*/
|
|
146
|
+
abstract confirmDeleteNode(folder: IBrowserNode): Observable<boolean>;
|
|
142
147
|
/**
|
|
143
|
-
*
|
|
144
|
-
* @param file File
|
|
148
|
+
* Deletes a file
|
|
149
|
+
* @param file File to be deleted
|
|
145
150
|
*/
|
|
146
151
|
deleteFile(file: IBrowserFile): void;
|
|
147
152
|
/**
|
|
148
|
-
*
|
|
149
|
-
* @param node Node
|
|
153
|
+
* Deletes a node
|
|
154
|
+
* @param node Node to be deleted
|
|
150
155
|
*/
|
|
151
156
|
deleteNode(node: IBrowserNode): void;
|
|
152
157
|
/**
|
|
153
|
-
*
|
|
154
|
-
* @param file File
|
|
158
|
+
* Sets a file into edit mode
|
|
159
|
+
* @param file File that should be placed into edit mode
|
|
155
160
|
*/
|
|
156
161
|
editFile(file: IBrowserFile): void;
|
|
157
162
|
/**
|
|
158
|
-
*
|
|
159
|
-
* @param node Node
|
|
163
|
+
* Sets a node into edit mode
|
|
164
|
+
* @param node Node to be edited
|
|
160
165
|
*/
|
|
161
166
|
editNode(node: IBrowserNode): void;
|
|
162
167
|
/**
|
|
163
|
-
*
|
|
164
|
-
|
|
168
|
+
* HostListener that ends edit mode for all files and nodes.
|
|
169
|
+
*/
|
|
170
|
+
exitEditMode(targetElement: any): void;
|
|
171
|
+
/**
|
|
172
|
+
* Creates a new node in the tree
|
|
173
|
+
* @param node Node under which a new node should be created
|
|
165
174
|
*/
|
|
166
175
|
newNode(node: IBrowserNode): void;
|
|
167
176
|
/**
|
|
168
|
-
* Init
|
|
177
|
+
* Init event of the component
|
|
169
178
|
*/
|
|
170
179
|
ngOnInit(): void;
|
|
171
180
|
/**
|
|
172
|
-
*
|
|
181
|
+
* Updates the node
|
|
173
182
|
*/
|
|
174
183
|
refreshNode(node: IBrowserNode): void;
|
|
175
184
|
/**
|
|
176
|
-
*
|
|
177
|
-
* @param file File
|
|
178
|
-
* @param newFilename
|
|
185
|
+
* Method called when a file should be renamed
|
|
186
|
+
* @param file File to be renamed
|
|
187
|
+
* @param newFilename New filename
|
|
179
188
|
*/
|
|
180
189
|
renameFile(file: IBrowserFile, newFilename: string): void;
|
|
181
190
|
/**
|
|
182
|
-
*
|
|
183
|
-
* @param node Node
|
|
184
|
-
* @param newFoldername
|
|
191
|
+
* Method called when a node should be renamed
|
|
192
|
+
* @param node Node to be renamed
|
|
193
|
+
* @param newFoldername New folder name
|
|
185
194
|
*/
|
|
186
195
|
renameNode(node: IBrowserNode, newFoldername: string): void;
|
|
187
196
|
/**
|
|
188
|
-
*
|
|
189
|
-
* @param file File
|
|
197
|
+
* Method called when a file is selected
|
|
198
|
+
* @param file File that is selected
|
|
190
199
|
*/
|
|
191
200
|
selectFile(file: IBrowserFile): void;
|
|
192
201
|
/**
|
|
193
|
-
*
|
|
194
|
-
* @param node Node
|
|
202
|
+
* Method called when a node is selected
|
|
203
|
+
* @param node Node that should be selected
|
|
195
204
|
*/
|
|
196
205
|
selectNode(node: IBrowserNode): void;
|
|
197
206
|
/**
|
|
198
|
-
* Expand/
|
|
199
|
-
* @param node Node
|
|
207
|
+
* Expand/collapse method for nodes
|
|
208
|
+
* @param node Node that should be opened or closed
|
|
200
209
|
*/
|
|
201
210
|
switchExpandNode(node: IBrowserNode): void;
|
|
202
211
|
/**
|
|
203
|
-
*
|
|
204
|
-
* @param
|
|
212
|
+
* Method that must be called when an upload is completed.
|
|
213
|
+
* @param node Node where uploaded files should be attached.
|
|
214
|
+
* @param uploadIdList List of upload IDs that finished uploading.
|
|
205
215
|
*/
|
|
206
216
|
uploadComplete(node: IBrowserNode, uploadIdList: string[]): void;
|
|
207
217
|
/**
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
* @param file File für welches ein Delete Confirm eingefordert werden soll
|
|
211
|
-
*/
|
|
212
|
-
abstract confirmDeleteFile(file: IBrowserFile): Observable<boolean>;
|
|
213
|
-
/**
|
|
214
|
-
* Abstrakte Confirm Methode welche implementiert werden muss. Methode wird aufgerufen, wenn ein
|
|
215
|
-
* Ordner gelöscht werden soll.
|
|
216
|
-
* @param folder Ordern für welchen ein Delete Confirm eingefordert werden soll.
|
|
217
|
-
*/
|
|
218
|
-
abstract confirmDeleteNode(folder: IBrowserNode): Observable<boolean>;
|
|
219
|
-
/**
|
|
220
|
-
* Abstrakte Methode die Aufgerufen wird, wenn das Hochgeladene File aus dem Temp Folder in die
|
|
221
|
-
* Struktur verschoben wurde.
|
|
222
|
-
* @param uploadid ID des Uploads
|
|
218
|
+
* Abstract method invoked when the uploaded file has been moved from the temp folder into the structure.
|
|
219
|
+
* @param uploadid Upload ID
|
|
223
220
|
*/
|
|
224
221
|
abstract uploadedFileMoved(uploadid: string): void;
|
|
225
222
|
/**
|
|
226
|
-
*
|
|
227
|
-
* @param node Node
|
|
223
|
+
* Recursive method that removes new nodes from the given node and all its children
|
|
224
|
+
* @param node Node from which all new nodes should be removed.
|
|
228
225
|
*/
|
|
229
226
|
private clearNewChildNodes;
|
|
230
227
|
/**
|
|
231
|
-
*
|
|
232
|
-
* @param node Node
|
|
233
|
-
* @param parentPath
|
|
228
|
+
* Method that generates the path for a node
|
|
229
|
+
* @param node Node for which the path should be generated
|
|
230
|
+
* @param parentPath Parent path
|
|
234
231
|
*/
|
|
235
232
|
private fillPath;
|
|
236
233
|
/**
|
|
237
|
-
*
|
|
238
|
-
* @param node
|
|
239
|
-
* @param nodeToFind Node
|
|
240
|
-
* @returns
|
|
234
|
+
* Finds the parent node in the tree
|
|
235
|
+
* @param node Current node
|
|
236
|
+
* @param nodeToFind Node to find
|
|
237
|
+
* @returns The node if found, otherwise NULL
|
|
241
238
|
*/
|
|
242
239
|
private findParentNode;
|
|
243
240
|
/**
|
|
244
|
-
*
|
|
245
|
-
* @param node Node in
|
|
246
|
-
* @param path
|
|
247
|
-
* @returns Node
|
|
241
|
+
* Finds a node according to a URL path
|
|
242
|
+
* @param node Node in which to search
|
|
243
|
+
* @param path Path to search for
|
|
244
|
+
* @returns Node matching the path. Returns NULL if not found
|
|
248
245
|
*/
|
|
249
246
|
private findSelectedNodeByPath;
|
|
250
247
|
/**
|
|
251
|
-
*
|
|
252
|
-
* @param node Node in
|
|
253
|
-
* @param path Array
|
|
254
|
-
* @param index
|
|
255
|
-
* @returns Node
|
|
248
|
+
* Finds a node based on an array of node names
|
|
249
|
+
* @param node Node in which to search
|
|
250
|
+
* @param path Array of node names representing the hierarchy of the path
|
|
251
|
+
* @param index Current index in the path array
|
|
252
|
+
* @returns Node if found, otherwise NULL
|
|
256
253
|
*/
|
|
257
254
|
private findSelectedNodeByPathArray;
|
|
258
255
|
/**
|
|
259
|
-
*
|
|
260
|
-
* @param node Node
|
|
256
|
+
* Recursive method that ends edit mode for the node and all its children.
|
|
257
|
+
* @param node Node for which edit mode should be ended
|
|
261
258
|
*/
|
|
262
259
|
private resetNodeEditMode;
|
|
263
260
|
/**
|
|
264
|
-
*
|
|
261
|
+
* Sets the path in all nodes
|
|
265
262
|
*/
|
|
266
263
|
private setPathToAllNodes;
|
|
267
264
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Interface
|
|
2
|
+
* Interface for file items in the file browser component
|
|
3
3
|
*/
|
|
4
4
|
export interface IBrowserFile {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* File name
|
|
7
7
|
*/
|
|
8
8
|
Filename: string;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Item is being edited
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
IsEditMode: boolean;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* File size
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
Size: number;
|
|
17
17
|
}
|