@vcmap/ui 5.0.0-rc.8 → 5.0.0-rc.9

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 (178) hide show
  1. package/README.md +69 -22
  2. package/build/build.js +0 -3
  3. package/build/buildHelpers.js +0 -1
  4. package/build/commonViteConfig.js +1 -1
  5. package/config/dev.config.json +4 -4
  6. package/dist/assets/{cesium.6b5bb6.js → cesium.4e40f4.js} +0 -0
  7. package/dist/assets/cesium.js +1 -1
  8. package/dist/assets/core.edcf5e.js +4 -0
  9. package/dist/assets/core.js +1 -1
  10. package/dist/assets/{index.0be2842f.js → index.889d0f3a.js} +1 -1
  11. package/dist/assets/{ol.0561aa.js → ol.246fd4.js} +0 -0
  12. package/dist/assets/ol.js +1 -1
  13. package/dist/assets/ui.df4f6d.css +1 -0
  14. package/dist/assets/ui.df4f6d.js +43 -0
  15. package/dist/assets/ui.js +1 -1
  16. package/dist/assets/{vue-composition-api.f926fa.js → vue-composition-api.a520f3.js} +1 -1
  17. package/dist/assets/vue-composition-api.js +2 -2
  18. package/dist/assets/{vue.ddcb6b.js → vue.2cee44.js} +0 -0
  19. package/dist/assets/vue.js +1 -1
  20. package/dist/assets/{vuetify.d21163.css → vuetify.cc817b.css} +0 -0
  21. package/dist/assets/{vuetify.d21163.js → vuetify.cc817b.js} +1 -1
  22. package/dist/assets/vuetify.js +2 -2
  23. package/dist/index.html +1 -1
  24. package/index.js +39 -1
  25. package/package.json +2 -3
  26. package/plugins/@vcmap/pluginExample/index.js +5 -5
  27. package/plugins/@vcmap/pluginExample/pluginExampleComponent.vue +1 -1
  28. package/plugins/@vcmap/project-selector/ContextsListComponent.vue +1 -1
  29. package/plugins/@vcmap/project-selector/index.js +5 -5
  30. package/plugins/@vcmap/project-selector/package.json +1 -2
  31. package/plugins/@vcmap/theme-changer/index.js +6 -6
  32. package/plugins/buttonExamples/ButtonExamples.vue +1 -1
  33. package/plugins/buttonExamples/index.js +5 -4
  34. package/plugins/categoryTest/Categories.vue +1 -1
  35. package/plugins/categoryTest/Category.vue +1 -1
  36. package/plugins/categoryTest/index.js +5 -5
  37. package/plugins/example/index.js +33 -14
  38. package/plugins/test/allIconsComponent.vue +34 -0
  39. package/plugins/test/editor.vue +1 -1
  40. package/plugins/test/index.js +40 -17
  41. package/plugins/test/toolbox-data.js +106 -26
  42. package/plugins/test/windowManagerExample.vue +1 -2
  43. package/src/actions/actionHelper.js +2 -1
  44. package/src/actions/styleSelector.vue +1 -1
  45. package/src/application/Navbar.vue +18 -6
  46. package/src/application/VcsApp.vue +34 -28
  47. package/src/assets/logo-mobile.svg +9 -0
  48. package/src/assets/logo.svg +23 -23
  49. package/src/components/buttons/VcsActionButtonList.vue +99 -0
  50. package/src/components/buttons/VcsButton.vue +201 -0
  51. package/src/components/form-inputs-controls/VcsCheckbox.vue +73 -0
  52. package/src/components/form-inputs-controls/VcsColorPicker.vue +81 -0
  53. package/src/components/form-inputs-controls/VcsFormSection.vue +46 -0
  54. package/src/components/form-inputs-controls/VcsLabel.vue +38 -0
  55. package/src/components/form-inputs-controls/VcsSelect.vue +97 -0
  56. package/src/components/form-inputs-controls/VcsTextArea.vue +130 -0
  57. package/src/components/form-inputs-controls/VcsTextField.vue +129 -0
  58. package/src/components/form-output/VcsFormattedNumber.vue +103 -0
  59. package/src/components/lists/VcsActionList.vue +100 -0
  60. package/src/components/lists/VcsTreeview.vue +109 -0
  61. package/src/components/lists/VcsTreeviewLeaf.vue +105 -0
  62. package/src/components/lists/VcsTreeviewSearchbar.vue +156 -0
  63. package/src/components/notification/VcsBadge.vue +27 -0
  64. package/src/components/notification/VcsTooltip.vue +154 -0
  65. package/src/components/notification/validation.js +19 -0
  66. package/src/contentTree/LayerTree.vue +1 -1
  67. package/src/contentTree/contentTreeCollection.js +6 -2
  68. package/src/icons/+all.js +359 -0
  69. package/src/icons/2DAreaIcon.vue +21 -0
  70. package/src/icons/2DDistanceIcon.vue +18 -0
  71. package/src/icons/3DAreaIcon.vue +21 -0
  72. package/src/icons/3DDistanceIcon.vue +18 -0
  73. package/src/icons/3DHeightIcon.vue +18 -0
  74. package/src/icons/AngleIcon.vue +8 -0
  75. package/src/icons/AssociationsIcon.vue +34 -0
  76. package/src/icons/AxisIcon.vue +10 -0
  77. package/src/icons/BoundingBoxIcon.vue +15 -0
  78. package/src/icons/CheckboxCheckedIcon.vue +16 -0
  79. package/src/icons/CheckboxIcon.vue +23 -0
  80. package/src/icons/CheckboxIndeterminateIcon.vue +24 -0
  81. package/src/icons/CircleIcon.vue +10 -0
  82. package/src/icons/ColorSwatchIcon.vue +17 -0
  83. package/src/icons/CommentIcon.vue +19 -0
  84. package/src/icons/CompassIcon.vue +8 -0
  85. package/src/icons/ComponentsIcon.vue +7 -0
  86. package/src/icons/ConeIcon.vue +11 -0
  87. package/src/icons/DimensionsHouseIcon.vue +14 -0
  88. package/src/icons/ElevationProfileIcon.vue +111 -0
  89. package/src/icons/ExportAreaIcon.vue +7 -0
  90. package/src/icons/ExportFlightIcon.vue +7 -0
  91. package/src/icons/ExportIcon.vue +8 -0
  92. package/src/icons/ExternalLinkIcon.vue +10 -0
  93. package/src/icons/EyeIcon.vue +7 -0
  94. package/src/icons/FastForwardIcon.vue +7 -0
  95. package/src/icons/FilterIcon.vue +8 -0
  96. package/src/icons/GlobeNatureIcon.vue +14 -0
  97. package/src/icons/HealthCareIndustriesIcon.vue +118 -0
  98. package/src/icons/HelpIcon.vue +7 -0
  99. package/src/icons/HomePointIcon.vue +8 -0
  100. package/src/icons/HospitalsIcon.vue +237 -0
  101. package/src/icons/HouseIcon.vue +25 -0
  102. package/src/icons/ImportIcon.vue +8 -0
  103. package/src/icons/InfoIcon.vue +10 -0
  104. package/src/icons/KebabIcon.vue +36 -0
  105. package/src/icons/LabelIcon.vue +7 -0
  106. package/src/icons/LayersIcon.vue +26 -0
  107. package/src/icons/LegendIcon.vue +65 -0
  108. package/src/icons/LineIcon.vue +7 -0
  109. package/src/icons/LinkIcon.vue +7 -0
  110. package/src/icons/MapIcon.vue +8 -0
  111. package/src/icons/MenuIcon.vue +34 -0
  112. package/src/icons/MinusIcon.vue +8 -0
  113. package/src/icons/ObjectAttributeIcon.vue +18 -0
  114. package/src/icons/ObjectSelectIcon.vue +8 -0
  115. package/src/icons/ObliqueViewIcon.vue +13 -0
  116. package/src/icons/PdfIcon.vue +10 -0
  117. package/src/icons/PedestrianIcon.vue +8 -0
  118. package/src/icons/PenIcon.vue +14 -0
  119. package/src/icons/PlayCircleIcon.vue +10 -0
  120. package/src/icons/PlusIcon.vue +9 -0
  121. package/src/icons/PoiIcon.vue +7 -0
  122. package/src/icons/PointSelectIcon.vue +7 -0
  123. package/src/icons/PolygonIcon.vue +38 -0
  124. package/src/icons/PresentationModeIcon.vue +7 -0
  125. package/src/icons/ProgressIcon.vue +24 -0
  126. package/src/icons/QueryIcon.vue +15 -0
  127. package/src/icons/RectangleIcon.vue +9 -0
  128. package/src/icons/ReturnIcon.vue +7 -0
  129. package/src/icons/RewindIcon.vue +6 -0
  130. package/src/icons/SearchIcon.vue +8 -0
  131. package/src/icons/ShadowIcon.vue +9 -0
  132. package/src/icons/ShapesIcon.vue +28 -0
  133. package/src/icons/ShareIcon.vue +22 -0
  134. package/src/icons/SimpleCircleFilledIcon.vue +15 -0
  135. package/src/icons/SimpleCircleHalfFilledIcon.vue +12 -0
  136. package/src/icons/SimpleCircleOutlinedIcon.vue +15 -0
  137. package/src/icons/SkipNextIcon.vue +7 -0
  138. package/src/icons/SkipPreviousIcon.vue +9 -0
  139. package/src/icons/SplitViewIcon.vue +19 -0
  140. package/src/icons/TextStyleIcon.vue +14 -0
  141. package/src/icons/ThreeDimensionsIcon.vue +7 -0
  142. package/src/icons/ToolsIcon.vue +35 -0
  143. package/src/icons/TouchIcon.vue +8 -0
  144. package/src/icons/TrashCanIcon.vue +7 -0
  145. package/src/icons/TriangleIcon.vue +15 -0
  146. package/src/icons/TwoDimensionsIcon.vue +8 -0
  147. package/src/icons/UploadIcon.vue +14 -0
  148. package/src/icons/VideoRecorderIcon.vue +14 -0
  149. package/src/icons/WalkingIcon.vue +7 -0
  150. package/src/icons/WallIcon.vue +14 -0
  151. package/src/manager/buttonManager.js +5 -53
  152. package/src/manager/navbarManager.js +81 -0
  153. package/src/manager/toolbox/ToolboxGroupComponent.vue +128 -0
  154. package/src/manager/toolbox/ToolboxManager.vue +119 -76
  155. package/src/manager/toolbox/toolboxManager.js +204 -0
  156. package/src/manager/window/WindowComponentHeader.vue +1 -1
  157. package/src/manager/window/WindowManager.vue +18 -1
  158. package/src/manager/window/windowManager.js +3 -5
  159. package/src/navigation/mapNavigation.vue +9 -5
  160. package/src/navigation/orientationToolsButton.vue +1 -1
  161. package/src/navigation/tiltSlider.vue +1 -1
  162. package/src/styles/_theming.scss +10 -0
  163. package/src/styles/main.scss +3 -0
  164. package/src/styles/variables.scss +70 -0
  165. package/src/styles/vcsFont.scss +5 -0
  166. package/src/styles/vcsGrid.scss +4 -0
  167. package/src/vcsUiApp.js +4 -3
  168. package/src/vuePlugins/vuetify.js +1 -1
  169. package/dist/assets/core.98f9bb.js +0 -4
  170. package/dist/assets/ui.b7c1e3.css +0 -1
  171. package/dist/assets/ui.b7c1e3.js +0 -39
  172. package/dist/assets/uicomponents.682c5f.css +0 -1
  173. package/dist/assets/uicomponents.682c5f.js +0 -32
  174. package/dist/assets/uicomponents.js +0 -1
  175. package/lib/uicomponents.js +0 -1
  176. package/src/manager/toolbox/ToolboxMultiSelectButton.vue +0 -96
  177. package/src/manager/toolbox/ToolboxSingleSelectButton.vue +0 -98
  178. package/src/manager/toolbox/toolbox-manager.js +0 -203
