@vcmap/ui 6.0.0-rc.3 → 6.0.0-rc.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/build/buildHelpers.js +60 -11
- package/build/bundle.js +1 -1
- package/build/info/publish.js +25 -31
- package/build/lintTypes.js +5 -0
- package/config/base.config.json +2 -1
- package/config/dev.config.json +7 -1
- package/config/www.config.json +25 -22
- package/dist/assets/@mdi/font/css/{materialdesignicons.min-7a4f6be0.css → materialdesignicons.min-680621ca.css} +1 -1
- package/dist/assets/{cesium-cb4dbfba.js → cesium-126f111a.js} +272 -385
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-72f21835.js → core-1c8b8674.js} +1417 -1453
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol-2d33bc8b.js → ol-27f9b3f3.js} +233 -329
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-7214428e.css +1 -0
- package/dist/assets/{ui-2ab43a16.js → ui-7214428e.js} +9573 -9438
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue-c78a5f76.js +6083 -0
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-760ced3b.css → vuetify-88a2fabe.css} +2 -2
- package/dist/assets/{vuetify-760ced3b.js → vuetify-88a2fabe.js} +7672 -7877
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +6 -8
- package/index.js +7 -5
- package/package.json +16 -16
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +2 -3
- package/plugins/@vcmap-show-case/project-selector/src/ModulesListComponent.vue +18 -11
- package/plugins/@vcmap-show-case/search-example/src/index.js +1 -0
- package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +35 -5
- package/plugins/@vcmap-show-case/toolbox-example/src/index.js +2 -1
- package/plugins/package.json +3 -23
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +1 -1
- package/src/actions/StyleSelector.vue +1 -1
- package/src/actions/actionHelper.js +13 -2
- package/src/actions/listActions.d.ts +4 -4
- package/src/actions/listActions.js +2 -2
- package/src/application/VcsApp.vue +96 -31
- package/src/application/VcsApp.vue.d.ts +297 -4
- package/src/application/VcsContainer.vue +26 -9
- package/src/application/VcsContainer.vue.d.ts +237 -0
- package/src/application/VcsMainMap.vue +7 -7
- package/src/application/VcsMainMap.vue.d.ts +2 -2
- package/src/application/VcsNavbar.vue +5 -1
- package/src/application/VcsSplashScreen.vue +24 -26
- package/src/application/VcsTextPageFooter.vue +2 -1
- package/src/components/buttons/VcsActionButtonList.vue +59 -3
- package/src/components/buttons/VcsActionButtonList.vue.d.ts +28 -0
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +15 -13
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue.d.ts +3 -4
- package/src/components/form-inputs-controls/VcsCoordinate.vue +4 -3
- package/src/components/form-inputs-controls/VcsSelect.vue +1 -4
- package/src/components/form-inputs-controls/VcsSlider.vue +0 -1
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +2 -4
- package/src/components/form-inputs-controls/VcsTextArea.vue +1 -4
- package/src/components/form-inputs-controls/VcsTextField.vue +14 -0
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +9 -0
- package/src/components/form-inputs-controls/VcsWizardStep.vue +2 -5
- package/src/components/form-inputs-controls/vcsTextField.scss +1 -4
- package/src/components/form-output/VcsFormattedNumber.vue +6 -4
- package/src/components/form-output/VcsMarkdown.vue +15 -12
- package/src/components/form-output/VcsMarkdown.vue.d.ts +1 -0
- package/src/components/form-output/markdownHelper.d.ts +30 -0
- package/src/components/form-output/markdownHelper.js +398 -0
- package/src/components/import/VcsFileDrop.vue +8 -5
- package/src/components/import/VcsImportComponent.vue +4 -3
- package/src/components/import/VcsImportComponent.vue.d.ts +1 -2
- package/src/components/lists/VcsActionList.vue +4 -0
- package/src/components/lists/VcsList.vue +22 -37
- package/src/components/lists/VcsList.vue.d.ts +14 -55
- package/src/components/lists/{VcsListItem.vue → VcsListItemComponent.vue} +17 -1
- package/src/components/lists/VcsListItemComponent.vue.d.ts +69 -0
- package/src/components/lists/VcsTreeview.vue +43 -16
- package/src/components/lists/VcsTreeview.vue.d.ts +14 -3
- package/src/components/lists/VcsTreeviewLeaf.vue +15 -6
- package/src/components/lists/VcsTreeviewSearchbar.vue +2 -2
- package/src/components/notification/VcsHelp.vue +1 -1
- package/src/components/notification/VcsHelp.vue.d.ts +3 -2
- package/src/components/section/VcsExpansionPanel.vue +2 -2
- package/src/components/section/VcsFormSection.vue +10 -4
- package/src/components/section/VcsFormSection.vue.d.ts +1 -2
- package/src/components/style/VcsTextMenu.vue +1 -1
- package/src/components/style/VcsVectorStyleComponent.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +28 -22
- package/src/components/tables/VcsTable.vue +45 -62
- package/src/components/tables/VcsTable.vue.d.ts +30 -17
- package/src/components/tables/VcsTableCell.vue +72 -0
- package/src/components/tables/VcsTableCell.vue.d.ts +13 -0
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +6 -5
- package/src/components/vector-properties/VcsFeatureTransforms.vue +5 -0
- package/src/components/viewpoint/VcsViewpointComponent.vue +2 -2
- package/src/components/viewpoint/VcsViewpointEditor.vue +2 -2
- package/src/contentTree/LayerTree.vue +9 -27
- package/src/contentTree/LayerTree.vue.d.ts +1 -1
- package/src/contentTree/contentTreeCollection.d.ts +1 -0
- package/src/contentTree/contentTreeCollection.js +45 -11
- package/src/featureInfo/BalloonComponent.vue +14 -15
- package/src/featureInfo/MarkdownBalloonComponent.vue +4 -2
- package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +2 -2
- package/src/featureInfo/abstractFeatureInfoView.d.ts +6 -0
- package/src/featureInfo/abstractFeatureInfoView.js +15 -7
- package/src/featureInfo/featureInfo.d.ts +5 -5
- package/src/featureInfo/featureInfo.js +51 -31
- package/src/featureInfo/iframeFeatureInfoView.d.ts +8 -2
- package/src/featureInfo/iframeFeatureInfoView.js +15 -5
- package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownBalloonFeatureInfoView.js +5 -5
- package/src/featureInfo/markdownFeatureInfoView.d.ts +1 -1
- package/src/featureInfo/markdownFeatureInfoView.js +9 -11
- package/src/featureInfo/tableFeatureInfoView.js +13 -4
- package/src/manager/collectionManager/CollectionComponentList.vue +1 -1
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +2 -2
- package/src/manager/collectionManager/collectionComponentClass.d.ts +1 -1
- package/src/manager/collectionManager/collectionComponentClass.js +2 -2
- package/src/manager/collectionManager/editorCollectionComponentClass.js +2 -1
- package/src/manager/panel/PanelComponent.vue +2 -9
- package/src/manager/panel/PanelManagerComponent.vue +7 -3
- package/src/manager/panel/panelHelper.js +3 -3
- package/src/manager/panel/panelManager.d.ts +9 -1
- package/src/manager/panel/panelManager.js +15 -3
- package/src/manager/toolbox/GroupToolboxComponent.vue +8 -4
- package/src/manager/toolbox/GroupToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/SelectToolboxComponent.vue +7 -4
- package/src/manager/toolbox/SelectToolboxComponent.vue.d.ts +1 -0
- package/src/manager/toolbox/ToolboxManager.vue +9 -6
- package/src/manager/toolbox/ToolboxManager.vue.d.ts +1 -0
- package/src/manager/window/WindowComponent.vue +12 -8
- package/src/manager/window/WindowComponentHeader.vue +29 -8
- package/src/manager/window/WindowComponentHeader.vue.d.ts +2 -0
- package/src/manager/window/WindowManager.vue +2 -2
- package/src/navigation/MapNavigation.vue +20 -0
- package/src/navigation/locatorHelper.js +1 -1
- package/src/navigation/overviewMap.js +1 -1
- package/src/notifier/NotifierComponent.vue +18 -15
- package/src/search/ResultItem.vue +18 -6
- package/src/search/ResultsComponent.vue +31 -20
- package/src/search/ResultsComponent.vue.d.ts +2 -1
- package/src/search/SearchComponent.vue +8 -14
- package/src/search/SearchComponent.vue.d.ts +1 -0
- package/src/siteConfig.js +8 -8
- package/src/styles/_typography.scss +0 -2
- package/src/styles/main.scss +0 -4
- package/src/uiConfig.d.ts +300 -5
- package/src/uiConfig.js +28 -16
- package/src/vcsUiApp.d.ts +7 -7
- package/src/vcsUiApp.js +10 -9
- package/src/vuePlugins/vuetify.js +3 -0
- package/dist/assets/ui-2ab43a16.css +0 -1
- package/dist/assets/vue-03b265aa.js +0 -6096
- package/src/application/markdownHelper.d.ts +0 -12
- package/src/application/markdownHelper.js +0 -70
- package/src/components/lists/VcsListItem.vue.d.ts +0 -27
- package/src/components/notification/VcsTooltip.vue +0 -156
- package/src/components/notification/VcsTooltip.vue.d.ts +0 -27
- package/src/featureInfo/MarkdownComponent.vue +0 -16
- package/src/featureInfo/MarkdownComponent.vue.d.ts +0 -7
- package/src/styles/_theming.scss +0 -73
- package/src/styles/settings.scss +0 -6
- package/src/styles/shades.scss +0 -4
- package/src/styles/variables.scss +0 -140
- package/src/styles/vcsFont.scss +0 -2
- package/src/styles/vcsGrid.scss +0 -3
@@ -32,7 +32,7 @@
|
|
32
32
|
</template>
|
33
33
|
</v-list-item>
|
34
34
|
<template v-for="(item, index) in renderingItems">
|
35
|
-
<
|
35
|
+
<VcsListItemComponent
|
36
36
|
v-if="item"
|
37
37
|
:dragging="dragging === index"
|
38
38
|
:item="item"
|
@@ -66,7 +66,7 @@
|
|
66
66
|
<template #default="scope">
|
67
67
|
<slot name="item.default" v-bind="{ ...scope, index }" />
|
68
68
|
</template>
|
69
|
-
</
|
69
|
+
</VcsListItemComponent>
|
70
70
|
<slot name="item.intermediate" :item="item" :index="index" />
|
71
71
|
<div
|
72
72
|
v-if="hasIntermediateSlot"
|
@@ -94,14 +94,14 @@
|
|
94
94
|
VListItemTitle,
|
95
95
|
VTooltip,
|
96
96
|
} from 'vuetify/components';
|
97
|
+
import VcsListItemComponent from './VcsListItemComponent.vue';
|
97
98
|
import VcsActionButtonList from '../buttons/VcsActionButtonList.vue';
|
98
99
|
import VcsTreeviewSearchbar from './VcsTreeviewSearchbar.vue';
|
99
|
-
import VcsListItem from './VcsListItem.vue';
|
100
100
|
import { createEllipseTooltip } from '../composables.js';
|
101
101
|
|
102
102
|
/**
|
103
|
-
* @param {import("vue").Ref<VcsListItem[]>} items
|
104
|
-
* @param {import("vue").ShallowRef<VcsListItem[]>} selected
|
103
|
+
* @param {import("vue").Ref<import("./VcsListItemComponent.vue").VcsListItem[]>} items
|
104
|
+
* @param {import("vue").ShallowRef<import("./VcsListItemComponent.vue").VcsListItem[]>} selected
|
105
105
|
* @param {function(string, ...any[]):void} emit
|
106
106
|
* @returns {Array<import("../../actions/actionHelper.js").VcsAction>}
|
107
107
|
*/
|
@@ -138,25 +138,9 @@
|
|
138
138
|
];
|
139
139
|
}
|
140
140
|
|
141
|
-
/**
|
142
|
-
* @typedef {Object} VcsListItem
|
143
|
-
* @property {string} name
|
144
|
-
* @property {boolean} [visible] - Whether to display this item or not.
|
145
|
-
* @property {boolean} [disabled] - Whether this item should be displayed as disabled.
|
146
|
-
* @property {boolean|import("../../actions/actionHelper.js").ActionOptions} [renamable] - Whether the title of can be edited. will add a rename action to the end of the action list. This action will call titleChanged with the new title, you must provide the callback yourself, otherwise this does not work as expeted.
|
147
|
-
* @property {string} title - The title to be displayed
|
148
|
-
* @property {string} [tooltip]
|
149
|
-
* @property {string|HTMLCanvasElement|HTMLImageElement|undefined} [icon] - An optional icon to display with this item. Can be a URL or HTMLElement.
|
150
|
-
* @property {boolean} [hasUpdate] - Shows badge, if item has an update.
|
151
|
-
* @property {Array<import("../../actions/actionHelper.js").VcsAction>} [actions]
|
152
|
-
* @property {Array<function(PointerEvent):void>|undefined} [clickedCallbacks] - An array of callbacks called on item click. called before selection update
|
153
|
-
* @property {function(boolean):void} [selectionChanged] - A callback called if the selection changes with the current selection status. called before value update
|
154
|
-
* @property {function(string):void} [titleChanged] - A callback called if the title changes via rename action. only usable with renamble true.
|
155
|
-
*/
|
156
|
-
|
157
141
|
/**
|
158
142
|
* @typedef {Object} ItemMovedEvent
|
159
|
-
* @property {VcsListItem} item
|
143
|
+
* @property {import("./VcsListItemComponent.vue").VcsListItem} item
|
160
144
|
* @property {number} targetIndex
|
161
145
|
*/
|
162
146
|
|
@@ -172,12 +156,12 @@
|
|
172
156
|
* Clicking with CTRL adds or removes to a selection set.
|
173
157
|
* Clicking with SHIFT will create a selection range, starting or ending with the first item in the list
|
174
158
|
* or the last normally selected item (not the last item clicked with CTRL for instance).
|
175
|
-
* @vue-prop {Array<VcsListItem>} items
|
159
|
+
* @vue-prop {Array<import("./VcsListItemComponent.vue").VcsListItem>} items
|
176
160
|
* @vue-prop {boolean} [draggable=false]
|
177
161
|
* @vue-prop {boolean} [selectable=false]
|
178
162
|
* @vue-prop {boolean} [singleSelect=false]
|
179
|
-
* @vue-prop {Array<VcsListItem>} [value=[]] - the initial items to be selected.
|
180
|
-
* @vue-prop {boolean} [searchable=false] - if this list can have its items searched. you can provide your own predicate function by providing "filterPredicate" which is of type function(VcsListItem, string):boolean
|
163
|
+
* @vue-prop {Array<import("./VcsListItemComponent.vue").VcsListItem>} [value=[]] - the initial items to be selected.
|
164
|
+
* @vue-prop {boolean} [searchable=false] - if this list can have its items searched. you can provide your own predicate function by providing "filterPredicate" which is of type function(import("./VcsListItemComponent.vue").VcsListItem, string):boolean
|
181
165
|
* @vue-prop {string} [searchbarPlaceholder] - placeholder to render inside the search field
|
182
166
|
* @vue-prop {boolean} [showTitle=true] - show the title component
|
183
167
|
* @vue-prop {number} [actionButtonListOverflowCount] - overflow count to use for action lists in the title and items
|
@@ -194,7 +178,7 @@
|
|
194
178
|
export default {
|
195
179
|
name: 'VcsList',
|
196
180
|
components: {
|
197
|
-
|
181
|
+
VcsListItemComponent,
|
198
182
|
VcsTreeviewSearchbar,
|
199
183
|
VcsActionButtonList,
|
200
184
|
VTooltip,
|
@@ -263,7 +247,7 @@
|
|
263
247
|
},
|
264
248
|
},
|
265
249
|
setup(props, { emit, slots }) {
|
266
|
-
/** @type {import("vue").ShallowRef<Array<VcsListItem>>} */
|
250
|
+
/** @type {import("vue").ShallowRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>} */
|
267
251
|
const selected = shallowRef([]);
|
268
252
|
/** @type {import("vue").Ref<string>} */
|
269
253
|
const query = ref('');
|
@@ -319,7 +303,7 @@
|
|
319
303
|
);
|
320
304
|
|
321
305
|
const vm = getCurrentInstance().proxy;
|
322
|
-
/** @type {function(VcsListItem, string):boolean} */
|
306
|
+
/** @type {function(import("./VcsListItemComponent.vue").VcsListItem, string):boolean} */
|
323
307
|
const filterPredicate = inject(
|
324
308
|
'filterPredicate',
|
325
309
|
(item, queryString = '') => {
|
@@ -331,7 +315,7 @@
|
|
331
315
|
);
|
332
316
|
|
333
317
|
/**
|
334
|
-
* @type {VcsListItem|null}
|
318
|
+
* @type {import("./VcsListItemComponent.vue").VcsListItem|null}
|
335
319
|
*/
|
336
320
|
let draggedItem = null;
|
337
321
|
|
@@ -356,7 +340,7 @@
|
|
356
340
|
|
357
341
|
/**
|
358
342
|
* @param {MouseEvent} e
|
359
|
-
* @param {VcsListItem} item
|
343
|
+
* @param {import("./VcsListItemComponent.vue").VcsListItem} item
|
360
344
|
* @param {number} index
|
361
345
|
*/
|
362
346
|
function drag(e, item, index) {
|
@@ -369,7 +353,7 @@
|
|
369
353
|
}
|
370
354
|
|
371
355
|
/**
|
372
|
-
* @type {import("vue").ComputedRef<Array<VcsListItem>>}
|
356
|
+
* @type {import("vue").ComputedRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>}
|
373
357
|
*/
|
374
358
|
const renderingItems = computed(() => {
|
375
359
|
let items = props.items.filter((i) => i.visible !== false);
|
@@ -408,13 +392,13 @@
|
|
408
392
|
*/
|
409
393
|
renderingActions,
|
410
394
|
/**
|
411
|
-
* @type {import("vue").ComputedRef<Array<VcsListItem>>}
|
395
|
+
* @type {import("vue").ComputedRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>}
|
412
396
|
*/
|
413
397
|
renderingItems,
|
414
|
-
/** @type {import("vue").ShallowRef<Array<VcsListItem>>} */
|
398
|
+
/** @type {import("vue").ShallowRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>} */
|
415
399
|
selected,
|
416
400
|
/**
|
417
|
-
* @param {import("vue").UnwrapNestedRef<VcsListItem>} item
|
401
|
+
* @param {import("vue").UnwrapNestedRef<import("./VcsListItemComponent.vue").VcsListItem>} item
|
418
402
|
* @param {PointerEvent} event
|
419
403
|
*/
|
420
404
|
select(item, event) {
|
@@ -508,7 +492,7 @@
|
|
508
492
|
emit('update:modelValue', selected.value);
|
509
493
|
},
|
510
494
|
/**
|
511
|
-
* @param {import("vue").UnwrapNestedRefs<VcsListItem>} item
|
495
|
+
* @param {import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>} item
|
512
496
|
*/
|
513
497
|
add(item) {
|
514
498
|
if (!isReactive(item)) {
|
@@ -521,7 +505,7 @@
|
|
521
505
|
}
|
522
506
|
},
|
523
507
|
/**
|
524
|
-
* @param {import("vue").UnwrapNestedRefs<VcsListItem>} item
|
508
|
+
* @param {import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>} item
|
525
509
|
*/
|
526
510
|
remove(item) {
|
527
511
|
if (selected.value.includes(item) && !item.disabled) {
|
@@ -597,10 +581,11 @@
|
|
597
581
|
}
|
598
582
|
|
599
583
|
&:not(.vcs-list__selectable) {
|
584
|
+
cursor: auto;
|
585
|
+
|
600
586
|
.v-list-item--link {
|
601
587
|
cursor: auto;
|
602
588
|
}
|
603
|
-
cursor: auto;
|
604
589
|
|
605
590
|
&:hover {
|
606
591
|
.v-list-item__overlay {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/**
|
2
|
-
* @param {import("vue").Ref<VcsListItem[]>} items
|
3
|
-
* @param {import("vue").ShallowRef<VcsListItem[]>} selected
|
2
|
+
* @param {import("vue").Ref<import("./VcsListItemComponent.vue").VcsListItem[]>} items
|
3
|
+
* @param {import("vue").ShallowRef<import("./VcsListItemComponent.vue").VcsListItem[]>} selected
|
4
4
|
* @param {function(string, ...any[]):void} emit
|
5
5
|
* @returns {Array<import("../../actions/actionHelper.js").VcsAction>}
|
6
6
|
*/
|
7
|
-
export function createSelectionActions(items: import("vue").Ref<VcsListItem[]>, selected: import("vue").ShallowRef<VcsListItem[]>, emit: (arg0: string, ...args: any[][]) => void): Array<import("../../actions/actionHelper.js").VcsAction>;
|
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
8
|
declare const _default: import("vue").DefineComponent<{
|
9
9
|
items: {
|
10
10
|
type: ArrayConstructor;
|
@@ -76,26 +76,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
76
76
|
*/
|
77
77
|
renderingActions: import("vue").ComputedRef<Array<import("../../actions/actionHelper.js").VcsAction>>;
|
78
78
|
/**
|
79
|
-
* @type {import("vue").ComputedRef<Array<VcsListItem>>}
|
79
|
+
* @type {import("vue").ComputedRef<Array<import("./VcsListItemComponent.vue").VcsListItem>>}
|
80
80
|
*/
|
81
|
-
renderingItems: import("vue").ComputedRef<Array<VcsListItem>>;
|
82
|
-
/** @type {import("vue").ShallowRef<Array<VcsListItem>>} */
|
83
|
-
selected: import("vue").ShallowRef<Array<VcsListItem>>;
|
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
84
|
/**
|
85
|
-
* @param {import("vue").UnwrapNestedRef<VcsListItem>} item
|
85
|
+
* @param {import("vue").UnwrapNestedRef<import("./VcsListItemComponent.vue").VcsListItem>} item
|
86
86
|
* @param {PointerEvent} event
|
87
87
|
*/
|
88
88
|
select(item: any, event: PointerEvent): void;
|
89
89
|
/**
|
90
|
-
* @param {import("vue").UnwrapNestedRefs<VcsListItem>} item
|
90
|
+
* @param {import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>} item
|
91
91
|
*/
|
92
|
-
add(item: import("vue").UnwrapNestedRefs<VcsListItem>): void;
|
92
|
+
add(item: import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>): void;
|
93
93
|
/**
|
94
|
-
* @param {import("vue").UnwrapNestedRefs<VcsListItem>} item
|
94
|
+
* @param {import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>} item
|
95
95
|
*/
|
96
|
-
remove(item: import("vue").UnwrapNestedRefs<VcsListItem>): void;
|
96
|
+
remove(item: import("vue").UnwrapNestedRefs<import("./VcsListItemComponent.vue").VcsListItem>): void;
|
97
97
|
clear(): void;
|
98
|
-
drag: (e: MouseEvent, item: VcsListItem, index: number) => void;
|
98
|
+
drag: (e: MouseEvent, item: import("./VcsListItemComponent.vue").VcsListItem, index: number) => void;
|
99
99
|
drop: (e: MouseEvent, targetIndex: number) => void;
|
100
100
|
listHeader: import("vue").Ref<any>;
|
101
101
|
listHeaderTooltip: import("vue").ComputedRef<string>;
|
@@ -173,48 +173,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
173
173
|
showTitle: boolean;
|
174
174
|
}, {}>;
|
175
175
|
export default _default;
|
176
|
-
export type VcsListItem = {
|
177
|
-
name: string;
|
178
|
-
/**
|
179
|
-
* - Whether to display this item or not.
|
180
|
-
*/
|
181
|
-
visible?: boolean | undefined;
|
182
|
-
/**
|
183
|
-
* - Whether this item should be displayed as disabled.
|
184
|
-
*/
|
185
|
-
disabled?: boolean | undefined;
|
186
|
-
/**
|
187
|
-
* - Whether the title of can be edited. will add a rename action to the end of the action list. This action will call titleChanged with the new title, you must provide the callback yourself, otherwise this does not work as expeted.
|
188
|
-
*/
|
189
|
-
renamable?: boolean | import("../../actions/actionHelper.js", { with: { "resolution-mode": "import" } }).ActionOptions | undefined;
|
190
|
-
/**
|
191
|
-
* - The title to be displayed
|
192
|
-
*/
|
193
|
-
title: string;
|
194
|
-
tooltip?: string | undefined;
|
195
|
-
/**
|
196
|
-
* - An optional icon to display with this item. Can be a URL or HTMLElement.
|
197
|
-
*/
|
198
|
-
icon?: string | HTMLCanvasElement | HTMLImageElement | undefined;
|
199
|
-
/**
|
200
|
-
* - Shows badge, if item has an update.
|
201
|
-
*/
|
202
|
-
hasUpdate?: boolean | undefined;
|
203
|
-
actions?: import("../../actions/actionHelper.js", { with: { "resolution-mode": "import" } }).VcsAction[] | undefined;
|
204
|
-
/**
|
205
|
-
* - An array of callbacks called on item click. called before selection update
|
206
|
-
*/
|
207
|
-
clickedCallbacks?: Array<(arg0: PointerEvent) => void> | undefined;
|
208
|
-
/**
|
209
|
-
* - A callback called if the selection changes with the current selection status. called before value update
|
210
|
-
*/
|
211
|
-
selectionChanged?: ((arg0: boolean) => void) | undefined;
|
212
|
-
/**
|
213
|
-
* - A callback called if the title changes via rename action. only usable with renamble true.
|
214
|
-
*/
|
215
|
-
titleChanged?: ((arg0: string) => void) | undefined;
|
216
|
-
};
|
217
176
|
export type ItemMovedEvent = {
|
218
|
-
item: VcsListItem;
|
177
|
+
item: import("./VcsListItemComponent.vue").VcsListItem;
|
219
178
|
targetIndex: number;
|
220
179
|
};
|
@@ -12,8 +12,24 @@
|
|
12
12
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
13
13
|
import { createEllipseTooltip } from '../composables.js';
|
14
14
|
|
15
|
+
/**
|
16
|
+
* @typedef {Object} VcsListItem
|
17
|
+
* @property {string} name
|
18
|
+
* @property {boolean} [visible] - Whether to display this item or not.
|
19
|
+
* @property {boolean} [disabled] - Whether this item should be displayed as disabled.
|
20
|
+
* @property {boolean|import("../../actions/actionHelper.js").ActionOptions} [renamable] - Whether the title of can be edited. will add a rename action to the end of the action list. This action will call titleChanged with the new title, you must provide the callback yourself, otherwise this does not work as expeted.
|
21
|
+
* @property {string} title - The title to be displayed
|
22
|
+
* @property {string} [tooltip]
|
23
|
+
* @property {string|HTMLCanvasElement|HTMLImageElement|undefined} [icon] - An optional icon to display with this item. Can be a URL or HTMLElement.
|
24
|
+
* @property {boolean} [hasUpdate] - Shows badge, if item has an update.
|
25
|
+
* @property {Array<import("../../actions/actionHelper.js").VcsAction>} [actions]
|
26
|
+
* @property {Array<function(PointerEvent):void>|undefined} [clickedCallbacks] - An array of callbacks called on item click. called before selection update
|
27
|
+
* @property {function(boolean):void} [selectionChanged] - A callback called if the selection changes with the current selection status. called before value update
|
28
|
+
* @property {function(string):void} [titleChanged] - A callback called if the title changes via rename action. only usable with renamble true.
|
29
|
+
*/
|
30
|
+
|
15
31
|
const props = defineProps({
|
16
|
-
/** @type {
|
32
|
+
/** @type {VcsListItem} */
|
17
33
|
item: {
|
18
34
|
type: Object,
|
19
35
|
required: true,
|
@@ -0,0 +1,69 @@
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {
|
2
|
+
$props: {
|
3
|
+
readonly [x: string]: any;
|
4
|
+
};
|
5
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
6
|
+
title?(_: {
|
7
|
+
item: any;
|
8
|
+
dragging: any;
|
9
|
+
tooltip: string;
|
10
|
+
}): any;
|
11
|
+
subtitle?(_: {
|
12
|
+
item: any;
|
13
|
+
}): any;
|
14
|
+
default?(_: {
|
15
|
+
item: any;
|
16
|
+
dragging: any;
|
17
|
+
tooltip: string;
|
18
|
+
isActive: boolean;
|
19
|
+
isOpen: boolean;
|
20
|
+
isSelected: boolean;
|
21
|
+
isIndeterminate: boolean;
|
22
|
+
select: (value: boolean) => void;
|
23
|
+
}): any;
|
24
|
+
}>;
|
25
|
+
export default _default;
|
26
|
+
export type VcsListItem = {
|
27
|
+
name: string;
|
28
|
+
/**
|
29
|
+
* - Whether to display this item or not.
|
30
|
+
*/
|
31
|
+
visible?: boolean | undefined;
|
32
|
+
/**
|
33
|
+
* - Whether this item should be displayed as disabled.
|
34
|
+
*/
|
35
|
+
disabled?: boolean | undefined;
|
36
|
+
/**
|
37
|
+
* - Whether the title of can be edited. will add a rename action to the end of the action list. This action will call titleChanged with the new title, you must provide the callback yourself, otherwise this does not work as expeted.
|
38
|
+
*/
|
39
|
+
renamable?: boolean | import("../../actions/actionHelper.js", { with: { "resolution-mode": "import" } }).ActionOptions | undefined;
|
40
|
+
/**
|
41
|
+
* - The title to be displayed
|
42
|
+
*/
|
43
|
+
title: string;
|
44
|
+
tooltip?: string | undefined;
|
45
|
+
/**
|
46
|
+
* - An optional icon to display with this item. Can be a URL or HTMLElement.
|
47
|
+
*/
|
48
|
+
icon?: string | HTMLCanvasElement | HTMLImageElement | undefined;
|
49
|
+
/**
|
50
|
+
* - Shows badge, if item has an update.
|
51
|
+
*/
|
52
|
+
hasUpdate?: boolean | undefined;
|
53
|
+
actions?: import("../../actions/actionHelper.js", { with: { "resolution-mode": "import" } }).VcsAction[] | undefined;
|
54
|
+
/**
|
55
|
+
* - An array of callbacks called on item click. called before selection update
|
56
|
+
*/
|
57
|
+
clickedCallbacks?: Array<(arg0: PointerEvent) => void> | undefined;
|
58
|
+
/**
|
59
|
+
* - A callback called if the selection changes with the current selection status. called before value update
|
60
|
+
*/
|
61
|
+
selectionChanged?: ((arg0: boolean) => void) | undefined;
|
62
|
+
/**
|
63
|
+
* - A callback called if the title changes via rename action. only usable with renamble true.
|
64
|
+
*/
|
65
|
+
titleChanged?: ((arg0: string) => void) | undefined;
|
66
|
+
};
|
67
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
68
|
+
$slots: S;
|
69
|
+
});
|
@@ -3,17 +3,20 @@
|
|
3
3
|
<VcsTreeviewSearchbar
|
4
4
|
v-if="showSearchbar"
|
5
5
|
:placeholder="searchbarPlaceholder"
|
6
|
-
v-model="
|
6
|
+
v-model="localSearchValue"
|
7
7
|
/>
|
8
8
|
<v-treeview
|
9
9
|
class="vcs-treeview"
|
10
|
-
|
10
|
+
density="compact"
|
11
11
|
item-value="name"
|
12
12
|
:item-props="true"
|
13
|
-
:search="search"
|
14
13
|
:custom-filter="handleFilter"
|
15
14
|
:selectable="false"
|
16
15
|
:activatable="false"
|
16
|
+
expand-icon="mdi-chevron-right"
|
17
|
+
collapse-icon="mdi-chevron-down"
|
18
|
+
v-bind="{ ...$props, ...$attrs }"
|
19
|
+
:search="localSearchValue"
|
17
20
|
>
|
18
21
|
<template #item="{ props: item }">
|
19
22
|
<VcsTreeviewLeaf
|
@@ -33,6 +36,7 @@
|
|
33
36
|
> .v-list-item,
|
34
37
|
> .v-list-group > .v-list-item {
|
35
38
|
min-height: calc(var(--v-vcs-item-height) + 8px) !important;
|
39
|
+
padding-left: 6px;
|
36
40
|
}
|
37
41
|
// Border around root nodes with children included
|
38
42
|
> .v-list-item:not(:last-child),
|
@@ -46,17 +50,32 @@
|
|
46
50
|
> .v-list-item-title {
|
47
51
|
font-weight: 700 !important;
|
48
52
|
}
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
53
|
+
}
|
54
|
+
|
55
|
+
// leaf indent
|
56
|
+
:deep(.v-list--slim .v-treeview-group.v-list-group) {
|
57
|
+
--prepend-width: 0px;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Padding left of root nodes
|
61
|
+
:deep(.v-list-item__prepend) {
|
62
|
+
width: var(--v-vcs-font-size);
|
63
|
+
margin-right: 8px;
|
64
|
+
> .v-list-item-action > .v-btn {
|
65
|
+
width: var(--v-vcs-font-size);
|
66
|
+
height: var(--v-vcs-font-size);
|
67
|
+
margin: auto;
|
58
68
|
}
|
59
69
|
}
|
70
|
+
|
71
|
+
// remove hover shadow over button
|
72
|
+
:deep(.v-btn__overlay) {
|
73
|
+
--v-hover-opacity: 0;
|
74
|
+
}
|
75
|
+
// remove ripple effect
|
76
|
+
:deep(.v-ripple__container) {
|
77
|
+
display: none;
|
78
|
+
}
|
60
79
|
// hide active class
|
61
80
|
:deep(.v-list-item__overlay) {
|
62
81
|
display: none;
|
@@ -68,8 +87,9 @@
|
|
68
87
|
</style>
|
69
88
|
|
70
89
|
<script>
|
71
|
-
import { getCurrentInstance
|
90
|
+
import { getCurrentInstance } from 'vue';
|
72
91
|
import { VTreeview } from 'vuetify/labs/VTreeview';
|
92
|
+
import { useProxiedAtomicModel } from '../modelHelper.js';
|
73
93
|
import VcsTreeviewSearchbar from './VcsTreeviewSearchbar.vue';
|
74
94
|
import VcsTreeviewLeaf from './VcsTreeviewLeaf.vue';
|
75
95
|
|
@@ -77,6 +97,7 @@
|
|
77
97
|
* @description extends API of https://vuetifyjs.com/en/api/v-treeview/
|
78
98
|
* Can render dynamic components as leaf items.
|
79
99
|
* In order to display an item needs to be registered and added to `availableComponents`.
|
100
|
+
* Exposes the `search` value for filtering the treeview.
|
80
101
|
* @vue-prop {boolean} [showSearchbar=false] - Whether there is a searchbar for this treeview
|
81
102
|
* @vue-prop {string} [searchbarPlaceholder] - Placeholder text for the searchbar, will be translated
|
82
103
|
*/
|
@@ -88,6 +109,10 @@
|
|
88
109
|
VTreeview,
|
89
110
|
},
|
90
111
|
props: {
|
112
|
+
search: {
|
113
|
+
type: String,
|
114
|
+
default: '',
|
115
|
+
},
|
91
116
|
showSearchbar: {
|
92
117
|
type: Boolean,
|
93
118
|
default: false,
|
@@ -97,8 +122,10 @@
|
|
97
122
|
default: undefined,
|
98
123
|
},
|
99
124
|
},
|
100
|
-
|
101
|
-
|
125
|
+
emits: ['update:search'],
|
126
|
+
setup(props, { emit }) {
|
127
|
+
const localSearchValue = useProxiedAtomicModel(props, 'search', emit);
|
128
|
+
|
102
129
|
// TODO properly type the tree view item interface & export in index.d.ts
|
103
130
|
|
104
131
|
const vm = getCurrentInstance().proxy;
|
@@ -119,7 +146,7 @@
|
|
119
146
|
};
|
120
147
|
|
121
148
|
return {
|
122
|
-
|
149
|
+
localSearchValue,
|
123
150
|
handleFilter,
|
124
151
|
};
|
125
152
|
},
|
@@ -1,4 +1,8 @@
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
2
|
+
search: {
|
3
|
+
type: StringConstructor;
|
4
|
+
default: string;
|
5
|
+
};
|
2
6
|
showSearchbar: {
|
3
7
|
type: BooleanConstructor;
|
4
8
|
default: boolean;
|
@@ -8,9 +12,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
8
12
|
default: undefined;
|
9
13
|
};
|
10
14
|
}, {
|
11
|
-
|
15
|
+
localSearchValue: import("vue").Ref<any>;
|
12
16
|
handleFilter: (value: string, q: string, item: Object) => number;
|
13
|
-
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
17
|
+
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:search"[], "update:search", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
18
|
+
search: {
|
19
|
+
type: StringConstructor;
|
20
|
+
default: string;
|
21
|
+
};
|
14
22
|
showSearchbar: {
|
15
23
|
type: BooleanConstructor;
|
16
24
|
default: boolean;
|
@@ -19,7 +27,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
19
27
|
type: StringConstructor;
|
20
28
|
default: undefined;
|
21
29
|
};
|
22
|
-
}
|
30
|
+
}>> & {
|
31
|
+
"onUpdate:search"?: ((...args: any[]) => any) | undefined;
|
32
|
+
}, {
|
33
|
+
search: string;
|
23
34
|
showSearchbar: boolean;
|
24
35
|
searchbarPlaceholder: string;
|
25
36
|
}, {}>;
|
@@ -53,12 +53,19 @@
|
|
53
53
|
</script>
|
54
54
|
|
55
55
|
<template>
|
56
|
-
<v-treeview-item
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
56
|
+
<v-treeview-item
|
57
|
+
v-if="item"
|
58
|
+
ref="parentElement"
|
59
|
+
density="compact"
|
60
|
+
class="vcs-treeview-leaf pr-2"
|
61
|
+
>
|
62
|
+
<template #prepend>
|
63
|
+
<template v-if="item.icon">
|
64
|
+
<v-icon v-if="isStringIcon" :size="16">
|
65
|
+
{{ item.icon }}
|
66
|
+
</v-icon>
|
67
|
+
<ImageElementInjector :element="item.icon" v-else />
|
68
|
+
</template>
|
62
69
|
</template>
|
63
70
|
<div class="text-truncate" ref="titleElem">
|
64
71
|
{{ $st(item.title || item.name) }}
|
@@ -76,6 +83,8 @@
|
|
76
83
|
:overflow-count="3"
|
77
84
|
:disabled="item.disabled"
|
78
85
|
right
|
86
|
+
tooltip-position="right"
|
87
|
+
block-overflow
|
79
88
|
class="col-4 pa-0 d-flex align-center"
|
80
89
|
/>
|
81
90
|
</template>
|
@@ -10,8 +10,8 @@
|
|
10
10
|
<VcsTextField
|
11
11
|
class="searchbar outlined rounded-xl align-center justify-center base-lighten-4 pa-1 pl-6"
|
12
12
|
:placeholder="$st(placeholder)"
|
13
|
-
v-bind="$attrs"
|
14
13
|
clearable
|
14
|
+
v-bind="$attrs"
|
15
15
|
/>
|
16
16
|
</slot>
|
17
17
|
|
@@ -66,7 +66,7 @@
|
|
66
66
|
// override primary--placeholder of VcsTextField
|
67
67
|
:deep(input::placeholder) {
|
68
68
|
color: rgb(var(--v-theme-base-lighten-1)) !important;
|
69
|
-
font-style:
|
69
|
+
font-style: italic !important;
|
70
70
|
opacity: 0.75 !important;
|
71
71
|
}
|
72
72
|
</style>
|
@@ -5,7 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
5
5
|
};
|
6
6
|
show: {
|
7
7
|
type: BooleanConstructor;
|
8
|
-
|
8
|
+
default: boolean;
|
9
9
|
};
|
10
10
|
}, any, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
11
11
|
text: {
|
@@ -14,9 +14,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
14
14
|
};
|
15
15
|
show: {
|
16
16
|
type: BooleanConstructor;
|
17
|
-
|
17
|
+
default: boolean;
|
18
18
|
};
|
19
19
|
}>>, {
|
20
20
|
text: string;
|
21
|
+
show: boolean;
|
21
22
|
}, {}>;
|
22
23
|
export default _default;
|
@@ -45,8 +45,8 @@
|
|
45
45
|
<v-expansion-panel-title static class="px-2">
|
46
46
|
<template #default="{ expanded }">
|
47
47
|
<v-list-item-title ref="panelHeader">
|
48
|
-
<v-icon v-if="!expanded" class="pr-1"> mdi-chevron-
|
49
|
-
<v-icon v-if="expanded" class="pr-1"> mdi-chevron-
|
48
|
+
<v-icon v-if="!expanded" class="pr-1"> mdi-chevron-right </v-icon>
|
49
|
+
<v-icon v-if="expanded" class="pr-1"> mdi-chevron-down </v-icon>
|
50
50
|
<span
|
51
51
|
:class="{
|
52
52
|
'vcs-panel-title__append':
|