@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.browser.js
CHANGED
|
@@ -29,11 +29,11 @@
|
|
|
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:bf23c2b775a8f4d957ed, chunkhash:01d89a6a3a7a3361ab1b, name:bundle.browser, version:v2.5.0
|
|
33
33
|
*/
|
|
34
34
|
/*!
|
|
35
35
|
* This bundle contains the following packages:
|
|
36
|
-
* └─ @mapcreator/api (2.
|
|
36
|
+
* └─ @mapcreator/api (2.5.0) ── BSD 3-clause "New" or "Revised" License (http://www.opensource.org/licenses/BSD-3-Clause) ── package.json
|
|
37
37
|
* ├─ @babel/runtime (7.10.2) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/@babel/runtime/package.json
|
|
38
38
|
* │ └─ regenerator-runtime (0.13.5) ── MIT License (http://www.opensource.org/licenses/MIT) ── node_modules/@babel/runtime ~ regenerator-runtime/package.json
|
|
39
39
|
* ├─ case (1.6.3) ── mit or gpl 3.0 or later ── node_modules/case/package.json
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
else if(typeof define === 'function' && define.amd)
|
|
62
62
|
define([], factory);
|
|
63
63
|
else if(typeof exports === 'object')
|
|
64
|
-
exports["
|
|
64
|
+
exports["mapcreator"] = factory();
|
|
65
65
|
else
|
|
66
|
-
root["
|
|
66
|
+
root["mapcreator"] = factory();
|
|
67
67
|
})(window, function() {
|
|
68
68
|
return /******/ (function(modules) { // webpackBootstrap
|
|
69
69
|
/******/ // The module cache
|
|
@@ -148,7 +148,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
148
148
|
/******/
|
|
149
149
|
/******/
|
|
150
150
|
/******/ // Load entry module and return exports
|
|
151
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
151
|
+
/******/ return __webpack_require__(__webpack_require__.s = 76);
|
|
152
152
|
/******/ })
|
|
153
153
|
/************************************************************************/
|
|
154
154
|
/******/ ([
|
|
@@ -162,6 +162,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
162
162
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapKyCancelable", function() { return wrapKyCancelable; });
|
|
163
163
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeCancelable", function() { return makeCancelable; });
|
|
164
164
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serializeUTCDate", function() { return serializeUTCDate; });
|
|
165
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return clone; });
|
|
165
166
|
/*
|
|
166
167
|
* BSD 3-Clause License
|
|
167
168
|
*
|
|
@@ -308,6 +309,27 @@ function serializeUTCDate(date) {
|
|
|
308
309
|
out += ` ${[date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds()].map(pad).join(':')}`;
|
|
309
310
|
return out;
|
|
310
311
|
}
|
|
312
|
+
function clone(input, clonePrivate = true) {
|
|
313
|
+
const _clone = value => clone(value, clonePrivate);
|
|
314
|
+
|
|
315
|
+
if (typeof input !== 'object' || input === null) {
|
|
316
|
+
return input;
|
|
317
|
+
} else if (Array.isArray(input)) {
|
|
318
|
+
return input.map(_clone);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const output = {};
|
|
322
|
+
|
|
323
|
+
for (const key of Object.keys(input)) {
|
|
324
|
+
if (!clonePrivate && key.startsWith('_')) {
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
output[key] = _clone(input[key]);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return output;
|
|
332
|
+
}
|
|
311
333
|
|
|
312
334
|
/***/ }),
|
|
313
335
|
/* 1 */
|
|
@@ -724,7 +746,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
724
746
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
|
|
725
747
|
/* harmony import */ var _utils_hash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29);
|
|
726
748
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
|
|
727
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
749
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
|
|
728
750
|
/*
|
|
729
751
|
* BSD 3-Clause License
|
|
730
752
|
*
|
|
@@ -1451,133 +1473,6 @@ class RequestParameters extends events__WEBPACK_IMPORTED_MODULE_1__["EventEmitte
|
|
|
1451
1473
|
/* 4 */
|
|
1452
1474
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1453
1475
|
|
|
1454
|
-
"use strict";
|
|
1455
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1456
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormData", function() { return FormData; });
|
|
1457
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeQueryString", function() { return encodeQueryString; });
|
|
1458
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapKyPrefixUrl", function() { return wrapKyPrefixUrl; });
|
|
1459
|
-
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
|
|
1460
|
-
/*
|
|
1461
|
-
* BSD 3-Clause License
|
|
1462
|
-
*
|
|
1463
|
-
* Copyright (c) 2020, Mapcreator
|
|
1464
|
-
* All rights reserved.
|
|
1465
|
-
*
|
|
1466
|
-
* Redistribution and use in source and binary forms, with or without
|
|
1467
|
-
* modification, are permitted provided that the following conditions are met:
|
|
1468
|
-
*
|
|
1469
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
1470
|
-
* list of conditions and the following disclaimer.
|
|
1471
|
-
*
|
|
1472
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
1473
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
1474
|
-
* and/or other materials provided with the distribution.
|
|
1475
|
-
*
|
|
1476
|
-
* Neither the name of the copyright holder nor the names of its
|
|
1477
|
-
* contributors may be used to endorse or promote products derived from
|
|
1478
|
-
* this software without specific prior written permission.
|
|
1479
|
-
*
|
|
1480
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
1481
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
1482
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
1483
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
1484
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
1485
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
1486
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
1487
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
1488
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
1489
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1490
|
-
*/
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
function getFormData() {
|
|
1494
|
-
if (Object(_node__WEBPACK_IMPORTED_MODULE_0__["windowTest"])('FormData')) {
|
|
1495
|
-
return window.FormData;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
return __webpack_require__(74);
|
|
1499
|
-
}
|
|
1500
|
-
/**
|
|
1501
|
-
* @private
|
|
1502
|
-
*/
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
const FormData = getFormData();
|
|
1506
|
-
/**
|
|
1507
|
-
* Encodes an object to a http query string with support for recursion
|
|
1508
|
-
* @param {Object<string, *>} paramsObject - data to be encoded
|
|
1509
|
-
* @param {Array<string>} _basePrefix - Used internally for tracking recursion
|
|
1510
|
-
* @returns {string} - encoded http query string
|
|
1511
|
-
*
|
|
1512
|
-
* @see http://stackoverflow.com/a/39828481
|
|
1513
|
-
* @private
|
|
1514
|
-
*/
|
|
1515
|
-
|
|
1516
|
-
function _encodeQueryString(paramsObject, _basePrefix = []) {
|
|
1517
|
-
return Object.keys(paramsObject).sort().map(key => {
|
|
1518
|
-
const prefix = _basePrefix.slice(0);
|
|
1519
|
-
|
|
1520
|
-
if (typeof paramsObject[key] === 'object' && paramsObject[key] !== null) {
|
|
1521
|
-
prefix.push(key);
|
|
1522
|
-
return _encodeQueryString(paramsObject[key], prefix);
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
prefix.push(key);
|
|
1526
|
-
let out = '';
|
|
1527
|
-
out += encodeURIComponent(prefix.shift()); // main key
|
|
1528
|
-
|
|
1529
|
-
out += prefix.map(item => `[${encodeURIComponent(item)}]`).join(''); // optional array keys
|
|
1530
|
-
|
|
1531
|
-
const value = paramsObject[key];
|
|
1532
|
-
|
|
1533
|
-
if (value !== null && typeof value !== 'undefined') {
|
|
1534
|
-
out += `=${encodeURIComponent(value)}`; // value
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
return out;
|
|
1538
|
-
}).join('&');
|
|
1539
|
-
}
|
|
1540
|
-
/**
|
|
1541
|
-
* Encodes an object to a http query string with support for recursion
|
|
1542
|
-
* @param {object<string, *>} paramsObject - data to be encoded
|
|
1543
|
-
* @returns {string} - encoded http query string
|
|
1544
|
-
*
|
|
1545
|
-
* @private
|
|
1546
|
-
*/
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
function encodeQueryString(paramsObject) {
|
|
1550
|
-
const query = _encodeQueryString(paramsObject); // Removes any extra unused &'s.
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
return query.replace(/^&*|&+(?=&)|&*$/g, '');
|
|
1554
|
-
}
|
|
1555
|
-
/**
|
|
1556
|
-
* Wraps around ky to ensure that the prefix is correctly set
|
|
1557
|
-
* @param {function(*=, *=): Response} fn - ky instance
|
|
1558
|
-
* @param {string} baseUrl - url to be prefixed
|
|
1559
|
-
* @returns {function(*=, *=): Response}
|
|
1560
|
-
* @private
|
|
1561
|
-
*/
|
|
1562
|
-
|
|
1563
|
-
function wrapKyPrefixUrl(fn, baseUrl) {
|
|
1564
|
-
return function (input, options) {
|
|
1565
|
-
if (typeof input === 'string' && !/^https?:\/\//.test(input)) {
|
|
1566
|
-
if (!input.startsWith('/')) {
|
|
1567
|
-
input = `/${input}`;
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
input = baseUrl + input;
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
return fn(input, options);
|
|
1574
|
-
};
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
/***/ }),
|
|
1578
|
-
/* 5 */
|
|
1579
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1580
|
-
|
|
1581
1476
|
"use strict";
|
|
1582
1477
|
// ESM COMPAT FLAG
|
|
1583
1478
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -1604,6 +1499,7 @@ __webpack_require__.d(__webpack_exports__, "Language", function() { return /* re
|
|
|
1604
1499
|
__webpack_require__.d(__webpack_exports__, "Layer", function() { return /* reexport */ Layer["default"]; });
|
|
1605
1500
|
__webpack_require__.d(__webpack_exports__, "Mapstyle", function() { return /* reexport */ Mapstyle["default"]; });
|
|
1606
1501
|
__webpack_require__.d(__webpack_exports__, "MapstyleSet", function() { return /* reexport */ MapstyleSet["default"]; });
|
|
1502
|
+
__webpack_require__.d(__webpack_exports__, "Message", function() { return /* reexport */ Message["default"]; });
|
|
1607
1503
|
__webpack_require__.d(__webpack_exports__, "Notification", function() { return /* reexport */ Notification["default"]; });
|
|
1608
1504
|
__webpack_require__.d(__webpack_exports__, "Organisation", function() { return /* reexport */ Organisation["default"]; });
|
|
1609
1505
|
__webpack_require__.d(__webpack_exports__, "Permission", function() { return /* reexport */ Permission["default"]; });
|
|
@@ -1886,6 +1782,9 @@ var Mapstyle = __webpack_require__(44);
|
|
|
1886
1782
|
// EXTERNAL MODULE: ./src/resources/MapstyleSet.js + 1 modules
|
|
1887
1783
|
var MapstyleSet = __webpack_require__(50);
|
|
1888
1784
|
|
|
1785
|
+
// EXTERNAL MODULE: ./src/resources/Message.js + 1 modules
|
|
1786
|
+
var Message = __webpack_require__(67);
|
|
1787
|
+
|
|
1889
1788
|
// EXTERNAL MODULE: ./src/resources/Notification.js
|
|
1890
1789
|
var Notification = __webpack_require__(64);
|
|
1891
1790
|
|
|
@@ -2145,6 +2044,8 @@ var CrudSetBase = __webpack_require__(25);
|
|
|
2145
2044
|
|
|
2146
2045
|
|
|
2147
2046
|
|
|
2047
|
+
|
|
2048
|
+
|
|
2148
2049
|
|
|
2149
2050
|
|
|
2150
2051
|
|
|
@@ -2158,6 +2059,133 @@ const base = {
|
|
|
2158
2059
|
ResourceBase: ResourceBase["default"]
|
|
2159
2060
|
};
|
|
2160
2061
|
|
|
2062
|
+
/***/ }),
|
|
2063
|
+
/* 5 */
|
|
2064
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2065
|
+
|
|
2066
|
+
"use strict";
|
|
2067
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2068
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormData", function() { return FormData; });
|
|
2069
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeQueryString", function() { return encodeQueryString; });
|
|
2070
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapKyPrefixUrl", function() { return wrapKyPrefixUrl; });
|
|
2071
|
+
/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
|
|
2072
|
+
/*
|
|
2073
|
+
* BSD 3-Clause License
|
|
2074
|
+
*
|
|
2075
|
+
* Copyright (c) 2020, Mapcreator
|
|
2076
|
+
* All rights reserved.
|
|
2077
|
+
*
|
|
2078
|
+
* Redistribution and use in source and binary forms, with or without
|
|
2079
|
+
* modification, are permitted provided that the following conditions are met:
|
|
2080
|
+
*
|
|
2081
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
2082
|
+
* list of conditions and the following disclaimer.
|
|
2083
|
+
*
|
|
2084
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
2085
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
2086
|
+
* and/or other materials provided with the distribution.
|
|
2087
|
+
*
|
|
2088
|
+
* Neither the name of the copyright holder nor the names of its
|
|
2089
|
+
* contributors may be used to endorse or promote products derived from
|
|
2090
|
+
* this software without specific prior written permission.
|
|
2091
|
+
*
|
|
2092
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
2093
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
2094
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
2095
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
2096
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
2097
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
2098
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
2099
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
2100
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
2101
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
2102
|
+
*/
|
|
2103
|
+
|
|
2104
|
+
|
|
2105
|
+
function getFormData() {
|
|
2106
|
+
if (Object(_node__WEBPACK_IMPORTED_MODULE_0__["windowTest"])('FormData')) {
|
|
2107
|
+
return window.FormData;
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
return __webpack_require__(75);
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* @private
|
|
2114
|
+
*/
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
const FormData = getFormData();
|
|
2118
|
+
/**
|
|
2119
|
+
* Encodes an object to a http query string with support for recursion
|
|
2120
|
+
* @param {Object<string, *>} paramsObject - data to be encoded
|
|
2121
|
+
* @param {Array<string>} _basePrefix - Used internally for tracking recursion
|
|
2122
|
+
* @returns {string} - encoded http query string
|
|
2123
|
+
*
|
|
2124
|
+
* @see http://stackoverflow.com/a/39828481
|
|
2125
|
+
* @private
|
|
2126
|
+
*/
|
|
2127
|
+
|
|
2128
|
+
function _encodeQueryString(paramsObject, _basePrefix = []) {
|
|
2129
|
+
return Object.keys(paramsObject).sort().map(key => {
|
|
2130
|
+
const prefix = _basePrefix.slice(0);
|
|
2131
|
+
|
|
2132
|
+
if (typeof paramsObject[key] === 'object' && paramsObject[key] !== null) {
|
|
2133
|
+
prefix.push(key);
|
|
2134
|
+
return _encodeQueryString(paramsObject[key], prefix);
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
prefix.push(key);
|
|
2138
|
+
let out = '';
|
|
2139
|
+
out += encodeURIComponent(prefix.shift()); // main key
|
|
2140
|
+
|
|
2141
|
+
out += prefix.map(item => `[${encodeURIComponent(item)}]`).join(''); // optional array keys
|
|
2142
|
+
|
|
2143
|
+
const value = paramsObject[key];
|
|
2144
|
+
|
|
2145
|
+
if (value !== null && typeof value !== 'undefined') {
|
|
2146
|
+
out += `=${encodeURIComponent(value)}`; // value
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
return out;
|
|
2150
|
+
}).join('&');
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* Encodes an object to a http query string with support for recursion
|
|
2154
|
+
* @param {object<string, *>} paramsObject - data to be encoded
|
|
2155
|
+
* @returns {string} - encoded http query string
|
|
2156
|
+
*
|
|
2157
|
+
* @private
|
|
2158
|
+
*/
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
function encodeQueryString(paramsObject) {
|
|
2162
|
+
const query = _encodeQueryString(paramsObject); // Removes any extra unused &'s.
|
|
2163
|
+
|
|
2164
|
+
|
|
2165
|
+
return query.replace(/^&*|&+(?=&)|&*$/g, '');
|
|
2166
|
+
}
|
|
2167
|
+
/**
|
|
2168
|
+
* Wraps around ky to ensure that the prefix is correctly set
|
|
2169
|
+
* @param {function(*=, *=): Response} fn - ky instance
|
|
2170
|
+
* @param {string} baseUrl - url to be prefixed
|
|
2171
|
+
* @returns {function(*=, *=): Response}
|
|
2172
|
+
* @private
|
|
2173
|
+
*/
|
|
2174
|
+
|
|
2175
|
+
function wrapKyPrefixUrl(fn, baseUrl) {
|
|
2176
|
+
return function (input, options) {
|
|
2177
|
+
if (typeof input === 'string' && !/^https?:\/\//.test(input)) {
|
|
2178
|
+
if (!input.startsWith('/')) {
|
|
2179
|
+
input = `/${input}`;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
input = baseUrl + input;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
return fn(input, options);
|
|
2186
|
+
};
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2161
2189
|
/***/ }),
|
|
2162
2190
|
/* 6 */
|
|
2163
2191
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
@@ -2170,7 +2198,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2170
2198
|
/* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
|
|
2171
2199
|
/* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
|
|
2172
2200
|
/* harmony import */ var _proxy_SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
|
|
2173
|
-
/* harmony import */ var _traits_Injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
2201
|
+
/* harmony import */ var _traits_Injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68);
|
|
2174
2202
|
/* harmony import */ var _utils_hash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29);
|
|
2175
2203
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
|
|
2176
2204
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
|
|
@@ -2237,8 +2265,7 @@ class ResourceBase extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_6__
|
|
|
2237
2265
|
|
|
2238
2266
|
this.api = api; // De-reference
|
|
2239
2267
|
|
|
2240
|
-
data =
|
|
2241
|
-
}; // Normalize keys to snake_case
|
|
2268
|
+
data = Object(_utils_helpers__WEBPACK_IMPORTED_MODULE_7__["clone"])(data); // Normalize keys to snake_case
|
|
2242
2269
|
// Fix data types
|
|
2243
2270
|
|
|
2244
2271
|
for (const key of Object.keys(data)) {
|
|
@@ -2249,7 +2276,7 @@ class ResourceBase extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_6__
|
|
|
2249
2276
|
continue;
|
|
2250
2277
|
}
|
|
2251
2278
|
|
|
2252
|
-
data[newKey] = this.
|
|
2279
|
+
data[newKey] = this._guessType(newKey, data[key]);
|
|
2253
2280
|
|
|
2254
2281
|
if (newKey !== key) {
|
|
2255
2282
|
delete data[key];
|
|
@@ -2478,7 +2505,7 @@ class ResourceBase extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_6__
|
|
|
2478
2505
|
|
|
2479
2506
|
if (!this.constructor.protectedFields.includes(key) && !this.constructor.readonly) {
|
|
2480
2507
|
desc.set = val => {
|
|
2481
|
-
this._properties[key] =
|
|
2508
|
+
this._properties[key] = this._guessType(key, val);
|
|
2482
2509
|
delete this._url; // Clears url cache
|
|
2483
2510
|
};
|
|
2484
2511
|
}
|
|
@@ -2490,12 +2517,12 @@ class ResourceBase extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_6__
|
|
|
2490
2517
|
* Guess type based on property name
|
|
2491
2518
|
* @param {string} name - Field name
|
|
2492
2519
|
* @param {*} value - Field Value
|
|
2493
|
-
* @
|
|
2520
|
+
* @protected
|
|
2494
2521
|
* @returns {*} - Original or converted value
|
|
2495
2522
|
*/
|
|
2496
2523
|
|
|
2497
2524
|
|
|
2498
|
-
|
|
2525
|
+
_guessType(name, value) {
|
|
2499
2526
|
if (name.endsWith('_at') || name.startsWith('date_')) {
|
|
2500
2527
|
return typeof value === 'string' ? new Date(value.replace(' ', 'T')) : value;
|
|
2501
2528
|
} else if (/(_|^)id$/.test(name) && value !== null) {
|
|
@@ -3434,7 +3461,7 @@ function windowTest(str) {
|
|
|
3434
3461
|
"use strict";
|
|
3435
3462
|
__webpack_require__.r(__webpack_exports__);
|
|
3436
3463
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ResourceProxy; });
|
|
3437
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3464
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
|
|
3438
3465
|
/* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
|
|
3439
3466
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
|
|
3440
3467
|
/*
|
|
@@ -3559,8 +3586,8 @@ class ResourceProxy extends _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__["d
|
|
|
3559
3586
|
"use strict";
|
|
3560
3587
|
__webpack_require__.r(__webpack_exports__);
|
|
3561
3588
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return OAuthToken; });
|
|
3562
|
-
/* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3563
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3589
|
+
/* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
|
|
3590
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
|
|
3564
3591
|
/*
|
|
3565
3592
|
* BSD 3-Clause License
|
|
3566
3593
|
*
|
|
@@ -4259,31 +4286,117 @@ class SimpleResourceProxy_SimpleResourceProxy {
|
|
|
4259
4286
|
// }
|
|
4260
4287
|
|
|
4261
4288
|
|
|
4262
|
-
_buildResolver(params = {}) {
|
|
4263
|
-
const paramType = typeof params;
|
|
4264
|
-
const url = this.baseUrl;
|
|
4289
|
+
_buildResolver(params = {}) {
|
|
4290
|
+
const paramType = typeof params;
|
|
4291
|
+
const url = this.baseUrl;
|
|
4292
|
+
|
|
4293
|
+
if (!['number', 'object'].includes(paramType)) {
|
|
4294
|
+
throw new TypeError(`Expected params to be of type number or object. Got "${paramType}"`);
|
|
4295
|
+
}
|
|
4296
|
+
|
|
4297
|
+
if (paramType === 'number') {
|
|
4298
|
+
return this._buildResolver({
|
|
4299
|
+
page: params
|
|
4300
|
+
});
|
|
4301
|
+
}
|
|
4302
|
+
|
|
4303
|
+
if (!(params instanceof RequestParameters["default"])) {
|
|
4304
|
+
params = new RequestParameters["default"](params);
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4307
|
+
return new PaginatedResourceListing_PaginatedResourceListing(this._api, url, this.Target, params);
|
|
4308
|
+
}
|
|
4309
|
+
|
|
4310
|
+
}
|
|
4311
|
+
|
|
4312
|
+
/***/ }),
|
|
4313
|
+
/* 17 */
|
|
4314
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4315
|
+
|
|
4316
|
+
"use strict";
|
|
4317
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4318
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return OAuthError; });
|
|
4319
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
|
|
4320
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
4321
|
+
|
|
4322
|
+
|
|
4323
|
+
/*
|
|
4324
|
+
* BSD 3-Clause License
|
|
4325
|
+
*
|
|
4326
|
+
* Copyright (c) 2020, Mapcreator
|
|
4327
|
+
* All rights reserved.
|
|
4328
|
+
*
|
|
4329
|
+
* Redistribution and use in source and binary forms, with or without
|
|
4330
|
+
* modification, are permitted provided that the following conditions are met:
|
|
4331
|
+
*
|
|
4332
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
4333
|
+
* list of conditions and the following disclaimer.
|
|
4334
|
+
*
|
|
4335
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
4336
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
4337
|
+
* and/or other materials provided with the distribution.
|
|
4338
|
+
*
|
|
4339
|
+
* Neither the name of the copyright holder nor the names of its
|
|
4340
|
+
* contributors may be used to endorse or promote products derived from
|
|
4341
|
+
* this software without specific prior written permission.
|
|
4342
|
+
*
|
|
4343
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
4344
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
4345
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
4346
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
4347
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
4348
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
4349
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
4350
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
4351
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
4352
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
4353
|
+
*/
|
|
4354
|
+
|
|
4355
|
+
/**
|
|
4356
|
+
* OAuth error
|
|
4357
|
+
*/
|
|
4358
|
+
class OAuthError extends Error {
|
|
4359
|
+
/**
|
|
4360
|
+
* OAuth error code
|
|
4361
|
+
* @type {String}
|
|
4362
|
+
*/
|
|
4363
|
+
|
|
4364
|
+
/**
|
|
4365
|
+
* OAuth error response
|
|
4366
|
+
* @param {String} error - OAuth error key
|
|
4367
|
+
* @param {String} message - OAuth error message
|
|
4368
|
+
*/
|
|
4369
|
+
constructor(error, message = '') {
|
|
4370
|
+
super(message);
|
|
4371
|
+
|
|
4372
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "error", void 0);
|
|
4265
4373
|
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4374
|
+
this.error = String(error);
|
|
4375
|
+
}
|
|
4376
|
+
/**
|
|
4377
|
+
* Displayable error string
|
|
4378
|
+
* @returns {String} - error
|
|
4379
|
+
*/
|
|
4269
4380
|
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4381
|
+
|
|
4382
|
+
toString() {
|
|
4383
|
+
let error = this.error;
|
|
4384
|
+
|
|
4385
|
+
if (error.includes('_')) {
|
|
4386
|
+
error = error.replace('_', ' ').replace(/^./, x => x.toUpperCase());
|
|
4274
4387
|
}
|
|
4275
4388
|
|
|
4276
|
-
if (
|
|
4277
|
-
|
|
4389
|
+
if (this.message) {
|
|
4390
|
+
return `${error}: ${this.message}`;
|
|
4278
4391
|
}
|
|
4279
4392
|
|
|
4280
|
-
return
|
|
4393
|
+
return error;
|
|
4281
4394
|
}
|
|
4282
4395
|
|
|
4283
4396
|
}
|
|
4284
4397
|
|
|
4285
4398
|
/***/ }),
|
|
4286
|
-
/*
|
|
4399
|
+
/* 18 */
|
|
4287
4400
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4288
4401
|
|
|
4289
4402
|
"use strict";
|
|
@@ -4376,7 +4489,7 @@ class CrudSetItemBase extends _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
|
4376
4489
|
}
|
|
4377
4490
|
|
|
4378
4491
|
/***/ }),
|
|
4379
|
-
/*
|
|
4492
|
+
/* 19 */
|
|
4380
4493
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4381
4494
|
|
|
4382
4495
|
"use strict";
|
|
@@ -4635,7 +4748,7 @@ class DummyDriver_DummyDriver extends DataStoreContract["default"] {
|
|
|
4635
4748
|
|
|
4636
4749
|
defineProperty_default()(DummyDriver_DummyDriver, "_data", {});
|
|
4637
4750
|
// EXTERNAL MODULE: ./src/storage/FileDriver.js
|
|
4638
|
-
var FileDriver = __webpack_require__(
|
|
4751
|
+
var FileDriver = __webpack_require__(70);
|
|
4639
4752
|
|
|
4640
4753
|
// CONCATENATED MODULE: ./src/storage/LocalStorageDriver.js
|
|
4641
4754
|
/*
|
|
@@ -4860,92 +4973,6 @@ class StorageManager_StorageManager extends StaticClass["default"] {
|
|
|
4860
4973
|
|
|
4861
4974
|
}
|
|
4862
4975
|
|
|
4863
|
-
/***/ }),
|
|
4864
|
-
/* 19 */
|
|
4865
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
4866
|
-
|
|
4867
|
-
"use strict";
|
|
4868
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4869
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return OAuthError; });
|
|
4870
|
-
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
|
|
4871
|
-
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
/*
|
|
4875
|
-
* BSD 3-Clause License
|
|
4876
|
-
*
|
|
4877
|
-
* Copyright (c) 2020, Mapcreator
|
|
4878
|
-
* All rights reserved.
|
|
4879
|
-
*
|
|
4880
|
-
* Redistribution and use in source and binary forms, with or without
|
|
4881
|
-
* modification, are permitted provided that the following conditions are met:
|
|
4882
|
-
*
|
|
4883
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
4884
|
-
* list of conditions and the following disclaimer.
|
|
4885
|
-
*
|
|
4886
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
4887
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
4888
|
-
* and/or other materials provided with the distribution.
|
|
4889
|
-
*
|
|
4890
|
-
* Neither the name of the copyright holder nor the names of its
|
|
4891
|
-
* contributors may be used to endorse or promote products derived from
|
|
4892
|
-
* this software without specific prior written permission.
|
|
4893
|
-
*
|
|
4894
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
4895
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
4896
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
4897
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
4898
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
4899
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
4900
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
4901
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
4902
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
4903
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
4904
|
-
*/
|
|
4905
|
-
|
|
4906
|
-
/**
|
|
4907
|
-
* OAuth error
|
|
4908
|
-
*/
|
|
4909
|
-
class OAuthError extends Error {
|
|
4910
|
-
/**
|
|
4911
|
-
* OAuth error code
|
|
4912
|
-
* @type {String}
|
|
4913
|
-
*/
|
|
4914
|
-
|
|
4915
|
-
/**
|
|
4916
|
-
* OAuth error response
|
|
4917
|
-
* @param {String} error - OAuth error key
|
|
4918
|
-
* @param {String} message - OAuth error message
|
|
4919
|
-
*/
|
|
4920
|
-
constructor(error, message = '') {
|
|
4921
|
-
super(message);
|
|
4922
|
-
|
|
4923
|
-
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "error", void 0);
|
|
4924
|
-
|
|
4925
|
-
this.error = String(error);
|
|
4926
|
-
}
|
|
4927
|
-
/**
|
|
4928
|
-
* Displayable error string
|
|
4929
|
-
* @returns {String} - error
|
|
4930
|
-
*/
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
toString() {
|
|
4934
|
-
let error = this.error;
|
|
4935
|
-
|
|
4936
|
-
if (error.includes('_')) {
|
|
4937
|
-
error = error.replace('_', ' ').replace(/^./, x => x.toUpperCase());
|
|
4938
|
-
}
|
|
4939
|
-
|
|
4940
|
-
if (this.message) {
|
|
4941
|
-
return `${error}: ${this.message}`;
|
|
4942
|
-
}
|
|
4943
|
-
|
|
4944
|
-
return error;
|
|
4945
|
-
}
|
|
4946
|
-
|
|
4947
|
-
}
|
|
4948
|
-
|
|
4949
4976
|
/***/ }),
|
|
4950
4977
|
/* 20 */
|
|
4951
4978
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
@@ -5509,7 +5536,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5509
5536
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
5510
5537
|
/* harmony import */ var ky_universal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(53);
|
|
5511
5538
|
/* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
|
|
5512
|
-
/* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
5539
|
+
/* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
|
|
5513
5540
|
/* harmony import */ var _OAuthToken__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15);
|
|
5514
5541
|
/* harmony import */ var _StateContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(57);
|
|
5515
5542
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
|
|
@@ -5567,7 +5594,7 @@ class OAuth {
|
|
|
5567
5594
|
|
|
5568
5595
|
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "path", '/');
|
|
5569
5596
|
|
|
5570
|
-
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "host", "https://api.
|
|
5597
|
+
_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(this, "host", "https://api.mapcreator.io");
|
|
5571
5598
|
|
|
5572
5599
|
if (this.constructor === OAuth) {
|
|
5573
5600
|
throw new _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__["AbstractClassError"]();
|
|
@@ -5687,13 +5714,13 @@ var ResourceProxy = __webpack_require__(14);
|
|
|
5687
5714
|
var SimpleResourceProxy = __webpack_require__(16);
|
|
5688
5715
|
|
|
5689
5716
|
// EXTERNAL MODULE: ./src/resources/index.js + 7 modules
|
|
5690
|
-
var resources = __webpack_require__(
|
|
5717
|
+
var resources = __webpack_require__(4);
|
|
5691
5718
|
|
|
5692
5719
|
// EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
|
|
5693
5720
|
var ResourceBase = __webpack_require__(6);
|
|
5694
5721
|
|
|
5695
5722
|
// EXTERNAL MODULE: ./src/traits/Injectable.js
|
|
5696
|
-
var Injectable = __webpack_require__(
|
|
5723
|
+
var Injectable = __webpack_require__(68);
|
|
5697
5724
|
|
|
5698
5725
|
// EXTERNAL MODULE: ./src/utils/hash.js
|
|
5699
5726
|
var hash = __webpack_require__(29);
|
|
@@ -5851,7 +5878,7 @@ var ValidationError = __webpack_require__(35);
|
|
|
5851
5878
|
var ApiError = __webpack_require__(27);
|
|
5852
5879
|
|
|
5853
5880
|
// EXTERNAL MODULE: ./src/utils/requests.js
|
|
5854
|
-
var requests = __webpack_require__(
|
|
5881
|
+
var requests = __webpack_require__(5);
|
|
5855
5882
|
|
|
5856
5883
|
// EXTERNAL MODULE: ./node_modules/events/events.js
|
|
5857
5884
|
var events = __webpack_require__(52);
|
|
@@ -5921,7 +5948,7 @@ class Mapcreator_Mapcreator extends Object(reflection["mix"])(events_default.a,
|
|
|
5921
5948
|
* @param {OAuth|string} auth - Authentication flow
|
|
5922
5949
|
* @param {string} host - Remote API host
|
|
5923
5950
|
*/
|
|
5924
|
-
constructor(auth = new DummyFlow["default"](), host = "https://api.
|
|
5951
|
+
constructor(auth = new DummyFlow["default"](), host = "https://api.mapcreator.io") {
|
|
5925
5952
|
super();
|
|
5926
5953
|
|
|
5927
5954
|
if (typeof auth === 'string') {
|
|
@@ -6410,6 +6437,16 @@ class Mapcreator_Mapcreator extends Object(reflection["mix"])(events_default.a,
|
|
|
6410
6437
|
get notifications() {
|
|
6411
6438
|
return this.static(resources["Notification"]);
|
|
6412
6439
|
}
|
|
6440
|
+
/**
|
|
6441
|
+
* Message accessor
|
|
6442
|
+
* @see {@link Message}
|
|
6443
|
+
* @returns {ResourceProxy} - A proxy for accessing the resource
|
|
6444
|
+
*/
|
|
6445
|
+
|
|
6446
|
+
|
|
6447
|
+
get messages() {
|
|
6448
|
+
return this.static(resources["Message"]);
|
|
6449
|
+
}
|
|
6413
6450
|
/**
|
|
6414
6451
|
* Organisation accessor
|
|
6415
6452
|
* @see {@link Organisation}
|
|
@@ -6621,7 +6658,7 @@ class CrudSetBase extends _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"] {
|
|
|
6621
6658
|
"use strict";
|
|
6622
6659
|
__webpack_require__.r(__webpack_exports__);
|
|
6623
6660
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Layer; });
|
|
6624
|
-
/* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6661
|
+
/* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69);
|
|
6625
6662
|
/* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
|
|
6626
6663
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
6627
6664
|
/* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
|
|
@@ -6897,7 +6934,7 @@ class Trait {
|
|
|
6897
6934
|
__webpack_require__.r(__webpack_exports__);
|
|
6898
6935
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fnv32b", function() { return fnv32b; });
|
|
6899
6936
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hashObject", function() { return hashObject; });
|
|
6900
|
-
/* harmony import */ var json_stable_stringify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6937
|
+
/* harmony import */ var json_stable_stringify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71);
|
|
6901
6938
|
/* harmony import */ var json_stable_stringify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(json_stable_stringify__WEBPACK_IMPORTED_MODULE_0__);
|
|
6902
6939
|
/*
|
|
6903
6940
|
* BSD 3-Clause License
|
|
@@ -7318,7 +7355,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7318
7355
|
/* harmony import */ var _base_DownloadedResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
|
|
7319
7356
|
/* harmony import */ var _base_ResourceBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
|
|
7320
7357
|
/* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
|
|
7321
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
7358
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
|
|
7322
7359
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
|
|
7323
7360
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
|
|
7324
7361
|
/*
|
|
@@ -7894,7 +7931,7 @@ class DimensionSet extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_3__
|
|
|
7894
7931
|
"use strict";
|
|
7895
7932
|
__webpack_require__.r(__webpack_exports__);
|
|
7896
7933
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Dimension; });
|
|
7897
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
7934
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
|
|
7898
7935
|
/*
|
|
7899
7936
|
* BSD 3-Clause License
|
|
7900
7937
|
*
|
|
@@ -8069,7 +8106,7 @@ class FontFamily extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_1__["
|
|
|
8069
8106
|
"use strict";
|
|
8070
8107
|
__webpack_require__.r(__webpack_exports__);
|
|
8071
8108
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Font; });
|
|
8072
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
8109
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
|
|
8073
8110
|
/*
|
|
8074
8111
|
* BSD 3-Clause License
|
|
8075
8112
|
*
|
|
@@ -8126,7 +8163,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8126
8163
|
/* harmony import */ var _JobResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33);
|
|
8127
8164
|
/* harmony import */ var _JobRevision__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(62);
|
|
8128
8165
|
/* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
|
|
8129
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
8166
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
|
|
8130
8167
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
|
|
8131
8168
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(0);
|
|
8132
8169
|
/* harmony import */ var _JobShare__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(20);
|
|
@@ -8380,9 +8417,9 @@ class JobType extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_2__["mix
|
|
|
8380
8417
|
"use strict";
|
|
8381
8418
|
__webpack_require__.r(__webpack_exports__);
|
|
8382
8419
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Mapstyle; });
|
|
8383
|
-
/* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
8420
|
+
/* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69);
|
|
8384
8421
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
8385
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
8422
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
|
|
8386
8423
|
/*
|
|
8387
8424
|
* BSD 3-Clause License
|
|
8388
8425
|
*
|
|
@@ -8503,7 +8540,7 @@ class SvgSet extends Object(_utils_reflection__WEBPACK_IMPORTED_MODULE_3__["mix"
|
|
|
8503
8540
|
"use strict";
|
|
8504
8541
|
__webpack_require__.r(__webpack_exports__);
|
|
8505
8542
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Svg; });
|
|
8506
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
8543
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
|
|
8507
8544
|
/*
|
|
8508
8545
|
* BSD 3-Clause License
|
|
8509
8546
|
*
|
|
@@ -8552,7 +8589,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8552
8589
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Tag; });
|
|
8553
8590
|
/* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
|
8554
8591
|
/* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
8555
|
-
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
8592
|
+
/* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
|
|
8556
8593
|
/*
|
|
8557
8594
|
* BSD 3-Clause License
|
|
8558
8595
|
*
|
|
@@ -8627,13 +8664,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8627
8664
|
/* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(26);
|
|
8628
8665
|
/* harmony import */ var _Mapstyle__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(44);
|
|
8629
8666
|
/* harmony import */ var _MapstyleSet__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(50);
|
|
8630
|
-
/* harmony import */ var
|
|
8631
|
-
/* harmony import */ var
|
|
8632
|
-
/* harmony import */ var
|
|
8633
|
-
/* harmony import */ var
|
|
8634
|
-
/* harmony import */ var
|
|
8635
|
-
/* harmony import */ var
|
|
8636
|
-
/* harmony import */ var
|
|
8667
|
+
/* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(67);
|
|
8668
|
+
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(64);
|
|
8669
|
+
/* harmony import */ var _Organisation__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(54);
|
|
8670
|
+
/* harmony import */ var _Permission__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(49);
|
|
8671
|
+
/* harmony import */ var _Role__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(65);
|
|
8672
|
+
/* harmony import */ var _Svg__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(46);
|
|
8673
|
+
/* harmony import */ var _SvgSet__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(45);
|
|
8674
|
+
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(0);
|
|
8637
8675
|
/*
|
|
8638
8676
|
* BSD 3-Clause License
|
|
8639
8677
|
*
|
|
@@ -8686,6 +8724,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8686
8724
|
|
|
8687
8725
|
|
|
8688
8726
|
|
|
8727
|
+
|
|
8689
8728
|
|
|
8690
8729
|
|
|
8691
8730
|
class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
@@ -8701,7 +8740,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8701
8740
|
|
|
8702
8741
|
ips() {
|
|
8703
8742
|
const url = `${this.url}/ips`;
|
|
8704
|
-
return Object(
|
|
8743
|
+
return Object(_utils_helpers__WEBPACK_IMPORTED_MODULE_23__["makeCancelable"])(async signal => {
|
|
8705
8744
|
const {
|
|
8706
8745
|
data
|
|
8707
8746
|
} = await this.api.ky.get(url, {
|
|
@@ -8718,7 +8757,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8718
8757
|
|
|
8719
8758
|
|
|
8720
8759
|
organisation() {
|
|
8721
|
-
return new _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_1__["default"](this.api,
|
|
8760
|
+
return new _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_1__["default"](this.api, _Organisation__WEBPACK_IMPORTED_MODULE_18__["default"]).get(this.organisationId);
|
|
8722
8761
|
}
|
|
8723
8762
|
/**
|
|
8724
8763
|
* Get the user's language
|
|
@@ -8738,7 +8777,16 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8738
8777
|
|
|
8739
8778
|
|
|
8740
8779
|
get notifications() {
|
|
8741
|
-
return this._proxyResourceList(
|
|
8780
|
+
return this._proxyResourceList(_Notification__WEBPACK_IMPORTED_MODULE_17__["default"]);
|
|
8781
|
+
}
|
|
8782
|
+
/**
|
|
8783
|
+
* Get the list messagse linked to the user
|
|
8784
|
+
* @returns {SimpleResourceProxy} - A proxy for accessing the resource
|
|
8785
|
+
*/
|
|
8786
|
+
|
|
8787
|
+
|
|
8788
|
+
get messages() {
|
|
8789
|
+
return this._proxyResourceList(_Message__WEBPACK_IMPORTED_MODULE_16__["default"]);
|
|
8742
8790
|
}
|
|
8743
8791
|
/**
|
|
8744
8792
|
* Get the list mapstyle sets linked to the user
|
|
@@ -8801,7 +8849,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8801
8849
|
|
|
8802
8850
|
|
|
8803
8851
|
get svgSets() {
|
|
8804
|
-
return this._proxyResourceList(
|
|
8852
|
+
return this._proxyResourceList(_SvgSet__WEBPACK_IMPORTED_MODULE_22__["default"]);
|
|
8805
8853
|
}
|
|
8806
8854
|
/**
|
|
8807
8855
|
* Get the list svgs linked to the user
|
|
@@ -8810,7 +8858,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8810
8858
|
|
|
8811
8859
|
|
|
8812
8860
|
get svgs() {
|
|
8813
|
-
return this._proxyResourceList(
|
|
8861
|
+
return this._proxyResourceList(_Svg__WEBPACK_IMPORTED_MODULE_21__["default"]);
|
|
8814
8862
|
}
|
|
8815
8863
|
/**
|
|
8816
8864
|
* Get the list colors linked to the user
|
|
@@ -8873,7 +8921,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8873
8921
|
|
|
8874
8922
|
|
|
8875
8923
|
get permissions() {
|
|
8876
|
-
return this._proxyResourceList(
|
|
8924
|
+
return this._proxyResourceList(_Permission__WEBPACK_IMPORTED_MODULE_19__["default"]);
|
|
8877
8925
|
}
|
|
8878
8926
|
/**
|
|
8879
8927
|
* Get the list roles linked to the user
|
|
@@ -8882,7 +8930,7 @@ class User extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
8882
8930
|
|
|
8883
8931
|
|
|
8884
8932
|
get roles() {
|
|
8885
|
-
return new _proxy_OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_0__["default"](this.api, this,
|
|
8933
|
+
return new _proxy_OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_0__["default"](this.api, this, _Role__WEBPACK_IMPORTED_MODULE_20__["default"]);
|
|
8886
8934
|
} // endregion
|
|
8887
8935
|
|
|
8888
8936
|
|
|
@@ -8962,7 +9010,7 @@ var Mapstyle = __webpack_require__(44);
|
|
|
8962
9010
|
var ResourceProxy = __webpack_require__(14);
|
|
8963
9011
|
|
|
8964
9012
|
// EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
|
|
8965
|
-
var CrudSetItemBase = __webpack_require__(
|
|
9013
|
+
var CrudSetItemBase = __webpack_require__(18);
|
|
8966
9014
|
|
|
8967
9015
|
// CONCATENATED MODULE: ./src/resources/MapstyleSetColor.js
|
|
8968
9016
|
/*
|
|
@@ -10132,7 +10180,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10132
10180
|
/* harmony import */ var _Tag__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47);
|
|
10133
10181
|
/* harmony import */ var _User__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(48);
|
|
10134
10182
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(0);
|
|
10135
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(
|
|
10183
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(5);
|
|
10136
10184
|
/*
|
|
10137
10185
|
* BSD 3-Clause License
|
|
10138
10186
|
*
|
|
@@ -10365,7 +10413,7 @@ class Organisation extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"
|
|
|
10365
10413
|
"use strict";
|
|
10366
10414
|
__webpack_require__.r(__webpack_exports__);
|
|
10367
10415
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DummyFlow; });
|
|
10368
|
-
/* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
10416
|
+
/* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
|
|
10369
10417
|
/* harmony import */ var _OAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
|
|
10370
10418
|
/*
|
|
10371
10419
|
* BSD 3-Clause License
|
|
@@ -10607,7 +10655,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10607
10655
|
__webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ StateContainer_StateContainer; });
|
|
10608
10656
|
|
|
10609
10657
|
// EXTERNAL MODULE: ./src/storage/StorageManager.js + 3 modules
|
|
10610
|
-
var StorageManager = __webpack_require__(
|
|
10658
|
+
var StorageManager = __webpack_require__(19);
|
|
10611
10659
|
|
|
10612
10660
|
// EXTERNAL MODULE: ./src/utils/StaticClass.js
|
|
10613
10661
|
var StaticClass = __webpack_require__(51);
|
|
@@ -11480,7 +11528,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11480
11528
|
/* harmony import */ var _JobShare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
|
|
11481
11529
|
/* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26);
|
|
11482
11530
|
/* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
|
|
11483
|
-
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
11531
|
+
/* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
|
|
11484
11532
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
|
|
11485
11533
|
/* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(0);
|
|
11486
11534
|
/*
|
|
@@ -11961,7 +12009,7 @@ var ValidationError = __webpack_require__(35);
|
|
|
11961
12009
|
*/
|
|
11962
12010
|
class NodeError extends Error {}
|
|
11963
12011
|
// EXTERNAL MODULE: ./src/errors/OAuthError.js
|
|
11964
|
-
var OAuthError = __webpack_require__(
|
|
12012
|
+
var OAuthError = __webpack_require__(17);
|
|
11965
12013
|
|
|
11966
12014
|
// EXTERNAL MODULE: ./src/errors/StaticClassError.js
|
|
11967
12015
|
var StaticClassError = __webpack_require__(34);
|
|
@@ -12019,6 +12067,106 @@ var GeoError = __webpack_require__(31);
|
|
|
12019
12067
|
/* 67 */
|
|
12020
12068
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12021
12069
|
|
|
12070
|
+
"use strict";
|
|
12071
|
+
// ESM COMPAT FLAG
|
|
12072
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12073
|
+
|
|
12074
|
+
// EXPORTS
|
|
12075
|
+
__webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ Message_Message; });
|
|
12076
|
+
|
|
12077
|
+
// EXTERNAL MODULE: ./src/resources/base/CrudBase.js
|
|
12078
|
+
var CrudBase = __webpack_require__(2);
|
|
12079
|
+
|
|
12080
|
+
// EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
|
|
12081
|
+
var ResourceBase = __webpack_require__(6);
|
|
12082
|
+
|
|
12083
|
+
// CONCATENATED MODULE: ./src/resources/MessageVariant.js
|
|
12084
|
+
/*
|
|
12085
|
+
* BSD 3-Clause License
|
|
12086
|
+
*
|
|
12087
|
+
* Copyright (c) 2020, Mapcreator
|
|
12088
|
+
* All rights reserved.
|
|
12089
|
+
*
|
|
12090
|
+
* Redistribution and use in source and binary forms, with or without
|
|
12091
|
+
* modification, are permitted provided that the following conditions are met:
|
|
12092
|
+
*
|
|
12093
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
12094
|
+
* list of conditions and the following disclaimer.
|
|
12095
|
+
*
|
|
12096
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
12097
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
12098
|
+
* and/or other materials provided with the distribution.
|
|
12099
|
+
*
|
|
12100
|
+
* Neither the name of the copyright holder nor the names of its
|
|
12101
|
+
* contributors may be used to endorse or promote products derived from
|
|
12102
|
+
* this software without specific prior written permission.
|
|
12103
|
+
*
|
|
12104
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
12105
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
12106
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
12107
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
12108
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
12109
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
12110
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
12111
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
12112
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
12113
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
12114
|
+
*/
|
|
12115
|
+
|
|
12116
|
+
class MessageVariant_MessageVariant extends ResourceBase["default"] {}
|
|
12117
|
+
// CONCATENATED MODULE: ./src/resources/Message.js
|
|
12118
|
+
/*
|
|
12119
|
+
* BSD 3-Clause License
|
|
12120
|
+
*
|
|
12121
|
+
* Copyright (c) 2020, Mapcreator
|
|
12122
|
+
* All rights reserved.
|
|
12123
|
+
*
|
|
12124
|
+
* Redistribution and use in source and binary forms, with or without
|
|
12125
|
+
* modification, are permitted provided that the following conditions are met:
|
|
12126
|
+
*
|
|
12127
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
12128
|
+
* list of conditions and the following disclaimer.
|
|
12129
|
+
*
|
|
12130
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
12131
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
12132
|
+
* and/or other materials provided with the distribution.
|
|
12133
|
+
*
|
|
12134
|
+
* Neither the name of the copyright holder nor the names of its
|
|
12135
|
+
* contributors may be used to endorse or promote products derived from
|
|
12136
|
+
* this software without specific prior written permission.
|
|
12137
|
+
*
|
|
12138
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
12139
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
12140
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
12141
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
12142
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
12143
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
12144
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
12145
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
12146
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
12147
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
12148
|
+
*/
|
|
12149
|
+
|
|
12150
|
+
|
|
12151
|
+
class Message_Message extends CrudBase["default"] {
|
|
12152
|
+
static get resourceName() {
|
|
12153
|
+
return 'messages';
|
|
12154
|
+
}
|
|
12155
|
+
|
|
12156
|
+
_guessType(name, value) {
|
|
12157
|
+
if (name === 'variants') {
|
|
12158
|
+
return Array.from(value).map(data => new MessageVariant_MessageVariant(this.api, data));
|
|
12159
|
+
}
|
|
12160
|
+
|
|
12161
|
+
return super._guessType(name, value);
|
|
12162
|
+
}
|
|
12163
|
+
|
|
12164
|
+
}
|
|
12165
|
+
|
|
12166
|
+
/***/ }),
|
|
12167
|
+
/* 68 */
|
|
12168
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12169
|
+
|
|
12022
12170
|
"use strict";
|
|
12023
12171
|
__webpack_require__.r(__webpack_exports__);
|
|
12024
12172
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Injectable; });
|
|
@@ -12261,7 +12409,7 @@ class Injectable extends _Trait__WEBPACK_IMPORTED_MODULE_2__["default"] {
|
|
|
12261
12409
|
}
|
|
12262
12410
|
|
|
12263
12411
|
/***/ }),
|
|
12264
|
-
/*
|
|
12412
|
+
/* 69 */
|
|
12265
12413
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12266
12414
|
|
|
12267
12415
|
"use strict";
|
|
@@ -12287,7 +12435,7 @@ var ResourceBase = __webpack_require__(6);
|
|
|
12287
12435
|
var reflection = __webpack_require__(1);
|
|
12288
12436
|
|
|
12289
12437
|
// EXTERNAL MODULE: ./src/utils/requests.js
|
|
12290
|
-
var requests = __webpack_require__(
|
|
12438
|
+
var requests = __webpack_require__(5);
|
|
12291
12439
|
|
|
12292
12440
|
// EXTERNAL MODULE: ./src/utils/helpers.js
|
|
12293
12441
|
var helpers = __webpack_require__(0);
|
|
@@ -12489,7 +12637,7 @@ class HandlesImages_HandlesImages extends Trait["default"] {
|
|
|
12489
12637
|
}
|
|
12490
12638
|
|
|
12491
12639
|
/***/ }),
|
|
12492
|
-
/*
|
|
12640
|
+
/* 70 */
|
|
12493
12641
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12494
12642
|
|
|
12495
12643
|
"use strict";
|
|
@@ -12565,15 +12713,6 @@ class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__["defaul
|
|
|
12565
12713
|
|
|
12566
12714
|
this._path = value;
|
|
12567
12715
|
}
|
|
12568
|
-
|
|
12569
|
-
get realPath() {
|
|
12570
|
-
if (this.path.startsWith('/')) {
|
|
12571
|
-
return this.path;
|
|
12572
|
-
} // eslint-disable-next-line no-undef
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
return this._fs.realpathSync(this.path);
|
|
12576
|
-
}
|
|
12577
12716
|
/**
|
|
12578
12717
|
* @inheritDoc
|
|
12579
12718
|
*/
|
|
@@ -12649,7 +12788,7 @@ class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__["defaul
|
|
|
12649
12788
|
let data;
|
|
12650
12789
|
|
|
12651
12790
|
try {
|
|
12652
|
-
data = this._fs.readFileSync(this.
|
|
12791
|
+
data = this._fs.readFileSync(this.path).toString();
|
|
12653
12792
|
} catch (e) {
|
|
12654
12793
|
data = '{}';
|
|
12655
12794
|
}
|
|
@@ -12670,7 +12809,7 @@ class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__["defaul
|
|
|
12670
12809
|
_write(obj) {
|
|
12671
12810
|
const data = JSON.stringify(obj);
|
|
12672
12811
|
|
|
12673
|
-
const fd = this._fs.openSync(this.
|
|
12812
|
+
const fd = this._fs.openSync(this.path, 'w');
|
|
12674
12813
|
|
|
12675
12814
|
this._fs.writeSync(fd, data);
|
|
12676
12815
|
|
|
@@ -12695,10 +12834,10 @@ class FileDriver extends _DataStoreContract__WEBPACK_IMPORTED_MODULE_1__["defaul
|
|
|
12695
12834
|
}
|
|
12696
12835
|
|
|
12697
12836
|
/***/ }),
|
|
12698
|
-
/*
|
|
12837
|
+
/* 71 */
|
|
12699
12838
|
/***/ (function(module, exports, __webpack_require__) {
|
|
12700
12839
|
|
|
12701
|
-
var json = typeof JSON !== 'undefined' ? JSON : __webpack_require__(
|
|
12840
|
+
var json = typeof JSON !== 'undefined' ? JSON : __webpack_require__(72);
|
|
12702
12841
|
|
|
12703
12842
|
module.exports = function (obj, opts) {
|
|
12704
12843
|
if (!opts) opts = {};
|
|
@@ -12785,15 +12924,15 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
12785
12924
|
|
|
12786
12925
|
|
|
12787
12926
|
/***/ }),
|
|
12788
|
-
/*
|
|
12927
|
+
/* 72 */
|
|
12789
12928
|
/***/ (function(module, exports, __webpack_require__) {
|
|
12790
12929
|
|
|
12791
|
-
exports.parse = __webpack_require__(
|
|
12792
|
-
exports.stringify = __webpack_require__(
|
|
12930
|
+
exports.parse = __webpack_require__(73);
|
|
12931
|
+
exports.stringify = __webpack_require__(74);
|
|
12793
12932
|
|
|
12794
12933
|
|
|
12795
12934
|
/***/ }),
|
|
12796
|
-
/*
|
|
12935
|
+
/* 73 */
|
|
12797
12936
|
/***/ (function(module, exports) {
|
|
12798
12937
|
|
|
12799
12938
|
var at, // The index of the current character
|
|
@@ -13072,7 +13211,7 @@ module.exports = function (source, reviver) {
|
|
|
13072
13211
|
|
|
13073
13212
|
|
|
13074
13213
|
/***/ }),
|
|
13075
|
-
/*
|
|
13214
|
+
/* 74 */
|
|
13076
13215
|
/***/ (function(module, exports) {
|
|
13077
13216
|
|
|
13078
13217
|
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
|
@@ -13232,7 +13371,7 @@ module.exports = function (value, replacer, space) {
|
|
|
13232
13371
|
|
|
13233
13372
|
|
|
13234
13373
|
/***/ }),
|
|
13235
|
-
/*
|
|
13374
|
+
/* 75 */
|
|
13236
13375
|
/***/ (function(module, exports) {
|
|
13237
13376
|
|
|
13238
13377
|
/* eslint-env browser */
|
|
@@ -13240,7 +13379,7 @@ module.exports = typeof self == 'object' ? self.FormData : window.FormData;
|
|
|
13240
13379
|
|
|
13241
13380
|
|
|
13242
13381
|
/***/ }),
|
|
13243
|
-
/*
|
|
13382
|
+
/* 76 */
|
|
13244
13383
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13245
13384
|
|
|
13246
13385
|
"use strict";
|
|
@@ -13290,7 +13429,7 @@ var Mapcreator = __webpack_require__(24);
|
|
|
13290
13429
|
var RequestParameters = __webpack_require__(3);
|
|
13291
13430
|
|
|
13292
13431
|
// EXTERNAL MODULE: ./src/storage/StorageManager.js + 3 modules
|
|
13293
|
-
var StorageManager = __webpack_require__(
|
|
13432
|
+
var StorageManager = __webpack_require__(19);
|
|
13294
13433
|
|
|
13295
13434
|
// EXTERNAL MODULE: ./src/enums/Enum.js + 1 modules
|
|
13296
13435
|
var Enum = __webpack_require__(22);
|
|
@@ -13308,10 +13447,10 @@ var OAuthToken = __webpack_require__(15);
|
|
|
13308
13447
|
var StateContainer = __webpack_require__(57);
|
|
13309
13448
|
|
|
13310
13449
|
// EXTERNAL MODULE: ./src/utils/requests.js
|
|
13311
|
-
var requests = __webpack_require__(
|
|
13450
|
+
var requests = __webpack_require__(5);
|
|
13312
13451
|
|
|
13313
13452
|
// EXTERNAL MODULE: ./src/errors/OAuthError.js
|
|
13314
|
-
var OAuthError = __webpack_require__(
|
|
13453
|
+
var OAuthError = __webpack_require__(17);
|
|
13315
13454
|
|
|
13316
13455
|
// EXTERNAL MODULE: ./src/utils/node.js
|
|
13317
13456
|
var node = __webpack_require__(13);
|
|
@@ -13530,16 +13669,17 @@ class ImplicitFlow_ImplicitFlow extends OAuth["default"] {
|
|
|
13530
13669
|
|
|
13531
13670
|
|
|
13532
13671
|
_getError() {
|
|
13533
|
-
var _params$message;
|
|
13534
|
-
|
|
13535
13672
|
if (!this._anchorContainsError()) {
|
|
13536
13673
|
throw Error('No OAuthError found in anchor');
|
|
13537
13674
|
}
|
|
13538
13675
|
|
|
13539
13676
|
const params = this._getAnchorParams();
|
|
13540
13677
|
|
|
13541
|
-
|
|
13542
|
-
|
|
13678
|
+
if (params.message) {
|
|
13679
|
+
return new OAuthError["default"](params.error, params.message);
|
|
13680
|
+
}
|
|
13681
|
+
|
|
13682
|
+
return new OAuthError["default"](params.error, Object(Case["title"])(params.error));
|
|
13543
13683
|
}
|
|
13544
13684
|
|
|
13545
13685
|
}
|
|
@@ -13853,7 +13993,7 @@ var ValidationError = __webpack_require__(35);
|
|
|
13853
13993
|
var StaticClassError = __webpack_require__(34);
|
|
13854
13994
|
|
|
13855
13995
|
// EXTERNAL MODULE: ./src/resources/index.js + 7 modules
|
|
13856
|
-
var resources = __webpack_require__(
|
|
13996
|
+
var resources = __webpack_require__(4);
|
|
13857
13997
|
|
|
13858
13998
|
// EXTERNAL MODULE: ./src/ResourceLister.js
|
|
13859
13999
|
var ResourceLister = __webpack_require__(58);
|
|
@@ -14006,7 +14146,7 @@ var SimpleResourceProxy = __webpack_require__(16);
|
|
|
14006
14146
|
* @private
|
|
14007
14147
|
*/
|
|
14008
14148
|
|
|
14009
|
-
const version = "v2.
|
|
14149
|
+
const version = "v2.5.0";
|
|
14010
14150
|
|
|
14011
14151
|
/***/ })
|
|
14012
14152
|
/******/ ]);
|