@vcmap/ui 5.0.0-rc.10 → 5.0.0-rc.13

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.
Files changed (165) hide show
  1. package/README.md +12 -5
  2. package/build/build.js +6 -3
  3. package/build/buildHelpers.js +12 -4
  4. package/build/buildPreview.js +7 -0
  5. package/build/getPluginProxies.js +4 -0
  6. package/config/aerowest.config.json +13 -3
  7. package/config/base.config.json +398 -219
  8. package/config/codes.config.json +397 -0
  9. package/config/dev.config.json +375 -1
  10. package/config/graphFeatureInfo.config.json +100 -0
  11. package/config/www.config.json +1232 -0
  12. package/dist/assets/{cesium.eb5667.js → cesium.21663e.js} +0 -0
  13. package/dist/assets/cesium.js +1 -1
  14. package/dist/assets/core.63242d.js +4 -0
  15. package/dist/assets/core.js +1 -1
  16. package/dist/assets/font/OFL.txt +93 -0
  17. package/dist/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  18. package/dist/assets/{index.4ccd4433.js → index.44b91cfe.js} +1 -1
  19. package/dist/assets/{ol.ef03b1.js → ol.88ba9d.js} +0 -0
  20. package/dist/assets/ol.js +1 -1
  21. package/dist/assets/ui.3c2933.css +1 -0
  22. package/dist/assets/ui.3c2933.js +71 -0
  23. package/dist/assets/ui.js +1 -1
  24. package/dist/assets/vue.c897fc.js +9 -0
  25. package/dist/assets/vue.js +2 -1
  26. package/dist/assets/{vuetify.401a29.css → vuetify.147c3a.css} +1 -1
  27. package/dist/assets/{vuetify.401a29.js → vuetify.147c3a.js} +72 -72
  28. package/dist/assets/vuetify.js +2 -2
  29. package/dist/index.html +1 -5
  30. package/index.js +39 -5
  31. package/lib/vue.js +1 -0
  32. package/map.config.json +15 -6
  33. package/package.json +17 -8
  34. package/plugins/@vcmap/create-link/fallbackCreateLink.vue +71 -0
  35. package/plugins/@vcmap/create-link/index.js +83 -0
  36. package/plugins/@vcmap/create-link/package.json +6 -0
  37. package/plugins/@vcmap/pluginExample/index.js +2 -2
  38. package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +20 -3
  39. package/plugins/@vcmap/project-selector/ProjectSelectorComponent.vue +1 -1
  40. package/plugins/@vcmap/project-selector/index.js +1 -1
  41. package/plugins/@vcmap/project-selector/package.json +1 -2
  42. package/plugins/@vcmap/theme-changer/ThemeChangerComponent.vue +1 -1
  43. package/plugins/@vcmap/theme-changer/index.js +1 -1
  44. package/plugins/@vcmap/theme-changer/package.json +1 -2
  45. package/plugins/categoryTest/Categories.vue +89 -1
  46. package/plugins/categoryTest/Category.vue +1 -1
  47. package/plugins/example/index.js +10 -23
  48. package/plugins/simple-graph/README.md +51 -0
  49. package/plugins/simple-graph/SimpleGraphComponent.vue +70 -0
  50. package/plugins/simple-graph/index.js +17 -0
  51. package/plugins/simple-graph/package.json +11 -0
  52. package/plugins/simple-graph/simpleGraphView.js +76 -0
  53. package/plugins/test/editor.vue +1 -1
  54. package/plugins/test/index.js +76 -9
  55. package/plugins/test/toolbox-data.js +82 -57
  56. package/plugins/test/windowManagerExample.vue +1 -1
  57. package/src/actions/stateRefAction.js +2 -2
  58. package/src/actions/styleSelector.vue +1 -1
  59. package/src/application/Navbar.vue +13 -2
  60. package/src/application/VcsApp.vue +301 -116
  61. package/src/application/VcsMap.vue +1 -1
  62. package/src/application/VcsSettings.vue +1 -1
  63. package/src/application/vcsAppWrapper.vue +1 -0
  64. package/src/assets/font/OFL.txt +93 -0
  65. package/src/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  66. package/src/components/form-inputs-controls/VcsCheckbox.vue +13 -0
  67. package/src/components/form-inputs-controls/VcsColorPicker.vue +1 -1
  68. package/src/components/form-inputs-controls/VcsRadio.vue +123 -0
  69. package/src/components/form-output/VcsFormattedNumber.vue +1 -1
  70. package/src/components/lists/VcsActionList.vue +22 -7
  71. package/src/components/lists/VcsTreeview.vue +4 -4
  72. package/src/components/lists/VcsTreeviewLeaf.vue +10 -3
  73. package/src/components/lists/VcsTreeviewSearchbar.vue +1 -2
  74. package/src/components/tables/VcsTable.vue +245 -0
  75. package/src/contentTree/LayerTree.vue +1 -1
  76. package/src/contentTree/contentTreeCollection.js +4 -4
  77. package/src/contentTree/contentTreeItem.js +9 -9
  78. package/src/contentTree/groupContentTreeItem.js +1 -1
  79. package/src/contentTree/layerContentTreeItem.js +15 -1
  80. package/src/contentTree/layerGroupContentTreeItem.js +21 -1
  81. package/src/contentTree/nodeContentTreeItem.js +1 -1
  82. package/src/featureInfo/AddressBalloonComponent.vue +47 -0
  83. package/src/featureInfo/BalloonComponent.vue +140 -0
  84. package/src/featureInfo/abstractFeatureInfoView.js +313 -0
  85. package/src/featureInfo/addressBalloonFeatureInfoView.js +118 -0
  86. package/src/featureInfo/balloonFeatureInfoView.js +151 -0
  87. package/src/featureInfo/balloonHelper.js +132 -0
  88. package/src/featureInfo/featureInfo.js +457 -0
  89. package/src/featureInfo/featureInfoInteraction.js +42 -0
  90. package/src/featureInfo/iframeFeatureInfoView.js +95 -0
  91. package/src/featureInfo/tableFeatureInfoView.js +106 -0
  92. package/src/i18n/de.js +26 -0
  93. package/src/i18n/en.js +26 -0
  94. package/src/i18n/i18nCollection.js +17 -0
  95. package/src/icons/+all.js +80 -0
  96. package/src/icons/ClippingHorizontalIcon.vue +7 -0
  97. package/src/icons/ClippingIcon.vue +7 -0
  98. package/src/icons/ClippingVerticalIcon.vue +7 -0
  99. package/src/icons/ColorPickerIcon.vue +7 -0
  100. package/src/icons/ComponentsIcon.vue +2 -2
  101. package/src/icons/DimensionsHouseIcon.vue +11 -9
  102. package/src/icons/EditIcon.vue +7 -0
  103. package/src/icons/GlobalTerrainIcon.vue +9 -0
  104. package/src/icons/GroundIcon.vue +18 -0
  105. package/src/icons/HideIcon.vue +12 -0
  106. package/src/icons/LogoutIcon.vue +7 -0
  107. package/src/icons/ObjectAttributeIcon.vue +2 -13
  108. package/src/icons/PedestrianIcon.vue +2 -3
  109. package/src/icons/PenIcon.vue +2 -9
  110. package/src/icons/PoiIcon.vue +5 -2
  111. package/src/icons/PointSelectIcon.vue +4 -2
  112. package/src/icons/QueryIcon.vue +6 -7
  113. package/src/icons/ScreenshotIcon.vue +16 -0
  114. package/src/icons/ShareIcon.vue +4 -16
  115. package/src/icons/SkipNextIcon.vue +3 -1
  116. package/src/icons/TerrainBoxIcon.vue +9 -0
  117. package/src/icons/ToolsIcon.vue +4 -30
  118. package/src/icons/UploadIcon.vue +2 -9
  119. package/src/icons/UserProfileIcon.vue +7 -0
  120. package/src/icons/UserShareIcon.vue +7 -0
  121. package/src/icons/VideoRecorderIcon.vue +5 -9
  122. package/src/icons/ViewpointFlightIcon.vue +11 -0
  123. package/src/icons/ViewpointIcon.vue +11 -0
  124. package/src/icons/Viewshed360Icon.vue +7 -0
  125. package/src/icons/ViewshedConeIcon.vue +7 -0
  126. package/src/icons/ViewshedIcon.vue +7 -0
  127. package/src/icons/WallIcon.vue +4 -9
  128. package/src/legend/legendHelper.js +193 -0
  129. package/src/legend/styleLegendItem.vue +129 -0
  130. package/src/legend/vcsLegend.vue +92 -0
  131. package/src/manager/buttonManager.js +7 -12
  132. package/src/manager/categoryManager/ComponentsManager.vue +30 -0
  133. package/src/manager/categoryManager/categoryManager.js +500 -0
  134. package/src/manager/contextMenu/contextMenuComponent.vue +43 -0
  135. package/src/manager/contextMenu/contextMenuInteraction.js +42 -0
  136. package/src/manager/contextMenu/contextMenuManager.js +197 -0
  137. package/src/manager/navbarManager.js +9 -9
  138. package/src/manager/toolbox/GroupToolboxComponent.vue +118 -0
  139. package/src/manager/toolbox/SelectToolboxComponent.vue +128 -0
  140. package/src/manager/toolbox/ToolboxManager.vue +116 -98
  141. package/src/manager/toolbox/toolboxManager.js +235 -86
  142. package/src/manager/window/WindowComponent.vue +1 -1
  143. package/src/manager/window/WindowManager.vue +5 -3
  144. package/src/manager/window/windowManager.js +118 -14
  145. package/src/navigation/mapNavigation.vue +3 -5
  146. package/src/navigation/overviewMap.js +28 -5
  147. package/src/navigation/vcsCompass.vue +1 -1
  148. package/src/pluginHelper.js +42 -10
  149. package/src/setup.js +0 -2
  150. package/src/state.js +256 -0
  151. package/src/styles/_theming.scss +0 -5
  152. package/src/styles/variables.scss +7 -0
  153. package/src/styles/vcsFont.scss +17 -0
  154. package/src/uiConfig.js +79 -0
  155. package/src/vcsUiApp.js +213 -22
  156. package/src/vuePlugins/vuetify.js +14 -4
  157. package/config/berlin.config.json +0 -510
  158. package/dist/assets/core.216494.js +0 -4
  159. package/dist/assets/ui.99a1a7.css +0 -1
  160. package/dist/assets/ui.99a1a7.js +0 -70
  161. package/dist/assets/vue-composition-api.c5aca1.js +0 -14
  162. package/dist/assets/vue-composition-api.js +0 -2
  163. package/dist/assets/vue.762edd.js +0 -9
  164. package/lib/vue-composition-api.js +0 -2
  165. package/src/manager/toolbox/ToolboxGroupComponent.vue +0 -128
