@mapcreator/api 3.2.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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:86d5ffb5d227f944b20c, chunkhash:5b1ad1f0b7852738f8a4, name:bundle, version:v3.2.0
32
+ * hash:af26823235a66e3e14db, chunkhash:99c5aae0fb9546866704, name:bundle, version:v3.3.1
33
33
  */
34
34
  /******/ (() => { // webpackBootstrap
35
35
  /******/ "use strict";
@@ -44,7 +44,7 @@ __webpack_require__.r(__webpack_exports__);
44
44
  /* harmony export */ "mix": () => (/* binding */ mix),
45
45
  /* harmony export */ "hasTrait": () => (/* binding */ hasTrait)
46
46
  /* harmony export */ });
47
- /* harmony import */ var _traits_Trait__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31);
47
+ /* harmony import */ var _traits_Trait__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32);
48
48
  /* harmony import */ var _hash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23);
49
49
  /*
50
50
  * BSD 3-Clause License
@@ -395,7 +395,7 @@ __webpack_require__.r(__webpack_exports__);
395
395
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
396
396
  /* harmony export */ "default": () => (/* binding */ CrudBase)
397
397
  /* harmony export */ });
398
- /* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
398
+ /* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(35);
399
399
  /* harmony import */ var _ResourceBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
400
400
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
401
401
  /*
@@ -441,9 +441,10 @@ class CrudBase extends _ResourceBase__WEBPACK_IMPORTED_MODULE_1__["default"] {
441
441
  /**
442
442
  * @param {Mapcreator} api - Api instance
443
443
  * @param {Object<String, *>} data - Item data
444
+ * @param {String} [altUrl] - Internal use, Optional alternative url for more complex routing
444
445
  */
445
- constructor(api, data = {}) {
446
- super(api, data);
446
+ constructor(api, data = {}, altUrl = null) {
447
+ super(api, data, altUrl);
447
448
 
448
449
  if (this.constructor === CrudBase) {
449
450
  throw new _errors__WEBPACK_IMPORTED_MODULE_0__.AbstractClassError();
@@ -628,8 +629,8 @@ __webpack_require__.r(__webpack_exports__);
628
629
  /* harmony import */ var case__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
629
630
  /* harmony import */ var case__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(case__WEBPACK_IMPORTED_MODULE_0__);
630
631
  /* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
631
- /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
632
- /* harmony import */ var _proxy_SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
632
+ /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
633
+ /* harmony import */ var _proxy_SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
633
634
  /* harmony import */ var _traits_Injectable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61);
634
635
  /* harmony import */ var _utils_hash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23);
635
636
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
@@ -687,14 +688,19 @@ class ResourceBase extends (0,_utils_reflection__WEBPACK_IMPORTED_MODULE_6__.mix
687
688
  /**
688
689
  * @param {Mapcreator} api - Api instance
689
690
  * @param {Object<String, *>} data - Item data
691
+ * @param {String} [altUrl] - Internal use, Optional alternative url for more complex routing
690
692
  */
691
- constructor(api, data = {}) {
693
+ constructor(api, data = {}, altUrl = null) {
692
694
  super();
693
695
 
694
696
  if (this.constructor === ResourceBase) {
695
697
  throw new _errors_AbstractError__WEBPACK_IMPORTED_MODULE_1__.AbstractClassError();
696
698
  }
697
699
 
700
+ if (altUrl) {
701
+ this.__baseUrl = altUrl;
702
+ }
703
+
698
704
  this.api = api; // De-reference
699
705
 
700
706
  data = (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_7__.clone)(data); // Normalize keys to snake_case
@@ -995,8 +1001,12 @@ class ResourceBase extends (0,_utils_reflection__WEBPACK_IMPORTED_MODULE_6__.mix
995
1001
 
996
1002
 
997
1003
  get baseUrl() {
998
- const basePath = this.constructor.resourcePath.match(/^(\/[^{]+\b)/)[1];
999
- return `${this._api.url}${basePath}`;
1004
+ if (!this.__baseUrl) {
1005
+ const basePath = this.constructor.resourcePath.match(/^(\/[^{]+\b)/)[1];
1006
+ this.__baseUrl = `${this._api.url}${basePath}`;
1007
+ }
1008
+
1009
+ return this.__baseUrl;
1000
1010
  }
1001
1011
  /**
1002
1012
  * List fields that contain object data
@@ -1121,6 +1131,74 @@ class ResourceBase extends (0,_utils_reflection__WEBPACK_IMPORTED_MODULE_6__.mix
1121
1131
  /* 4 */
1122
1132
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1123
1133
 
1134
+ __webpack_require__.r(__webpack_exports__);
1135
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1136
+ /* harmony export */ "default": () => (/* binding */ OwnableResource)
1137
+ /* harmony export */ });
1138
+ /* harmony import */ var _proxy_OrganisationProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
1139
+ /* harmony import */ var _Trait__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32);
1140
+ /*
1141
+ * BSD 3-Clause License
1142
+ *
1143
+ * Copyright (c) 2020, Mapcreator
1144
+ * All rights reserved.
1145
+ *
1146
+ * Redistribution and use in source and binary forms, with or without
1147
+ * modification, are permitted provided that the following conditions are met:
1148
+ *
1149
+ * Redistributions of source code must retain the above copyright notice, this
1150
+ * list of conditions and the following disclaimer.
1151
+ *
1152
+ * Redistributions in binary form must reproduce the above copyright notice,
1153
+ * this list of conditions and the following disclaimer in the documentation
1154
+ * and/or other materials provided with the distribution.
1155
+ *
1156
+ * Neither the name of the copyright holder nor the names of its
1157
+ * contributors may be used to endorse or promote products derived from
1158
+ * this software without specific prior written permission.
1159
+ *
1160
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1161
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1162
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1163
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1164
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1165
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1166
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1167
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1168
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1169
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1170
+ */
1171
+
1172
+
1173
+ /**
1174
+ * Provides a {@link ResourceBase} with functions for dealing with being ownable by an organisation
1175
+ * @mixin
1176
+ */
1177
+
1178
+ class OwnableResource extends _Trait__WEBPACK_IMPORTED_MODULE_1__["default"] {
1179
+ /**
1180
+ * Get the list of associated organisations
1181
+ * @returns {SimpleResourceProxy} - A proxy for accessing the resource
1182
+ */
1183
+ get organisations() {
1184
+ return new _proxy_OrganisationProxy__WEBPACK_IMPORTED_MODULE_0__["default"](this.api, this);
1185
+ }
1186
+ /**
1187
+ * If the resource can be owned by an organisation
1188
+ * @returns {boolean} - Can be owned by an organisation
1189
+ */
1190
+
1191
+
1192
+ get ownable() {
1193
+ return true;
1194
+ }
1195
+
1196
+ }
1197
+
1198
+ /***/ }),
1199
+ /* 5 */
1200
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1201
+
1124
1202
  __webpack_require__.r(__webpack_exports__);
1125
1203
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1126
1204
  /* harmony export */ "FormData": () => (/* binding */ FormData),
@@ -1245,74 +1323,6 @@ function wrapKyPrefixUrl(fn, baseUrl) {
1245
1323
  };
1246
1324
  }
1247
1325
 
1248
- /***/ }),
1249
- /* 5 */
1250
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1251
-
1252
- __webpack_require__.r(__webpack_exports__);
1253
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1254
- /* harmony export */ "default": () => (/* binding */ OwnableResource)
1255
- /* harmony export */ });
1256
- /* harmony import */ var _proxy_OrganisationProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33);
1257
- /* harmony import */ var _Trait__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31);
1258
- /*
1259
- * BSD 3-Clause License
1260
- *
1261
- * Copyright (c) 2020, Mapcreator
1262
- * All rights reserved.
1263
- *
1264
- * Redistribution and use in source and binary forms, with or without
1265
- * modification, are permitted provided that the following conditions are met:
1266
- *
1267
- * Redistributions of source code must retain the above copyright notice, this
1268
- * list of conditions and the following disclaimer.
1269
- *
1270
- * Redistributions in binary form must reproduce the above copyright notice,
1271
- * this list of conditions and the following disclaimer in the documentation
1272
- * and/or other materials provided with the distribution.
1273
- *
1274
- * Neither the name of the copyright holder nor the names of its
1275
- * contributors may be used to endorse or promote products derived from
1276
- * this software without specific prior written permission.
1277
- *
1278
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1279
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1280
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1281
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
1282
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1283
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1284
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1285
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1286
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1287
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1288
- */
1289
-
1290
-
1291
- /**
1292
- * Provides a {@link ResourceBase} with functions for dealing with being ownable by an organisation
1293
- * @mixin
1294
- */
1295
-
1296
- class OwnableResource extends _Trait__WEBPACK_IMPORTED_MODULE_1__["default"] {
1297
- /**
1298
- * Get the list of associated organisations
1299
- * @returns {SimpleResourceProxy} - A proxy for accessing the resource
1300
- */
1301
- get organisations() {
1302
- return new _proxy_OrganisationProxy__WEBPACK_IMPORTED_MODULE_0__["default"](this.api, this);
1303
- }
1304
- /**
1305
- * If the resource can be owned by an organisation
1306
- * @returns {boolean} - Can be owned by an organisation
1307
- */
1308
-
1309
-
1310
- get ownable() {
1311
- return true;
1312
- }
1313
-
1314
- }
1315
-
1316
1326
  /***/ }),
1317
1327
  /* 6 */
1318
1328
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -1519,7 +1529,7 @@ __webpack_require__.r(__webpack_exports__);
1519
1529
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
1520
1530
  /* harmony import */ var _utils_hash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
1521
1531
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0);
1522
- /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4);
1532
+ /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
1523
1533
  /*
1524
1534
  * BSD 3-Clause License
1525
1535
  *
@@ -2368,9 +2378,10 @@ class CrudSetItemBase extends _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"]
2368
2378
  /**
2369
2379
  * @param {Mapcreator} api - Api instance
2370
2380
  * @param {Object<String, *>} data - Item data
2381
+ * @param {String} [altUrl] - Internal use, Optional alternative url for more complex routing
2371
2382
  */
2372
- constructor(api, data = {}) {
2373
- super(api, data);
2383
+ constructor(api, data = {}, altUrl = null) {
2384
+ super(api, data, altUrl);
2374
2385
 
2375
2386
  if (this.constructor === _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"]) {
2376
2387
  throw new _errors_AbstractError__WEBPACK_IMPORTED_MODULE_0__.AbstractClassError();
@@ -2612,7 +2623,7 @@ __webpack_require__.r(__webpack_exports__);
2612
2623
  /* harmony export */ "default": () => (/* binding */ OAuthToken)
2613
2624
  /* harmony export */ });
2614
2625
  /* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22);
2615
- /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
2626
+ /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
2616
2627
  /*
2617
2628
  * BSD 3-Clause License
2618
2629
  *
@@ -2794,23 +2805,13 @@ class OAuthToken {
2794
2805
  /* 13 */
2795
2806
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2796
2807
 
2797
- // ESM COMPAT FLAG
2798
2808
  __webpack_require__.r(__webpack_exports__);
2799
-
2800
- // EXPORTS
2801
- __webpack_require__.d(__webpack_exports__, {
2802
- "default": () => (/* binding */ SimpleResourceProxy)
2803
- });
2804
-
2805
- // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
2806
- var Mapcreator = __webpack_require__(15);
2807
- // EXTERNAL MODULE: ./src/RequestParameters.js
2808
- var RequestParameters = __webpack_require__(7);
2809
- // EXTERNAL MODULE: ./src/utils/reflection.js
2810
- var reflection = __webpack_require__(0);
2811
- // EXTERNAL MODULE: ./src/utils/helpers.js
2812
- var helpers = __webpack_require__(1);
2813
- ;// CONCATENATED MODULE: ./src/PaginatedResourceListing.js
2809
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2810
+ /* harmony export */ "default": () => (/* binding */ ResourceProxy)
2811
+ /* harmony export */ });
2812
+ /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
2813
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
2814
+ /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
2814
2815
  /*
2815
2816
  * BSD 3-Clause License
2816
2817
  *
@@ -2845,66 +2846,202 @@ var helpers = __webpack_require__(1);
2845
2846
 
2846
2847
 
2847
2848
 
2848
-
2849
2849
  /**
2850
- * Proxy for accessing paginated resources
2850
+ * Proxy for accessing resource. This will make sure that they
2851
+ * are properly wrapped before the promise resolves.
2852
+ * @protected
2851
2853
  */
2852
2854
 
