@vcmap/ui 6.0.0-rc.3 → 6.0.0-rc.6

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 (235) hide show
  1. package/build/buildHelpers.js +60 -11
  2. package/build/buildTypes.js +9 -5
  3. package/build/bundle.js +1 -1
  4. package/build/info/publish.js +25 -31
  5. package/build/lintTypes.js +5 -0
  6. package/config/base.config.json +2 -7
  7. package/config/dev.config.json +11 -1
  8. package/config/projects.config.json +2 -1
  9. package/config/theming.config.json +68 -0
  10. package/config/www.config.json +27 -23
  11. package/dist/assets/@mdi/font/css/{materialdesignicons.min-7a4f6be0.css → materialdesignicons.min-680621ca.css} +1 -1
  12. package/dist/assets/{cesium-cb4dbfba.js → cesium-ccb4cc30.js} +272 -385
  13. package/dist/assets/cesium.js +1 -1
  14. package/dist/assets/{core-72f21835.js → core-e06aa7a6.js} +2313 -2321
  15. package/dist/assets/core.js +1 -1
  16. package/dist/assets/{ol-2d33bc8b.js → ol-e7981d5c.js} +233 -329
  17. package/dist/assets/ol.js +1 -1
  18. package/dist/assets/ui-5dda32d2.css +1 -0
  19. package/dist/assets/{ui-2ab43a16.js → ui-5dda32d2.js} +11344 -11078
  20. package/dist/assets/ui.js +1 -1
  21. package/dist/assets/vue-87bc6efe.js +6083 -0
  22. package/dist/assets/vue.js +1 -1
  23. package/dist/assets/{vuetify-760ced3b.css → vuetify-4c4e4217.css} +2 -2
  24. package/dist/assets/{vuetify-760ced3b.js → vuetify-4c4e4217.js} +8063 -8262
  25. package/dist/assets/vuetify.js +1 -1
  26. package/index.d.ts +27 -17
  27. package/index.js +16 -8
  28. package/package.json +17 -17
  29. package/plugins/@vcmap-show-case/custom-icons-example/README.md +3 -0
  30. package/plugins/@vcmap-show-case/custom-icons-example/assets/imageExample.png +0 -0
  31. package/plugins/@vcmap-show-case/custom-icons-example/assets/svgExample.svg +1 -0
  32. package/plugins/@vcmap-show-case/custom-icons-example/package.json +5 -0
  33. package/plugins/@vcmap-show-case/custom-icons-example/src/CustomIconsExample.vue +90 -0
  34. package/plugins/@vcmap-show-case/custom-icons-example/src/index.js +45 -0
  35. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +2 -3
  36. package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +11 -7
  37. package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +18 -11
  38. package/plugins/@vcmap-show-case/search-example/src/index.js +1 -0
  39. package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +35 -5
  40. package/plugins/@vcmap-show-case/theming-example/README.md +3 -0
  41. package/plugins/@vcmap-show-case/theming-example/package.json +5 -0
  42. package/plugins/@vcmap-show-case/theming-example/src/ThemingExample.vue +116 -0
  43. package/plugins/@vcmap-show-case/theming-example/src/index.js +53 -0
  44. package/plugins/@vcmap-show-case/toolbox-example/src/index.js +2 -1
  45. package/plugins/package.json +7 -23
  46. package/public/assets/@mdi/font/css/materialdesignicons.min.css +1 -1
  47. package/src/actions/StyleSelector.vue +1 -1
  48. package/src/actions/actionHelper.d.ts +4 -11
  49. package/src/actions/actionHelper.js +15 -7
  50. package/src/actions/listActions.d.ts +5 -5
  51. package/src/actions/listActions.js +2 -2
  52. package/src/application/VcsApp.vue +113 -50
  53. package/src/application/VcsApp.vue.d.ts +301 -4
  54. package/src/application/VcsAttributionsFooter.vue.d.ts +1 -1
  55. package/src/application/VcsContainer.vue +27 -10
  56. package/src/application/VcsContainer.vue.d.ts +241 -0
  57. package/src/application/VcsMainMap.vue +7 -7
  58. package/src/application/VcsMainMap.vue.d.ts +2 -2
  59. package/src/application/VcsNavbar.vue +14 -2
  60. package/src/application/VcsNavbar.vue.d.ts +1 -0
  61. package/src/application/VcsSplashScreen.vue +33 -26
  62. package/src/application/VcsTextPageFooter.vue +2 -1
  63. package/src/application/attributionsHelper.d.ts +20 -22
  64. package/src/application/attributionsHelper.js +4 -4
  65. package/src/callback/vcsCallback.d.ts +2 -2
  66. package/src/callback/vcsCallback.js +1 -1
  67. package/src/components/buttons/VcsActionButtonList.vue +61 -6
  68. package/src/components/buttons/VcsActionButtonList.vue.d.ts +28 -0
  69. package/src/components/buttons/VcsButton.vue +2 -4
  70. package/src/components/buttons/VcsButton.vue.d.ts +1 -1
  71. package/src/components/buttons/VcsFormButton.vue +4 -4
  72. package/src/components/buttons/VcsToolButton.vue +4 -2
  73. package/src/components/buttons/VcsToolButton.vue.d.ts +2 -2
  74. package/src/components/composables.d.ts +5 -0
  75. package/src/components/composables.js +79 -9
  76. package/src/components/extent/VcsExtent.vue +10 -6
  77. package/src/components/extent/VcsExtent.vue.d.ts +1 -0
  78. package/src/components/flight/VcsFlightComponent.vue +13 -13
  79. package/src/components/flight/VcsFlightComponent.vue.d.ts +1 -0
  80. package/src/components/form-inputs-controls/VcsCheckbox.vue +8 -3
  81. package/src/components/form-inputs-controls/VcsChipArrayInput.vue +13 -16
  82. package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +2 -4
  83. package/src/components/form-inputs-controls/VcsCoordinate.vue +4 -4
  84. package/src/components/form-inputs-controls/VcsFileInput.vue +1 -1
  85. package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
  86. package/src/components/form-inputs-controls/VcsRadio.vue +8 -6
  87. package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
  88. package/src/components/form-inputs-controls/VcsSelect.vue +2 -5
  89. package/src/components/form-inputs-controls/VcsSlider.vue +5 -6
  90. package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -4
  91. package/src/components/form-inputs-controls/VcsTextArea.vue +2 -5
  92. package/src/components/form-inputs-controls/VcsTextField.vue +24 -1
  93. package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +11 -1
  94. package/src/components/form-inputs-controls/VcsWizard.vue +3 -3
  95. package/src/components/form-inputs-controls/VcsWizardStep.vue +6 -5
  96. package/src/components/form-inputs-controls/vcsTextField.scss +8 -5
  97. package/src/components/form-output/VcsFormattedNumber.vue +7 -5
  98. package/src/components/form-output/VcsMarkdown.vue +15 -12
  99. package/src/components/form-output/VcsMarkdown.vue.d.ts +1 -0
  100. package/src/components/form-output/markdownHelper.d.ts +30 -0
  101. package/src/components/form-output/markdownHelper.js +398 -0
  102. package/src/components/import/VcsFileDrop.vue +8 -5
  103. package/src/components/import/VcsImportComponent.vue +8 -4
  104. package/src/components/import/VcsImportComponent.vue.d.ts +1 -2
  105. package/src/components/lists/VcsActionList.vue +6 -6
  106. package/src/components/lists/VcsList.vue +22 -37
  107. package/src/components/lists/VcsList.vue.d.ts +14 -55
  108. package/src/components/lists/{VcsListItem.vue → VcsListItemComponent.vue} +37 -11
  109. package/src/components/lists/VcsListItemComponent.vue.d.ts +79 -0
  110. package/src/components/lists/VcsTreeview.vue +95 -26
  111. package/src/components/lists/VcsTreeview.vue.d.ts +16 -3
  112. package/src/components/lists/VcsTreeviewSearchbar.vue +16 -5
  113. package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +3 -1
  114. package/src/components/lists/VcsTreeviewTitle.vue +36 -0
  115. package/src/components/modelHelper.d.ts +10 -8
  116. package/src/components/modelHelper.js +8 -6
  117. package/src/components/notification/VcsHelp.vue +6 -7
  118. package/src/components/notification/VcsHelp.vue.d.ts +0 -8
  119. package/src/components/plugins/AbstractConfigEditor.vue +1 -22
  120. package/src/components/plugins/AbstractConfigEditor.vue.d.ts +6 -29
  121. package/src/components/section/VcsExpansionPanel.vue +9 -3
  122. package/src/components/section/VcsExpansionPanel.vue.d.ts +2 -2
  123. package/src/components/section/VcsFormSection.vue +13 -7
  124. package/src/components/section/VcsFormSection.vue.d.ts +2 -3
  125. package/src/components/style/VcsImageSelector.vue +14 -6
  126. package/src/components/style/VcsImageSelector.vue.d.ts +1 -0
  127. package/src/components/style/VcsStrokeSelector.vue +5 -2
  128. package/src/components/style/VcsStrokeSelector.vue.d.ts +1 -0
  129. package/src/components/style/VcsTextMenu.vue +3 -3
  130. package/src/components/style/VcsVectorStyleComponent.vue +1 -1
  131. package/src/components/tables/VcsDataTable.vue +42 -32
  132. package/src/components/tables/VcsDataTable.vue.d.ts +1 -0
  133. package/src/components/tables/VcsTable.vue +45 -62
  134. package/src/components/tables/VcsTable.vue.d.ts +30 -17
  135. package/src/components/tables/VcsTableCell.vue +72 -0
  136. package/src/components/tables/VcsTableCell.vue.d.ts +13 -0
  137. package/src/components/vector-properties/VcsFeatureEditingWindow.vue +6 -5
  138. package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -0
  139. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +42 -31
  140. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -0
  141. package/src/components/viewpoint/VcsViewpointComponent.vue +14 -11
  142. package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +1 -0
  143. package/src/components/viewpoint/VcsViewpointEditor.vue +2 -2
  144. package/src/contentTree/LayerTree.vue +9 -27
  145. package/src/contentTree/LayerTree.vue.d.ts +1 -1
  146. package/src/contentTree/contentTreeCollection.d.ts +1 -0
  147. package/src/contentTree/contentTreeCollection.js +45 -11
  148. package/src/contentTree/contentTreeItem.d.ts +2 -2
  149. package/src/contentTree/contentTreeItem.js +1 -1
  150. package/src/featureInfo/BalloonComponent.vue +32 -25
  151. package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
  152. package/src/featureInfo/MarkdownBalloonComponent.vue +4 -2
  153. package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
  154. package/src/featureInfo/abstractFeatureInfoView.d.ts +10 -4
  155. package/src/featureInfo/abstractFeatureInfoView.js +19 -11
  156. package/src/featureInfo/featureInfo.d.ts +7 -7
  157. package/src/featureInfo/featureInfo.js +51 -31
  158. package/src/featureInfo/iframeFeatureInfoView.d.ts +8 -2
  159. package/src/featureInfo/iframeFeatureInfoView.js +15 -5
  160. package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +1 -1
  161. package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -5
  162. package/src/featureInfo/markdownFeatureInfoView.d.ts +1 -1
  163. package/src/featureInfo/markdownFeatureInfoView.js +9 -11
  164. package/src/featureInfo/tableFeatureInfoView.js +13 -4
  165. package/src/i18n/i18nCollection.d.ts +9 -15
  166. package/src/i18n/i18nCollection.js +3 -3
  167. package/src/legend/VcsLegend.vue +6 -2
  168. package/src/legend/VcsLegend.vue.d.ts +1 -0
  169. package/src/manager/collectionManager/CollectionComponentList.vue +2 -2
  170. package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +2 -2
  171. package/src/manager/collectionManager/categoryManager.d.ts +1 -1
  172. package/src/manager/collectionManager/collectionComponentClass.d.ts +3 -3
  173. package/src/manager/collectionManager/collectionComponentClass.js +6 -6
  174. package/src/manager/collectionManager/collectionManager.d.ts +1 -1
  175. package/src/manager/collectionManager/editorCollectionComponentClass.js +2 -1
  176. package/src/manager/panel/PanelComponent.vue +2 -9
  177. package/src/manager/panel/PanelManagerComponent.vue +7 -3
  178. package/src/manager/panel/panelHelper.js +3 -3
  179. package/src/manager/panel/panelManager.d.ts +9 -1
  180. package/src/manager/panel/panelManager.js +15 -3
  181. package/src/manager/toolbox/GroupToolboxComponent.vue +11 -5
  182. package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
  183. package/src/manager/toolbox/SelectToolboxComponent.vue +11 -6
  184. package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
  185. package/src/manager/toolbox/{ToolboxManager.vue → ToolboxManagerComponent.vue} +13 -7
  186. package/src/manager/toolbox/{ToolboxManager.vue.d.ts → ToolboxManagerComponent.vue.d.ts} +1 -0
  187. package/src/manager/window/WindowComponent.vue +12 -8
  188. package/src/manager/window/WindowComponentHeader.vue +33 -9
  189. package/src/manager/window/WindowComponentHeader.vue.d.ts +3 -0
  190. package/src/manager/window/WindowManager.vue +2 -2
  191. package/src/manager/window/windowManager.d.ts +6 -6
  192. package/src/manager/window/windowManager.js +3 -3
  193. package/src/navigation/MapNavigation.vue +20 -0
  194. package/src/navigation/OrientationToolsButton.vue +2 -4
  195. package/src/navigation/TiltSlider.vue +3 -5
  196. package/src/navigation/locatorHelper.js +1 -1
  197. package/src/navigation/overviewMap.js +1 -1
  198. package/src/notifier/NotifierComponent.vue +18 -15
  199. package/src/search/ResultItem.vue +18 -6
  200. package/src/search/ResultsComponent.vue +31 -20
  201. package/src/search/ResultsComponent.vue.d.ts +2 -1
  202. package/src/search/SearchComponent.vue +11 -15
  203. package/src/search/SearchComponent.vue.d.ts +1 -0
  204. package/src/siteConfig.js +8 -8
  205. package/src/styles/_typography.scss +0 -2
  206. package/src/styles/main.scss +0 -4
  207. package/src/styles/vcsList.scss +1 -1
  208. package/src/uiConfig.d.ts +311 -7
  209. package/src/uiConfig.js +30 -17
  210. package/src/vcsUiApp.d.ts +48 -63
  211. package/src/vcsUiApp.js +44 -37
  212. package/src/vuePlugins/vuetify.d.ts +88 -62
  213. package/src/vuePlugins/vuetify.js +119 -20
  214. package/dist/assets/ui-2ab43a16.css +0 -1
  215. package/dist/assets/vue-03b265aa.js +0 -6096
  216. package/plugins/@vcmap-show-case/theme-changer/README.md +0 -23
  217. package/plugins/@vcmap-show-case/theme-changer/config.json +0 -69
  218. package/plugins/@vcmap-show-case/theme-changer/package.json +0 -11
  219. package/plugins/@vcmap-show-case/theme-changer/src/ThemeChangerComponent.vue +0 -120
  220. package/plugins/@vcmap-show-case/theme-changer/src/index.js +0 -108
  221. package/src/application/markdownHelper.d.ts +0 -12
  222. package/src/application/markdownHelper.js +0 -70
  223. package/src/components/lists/VcsListItem.vue.d.ts +0 -27
  224. package/src/components/lists/VcsTreeviewLeaf.vue +0 -83
  225. package/src/components/notification/VcsTooltip.vue +0 -156
  226. package/src/components/notification/VcsTooltip.vue.d.ts +0 -27
  227. package/src/featureInfo/MarkdownComponent.vue +0 -16
  228. package/src/featureInfo/MarkdownComponent.vue.d.ts +0 -7
  229. package/src/styles/_theming.scss +0 -73
  230. package/src/styles/settings.scss +0 -6
  231. package/src/styles/shades.scss +0 -4
  232. package/src/styles/variables.scss +0 -140
  233. package/src/styles/vcsFont.scss +0 -2
  234. package/src/styles/vcsGrid.scss +0 -3
  235. /package/src/components/lists/{VcsTreeviewLeaf.vue.d.ts → VcsTreeviewTitle.vue.d.ts} +0 -0
