@eo-sdk/client 9.0.3 → 9.2.0-rc.1

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.
Files changed (73) hide show
  1. package/app/eo-client/inbox-state/inbox-state/inbox.types.enum.d.ts +2 -2
  2. package/app/eo-framework/actions/action-menu/action-menu.component.d.ts +4 -2
  3. package/app/eo-framework/actions/action.module.d.ts +2 -2
  4. package/app/eo-framework/actions/actions/add-resubmission-action/add-resubmission/add-resubmission.component.d.ts +2 -1
  5. package/app/eo-framework/actions/actions/add-subscription-action/add-subscription/add-subscription.component.d.ts +2 -1
  6. package/app/eo-framework/actions/actions/delete-action/delete/delete.component.d.ts +4 -2
  7. package/app/eo-framework/actions/actions/finalize/finalize-action.d.ts +5 -5
  8. package/app/eo-framework/actions/actions/finalize/finalize-object-action/finalize-object-action.component.d.ts +14 -0
  9. package/app/eo-framework/actions/actions/share-object-action/share-object/share-object.component.d.ts +5 -2
  10. package/app/eo-framework/form-elements/organization/organization.component.d.ts +3 -2
  11. package/app/eo-framework/grid/extensions/filter/setFilters/set-filter.component.d.ts +0 -1
  12. package/app/eo-framework/grid/extensions/filter/text/text-filter.component.d.ts +8 -4
  13. package/app/eo-framework/util/directive/prevent-double-click.directive.d.ts +1 -0
  14. package/assets/_default/config/main.json +1 -1
  15. package/assets/_default/i18n/de.json +18 -18
  16. package/assets/_default/i18n/en.json +18 -17
  17. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js +548 -516
  18. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js.map +1 -1
  19. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js +2 -3
  20. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js.map +1 -1
  21. package/bundles/eo-sdk-client.umd.js +359 -213
  22. package/bundles/eo-sdk-client.umd.js.map +1 -1
  23. package/bundles/eo-sdk-client.umd.min.js +1 -1
  24. package/bundles/eo-sdk-client.umd.min.js.map +1 -1
  25. package/eo-sdk-client.d.ts +42 -42
  26. package/eo-sdk-client.metadata.json +1 -1
  27. package/esm2015/app/eo-client/about-state/about-state.component.js +3 -3
  28. package/esm2015/app/eo-client/dashboard/dashboard.component.js +3 -5
  29. package/esm2015/app/eo-client/inbox-state/inbox-state/inbox-state.component.js +9 -7
  30. package/esm2015/app/eo-client/inbox-state/inbox-state/inbox.types.enum.js +3 -3
  31. package/esm2015/app/eo-client/object-state/object-state/object-state.component.js +2 -2
  32. package/esm2015/app/eo-client/stored-queries-state/stored-queries-state.component.js +2 -2
  33. package/esm2015/app/eo-framework/actions/action-menu/action-menu.component.js +14 -5
  34. package/esm2015/app/eo-framework/actions/action.module.js +4 -2
  35. package/esm2015/app/eo-framework/actions/actions/add-resubmission-action/add-resubmission/add-resubmission.component.js +7 -3
  36. package/esm2015/app/eo-framework/actions/actions/add-subscription-action/add-subscription/add-subscription.component.js +8 -4
  37. package/esm2015/app/eo-framework/actions/actions/delete-action/delete/delete.component.js +11 -4
  38. package/esm2015/app/eo-framework/actions/actions/finalize/finalize-action.js +12 -11
  39. package/esm2015/app/eo-framework/actions/actions/finalize/finalize-object-action/finalize-object-action.component.js +39 -0
  40. package/esm2015/app/eo-framework/actions/actions/share-object-action/share-object/share-object.component.js +43 -16
  41. package/esm2015/app/eo-framework/app-shell/app-bar/side-bar/side-bar.component.js +2 -2
  42. package/esm2015/app/eo-framework/app-shell/app-shell.module.js +1 -3
  43. package/esm2015/app/eo-framework/form-elements/organization/organization.component.js +5 -2
  44. package/esm2015/app/eo-framework/frame/frame.component.js +35 -11
  45. package/esm2015/app/eo-framework/grid/extensions/filter/setFilters/set-filter.component.js +2 -4
  46. package/esm2015/app/eo-framework/grid/extensions/filter/text/text-filter.component.js +30 -17
  47. package/esm2015/app/eo-framework/grid/extensions/quick-filter/quick-filter.component.js +2 -2
  48. package/esm2015/app/eo-framework/grid/filters/codesystem-filter.component.js +2 -2
  49. package/esm2015/app/eo-framework/grid/filters/dynamic-list-filter.component.js +1 -2
  50. package/esm2015/app/eo-framework/grid/filters/list-filter.component.js +2 -3
  51. package/esm2015/app/eo-framework/grid/filters/organization-filter.component.js +3 -3
  52. package/esm2015/app/eo-framework/object-details/object-details.component.js +12 -1
  53. package/esm2015/app/eo-framework/result-list/result-list.module.js +2 -2
  54. package/esm2015/app/eo-framework/stored-query/stored-query-details/stored-query-details.component.js +2 -2
  55. package/esm2015/app/eo-framework/ui/eo-dialog/eo-dialog.component.js +3 -3
  56. package/esm2015/app/eo-framework/ui/ui.module.js +6 -3
  57. package/esm2015/app/eo-framework/util/directive/prevent-double-click.directive.js +8 -2
  58. package/esm2015/eo-sdk-client.js +43 -43
  59. package/esm2015/projects/eo-sdk/core/lib/model/inbox-item.model.js +2 -2
  60. package/esm2015/projects/eo-sdk/core/lib/service/backend/backend.service.js +35 -9
  61. package/esm2015/projects/eo-sdk/core/lib/service/dms/dms.service.js +10 -11
  62. package/esm2015/projects/eo-sdk/core/lib/service/user/user.service.js +12 -2
  63. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js +55 -20
  64. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js.map +1 -1
  65. package/fesm2015/eo-sdk-client.js +308 -167
  66. package/fesm2015/eo-sdk-client.js.map +1 -1
  67. package/package.json +2 -2
  68. package/projects/eo-sdk/core/eo-sdk-client-projects-eo-sdk-core.metadata.json +1 -1
  69. package/projects/eo-sdk/core/lib/model/inbox-item.model.d.ts +2 -2
  70. package/projects/eo-sdk/core/lib/service/backend/backend.service.d.ts +1 -0
  71. package/projects/eo-sdk/core/lib/service/dms/dms.service.d.ts +3 -2
  72. package/projects/eo-sdk/core/lib/service/user/user.service.d.ts +5 -0
  73. package/projects/eo-sdk/core/package.json +1 -1