2853
- class PaginatedResourceListing {
2855
+ class ResourceProxy extends _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__["default"] {
2854
2856
  /**
2855
- * @param {Mapcreator} api - Instance of the api
2856
- * @param {String} route - Resource route
2857
- * @param {Class<ResourceBase>} Target - Wrapper target
2858
- * @param {RequestParameters} parameters - Request parameters
2859
- * @param {Number} pageCount - Resolved page count
2860
- * @param {Number} rowCount - Resolved rowCount
2861
- * @param {Array<ResourceBase>} data - Resolved data
2857
+ * Parse selector
2858
+ * @param {Number|String|Object} [id=] - The resource id to be requested
2859
+ * @returns {Object} - Parsed selector
2862
2860
  * @private
2863
2861
  */
2864
- constructor(api, route, Target, parameters, pageCount = null, rowCount = 0, data = []) {
2865
- if (!(0,reflection.isParentOf)(Mapcreator["default"], api)) {
2866
- throw new TypeError('Expected api to be of type Mapcreator');
2862
+ _parseSelector(id) {
2863
+ if (id === '' || id === null) {
2864
+ return {};
2867
2865
  }
2868
2866
 
2869
- if (!(0,reflection.isParentOf)(RequestParameters["default"], parameters)) {
2870
- parameters = new RequestParameters["default"](parameters);
2871
- }
2867
+ switch (typeof id) {
2868
+ case 'number':
2869
+ case 'string':
2870
+ return {
2871
+ [this.Target.resourceUrlKey]: id
2872
+ };
2872
2873
 
2873
- this._api = api;
2874
- this.route = route;
2875
- this._Target = Target;
2876
- this._parameters = parameters;
2877
- this._pageCount = pageCount;
2878
- this._rows = rowCount;
2879
- this._data = data;
2874
+ case 'object':
2875
+ return id;
2876
+
2877
+ default:
2878
+ return {};
2879
+ }
2880
2880
  }
2881
2881
  /**
2882
- * Get api instance
2883
- * @returns {Mapcreator} - Api instance
2882
+ * Get target resource
2883
+ * @param {Number|String|Object} [id=] - The resource id to be requested
2884
+ * @param {String} [deleted=null] - Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all
2885
+ * @returns {CancelablePromise<ResourceBase>} - Target resource
2886
+ * @throws {ApiError} - If the api returns errors
2884
2887
  */
2885
2888
 
2886
2889
 
2887
- get api() {
2888
- return this._api;
2890
+ get(id, deleted = null) {
2891
+ return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_2__.makeCancelable)(async signal => {
2892
+ const data = { ...this._seedData,
2893
+ ...this._parseSelector(id)
2894
+ };
2895
+ let url = this.new(data).url;
2896
+
2897
+ if (typeof deleted === 'string') {
2898
+ const glue = url.includes('?') ? '&' : '?';
2899
+ url += glue + (0,_utils_requests__WEBPACK_IMPORTED_MODULE_0__.encodeQueryString)({
2900
+ deleted
2901
+ });
2902
+ }
2903
+
2904
+ const {
2905
+ data: result
2906
+ } = await this.api.ky.get(url, {
2907
+ signal
2908
+ }).json();
2909
+ return this.new(result);
2910
+ });
2889
2911
  }
2890
2912
  /**
2891
- * Target route
2892
- * @returns {String} - Url
2913
+ * Select target resource without obtaining data
2914
+ * @param {Number|String} [id=] - Resource id
2915
+ * @returns {ResourceBase} - Empty target resource
2916
+ * @example
2917
+ * api.users.select('me').colors().then(doSomethingCool);
2893
2918
  */
2894
2919
 
2895
2920
 
2896
- get route() {
2897
- return this._route;
2921
+ select(id) {
2922
+ const data = { ...this._seedData,
2923
+ ...this._parseSelector(id)
2924
+ };
2925
+ return this.new(data);
2898
2926
  }
2899
- /**
2900
- * Override the target route
2901
- * @param {String} value - route
2902
- */
2903
2927
 
2928
+ }
2904
2929
 
2905
- set route(value) {
2906
- if (!value.startsWith('https://') && !value.startsWith('http://')) {
2907
- if (!value.startsWith('/')) {
2930
+ /***/ }),
2931
+ /* 14 */
2932
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2933
+
2934
+ // ESM COMPAT FLAG
2935
+ __webpack_require__.r(__webpack_exports__);
2936
+
2937
+ // EXPORTS
2938
+ __webpack_require__.d(__webpack_exports__, {
2939
+ "default": () => (/* binding */ SimpleResourceProxy)
2940
+ });
2941
+
2942
+ // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
2943
+ var Mapcreator = __webpack_require__(16);
2944
+ // EXTERNAL MODULE: ./src/RequestParameters.js
2945
+ var RequestParameters = __webpack_require__(7);
2946
+ // EXTERNAL MODULE: ./src/utils/reflection.js
2947
+ var reflection = __webpack_require__(0);
2948
+ // EXTERNAL MODULE: ./src/utils/helpers.js
2949
+ var helpers = __webpack_require__(1);
2950
+ ;// CONCATENATED MODULE: ./src/PaginatedResourceListing.js
2951
+ /*
2952
+ * BSD 3-Clause License
2953
+ *
2954
+ * Copyright (c) 2020, Mapcreator
2955
+ * All rights reserved.
2956
+ *
2957
+ * Redistribution and use in source and binary forms, with or without
2958
+ * modification, are permitted provided that the following conditions are met:
2959
+ *
2960
+ * Redistributions of source code must retain the above copyright notice, this
2961
+ * list of conditions and the following disclaimer.
2962
+ *
2963
+ * Redistributions in binary form must reproduce the above copyright notice,
2964
+ * this list of conditions and the following disclaimer in the documentation
2965
+ * and/or other materials provided with the distribution.
2966
+ *
2967
+ * Neither the name of the copyright holder nor the names of its
2968
+ * contributors may be used to endorse or promote products derived from
2969
+ * this software without specific prior written permission.
2970
+ *
2971
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2972
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2973
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2974
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
2975
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2976
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2977
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2978
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2979
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2980
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2981
+ */
2982
+
2983
+
2984
+
2985
+
2986
+ /**
2987
+ * Proxy for accessing paginated resources
2988
+ */
2989
+
2990
+ class PaginatedResourceListing {
2991
+ /**
2992
+ * @param {Mapcreator} api - Instance of the api
2993
+ * @param {String} route - Resource route
2994
+ * @param {Class<ResourceBase>} Target - Wrapper target
2995
+ * @param {RequestParameters} parameters - Request parameters
2996
+ * @param {Number} pageCount - Resolved page count
2997
+ * @param {Number} rowCount - Resolved rowCount
2998
+ * @param {Array<ResourceBase>} data - Resolved data
2999
+ * @private
3000
+ */
3001
+ constructor(api, route, Target, parameters, pageCount = null, rowCount = 0, data = []) {
3002
+ if (!(0,reflection.isParentOf)(Mapcreator["default"], api)) {
3003
+ throw new TypeError('Expected api to be of type Mapcreator');
3004
+ }
3005
+
3006
+ if (!(0,reflection.isParentOf)(RequestParameters["default"], parameters)) {
3007
+ parameters = new RequestParameters["default"](parameters);
3008
+ }
3009
+
3010
+ this._api = api;
3011
+ this.route = route;
3012
+ this._Target = Target;
3013
+ this._parameters = parameters;
3014
+ this._pageCount = pageCount;
3015
+ this._rows = rowCount;
3016
+ this._data = data;
3017
+ }
3018
+ /**
3019
+ * Get api instance
3020
+ * @returns {Mapcreator} - Api instance
3021
+ */
3022
+
3023
+
3024
+ get api() {
3025
+ return this._api;
3026
+ }
3027
+ /**
3028
+ * Target route
3029
+ * @returns {String} - Url
3030
+ */
3031
+
3032
+
3033
+ get route() {
3034
+ return this._route;
3035
+ }
3036
+ /**
3037
+ * Override the target route
3038
+ * @param {String} value - route
3039
+ */
3040
+
3041
+
3042
+ set route(value) {
3043
+ if (!value.startsWith('https://') && !value.startsWith('http://')) {
3044
+ if (!value.startsWith('/')) {
2908
3045
  value = `/${value}`;
2909
3046
  }
2910
3047
 
@@ -3243,7 +3380,7 @@ class SimpleResourceProxy {
3243
3380
  data = { ...this._seedData,
3244
3381
  ...data
3245
3382
  };
3246
- return new this.Target(this._api, data);
3383
+ return new this.Target(this._api, data, this.__baseUrl);
3247
3384
  }
3248
3385
  /**
3249
3386
  * List target resource
@@ -3330,7 +3467,7 @@ class SimpleResourceProxy {
3330
3467
  }
3331
3468
 
3332
3469
  /***/ }),
3333
- /* 14 */
3470
+ /* 15 */
3334
3471
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3335
3472
 
3336
3473
  __webpack_require__.r(__webpack_exports__);
@@ -3425,7 +3562,7 @@ class CrudSetBase extends _CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"] {
3425
3562
  }
3426
3563
 
3427
3564
  /***/ }),
3428
- /* 15 */
3565
+ /* 16 */
3429
3566
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3430
3567
 
3431
3568
  // ESM COMPAT FLAG
@@ -3437,24 +3574,24 @@ __webpack_require__.d(__webpack_exports__, {
3437
3574
  });
3438
3575
 
3439
3576
  // EXTERNAL MODULE: external "ky-universal"
3440
- var external_ky_universal_ = __webpack_require__(30);
3577
+ var external_ky_universal_ = __webpack_require__(31);
3441
3578
  var external_ky_universal_default = /*#__PURE__*/__webpack_require__.n(external_ky_universal_);
3442
3579
  // EXTERNAL MODULE: ./src/enums/index.js + 3 modules
3443
3580
  var enums = __webpack_require__(6);
3444
3581
  // EXTERNAL MODULE: ./src/oauth/DummyFlow.js
3445
3582
  var DummyFlow = __webpack_require__(72);
3446
3583
  // EXTERNAL MODULE: ./src/oauth/OAuth.js
3447
- var OAuth = __webpack_require__(18);
3584
+ var OAuth = __webpack_require__(19);
3448
3585
  // EXTERNAL MODULE: ./src/oauth/OAuthToken.js
3449
3586
  var OAuthToken = __webpack_require__(12);
3450
3587
  // EXTERNAL MODULE: ./src/proxy/GeoResourceProxy.js
3451
3588
  var GeoResourceProxy = __webpack_require__(38);
3452
3589
  // EXTERNAL MODULE: ./src/proxy/ResourceProxy.js
3453
- var ResourceProxy = __webpack_require__(19);
3590
+ var ResourceProxy = __webpack_require__(13);
3454
3591
  // EXTERNAL MODULE: ./src/proxy/SimpleResourceProxy.js + 1 modules
3455
- var SimpleResourceProxy = __webpack_require__(13);
3456
- // EXTERNAL MODULE: ./src/resources/index.js + 10 modules
3457
- var resources = __webpack_require__(36);
3592
+ var SimpleResourceProxy = __webpack_require__(14);
3593
+ // EXTERNAL MODULE: ./src/resources/index.js + 11 modules
3594
+ var resources = __webpack_require__(30);
3458
3595
  // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
3459
3596
  var ResourceBase = __webpack_require__(3);
3460
3597
  // EXTERNAL MODULE: ./src/traits/Injectable.js
@@ -3610,7 +3747,7 @@ var ValidationError = __webpack_require__(74);
3610
3747
  // EXTERNAL MODULE: ./src/errors/ApiError.js
3611
3748
  var ApiError = __webpack_require__(62);
3612
3749
  // EXTERNAL MODULE: ./src/utils/requests.js
3613
- var requests = __webpack_require__(4);
3750
+ var requests = __webpack_require__(5);
3614
3751
  // EXTERNAL MODULE: external "events"
3615
3752
  var external_events_ = __webpack_require__(40);
3616
3753
  var external_events_default = /*#__PURE__*/__webpack_require__.n(external_events_);
@@ -4330,14 +4467,14 @@ class Mapcreator extends (0,reflection.mix)((external_events_default()), Injecta
4330
4467
  }
4331
4468
 
4332
4469
  /***/ }),
4333
- /* 16 */
4470
+ /* 17 */
4334
4471
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4335
4472
 
4336
4473
  __webpack_require__.r(__webpack_exports__);
4337
4474
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4338
4475
  /* harmony export */ "default": () => (/* binding */ OAuthError)
4339
4476
  /* harmony export */ });
4340
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
4477
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
4341
4478
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
4342
4479
 
4343
4480
 
@@ -4417,22 +4554,22 @@ class OAuthError extends Error {
4417
4554
  }
4418
4555
 
4419
4556
  /***/ }),
4420
- /* 17 */
4557
+ /* 18 */
4421
4558
  /***/ ((module) => {
4422
4559
 
4423
4560
  module.exports = require("@babel/runtime/helpers/defineProperty");
4424
4561
 
4425
4562
  /***/ }),
4426
- /* 18 */
4563
+ /* 19 */
4427
4564
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4428
4565
 
4429
4566
  __webpack_require__.r(__webpack_exports__);
4430
4567
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4431
4568
  /* harmony export */ "default": () => (/* binding */ OAuth)
4432
4569
  /* harmony export */ });
4433
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
4570
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
4434
4571
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
4435
- /* harmony import */ var ky_universal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30);
4572
+ /* harmony import */ var ky_universal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31);
4436
4573
  /* harmony import */ var ky_universal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(ky_universal__WEBPACK_IMPORTED_MODULE_1__);
4437
4574
  /* harmony import */ var _errors_AbstractError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
4438
4575
  /* harmony import */ var _storage_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22);
@@ -4577,132 +4714,6 @@ class OAuth {
4577
4714
 
4578
4715
  }
4579
4716
 
