@mapcreator/api 2.3.6 → 2.5.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/README.md +14 -14
- package/dist/bundle.browser.js +453 -313
- package/dist/bundle.browser.js.map +1 -1
- package/dist/bundle.browser.min.js +1 -1
- package/dist/bundle.browser.min.js.LICENSE.txt +2 -2
- package/dist/bundle.browser.min.js.map +1 -1
- package/dist/bundle.js +444 -304
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.min.js +1 -1
- package/dist/bundle.min.js.LICENSE.txt +1 -1
- package/dist/bundle.min.js.map +1 -1
- package/manual/examples.md +1 -1
- package/manual/installation.md +2 -2
- package/manual/js/sandbox.js +9 -9
- package/package.json +4 -4
- package/src/Mapcreator.js +10 -0
- package/src/oauth/ImplicitFlow.js +5 -2
- package/src/resources/Message.js +48 -0
- package/src/resources/MessageVariant.js +37 -0
- package/src/resources/User.js +9 -0
- package/src/resources/base/ResourceBase.js +6 -6
- package/src/resources/index.js +1 -0
- package/src/storage/FileDriver.js +2 -11
- package/src/utils/helpers.js +22 -0
package/dist/bundle.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
30
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
31
|
*
|
|
32
|
-
* hash:
|
|
32
|
+
* hash:92bcbca46e1e982fd8e9, chunkhash:398f80408517944d6c3e, name:bundle, version:v2.5.0
|
|
33
33
|
*/
|
|
34
34
|
module.exports =
|
|
35
35
|
/******/ (function(modules) { // webpackBootstrap
|
|
@@ -115,7 +115,7 @@ module.exports =
|
|
|
115
115
|
/******/
|
|
116
116
|
/******/
|
|
117
117
|
/******/ // Load entry module and return exports
|
|
118
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
118
|
+
/******/ return __webpack_require__(__webpack_require__.s = 73);
|
|
119
119
|
/******/ })
|
|
120
120
|
/************************************************************************/
|
|
121
121
|
/******/ ([
|
|
@@ -129,6 +129,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129
129
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapKyCancelable", function() { return wrapKyCancelable; });
|
|
130
130
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeCancelable", function() { return makeCancelable; });
|
|
131
131
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serializeUTCDate", function() { return serializeUTCDate; });
|
|
132
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; });
|
|
132
133
|
/*
|
|
133
134
|
* BSD 3-Clause License
|
|
134
135
|
*
|
|
@@ -275,6 +276,27 @@ function serializeUTCDate(date) {
|
|
|
275
276
|
out += ` ${[date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()].map(pad).join(':')}`;
|
|
276
277
|
return out;
|
|
277
278
|
}
|
|
279
|
+
function clone(input, clonePrivate = true) {
|
|
280
|
+
const _clone = value => clone(value, clonePrivate);
|
|
281
|
+
|
|
282
|
+
if (typeof input !== 'object' || input === null) {
|
|
283
|
+
return input;
|
|
284
|
+
} else if (Array.isArray(input)) {
|
|
285
|
+
return input.map(_clone);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const output = {};
|
|
289
|
+
|
|
290
|
+
for (const key of Object.keys(input)) {
|
|
291
|
+
if (!clonePrivate && key.startsWith('_')) {
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
output[key] = _clone(input[key]);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
return output;
|
|
299
|
+
}
|
|
278
300
|
|
|
279
301
|
/***/ }),
|
|
280
302
|
/* 1 */
|
|
@@ -691,7 +713,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
691
713
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
692
714
|
/* harmony import */ var _utils_hash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29);
|
|
693
715
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
|
|
694
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
716
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
|
|
695
717
|
/*
|
|
696
718
|
* BSD 3-Clause License
|
|
697
719
|
*
|
|
@@ -1418,133 +1440,6 @@ class RequestParameters extends events__WEBPACK_IMPORTED_MODULE_1__["EventEmitte
|
|
|
1418
1440
|
/* 4 */
|
|
1419
1441
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1420
1442
|
|
|
1421
|
-
"use strict";
|
|
1422
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1423
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormData", function() { return FormData; });
|
|
1424
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeQueryString", function() { return encodeQueryString; });
|
|
1425
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapKyPrefixUrl", function() { return wrapKyPrefixUrl; });
|
|
1426
|
-
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
|
|
1427
|
-
/*
|
|
1428
|
-
* BSD 3-Clause License
|
|
1429
|
-
*
|
|
1430
|
-
* Copyright (c) 2020, Mapcreator
|
|
1431
|
-
* All rights reserved.
|
|
1432
|
-
*
|
|
1433
|
-
* Redistribution and use in source and binary forms, with or without
|
|
1434
|
-
* modification, are permitted provided that the following conditions are met:
|
|
1435
|
-
*
|
|
1436
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
1437
|
-
* list of conditions and the following disclaimer.
|
|
1438
|
-
*
|
|
1439
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
1440
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
1441
|
-
* and/or other materials provided with the distribution.
|
|
1442
|
-
*
|
|
1443
|
-
* Neither the name of the copyright holder nor the names of its
|
|
1444
|
-
* contributors may be used to endorse or promote products derived from
|
|
1445
|
-
* this software without specific prior written permission.
|
|
1446
|
-
*
|
|
1447
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
1448
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
1449
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
1450
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
1451
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
1452
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
1453
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
1454
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
1455
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
1456
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1457
|
-
*/
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
function getFormData() {
|
|
1461
|
-
if (Object(_node__WEBPACK_IMPORTED_MODULE_0__["windowTest"])('FormData')) {
|
|
1462
|
-
return window.FormData;
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
return __webpack_require__(71);
|
|
1466
|
-
}
|
|
1467
|
-
/**
|
|
1468
|
-
* @private
|
|
1469
|
-
*/
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
const FormData = getFormData();
|
|
1473
|
-
/**
|
|
1474
|
-
* Encodes an object to a http query string with support for recursion
|
|
1475
|
-
* @param {Object<string, *>} paramsObject - data to be encoded
|
|
1476
|
-
* @param {Array<string>} _basePrefix - Used internally for tracking recursion
|
|
1477
|
-
* @returns {string} - encoded http query string
|
|
1478
|
-
*
|
|
1479
|
-
* @see http://stackoverflow.com/a/39828481
|
|
1480
|
-
* @private
|
|
1481
|
-
*/
|
|
1482
|
-
|
|
1483
|
-
function _encodeQueryString(paramsObject, _basePrefix = []) {
|
|
1484
|
-
return Object.keys(paramsObject).sort().map(key => {
|
|
1485
|
-
const prefix = _basePrefix.slice(0);
|
|
1486
|
-
|
|
1487
|
-
if (typeof paramsObject[key] === 'object' && paramsObject[key] !== null) {
|
|
1488
|
-
prefix.push(key);
|
|
1489
|
-
return _encodeQueryString(paramsObject[key], prefix);
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
prefix.push(key);
|
|
1493
|
-
let out = '';
|
|
1494
|
-
out += encodeURIComponent(prefix.shift()); // main key
|
|
1495
|
-
|
|
1496
|
-
out += prefix.map(item => `[${encodeURIComponent(item)}]`).join(''); // optional array keys
|
|
1497
|
-
|
|
1498
|
-
const value = paramsObject[key];
|
|
1499
|
-
|
|
1500
|
-
if (value !== null && typeof value !== 'undefined') {
|
|
1501
|
-
out += `=${encodeURIComponent(value)}`; // value
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
return out;
|
|
1505
|
-
}).join('&');
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
* Encodes an object to a http query string with support for recursion
|
|
1509
|
-
* @param {object<string, *>} paramsObject - data to be encoded
|
|
1510
|
-
* @returns {string} - encoded http query string
|
|
1511
|
-
*
|
|
1512
|
-
* @private
|
|
1513
|
-
*/
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
function encodeQueryString(paramsObject) {
|
|
1517
|
-
const query = _encodeQueryString(paramsObject); // Removes any extra unused &'s.
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
return query.replace(/^&*|&+(?=&)|&*$/g, '');
|
|
1521
|
-
}
|
|
1522
|
-
/**
|
|
1523
|
-
* Wraps around ky to ensure that the prefix is correctly set
|
|
1524
|
-
* @param {function(*=, *=): Response} fn - ky instance
|
|
1525
|
-
* @param {string} baseUrl - url to be prefixed
|
|
1526
|
-
* @returns {function(*=, *=): Response}
|
|
1527
|
-
* @private
|
|
1528
|
-
*/
|
|
1529
|
-
|
|
1530
|
-
function wrapKyPrefixUrl(fn, baseUrl) {
|
|
1531
|
-
return function (input, options) {
|
|
1532
|
-
if (typeof input === 'string' && !/^https?:\/\//.test(input)) {
|
|
1533
|
-
if (!input.startsWith('/')) {
|
|
1534
|
-
input = `/${input}`;
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
input = baseUrl + input;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
return fn(input, options);
|
|
1541
|
-
};
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
/***/ }),
|
|
1545
|
-
/* 5 */
|
|
1546
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1547
|
-
|
|
1548
1443
|
"use strict";
|
|
1549
1444
|
// ESM COMPAT FLAG
|
|
1550
1445
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -1571,6 +1466,7 @@ __webpack_require__.d(__webpack_exports__, "Language", function() { return /* re
|
|
|
1571
1466
|
__webpack_require__.d(__webpack_exports__, "Layer", function() { return /* reexport */ Layer["default"]; });
|
|
1572
1467
|
__webpack_require__.d(__webpack_exports__, "Mapstyle", function() { return /* reexport */ Mapstyle["default"]; });
|
|
1573
1468
|
__webpack_require__.d(__webpack_exports__, "MapstyleSet", function() { return /* reexport */ MapstyleSet["default"]; });
|
|
1469
|
+
__webpack_require__.d(__webpack_exports__, "Message", function() { return /* reexport */ Message["default"]; });
|
|
1574
1470
|
__webpack_require__.d(__webpack_exports__, "Notification", function() { return /* reexport */ Notification["default"]; });
|
|
1575
1471
|
__webpack_require__.d(__webpack_exports__, "Organisation", function() { return /* reexport */ Organisation["default"]; });
|
|
1576
1472
|
__webpack_require__.d(__webpack_exports__, "Permission", function() { return /* reexport */ Permission["default"]; });
|
|
@@ -1853,6 +1749,9 @@ var Mapstyle = __webpack_require__(44);
|
|
|
1853
1749
|
// EXTERNAL MODULE: ./src/resources/MapstyleSet.js + 1 modules
|
|
1854
1750
|
var MapstyleSet = __webpack_require__(50);
|
|
1855
1751
|
|
|
1752
|
+
// EXTERNAL MODULE: ./src/resources/Message.js + 1 modules
|
|
1753
|
+
var Message = __webpack_require__(67);
|
|
1754
|
+
|
|
1856
1755
|
// EXTERNAL MODULE: ./src/resources/Notification.js
|
|
1857
1756
|
var Notification = __webpack_require__(64);
|
|
1858
1757
|
|
|
@@ -2112,6 +2011,8 @@ var CrudSetBase = __webpack_require__(25);
|
|
|
2112
2011
|
|
|
2113
2012
|
|
|
2114
2013
|
|
|
2014
|
+
|
|
2015
|
+
|
|
2115
2016
|
|
|
2116
2017
|
|
|
2117
2018
|
|
|
@@ -2125,6 +2026,133 @@ const base = {
|
|
|
2125
2026
|
ResourceBase: ResourceBase["default"]
|
|
2126
2027
|
};
|
|
2127
2028
|
|
|
2029
|
+
/***/ }),
|
|
2030
|
+
/* 5 */
|
|
2031
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2032
|
+
|
|
2033
|
+
"use strict";
|
|
2034
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2035
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormData", function() { return FormData; });
|
|
2036
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeQueryString", function() { return encodeQueryString; });
|
|
2037
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapKyPrefixUrl", function() { return wrapKyPrefixUrl; });
|
|
2038
|
+
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
|
|
2039
|
+
/*
|
|
2040
|
+
* BSD 3-Clause License
|
|
2041
|
+
*
|
|
2042
|
+
* Copyright (c) 2020, Mapcreator
|
|
2043
|
+
* All rights reserved.
|
|
2044
|
+
*
|
|
2045
|
+
* Redistribution and use in source and binary forms, with or without
|
|
2046
|
+
* modification, are permitted provided that the following conditions are met:
|
|
2047
|
+
*
|
|
2048
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
2049
|
+
* list of conditions and the following disclaimer.
|
|
2050
|
+
*
|
|
2051
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
2052
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
2053
|
+
* and/or other materials provided with the distribution.
|
|
2054
|
+
*
|
|
2055
|
+
* Neither the name of the copyright holder nor the names of its
|
|
2056
|
+
* contributors may be used to endorse or promote products derived from
|
|
2057
|
+
* this software without specific prior written permission.
|
|
2058
|
+
*
|
|
2059
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
2060
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
2061
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
2062
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
2063
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
2064
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
2065
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
2066
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
2067
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
2068
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
2069
|
+
*/
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
function getFormData() {
|
|
2073
|
+
if (Object(_node__WEBPACK_IMPORTED_MODULE_0__["windowTest"])('FormData')) {
|
|
2074
|
+
return window.FormData;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
return __webpack_require__(72);
|
|
2078
|
+
}
|
|
2079
|
+
/**
|
|
2080
|
+
* @private
|
|
2081
|
+
*/
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
const FormData = getFormData();
|
|
2085
|
+
/**
|
|
2086
|
+
* Encodes an object to a http query string with support for recursion
|
|
2087
|
+
* @param {Object<string, *>} paramsObject - data to be encoded
|
|
2088
|
+
* @param {Array<string>} _basePrefix - Used internally for tracking recursion
|
|
2089
|
+
* @returns {string} - encoded http query string
|
|
2090
|
+
*
|
|
2091
|
+
* @see http://stackoverflow.com/a/39828481
|
|
2092
|
+
* @private
|
|
2093
|
+
*/
|
|
2094
|
+
|
|
2095
|
+
function _encodeQueryString(paramsObject, _basePrefix = []) {
|
|
2096
|
+
return Object.keys(paramsObject).sort().map(key => {
|
|
2097
|
+
const prefix = _basePrefix.slice(0);
|
|
2098
|
+
|
|
2099
|
+
if (typeof paramsObject[key] === 'object' && paramsObject[key] !== null) {
|
|
2100
|
+
prefix.push(key);
|
|
2101
|
+
return _encodeQueryString(paramsObject[key], prefix);
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
prefix.push(key);
|
|
2105
|
+
let out = '';
|
|
2106
|
+
out += encodeURIComponent(prefix.shift()); // main key
|
|
2107
|
+
|
|
2108
|
+
out += prefix.map(item => `[${encodeURIComponent(item)}]`).join(''); // optional array keys
|
|
2109
|
+
|
|
2110
|
+
const value = paramsObject[key];
|
|
2111
|
+
|
|
2112
|
+
if (value !== null && typeof value !== 'undefined') {
|
|
2113
|
+
out += `=${encodeURIComponent(value)}`; // value
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
return out;
|
|
2117
|
+
}).join('&');
|
|
2118
|
+
}
|
|
2119
|
+
/**
|
|
2120
|
+
* Encodes an object to a http query string with support for recursion
|
|
2121
|
+
* @param {object<string, *>} paramsObject - data to be encoded
|
|
2122
|
+
* @returns {string} - encoded http query string
|
|
2123
|
+
*
|
|
2124
|
+
* @private
|
|
2125
|
+
*/
|
|
2126
|
+
|
|
2127
|
+
|
|
2128
|
+
function encodeQueryString(paramsObject) {
|
|
2129
|
+
const query = _encodeQueryString(paramsObject); // Removes any extra unused &'s.
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
return query.replace(/^&*|&+(?=&)|&*$/g, '');
|
|
2133
|
+
}
|
|
2134
|
+
/**
|
|
2135
|
+
* Wraps around ky to ensure that the prefix is correctly set
|
|
2136
|
+
* @param {function(*=, *=): Response} fn - ky instance
|
|
2137
|
+
* @param {string} baseUrl - url to be prefixed
|
|
2138
|
+
* @returns {function(*=, *=): Response}
|
|
2139
|
+
* @private
|
|
2140
|
+
*/
|
|
2141
|
+
|
|
2142
|
+
function wrapKyPrefixUrl(fn, baseUrl) {
|
|
2143
|
+
return function (input, options) {
|
|
2144
|
+
if (typeof input === 'string' && !/^https?:\/\//.test(input)) {
|
|
2145
|
+
if (!input.startsWith('/')) {
|
|
2146
|
+
input = `/${input}`;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
input = baseUrl + input;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
return fn(input, options);
|
|
2153
|
+
};
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2128
2156
|
/***/ }),
|
|
2129
2157
|
/* 6 */
|
|
2130
2158
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
@@ -2137,7 +2165,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2137
2165
|
/* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
|
|
2138
2166
|
/* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
|
|
2139
2167
|
/* harmony import */ var _proxy_SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
|
|
2140
|
-
/* harmony import */ var _traits_Injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
2168
|
+
/* harmony import */ var _traits_Injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68);
|
|
2141
2169
|
/* harmony import */ var _utils_hash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29);
|
|
2142
2170
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
|
|
2143
2171
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
|
|
@@ -2204,8 +2232,7 @@ class ResourceBase extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_6__
|
|
|
2204
2232
|
|
|
2205
2233
|
this.api = api; // De-reference
|
|
2206
2234
|
|
|
2207
|
-
data =
|
|
2208
|
-
}; // Normalize keys to snake_case
|
|
2235
|
+
data = Object(_utils_helpers__WEBPACK_IMPORTED_MODULE_7__["clone"])(data); // Normalize keys to snake_case
|
|
2209
2236
|
// Fix data types
|
|
2210
2237
|
|
|
2211
2238
|
for (const key of Object.keys(data)) {
|
|
@@ -2216,7 +2243,7 @@ class ResourceBase extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_6__
|
|
|
2216
2243
|
continue;
|
|
2217
2244
|
}
|
|
2218
2245
|
|
|
2219
|
-
data[newKey] = this.
|
|
2246
|
+
data[newKey] = this._guessType(newKey, data[key]);
|
|
2220
2247
|
|
|
2221
2248
|
if (newKey !== key) {
|
|
2222
2249
|
delete data[key];
|
|
@@ -2445,7 +2472,7 @@ class ResourceBase extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_6__
|
|
|
2445
2472
|
|
|
2446
2473
|
if (!this.constructor.protectedFields.includes(key) && !this.constructor.readonly) {
|
|
2447
2474
|
desc.set = val => {
|
|
2448
|
-
this._properties[key] =
|
|
2475
|
+
this._properties[key] = this._guessType(key, val);
|
|
2449
2476
|
delete this._url; // Clears url cache
|
|
2450
2477
|
};
|
|
2451
2478
|
}
|
|
@@ -2457,12 +2484,12 @@ class ResourceBase extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_6__
|
|
|
2457
2484
|
* Guess type based on property name
|
|
2458
2485
|
* @param {string} name - Field name
|
|
2459
2486
|
* @param {*} value - Field Value
|
|
2460
|
-
* @
|
|
2487
|
+
* @protected
|
|
2461
2488
|
* @returns {*} - Original or converted value
|
|
2462
2489
|
*/
|
|
2463
2490
|
|
|
2464
2491
|
|
|
2465
|
-
|
|
2492
|
+
_guessType(name, value) {
|
|
2466
2493
|
if (name.endsWith('_at') || name.startsWith('date_')) {
|
|
2467
2494
|
return typeof value === 'string' ? new Date(value.replace(' ', 'T')) : value;
|
|
2468
2495
|
} else if (/(_|^)id$/.test(name) && value !== null) {
|
|
@@ -3215,7 +3242,7 @@ function windowTest(str) {
|
|
|
3215
3242
|
"use strict";
|
|
3216
3243
|
__webpack_require__.r(__webpack_exports__);
|
|
3217
3244
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ResourceProxy; });
|
|
3218
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3245
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
3219
3246
|
/* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
|
|
3220
3247
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
|
|
3221
3248
|
/*
|
|
@@ -3340,8 +3367,8 @@ class ResourceProxy extends _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__["d
|
|
|
3340
3367
|
"use strict";
|
|
3341
3368
|
__webpack_require__.r(__webpack_exports__);
|
|
3342
3369
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return OAuthToken; });
|
|
3343
|
-
/* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3344
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3370
|
+
/* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
|
|
3371
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
|
|
3345
3372
|
/*
|
|
3346
3373
|
* BSD 3-Clause License
|
|
3347
3374
|
*
|
|
@@ -4040,31 +4067,117 @@ class SimpleResourceProxy_SimpleResourceProxy {
|
|
|
4040
4067
|
// }
|
|
4041
4068
|
|
|
4042
4069
|
|
|
4043
|
-
_buildResolver(params = {}) {
|
|
4044
|
-
const paramType = typeof params;
|
|
4045
|
-
const url = this.baseUrl;
|
|
4070
|
+
_buildResolver(params = {}) {
|
|
4071
|
+
const paramType = typeof params;
|
|
4072
|
+
const url = this.baseUrl;
|
|
4073
|
+
|
|
4074
|
+
if (!['number', 'object'].includes(paramType)) {
|
|
4075
|
+
throw new TypeError(`Expected params to be of type number or object. Got "${paramType}"`);
|
|
4076
|
+
}
|
|
4077
|
+
|
|
4078
|
+
if (paramType === 'number') {
|
|
4079
|
+
return this._buildResolver({
|
|
4080
|
+
page: params
|
|
4081
|
+
});
|
|
4082
|
+
}
|
|
4083
|
+
|
|
4084
|
+
if (!(params instanceof RequestParameters["default"])) {
|
|
4085
|
+
params = new RequestParameters["default"](params);
|
|
4086
|
+
}
|
|
4087
|
+
|
|
4088
|
+
return new PaginatedResourceListing_PaginatedResourceListing(this._api, url, this.Target, params);
|
|
4089
|
+
}
|
|
4090
|
+
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
/***/ }),
|
|
4094
|
+
/* 17 */
|
|
4095
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4096
|
+
|
|
4097
|
+
"use strict";
|
|
4098
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4099
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return OAuthError; });
|
|
4100
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
|
|
4101
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
4102
|
+
|
|
4103
|
+
|
|
4104
|
+
/*
|
|
4105
|
+
* BSD 3-Clause License
|
|
4106
|
+
*
|
|
4107
|
+
* Copyright (c) 2020, Mapcreator
|
|
4108
|
+
* All rights reserved.
|
|
4109
|
+
*
|
|
4110
|
+
* Redistribution and use in source and binary forms, with or without
|
|
4111
|
+
* modification, are permitted provided that the following conditions are met:
|
|
4112
|
+
*
|
|
4113
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
4114
|
+
* list of conditions and the following disclaimer.
|
|
4115
|
+
*
|
|
4116
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
4117
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
4118
|
+
* and/or other materials provided with the distribution.
|
|
4119
|
+
*
|
|
4120
|
+
* Neither the name of the copyright holder nor the names of its
|
|
4121
|
+
* contributors may be used to endorse or promote products derived from
|
|
4122
|
+
* this software without specific prior written permission.
|
|
4123
|
+
*
|
|
4124
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
4125
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
4126
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
4127
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
4128
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
4129
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
4130
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
4131
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
4132
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
4133
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
4134
|
+
*/
|
|
4135
|
+
|
|
4136
|
+
/**
|
|
4137
|
+
* OAuth error
|
|
4138
|
+
*/
|
|
4139
|
+
class OAuthError extends Error {
|
|
4140
|
+
/**
|
|
4141
|
+
* OAuth error code
|
|
4142
|
+
* @type {String}
|
|
4143
|
+
*/
|
|
4144
|
+
|
|
4145
|
+
/**
|
|
4146
|
+
* OAuth error response
|
|
4147
|
+
* @param {String} error - OAuth error key
|
|
4148
|
+
* @param {String} message - OAuth error message
|
|
4149
|
+
*/
|
|
4150
|
+
constructor(error, message = '') {
|
|
4151
|
+
super(message);
|
|
4046
4152
|
|
|
4047
|
-
|
|
4048
|
-
throw new TypeError(`Expected params to be of type number or object. Got "${paramType}"`);
|
|
4049
|
-
}
|
|
4153
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "error", void 0);
|
|
4050
4154
|
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4155
|
+
this.error = String(error);
|
|
4156
|
+
}
|
|
4157
|
+
/**
|
|
4158
|
+
* Displayable error string
|
|
4159
|
+
* @returns {String} - error
|
|
4160
|
+
*/
|
|
4161
|
+
|
|
4162
|
+
|
|
4163
|
+
toString() {
|
|
4164
|
+
let error = this.error;
|
|
4165
|
+
|
|
4166
|
+
if (error.includes('_')) {
|
|
4167
|
+
error = error.replace('_', ' ').replace(/^./, x => x.toUpperCase());
|
|
4055
4168
|
}
|
|
4056
4169
|
|
|
4057
|
-
if (
|
|
4058
|
-
|
|
4170
|
+
if (this.message) {
|
|
4171
|
+
return `${error}: ${this.message}`;
|
|
4059
4172
|
}
|
|
4060
4173
|
|
|
4061
|
-
return
|
|
4174
|
+
return error;
|
|
4062
4175
|
}
|
|
4063
4176
|
|
|
4064
4177
|
}
|
|
4065
4178
|
|
|
4066
4179
|
/***/ }),
|
|
4067
|
-
/*
|
|
4180
|
+
/* 18 */
|
|
4068
4181
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4069
4182
|
|
|
4070
4183
|
"use strict";
|
|
@@ -4157,7 +4270,7 @@ class CrudSetItemBase extends _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
|
4157
4270
|
}
|
|
4158
4271
|
|
|
4159
4272
|
/***/ }),
|
|
4160
|
-
/*
|
|
4273
|
+
/* 19 */
|
|
4161
4274
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4162
4275
|
|
|
4163
4276
|
"use strict";
|
|
@@ -4416,7 +4529,7 @@ class DummyDriver_DummyDriver extends DataStoreContract["default"] {
|
|
|
4416
4529
|
|
|
4417
4530
|
defineProperty_default()(DummyDriver_DummyDriver, "_data", {});
|
|
4418
4531
|
// EXTERNAL MODULE: ./src/storage/FileDriver.js
|
|
4419
|
-
var FileDriver = __webpack_require__(
|
|
4532
|
+
var FileDriver = __webpack_require__(70);
|
|
4420
4533
|
|
|
4421
4534
|
// CONCATENATED MODULE: ./src/storage/LocalStorageDriver.js
|
|
4422
4535
|
/*
|
|
@@ -4641,92 +4754,6 @@ class StorageManager_StorageManager extends StaticClass["default"] {
|
|
|
4641
4754
|
|
|
4642
4755
|
}
|
|
4643
4756
|
|
|
4644
|
-
/***/ }),
|
|
4645
|
-
/* 19 */
|
|
4646
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4647
|
-
|
|
4648
|
-
"use strict";
|
|
4649
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4650
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return OAuthError; });
|
|
4651
|
-
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
|
|
4652
|
-
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
/*
|
|
4656
|
-
* BSD 3-Clause License
|
|
4657
|
-
*
|
|
4658
|
-
* Copyright (c) 2020, Mapcreator
|
|
4659
|
-
* All rights reserved.
|
|
4660
|
-
*
|
|
4661
|
-
* Redistribution and use in source and binary forms, with or without
|
|
4662
|
-
* modification, are permitted provided that the following conditions are met:
|
|
4663
|
-
*
|
|
4664
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
4665
|
-
* list of conditions and the following disclaimer.
|
|
4666
|
-
*
|
|
4667
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
4668
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
4669
|
-
* and/or other materials provided with the distribution.
|
|
4670
|
-
*
|
|
4671
|
-
* Neither the name of the copyright holder nor the names of its
|
|
4672
|
-
* contributors may be used to endorse or promote products derived from
|
|
4673
|
-
* this software without specific prior written permission.
|
|
4674
|
-
*
|
|
4675
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
4676
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
4677
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
4678
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
4679
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
4680
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
4681
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
4682
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
4683
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
4684
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
4685
|
-
*/
|
|
4686
|
-
|
|
4687
|
-
/**
|
|
4688
|
-
* OAuth error
|
|
4689
|
-
*/
|
|
4690
|
-
class OAuthError extends Error {
|
|
4691
|
-
/**
|
|
4692
|
-
* OAuth error code
|
|
4693
|
-
* @type {String}
|
|
4694
|
-
*/
|
|
4695
|
-
|
|
4696
|
-
/**
|
|
4697
|
-
* OAuth error response
|
|
4698
|
-
* @param {String} error - OAuth error key
|
|
4699
|
-
* @param {String} message - OAuth error message
|
|
4700
|
-
*/
|
|
4701
|
-
constructor(error, message = '') {
|
|
4702
|
-
super(message);
|
|
4703
|
-
|
|
4704
|
-
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "error", void 0);
|
|
4705
|
-
|
|
4706
|
-
this.error = String(error);
|
|
4707
|
-
}
|
|
4708
|
-
/**
|
|
4709
|
-
* Displayable error string
|
|
4710
|
-
* @returns {String} - error
|
|
4711
|
-
*/
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
toString() {
|
|
4715
|
-
let error = this.error;
|
|
4716
|
-
|
|
4717
|
-
if (error.includes('_')) {
|
|
4718
|
-
error = error.replace('_', ' ').replace(/^./, x => x.toUpperCase());
|
|
4719
|
-
}
|
|
4720
|
-
|
|
4721
|
-
if (this.message) {
|
|
4722
|
-
return `${error}: ${this.message}`;
|
|
4723
|
-
}
|
|
4724
|
-
|
|
4725
|
-
return error;
|
|
4726
|
-
}
|
|
4727
|
-
|
|
4728
|
-
}
|
|
4729
|
-
|
|
4730
4757
|
/***/ }),
|
|
4731
4758
|
/* 20 */
|
|
4732
4759
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
@@ -5291,7 +5318,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5291
5318
|
/* harmony import */ var ky_universal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51);
|
|
5292
5319
|
/* harmony import */ var ky_universal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ky_universal__WEBPACK_IMPORTED_MODULE_1__);
|
|
5293
5320
|
/* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
|
|
5294
|
-
/* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
5321
|
+
/* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
|
|
5295
5322
|
/* harmony import */ var _OAuthToken__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
|
|
5296
5323
|
/* harmony import */ var _StateContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57);
|
|
5297
5324
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
|
|
@@ -5349,7 +5376,7 @@ class OAuth {
|
|
|
5349
5376
|
|
|
5350
5377
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", '/');
|
|
5351
5378
|
|
|
5352
|
-
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "host", "https://api.
|
|
5379
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "host", "https://api.mapcreator.io");
|
|
5353
5380
|
|
|
5354
5381
|
if (this.constructor === OAuth) {
|
|
5355
5382
|
throw new _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__["AbstractClassError"]();
|
|
@@ -5470,13 +5497,13 @@ var ResourceProxy = __webpack_require__(14);
|
|
|
5470
5497
|
var SimpleResourceProxy = __webpack_require__(16);
|
|
5471
5498
|
|
|
5472
5499
|
// EXTERNAL MODULE: ./src/resources/index.js + 7 modules
|
|
5473
|
-
var resources = __webpack_require__(
|
|
5500
|
+
var resources = __webpack_require__(4);
|
|
5474
5501
|
|
|
5475
5502
|
// EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
|
|
5476
5503
|
var ResourceBase = __webpack_require__(6);
|
|
5477
5504
|
|
|
5478
5505
|
// EXTERNAL MODULE: ./src/traits/Injectable.js
|
|
5479
|
-
var Injectable = __webpack_require__(
|
|
5506
|
+
var Injectable = __webpack_require__(68);
|
|
5480
5507
|
|
|
5481
5508
|
// EXTERNAL MODULE: ./src/utils/hash.js
|
|
5482
5509
|
var hash = __webpack_require__(29);
|
|
@@ -5634,7 +5661,7 @@ var ValidationError = __webpack_require__(35);
|
|
|
5634
5661
|
var ApiError = __webpack_require__(27);
|
|
5635
5662
|
|
|
5636
5663
|
// EXTERNAL MODULE: ./src/utils/requests.js
|
|
5637
|
-
var requests = __webpack_require__(
|
|
5664
|
+
var requests = __webpack_require__(5);
|
|
5638
5665
|
|
|
5639
5666
|
// EXTERNAL MODULE: external "events"
|
|
5640
5667
|
var external_events_ = __webpack_require__(53);
|
|
@@ -5704,7 +5731,7 @@ class Mapcreator_Mapcreator extends Object(reflection["mix"])(external_events_de
|
|
|
5704
5731
|
* @param {OAuth|string} auth - Authentication flow
|
|
5705
5732
|
* @param {string} host - Remote API host
|
|
5706
5733
|
*/
|
|
5707
|
-
constructor(auth = new DummyFlow["default"](), host = "https://api.
|
|
5734
|
+
constructor(auth = new DummyFlow["default"](), host = "https://api.mapcreator.io") {
|
|
5708
5735
|
super();
|
|
5709
5736
|
|
|
5710
5737
|
if (typeof auth === 'string') {
|
|
@@ -6193,6 +6220,16 @@ class Mapcreator_Mapcreator extends Object(reflection["mix"])(external_events_de
|
|
|
6193
6220
|
get notifications() {
|
|
6194
6221
|
return this.static(resources["Notification"]);
|
|
6195
6222
|
}
|
|
6223
|
+
/**
|
|
6224
|
+
* Message accessor
|
|
6225
|
+
* @see {@link Message}
|
|
6226
|
+
* @returns {ResourceProxy} - A proxy for accessing the resource
|
|
6227
|
+
*/
|
|
6228
|
+
|
|
6229
|
+
|
|
6230
|
+
get messages() {
|
|
6231
|
+
return this.static(resources["Message"]);
|
|
6232
|
+
}
|
|
6196
6233
|
/**
|
|
6197
6234
|
* Organisation accessor
|
|
6198
6235
|
* @see {@link Organisation}
|
|
@@ -6404,7 +6441,7 @@ class CrudSetBase extends _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
|
6404
6441
|
"use strict";
|
|
6405
6442
|
__webpack_require__.r(__webpack_exports__);
|
|
6406
6443
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Layer; });
|
|
6407
|
-
/* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6444
|
+
/* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69);
|
|
6408
6445
|
/* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
|
|
6409
6446
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
6410
6447
|
/* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
|
|
@@ -6680,7 +6717,7 @@ class Trait {
|
|
|
6680
6717
|
__webpack_require__.r(__webpack_exports__);
|
|
6681
6718
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fnv32b", function() { return fnv32b; });
|
|
6682
6719
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hashObject", function() { return hashObject; });
|
|
6683
|
-
/* harmony import */ var json_stable_stringify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6720
|
+
/* harmony import */ var json_stable_stringify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71);
|
|
6684
6721
|
/* harmony import */ var json_stable_stringify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(json_stable_stringify__WEBPACK_IMPORTED_MODULE_0__);
|
|
6685
6722
|
/*
|
|
6686
6723
|
* BSD 3-Clause License
|
|
@@ -7101,7 +7138,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7101
7138
|
/* harmony import */ var _base_DownloadedResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
|
|
7102
7139
|
/* harmony import */ var _base_ResourceBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
|
|
7103
7140
|
/* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
|
|
7104
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
7141
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
|
|
7105
7142
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
|
|
7106
7143
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
|
|
7107
7144
|
/*
|
|
@@ -7677,7 +7714,7 @@ class DimensionSet extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_3__
|
|
|
7677
7714
|
"use strict";
|
|
7678
7715
|
__webpack_require__.r(__webpack_exports__);
|
|
7679
7716
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Dimension; });
|
|
7680
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
7717
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
|
|
7681
7718
|
/*
|
|
7682
7719
|
* BSD 3-Clause License
|
|
7683
7720
|
*
|
|
@@ -7852,7 +7889,7 @@ class FontFamily extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_1__["
|
|
|
7852
7889
|
"use strict";
|
|
7853
7890
|
__webpack_require__.r(__webpack_exports__);
|
|
7854
7891
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Font; });
|
|
7855
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
7892
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
|
|
7856
7893
|
/*
|
|
7857
7894
|
* BSD 3-Clause License
|
|
7858
7895
|
*
|
|
@@ -7909,7 +7946,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7909
7946
|
/* harmony import */ var _JobResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33);
|
|
7910
7947
|
/* harmony import */ var _JobRevision__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(62);
|
|
7911
7948
|
/* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
|
|
7912
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
7949
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
|
|
7913
7950
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
|
|
7914
7951
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(0);
|
|
7915
7952
|
/* harmony import */ var _JobShare__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(20);
|
|
@@ -8163,9 +8200,9 @@ class JobType extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_2__["mix
|
|
|
8163
8200
|
"use strict";
|
|
8164
8201
|
__webpack_require__.r(__webpack_exports__);
|
|
8165
8202
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Mapstyle; });
|
|
8166
|
-
/* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
8203
|
+
/* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69);
|
|
8167
8204
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
8168
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
8205
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
|
|
8169
8206
|
/*
|
|
8170
8207
|
* BSD 3-Clause License
|
|
8171
8208
|
*
|
|
@@ -8286,7 +8323,7 @@ class SvgSet extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_3__["mix"
|
|
|
8286
8323
|
"use strict";
|
|
8287
8324
|
__webpack_require__.r(__webpack_exports__);
|
|
8288
8325
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Svg; });
|
|
8289
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
8326
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
|
|
8290
8327
|
/*
|
|
8291
8328
|
* BSD 3-Clause License
|
|
8292
8329
|
*
|
|
@@ -8335,7 +8372,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8335
8372
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Tag; });
|
|
8336
8373
|
/* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
|
8337
8374
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
8338
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
8375
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
|
|
8339
8376
|
/*
|
|
8340
8377
|
* BSD 3-Clause License
|
|
8341
8378
|
*
|
|
@@ -8410,13 +8447,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8410
8447
|
/* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(26);
|
|
8411
8448
|
/* harmony import */ var _Mapstyle__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(44);
|
|
8412
8449
|
/* harmony import */ var _MapstyleSet__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(50);
|
|
8413
|
-
/* harmony import */ var
|
|
8414
|
-
/* harmony import */ var
|
|
8415
|
-
/* harmony import */ var
|
|
8416
|
-
/* harmony import */ var
|
|
8417
|
-
/* harmony import */ var
|
|
8418
|
-
/* harmony import */ var
|
|
8419
|
-
/* harmony import */ var
|
|
8450
|
+
/* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(67);
|
|
8451
|
+
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(64);
|
|
8452
|
+
/* harmony import */ var _Organisation__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(54);
|
|
8453
|
+
/* harmony import */ var _Permission__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(49);
|
|
8454
|
+
/* harmony import */ var _Role__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(65);
|
|
8455
|
+
/* harmony import */ var _Svg__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(46);
|
|
8456
|
+
/* harmony import */ var _SvgSet__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(45);
|
|
8457
|
+
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(0);
|
|
8420
8458
|
/*
|
|
8421
8459
|
* BSD 3-Clause License
|
|
8422
8460
|
*
|
|
@@ -8469,6 +8507,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8469
8507
|
|
|
8470
8508
|
|
|
8471
8509
|
|
|
8510
|
+
|
|
8472
8511
|
|
|
8473
8512
|
|
|
8474
8513
|
class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
@@ -8484,7 +8523,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8484
8523
|
|
|
8485
8524
|
ips() {
|
|
8486
8525
|
const url = `${this.url}/ips`;
|
|
8487
|
-
return Object(
|
|
8526
|
+
return Object(_utils_helpers__WEBPACK_IMPORTED_MODULE_23__["makeCancelable"])(async signal => {
|
|
8488
8527
|
const {
|
|
8489
8528
|
data
|
|
8490
8529
|
} = await this.api.ky.get(url, {
|
|
@@ -8501,7 +8540,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8501
8540
|
|
|
8502
8541
|
|
|
8503
8542
|
organisation() {
|
|
8504
|
-
return new _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_1__["default"](this.api,
|
|
8543
|
+
return new _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_1__["default"](this.api, _Organisation__WEBPACK_IMPORTED_MODULE_18__["default"]).get(this.organisationId);
|
|
8505
8544
|
}
|
|
8506
8545
|
/**
|
|
8507
8546
|
* Get the user's language
|
|
@@ -8521,7 +8560,16 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8521
8560
|
|
|
8522
8561
|
|
|
8523
8562
|
get notifications() {
|
|
8524
|
-
return this._proxyResourceList(
|
|
8563
|
+
return this._proxyResourceList(_Notification__WEBPACK_IMPORTED_MODULE_17__["default"]);
|
|
8564
|
+
}
|
|
8565
|
+
/**
|
|
8566
|
+
* Get the list messagse linked to the user
|
|
8567
|
+
* @returns {SimpleResourceProxy} - A proxy for accessing the resource
|
|
8568
|
+
*/
|
|
8569
|
+
|
|
8570
|
+
|
|
8571
|
+
get messages() {
|
|
8572
|
+
return this._proxyResourceList(_Message__WEBPACK_IMPORTED_MODULE_16__["default"]);
|
|
8525
8573
|
}
|
|
8526
8574
|
/**
|
|
8527
8575
|
* Get the list mapstyle sets linked to the user
|
|
@@ -8584,7 +8632,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8584
8632
|
|
|
8585
8633
|
|
|
8586
8634
|
get svgSets() {
|
|
8587
|
-
return this._proxyResourceList(
|
|
8635
|
+
return this._proxyResourceList(_SvgSet__WEBPACK_IMPORTED_MODULE_22__["default"]);
|
|
8588
8636
|
}
|
|
8589
8637
|
/**
|
|
8590
8638
|
* Get the list svgs linked to the user
|
|
@@ -8593,7 +8641,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8593
8641
|
|
|
8594
8642
|
|
|
8595
8643
|
get svgs() {
|
|
8596
|
-
return this._proxyResourceList(
|
|
8644
|
+
return this._proxyResourceList(_Svg__WEBPACK_IMPORTED_MODULE_21__["default"]);
|
|
8597
8645
|
}
|
|
8598
8646
|
/**
|
|
8599
8647
|
* Get the list colors linked to the user
|
|
@@ -8656,7 +8704,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8656
8704
|
|
|
8657
8705
|
|
|
8658
8706
|
get permissions() {
|
|
8659
|
-
return this._proxyResourceList(
|
|
8707
|
+
return this._proxyResourceList(_Permission__WEBPACK_IMPORTED_MODULE_19__["default"]);
|
|
8660
8708
|
}
|
|
8661
8709
|
/**
|
|
8662
8710
|
* Get the list roles linked to the user
|
|
@@ -8665,7 +8713,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8665
8713
|
|
|
8666
8714
|
|
|
8667
8715
|
get roles() {
|
|
8668
|
-
return new _proxy_OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_0__["default"](this.api, this,
|
|
8716
|
+
return new _proxy_OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_0__["default"](this.api, this, _Role__WEBPACK_IMPORTED_MODULE_20__["default"]);
|
|
8669
8717
|
} // endregion
|
|
8670
8718
|
|
|
8671
8719
|
|
|
@@ -8745,7 +8793,7 @@ var Mapstyle = __webpack_require__(44);
|
|
|
8745
8793
|
var ResourceProxy = __webpack_require__(14);
|
|
8746
8794
|
|
|
8747
8795
|
// EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
|
|
8748
|
-
var CrudSetItemBase = __webpack_require__(
|
|
8796
|
+
var CrudSetItemBase = __webpack_require__(18);
|
|
8749
8797
|
|
|
8750
8798
|
// CONCATENATED MODULE: ./src/resources/MapstyleSetColor.js
|
|
8751
8799
|
/*
|
|
@@ -8953,7 +9001,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8953
9001
|
/* harmony import */ var _Tag__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47);
|
|
8954
9002
|
/* harmony import */ var _User__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(48);
|
|
8955
9003
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(0);
|
|
8956
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
|
|
9004
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(5);
|
|
8957
9005
|
/*
|
|
8958
9006
|
* BSD 3-Clause License
|
|
8959
9007
|
*
|
|
@@ -9186,7 +9234,7 @@ class Organisation extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"
|
|
|
9186
9234
|
"use strict";
|
|
9187
9235
|
__webpack_require__.r(__webpack_exports__);
|
|
9188
9236
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DummyFlow; });
|
|
9189
|
-
/* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
9237
|
+
/* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
|
|
9190
9238
|
/* harmony import */ var _OAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
|
|
9191
9239
|
/*
|
|
9192
9240
|
* BSD 3-Clause License
|
|
@@ -9428,7 +9476,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9428
9476
|
__webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ StateContainer_StateContainer; });
|
|
9429
9477
|
|
|
9430
9478
|
// EXTERNAL MODULE: ./src/storage/StorageManager.js + 3 modules
|
|
9431
|
-
var StorageManager = __webpack_require__(
|
|
9479
|
+
var StorageManager = __webpack_require__(19);
|
|
9432
9480
|
|
|
9433
9481
|
// EXTERNAL MODULE: ./src/utils/StaticClass.js
|
|
9434
9482
|
var StaticClass = __webpack_require__(52);
|
|
@@ -10301,7 +10349,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10301
10349
|
/* harmony import */ var _JobShare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
|
|
10302
10350
|
/* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
|
|
10303
10351
|
/* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
|
|
10304
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
10352
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
|
|
10305
10353
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
|
|
10306
10354
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(0);
|
|
10307
10355
|
/*
|
|
@@ -10782,7 +10830,7 @@ var ValidationError = __webpack_require__(35);
|
|
|
10782
10830
|
*/
|
|
10783
10831
|
class NodeError extends Error {}
|
|
10784
10832
|
// EXTERNAL MODULE: ./src/errors/OAuthError.js
|
|
10785
|
-
var OAuthError = __webpack_require__(
|
|
10833
|
+
var OAuthError = __webpack_require__(17);
|
|
10786
10834
|
|
|
10787
10835
|
// EXTERNAL MODULE: ./src/errors/StaticClassError.js
|
|
10788
10836
|
var StaticClassError = __webpack_require__(34);
|
|
@@ -10840,6 +10888,106 @@ var GeoError = __webpack_require__(31);
|
|
|
10840
10888
|
/* 67 */
|
|
10841
10889
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10842
10890
|
|
|
10891
|
+
"use strict";
|
|
10892
|
+
// ESM COMPAT FLAG
|
|
10893
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10894
|
+
|
|
10895
|
+
// EXPORTS
|
|
10896
|
+
__webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ Message_Message; });
|
|
10897
|
+
|
|
10898
|
+
// EXTERNAL MODULE: ./src/resources/base/CrudBase.js
|
|
10899
|
+
var CrudBase = __webpack_require__(2);
|
|
10900
|
+
|
|
10901
|
+
// EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
|
|
10902
|
+
var ResourceBase = __webpack_require__(6);
|
|
10903
|
+
|
|
10904
|
+
// CONCATENATED MODULE: ./src/resources/MessageVariant.js
|
|
10905
|
+
/*
|
|
10906
|
+
* BSD 3-Clause License
|
|
10907
|
+
*
|
|
10908
|
+
* Copyright (c) 2020, Mapcreator
|
|
10909
|
+
* All rights reserved.
|
|
10910
|
+
*
|
|
10911
|
+
* Redistribution and use in source and binary forms, with or without
|
|
10912
|
+
* modification, are permitted provided that the following conditions are met:
|
|
10913
|
+
*
|
|
10914
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
10915
|
+
* list of conditions and the following disclaimer.
|
|
10916
|
+
*
|
|
10917
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
10918
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
10919
|
+
* and/or other materials provided with the distribution.
|
|
10920
|
+
*
|
|
10921
|
+
* Neither the name of the copyright holder nor the names of its
|
|
10922
|
+
* contributors may be used to endorse or promote products derived from
|
|
10923
|
+
* this software without specific prior written permission.
|
|
10924
|
+
*
|
|
10925
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
10926
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
10927
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
10928
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
10929
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
10930
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
10931
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
10932
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
10933
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
10934
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
10935
|
+
*/
|
|
10936
|
+
|
|
10937
|
+
class MessageVariant_MessageVariant extends ResourceBase["default"] {}
|
|
10938
|
+
// CONCATENATED MODULE: ./src/resources/Message.js
|
|
10939
|
+
/*
|
|
10940
|
+
* BSD 3-Clause License
|
|
10941
|
+
*
|
|
10942
|
+
* Copyright (c) 2020, Mapcreator
|
|
10943
|
+
* All rights reserved.
|
|
10944
|
+
*
|
|
10945
|
+
* Redistribution and use in source and binary forms, with or without
|
|
10946
|
+
* modification, are permitted provided that the following conditions are met:
|
|
10947
|
+
*
|
|
10948
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
10949
|
+
* list of conditions and the following disclaimer.
|
|
10950
|
+
*
|
|
10951
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
10952
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
10953
|
+
* and/or other materials provided with the distribution.
|
|
10954
|
+
*
|
|
10955
|
+
* Neither the name of the copyright holder nor the names of its
|
|
10956
|
+
* contributors may be used to endorse or promote products derived from
|
|
10957
|
+
* this software without specific prior written permission.
|
|
10958
|
+
*
|
|
10959
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
10960
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
10961
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
10962
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
10963
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
10964
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
10965
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
10966
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
10967
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
10968
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
10969
|
+
*/
|
|
10970
|
+
|
|
10971
|
+
|
|
10972
|
+
class Message_Message extends CrudBase["default"] {
|
|
10973
|
+
static get resourceName() {
|
|
10974
|
+
return 'messages';
|
|
10975
|
+
}
|
|
10976
|
+
|
|
10977
|
+
_guessType(name, value) {
|
|
10978
|
+
if (name === 'variants') {
|
|
10979
|
+
return Array.from(value).map(data => new MessageVariant_MessageVariant(this.api, data));
|
|
10980
|
+
}
|
|
10981
|
+
|
|
10982
|
+
return super._guessType(name, value);
|
|
10983
|
+
}
|
|
10984
|
+
|
|
10985
|
+
}
|
|
10986
|
+
|
|
10987
|
+
/***/ }),
|
|
10988
|
+
/* 68 */
|
|
10989
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10990
|
+
|
|
10843
10991
|
"use strict";
|
|
10844
10992
|
__webpack_require__.r(__webpack_exports__);
|
|
10845
10993
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Injectable; });
|
|
@@ -11082,7 +11230,7 @@ class Injectable extends _Trait__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
11082
11230
|
}
|
|
11083
11231
|
|
|
11084
11232
|
/***/ }),
|
|
11085
|
-
/*
|
|
11233
|
+
/* 69 */
|
|
11086
11234
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
11087
11235
|
|
|
11088
11236
|
"use strict";
|
|
@@ -11108,7 +11256,7 @@ var ResourceBase = __webpack_require__(6);
|
|
|
11108
11256
|
var reflection = __webpack_require__(1);
|
|
11109
11257
|
|
|
11110
11258
|
// EXTERNAL MODULE: ./src/utils/requests.js
|
|
11111
|
-
var requests = __webpack_require__(
|
|
11259
|
+
var requests = __webpack_require__(5);
|
|
11112
11260
|
|
|
11113
11261
|
// EXTERNAL MODULE: ./src/utils/helpers.js
|
|
11114
11262
|
var helpers = __webpack_require__(0);
|
|
@@ -11310,7 +11458,7 @@ class HandlesImages_HandlesImages extends Trait["default"] {
|
|
|
11310
11458
|
}
|
|
11311
11459
|
|
|
11312
11460
|
/***/ }),
|
|
11313
|
-
/*
|
|
11461
|
+
/* 70 */
|
|
11314
11462
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
11315
11463
|
|
|
11316
11464
|
"use strict";
|
|
@@ -11386,15 +11534,6 @@ class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__["defaul
|
|
|
11386
11534
|
|
|
11387
11535
|
this._path = value;
|
|
11388
11536
|
}
|
|
11389
|
-
|
|
11390
|
-
get realPath() {
|
|
11391
|
-
if (this.path.startsWith('/')) {
|
|
11392
|
-
return this.path;
|
|
11393
|
-
} // eslint-disable-next-line no-undef
|
|
11394
|
-
|
|
11395
|
-
|
|
11396
|
-
return this._fs.realpathSync(this.path);
|
|
11397
|
-
}
|
|
11398
11537
|
/**
|
|
11399
11538
|
* @inheritDoc
|
|
11400
11539
|
*/
|
|
@@ -11470,7 +11609,7 @@ class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__["defaul
|
|
|
11470
11609
|
let data;
|
|
11471
11610
|
|
|
11472
11611
|
try {
|
|
11473
|
-
data = this._fs.readFileSync(this.
|
|
11612
|
+
data = this._fs.readFileSync(this.path).toString();
|
|
11474
11613
|
} catch (e) {
|
|
11475
11614
|
data = '{}';
|
|
11476
11615
|
}
|
|
@@ -11491,7 +11630,7 @@ class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__["defaul
|
|
|
11491
11630
|
_write(obj) {
|
|
11492
11631
|
const data = JSON.stringify(obj);
|
|
11493
11632
|
|
|
11494
|
-
const fd = this._fs.openSync(this.
|
|
11633
|
+
const fd = this._fs.openSync(this.path, 'w');
|
|
11495
11634
|
|
|
11496
11635
|
this._fs.writeSync(fd, data);
|
|
11497
11636
|
|
|
@@ -11516,19 +11655,19 @@ class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__["defaul
|
|
|
11516
11655
|
}
|
|
11517
11656
|
|
|
11518
11657
|
/***/ }),
|
|
11519
|
-
/*
|
|
11658
|
+
/* 71 */
|
|
11520
11659
|
/***/ (function(module, exports) {
|
|
11521
11660
|
|
|
11522
11661
|
module.exports = require("json-stable-stringify");
|
|
11523
11662
|
|
|
11524
11663
|
/***/ }),
|
|
11525
|
-
/*
|
|
11664
|
+
/* 72 */
|
|
11526
11665
|
/***/ (function(module, exports) {
|
|
11527
11666
|
|
|
11528
11667
|
module.exports = require("form-data");
|
|
11529
11668
|
|
|
11530
11669
|
/***/ }),
|
|
11531
|
-
/*
|
|
11670
|
+
/* 73 */
|
|
11532
11671
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
11533
11672
|
|
|
11534
11673
|
"use strict";
|
|
@@ -11578,7 +11717,7 @@ var Mapcreator = __webpack_require__(24);
|
|
|
11578
11717
|
var RequestParameters = __webpack_require__(3);
|
|
11579
11718
|
|
|
11580
11719
|
// EXTERNAL MODULE: ./src/storage/StorageManager.js + 3 modules
|
|
11581
|
-
var StorageManager = __webpack_require__(
|
|
11720
|
+
var StorageManager = __webpack_require__(19);
|
|
11582
11721
|
|
|
11583
11722
|
// EXTERNAL MODULE: ./src/enums/Enum.js + 1 modules
|
|
11584
11723
|
var Enum = __webpack_require__(22);
|
|
@@ -11596,10 +11735,10 @@ var OAuthToken = __webpack_require__(15);
|
|
|
11596
11735
|
var StateContainer = __webpack_require__(57);
|
|
11597
11736
|
|
|
11598
11737
|
// EXTERNAL MODULE: ./src/utils/requests.js
|
|
11599
|
-
var requests = __webpack_require__(
|
|
11738
|
+
var requests = __webpack_require__(5);
|
|
11600
11739
|
|
|
11601
11740
|
// EXTERNAL MODULE: ./src/errors/OAuthError.js
|
|
11602
|
-
var OAuthError = __webpack_require__(
|
|
11741
|
+
var OAuthError = __webpack_require__(17);
|
|
11603
11742
|
|
|
11604
11743
|
// EXTERNAL MODULE: ./src/utils/node.js
|
|
11605
11744
|
var node = __webpack_require__(13);
|
|
@@ -11818,16 +11957,17 @@ class ImplicitFlow_ImplicitFlow extends OAuth["default"] {
|
|
|
11818
11957
|
|
|
11819
11958
|
|
|
11820
11959
|
_getError() {
|
|
11821
|
-
var _params$message;
|
|
11822
|
-
|
|
11823
11960
|
if (!this._anchorContainsError()) {
|
|
11824
11961
|
throw Error('No OAuthError found in anchor');
|
|
11825
11962
|
}
|
|
11826
11963
|
|
|
11827
11964
|
const params = this._getAnchorParams();
|
|
11828
11965
|
|
|
11829
|
-
|
|
11830
|
-
|
|
11966
|
+
if (params.message) {
|
|
11967
|
+
return new OAuthError["default"](params.error, params.message);
|
|
11968
|
+
}
|
|
11969
|
+
|
|
11970
|
+
return new OAuthError["default"](params.error, Object(external_case_["title"])(params.error));
|
|
11831
11971
|
}
|
|
11832
11972
|
|
|
11833
11973
|
}
|
|
@@ -12142,7 +12282,7 @@ var ValidationError = __webpack_require__(35);
|
|
|
12142
12282
|
var StaticClassError = __webpack_require__(34);
|
|
12143
12283
|
|
|
12144
12284
|
// EXTERNAL MODULE: ./src/resources/index.js + 7 modules
|
|
12145
|
-
var resources = __webpack_require__(
|
|
12285
|
+
var resources = __webpack_require__(4);
|
|
12146
12286
|
|
|
12147
12287
|
// EXTERNAL MODULE: ./src/ResourceLister.js
|
|
12148
12288
|
var ResourceLister = __webpack_require__(58);
|
|
@@ -12295,7 +12435,7 @@ var SimpleResourceProxy = __webpack_require__(16);
|
|
|
12295
12435
|
* @private
|
|
12296
12436
|
*/
|
|
12297
12437
|
|
|
12298
|
-
const version = "v2.
|
|
12438
|
+
const version = "v2.5.0";
|
|
12299
12439
|
|
|
12300
12440
|
/***/ })
|
|
12301
12441
|
/******/ ]);
|