@mapcreator/api 2.6.1 → 2.6.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapcreator/api",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Mapcreator JavaScript API",
5
5
  "main": "dist/bundle.js",
6
6
  "repository": "https://gitlab.com/mapcreator/api-wrapper.git",
@@ -56,7 +56,7 @@
56
56
  "scripts": {
57
57
  "build": "APP_ENV=production npx webpack",
58
58
  "watch": "npx webpack --progress --watch",
59
- "docs": "npx esdoc",
59
+ "docs": "npx esdoc && ./scripts/inject_docs_viewport.sh",
60
60
  "lint": "npx eslint --no-color --format checkstyle --output-file build/checkstyle.xml src",
61
61
  "clean": "rm -fr dist docs build || true",
62
62
  "all": "npm run clean && npm run lint && npm run build && npm run test && npm run docs",
package/src/Mapcreator.js CHANGED
@@ -70,6 +70,8 @@ import {
70
70
  User,
71
71
  VectorHighlight,
72
72
  VectorChoropleth,
73
+ ProductTour,
74
+ ProductTourStep,
73
75
  } from './resources';
74
76
  import ResourceBase from './resources/base/ResourceBase';
75
77
  import Injectable from './traits/Injectable';
@@ -587,6 +589,14 @@ export default class Mapcreator extends mix(EventEmitter, Injectable) {
587
589
  return this.static(Permission);
588
590
  }
589
591
 
592
+ get productTours () {
593
+ return this.static(ProductTour);
594
+ }
595
+
596
+ get productTourSteps () {
597
+ return this.static(ProductTourStep);
598
+ }
599
+
590
600
  /**
591
601
  * Role accessor
592
602
  * @see {@link Role}
@@ -0,0 +1,53 @@
1
+ /*
2
+ * BSD 3-Clause License
3
+ *
4
+ * Copyright (c) 2020, Mapcreator
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ *
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ * list of conditions and the following disclaimer.
12
+ *
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ * this list of conditions and the following disclaimer in the documentation
15
+ * and/or other materials provided with the distribution.
16
+ *
17
+ * Neither the name of the copyright holder nor the names of its
18
+ * contributors may be used to endorse or promote products derived from
19
+ * this software without specific prior written permission.
20
+ *
21
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ */
32
+
33
+ import { mix } from '../utils/reflection';
34
+ import CrudSetBase from './base/CrudSetBase';
35
+ import ProductTourStep from './ProductTourStep';
36
+
37
+ /**
38
+ * Mapstyle set
39
+ * @extends CrudSetBase
40
+ */
41
+ export default class ProductTour extends mix(CrudSetBase) {
42
+ static get resourcePath () {
43
+ return '/product-tours/{id}';
44
+ }
45
+
46
+ static get resourceName () {
47
+ return 'product-tours';
48
+ }
49
+
50
+ get _Child () {
51
+ return ProductTourStep;
52
+ }
53
+ }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * BSD 3-Clause License
3
+ *
4
+ * Copyright (c) 2020, Mapcreator
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ *
10
+ * Redistributions of source code must retain the above copyright notice, this
11
+ * list of conditions and the following disclaimer.
12
+ *
13
+ * Redistributions in binary form must reproduce the above copyright notice,
14
+ * this list of conditions and the following disclaimer in the documentation
15
+ * and/or other materials provided with the distribution.
16
+ *
17
+ * Neither the name of the copyright holder nor the names of its
18
+ * contributors may be used to endorse or promote products derived from
19
+ * this software without specific prior written permission.
20
+ *
21
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+ */
32
+
33
+ import { mix } from '../utils/reflection';
34
+ import CrudSetItemBase from './base/CrudSetItemBase';
35
+
36
+ /**
37
+ * @extends CrudSetItemBase
38
+ */
39
+ export default class ProductTourStep extends mix(CrudSetItemBase) {
40
+ static get resourceName () {
41
+ return 'product-tours/steps';
42
+ }
43
+
44
+ static get parentKey () {
45
+ return 'product_tour_id';
46
+ }
47
+ }
48
+
@@ -55,6 +55,8 @@ export Message from './Message';
55
55
  export Notification from './Notification';
56
56
  export Organisation from './Organisation';
57
57
  export Permission from './Permission';
58
+ export ProductTour from './ProductTour';
59
+ export ProductTourStep from './ProductTourStep';
58
60
  export Role from './Role';
59
61
  export Svg from './Svg';
60
62
  export SvgSet from './SvgSet';