4580
- /***/ }),
4581
- /* 19 */
4582
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4583
-
4584
- __webpack_require__.r(__webpack_exports__);
4585
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4586
- /* harmony export */ "default": () => (/* binding */ ResourceProxy)
4587
- /* harmony export */ });
4588
- /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
4589
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
4590
- /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
4591
- /*
4592
- * BSD 3-Clause License
4593
- *
4594
- * Copyright (c) 2020, Mapcreator
4595
- * All rights reserved.
4596
- *
4597
- * Redistribution and use in source and binary forms, with or without
4598
- * modification, are permitted provided that the following conditions are met:
4599
- *
4600
- * Redistributions of source code must retain the above copyright notice, this
4601
- * list of conditions and the following disclaimer.
4602
- *
4603
- * Redistributions in binary form must reproduce the above copyright notice,
4604
- * this list of conditions and the following disclaimer in the documentation
4605
- * and/or other materials provided with the distribution.
4606
- *
4607
- * Neither the name of the copyright holder nor the names of its
4608
- * contributors may be used to endorse or promote products derived from
4609
- * this software without specific prior written permission.
4610
- *
4611
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
4612
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4613
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
4614
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
4615
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4616
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
4617
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
4618
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
4619
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
4620
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4621
- */
4622
-
4623
-
4624
-
4625
- /**
4626
- * Proxy for accessing resource. This will make sure that they
4627
- * are properly wrapped before the promise resolves.
4628
- * @protected
4629
- */
4630
-
4631
- class ResourceProxy extends _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__["default"] {
4632
- /**
4633
- * Parse selector
4634
- * @param {Number|String|Object} [id=] - The resource id to be requested
4635
- * @returns {Object} - Parsed selector
4636
- * @private
4637
- */
4638
- _parseSelector(id) {
4639
- if (id === '' || id === null) {
4640
- return {};
4641
- }
4642
-
4643
- switch (typeof id) {
4644
- case 'number':
4645
- case 'string':
4646
- return {
4647
- [this.Target.resourceUrlKey]: id
4648
- };
4649
-
4650
- case 'object':
4651
- return id;
4652
-
4653
- default:
4654
- return {};
4655
- }
4656
- }
4657
- /**
4658
- * Get target resource
4659
- * @param {Number|String|Object} [id=] - The resource id to be requested
4660
- * @param {String} [deleted=null] - Determines if the resource should be shown if deleted, requires special resource permissions. Possible values: only, none, all
4661
- * @returns {CancelablePromise<ResourceBase>} - Target resource
4662
- * @throws {ApiError} - If the api returns errors
4663
- */
4664
-
4665
-
4666
- get(id, deleted = null) {
4667
- return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_2__.makeCancelable)(async signal => {
4668
- const data = { ...this._seedData,
4669
- ...this._parseSelector(id)
4670
- };
4671
- let url = this.new(data).url;
4672
-
4673
- if (typeof deleted === 'string') {
4674
- const glue = url.includes('?') ? '&' : '?';
4675
- url += glue + (0,_utils_requests__WEBPACK_IMPORTED_MODULE_0__.encodeQueryString)({
4676
- deleted
4677
- });
4678
- }
4679
-
4680
- const {
4681
- data: result
4682
- } = await this.api.ky.get(url, {
4683
- signal
4684
- }).json();
4685
- return this.new(result);
4686
- });
4687
- }
4688
- /**
4689
- * Select target resource without obtaining data
4690
- * @param {Number|String} [id=] - Resource id
4691
- * @returns {ResourceBase} - Empty target resource
4692
- * @example
4693
- * api.users.select('me').colors().then(doSomethingCool);
4694
- */
4695
-
4696
-
4697
- select(id) {
4698
- const data = { ...this._seedData,
4699
- ...this._parseSelector(id)
4700
- };
4701
- return this.new(data);
4702
- }
4703
-
4704
- }
4705
-
4706
4717
  /***/ }),
4707
4718
  /* 20 */
4708
4719
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -4711,7 +4722,7 @@ __webpack_require__.r(__webpack_exports__);
4711
4722
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4712
4723
  /* harmony export */ "default": () => (/* binding */ OwnedResourceProxy)
4713
4724
  /* harmony export */ });
4714
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
4725
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
4715
4726
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
4716
4727
  /*
4717
4728
  * BSD 3-Clause License
@@ -4966,7 +4977,7 @@ __webpack_require__.d(__webpack_exports__, {
4966
4977
  });
4967
4978
 
4968
4979
  // EXTERNAL MODULE: ./src/utils/StaticClass.js
4969
- var StaticClass = __webpack_require__(32);
4980
+ var StaticClass = __webpack_require__(33);
4970
4981
  // EXTERNAL MODULE: ./src/utils/node.js
4971
4982
  var node = __webpack_require__(9);
4972
4983
  // EXTERNAL MODULE: ./src/storage/DataStoreContract.js
@@ -5108,7 +5119,7 @@ class CookiesDriver extends DataStoreContract["default"] {
5108
5119
 
5109
5120
  }
5110
5121
  // EXTERNAL MODULE: external "@babel/runtime/helpers/defineProperty"
5111
- var defineProperty_ = __webpack_require__(17);
5122
+ var defineProperty_ = __webpack_require__(18);
5112
5123
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);
5113
5124
  ;// CONCATENATED MODULE: ./src/storage/DummyDriver.js
5114
5125
 
@@ -6009,7 +6020,7 @@ __webpack_require__.r(__webpack_exports__);
6009
6020
  /* harmony export */ "default": () => (/* binding */ Layer)
6010
6021
  /* harmony export */ });
6011
6022
  /* harmony import */ var _traits_HandlesImages__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50);
6012
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
6023
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
6013
6024
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
6014
6025
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
6015
6026
  /*
@@ -6074,15 +6085,15 @@ __webpack_require__.d(__webpack_exports__, {
6074
6085
  });
6075
6086
 
6076
6087
  // EXTERNAL MODULE: ./src/traits/OwnableResource.js
6077
- var OwnableResource = __webpack_require__(5);
6088
+ var OwnableResource = __webpack_require__(4);
6078
6089
  // EXTERNAL MODULE: ./src/utils/reflection.js
6079
6090
  var reflection = __webpack_require__(0);
6080
6091
  // EXTERNAL MODULE: ./src/resources/base/CrudSetBase.js
6081
- var CrudSetBase = __webpack_require__(14);
6092
+ var CrudSetBase = __webpack_require__(15);
6082
6093
  // EXTERNAL MODULE: ./src/resources/Mapstyle.js
6083
6094
  var Mapstyle = __webpack_require__(66);
6084
6095
  // EXTERNAL MODULE: ./src/proxy/ResourceProxy.js
6085
- var ResourceProxy = __webpack_require__(19);
6096
+ var ResourceProxy = __webpack_require__(13);
6086
6097
  // EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
6087
6098
  var CrudSetItemBase = __webpack_require__(10);
6088
6099
  ;// CONCATENATED MODULE: ./src/resources/MapstyleSetColor.js
@@ -6211,7 +6222,7 @@ __webpack_require__.r(__webpack_exports__);
6211
6222
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6212
6223
  /* harmony export */ "default": () => (/* binding */ Tag)
6213
6224
  /* harmony export */ });
6214
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
6225
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
6215
6226
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
6216
6227
  /* harmony import */ var _base_CrudSetItemBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
6217
6228
  /*
@@ -6267,18 +6278,61 @@ class Tag extends (0,_utils_reflection__WEBPACK_IMPORTED_MODULE_1__.mix)(_base_C
6267
6278
 
6268
6279
  /***/ }),
6269
6280
  /* 30 */
6270
- /***/ ((module) => {
6271
-
6272
- module.exports = require("ky-universal");
6273
-
6274
- /***/ }),
6275
- /* 31 */
6276
6281
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6277
6282
 
6283
+ // ESM COMPAT FLAG
6278
6284
  __webpack_require__.r(__webpack_exports__);
6279
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6280
- /* harmony export */ "default": () => (/* binding */ Trait)
6281
- /* harmony export */ });
6285
+
6286
+ // EXPORTS
6287
+ __webpack_require__.d(__webpack_exports__, {
6288
+ "Choropleth": () => (/* reexport */ Choropleth),
6289
+ "Color": () => (/* reexport */ Color["default"]),
6290
+ "Contract": () => (/* reexport */ Contract["default"]),
6291
+ "Dimension": () => (/* reexport */ Dimension["default"]),
6292
+ "DimensionSet": () => (/* reexport */ DimensionSet["default"]),
6293
+ "Domain": () => (/* reexport */ Domain["default"]),
6294
+ "Faq": () => (/* reexport */ Faq),
6295
+ "Feature": () => (/* reexport */ Feature["default"]),
6296
+ "Font": () => (/* reexport */ Font["default"]),
6297
+ "FontFamily": () => (/* reexport */ FontFamily["default"]),
6298
+ "Highlight": () => (/* reexport */ Highlight),
6299
+ "InsetMap": () => (/* reexport */ InsetMap),
6300
+ "Job": () => (/* reexport */ Job["default"]),
6301
+ "JobResult": () => (/* reexport */ JobResult["default"]),
6302
+ "JobRevision": () => (/* reexport */ JobRevision["default"]),
6303
+ "JobShare": () => (/* reexport */ JobShare["default"]),
6304
+ "JobType": () => (/* reexport */ JobType["default"]),
6305
+ "Language": () => (/* reexport */ Language["default"]),
6306
+ "Layer": () => (/* reexport */ Layer["default"]),
6307
+ "LayerFaq": () => (/* reexport */ LayerFaq),
6308
+ "LayerGroup": () => (/* reexport */ LayerGroup["default"]),
6309
+ "Mapstyle": () => (/* reexport */ Mapstyle["default"]),
6310
+ "MapstyleSet": () => (/* reexport */ MapstyleSet["default"]),
6311
+ "Message": () => (/* reexport */ Message["default"]),
6312
+ "Notification": () => (/* reexport */ Notification["default"]),
6313
+ "Organisation": () => (/* reexport */ Organisation["default"]),
6314
+ "OrganisationNote": () => (/* reexport */ OrganisationNote),
6315
+ "Permission": () => (/* reexport */ Permission["default"]),
6316
+ "ProductTour": () => (/* reexport */ ProductTour),
6317
+ "ProductTourStep": () => (/* reexport */ ProductTourStep),
6318
+ "Role": () => (/* reexport */ Role["default"]),
6319
+ "Svg": () => (/* reexport */ Svg["default"]),
6320
+ "SvgSet": () => (/* reexport */ SvgSet["default"]),
6321
+ "Tag": () => (/* reexport */ Tag["default"]),
6322
+ "TagType": () => (/* reexport */ TagType),
6323
+ "User": () => (/* reexport */ User["default"]),
6324
+ "VectorChoropleth": () => (/* reexport */ VectorChoropleth),
6325
+ "VectorHighlight": () => (/* reexport */ VectorHighlight),
6326
+ "base": () => (/* binding */ base)
6327
+ });
6328
+
6329
+ // EXTERNAL MODULE: ./src/resources/base/DownloadedResource.js + 1 modules
6330
+ var DownloadedResource = __webpack_require__(25);
6331
+ // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
6332
+ var ResourceBase = __webpack_require__(3);
6333
+ // EXTERNAL MODULE: ./src/utils/helpers.js
6334
+ var helpers = __webpack_require__(1);
6335
+ ;// CONCATENATED MODULE: ./src/resources/Choropleth.js
6282
6336
  /*
6283
6337
  * BSD 3-Clause License
6284
6338
  *
@@ -6311,28 +6365,58 @@ __webpack_require__.r(__webpack_exports__);
6311
6365
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6312
6366
  */
6313
6367
 
6368
+
6369
+
6314
6370
  /**
6315
- * Trait interface
6316
- * @interface
6317
- * @mixin
6371
+ * Choropleth resource
6318
6372
  */
6319
- class Trait {
6373
+
6374
+ class Choropleth extends ResourceBase["default"] {
6375
+ static get resourceName() {
6376
+ return 'choropleths';
6377
+ }
6320
6378
  /**
6321
- * Optional initialization method
6379
+ * Get the inset map json
6380
+ * @returns {CancelablePromise<Object>} - Choropleth json
6381
+ * @throws {ApiError} - If the api returns errors
6322
6382
  */
6323
- initializer() {}
6324
6383
 
6325
- }
6326
6384
 
6327
- /***/ }),
6328
- /* 32 */
6329
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6385
+ getJson() {
6386
+ return (0,helpers.makeCancelable)(signal => this.api.ky.get(`${this.url}/json`, {
6387
+ signal
6388
+ }).json());
6389
+ }
6390
+ /**
6391
+ * Download the choropleth preview
6392
+ * @returns {CancelablePromise<DownloadedResource>} - Choropleth preview
6393
+ * @throws {ApiError} - If the api returns errors
6394
+ */
6330
6395
 
6331
- __webpack_require__.r(__webpack_exports__);
6332
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6333
- /* harmony export */ "default": () => (/* binding */ StaticClass)
6334
- /* harmony export */ });
6335
- /* harmony import */ var _errors_StaticClassError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
6396
+
6397
+ downloadPreview() {
6398
+ return (0,helpers.makeCancelable)(async signal => {
6399
+ const response = await this.api.ky.get(`${this.url}/preview`, {
6400
+ signal
6401
+ });
6402
+ return DownloadedResource["default"].fromResponse(response);
6403
+ });
6404
+ }
6405
+
6406
+ }
6407
+ // EXTERNAL MODULE: ./src/resources/Color.js
6408
+ var Color = __webpack_require__(42);
6409
+ // EXTERNAL MODULE: ./src/resources/Contract.js
6410
+ var Contract = __webpack_require__(63);
6411
+ // EXTERNAL MODULE: ./src/resources/Dimension.js
6412
+ var Dimension = __webpack_require__(44);
6413
+ // EXTERNAL MODULE: ./src/resources/DimensionSet.js
6414
+ var DimensionSet = __webpack_require__(43);
6415
+ // EXTERNAL MODULE: ./src/resources/Domain.js
6416
+ var Domain = __webpack_require__(64);
6417
+ // EXTERNAL MODULE: ./src/resources/base/CrudBase.js
6418
+ var CrudBase = __webpack_require__(2);
6419
+ ;// CONCATENATED MODULE: ./src/resources/Faq.js
6336
6420
  /*
6337
6421
  * BSD 3-Clause License
6338
6422
  *
@@ -6366,28 +6450,22 @@ __webpack_require__.r(__webpack_exports__);
6366
6450
  */
6367
6451
 
6368
6452
  /**
6369
- * Disables the constructor and throws a {@link StaticClassError} when an instance is created.
6370
- * @protected
6453
+ * Faq resource
6371
6454
  */
6372
6455
 
