@vcmap/ui 5.0.0 → 5.0.1
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 +10 -0
- package/config/www.config.json +57 -15
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.306872.js → core.860907.js} +7 -7
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-f265c560.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.e84ce9.css → ui.7758a8.css} +1 -1
- package/dist/assets/{ui.e84ce9.js → ui.7758a8.js} +4761 -4340
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.008fac.js → vuetify.2818ff.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +5 -0
- package/src/actions/StyleSelector.vue +24 -9
- package/src/actions/actionHelper.js +19 -1
- package/src/components/lists/VcsList.vue +5 -2
- package/src/components/lists/VcsTreeview.vue +6 -6
- package/src/components/style/VcsImageSelector.vue +423 -14
- package/src/components/tables/VcsDataTable.vue +29 -1
- package/src/manager/buttonManager.js +3 -1
- package/src/manager/toolbox/toolboxManager.js +5 -2
- package/src/manager/window/windowManager.js +4 -1
- package/src/navigation/MapNavigation.vue +31 -46
- package/dist/assets/index-cfed33b1.js +0 -1
- /package/dist/assets/{cesium.4137c8.js → cesium.888ef7.js} +0 -0
- /package/dist/assets/{ol.328bbf.js → ol.5e8a90.js} +0 -0
- /package/dist/assets/{vue.1c8696.js → vue.9771b3.js} +0 -0
- /package/dist/assets/{vuetify.008fac.css → vuetify.2818ff.css} +0 -0
package/dist/assets/ui.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from "./ui.
|
1
|
+
export * from "./ui.7758a8.js";
|
package/dist/assets/vue.js
CHANGED
@@ -13,7 +13,7 @@ function loadCss(href) {
|
|
13
13
|
elem.onerror = reject;
|
14
14
|
document.head.appendChild(elem);
|
15
15
|
});
|
16
|
-
} await loadCss('./assets/vuetify.
|
16
|
+
} await loadCss('./assets/vuetify.2818ff.css');import v from "./vue.9771b3.js";
|
17
17
|
const Ne = v.extend().extend({
|
18
18
|
name: "themeable",
|
19
19
|
provide() {
|
package/dist/assets/vuetify.js
CHANGED
package/dist/index.html
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vcmap/ui",
|
3
|
-
"version": "5.0.
|
3
|
+
"version": "5.0.1",
|
4
4
|
"author": "Virtual City Systems",
|
5
5
|
"license": "MIT",
|
6
6
|
"scripts": {
|
@@ -120,19 +120,19 @@
|
|
120
120
|
"prettier": "@vcsuite/eslint-config/prettier.js",
|
121
121
|
"browserslist": [
|
122
122
|
"last 2 Chrome versions",
|
123
|
-
"not Chrome <
|
123
|
+
"not Chrome < 116",
|
124
124
|
"last 2 Safari versions",
|
125
125
|
"not Safari < 15",
|
126
126
|
"last 2 iOS versions",
|
127
127
|
"not iOS < 15",
|
128
128
|
"last 2 Firefox versions",
|
129
|
-
"not Firefox <
|
129
|
+
"not Firefox < 114",
|
130
130
|
"last 2 Edge versions",
|
131
|
-
"not Edge <
|
131
|
+
"not Edge < 116"
|
132
132
|
],
|
133
133
|
"engines": {
|
134
|
-
"node": "
|
135
|
-
"npm": "
|
134
|
+
"node": ">=18.12.0",
|
135
|
+
"npm": ">=9.0.0"
|
136
136
|
},
|
137
137
|
"type": "module",
|
138
138
|
"exports": {
|
@@ -26,6 +26,7 @@
|
|
26
26
|
:rules="required"
|
27
27
|
/>
|
28
28
|
<vcs-text-field v-model="newItem.date" type="date" label="date" />
|
29
|
+
<vcs-checkbox label="disabled" v-model="newItem.disabled" />
|
29
30
|
<vcs-form-button type="submit" variant="filled">
|
30
31
|
Add
|
31
32
|
</vcs-form-button>
|
@@ -61,6 +62,7 @@
|
|
61
62
|
VcsDataTable,
|
62
63
|
VcsFormButton,
|
63
64
|
VcsTextField,
|
65
|
+
VcsCheckbox,
|
64
66
|
VcsActionButtonList,
|
65
67
|
} from '@vcmap/ui';
|
66
68
|
import { VSwitch, VSheet, VDialog, VCard, VForm } from 'vuetify/lib';
|
@@ -119,6 +121,7 @@
|
|
119
121
|
VcsDataTable,
|
120
122
|
VcsFormButton,
|
121
123
|
VcsTextField,
|
124
|
+
VcsCheckbox,
|
122
125
|
VcsActionButtonList,
|
123
126
|
VSwitch,
|
124
127
|
VSheet,
|
@@ -137,6 +140,7 @@
|
|
137
140
|
name: 'foo',
|
138
141
|
type: 'foo',
|
139
142
|
date: new Date(),
|
143
|
+
disabled: false,
|
140
144
|
});
|
141
145
|
const dialog = ref(false);
|
142
146
|
|
@@ -158,6 +162,7 @@
|
|
158
162
|
name: newItem.value.name,
|
159
163
|
type: newItem.value.type,
|
160
164
|
date: newItem.value.date,
|
165
|
+
disabled: newItem.value.disabled,
|
161
166
|
id: items.value.length,
|
162
167
|
};
|
163
168
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<v-list-item-title
|
10
10
|
:class="{ 'primary--text': item.value === currentStyleName }"
|
11
11
|
>
|
12
|
-
{{ item.text }}
|
12
|
+
{{ $t(item.text) }}
|
13
13
|
</v-list-item-title>
|
14
14
|
</v-list-item>
|
15
15
|
</v-list>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<v-chip :color="entry.color" />
|
24
24
|
</v-list-item-icon>
|
25
25
|
<v-list-item-content>
|
26
|
-
{{ entry.title }}
|
26
|
+
{{ $t(entry.title) }}
|
27
27
|
</v-list-item-content>
|
28
28
|
</v-list-item>
|
29
29
|
</v-list>
|
@@ -74,7 +74,7 @@
|
|
74
74
|
const app = inject('vcsApp');
|
75
75
|
/** @type {import("@vcmap/core").FeatureLayer} */
|
76
76
|
const layer = app.layers.getByKey(props.layerName);
|
77
|
-
const currentStyleName = ref(layer.style.name);
|
77
|
+
const currentStyleName = ref(layer.style.name || layer.defaultStyle.name);
|
78
78
|
const currentStyleLegend = ref([]);
|
79
79
|
const defaultStyle = layer.defaultStyle.name;
|
80
80
|
|
@@ -93,17 +93,32 @@
|
|
93
93
|
});
|
94
94
|
|
95
95
|
const items = computed(() => {
|
96
|
+
const styles = props.availableStyles
|
97
|
+
.filter((name) => app.styles.hasKey(name))
|
98
|
+
.map((name) => ({
|
99
|
+
text: app.styles.getByKey(name)?.properties?.title || name,
|
100
|
+
value: name,
|
101
|
+
}));
|
102
|
+
if (props.availableStyles.indexOf(defaultStyle) < 0) {
|
103
|
+
return [
|
104
|
+
{
|
105
|
+
text: 'Default',
|
106
|
+
value: defaultStyle,
|
107
|
+
},
|
108
|
+
...styles,
|
109
|
+
];
|
110
|
+
}
|
111
|
+
const firstStyle = styles.find(({ value }) => value === defaultStyle);
|
96
112
|
return [
|
97
|
-
|
98
|
-
...
|
113
|
+
firstStyle,
|
114
|
+
...styles.filter(({ value }) => value !== defaultStyle),
|
99
115
|
];
|
100
116
|
});
|
101
117
|
|
102
118
|
function select(styleName) {
|
103
|
-
const style =
|
104
|
-
styleName
|
105
|
-
|
106
|
-
: app.styles.getByKey(styleName);
|
119
|
+
const style = app.styles.hasKey(styleName)
|
120
|
+
? app.styles.getByKey(styleName)
|
121
|
+
: layer.defaultStyle;
|
107
122
|
layer.setStyle(style);
|
108
123
|
app.windowManager.remove(attrs['window-state'].id);
|
109
124
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { v4 as uuid } from 'uuid';
|
2
|
-
import { check } from '@vcsuite/check';
|
2
|
+
import { check, checkMaybe } from '@vcsuite/check';
|
3
3
|
import {
|
4
4
|
Collection,
|
5
5
|
Extent,
|
@@ -9,6 +9,7 @@ import {
|
|
9
9
|
} from '@vcmap/core';
|
10
10
|
import { Feature } from 'ol';
|
11
11
|
import { reactive, ref } from 'vue';
|
12
|
+
import { parseBoolean } from '@vcsuite/parsers';
|
12
13
|
import { vcsAppSymbol } from '../pluginHelper.js';
|
13
14
|
import { WindowSlot } from '../manager/window/windowManager.js';
|
14
15
|
import { getWindowPositionOptions } from '../manager/window/windowHelper.js';
|
@@ -21,6 +22,23 @@ import SearchComponent from '../search/SearchComponent.vue';
|
|
21
22
|
* @property {string} [icon]
|
22
23
|
*/
|
23
24
|
|
25
|
+
/**
|
26
|
+
* merges action options with defaults
|
27
|
+
* @param {VcsAction|ActionOptions & { callback: Function}} options
|
28
|
+
* @returns {VcsAction}
|
29
|
+
*/
|
30
|
+
export function getActionFromOptions(options) {
|
31
|
+
check(options.name, String);
|
32
|
+
checkMaybe(options.title, String);
|
33
|
+
checkMaybe(options.icon, String);
|
34
|
+
check(options.callback, Function);
|
35
|
+
options.active = parseBoolean(options.active, false);
|
36
|
+
options.hasUpdate = parseBoolean(options.hasUpdate, false);
|
37
|
+
options.background = parseBoolean(options.background, false);
|
38
|
+
options.disabled = parseBoolean(options.disabled, false);
|
39
|
+
return options;
|
40
|
+
}
|
41
|
+
|
24
42
|
/**
|
25
43
|
* @param {ActionOptions} actionOptions
|
26
44
|
* @param {string} mapName
|
@@ -10,7 +10,10 @@
|
|
10
10
|
<v-list-item-action v-if="selectable">
|
11
11
|
<v-spacer v-if="singleSelect" />
|
12
12
|
<v-icon
|
13
|
-
v-else-if="
|
13
|
+
v-else-if="
|
14
|
+
selected.length ===
|
15
|
+
renderingItems.filter((item) => !item.disabled).length
|
16
|
+
"
|
14
17
|
@click="clear"
|
15
18
|
>
|
16
19
|
mdi-check-circle
|
@@ -489,7 +492,7 @@
|
|
489
492
|
},
|
490
493
|
selectAll() {
|
491
494
|
const currentSelection = [...selected.value];
|
492
|
-
selected.value = this.renderingItems.
|
495
|
+
selected.value = this.renderingItems.filter((item) => !item.disabled);
|
493
496
|
selected.value.forEach((item) => {
|
494
497
|
if (item.selectionChanged && !currentSelection.includes(item)) {
|
495
498
|
item.selectionChanged(true);
|
@@ -35,12 +35,12 @@
|
|
35
35
|
> .v-treeview-node:not(:last-child) {
|
36
36
|
border-bottom: 1px solid var(--v-base-lighten2);
|
37
37
|
}
|
38
|
-
// Only
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
font-weight: 700;
|
38
|
+
// Only Group Entries have a bold font
|
39
|
+
.v-treeview-node__root
|
40
|
+
button
|
41
|
+
+ .v-treeview-node__content
|
42
|
+
.v-treeview-node__label {
|
43
|
+
font-weight: 700 !important;
|
44
44
|
}
|
45
45
|
// remove ripple effect from expand icon
|
46
46
|
.v-icon.v-icon {
|