@vcmap/ui 5.1.8 → 5.2.1

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.
Files changed (99) hide show
  1. package/build/buildTypes.js +9 -0
  2. package/config/base.config.json +33 -2
  3. package/config/dev.config.json +22 -2
  4. package/config/www.config.json +16 -0
  5. package/dist/assets/cesium.js +1 -1
  6. package/dist/assets/{core.45041e.js → core.a8552c.js} +4160 -4041
  7. package/dist/assets/core.js +1 -1
  8. package/dist/assets/index-8783569c.js +1 -0
  9. package/dist/assets/ol.js +1 -1
  10. package/dist/assets/{ui.74ba2a.css → ui.aebd62.css} +2 -2
  11. package/dist/assets/{ui.74ba2a.js → ui.aebd62.js} +8031 -6985
  12. package/dist/assets/ui.js +1 -1
  13. package/dist/assets/vue.js +2 -2
  14. package/dist/assets/{vuetify.72ace9.js → vuetify.c8459d.js} +1 -1
  15. package/dist/assets/vuetify.js +2 -2
  16. package/dist/index.html +1 -1
  17. package/index.d.ts +22 -2
  18. package/index.js +29 -1
  19. package/package.json +2 -2
  20. package/plugins/@vcmap-show-case/collection-manager-example/src/CollectionManagerExample.vue +110 -37
  21. package/plugins/@vcmap-show-case/collection-manager-example/src/index.js +4 -0
  22. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +10 -3
  23. package/plugins/@vcmap-show-case/panel-tester/README.md +3 -0
  24. package/plugins/@vcmap-show-case/panel-tester/package.json +5 -0
  25. package/plugins/@vcmap-show-case/panel-tester/src/IframePanelExample.vue +15 -0
  26. package/plugins/@vcmap-show-case/panel-tester/src/ImgPanelExample.vue +19 -0
  27. package/plugins/@vcmap-show-case/panel-tester/src/PanelExample.vue +128 -0
  28. package/plugins/@vcmap-show-case/panel-tester/src/TextPanelExample.vue +34 -0
  29. package/plugins/@vcmap-show-case/panel-tester/src/index.js +63 -0
  30. package/plugins/package.json +7 -3
  31. package/src/actions/actionHelper.js +1 -1
  32. package/src/actions/flightActions.d.ts +38 -2
  33. package/src/actions/flightActions.js +257 -6
  34. package/src/application/VcsApp.vue +4 -104
  35. package/src/application/VcsApp.vue.d.ts +0 -6
  36. package/src/application/VcsContainer.vue +105 -0
  37. package/src/application/VcsContainer.vue.d.ts +14 -0
  38. package/src/application/VcsMainMap.vue +68 -0
  39. package/src/application/VcsMainMap.vue.d.ts +9 -0
  40. package/src/application/markdownHelper.d.ts +7 -0
  41. package/src/application/markdownHelper.js +57 -1
  42. package/src/components/form-inputs-controls/VcsRadioGrid.vue +27 -42
  43. package/src/contentTree/LayerTree.vue +40 -14
  44. package/src/downloadHelper.d.ts +0 -2
  45. package/src/downloadHelper.js +2 -4
  46. package/src/featureInfo/BalloonComponent.vue +31 -3
  47. package/src/featureInfo/BalloonComponent.vue.d.ts +1 -0
  48. package/src/featureInfo/IframeComponent.vue +55 -0
  49. package/src/featureInfo/IframeComponent.vue.d.ts +25 -0
  50. package/src/featureInfo/MarkdownBalloonComponent.vue +24 -0
  51. package/src/featureInfo/MarkdownBalloonComponent.vue.d.ts +12 -0
  52. package/src/featureInfo/abstractFeatureInfoView.js +54 -22
  53. package/src/featureInfo/addressBalloonFeatureInfoView.d.ts +2 -2
  54. package/src/featureInfo/addressBalloonFeatureInfoView.js +1 -1
  55. package/src/featureInfo/balloonFeatureInfoView.js +1 -1
  56. package/src/featureInfo/balloonHelper.js +16 -9
  57. package/src/featureInfo/featureInfo.js +15 -0
  58. package/src/featureInfo/iframeFeatureInfoView.js +1 -20
  59. package/src/featureInfo/iframeWmsFeatureInfoView.d.ts +41 -0
  60. package/src/featureInfo/iframeWmsFeatureInfoView.js +73 -0
  61. package/src/featureInfo/markdownBalloonFeatureInfoView.d.ts +47 -0
  62. package/src/featureInfo/markdownBalloonFeatureInfoView.js +81 -0
  63. package/src/featureInfo/markdownFeatureInfoView.d.ts +47 -0
  64. package/src/featureInfo/markdownFeatureInfoView.js +95 -0
  65. package/src/i18n/de.d.ts +8 -3
  66. package/src/i18n/de.js +3 -0
  67. package/src/i18n/en.d.ts +32 -26
  68. package/src/i18n/en.js +4 -1
  69. package/src/manager/collectionManager/CollectionComponent.vue +12 -49
  70. package/src/manager/collectionManager/CollectionComponent.vue.d.ts +5 -9
  71. package/src/manager/collectionManager/CollectionComponentContent.vue +102 -0
  72. package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +17 -0
  73. package/src/manager/collectionManager/CollectionComponentList.vue +10 -2
  74. package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +9 -0
  75. package/src/manager/collectionManager/CollectionComponentStandalone.vue +91 -0
  76. package/src/manager/collectionManager/CollectionComponentStandalone.vue.d.ts +9 -0
  77. package/src/manager/collectionManager/collectionManager.d.ts +2 -2
  78. package/src/manager/collectionManager/collectionManager.js +21 -19
  79. package/src/manager/panel/PanelComponent.vue +110 -0
  80. package/src/manager/panel/PanelComponent.vue.d.ts +19 -0
  81. package/src/manager/panel/PanelManagerComponent.vue +224 -0
  82. package/src/manager/panel/PanelManagerComponent.vue.d.ts +36 -0
  83. package/src/manager/panel/panelHelper.d.ts +83 -0
  84. package/src/manager/panel/panelHelper.js +272 -0
  85. package/src/manager/panel/panelManager.d.ts +338 -0
  86. package/src/manager/panel/panelManager.js +381 -0
  87. package/src/manager/window/WindowManager.vue +14 -0
  88. package/src/manager/window/windowHelper.js +1 -1
  89. package/src/manager/window/windowManager.js +4 -0
  90. package/src/search/ResultItem.vue +1 -1
  91. package/src/search/search.d.ts +2 -2
  92. package/src/search/search.js +2 -2
  93. package/src/vcsUiApp.d.ts +14 -0
  94. package/src/vcsUiApp.js +23 -1
  95. package/dist/assets/index-3cd5a3f3.js +0 -1
  96. /package/dist/assets/{cesium.035e3a.js → cesium.1b488a.js} +0 -0
  97. /package/dist/assets/{ol.eb3bee.js → ol.7488a7.js} +0 -0
  98. /package/dist/assets/{vue.17a8fa.js → vue.df3538.js} +0 -0
  99. /package/dist/assets/{vuetify.72ace9.css → vuetify.c8459d.css} +0 -0
