@vcmap/ui 6.0.0-rc.9 → 6.0.0
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/README.md +2 -0
- package/build/commonViteConfig.js +7 -0
- package/config/aerowest.config.json +12 -2
- package/config/analysis.config.json +17 -0
- package/config/base.config.json +16 -4
- package/config/components-show-case.config.json +53 -0
- package/config/concepts-show-case.config.json +39 -0
- package/config/dev.config.json +165 -104
- package/config/dynamic-layer.config.json +32 -0
- package/config/hello-world.config.json +11 -0
- package/config/projects.config.json +9 -1
- package/config/solar.config.json +65 -0
- package/config/vectorTile.config.json +70 -0
- package/config/www.config.json +33 -10
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-ccecb5f4.js → core-a599e8b6.js} +7302 -6838
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-3c6b9b5b.js → ol-21bbc740.js} +5057 -5178
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-adeddc7d.css +1 -0
- package/dist/assets/{ui-8a8aef2a.js → ui-adeddc7d.js} +9687 -8940
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-ac50bfc8.js → vuetify-c0e02f11.js} +2507 -2504
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -0
- package/package.json +12 -12
- package/plugins/@vcmap-show-case/README.md +15 -6
- package/plugins/@vcmap-show-case/category-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/category-tester/src/CollectionComponentOptions.vue +23 -23
- package/plugins/@vcmap-show-case/category-tester/src/FoobarEditor.vue +2 -8
- package/plugins/@vcmap-show-case/collection-manager-example/package.json +1 -1
- package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +10 -8
- package/plugins/@vcmap-show-case/context-menu-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/extent-example/package.json +1 -1
- package/plugins/@vcmap-show-case/flight-component-example/package.json +1 -1
- package/plugins/@vcmap-show-case/form-inputs-example/package.json +1 -1
- package/plugins/@vcmap-show-case/hello-world/package.json +1 -1
- package/plugins/@vcmap-show-case/icons-example/package.json +1 -1
- package/plugins/@vcmap-show-case/notifier-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/panel-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/plugin-editors/package.json +1 -1
- package/plugins/@vcmap-show-case/plugin-editors/src/index.js +17 -6
- package/plugins/@vcmap-show-case/project-selector/package.json +1 -9
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +22 -31
- package/plugins/@vcmap-show-case/project-selector/src/ProjectSelectorComponent.vue +15 -23
- package/plugins/@vcmap-show-case/projection-example/README.md +3 -0
- package/plugins/@vcmap-show-case/projection-example/package.json +5 -0
- package/plugins/@vcmap-show-case/projection-example/src/ProjectionExample.vue +73 -0
- package/plugins/@vcmap-show-case/{table-example → projection-example}/src/index.js +22 -11
- package/plugins/@vcmap-show-case/search-example/package.json +1 -1
- package/plugins/@vcmap-show-case/simple-graph/package.json +1 -4
- package/plugins/@vcmap-show-case/style-input-example/package.json +1 -1
- package/plugins/@vcmap-show-case/switch-map-callback-example/README.md +2 -2
- package/plugins/@vcmap-show-case/switch-map-callback-example/package.json +2 -1
- package/plugins/@vcmap-show-case/switch-map-callback-example/src/index.js +4 -1
- package/plugins/@vcmap-show-case/theming-example/package.json +1 -1
- package/plugins/@vcmap-show-case/toolbox-example/package.json +1 -1
- package/plugins/@vcmap-show-case/vector-properties-example/package.json +1 -1
- package/plugins/@vcmap-show-case/viewpoint-component-example/package.json +1 -1
- package/plugins/@vcmap-show-case/window-tester/package.json +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExample.vue +1 -1
- package/plugins/@vcmap-show-case/window-tester/src/WindowExampleToggleChild.vue +5 -1
- package/plugins/@vcmap-show-case/wizard-example/package.json +1 -1
- package/plugins/package.json +7 -3
- package/src/actions/flightActions.js +40 -20
- package/src/actions/listActions.d.ts +1 -1
- package/src/actions/listActions.js +1 -1
- package/src/application/VcsApp.vue +3 -0
- package/src/application/VcsApp.vue.d.ts +12 -0
- package/src/application/VcsAttributions.vue +1 -1
- package/src/application/VcsAttributionsFooter.vue +1 -1
- package/src/application/VcsContainer.vue +0 -1
- package/src/application/VcsContainer.vue.d.ts +12 -0
- package/src/application/VcsObliqueFooter.vue +110 -0
- package/src/application/VcsObliqueFooter.vue.d.ts +4 -0
- package/src/application/VcsTextPageFooter.vue +1 -0
- package/src/application/attributionsHelper.js +10 -6
- package/src/components/flight/VcsFlightPlayer.vue +26 -20
- package/src/components/form-inputs-controls/VcsDatePicker.vue +23 -3
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +1 -1
- package/src/components/form-inputs-controls/VcsFileInput.vue +1 -1
- package/src/components/form-inputs-controls/VcsLabel.vue +10 -1
- package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/VcsRadio.vue +4 -0
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +2 -2
- package/src/components/form-inputs-controls/VcsTextField.vue +1 -1
- package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +2 -2
- package/src/components/import/VcsImportComponent.vue +3 -3
- package/src/components/lists/VcsActionList.vue +1 -1
- package/src/components/lists/VcsList.vue +42 -29
- package/src/components/lists/VcsListItemComponent.vue +1 -1
- package/src/components/lists/VcsListItemComponent.vue.d.ts +5 -32
- package/src/components/lists/VcsTreeview.vue +2 -0
- package/src/components/notification/VcsHelp.vue +0 -1
- package/src/components/notification/VcsHelpTooltip.vue +48 -0
- package/src/components/notification/VcsHelpTooltip.vue.d.ts +25 -0
- package/src/components/projection/VcsProjection.vue +329 -0
- package/src/components/projection/VcsProjection.vue.d.ts +7 -0
- package/src/components/section/VcsFormSection.vue +0 -1
- package/src/components/section/VcsFormSection.vue.d.ts +1 -1
- package/src/components/tables/VcsDataTable.vue +13 -2
- package/src/components/tables/VcsDataTable.vue.d.ts +12 -1
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +17 -1
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +10 -1
- package/src/components/vector-properties/VcsFeatureTransforms.vue +39 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue.d.ts +2 -1
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +44 -24
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +27 -2
- package/src/components/viewpoint/VcsViewpointComponent.vue +6 -6
- package/src/contentTree/contentTreeCollection.js +12 -1
- package/src/featureInfo/abstractFeatureInfoView.d.ts +9 -0
- package/src/featureInfo/abstractFeatureInfoView.js +17 -1
- package/src/i18n/de.d.ts +90 -41
- package/src/i18n/de.js +63 -22
- package/src/i18n/en.d.ts +90 -41
- package/src/i18n/en.js +59 -18
- package/src/legend/StyleLegendItem.vue +1 -5
- package/src/legend/VcsLegend.vue +9 -10
- package/src/legend/VcsLegend.vue.d.ts +1 -1
- package/src/legend/legendHelper.js +6 -1
- package/src/manager/collectionManager/collectionComponentClass.js +4 -4
- package/src/manager/collectionManager/editorCollectionComponentClass.js +5 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +6 -1
- package/src/manager/toolbox/SelectToolboxComponent.vue +6 -2
- package/src/manager/toolbox/ToolboxManagerComponent.vue +7 -2
- package/src/manager/window/WindowComponentHeader.vue +1 -1
- package/src/navigation/MapNavCompass.vue +166 -140
- package/src/navigation/MapNavCompass.vue.d.ts +3 -1
- package/src/navigation/MapNavigation.vue +22 -5
- package/src/navigation/VcsCompass.vue +2 -1
- package/src/navigation/overviewMap.js +4 -1
- package/src/styles/main.scss +2 -2
- package/src/uiConfig.d.ts +27 -0
- package/src/uiConfig.js +3 -0
- package/src/vuePlugins/vuetify.js +2 -0
- package/dist/assets/ui-8a8aef2a.css +0 -1
- package/plugins/@vcmap-show-case/buttons-example/README.md +0 -4
- package/plugins/@vcmap-show-case/buttons-example/package.json +0 -5
- package/plugins/@vcmap-show-case/buttons-example/src/ButtonsExample.vue +0 -281
- package/plugins/@vcmap-show-case/buttons-example/src/index.js +0 -51
- package/plugins/@vcmap-show-case/config-editor/README.md +0 -3
- package/plugins/@vcmap-show-case/config-editor/package.json +0 -5
- package/plugins/@vcmap-show-case/config-editor/src/ConfigEditor.vue +0 -62
- package/plugins/@vcmap-show-case/config-editor/src/index.js +0 -49
- package/plugins/@vcmap-show-case/list-example/README.md +0 -3
- package/plugins/@vcmap-show-case/list-example/package.json +0 -5
- package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +0 -406
- package/plugins/@vcmap-show-case/list-example/src/index.js +0 -46
- package/plugins/@vcmap-show-case/table-example/README.md +0 -3
- package/plugins/@vcmap-show-case/table-example/package.json +0 -5
- package/plugins/@vcmap-show-case/table-example/src/DataTableExample.vue +0 -203
- package/plugins/@vcmap-show-case/textfields-example/README.md +0 -3
- package/plugins/@vcmap-show-case/textfields-example/package.json +0 -5
- package/plugins/@vcmap-show-case/textfields-example/src/TextfieldsExample.vue +0 -115
- package/plugins/@vcmap-show-case/textfields-example/src/index.js +0 -64
- /package/dist/assets/{cesium-a21a380a.js → cesium-00deba88.js} +0 -0
- /package/dist/assets/{vue-bcc58dd1.js → vue-8269279d.js} +0 -0
- /package/dist/assets/{vuetify-ac50bfc8.css → vuetify-c0e02f11.css} +0 -0
@@ -1,49 +0,0 @@
|
|
1
|
-
import { ButtonLocation, createToggleAction, WindowSlot } from '@vcmap/ui';
|
2
|
-
import packageJSON from '../package.json';
|
3
|
-
import ConfigEditor from './ConfigEditor.vue';
|
4
|
-
|
5
|
-
/**
|
6
|
-
* @returns {VcsPlugin}
|
7
|
-
*/
|
8
|
-
export default async function configEditor() {
|
9
|
-
return {
|
10
|
-
get name() {
|
11
|
-
return packageJSON.name;
|
12
|
-
},
|
13
|
-
get version() {
|
14
|
-
return packageJSON.version;
|
15
|
-
},
|
16
|
-
get mapVersion() {
|
17
|
-
return packageJSON.mapVersion;
|
18
|
-
},
|
19
|
-
onVcsAppMounted(app) {
|
20
|
-
const { action, destroy } = createToggleAction(
|
21
|
-
{
|
22
|
-
name: 'Config Editor',
|
23
|
-
},
|
24
|
-
{
|
25
|
-
id: 'config-editor',
|
26
|
-
state: {
|
27
|
-
headerTitle: 'Config Editor',
|
28
|
-
},
|
29
|
-
component: ConfigEditor,
|
30
|
-
slot: WindowSlot.DYNAMIC_LEFT,
|
31
|
-
},
|
32
|
-
app.windowManager,
|
33
|
-
packageJSON.name,
|
34
|
-
);
|
35
|
-
app.navbarManager.add(
|
36
|
-
{ id: 'config-editor', action },
|
37
|
-
packageJSON.name,
|
38
|
-
ButtonLocation.TOOL,
|
39
|
-
);
|
40
|
-
this._destroyAction = destroy;
|
41
|
-
},
|
42
|
-
destroy() {
|
43
|
-
if (this._destroyAction) {
|
44
|
-
this._destroyAction();
|
45
|
-
this._destroyAction = null;
|
46
|
-
}
|
47
|
-
},
|
48
|
-
};
|
49
|
-
}
|
@@ -1,406 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<v-sheet>
|
3
|
-
<VcsFormSection heading="Settings">
|
4
|
-
<v-container class="py-0 px-4">
|
5
|
-
<v-row no-gutters>
|
6
|
-
<v-col>
|
7
|
-
<v-switch v-model="selectable" label="Selectable" />
|
8
|
-
</v-col>
|
9
|
-
<v-col>
|
10
|
-
<v-switch
|
11
|
-
:disabled="!selectable"
|
12
|
-
v-model="selectSingle"
|
13
|
-
label=" Single Select"
|
14
|
-
/>
|
15
|
-
</v-col>
|
16
|
-
</v-row>
|
17
|
-
<v-row no-gutters>
|
18
|
-
<v-col>
|
19
|
-
<v-switch v-model="searchable" label="Searchable" />
|
20
|
-
</v-col>
|
21
|
-
<v-col>
|
22
|
-
<v-switch v-model="draggable" label="Draggable" />
|
23
|
-
</v-col>
|
24
|
-
</v-row>
|
25
|
-
<v-row no-gutters>
|
26
|
-
<v-col>
|
27
|
-
<v-switch
|
28
|
-
v-model="prependIndex"
|
29
|
-
label="Prepend Index"
|
30
|
-
class="ma-0"
|
31
|
-
/>
|
32
|
-
</v-col>
|
33
|
-
<v-col>
|
34
|
-
<v-switch v-model="appendIndex" label="Append Index" />
|
35
|
-
</v-col>
|
36
|
-
</v-row>
|
37
|
-
</v-container>
|
38
|
-
</VcsFormSection>
|
39
|
-
<VcsFormSection heading="Title">
|
40
|
-
<v-container class="py-0 px-4">
|
41
|
-
<v-row no-gutters>
|
42
|
-
<v-col>
|
43
|
-
<v-switch v-model="showTitle" label="Show Title" />
|
44
|
-
</v-col>
|
45
|
-
<v-col>
|
46
|
-
<vcs-text-field
|
47
|
-
v-model="title"
|
48
|
-
placeholder="Title"
|
49
|
-
:disabled="!showTitle"
|
50
|
-
/>
|
51
|
-
</v-col>
|
52
|
-
</v-row>
|
53
|
-
<v-row no-gutters>
|
54
|
-
<v-col>
|
55
|
-
<v-switch
|
56
|
-
v-model="titleActions"
|
57
|
-
label="Title Actions"
|
58
|
-
class="ma-0"
|
59
|
-
/>
|
60
|
-
</v-col>
|
61
|
-
<v-col>
|
62
|
-
<v-switch v-model="titleIcon" label="Title Icon" class="ma-0" />
|
63
|
-
</v-col>
|
64
|
-
</v-row>
|
65
|
-
</v-container>
|
66
|
-
</VcsFormSection>
|
67
|
-
<VcsFormSection heading="Item">
|
68
|
-
<v-container class="py-2 px-4">
|
69
|
-
<v-row no-gutters>
|
70
|
-
<v-dialog v-model="dialog" width="400">
|
71
|
-
<template #activator="{ props }">
|
72
|
-
<vcs-form-button v-bind="props"> Add An item </vcs-form-button>
|
73
|
-
</template>
|
74
|
-
<v-card class="py-2 px-4">
|
75
|
-
<v-form @submit.prevent="add">
|
76
|
-
<vcs-text-field
|
77
|
-
v-model="newItem.name"
|
78
|
-
label="Name"
|
79
|
-
:rules="required"
|
80
|
-
/>
|
81
|
-
<vcs-text-field
|
82
|
-
v-model="newItem.title"
|
83
|
-
label="Title"
|
84
|
-
:rules="required"
|
85
|
-
/>
|
86
|
-
<v-switch label="visible" v-model="newItem.visible" />
|
87
|
-
<v-switch label="disabled" v-model="newItem.disabled" />
|
88
|
-
<v-switch label="random icon" v-model="newItem.icon" />
|
89
|
-
<v-switch label="hasUpdate" v-model="newItem.hasUpdate" />
|
90
|
-
<v-switch label="rename action" v-model="newItem.renamable" />
|
91
|
-
<v-switch
|
92
|
-
label="toggle rename action"
|
93
|
-
v-model="newItem.toggleRename"
|
94
|
-
/>
|
95
|
-
<v-switch label="console.log action" v-model="newItem.action" />
|
96
|
-
<v-switch
|
97
|
-
label="console.log on clicked"
|
98
|
-
v-model="newItem.clicked"
|
99
|
-
/>
|
100
|
-
<v-switch
|
101
|
-
label="console.log selected state"
|
102
|
-
v-model="newItem.selected"
|
103
|
-
/>
|
104
|
-
<vcs-form-button type="submit"> Add </vcs-form-button>
|
105
|
-
</v-form>
|
106
|
-
</v-card>
|
107
|
-
</v-dialog>
|
108
|
-
</v-row>
|
109
|
-
</v-container>
|
110
|
-
</VcsFormSection>
|
111
|
-
<VcsFormSection heading="Selection">
|
112
|
-
<v-container class="py-2 px-4">
|
113
|
-
<v-row no-gutters>
|
114
|
-
<template v-if="selectable">
|
115
|
-
<v-col>
|
116
|
-
<v-switch
|
117
|
-
v-model="showSelection"
|
118
|
-
label="Show Selection"
|
119
|
-
dense
|
120
|
-
class="ma-0"
|
121
|
-
/>
|
122
|
-
</v-col>
|
123
|
-
</template>
|
124
|
-
</v-row>
|
125
|
-
<v-row no-gutters>
|
126
|
-
<ul v-if="showSelection" class="mx-2">
|
127
|
-
<li v-for="(i, index) in selected" :key="`item-${index}`">
|
128
|
-
{{ i.title }}
|
129
|
-
</li>
|
130
|
-
</ul>
|
131
|
-
</v-row>
|
132
|
-
</v-container>
|
133
|
-
</VcsFormSection>
|
134
|
-
|
135
|
-
<vcs-list
|
136
|
-
:items="items"
|
137
|
-
:draggable="draggable"
|
138
|
-
:selectable="selectable"
|
139
|
-
:single-select="selectSingle"
|
140
|
-
:searchable="searchable"
|
141
|
-
:show-title="showTitle"
|
142
|
-
:icon="titleIconSrc"
|
143
|
-
:actions="titleActionsArray"
|
144
|
-
:title="title"
|
145
|
-
v-model="selected"
|
146
|
-
@item-moved="move"
|
147
|
-
@item-renamed="({ item, newTitle }) => (item.title = newTitle)"
|
148
|
-
>
|
149
|
-
<template #[`item.prepend`]="{ index }" v-if="prependIndex">
|
150
|
-
{{ index }}
|
151
|
-
</template>
|
152
|
-
<template #[`item.title`]="{ index }">
|
153
|
-
{{ index }}
|
154
|
-
</template>
|
155
|
-
<template #[`item.append`]="{ index }" v-if="appendIndex">
|
156
|
-
{{ index }}
|
157
|
-
</template>
|
158
|
-
</vcs-list>
|
159
|
-
</v-sheet>
|
160
|
-
</template>
|
161
|
-
|
162
|
-
<script>
|
163
|
-
import {
|
164
|
-
VcsList,
|
165
|
-
VcsFormButton,
|
166
|
-
VcsTextField,
|
167
|
-
Icons,
|
168
|
-
VcsFormSection,
|
169
|
-
} from '@vcmap/ui';
|
170
|
-
import {
|
171
|
-
VSwitch,
|
172
|
-
VSheet,
|
173
|
-
VDialog,
|
174
|
-
VCard,
|
175
|
-
VForm,
|
176
|
-
VContainer,
|
177
|
-
VRow,
|
178
|
-
VCol,
|
179
|
-
} from 'vuetify/components';
|
180
|
-
import { computed, reactive, ref } from 'vue';
|
181
|
-
|
182
|
-
function getRandomIcon() {
|
183
|
-
const keys = Object.keys(Icons);
|
184
|
-
const index = Math.floor(keys.length * Math.random());
|
185
|
-
return `$${keys[index]}`;
|
186
|
-
}
|
187
|
-
|
188
|
-
const defaultItems = [
|
189
|
-
{
|
190
|
-
name: 'foo',
|
191
|
-
title: 'Foo',
|
192
|
-
tooltip: 'this is the foo',
|
193
|
-
icon: 'mdi-pen',
|
194
|
-
selectionChanged: (value) => console.log('changed cb foo', value),
|
195
|
-
},
|
196
|
-
{
|
197
|
-
name: 'bar',
|
198
|
-
title: 'Bar',
|
199
|
-
actions: [
|
200
|
-
{
|
201
|
-
name: 'console.log',
|
202
|
-
callback() {
|
203
|
-
console.log('bar action');
|
204
|
-
},
|
205
|
-
},
|
206
|
-
],
|
207
|
-
selectionChanged: (value) => console.log('changed cb bar', value),
|
208
|
-
},
|
209
|
-
{
|
210
|
-
name: 'baz',
|
211
|
-
title: 'Baz',
|
212
|
-
tooltip: 'special baz',
|
213
|
-
selectionChanged: (value) => console.log('bchanged cb baz', value),
|
214
|
-
},
|
215
|
-
];
|
216
|
-
|
217
|
-
export default {
|
218
|
-
name: 'ListExample',
|
219
|
-
components: {
|
220
|
-
VcsList,
|
221
|
-
VcsFormButton,
|
222
|
-
VcsTextField,
|
223
|
-
VcsFormSection,
|
224
|
-
VSwitch,
|
225
|
-
VSheet,
|
226
|
-
VDialog,
|
227
|
-
VCard,
|
228
|
-
VForm,
|
229
|
-
VContainer,
|
230
|
-
VRow,
|
231
|
-
VCol,
|
232
|
-
},
|
233
|
-
setup() {
|
234
|
-
const draggable = ref(true);
|
235
|
-
const selectable = ref(true);
|
236
|
-
const searchable = ref(true);
|
237
|
-
const selectSingle = ref(false);
|
238
|
-
const showSelection = ref(false);
|
239
|
-
const prependIndex = ref(false);
|
240
|
-
const appendIndex = ref(false);
|
241
|
-
const showTitle = ref(true);
|
242
|
-
const title = ref('Title');
|
243
|
-
const titleActionsArray = ref([]);
|
244
|
-
const titleIconSrc = ref(null);
|
245
|
-
const selected = ref([]);
|
246
|
-
const items = ref(defaultItems);
|
247
|
-
const newItem = ref({
|
248
|
-
name: 'foo',
|
249
|
-
title: 'foo',
|
250
|
-
disabled: false,
|
251
|
-
visible: true,
|
252
|
-
icon: false,
|
253
|
-
renamable: false,
|
254
|
-
toggleRename: false,
|
255
|
-
action: false,
|
256
|
-
clicked: false,
|
257
|
-
selected: false,
|
258
|
-
});
|
259
|
-
const dialog = ref(false);
|
260
|
-
|
261
|
-
return {
|
262
|
-
draggable,
|
263
|
-
selectable,
|
264
|
-
searchable,
|
265
|
-
selectSingle,
|
266
|
-
selected,
|
267
|
-
showSelection,
|
268
|
-
prependIndex,
|
269
|
-
appendIndex,
|
270
|
-
showTitle,
|
271
|
-
title,
|
272
|
-
titleActionsArray,
|
273
|
-
titleIconSrc,
|
274
|
-
items,
|
275
|
-
newItem,
|
276
|
-
dialog,
|
277
|
-
required: [
|
278
|
-
(v) => !!v || 'Input may not be null',
|
279
|
-
(v) => v.length > 0 || 'Input must have a length',
|
280
|
-
],
|
281
|
-
add() {
|
282
|
-
const item = reactive({
|
283
|
-
name: newItem.value.name,
|
284
|
-
title: newItem.value.title,
|
285
|
-
disabled: newItem.value.disabled,
|
286
|
-
visible: newItem.value.visible,
|
287
|
-
hasUpdate: newItem.value.hasUpdate,
|
288
|
-
renamable: newItem.value.renamable,
|
289
|
-
});
|
290
|
-
|
291
|
-
if (newItem.value.icon) {
|
292
|
-
item.icon = getRandomIcon();
|
293
|
-
}
|
294
|
-
|
295
|
-
item.actions = [];
|
296
|
-
|
297
|
-
if (newItem.value.toggleRename) {
|
298
|
-
item.actions.push({
|
299
|
-
name: 'toggle rename',
|
300
|
-
callback() {
|
301
|
-
item.renamable = !item.renamable;
|
302
|
-
},
|
303
|
-
});
|
304
|
-
}
|
305
|
-
|
306
|
-
if (newItem.value.action) {
|
307
|
-
item.actions.push({
|
308
|
-
name: 'console.log',
|
309
|
-
callback() {
|
310
|
-
console.log("hi, i'm: ", item.name);
|
311
|
-
},
|
312
|
-
});
|
313
|
-
}
|
314
|
-
|
315
|
-
if (newItem.value.clicked) {
|
316
|
-
item.clickedCallbacks = [
|
317
|
-
() => {
|
318
|
-
console.log(`${item.name} just got clicked`);
|
319
|
-
},
|
320
|
-
];
|
321
|
-
}
|
322
|
-
|
323
|
-
if (newItem.value.selected) {
|
324
|
-
item.selectionChanged = (selectedValue) => {
|
325
|
-
if (selectedValue) {
|
326
|
-
console.log(`${item.name} is selected`);
|
327
|
-
} else {
|
328
|
-
console.log(`${item.name} is no longer selected`);
|
329
|
-
}
|
330
|
-
};
|
331
|
-
}
|
332
|
-
|
333
|
-
if (newItem.value.renamable) {
|
334
|
-
item.titleChanged = (newTitle) => {
|
335
|
-
item.title = newTitle;
|
336
|
-
};
|
337
|
-
}
|
338
|
-
|
339
|
-
items.value.push(item);
|
340
|
-
newItem.value = {
|
341
|
-
name: 'foo',
|
342
|
-
title: 'foo',
|
343
|
-
disabled: false,
|
344
|
-
visible: true,
|
345
|
-
icon: false,
|
346
|
-
renamable: false,
|
347
|
-
action: false,
|
348
|
-
clicked: false,
|
349
|
-
selected: false,
|
350
|
-
hasUpdate: false,
|
351
|
-
};
|
352
|
-
dialog.value = false;
|
353
|
-
},
|
354
|
-
titleActions: computed({
|
355
|
-
get() {
|
356
|
-
return titleActionsArray.value.length > 0;
|
357
|
-
},
|
358
|
-
set(value) {
|
359
|
-
if (value) {
|
360
|
-
titleActionsArray.value = [
|
361
|
-
{
|
362
|
-
name: 'console.log foo',
|
363
|
-
callback() {
|
364
|
-
console.log('foo');
|
365
|
-
},
|
366
|
-
},
|
367
|
-
];
|
368
|
-
} else {
|
369
|
-
titleActionsArray.value = [];
|
370
|
-
}
|
371
|
-
},
|
372
|
-
}),
|
373
|
-
titleIcon: computed({
|
374
|
-
get() {
|
375
|
-
return !!titleIconSrc.value;
|
376
|
-
},
|
377
|
-
set(value) {
|
378
|
-
if (value) {
|
379
|
-
titleIconSrc.value = getRandomIcon();
|
380
|
-
} else {
|
381
|
-
titleIconSrc.value = null;
|
382
|
-
}
|
383
|
-
},
|
384
|
-
}),
|
385
|
-
move({ item, targetIndex }) {
|
386
|
-
let target = targetIndex;
|
387
|
-
target = target >= 0 ? target : 0;
|
388
|
-
target =
|
389
|
-
target < items.value.length ? target : items.value.length - 1;
|
390
|
-
const from = items.value.indexOf(item);
|
391
|
-
if (from !== target) {
|
392
|
-
items.value.splice(from, 1);
|
393
|
-
items.value.splice(target, 0, item);
|
394
|
-
}
|
395
|
-
},
|
396
|
-
};
|
397
|
-
},
|
398
|
-
};
|
399
|
-
</script>
|
400
|
-
|
401
|
-
<style lang="scss" scoped>
|
402
|
-
.d-grid {
|
403
|
-
display: grid;
|
404
|
-
grid-template-columns: 1fr 1fr;
|
405
|
-
}
|
406
|
-
</style>
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { ButtonLocation, createToggleAction, WindowSlot } from '@vcmap/ui';
|
2
|
-
import packageJSON from '../package.json';
|
3
|
-
import ListExample from './ListExample.vue';
|
4
|
-
|
5
|
-
/**
|
6
|
-
* @returns {VcsPlugin}
|
7
|
-
*/
|
8
|
-
export default async function iconsExample() {
|
9
|
-
return {
|
10
|
-
get name() {
|
11
|
-
return packageJSON.name;
|
12
|
-
},
|
13
|
-
get version() {
|
14
|
-
return packageJSON.version;
|
15
|
-
},
|
16
|
-
get mapVersion() {
|
17
|
-
return packageJSON.mapVersion;
|
18
|
-
},
|
19
|
-
onVcsAppMounted(app) {
|
20
|
-
const { action, destroy } = createToggleAction(
|
21
|
-
{
|
22
|
-
name: 'List Examples',
|
23
|
-
title: 'List Example Plugin',
|
24
|
-
},
|
25
|
-
{
|
26
|
-
id: 'list-example',
|
27
|
-
component: ListExample,
|
28
|
-
slot: WindowSlot.DYNAMIC_LEFT,
|
29
|
-
state: {
|
30
|
-
headerTitle: 'List Example',
|
31
|
-
},
|
32
|
-
},
|
33
|
-
app.windowManager,
|
34
|
-
packageJSON.name,
|
35
|
-
);
|
36
|
-
app.navbarManager.add({ action }, packageJSON.name, ButtonLocation.TOOL);
|
37
|
-
this._destroyAction = destroy;
|
38
|
-
},
|
39
|
-
destroy() {
|
40
|
-
if (this._destroyAction) {
|
41
|
-
this._destroyAction();
|
42
|
-
this._destroyAction = null;
|
43
|
-
}
|
44
|
-
},
|
45
|
-
};
|
46
|
-
}
|