@vcmap/ui 6.0.14 → 6.1.0-rc.2
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 +25 -3
- package/config/dev.config.json +17 -3
- package/config/splashscreen.config.json +13 -0
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core-882e211a.js → core-fd079400.js} +6861 -5788
- package/dist/assets/core.js +1 -1
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-5135917c.css +1 -0
- package/dist/assets/{ui-b6bff1d9.js → ui-5135917c.js} +16764 -18447
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify-2d64c180.js → vuetify-f02b7bb9.js} +1 -1
- package/dist/assets/vuetify.js +1 -1
- package/index.d.ts +13 -1
- package/index.js +7 -0
- package/package.json +2 -2
- package/plugins/@vcmap-show-case/dev-tools/package.json +5 -0
- package/plugins/@vcmap-show-case/dev-tools/src/eventLogger.js +35 -0
- package/plugins/@vcmap-show-case/dev-tools/src/index.js +59 -0
- package/plugins/@vcmap-show-case/search-example/src/searchImpl.js +10 -0
- package/src/application/VcsApp.vue.d.ts +26 -0
- package/src/application/VcsContainer.vue +5 -3
- package/src/application/VcsContainer.vue.d.ts +21 -0
- package/src/application/VcsNavbar.vue +10 -6
- package/src/application/VcsNavbar.vue.d.ts +2 -0
- package/src/application/VcsSplashScreen.vue +35 -28
- package/src/application/VcsSplashScreen.vue.d.ts +1 -0
- package/src/callback/addModuleCallback.d.ts +29 -0
- package/src/callback/addModuleCallback.js +61 -0
- package/src/callback/removeModuleCallback.d.ts +29 -0
- package/src/callback/removeModuleCallback.js +53 -0
- package/src/callback/startRotationCallback.d.ts +37 -0
- package/src/callback/startRotationCallback.js +67 -0
- package/src/callback/stopRotationCallback.d.ts +8 -0
- package/src/callback/stopRotationCallback.js +37 -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/VcsTextArea.vue +1 -1
- package/src/components/icons/+all.js +4 -0
- package/src/components/icons/View360Icon.vue +55 -0
- package/src/components/icons/View360Icon.vue.d.ts +2 -0
- package/src/components/import/VcsImportComponent.vue +2 -0
- package/src/components/lists/VcsList.vue +15 -11
- package/src/components/lists/VcsList.vue.d.ts +9 -0
- package/src/components/lists/VcsTreeNode.vue +244 -0
- package/src/components/lists/VcsTreeNode.vue.d.ts +31 -0
- package/src/components/lists/VcsTreeview.vue +111 -173
- package/src/components/lists/VcsTreeview.vue.d.ts +58 -4
- package/src/components/lists/VcsTreeviewTitle.vue +10 -3
- package/src/components/lists/VcsTreeviewTitle.vue.d.ts +2 -0
- package/src/components/tables/VcsDataTable.vue +14 -3
- package/src/components/tables/VcsDataTable.vue.d.ts +9 -0
- package/src/featureInfo/BalloonComponent.vue +18 -47
- package/src/featureInfo/BalloonComponent.vue.d.ts +0 -1
- package/src/featureInfo/IframeComponent.vue +1 -32
- package/src/featureInfo/IframeComponent.vue.d.ts +1 -4
- package/src/i18n/de.d.ts +1 -0
- package/src/i18n/de.js +1 -0
- package/src/i18n/en.d.ts +1 -0
- package/src/i18n/en.js +1 -0
- package/src/init.d.ts +6 -0
- package/src/init.js +26 -14
- package/src/legend/VcsLegend.vue +1 -1
- package/src/manager/toolbox/ToolboxManagerComponent.vue +4 -4
- package/src/manager/toolbox/ToolboxManagerComponent.vue.d.ts +2 -2
- package/src/manager/toolbox/toolboxManager.d.ts +5 -0
- package/src/manager/toolbox/toolboxManager.js +7 -1
- package/src/manager/window/WindowComponent.vue +11 -1
- 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/navigation/MapNavigation.vue +87 -5
- package/src/navigation/MapNavigation.vue.d.ts +3 -1
- package/src/navigation/overviewMap.d.ts +6 -0
- package/src/navigation/overviewMap.js +14 -1
- package/src/pluginHelper.d.ts +0 -7
- package/src/pluginHelper.js +4 -18
- package/src/search/ResultItem.vue +1 -10
- package/src/search/ResultsComponent.vue +11 -1
- package/src/search/ResultsComponent.vue.d.ts +9 -0
- package/src/search/SearchComponent.vue +88 -11
- package/src/search/SearchComponent.vue.d.ts +7 -0
- package/src/search/markText.d.ts +1 -1
- package/src/search/markText.js +4 -4
- package/src/search/search.d.ts +3 -0
- package/src/search/search.js +3 -2
- package/src/state.d.ts +2 -4
- package/src/state.js +31 -54
- package/src/uiConfig.d.ts +40 -0
- package/src/uiConfig.js +6 -0
- package/src/vcsUiApp.js +11 -7
- package/src/vuePlugins/vuetify.js +2 -0
- package/dist/assets/ui-b6bff1d9.css +0 -1
- /package/dist/assets/{cesium-615823f2.js → cesium-57fbd309.js} +0 -0
- /package/dist/assets/{ol-7fc05707.js → ol-50dfef96.js} +0 -0
- /package/dist/assets/{vue-74e8343e.js → vue-c3c55d88.js} +0 -0
- /package/dist/assets/{vuetify-2d64c180.css → vuetify-f02b7bb9.css} +0 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
export default RemoveModuleCallback;
|
2
|
+
export type RemoveModuleCallbackOptions = import("./vcsCallback.js").VcsCallbackOptions & {
|
3
|
+
moduleId: string;
|
4
|
+
};
|
5
|
+
/**
|
6
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { moduleId: string }} RemoveModuleCallbackOptions
|
7
|
+
* @property {string} moduleId - id of module to be removed
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* @class
|
11
|
+
* @extends {VcsCallback}
|
12
|
+
*/
|
13
|
+
declare class RemoveModuleCallback extends VcsCallback {
|
14
|
+
/**
|
15
|
+
* @param {RemoveModuleCallbackOptions} options
|
16
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
17
|
+
*/
|
18
|
+
constructor(options: RemoveModuleCallbackOptions, app: import("@src/vcsUiApp.js").default);
|
19
|
+
/**
|
20
|
+
* @type {string}
|
21
|
+
* @private
|
22
|
+
*/
|
23
|
+
private _moduleId;
|
24
|
+
/**
|
25
|
+
* @returns {RemoveModuleCallbackOptions}
|
26
|
+
*/
|
27
|
+
toJSON(): RemoveModuleCallbackOptions;
|
28
|
+
}
|
29
|
+
import VcsCallback from './vcsCallback.js';
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { moduleId: string }} RemoveModuleCallbackOptions
|
5
|
+
* @property {string} moduleId - id of module to be removed
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @class
|
10
|
+
* @extends {VcsCallback}
|
11
|
+
*/
|
12
|
+
class RemoveModuleCallback extends VcsCallback {
|
13
|
+
/**
|
14
|
+
* @type {string}
|
15
|
+
*/
|
16
|
+
static get className() {
|
17
|
+
return 'RemoveModuleCallback';
|
18
|
+
}
|
19
|
+
|
20
|
+
/**
|
21
|
+
* @param {RemoveModuleCallbackOptions} options
|
22
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
23
|
+
*/
|
24
|
+
constructor(options, app) {
|
25
|
+
super(options, app);
|
26
|
+
/**
|
27
|
+
* @type {string}
|
28
|
+
* @private
|
29
|
+
*/
|
30
|
+
this._moduleId = options.moduleId;
|
31
|
+
}
|
32
|
+
|
33
|
+
callback() {
|
34
|
+
if (this._app.getModuleById(this._moduleId)) {
|
35
|
+
this._app.removeModule(this._moduleId);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* @returns {RemoveModuleCallbackOptions}
|
41
|
+
*/
|
42
|
+
toJSON() {
|
43
|
+
const config = super.toJSON();
|
44
|
+
config.moduleId = this._moduleId;
|
45
|
+
return config;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
export default RemoveModuleCallback;
|
50
|
+
callbackClassRegistry.registerClass(
|
51
|
+
RemoveModuleCallback.className,
|
52
|
+
RemoveModuleCallback,
|
53
|
+
);
|
@@ -0,0 +1,37 @@
|
|
1
|
+
export default StartRotationCallback;
|
2
|
+
export type StartRotationOptions = import("./vcsCallback.js").VcsCallbackOptions & {
|
3
|
+
viewpoint: string;
|
4
|
+
timePerRotation: number;
|
5
|
+
};
|
6
|
+
/**
|
7
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { viewpoint: string, timePerRotation: number }} StartRotationOptions
|
8
|
+
* @property {string?} viewpoint - name of the viewpoint
|
9
|
+
* @property {number?} timePerRotation - time in seconds for a full rotation
|
10
|
+
*/
|
11
|
+
/**
|
12
|
+
* @class
|
13
|
+
* @extends {VcsCallback}
|
14
|
+
*/
|
15
|
+
declare class StartRotationCallback extends VcsCallback {
|
16
|
+
/**
|
17
|
+
* @param {StartRotationOptions} options
|
18
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
19
|
+
*/
|
20
|
+
constructor(options: StartRotationOptions, app: import("@src/vcsUiApp.js").default);
|
21
|
+
/**
|
22
|
+
* @type {string | undefined}
|
23
|
+
* @private
|
24
|
+
*/
|
25
|
+
private _viewpoint;
|
26
|
+
/**
|
27
|
+
* @type {number | undefined}
|
28
|
+
* @private
|
29
|
+
*/
|
30
|
+
private _timePerRotation;
|
31
|
+
callback(): Promise<void>;
|
32
|
+
/**
|
33
|
+
* @returns {StartRotationOptions}
|
34
|
+
*/
|
35
|
+
toJSON(): StartRotationOptions;
|
36
|
+
}
|
37
|
+
import VcsCallback from './vcsCallback.js';
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import { CesiumMap, startRotation } from '@vcmap/core';
|
2
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @typedef {import("./vcsCallback.js").VcsCallbackOptions & { viewpoint: string, timePerRotation: number }} StartRotationOptions
|
6
|
+
* @property {string?} viewpoint - name of the viewpoint
|
7
|
+
* @property {number?} timePerRotation - time in seconds for a full rotation
|
8
|
+
*/
|
9
|
+
|
10
|
+
/**
|
11
|
+
* @class
|
12
|
+
* @extends {VcsCallback}
|
13
|
+
*/
|
14
|
+
class StartRotationCallback extends VcsCallback {
|
15
|
+
/**
|
16
|
+
* @type {string}
|
17
|
+
*/
|
18
|
+
static get className() {
|
19
|
+
return 'StartRotationCallback';
|
20
|
+
}
|
21
|
+
|
22
|
+
/**
|
23
|
+
* @param {StartRotationOptions} options
|
24
|
+
* @param {import("@src/vcsUiApp.js").default} app
|
25
|
+
*/
|
26
|
+
constructor(options, app) {
|
27
|
+
super(options, app);
|
28
|
+
/**
|
29
|
+
* @type {string | undefined}
|
30
|
+
* @private
|
31
|
+
*/
|
32
|
+
this._viewpoint = options.viewpoint;
|
33
|
+
/**
|
34
|
+
* @type {number | undefined}
|
35
|
+
* @private
|
36
|
+
*/
|
37
|
+
this._timePerRotation = options.timePerRotation;
|
38
|
+
}
|
39
|
+
|
40
|
+
async callback() {
|
41
|
+
const vp = this._app.viewpoints.getByKey(this._viewpoint);
|
42
|
+
const speed = this._timePerRotation;
|
43
|
+
if (this._app.maps.activeMap instanceof CesiumMap) {
|
44
|
+
await startRotation(this._app, vp, speed);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
/**
|
49
|
+
* @returns {StartRotationOptions}
|
50
|
+
*/
|
51
|
+
toJSON() {
|
52
|
+
const config = super.toJSON();
|
53
|
+
if (this._viewpoint) {
|
54
|
+
config.viewpoint = this._viewpoint;
|
55
|
+
}
|
56
|
+
if (this._timePerRotation) {
|
57
|
+
config.timePerRotation = this._timePerRotation;
|
58
|
+
}
|
59
|
+
return config;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
export default StartRotationCallback;
|
64
|
+
callbackClassRegistry.registerClass(
|
65
|
+
StartRotationCallback.className,
|
66
|
+
StartRotationCallback,
|
67
|
+
);
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { rotationMapControlSymbol } from '@vcmap/core';
|
2
|
+
import VcsCallback, { callbackClassRegistry } from './vcsCallback.js';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class
|
6
|
+
* @extends {VcsCallback}
|
7
|
+
*/
|
8
|
+
class StopRotationCallback extends VcsCallback {
|
9
|
+
/**
|
10
|
+
* @type {string}
|
11
|
+
*/
|
12
|
+
static get className() {
|
13
|
+
return 'StopRotationCallback';
|
14
|
+
}
|
15
|
+
|
16
|
+
// eslint-disable-next-line class-methods-use-this
|
17
|
+
callback() {
|
18
|
+
if (this._app.maps.exclusiveMapControlsId === rotationMapControlSymbol) {
|
19
|
+
this._app.maps.resetExclusiveMapControls();
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
/**
|
24
|
+
* @returns {import('./vcsCallback.js').VcsCallbackOptions}
|
25
|
+
*/
|
26
|
+
toJSON() {
|
27
|
+
return super.toJSON();
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
export default StopRotationCallback;
|
32
|
+
|
33
|
+
// Register the class
|
34
|
+
callbackClassRegistry.registerClass(
|
35
|
+
StopRotationCallback.className,
|
36
|
+
StopRotationCallback,
|
37
|
+
);
|
@@ -38,12 +38,14 @@
|
|
38
38
|
</template>
|
39
39
|
<VcsActionList :actions="overflowButtons" :disabled="disabled" />
|
40
40
|
</v-menu>
|
41
|
-
<v-spacer
|
42
|
-
v-else-if="blockOverflow"
|
43
|
-
class="flex-grow-0 d-inline-block px-2"
|
44
|
-
/>
|
41
|
+
<v-spacer v-else-if="blockOverflow" />
|
45
42
|
</div>
|
46
43
|
</template>
|
44
|
+
<style scoped lang="scss">
|
45
|
+
:deep(.v-spacer) {
|
46
|
+
width: calc(var(--v-vcs-font-size) * 1.25);
|
47
|
+
}
|
48
|
+
</style>
|
47
49
|
<script>
|
48
50
|
import { VIcon, VMenu, VSpacer } from 'vuetify/components';
|
49
51
|
import VcsButton from './VcsButton.vue';
|
@@ -82,7 +82,6 @@
|
|
82
82
|
* @vue-prop {string} icon - When given, will display an icon in the button. Replaces vuetify icon property.
|
83
83
|
* @vue-prop {string} tooltip - Text content of a tooltip which appears on hover with default delay.
|
84
84
|
* @vue-prop {('bottom' | 'left' | 'top' | 'right')} tooltipPosition - Position of the tooltip.
|
85
|
-
* @vue-prop {Object<string, any>} tooltipProps - Properties to be passed to the tooltip {@link https://vuetifyjs.com/en/api/v-tooltip/#props|vuetify v-tooltip}
|
86
85
|
* @vue-computed {string} appliedColor - color applied to button, depending on size and state
|
87
86
|
* @vue-computed {boolean} hasDefaultSlot
|
88
87
|
*/
|
@@ -18,7 +18,8 @@
|
|
18
18
|
v-model="localValue"
|
19
19
|
hide-header
|
20
20
|
@update:model-value="menuOpen = false"
|
21
|
-
color="primary"
|
21
|
+
:color="datePickerProps.color ?? 'primary'"
|
22
|
+
v-bind="{ ...datePickerProps }"
|
22
23
|
>
|
23
24
|
<template #actions>
|
24
25
|
<v-btn color="primary" @click="goToToday">
|
@@ -40,6 +41,7 @@
|
|
40
41
|
* @description stylized wrapper around {@link https://vuetifyjs.com/en/components/date-pickers/#internationalization}.
|
41
42
|
* @vue-prop {Date} modelValue - value of the date picker as a Date (changes to the Date Object are not tracked, handled as atomic value)
|
42
43
|
* @vue-prop {string} [icon] - specify optional prepend icon, defaults to mdi-calendar
|
44
|
+
* @vue-prop {Object} [datePickerProps] - props that are passed to the {@link https://vuetifyjs.com/en/api/v-date-picker/ | VDatePicker}
|
43
45
|
*/
|
44
46
|
export default {
|
45
47
|
name: 'VcsDatePicker',
|
@@ -52,6 +54,10 @@
|
|
52
54
|
type: String,
|
53
55
|
default: 'mdi-calendar',
|
54
56
|
},
|
57
|
+
datePickerProps: {
|
58
|
+
type: Object,
|
59
|
+
default: () => ({}),
|
60
|
+
},
|
55
61
|
},
|
56
62
|
components: {
|
57
63
|
VMenu,
|
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
7
7
|
type: StringConstructor;
|
8
8
|
default: string;
|
9
9
|
};
|
10
|
+
datePickerProps: {
|
11
|
+
type: ObjectConstructor;
|
12
|
+
default: () => {};
|
13
|
+
};
|
10
14
|
}, {
|
11
15
|
formattedDate: import("vue").WritableComputedRef<string>;
|
12
16
|
localValue: import("vue").WritableComputedRef<Date>;
|
@@ -22,10 +26,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
22
26
|
type: StringConstructor;
|
23
27
|
default: string;
|
24
28
|
};
|
29
|
+
datePickerProps: {
|
30
|
+
type: ObjectConstructor;
|
31
|
+
default: () => {};
|
32
|
+
};
|
25
33
|
}>> & {
|
26
34
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
27
35
|
}, {
|
28
36
|
icon: string;
|
29
37
|
modelValue: Date;
|
38
|
+
datePickerProps: Record<string, any>;
|
30
39
|
}, {}>;
|
31
40
|
export default _default;
|
@@ -110,7 +110,7 @@
|
|
110
110
|
// Not color, just used if label is given
|
111
111
|
:deep(.v-field--focused:not(.v-field--error) .v-field__outline *::after) {
|
112
112
|
border-color: rgb(var(--v-theme-primary));
|
113
|
-
border-width: 1px !important;
|
113
|
+
border-width: 0 0 1px !important;
|
114
114
|
}
|
115
115
|
|
116
116
|
// remove margin from prepended Icon
|
@@ -110,6 +110,7 @@ import ViewshedConeIcon from './ViewshedConeIcon.vue';
|
|
110
110
|
import WalkingIcon from './WalkingIcon.vue';
|
111
111
|
import WallIcon from './WallIcon.vue';
|
112
112
|
import WandIcon from './WandIcon.vue';
|
113
|
+
import View360Icon from './View360Icon.vue';
|
113
114
|
|
114
115
|
// * // IconMap.boundingBox
|
115
116
|
// * <v-icon size="16" v-text="'$vcsBoundingBox'" />
|
@@ -459,6 +460,9 @@ const IconMap = {
|
|
459
460
|
viewshed360: {
|
460
461
|
component: Viewshed360Icon,
|
461
462
|
},
|
463
|
+
view360: {
|
464
|
+
component: View360Icon,
|
465
|
+
},
|
462
466
|
viewshedCone: {
|
463
467
|
component: ViewshedConeIcon,
|
464
468
|
},
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- eslint-disable max-len -->
|
2
|
+
|
3
|
+
<template>
|
4
|
+
<svg
|
5
|
+
id="Ebene_1"
|
6
|
+
data-name="Ebene 1"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
viewBox="46 75 301 268"
|
9
|
+
>
|
10
|
+
<path
|
11
|
+
d="M302.18,95.55c0-5.63,1.98-10.41,5.94-14.35,3.96-3.94,8.73-5.9,14.31-5.9s10.36,1.98,14.31,5.93c3.96,3.96,5.93,8.73,5.93,14.31s-1.98,10.36-5.93,14.31c-3.96,3.96-8.73,5.93-14.31,5.93s-10.36-1.98-14.31-5.93c-3.96-3.96-5.94-8.73-5.94-14.31ZM312.72,95.55c0,2.67.95,4.95,2.86,6.86s4.19,2.86,6.86,2.86,4.95-.95,6.86-2.86,2.86-4.19,2.86-6.86-.95-4.95-2.86-6.86-4.19-2.86-6.86-2.86-4.95.95-6.86,2.86-2.86,4.19-2.86,6.86Z"
|
12
|
+
style="fill: currentColor; stroke-width: 0px"
|
13
|
+
/>
|
14
|
+
<path
|
15
|
+
d="M68.99,176.62s-17.77,19.47-7.44,43.07c10.78,23.59,58.52,59.55,147.63,57.9"
|
16
|
+
style="
|
17
|
+
fill: none;
|
18
|
+
stroke: currentColor;
|
19
|
+
stroke-miterlimit: 10;
|
20
|
+
stroke-width: 24px;
|
21
|
+
"
|
22
|
+
/>
|
23
|
+
<path
|
24
|
+
d="M88.05,150.42l18.59-2.26c.59,4.74,2.19,8.36,4.79,10.87,2.6,2.51,5.74,3.76,9.43,3.76,3.96,0,7.3-1.5,10.01-4.51,2.71-3.01,4.07-7.06,4.07-12.17,0-4.83-1.3-8.66-3.9-11.48-2.6-2.83-5.77-4.24-9.5-4.24-2.46,0-5.4.48-8.82,1.44l2.12-15.65c5.2.14,9.16-.99,11.89-3.38s4.1-5.57,4.1-9.54c0-3.37-1-6.06-3.01-8.07-2.01-2-4.67-3.01-8-3.01s-6.08,1.14-8.41,3.42c-2.32,2.28-3.74,5.61-4.24,9.98l-17.71-3.01c1.23-6.06,3.09-10.9,5.57-14.53,2.48-3.62,5.95-6.47,10.39-8.54,4.44-2.07,9.42-3.11,14.94-3.11,9.43,0,17,3.01,22.7,9.02,4.69,4.92,7.04,10.48,7.04,16.68,0,8.8-4.81,15.81-14.42,21.05,5.74,1.23,10.33,3.99,13.77,8.27,3.44,4.28,5.16,9.46,5.16,15.52,0,8.8-3.21,16.29-9.64,22.49-6.43,6.2-14.42,9.3-23.99,9.3-9.07,0-16.59-2.61-22.56-7.83-5.97-5.22-9.43-12.04-10.39-20.47Z"
|
25
|
+
style="fill: currentColor; stroke-width: 0px"
|
26
|
+
/>
|
27
|
+
<path
|
28
|
+
d="M227.48,101.33l-18.59,2.05c-.46-3.83-1.64-6.65-3.55-8.48-1.91-1.82-4.4-2.73-7.45-2.73-4.06,0-7.49,1.82-10.29,5.47-2.8,3.65-4.57,11.23-5.3,22.76,4.79-5.65,10.73-8.48,17.84-8.48,8.02,0,14.89,3.05,20.61,9.16,5.72,6.11,8.58,13.99,8.58,23.65,0,10.25-3.01,18.48-9.02,24.68-6.02,6.2-13.74,9.3-23.17,9.3-10.12,0-18.43-3.93-24.95-11.79-6.52-7.86-9.78-20.75-9.78-38.66s3.39-31.6,10.19-39.72c6.79-8.11,15.61-12.17,26.46-12.17,7.61,0,13.91,2.13,18.9,6.39,4.99,4.26,8.17,10.45,9.54,18.56ZM183.93,143.24c0,6.24,1.44,11.06,4.31,14.46,2.87,3.4,6.15,5.09,9.84,5.09s6.52-1.39,8.89-4.17c2.37-2.78,3.55-7.34,3.55-13.67s-1.28-11.29-3.83-14.32c-2.55-3.03-5.74-4.55-9.57-4.55s-6.81,1.45-9.37,4.34c-2.55,2.89-3.83,7.17-3.83,12.82Z"
|
29
|
+
style="fill: currentColor; stroke-width: 0px"
|
30
|
+
/>
|
31
|
+
<path
|
32
|
+
d="M268.53,76.38c9.71,0,17.29,3.46,22.76,10.39,6.52,8.2,9.78,21.81,9.78,40.81s-3.28,32.58-9.84,40.88c-5.42,6.84-12.99,10.25-22.7,10.25s-17.61-3.75-23.58-11.24c-5.97-7.5-8.96-20.86-8.96-40.09s3.28-32.45,9.84-40.74c5.42-6.84,12.99-10.25,22.7-10.25ZM268.53,92.31c-2.32,0-4.4.74-6.22,2.22-1.82,1.48-3.24,4.14-4.24,7.96-1.32,4.97-1.98,13.33-1.98,25.09s.59,19.84,1.78,24.23c1.18,4.4,2.68,7.33,4.48,8.78,1.8,1.46,3.86,2.19,6.19,2.19s4.4-.74,6.22-2.22c1.82-1.48,3.24-4.14,4.24-7.96,1.32-4.92,1.98-13.26,1.98-25.02s-.59-19.83-1.78-24.23c-1.19-4.4-2.68-7.34-4.48-8.82-1.8-1.48-3.86-2.22-6.19-2.22Z"
|
33
|
+
style="fill: currentColor; stroke-width: 0px"
|
34
|
+
/>
|
35
|
+
<polyline
|
36
|
+
points="167.32 222.17 212.66 279.35 161.89 325.7"
|
37
|
+
style="
|
38
|
+
fill: none;
|
39
|
+
stroke: currentColor;
|
40
|
+
stroke-linecap: square;
|
41
|
+
stroke-miterlimit: 10;
|
42
|
+
stroke-width: 24px;
|
43
|
+
"
|
44
|
+
/>
|
45
|
+
<path
|
46
|
+
d="M323.31,175.13s18.39,18.8,8.83,42.77c-7.13,17.07-32.78,41.11-79.15,54.13"
|
47
|
+
style="
|
48
|
+
fill: none;
|
49
|
+
stroke: currentColor;
|
50
|
+
stroke-miterlimit: 10;
|
51
|
+
stroke-width: 24px;
|
52
|
+
"
|
53
|
+
/>
|
54
|
+
</svg>
|
55
|
+
</template>
|
@@ -12,6 +12,7 @@
|
|
12
12
|
v-bind="noListenerAttrs"
|
13
13
|
v-model="files"
|
14
14
|
/>
|
15
|
+
<slot />
|
15
16
|
<div class="d-flex justify-end gc-1 mx-3 pt-2 pb-1">
|
16
17
|
<vcs-form-button
|
17
18
|
variant="filled"
|
@@ -41,6 +42,7 @@
|
|
41
42
|
* @vue-prop {function(Array<File>):boolean} importFiles - the callback to
|
42
43
|
* @vue-prop {string[]} [fileTypes=[]] - accepted file types, see https://html.spec.whatwg.org/multipage/input.html#attr-input-accept
|
43
44
|
* @vue-prop {boolean} [multiple=true] - allows or disallows importing multiple files at once
|
45
|
+
* @vue-data {#default} - Slot to add additional html after file input and before the buttons
|
44
46
|
*/
|
45
47
|
export default {
|
46
48
|
name: 'VcsImportComponent',
|
@@ -85,7 +85,6 @@
|
|
85
85
|
import {
|
86
86
|
computed,
|
87
87
|
getCurrentInstance,
|
88
|
-
inject,
|
89
88
|
isReactive,
|
90
89
|
reactive,
|
91
90
|
ref,
|
@@ -169,7 +168,8 @@
|
|
169
168
|
* @vue-prop {boolean} [selectable=false]
|
170
169
|
* @vue-prop {boolean} [singleSelect=false]
|
171
170
|
* @vue-prop {Array<import("./VcsListItemComponent.vue").VcsListItem>} [value=[]] - the initial items to be selected.
|
172
|
-
* @vue-prop {boolean} [searchable=false] - if this list can have its items searched.
|
171
|
+
* @vue-prop {boolean} [searchable=false] - if this list can have its items searched.
|
172
|
+
* @vue-prop {function(import("./VcsListItemComponent.vue").VcsListItem, string):boolean} [customFilter] - a function to customize filtering when searching.
|
173
173
|
* @vue-prop {string} [searchbarPlaceholder] - placeholder to render inside the search field
|
174
174
|
* @vue-prop {boolean} [showTitle=true] - show the title component
|
175
175
|
* @vue-prop {number} [actionButtonListOverflowCount] - overflow count to use for action lists in the title and items
|
@@ -221,6 +221,10 @@
|
|
221
221
|
type: Boolean,
|
222
222
|
default: false,
|
223
223
|
},
|
224
|
+
customFilter: {
|
225
|
+
type: Function,
|
226
|
+
default: undefined,
|
227
|
+
},
|
224
228
|
searchbarPlaceholder: {
|
225
229
|
type: String,
|
226
230
|
default: undefined,
|
@@ -313,15 +317,15 @@
|
|
313
317
|
|
314
318
|
const vm = getCurrentInstance().proxy;
|
315
319
|
/** @type {function(import("./VcsListItemComponent.vue").VcsListItem, string):boolean} */
|
316
|
-
const filterPredicate =
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
320
|
+
const filterPredicate = (item, queryString = '') => {
|
321
|
+
if (props.customFilter) {
|
322
|
+
return props.customFilter(item, queryString);
|
323
|
+
}
|
324
|
+
const translatedTitle = vm.$st(item.title);
|
325
|
+
return translatedTitle
|
326
|
+
.toLocaleLowerCase()
|
327
|
+
.includes(queryString.toLocaleLowerCase());
|
328
|
+
};
|
325
329
|
|
326
330
|
/**
|
327
331
|
* @type {import("./VcsListItemComponent.vue").VcsListItem|null}
|
@@ -30,6 +30,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
30
30
|
type: BooleanConstructor;
|
31
31
|
default: boolean;
|
32
32
|
};
|
33
|
+
customFilter: {
|
34
|
+
type: FunctionConstructor;
|
35
|
+
default: undefined;
|
36
|
+
};
|
33
37
|
searchbarPlaceholder: {
|
34
38
|
type: StringConstructor;
|
35
39
|
default: undefined;
|
@@ -119,6 +123,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
119
123
|
type: BooleanConstructor;
|
120
124
|
default: boolean;
|
121
125
|
};
|
126
|
+
customFilter: {
|
127
|
+
type: FunctionConstructor;
|
128
|
+
default: undefined;
|
129
|
+
};
|
122
130
|
searchbarPlaceholder: {
|
123
131
|
type: StringConstructor;
|
124
132
|
default: undefined;
|
@@ -160,6 +168,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
160
168
|
tooltip: string;
|
161
169
|
selectable: boolean;
|
162
170
|
actions: unknown[];
|
171
|
+
customFilter: Function;
|
163
172
|
searchbarPlaceholder: string;
|
164
173
|
actionButtonListOverflowCount: number;
|
165
174
|
singleSelect: boolean;
|