package/src/vcsUiApp.js CHANGED
@@ -48,40 +48,46 @@ import { createVcsVuetify } from './vuePlugins/vuetify.js';
48
48
 
49
49
  /**
50
50
  * @typedef {import("@vcmap/core").VcsModuleConfig & {
51
- * plugins?: Object[],
51
+ * plugins?: Record<string, unknown>[],
52
52
  * contentTree?: import("./contentTree/contentTreeItem.js").ContentTreeItemOptions[],
53
53
  * uiConfig?: import("./uiConfig.js").UiConfigurationItem<unknown>[],
54
54
  * featureInfo?: import("./featureInfo/abstractFeatureInfoView.js").FeatureInfoViewOptions[],
55
- * i18n?: Object[]
55
+ * i18n?: import("./i18n/i18nCollection.js").I18nConfigurationItem[]
56
56
  * }} VcsUiModuleConfig
57
57
  */
58
58
 
59
59
  /**
60
- * @typedef {Object} PluginConfig
60
+ * @typedef {{ name: string, entry?: string, version?: string}} PluginConfig
61
61
  * @property {string} name
62
62
  * @property {string|undefined} [entry] - path to the plugin's index.js
63
63
  * @property {string|undefined} [version] - version or version range
64
64
  */
65
65
 
66
66
  /**
67
- * @typedef {import("vue").Component<{ getConfig(): Promise<Config>, setConfig(config: Config): Promise<void> }> & {
68
- * title?: string
69
- * }} PluginConfigEditorComponent
67
+ * @typedef {import("vue").Component<{ getConfig(): Config, setConfig(config?: Config): void }>} PluginConfigEditorComponent
70
68
  * @template {Object} Config
71
69
  */
