@singularsystems/neo-core 0.10.59 → 0.10.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,6 +4,8 @@ import { ITooltipOptions } from "./TooltipOptions";
|
|
|
4
4
|
export interface IButtonOptions {
|
|
5
5
|
/** True if the click event of this button must be invoked when the parent form of this button is submitted. */
|
|
6
6
|
isSubmit?: boolean;
|
|
7
|
+
/** The id of the form this button should attached to. Use this if the button is not a descendent of the form. */
|
|
8
|
+
form?: string;
|
|
7
9
|
/** Bootstrap variant */
|
|
8
10
|
variant?: variant;
|
|
9
11
|
/** Bootstrap size */
|
|
@@ -103,7 +103,7 @@ var FileManagerBase = /** @class */ (function () {
|
|
|
103
103
|
}
|
|
104
104
|
if (this.validateFiles(files)) {
|
|
105
105
|
if (this.options.onFilesSelected) {
|
|
106
|
-
this.options.onFilesSelected(files, this);
|
|
106
|
+
return [2 /*return*/, Promise.resolve(this.options.onFilesSelected(files, this))];
|
|
107
107
|
}
|
|
108
108
|
else if (this.uploadEndpoint) {
|
|
109
109
|
if (!options.additionalData && this.options.additionalData) {
|
|
@@ -15,7 +15,7 @@ export interface IBaseFileManagerOptions {
|
|
|
15
15
|
* Callback to run when files are selected. If this callback is provided, you must manually
|
|
16
16
|
* call FileManager.uploadFiles, passing in the file list.
|
|
17
17
|
*/
|
|
18
|
-
onFilesSelected?: (files: FileList | File[], manager: IFileManager) => void
|
|
18
|
+
onFilesSelected?: (files: FileList | File[], manager: IFileManager) => void | Promise<void>;
|
|
19
19
|
/** Additional dictionary data to send to server. Only called if onFilesSelected is not provided. */
|
|
20
20
|
additionalData?: SimpleDictionary | (() => SimpleDictionary);
|
|
21
21
|
/** Callback to run after the upload has completed. The axios response data property is passed to the callback. */
|
package/dist/Model/List.d.ts
CHANGED
|
@@ -74,4 +74,6 @@ export default class List<T> extends Array<T> {
|
|
|
74
74
|
get isValid(): boolean;
|
|
75
75
|
/** True if any item in the list is dirty, or the list contains any deleted items. */
|
|
76
76
|
get isDirty(): boolean;
|
|
77
|
+
/** Indicates that the model is dirty and valid and can be saved. */
|
|
78
|
+
get readyToSave(): boolean;
|
|
77
79
|
}
|
package/dist/Model/List.js
CHANGED
|
@@ -211,6 +211,14 @@ var List = /** @class */ (function (_super) {
|
|
|
211
211
|
enumerable: true,
|
|
212
212
|
configurable: true
|
|
213
213
|
});
|
|
214
|
+
Object.defineProperty(List.prototype, "readyToSave", {
|
|
215
|
+
/** Indicates that the model is dirty and valid and can be saved. */
|
|
216
|
+
get: function () {
|
|
217
|
+
return this.isDirty && this.isValid;
|
|
218
|
+
},
|
|
219
|
+
enumerable: true,
|
|
220
|
+
configurable: true
|
|
221
|
+
});
|
|
214
222
|
return List;
|
|
215
223
|
}(Array));
|
|
216
224
|
export default List;
|