6373
- class StaticClass {
6374
- constructor() {
6375
- throw new _errors_StaticClassError__WEBPACK_IMPORTED_MODULE_0__["default"]();
6456
+ class Faq extends CrudBase["default"] {
6457
+ static get resourceName() {
6458
+ return 'faqs';
6376
6459
  }
6377
6460
 
6378
6461
  }
6379
-
6380
- /***/ }),
6381
- /* 33 */
6382
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6383
-
6384
- __webpack_require__.r(__webpack_exports__);
6385
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6386
- /* harmony export */ "default": () => (/* binding */ OrganisationProxy)
6387
- /* harmony export */ });
6388
- /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
6389
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
6390
- /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
6462
+ // EXTERNAL MODULE: ./src/resources/Feature.js
6463
+ var Feature = __webpack_require__(45);
6464
+ // EXTERNAL MODULE: ./src/resources/Font.js
6465
+ var Font = __webpack_require__(47);
6466
+ // EXTERNAL MODULE: ./src/resources/FontFamily.js
6467
+ var FontFamily = __webpack_require__(46);
6468
+ ;// CONCATENATED MODULE: ./src/resources/Highlight.js
6391
6469
  /*
6392
6470
  * BSD 3-Clause License
6393
6471
  *
@@ -6420,170 +6498,85 @@ __webpack_require__.r(__webpack_exports__);
6420
6498
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6421
6499
  */
6422
6500
 
6423
-
6424
-
6425
- class OrganisationProxy extends _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__["default"] {
6426
- /**
6427
- * @param {Mapcreator} api - Instance of the api
6428
- * @param {ResourceBase} parent - Parent instance
6429
- */
6430
- constructor(api, parent) {
6431
- // Fixes dependency issue
6432
- const Organisation = (__webpack_require__(41)["default"]);
6433
-
6434
- super(api, Organisation, `${parent.url}/organisations`, {});
6435
- this._parent = parent;
6436
- }
6437
- /**
6438
- * Returns parent instance
6439
- * @returns {ResourceBase} - Parent instance
6440
- */
6441
-
6442
-
6443
- get parent() {
6444
- return this._parent;
6445
- }
6446
- /**
6447
- * Sync organisations to the parent resource
6448
- * The organisations attached to the target resource will be replaced with the organisations provided in the request.
6449
- * @param {Array<Organisation|number>} organisations - List of items to sync
6450
- * @throws {ApiError} - If the api returns errors
6451
- * @returns {CancelablePromise}
6452
- */
6453
-
6454
-
6455
- sync(organisations) {
6456
- return this._modifyLink(organisations, 'PATCH', this.Target);
6501
+ class Highlight extends ResourceBase["default"] {
6502
+ static get resourceName() {
6503
+ return 'highlights';
6457
6504
  }
6458
- /**
6459
- * Attach organisations to the parent resource
6460
- * The provided organisations will be attached to the resource if they're not already attached
6461
- * @param {Array<Organisation|number>} organisations - List of items to attach
6462
- * @throws {ApiError} - If the api returns errors
6463
- * @returns {CancelablePromise}
6464
- */
6465
-
6466
6505
 
6467
- attach(organisations) {
6468
- return this._modifyLink(organisations, 'POST', this.Target);
6469
- }
6470
- /**
6471
- * Detach organisations from the parent resource
6472
- * The provided organisations will be detached from the resource
6473
- * @param {Array<Organisation|number>} organisations - List of items to detach
6474
- * @throws {ApiError} - If the api returns errors
6475
- * @returns {CancelablePromise}
6476
- */
6506
+ }
6507
+ ;// CONCATENATED MODULE: ./src/resources/InsetMap.js
6508
+ /*
6509
+ * BSD 3-Clause License
6510
+ *
6511
+ * Copyright (c) 2020, Mapcreator
6512
+ * All rights reserved.
6513
+ *
6514
+ * Redistribution and use in source and binary forms, with or without
6515
+ * modification, are permitted provided that the following conditions are met:
6516
+ *
6517
+ * Redistributions of source code must retain the above copyright notice, this
6518
+ * list of conditions and the following disclaimer.
6519
+ *
6520
+ * Redistributions in binary form must reproduce the above copyright notice,
6521
+ * this list of conditions and the following disclaimer in the documentation
6522
+ * and/or other materials provided with the distribution.
6523
+ *
6524
+ * Neither the name of the copyright holder nor the names of its
6525
+ * contributors may be used to endorse or promote products derived from
6526
+ * this software without specific prior written permission.
6527
+ *
6528
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
6529
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6530
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6531
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
6532
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6533
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
6534
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
6535
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
6536
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
6537
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6538
+ */
6477
6539
 
6478
6540
 
6479
- detach(organisations) {
6480
- return this._modifyLink(organisations, 'DELETE', this.Target);
6541
+ class InsetMap extends ResourceBase["default"] {
6542
+ static get resourceName() {
6543
+ return 'inset-maps';
6481
6544
  }
6482
6545
  /**
6483
- * Attach all organisations to the parent resource
6546
+ * Get the inset map json
6547
+ * @returns {CancelablePromise<Object>} - Inset map json
6484
6548
  * @throws {ApiError} - If the api returns errors
6485
- * @returns {CancelablePromise}
6486
6549
  */
6487
6550
 
6488
6551
 
6489
- attachAll() {
6490
- return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_2__.makeCancelable)(async signal => {
6491
- await this.api.ky.post(`${this.baseUrl}/all`, {
6492
- signal
6493
- });
6494
- });
6495
- }
6496
- /**
6497
- * Detach all organisations from the parent resource
6498
- * @throws {ApiError} - If the api returns errors
6499
- * @returns {CancelablePromise}
6500
- */
6501
-
6502
-
6503
- detachAll() {
6504
- return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_2__.makeCancelable)(async signal => {
6505
- await this.api.ky.delete(`${this.baseUrl}/all`, {
6506
- signal
6507
- });
6508
- });
6509
- }
6510
- /**
6511
- * Sync, attach or unlink resources
6512
- * @param {Array<Organisation|Number>|Organisation|Number} items - List of items to sync or attach
6513
- * @param {String} method - Http method to use
6514
- * @param {Class<ResourceBase>} Type - Resource type
6515
- * @param {?String} path - Optional appended resource path, will guess if null
6516
- * @throws {ApiError} - If the api returns errors
6517
- * @protected
6518
- * @returns {CancelablePromise}
6519
- */
6520
-
6521
-
6522
- _modifyLink(items, method, Type, path = null) {
6523
- if (!Array.isArray(items)) {
6524
- items = [items];
6525
- }
6526
-
6527
- if (!path) {
6528
- const resource = Type.resourceName.replace(/s+$/, '');
6529
- path = `${resource}s`;
6530
- }
6531
-
6532
- const keys = items.map(x => typeof x === 'number' ? x : x.id).map(Number);
6533
-
6534
- const filter = x => !(0,_utils_reflection__WEBPACK_IMPORTED_MODULE_0__.isParentOf)(Type, x) && !Number.isFinite(x);
6535
-
6536
- const isValid = keys.filter(filter).length === 0;
6537
-
6538
- if (!isValid) {
6539
- throw new TypeError(`Array must contain either Numbers (resource id) or "${Type.name}".`);
6540
- }
6541
-
6542
- const url = `${this.parent.url}/${path}`;
6543
- return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_2__.makeCancelable)(async signal => {
6544
- await this.api.ky(url, {
6545
- method,
6546
- signal,
6547
- json: {
6548
- keys
6549
- }
6550
- });
6551
- });
6552
+ getJson() {
6553
+ return (0,helpers.makeCancelable)(signal => this.api.ky.get(`${this.url}/json`, {
6554
+ signal
6555
+ }).json());
6552
6556
  }
6553
6557
 
6554
6558
  }
6555
-
6556
- /***/ }),
6557
- /* 34 */
6558
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6559
-
6560
- // ESM COMPAT FLAG
6561
- __webpack_require__.r(__webpack_exports__);
6562
-
6563
- // EXPORTS
6564
- __webpack_require__.d(__webpack_exports__, {
6565
- "AbstractClassError": () => (/* reexport */ AbstractError.AbstractClassError),
6566
- "AbstractError": () => (/* reexport */ AbstractError.AbstractError),
6567
- "AbstractMethodError": () => (/* reexport */ AbstractError.AbstractMethodError),
6568
- "ApiError": () => (/* reexport */ ApiError["default"]),
6569
- "GeoError": () => (/* reexport */ GeoError["default"]),
6570
- "NodeError": () => (/* reexport */ NodeError),
6571
- "OAuthError": () => (/* reexport */ OAuthError["default"]),
6572
- "StaticClassError": () => (/* reexport */ StaticClassError["default"]),
6573
- "ValidationError": () => (/* reexport */ ValidationError["default"])
6574
- });
6575
-
6576
- // EXTERNAL MODULE: ./src/errors/AbstractError.js
6577
- var AbstractError = __webpack_require__(21);
6578
- // EXTERNAL MODULE: ./src/errors/ApiError.js
6579
- var ApiError = __webpack_require__(62);
6580
- // EXTERNAL MODULE: ./src/errors/ValidationError.js
6581
- var ValidationError = __webpack_require__(74);
6582
- ;// CONCATENATED MODULE: ./src/errors/NodeError.js
6559
+ // EXTERNAL MODULE: ./src/resources/Job.js
6560
+ var Job = __webpack_require__(48);
6561
+ // EXTERNAL MODULE: ./src/resources/JobResult.js
6562
+ var JobResult = __webpack_require__(49);
6563
+ // EXTERNAL MODULE: ./src/resources/JobRevision.js
6564
+ var JobRevision = __webpack_require__(65);
6565
+ // EXTERNAL MODULE: ./src/resources/JobShare.js
6566
+ var JobShare = __webpack_require__(26);
6567
+ // EXTERNAL MODULE: ./src/resources/JobType.js
6568
+ var JobType = __webpack_require__(51);
6569
+ // EXTERNAL MODULE: ./src/resources/Language.js
6570
+ var Language = __webpack_require__(67);
6571
+ // EXTERNAL MODULE: ./src/resources/Layer.js
6572
+ var Layer = __webpack_require__(27);
6573
+ // EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
6574
+ var CrudSetItemBase = __webpack_require__(10);
6575
+ ;// CONCATENATED MODULE: ./src/resources/LayerFaq.js
6583
6576
  /*
6584
6577
  * BSD 3-Clause License
6585
6578
  *
6586
- * Copyright (c) 2020, Mapcreator
6579
+ * Copyright (c) 2022, Mapcreator
6587
6580
  * All rights reserved.
6588
6581
  *
6589
6582
  * Redistribution and use in source and binary forms, with or without
@@ -6613,16 +6606,37 @@ var ValidationError = __webpack_require__(74);
6613
6606
  */
6614
6607
 
6615
6608
  /**
6616
- * Invoked upon nodejs specific errors
6609
+ * LayerFaq
6610
+ * @extends CrudSetItemBase
6617
6611
  */
6618
- class NodeError extends Error {}
6619
- // EXTERNAL MODULE: ./src/errors/OAuthError.js
6620
- var OAuthError = __webpack_require__(16);
6621
- // EXTERNAL MODULE: ./src/errors/StaticClassError.js
6622
- var StaticClassError = __webpack_require__(57);
6623
- // EXTERNAL MODULE: ./src/errors/GeoError.js
6624
- var GeoError = __webpack_require__(39);
6625
- ;// CONCATENATED MODULE: ./src/errors/index.js
6612
+
6613
+ class LayerFaq extends CrudSetItemBase["default"] {
6614
+ static get resourceName() {
6615
+ return 'layer-faqs';
6616
+ }
6617
+
6618
+ static get parentKey() {
6619
+ return 'layer_group_id';
6620
+ }
6621
+
6622
+ }
6623
+ // EXTERNAL MODULE: ./src/resources/LayerGroup.js
6624
+ var LayerGroup = __webpack_require__(70);
6625
+ // EXTERNAL MODULE: ./src/resources/Mapstyle.js
6626
+ var Mapstyle = __webpack_require__(66);
6627
+ // EXTERNAL MODULE: ./src/resources/MapstyleSet.js + 1 modules
6628
+ var MapstyleSet = __webpack_require__(28);
6629
+ // EXTERNAL MODULE: ./src/resources/Message.js + 1 modules
6630
+ var Message = __webpack_require__(36);
6631
+ // EXTERNAL MODULE: ./src/resources/Notification.js
6632
+ var Notification = __webpack_require__(68);
6633
+ // EXTERNAL MODULE: ./src/resources/Organisation.js
6634
+ var Organisation = __webpack_require__(41);
6635
+ // EXTERNAL MODULE: ./src/traits/OwnableResource.js
6636
+ var OwnableResource = __webpack_require__(4);
6637
+ // EXTERNAL MODULE: ./src/utils/reflection.js
6638
+ var reflection = __webpack_require__(0);
6639
+ ;// CONCATENATED MODULE: ./src/resources/OrganisationNote.js
6626
6640
  /*
6627
6641
  * BSD 3-Clause License
6628
6642
  *
@@ -6657,28 +6671,82 @@ var GeoError = __webpack_require__(39);
6657
6671
 
6658
6672
 
6659
6673
 
6674
+ /**
6675
+ * Font family
6676
+ * @extends CrudSetBase
6677
+ * @mixes OwnableResource
6678
+ *
6679
+ * @property {number} id
6680
+ * @property {number} organisationId
6681
+ * @property {number} userId
6682
+ * @property {string} content
6683
+ * @property {Date} createdAt
6684
+ * @property {Date} updatedAt
6685
+ */
6660
6686
 