72
70
 
73
71
  /**
74
- * @typedef {Object} PluginConfigEditor
75
- * @property {PluginConfigEditorComponent<object>} component - A editor component to configure a plugin or item
72
+ * @typedef {{
73
+ * component: PluginConfigEditorComponent<Config>,
74
+ * title?: string,
75
+ * collectionName?: string,
76
+ * itemName?: string,
77
+ * infoUrlCallback?: () => string,
78
+ * }} PluginConfigEditor
79
+ * @template {Object} Config
80
+ * @property {PluginConfigEditorComponent<Config>} component - A editor component to configure a plugin or item
81
+ * @property {string} [title] - optional title to render in the window header & actions of this editor
76
82
  * @property {string} [collectionName='plugins'] - The collection the item belongs to. Default is plugins collection.
77
83
  * @property {string} [itemName] - The item the editor can be used for. Can be a name or className. Default is the plugin's name.
78
84
  * @property {function():string} [infoUrlCallback] - An optional function returning an url referencing help or further information regarding the config editor.
79
85
  */
80
86
 
81
87
  /**
82
- * @typedef {function(P, string):VcsPlugin<P, S>} createPlugin
83
- * @template {Object} P
84
- * @template {Object} S
88
+ * @typedef {function(Config, string):VcsPlugin<Config, State>} createPlugin
89
+ * @template {Object} Config
90
+ * @template {Object} State
85
91
  */