@@ -1518,6 +1518,315 @@
1518
1518
  return EoUser;
1519
1519
  }());
1520
1520
 
1521
+ /*! *****************************************************************************
1522
+ Copyright (c) Microsoft Corporation.
1523
+
1524
+ Permission to use, copy, modify, and/or distribute this software for any
1525
+ purpose with or without fee is hereby granted.
1526
+
1527
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1528
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1529
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1530
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1531
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1532
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1533
+ PERFORMANCE OF THIS SOFTWARE.
1534
+ ***************************************************************************** */
1535
+ /* global Reflect, Promise */
1536
+ var extendStatics = function (d, b) {
1537
+ extendStatics = Object.setPrototypeOf ||
1538
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1539
+ function (d, b) { for (var p in b)
1540
+ if (Object.prototype.hasOwnProperty.call(b, p))
1541
+ d[p] = b[p]; };
1542
+ return extendStatics(d, b);
1543
+ };
1544
+ function __extends(d, b) {
1545
+ if (typeof b !== "function" && b !== null)
1546
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1547
+ extendStatics(d, b);
1548
+ function __() { this.constructor = d; }
1549
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1550
+ }
1551
+ var __assign = function () {
1552
+ __assign = Object.assign || function __assign(t) {
1553
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1554
+ s = arguments[i];
1555
+ for (var p in s)
1556
+ if (Object.prototype.hasOwnProperty.call(s, p))
1557
+ t[p] = s[p];
1558
+ }
1559
+ return t;
1560
+ };
1561
+ return __assign.apply(this, arguments);
1562
+ };
1563
+ function __rest(s, e) {
1564
+ var t = {};
1565
+ for (var p in s)
1566
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1567
+ t[p] = s[p];
1568
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1569
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1570
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1571
+ t[p[i]] = s[p[i]];
1572
+ }
1573
+ return t;
1574
+ }
1575
+ function __decorate(decorators, target, key, desc) {
1576
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1577
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1578
+ r = Reflect.decorate(decorators, target, key, desc);
1579
+ else
1580
+ for (var i = decorators.length - 1; i >= 0; i--)
1581
+ if (d = decorators[i])
1582
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1583
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1584
+ }
1585
+ function __param(paramIndex, decorator) {
1586
+ return function (target, key) { decorator(target, key, paramIndex); };
1587
+ }
1588
+ function __metadata(metadataKey, metadataValue) {
1589
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1590
+ return Reflect.metadata(metadataKey, metadataValue);
1591
+ }
1592
+ function __awaiter(thisArg, _arguments, P, generator) {
1593
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1594
+ return new (P || (P = Promise))(function (resolve, reject) {
1595
+ function fulfilled(value) { try {
1596
+ step(generator.next(value));
1597
+ }
1598
+ catch (e) {
1599
+ reject(e);
1600
+ } }
1601
+ function rejected(value) { try {
1602
+ step(generator["throw"](value));
1603
+ }
1604
+ catch (e) {
1605
+ reject(e);
1606
+ } }
1607
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1608
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1609
+ });
1610
+ }
1611
+ function __generator(thisArg, body) {
1612
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
1613
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1614
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
1615
+ function verb(n) { return function (v) { return step([n, v]); }; }
1616
+ function step(op) {
1617
+ if (f)
1618
+ throw new TypeError("Generator is already executing.");
1619
+ while (_)
1620
+ try {
1621
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
1622
+ return t;
1623
+ if (y = 0, t)
1624
+ op = [op[0] & 2, t.value];
1625
+ switch (op[0]) {
1626
+ case 0:
1627
+ case 1:
1628
+ t = op;
1629
+ break;
1630
+ case 4:
1631
+ _.label++;
1632
+ return { value: op[1], done: false };
1633
+ case 5:
1634
+ _.label++;
1635
+ y = op[1];
1636
+ op = [0];
1637
+ continue;
1638
+ case 7:
1639
+ op = _.ops.pop();
1640
+ _.trys.pop();
1641
+ continue;
1642
+ default:
1643
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1644
+ _ = 0;
1645
+ continue;
1646
+ }
1647
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
1648
+ _.label = op[1];
1649
+ break;
1650
+ }
1651
+ if (op[0] === 6 && _.label < t[1]) {
1652
+ _.label = t[1];
1653
+ t = op;
1654
+ break;
1655
+ }
1656
+ if (t && _.label < t[2]) {
1657
+ _.label = t[2];
1658
+ _.ops.push(op);
1659
+ break;
1660
+ }
1661
+ if (t[2])
1662
+ _.ops.pop();
1663
+ _.trys.pop();
1664
+ continue;
1665
+ }
1666
+ op = body.call(thisArg, _);
1667
+ }
1668
+ catch (e) {
1669
+ op = [6, e];
1670
+ y = 0;
1671
+ }
1672
+ finally {
1673
+ f = t = 0;
1674
+ }
1675
+ if (op[0] & 5)
1676
+ throw op[1];
1677
+ return { value: op[0] ? op[1] : void 0, done: true };
1678
+ }
1679
+ }
1680
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
1681
+ if (k2 === undefined)
1682
+ k2 = k;
1683
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
1684
+ }) : (function (o, m, k, k2) {
1685
+ if (k2 === undefined)
1686
+ k2 = k;
1687
+ o[k2] = m[k];
1688
+ });
1689
+ function __exportStar(m, o) {
1690
+ for (var p in m)
1691
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
1692
+ __createBinding(o, m, p);
1693
+ }
1694
+ function __values(o) {
1695
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1696
+ if (m)
1697
+ return m.call(o);
1698
+ if (o && typeof o.length === "number")
1699
+ return {
1700
+ next: function () {
1701
+ if (o && i >= o.length)
1702
+ o = void 0;
1703
+ return { value: o && o[i++], done: !o };
1704
+ }
1705
+ };
1706
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1707
+ }
1708
+ function __read(o, n) {
1709
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1710
+ if (!m)
1711
+ return o;
1712
+ var i = m.call(o), r, ar = [], e;
1713
+ try {
1714
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
1715
+ ar.push(r.value);
1716
+ }
1717
+ catch (error) {
1718
+ e = { error: error };
1719
+ }
1720
+ finally {
1721
+ try {
1722
+ if (r && !r.done && (m = i["return"]))
1723
+ m.call(i);
1724
+ }
1725
+ finally {
1726
+ if (e)
1727
+ throw e.error;
1728
+ }
1729
+ }
1730
+ return ar;
1731
+ }
1732
+ /** @deprecated */
1733
+ function __spread() {
1734
+ for (var ar = [], i = 0; i < arguments.length; i++)
1735
+ ar = ar.concat(__read(arguments[i]));
1736
+ return ar;
1737
+ }
1738
+ /** @deprecated */
1739
+ function __spreadArrays() {
1740
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
1741
+ s += arguments[i].length;
1742
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
1743
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1744
+ r[k] = a[j];
1745
+ return r;
1746
+ }
1747
+ function __spreadArray(to, from) {
1748
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
1749
+ to[j] = from[i];
1750
+ return to;
1751
+ }
1752
+ function __await(v) {
1753
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
1754
+ }
1755
+ function __asyncGenerator(thisArg, _arguments, generator) {
1756
+ if (!Symbol.asyncIterator)
1757
+ throw new TypeError("Symbol.asyncIterator is not defined.");
1758
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
1759
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
1760
+ function verb(n) { if (g[n])
1761
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
1762
+ function resume(n, v) { try {
1763
+ step(g[n](v));
1764
+ }
1765
+ catch (e) {
1766
+ settle(q[0][3], e);
1767
+ } }
1768
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1769
+ function fulfill(value) { resume("next", value); }
1770
+ function reject(value) { resume("throw", value); }
1771
+ function settle(f, v) { if (f(v), q.shift(), q.length)
1772
+ resume(q[0][0], q[0][1]); }
1773
+ }
1774
+ function __asyncDelegator(o) {
1775
+ var i, p;
1776
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1777
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
1778
+ }
1779
+ function __asyncValues(o) {
1780
+ if (!Symbol.asyncIterator)
1781
+ throw new TypeError("Symbol.asyncIterator is not defined.");
1782
+ var m = o[Symbol.asyncIterator], i;
1783
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
1784
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
1785
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
1786
+ }
1787
+ function __makeTemplateObject(cooked, raw) {
1788
+ if (Object.defineProperty) {
1789
+ Object.defineProperty(cooked, "raw", { value: raw });
1790
+ }
1791
+ else {
1792
+ cooked.raw = raw;
1793
+ }
1794
+ return cooked;
1795
+ }
1796
+ ;
1797
+ var __setModuleDefault = Object.create ? (function (o, v) {
1798
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1799
+ }) : function (o, v) {
1800
+ o["default"] = v;
1801
+ };
1802
+ function __importStar(mod) {
1803
+ if (mod && mod.__esModule)
1804
+ return mod;
1805
+ var result = {};
1806
+ if (mod != null)
1807
+ for (var k in mod)
1808
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
1809
+ __createBinding(result, mod, k);
1810
+ __setModuleDefault(result, mod);
1811
+ return result;
1812
+ }
1813
+ function __importDefault(mod) {
1814
+ return (mod && mod.__esModule) ? mod : { default: mod };
1815
+ }
1816
+ function __classPrivateFieldGet(receiver, privateMap) {
1817
+ if (!privateMap.has(receiver)) {
1818
+ throw new TypeError("attempted to get private field on non-instance");
1819
+ }
1820
+ return privateMap.get(receiver);
1821
+ }
1822
+ function __classPrivateFieldSet(receiver, privateMap, value) {
1823
+ if (!privateMap.has(receiver)) {
1824
+ throw new TypeError("attempted to set private field on non-instance");
1825
+ }
1826
+ privateMap.set(receiver, value);
1827
+ return value;
1828
+ }
1829
+
1521
1830
  /**
1522
1831
  * Set up the default logger.
1523
1832
  * The default logger doesn't actually log anything;
@@ -1857,25 +2166,44 @@
1857
2166
  * Possible renditions are `PDF`, `TIFF`, `TEXT`, `JPEG`.
1858
2167
  */
1859
2168
  BackendService.prototype.downloadContent = function (dmsObjects, rendition, fileNameWithVersionNumber) {
1860
- var _this = this;
1861
- dmsObjects.forEach(function (dmsObject) {
1862
- if (dmsObject.content) {
1863
- var uri = _this.getServiceBase() + "/dms/" + dmsObject.content.id + "/content?type=" + dmsObject.content.type + "&asdownload=true";
2169
+ var item = dmsObjects[0];
2170
+ if (dmsObjects.length === 1) {
2171
+ if (item.content) {
2172
+ var uri = this.getServiceBase() + "/dms/" + item.content.id + "/content?type=" + item.content.type + "&asdownload=true";
1864
2173
  if (rendition) {
1865
2174
  uri += "&rendition=" + rendition + "&_intent=DOWNLOAD_" + rendition;
1866
2175
  }
1867
2176
  else {
1868
2177
  uri += '&_intent=DOWNLOAD';
1869
2178
  }
1870
- if (dmsObject.content.id === dmsObject.id) {
1871
- uri += "&version=" + dmsObject.version;
2179
+ if (item.content.id === item.id) {
2180
+ uri += "&version=" + item.version;
1872
2181
  }
1873
- _this.download(uri, fileNameWithVersionNumber ? dmsObject.version : null);
2182
+ this.download(uri, fileNameWithVersionNumber ? item.version : null);
1874
2183
  }
1875
2184
  else {
1876
- _this.logger.error('The provided dms object has no content', dmsObject);
2185
+ this.logger.error('The provided dms object has no content', item);
1877
2186
  }
1878
- });
2187
+ }
2188
+ if (dmsObjects.length > 1) {
2189
+ var uri = this.getServiceBase() + "/dms/batch/export";
2190
+ if (item.content) {
2191
+ var expressions = dmsObjects.map(function (obj) { return obj.content.id; });
2192
+ var data = {
2193
+ query: {
2194
+ expression: __spread(expressions)
2195
+ },
2196
+ options: {
2197
+ rendition: ''
2198
+ }
2199
+ };
2200
+ data.options.rendition = rendition ? 'PDF' : null;
2201
+ this.downloadMulti(uri, fileNameWithVersionNumber ? item.version : null, data);
2202
+ }
2203
+ else {
2204
+ this.logger.error('The provided dms object has no content', item);
2205
+ }
2206
+ }
1879
2207
  };
1880
2208
  BackendService.prototype.download = function (uri, version) {
1881
2209
  var _this = this;
@@ -1884,6 +2212,13 @@
1884
2212
  FileSaver.saveAs(res.body, _this.getFileNameFromHttpResponse(res, version));
1885
2213
  });
1886
2214
  };
2215
+ BackendService.prototype.downloadMulti = function (uri, version, _body) {
2216
+ var _this = this;
2217
+ this.http.post(uri, _body, { observe: 'response', responseType: 'blob', withCredentials: this.coreConfig.withCredentials })
2218
+ .subscribe(function (res) {
2219
+ FileSaver.saveAs(res.body, _this.getFileNameFromHttpResponse(res, version));
2220
+ });
2221
+ };
1887
2222
  BackendService.prototype.getFileNameFromHttpResponse = function (res, version) {
1888
2223
  var contentDispositionHeader = res.headers.get('Content-Disposition') || '';
1889
2224
  var encodedFileNameMatchResult = contentDispositionHeader.match('filename\\*=UTF-8\'\'(.*)')
@@ -2555,7 +2890,7 @@
2555
2890
  * @returns URI to the user image
2556
2891
  */
2557
2892
  UserService.prototype.getUserImageUri = function (userId) {
2558
- return this.backend.getServiceBase() + "/organization/image/" + userId + "?usedefault=false";
2893
+ return this.backend.getServiceBase() + "/organization/image/" + userId + "?usedefault=true";
2559
2894
  };
2560
2895
  /**
2561
2896
  * Removes a favorite item
@@ -2627,6 +2962,17 @@
2627
2962
  }
2628
2963
  return { type: 'valid', amount: null };
2629
2964
  };
2965
+ /**
2966
+ * Changes the users saved inbox filter terms
2967
+ * @param filterTerms The value to set the saved inbox filters list to
2968
+ */
2969
+ UserService.prototype.changeSavedInboxFilters = function (filterTerms) {
2970
+ var _this = this;
2971
+ this.user.userSettings.savedInboxFilter = filterTerms;
2972
+ return this.backend.put('/user/config/web', this.user.userSettings).pipe(operators.map(function () {
2973
+ _this.refreshCurrentUser().subscribe();
2974
+ }));
2975
+ };
2630
2976
  return UserService;
2631
2977
  }());