6687
+ class OrganisationNote extends (0,reflection.mix)(CrudBase["default"], OwnableResource["default"]) {
6688
+ static get resourcePath() {
6689
+ return '/organisations/{organisation_id}/notes/{id}';
6690
+ }
6661
6691
 
6692
+ static get resourceName() {
6693
+ return 'notes';
6694
+ }
6662
6695
 
6696
+ }
6697
+ // EXTERNAL MODULE: ./src/resources/Permission.js
6698
+ var Permission = __webpack_require__(55);
6699
+ // EXTERNAL MODULE: ./src/resources/base/CrudSetBase.js
6700
+ var CrudSetBase = __webpack_require__(15);
6701
+ ;// CONCATENATED MODULE: ./src/resources/ProductTourStep.js
6702
+ /*
6703
+ * BSD 3-Clause License
6704
+ *
6705
+ * Copyright (c) 2020, Mapcreator
6706
+ * All rights reserved.
6707
+ *
6708
+ * Redistribution and use in source and binary forms, with or without
6709
+ * modification, are permitted provided that the following conditions are met:
6710
+ *
6711
+ * Redistributions of source code must retain the above copyright notice, this
6712
+ * list of conditions and the following disclaimer.
6713
+ *
6714
+ * Redistributions in binary form must reproduce the above copyright notice,
6715
+ * this list of conditions and the following disclaimer in the documentation
6716
+ * and/or other materials provided with the distribution.
6717
+ *
6718
+ * Neither the name of the copyright holder nor the names of its
6719
+ * contributors may be used to endorse or promote products derived from
6720
+ * this software without specific prior written permission.
6721
+ *
6722
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
6723
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6724
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6725
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
6726
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6727
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
6728
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
6729
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
6730
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
6731
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6732
+ */
6663
6733
 
6664
6734
 
6665
- /***/ }),
6666
- /* 35 */
6667
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6735
+ /**
6736
+ * @extends CrudSetItemBase
6737
+ */
6668
6738
 
6669
- // ESM COMPAT FLAG
6670
- __webpack_require__.r(__webpack_exports__);
6739
+ class ProductTourStep extends (0,reflection.mix)(CrudSetItemBase["default"]) {
6740
+ static get resourceName() {
6741
+ return 'product-tours/steps';
6742
+ }
6671
6743
 
6672
- // EXPORTS
6673
- __webpack_require__.d(__webpack_exports__, {
6674
- "default": () => (/* binding */ Message)
6675
- });
6744
+ static get parentKey() {
6745
+ return 'product_tour_id';
6746
+ }
6676
6747
 
6677
- // EXTERNAL MODULE: ./src/resources/base/CrudBase.js
6678
- var CrudBase = __webpack_require__(2);
6679
- // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
6680
- var ResourceBase = __webpack_require__(3);
6681
- ;// CONCATENATED MODULE: ./src/resources/MessageVariant.js
6748
+ }
6749
+ ;// CONCATENATED MODULE: ./src/resources/ProductTour.js
6682
6750
  /*
6683
6751
  * BSD 3-Clause License
6684
6752
  *
@@ -6711,12 +6779,36 @@ var ResourceBase = __webpack_require__(3);
6711
6779
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6712
6780
  */
6713
6781
 
6714
- class MessageVariant extends ResourceBase["default"] {}
6715
- // EXTERNAL MODULE: ./src/utils/helpers.js
6716
- var helpers = __webpack_require__(1);
6717
- // EXTERNAL MODULE: external "case"
6718
- var external_case_ = __webpack_require__(8);
6719
- ;// CONCATENATED MODULE: ./src/resources/Message.js
6782
+
6783
+
6784
+ /**
6785
+ * Mapstyle set
6786
+ * @extends CrudSetBase
6787
+ */
6788
+
6789
+ class ProductTour extends (0,reflection.mix)(CrudSetBase["default"]) {
6790
+ static get resourcePath() {
6791
+ return '/product-tours/{id}';
6792
+ }
6793
+
6794
+ static get resourceName() {
6795
+ return 'product-tours';
6796
+ }
6797
+
6798
+ get _Child() {
6799
+ return ProductTourStep;
6800
+ }
6801
+
6802
+ }
6803
+ // EXTERNAL MODULE: ./src/resources/Role.js
6804
+ var Role = __webpack_require__(69);
6805
+ // EXTERNAL MODULE: ./src/resources/Svg.js
6806
+ var Svg = __webpack_require__(53);
6807
+ // EXTERNAL MODULE: ./src/resources/SvgSet.js
6808
+ var SvgSet = __webpack_require__(52);
6809
+ // EXTERNAL MODULE: ./src/resources/Tag.js
6810
+ var Tag = __webpack_require__(29);
6811
+ ;// CONCATENATED MODULE: ./src/resources/TagType.js
6720
6812
  /*
6721
6813
  * BSD 3-Clause License
6722
6814
  *
@@ -6750,122 +6842,33 @@ var external_case_ = __webpack_require__(8);
6750
6842
  */
6751
6843
 
6752
6844
 
6845
+ /**
6846
+ * TagType resource
6847
+ * @mixes CrudSetBase
6848
+ */
6753
6849
 
6850
+ class TagType extends CrudBase["default"] {
6851
+ static get resourcePath() {
6852
+ return '/tags/types/{id}';
6853
+ }
6754
6854
 
6755
- class Message extends CrudBase["default"] {
6756
6855
  static get resourceName() {
6757
- return 'messages';
6856
+ return 'tag-types';
6758
6857
  }
6858
+ /**
6859
+ * Get the list of tags that are attached to this type
6860
+ * @returns {SimpleResourceProxy} - A proxy for accessing the resource
6861
+ */
6759
6862
 
6760
- toObject(camelCaseKeys = false) {
6761
- const superObject = super.toObject(camelCaseKeys);
6762
- superObject.variants = superObject.variants.map(variant => {
6763
- if (variant instanceof MessageVariant) {
6764
- return variant.toObject(camelCaseKeys);
6765
- }
6766
-
6767
- const caseFn = camelCaseKeys ? external_case_.camel : external_case_.snake;
6768
- const res = {};
6769
- const fields = Object.keys(variant);
6770
-
6771
- for (const field of fields) {
6772
- res[caseFn(field)] = variant[field];
6773
- }
6774
-
6775
- return res;
6776
- });
6777
- return superObject;
6778
- }
6779
6863
 
6780
- _guessType(name, value) {
6781
- if (name === 'variants') {
6782
- return Array.from(value).map(data => new MessageVariant(this.api, data));
6783
- }
6784
-
6785
- return super._guessType(name, value);
6786
- }
6787
-
6788
- _buildCreateData() {
6789
- return this.toObject();
6790
- }
6791
-
6792
- _update() {
6793
- return (0,helpers.makeCancelable)(async signal => {
6794
- const json = this.toObject();
6795
- await this.api.ky.patch(this.url, {
6796
- json,
6797
- signal
6798
- }); // Reset changes
6799
-
6800
- Object.assign(this._baseProperties, this._properties);
6801
- this._properties = {};
6802
-
6803
- if ('updated_at' in this._baseProperties) {
6804
- this._baseProperties['updated_at'] = new Date();
6805
- }
6806
-
6807
- return this;
6808
- });
6864
+ get tags() {
6865
+ return this._proxyResourceList(Tag["default"], `${this.url}/tags`);
6809
6866
  }
6810
6867
 
6811
6868
  }
6812
-
6813
- /***/ }),
6814
- /* 36 */
6815
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6816
-
6817
- // ESM COMPAT FLAG
6818
- __webpack_require__.r(__webpack_exports__);
6819
-
6820
- // EXPORTS
6821
- __webpack_require__.d(__webpack_exports__, {
6822
- "Choropleth": () => (/* reexport */ Choropleth),
6823
- "Color": () => (/* reexport */ Color["default"]),
6824
- "Contract": () => (/* reexport */ Contract["default"]),
6825
- "Dimension": () => (/* reexport */ Dimension["default"]),
6826
- "DimensionSet": () => (/* reexport */ DimensionSet["default"]),
6827
- "Domain": () => (/* reexport */ Domain["default"]),
6828
- "Faq": () => (/* reexport */ Faq),
6829
- "Feature": () => (/* reexport */ Feature["default"]),
6830
- "Font": () => (/* reexport */ Font["default"]),
6831
- "FontFamily": () => (/* reexport */ FontFamily["default"]),
6832
- "Highlight": () => (/* reexport */ Highlight),
6833
- "InsetMap": () => (/* reexport */ InsetMap),
6834
- "Job": () => (/* reexport */ Job["default"]),
6835
- "JobResult": () => (/* reexport */ JobResult["default"]),
6836
- "JobRevision": () => (/* reexport */ JobRevision["default"]),
6837
- "JobShare": () => (/* reexport */ JobShare["default"]),
6838
- "JobType": () => (/* reexport */ JobType["default"]),
6839
- "Language": () => (/* reexport */ Language["default"]),
6840
- "Layer": () => (/* reexport */ Layer["default"]),
6841
- "LayerFaq": () => (/* reexport */ LayerFaq),
6842
- "LayerGroup": () => (/* reexport */ LayerGroup["default"]),
6843
- "Mapstyle": () => (/* reexport */ Mapstyle["default"]),
6844
- "MapstyleSet": () => (/* reexport */ MapstyleSet["default"]),
6845
- "Message": () => (/* reexport */ Message["default"]),
6846
- "Notification": () => (/* reexport */ Notification["default"]),
6847
- "Organisation": () => (/* reexport */ Organisation["default"]),
6848
- "Permission": () => (/* reexport */ Permission["default"]),
6849
- "ProductTour": () => (/* reexport */ ProductTour),
6850
- "ProductTourStep": () => (/* reexport */ ProductTourStep),
6851
- "Role": () => (/* reexport */ Role["default"]),
6852
- "Svg": () => (/* reexport */ Svg["default"]),
6853
- "SvgSet": () => (/* reexport */ SvgSet["default"]),
6854
- "Tag": () => (/* reexport */ Tag["default"]),
6855
- "TagType": () => (/* reexport */ TagType),
6856
- "User": () => (/* reexport */ User["default"]),
6857
- "VectorChoropleth": () => (/* reexport */ VectorChoropleth),
6858
- "VectorHighlight": () => (/* reexport */ VectorHighlight),
6859
- "base": () => (/* binding */ base)
6860
- });
6861
-
6862
- // EXTERNAL MODULE: ./src/resources/base/DownloadedResource.js + 1 modules
6863
- var DownloadedResource = __webpack_require__(25);
6864
- // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
6865
- var ResourceBase = __webpack_require__(3);
6866
- // EXTERNAL MODULE: ./src/utils/helpers.js
6867
- var helpers = __webpack_require__(1);
6868
- ;// CONCATENATED MODULE: ./src/resources/Choropleth.js
6869
+ // EXTERNAL MODULE: ./src/resources/User.js
6870
+ var User = __webpack_require__(54);
6871
+ ;// CONCATENATED MODULE: ./src/resources/VectorHighlight.js
6869
6872
  /*
6870
6873
  * BSD 3-Clause License
6871
6874
  *
@@ -6898,58 +6901,13 @@ var helpers = __webpack_require__(1);
6898
6901
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6899
6902
  */
6900
6903
 
6901
-
6902
-
6903
- /**
6904
- * Choropleth resource
6905
- */
6906
-
6907
- class Choropleth extends ResourceBase["default"] {
6904
+ class VectorHighlight extends ResourceBase["default"] {
6908
6905
  static get resourceName() {
6909
- return 'choropleths';
6910
- }
6911
- /**
6912
- * Get the inset map json
6913
- * @returns {CancelablePromise<Object>} - Choropleth json
6914
- * @throws {ApiError} - If the api returns errors
6915
- */
6916
-
6917
-
6918
- getJson() {
6919
- return (0,helpers.makeCancelable)(signal => this.api.ky.get(`${this.url}/json`, {
6920
- signal
6921
- }).json());
6922
- }
6923
- /**
6924
- * Download the choropleth preview
6925
- * @returns {CancelablePromise<DownloadedResource>} - Choropleth preview
6926
- * @throws {ApiError} - If the api returns errors
6927
- */
6928
-
6929
-
6930
- downloadPreview() {
6931
- return (0,helpers.makeCancelable)(async signal => {
6932
- const response = await this.api.ky.get(`${this.url}/preview`, {
6933
- signal
6934
- });
6935
- return DownloadedResource["default"].fromResponse(response);
6936
- });
6906
+ return 'highlights/vector';
6937
6907
  }
6938
6908
 
6939
6909
  }
6940
- // EXTERNAL MODULE: ./src/resources/Color.js
6941
- var Color = __webpack_require__(42);
6942
- // EXTERNAL MODULE: ./src/resources/Contract.js
6943
- var Contract = __webpack_require__(63);
6944
- // EXTERNAL MODULE: ./src/resources/Dimension.js
6945
- var Dimension = __webpack_require__(44);
6946
- // EXTERNAL MODULE: ./src/resources/DimensionSet.js
6947
- var DimensionSet = __webpack_require__(43);
6948
- // EXTERNAL MODULE: ./src/resources/Domain.js
6949
- var Domain = __webpack_require__(64);
6950
- // EXTERNAL MODULE: ./src/resources/base/CrudBase.js
6951
- var CrudBase = __webpack_require__(2);
6952
- ;// CONCATENATED MODULE: ./src/resources/Faq.js
6910
+ ;// CONCATENATED MODULE: ./src/resources/VectorChoropleth.js
6953
6911
  /*
6954
6912
  * BSD 3-Clause License
6955
6913
  *
@@ -6982,23 +6940,13 @@ var CrudBase = __webpack_require__(2);
6982
6940
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6983
6941
  */
6984
6942
 
6985
- /**
6986
- * Faq resource
6987
- */
6988
-
6989
- class Faq extends CrudBase["default"] {
6943
+ class VectorChoropleth extends ResourceBase["default"] {
6990
6944
  static get resourceName() {
6991
- return 'faqs';
6945
+ return 'choropleths/vector';
6992
6946
  }
6993
6947
 
6994
6948
  }
6995
- // EXTERNAL MODULE: ./src/resources/Feature.js
6996
- var Feature = __webpack_require__(45);
6997
- // EXTERNAL MODULE: ./src/resources/Font.js
6998
- var Font = __webpack_require__(47);
6999
- // EXTERNAL MODULE: ./src/resources/FontFamily.js
7000
- var FontFamily = __webpack_require__(46);
7001
- ;// CONCATENATED MODULE: ./src/resources/Highlight.js
6949
+ ;// CONCATENATED MODULE: ./src/resources/index.js
7002
6950
  /*
7003
6951
  * BSD 3-Clause License
7004
6952
  *
@@ -7031,13 +6979,70 @@ var FontFamily = __webpack_require__(46);
7031
6979
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7032
6980
  */
7033
6981
 
7034
- class Highlight extends ResourceBase["default"] {
7035
- static get resourceName() {
7036
- return 'highlights';
7037
- }
7038
6982
 
7039
- }
7040
- ;// CONCATENATED MODULE: ./src/resources/InsetMap.js
6983
+
6984
+
6985
+
6986
+
6987
+
6988
+
6989
+
6990
+
6991
+
6992
+
6993
+
6994
+
6995
+
6996
+
6997
+
6998
+
6999
+
7000
+
7001
+
7002
+
7003
+
7004
+
7005
+
7006
+
7007
+
7008
+
7009
+
7010
+
7011
+
7012
+
7013
+
7014
+
7015
+
7016
+
7017
+
7018
+
7019
+
7020
+
7021
+
7022
+ /**
7023
+ * @private
7024
+ */
7025
+
7026
+ const base = {
7027
+ CrudBase: CrudBase["default"],
7028
+ CrudSetBase: CrudSetBase["default"],
7029
+ ResourceBase: ResourceBase["default"]
7030
+ };
7031
+
7032
+ /***/ }),
7033
+ /* 31 */
7034
+ /***/ ((module) => {
7035
+
7036
+ module.exports = require("ky-universal");
7037
+
7038
+ /***/ }),
7039
+ /* 32 */
7040
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
7041
+
7042
+ __webpack_require__.r(__webpack_exports__);
7043
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7044
+ /* harmony export */ "default": () => (/* binding */ Trait)
7045
+ /* harmony export */ });
7041
7046
  /*
7042
7047
  * BSD 3-Clause License
7043
7048
  *
@@ -7070,46 +7075,32 @@ class Highlight extends ResourceBase["default"] {
7070
7075
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7071
7076
  */
