@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.
- package/build/buildHelpers.js +60 -11
- package/build/buildTypes.js +9 -5
- package/build/bundle.js +1 -1
- package/build/info/publish.js +25 -31
- package/build/lintTypes.js +5 -0
- package/config/base.config.json +2 -7
- package/config/dev.config.json +11 -1
- package/config/projects.config.json +2 -1
- package/config/theming.config.json +68 -0
- package/config/www.config.json +27 -23
- package/dist/assets/@mdi/font/css/{materialdesignicons.min-7a4f6be0.css → materialdesignicons.min-680621ca.css} +1 -1
- package/dist/assets/{cesium-cb4dbfba.js → cesium-ccb4cc30.js} +272 -385
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-72f21835.js → core-e06aa7a6.js} +2313 -2321
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-2d33bc8b.js → ol-e7981d5c.js} +233 -329
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-5dda32d2.css +1 -0
- package/dist/assets/{ui-2ab43a16.js → ui-5dda32d2.js} +11344 -11078
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue-87bc6efe.js +6083 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-760ced3b.css → vuetify-4c4e4217.css} +2 -2
- package/dist/assets/{vuetify-760ced3b.js → vuetify-4c4e4217.js} +8063 -8262
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +27 -17
- package/index.js +16 -8
- package/package.json +17 -17
- package/plugins/@vcmap-show-case/custom-icons-example/README.md +3 -0
- package/plugins/@vcmap-show-case/custom-icons-example/assets/imageExample.png +0 -0
- package/plugins/@vcmap-show-case/custom-icons-example/assets/svgExample.svg +1 -0
- package/plugins/@vcmap-show-case/custom-icons-example/package.json +5 -0
- package/plugins/@vcmap-show-case/custom-icons-example/src/CustomIconsExample.vue +90 -0
- package/plugins/@vcmap-show-case/custom-icons-example/src/index.js +45 -0
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +2 -3
- package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +11 -7
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +18 -11
- package/plugins/@vcmap-show-case/search-example/src/index.js +1 -0
- package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +35 -5
- package/plugins/@vcmap-show-case/theming-example/README.md +3 -0
- package/plugins/@vcmap-show-case/theming-example/package.json +5 -0
- package/plugins/@vcmap-show-case/theming-example/src/ThemingExample.vue +116 -0
- package/plugins/@vcmap-show-case/theming-example/src/index.js +53 -0
- package/plugins/@vcmap-show-case/toolbox-example/src/index.js +2 -1
- package/plugins/package.json +7 -23
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +1 -1
- package/src/actions/StyleSelector.vue +1 -1
- package/src/actions/actionHelper.d.ts +4 -11
- package/src/actions/actionHelper.js +15 -7
- package/src/actions/listActions.d.ts +5 -5
- package/src/actions/listActions.js +2 -2
- package/src/application/VcsApp.vue +113 -50
- package/src/application/VcsApp.vue.d.ts +301 -4
- package/src/application/VcsAttributionsFooter.vue.d.ts +1 -1
- package/src/application/VcsContainer.vue +27 -10
- package/src/application/VcsContainer.vue.d.ts +241 -0
- package/src/application/VcsMainMap.vue +7 -7
- package/src/application/VcsMainMap.vue.d.ts +2 -2
- package/src/application/VcsNavbar.vue +14 -2
- package/src/application/VcsNavbar.vue.d.ts +1 -0
- package/src/application/VcsSplashScreen.vue +33 -26
- package/src/application/VcsTextPageFooter.vue +2 -1
- package/src/application/attributionsHelper.d.ts +20 -22
- package/src/application/attributionsHelper.js +4 -4
- package/src/callback/vcsCallback.d.ts +2 -2
- package/src/callback/vcsCallback.js +1 -1
- package/src/components/buttons/VcsActionButtonList.vue +61 -6
- package/src/components/buttons/VcsActionButtonList.vue.d.ts +28 -0
- package/src/components/buttons/VcsButton.vue +2 -4
- package/src/components/buttons/VcsButton.vue.d.ts +1 -1
- package/src/components/buttons/VcsFormButton.vue +4 -4
- package/src/components/buttons/VcsToolButton.vue +4 -2
- package/src/components/buttons/VcsToolButton.vue.d.ts +2 -2
- package/src/components/composables.d.ts +5 -0
- package/src/components/composables.js +79 -9
- package/src/components/extent/VcsExtent.vue +10 -6
- package/src/components/extent/VcsExtent.vue.d.ts +1 -0
- package/src/components/flight/VcsFlightComponent.vue +13 -13
- package/src/components/flight/VcsFlightComponent.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsCheckbox.vue +8 -3
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +13 -16
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsCoordinate.vue +4 -4
- package/src/components/form-inputs-controls/VcsFileInput.vue +1 -1
- package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +8 -6
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +2 -5
- package/src/components/form-inputs-controls/VcsSlider.vue +5 -6
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsTextArea.vue +2 -5
- package/src/components/form-inputs-controls/VcsTextField.vue +24 -1
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +11 -1
- package/src/components/form-inputs-controls/VcsWizard.vue +3 -3
- package/src/components/form-inputs-controls/VcsWizardStep.vue +6 -5
- package/src/components/form-inputs-controls/vcsTextField.scss +8 -5
- package/src/components/form-output/VcsFormattedNumber.vue +7 -5
- package/src/components/form-output/VcsMarkdown.vue +15 -12
- package/src/components/form-output/VcsMarkdown.vue.d.ts +1 -0
- package/src/components/form-output/markdownHelper.d.ts +30 -0
- package/src/components/form-output/markdownHelper.js +398 -0
- package/src/components/import/VcsFileDrop.vue +8 -5
- package/src/components/import/VcsImportComponent.vue +8 -4
- package/src/components/import/VcsImportComponent.vue.d.ts +1 -2
- package/src/components/lists/VcsActionList.vue +6 -6
- package/src/components/lists/VcsList.vue +22 -37
- package/src/components/lists/VcsList.vue.d.ts +14 -55
- package/src/components/lists/{VcsListItem.vue → VcsListItemComponent.vue} +37 -11
- package/src/components/lists/VcsListItemComponent.vue.d.ts +79 -0
- package/src/components/lists/VcsTreeview.vue +95 -26
- package/src/components/lists/VcsTreeview.vue.d.ts +16 -3
- package/src/components/lists/VcsTreeviewSearchbar.vue +16 -5
- package/src/components/lists/VcsTreeviewSearchbar.vue.d.ts +3 -1
- package/src/components/lists/VcsTreeviewTitle.vue +36 -0
- package/src/components/modelHelper.d.ts +10 -8
- package/src/components/modelHelper.js +8 -6
- package/src/components/notification/VcsHelp.vue +6 -7
- package/src/components/notification/VcsHelp.vue.d.ts +0 -8
- package/src/components/plugins/AbstractConfigEditor.vue +1 -22
- package/src/components/plugins/AbstractConfigEditor.vue.d.ts +6 -29
- package/src/components/section/VcsExpansionPanel.vue +9 -3
- package/src/components/section/VcsExpansionPanel.vue.d.ts +2 -2
- package/src/components/section/VcsFormSection.vue +13 -7
- package/src/components/section/VcsFormSection.vue.d.ts +2 -3
- package/src/components/style/VcsImageSelector.vue +14 -6
- package/src/components/style/VcsImageSelector.vue.d.ts +1 -0
- package/src/components/style/VcsStrokeSelector.vue +5 -2
- package/src/components/style/VcsStrokeSelector.vue.d.ts +1 -0
- package/src/components/style/VcsTextMenu.vue +3 -3
- package/src/components/style/VcsVectorStyleComponent.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +42 -32
- package/src/components/tables/VcsDataTable.vue.d.ts +1 -0
- package/src/components/tables/VcsTable.vue +45 -62
- package/src/components/tables/VcsTable.vue.d.ts +30 -17
- package/src/components/tables/VcsTableCell.vue +72 -0
- package/src/components/tables/VcsTableCell.vue.d.ts +13 -0
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +6 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +42 -31
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointComponent.vue +14 -11
- package/src/components/viewpoint/VcsViewpointComponent.vue.d.ts +1 -0
- package/src/components/viewpoint/VcsViewpointEditor.vue +2 -2
- package/src/contentTree/LayerTree.vue +9 -27
- package/src/contentTree/LayerTree.vue.d.ts +1 -1
- package/src/contentTree/contentTreeCollection.d.ts +1 -0
- package/src/contentTree/contentTreeCollection.js +45 -11
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/contentTreeItem.js +1 -1
- package/src/featureInfo/BalloonComponent.vue +32 -25
- package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
- package/src/featureInfo/MarkdownBalloonComponent.vue +4 -2
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
- package/src/featureInfo/abstractFeatureInfoView.d.ts +10 -4
- package/src/featureInfo/abstractFeatureInfoView.js +19 -11
- package/src/featureInfo/featureInfo.d.ts +7 -7
- package/src/featureInfo/featureInfo.js +51 -31
- package/src/featureInfo/iframeFeatureInfoView.d.ts +8 -2
- package/src/featureInfo/iframeFeatureInfoView.js +15 -5
- package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -5
- package/src/featureInfo/markdownFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownFeatureInfoView.js +9 -11
- package/src/featureInfo/tableFeatureInfoView.js +13 -4
- package/src/i18n/i18nCollection.d.ts +9 -15
- package/src/i18n/i18nCollection.js +3 -3
- package/src/legend/VcsLegend.vue +6 -2
- package/src/legend/VcsLegend.vue.d.ts +1 -0
- package/src/manager/collectionManager/CollectionComponentList.vue +2 -2
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +2 -2
- package/src/manager/collectionManager/categoryManager.d.ts +1 -1
- package/src/manager/collectionManager/collectionComponentClass.d.ts +3 -3
- package/src/manager/collectionManager/collectionComponentClass.js +6 -6
- package/src/manager/collectionManager/collectionManager.d.ts +1 -1
- package/src/manager/collectionManager/editorCollectionComponentClass.js +2 -1
- package/src/manager/panel/PanelComponent.vue +2 -9
- package/src/manager/panel/PanelManagerComponent.vue +7 -3
- package/src/manager/panel/panelHelper.js +3 -3
- package/src/manager/panel/panelManager.d.ts +9 -1
- package/src/manager/panel/panelManager.js +15 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +11 -5
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +11 -6
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/{ToolboxManager.vue → ToolboxManagerComponent.vue} +13 -7
- package/src/manager/toolbox/{ToolboxManager.vue.d.ts → ToolboxManagerComponent.vue.d.ts} +1 -0
- package/src/manager/window/WindowComponent.vue +12 -8
- package/src/manager/window/WindowComponentHeader.vue +33 -9
- package/src/manager/window/WindowComponentHeader.vue.d.ts +3 -0
- package/src/manager/window/WindowManager.vue +2 -2
- package/src/manager/window/windowManager.d.ts +6 -6
- package/src/manager/window/windowManager.js +3 -3
- package/src/navigation/MapNavigation.vue +20 -0
- package/src/navigation/OrientationToolsButton.vue +2 -4
- package/src/navigation/TiltSlider.vue +3 -5
- package/src/navigation/locatorHelper.js +1 -1
- package/src/navigation/overviewMap.js +1 -1
- package/src/notifier/NotifierComponent.vue +18 -15
- package/src/search/ResultItem.vue +18 -6
- package/src/search/ResultsComponent.vue +31 -20
- package/src/search/ResultsComponent.vue.d.ts +2 -1
- package/src/search/SearchComponent.vue +11 -15
- package/src/search/SearchComponent.vue.d.ts +1 -0
- package/src/siteConfig.js +8 -8
- package/src/styles/_typography.scss +0 -2
- package/src/styles/main.scss +0 -4
- package/src/styles/vcsList.scss +1 -1
- package/src/uiConfig.d.ts +311 -7
- package/src/uiConfig.js +30 -17
- package/src/vcsUiApp.d.ts +48 -63
- package/src/vcsUiApp.js +44 -37
- package/src/vuePlugins/vuetify.d.ts +88 -62
- package/src/vuePlugins/vuetify.js +119 -20
- package/dist/assets/ui-2ab43a16.css +0 -1
- package/dist/assets/vue-03b265aa.js +0 -6096
- package/plugins/@vcmap-show-case/theme-changer/README.md +0 -23
- package/plugins/@vcmap-show-case/theme-changer/config.json +0 -69
- package/plugins/@vcmap-show-case/theme-changer/package.json +0 -11
- package/plugins/@vcmap-show-case/theme-changer/src/ThemeChangerComponent.vue +0 -120
- package/plugins/@vcmap-show-case/theme-changer/src/index.js +0 -108
- package/src/application/markdownHelper.d.ts +0 -12
- package/src/application/markdownHelper.js +0 -70
- package/src/components/lists/VcsListItem.vue.d.ts +0 -27
- package/src/components/lists/VcsTreeviewLeaf.vue +0 -83
- package/src/components/notification/VcsTooltip.vue +0 -156
- package/src/components/notification/VcsTooltip.vue.d.ts +0 -27
- package/src/featureInfo/MarkdownComponent.vue +0 -16
- package/src/featureInfo/MarkdownComponent.vue.d.ts +0 -7
- package/src/styles/_theming.scss +0 -73
- package/src/styles/settings.scss +0 -6
- package/src/styles/shades.scss +0 -4
- package/src/styles/variables.scss +0 -140
- package/src/styles/vcsFont.scss +0 -2
- package/src/styles/vcsGrid.scss +0 -3
- /package/src/components/lists/{VcsTreeviewLeaf.vue.d.ts → VcsTreeviewTitle.vue.d.ts} +0 -0
@@ -11,14 +11,9 @@ export function getHighlightStyle(feature: FeatureType, layer: import("@vcmap/co
|
|
11
11
|
*/
|
12
12
|
export function createFeatureInfoSession(app: import("../vcsUiApp.js").default): FeatureInfoSession;
|
13
13
|
/**
|
14
|
-
* @
|
15
|
-
* @property {VcsEvent<void>} stopped
|
16
|
-
* @property {function():void} stop
|
17
|
-
*/
|
18
|
-
/**
|
19
|
-
* @type {ClassRegistry<import("@vcmap/core").Ctor<typeof AbstractFeatureInfoView>>}
|
14
|
+
* @type {ClassRegistry<typeof AbstractFeatureInfoView>}
|
20
15
|
*/
|
21
|
-
export const featureInfoClassRegistry: ClassRegistry<
|
16
|
+
export const featureInfoClassRegistry: ClassRegistry<typeof AbstractFeatureInfoView>;
|
22
17
|
/**
|
23
18
|
* Symbol added to features to overwrite the layers predefined feature info
|
24
19
|
* @type {symbol}
|
@@ -43,6 +38,11 @@ export type FeatureInfoSession = {
|
|
43
38
|
};
|
44
39
|
import { ClassRegistry } from '@vcmap/core';
|
45
40
|
import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
|
41
|
+
/**
|
42
|
+
* @typedef {Object} FeatureInfoSession
|
43
|
+
* @property {VcsEvent<void>} stopped
|
44
|
+
* @property {function():void} stop
|
45
|
+
*/
|
46
46
|
/**
|
47
47
|
* @class FeatureInfo
|
48
48
|
* @description Provides registration of featureInfoClasses and stores featureInfoView instances.
|
@@ -23,6 +23,7 @@ import {
|
|
23
23
|
import { Feature } from 'ol';
|
24
24
|
import { check, maybe, oneOf } from '@vcsuite/check';
|
25
25
|
|
26
|
+
import { reactive } from 'vue';
|
26
27
|
import { vcsAppSymbol } from '../pluginHelper.js';
|
27
28
|
import FeatureInfoInteraction from './featureInfoInteraction.js';
|
28
29
|
import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
|
@@ -52,6 +53,17 @@ function getLogger() {
|
|
52
53
|
return getLoggerByName('featureInfo');
|
53
54
|
}
|
54
55
|
|
56
|
+
/**
|
57
|
+
* @type {ClassRegistry<typeof AbstractFeatureInfoView>}
|
58
|
+
*/
|
59
|
+
export const featureInfoClassRegistry = new ClassRegistry();
|
60
|
+
|
61
|
+
/**
|
62
|
+
* Symbol added to features to overwrite the layers predefined feature info
|
63
|
+
* @type {symbol}
|
64
|
+
*/
|
65
|
+
export const featureInfoViewSymbol = Symbol('featureInfoView');
|
66
|
+
|
55
67
|
/**
|
56
68
|
* @param {FeatureType} feature
|
57
69
|
* @param {import("@vcmap/core").Layer} layer
|
@@ -133,7 +145,7 @@ function setupFeatureInfoTool(app) {
|
|
133
145
|
/** @type {FeatureInfoSession|null} */
|
134
146
|
let session = null;
|
135
147
|
|
136
|
-
const action = {
|
148
|
+
const action = reactive({
|
137
149
|
name: 'featureInfoToggle',
|
138
150
|
title: 'featureInfo.activateToolTitle',
|
139
151
|
icon: '$vcsInfo',
|
@@ -144,46 +156,65 @@ function setupFeatureInfoTool(app) {
|
|
144
156
|
} else {
|
145
157
|
session = createFeatureInfoSession(app);
|
146
158
|
session.stopped.addEventListener(() => {
|
147
|
-
|
159
|
+
action.active = false;
|
148
160
|
session = null;
|
149
161
|
app.featureInfo.clear();
|
150
|
-
|
162
|
+
action.title = 'featureInfo.activateToolTitle';
|
151
163
|
});
|
152
164
|
this.active = true;
|
153
|
-
|
165
|
+
action.title = 'featureInfo.deactivateToolTitle';
|
154
166
|
}
|
155
167
|
},
|
156
|
-
};
|
168
|
+
});
|
157
169
|
|
158
170
|
function addFeatureInfoButton() {
|
159
171
|
if (app.uiConfig.getByKey('startingFeatureInfo')?.value !== false) {
|
160
172
|
action.callback();
|
161
173
|
}
|
162
|
-
app.toolboxManager.
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
174
|
+
if (!app.toolboxManager.has('featureInfo')) {
|
175
|
+
app.toolboxManager.add(
|
176
|
+
{
|
177
|
+
id: 'featureInfo',
|
178
|
+
type: ToolboxType.SINGLE,
|
179
|
+
action,
|
180
|
+
},
|
181
|
+
vcsAppSymbol,
|
182
|
+
);
|
183
|
+
}
|
170
184
|
}
|
171
185
|
|
172
|
-
if (
|
186
|
+
if (
|
187
|
+
[...app.layers].some((l) => l.properties?.featureInfo) ||
|
188
|
+
app.search.resultLayer.getFeatures().some((f) => !!f[featureInfoViewSymbol])
|
189
|
+
) {
|
173
190
|
addFeatureInfoButton();
|
174
191
|
}
|
175
192
|
|
176
193
|
const listeners = [
|
177
194
|
app.layers.added.addEventListener((layer) => {
|
178
|
-
if (
|
179
|
-
layer?.properties?.featureInfo &&
|
180
|
-
!app.toolboxManager.has('featureInfo')
|
181
|
-
) {
|
195
|
+
if (layer?.properties?.featureInfo) {
|
182
196
|
addFeatureInfoButton();
|
183
197
|
}
|
184
198
|
}),
|
185
199
|
app.layers.removed.addEventListener(() => {
|
186
200
|
if (
|
201
|
+
![...app.layers].some((l) => l.properties?.featureInfo) &&
|
202
|
+
!app.search.resultLayer
|
203
|
+
.getFeatures()
|
204
|
+
.some((f) => !!f[featureInfoViewSymbol]) &&
|
205
|
+
app.toolboxManager.has('featureInfo')
|
206
|
+
) {
|
207
|
+
app.toolboxManager.remove('featureInfo');
|
208
|
+
}
|
209
|
+
}),
|
210
|
+
app.search.resultsChanged.addEventListener(() => {
|
211
|
+
if (
|
212
|
+
app.search.resultLayer
|
213
|
+
.getFeatures()
|
214
|
+
.some((f) => !!f[featureInfoViewSymbol])
|
215
|
+
) {
|
216
|
+
addFeatureInfoButton();
|
217
|
+
} else if (
|
187
218
|
![...app.layers].some((l) => l.properties?.featureInfo) &&
|
188
219
|
app.toolboxManager.has('featureInfo')
|
189
220
|
) {
|
@@ -207,17 +238,6 @@ function setupFeatureInfoTool(app) {
|
|
207
238
|
* @property {function():void} stop
|
208
239
|
*/
|
209
240
|
|
210
|
-
/**
|
211
|
-
* @type {ClassRegistry<import("@vcmap/core").Ctor<typeof AbstractFeatureInfoView>>}
|
212
|
-
*/
|
213
|
-
export const featureInfoClassRegistry = new ClassRegistry();
|
214
|
-
|
215
|
-
/**
|
216
|
-
* Symbol added to features to overwrite the layers predefined feature info
|
217
|
-
* @type {symbol}
|
218
|
-
*/
|
219
|
-
export const featureInfoViewSymbol = Symbol('featureInfoView');
|
220
|
-
|
221
241
|
/**
|
222
242
|
* @class FeatureInfo
|
223
243
|
* @description Provides registration of featureInfoClasses and stores featureInfoView instances.
|
@@ -414,7 +434,7 @@ class FeatureInfo extends Collection {
|
|
414
434
|
[featureId]: getHighlightStyle(
|
415
435
|
feature,
|
416
436
|
layer,
|
417
|
-
this._app.uiConfig.config.
|
437
|
+
this._app.uiConfig.config.primaryColor ??
|
418
438
|
getDefaultPrimaryColor(this._app),
|
419
439
|
),
|
420
440
|
});
|
@@ -426,7 +446,7 @@ class FeatureInfo extends Collection {
|
|
426
446
|
[featureId]: getHighlightStyle(
|
427
447
|
feature,
|
428
448
|
layer,
|
429
|
-
this._app.uiConfig.config.
|
449
|
+
this._app.uiConfig.config.primaryColor ??
|
430
450
|
getDefaultPrimaryColor(this._app),
|
431
451
|
),
|
432
452
|
});
|
@@ -9,7 +9,7 @@ export type IframeFeatureInfoViewProps = any & {
|
|
9
9
|
};
|
10
10
|
/**
|
11
11
|
* @typedef {import("./abstractFeatureInfoView.js").FeatureInfoViewOptions & { src: string, title?: string }} IframeFeatureInfoViewOptions
|
12
|
-
* @property {string} src - Specifies the address of the document to embed in the <iframe>. Variables wrapped in `${}` are replaced by their values, e.g. `${featureId}` or `${
|
12
|
+
* @property {string} src - Specifies the address of the document to embed in the <iframe>. Variables wrapped in `${}` are replaced by their values, e.g. `${featureId}` or `${gml:name}`
|
13
13
|
* @property {string} [title] - optional title for the <iframe>
|
14
14
|
*/
|
15
15
|
/**
|
@@ -34,7 +34,13 @@ declare class IframeFeatureInfoView extends AbstractFeatureInfoView {
|
|
34
34
|
*/
|
35
35
|
title: string | undefined;
|
36
36
|
/**
|
37
|
-
*
|
37
|
+
* @param {Record<string, unknown>} attributes
|
38
|
+
* @protected
|
39
|
+
* @returns {string}
|
40
|
+
*/
|
41
|
+
protected _renderTemplate(attributes: Record<string, unknown>): string;
|
42
|
+
/**
|
43
|
+
* Supports markdown templates (e.g. {{someProperty}}) and style expressions to derive a URL
|
38
44
|
* @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
|
39
45
|
* @param {import("@vcmap/core").Layer} layer
|
40
46
|
* @returns {IframeFeatureInfoViewProps}
|
@@ -1,9 +1,10 @@
|
|
1
|
+
import { renderTemplate } from '../components/form-output/markdownHelper.js';
|
1
2
|
import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
|
2
3
|
import IframeComponent from './IframeComponent.vue';
|
3
4
|
|
4
5
|
/**
|
5
6
|
* @typedef {import("./abstractFeatureInfoView.js").FeatureInfoViewOptions & { src: string, title?: string }} IframeFeatureInfoViewOptions
|
6
|
-
* @property {string} src - Specifies the address of the document to embed in the <iframe>. Variables wrapped in `${}` are replaced by their values, e.g. `${featureId}` or `${
|
7
|
+
* @property {string} src - Specifies the address of the document to embed in the <iframe>. Variables wrapped in `${}` are replaced by their values, e.g. `${featureId}` or `${gml:name}`
|
7
8
|
* @property {string} [title] - optional title for the <iframe>
|
8
9
|
*/
|
9
10
|
|
@@ -41,7 +42,16 @@ class IframeFeatureInfoView extends AbstractFeatureInfoView {
|
|
41
42
|
}
|
42
43
|
|
43
44
|
/**
|
44
|
-
*
|
45
|
+
* @param {Record<string, unknown>} attributes
|
46
|
+
* @protected
|
47
|
+
* @returns {string}
|
48
|
+
*/
|
49
|
+
_renderTemplate(attributes) {
|
50
|
+
return renderTemplate(this.src, attributes);
|
51
|
+
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Supports markdown templates (e.g. {{someProperty}}) and style expressions to derive a URL
|
45
55
|
* @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
|
46
56
|
* @param {import("@vcmap/core").Layer} layer
|
47
57
|
* @returns {IframeFeatureInfoViewProps}
|
@@ -50,9 +60,9 @@ class IframeFeatureInfoView extends AbstractFeatureInfoView {
|
|
50
60
|
const properties = super.getProperties(featureInfo, layer);
|
51
61
|
return {
|
52
62
|
...properties,
|
53
|
-
src: this.
|
54
|
-
|
55
|
-
|
63
|
+
src: this._renderTemplate({
|
64
|
+
...properties,
|
65
|
+
...properties.attributes,
|
56
66
|
}),
|
57
67
|
title: this.title,
|
58
68
|
};
|
@@ -33,7 +33,7 @@ declare class MarkdownBalloonFeatureInfoView extends BalloonFeatureInfoView {
|
|
33
33
|
*/
|
34
34
|
protected _renderTemplate(attributes: Record<string, unknown>): string;
|
35
35
|
/**
|
36
|
-
*
|
36
|
+
* Supports markdown templates (e.g. {{someProperty}}) and style expressions to derive markdown rendering
|
37
37
|
* @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
|
38
38
|
* @param {import("@vcmap/core").Layer} layer
|
39
39
|
* @returns {MarkdownBalloonFeatureInfoViewProps}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
parseAndSanitizeMarkdown,
|
3
|
-
|
4
|
-
} from '../
|
3
|
+
renderTemplate,
|
4
|
+
} from '../components/form-output/markdownHelper.js';
|
5
5
|
import BalloonFeatureInfoView from './balloonFeatureInfoView.js';
|
6
6
|
import MarkdownBalloonComponent from './MarkdownBalloonComponent.vue';
|
7
7
|
|
@@ -47,11 +47,11 @@ class MarkdownBalloonFeatureInfoView extends BalloonFeatureInfoView {
|
|
47
47
|
* @returns {string}
|
48
48
|
*/
|
49
49
|
_renderTemplate(attributes) {
|
50
|
-
return
|
50
|
+
return renderTemplate(this.template, attributes);
|
51
51
|
}
|
52
52
|
|
53
53
|
/**
|
54
|
-
*
|
54
|
+
* Supports markdown templates (e.g. {{someProperty}}) and style expressions to derive markdown rendering
|
55
55
|
* @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
|
56
56
|
* @param {import("@vcmap/core").Layer} layer
|
57
57
|
* @returns {MarkdownBalloonFeatureInfoViewProps}
|
@@ -60,7 +60,7 @@ class MarkdownBalloonFeatureInfoView extends BalloonFeatureInfoView {
|
|
60
60
|
const properties = super.getProperties(featureInfo, layer);
|
61
61
|
return {
|
62
62
|
...properties,
|
63
|
-
|
63
|
+
content: parseAndSanitizeMarkdown(
|
64
64
|
this._renderTemplate({ ...properties, ...properties.attributes }),
|
65
65
|
),
|
66
66
|
};
|
@@ -33,7 +33,7 @@ declare class MarkdownFeatureInfoView extends AbstractFeatureInfoView {
|
|
33
33
|
*/
|
34
34
|
protected _renderTemplate(attributes: Record<string, unknown>): string;
|
35
35
|
/**
|
36
|
-
*
|
36
|
+
* Supports markdown templates (e.g. {{someProperty}}) and style expressions to derive a markdown rendering
|
37
37
|
* @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
|
38
38
|
* @param {import("@vcmap/core").Layer} layer
|
39
39
|
* @returns {MarkdownFeatureInfoViewProps}
|
@@ -1,9 +1,6 @@
|
|
1
|
+
import { renderTemplate } from '../components/form-output/markdownHelper.js';
|
1
2
|
import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
|
2
|
-
import
|
3
|
-
parseAndSanitizeMarkdown,
|
4
|
-
replaceAttributes,
|
5
|
-
} from '../application/markdownHelper.js';
|
6
|
-
import MarkdownComponent from './MarkdownComponent.vue';
|
3
|
+
import VcsMarkdown from '../components/form-output/VcsMarkdown.vue';
|
7
4
|
|
8
5
|
/**
|
9
6
|
* @typedef {import("./abstractFeatureInfoView.js").FeatureInfoViewOptions & { template: string | string[] }} MarkdownFeatureInfoViewOptions
|
@@ -31,7 +28,7 @@ class MarkdownFeatureInfoView extends AbstractFeatureInfoView {
|
|
31
28
|
* @param {MarkdownFeatureInfoViewOptions} options
|
32
29
|
*/
|
33
30
|
constructor(options) {
|
34
|
-
super(options,
|
31
|
+
super(options, VcsMarkdown);
|
35
32
|
|
36
33
|
/**
|
37
34
|
* @type {string | string[]}
|
@@ -47,11 +44,11 @@ class MarkdownFeatureInfoView extends AbstractFeatureInfoView {
|
|
47
44
|
* @returns {string}
|
48
45
|
*/
|
49
46
|
_renderTemplate(attributes) {
|
50
|
-
return
|
47
|
+
return renderTemplate(this.template, attributes);
|
51
48
|
}
|
52
49
|
|
53
50
|
/**
|
54
|
-
*
|
51
|
+
* Supports markdown templates (e.g. {{someProperty}}) and style expressions to derive a markdown rendering
|
55
52
|
* @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
|
56
53
|
* @param {import("@vcmap/core").Layer} layer
|
57
54
|
* @returns {MarkdownFeatureInfoViewProps}
|
@@ -60,9 +57,10 @@ class MarkdownFeatureInfoView extends AbstractFeatureInfoView {
|
|
60
57
|
const properties = super.getProperties(featureInfo, layer);
|
61
58
|
return {
|
62
59
|
...properties,
|
63
|
-
|
64
|
-
|
65
|
-
|
60
|
+
content: this._renderTemplate({
|
61
|
+
...properties,
|
62
|
+
...properties.attributes,
|
63
|
+
}),
|
66
64
|
};
|
67
65
|
}
|
68
66
|
|
@@ -79,6 +79,19 @@ class TableFeatureInfoView extends AbstractFeatureInfoView {
|
|
79
79
|
this.searchbarPlaceholder = options.searchbarPlaceholder;
|
80
80
|
}
|
81
81
|
|
82
|
+
/**
|
83
|
+
* @param {undefined|import("ol").Feature|import("@vcmap-cesium/engine").Cesium3DTileFeature|import("@vcmap-cesium/engine").Cesium3DTilePointFeature} feature
|
84
|
+
* @returns {Object}
|
85
|
+
* @private
|
86
|
+
*/
|
87
|
+
_getAttributesFromFeature(feature) {
|
88
|
+
const attributes = super._getAttributesFromFeature(feature);
|
89
|
+
return {
|
90
|
+
...attributes,
|
91
|
+
featureId: feature.getId(),
|
92
|
+
};
|
93
|
+
}
|
94
|
+
|
82
95
|
/**
|
83
96
|
* @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
|
84
97
|
* @param {import("@vcmap/core").Layer} layer
|
@@ -92,10 +105,6 @@ class TableFeatureInfoView extends AbstractFeatureInfoView {
|
|
92
105
|
itemsPerPageArray: this.itemsPerPageArray,
|
93
106
|
showSearchbar: this.showSearchbar,
|
94
107
|
searchbarPlaceholder: this.searchbarPlaceholder,
|
95
|
-
headers: [
|
96
|
-
{ text: 'components.vcsTable.key', value: 'key', width: '128px' },
|
97
|
-
{ text: 'components.vcsTable.value', value: 'value', width: '192px' },
|
98
|
-
],
|
99
108
|
};
|
100
109
|
}
|
101
110
|
|
@@ -16,8 +16,8 @@ export function mergeDeep(...sources: Object[]): Object;
|
|
16
16
|
/**
|
17
17
|
* Item for internationalization containing an object with key value mapping for each locale (de, en, nl, pl, ...).
|
18
18
|
* Other locales can be supported by adding corresponding mapping objects with associated locale key.
|
19
|
-
* @typedef {
|
20
|
-
* @property {string}
|
19
|
+
* @typedef {Record<string, string | object> & { name: string, properties?: object, de?: object, en?: object }} I18nConfigurationItem
|
20
|
+
* @property {string} name - the name for the item.
|
21
21
|
* @property {Object} [properties]
|
22
22
|
* @property {Object} [de]
|
23
23
|
* @property {Object} [en]
|
@@ -33,17 +33,11 @@ export default I18nCollection;
|
|
33
33
|
* Item for internationalization containing an object with key value mapping for each locale (de, en, nl, pl, ...).
|
34
34
|
* Other locales can be supported by adding corresponding mapping objects with associated locale key.
|
35
35
|
*/
|
36
|
-
export type I18nConfigurationItem = {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
properties?: Object | undefined;
|
42
|
-
de?: Object | undefined;
|
43
|
-
/**
|
44
|
-
* ...
|
45
|
-
*/
|
46
|
-
en?: Object | undefined;
|
36
|
+
export type I18nConfigurationItem = Record<string, string | object> & {
|
37
|
+
name: string;
|
38
|
+
properties?: object;
|
39
|
+
de?: object;
|
40
|
+
en?: object;
|
47
41
|
};
|
48
42
|
/**
|
49
43
|
* @extends {IndexedCollection<I18nConfigurationItem>}
|
@@ -74,9 +68,9 @@ declare class I18nCollection extends IndexedCollection<I18nConfigurationItem> {
|
|
74
68
|
/**
|
75
69
|
* Returns a merged Message Object with the locale as a key and an Object with all the translated keys.
|
76
70
|
* Includes all available plugin messages.
|
77
|
-
* @returns {
|
71
|
+
* @returns {Record<string, object>}
|
78
72
|
*/
|
79
|
-
getMergedMessages():
|
73
|
+
getMergedMessages(): Record<string, object>;
|
80
74
|
}
|
81
75
|
import { IndexedCollection } from '@vcmap/core';
|
82
76
|
import { VcsEvent } from '@vcmap/core';
|
@@ -17,8 +17,8 @@ export function isObject(item) {
|
|
17
17
|
/**
|
18
18
|
* Item for internationalization containing an object with key value mapping for each locale (de, en, nl, pl, ...).
|
19
19
|
* Other locales can be supported by adding corresponding mapping objects with associated locale key.
|
20
|
-
* @typedef {
|
21
|
-
* @property {string}
|
20
|
+
* @typedef {Record<string, string | object> & { name: string, properties?: object, de?: object, en?: object }} I18nConfigurationItem
|
21
|
+
* @property {string} name - the name for the item.
|
22
22
|
* @property {Object} [properties]
|
23
23
|
* @property {Object} [de]
|
24
24
|
* @property {Object} [en]
|
@@ -113,7 +113,7 @@ class I18nCollection extends IndexedCollection {
|
|
113
113
|
/**
|
114
114
|
* Returns a merged Message Object with the locale as a key and an Object with all the translated keys.
|
115
115
|
* Includes all available plugin messages.
|
116
|
-
* @returns {
|
116
|
+
* @returns {Record<string, object>}
|
117
117
|
*/
|
118
118
|
getMergedMessages() {
|
119
119
|
const pluginMessages = [...this._pluginCollection]
|
package/src/legend/VcsLegend.vue
CHANGED
@@ -25,12 +25,12 @@
|
|
25
25
|
</div>
|
26
26
|
<div v-else-if="item.type === LegendType.Iframe">
|
27
27
|
<iframe
|
28
|
-
:id="
|
28
|
+
:id="`${cid}-legendIframe${idx}`"
|
29
29
|
:src="$st(item.src)"
|
30
30
|
scrolling="no"
|
31
31
|
style="width: 100%; height: 100%"
|
32
32
|
frameBorder="0"
|
33
|
-
@load="setIframeHeight(
|
33
|
+
@load="setIframeHeight(`${cid}-legendIframe${idx}`)"
|
34
34
|
/>
|
35
35
|
</div>
|
36
36
|
<style-legend-item v-else :item="item" />
|
@@ -47,6 +47,7 @@
|
|
47
47
|
<script>
|
48
48
|
import { VExpansionPanels, VList, VSheet } from 'vuetify/components';
|
49
49
|
import { computed } from 'vue';
|
50
|
+
import { useComponentId } from '../components/composables.js';
|
50
51
|
import { LegendType } from './legendHelper.js';
|
51
52
|
import StyleLegendItem from './StyleLegendItem.vue';
|
52
53
|
import VcsExpansionPanel from '../components/section/VcsExpansionPanel.vue';
|
@@ -93,10 +94,13 @@
|
|
93
94
|
set() {},
|
94
95
|
});
|
95
96
|
|
97
|
+
const cid = useComponentId();
|
98
|
+
|
96
99
|
return {
|
97
100
|
LegendType,
|
98
101
|
setIframeHeight,
|
99
102
|
panels, // TODO
|
103
|
+
cid,
|
100
104
|
};
|
101
105
|
},
|
102
106
|
};
|
@@ -11,6 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
11
11
|
};
|
12
12
|
setIframeHeight: (id: string) => void;
|
13
13
|
panels: import("vue").ComputedRef<number[]>;
|
14
|
+
cid: string;
|
14
15
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
15
16
|
entries: {
|
16
17
|
type: ArrayConstructor;
|
@@ -49,7 +49,7 @@
|
|
49
49
|
* New position is derived from a target item in the collection.
|
50
50
|
* This ensures correct movement, if rendered list is only a subset of the collection.
|
51
51
|
* @param {import("./collectionComponentClass.js").default<Object>} collectionComponent
|
52
|
-
* @param {import("../../components/lists/
|
52
|
+
* @param {import("../../components/lists/VcsListItemComponent.vue").VcsListItem} item
|
53
53
|
* @param {number} targetIndex
|
54
54
|
*/
|
55
55
|
export function moveItem(collectionComponent, item, targetIndex) {
|
@@ -136,6 +136,6 @@
|
|
136
136
|
|
137
137
|
<style lang="scss" scoped>
|
138
138
|
.inner-header {
|
139
|
-
height: calc(var(--v-vcs-
|
139
|
+
height: calc(var(--v-vcs-font-size) * 2 - 2px);
|
140
140
|
}
|
141
141
|
</style>
|
@@ -3,10 +3,10 @@
|
|
3
3
|
* New position is derived from a target item in the collection.
|
4
4
|
* This ensures correct movement, if rendered list is only a subset of the collection.
|
5
5
|
* @param {import("./collectionComponentClass.js").default<Object>} collectionComponent
|
6
|
-
* @param {import("../../components/lists/
|
6
|
+
* @param {import("../../components/lists/VcsListItemComponent.vue").VcsListItem} item
|
7
7
|
* @param {number} targetIndex
|
8
8
|
*/
|
9
|
-
export function moveItem(collectionComponent: import("./collectionComponentClass.js").default<Object>, item: import("../../components/lists/
|
9
|
+
export function moveItem(collectionComponent: import("./collectionComponentClass.js").default<Object>, item: import("../../components/lists/VcsListItemComponent.vue").VcsListItem, targetIndex: number): void;
|
10
10
|
declare const _default: import("vue").DefineComponent<{
|
11
11
|
showLessButton: {
|
12
12
|
type: BooleanConstructor;
|
@@ -57,7 +57,7 @@ declare class CategoryManager extends CollectionManager implements ICategoryMana
|
|
57
57
|
*/
|
58
58
|
requestCategory<T extends Object | import("@vcmap/core").VcsObject>(options: import("@vcmap/core").CategoryOptions<T>, owner: string | symbol, collectionComponentOptions?: import("./collectionComponentClass.js").CollectionComponentUiOptions): Promise<{
|
59
59
|
collectionComponent: import("./collectionComponentClass.js").default<T>;
|
60
|
-
category: import("@vcmap/core").Category<T>;
|
60
|
+
category: import("@vcmap/core").Category<T, object>;
|
61
61
|
}>;
|
62
62
|
/**
|
63
63
|
* Updates the filterFunction for added moduleIds.
|
@@ -38,7 +38,7 @@ export type CollectionComponentUiOptions = {
|
|
38
38
|
export type CollectionComponentClassOptions<T extends Object> = CollectionComponentUiOptions & {
|
39
39
|
collection: import("@vcmap/core").Collection<T>;
|
40
40
|
};
|
41
|
-
export type CollectionComponentListItem = import("../../components/lists/
|
41
|
+
export type CollectionComponentListItem = import("../../components/lists/VcsListItemComponent.vue").VcsListItem & {
|
42
42
|
actions: Array<import("../../actions/actionHelper.js").VcsAction & {
|
43
43
|
weight?: number;
|
44
44
|
}>;
|
@@ -51,9 +51,9 @@ export type CollectionComponentListItem = import("../../components/lists/VcsList
|
|
51
51
|
* Listens to all collection events and synchronizes changes to the items array.
|
52
52
|
* The Collection Items will be transformed and filtered with the given itemMappings and itemFilter functions
|
53
53
|
* @class
|
54
|
-
* @template {Object|import("@vcmap/core").VcsObject} T
|
54
|
+
* @template {Object|import("@vcmap/core").VcsObject} [T=Object|import("@vcmap/core").VcsObject]
|
55
55
|
*/
|
56
|
-
declare class CollectionComponentClass<T extends Object | import("@vcmap/core").VcsObject> {
|
56
|
+
declare class CollectionComponentClass<T extends Object | import("@vcmap/core").VcsObject = Object | import("@vcmap/core").VcsObject> {
|
57
57
|
/**
|
58
58
|
* @param {CollectionComponentClassOptions<T>} options
|
59
59
|
* @param {string|import("../../pluginHelper.js").vcsAppSymbol} owner
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { IndexedCollection, isOverrideCollection } from '@vcmap/core';
|
2
2
|
import { getLogger } from '@vcsuite/logger';
|
3
3
|
import { v4 as uuidv4 } from 'uuid';
|
4
|
-
import { computed, ref, shallowRef, watch } from 'vue';
|
4
|
+
import { computed, reactive, ref, shallowRef, watch } from 'vue';
|
5
5
|
import { parseBoolean, parseNumber } from '@vcsuite/parsers';
|
6
6
|
import { check, oneOf } from '@vcsuite/check';
|
7
7
|
import { validateAction } from '../../components/lists/VcsActionList.vue';
|
@@ -36,7 +36,7 @@ import { sortByOwner } from '../navbarManager.js';
|
|
36
36
|
*/
|
37
37
|
|
38
38
|
/**
|
39
|
-
* @typedef {import("../../components/lists/
|
39
|
+
* @typedef {import("../../components/lists/VcsListItemComponent.vue").VcsListItem & {
|
40
40
|
* actions: Array<import("../../actions/actionHelper.js").VcsAction & { weight?: number }>,
|
41
41
|
* clickedCallbacks: Array<function(PointerEvent):void>,
|
42
42
|
* destroy: function():void|undefined
|
@@ -55,7 +55,7 @@ function destroyListItem(listItem) {
|
|
55
55
|
/**
|
56
56
|
* Renames the title of an item for VcsObject based items.
|
57
57
|
* @param {import("@vcmap/core").VcsObject} item
|
58
|
-
* @param {import("../../components/lists/
|
58
|
+
* @param {import("../../components/lists/VcsListItemComponent.vue").VcsListItem} listItem
|
59
59
|
* @param {string} newTitle
|
60
60
|
*/
|
61
61
|
function titleChanged(item, listItem, newTitle) {
|
@@ -95,7 +95,7 @@ export function createSupportedMapMappingFunction(
|
|
95
95
|
* Listens to all collection events and synchronizes changes to the items array.
|
96
96
|
* The Collection Items will be transformed and filtered with the given itemMappings and itemFilter functions
|
97
97
|
* @class
|
98
|
-
* @template {Object|import("@vcmap/core").VcsObject} T
|
98
|
+
* @template {Object|import("@vcmap/core").VcsObject} [T=Object|import("@vcmap/core").VcsObject]
|
99
99
|
*/
|
100
100
|
class CollectionComponentClass {
|
101
101
|
/**
|
@@ -341,7 +341,7 @@ class CollectionComponentClass {
|
|
341
341
|
*/
|
342
342
|
_transformItem(item) {
|
343
343
|
const keyProperty = this._collection.uniqueKey;
|
344
|
-
const listItem = {
|
344
|
+
const listItem = reactive({
|
345
345
|
get name() {
|
346
346
|
return item[keyProperty];
|
347
347
|
},
|
@@ -356,7 +356,7 @@ class CollectionComponentClass {
|
|
356
356
|
clickedCallbacks: [],
|
357
357
|
destroy: undefined,
|
358
358
|
destroyFunctions: [],
|
359
|
-
};
|
359
|
+
});
|
360
360
|
if (this.renamable.value) {
|
361
361
|
listItem.renamable = {
|
362
362
|
name: this._actionTitles.renameTitle,
|
@@ -18,7 +18,7 @@ export type OwnedAction = {
|
|
18
18
|
weight?: number | undefined;
|
19
19
|
owner: string | symbol;
|
20
20
|
};
|
21
|
-
export type ICollectionManager = import("../../vcsUiApp.js").VcsComponentManager<CollectionComponentClass
|
21
|
+
export type ICollectionManager = import("../../vcsUiApp.js").VcsComponentManager<CollectionComponentClass, import("./collectionComponentClass.js").CollectionComponentClassOptions<Object>>;
|
22
22
|
/**
|
23
23
|
* @typedef {function(T, import("./collectionComponentClass.js").default<T>, import("./collectionComponentClass.js").CollectionComponentListItem): void} MappingFunction
|
24
24
|
* @template {Object} T
|
@@ -3,6 +3,7 @@ import { check, maybe, oneOf } from '@vcsuite/check';
|
|
3
3
|
import { WindowSlot } from '../window/windowManager.js';
|
4
4
|
import CollectionComponentClass from './collectionComponentClass.js';
|
5
5
|
import { createListEditAction } from '../../actions/listActions.js';
|
6
|
+
import { categoryManagerWindowId } from '../../application/VcsApp.vue';
|
6
7
|
|
7
8
|
/**
|
8
9
|
* @typedef {Omit<import("../window/windowManager.js").WindowComponentOptions,"id"|"parentId"|"slot">} EditorWindowComponentOptions
|
@@ -62,7 +63,7 @@ export function makeEditorCollectionComponentClass(
|
|
62
63
|
app,
|
63
64
|
collectionComponent,
|
64
65
|
editingOptions,
|
65
|
-
parentId =
|
66
|
+
parentId = categoryManagerWindowId,
|
66
67
|
) {
|
67
68
|
check(collectionComponent, CollectionComponentClass);
|
68
69
|
check(editingOptions.editor, oneOf(Object, Function));
|