2632
2978
  UserService.decorators = [
@@ -2873,509 +3219,200 @@
2873
3219
  var _this = this;
2874
3220
  return this.backend
2875
3221
  .del("/prepare/" + preparedItemId)
2876
- .pipe(operators.tap(function () { return _this.getPreparedItems$(); }));
2877
- };
2878
- /**
2879
- * Fetches a list of object types allowed to be placed directly below root.
2880
- *
2881
- * @returns Observable<ObjectType[]> A list of supported object types
2882
- */
2883
- PrepareService.prototype.getPrepareRootTypes = function () {
2884
- return this.backend
2885
- .getViaTempCache('/prepare/types')
2886
- .pipe(operators.map(function (res) { return res.types.map(function (type) { return new ObjectType(type); }); }));
2887
- };
2888
- /**
2889
- * Fetches a list of allowed child object types for a selected parent.
2890
- *
2891
- * @param parentId The id of the parent dms object (context folder)
2892
- * @param withContentOnly If set to true only child types, that support content are returned.
2893
- * @returns Observable<IPrepareChildTypes> A list of supported object types
2894
- */
2895
- PrepareService.prototype.getPrepareChildTypes = function (parentId, withContentOnly) {
2896
- var params = parentId ? { parentId: parentId, withcontent: withContentOnly } : { withcontent: withContentOnly };
2897
- var uri = Utils.buildUri('/prepare/types', params);
2898
- return this.backend
2899
- .getViaTempCache(uri)
2900
- .pipe(operators.map(function (res) { return ({ parent: res.parent, types: res.types.map(function (type) { return new ObjectType(type); }) }); }));
2901
- };
2902
- /**
2903
- * fetch the preview uri for a prepared item
2904
- *
2905
- * @param id The id of the prepared item
2906
- * @param index When a prepared item contains more than one contents, the index specifies which content
2907
- * @param rendition Target rendition (PDF)
2908
- * to retrieve the preview uri for
2909
- * @returns string Preview uri
2910
- */
2911
- PrepareService.prototype.getPreviewUri = function (id, index, rendition) {
2912
- return Utils.buildUri(this.backend.getServiceBase() + "/prepare/" + id + "/content", { rendition: rendition, index: index });
2913
- };
2914
- /**
2915
- * Updates the prepared items target object type.
2916
- *
2917
- * @param objectType The target object types name
2918
- * @param preparedItemId The id of the prepared item to set the type for
2919
- * @returns Observable<PreparedItem> The updated prepared item
2920
- */
2921
- PrepareService.prototype.updateChildType = function (objectType, preparedItemId) {
2922
- return this.backend
2923
- .put("/prepare/" + preparedItemId + "/" + objectType + "?form=true&contentmeta=true")
2924
- .pipe(operators.map(function (res) { return new PreparedItem(res); }));
2925
- };
2926
- /**
2927
- * Add a template to a prepared item.
2928
- *
2929
- * @param preparedItemId The id of the prepared item to add the template to
2930
- * @param templateId The id of the template to be added
2931
- * @returns Observable<PreparedItem> The updated prepared item
2932
- */
2933
- PrepareService.prototype.addTemplate = function (preparedItemId, templateId) {
2934
- return this.backend
2935
- .put("/prepare/" + preparedItemId + "/template?templateid=" + templateId)
2936
- .pipe(operators.map(function (res) { return new PreparedItem(res); }));
2937
- };
2938
- /**
2939
- * Fetches a list of available templates for a given object type.
2940
- *
2941
- * @param Observable<PreparedItemTemplate[]> objectTypeName
2942
- */
2943
- PrepareService.prototype.getTemplates = function (objectTypeName) {
2944
- return this.backend
2945
- .getJson('/template/list?type=' + objectTypeName)
2946
- .pipe(operators.map(function (res) { return res; }));
2947
- };
2948
- /**
2949
- * Returns url of a template preview
2950
- *
2951
- * @param id Template ID
2952
- * @param rendition Target rendition (PDF)
2953
- * @returns string The template preview url.
2954
- */
2955
- PrepareService.prototype.getTemplatePreviewUri = function (id, rendition) {
2956
- return Utils.buildUri(this.backend.getServiceBase() + "/template/" + id + "/content", { rendition: rendition });
2957
- };
2958
- /**
2959
- * Commit a prepared item. This will create an actual dms object.
2960
- * Updates the prepared creation object target type
2961
- *
2962
- * @param preparedItemId ID of the prepared item
2963
- * @param preparedItemType Name of the prepared items target object type
2964
- * @param preparedItemData Object holding data of the prepared item
2965
- * @returns The id of the created dms object
2966
- */
2967
- PrepareService.prototype.commitPreparedItem = function (preparedItemId, preparedItemType, preparedItemData) {
2968
- var _this = this;
2969
- return this.backend
2970
- .put("/prepare/" + preparedItemId + "/" + preparedItemType)
2971
- .pipe(operators.mergeMap(function () { return _this.backend.post("/prepare/commit/" + preparedItemId, preparedItemData); }), operators.tap(function () { return _this.getPreparedItems$(); }), operators.map(function (res) { return res.id; }));
2972
- };
2973
- /**
2974
- * Upload Content
2975
- *
2976
- * @param string preparedItemId
2977
- * @param File file
2978
- * @returns Observable<any>
2979
- */
2980
- PrepareService.prototype.uploadContent = function (preparedItemId, file) {
2981
- var uri = this.backend.getServiceBase() + "/prepare/" + preparedItemId + "/content.json?form=true&contentmeta=true";
2982
- return this.uploadService
2983
- .upload(uri, [file])
2984
- .pipe(
2985
- // tap(() => this.getPreparedItems$())
2986
- );
2987
- };
2988
- /**
2989
- * Uploads files to an upload target.
2990
- *
2991
- * @param uploadTarget The upload target to upload files to
2992
- * @param uploadFiles Files to be uploaded
2993
- * @param useBatchUpload Flag indicating whether or not to use batch processing on the backend side
2994
- * @returns Observable<any>
2995
- */
2996
- PrepareService.prototype.uploadToTarget = function (uploadTarget, uploadFiles, useBatchUpload) {
2997
- var _this = this;
2998
- var files = uploadFiles.map(function (f) { return f._file; });
2999
- return this.uploadService
3000
- .upload(this.getUploadTarget(uploadTarget, useBatchUpload), files)
3001
- .pipe(operators.tap(function () { return _this.getPreparedItems$(); }));
3002
- };
3003
- /**
3004
- * Get the uri to post files to based on the upload target.
3005
- *
3006
- * @param uploadTarget The target to upload files to
3007
- * @param useBatchUpload Flag indicating whether or not to upload all files in a single post
3008
- * @returns string the uri
3009
- */
3010
- PrepareService.prototype.getUploadTarget = function (uploadTarget, useBatchUpload) {
3011
- var uri;
3012
- if (uploadTarget.type === UploadTarget.ROOT) {
3013
- /**
3014
- * upload to general filing location
3015
- *
3016
- * @type string
3017
- */
3018
- uri = this.backend.getServiceBase() + this.createPreparedItemPostUrl({
3019
- parentId: null,
3020
- createMany: !useBatchUpload
3021
- });
3022
- }
3023
- else if (uploadTarget.type === UploadTarget.OBJECT) {
3024
- /**
3025
- * upload to dms object, means adding or replacing content file
3026
- */
3027
- var referenceObject = uploadTarget.referenceObject;
3028
- uri = this.backend.getServiceBase() + "/dms/" + referenceObject.id + "/contents?type=" + referenceObject.type.name;
3029
- }
3030
- else if (uploadTarget.type === UploadTarget.CONTEXT || uploadTarget.type === UploadTarget.CONTEXT_TREE) {
3031
- /**
3032
- * upload to context folder, means adding a new dms object to a specific
3033
- * context folder ...
3034
- * ... if we got a subFolder (node from the context tree) set up we'll add that too
3035
- *
3036
- * @type string
3037
- */
3038
- uri = this.backend.getServiceBase() + this.createPreparedItemPostUrl({
3039
- parentId: uploadTarget.referenceObject.id,
3040
- createMany: !useBatchUpload,
3041
- childType: uploadTarget.subFolder && uploadTarget.subFolder.data.type ? uploadTarget.subFolder.data.type : null
3042
- });
3043
- }
3044
- return uri;
3222
+ .pipe(operators.tap(function () { return _this.getPreparedItems$(); }));
3045
3223
  };