7072
7077
 
7073
-
7074
- class InsetMap extends ResourceBase["default"] {
7075
- static get resourceName() {
7076
- return 'inset-maps';
7077
- }
7078
+ /**
7079
+ * Trait interface
7080
+ * @interface
7081
+ * @mixin
7082
+ */
7083
+ class Trait {
7078
7084
  /**
7079
- * Get the inset map json
7080
- * @returns {CancelablePromise<Object>} - Inset map json
7081
- * @throws {ApiError} - If the api returns errors
7085
+ * Optional initialization method
7082
7086
  */
7087
+ initializer() {}
7083
7088
 
7089
+ }
7084
7090
 
7085
- getJson() {
7086
- return (0,helpers.makeCancelable)(signal => this.api.ky.get(`${this.url}/json`, {
7087
- signal
7088
- }).json());
7089
- }
7091
+ /***/ }),
7092
+ /* 33 */
7093
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
7090
7094
 
7091
- }
7092
- // EXTERNAL MODULE: ./src/resources/Job.js
7093
- var Job = __webpack_require__(48);
7094
- // EXTERNAL MODULE: ./src/resources/JobResult.js
7095
- var JobResult = __webpack_require__(49);
7096
- // EXTERNAL MODULE: ./src/resources/JobRevision.js
7097
- var JobRevision = __webpack_require__(65);
7098
- // EXTERNAL MODULE: ./src/resources/JobShare.js
7099
- var JobShare = __webpack_require__(26);
7100
- // EXTERNAL MODULE: ./src/resources/JobType.js
7101
- var JobType = __webpack_require__(51);
7102
- // EXTERNAL MODULE: ./src/resources/Language.js
7103
- var Language = __webpack_require__(67);
7104
- // EXTERNAL MODULE: ./src/resources/Layer.js
7105
- var Layer = __webpack_require__(27);
7106
- // EXTERNAL MODULE: ./src/resources/base/CrudSetItemBase.js
7107
- var CrudSetItemBase = __webpack_require__(10);
7108
- ;// CONCATENATED MODULE: ./src/resources/LayerFaq.js
7095
+ __webpack_require__.r(__webpack_exports__);
7096
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7097
+ /* harmony export */ "default": () => (/* binding */ StaticClass)
7098
+ /* harmony export */ });
7099
+ /* harmony import */ var _errors_StaticClassError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
7109
7100
  /*
7110
7101
  * BSD 3-Clause License
7111
7102
  *
7112
- * Copyright (c) 2022, Mapcreator
7103
+ * Copyright (c) 2020, Mapcreator
7113
7104
  * All rights reserved.
7114
7105
  *
7115
7106
  * Redistribution and use in source and binary forms, with or without
@@ -7139,39 +7130,28 @@ var CrudSetItemBase = __webpack_require__(10);
7139
7130
  */
7140
7131
 
7141
7132
  /**
7142
- * LayerFaq
7143
- * @extends CrudSetItemBase
7133
+ * Disables the constructor and throws a {@link StaticClassError} when an instance is created.
7134
+ * @protected
7144
7135
  */
7145
7136
 
7146
- class LayerFaq extends CrudSetItemBase["default"] {
7147
- static get resourceName() {
7148
- return 'layer-faqs';
7149
- }
7150
-
7151
- static get parentKey() {
7152
- return 'layer_group_id';
7137
+ class StaticClass {
7138
+ constructor() {
7139
+ throw new _errors_StaticClassError__WEBPACK_IMPORTED_MODULE_0__["default"]();
7153
7140
  }
7154
7141
 
7155
7142
  }
7156
- // EXTERNAL MODULE: ./src/resources/LayerGroup.js
7157
- var LayerGroup = __webpack_require__(70);
7158
- // EXTERNAL MODULE: ./src/resources/Mapstyle.js
7159
- var Mapstyle = __webpack_require__(66);
7160
- // EXTERNAL MODULE: ./src/resources/MapstyleSet.js + 1 modules
7161
- var MapstyleSet = __webpack_require__(28);
7162
- // EXTERNAL MODULE: ./src/resources/Message.js + 1 modules
7163
- var Message = __webpack_require__(35);
7164
- // EXTERNAL MODULE: ./src/resources/Notification.js
7165
- var Notification = __webpack_require__(68);
7166
- // EXTERNAL MODULE: ./src/resources/Organisation.js
7167
- var Organisation = __webpack_require__(41);
7168
- // EXTERNAL MODULE: ./src/resources/Permission.js
7169
- var Permission = __webpack_require__(55);
7170
- // EXTERNAL MODULE: ./src/utils/reflection.js
7171
- var reflection = __webpack_require__(0);
7172
- // EXTERNAL MODULE: ./src/resources/base/CrudSetBase.js
7173
- var CrudSetBase = __webpack_require__(14);
7174
- ;// CONCATENATED MODULE: ./src/resources/ProductTourStep.js
7143
+
7144
+ /***/ }),
7145
+ /* 34 */
7146
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
7147
+
7148
+ __webpack_require__.r(__webpack_exports__);
7149
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7150
+ /* harmony export */ "default": () => (/* binding */ OrganisationProxy)
7151
+ /* harmony export */ });
7152
+ /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
7153
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
7154
+ /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
7175
7155
  /*
7176
7156
  * BSD 3-Clause License
7177
7157
  *
@@ -7205,21 +7185,165 @@ var CrudSetBase = __webpack_require__(14);
7205
7185
  */
7206
7186
 
7207
7187
 
7208
- /**
7209
- * @extends CrudSetItemBase
7210
- */
7211
7188
 
7212
- class ProductTourStep extends (0,reflection.mix)(CrudSetItemBase["default"]) {
7213
- static get resourceName() {
7214
- return 'product-tours/steps';
7215
- }
7189
+ class OrganisationProxy extends _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_1__["default"] {
7190
+ /**
7191
+ * @param {Mapcreator} api - Instance of the api
7192
+ * @param {ResourceBase} parent - Parent instance
7193
+ */
7194
+ constructor(api, parent) {
7195
+ // Fixes dependency issue
7196
+ const Organisation = (__webpack_require__(41)["default"]);
7197
+
7198
+ super(api, Organisation, `${parent.url}/organisations`, {});
7199
+ this._parent = parent;
7200
+ }
7201
+ /**
7202
+ * Returns parent instance
7203
+ * @returns {ResourceBase} - Parent instance
7204
+ */
7205
+
7206
+
7207
+ get parent() {
7208
+ return this._parent;
7209
+ }
7210
+ /**
7211
+ * Sync organisations to the parent resource
7212
+ * The organisations attached to the target resource will be replaced with the organisations provided in the request.
7213
+ * @param {Array<Organisation|number>} organisations - List of items to sync
7214
+ * @throws {ApiError} - If the api returns errors
7215
+ * @returns {CancelablePromise}
7216
+ */
7217
+
7218
+
7219
+ sync(organisations) {
7220
+ return this._modifyLink(organisations, 'PATCH', this.Target);
7221
+ }
7222
+ /**
7223
+ * Attach organisations to the parent resource
7224
+ * The provided organisations will be attached to the resource if they're not already attached
7225
+ * @param {Array<Organisation|number>} organisations - List of items to attach
7226
+ * @throws {ApiError} - If the api returns errors
7227
+ * @returns {CancelablePromise}
7228
+ */
7229
+
7230
+
7231
+ attach(organisations) {
7232
+ return this._modifyLink(organisations, 'POST', this.Target);
7233
+ }
7234
+ /**
7235
+ * Detach organisations from the parent resource
7236
+ * The provided organisations will be detached from the resource
7237
+ * @param {Array<Organisation|number>} organisations - List of items to detach
7238
+ * @throws {ApiError} - If the api returns errors
7239
+ * @returns {CancelablePromise}
7240
+ */
7241
+
7242
+
7243
+ detach(organisations) {
7244
+ return this._modifyLink(organisations, 'DELETE', this.Target);
7245
+ }
7246
+ /**
7247
+ * Attach all organisations to the parent resource
7248
+ * @throws {ApiError} - If the api returns errors
7249
+ * @returns {CancelablePromise}
7250
+ */
7251
+
7252
+
7253
+ attachAll() {
7254
+ return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_2__.makeCancelable)(async signal => {
7255
+ await this.api.ky.post(`${this.baseUrl}/all`, {
7256
+ signal
7257
+ });
7258
+ });
7259
+ }
7260
+ /**
7261
+ * Detach all organisations from the parent resource
7262
+ * @throws {ApiError} - If the api returns errors
7263
+ * @returns {CancelablePromise}
7264
+ */
7265
+
7266
+
7267
+ detachAll() {
7268
+ return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_2__.makeCancelable)(async signal => {
7269
+ await this.api.ky.delete(`${this.baseUrl}/all`, {
7270
+ signal
7271
+ });
7272
+ });
7273
+ }
7274
+ /**
7275
+ * Sync, attach or unlink resources
7276
+ * @param {Array<Organisation|Number>|Organisation|Number} items - List of items to sync or attach
7277
+ * @param {String} method - Http method to use
7278
+ * @param {Class<ResourceBase>} Type - Resource type
7279
+ * @param {?String} path - Optional appended resource path, will guess if null
7280
+ * @throws {ApiError} - If the api returns errors
7281
+ * @protected
7282
+ * @returns {CancelablePromise}
7283
+ */
7284
+
7285
+
7286
+ _modifyLink(items, method, Type, path = null) {
7287
+ if (!Array.isArray(items)) {
7288
+ items = [items];
7289
+ }
7290
+
7291
+ if (!path) {
7292
+ const resource = Type.resourceName.replace(/s+$/, '');
7293
+ path = `${resource}s`;
7294
+ }
7295
+
7296
+ const keys = items.map(x => typeof x === 'number' ? x : x.id).map(Number);
7297
+
7298
+ const filter = x => !(0,_utils_reflection__WEBPACK_IMPORTED_MODULE_0__.isParentOf)(Type, x) && !Number.isFinite(x);
7299
+
7300
+ const isValid = keys.filter(filter).length === 0;
7301
+
7302
+ if (!isValid) {
7303
+ throw new TypeError(`Array must contain either Numbers (resource id) or "${Type.name}".`);
7304
+ }
7216
7305
 
7217
- static get parentKey() {
7218
- return 'product_tour_id';
7306
+ const url = `${this.parent.url}/${path}`;
7307
+ return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_2__.makeCancelable)(async signal => {
7308
+ await this.api.ky(url, {
7309
+ method,
7310
+ signal,
7311
+ json: {
7312
+ keys
7313
+ }
7314
+ });
7315
+ });
7219
7316
  }
7220
7317
 
7221
7318
  }
7222
- ;// CONCATENATED MODULE: ./src/resources/ProductTour.js
7319
+
7320
+ /***/ }),
7321
+ /* 35 */
7322
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
7323
+
7324
+ // ESM COMPAT FLAG
7325
+ __webpack_require__.r(__webpack_exports__);
7326
+
7327
+ // EXPORTS
7328
+ __webpack_require__.d(__webpack_exports__, {
7329
+ "AbstractClassError": () => (/* reexport */ AbstractError.AbstractClassError),
7330
+ "AbstractError": () => (/* reexport */ AbstractError.AbstractError),
7331
+ "AbstractMethodError": () => (/* reexport */ AbstractError.AbstractMethodError),
7332
+ "ApiError": () => (/* reexport */ ApiError["default"]),
7333
+ "GeoError": () => (/* reexport */ GeoError["default"]),
7334
+ "NodeError": () => (/* reexport */ NodeError),
7335
+ "OAuthError": () => (/* reexport */ OAuthError["default"]),
7336
+ "StaticClassError": () => (/* reexport */ StaticClassError["default"]),
7337
+ "ValidationError": () => (/* reexport */ ValidationError["default"])
7338
+ });
7339
+
7340
+ // EXTERNAL MODULE: ./src/errors/AbstractError.js
7341
+ var AbstractError = __webpack_require__(21);
7342
+ // EXTERNAL MODULE: ./src/errors/ApiError.js
7343
+ var ApiError = __webpack_require__(62);
7344
+ // EXTERNAL MODULE: ./src/errors/ValidationError.js
7345
+ var ValidationError = __webpack_require__(74);
7346
+ ;// CONCATENATED MODULE: ./src/errors/NodeError.js
7223
7347
  /*
7224
7348
  * BSD 3-Clause License
7225
7349
  *
@@ -7252,36 +7376,17 @@ class ProductTourStep extends (0,reflection.mix)(CrudSetItemBase["default"]) {
7252
7376
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7253
7377
  */