@@ -0,0 +1,51 @@
1
+ # VC Map Plugin Simple Graph
2
+
3
+ This is a plugin adding a new Feature Info View using {@link https://vuetifyjs.com/en/api/v-sparkline/#props|vuetify v-sparkline }.
4
+
5
+ | View class | VueComponent | description |
6
+ |-----------------------------------------|----------------------------------------------------|----------------------------------------------------------|
7
+ | [SimpleGraphView](./simpleGraphView.js) | [SimpleGraphComponent](./SimpleGraphComponent.vue) | A simple graph view including trend lines and bar graph. |
8
+
9
+
10
+ ## configuration
11
+
12
+ See `{FeatureInfoViewOptions}` for general configuration of Feature Views.
13
+ Use `{string[]} attributeKeys` to define, which feature properties contain graph data.
14
+ Use `{WindowComponentOptions} window` to define the position and size of the graph window.
15
+ The graph can be configured as follows:
16
+
17
+ | Property | Type | default | Description |
18
+ |----------|--------------------------|-----------|------------------------------------------------------|
19
+ | labels | string[] | number[] | [] | optional array of strings labeling all data points |
20
+ | graph | string | 'trend' | Choose between a trendline or bars |
21
+ | color | string | 'primary' | optional color of the sparkline of the graph |
22
+ | gradient | string[] | [] | optional array of colors to use as a linear-gradient |
23
+ | fill | boolean | false | if true, filled area below sparkline |
24
+ | smooth | number | string | 8 | optional number of px to use as a corner radius |
25
+
26
+ ### Example
27
+
28
+ ```json
29
+ {
30
+ "type": "SimpleGraphView",
31
+ "name": "graphBar",
32
+ "attributeKeys": [
33
+ "globalRadRoofsMonth_01", "globalRadRoofsMonth_02", "globalRadRoofsMonth_03",
34
+ "globalRadRoofsMonth_04", "globalRadRoofsMonth_05", "globalRadRoofsMonth_06",
35
+ "globalRadRoofsMonth_07", "globalRadRoofsMonth_08", "globalRadRoofsMonth_09",
36
+ "globalRadRoofsMonth_10", "globalRadRoofsMonth_11", "globalRadRoofsMonth_12"
37
+ ],
38
+ "labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
39
+ "color": "secondary",
40
+ "graph": "bar",
41
+ "gradient": ["red", "orange", "yellow"],
42
+ "window": {
43
+ "slot": "detached",
44
+ "position": {
45
+ "left": "20%",
46
+ "right": "20%",
47
+ "bottom": "0%"
48
+ }
49
+ }
50
+ }
51
+ ```
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <v-sparkline
3
+ padding="24"
4
+ stroke-linecap="round"
5
+ :show-labels="labels.length > 0"
6
+ :labels="labels"
7
+ :type="graph"
8
+ :color="color"
9
+ :gradient="gradient"
10
+ :fill="fill"
11
+ :smooth="smooth"
12
+ :value="values"
13
+ />
14
+ </template>
15
+ <script>
16
+
17
+ /**
18
+ * @description A simple table view for feature attributes using {@link https://vuetifyjs.com/en/api/v-sparkline/#props|vuetify v-sparkline }
19
+ * @vue-prop {Object} attributes - the feature's attributes
20
+ * @vue-prop {string[]} [labels] - optional array of strings labeling all data points
21
+ * @vue-prop {string} [graph='trend'] - Choose between a trendline or bars
22
+ * @vue-prop {string} [color='primary'] - optional color of the sparkline of the graph
23
+ * @vue-prop {string[]} [gradient] - optional array of colors to use as a linear-gradient
24
+ * @vue-prop {boolean} [fill=false] - if true, filled area below sparkline
25
+ * @vue-prop {boolean|number|string} [smooth=true] - optional number of px to use as a corner radius. true defaults to 8, false is 0
26
+ * @vue-computed {number[]} values - numeric values for the graph derived from the attributeKeys
27
+ */
28
+ export default {
29
+ name: 'SimpleGraphComponent',
30
+ props: {
31
+ attributes: {
32
+ type: Object,
33
+ required: true,
34
+ },
35
+ labels: {
36
+ type: Array,
37
+ default: () => [],
38
+ },
39
+ graph: {
40
+ type: String,
41
+ default: 'trend',
42
+ },
43
+ color: {
44
+ type: String,
45
+ default: 'primary',
46
+ },
47
+ gradient: {
48
+ type: Array,
49
+ default: () => [],
50
+ },
51
+ fill: {
52
+ type: Boolean,
53
+ default: false,
54
+ },
55
+ smooth: {
56
+ type: Number,
57
+ default: 8,
58
+ },
59
+ },
60
+ computed: {
61
+ values() {
62
+ return Object.values(this.attributes);
63
+ },
64
+ },
65
+ };
66
+ </script>
67
+
68
+ <style scoped>
69
+
70
+ </style>
@@ -0,0 +1,17 @@
1
+ import SimpleGraphView from './simpleGraphView.js';
2
+ /**
3
+ * @returns {VcsPlugin}
4
+ */
5
+ export default async function () {
6
+ return {
7
+ name: '@vcmap/simpleGraph',
8
+ onVcsAppMounted(app) {
9
+ /** Example for registering custom component on FeatureInfo */
10
+ app.featureInfo.classRegistry.registerClass(
11
+ app.dynamicContextId,
12
+ SimpleGraphView.className,
13
+ SimpleGraphView,
14
+ );
15
+ },
16
+ };
17
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@vcmap/simple-graph",
3
+ "version": "1.0.0",
4
+ "vcMapVersion": "~5.0.0",
5
+ "dependencies": {
6
+ "@vcsuite/parsers": "^1.0.1"
7
+ },
8
+ "peerDependencies": {
9
+ "@vcmap/ui": "5.0.0-rc.2"
10
+ }
11
+ }
@@ -0,0 +1,76 @@
1
+ import { parseBoolean } from '@vcsuite/parsers';
2
+ import { AbstractFeatureInfoView } from '@vcmap/ui';
3
+ import SimpleGraphComponent from './SimpleGraphComponent.vue';
4
+
5
+ /**
6
+ * @typedef {FeatureInfoViewOptions} SimpleGraphFeatureInfoViewOptions
7
+ * @property {string[]|number[]} [labels] - optional array of strings labeling all data points
8
+ * @property {string} [graph='trend'] - Choose between a trendline or bars
9
+ * @property {string} [color='primary'] - optional color of the sparkline of the graph
10
+ * @property {string[]} [gradient] - optional array of colors to use as a linear-gradient
11
+ * @property {boolean} [fill=false] - if true, filled area below sparkline
12
+ * @property {number|string} [smooth=8] - optional number of px to use as a corner radius
13
+ */
14
+
15
+ /**
16
+ * @class
17
+ * @description A graph view.
18
+ */
19
+ class SimpleGraphView extends AbstractFeatureInfoView {
20
+ /**
21
+ * @type {string}
22
+ */
23
+ static get className() { return 'SimpleGraphView'; }
24
+
25
+ /**
26
+ * @param {SimpleGraphFeatureInfoViewOptions} options
27
+ */
28
+ constructor(options) {
29
+ super(options, SimpleGraphComponent);
30
+ /**
31
+ * @type {string[]|number[]}
32
+ */
33
+ this.labels = options.labels || [];
34
+ /**
35
+ * @type {string}
36
+ */
37
+ this.graph = options.graph || 'trend';
38
+ /**
39
+ * @type {string}
40
+ */
41
+ this.color = options.color || 'primary';
42
+ /**
43
+ * @type {string[]}
44
+ */
45
+ this.gradient = options.gradient || [];
46
+ /**
47
+ * @type {boolean}
48
+ */
49
+ this.fill = parseBoolean(options.fill, false);
50
+ /**
51
+ * @type {number|string}
52
+ */
53
+ this.smooth = options.smooth ?? 8;
54
+ }
55
+
56
+ /**
57
+ * @param {FeatureInfoEvent} featureInfo
58
+ * @param {import("@vcmap/core").Layer} layer
59
+ * @returns {FeatureInfoProps}
60
+ */
61
+ getProperties({ feature }, layer) {
62
+ return {
63
+ featureId: feature.getId(),
64
+ layerName: layer.name,
65
+ attributes: this.getAttributes(feature),
66
+ labels: this.labels,
67
+ graph: this.graph,
68
+ color: this.color,
69
+ gradient: this.gradient,
70
+ fill: this.fill,
71
+ smooth: this.smooth,
72
+ };
73
+ }
74
+ }
75
+
76
+ export default SimpleGraphView;
@@ -18,7 +18,7 @@
18
18
  </template>
19
19
 
20
20
  <script>
21
- import { ref, inject } from '@vue/composition-api';
21
+ import { ref, inject } from 'vue';
22
22
  import { VcsButton } from '@vcmap/ui';
23
23
  import { Context } from '@vcmap/core';
24
24
 
@@ -1,6 +1,8 @@
1
1
  import VectorSource from 'ol/source/Vector.js';
2
2
  import { Feature } from 'ol';
3
- import { ButtonLocation, createToggleAction, WindowSlot } from '@vcmap/ui';
3
+ import {
4
+ ButtonLocation, createModalAction, createToggleAction, setStateToUrl, ToolboxType, WindowSlot,
5
+ } from '@vcmap/ui';
4
6
  import { toolboxData } from './toolbox-data.js';
5
7
  import editor from './editor.vue';
6
8
  import windowManagerExample from './windowManagerExample.vue';
@@ -32,10 +34,7 @@ export default async function () {
32
34
  headerTitle: 'Context Editor',
33
35
  },
34
36
  component: editor,
35
- slot: WindowSlot.STATIC,
36
- position: {
37
- width: 500,
38
- },
37
+ slot: WindowSlot.DYNAMIC_LEFT,
39
38
  },