3046
3224
  /**
3047
- * Deletes a prepared creation object content element by index or the complete content.
3048
- * If you provide an index the content consists only of one element,
3049
- * the content is completely removed from the prepared creation object.
3225
+ * Fetches a list of object types allowed to be placed directly below root.
3050
3226
  *
3051
- * @param preparedItemId ID of the item with the content to be removed
3052
- * @param index Parameter that determines which content element should be deleted.
3053
- * @returns Observable<PreparedItem> The updated prepared item
3227
+ * @returns Observable<ObjectType[]> A list of supported object types
3054
3228
  */
3055
- PrepareService.prototype.deletePreparedItemContent = function (preparedItemId, index) {
3056
- var url = "/prepare/" + preparedItemId + "/content" + (index !== undefined ? "?index=" + index : '');
3229
+ PrepareService.prototype.getPrepareRootTypes = function () {
3057
3230
  return this.backend
3058
- .del(url)
3059
- .pipe(operators.map(function (res) { return new PreparedItem(res); }));
3231
+ .getViaTempCache('/prepare/types')
3232
+ .pipe(operators.map(function (res) { return res.types.map(function (type) { return new ObjectType(type); }); }));
3060
3233
  };
3061
- return PrepareService;
3062
- }());
3063
- PrepareService.decorators = [
3064
- { type: i0.Injectable }
3065
- ];
3066
- PrepareService.ctorParameters = function () { return [
3067
- { type: BackendService },
3068
- { type: UploadService }
3069
- ]; };
3070
-
3071
- /*! *****************************************************************************
3072
- Copyright (c) Microsoft Corporation.
3073
-
3074
- Permission to use, copy, modify, and/or distribute this software for any
3075
- purpose with or without fee is hereby granted.
3076
-
3077
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
3078
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
3079
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
3080
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3081
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
3082
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3083
- PERFORMANCE OF THIS SOFTWARE.
3084
- ***************************************************************************** */
3085
- /* global Reflect, Promise */
3086
- var extendStatics = function (d, b) {
3087
- extendStatics = Object.setPrototypeOf ||
3088
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3089
- function (d, b) { for (var p in b)
3090
- if (Object.prototype.hasOwnProperty.call(b, p))
3091
- d[p] = b[p]; };
3092
- return extendStatics(d, b);
3093
- };
3094
- function __extends(d, b) {
3095
- if (typeof b !== "function" && b !== null)
3096
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3097
- extendStatics(d, b);
3098
- function __() { this.constructor = d; }
3099
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3100
- }
3101
- var __assign = function () {
3102
- __assign = Object.assign || function __assign(t) {
3103
- for (var s, i = 1, n = arguments.length; i < n; i++) {
3104
- s = arguments[i];
3105
- for (var p in s)
3106
- if (Object.prototype.hasOwnProperty.call(s, p))
3107
- t[p] = s[p];
3108
- }
3109
- return t;
3234
+ /**
3235
+ * Fetches a list of allowed child object types for a selected parent.
3236
+ *
3237
+ * @param parentId The id of the parent dms object (context folder)
3238
+ * @param withContentOnly If set to true only child types, that support content are returned.
3239
+ * @returns Observable<IPrepareChildTypes> A list of supported object types
3240
+ */
3241
+ PrepareService.prototype.getPrepareChildTypes = function (parentId, withContentOnly) {
3242
+ var params = parentId ? { parentId: parentId, withcontent: withContentOnly } : { withcontent: withContentOnly };
3243
+ var uri = Utils.buildUri('/prepare/types', params);
3244
+ return this.backend
3245
+ .getViaTempCache(uri)
3246
+ .pipe(operators.map(function (res) { return ({ parent: res.parent, types: res.types.map(function (type) { return new ObjectType(type); }) }); }));
3110
3247
  };
3111
- return __assign.apply(this, arguments);
3112
- };
3113
- function __rest(s, e) {
3114
- var t = {};
3115
- for (var p in s)
3116
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
3117
- t[p] = s[p];
3118
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
3119
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
3120
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
3121
- t[p[i]] = s[p[i]];
3122
- }
3123
- return t;
3124
- }
3125
- function __decorate(decorators, target, key, desc) {
3126
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3127
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
3128
- r = Reflect.decorate(decorators, target, key, desc);
3129
- else
3130
- for (var i = decorators.length - 1; i >= 0; i--)
3131
- if (d = decorators[i])
3132
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3133
- return c > 3 && r && Object.defineProperty(target, key, r), r;
3134
- }
3135
- function __param(paramIndex, decorator) {
3136
- return function (target, key) { decorator(target, key, paramIndex); };
3137
- }
3138
- function __metadata(metadataKey, metadataValue) {
3139
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
3140
- return Reflect.metadata(metadataKey, metadataValue);
3141
- }
3142
- function __awaiter(thisArg, _arguments, P, generator) {
3143
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3144
- return new (P || (P = Promise))(function (resolve, reject) {
3145
- function fulfilled(value) { try {
3146
- step(generator.next(value));
3147
- }
3148
- catch (e) {
3149
- reject(e);
3150
- } }
3151
- function rejected(value) { try {
3152
- step(generator["throw"](value));
3153
- }
3154
- catch (e) {
3155
- reject(e);
3156
- } }
3157
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
3158
- step((generator = generator.apply(thisArg, _arguments || [])).next());
3159
- });
3160
- }
3161
- function __generator(thisArg, body) {
3162
- var _ = { label: 0, sent: function () { if (t[0] & 1)
3163
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
3164
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
3165
- function verb(n) { return function (v) { return step([n, v]); }; }
3166
- function step(op) {
3167
- if (f)
3168
- throw new TypeError("Generator is already executing.");
3169
- while (_)
3170
- try {
3171
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
3172
- return t;
3173
- if (y = 0, t)
3174
- op = [op[0] & 2, t.value];
3175
- switch (op[0]) {
3176
- case 0:
3177
- case 1:
3178
- t = op;
3179
- break;
3180
- case 4:
3181
- _.label++;
3182
- return { value: op[1], done: false };
3183
- case 5:
3184
- _.label++;
3185
- y = op[1];
3186
- op = [0];
3187
- continue;
3188
- case 7:
3189
- op = _.ops.pop();
3190
- _.trys.pop();
3191
- continue;
3192
- default:
3193
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
3194
- _ = 0;
3195
- continue;
3196
- }
3197
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
3198
- _.label = op[1];
3199
- break;
3200
- }
3201
- if (op[0] === 6 && _.label < t[1]) {
3202
- _.label = t[1];
3203
- t = op;
3204
- break;
3205
- }
3206
- if (t && _.label < t[2]) {
3207
- _.label = t[2];
3208
- _.ops.push(op);
3209
- break;
3210
- }
3211
- if (t[2])
3212
- _.ops.pop();
3213
- _.trys.pop();
3214
- continue;
3215
- }
3216
- op = body.call(thisArg, _);
3217
- }
3218
- catch (e) {
3219
- op = [6, e];
3220
- y = 0;
3221
- }
3222
- finally {
3223
- f = t = 0;
3224
- }
3225
- if (op[0] & 5)
3226
- throw op[1];
3227
- return { value: op[0] ? op[1] : void 0, done: true };
3228
- }
3229
- }
3230
- var __createBinding = Object.create ? (function (o, m, k, k2) {
3231
- if (k2 === undefined)
3232
- k2 = k;
3233
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
3234
- }) : (function (o, m, k, k2) {
3235
- if (k2 === undefined)
3236
- k2 = k;
3237
- o[k2] = m[k];
3238
- });
3239
- function __exportStar(m, o) {
3240
- for (var p in m)
3241
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
3242
- __createBinding(o, m, p);
3243
- }
3244
- function __values(o) {
3245
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3246
- if (m)
3247
- return m.call(o);
3248
- if (o && typeof o.length === "number")
3249
- return {
3250
- next: function () {
3251
- if (o && i >= o.length)
3252
- o = void 0;
3253
- return { value: o && o[i++], done: !o };
3254
- }
3255
- };
3256
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
3257
- }
3258
- function __read(o, n) {
3259
- var m = typeof Symbol === "function" && o[Symbol.iterator];
3260
- if (!m)
3261
- return o;
3262
- var i = m.call(o), r, ar = [], e;
3263
- try {
3264
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
3265
- ar.push(r.value);
3266
- }
3267
- catch (error) {
3268
- e = { error: error };
3269
- }
3270
- finally {
3271
- try {
3272
- if (r && !r.done && (m = i["return"]))
3273
- m.call(i);
3248
+ /**
3249
+ * fetch the preview uri for a prepared item
3250
+ *
3251
+ * @param id The id of the prepared item
3252
+ * @param index When a prepared item contains more than one contents, the index specifies which content
3253
+ * @param rendition Target rendition (PDF)
3254
+ * to retrieve the preview uri for
3255
+ * @returns string Preview uri
3256
+ */
3257
+ PrepareService.prototype.getPreviewUri = function (id, index, rendition) {
3258
+ return Utils.buildUri(this.backend.getServiceBase() + "/prepare/" + id + "/content", { rendition: rendition, index: index });
3259
+ };
3260
+ /**
3261
+ * Updates the prepared items target object type.
3262
+ *
3263
+ * @param objectType The target object types name
3264
+ * @param preparedItemId The id of the prepared item to set the type for
3265
+ * @returns Observable<PreparedItem> The updated prepared item
3266
+ */
3267
+ PrepareService.prototype.updateChildType = function (objectType, preparedItemId) {
3268
+ return this.backend
3269
+ .put("/prepare/" + preparedItemId + "/" + objectType + "?form=true&contentmeta=true")
3270
+ .pipe(operators.map(function (res) { return new PreparedItem(res); }));
3271
+ };
3272
+ /**
3273
+ * Add a template to a prepared item.
3274
+ *
3275
+ * @param preparedItemId The id of the prepared item to add the template to
3276
+ * @param templateId The id of the template to be added
3277
+ * @returns Observable<PreparedItem> The updated prepared item
3278
+ */
3279
+ PrepareService.prototype.addTemplate = function (preparedItemId, templateId) {
3280
+ return this.backend
3281
+ .put("/prepare/" + preparedItemId + "/template?templateid=" + templateId)
3282
+ .pipe(operators.map(function (res) { return new PreparedItem(res); }));
3283
+ };
3284
+ /**
3285
+ * Fetches a list of available templates for a given object type.
3286
+ *
3287
+ * @param Observable<PreparedItemTemplate[]> objectTypeName
3288
+ */
3289
+ PrepareService.prototype.getTemplates = function (objectTypeName) {
3290
+ return this.backend
3291
+ .getJson('/template/list?type=' + objectTypeName)
3292
+ .pipe(operators.map(function (res) { return res; }));
3293
+ };
3294
+ /**
3295
+ * Returns url of a template preview
3296
+ *
3297
+ * @param id Template ID
3298
+ * @param rendition Target rendition (PDF)
3299
+ * @returns string The template preview url.
3300
+ */
3301
+ PrepareService.prototype.getTemplatePreviewUri = function (id, rendition) {
3302
+ return Utils.buildUri(this.backend.getServiceBase() + "/template/" + id + "/content", { rendition: rendition });
3303
+ };
3304
+ /**
3305
+ * Commit a prepared item. This will create an actual dms object.
3306
+ * Updates the prepared creation object target type
3307
+ *
3308
+ * @param preparedItemId ID of the prepared item
3309
+ * @param preparedItemType Name of the prepared items target object type
3310
+ * @param preparedItemData Object holding data of the prepared item
3311
+ * @returns The id of the created dms object
3312
+ */
3313
+ PrepareService.prototype.commitPreparedItem = function (preparedItemId, preparedItemType, preparedItemData) {
3314
+ var _this = this;
3315
+ return this.backend
3316
+ .put("/prepare/" + preparedItemId + "/" + preparedItemType)
3317
+ .pipe(operators.mergeMap(function () { return _this.backend.post("/prepare/commit/" + preparedItemId, preparedItemData); }), operators.tap(function () { return _this.getPreparedItems$(); }), operators.map(function (res) { return res.id; }));
3318
+ };
3319
+ /**
3320
+ * Upload Content
3321
+ *
3322
+ * @param string preparedItemId
3323
+ * @param File file
3324
+ * @returns Observable<any>
3325
+ */
3326
+ PrepareService.prototype.uploadContent = function (preparedItemId, file) {
3327
+ var uri = this.backend.getServiceBase() + "/prepare/" + preparedItemId + "/content.json?form=true&contentmeta=true";
3328
+ return this.uploadService
3329
+ .upload(uri, [file])
3330
+ .pipe(
3331
+ // tap(() => this.getPreparedItems$())
3332
+ );
3333
+ };
3334
+ /**
3335
+ * Uploads files to an upload target.
3336
+ *
3337
+ * @param uploadTarget The upload target to upload files to
3338
+ * @param uploadFiles Files to be uploaded
3339
+ * @param useBatchUpload Flag indicating whether or not to use batch processing on the backend side
3340
+ * @returns Observable<any>
3341
+ */
3342
+ PrepareService.prototype.uploadToTarget = function (uploadTarget, uploadFiles, useBatchUpload) {
3343
+ var _this = this;
3344
+ var files = uploadFiles.map(function (f) { return f._file; });
3345
+ return this.uploadService
3346
+ .upload(this.getUploadTarget(uploadTarget, useBatchUpload), files)
3347
+ .pipe(operators.tap(function () { return _this.getPreparedItems$(); }));
3348
+ };
3349
+ /**
3350
+ * Get the uri to post files to based on the upload target.
3351
+ *
3352
+ * @param uploadTarget The target to upload files to
3353
+ * @param useBatchUpload Flag indicating whether or not to upload all files in a single post
3354
+ * @returns string the uri
3355
+ */
3356
+ PrepareService.prototype.getUploadTarget = function (uploadTarget, useBatchUpload) {
3357
+ var uri;
3358
+ if (uploadTarget.type === UploadTarget.ROOT) {
3359
+ /**
3360
+ * upload to general filing location
3361
+ *
3362
+ * @type string
3363
+ */
3364
+ uri = this.backend.getServiceBase() + this.createPreparedItemPostUrl({
3365
+ parentId: null,
3366
+ createMany: !useBatchUpload
3367
+ });
3274
3368
  }
3275
- finally {
3276
- if (e)
3277
- throw e.error;
3369
+ else if (uploadTarget.type === UploadTarget.OBJECT) {
3370
+ /**
3371
+ * upload to dms object, means adding or replacing content file
3372
+ */
3373
+ var referenceObject = uploadTarget.referenceObject;
3374
+ uri = this.backend.getServiceBase() + "/dms/" + referenceObject.id + "/contents?type=" + referenceObject.type.name;
3278
3375
  }
3279
- }
3280
- return ar;
3281
- }
3282
- /** @deprecated */
3283
- function __spread() {
3284
- for (var ar = [], i = 0; i < arguments.length; i++)
3285
- ar = ar.concat(__read(arguments[i]));
3286
- return ar;
3287
- }
3288
- /** @deprecated */
3289
- function __spreadArrays() {
3290
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
3291
- s += arguments[i].length;
3292
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
3293
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
3294
- r[k] = a[j];
3295
- return r;
3296
- }
3297
- function __spreadArray(to, from) {
3298
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3299
- to[j] = from[i];
3300
- return to;
3301
- }
3302
- function __await(v) {
3303
- return this instanceof __await ? (this.v = v, this) : new __await(v);
3304
- }
3305
- function __asyncGenerator(thisArg, _arguments, generator) {
3306
- if (!Symbol.asyncIterator)
3307
- throw new TypeError("Symbol.asyncIterator is not defined.");
3308
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
3309
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
3310
- function verb(n) { if (g[n])
3311
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
3312
- function resume(n, v) { try {
3313
- step(g[n](v));
3314
- }
3315
- catch (e) {
3316
- settle(q[0][3], e);
3317
- } }
3318
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
3319
- function fulfill(value) { resume("next", value); }
3320
- function reject(value) { resume("throw", value); }
3321
- function settle(f, v) { if (f(v), q.shift(), q.length)
3322
- resume(q[0][0], q[0][1]); }
3323
- }
3324
- function __asyncDelegator(o) {
3325
- var i, p;
3326
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
3327
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
3328
- }
3329
- function __asyncValues(o) {
3330
- if (!Symbol.asyncIterator)
3331
- throw new TypeError("Symbol.asyncIterator is not defined.");
3332
- var m = o[Symbol.asyncIterator], i;
3333
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
3334
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
3335
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
3336
- }
3337
- function __makeTemplateObject(cooked, raw) {
3338
- if (Object.defineProperty) {
3339
- Object.defineProperty(cooked, "raw", { value: raw });
3340
- }
3341
- else {
3342
- cooked.raw = raw;
3343
- }
3344
- return cooked;
3345
- }
3346
- ;
3347
- var __setModuleDefault = Object.create ? (function (o, v) {
3348
- Object.defineProperty(o, "default", { enumerable: true, value: v });
3349
- }) : function (o, v) {
3350
- o["default"] = v;
3351
- };
3352
- function __importStar(mod) {
3353
- if (mod && mod.__esModule)
3354
- return mod;
3355
- var result = {};
3356
- if (mod != null)
3357
- for (var k in mod)
3358
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
3359
- __createBinding(result, mod, k);
3360
- __setModuleDefault(result, mod);
3361
- return result;
3362
- }
3363
- function __importDefault(mod) {
3364
- return (mod && mod.__esModule) ? mod : { default: mod };
3365
- }
3366
- function __classPrivateFieldGet(receiver, privateMap) {
3367
- if (!privateMap.has(receiver)) {
3368
- throw new TypeError("attempted to get private field on non-instance");
3369
- }
3370
- return privateMap.get(receiver);
3371
- }
3372
- function __classPrivateFieldSet(receiver, privateMap, value) {
3373
- if (!privateMap.has(receiver)) {
3374
- throw new TypeError("attempted to set private field on non-instance");
3375
- }
3376
- privateMap.set(receiver, value);
3377
- return value;
3378
- }
3376
+ else if (uploadTarget.type === UploadTarget.CONTEXT || uploadTarget.type === UploadTarget.CONTEXT_TREE) {
3377
+ /**
3378
+ * upload to context folder, means adding a new dms object to a specific
3379
+ * context folder ...
3380
+ * ... if we got a subFolder (node from the context tree) set up we'll add that too
3381
+ *
3382
+ * @type string
3383
+ */
3384
+ uri = this.backend.getServiceBase() + this.createPreparedItemPostUrl({
3385
+ parentId: uploadTarget.referenceObject.id,
3386
+ createMany: !useBatchUpload,
3387
+ childType: uploadTarget.subFolder && uploadTarget.subFolder.data.type ? uploadTarget.subFolder.data.type : null
3388
+ });
3389
+ }
3390
+ return uri;
3391
+ };
3392
+ /**
3393
+ * Deletes a prepared creation object content element by index or the complete content.
3394
+ * If you provide an index the content consists only of one element,
3395
+ * the content is completely removed from the prepared creation object.
3396
+ *
3397
+ * @param preparedItemId ID of the item with the content to be removed
3398
+ * @param index Parameter that determines which content element should be deleted.
3399
+ * @returns Observable<PreparedItem> The updated prepared item
3400
+ */
3401
+ PrepareService.prototype.deletePreparedItemContent = function (preparedItemId, index) {
3402
+ var url = "/prepare/" + preparedItemId + "/content" + (index !== undefined ? "?index=" + index : '');
3403
+ return this.backend
3404
+ .del(url)
3405
+ .pipe(operators.map(function (res) { return new PreparedItem(res); }));
3406
+ };
3407
+ return PrepareService;
3408
+ }());
3409
+ PrepareService.decorators = [
3410
+ { type: i0.Injectable }
3411
+ ];
3412
+ PrepareService.ctorParameters = function () { return [
3413
+ { type: BackendService },
3414
+ { type: UploadService }
3415
+ ]; };
3379
3416
 
3380
3417
  /**
3381
3418
  * @ignore
@@ -3398,7 +3435,7 @@
3398
3435
  this.type = json.type;
3399
3436
  this.sourceId = json.source ? json.source.id : null;
3400
3437
  this.iconId = json.target && json.target.icon ? json.target.icon.id : null;
3401
- this.read = json.read;
3438
+ this.accepted = json.accepted;
3402
3439
  this.isdeputy = json.isdeputy;
3403
3440
  this.duetime = json.duetime;
3404
3441
  this.received = json.receivetime;
@@ -5201,19 +5238,14 @@
5201
5238
  *
5202
5239
  * @param DmsObject[] dmsObjects
5203
5240
  * @param string[] orgaNames
5204
- * @param boolean shareChildren
5241
+ * @param string[] orgaNameWithChildren
5242
+ * @param id
5205
5243
  * @returns Observable<any>
5206
5244
  */
5207
- DmsService.prototype.setOrganizationObjectsWithReadRights = function (dmsObjects, orgaNames, shareChildren) {
5208
- if (shareChildren === void 0) { shareChildren = true; }
5209
- var url = "/dms/batch/putadditionalvisibility?sharechildren=" + shareChildren;
5210
- var data = {
5211
- organizationobjects: orgaNames,
5212
- objects: dmsObjects.map(function (o) { return ({
5213
- itemid: o.id,
5214
- type: o.type.name
5215
- }); })
5216
- };
5245
+ DmsService.prototype.setOrganizationObjectsWithReadRights = function (dmsObjects, id, orgaNames, orgaNameWithChildren) {
5246
+ var url = "/dms/" + id + "/share";
5247
+ var shares = __spread(orgaNameWithChildren.map(function (field) { return ({ organizationobject: field, sharechildren: true }); }), orgaNames.map(function (name) { return ({ organizationobject: name, sharechildren: false }); }));
5248
+ var data = { shares: shares };
5217
5249
  return this.triggerUpdate(dmsObjects[0], this.backend.put(url, data));
5218
5250
  };
5219
5251
  /**