7254
7378
 
7255
-
7256
-
7257
7379
  /**
7258
- * Mapstyle set
7259
- * @extends CrudSetBase
7380
+ * Invoked upon nodejs specific errors
7260
7381
  */
7261
-
7262
- class ProductTour extends (0,reflection.mix)(CrudSetBase["default"]) {
7263
- static get resourcePath() {
7264
- return '/product-tours/{id}';
7265
- }
7266
-
7267
- static get resourceName() {
7268
- return 'product-tours';
7269
- }
7270
-
7271
- get _Child() {
7272
- return ProductTourStep;
7273
- }
7274
-
7275
- }
7276
- // EXTERNAL MODULE: ./src/resources/Role.js
7277
- var Role = __webpack_require__(69);
7278
- // EXTERNAL MODULE: ./src/resources/Svg.js
7279
- var Svg = __webpack_require__(53);
7280
- // EXTERNAL MODULE: ./src/resources/SvgSet.js
7281
- var SvgSet = __webpack_require__(52);
7282
- // EXTERNAL MODULE: ./src/resources/Tag.js
7283
- var Tag = __webpack_require__(29);
7284
- ;// CONCATENATED MODULE: ./src/resources/TagType.js
7382
+ class NodeError extends Error {}
7383
+ // EXTERNAL MODULE: ./src/errors/OAuthError.js
7384
+ var OAuthError = __webpack_require__(17);
7385
+ // EXTERNAL MODULE: ./src/errors/StaticClassError.js
7386
+ var StaticClassError = __webpack_require__(57);
7387
+ // EXTERNAL MODULE: ./src/errors/GeoError.js
7388
+ var GeoError = __webpack_require__(39);
7389
+ ;// CONCATENATED MODULE: ./src/errors/index.js
7285
7390
  /*
7286
7391
  * BSD 3-Clause License
7287
7392
  *
@@ -7315,72 +7420,29 @@ var Tag = __webpack_require__(29);
7315
7420
  */
7316
7421
 
7317
7422
 
7318
- /**
7319
- * TagType resource
7320
- * @mixes CrudSetBase
7321
- */
7322
7423
 
7323
- class TagType extends CrudBase["default"] {
7324
- static get resourcePath() {
7325
- return '/tags/types/{id}';
7326
- }
7327
7424
 
7328
- static get resourceName() {
7329
- return 'tag-types';
7330
- }
7331
- /**
7332
- * Get the list of tags that are attached to this type
7333
- * @returns {SimpleResourceProxy} - A proxy for accessing the resource
7334
- */
7335
7425
 
7336
7426
 
7337
- get tags() {
7338
- return this._proxyResourceList(Tag["default"], `${this.url}/tags`);
7339
- }
7340
7427
 
7341
- }
7342
- // EXTERNAL MODULE: ./src/resources/User.js
7343
- var User = __webpack_require__(54);
7344
- ;// CONCATENATED MODULE: ./src/resources/VectorHighlight.js
7345
- /*
7346
- * BSD 3-Clause License
7347
- *
7348
- * Copyright (c) 2020, Mapcreator
7349
- * All rights reserved.
7350
- *
7351
- * Redistribution and use in source and binary forms, with or without
7352
- * modification, are permitted provided that the following conditions are met:
7353
- *
7354
- * Redistributions of source code must retain the above copyright notice, this
7355
- * list of conditions and the following disclaimer.
7356
- *
7357
- * Redistributions in binary form must reproduce the above copyright notice,
7358
- * this list of conditions and the following disclaimer in the documentation
7359
- * and/or other materials provided with the distribution.
7360
- *
7361
- * Neither the name of the copyright holder nor the names of its
7362
- * contributors may be used to endorse or promote products derived from
7363
- * this software without specific prior written permission.
7364
- *
7365
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
7366
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7367
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7368
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
7369
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7370
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
7371
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
7372
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7373
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7374
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7375
- */
7376
7428
 
7377
- class VectorHighlight extends ResourceBase["default"] {
7378
- static get resourceName() {
7379
- return 'highlights/vector';
7380
- }
7429
+ /***/ }),
7430
+ /* 36 */
7431
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
7381
7432
 
7382
- }
7383
- ;// CONCATENATED MODULE: ./src/resources/VectorChoropleth.js
7433
+ // ESM COMPAT FLAG
7434
+ __webpack_require__.r(__webpack_exports__);
7435
+
7436
+ // EXPORTS
7437
+ __webpack_require__.d(__webpack_exports__, {
7438
+ "default": () => (/* binding */ Message)
7439
+ });
7440
+
7441
+ // EXTERNAL MODULE: ./src/resources/base/CrudBase.js
7442
+ var CrudBase = __webpack_require__(2);
7443
+ // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
7444
+ var ResourceBase = __webpack_require__(3);
7445
+ ;// CONCATENATED MODULE: ./src/resources/MessageVariant.js
7384
7446
  /*
7385
7447
  * BSD 3-Clause License
7386
7448
  *
@@ -7413,13 +7475,12 @@ class VectorHighlight extends ResourceBase["default"] {
7413
7475
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7414
7476
  */
7415
7477
 
7416
- class VectorChoropleth extends ResourceBase["default"] {
7417
- static get resourceName() {
7418
- return 'choropleths/vector';
7419
- }
7420
-
7421
- }
7422
- ;// CONCATENATED MODULE: ./src/resources/index.js
7478
+ class MessageVariant extends ResourceBase["default"] {}
7479
+ // EXTERNAL MODULE: ./src/utils/helpers.js
7480
+ var helpers = __webpack_require__(1);
7481
+ // EXTERNAL MODULE: external "case"
7482
+ var external_case_ = __webpack_require__(8);
7483
+ ;// CONCATENATED MODULE: ./src/resources/Message.js
7423
7484
  /*
7424
7485
  * BSD 3-Clause License
7425
7486
  *
@@ -7455,51 +7516,63 @@ class VectorChoropleth extends ResourceBase["default"] {
7455
7516
 
7456
7517
 
7457
7518
 
7519
+ class Message extends CrudBase["default"] {
7520
+ static get resourceName() {
7521
+ return 'messages';
7522
+ }
7458
7523
 
7524
+ toObject(camelCaseKeys = false) {
7525
+ const superObject = super.toObject(camelCaseKeys);
7526
+ superObject.variants = superObject.variants.map(variant => {
7527
+ if (variant instanceof MessageVariant) {
7528
+ return variant.toObject(camelCaseKeys);
7529
+ }
7459
7530
 
7531
+ const caseFn = camelCaseKeys ? external_case_.camel : external_case_.snake;
7532
+ const res = {};
7533
+ const fields = Object.keys(variant);
7460
7534
 
7535
+ for (const field of fields) {
7536
+ res[caseFn(field)] = variant[field];
7537
+ }
7461
7538
 
7539
+ return res;
7540
+ });
7541
+ return superObject;
7542
+ }
7462
7543
 
7544
+ _guessType(name, value) {
7545
+ if (name === 'variants') {
7546
+ return Array.from(value).map(data => new MessageVariant(this.api, data));
7547
+ }
7463
7548
 
7549
+ return super._guessType(name, value);
7550
+ }
7464
7551
 
7552
+ _buildCreateData() {
7553
+ return this.toObject();
7554
+ }
7465
7555
 
7556
+ _update() {
7557
+ return (0,helpers.makeCancelable)(async signal => {
7558
+ const json = this.toObject();
7559
+ await this.api.ky.patch(this.url, {
7560
+ json,
7561
+ signal
7562
+ }); // Reset changes
7466
7563
 
7564
+ Object.assign(this._baseProperties, this._properties);
7565
+ this._properties = {};
7467
7566
 
7567
+ if ('updated_at' in this._baseProperties) {
7568
+ this._baseProperties['updated_at'] = new Date();
7569
+ }
7468
7570
 
7571
+ return this;
7572
+ });
7573
+ }
7469
7574
 
7470
-
7471
-
7472
-
7473
-
7474
-
7475
-
7476
-
7477
-
7478
-
7479
-
7480
-
7481
-
7482
-
7483
-
7484
-
7485
-
7486
-
7487
-
7488
-
7489
-
7490
-
7491
-
7492
-
7493
-
7494
- /**
7495
- * @private
7496
- */
7497
-
7498
- const base = {
7499
- CrudBase: CrudBase["default"],
7500
- CrudSetBase: CrudSetBase["default"],
7501
- ResourceBase: ResourceBase["default"]
7502
- };
7575
+ }
7503
7576
 
7504
7577
  /***/ }),
7505
7578
  /* 37 */
@@ -7516,7 +7589,7 @@ __webpack_require__.d(__webpack_exports__, {
7516
7589
  // EXTERNAL MODULE: ./src/storage/StorageManager.js + 3 modules
7517
7590
  var StorageManager = __webpack_require__(22);
7518
7591
  // EXTERNAL MODULE: ./src/utils/StaticClass.js
7519
- var StaticClass = __webpack_require__(32);
7592
+ var StaticClass = __webpack_require__(33);
7520
7593
  ;// CONCATENATED MODULE: ./src/utils/uuid.js
7521
7594
  /*
7522
7595
  * BSD 3-Clause License
@@ -7705,7 +7778,7 @@ __webpack_require__.r(__webpack_exports__);
7705
7778
  /* harmony import */ var _errors_GeoError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39);
7706
7779
  /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
7707
7780
  /* harmony import */ var _utils_geo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60);
7708
- /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
7781
+ /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
7709
7782
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
7710
7783
  /*
7711
7784
  * BSD 3-Clause License
@@ -7851,7 +7924,7 @@ class GeoResourceProxy extends _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__["defa
7851
7924
  throw new TypeError(`Invalid resource limit ${limit}, maximum allowed is ${_RequestParameters__WEBPACK_IMPORTED_MODULE_1__["default"].maxPerPage}`);
7852
7925
  }
7853
7926
 
7854
- const url = `${this.new().baseUrl}/for-point`;
7927
+ const url = `${this.new().baseUrl}/for-point?per_page=${limit}`;
7855
7928
  return (0,_utils_helpers__WEBPACK_IMPORTED_MODULE_4__.makeCancelable)(async signal => {
7856
7929
  const {
7857
7930
  data
@@ -7944,8 +8017,10 @@ __webpack_require__.r(__webpack_exports__);
7944
8017
  /* harmony import */ var _Tag__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(29);
7945
8018
  /* harmony import */ var _User__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(54);
7946
8019
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(1);
7947
- /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(4);
8020
+ /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(5);
7948
8021
  /* harmony import */ var _LayerGroup__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(70);
8022
+ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(30);
8023
+ /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(13);
7949
8024
  /*
7950
8025
  * BSD 3-Clause License
7951
8026
  *
@@ -7995,6 +8070,8 @@ __webpack_require__.r(__webpack_exports__);
7995
8070
 
7996
8071
 
7997
8072
 
8073
+
8074
+
7998
8075
 
7999
8076
  class Organisation extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"] {
8000
8077
  static get resourceName() {
@@ -8028,6 +8105,13 @@ class Organisation extends _base_CrudBase__WEBPACK_IMPORTED_MODULE_1__["default"
8028
8105
  get mapstyleSets() {
8029
8106
  return new _proxy_OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_0__["default"](this.api, this, _MapstyleSet__WEBPACK_IMPORTED_MODULE_12__["default"]);
8030
8107
  }
8108
+
8109
+ get notes() {
8110
+ const data = {
8111
+ organisationId: this.id
8112
+ };
8113
+ return new _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_20__["default"](this.api, _index__WEBPACK_IMPORTED_MODULE_19__.OrganisationNote, `${this.api.url}/organisations/${this.id}/notes`, data);
8114
+ }
8031
8115
  /**
8032
8116
  * Get a proxy for svg sets linked to the organisation
8033
8117
  * @returns {OwnedResourceProxy} - A proxy for accessing the resource
@@ -8190,7 +8274,7 @@ __webpack_require__.r(__webpack_exports__);
8190
8274
  /* harmony export */ "default": () => (/* binding */ Color)
8191
8275
  /* harmony export */ });
8192
8276
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
8193
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
8277
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
8194
8278
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
8195
8279
  /*
8196
8280
  * BSD 3-Clause License
@@ -8247,9 +8331,9 @@ __webpack_require__.r(__webpack_exports__);
8247
8331
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8248
8332
  /* harmony export */ "default": () => (/* binding */ DimensionSet)
8249
8333
  /* harmony export */ });
8250
- /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
8334
+ /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
8251
8335
  /* harmony import */ var _Dimension__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
8252
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
8336
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
8253
8337
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
8254
8338
  /*
8255
8339
  * BSD 3-Clause License
@@ -8368,7 +8452,7 @@ __webpack_require__.r(__webpack_exports__);
8368
8452
  /* harmony export */ "default": () => (/* binding */ Feature)
8369
8453
  /* harmony export */ });
8370
8454
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
8371
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
8455
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
8372
8456
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
8373
8457
  /*
8374
8458
  * BSD 3-Clause License
@@ -8425,9 +8509,9 @@ __webpack_require__.r(__webpack_exports__);
8425
8509
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8426
8510
  /* harmony export */ "default": () => (/* binding */ FontFamily)
8427
8511
  /* harmony export */ });
8428
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
8512
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
8429
8513
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
8430
- /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
8514
+ /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
8431
8515
  /* harmony import */ var _Font__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(47);