86
92
 
87
93
  /**
@@ -92,22 +98,22 @@ import { createVcsVuetify } from './vuePlugins/vuetify.js';
92
98
  * version: string,
93
99
  * mapVersion: string,
94
100
  * i18n?: Object<string, unknown>,
95
- * initialize?: function(import("@src/vcsUiApp.js").default, S=):void|Promise<void>,
101
+ * initialize?: function(import("@src/vcsUiApp.js").default, State=):void|Promise<void>,
96
102
  * onVcsAppMounted?: function(import("@src/vcsUiApp.js").default):void,
97
- * toJSON?: function(): P,
98
- * getDefaultOptions?: function(): P,
99
- * getState?: function(boolean=):S|Promise<S>,
100
- * getConfigEditors?: function():Array<PluginConfigEditor>,
103
+ * toJSON?: function(): Config,
104
+ * getDefaultOptions?: function(): Config,
105
+ * getState?: function(boolean=):State|Promise<State>,
106
+ * getConfigEditors?: function():Array<PluginConfigEditor<Config>>,
101
107
  * destroy?: function(): void
102
108
  * }} VcsPlugin
103
- * @template {Object} P
104
- * @template {Object} S
109
+ * @template {Object} Config
110
+ * @template {Object} State
105
111
  * @property {Object<string, *>} [i18n] - the i18n messages of this plugin
106
- * @property {function(import("@src/vcsUiApp.js").default, S=)} initialize - called on plugin added. Is passed the VcsUiApp and optionally, the state for the plugin
112
+ * @property {function(import("@src/vcsUiApp.js").default, State=)} initialize - called on plugin added. Is passed the VcsUiApp and optionally, the state for the plugin
107
113
  * @property {function(import("@src/vcsUiApp.js").default)} onVcsAppMounted - called on mounted of VcsApp.vue
108
- * @property {function():P} [toJSON] - should return the plugin's serialization excluding all default values
109
- * @property {function():P} [getDefaultOptions] - should return the plugin's default options
110
- * @property {function(boolean=):S|Promise<S>} [getState] - should return the plugin's state or a promise for said state. is passed a "for url" flag. If true, only the state relevant for sharing a URL should be passed and short keys shall be used
114
+ * @property {function():Config} [toJSON] - should return the plugin's serialization excluding all default values
115
+ * @property {function():Config} [getDefaultOptions] - should return the plugin's default options
116
+ * @property {function(boolean=):S|Promise<State>} [getState] - should return the plugin's state or a promise for said state. is passed a "for url" flag. If true, only the state relevant for sharing a URL should be passed and short keys shall be used
111
117
  * @property {Array<PluginConfigEditor>} [getConfigEditors] - should return components for configuring the plugin or custom items defined by the plugin
112
118
  * @api
113
119
  */