40
39
  app.windowManager,
41
40
  '@vcmap/test',
@@ -73,7 +72,37 @@ export default async function () {
73
72
  app.windowManager,
74
73
  '@vcmap/test',
75
74
  );
76
- this._destroyActions = [destroyConfigEditorAction, destroyWindowAction, destroyIconAction];
75
+ const { action: clipboardDialogAction, destroy: destroryClipboardDialogAction } = createModalAction(
76
+ {
77
+ name: 'Create Link',
78
+ },
79
+ {
80
+ component: {
81
+ template: '<div>{{url}}</div>',
82
+ data() {
83
+ return {
84
+ url: '',
85
+ };
86
+ },
87
+ async created() {
88
+ this.url = setStateToUrl(await app.getState(true)).toString();
89
+ },
90
+ },
91
+ position: {
92
+ top: '50px',
93
+ left: '8%',
94
+ right: '8%',
95
+ },
96
+ },
97
+ app.windowManager,
98
+ '@vcmap/test',
99
+ );
100
+ this._destroyActions = [
101
+ destroyConfigEditorAction,
102
+ destroyWindowAction,
103
+ destroyIconAction,
104
+ destroryClipboardDialogAction,
105
+ ];
77
106
  const alertAction = {
78
107
  name: 'VC Systems',
79
108
  callback() {
@@ -101,10 +130,48 @@ export default async function () {
101
130
  '@vcmap/test',
102
131
  ButtonLocation.TOOL,
103
132
  );
104
- toolboxData.forEach(([{ id, icon, title, buttonComponents }, owner]) => {
105
- const group = app.toolboxManager.requestGroup(id, icon, title);
106
- buttonComponents.forEach(c => group.buttonManager.add(c, owner));
133
+ app.navbarManager.add(
134
+ {
135
+ id: 'createLink',
136
+ action: clipboardDialogAction,
137
+ },
138
+ '@vcmap/test',
139
+ ButtonLocation.TOOL,
140
+ );
141
+ toolboxData.forEach(([{ buttonComponents, ...toolboxComponentOptions }, owner]) => {
142
+ let group;
143
+ if (app.toolboxManager.has(toolboxComponentOptions.id)) {
144
+ group = app.toolboxManager.get(toolboxComponentOptions.id);
145
+ } else {
146
+ group = app.toolboxManager.add(toolboxComponentOptions, owner);
147
+ }
148
+ if (group.type === ToolboxType.GROUP && buttonComponents) {
149
+ buttonComponents.forEach(c => group.buttonManager.add(c, owner));
150
+ }
107
151
  });
152
+
153
+ app.contextMenuManager.addEventHandler(async (event) => {
154
+ const actions = [{
155
+ id: 'foo2',
156
+ name: 'Log Position',
157
+ icon: '$vcsInfo',
158
+ callback() {
159
+ console.log(event.positionOrPixel);
160
+ },
161
+ }];
162
+ if (event.feature) {
163
+ actions.push({
164
+ id: 'foo',
165
+ name: 'Log Feature',
166
+ icon: '$vcsInfo',
167
+ callback() {
168
+ console.log('feature right clicked');
169
+ console.log(event.feature);
170
+ },
171
+ });
172
+ }
173
+ return actions;
174
+ }, '@vcmap/test');
108
175
  },
109
176
  destroy() {
110
177
  if (this._destroyActions) {
@@ -1,104 +1,129 @@
1
+ import { ToolboxType } from '@vcmap/ui';
2
+
3
+ const dummySelectAction = {
4
+ active: false,
5
+ currentIndex: 0,
6
+ _stop() {
7
+ console.log('stopping session', this._session);
8
+ this._session = null;
9
+ this.active = false;
10
+ },
11
+ _start() {
12
+ const startSession = tool => ({ type: tool });
13
+ this._session = startSession(this.tools[this.currentIndex].name);
14
+ this.active = true;
15
+ console.log('starting session', this._session);
16
+ },
17
+ callback() {
18
+ if (this.active) {
19
+ this._stop();
20
+ } else {
21
+ this._start();
22
+ }
23
+ },
24
+ selected(index) {
25
+ this.currentIndex = index;
26
+ if (this.active) {
27
+ this._session.type = this.tools[this.currentIndex].name;
28
+ console.log('updating active session', this._session);
29
+ } else {
30
+ this._start();
31
+ }
32
+ },
33
+ };
34
+
1
35
  // eslint-disable-next-line import/prefer-default-export
2
36
  export const toolboxData = [
3
37
  [
4
38
  {
5
- id: 'select',
6
- buttonComponents: [
7
- {
8
- id: 'select',
9
- action: {
10
- name: 'select',
11
- title: 'select',
12
- icon: '$vcsPointSelect',
13
- active: false,
14
- callback() { this.active = !this.active; },
15
- },
16
- },
17
- ],
39
+ id: 'singleSelect',
40
+ type: ToolboxType.SINGLE,
41
+ action: {
42
+ name: 'select',
43
+ title: 'single select',
44
+ icon: '$vcsPointSelect',
45
+ active: false,
46
+ callback() { this.active = !this.active; },
47
+ },
18
48
  },
19
49
  '@vcmap/test',
20
50
  ],
21
51
  [
22
52
  {
23
53
  id: 'multiSelect',
24
- icon: '$vcsPen',
25
- title: 'multi select',
26
- buttonComponents: [
27
- {
28
- id: 'pen',
29
- action: {
54
+ type: ToolboxType.SELECT,
55
+ action: {
56
+ name: 'multiSelect',
57
+ title: 'multi select',
58
+ ...dummySelectAction,
59
+ tools: [
60
+ {
30
61
  name: 'pen',
31
62
  title: 'Item 1',
32
63
  icon: '$vcsPen',
33
- active: false,
34
- callback() { this.active = !this.active; },
35
64
  },
36
- },
37
- {
38
- id: 'object',
39
- action: {
65
+ {
40
66
  name: 'object',
41
67
  title: 'Item 2',
42
68
  icon: '$vcsObjectSelect',
43
- active: false,
44
- callback() { this.active = !this.active; },
45
69
  },
46
- },
47
- ],
70
+ ],
71
+ },
48
72
  },
49
73
  '@vcmap/test',
50
74
  ],
51
75
  [
52
76
  {
53
77
  id: 'measurement',
54
- icon: '$vcsDimensionsHouse',
55
- title: 'measurement',
56
- buttonComponents: [
57
- {
58
- id: 'distance',
59
- action: {
78
+ type: ToolboxType.SELECT,
79
+ action: {
80
+ name: 'measurement',
81
+ title: 'measurement',
82
+ ...dummySelectAction,
83
+ tools: [
84
+ {
60
85
  name: 'distance',
61
86
  title: '2D distance',
62
87
  icon: '$vcs2dDistance',
63
- active: false,
64
- callback() { this.active = !this.active; },
65
88
  },
66
- },
67
- {
68
- id: 'area',
69
- action: {
89
+ {
70
90
  name: 'area',
71
91
  title: '2D area',
72
92
  icon: '$vcs2dArea',
73
- active: false,
74
- callback() { this.active = !this.active; },
75
93
  },
76
- },
77
- ],
94
+ {
95
+ name: 'distance3D',
96
+ title: '3D distance',
97
+ icon: '$vcs3dDistance',
98
+ },
99
+ {
100
+ name: 'area3D',
101
+ title: '3D area',
102
+ icon: '$vcs3dArea',
103
+ },
104
+ ],
105
+ },
78
106
  },
79
107
  '@vcmap/test',
80
108
  ],
81
109
  [
82
110
  {
83
111
  id: 'toggle',
84
- buttonComponents: [
85
- {
86
- id: 'split',
87
- action: {
88
- name: 'split',
89
- title: 'split view',
90
- icon: '$vcsSplitView',
91
- active: false,
92
- callback() { this.active = !this.active; },
93
- },
94
- },
95
- ],
112
+ type: ToolboxType.SINGLE,
113
+ action: {
114
+ name: 'split',
115
+ title: 'split view',
116
+ icon: '$vcsSplitView',
117
+ active: false,
118
+ callback() { this.active = !this.active; },
119
+ },
96
120
  },
97
121
  '@vcmap/test',
98
122
  ],
99
123
  [
100
124
  {
101
125
  id: 'flight',
126
+ type: ToolboxType.GROUP,
102
127
  icon: '$vcsVideoRecorder',
103
128
  title: 'flight',
104
129
  buttonComponents: [
@@ -14,7 +14,7 @@
14
14
 
15
15
  </style>
16
16
  <script>
17
- import { inject, onUnmounted, ref, computed } from '@vue/composition-api';
17
+ import { inject, onUnmounted, ref, computed } from 'vue';
18
18
  import { getLogger } from '@vcsuite/logger';
19
19
 
20
20
  import { WindowSlot, VcsButton } from '@vcmap/ui';
@@ -1,4 +1,4 @@
1
- import { watch } from '@vue/composition-api';
1
+ import { watch } from 'vue';
2
2
  import { check } from '@vcsuite/check';
3
3
 
4
4
  /**
@@ -30,7 +30,7 @@ const stateI18nMap = {
30
30
  /**
31
31
  * Creates an action
32
32
  * @param {string} name
33
- * @param {import("@vue/composition-api").Ref<StateActionState>} stateRef
33
+ * @param {import("vue").Ref<StateActionState>} stateRef
34
34
  * @param {function():void} callback
35
35
  * @returns {{ action: VcsAction, destroy: function():void }}
36
36
  */
@@ -19,7 +19,7 @@
19
19
  </template>
20
20
 
21
21
  <script>
22
- import { computed, inject, onUnmounted, ref } from '@vue/composition-api';
22
+ import { computed, inject, onUnmounted, ref } from 'vue';
23
23
  import VcsSelect from '../components/form-inputs-controls/VcsSelect.vue';
24
24
 
25
25
  export default {
@@ -44,7 +44,13 @@
44
44
  </v-toolbar-items>
45
45
  </v-col>
46
46
  <v-col class="align-center d-flex justify-center">
47
- <div v-if="$vuetify.breakpoint.mdAndUp" class="company-logo" />
47
+ <div v-if="$vuetify.breakpoint.mdAndUp" class="d-flex">
48
+ <img v-if="config.logo" class="logo" :src="config.logo" alt="Logo">
49
+ <div v-else class="company-logo logo" />
50
+ <div v-if="config.appTitle" class="ml-4">
51
+ {{ $t(config.appTitle) }}
52
+ </div>
53
+ </div>
48
54
  </v-col>
49
55
  <v-col class="align-content-end d-flex justify-end">
50
56
  <v-toolbar-items v-if="$vuetify.breakpoint.mdAndUp">
@@ -109,10 +115,14 @@
109
115
  .v-toolbar__items > div{
110
116
  gap: 8px;
111
117
  }
118
+ .logo {
119
+ max-height: 36px;
120
+ margin: 0 auto;
121
+ }
112
122
  </style>
113
123
 
114
124
  <script>
115
- import { inject, ref, computed } from '@vue/composition-api';
125
+ import { inject, ref, computed } from 'vue';
116
126
  import { ButtonLocation, getActionsByLocation } from '../manager/navbarManager.js';
117
127
  import VcsActionButtonList from '../components/buttons/VcsActionButtonList.vue';
118
128
  import VcsActionList from '../components/lists/VcsActionList.vue';
@@ -137,6 +147,7 @@
137
147
  projectActions: getActions(ButtonLocation.PROJECT),
138
148
  shareActions: getActions(ButtonLocation.SHARE),
139
149
  menuActions: getActions(ButtonLocation.MENU),
150
+ config: app.uiConfig.config,
140
151
  };
141
152
  },
142
153
  };