@vcmap/ui 6.1.0-rc.1 → 6.1.0-rc.3
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 +6 -0
- package/config/clipping.config.json +384 -0
- package/config/cluster.config.json +106 -0
- package/config/concepts-show-case.config.json +4 -0
- package/config/projects.config.json +5 -2
- package/dist/assets/{cesium-11e5bbc6.js → cesium-87d5e72d.js} +438 -432
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-9d0cfec3.js → core-72f9f393.js} +4907 -4514
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-0d0ebb27.js → ol-e468ba43.js} +23518 -22404
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-73257b15.css +1 -0
- package/dist/assets/{ui-08446666.js → ui-73257b15.js} +13703 -12977
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-67025c41.css → vuetify-2437380c.css} +2 -2
- package/dist/assets/{vuetify-67025c41.js → vuetify-2437380c.js} +8024 -7634
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +40 -19
- package/index.js +36 -6
- package/lib/olLib.js +25 -3
- package/package.json +6 -6
- package/plugins/@vcmap-show-case/callback-tester/README.md +3 -0
- package/plugins/@vcmap-show-case/callback-tester/package.json +5 -0
- package/plugins/@vcmap-show-case/callback-tester/src/CallbackTester.vue +62 -0
- package/plugins/@vcmap-show-case/callback-tester/src/index.js +48 -0
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +1 -0
- package/src/actions/actionHelper.d.ts +1 -0
- package/src/actions/actionHelper.js +70 -19
- package/src/application/VcsApp.vue +83 -50
- package/src/application/VcsApp.vue.d.ts +28 -2
- package/src/application/VcsContainer.vue +5 -3
- package/src/application/VcsContainer.vue.d.ts +14 -0
- package/src/application/VcsNavbar.vue +10 -6
- package/src/application/VcsNavbar.vue.d.ts +2 -0
- package/src/application/VcsObliqueFooter.vue +9 -3
- package/src/application/VcsSplashScreen.vue +37 -0
- package/src/application/VcsSplashScreen.vue.d.ts +6 -0
- package/src/application/positionDisplayInteraction.js +1 -1
- package/src/callback/activateClippingPolygonCallback.d.ts +29 -0
- package/src/callback/activateClippingPolygonCallback.js +54 -0
- package/src/callback/closeSplashScreenCallback.d.ts +8 -0
- package/src/callback/closeSplashScreenCallback.js +33 -0
- package/src/callback/deactivateClippingPolygonCallback.d.ts +29 -0
- package/src/callback/deactivateClippingPolygonCallback.js +54 -0
- package/src/callback/openSplashScreenCallback.d.ts +8 -0
- package/src/callback/openSplashScreenCallback.js +35 -0
- package/src/callback/toggleNavbarButtonCallback.d.ts +36 -0
- package/src/callback/toggleNavbarButtonCallback.js +62 -0
- package/src/components/buttons/VcsActionButtonList.vue +6 -4
- package/src/components/buttons/VcsToolButton.vue +0 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue +7 -1
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +1 -1
- package/src/components/form-inputs-controls/VcsTextArea.vue +13 -8
- package/src/components/form-output/markdownHelper.d.ts +0 -25
- package/src/components/form-output/markdownHelper.js +1 -386
- package/src/components/import/VcsImportComponent.vue +2 -0
- package/src/components/lists/VcsGroupedList.vue +178 -0
- package/src/components/lists/VcsGroupedList.vue.d.ts +17 -0
- package/src/components/lists/VcsList.vue +144 -394
- package/src/components/lists/VcsList.vue.d.ts +38 -159
- package/src/components/lists/VcsTreeNode.vue +18 -11
- package/src/components/lists/VcsTreeview.vue +27 -20
- package/src/components/lists/VcsTreeview.vue.d.ts +18 -1
- package/src/components/lists/listHelper.d.ts +87 -0
- package/src/components/lists/listHelper.js +348 -0
- package/src/components/section/VcsFormSection.vue +7 -2
- package/src/components/section/VcsFormSection.vue.d.ts +9 -0
- package/src/components/tables/VcsDataTable.vue +14 -3
- package/src/components/tables/VcsDataTable.vue.d.ts +9 -0
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +1 -1
- package/src/contentTree/LayerTree.vue +2 -1
- package/src/contentTree/LayerTree.vue.d.ts +2 -0
- package/src/contentTree/contentTreeCollection.d.ts +1 -0
- package/src/contentTree/contentTreeCollection.js +7 -3
- package/src/contentTree/contentTreeItem.js +4 -2
- package/src/contentTree/groupContentTreeItem.js +5 -3
- package/src/featureInfo/ClusterFeatureComponent.vue +58 -0
- package/src/featureInfo/ClusterFeatureComponent.vue.d.ts +6 -0
- package/src/featureInfo/abstractFeatureInfoView.js +1 -2
- package/src/featureInfo/featureInfo.d.ts +87 -1
- package/src/featureInfo/featureInfo.js +342 -34
- package/src/featureInfo/featureInfoInteraction.js +18 -3
- package/src/featureInfo/iframeFeatureInfoView.js +1 -1
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +2 -4
- package/src/featureInfo/markdownFeatureInfoView.js +1 -1
- package/src/i18n/de.d.ts +17 -4
- package/src/i18n/de.js +7 -0
- package/src/i18n/en.d.ts +17 -4
- package/src/i18n/en.js +7 -0
- package/src/legend/VcsLegend.vue +1 -1
- package/src/legend/legendHelper.d.ts +1 -1
- package/src/legend/legendHelper.js +52 -9
- package/src/localStorage.d.ts +21 -0
- package/src/localStorage.js +51 -0
- package/src/manager/collectionManager/CollectionComponent.vue +1 -1
- package/src/manager/collectionManager/CollectionComponentContent.vue +2 -3
- package/src/manager/collectionManager/CollectionComponentList.vue +2 -3
- package/src/manager/collectionManager/CollectionComponentStandalone.vue +1 -1
- package/src/manager/navbarManager.js +9 -4
- package/src/manager/toolbox/ToolboxManagerComponent.vue +14 -12
- package/src/manager/toolbox/ToolboxManagerComponent.vue.d.ts +13 -2
- package/src/manager/toolbox/toolboxManager.d.ts +5 -0
- package/src/manager/toolbox/toolboxManager.js +7 -1
- package/src/manager/window/WindowComponent.vue +10 -0
- package/src/manager/window/WindowComponent.vue.d.ts +1 -0
- package/src/manager/window/WindowManager.vue +14 -4
- package/src/manager/window/WindowManager.vue.d.ts +1 -0
- package/src/manager/window/windowHelper.d.ts +7 -3
- package/src/manager/window/windowHelper.js +30 -10
- package/src/navigation/MapNavigation.vue +5 -5
- package/src/navigation/MapNavigation.vue.d.ts +1 -1
- package/src/navigation/overviewMap.d.ts +7 -0
- package/src/navigation/overviewMap.js +18 -4
- package/src/pluginHelper.d.ts +7 -0
- package/src/pluginHelper.js +18 -4
- package/src/search/ResultItem.vue.d.ts +1 -1
- package/src/search/markText.d.ts +1 -1
- package/src/search/markText.js +4 -4
- package/src/search/search.js +1 -1
- package/src/state.d.ts +4 -2
- package/src/state.js +54 -31
- package/src/uiConfig.d.ts +36 -0
- package/src/uiConfig.js +17 -1
- package/src/vcsUiApp.js +7 -11
- package/dist/assets/ui-08446666.css +0 -1
- /package/dist/assets/{vue-2f81c7f8.js → vue-ff37ea23.js} +0 -0
@@ -1,173 +1,52 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
* @param {import("vue").ShallowRef<import("./VcsListItemComponent.vue").VcsListItem[]>} selected
|
4
|
-
* @param {function(string, ...any[]):void} emit
|
5
|
-
* @returns {Array<import("../../actions/actionHelper.js").VcsAction>}
|
6
|
-
*/
|
7
|
-
export function createSelectionActions(items: import("vue").Ref<import("./VcsListItemComponent.vue").VcsListItem[]>, selected: import("vue").ShallowRef<import("./VcsListItemComponent.vue").VcsListItem[]>, emit: (arg0: string, ...args: any[][]) => void): Array<import("../../actions/actionHelper.js").VcsAction>;
|
8
|
-
declare const _default: import("vue").DefineComponent<{
|
9
|
-
items: {
|
10
|
-
type: ArrayConstructor;
|
11
|
-
required: true;
|
12
|
-
};
|
13
|
-
draggable: {
|
14
|
-
type: BooleanConstructor;
|
15
|
-
default: boolean;
|
16
|
-
};
|
17
|
-
selectable: {
|
18
|
-
type: BooleanConstructor;
|
19
|
-
default: boolean;
|
20
|
-
};
|
21
|
-
singleSelect: {
|
22
|
-
type: BooleanConstructor;
|
23
|
-
default: boolean;
|
24
|
-
};
|
25
|
-
modelValue: {
|
26
|
-
type: ArrayConstructor;
|
27
|
-
default: () => never[];
|
28
|
-
};
|
29
|
-
searchable: {
|
30
|
-
type: BooleanConstructor;
|
31
|
-
default: boolean;
|
32
|
-
};
|
33
|
-
searchbarPlaceholder: {
|
34
|
-
type: StringConstructor;
|
35
|
-
default: undefined;
|
36
|
-
};
|
37
|
-
showTitle: {
|
38
|
-
type: BooleanConstructor;
|
39
|
-
default: boolean;
|
40
|
-
};
|
41
|
-
actionButtonListOverflowCount: {
|
42
|
-
type: NumberConstructor;
|
43
|
-
required: false;
|
44
|
-
default: undefined;
|
45
|
-
};
|
46
|
-
title: {
|
47
|
-
type: StringConstructor;
|
48
|
-
required: false;
|
49
|
-
default: string;
|
50
|
-
};
|
51
|
-
icon: {
|
52
|
-
type: StringConstructor;
|
53
|
-
required: false;
|
54
|
-
default: undefined;
|
55
|
-
};
|
56
|
-
tooltip: {
|
57
|
-
type: StringConstructor;
|
58
|
-
required: false;
|
59
|
-
default: string;
|
60
|
-
};
|
61
|
-
actions: {
|
62
|
-
type: ArrayConstructor;
|
63
|
-
required: false;
|
64
|
-
default: () => never[];
|
65
|
-
};
|
66
|
-
}, {
|
67
|
-
query: import("vue").Ref<string>;
|
68
|
-
hovering: import("vue").Ref<number | undefined>;
|
69
|
-
dragging: import("vue").Ref<number | undefined>;
|
70
|
-
isDraggable: import("vue").ComputedRef<boolean>;
|
71
|
-
borderBottom: (index: any) => boolean;
|
72
|
-
borderTop: (index: any) => boolean;
|
73
|
-
lightenEven: import("vue").ComputedRef<boolean>;
|
74
|
-
/**
|
75
|
-
* @type {import("vue").ComputedRef<Array<import("../../actions/actionHelper.js").VcsAction>>}
|
76
|
-
*/
|
77
|
-
renderingActions: import("vue").ComputedRef<Array<import("../../actions/actionHelper.js").VcsAction>>;
|
78
|
-
/**
|
79
|
-
* @type {import("vue").ComputedRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>}
|
80
|
-
*/
|
81
|
-
renderingItems: import("vue").ComputedRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>;
|
82
|
-
/** @type {import("vue").ShallowRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>} */
|
83
|
-
selected: import("vue").ShallowRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>;
|
84
|
-
/**
|
85
|
-
* @param {import("vue").UnwrapNestedRef<import("./VcsListItemComponent.vue").VcsListItem>} item
|
86
|
-
* @param {PointerEvent} event
|
87
|
-
*/
|
88
|
-
select(item: any, event: PointerEvent): void;
|
89
|
-
drag: (e: MouseEvent, item: import("./VcsListItemComponent.vue").VcsListItem, index: number) => void;
|
90
|
-
drop: (e: MouseEvent, targetIndex: number) => void;
|
91
|
-
dragOver: (e: any, index: any) => void;
|
92
|
-
dragLeave: (e: any) => void;
|
93
|
-
dragEnd: (e: any) => void;
|
94
|
-
listHeader: import("vue").Ref<any>;
|
95
|
-
listHeaderTooltip: import("vue").ComputedRef<string>;
|
96
|
-
hasIntermediateSlot: import("vue").ComputedRef<boolean>;
|
97
|
-
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
98
|
-
items: {
|
99
|
-
type: ArrayConstructor;
|
100
|
-
required: true;
|
101
|
-
};
|
102
|
-
draggable: {
|
103
|
-
type: BooleanConstructor;
|
104
|
-
default: boolean;
|
105
|
-
};
|
106
|
-
selectable: {
|
107
|
-
type: BooleanConstructor;
|
108
|
-
default: boolean;
|
109
|
-
};
|
110
|
-
singleSelect: {
|
111
|
-
type: BooleanConstructor;
|
112
|
-
default: boolean;
|
113
|
-
};
|
114
|
-
modelValue: {
|
115
|
-
type: ArrayConstructor;
|
116
|
-
default: () => never[];
|
117
|
-
};
|
118
|
-
searchable: {
|
119
|
-
type: BooleanConstructor;
|
120
|
-
default: boolean;
|
121
|
-
};
|
122
|
-
searchbarPlaceholder: {
|
123
|
-
type: StringConstructor;
|
124
|
-
default: undefined;
|
125
|
-
};
|
126
|
-
showTitle: {
|
127
|
-
type: BooleanConstructor;
|
128
|
-
default: boolean;
|
129
|
-
};
|
130
|
-
actionButtonListOverflowCount: {
|
131
|
-
type: NumberConstructor;
|
132
|
-
required: false;
|
133
|
-
default: undefined;
|
134
|
-
};
|
135
|
-
title: {
|
136
|
-
type: StringConstructor;
|
137
|
-
required: false;
|
138
|
-
default: string;
|
139
|
-
};
|
140
|
-
icon: {
|
141
|
-
type: StringConstructor;
|
142
|
-
required: false;
|
143
|
-
default: undefined;
|
144
|
-
};
|
145
|
-
tooltip: {
|
146
|
-
type: StringConstructor;
|
147
|
-
required: false;
|
148
|
-
default: string;
|
149
|
-
};
|
150
|
-
actions: {
|
151
|
-
type: ArrayConstructor;
|
152
|
-
required: false;
|
153
|
-
default: () => never[];
|
154
|
-
};
|
155
|
-
}>>, {
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
|
2
|
+
$emit: (event: "update:modelValue" | "itemMoved", ...args: any[]) => void;
|
156
3
|
title: string;
|
157
|
-
icon: string;
|
158
4
|
modelValue: unknown[];
|
159
5
|
draggable: boolean;
|
160
6
|
tooltip: string;
|
7
|
+
items: unknown[];
|
161
8
|
selectable: boolean;
|
162
9
|
actions: unknown[];
|
163
|
-
searchbarPlaceholder: string;
|
164
|
-
actionButtonListOverflowCount: number;
|
165
10
|
singleSelect: boolean;
|
166
11
|
searchable: boolean;
|
167
12
|
showTitle: boolean;
|
168
|
-
|
13
|
+
icon?: string | undefined;
|
14
|
+
customFilter?: Function | undefined;
|
15
|
+
searchbarPlaceholder?: string | undefined;
|
16
|
+
actionButtonListOverflowCount?: number | undefined;
|
17
|
+
selectFunction?: Function | undefined;
|
18
|
+
$props: {
|
19
|
+
readonly title?: string | undefined;
|
20
|
+
readonly modelValue?: unknown[] | undefined;
|
21
|
+
readonly draggable?: boolean | undefined;
|
22
|
+
readonly tooltip?: string | undefined;
|
23
|
+
readonly items?: unknown[] | undefined;
|
24
|
+
readonly selectable?: boolean | undefined;
|
25
|
+
readonly actions?: unknown[] | undefined;
|
26
|
+
readonly singleSelect?: boolean | undefined;
|
27
|
+
readonly searchable?: boolean | undefined;
|
28
|
+
readonly showTitle?: boolean | undefined;
|
29
|
+
readonly icon?: string | undefined;
|
30
|
+
readonly customFilter?: Function | undefined;
|
31
|
+
readonly searchbarPlaceholder?: string | undefined;
|
32
|
+
readonly actionButtonListOverflowCount?: number | undefined;
|
33
|
+
readonly selectFunction?: Function | undefined;
|
34
|
+
};
|
35
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
36
|
+
"item.append"?(_: any): any;
|
37
|
+
"item.title"?(_: any): any;
|
38
|
+
"item.subtitle"?(_: any): any;
|
39
|
+
"item.prepend"?(_: any): any;
|
40
|
+
"item.intermediate"?(_: {
|
41
|
+
item: import("./VcsListItemComponent.vue").VcsListItem;
|
42
|
+
index: number;
|
43
|
+
}): any;
|
44
|
+
}>;
|
169
45
|
export default _default;
|
170
46
|
export type ItemMovedEvent = {
|
171
47
|
item: import("./VcsListItemComponent.vue").VcsListItem;
|
172
48
|
targetIndex: number;
|
173
49
|
};
|
50
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
51
|
+
$slots: S;
|
52
|
+
});
|
@@ -10,7 +10,7 @@
|
|
10
10
|
class="chevron-btn"
|
11
11
|
variant="text"
|
12
12
|
:icon="isOpen ? 'mdi-chevron-down' : 'mdi-chevron-right'"
|
13
|
-
@click="
|
13
|
+
@click="bubbleItemToggled(item.name)"
|
14
14
|
/>
|
15
15
|
<slot name="prepend" v-bind="{ item }">
|
16
16
|
<span class="prepend">
|
@@ -49,11 +49,12 @@
|
|
49
49
|
:key="child.name"
|
50
50
|
:item="child"
|
51
51
|
:search="search"
|
52
|
+
:custom-filter="customFilter"
|
52
53
|
:level="level + 1"
|
53
54
|
:open-on-click="openOnClick"
|
54
55
|
:item-children="itemChildren"
|
55
56
|
:opened="opened"
|
56
|
-
@item-toggled="bubbleItemToggled
|
57
|
+
@item-toggled="bubbleItemToggled"
|
57
58
|
@click="bubbleItemClicked"
|
58
59
|
>
|
59
60
|
<template v-for="slot of forwardSlots" #[slot]="scope">
|
@@ -98,6 +99,7 @@
|
|
98
99
|
* @vue-prop {string} [itemChildren='children'] - The property key of the children.
|
99
100
|
* @vue-prop {boolean} [openOnClick=false] - Whether to open items on title click..
|
100
101
|
* @vue-prop {string} [search] - The search string to filter the tree.
|
102
|
+
* @vue-prop {function(VcsTreeNodeItem, string|undefined):boolean}} [customFilter] - a function to customize filtering when searching.
|
101
103
|
* @vue-data {slot} [#prepend] - A slot prepended to the item, binding the item. Default fallback renders an image.
|
102
104
|
* @vue-data {slot} [#title] - A slot to render the item title, binding the item. Default fallback renders a translatable title using the VcsTreeviewTitle component.
|
103
105
|
* @vue-data {slot} [#append] - A slot appended to the item, binding the item. Default fallback renders the VcsActionButtonList if the item has an array of Actions.
|
@@ -139,6 +141,14 @@
|
|
139
141
|
type: String,
|
140
142
|
default: undefined,
|
141
143
|
},
|
144
|
+
/**
|
145
|
+
* @param {VcsTreeNodeItem} item The item to check the match for.
|
146
|
+
* @param {string} search The search value.
|
147
|
+
*/
|
148
|
+
customFilter: {
|
149
|
+
type: Function,
|
150
|
+
default: undefined,
|
151
|
+
},
|
142
152
|
},
|
143
153
|
emits: ['itemToggled', 'click'],
|
144
154
|
setup(props, { emit, slots }) {
|
@@ -146,19 +156,16 @@
|
|
146
156
|
const iconSize = useIconSize();
|
147
157
|
const forwardSlots = getForwardSlots(slots);
|
148
158
|
|
149
|
-
const isOpen = computed(
|
150
|
-
get: () => props.opened?.includes(props.item.name),
|
151
|
-
set: (value) => {
|
152
|
-
emit('itemToggled', props.item.name, value);
|
153
|
-
},
|
154
|
-
});
|
155
|
-
|
159
|
+
const isOpen = computed(() => props.opened.includes(props.item.name));
|
156
160
|
const children = computed(() => props.item[props.itemChildren] ?? []);
|
157
161
|
|
158
162
|
const matchFilter = computed(() => {
|
159
163
|
if (!props.search) {
|
160
164
|
return true;
|
161
165
|
}
|
166
|
+
if (props.customFilter) {
|
167
|
+
return props.customFilter(props.item, props.search);
|
168
|
+
}
|
162
169
|
const translatedTitle = (item) =>
|
163
170
|
item.title ? vm.$t(item.title) : item.name;
|
164
171
|
|
@@ -179,8 +186,8 @@
|
|
179
186
|
children,
|
180
187
|
|
181
188
|
// Bubble up events for the nested tree-items
|
182
|
-
bubbleItemToggled: (itemName
|
183
|
-
emit('itemToggled', itemName
|
189
|
+
bubbleItemToggled: (itemName) => {
|
190
|
+
emit('itemToggled', itemName);
|
184
191
|
},
|
185
192
|
bubbleItemClicked: (item, event) => {
|
186
193
|
emit('click', item, event);
|
@@ -11,6 +11,7 @@
|
|
11
11
|
:item="item"
|
12
12
|
:search="localSearchValue"
|
13
13
|
v-model:opened="localOpenedItems"
|
14
|
+
:custom-filter="customFilter"
|
14
15
|
:open-on-click="openOnClick"
|
15
16
|
:item-children="itemChildren"
|
16
17
|
@item-toggled="itemToggled"
|
@@ -46,6 +47,7 @@
|
|
46
47
|
* @vue-prop {boolean} [openOnClick=false] - Whether to open items on title click.
|
47
48
|
* @vue-prop {string} [search=''] - The value used to filter the items.
|
48
49
|
* @vue-prop {boolean} [showSearchbar=false] - Whether there is a searchbar for this treeview.
|
50
|
+
* @vue-prop {function(import("./VcsTreeNode.vue").VcsTreeNodeItem, string|undefined):boolean}} [customFilter] - a function to customize filtering when searching.
|
49
51
|
* @vue-prop {string} [searchbarPlaceholder] - Placeholder text for the searchbar, will be translated.
|
50
52
|
*/
|
51
53
|
export default {
|
@@ -87,6 +89,14 @@
|
|
87
89
|
type: String,
|
88
90
|
default: undefined,
|
89
91
|
},
|
92
|
+
/**
|
93
|
+
* @param {import("./VcsTreeNode.vue").VcsTreeNodeItem} item The item to filter.
|
94
|
+
* @param {string} search The query value.
|
95
|
+
*/
|
96
|
+
customFilter: {
|
97
|
+
type: Function,
|
98
|
+
default: undefined,
|
99
|
+
},
|
90
100
|
},
|
91
101
|
emits: ['update:search', 'update:opened'],
|
92
102
|
setup(props, { emit, slots }) {
|
@@ -94,27 +104,24 @@
|
|
94
104
|
const localSearchValue = useProxiedAtomicModel(props, 'search', emit);
|
95
105
|
const localOpenedItems = useProxiedComplexModel(props, 'opened', emit);
|
96
106
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
()
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
}
|
107
|
+
watch(
|
108
|
+
[() => props.items, () => props.openAll],
|
109
|
+
() => {
|
110
|
+
if (props.openAll) {
|
111
|
+
localOpenedItems.value = [...props.items.map((item) => item.name)];
|
112
|
+
}
|
113
|
+
},
|
114
|
+
{
|
115
|
+
immediate: true,
|
116
|
+
},
|
117
|
+
);
|
109
118
|
|
110
|
-
function itemToggled(
|
111
|
-
|
112
|
-
|
119
|
+
function itemToggled(itemName) {
|
120
|
+
const idx = localOpenedItems.value.indexOf(itemName);
|
121
|
+
if (idx >= 0) {
|
122
|
+
localOpenedItems.value.splice(idx, 1);
|
113
123
|
} else {
|
114
|
-
|
115
|
-
if (idx >= 0) {
|
116
|
-
localOpenedItems.value.splice(idx, 1);
|
117
|
-
}
|
124
|
+
localOpenedItems.value.push(itemName);
|
118
125
|
}
|
119
126
|
}
|
120
127
|
|
@@ -129,7 +136,7 @@
|
|
129
136
|
item.clicked(event);
|
130
137
|
}
|
131
138
|
} else if ((props.openOnClick ?? false) !== false) {
|
132
|
-
itemToggled(item.name
|
139
|
+
itemToggled(item.name);
|
133
140
|
}
|
134
141
|
},
|
135
142
|
};
|
@@ -31,11 +31,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
31
31
|
type: StringConstructor;
|
32
32
|
default: undefined;
|
33
33
|
};
|
34
|
+
/**
|
35
|
+
* @param {import("./VcsTreeNode.vue").VcsTreeNodeItem} item The item to filter.
|
36
|
+
* @param {string} search The query value.
|
37
|
+
*/
|
38
|
+
customFilter: {
|
39
|
+
type: FunctionConstructor;
|
40
|
+
default: undefined;
|
41
|
+
};
|
34
42
|
}, {
|
35
43
|
localSearchValue: import("vue").Ref<any>;
|
36
44
|
localOpenedItems: import("vue").Ref<any>;
|
37
45
|
forwardSlots: string[];
|
38
|
-
itemToggled: (
|
46
|
+
itemToggled: (itemName: any) => void;
|
39
47
|
itemClicked(item: any, event: any): void;
|
40
48
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:opened" | "update:search")[], "update:opened" | "update:search", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
41
49
|
items: {
|
@@ -70,6 +78,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
70
78
|
type: StringConstructor;
|
71
79
|
default: undefined;
|
72
80
|
};
|
81
|
+
/**
|
82
|
+
* @param {import("./VcsTreeNode.vue").VcsTreeNodeItem} item The item to filter.
|
83
|
+
* @param {string} search The query value.
|
84
|
+
*/
|
85
|
+
customFilter: {
|
86
|
+
type: FunctionConstructor;
|
87
|
+
default: undefined;
|
88
|
+
};
|
73
89
|
}>> & {
|
74
90
|
"onUpdate:opened"?: ((...args: any[]) => any) | undefined;
|
75
91
|
"onUpdate:search"?: ((...args: any[]) => any) | undefined;
|
@@ -79,6 +95,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
95
|
items: unknown[];
|
80
96
|
opened: unknown[];
|
81
97
|
itemChildren: string;
|
98
|
+
customFilter: Function;
|
82
99
|
openAll: boolean;
|
83
100
|
showSearchbar: boolean;
|
84
101
|
searchbarPlaceholder: string;
|
@@ -0,0 +1,87 @@
|
|
1
|
+
/**
|
2
|
+
* @param {import("vue").Ref<import("./VcsListItemComponent.vue").VcsListItem[]>} items
|
3
|
+
* @param {import("vue").ShallowRef<import("./VcsListItemComponent.vue").VcsListItem[]>} selected
|
4
|
+
* @param {(event: 'update:modelValue', value: import("./VcsListItemComponent.vue").VcsListItem[]) => void} emit
|
5
|
+
* @returns {Array<import("../../actions/actionHelper.js").VcsAction>}
|
6
|
+
*/
|
7
|
+
export function createSelectionActions(items: import("vue").Ref<import("./VcsListItemComponent.vue").VcsListItem[]>, selected: import("vue").ShallowRef<import("./VcsListItemComponent.vue").VcsListItem[]>, emit: (event: 'update:modelValue', value: import("./VcsListItemComponent.vue").VcsListItem[]) => void): Array<import("../../actions/actionHelper.js").VcsAction>;
|
8
|
+
/**
|
9
|
+
* @typedef {Object & {
|
10
|
+
* selectable?: boolean,
|
11
|
+
* singleSelect?: boolean,
|
12
|
+
* selectFunction?: (item: import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>, event: PointerEvent) => void,
|
13
|
+
* modelValue?: Array<import("./VcsListItemComponent.vue").VcsListItem> }
|
14
|
+
* } SelectableListProps
|
15
|
+
* @property {boolean?} selectable
|
16
|
+
* @property {boolean?} singleSelect
|
17
|
+
* @property {(item: import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>, event: PointerEvent) => void} selectFunction
|
18
|
+
* @property {Array<import("./VcsListItemComponent.vue").VcsListItem>?} modelValue
|
19
|
+
*/
|
20
|
+
/**
|
21
|
+
* @typedef {{
|
22
|
+
* selected: import("vue").ShallowRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>,
|
23
|
+
* select: (item: import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>, event: PointerEvent) => void,
|
24
|
+
* selectionActions:Array<import("../../actions/actionHelper.js").VcsAction>
|
25
|
+
* }} SelectableListSetup
|
26
|
+
*/
|
27
|
+
/**
|
28
|
+
* Function setting up selection logic for lists. Use only in setup function of components!
|
29
|
+
* This requires VcsListItems with unique keys (name property).
|
30
|
+
* @param {Object & SelectableListProps} props
|
31
|
+
* @param {import("vue").ComputedRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>} renderingItems
|
32
|
+
* @param {(event: 'update:modelValue', value: import("./VcsListItemComponent.vue").VcsListItem[]) => void} emit
|
33
|
+
* @returns {SelectableListSetup}
|
34
|
+
*/
|
35
|
+
export function setupSelectableList(props: Object & SelectableListProps, renderingItems: import("vue").ComputedRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>, emit: (event: 'update:modelValue', value: import("./VcsListItemComponent.vue").VcsListItem[]) => void): SelectableListSetup;
|
36
|
+
/**
|
37
|
+
* @typedef {{
|
38
|
+
* hovering: import("vue").Ref<number|undefined>,
|
39
|
+
* dragging: import("vue").Ref<number|undefined>,
|
40
|
+
* isDraggable: import("vue").ComputedRef<boolean>,
|
41
|
+
* borderBottom: (index: number) => boolean,
|
42
|
+
* borderTop: (index: number) => boolean,
|
43
|
+
* dragStart: (
|
44
|
+
* e: MouseEvent,
|
45
|
+
* item: import('./VcsListItemComponent.vue').VcsListItem,
|
46
|
+
* index: number,
|
47
|
+
* ) => void;
|
48
|
+
* dragOver: (e: MouseEvent, index: number) => void;
|
49
|
+
* dragLeave: (e: MouseEvent) => void;
|
50
|
+
* dragEnd: (e: MouseEvent) => void;
|
51
|
+
* drop: (e: MouseEvent, targetIndex: number) => void;
|
52
|
+
* }} DraggableListSetup
|
53
|
+
*/
|
54
|
+
/**
|
55
|
+
* Function setting up drag logic for lists. Use only in setup function of components!
|
56
|
+
* This requires VcsListItems with unique keys (name property).
|
57
|
+
* @param {Object & { draggable: boolean }} props
|
58
|
+
* @param {import("vue").Ref<string>} query
|
59
|
+
* @param {(event: 'itemMoved', value: import("./VcsList.vue").ItemMovedEvent) => void} emit
|
60
|
+
* @returns {DraggableListSetup}
|
61
|
+
*/
|
62
|
+
export function setupDraggableList(props: Object & {
|
63
|
+
draggable: boolean;
|
64
|
+
}, query: import("vue").Ref<string>, emit: (event: 'itemMoved', value: import("./VcsList.vue").ItemMovedEvent) => void): DraggableListSetup;
|
65
|
+
export type SelectableListProps = Object & {
|
66
|
+
selectable?: boolean;
|
67
|
+
singleSelect?: boolean;
|
68
|
+
selectFunction?: (item: import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>, event: PointerEvent) => void;
|
69
|
+
modelValue?: Array<import("./VcsListItemComponent.vue").VcsListItem>;
|
70
|
+
};
|
71
|
+
export type SelectableListSetup = {
|
72
|
+
selected: import("vue").ShallowRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>;
|
73
|
+
select: (item: import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>, event: PointerEvent) => void;
|
74
|
+
selectionActions: Array<import("../../actions/actionHelper.js").VcsAction>;
|
75
|
+
};
|
76
|
+
export type DraggableListSetup = {
|
77
|
+
hovering: import("vue").Ref<number | undefined>;
|
78
|
+
dragging: import("vue").Ref<number | undefined>;
|
79
|
+
isDraggable: import("vue").ComputedRef<boolean>;
|
80
|
+
borderBottom: (index: number) => boolean;
|
81
|
+
borderTop: (index: number) => boolean;
|
82
|
+
dragStart: (e: MouseEvent, item: import('./VcsListItemComponent.vue').VcsListItem, index: number) => void;
|
83
|
+
dragOver: (e: MouseEvent, index: number) => void;
|
84
|
+
dragLeave: (e: MouseEvent) => void;
|
85
|
+
dragEnd: (e: MouseEvent) => void;
|
86
|
+
drop: (e: MouseEvent, targetIndex: number) => void;
|
87
|
+
};
|