@@ -1,203 +0,0 @@
1
- /* eslint-disable import/prefer-default-export */
2
- import { VcsEvent } from '@vcmap/core';
3
- import { reactive } from '@vue/composition-api';
4
- import Vue from 'vue';
5
-
6
- /**
7
- * @typedef ToolboxGroup
8
- * @property {string} icon
9
- * @property {string | number} id
10
- * @property {boolean} open
11
- * @property {ToolboxItem[]} options
12
- * @property {boolean} active
13
- */
14
- /**
15
- * @typedef ToolboxManagerState
16
- * @property {boolean} visible
17
- * @property {Object.<string, ToolboxGroup>} groups
18
- */
19
-
20
- /**
21
- * @typedef ToolboxItem
22
- * @property {string | number} id
23
- * @property {string} icon
24
- * @property {boolean} active
25
- * @property {boolean} selected
26
- * @property {boolean} disabled
27
- * @property {number} slot
28
- */
29
-
30
- export class ToolboxManager {
31
- constructor() {
32
- this.onAdded = new VcsEvent();
33
- this.onRemoved = new VcsEvent();
34
- /** @type {ToolboxManagerState} */
35
- this.state = reactive({
36
- visible: true,
37
- groups: {},
38
- });
39
- }
40
-
41
- setGroupOpen(id, open) {
42
- Object.values(this.state.groups).forEach((group) => {
43
- if (group.id === id) {
44
- Vue.set(this.state.groups, group.id, {
45
- ...group,
46
- open,
47
- });
48
- } else {
49
- Vue.set(this.state.groups, group.id, {
50
- ...group,
51
- open: false,
52
- });
53
- }
54
- });
55
- }
56
-
57
- /** @method */
58
- toggle() {
59
- Vue.set(this.state, 'visible', !this.state.visible);
60
- }
61
-
62
- /**
63
- * @method
64
- * @param {string} id
65
- * @returns {boolean}
66
- */
67
- has(id) {
68
- return !!this.get(id);
69
- }
70
-
71
- /**
72
- * @method
73
- * @param {string} id
74
- * @returns {Object}
75
- */
76
- get(id) {
77
- return Object.values(this.state.groups)
78
- .map(group => group.options)
79
- .flat()
80
- .find(item => item && item.id === id);
81
- }
82
-
83
- /**
84
- * @param {string} id
85
- * @param {boolean} disabled
86
- */
87
- setDisabled(id, disabled) {
88
- const [key, slot] = this.getSlotIndexAndEntry(id);
89
- const entry = slot.options.find(s => s.id === id);
90
- entry.disabled = disabled;
91
-
92
- Vue.set(this.state.groups, key, slot);
93
- }
94
-
95
- /**
96
- * TODO: return item as well
97
- * @param {string} id
98
- * @returns {[string, ToolboxGroup]}
99
- */
100
- getSlotIndexAndEntry(id) {
101
- return Object.entries(this.state.groups).find(
102
- entry => entry[1] &&
103
- entry[1].options &&
104
- entry[1].options.find(v => v.id === id),
105
- );
106
- }
107
-
108
- /** @param {string} id */
109
- selectOption(id) {
110
- const [key, slot] = this.getSlotIndexAndEntry(id);
111
- const option = slot.options.find(opt => opt.id === id);
112
- if (option) {
113
- option.selected = !option.selected;
114
- }
115
-
116
- Vue.set(this.state.groups, key, { ...slot });
117
- }
118
-
119
- /**
120
- * @param {string} id
121
- * @returns {number}
122
- */
123
- getSlotIndexFor(id) {
124
- const [index] = Object.entries(this.state.groups).find(entry => entry[1].options.find(o => o.id === id));
125
- return index;
126
- }
127
-
128
- /** @returns {number} */
129
- getNumberOfUsedSlots() {
130
- return Object.values(this.state.groups).reduce(
131
- (acc, curr) => (curr.type === 'toggleButton' ||
132
- curr.type === 'customComponent' ||
133
- (curr.options && curr.options.length) ?
134
- acc + 1 :
135
- acc),
136
- 0,
137
- );
138
- }
139
-
140
- /** @param {string} id */
141
- bringToTop(id) {
142
- const [key, slot] = this.getSlotIndexAndEntry(id);
143
-
144
- const updated = [
145
- slot.options.find(i => i.id === id),
146
- ...slot.options.filter(i => i.id !== id),
147
- ];
148
-
149
- Vue.set(this.state.groups, key, {
150
- ...slot,
151
- options: updated,
152
- });
153
- }
154
-
155
- /**
156
- * @param {ToolboxItem} toolboxItem
157
- * @param {string | number} slot
158
- */
159
- addToolboxItem(toolboxItem, slot) {
160
- if (this.has(toolboxItem.id)) {
161
- throw new Error(
162
- `Toolbox-Item with id ${toolboxItem.id} has already been registered`,
163
- );
164
- }
165
- Vue.set(this.state.groups, slot, {
166
- ...this.state.groups[slot],
167
- options: [...this.state.groups[slot].options, toolboxItem],
168
- });
169
- this.onAdded.raiseEvent(toolboxItem.id);
170
- }
171
-
172
- /**
173
- * @param {ToolboxGroup} group
174
- * @param {string | number} slot
175
- */
176
- addToolboxGroup(group, slot) {
177
- if (this.state.groups[slot]) {
178
- throw new Error(
179
- `Toolbox-Group with slot-id ${slot} has already been registered`,
180
- );
181
- }
182
- Vue.set(this.state.groups, slot, group);
183
- }
184
-
185
- /**
186
- * @method
187
- * @param {string | number} id ID of popover to be removed
188
- */
189
- removeToolboxItem(id) {
190
- const slotIndex = this.getSlotIndexFor(id);
191
- if (!slotIndex) {
192
- throw new Error(`Cannot find slot index for toolbar item with id ${id}`);
193
- }
194
-
195
- Vue.set(this.state.groups, slotIndex, {
196
- ...this.state.groups[slotIndex],
197
- options: [
198
- ...this.state.groups[slotIndex].options.filter(s => s.id !== id),
199
- ],
200
- });
201
- this.onRemoved.raiseEvent(id);
202
- }
203
- }