contentoh-components-library 21.4.19 → 21.4.21
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.
|
@@ -1677,7 +1677,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1677
1677
|
var _ref16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(result) {
|
|
1678
1678
|
var _productTemp$id_order2;
|
|
1679
1679
|
|
|
1680
|
-
var concept, productTemp, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId, res, newStatuses, orderStatus, serviceStatus, newProductEdit, showSurveyByProvider, showSurveyByRetailer, _JSON$
|
|
1680
|
+
var concept, productTemp, articleId, orderId, sectionStatusKey, evalStatus, data, retailerId, res, body, _JSON$parse, response, newStatuses, statusObject, orderStatus, serviceStatus, newProductEdit, showSurveyByProvider, showSurveyByRetailer, _JSON$parse2, _response, _statusObject, retailerStatusCopy, status;
|
|
1681
1681
|
|
|
1682
1682
|
return _regenerator.default.wrap(function _callee18$(_context18) {
|
|
1683
1683
|
while (1) {
|
|
@@ -1698,16 +1698,24 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1698
1698
|
};
|
|
1699
1699
|
retailerId = activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id;
|
|
1700
1700
|
_context18.prev = 9;
|
|
1701
|
+
body = {
|
|
1702
|
+
orderArticleRetailers: [{
|
|
1703
|
+
orderId: orderId,
|
|
1704
|
+
articleId: articleId,
|
|
1705
|
+
retailersIds: [activeRetailer.id]
|
|
1706
|
+
}],
|
|
1707
|
+
isAproved: false,
|
|
1708
|
+
service: concept
|
|
1709
|
+
};
|
|
1701
1710
|
|
|
1702
1711
|
if (!result) {
|
|
1703
|
-
_context18.next =
|
|
1712
|
+
_context18.next = 29;
|
|
1704
1713
|
break;
|
|
1705
1714
|
}
|
|
1706
1715
|
|
|
1707
|
-
|
|
1708
|
-
data.retailerId = retailerId;
|
|
1716
|
+
body.isAproved = result === "A";
|
|
1709
1717
|
_context18.next = 15;
|
|
1710
|
-
return _axios.default.
|
|
1718
|
+
return _axios.default.post("".concat(process.env.REACT_APP_EVALUATION_REFACTOR), body, {
|
|
1711
1719
|
headers: {
|
|
1712
1720
|
Authorization: token
|
|
1713
1721
|
}
|
|
@@ -1715,91 +1723,66 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1715
1723
|
|
|
1716
1724
|
case 15:
|
|
1717
1725
|
res = _context18.sent;
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1726
|
+
response = (_JSON$parse = JSON.parse(res.data.body)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.successfulData;
|
|
1727
|
+
newStatuses = response;
|
|
1728
|
+
statusObject = response["".concat(orderId, "-").concat(articleId, "-").concat(activeRetailer.id)];
|
|
1729
|
+
orderStatus = statusObject["generalStatus"];
|
|
1730
|
+
serviceStatus = newStatuses["".concat(getConcept(activeTab), "Status")];
|
|
1721
1731
|
newProductEdit = productEdit;
|
|
1722
1732
|
newProductEdit.product[sectionStatusKey] = serviceStatus;
|
|
1723
1733
|
setProductEdit(newProductEdit);
|
|
1724
|
-
showSurveyByProvider = !user.is_retailer && orderStatus
|
|
1725
|
-
showSurveyByRetailer = user.is_retailer && orderStatus
|
|
1734
|
+
showSurveyByProvider = !user.is_retailer && orderStatus === "AP";
|
|
1735
|
+
showSurveyByRetailer = user.is_retailer && orderStatus === "ACA";
|
|
1726
1736
|
showSurvey && showSurvey(showSurveyByProvider || showSurveyByRetailer);
|
|
1727
|
-
_context18.next =
|
|
1737
|
+
_context18.next = 32;
|
|
1728
1738
|
break;
|
|
1729
1739
|
|
|
1730
|
-
case
|
|
1731
|
-
_context18.next =
|
|
1732
|
-
return _axios.default.
|
|
1740
|
+
case 29:
|
|
1741
|
+
_context18.next = 31;
|
|
1742
|
+
return _axios.default.post("".concat(process.env.REACT_APP_EVALUATION_REFACTOR), body, {
|
|
1733
1743
|
headers: {
|
|
1734
1744
|
Authorization: token
|
|
1735
1745
|
}
|
|
1736
1746
|
});
|
|
1737
1747
|
|
|
1738
|
-
case
|
|
1748
|
+
case 31:
|
|
1739
1749
|
res = _context18.sent;
|
|
1740
1750
|
|
|
1741
|
-
case
|
|
1742
|
-
if (
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
id: product.article.id_article || productEdit.ArticleId,
|
|
1752
|
-
version: version,
|
|
1753
|
-
items: [{
|
|
1754
|
-
type: "status",
|
|
1755
|
-
value: _message
|
|
1756
|
-
}],
|
|
1757
|
-
retailerId: activeRetailer.id,
|
|
1758
|
-
status: product.status || productEdit.product.status
|
|
1759
|
-
},
|
|
1760
|
-
paramsHeader: {
|
|
1761
|
-
Authorization: token
|
|
1762
|
-
}
|
|
1763
|
-
};
|
|
1764
|
-
_context18.next = 36;
|
|
1765
|
-
return (0, _utils.sendMessage)(messageData);
|
|
1766
|
-
|
|
1767
|
-
case 36:
|
|
1768
|
-
if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
|
|
1769
|
-
retailerStatusCopy = (0, _objectSpread3.default)({}, retailerStatus);
|
|
1770
|
-
retailerStatusCopy[activeRetailer.id][concept] = newStatus;
|
|
1771
|
-
setRetailerStatus(retailerStatusCopy);
|
|
1772
|
-
productTemp.statusByRetailer = retailerStatusCopy;
|
|
1773
|
-
|
|
1774
|
-
if (newServiceStatus) {
|
|
1775
|
-
status = newServiceStatus[articleId]["".concat(concept, "Status")];
|
|
1751
|
+
case 32:
|
|
1752
|
+
if (res.data.statusCode === 200) {
|
|
1753
|
+
_response = (_JSON$parse2 = JSON.parse(res.data.body)) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2.successfulData;
|
|
1754
|
+
_statusObject = _response["".concat(orderId, "-").concat(articleId, "-").concat(activeRetailer.id)];
|
|
1755
|
+
productTemp.status = _statusObject["generalStatus"];
|
|
1756
|
+
retailerStatusCopy = (0, _objectSpread3.default)({}, retailerStatus);
|
|
1757
|
+
retailerStatusCopy[activeRetailer.id][concept] = _statusObject["".concat(concept, "Status")];
|
|
1758
|
+
setRetailerStatus(retailerStatusCopy);
|
|
1759
|
+
productTemp.statusByRetailer = retailerStatusCopy;
|
|
1760
|
+
status = _statusObject["".concat(concept, "Status")];
|
|
1776
1761
|
productTemp["".concat(concept, "_status")] = status;
|
|
1762
|
+
setProduct(productTemp);
|
|
1763
|
+
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1764
|
+
setOrigin(function (prev) {
|
|
1765
|
+
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, (0, _defineProperty2.default)({}, concept, status));
|
|
1766
|
+
});
|
|
1777
1767
|
}
|
|
1778
1768
|
|
|
1779
|
-
|
|
1780
|
-
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1781
|
-
setOrigin(function (prev) {
|
|
1782
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, (0, _defineProperty2.default)({}, concept, status));
|
|
1783
|
-
});
|
|
1784
|
-
|
|
1785
|
-
case 45:
|
|
1786
|
-
_context18.next = 50;
|
|
1769
|
+
_context18.next = 38;
|
|
1787
1770
|
break;
|
|
1788
1771
|
|
|
1789
|
-
case
|
|
1790
|
-
_context18.prev =
|
|
1772
|
+
case 35:
|
|
1773
|
+
_context18.prev = 35;
|
|
1791
1774
|
_context18.t0 = _context18["catch"](9);
|
|
1792
1775
|
console.log(_context18.t0);
|
|
1793
1776
|
|
|
1794
|
-
case
|
|
1777
|
+
case 38:
|
|
1795
1778
|
loadData();
|
|
1796
1779
|
|
|
1797
|
-
case
|
|
1780
|
+
case 39:
|
|
1798
1781
|
case "end":
|
|
1799
1782
|
return _context18.stop();
|
|
1800
1783
|
}
|
|
1801
1784
|
}
|
|
1802
|
-
}, _callee18, null, [[9,
|
|
1785
|
+
}, _callee18, null, [[9, 35]]);
|
|
1803
1786
|
}));
|
|
1804
1787
|
|
|
1805
1788
|
return function sendEvaluation(_x6) {
|
|
@@ -1809,7 +1792,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1809
1792
|
|
|
1810
1793
|
var validateAll = /*#__PURE__*/function () {
|
|
1811
1794
|
var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(result) {
|
|
1812
|
-
var _product$id_order2, evaluationArray, conceptArray,
|
|
1795
|
+
var _product$id_order2, evaluationArray, conceptArray, isAproved, retailersIds, body, userType, productTemp, status, retailerStatusCopy;
|
|
1813
1796
|
|
|
1814
1797
|
return _regenerator.default.wrap(function _callee19$(_context19) {
|
|
1815
1798
|
while (1) {
|
|
@@ -1819,45 +1802,35 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1819
1802
|
setLoading(true);
|
|
1820
1803
|
evaluationArray = [];
|
|
1821
1804
|
conceptArray = ["description", "datasheet", "images"];
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
orderId: (_product$id_order2 = product.id_order) !== null && _product$id_order2 !== void 0 ? _product$id_order2 : product.orderId,
|
|
1825
|
-
result: result,
|
|
1826
|
-
isAproved: result === "A"
|
|
1827
|
-
};
|
|
1828
|
-
messages = [];
|
|
1805
|
+
isAproved = result === "A";
|
|
1806
|
+
retailersIds = [];
|
|
1829
1807
|
servicesData === null || servicesData === void 0 ? void 0 : servicesData.forEach(function (ret) {
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1808
|
+
if (!retailersIds.includes(ret.id_retailer)) retailersIds.push(ret.id_retailer);
|
|
1809
|
+
});
|
|
1810
|
+
body = {
|
|
1811
|
+
orderArticleRetailers: [{
|
|
1812
|
+
orderId: (_product$id_order2 = product.id_order) !== null && _product$id_order2 !== void 0 ? _product$id_order2 : product.orderId,
|
|
1813
|
+
articleId: product.article.id_article,
|
|
1814
|
+
retailersIds: retailersIds
|
|
1815
|
+
}],
|
|
1816
|
+
isAproved: isAproved
|
|
1817
|
+
};
|
|
1818
|
+
conceptArray.forEach(function (concept) {
|
|
1819
|
+
body.service = concept;
|
|
1820
|
+
evaluationArray.push(_axios.default.post("".concat(process.env.REACT_APP_EVALUATION_REFACTOR), body, {
|
|
1839
1821
|
headers: {
|
|
1840
1822
|
Authorization: token
|
|
1841
1823
|
}
|
|
1842
1824
|
}));
|
|
1843
|
-
|
|
1844
|
-
if (product["".concat(ret.service, "_status")] !== "NS") {
|
|
1845
|
-
var _message2 = (0, _utils.createMessage)(product.retailers, ret.id_retailer, product["".concat(ret.service, "_status")], "".concat(result, "A"), ret.service);
|
|
1846
|
-
|
|
1847
|
-
messages.push(createComment([{
|
|
1848
|
-
type: "status",
|
|
1849
|
-
value: _message2
|
|
1850
|
-
}], ret.id_retailer));
|
|
1851
|
-
}
|
|
1852
1825
|
});
|
|
1853
|
-
_context19.next =
|
|
1826
|
+
_context19.next = 11;
|
|
1854
1827
|
return Promise.all(evaluationArray);
|
|
1855
1828
|
|
|
1856
|
-
case
|
|
1829
|
+
case 11:
|
|
1857
1830
|
userType = user.is_retailer === 1 ? "CA" : "P";
|
|
1858
1831
|
productTemp = product;
|
|
1859
1832
|
status = "".concat(result).concat(userType);
|
|
1860
|
-
productTemp.
|
|
1833
|
+
productTemp.status = status;
|
|
1861
1834
|
productTemp.datasheet_status = productTemp.datasheet_status === "NA" ? "NA" : status;
|
|
1862
1835
|
productTemp.description_status = productTemp.description_status === "NA" ? "NA" : status;
|
|
1863
1836
|
productTemp.images_status = productTemp.images_status === "NA" ? "NA" : status;
|
|
@@ -1883,10 +1856,6 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
|
|
|
1883
1856
|
idCategory: productTemp.article.id_category,
|
|
1884
1857
|
product: productTemp
|
|
1885
1858
|
}));
|
|
1886
|
-
_context19.next = 26;
|
|
1887
|
-
return Promise.all(messages);
|
|
1888
|
-
|
|
1889
|
-
case 26:
|
|
1890
1859
|
_context19.next = 28;
|
|
1891
1860
|
return loadData();
|
|
1892
1861
|
|
package/package.json
CHANGED
|
@@ -1002,75 +1002,62 @@ export const ProviderProductEdition = ({
|
|
|
1002
1002
|
const retailerId = activeRetailer?.id;
|
|
1003
1003
|
let res;
|
|
1004
1004
|
try {
|
|
1005
|
+
const body = {
|
|
1006
|
+
orderArticleRetailers: [
|
|
1007
|
+
{ orderId, articleId, retailersIds: [activeRetailer.id] },
|
|
1008
|
+
],
|
|
1009
|
+
isAproved: false,
|
|
1010
|
+
service: concept,
|
|
1011
|
+
};
|
|
1005
1012
|
if (result) {
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
data,
|
|
1013
|
+
body.isAproved = result === "A";
|
|
1014
|
+
res = await axios.post(
|
|
1015
|
+
`${process.env.REACT_APP_EVALUATION_REFACTOR}`,
|
|
1016
|
+
body,
|
|
1011
1017
|
{
|
|
1012
1018
|
headers: {
|
|
1013
1019
|
Authorization: token,
|
|
1014
1020
|
},
|
|
1015
1021
|
}
|
|
1016
1022
|
);
|
|
1017
|
-
|
|
1018
|
-
const
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
+
|
|
1024
|
+
const response = JSON.parse(res.data.body)?.successfulData;
|
|
1025
|
+
const newStatuses = response;
|
|
1026
|
+
const statusObject =
|
|
1027
|
+
response[`${orderId}-${articleId}-${activeRetailer.id}`];
|
|
1028
|
+
const orderStatus = statusObject["generalStatus"];
|
|
1029
|
+
const serviceStatus = newStatuses[`${getConcept(activeTab)}Status`];
|
|
1023
1030
|
|
|
1024
1031
|
const newProductEdit = productEdit;
|
|
1025
1032
|
newProductEdit.product[sectionStatusKey] = serviceStatus;
|
|
1026
1033
|
setProductEdit(newProductEdit);
|
|
1027
|
-
const showSurveyByProvider =
|
|
1028
|
-
|
|
1029
|
-
const showSurveyByRetailer =
|
|
1030
|
-
user.is_retailer && orderStatus[orderId] === "ACA";
|
|
1034
|
+
const showSurveyByProvider = !user.is_retailer && orderStatus === "AP";
|
|
1035
|
+
const showSurveyByRetailer = user.is_retailer && orderStatus === "ACA";
|
|
1031
1036
|
showSurvey && showSurvey(showSurveyByProvider || showSurveyByRetailer);
|
|
1032
1037
|
} else {
|
|
1033
|
-
res = await axios.
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
+
res = await axios.post(
|
|
1039
|
+
`${process.env.REACT_APP_EVALUATION_REFACTOR}`,
|
|
1040
|
+
body,
|
|
1041
|
+
{
|
|
1042
|
+
headers: {
|
|
1043
|
+
Authorization: token,
|
|
1044
|
+
},
|
|
1045
|
+
}
|
|
1046
|
+
);
|
|
1038
1047
|
}
|
|
1039
1048
|
if (res.data.statusCode === 200) {
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
const message = createMessage(
|
|
1045
|
-
product.retailers || product.retailersAvailable,
|
|
1046
|
-
activeRetailer.id,
|
|
1047
|
-
product[sectionStatusKey],
|
|
1048
|
-
newStatus,
|
|
1049
|
-
activeTab
|
|
1050
|
-
);
|
|
1051
|
-
|
|
1052
|
-
const messageData = {
|
|
1053
|
-
paramsBody: {
|
|
1054
|
-
id: product.article.id_article || productEdit.ArticleId,
|
|
1055
|
-
version: version,
|
|
1056
|
-
items: [{ type: "status", value: message }],
|
|
1057
|
-
retailerId: activeRetailer.id,
|
|
1058
|
-
status: product.status || productEdit.product.status,
|
|
1059
|
-
},
|
|
1060
|
-
paramsHeader: { Authorization: token },
|
|
1061
|
-
};
|
|
1062
|
-
await sendMessage(messageData);
|
|
1063
|
-
|
|
1064
|
-
if (newArticleStatus) productTemp.status = newArticleStatus[articleId];
|
|
1049
|
+
const response = JSON.parse(res.data.body)?.successfulData;
|
|
1050
|
+
const statusObject =
|
|
1051
|
+
response[`${orderId}-${articleId}-${activeRetailer.id}`];
|
|
1052
|
+
productTemp.status = statusObject["generalStatus"];
|
|
1065
1053
|
const retailerStatusCopy = { ...retailerStatus };
|
|
1066
|
-
retailerStatusCopy[activeRetailer.id][concept] =
|
|
1054
|
+
retailerStatusCopy[activeRetailer.id][concept] =
|
|
1055
|
+
statusObject[`${concept}Status`];
|
|
1067
1056
|
setRetailerStatus(retailerStatusCopy);
|
|
1068
1057
|
productTemp.statusByRetailer = retailerStatusCopy;
|
|
1069
1058
|
let status;
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
productTemp[`${concept}_status`] = status;
|
|
1073
|
-
}
|
|
1059
|
+
status = statusObject[`${concept}Status`];
|
|
1060
|
+
productTemp[`${concept}_status`] = status;
|
|
1074
1061
|
setProduct(productTemp);
|
|
1075
1062
|
sessionStorage.setItem("productSelected", JSON.stringify(productTemp));
|
|
1076
1063
|
setOrigin((prev) => ({ ...prev, [concept]: status }));
|
|
@@ -1086,48 +1073,38 @@ export const ProviderProductEdition = ({
|
|
|
1086
1073
|
setLoading(true);
|
|
1087
1074
|
const evaluationArray = [];
|
|
1088
1075
|
const conceptArray = ["description", "datasheet", "images"];
|
|
1089
|
-
const
|
|
1090
|
-
|
|
1091
|
-
orderId: product.id_order ?? product.orderId,
|
|
1092
|
-
result,
|
|
1093
|
-
isAproved: result === "A",
|
|
1094
|
-
};
|
|
1095
|
-
const messages = [];
|
|
1076
|
+
const isAproved = result === "A";
|
|
1077
|
+
const retailersIds = [];
|
|
1096
1078
|
servicesData?.forEach((ret) => {
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1079
|
+
if (!retailersIds.includes(ret.id_retailer))
|
|
1080
|
+
retailersIds.push(ret.id_retailer);
|
|
1081
|
+
});
|
|
1082
|
+
const body = {
|
|
1083
|
+
orderArticleRetailers: [
|
|
1084
|
+
{
|
|
1085
|
+
orderId: product.id_order ?? product.orderId,
|
|
1086
|
+
articleId: product.article.id_article,
|
|
1087
|
+
retailersIds,
|
|
1088
|
+
},
|
|
1089
|
+
],
|
|
1090
|
+
isAproved,
|
|
1091
|
+
};
|
|
1092
|
+
conceptArray.forEach((concept) => {
|
|
1093
|
+
body.service = concept;
|
|
1105
1094
|
evaluationArray.push(
|
|
1106
|
-
axios.
|
|
1095
|
+
axios.post(`${process.env.REACT_APP_EVALUATION_REFACTOR}`, body, {
|
|
1107
1096
|
headers: {
|
|
1108
1097
|
Authorization: token,
|
|
1109
1098
|
},
|
|
1110
1099
|
})
|
|
1111
1100
|
);
|
|
1112
|
-
if (product[`${ret.service}_status`] !== "NS") {
|
|
1113
|
-
const message = createMessage(
|
|
1114
|
-
product.retailers,
|
|
1115
|
-
ret.id_retailer,
|
|
1116
|
-
product[`${ret.service}_status`],
|
|
1117
|
-
`${result}A`,
|
|
1118
|
-
ret.service
|
|
1119
|
-
);
|
|
1120
|
-
messages.push(
|
|
1121
|
-
createComment([{ type: "status", value: message }], ret.id_retailer)
|
|
1122
|
-
);
|
|
1123
|
-
}
|
|
1124
1101
|
});
|
|
1125
1102
|
await Promise.all(evaluationArray);
|
|
1126
1103
|
const userType = user.is_retailer === 1 ? "CA" : "P";
|
|
1127
1104
|
|
|
1128
1105
|
const productTemp = product;
|
|
1129
1106
|
const status = `${result}${userType}`;
|
|
1130
|
-
productTemp.
|
|
1107
|
+
productTemp.status = status;
|
|
1131
1108
|
productTemp.datasheet_status =
|
|
1132
1109
|
productTemp.datasheet_status === "NA" ? "NA" : status;
|
|
1133
1110
|
productTemp.description_status =
|
|
@@ -1160,7 +1137,6 @@ export const ProviderProductEdition = ({
|
|
|
1160
1137
|
product: productTemp,
|
|
1161
1138
|
})
|
|
1162
1139
|
);
|
|
1163
|
-
await Promise.all(messages);
|
|
1164
1140
|
|
|
1165
1141
|
await loadData();
|
|
1166
1142
|
} catch (error) {
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. We also recommend that a
|
|
186
|
-
file or class name and description of purpose be included on the
|
|
187
|
-
same "printed page" as the copyright notice for easier
|
|
188
|
-
identification within third-party archives.
|
|
189
|
-
|
|
190
|
-
Copyright [yyyy] [name of copyright owner]
|
|
191
|
-
|
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
-
you may not use this file except in compliance with the License.
|
|
194
|
-
You may obtain a copy of the License at
|
|
195
|
-
|
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
-
|
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
See the License for the specific language governing permissions and
|
|
202
|
-
limitations under the License.
|