@@ -164,7 +170,7 @@ class VcsUiApp extends VcsApp {
164
170
  */
165
171
  this.themeChanged = new VcsEvent();
166
172
  /**
167
- * @type {import("@vcmap/core").OverrideCollection<VcsPlugin>}
173
+ * @type {import("@vcmap/core").OverrideCollection<VcsPlugin, Collection<VcsPlugin>, Object>}
168
174
  * @private
169
175
  */
170
176
  this._plugins = makeOverrideCollection(
@@ -260,13 +266,19 @@ class VcsUiApp extends VcsApp {
260
266
  );
261
267
 
262
268
  /**
263
- * @type {import("@vcmap/core").OverrideClassRegistry<import("@vcmap/core").Ctor<ContentTreeItem>>}
269
+ * @type {import("@vcmap/core").OverrideClassRegistry<typeof ContentTreeItem>}
264
270
  * @private
265
271
  */
266
272
  this._contentTreeClassRegistry = new OverrideClassRegistry(
267
273
  contentTreeClassRegistry,
268
274
  );
269
275
 
276
+ /**
277
+ * @type {import("@vcmap/core").OverrideCollection<import("./uiConfig.js").UiConfigurationItem<unknown>, UiConfig>}
278
+ * @private
279
+ */
280
+ this._uiConfig = new UiConfig(() => this.dynamicModuleId);
281
+
270
282
  /**
271
283
  * @type {import("@vcmap/core").OverrideCollection<import("./contentTree/contentTreeItem.js").ContentTreeItem, import("./contentTree/contentTreeCollection.js").ContentTreeCollection>}
272
284
  * @private
@@ -298,10 +310,11 @@ class VcsUiApp extends VcsApp {
298
310
  this._navbarManager = new NavbarManager();
299
311
 
300
312
  /**
301
- * @type {import("@vcmap/core").OverrideCollection<import("./uiConfig.js").UiConfigurationItem<unknown>, UiConfig>}
313
+ * @type {Search}
302
314
  * @private
303
315
  */
304
- this._uiConfig = new UiConfig(() => this.dynamicModuleId);
316
+ this._search = new Search(this);
317
+
305
318
  /**
306
319
  * @type {import("@vcmap/core").OverrideClassRegistry<AbstractFeatureInfoView>}
307
320
  * @private
@@ -340,12 +353,6 @@ class VcsUiApp extends VcsApp {
340
353
  */
341
354
  this._contextMenuManager = new ContextMenuManager(this);
342
355
 
343
- /**
344
- * @type {Search}
345
- * @private
346
- */
347
- this._search = new Search(this);
348
-
349
356
  /**
350
357
  * @type {Notifier}
351
358
  * @private
@@ -368,7 +375,7 @@ class VcsUiApp extends VcsApp {
368
375
  }
369
376
 
370
377
  /**
371
- * @type {import("@vcmap/core").OverrideCollection<VcsPlugin<Object, Object>>}
378
+ * @type {import("@vcmap/core").OverrideCollection<VcsPlugin, Collection<VcsPlugin>, Object>}
372
379
  */
373
380
  get plugins() {
374
381
  return this._plugins;
@@ -382,21 +389,21 @@ class VcsUiApp extends VcsApp {
382
389
  }
383
390
 
384
391
  /**
385
- * @type {import("@vcmap/core").OverrideClassRegistry<import("@vcmap/core").Ctor<typeof import("./callback/vcsCallback.js").default>>}
392
+ * @type {import("@vcmap/core").OverrideClassRegistry<typeof import("./callback/vcsCallback.js").default>}
386
393
  */
387
394
  get callbackClassRegistry() {
388
395
  return this._callbackClassRegistry;
389
396
  }
390
397
 
391
398
  /**
392
- * @type {import("@vcmap/core").OverrideClassRegistry<import("@vcmap/core").Ctor<typeof ContentTreeItem>>}
399
+ * @type {import("@vcmap/core").OverrideClassRegistry<typeof ContentTreeItem>}
393
400
  */
394
401
  get contentTreeClassRegistry() {
395
402
  return this._contentTreeClassRegistry;
396
403
  }
397
404
 
398
405
  /**
399
- * @type {import("@vcmap/core").OverrideClassRegistry<import("@vcmap/core").Ctor<typeof AbstractFeatureInfoView>>}
406
+ * @type {import("@vcmap/core").OverrideClassRegistry<typeof AbstractFeatureInfoView>}
400
407
  */
401
408
  get featureInfoClassRegistry() {
402
409
  return this._featureInfoClassRegistry;
@@ -527,7 +534,7 @@ class VcsUiApp extends VcsApp {
527
534
  )[0];
528
535
  return () => {
529
536
  const base =
530
- this.uiConfig.config.value.helpBaseUrl || 'https://help.vc.systems/';
537
+ this.uiConfig.config.helpBaseUrl || 'https://help.vc.systems/';
531
538
  const url = `${
532
539
  this.locale
533
540
  }/${subpage}/v${mayorMinorVersion}/${path.replace(/^\//, '')}`;
@@ -1,61 +1,54 @@
1
- export function createVcsThemes(): {
2
- light: {
3
- colors: {
4
- base: string;
5
- 'base-lighten-5': string;
6
- 'base-lighten-4': string;
7
- 'base-lighten-3': string;
8
- 'base-lighten-2': string;
9
- 'base-lighten-1': string;
10
- 'base-darken-1': string;
11
- 'base-darken-2': string;
12
- 'base-darken-3': string;
13
- 'base-darken-4': string;
14
- primary: string;
15
- warning: string;
16
- error: string;
17
- info: string;
18
- success: string;
19
- 'surface-light': string;
20
- };
21
- variables: {
22
- 'hover-opacity': number;
23
- 'high-emphasis-opacity': number;
24
- 'medium-emphasis-opacity': number;
25
- 'vcs-item-height': string;
26
- 'vcs-font-size': string;
27
- 'vcs-font-family': string;
28
- };
29
- };
30
- dark: {
31
- colors: {
32
- base: string;
33
- 'base-lighten-5': string;
34
- 'base-lighten-4': string;
35
- 'base-lighten-3': string;
36
- 'base-lighten-2': string;
37
- 'base-lighten-1': string;
38
- 'base-darken-1': string;
39
- 'base-darken-2': string;
40
- 'base-darken-3': string;
41
- 'base-darken-4': string;
42
- primary: string;
43
- warning: string;
44
- error: string;
45
- info: string;
46
- success: string;
47
- 'surface-light': string;
48
- };
49
- variables: {
50
- 'hover-opacity': number;
51
- 'high-emphasis-opacity': number;
52
- 'medium-emphasis-opacity': number;
53
- 'vcs-item-height': string;
54
- 'vcs-font-size': string;
55
- 'vcs-font-family': string;
56
- };
57
- };
58
- };
1
+ /**
2
+ * @typedef {Object} VcsColors
3
+ * @property {string} [base]
4
+ * @property {string} [base-lighten-5]
5
+ * @property {string} [base-lighten-4]
6
+ * @property {string} [base-lighten-3]
7
+ * @property {string} [base-lighten-2]
8
+ * @property {string} [base-lighten-1]
9
+ * @property {string} [base-darken-1]
10
+ * @property {string} [base-darken-2]
11
+ * @property {string} [base-darken-3]
12
+ * @property {string} [base-darken-4]
13
+ * @property {string} [primary]
14
+ * @property {string} [warning]
15
+ * @property {string} [error]
16
+ * @property {string} [info]
17
+ * @property {string} [success]
18
+ * @property {string} [surface-light]
19
+ */
20
+ /**
21
+ * @typedef {Object} VcsVariables
22
+ * @property {string} [hover-opacity]
23
+ * @property {string} [high-emphasis-opacity]
24
+ * @property {string} [medium-emphasis-opacity]
25
+ * @property {string} [vcs-font-size]
26
+ * @property {string} [vcs-font-family]
27
+ */
28
+ /**
29
+ * @typedef {Object} VcsTheme
30
+ * @property {VcsColors} [colors]
31
+ * @property {VcsVariables} [variables]
32
+ */
33
+ /**
34
+ * @typedef {Object} VcsThemes
35
+ * @property {VcsTheme} [dark]
36
+ * @property {VcsTheme} [light]
37
+ */
38
+ /**
39
+ * @param {VcsThemes} [options]
40
+ * @param {{ dark:string, light:string }|string} [primaryColor]
41
+ * @returns {VcsThemes}
42
+ */
43
+ export function createVcsThemes(options?: VcsThemes | undefined, primaryColor?: string | {
44
+ dark: string;
45
+ light: string;
46
+ } | undefined): VcsThemes;
47
+ /**
48
+ * @param {ReturnType<typeof import("vuetify").createVuetify>} vuetify
49
+ * @param {VcsThemes} theme
50
+ */
51
+ export function setTheme(vuetify: ReturnType<typeof import("vuetify").createVuetify>, theme: VcsThemes): void;
59
52
  /**
60
53
  * @param {import("vue-i18n").I18n} i18n
61
54
  * @returns {ReturnType<typeof import("vuetify").createVuetify>}
@@ -81,15 +74,15 @@ export function getDefaultPrimaryColor(app: import("../vcsUiApp.js").default): s
81
74
  */
82
75
  export function getColorByKey(app: import("../vcsUiApp.js").default, value: string, variant?: string | undefined): string;
83
76
  /**
84
- * returns the itemHeight as a number
77
+ * returns the fontSize as a number
85
78
  * @returns {import("vue").ComputedRef<number>}
86
79
  */
87
- export function useItemHeight(): import("vue").ComputedRef<number>;
80
+ export function useFontSize(): import("vue").ComputedRef<number>;
88
81
  /**
89
- * returns the fontSize as a number
82
+ * returns the default IconSize as a number, value is based on the fontSize
90
83
  * @returns {import("vue").ComputedRef<number>}
91
84
  */
92
- export function useFontSize(): import("vue").ComputedRef<number>;
85
+ export function useIconSize(): import("vue").ComputedRef<number>;
93
86
  /**
94
87
  * @type {{light:string,dark:string}}
95
88
  */
@@ -97,3 +90,36 @@ export const defaultPrimaryColor: {
97
90
  light: string;
98
91
  dark: string;
99
92
  };
93
+ export type VcsColors = {
94
+ base?: string | undefined;
95
+ "base-lighten-5"?: string | undefined;
96
+ "base-lighten-4"?: string | undefined;
97
+ "base-lighten-3"?: string | undefined;
98
+ "base-lighten-2"?: string | undefined;
99
+ "base-lighten-1"?: string | undefined;
100
+ "base-darken-1"?: string | undefined;
101
+ "base-darken-2"?: string | undefined;
102
+ "base-darken-3"?: string | undefined;
103
+ "base-darken-4"?: string | undefined;
104
+ primary?: string | undefined;
105
+ warning?: string | undefined;
106
+ error?: string | undefined;
107
+ info?: string | undefined;
108
+ success?: string | undefined;
109
+ "surface-light"?: string | undefined;
110
+ };
111
+ export type VcsVariables = {
112
+ "hover-opacity"?: string | undefined;
113
+ "high-emphasis-opacity"?: string | undefined;
114
+ "medium-emphasis-opacity"?: string | undefined;
115
+ "vcs-font-size"?: string | undefined;
116
+ "vcs-font-family"?: string | undefined;
117
+ };
118
+ export type VcsTheme = {
119
+ colors?: VcsColors | undefined;
120
+ variables?: VcsVariables | undefined;
121
+ };
122
+ export type VcsThemes = {
123
+ dark?: VcsTheme | undefined;
124
+ light?: VcsTheme | undefined;
125
+ };
@@ -1,8 +1,10 @@
1
1
  import { createVuetify, useTheme } from 'vuetify';
2
+ import { VSvgIcon } from 'vuetify/components';
2
3
  import { useI18n } from 'vue-i18n';
3
4
  import 'vuetify/styles';
4
5
  import { createVueI18nAdapter } from 'vuetify/locale/adapters/vue-i18n';
5
- import { computed } from 'vue';
6
+ import { computed, h } from 'vue';
7
+ import DOMPurify from 'dompurify';
6
8
  import Icons from '../components/icons/+all.js';
7
9
 
8
10
  /**
@@ -13,7 +15,53 @@ export const defaultPrimaryColor = {
13
15
  dark: '#27B97C',
14
16
  };
15
17
 
16
- export function createVcsThemes() {
18
+ /**
19
+ * @typedef {Object} VcsColors
20
+ * @property {string} [base]
21
+ * @property {string} [base-lighten-5]
22
+ * @property {string} [base-lighten-4]
23
+ * @property {string} [base-lighten-3]
24
+ * @property {string} [base-lighten-2]
25
+ * @property {string} [base-lighten-1]
26
+ * @property {string} [base-darken-1]
27
+ * @property {string} [base-darken-2]
28
+ * @property {string} [base-darken-3]
29
+ * @property {string} [base-darken-4]
30
+ * @property {string} [primary]
31
+ * @property {string} [warning]
32
+ * @property {string} [error]
33
+ * @property {string} [info]
34
+ * @property {string} [success]
35
+ * @property {string} [surface-light]
36
+ */
37
+
38
+ /**
39
+ * @typedef {Object} VcsVariables
40
+ * @property {string} [hover-opacity]
41
+ * @property {string} [high-emphasis-opacity]
42
+ * @property {string} [medium-emphasis-opacity]
43
+ * @property {string} [vcs-font-size]
44
+ * @property {string} [vcs-font-family]
45
+ */
46
+
47
+ /**
48
+ * @typedef {Object} VcsTheme
49
+ * @property {VcsColors} [colors]
50
+ * @property {VcsVariables} [variables]
51
+ */
52
+
53
+ /**
54
+ * @typedef {Object} VcsThemes
55
+ * @property {VcsTheme} [dark]
56
+ * @property {VcsTheme} [light]
57
+ */
58
+
59
+ /**
60
+ * @param {VcsThemes} [options]
61
+ * @param {{ dark:string, light:string }|string} [primaryColor]
62
+ * @returns {VcsThemes}
63
+ */
64
+ export function createVcsThemes(options, primaryColor) {
17
65
  return {
18
66
  light: {
19
67
  colors: {
@@ -27,20 +75,22 @@ export function createVcsThemes() {
27
75
  'base-darken-2': '#6B6B6B',
28
76
  'base-darken-3': '#525252',
29
77
  'base-darken-4': '#383838',
30
- primary: defaultPrimaryColor.light,
78
+ primary:
79
+ primaryColor?.dark ?? primaryColor ?? defaultPrimaryColor.light,
31
80
  warning: '#FFCE00',
32
81
  error: '#AA0000',
33
82
  info: '#2196F3',
34
83
  success: '#4CAF50',
35
84
  'surface-light': '#ffffff',
85
+ ...options?.light?.colors,
36
86
  },
37
87
  variables: {
38
88
  'hover-opacity': 0.16,
39
89
  'high-emphasis-opacity': 1,
40
90
  'medium-emphasis-opacity': 1,
41
- 'vcs-item-height': '32px',
42
91
  'vcs-font-size': '13px',
43
92
  'vcs-font-family': 'Titillium Web',
93
+ ...options?.light?.variables,
44
94
  },
45
95
  },
46
96
  dark: {
@@ -55,25 +105,71 @@ export function createVcsThemes() {
55
105
  'base-darken-2': '#D0D0D0',
56
106
  'base-darken-3': '#EBEBEB',
57
107
  'base-darken-4': '#F8F8F8',
58
- primary: defaultPrimaryColor.dark,
108
+ primary: primaryColor?.dark ?? primaryColor ?? defaultPrimaryColor.dark,
59
109
  warning: '#FFCE00',
60
110
  error: '#FF5252',
61
111
  info: '#2196F3',
62
112
  success: '#4CAF50',
63
113
  'surface-light': '#222222',
114
+ ...options?.dark?.colors,
64
115
  },
65
116
  variables: {
66
117
  'hover-opacity': 0.16,
67
118
  'high-emphasis-opacity': 1,
68
119
  'medium-emphasis-opacity': 1,
69
- 'vcs-item-height': '40px',
70
- 'vcs-font-size': '15px',
120
+ 'vcs-font-size': '13px',
71
121
  'vcs-font-family': 'Titillium Web',
122
+ ...options?.dark?.variables,
72
123
  },
73
124
  },
74
125
  };
75
126
  }
76
127
 
128
+ /**
129
+ * @param {ReturnType<typeof import("vuetify").createVuetify>} vuetify
130
+ * @param {VcsThemes} theme
131
+ */
132
+ export function setTheme(vuetify, theme) {
133
+ Object.assign(vuetify.theme.themes.value.light.colors, theme?.light?.colors);
134
+ Object.assign(
135
+ vuetify.theme.themes.value.light.variables,
136
+ theme?.light?.variables,
137
+ );
138
+ Object.assign(vuetify.theme.themes.value.dark.colors, theme?.dark?.colors);
139
+ Object.assign(
140
+ vuetify.theme.themes.value.dark.variables,
141
+ theme?.dark?.variables,
142
+ );
143
+ }
144
+
145
+ const imageUrlSet = {
146
+ component: (props) =>
147
+ h(
148
+ props.tag,
149
+ h('img', {
150
+ src: props.icon,
151
+ alt: 'custom icon',
152
+ style: { width: 'auto', height: '100%' },
153
+ }),
154
+ ),
155
+ };
156
+
157
+ const svgStringSet = {
158
+ component: (props) => {
159
+ const svg = new DOMParser()
160
+ .parseFromString(DOMPurify.sanitize(props.icon), 'image/svg+xml')
161
+ .querySelector('svg');
162
+ svg?.classList.add('v-icon__svg');
163
+ return h(props.tag, {
164
+ innerHTML: svg?.outerHTML,
165
+ });
166
+ },
167
+ };
168
+
169
+ const svgPathDataSet = {
170
+ component: VSvgIcon,
171
+ };
172
+
77
173
  /**
78
174
  * @param {import("vue-i18n").I18n} i18n
79
175
  * @returns {ReturnType<typeof import("vuetify").createVuetify>}
@@ -103,9 +199,6 @@ export function createVcsVuetify(i18n) {
103
199
  VBtn: {
104
200
  ripple: false,
105
201
  },
106
- VIcon: {
107
- size: 16,
108
- },
109
202
  VList: {
110
203
  density: 'compact',
111
204
  class: 'pa-0 vcsList',
@@ -135,6 +228,9 @@ export function createVcsVuetify(i18n) {
135
228
  density: 'compact',
136
229
  ripple: false,
137
230
  },
231
+ VDataTable: {
232
+ density: 'compact',
233
+ },
138
234
  VSelect: {
139
235
  density: 'compact',
140
236
  },
@@ -166,6 +262,11 @@ export function createVcsVuetify(i18n) {
166
262
  aliases: {
167
263
  ...Icons,
168
264
  },
265
+ sets: {
266
+ imageUrl: imageUrlSet,
267
+ svgString: svgStringSet,
268
+ svgPathData: svgPathDataSet,
269
+ },
169
270
  },
170
271
  locale: {
171
272
  adapter: createVueI18nAdapter({ i18n, useI18n }),
@@ -209,27 +310,25 @@ export function getColorByKey(app, value, variant) {
209
310
  }
210
311
 
211
312
  /**
212
- * returns the itemHeight as a number
313
+ * returns the fontSize as a number
213
314
  * @returns {import("vue").ComputedRef<number>}
214
315
  */
215
- export function useItemHeight() {
316
+ export function useFontSize() {
216
317
  const theme = useTheme();
217
318
  return computed(() => {
218
- const itemHeight = theme.current.value.variables['vcs-item-height'] ?? 32;
319
+ const fontSize = theme.current.value.variables['vcs-font-size'] ?? 13;
219
320
  // get rid of `px`
220
- return Number.parseFloat(itemHeight);
321
+ return Number.parseFloat(fontSize);
221
322
  });
222
323
  }
223
324
 
224
325
  /**
225
- * returns the fontSize as a number
326
+ * returns the default IconSize as a number, value is based on the fontSize
226
327
  * @returns {import("vue").ComputedRef<number>}
227
328
  */
228
- export function useFontSize() {
229
- const theme = useTheme();
329
+ export function useIconSize() {
330
+ const fontSize = useFontSize();
230
331
  return computed(() => {
231
- const fontSize = theme.current.value.variables['vcs-font-size'] ?? 13;
232
- // get rid of `px`
233
- return Number.parseFloat(fontSize);
332
+ return fontSize.value * (1.2 + 0.1 / 3);
234
333
  });
235
334
  }