nuxeo-development-framework 3.2.9 → 3.3.0
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/nuxeo-development-framework.umd.js +24 -14
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/shared-services/mainfolder.service.js +23 -15
- package/fesm2015/nuxeo-development-framework.js +22 -14
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/shared-services/mainfolder.service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -21035,7 +21035,8 @@
|
|
|
21035
21035
|
_this.localStoragKeys = _this.appConfigService.myConfiguration.localStorageKey;
|
|
21036
21036
|
});
|
|
21037
21037
|
}
|
|
21038
|
-
MainfolderService.prototype.fetchfileManager_mainFolderId = function (apiName) {
|
|
21038
|
+
MainfolderService.prototype.fetchfileManager_mainFolderId = function (apiName, failIfEmptyRes) {
|
|
21039
|
+
if (failIfEmptyRes === void 0) { failIfEmptyRes = true; }
|
|
21039
21040
|
return rxjs.from(this.nuxeoService.nuxeoClient
|
|
21040
21041
|
.operation(apiName ? apiName : 'AC_UA_GetFileManagerID')
|
|
21041
21042
|
.execute({
|
|
@@ -21047,8 +21048,11 @@
|
|
|
21047
21048
|
},
|
|
21048
21049
|
})).pipe(operators.tap(function (res) {
|
|
21049
21050
|
var _a;
|
|
21050
|
-
|
|
21051
|
-
|
|
21051
|
+
// fail if res,entries was empty and we are making this check since there is cases we need to return empty response and not failsing like files in dgda
|
|
21052
|
+
if (failIfEmptyRes) {
|
|
21053
|
+
if (!((_a = res === null || res === void 0 ? void 0 : res.entries) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
21054
|
+
throw Error('Main Folder - empty response');
|
|
21055
|
+
}
|
|
21052
21056
|
}
|
|
21053
21057
|
}), operators.catchError(function (err) {
|
|
21054
21058
|
console.error(err);
|
|
@@ -21087,23 +21091,29 @@
|
|
|
21087
21091
|
return rxjs.of(false);
|
|
21088
21092
|
}));
|
|
21089
21093
|
};
|
|
21090
|
-
MainfolderService.prototype.save_fileManagerObj_ToLocalStorage = function (apiName) {
|
|
21094
|
+
MainfolderService.prototype.save_fileManagerObj_ToLocalStorage = function (apiName, failIfEmptyRes) {
|
|
21091
21095
|
var _this = this;
|
|
21092
21096
|
if (apiName === void 0) { apiName = 'AC_UA_GetFileManagerID'; }
|
|
21097
|
+
if (failIfEmptyRes === void 0) { failIfEmptyRes = true; }
|
|
21093
21098
|
/*return this.userPreference.hasItem('fileManagerObj') && !reset
|
|
21094
21099
|
? of(true):*/
|
|
21095
|
-
return this.fetchfileManager_mainFolderId(apiName).pipe(operators.tap(function (res) {
|
|
21100
|
+
return this.fetchfileManager_mainFolderId(apiName, failIfEmptyRes).pipe(operators.tap(function (res) {
|
|
21096
21101
|
console.log('res: ', res);
|
|
21097
21102
|
if (res) {
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
|
|
21104
|
-
|
|
21105
|
-
|
|
21106
|
-
|
|
21103
|
+
if (res.entries) {
|
|
21104
|
+
_this.fileManagerObj = {
|
|
21105
|
+
entries: res.entries.map(function (item) {
|
|
21106
|
+
delete item._baseOptions;
|
|
21107
|
+
delete item._dirtyProperties;
|
|
21108
|
+
delete item._nuxeo;
|
|
21109
|
+
delete item._repository;
|
|
21110
|
+
return item;
|
|
21111
|
+
}),
|
|
21112
|
+
};
|
|
21113
|
+
}
|
|
21114
|
+
else {
|
|
21115
|
+
_this.fileManagerObj = {};
|
|
21116
|
+
}
|
|
21107
21117
|
_this.userPreference.set(apiName ? _this.localStoragKeys[apiName] : 'fileManagerObj', JSON.stringify(_this.fileManagerObj));
|
|
21108
21118
|
}
|
|
21109
21119
|
}), operators.switchMap(function (value) { return rxjs.of(_this.get_fileManagerObj_FromLocalStorage(apiName ? _this.localStoragKeys[apiName] : 'fileManagerObj')); }));
|