@vcmap/ui 5.0.1 → 5.0.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/dist/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui.7758a8.js";
1
+ export * from "./ui.aeb2ec.js";
@@ -1,5 +1,5 @@
1
- export * from "./vue.9771b3.js";
2
- import { default as f } from "./vue.9771b3.js";
1
+ export * from "./vue.8e1850.js";
2
+ import { default as f } from "./vue.8e1850.js";
3
3
  export {
4
4
  f as default
5
5
  };
@@ -13,7 +13,7 @@ function loadCss(href) {
13
13
  elem.onerror = reject;
14
14
  document.head.appendChild(elem);
15
15
  });
16
- } await loadCss('./assets/vuetify.2818ff.css');import v from "./vue.9771b3.js";
16
+ } await loadCss('./assets/vuetify.3ed426.css');import v from "./vue.8e1850.js";
17
17
  const Ne = v.extend().extend({
18
18
  name: "themeable",
19
19
  provide() {
@@ -1,5 +1,5 @@
1
- export * from "./vuetify.2818ff.js";
2
- import { default as f } from "./vuetify.2818ff.js";
1
+ export * from "./vuetify.3ed426.js";
2
+ import { default as f } from "./vuetify.3ed426.js";
3
3
  export {
4
4
  f as default
5
5
  };
package/dist/index.html CHANGED
@@ -91,9 +91,9 @@
91
91
  }
92
92
  }
93
93
  </style>
94
- <script type="module" crossorigin src="./assets/index-f265c560.js"></script>
94
+ <script type="module" crossorigin src="./assets/index-661636d9.js"></script>
95
95
  </head>
96
- <body style="height: 100vh">
96
+ <body style="height: 100vh; margin: 0;">
97
97
  <noscript>
98
98
  <strong>...</strong>
99
99
  </noscript>
package/index.html CHANGED
@@ -92,7 +92,7 @@
92
92
  }
93
93
  </style>
94
94
  </head>
95
- <body style="height: 100vh">
95
+ <body style="height: 100vh; margin: 0;">
96
96
  <noscript>
97
97
  <strong>...</strong>
98
98
  </noscript>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -45,8 +45,8 @@
45
45
  "vue-i18n": "^8.24.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@vcmap-cesium/engine": "^4.0.0",
49
- "@vcmap/core": "^5.0.0",
48
+ "@vcmap-cesium/engine": "^4.0.3",
49
+ "@vcmap/core": "^5.0.2",
50
50
  "ol": "^7.5.2",
51
51
  "vue": "~2.7.3",
52
52
  "vuetify": "~2.6.7"
@@ -12,7 +12,10 @@ import { reactive, ref } from 'vue';
12
12
  import { parseBoolean } from '@vcsuite/parsers';
13
13
  import { vcsAppSymbol } from '../pluginHelper.js';
14
14
  import { WindowSlot } from '../manager/window/windowManager.js';
15
- import { getWindowPositionOptions } from '../manager/window/windowHelper.js';
15
+ import {
16
+ getFittedWindowPositionOptionsFromMapEvent,
17
+ getTargetSize,
18
+ } from '../manager/window/windowHelper.js';
16
19
  import SearchComponent from '../search/SearchComponent.vue';
17
20
 
