@sumaris-net/ngx-components 1.11.8 → 1.11.11
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/sumaris-net.ngx-components.umd.js +53 -65
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +18 -16
- package/esm2015/src/app/shared/upload-file/testing/upload-file.testing.js +7 -17
- package/esm2015/src/app/shared/upload-file/upload-file-popover.component.js +2 -2
- package/esm2015/src/app/shared/upload-file/upload-file.component.js +10 -10
- package/esm2015/src/app/shared/upload-file/upload-file.model.js +1 -1
- package/fesm2015/sumaris-net.ngx-components.js +32 -40
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +4 -3
- package/src/app/shared/upload-file/testing/upload-file.testing.d.ts +3 -1
- package/src/app/shared/upload-file/upload-file.model.d.ts +1 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -10,4 +10,4 @@ export class FileResponse {
|
|
|
10
10
|
this.statusText = (init === null || init === void 0 ? void 0 : init.statusText) || 'OK';
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkLWZpbGUubW9kZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL3NoYXJlZC91cGxvYWQtZmlsZS91cGxvYWQtZmlsZS5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUMsYUFBYSxFQUFrQyxNQUFNLHNCQUFzQixDQUFDO0FBQ3BGLE9BQU8sRUFBQyxRQUFRLEVBQUMsTU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SHR0cFByb2dyZXNzRXZlbnQgfCBIdHRwUmVzcG9uc2U8VD4gfCBGaWxlUHJvZ3Jlc3NFdmVudCB8IEZpbGVSZXNwb25zZTxUPiA7XG4iXX0=
|
|
@@ -15831,20 +15831,20 @@ class UploadFileComponent {
|
|
|
15831
15831
|
// Start uploading
|
|
15832
15832
|
switchMap(file => this.uploadFn(file)
|
|
15833
15833
|
.pipe(map((event) => {
|
|
15834
|
-
var _a, _b, _c;
|
|
15835
15834
|
// Progress event
|
|
15836
15835
|
if ((event === null || event === void 0 ? void 0 : event.type) === HttpEventType.UploadProgress || event.type === HttpEventType.User) {
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15836
|
+
if (isNotNil(event.loaded) && event.loaded >= 0) {
|
|
15837
|
+
file.progress = Math.min(1, event.loaded / (event.total || 1));
|
|
15838
|
+
}
|
|
15839
|
+
else {
|
|
15840
|
+
file.progress = -1; // Indeterminate progression
|
|
15841
|
+
}
|
|
15840
15842
|
}
|
|
15841
15843
|
// Response event
|
|
15842
15844
|
else if (event instanceof HttpResponse || event instanceof FileResponse) {
|
|
15843
|
-
file.body = event.body;
|
|
15844
15845
|
file.progress = 1;
|
|
15845
|
-
|
|
15846
|
-
console.debug(`[upload-file] ${file.name}: ${
|
|
15847
|
-
+ (((_b = file.body) === null || _b === void 0 ? void 0 : _b.finalName) ? ` (finalName: ${(_c = file.body) === null || _c === void 0 ? void 0 : _c.finalName})` : ''));
|
|
15846
|
+
file.response = event;
|
|
15847
|
+
console.debug(`[upload-file] ${file.name}: ${event.statusText || 'OK'}`, file.response);
|
|
15848
15848
|
}
|
|
15849
15849
|
// Other events
|
|
15850
15850
|
else {
|
|
@@ -15873,7 +15873,7 @@ class UploadFileComponent {
|
|
|
15873
15873
|
UploadFileComponent.decorators = [
|
|
15874
15874
|
{ type: Component, args: [{
|
|
15875
15875
|
selector: 'app-upload-file',
|
|
15876
|
-
template: "<div *ngIf=\"!uniqueFile || files.length === 0\"\n class=\"container\"\n appDragAndDrop (fileDropped)=\"onFileDropped($event)\">\n <input\n type=\"file\"\n #fileDropRef\n id=\"fileDropRef\"\n multiple\n [accept]=\"fileExtension\"\n (change)=\"fileBrowseHandler($any($event.target).files)\"\n />\n <mat-icon style=\"font-size: xx-large\" color=\"accent\">file_upload</mat-icon>\n <ion-label\n [innerHTML]=\"\n 'FILE.UPLOAD.DRAG_AND_DROP' | translate: { extension: !fileExtension ? '' : ' (' + fileExtension + ')' }\n \"\n ></ion-label>\n <ion-button>{{ 'FILE.UPLOAD.BROWSE' | translate }}</ion-button>\n</div>\n<div class=\"files-list\">\n <div *ngFor=\"let file of files; index as i\"\n class=\"single-file\"\n [class.deleting]=\"file.deleting\">\n <mat-icon>description</mat-icon>\n <div class=\"info\">\n <h4 class=\"name\">\n {{ file.name }}\n </h4>\n <p class=\"size\">\n {{ file.size | fileSize }}\n </p>\n <ion-progress-bar *ngIf=\"!file.error\"\n [value]=\"file.progress||0\"\n [type]=\"file.deleting ? 'indeterminate' : 'determinate'\"></ion-progress-bar>\n <ion-label *ngIf=\"file.error\" color=\"danger\" [innerHTML]=\"file.error | translate\"></ion-label>\n </div>\n <!-- remote from list (before importation) -->\n <button *ngIf=\"!(file.progress) || file.error\" mat-icon-button (click)=\"deleteFile(i)\">\n <mat-icon>clear</mat-icon>\n </button>\n <!-- delete file (remotely - after importation) -->\n <button *ngIf=\"file.progress === 1 && !!deleteFn && !file.deleting\" mat-icon-button (click)=\"deleteFile(i)\">\n <mat-icon>clear</mat-icon>\n </button>\n </div>\n</div>\n",
|
|
15876
|
+
template: "<div *ngIf=\"!uniqueFile || files.length === 0\"\n class=\"container\"\n appDragAndDrop (fileDropped)=\"onFileDropped($event)\">\n <input\n type=\"file\"\n #fileDropRef\n id=\"fileDropRef\"\n multiple\n [accept]=\"fileExtension\"\n (change)=\"fileBrowseHandler($any($event.target).files)\"\n />\n <mat-icon style=\"font-size: xx-large\" color=\"accent\">file_upload</mat-icon>\n <ion-label\n [innerHTML]=\"\n 'FILE.UPLOAD.DRAG_AND_DROP' | translate: { extension: !fileExtension ? '' : ' (' + fileExtension + ')' }\n \"\n ></ion-label>\n <ion-button>{{ 'FILE.UPLOAD.BROWSE' | translate }}</ion-button>\n</div>\n<div class=\"files-list\">\n <div *ngFor=\"let file of files; index as i\"\n class=\"single-file\"\n [class.deleting]=\"file.deleting\">\n <mat-icon>description</mat-icon>\n <div class=\"info\">\n <h4 class=\"name\">\n {{ file.name }}\n </h4>\n <p class=\"size\">\n {{ file.size | fileSize }}\n </p>\n <ion-progress-bar *ngIf=\"!file.error\"\n [value]=\"file.progress||0\"\n [type]=\"(file.deleting || file.progress === -1) ? 'indeterminate' : 'determinate'\"></ion-progress-bar>\n <ion-label *ngIf=\"file.error\" color=\"danger\" [innerHTML]=\"file.error | translate\"></ion-label>\n </div>\n <!-- remote from list (before importation) -->\n <button *ngIf=\"!(file.progress) || file.error\" mat-icon-button (click)=\"deleteFile(i)\">\n <mat-icon>clear</mat-icon>\n </button>\n <!-- delete file (remotely - after importation) -->\n <button *ngIf=\"file.progress === 1 && !!deleteFn && !file.deleting\" mat-icon-button (click)=\"deleteFile(i)\">\n <mat-icon>clear</mat-icon>\n </button>\n </div>\n</div>\n",
|
|
15877
15877
|
styles: [".container{width:calc(100% - 3rem);min-height:200px;padding:2rem;text-align:center;border:1px dashed #979797;position:relative;margin:1.5rem}.container input{opacity:0;position:absolute;z-index:2;width:100%;height:100%;top:0;left:0;cursor:pointer}.container ion-label{display:block;font-size:20px;font-weight:600;color:#38424c}.container label{display:inline-block;color:#fff;width:183px;height:44px;border-radius:21.5px;background-color:#db202f;padding:8px 16px}.fileover{-webkit-animation:shake 1s;animation:shake 1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.files-list{max-height:300px;overflow:auto}.files-list .single-file{display:flex;flex-grow:1;padding:.5rem;justify-content:space-between;align-items:center;border:1px dashed #979797;margin-bottom:1rem}.files-list .single-file.deleting .name{color:grey!important;font-style:italic!important}.files-list .single-file .name{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list .single-file .size{font-size:12px;font-weight:500;color:#a4a4a4;margin:0 0 .25rem}.files-list .single-file .info{width:100%}@-webkit-keyframes shake{0%{transform:translate(1px,1px) rotate(0deg)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0deg)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0deg)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0deg)}to{transform:translate(1px,-2px) rotate(-1deg)}}@keyframes shake{0%{transform:translate(1px,1px) rotate(0deg)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0deg)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0deg)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0deg)}to{transform:translate(1px,-2px) rotate(-1deg)}}"]
|
|
15878
15878
|
},] }
|
|
15879
15879
|
];
|
|
@@ -15936,7 +15936,7 @@ class UploadFilePopover {
|
|
|
15936
15936
|
errors.forEach((error) => console.error(error));
|
|
15937
15937
|
throw { message: 'FILE.UPLOAD.ERROR' };
|
|
15938
15938
|
}
|
|
15939
|
-
// return
|
|
15939
|
+
// return files
|
|
15940
15940
|
yield this.popoverController.dismiss(files);
|
|
15941
15941
|
}
|
|
15942
15942
|
catch (err) {
|
|
@@ -23622,12 +23622,15 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23622
23622
|
}
|
|
23623
23623
|
});
|
|
23624
23624
|
}
|
|
23625
|
+
canUserWrite(data, opts) {
|
|
23626
|
+
return this.dataService.canUserWrite(data, opts);
|
|
23627
|
+
}
|
|
23625
23628
|
startListenRemoteChanges() {
|
|
23626
23629
|
// Skip if disable, or already listening
|
|
23627
23630
|
if (this._listenChangesSubscription || !this._enableListenChanges || this.isNewData)
|
|
23628
23631
|
return;
|
|
23629
23632
|
// Listen for changes on server
|
|
23630
|
-
this._listenChangesSubscription = this.
|
|
23633
|
+
this._listenChangesSubscription = this.listenChanges(this.data.id, { interval: this._listenIntervalInSeconds })
|
|
23631
23634
|
.pipe(filter(isNotNil))
|
|
23632
23635
|
.subscribe((data) => {
|
|
23633
23636
|
if (data.updateDate && data.updateDate.isAfter(this.data.updateDate)) {
|
|
@@ -23889,6 +23892,16 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23889
23892
|
yield this.load(this.data && this.data.id);
|
|
23890
23893
|
});
|
|
23891
23894
|
}
|
|
23895
|
+
unload() {
|
|
23896
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23897
|
+
this.stopListenRemoteChanges();
|
|
23898
|
+
this.form.reset();
|
|
23899
|
+
this.registerForms();
|
|
23900
|
+
this._dirty = false;
|
|
23901
|
+
this.data = null;
|
|
23902
|
+
this.saving = false;
|
|
23903
|
+
});
|
|
23904
|
+
}
|
|
23892
23905
|
goBack(event) {
|
|
23893
23906
|
var _a;
|
|
23894
23907
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -23935,10 +23948,6 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23935
23948
|
if (!opts || opts.emitEvent !== false)
|
|
23936
23949
|
this.markForCheck();
|
|
23937
23950
|
}
|
|
23938
|
-
/* -- public abstract methods (to override) -- */
|
|
23939
|
-
canUserWrite(data, opts) {
|
|
23940
|
-
return this.dataService.canUserWrite(data, opts);
|
|
23941
|
-
}
|
|
23942
23951
|
/* -- protected methods -- */
|
|
23943
23952
|
/**
|
|
23944
23953
|
* Return undefined to keep same tab
|
|
@@ -23948,16 +23957,6 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23948
23957
|
const nextTabIndex = this.selectedTabIndex + 1;
|
|
23949
23958
|
return nextTabIndex < this.tabCount ? nextTabIndex : undefined;
|
|
23950
23959
|
}
|
|
23951
|
-
unload() {
|
|
23952
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23953
|
-
this.stopListenRemoteChanges();
|
|
23954
|
-
this.form.reset();
|
|
23955
|
-
this.registerForms();
|
|
23956
|
-
this._dirty = false;
|
|
23957
|
-
this.data = null;
|
|
23958
|
-
this.saving = false;
|
|
23959
|
-
});
|
|
23960
|
-
}
|
|
23961
23960
|
onBeforeEntityLoad() {
|
|
23962
23961
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23963
23962
|
// can be overwritten by subclasses
|
|
@@ -24049,6 +24048,9 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
24049
24048
|
}
|
|
24050
24049
|
return parentUrl;
|
|
24051
24050
|
}
|
|
24051
|
+
listenChanges(id, opts) {
|
|
24052
|
+
return this.dataService.listenChanges(this.data.id, opts);
|
|
24053
|
+
}
|
|
24052
24054
|
markForCheck() {
|
|
24053
24055
|
this.cd.markForCheck();
|
|
24054
24056
|
}
|
|
@@ -25898,20 +25900,9 @@ class UploadFileTestingPage {
|
|
|
25898
25900
|
}
|
|
25899
25901
|
showPopover(event, opts) {
|
|
25900
25902
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25901
|
-
const
|
|
25902
|
-
|
|
25903
|
-
|
|
25904
|
-
backdropDismiss: false,
|
|
25905
|
-
keyboardClose: false,
|
|
25906
|
-
event,
|
|
25907
|
-
translucent: true,
|
|
25908
|
-
cssClass: 'popover-large',
|
|
25909
|
-
});
|
|
25910
|
-
yield modal.present();
|
|
25911
|
-
const { data } = yield modal.onDidDismiss();
|
|
25912
|
-
if (data) {
|
|
25913
|
-
console.info('Popover result: ', data);
|
|
25914
|
-
}
|
|
25903
|
+
const { data } = yield FilesUtils.showUploadPopover(this.popoverController, event, Object.assign({ uploadFn: (file) => this.uploadFile(file), deleteFn: (file) => this.deleteFile(file) }, opts));
|
|
25904
|
+
const filenames = (data || []).map(file => { var _a, _b; return (_b = (_a = file.response) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.finalName; });
|
|
25905
|
+
console.info('Popover result: ', filenames);
|
|
25915
25906
|
});
|
|
25916
25907
|
}
|
|
25917
25908
|
/**
|
|
@@ -25927,7 +25918,8 @@ class UploadFileTestingPage {
|
|
|
25927
25918
|
loaded += loadStep;
|
|
25928
25919
|
// Return progression
|
|
25929
25920
|
if (loaded < file.size) {
|
|
25930
|
-
return {
|
|
25921
|
+
//return {type: HttpEventType.UploadProgress, total: file.size, loaded };
|
|
25922
|
+
return { type: HttpEventType.UploadProgress, loaded: -1 };
|
|
25931
25923
|
}
|
|
25932
25924
|
// Stop the timer
|
|
25933
25925
|
setTimeout(() => $stop.next(), 100);
|