@vcmap/ui 5.1.8 → 5.2.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/build/buildTypes.js +9 -0
- package/config/base.config.json +33 -2
- package/config/dev.config.json +22 -2
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.45041e.js → core.627882.js} +4160 -4041
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-76acacac.js +1 -0
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.74ba2a.css → ui.895896.css} +2 -2
- package/dist/assets/{ui.74ba2a.js → ui.895896.js} +8628 -7657
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.72ace9.js → vuetify.1621f3.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +1 -1
- package/index.d.ts +16 -0
- package/index.js +23 -0
- package/package.json +2 -2
- package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +110 -37
- package/plugins/@vcmap-show-case/collection-manager-example/src/index.js +4 -0
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +10 -3
- package/plugins/@vcmap-show-case/panel-tester/README.md +3 -0
- package/plugins/@vcmap-show-case/panel-tester/package.json +5 -0
- package/plugins/@vcmap-show-case/panel-tester/src/IframePanelExample.vue +15 -0
- package/plugins/@vcmap-show-case/panel-tester/src/ImgPanelExample.vue +19 -0
- package/plugins/@vcmap-show-case/panel-tester/src/PanelExample.vue +128 -0
- package/plugins/@vcmap-show-case/panel-tester/src/TextPanelExample.vue +34 -0
- package/plugins/@vcmap-show-case/panel-tester/src/index.js +63 -0
- package/src/actions/actionHelper.js +1 -1
- package/src/actions/flightActions.d.ts +38 -2
- package/src/actions/flightActions.js +257 -6
- package/src/application/VcsApp.vue +4 -104
- package/src/application/VcsApp.vue.d.ts +0 -6
- package/src/application/VcsContainer.vue +105 -0
- package/src/application/VcsContainer.vue.d.ts +14 -0
- package/src/application/VcsMainMap.vue +68 -0
- package/src/application/VcsMainMap.vue.d.ts +9 -0
- package/src/application/markdownHelper.d.ts +7 -0
- package/src/application/markdownHelper.js +57 -1
- package/src/components/form-inputs-controls/VcsRadioGrid.vue +27 -42
- package/src/contentTree/LayerTree.vue +40 -14
- package/src/downloadHelper.d.ts +0 -2
- package/src/downloadHelper.js +2 -4
- package/src/featureInfo/BalloonComponent.vue +31 -3
- package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
- package/src/featureInfo/MarkdownBalloonComponent.vue +24 -0
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +12 -0
- package/src/featureInfo/abstractFeatureInfoView.js +54 -22
- package/src/featureInfo/addressBalloonFeatureInfoView.d.ts +2 -2
- package/src/featureInfo/addressBalloonFeatureInfoView.js +1 -1
- package/src/featureInfo/balloonFeatureInfoView.js +1 -1
- package/src/featureInfo/balloonHelper.js +16 -9
- package/src/featureInfo/featureInfo.js +10 -0
- package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +47 -0
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +81 -0
- package/src/featureInfo/markdownFeatureInfoView.d.ts +47 -0
- package/src/featureInfo/markdownFeatureInfoView.js +95 -0
- package/src/i18n/de.d.ts +8 -3
- package/src/i18n/de.js +3 -0
- package/src/i18n/en.d.ts +32 -26
- package/src/i18n/en.js +4 -1
- package/src/manager/collectionManager/CollectionComponent.vue +12 -49
- package/src/manager/collectionManager/CollectionComponent.vue.d.ts +5 -9
- package/src/manager/collectionManager/CollectionComponentContent.vue +102 -0
- package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +17 -0
- package/src/manager/collectionManager/CollectionComponentList.vue +10 -2
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +9 -0
- package/src/manager/collectionManager/CollectionComponentStandalone.vue +91 -0
- package/src/manager/collectionManager/CollectionComponentStandalone.vue.d.ts +9 -0
- package/src/manager/collectionManager/collectionManager.d.ts +2 -2
- package/src/manager/collectionManager/collectionManager.js +21 -19
- package/src/manager/panel/PanelComponent.vue +110 -0
- package/src/manager/panel/PanelComponent.vue.d.ts +19 -0
- package/src/manager/panel/PanelManagerComponent.vue +224 -0
- package/src/manager/panel/PanelManagerComponent.vue.d.ts +36 -0
- package/src/manager/panel/panelHelper.d.ts +83 -0
- package/src/manager/panel/panelHelper.js +272 -0
- package/src/manager/panel/panelManager.d.ts +338 -0
- package/src/manager/panel/panelManager.js +381 -0
- package/src/manager/window/WindowManager.vue +14 -0
- package/src/manager/window/windowHelper.js +1 -1
- package/src/search/ResultItem.vue +1 -1
- package/src/search/search.d.ts +2 -2
- package/src/search/search.js +2 -2
- package/src/vcsUiApp.d.ts +14 -0
- package/src/vcsUiApp.js +18 -0
- package/dist/assets/index-3cd5a3f3.js +0 -1
- /package/dist/assets/{cesium.035e3a.js → cesium.9e39f4.js} +0 -0
- /package/dist/assets/{ol.eb3bee.js → ol.fe8c0e.js} +0 -0
- /package/dist/assets/{vue.17a8fa.js → vue.4b3319.js} +0 -0
- /package/dist/assets/{vuetify.72ace9.css → vuetify.1621f3.css} +0 -0
package/src/i18n/en.js
CHANGED
@@ -132,10 +132,13 @@ const messages = {
|
|
132
132
|
zoomToAnchor: 'Zoom to anchor',
|
133
133
|
noAnchor: 'No flight anchor available yet.',
|
134
134
|
invalidDuration: 'The total flight duration must be greater zero!',
|
135
|
+
zoom: 'Zoom to extent',
|
136
|
+
export: 'Export flight',
|
137
|
+
exportPath: 'Export flight path',
|
135
138
|
},
|
136
139
|
viewpoint: {
|
137
140
|
name: 'Name (ID)',
|
138
|
-
|
141
|
+
title: 'Title',
|
139
142
|
titlePlaceholder: 'Title of viewpoint',
|
140
143
|
groundPosition: 'Ground position',
|
141
144
|
cameraPosition: 'Camera position',
|
@@ -21,23 +21,7 @@
|
|
21
21
|
</template>
|
22
22
|
</v-expansion-panel-header>
|
23
23
|
<v-expansion-panel-content class="pb-1">
|
24
|
-
<
|
25
|
-
:items="items.slice(0, limit)"
|
26
|
-
:draggable="draggable"
|
27
|
-
:selectable="selectable"
|
28
|
-
:single-select="singleSelect"
|
29
|
-
v-model="selection"
|
30
|
-
:show-title="false"
|
31
|
-
@item-moved="move"
|
32
|
-
/>
|
33
|
-
<v-sheet v-if="items.length > limit" class="ma-2 pl-2">
|
34
|
-
<VcsButton @click="openCollectionComponentList">
|
35
|
-
{{ $t('collectionManager.more') }}
|
36
|
-
</VcsButton>
|
37
|
-
</v-sheet>
|
38
|
-
<v-sheet v-else-if="items.length === 0" class="ma-2 pl-2">
|
39
|
-
{{ $t('collectionManager.empty') }}
|
40
|
-
</v-sheet>
|
24
|
+
<CollectionComponentContent @openList="(id) => $emit('openList', id)" />
|
41
25
|
</v-expansion-panel-content>
|
42
26
|
</v-expansion-panel>
|
43
27
|
</template>
|
@@ -49,30 +33,31 @@
|
|
49
33
|
VExpansionPanel,
|
50
34
|
VExpansionPanelHeader,
|
51
35
|
VExpansionPanelContent,
|
52
|
-
VSheet,
|
53
36
|
} from 'vuetify/lib';
|
54
|
-
import VcsList
|
55
|
-
createSelectionActions,
|
56
|
-
} from '../../components/lists/VcsList.vue';
|
37
|
+
import { createSelectionActions } from '../../components/lists/VcsList.vue';
|
57
38
|
import VcsActionButtonList from '../../components/buttons/VcsActionButtonList.vue';
|
58
|
-
import
|
59
|
-
|
39
|
+
import CollectionComponentContent from './CollectionComponentContent.vue';
|
40
|
+
|
41
|
+
/**
|
42
|
+
* @typedef {Object} FormSectionOptions
|
43
|
+
* @property {boolean} [expandable]
|
44
|
+
* @property {boolean} [startOpen]
|
45
|
+
* @property {boolean} [disabled]
|
46
|
+
*/
|
60
47
|
|
61
48
|
/**
|
62
49
|
* @description
|
63
|
-
* Renders
|
50
|
+
* Renders content of CollectionComponentClass in an expansion panel using CollectionComponentContent.vue
|
64
51
|
* The collectionComponent must be passed via {@link https://vuejs.org/api/composition-api-dependency-injection.html |provide }.
|
65
52
|
*/
|
66
53
|
export default {
|
67
54
|
name: 'CollectionComponent',
|
68
55
|
components: {
|
56
|
+
CollectionComponentContent,
|
69
57
|
VcsActionButtonList,
|
70
|
-
VcsButton,
|
71
|
-
VcsList,
|
72
58
|
VExpansionPanel,
|
73
59
|
VExpansionPanelHeader,
|
74
60
|
VExpansionPanelContent,
|
75
|
-
VSheet,
|
76
61
|
VIcon,
|
77
62
|
},
|
78
63
|
setup(_props, { emit }) {
|
@@ -91,13 +76,9 @@
|
|
91
76
|
|
92
77
|
return {
|
93
78
|
title: collectionComponent.title,
|
94
|
-
items: collectionComponent.items,
|
95
79
|
selection: collectionComponent.selection,
|
96
|
-
draggable: collectionComponent.draggable,
|
97
80
|
selectable: collectionComponent.selectable,
|
98
|
-
singleSelect: collectionComponent.singleSelect,
|
99
81
|
overflowCount: collectionComponent.overflowCount,
|
100
|
-
limit: collectionComponent.limit,
|
101
82
|
actions: computed(() => {
|
102
83
|
if (
|
103
84
|
collectionComponent.selectable.value &&
|
@@ -107,12 +88,6 @@
|
|
107
88
|
}
|
108
89
|
return actions.value;
|
109
90
|
}),
|
110
|
-
move({ item, targetIndex }) {
|
111
|
-
moveItem(collectionComponent, item, targetIndex);
|
112
|
-
},
|
113
|
-
openCollectionComponentList() {
|
114
|
-
emit('openList', collectionComponent.id);
|
115
|
-
},
|
116
91
|
};
|
117
92
|
},
|
118
93
|
};
|
@@ -125,16 +100,4 @@
|
|
125
100
|
.v-icon {
|
126
101
|
font-size: 16px;
|
127
102
|
}
|
128
|
-
::v-deep {
|
129
|
-
.v-list {
|
130
|
-
.v-list-item {
|
131
|
-
padding: 4px 8px 4px 28px;
|
132
|
-
}
|
133
|
-
.v-list-item__selected {
|
134
|
-
border-left: solid 4px;
|
135
|
-
border-left-color: var(--v-primary-base);
|
136
|
-
padding-left: 24px !important;
|
137
|
-
}
|
138
|
-
}
|
139
|
-
}
|
140
103
|
</style>
|
@@ -1,17 +1,13 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
2
2
|
title: any;
|
3
|
-
items: any;
|
4
3
|
selection: any;
|
5
|
-
draggable: any;
|
6
4
|
selectable: any;
|
7
|
-
singleSelect: any;
|
8
5
|
overflowCount: any;
|
9
|
-
limit: any;
|
10
6
|
actions: import("vue").ComputedRef<any>;
|
11
|
-
move({ item, targetIndex }: {
|
12
|
-
item: any;
|
13
|
-
targetIndex: any;
|
14
|
-
}): void;
|
15
|
-
openCollectionComponentList(): void;
|
16
7
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
17
8
|
export default _default;
|
9
|
+
export type FormSectionOptions = {
|
10
|
+
expandable?: boolean | undefined;
|
11
|
+
startOpen?: boolean | undefined;
|
12
|
+
disabled?: boolean | undefined;
|
13
|
+
};
|
@@ -0,0 +1,102 @@
|
|
1
|
+
<template>
|
2
|
+
<v-container class="py-0 px-0">
|
3
|
+
<vcs-list
|
4
|
+
:items="items.slice(0, limit)"
|
5
|
+
:draggable="draggable"
|
6
|
+
:selectable="selectable"
|
7
|
+
:single-select="singleSelect"
|
8
|
+
v-model="selection"
|
9
|
+
:show-title="false"
|
10
|
+
@item-moved="move"
|
11
|
+
/>
|
12
|
+
<v-sheet v-if="items.length > limit" class="ma-2 pl-2">
|
13
|
+
<VcsButton @click="openCollectionComponentList">
|
14
|
+
{{ $t('collectionManager.more') }}
|
15
|
+
</VcsButton>
|
16
|
+
</v-sheet>
|
17
|
+
<v-sheet v-else-if="items.length === 0" class="ma-2 pl-2">
|
18
|
+
{{ $t('collectionManager.empty') }}
|
19
|
+
</v-sheet>
|
20
|
+
</v-container>
|
21
|
+
</template>
|
22
|
+
|
23
|
+
<script>
|
24
|
+
import { computed, inject } from 'vue';
|
25
|
+
import { VSheet, VContainer } from 'vuetify/lib';
|
26
|
+
import VcsList, {
|
27
|
+
createSelectionActions,
|
28
|
+
} from '../../components/lists/VcsList.vue';
|
29
|
+
import VcsButton from '../../components/buttons/VcsButton.vue';
|
30
|
+
import { moveItem } from './CollectionComponentList.vue';
|
31
|
+
|
32
|
+
/**
|
33
|
+
* @description
|
34
|
+
* Renders the first ten items of a collectionComponent in a List. Uses CollectionComponentList to render more items.
|
35
|
+
* The collectionComponent must be passed via {@link https://vuejs.org/api/composition-api-dependency-injection.html |provide }.
|
36
|
+
* @vue-event {string} openList
|
37
|
+
*/
|
38
|
+
export default {
|
39
|
+
name: 'CollectionComponent',
|
40
|
+
components: {
|
41
|
+
VcsButton,
|
42
|
+
VcsList,
|
43
|
+
VSheet,
|
44
|
+
VContainer,
|
45
|
+
},
|
46
|
+
setup(_props, { emit }) {
|
47
|
+
/**
|
48
|
+
* @type {CollectionComponentClass}
|
49
|
+
*/
|
50
|
+
const collectionComponent = inject('collectionComponent');
|
51
|
+
|
52
|
+
const selectionActions = createSelectionActions(
|
53
|
+
collectionComponent.items,
|
54
|
+
collectionComponent.selection,
|
55
|
+
emit,
|
56
|
+
);
|
57
|
+
|
58
|
+
const actions = collectionComponent.getActions();
|
59
|
+
|
60
|
+
return {
|
61
|
+
title: collectionComponent.title,
|
62
|
+
items: collectionComponent.items,
|
63
|
+
selection: collectionComponent.selection,
|
64
|
+
draggable: collectionComponent.draggable,
|
65
|
+
selectable: collectionComponent.selectable,
|
66
|
+
singleSelect: collectionComponent.singleSelect,
|
67
|
+
overflowCount: collectionComponent.overflowCount,
|
68
|
+
limit: collectionComponent.limit,
|
69
|
+
actions: computed(() => {
|
70
|
+
if (
|
71
|
+
collectionComponent.selectable.value &&
|
72
|
+
!collectionComponent.singleSelect.value
|
73
|
+
) {
|
74
|
+
return [...selectionActions, ...actions.value];
|
75
|
+
}
|
76
|
+
return actions.value;
|
77
|
+
}),
|
78
|
+
move({ item, targetIndex }) {
|
79
|
+
moveItem(collectionComponent, item, targetIndex);
|
80
|
+
},
|
81
|
+
openCollectionComponentList() {
|
82
|
+
emit('openList', collectionComponent.id);
|
83
|
+
},
|
84
|
+
};
|
85
|
+
},
|
86
|
+
};
|
87
|
+
</script>
|
88
|
+
|
89
|
+
<style lang="scss" scoped>
|
90
|
+
::v-deep {
|
91
|
+
.v-list {
|
92
|
+
.v-list-item {
|
93
|
+
padding: 4px 8px 4px 28px;
|
94
|
+
}
|
95
|
+
.v-list-item__selected {
|
96
|
+
border-left: solid 4px;
|
97
|
+
border-left-color: var(--v-primary-base);
|
98
|
+
padding-left: 24px !important;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
</style>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
2
|
+
title: any;
|
3
|
+
items: any;
|
4
|
+
selection: any;
|
5
|
+
draggable: any;
|
6
|
+
selectable: any;
|
7
|
+
singleSelect: any;
|
8
|
+
overflowCount: any;
|
9
|
+
limit: any;
|
10
|
+
actions: import("vue").ComputedRef<any>;
|
11
|
+
move({ item, targetIndex }: {
|
12
|
+
item: any;
|
13
|
+
targetIndex: any;
|
14
|
+
}): void;
|
15
|
+
openCollectionComponentList(): void;
|
16
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
17
|
+
export default _default;
|
@@ -1,6 +1,9 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<div
|
3
|
+
<div
|
4
|
+
v-if="!hideHeader"
|
5
|
+
class="v-expansion-panel-header px-2 v-expansion-panel-header--active"
|
6
|
+
>
|
4
7
|
<div class="d-flex justify-space-between">
|
5
8
|
<div class="d-flex align-center gap-1 pl-2">
|
6
9
|
<span>
|
@@ -69,7 +72,8 @@
|
|
69
72
|
* @description
|
70
73
|
* Renders the items of a CollectionComponentClass in a List.
|
71
74
|
* The collectionComponent must be passed via {@link https://vuejs.org/api/composition-api-dependency-injection.html |provide }.
|
72
|
-
* @vue-prop {
|
75
|
+
* @vue-prop {boolean} showLessButton - Show a `show less button` at the end of the list, which will emit a closeList event
|
76
|
+
* @vue-prop {boolean} hideHeader - Whether to hide the header or not
|
73
77
|
*/
|
74
78
|
export default {
|
75
79
|
name: 'CollectionComponentList',
|
@@ -78,6 +82,10 @@
|
|
78
82
|
type: Boolean,
|
79
83
|
default: true,
|
80
84
|
},
|
85
|
+
hideHeader: {
|
86
|
+
type: Boolean,
|
87
|
+
default: false,
|
88
|
+
},
|
81
89
|
},
|
82
90
|
components: {
|
83
91
|
VcsButton,
|
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
12
12
|
type: BooleanConstructor;
|
13
13
|
default: boolean;
|
14
14
|
};
|
15
|
+
hideHeader: {
|
16
|
+
type: BooleanConstructor;
|
17
|
+
default: boolean;
|
18
|
+
};
|
15
19
|
}, {
|
16
20
|
title: any;
|
17
21
|
items: any;
|
@@ -32,7 +36,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
32
36
|
type: BooleanConstructor;
|
33
37
|
default: boolean;
|
34
38
|
};
|
39
|
+
hideHeader: {
|
40
|
+
type: BooleanConstructor;
|
41
|
+
default: boolean;
|
42
|
+
};
|
35
43
|
}>>, {
|
44
|
+
hideHeader: boolean;
|
36
45
|
showLessButton: boolean;
|
37
46
|
}>;
|
38
47
|
export default _default;
|
@@ -0,0 +1,91 @@
|
|
1
|
+
<template>
|
2
|
+
<VcsFormSection
|
3
|
+
:heading="title"
|
4
|
+
:header-actions="actions"
|
5
|
+
:action-button-list-overflow-count="overflowCount"
|
6
|
+
v-bind="{ ...$attrs }"
|
7
|
+
>
|
8
|
+
<collection-component-list
|
9
|
+
v-if="componentListView"
|
10
|
+
hide-header
|
11
|
+
@closeList="closeList"
|
12
|
+
/>
|
13
|
+
<CollectionComponentContent v-else @openList="openList" />
|
14
|
+
</VcsFormSection>
|
15
|
+
</template>
|
16
|
+
|
17
|
+
<script>
|
18
|
+
import { computed, getCurrentInstance, inject, ref } from 'vue';
|
19
|
+
import VcsFormSection from '../../components/form-inputs-controls/VcsFormSection.vue';
|
20
|
+
import { createSelectionActions } from '../../components/lists/VcsList.vue';
|
21
|
+
import CollectionComponentList from './CollectionComponentList.vue';
|
22
|
+
import CollectionComponentContent from './CollectionComponentContent.vue';
|
23
|
+
|
24
|
+
/**
|
25
|
+
* @description
|
26
|
+
* Renders the first ten items of a collectionComponent in a List. Uses CollectionComponentList to render more items.
|
27
|
+
* The collectionComponent must be passed via {@link https://vuejs.org/api/composition-api-dependency-injection.html |provide }.
|
28
|
+
*/
|
29
|
+
export default {
|
30
|
+
name: 'CollectionComponent',
|
31
|
+
components: {
|
32
|
+
CollectionComponentList,
|
33
|
+
CollectionComponentContent,
|
34
|
+
VcsFormSection,
|
35
|
+
},
|
36
|
+
setup(_props, { emit }) {
|
37
|
+
const vm = getCurrentInstance().proxy;
|
38
|
+
/**
|
39
|
+
* @type {CollectionComponentClass}
|
40
|
+
*/
|
41
|
+
const collectionComponent = inject('collectionComponent');
|
42
|
+
/**
|
43
|
+
* @type {import("vue").Ref<boolean>}
|
44
|
+
*/
|
45
|
+
const componentListView = ref(false);
|
46
|
+
|
47
|
+
const selectionActions = createSelectionActions(
|
48
|
+
collectionComponent.items,
|
49
|
+
collectionComponent.selection,
|
50
|
+
emit,
|
51
|
+
);
|
52
|
+
|
53
|
+
const actions = collectionComponent.getActions();
|
54
|
+
|
55
|
+
const title = computed(() => {
|
56
|
+
if (
|
57
|
+
collectionComponent.selectable &&
|
58
|
+
collectionComponent.selection.length > 0
|
59
|
+
) {
|
60
|
+
return `${vm.$t(collectionComponent.title.value)} (${
|
61
|
+
collectionComponent.selection.value.length
|
62
|
+
})`;
|
63
|
+
}
|
64
|
+
return collectionComponent.title.value;
|
65
|
+
});
|
66
|
+
|
67
|
+
return {
|
68
|
+
title,
|
69
|
+
overflowCount: collectionComponent.overflowCount,
|
70
|
+
actions: computed(() => {
|
71
|
+
if (
|
72
|
+
collectionComponent.selectable.value &&
|
73
|
+
!collectionComponent.singleSelect.value
|
74
|
+
) {
|
75
|
+
return [...selectionActions, ...actions.value];
|
76
|
+
}
|
77
|
+
return actions.value;
|
78
|
+
}),
|
79
|
+
componentListView,
|
80
|
+
openList() {
|
81
|
+
componentListView.value = true;
|
82
|
+
},
|
83
|
+
closeList() {
|
84
|
+
componentListView.value = false;
|
85
|
+
},
|
86
|
+
};
|
87
|
+
},
|
88
|
+
};
|
89
|
+
</script>
|
90
|
+
|
91
|
+
<style lang="scss" scoped></style>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
2
|
+
title: import("vue").ComputedRef<any>;
|
3
|
+
overflowCount: any;
|
4
|
+
actions: import("vue").ComputedRef<any>;
|
5
|
+
componentListView: import("vue").Ref<boolean>;
|
6
|
+
openList(): void;
|
7
|
+
closeList(): void;
|
8
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
9
|
+
export default _default;
|
@@ -86,10 +86,10 @@ declare class CollectionManager implements ICollectionManager {
|
|
86
86
|
*/
|
87
87
|
private _itemFilters;
|
88
88
|
/**
|
89
|
-
* @type {Array<{actions:Array<import("../../actions/actionHelper.js").VcsAction>,owner:string|symbol,collectionComponentIds:Array<string>}>}
|
89
|
+
* @type {Array<{ownedActions:Array<OwnedAction>,actions:Array<import("../../actions/actionHelper.js").VcsAction>,owner:string|symbol,collectionComponentIds:Array<string>}>}
|
90
90
|
* @private
|
91
91
|
*/
|
92
|
-
private
|
92
|
+
private _itemActions;
|
93
93
|
/**
|
94
94
|
* @param {string} id
|
95
95
|
* @returns {CollectionComponentClass<Object>|undefined}
|
@@ -78,10 +78,10 @@ class CollectionManager {
|
|
78
78
|
*/
|
79
79
|
this._itemFilters = [];
|
80
80
|
/**
|
81
|
-
* @type {Array<{actions:Array<import("../../actions/actionHelper.js").VcsAction>,owner:string|symbol,collectionComponentIds:Array<string>}>}
|
81
|
+
* @type {Array<{ownedActions:Array<OwnedAction>,actions:Array<import("../../actions/actionHelper.js").VcsAction>,owner:string|symbol,collectionComponentIds:Array<string>}>}
|
82
82
|
* @private
|
83
83
|
*/
|
84
|
-
this.
|
84
|
+
this._itemActions = [];
|
85
85
|
}
|
86
86
|
|
87
87
|
/**
|
@@ -163,12 +163,10 @@ class CollectionManager {
|
|
163
163
|
.forEach(({ collectionComponentIds, ...itemFilter }) =>
|
164
164
|
collectionComponent.addItemFilter(itemFilter),
|
165
165
|
);
|
166
|
-
this.
|
166
|
+
this._itemActions
|
167
167
|
.filter(filterIds)
|
168
|
-
.forEach(({
|
169
|
-
collectionComponent.addActions(
|
170
|
-
actions.map(({ action }) => ({ action, actionOwner })),
|
171
|
-
),
|
168
|
+
.forEach(({ ownedActions }) =>
|
169
|
+
collectionComponent.addActions(ownedActions),
|
172
170
|
);
|
173
171
|
|
174
172
|
this.added.raiseEvent(collectionComponent);
|
@@ -342,7 +340,7 @@ class CollectionManager {
|
|
342
340
|
}
|
343
341
|
|
344
342
|
if (
|
345
|
-
!this.
|
343
|
+
!this._itemActions.find(
|
346
344
|
(cached) => cached.actions === actions && cached.owner === owner,
|
347
345
|
)
|
348
346
|
) {
|
@@ -353,8 +351,9 @@ class CollectionManager {
|
|
353
351
|
component.addActions(ownedActions);
|
354
352
|
}
|
355
353
|
});
|
356
|
-
this.
|
354
|
+
this._itemActions.push({
|
357
355
|
actions,
|
356
|
+
ownedActions,
|
358
357
|
owner,
|
359
358
|
collectionComponentIds,
|
360
359
|
});
|
@@ -368,13 +367,16 @@ class CollectionManager {
|
|
368
367
|
removeActions(actions, owner) {
|
369
368
|
check(owner, [String, Symbol]);
|
370
369
|
|
371
|
-
const
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
370
|
+
const idx = this._itemActions.findIndex((a) => a.actions === actions);
|
371
|
+
if (idx > -1) {
|
372
|
+
const { collectionComponentIds, ownedActions } = this._itemActions[idx];
|
373
|
+
collectionComponentIds
|
374
|
+
.map((id) => this.get(id))
|
375
|
+
.forEach((collectionComponent) => {
|
376
|
+
collectionComponent.removeActions(ownedActions);
|
377
|
+
});
|
378
|
+
this._itemActions.splice(idx, 1);
|
379
|
+
}
|
378
380
|
}
|
379
381
|
|
380
382
|
/**
|
@@ -399,8 +401,8 @@ class CollectionManager {
|
|
399
401
|
this._itemFilters = this._itemFilters.filter((itemFilter) => {
|
400
402
|
return itemFilter.owner !== owner;
|
401
403
|
});
|
402
|
-
this.
|
403
|
-
(
|
404
|
+
this._itemActions = this._itemActions.filter(
|
405
|
+
(itemAction) => itemAction.owner !== owner,
|
404
406
|
);
|
405
407
|
}
|
406
408
|
|
@@ -422,7 +424,7 @@ class CollectionManager {
|
|
422
424
|
});
|
423
425
|
this._itemMappings = [];
|
424
426
|
this._itemFilters = [];
|
425
|
-
this.
|
427
|
+
this._itemActions = [];
|
426
428
|
}
|
427
429
|
|
428
430
|
/**
|
@@ -0,0 +1,110 @@
|
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
:id="panelState.id"
|
4
|
+
class="position-absolute panel-component"
|
5
|
+
:class="{
|
6
|
+
'panel-component-left': isLeft,
|
7
|
+
'panel-component-right': isRight,
|
8
|
+
'panel-component-bottom': isBottom,
|
9
|
+
'theme--light': !appIsDark,
|
10
|
+
'theme--dark': appIsDark,
|
11
|
+
resizable: panelState.resizable,
|
12
|
+
}"
|
13
|
+
@mousedown="startResize"
|
14
|
+
@mouseup="stopResize"
|
15
|
+
>
|
16
|
+
<slot />
|
17
|
+
</div>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<style scoped lang="scss">
|
21
|
+
@import '../../styles/shades.scss';
|
22
|
+
|
23
|
+
.panel-component {
|
24
|
+
padding: 0 4px;
|
25
|
+
}
|
26
|
+
.panel-component.theme--dark::after {
|
27
|
+
content: '';
|
28
|
+
position: absolute;
|
29
|
+
background: map-get($shades, 'black');
|
30
|
+
}
|
31
|
+
.panel-component.theme--light::after {
|
32
|
+
content: '';
|
33
|
+
position: absolute;
|
34
|
+
background: map-get($shades, 'white');
|
35
|
+
}
|
36
|
+
|
37
|
+
.panel-component-left::after {
|
38
|
+
width: 4px;
|
39
|
+
top: 0;
|
40
|
+
bottom: 0;
|
41
|
+
right: 0;
|
42
|
+
}
|
43
|
+
.panel-component-left.resizable::after {
|
44
|
+
cursor: ew-resize;
|
45
|
+
}
|
46
|
+
.panel-component-right::after {
|
47
|
+
width: 4px;
|
48
|
+
top: 0;
|
49
|
+
bottom: 0;
|
50
|
+
left: 0;
|
51
|
+
}
|
52
|
+
.panel-component-right.resizable::after {
|
53
|
+
cursor: ew-resize;
|
54
|
+
}
|
55
|
+
.panel-component-bottom::after {
|
56
|
+
left: 0;
|
57
|
+
right: 0;
|
58
|
+
top: 0;
|
59
|
+
height: 4px;
|
60
|
+
}
|
61
|
+
.panel-component-bottom.resizable::after {
|
62
|
+
cursor: n-resize;
|
63
|
+
}
|
64
|
+
</style>
|
65
|
+
|
66
|
+
<script>
|
67
|
+
import { computed, getCurrentInstance } from 'vue';
|
68
|
+
import { PanelLocation } from './panelManager.js';
|
69
|
+
|
70
|
+
export default {
|
71
|
+
name: 'PanelComponent',
|
72
|
+
props: {
|
73
|
+
panelState: {
|
74
|
+
type: Object,
|
75
|
+
required: true,
|
76
|
+
},
|
77
|
+
},
|
78
|
+
setup(props, { emit }) {
|
79
|
+
return {
|
80
|
+
appIsDark: computed(() => {
|
81
|
+
return getCurrentInstance().proxy.$vuetify.theme.dark || !1;
|
82
|
+
}),
|
83
|
+
isLeft: computed(
|
84
|
+
() => props.panelState.location === PanelLocation.LEFT,
|
85
|
+
),
|
86
|
+
isRight: computed(
|
87
|
+
() => props.panelState.location === PanelLocation.RIGHT,
|
88
|
+
),
|
89
|
+
isBottom: computed(
|
90
|
+
() => props.panelState.location === PanelLocation.BOTTOM,
|
91
|
+
),
|
92
|
+
startResize(e) {
|
93
|
+
const { resizable, location } = props.panelState;
|
94
|
+
if (
|
95
|
+
resizable &&
|
96
|
+
((location === PanelLocation.LEFT &&
|
97
|
+
e.currentTarget.clientWidth - e.offsetX < 4) ||
|
98
|
+
(location === PanelLocation.RIGHT && e.offsetX < 4) ||
|
99
|
+
(location === PanelLocation.BOTTOM && e.offsetY < 4))
|
100
|
+
) {
|
101
|
+
emit('resize', props.panelState.id);
|
102
|
+
}
|
103
|
+
},
|
104
|
+
stopResize() {
|
105
|
+
emit('resize', undefined);
|
106
|
+
},
|
107
|
+
};
|
108
|
+
},
|
109
|
+
};
|
110
|
+
</script>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
2
|
+
panelState: {
|
3
|
+
type: ObjectConstructor;
|
4
|
+
required: true;
|
5
|
+
};
|
6
|
+
}, {
|
7
|
+
appIsDark: import("vue").ComputedRef<any>;
|
8
|
+
isLeft: import("vue").ComputedRef<boolean>;
|
9
|
+
isRight: import("vue").ComputedRef<boolean>;
|
10
|
+
isBottom: import("vue").ComputedRef<boolean>;
|
11
|
+
startResize(e: any): void;
|
12
|
+
stopResize(): void;
|
13
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{
|
14
|
+
panelState: {
|
15
|
+
type: ObjectConstructor;
|
16
|
+
required: true;
|
17
|
+
};
|
18
|
+
}>>, {}>;
|
19
|
+
export default _default;
|