@@ -0,0 +1,95 @@
1
+ import AbstractFeatureInfoView from './abstractFeatureInfoView.js';
2
+ import {
3
+ parseAndSanitizeMarkdown,
4
+ replaceAttributes,
5
+ } from '../application/markdownHelper.js';
6
+
7
+ /**
8
+ * @description A component to render markdown html
9
+ * @vue-prop {string} html - the html to render
10
+ */
11
+ const MarkdownComponent = {
12
+ name: 'MarkdownComponent',
13
+ props: {
14
+ html: {
15
+ type: String,
16
+ required: true,
17
+ },
18
+ },
19
+ template: '<div class="pa-2" v-html="html" />',
20
+ };
21
+
22
+ /**
23
+ * @typedef {import("./abstractFeatureInfoView.js").FeatureInfoViewOptions & { template: string | string[] }} MarkdownFeatureInfoViewOptions
24
+ * @property {string | string[]} template - a string or an array of strings which will be concatenated using \n
25
+ */
26
+
27
+ /**
28
+ * @typedef {import("./abstractFeatureInfoView.js").FeatureInfoProps & { html: string }} MarkdownFeatureInfoViewProps
29
+ */
30
+
31
+ /**
32
+ * @class
33
+ * @description A simple markdown feature info view. will render feature attributes into the markdown and replace {{}}
34
+ * @extends {AbstractFeatureInfoView}
35
+ */
36
+ class MarkdownFeatureInfoView extends AbstractFeatureInfoView {
37
+ /**
38
+ * @type {string}
39
+ */
40
+ static get className() {
41
+ return 'MarkdownFeatureInfoView';
42
+ }
43
+
44
+ /**
45
+ * @param {MarkdownFeatureInfoViewOptions} options
46
+ */
47
+ constructor(options) {
48
+ super(options, MarkdownComponent);
49
+
50
+ /**
51
+ * @type {string | string[]}
52
+ */
53
+ this.template = Array.isArray(options.template)
54
+ ? options.template.slice()
55
+ : options.template;
56
+ }
57
+
58
+ /**
59
+ * @param {Record<string, unknown>} attributes
60
+ * @protected
61
+ * @returns {string}
62
+ */
63
+ _renderTemplate(attributes) {
64
+ return replaceAttributes(this.template, attributes);
65
+ }
66
+
67
+ /**
68
+ * Variables wrapped in `${}` within `src` are replaced by their values, e.g. `${featureId}` or `${attributes.gml:name}`
69
+ * @param {import("./featureInfo.js").FeatureInfoEvent} featureInfo
70
+ * @param {import("@vcmap/core").Layer} layer
71
+ * @returns {MarkdownFeatureInfoViewProps}
72
+ */
73
+ getProperties(featureInfo, layer) {
74
+ const properties = super.getProperties(featureInfo, layer);
75
+ return {
76
+ ...properties,
77
+ html: parseAndSanitizeMarkdown(
78
+ this._renderTemplate({ ...properties, ...properties.attributes }),
79
+ ),
80
+ };
81
+ }
82
+
83
+ /**
84
+ * @returns {MarkdownFeatureInfoViewOptions}
85
+ */
86
+ toJSON() {
87
+ const config = super.toJSON();
88
+ config.template = Array.isArray(this.template)
89
+ ? this.template.slice()
90
+ : this.template;
91
+ return config;
92
+ }
93
+ }
94
+
95
+ export default MarkdownFeatureInfoView;
package/src/i18n/de.d.ts CHANGED
@@ -142,6 +142,10 @@ declare namespace messages {
142
142
  export let zoomToAnchor: string;
143
143
  export let noAnchor: string;
144
144
  export let invalidDuration: string;
145
+ export let zoom: string;
146
+ let _export: string;
147
+ export { _export as export };
148
+ export let exportPath: string;
145
149
  }