18
21
  /**
@@ -268,9 +271,16 @@ export function createModalAction(actionOptions, modalComponent, app, owner) {
268
271
  event.currentTarget.getBoundingClientRect();
269
272
  modalActivator = event.currentTarget;
270
273
  const position = {
271
- ...getWindowPositionOptions(left + width, top, app.maps.target),
274
+ ...getFittedWindowPositionOptionsFromMapEvent(
275
+ { x: left + width, y: top - getTargetSize(app.maps.target).top },
276
+ windowPositionOptions?.width || 320,
277
+ windowPositionOptions?.height || 0,
278
+ app.maps.target,
279
+ ),
272
280
  ...windowPositionOptions,
273
281
  };
282
+ position.maxWidth = 320;
283
+ position.width = windowPositionOptions?.width || -1; // unset width magic. dont touch.
274
284
  const state = { ...modalComponent?.state, hideHeader: true };
275
285
  app.windowManager.add({ position, ...component, id, state }, owner);
276
286
  document.addEventListener('mousedown', handleMouseDown);
@@ -109,6 +109,10 @@
109
109
  props: {
110
110
  windowId,
111
111
  },
112
+ state: {
113
+ headerTitle: 'collectionManager.more',
114
+ headerIcon: '$vcsComponents',
115
+ },
112
116
  provides: {
113
117
  collectionComponent,
114
118
  },
@@ -1,19 +1,34 @@
1
1
  <template>
2
- <vcs-list
3
- :items="items"
4
- :draggable="draggable"
5
- :selectable="selectable"
6
- :single-select="singleSelect"
7
- v-model="selection"
8
- :title="title"
9
- @item-moved="move"
10
- />
2
+ <div>
3
+ <div class="v-expansion-panel-header px-2 v-expansion-panel-header--active">
4
+ <div class="d-flex justify-space-between">
5
+ <div class="d-flex align-center">
6
+ {{ $t(title) }}
7
+ </div>
8
+ <VcsActionButtonList
9
+ v-if="actions?.length > 0"
10
+ :actions="actions"
11
+ :overflow-count="overflowCount"
12
+ />
13
+ </div>
14
+ </div>
15
+ <vcs-list
16
+ :items="items"
17
+ :draggable="draggable"
18
+ :selectable="selectable"
19
+ :single-select="singleSelect"
20
+ v-model="selection"
21
+ :show-title="false"
22
+ @item-moved="move"
23
+ />
24
+ </div>
11
25
  </template>
12
26
 
13
27
  <script>
14
28
  import { inject } from 'vue';
15
29
  import { IndexedCollection } from '@vcmap/core';
16
30
  import VcsList from '../../components/lists/VcsList.vue';
31
+ import VcsActionButtonList from '../../components/buttons/VcsActionButtonList.vue';
17
32
 
18
33
  /**
19
34
  * Moves an item to a new position.
@@ -45,6 +60,7 @@
45
60
  export default {
46
61
  name: 'CollectionComponentList',
47
62
  components: {
63
+ VcsActionButtonList,
48
64
  VcsList,
49
65
  },
50
66
  props: {
@@ -66,6 +82,9 @@
66
82
  draggable: collectionComponent.draggable,
67
83
  selectable: collectionComponent.selectable,
68
84
  singleSelect: collectionComponent.singleSelect,
85
+ overflowCount: collectionComponent.overflowCount,
86
+ limit: collectionComponent.limit,
87
+ actions: collectionComponent.getActions(),
69
88
  move({ item, targetIndex }) {
70
89
  moveItem(collectionComponent, item, targetIndex);
71
90
  },
package/src/vcsUiApp.js CHANGED
@@ -83,7 +83,7 @@ import { callbackClassRegistry } from './callback/vcsCallback.js';
83
83
  * @property {function():P} [toJSON] - should return the plugin's serialization excluding all default values
84
84
  * @property {function():P} [getDefaultOptions] - should return the plugin's default options
85
85
  * @property {function(boolean=):S|Promise<S>} [getState] - should return the plugin's state or a promise for said state. is passed a "for url" flag. If true, only the state relevant for sharing a URL should be passed and short keys shall be used
86
- * @property {Array<PluginConfigEditor>} [getConfigEditors] - should return components for configuring the plugin or custom items defined by the plugin
86
+ * @property {function():Array<PluginConfigEditor>} [getConfigEditors] - should return components for configuring the plugin or custom items defined by the plugin
87
87
  * @property {function():Promise<void>} destroy
88
88
  * @api
89
89
  */
@@ -1 +0,0 @@
1
- import{initAppFromAppConfig as p}from"./ui.7758a8.js";p("#app","app.config.json");
File without changes
File without changes