8432
8516
  /*
8433
8517
  * BSD 3-Clause License
@@ -8545,13 +8629,13 @@ __webpack_require__.r(__webpack_exports__);
8545
8629
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8546
8630
  /* harmony export */ "default": () => (/* binding */ Job)
8547
8631
  /* harmony export */ });
8548
- /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
8632
+ /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
8549
8633
  /* harmony import */ var _base_DownloadedResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
8550
8634
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
8551
8635
  /* harmony import */ var _JobResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49);
8552
8636
  /* harmony import */ var _JobRevision__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65);
8553
8637
  /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
8554
- /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4);
8638
+ /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
8555
8639
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6);
8556
8640
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
8557
8641
  /* harmony import */ var _JobShare__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(26);
@@ -8748,7 +8832,7 @@ __webpack_require__.r(__webpack_exports__);
8748
8832
  /* harmony import */ var _base_DownloadedResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
8749
8833
  /* harmony import */ var _base_ResourceBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
8750
8834
  /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
8751
- /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
8835
+ /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
8752
8836
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
8753
8837
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1);
8754
8838
  /*
@@ -8971,9 +9055,9 @@ __webpack_require__.d(__webpack_exports__, {
8971
9055
  });
8972
9056
 
8973
9057
  // EXTERNAL MODULE: ./src/traits/Trait.js
8974
- var Trait = __webpack_require__(31);
9058
+ var Trait = __webpack_require__(32);
8975
9059
  // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
8976
- var Mapcreator = __webpack_require__(15);
9060
+ var Mapcreator = __webpack_require__(16);
8977
9061
  // EXTERNAL MODULE: ./src/resources/base/DownloadedResource.js + 1 modules
8978
9062
  var DownloadedResource = __webpack_require__(25);
8979
9063
  // EXTERNAL MODULE: ./src/resources/base/ResourceBase.js
@@ -8981,7 +9065,7 @@ var ResourceBase = __webpack_require__(3);
8981
9065
  // EXTERNAL MODULE: ./src/utils/reflection.js
8982
9066
  var reflection = __webpack_require__(0);
8983
9067
  // EXTERNAL MODULE: ./src/utils/requests.js
8984
- var requests = __webpack_require__(4);
9068
+ var requests = __webpack_require__(5);
8985
9069
  // EXTERNAL MODULE: ./src/utils/helpers.js
8986
9070
  var helpers = __webpack_require__(1);
8987
9071
  ;// CONCATENATED MODULE: ./src/ImageHandler.js
@@ -9189,7 +9273,7 @@ __webpack_require__.r(__webpack_exports__);
9189
9273
  /* harmony export */ "default": () => (/* binding */ JobType)
9190
9274
  /* harmony export */ });
9191
9275
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
9192
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
9276
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
9193
9277
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
9194
9278
  /*
9195
9279
  * BSD 3-Clause License
@@ -9250,8 +9334,8 @@ __webpack_require__.r(__webpack_exports__);
9250
9334
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9251
9335
  /* harmony export */ "default": () => (/* binding */ SvgSet)
9252
9336
  /* harmony export */ });
9253
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
9254
- /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14);
9337
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
9338
+ /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
9255
9339
  /* harmony import */ var _Svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53);
9256
9340
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
9257
9341
  /*
@@ -9367,7 +9451,7 @@ __webpack_require__.r(__webpack_exports__);
9367
9451
  /* harmony export */ "default": () => (/* binding */ User)
9368
9452
  /* harmony export */ });
9369
9453
  /* harmony import */ var _proxy_OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
9370
- /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
9454
+ /* harmony import */ var _proxy_ResourceProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
9371
9455
  /* harmony import */ var _base_CrudBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
9372
9456
  /* harmony import */ var _Color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
9373
9457
  /* harmony import */ var _Dimension__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(44);
@@ -9382,7 +9466,7 @@ __webpack_require__.r(__webpack_exports__);
9382
9466
  /* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(27);
9383
9467
  /* harmony import */ var _Mapstyle__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(66);
9384
9468
  /* harmony import */ var _MapstyleSet__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(28);
9385
- /* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(35);
9469
+ /* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(36);
9386
9470
  /* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(68);
9387
9471
  /* harmony import */ var _Organisation__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(41);
9388
9472
  /* harmony import */ var _Permission__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(55);
@@ -9973,7 +10057,7 @@ __webpack_require__.r(__webpack_exports__);
9973
10057
  /* harmony export */ "GeoPoint": () => (/* binding */ GeoPoint),
9974
10058
  /* harmony export */ "GeoBoundary": () => (/* binding */ GeoBoundary)
9975
10059
  /* harmony export */ });
9976
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
10060
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
9977
10061
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
9978
10062
  /* harmony import */ var _errors_GeoError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
9979
10063
 
@@ -10138,7 +10222,7 @@ __webpack_require__.r(__webpack_exports__);
10138
10222
  /* harmony export */ });
10139
10223
  /* harmony import */ var _resources_base_ResourceBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
10140
10224
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
10141
- /* harmony import */ var _Trait__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31);
10225
+ /* harmony import */ var _Trait__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(32);
10142
10226
  /*
10143
10227
  * BSD 3-Clause License
10144
10228
  *
@@ -10333,7 +10417,7 @@ class Injectable extends _Trait__WEBPACK_IMPORTED_MODULE_2__["default"] {
10333
10417
  name = `${name.replace(/^\w/, c => c.toLowerCase())}s`;
10334
10418
  }
10335
10419
 
10336
- const OwnableResource = (__webpack_require__(5)["default"]);
10420
+ const OwnableResource = (__webpack_require__(4)["default"]);
10337
10421
 
10338
10422
  if ((0,_utils_reflection__WEBPACK_IMPORTED_MODULE_1__.hasTrait)(value, OwnableResource)) {
10339
10423
  const OwnedResourceProxy = (__webpack_require__(20)["default"]);
@@ -10347,7 +10431,7 @@ class Injectable extends _Trait__WEBPACK_IMPORTED_MODULE_2__["default"] {
10347
10431
  return this._proxyResourceList(value);
10348
10432
  });
10349
10433
  } else {
10350
- const ResourceProxy = (__webpack_require__(19)["default"]);
10434
+ const ResourceProxy = (__webpack_require__(13)["default"]);
10351
10435
 
10352
10436
  this._inject(name, function () {
10353
10437
  return new ResourceProxy(this, value);
@@ -10382,7 +10466,7 @@ __webpack_require__.r(__webpack_exports__);
10382
10466
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10383
10467
  /* harmony export */ "default": () => (/* binding */ ApiError)
10384
10468
  /* harmony export */ });
10385
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
10469
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
10386
10470
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
10387
10471
 
10388
10472
 
@@ -10656,7 +10740,7 @@ __webpack_require__.r(__webpack_exports__);
10656
10740
  /* harmony import */ var _JobShare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26);
10657
10741
  /* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27);
10658
10742
  /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7);
10659
- /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4);
10743
+ /* harmony import */ var _utils_requests__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
10660
10744
  /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6);
10661
10745
  /* harmony import */ var _utils_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
10662
10746
  /*
@@ -11140,10 +11224,10 @@ __webpack_require__.r(__webpack_exports__);
11140
11224
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11141
11225
  /* harmony export */ "default": () => (/* binding */ LayerGroup)
11142
11226
  /* harmony export */ });
11143
- /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
11227
+ /* harmony import */ var _traits_OwnableResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
11144
11228
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
11145
11229
  /* harmony import */ var _Layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27);
11146
- /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
11230
+ /* harmony import */ var _base_CrudSetBase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
11147
11231
  /* harmony import */ var _proxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71);
11148
11232
  /*
11149
11233
  * BSD 3-Clause License
@@ -11216,10 +11300,10 @@ __webpack_require__.r(__webpack_exports__);
11216
11300
  /* harmony export */ "SimpleResourceProxy": () => (/* reexport safe */ _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_4__["default"])
11217
11301
  /* harmony export */ });
11218
11302
  /* harmony import */ var _GeoResourceProxy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
11219
- /* harmony import */ var _OrganisationProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33);
11303
+ /* harmony import */ var _OrganisationProxy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34);
11220
11304
  /* harmony import */ var _OwnedResourceProxy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
11221
- /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
11222
- /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
11305
+ /* harmony import */ var _ResourceProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
11306
+ /* harmony import */ var _SimpleResourceProxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
11223
11307
  /*
11224
11308
  * BSD 3-Clause License
11225
11309
  *
@@ -11265,8 +11349,8 @@ __webpack_require__.r(__webpack_exports__);
11265
11349
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11266
11350
  /* harmony export */ "default": () => (/* binding */ DummyFlow)
11267
11351
  /* harmony export */ });
11268
- /* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
11269
- /* harmony import */ var _OAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
11352
+ /* harmony import */ var _errors_OAuthError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
11353
+ /* harmony import */ var _OAuth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
11270
11354
  /*
11271
11355
  * BSD 3-Clause License
11272
11356
  *
@@ -11344,7 +11428,7 @@ __webpack_require__.r(__webpack_exports__);
11344
11428
  /* harmony import */ var case__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(case__WEBPACK_IMPORTED_MODULE_0__);
11345
11429
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(40);
11346
11430
  /* harmony import */ var events__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_1__);
11347
- /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
11431
+ /* harmony import */ var _Mapcreator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
11348
11432
  /* harmony import */ var _RequestParameters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
11349
11433
  /* harmony import */ var _resources_base_ResourceBase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
11350
11434
  /* harmony import */ var _utils_reflection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
@@ -11742,7 +11826,7 @@ __webpack_require__.r(__webpack_exports__);
11742
11826
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11743
11827
  /* harmony export */ "default": () => (/* binding */ ValidationError)
11744
11828
  /* harmony export */ });
11745
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
11829
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
11746
11830
  /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
11747
11831
  /* harmony import */ var _ApiError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62);
11748
11832
 
@@ -12030,7 +12114,7 @@ __webpack_require__.d(__webpack_exports__, {
12030
12114
  });
12031
12115
 
12032
12116
  // EXTERNAL MODULE: ./src/Mapcreator.js + 1 modules
12033
- var Mapcreator = __webpack_require__(15);
12117
+ var Mapcreator = __webpack_require__(16);
12034
12118
  // EXTERNAL MODULE: ./src/RequestParameters.js
12035
12119
  var RequestParameters = __webpack_require__(7);
12036
12120
  // EXTERNAL MODULE: ./src/storage/StorageManager.js + 3 modules
@@ -12040,15 +12124,15 @@ var Enum = __webpack_require__(11);
12040
12124
  // EXTERNAL MODULE: ./src/enums/index.js + 3 modules
12041
12125
  var enums = __webpack_require__(6);
12042
12126
  // EXTERNAL MODULE: ./src/oauth/OAuth.js
12043
- var OAuth = __webpack_require__(18);
12127
+ var OAuth = __webpack_require__(19);
12044
12128
  // EXTERNAL MODULE: ./src/oauth/OAuthToken.js
12045
12129
  var OAuthToken = __webpack_require__(12);
12046
12130
  // EXTERNAL MODULE: ./src/oauth/StateContainer.js + 1 modules
12047
12131
  var StateContainer = __webpack_require__(37);
12048
12132
  // EXTERNAL MODULE: ./src/utils/requests.js
12049
- var requests = __webpack_require__(4);
12133
+ var requests = __webpack_require__(5);
12050
12134
  // EXTERNAL MODULE: ./src/errors/OAuthError.js
12051
- var OAuthError = __webpack_require__(16);
12135
+ var OAuthError = __webpack_require__(17);
12052
12136
  // EXTERNAL MODULE: ./src/utils/node.js
12053
12137
  var node = __webpack_require__(9);
12054
12138
  // EXTERNAL MODULE: external "case"
@@ -12396,7 +12480,7 @@ class ImplicitFlowPopup extends ImplicitFlow {
12396
12480
 
12397
12481
  }
12398
12482
  // EXTERNAL MODULE: external "ky-universal"
12399
- var external_ky_universal_ = __webpack_require__(30);
12483
+ var external_ky_universal_ = __webpack_require__(31);
12400
12484
  var external_ky_universal_default = /*#__PURE__*/__webpack_require__.n(external_ky_universal_);
12401
12485
  // EXTERNAL MODULE: ./src/utils/helpers.js
12402
12486
  var helpers = __webpack_require__(1);
@@ -12581,14 +12665,14 @@ var AbstractError = __webpack_require__(21);
12581
12665
  var ValidationError = __webpack_require__(74);
12582
12666
  // EXTERNAL MODULE: ./src/errors/StaticClassError.js
12583
12667
  var StaticClassError = __webpack_require__(57);
12584
- // EXTERNAL MODULE: ./src/resources/index.js + 10 modules
12585
- var resources = __webpack_require__(36);
12668
+ // EXTERNAL MODULE: ./src/resources/index.js + 11 modules
12669
+ var resources = __webpack_require__(30);
12586
12670
  // EXTERNAL MODULE: ./src/ResourceLister.js
12587
12671
  var ResourceLister = __webpack_require__(73);
12588
12672
  // EXTERNAL MODULE: ./src/utils/geo.js
12589
12673
  var geo = __webpack_require__(60);
12590
12674
  // EXTERNAL MODULE: ./src/errors/index.js + 1 modules
12591
- var errors = __webpack_require__(34);
12675
+ var errors = __webpack_require__(35);
12592
12676
  // EXTERNAL MODULE: ./src/proxy/index.js
12593
12677
  var proxy = __webpack_require__(71);
12594
12678
  ;// CONCATENATED MODULE: ./src/index.js
@@ -12662,7 +12746,7 @@ var proxy = __webpack_require__(71);
12662
12746
  * @private
12663
12747
  */
12664
12748
 
12665
- const version = "v3.2.0";
12749
+ const version = "v3.3.1";
12666
12750
  })();
12667
12751
 
12668
12752
  module.exports = __webpack_exports__;