@vcmap/ui 6.0.3 → 6.0.5
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/config/base.config.json +1 -1
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-fdb639ea.js → core-1bc1b594.js} +6 -6
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui-76492ce7.css → ui-a7b9fa52.css} +1 -1
- package/dist/assets/{ui-76492ce7.js → ui-a7b9fa52.js} +940 -931
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-3bf44235.js → vuetify-b07f3508.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/package.json +2 -2
- package/plugins/@vcmap-show-case/plugin-editors/src/PluginEditors.vue +6 -5
- package/plugins/package.json +2 -1
- package/src/actions/extentActions.js +4 -0
- package/src/application/VcsPositionDisplay.vue +11 -3
- package/src/application/VcsPositionDisplay.vue.d.ts +1 -1
- package/src/components/form-output/VcsFormattedNumber.vue +23 -4
- package/src/components/form-output/VcsFormattedNumber.vue.d.ts +12 -1
- package/src/components/lists/VcsList.vue +3 -12
- package/src/components/style/VcsStrokeSelector.vue +1 -1
- package/src/components/vector-properties/VcsFeatureTransforms.vue +16 -6
- /package/dist/assets/{cesium-cb8b4811.js → cesium-ad999c19.js} +0 -0
- /package/dist/assets/{ol-8fa4a623.js → ol-dda6607b.js} +0 -0
- /package/dist/assets/{vue-a92df366.js → vue-1e953f19.js} +0 -0
- /package/dist/assets/{vuetify-3bf44235.css → vuetify-b07f3508.css} +0 -0
package/dist/assets/ui.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./ui-
|
1
|
+
export * from "./ui-a7b9fa52.js";
|
package/dist/assets/vue.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./vue-
|
1
|
+
export * from "./vue-1e953f19.js";
|
@@ -10,7 +10,7 @@ function loadCss(href) {
|
|
10
10
|
elem.onerror = reject;
|
11
11
|
document.head.appendChild(elem);
|
12
12
|
});
|
13
|
-
} await loadCss('./assets/vuetify-
|
13
|
+
} await loadCss('./assets/vuetify-b07f3508.css');import { watch as X, onScopeDispose as tt, effectScope as Ul, shallowRef as K, Fragment as ie, reactive as it, computed as b, watchEffect as Ne, toRefs as Wt, capitalize as On, isVNode as Oc, Comment as Rc, unref as ot, warn as Ha, getCurrentInstance as Nc, ref as W, provide as Ae, inject as ye, defineComponent as Hc, camelize as Ir, h as jt, toRaw as Ee, createVNode as r, mergeProps as N, onBeforeUnmount as nt, readonly as Kl, onDeactivated as _r, onActivated as zc, onMounted as Ke, nextTick as Se, TransitionGroup as ql, Transition as Ht, isRef as _n, toRef as F, onBeforeMount as Xl, withDirectives as $e, resolveDirective as dt, vShow as xt, onUpdated as Wc, Text as jc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Uc, cloneVNode as Kc, createTextVNode as Pt, onUnmounted as qc, onBeforeUpdate as Xc, withModifiers as Pl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Tr } from "./vue-1e953f19.js";
|
14
14
|
function rt(e, n) {
|
15
15
|
let t;
|
16
16
|
function a() {
|
package/dist/assets/vuetify.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./vuetify-
|
1
|
+
export * from "./vuetify-b07f3508.js";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.5",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -57,7 +57,7 @@
|
|
57
57
|
},
|
58
58
|
"peerDependencies": {
|
59
59
|
"@vcmap-cesium/engine": "^11.0.2",
|
60
|
-
"@vcmap/core": "^6.0.
|
60
|
+
"@vcmap/core": "^6.0.3",
|
61
61
|
"ol": "^10.2.1",
|
62
62
|
"vue": "~3.4.38",
|
63
63
|
"vuetify": "^3.7.3"
|
@@ -25,17 +25,17 @@
|
|
25
25
|
const editors = plugin.getConfigEditors?.();
|
26
26
|
if (editors?.length > 0) {
|
27
27
|
const actions = editors
|
28
|
-
.
|
29
|
-
.
|
30
|
-
.map((component, index) =>
|
28
|
+
.filter((e) => e.component)
|
29
|
+
.map((e, index) =>
|
31
30
|
createToggleAction(
|
32
31
|
{
|
33
32
|
name: `editor-${index + 1}`,
|
33
|
+
title: e.title,
|
34
34
|
icon: index < 9 ? `mdi-numeric-${index + 1}-box` : undefined,
|
35
35
|
},
|
36
36
|
{
|
37
37
|
id: `${plugin.name}-editor-${index}`,
|
38
|
-
component,
|
38
|
+
component: e.component,
|
39
39
|
parentId: name,
|
40
40
|
slot: WindowSlot.DYNAMIC_CHILD,
|
41
41
|
props: {
|
@@ -60,7 +60,8 @@
|
|
60
60
|
},
|
61
61
|
state: {
|
62
62
|
headerTitle:
|
63
|
-
|
63
|
+
e.title ?? `${plugin.name} Editor ${index + 1}`,
|
64
|
+
infoUrlCallback: e.infoUrlCallback,
|
64
65
|
},
|
65
66
|
position: {
|
66
67
|
width: 500,
|
package/plugins/package.json
CHANGED
@@ -21,7 +21,8 @@
|
|
21
21
|
"@vcmap/search-nominatim": "^2.0.0",
|
22
22
|
"@vcmap/create-link": "^2.0.0",
|
23
23
|
"@vcmap/module-selector": "^2.0.0",
|
24
|
-
"@vcmap/line-of-sight": "^1.0.0"
|
24
|
+
"@vcmap/line-of-sight": "^1.0.0",
|
25
|
+
"@vcmap/layer-slider": "^2.0.0"
|
25
26
|
},
|
26
27
|
"optionalDependencies": {
|
27
28
|
"@vcmap/planning": "^6.0.0"
|
@@ -97,6 +97,7 @@ export function createExtentFeatureAction(
|
|
97
97
|
if (!this.active) {
|
98
98
|
this.active = true;
|
99
99
|
layer.activate();
|
100
|
+
const feature = layer.getFeatureById(featureId);
|
100
101
|
layer.removeFeaturesById([featureId]);
|
101
102
|
session = startCreateFeatureSession(app, layer, GeometryType.BBox);
|
102
103
|
const listeners = [
|
@@ -112,6 +113,9 @@ export function createExtentFeatureAction(
|
|
112
113
|
extent: newExtent,
|
113
114
|
});
|
114
115
|
session.stop();
|
116
|
+
} else if (feature) {
|
117
|
+
// reset feature, if creation is canceled
|
118
|
+
layer.addFeatures([feature]);
|
115
119
|
}
|
116
120
|
}),
|
117
121
|
session.stopped.addEventListener(() => {
|
@@ -17,6 +17,7 @@
|
|
17
17
|
prefix="x:"
|
18
18
|
:model-value="transformedPosition[0]"
|
19
19
|
:fraction-digits="fractionDigits"
|
20
|
+
:number-format-options="{ useGrouping: false }"
|
20
21
|
class="pa-0"
|
21
22
|
/>
|
22
23
|
<VcsFormattedNumber
|
@@ -24,12 +25,14 @@
|
|
24
25
|
prefix="y:"
|
25
26
|
:model-value="transformedPosition[1]"
|
26
27
|
:fraction-digits="fractionDigits"
|
28
|
+
:number-format-options="{ useGrouping: false }"
|
27
29
|
class="pa-0"
|
28
30
|
/>
|
29
31
|
<VcsFormattedNumber
|
30
32
|
v-if="transformedPosition[2]"
|
31
33
|
prefix="z:"
|
32
34
|
:model-value="transformedPosition[2]"
|
35
|
+
:number-format-options="{ useGrouping: false }"
|
33
36
|
class="pa-0"
|
34
37
|
/>
|
35
38
|
</template>
|
@@ -42,8 +45,13 @@
|
|
42
45
|
class="bg-primary"
|
43
46
|
/>
|
44
47
|
</template>
|
45
|
-
<v-list selectable v-model:selected="selectedEPSG">
|
46
|
-
<v-list-item
|
48
|
+
<v-list selectable v-model:selected="selectedEPSG" mandatory>
|
49
|
+
<v-list-item
|
50
|
+
v-for="(item, i) in items"
|
51
|
+
:key="i"
|
52
|
+
:value="item.value"
|
53
|
+
color="primary"
|
54
|
+
>
|
47
55
|
<v-list-item-title>{{ $st(item.text) }}</v-list-item-title>
|
48
56
|
</v-list-item>
|
49
57
|
</v-list>
|
@@ -109,7 +117,7 @@
|
|
109
117
|
[defaultProjection.epsg]: defaultProjection,
|
110
118
|
[wgs84Projection.epsg]: wgs84Projection,
|
111
119
|
};
|
112
|
-
const selectedEPSG = ref([]);
|
120
|
+
const selectedEPSG = ref([defaultProjection.epsg]);
|
113
121
|
|
114
122
|
function getProjectionItems() {
|
115
123
|
return Object.keys(projections).map((epsg) => {
|
@@ -8,7 +8,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
8
8
|
};
|
9
9
|
transformedPosition: import("vue").ComputedRef<import("ol/coordinate.js", { with: { "resolution-mode": "import" } }).Coordinate>;
|
10
10
|
fractionDigits: import("vue").ComputedRef<2 | 6>;
|
11
|
-
selectedEPSG: import("vue").Ref<
|
11
|
+
selectedEPSG: import("vue").Ref<string[]>;
|
12
12
|
items: import("vue").Ref<{
|
13
13
|
text: any;
|
14
14
|
value: string;
|
@@ -40,7 +40,7 @@
|
|
40
40
|
}
|
41
41
|
</style>
|
42
42
|
<script>
|
43
|
-
import { computed } from 'vue';
|
43
|
+
import { computed, inject } from 'vue';
|
44
44
|
import { VTooltip } from 'vuetify/components';
|
45
45
|
import { usePadding } from '../composables.js';
|
46
46
|
|
@@ -49,18 +49,26 @@
|
|
49
49
|
* dot-seperated string with given amount of fractional digits (e.g. 12.345.678,90)
|
50
50
|
* @param {string|number} value
|
51
51
|
* @param {number} fractionDigits
|
52
|
+
* @param {string} [locale=navigator.language] can be used to set the locale, navigator.language is the default.
|
53
|
+
* @param {Intl.NumberFormatOptions} [options={}] can be used to provide options to the function
|
52
54
|
* @returns {string|number}
|
53
55
|
*/
|
54
|
-
export function numberToLocaleString(
|
56
|
+
export function numberToLocaleString(
|
57
|
+
value,
|
58
|
+
fractionDigits,
|
59
|
+
locale = navigator.language,
|
60
|
+
options = {},
|
61
|
+
) {
|
55
62
|
// XXX todo maybe merge with dateTime helpers in core?
|
56
63
|
const number = parseInt(value, 10);
|
57
64
|
if (Number.isNaN(number)) {
|
58
65
|
return number;
|
59
66
|
}
|
60
67
|
|
61
|
-
return /** @type {number} */ value.toLocaleString(
|
68
|
+
return /** @type {number} */ value.toLocaleString(locale, {
|
62
69
|
minimumFractionDigits: fractionDigits,
|
63
70
|
maximumFractionDigits: fractionDigits,
|
71
|
+
...options,
|
64
72
|
});
|
65
73
|
}
|
66
74
|
|
@@ -84,6 +92,7 @@
|
|
84
92
|
* @vue-prop {boolean} [disabled=false] - disabled by adding transparency to the label.
|
85
93
|
* @vue-prop {string|SpecialUnits} [unit=undefined]
|
86
94
|
* @vue-prop {number} [fractionDigits=undefined]
|
95
|
+
* @vue-prop {Intl.NumberFormatOptions} [numberFormatOptions=undefined] Intl.NumberFormatOptions
|
87
96
|
* @vue-prop {number} modelValue
|
88
97
|
* @vue-prop {string|number} prefix
|
89
98
|
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} [tooltipPosition='right'] - Position of the tooltip.
|
@@ -107,6 +116,10 @@
|
|
107
116
|
type: Number,
|
108
117
|
default: 2,
|
109
118
|
},
|
119
|
+
numberFormatOptions: {
|
120
|
+
type: Object,
|
121
|
+
default: undefined,
|
122
|
+
},
|
110
123
|
modelValue: {
|
111
124
|
type: Number,
|
112
125
|
default: 0,
|
@@ -125,8 +138,14 @@
|
|
125
138
|
},
|
126
139
|
},
|
127
140
|
setup(props, { attrs }) {
|
141
|
+
const app = inject('vcsApp');
|
128
142
|
const formatted = computed(() =>
|
129
|
-
numberToLocaleString(
|
143
|
+
numberToLocaleString(
|
144
|
+
props.modelValue,
|
145
|
+
props.fractionDigits,
|
146
|
+
app.vueI18n.locale.value,
|
147
|
+
props.numberFormatOptions,
|
148
|
+
),
|
130
149
|
);
|
131
150
|
const paddingProvided = usePadding(attrs);
|
132
151
|
return {
|
@@ -3,9 +3,11 @@
|
|
3
3
|
* dot-seperated string with given amount of fractional digits (e.g. 12.345.678,90)
|
4
4
|
* @param {string|number} value
|
5
5
|
* @param {number} fractionDigits
|
6
|
+
* @param {string} [locale=navigator.language] can be used to set the locale, navigator.language is the default.
|
7
|
+
* @param {Intl.NumberFormatOptions} [options={}] can be used to provide options to the function
|
6
8
|
* @returns {string|number}
|
7
9
|
*/
|
8
|
-
export function numberToLocaleString(value: string | number, fractionDigits: number): string | number;
|
10
|
+
export function numberToLocaleString(value: string | number, fractionDigits: number, locale?: string | undefined, options?: Intl.NumberFormatOptions | undefined): string | number;
|
9
11
|
/**
|
10
12
|
* *
|
11
13
|
*/
|
@@ -28,6 +30,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
28
30
|
type: NumberConstructor;
|
29
31
|
default: number;
|
30
32
|
};
|
33
|
+
numberFormatOptions: {
|
34
|
+
type: ObjectConstructor;
|
35
|
+
default: undefined;
|
36
|
+
};
|
31
37
|
modelValue: {
|
32
38
|
type: NumberConstructor;
|
33
39
|
default: number;
|
@@ -65,6 +71,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
65
71
|
type: NumberConstructor;
|
66
72
|
default: number;
|
67
73
|
};
|
74
|
+
numberFormatOptions: {
|
75
|
+
type: ObjectConstructor;
|
76
|
+
default: undefined;
|
77
|
+
};
|
68
78
|
modelValue: {
|
69
79
|
type: NumberConstructor;
|
70
80
|
default: number;
|
@@ -89,6 +99,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
89
99
|
tooltipPosition: string;
|
90
100
|
unit: string;
|
91
101
|
fractionDigits: number;
|
102
|
+
numberFormatOptions: Record<string, any>;
|
92
103
|
}, {}>;
|
93
104
|
export default _default;
|
94
105
|
export namespace VcsFormattedNumber {
|
@@ -113,7 +113,7 @@
|
|
113
113
|
const selectAllAction = reactive({
|
114
114
|
name: 'list.selectAll',
|
115
115
|
tooltip: 'list.selectAll',
|
116
|
-
disabled: items.value.length - selected.value.length < 1,
|
116
|
+
disabled: computed(() => items.value.length - selected.value.length < 1),
|
117
117
|
callback() {
|
118
118
|
const currentSelection = [...selected.value];
|
119
119
|
selected.value = items.value.filter((item) => !item.disabled);
|
@@ -126,10 +126,11 @@
|
|
126
126
|
emit('update:modelValue', selected.value);
|
127
127
|
},
|
128
128
|
});
|
129
|
+
|
129
130
|
const clearSelectionAction = reactive({
|
130
131
|
name: 'list.clearSelection',
|
131
132
|
tooltip: 'list.clearSelection',
|
132
|
-
disabled: selected.value.length < 1,
|
133
|
+
disabled: computed(() => selected.value.length < 1),
|
133
134
|
callback() {
|
134
135
|
[...selected.value].forEach((item) => {
|
135
136
|
if (item.selectionChanged) {
|
@@ -141,16 +142,6 @@
|
|
141
142
|
},
|
142
143
|
});
|
143
144
|
|
144
|
-
watch(
|
145
|
-
[items, selected],
|
146
|
-
() => {
|
147
|
-
selectAllAction.disabled =
|
148
|
-
items.value.length - selected.value.length < 1;
|
149
|
-
clearSelectionAction.disabled = selected.value.length < 1;
|
150
|
-
},
|
151
|
-
{ deep: false, immediate: true },
|
152
|
-
);
|
153
|
-
|
154
145
|
return [selectAllAction, clearSelectionAction];
|
155
146
|
}
|
156
147
|
|
@@ -120,7 +120,11 @@
|
|
120
120
|
|
121
121
|
<script>
|
122
122
|
import { Math as CesiumMath, HeightReference } from '@vcmap-cesium/engine';
|
123
|
-
import {
|
123
|
+
import {
|
124
|
+
SessionType,
|
125
|
+
TransformationMode,
|
126
|
+
placeGeometryOnSurface,
|
127
|
+
} from '@vcmap/core';
|
124
128
|
import { VSheet, VContainer, VRow, VCol, VIcon } from 'vuetify/components';
|
125
129
|
import { inject, ref, watch } from 'vue';
|
126
130
|
import VcsButton from '../buttons/VcsButton.vue';
|
@@ -242,11 +246,17 @@
|
|
242
246
|
}),
|
243
247
|
);
|
244
248
|
|
245
|
-
|
246
|
-
manager.
|
247
|
-
|
248
|
-
manager.
|
249
|
-
|
249
|
+
if (
|
250
|
+
manager.currentEditSession.value?.type === SessionType.EDIT_FEATURES
|
251
|
+
) {
|
252
|
+
manager.currentEditSession.value?.setFeatures(
|
253
|
+
manager.currentFeatures.value,
|
254
|
+
);
|
255
|
+
} else if (
|
256
|
+
manager.currentEditSession.value?.type === SessionType.EDIT_GEOMETRY
|
257
|
+
) {
|
258
|
+
manager.currentEditSession.value.setFeature(
|
259
|
+
manager.currentFeatures.value[0],
|
250
260
|
);
|
251
261
|
}
|
252
262
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|