@hmcts/ccd-case-ui-toolkit 4.18.16-EUI-6513-DisplayContext-READONLY → 4.18.16-EUI-5696-upload-error-fix

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/RELEASE-NOTES.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## RELEASE NOTES
2
2
 
3
+ ### Version 4.18.16-EUI-5696-upload-error-fix
4
+ **EUI-5696** Bug fix for document upload
5
+
3
6
  ### Version 4.18.16-EUI-6309-mandatory-field-issue
4
7
  **EUI-6309* mandatory-field-issue
5
8
 
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @hmcts/ccd-case-ui-toolkit - Case UI Toolkit
3
- * @version v4.18.16-EUI-6513-DisplayContext-READONLY
3
+ * @version v4.18.16-EUI-5696-upload-error-fix
4
4
  * @link undefined
5
5
  * @license MIT
6
6
  */
@@ -28688,8 +28688,7 @@ var FieldWriteComponent = /** @class */ (function (_super) {
28688
28688
  form_1.FormValidatorsService.addValidators(caseField, control);
28689
28689
  };
28690
28690
  FieldWriteComponent.prototype.ngOnInit = function () {
28691
- var writeMode = this.caseField.display_context !== 'READONLY';
28692
- var componentClass = this.paletteService.getFieldComponentClass(this.caseField, writeMode);
28691
+ var componentClass = this.paletteService.getFieldComponentClass(this.caseField, true);
28693
28692
  var injector = core_1.Injector.create([], this.fieldContainer.parentInjector);
28694
28693
  var component = this.resolver.resolveComponentFactory(componentClass).create(injector);
28695
28694
  // Only Fixed list use plainToClassFromExist
@@ -42152,11 +42151,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
42152
42151
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
42153
42152
  };
42154
42153
  Object.defineProperty(exports, "__esModule", ({ value: true }));
42154
+ var http_1 = __webpack_require__(17103);
42155
42155
  var core_1 = __webpack_require__(57208);
42156
- var http_1 = __webpack_require__(27687);
42157
- var app_config_1 = __webpack_require__(35185);
42156
+ var rxjs_1 = __webpack_require__(87318);
42158
42157
  var operators_1 = __webpack_require__(41163);
42159
- var http_2 = __webpack_require__(17103);
42158
+ var app_config_1 = __webpack_require__(35185);
42159
+ var http_2 = __webpack_require__(27687);
42160
42160
  var DocumentManagementService = /** @class */ (function () {
42161
42161
  function DocumentManagementService(http, appConfig) {
42162
42162
  this.http = http;
@@ -42164,15 +42164,13 @@ var DocumentManagementService = /** @class */ (function () {
42164
42164
  }
42165
42165
  DocumentManagementService_1 = DocumentManagementService;
42166
42166
  DocumentManagementService.prototype.uploadFile = function (formData) {
42167
+ var _this = this;
42167
42168
  var url = this.getDocStoreUrl();
42168
42169
  // Do not set any headers, such as "Accept" or "Content-Type", with null values; this is not permitted with the
42169
42170
  // Angular HttpClient in @angular/common/http. Just create and pass a new HttpHeaders object. Angular will add the
42170
42171
  // correct headers and values automatically
42171
- var headers = new http_2.HttpHeaders();
42172
- return this.http
42173
- .post(url, formData, { headers: headers, observe: 'body' })
42174
- .pipe(operators_1.delay(DocumentManagementService_1.RESPONSE_DELAY))
42175
- .pipe();
42172
+ var headers = new http_1.HttpHeaders();
42173
+ return rxjs_1.timer(DocumentManagementService_1.RESPONSE_DELAY).pipe(operators_1.switchMap(function () { return _this.http.post(url, formData, { headers: headers, observe: 'body' }); }));
42176
42174
  };
42177
42175
  DocumentManagementService.prototype.getMediaViewerInfo = function (documentFieldValue) {
42178
42176
  var mediaViewerInfo = {
@@ -42259,7 +42257,7 @@ var DocumentManagementService = /** @class */ (function () {
42259
42257
  DocumentManagementService.powerpointList = ['PPT', 'PPTX', 'ppt', 'pptx'];
42260
42258
  DocumentManagementService = DocumentManagementService_1 = __decorate([
42261
42259
  core_1.Injectable(),
42262
- __metadata("design:paramtypes", [http_1.HttpService, app_config_1.AbstractAppConfig])
42260
+ __metadata("design:paramtypes", [http_2.HttpService, app_config_1.AbstractAppConfig])
42263
42261
  ], DocumentManagementService);
42264
42262
  return DocumentManagementService;
42265
42263
  }());