nuxeo-development-framework 5.9.3 → 5.9.5

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.
@@ -1097,6 +1097,7 @@
1097
1097
  headers: options.headers,
1098
1098
  body: options.body,
1099
1099
  signal: options.signal,
1100
+ redirect: 'manual'
1100
1101
  };
1101
1102
  if (opts.credentials) {
1102
1103
  fetchOptions.credentials = opts.credentials;
@@ -6480,17 +6481,32 @@
6480
6481
  this.onSelecting.emit(value);
6481
6482
  };
6482
6483
  DynamicFormVocabularyItemComponent.prototype.writeValue = function (value) {
6484
+ var _this = this;
6483
6485
  // if (value) { removed to allow reseting ui when resetting form
6484
- if (this.data.some(function (item) { return item.id === value; })) {
6485
- this.selection = value;
6486
+ // this.selection = value;
6487
+ // }
6488
+ if (this.multiple) {
6489
+ // Ensure it's an array
6490
+ var incoming = Array.isArray(value) ? value : [];
6491
+ // Keep only IDs that exist in this.data
6492
+ this.selection = incoming.filter(function (id) { return _this.data.some(function (item) { return item.id === id; }); });
6493
+ // If after filtering it's empty, propagate null
6494
+ if (this.selection.length === 0 && this.propagateChange) {
6495
+ this.propagateChange(null);
6496
+ }
6486
6497
  }
6487
6498
  else {
6488
- this.selection = null;
6489
- if (this.propagateChange) {
6490
- this.propagateChange(null);
6499
+ // Single value mode
6500
+ if (this.data.some(function (item) { return item.id === value; })) {
6501
+ this.selection = value;
6502
+ }
6503
+ else {
6504
+ this.selection = null;
6505
+ if (this.propagateChange) {
6506
+ this.propagateChange(null);
6507
+ }
6491
6508
  }
6492
6509
  }
6493
- // }
6494
6510
  };
6495
6511
  DynamicFormVocabularyItemComponent.prototype.registerOnChange = function (fn) {
6496
6512
  this.propagateChange = fn;
@@ -38315,6 +38331,8 @@
38315
38331
  options = {
38316
38332
  filename: this.correspondance.title ? this.correspondance.title : 'myDocument.pdf',
38317
38333
  // xfdfString,
38334
+ includeAnnotations: true,
38335
+ flatten: true,
38318
38336
  flags: saveOptions.LINEARIZED,
38319
38337
  downloadType: 'pdf'
38320
38338
  };