146
150
  export namespace viewpoint {
147
151
  let name_2: string;
@@ -180,7 +184,8 @@ declare namespace messages {
180
184
  export let show: string;
181
185
  export let hide: string;
182
186
  export let create: string;
183
- export let zoom: string;
187
+ let zoom_1: string;
188
+ export { zoom_1 as zoom };
184
189
  export let invalid: string;
185
190
  export let editVertices: string;
186
191
  export let translate: string;
@@ -337,8 +342,8 @@ declare namespace messages {
337
342
  export let editItem: string;
338
343
  let _import_1: string;
339
344
  export { _import_1 as import };
340
- let _export: string;
341
- export { _export as export };
345
+ let _export_1: string;
346
+ export { _export_1 as export };
342
347
  let _delete: string;
343
348
  export { _delete as delete };
344
349
  let edit_1: string;
package/src/i18n/de.js CHANGED
@@ -132,6 +132,9 @@ const messages = {
132
132
  zoomToAnchor: 'Auf Stützpunkt zoomen',
133
133
  noAnchor: 'Es sind noch keine Stützpunkte definiert.',
134
134
  invalidDuration: 'Die Gesamtflugzeit muss größer als Null sein!',
135
+ zoom: 'Auf Ausdehnung zoomen',
136
+ export: 'Flug exportieren',
137
+ exportPath: 'Flugpfad exportieren',
135
138
  },
136
139
  viewpoint: {
137
140
  name: 'Name (ID)',
package/src/i18n/en.d.ts CHANGED
@@ -142,11 +142,16 @@ declare namespace messages {
142
142
  export let zoomToAnchor: string;
143
143
  export let noAnchor: string;
144
144
  export let invalidDuration: string;
145
+ export let zoom: string;
146
+ let _export: string;
147
+ export { _export as export };
148
+ export let exportPath: string;
145
149
  }
146
150
  export namespace viewpoint {
147
151
  let name_2: string;
148
152
  export { name_2 as name };
149
- export let viewpointTitle: string;
153
+ let title_7: string;
154
+ export { title_7 as title };
150
155
  let titlePlaceholder_1: string;
151
156
  export { titlePlaceholder_1 as titlePlaceholder };
152
157
  export let groundPosition: string;
@@ -171,15 +176,16 @@ declare namespace messages {
171
176
  let outOfRange: string;
172
177
  }
173
178
  export namespace extent {
174
- let title_7: string;
175
- export { title_7 as title };
179
+ let title_8: string;
180
+ export { title_8 as title };
176
181
  export let projection: string;
177
182
  export let min: string;
178
183
  export let max: string;
179
184
  export let show: string;
180
185
  export let hide: string;
181
186
  export let create: string;
182
- export let zoom: string;
187
+ let zoom_1: string;
188
+ export { zoom_1 as zoom };
183
189
  export let invalid: string;
184
190
  export let editVertices: string;
185
191
  export let translate: string;
@@ -239,21 +245,21 @@ declare namespace messages {
239
245
  }
240
246
  }
241
247
  export namespace settings {
242
- let title_8: string;
243
- export { title_8 as title };
248
+ let title_9: string;
249
+ export { title_9 as title };
244
250
  let tooltip_3: string;
245
251
  export { tooltip_3 as tooltip };
246
252
  export let languageSelector: string;
247
253
  export namespace theme {
248
- let title_9: string;
249
- export { title_9 as title };
254
+ let title_10: string;
255
+ export { title_10 as title };
250
256
  export let dark: string;
251
257
  export let light: string;
252
258
  }
253
259
  }
254
260
  export namespace help_1 {
255
- let title_10: string;
256
- export { title_10 as title };
261
+ let title_11: string;
262
+ export { title_11 as title };
257
263
  let tooltip_4: string;
258
264
  export { tooltip_4 as tooltip };
259
265
  }
@@ -263,8 +269,8 @@ declare namespace messages {
263
269
  let deactivateToolTitle: string;
264
270
  }
265
271
  export namespace legend {
266
- let title_11: string;
267
- export { title_11 as title };
272
+ let title_12: string;
273
+ export { title_12 as title };
268
274
  let tooltip_5: string;
269
275
  export { tooltip_5 as tooltip };
270
276
  let empty_2: string;
@@ -273,8 +279,8 @@ declare namespace messages {
273
279
  export let defaultLabelText: string;
274
280
  }
275
281
  export namespace search_1 {
276
- let title_12: string;
277
- export { title_12 as title };
282
+ let title_13: string;
283
+ export { title_13 as title };
278
284
  let tooltip_6: string;
279
285
  export { tooltip_6 as tooltip };
280
286
  export let select: string;
@@ -290,31 +296,31 @@ declare namespace messages {
290
296
  export let miscellaneous: string;
291
297
  }
292
298
  export namespace footer {
293
- let title_13: string;
294
- export { title_13 as title };
299
+ let title_14: string;
300
+ export { title_14 as title };
295
301
  export namespace attributions {
296
- let title_14: string;
297
- export { title_14 as title };
302
+ let title_15: string;
303
+ export { title_15 as title };
298
304
  let tooltip_7: string;
299
305
  export { tooltip_7 as tooltip };
300
306
  let empty_3: string;
301
307
  export { empty_3 as empty };
302
308
  }
303
309
  export namespace imprint {
304
- let title_15: string;
305
- export { title_15 as title };
310
+ let title_16: string;
311
+ export { title_16 as title };
306
312
  let tooltip_8: string;
307
313
  export { tooltip_8 as tooltip };
308
314
  }
309
315
  export namespace dataProtection {
310
- let title_16: string;
311
- export { title_16 as title };
316
+ let title_17: string;
317
+ export { title_17 as title };
312
318
  let tooltip_9: string;
313
319
  export { tooltip_9 as tooltip };
314
320
  }
315
321
  export namespace positionDisplay {
316
- let title_17: string;
317
- export { title_17 as title };
322
+ let title_18: string;
323
+ export { title_18 as title };
318
324
  let projection_1: string;
319
325
  export { projection_1 as projection };
320
326
  }
@@ -336,8 +342,8 @@ declare namespace messages {
336
342
  export let editItem: string;
337
343
  let _import_1: string;
338
344
  export { _import_1 as import };
339
- let _export: string;
340
- export { _export as export };
345
+ let _export_1: string;
346
+ export { _export_1 as export };
341
347
  let _delete: string;
342
348
  export { _delete as delete };
343
349
  let edit_1: string;
package/src/i18n/en.js CHANGED
@@ -132,10 +132,13 @@ const messages = {
132
132
  zoomToAnchor: 'Zoom to anchor',
133
133
  noAnchor: 'No flight anchor available yet.',
134
134
  invalidDuration: 'The total flight duration must be greater zero!',
135
+ zoom: 'Zoom to extent',
136
+ export: 'Export flight',
137
+ exportPath: 'Export flight path',
135
138
  },
136
139
  viewpoint: {
137
140
  name: 'Name (ID)',
138
- viewpointTitle: 'Title',
141
+ title: 'Title',
139
142
  titlePlaceholder: 'Title of viewpoint',
140
143
  groundPosition: 'Ground position',
141
144
  cameraPosition: 'Camera position',
@@ -21,23 +21,7 @@
21
21
  </template>
22
22
  </v-expansion-panel-header>
23
23
  <v-expansion-panel-content class="pb-1">
24
- <vcs-list
25
- :items="items.slice(0, limit)"
26
- :draggable="draggable"
27
- :selectable="selectable"
28
- :single-select="singleSelect"
29
- v-model="selection"
30
- :show-title="false"
31
- @item-moved="move"
32
- />
33
- <v-sheet v-if="items.length > limit" class="ma-2 pl-2">
34
- <VcsButton @click="openCollectionComponentList">
35
- {{ $t('collectionManager.more') }}
36
- </VcsButton>
37
- </v-sheet>
38
- <v-sheet v-else-if="items.length === 0" class="ma-2 pl-2">
39
- {{ $t('collectionManager.empty') }}
40
- </v-sheet>
24
+ <CollectionComponentContent @openList="(id) => $emit('openList', id)" />
41
25
  </v-expansion-panel-content>
42
26
  </v-expansion-panel>
43
27
  </template>
@@ -49,30 +33,31 @@
49
33
  VExpansionPanel,
50
34
  VExpansionPanelHeader,
51
35
  VExpansionPanelContent,
52
- VSheet,
53
36
  } from 'vuetify/lib';
54
- import VcsList, {
55
- createSelectionActions,
56
- } from '../../components/lists/VcsList.vue';
37
+ import { createSelectionActions } from '../../components/lists/VcsList.vue';
57
38
  import VcsActionButtonList from '../../components/buttons/VcsActionButtonList.vue';
58
- import VcsButton from '../../components/buttons/VcsButton.vue';
59
- import { moveItem } from './CollectionComponentList.vue';
39
+ import CollectionComponentContent from './CollectionComponentContent.vue';
40
+
41
+ /**
42
+ * @typedef {Object} FormSectionOptions
43
+ * @property {boolean} [expandable]
44
+ * @property {boolean} [startOpen]
45
+ * @property {boolean} [disabled]
46
+ */
60
47
 
61
48
  /**
62
49
  * @description
63
- * Renders the first ten items of a collectionComponent in a List. Uses CollectionComponentList to render more items.
50
+ * Renders content of CollectionComponentClass in an expansion panel using CollectionComponentContent.vue
64
51
  * The collectionComponent must be passed via {@link https://vuejs.org/api/composition-api-dependency-injection.html |provide }.
65
52
  */
66
53
  export default {
67
54
  name: 'CollectionComponent',
68
55
  components: {
56
+ CollectionComponentContent,
69
57
  VcsActionButtonList,
70
- VcsButton,
71
- VcsList,
72
58
  VExpansionPanel,
73
59
  VExpansionPanelHeader,
74
60
  VExpansionPanelContent,
75
- VSheet,
76
61
  VIcon,
77
62
  },
78
63
  setup(_props, { emit }) {
@@ -91,13 +76,9 @@
91
76
 
92
77
  return {
93
78
  title: collectionComponent.title,
94
- items: collectionComponent.items,
95
79
  selection: collectionComponent.selection,
96
- draggable: collectionComponent.draggable,
97
80
  selectable: collectionComponent.selectable,
98
- singleSelect: collectionComponent.singleSelect,
99
81
  overflowCount: collectionComponent.overflowCount,
100
- limit: collectionComponent.limit,
101
82
  actions: computed(() => {
102
83
  if (
103
84
  collectionComponent.selectable.value &&
@@ -107,12 +88,6 @@
107
88
  }
108
89
  return actions.value;
109
90
  }),
110
- move({ item, targetIndex }) {
111
- moveItem(collectionComponent, item, targetIndex);
112
- },
113
- openCollectionComponentList() {
114
- emit('openList', collectionComponent.id);
115
- },
116
91
  };
117
92
  },
118
93
  };
@@ -125,16 +100,4 @@
125
100
  .v-icon {
126
101
  font-size: 16px;
127
102
  }
128
- ::v-deep {
129
- .v-list {
130
- .v-list-item {
131
- padding: 4px 8px 4px 28px;
132
- }
133
- .v-list-item__selected {
134
- border-left: solid 4px;
135
- border-left-color: var(--v-primary-base);
136
- padding-left: 24px !important;
137
- }
138
- }
139
- }
140
103
  </style>
@@ -1,17 +1,13 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
2
  title: any;
3
- items: any;
4
3
  selection: any;
5
- draggable: any;
6
4
  selectable: any;
7
- singleSelect: any;
8
5
  overflowCount: any;
9
- limit: any;
10
6
  actions: import("vue").ComputedRef<any>;
11
- move({ item, targetIndex }: {
12
- item: any;
13
- targetIndex: any;
14
- }): void;
15
- openCollectionComponentList(): void;
16
7
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
17
8
  export default _default;
9
+ export type FormSectionOptions = {
10
+ expandable?: boolean | undefined;
11
+ startOpen?: boolean | undefined;
12
+ disabled?: boolean | undefined;
13
+ };
@@ -0,0 +1,102 @@
1
+ <template>
2
+ <v-container class="py-0 px-0">
3
+ <vcs-list
4
+ :items="items.slice(0, limit)"
5
+ :draggable="draggable"
6
+ :selectable="selectable"
7
+ :single-select="singleSelect"
8
+ v-model="selection"
9
+ :show-title="false"
10
+ @item-moved="move"
11
+ />
12
+ <v-sheet v-if="items.length > limit" class="ma-2 pl-2">
13
+ <VcsButton @click="openCollectionComponentList">
14
+ {{ $t('collectionManager.more') }}
15
+ </VcsButton>
16
+ </v-sheet>
17
+ <v-sheet v-else-if="items.length === 0" class="ma-2 pl-2">
18
+ {{ $t('collectionManager.empty') }}
19
+ </v-sheet>
20
+ </v-container>
21
+ </template>
22
+
23
+ <script>
24
+ import { computed, inject } from 'vue';
25
+ import { VSheet, VContainer } from 'vuetify/lib';
26
+ import VcsList, {
27
+ createSelectionActions,
28
+ } from '../../components/lists/VcsList.vue';
29
+ import VcsButton from '../../components/buttons/VcsButton.vue';
30
+ import { moveItem } from './CollectionComponentList.vue';
31
+
32
+ /**
33
+ * @description
34
+ * Renders the first ten items of a collectionComponent in a List. Uses CollectionComponentList to render more items.
35
+ * The collectionComponent must be passed via {@link https://vuejs.org/api/composition-api-dependency-injection.html |provide }.
36
+ * @vue-event {string} openList
37
+ */
38
+ export default {
39
+ name: 'CollectionComponent',
40
+ components: {
41
+ VcsButton,
42
+ VcsList,
43
+ VSheet,
44
+ VContainer,
45
+ },
46
+ setup(_props, { emit }) {
47
+ /**
48
+ * @type {CollectionComponentClass}
49
+ */
50
+ const collectionComponent = inject('collectionComponent');
51
+
52
+ const selectionActions = createSelectionActions(
53
+ collectionComponent.items,
54
+ collectionComponent.selection,
55
+ emit,
56
+ );
57
+
58
+ const actions = collectionComponent.getActions();
59
+
60
+ return {
61
+ title: collectionComponent.title,
62
+ items: collectionComponent.items,
63
+ selection: collectionComponent.selection,
64
+ draggable: collectionComponent.draggable,
65
+ selectable: collectionComponent.selectable,
66
+ singleSelect: collectionComponent.singleSelect,
67
+ overflowCount: collectionComponent.overflowCount,
68
+ limit: collectionComponent.limit,
69
+ actions: computed(() => {
70
+ if (
71
+ collectionComponent.selectable.value &&
72
+ !collectionComponent.singleSelect.value
73
+ ) {
74
+ return [...selectionActions, ...actions.value];
75
+ }
76
+ return actions.value;
77
+ }),
78
+ move({ item, targetIndex }) {
79
+ moveItem(collectionComponent, item, targetIndex);
80
+ },
81
+ openCollectionComponentList() {
82
+ emit('openList', collectionComponent.id);
83
+ },
84
+ };
85
+ },
86
+ };
87
+ </script>
88
+
89
+ <style lang="scss" scoped>
90
+ ::v-deep {
91
+ .v-list {
92
+ .v-list-item {
93
+ padding: 4px 8px 4px 28px;
94
+ }
95
+ .v-list-item__selected {
96
+ border-left: solid 4px;
97
+ border-left-color: var(--v-primary-base);
98
+ padding-left: 24px !important;
99
+ }
100
+ }
101
+ }
102
+ </style>
@@ -0,0 +1,17 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ title: any;
3
+ items: any;
4
+ selection: any;
5
+ draggable: any;
6
+ selectable: any;
7
+ singleSelect: any;
8
+ overflowCount: any;
9
+ limit: any;
10
+ actions: import("vue").ComputedRef<any>;
11
+ move({ item, targetIndex }: {
12
+ item: any;
13
+ targetIndex: any;
14
+ }): void;
15
+ openCollectionComponentList(): void;
16
+ }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
17
+ export default _default;
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <div>
3
- <div class="v-expansion-panel-header px-2 v-expansion-panel-header--active">
3
+ <div
4
+ v-if="!hideHeader"
5
+ class="v-expansion-panel-header px-2 v-expansion-panel-header--active"
6
+ >
4
7
  <div class="d-flex justify-space-between">
5
8
  <div class="d-flex align-center gap-1 pl-2">
6
9
  <span>
@@ -69,7 +72,8 @@
69
72
  * @description
70
73
  * Renders the items of a CollectionComponentClass in a List.
71
74
  * The collectionComponent must be passed via {@link https://vuejs.org/api/composition-api-dependency-injection.html |provide }.
72
- * @vue-prop {string} showLessButton - Show a `show less button` at the end of the list, which will emit a closeList event
75
+ * @vue-prop {boolean} showLessButton - Show a `show less button` at the end of the list, which will emit a closeList event
76
+ * @vue-prop {boolean} hideHeader - Whether to hide the header or not
73
77
  */
74
78
  export default {
75
79
  name: 'CollectionComponentList',
@@ -78,6 +82,10 @@
78
82
  type: Boolean,
79
83
  default: true,
80
84
  },
85
+ hideHeader: {
86
+ type: Boolean,
87
+ default: false,
88
+ },
81
89
  },
82
90
  components: {
83
91
  VcsButton,
@@ -12,6 +12,10 @@ declare const _default: import("vue").DefineComponent<{
12
12
  type: BooleanConstructor;
13
13
  default: boolean;
14
14
  };
15
+ hideHeader: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
15
19
  }, {
16
20
  title: any;
17
21
  items: any;
@@ -32,7 +36,12 @@ declare const _default: import("vue").DefineComponent<{
32
36
  type: BooleanConstructor;
33
37
  default: boolean;
34
38
  };
39
+ hideHeader: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
35
43
  }>>, {
44
+ hideHeader: boolean;
36
45
  showLessButton: boolean;
37
46
  }>;
38
47
  export default _default;