@vcmap/ui 6.0.0-rc.2 → 6.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/build/build.js +40 -60
  2. package/build/buildHelpers.js +2 -8
  3. package/build/info/conf.json +1 -1
  4. package/config/projects.config.json +2 -1
  5. package/config/splashscreen.config.json +45 -0
  6. package/dist/.htaccess +7 -0
  7. package/dist/assets/@mdi/font/README.md +25 -0
  8. package/dist/assets/@mdi/font/css/materialdesignicons.min-7a4f6be0.css +3 -0
  9. package/dist/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
  10. package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  11. package/dist/assets/cesium.js +1 -1
  12. package/dist/assets/{core.cbf44a.js → core-72f21835.js} +673 -641
  13. package/dist/assets/core.js +1 -1
  14. package/dist/assets/{ol.86e93c.js → ol-2d33bc8b.js} +42505 -44282
  15. package/dist/assets/ol.js +1 -1
  16. package/dist/assets/ui-2ab43a16.css +1 -0
  17. package/dist/assets/{ui.7c276c.js → ui-2ab43a16.js} +12026 -12100
  18. package/dist/assets/ui.js +1 -1
  19. package/dist/assets/vue.js +1 -1
  20. package/dist/assets/{vuetify.4d18fe.css → vuetify-760ced3b.css} +1 -1
  21. package/dist/assets/{vuetify.4d18fe.js → vuetify-760ced3b.js} +5720 -5662
  22. package/dist/assets/vuetify.js +1 -1
  23. package/dist/index.html +11 -10
  24. package/index.d.ts +7 -5
  25. package/index.html +5 -5
  26. package/index.js +3 -3
  27. package/lib/olLib.js +84 -23
  28. package/package.json +5 -5
  29. package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +41 -1
  30. package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +70 -30
  31. package/plugins/@vcmap-show-case/form-inputs-example/src/exampleActions.js +7 -11
  32. package/plugins/@vcmap-show-case/form-inputs-example/src/index.js +2 -2
  33. package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +21 -8
  34. package/plugins/@vcmap-show-case/style-input-example/src/StyleExample.vue +29 -90
  35. package/public/assets/@mdi/font/README.md +25 -0
  36. package/public/assets/@mdi/font/css/materialdesignicons.min.css +2 -2
  37. package/public/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
  38. package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
  39. package/src/actions/actionHelper.js +20 -20
  40. package/src/actions/flightActions.js +5 -5
  41. package/src/actions/listActions.d.ts +0 -7
  42. package/src/actions/listActions.js +4 -20
  43. package/src/actions/stateRefAction.js +2 -2
  44. package/src/application/VcsApp.vue +52 -27
  45. package/src/application/VcsApp.vue.d.ts +1 -0
  46. package/src/application/VcsAttributions.vue +2 -13
  47. package/src/application/VcsAttributionsFooter.vue +10 -11
  48. package/src/application/VcsPositionDisplay.vue +8 -23
  49. package/src/application/VcsPositionDisplay.vue.d.ts +0 -1
  50. package/src/application/VcsSettings.vue +10 -17
  51. package/src/application/VcsSplashScreen.vue +25 -42
  52. package/src/application/VcsSplashScreen.vue.d.ts +0 -2
  53. package/src/application/VcsTextPage.vue +12 -43
  54. package/src/application/VcsTextPage.vue.d.ts +4 -8
  55. package/src/application/VcsTextPageFooter.vue +22 -40
  56. package/src/components/extent/VcsExtentEditor.vue +1 -1
  57. package/src/components/flight/VcsFlightAnchorsComponent.vue +63 -36
  58. package/src/components/flight/VcsFlightComponent.vue +16 -21
  59. package/src/components/flight/VcsFlightPlayer.vue +27 -5
  60. package/src/components/form-inputs-controls/VcsCheckbox.vue +9 -5
  61. package/src/components/form-inputs-controls/VcsCoordinate.vue +13 -1
  62. package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +5 -2
  63. package/src/components/form-inputs-controls/VcsDatePicker.vue +34 -60
  64. package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +1 -63
  65. package/src/components/form-inputs-controls/VcsFileInput.vue +17 -18
  66. package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -0
  67. package/src/components/form-inputs-controls/VcsLabel.vue +1 -1
  68. package/src/components/form-inputs-controls/VcsRadio.vue +17 -3
  69. package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
  70. package/src/components/form-inputs-controls/VcsSelect.vue +39 -27
  71. package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +5 -2
  72. package/src/components/form-inputs-controls/VcsSlider.vue +14 -1
  73. package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +5 -2
  74. package/src/components/form-inputs-controls/VcsTextArea.vue +26 -22
  75. package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -0
  76. package/src/components/form-inputs-controls/VcsTextField.vue +6 -4
  77. package/src/components/form-inputs-controls/VcsWizardStep.vue +1 -1
  78. package/src/components/form-inputs-controls/vcsTextField.scss +8 -8
  79. package/src/components/form-output/VcsFormattedNumber.vue +15 -1
  80. package/src/components/form-output/VcsFormattedNumber.vue.d.ts +9 -0
  81. package/src/components/lists/VcsActionList.vue +7 -7
  82. package/src/components/lists/VcsList.vue +10 -17
  83. package/src/components/lists/VcsList.vue.d.ts +3 -7
  84. package/src/components/lists/VcsListItem.vue +51 -21
  85. package/src/components/lists/VcsListItem.vue.d.ts +11 -5
  86. package/src/components/section/VcsExpansionPanel.vue +101 -0
  87. package/src/components/section/VcsExpansionPanel.vue.d.ts +19 -0
  88. package/src/components/style/MenuWrapper.vue +24 -26
  89. package/src/components/style/MenuWrapper.vue.d.ts +4 -4
  90. package/src/components/style/VcsFillMenu.vue +9 -16
  91. package/src/components/style/VcsFillMenu.vue.d.ts +0 -18
  92. package/src/components/style/VcsFillSelector.vue +13 -16
  93. package/src/components/style/VcsImageMenu.vue +8 -25
  94. package/src/components/style/VcsImageMenu.vue.d.ts +0 -27
  95. package/src/components/style/VcsImageSelector.vue +102 -167
  96. package/src/components/style/VcsImageSelector.vue.d.ts +15 -15
  97. package/src/components/style/VcsStrokeMenu.vue +8 -15
  98. package/src/components/style/VcsStrokeMenu.vue.d.ts +0 -18
  99. package/src/components/style/VcsStrokeSelector.vue +11 -18
  100. package/src/components/style/VcsTextMenu.vue +9 -12
  101. package/src/components/style/VcsTextMenu.vue.d.ts +0 -9
  102. package/src/components/style/VcsTextSelector.vue +79 -95
  103. package/src/components/style/VcsTextSelector.vue.d.ts +20 -22
  104. package/src/components/style/VcsVectorStyleComponent.vue +7 -18
  105. package/src/components/style/VcsVectorStyleComponent.vue.d.ts +1 -1
  106. package/src/components/style/composables.d.ts +0 -14
  107. package/src/components/style/composables.js +0 -49
  108. package/src/components/vector-properties/VcsFeatureEditingWindow.vue +39 -6
  109. package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +1 -1
  110. package/src/components/viewpoint/VcsViewpointComponent.vue +21 -8
  111. package/src/components/viewpoint/VcsViewpointEditor.vue +1 -0
  112. package/src/contentTree/contentTreeItem.d.ts +2 -2
  113. package/src/contentTree/contentTreeItem.js +7 -7
  114. package/src/featureInfo/featureInfo.js +8 -10
  115. package/src/init.d.ts +5 -38
  116. package/src/init.js +19 -18
  117. package/src/legend/StyleLegendItem.vue +4 -9
  118. package/src/legend/VcsLegend.vue +28 -54
  119. package/src/manager/buttonManager.js +4 -4
  120. package/src/manager/collectionManager/CollectionComponent.vue +17 -42
  121. package/src/manager/collectionManager/CollectionComponent.vue.d.ts +4 -2
  122. package/src/manager/collectionManager/CollectionComponentContent.vue +7 -6
  123. package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +3 -1
  124. package/src/manager/collectionManager/CollectionComponentList.vue +10 -8
  125. package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +4 -2
  126. package/src/manager/collectionManager/CollectionComponentProvider.vue +1 -1
  127. package/src/manager/collectionManager/CollectionComponentStandalone.vue +3 -2
  128. package/src/manager/collectionManager/CollectionManager.vue +1 -1
  129. package/src/manager/collectionManager/collectionComponentClass.js +6 -9
  130. package/src/manager/collectionManager/collectionManager.js +10 -10
  131. package/src/manager/collectionManager/editorCollectionComponentClass.js +4 -4
  132. package/src/manager/contextMenu/contextMenuManager.js +2 -2
  133. package/src/manager/navbarManager.js +2 -2
  134. package/src/manager/panel/panelManager.js +3 -3
  135. package/src/manager/toolbox/toolboxManager.js +10 -10
  136. package/src/manager/window/windowManager.d.ts +2 -2
  137. package/src/manager/window/windowManager.js +4 -4
  138. package/src/search/search.js +2 -2
  139. package/src/siteConfig.js +1 -1
  140. package/src/state.js +4 -4
  141. package/src/vcsUiApp.d.ts +14 -10
  142. package/src/vcsUiApp.js +1 -1
  143. package/src/vuePlugins/vuetify.d.ts +2 -0
  144. package/src/vuePlugins/vuetify.js +11 -0
  145. package/dist/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
  146. package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +0 -3
  147. package/dist/assets/index-8eGauqjA.js +0 -1
  148. package/dist/assets/ui.7c276c.css +0 -1
  149. package/public/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
  150. package/src/application/VcsCustomScreen.vue +0 -45
  151. package/src/application/VcsCustomScreen.vue.d.ts +0 -15
  152. /package/dist/assets/{cesium.0b750d.js → cesium-cb4dbfba.js} +0 -0
  153. /package/dist/assets/{favicon-128.4c4ce5.png → favicon-128-4c4ce5df.png} +0 -0
  154. /package/dist/assets/{favicon-180.5b99c0.png → favicon-180-4c4ce5df.png} +0 -0
  155. /package/dist/assets/{favicon-192.0e205e.png → favicon-192-4c4ce5df.png} +0 -0
  156. /package/dist/assets/{favicon-32.6b9add.png → favicon-32-4c4ce5df.png} +0 -0
  157. /package/dist/assets/{favicon.d5ec97.svg → favicon-4c4ce5df.svg} +0 -0
  158. /package/dist/assets/font/{TitilliumWeb-Regular.9ca076.woff2 → TitilliumWeb-Regular-9ca076be.woff2} +0 -0
  159. /package/dist/assets/style/{icon-marker.70960f.png → icon-marker-70960f05.png} +0 -0
  160. /package/dist/assets/style/{icon-marker-blue.534e37.png → icon-marker-blue-534e374b.png} +0 -0
  161. /package/dist/assets/style/{icon-marker-green.0b6a92.png → icon-marker-green-0b6a92bc.png} +0 -0
  162. /package/dist/assets/style/{icon-marker-o.036477.png → icon-marker-o-036477fa.png} +0 -0
  163. /package/dist/assets/style/{icon-marker-o-blue.7b6d62.png → icon-marker-o-blue-7b6d6279.png} +0 -0
  164. /package/dist/assets/style/{icon-marker-o-green.c863c0.png → icon-marker-o-green-c863c0fa.png} +0 -0
  165. /package/dist/assets/style/{icon-marker-o-red.93ff58.png → icon-marker-o-red-93ff58df.png} +0 -0
  166. /package/dist/assets/style/{icon-marker-red.313d03.png → icon-marker-red-313d03e8.png} +0 -0
  167. /package/dist/assets/style/{icon-pin.b7ce77.png → icon-pin-b7ce771e.png} +0 -0
  168. /package/dist/assets/style/{icon-pin-blue.7be369.png → icon-pin-blue-7be369a3.png} +0 -0
  169. /package/dist/assets/style/{icon-pin-green.cbb935.png → icon-pin-green-cbb935fe.png} +0 -0
  170. /package/dist/assets/style/{icon-pin-red.3f25b2.png → icon-pin-red-3f25b245.png} +0 -0
  171. /package/dist/assets/{vue.a3cd64.js → vue-03b265aa.js} +0 -0
  172. /package/public/assets/{favicon-128.png → favicon-128-4c4ce5df.png} +0 -0
  173. /package/public/assets/{favicon-180.png → favicon-180-4c4ce5df.png} +0 -0
  174. /package/public/assets/{favicon-192.png → favicon-192-4c4ce5df.png} +0 -0
  175. /package/public/assets/{favicon-32.png → favicon-32-4c4ce5df.png} +0 -0
  176. /package/public/assets/{favicon.svg → favicon-4c4ce5df.svg} +0 -0
  177. /package/src/components/{form-inputs-controls → section}/VcsFormSection.vue +0 -0
  178. /package/src/components/{form-inputs-controls → section}/VcsFormSection.vue.d.ts +0 -0
@@ -11,32 +11,29 @@
11
11
  <v-card>
12
12
  <div class="px-2 pt-2 pb-1">
13
13
  <v-card-text>
14
- <VcsMarked :content="splashScreenText"></VcsMarked>
15
-
16
- <v-row class="mt-2" v-if="options.acceptInput" no-gutters>
17
- <v-col class="align-center d-flex">
18
- <VcsCheckbox v-model="checkBox"> </VcsCheckbox>
19
-
20
- <VcsLabel>
21
- <div
22
- v-html="splashScreenCheckboxText"
23
- class="marked-checkbox-content"
24
- ></div>
25
- </VcsLabel>
26
- </v-col>
27
- </v-row>
14
+ <VcsMarkdown :content="$st(options.content)" />
15
+ <VcsCheckbox v-if="options.acceptInput" v-model="checkBox">
16
+ <template #label>
17
+ <VcsMarkdown
18
+ :content="$st(options.checkBoxText)"
19
+ class="marked-checkbox-content"
20
+ />
21
+ </template>
22
+ </VcsCheckbox>
28
23
  </v-card-text>
29
24
 
30
25
  <v-card-actions>
31
- <v-col class="text-right">
32
- <VcsFormButton
33
- color="primary"
34
- variant="filled"
35
- @click="exitScreen"
36
- :disabled="!checkBox"
37
- >{{ $t(options.buttonTitle) }}</VcsFormButton
38
- >
39
- </v-col>
26
+ <v-row no-gutters>
27
+ <v-col class="text-right">
28
+ <VcsFormButton
29
+ color="primary"
30
+ variant="filled"
31
+ @click="exitScreen"
32
+ :disabled="options.acceptInput && !checkBox"
33
+ >{{ $t(options.buttonTitle) }}</VcsFormButton
34
+ >
35
+ </v-col>
36
+ </v-row>
40
37
  </v-card-actions>
41
38
  </div>
42
39
  </v-card>
@@ -52,18 +49,15 @@
52
49
  VRow,
53
50
  VCol,
54
51
  } from 'vuetify/components';
55
- import { computed, getCurrentInstance, ref } from 'vue';
56
- import { parseAndSanitizeMarkdown } from './markdownHelper.js';
52
+ import { computed, ref } from 'vue';
57
53
  import VcsFormButton from '../components/buttons/VcsFormButton.vue';
58
54
  import VcsCheckbox from '../components/form-inputs-controls/VcsCheckbox.vue';
59
- import VcsLabel from '../components/form-inputs-controls/VcsLabel.vue';
60
- import VcsMarked from '../components/form-output/VcsMarkdown.vue';
55
+ import VcsMarkdown from '../components/form-output/VcsMarkdown.vue';
61
56
  import { useProxiedAtomicModel } from '../components/modelHelper.js';
62
57
 
63
58
  export default {
64
59
  name: 'VcsSplashScreen',
65
60
  components: {
66
- VcsLabel,
67
61
  VDialog,
68
62
  VCard,
69
63
  VCardText,
@@ -72,7 +66,7 @@
72
66
  VcsCheckbox,
73
67
  VRow,
74
68
  VCol,
75
- VcsMarked,
69
+ VcsMarkdown,
76
70
  },
77
71
  props: {
78
72
  modelValue: {
@@ -87,19 +81,10 @@
87
81
  setup(props, { emit }) {
88
82
  const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
89
83
 
90
- const vm = getCurrentInstance().proxy;
91
- const splashScreenText = computed(() => {
92
- return vm.$st(props.options.content);
93
- });
94
-
95
- const splashScreenCheckboxText = computed(() => {
96
- const translatedContent = vm.$st(props.options.checkBoxText);
97
- return parseAndSanitizeMarkdown(translatedContent);
98
- });
99
-
100
- const checkBox = ref(!props.options.acceptInput);
84
+ const checkBox = ref(false);
101
85
  const exitScreen = () => {
102
86
  localValue.value = false;
87
+ checkBox.value = false;
103
88
  };
104
89
 
105
90
  const position = computed(() => ({
@@ -112,8 +97,6 @@
112
97
  return {
113
98
  localValue,
114
99
  exitScreen,
115
- splashScreenText,
116
- splashScreenCheckboxText,
117
100
  checkBox,
118
101
  position,
119
102
  };
@@ -10,8 +10,6 @@ declare const _default: import("vue").DefineComponent<{
10
10
  }, {
11
11
  localValue: import("vue").Ref<any>;
12
12
  exitScreen: () => void;
13
- splashScreenText: import("vue").ComputedRef<any>;
14
- splashScreenCheckboxText: import("vue").ComputedRef<string>;
15
13
  checkBox: import("vue").Ref<boolean>;
16
14
  position: import("vue").ComputedRef<{
17
15
  width: any;
@@ -1,65 +1,34 @@
1
1
  <template>
2
- <v-sheet>
3
- <v-container>
4
- <VcsMarkdown :content="markedHtml"></VcsMarkdown>
5
- </v-container>
6
- </v-sheet>
2
+ <v-container>
3
+ <VcsMarkdown :content="$st(content)"></VcsMarkdown>
4
+ </v-container>
7
5
  </template>
8
6
 
9
7
  <style lang="scss" scoped>
10
- @import '../styles/shades.scss';
11
-
12
- .theme--light {
13
- a {
14
- color: map-get($shades, 'black');
15
- }
16
- }
17
- .theme--dark {
18
- a {
19
- color: map-get($shades, 'white');
20
- }
21
- }
22
- a {
23
- &:hover {
24
- color: var(--v-primary-base);
25
- }
26
- &:before {
27
- content: '\00a9';
28
- }
8
+ :deep(a) {
9
+ color: var(--v-text-color);
29
10
  }
30
11
  </style>
31
12
 
32
13
  <script>
33
- import { computed, getCurrentInstance } from 'vue';
34
- import { VContainer, VSheet } from 'vuetify/components';
14
+ import { VContainer } from 'vuetify/components';
35
15
  import VcsMarkdown from '../components/form-output/VcsMarkdown.vue';
36
16
 
37
17
  /**
38
- * @description Is a component to render and sanitize a String
39
- * @vue-prop {string} content - The markdown content to be rendered. Is translatable and will be sanitized.
18
+ * @description Container wrapper around VcsMarkdown
19
+ * @vue-prop {string} content - The markdown content to be rendered.
40
20
  */
41
21
  export default {
42
22
  name: 'VcsTextPage',
43
- components: {
44
- VSheet,
45
- VContainer,
46
- VcsMarkdown,
47
- },
48
23
  props: {
49
24
  content: {
50
25
  type: String,
51
- default: () => '',
26
+ required: true,
52
27
  },
53
28
  },
54
- setup(props) {
55
- const vm = getCurrentInstance().proxy;
56
- const markedHtml = computed(() => {
57
- return vm.$st(props.content);
58
- });
59
-
60
- return {
61
- markedHtml,
62
- };
29
+ components: {
30
+ VContainer,
31
+ VcsMarkdown,
63
32
  },
64
33
  };
65
34
  </script>
@@ -1,16 +1,12 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  content: {
3
3
  type: StringConstructor;
4
- default: () => string;
4
+ required: true;
5
5
  };
6
- }, {
7
- markedHtml: import("vue").ComputedRef<any>;
8
- }, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
6
+ }, any, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
7
  content: {
10
8
  type: StringConstructor;
11
- default: () => string;
9
+ required: true;
12
10
  };
13
- }>>, {
14
- content: string;
15
- }, {}>;
11
+ }>>, {}, {}>;
16
12
  export default _default;
@@ -1,55 +1,37 @@
1
1
  <template v-if="textPage.title">
2
- <VcsTooltip :tooltip="textPage.tooltip">
3
- <template #activator="{ props }">
4
- <span
5
- class="d-inline-block text-truncate mr-10 setmargin"
6
- v-bind="{ ...$attrs, ...props }"
7
- >
8
- <span v-if="textPage.url" class="imprint-span imprint button">
9
- <a :href="textPage.url" class="link" target="_blank"
10
- >{{ $st(textPage.title) }} <span></span>
11
- </a>
12
- </span>
2
+ <span class="d-inline-block text-truncate mr-1">
3
+ <span v-if="textPage.url" class="imprint">
4
+ <a :href="textPage.url" target="_blank"
5
+ >{{ $st(textPage.title) }} <span></span>
6
+ </a>
7
+ </span>
13
8
 
14
- <span
15
- v-else
16
- class="imprint-span imprint button link"
17
- @click="addTextPage()"
18
- >{{ $st(textPage.title) }}</span
19
- >
20
- </span>
21
- </template>
22
- </VcsTooltip>
9
+ <span
10
+ v-else
11
+ class="imprint cursor-pointer text-decoration-underline"
12
+ @click="addTextPage()"
13
+ >{{ $st(textPage.title) }}</span
14
+ >
15
+ <v-tooltip
16
+ :text="$st(textPage.tooltip)"
17
+ activator="parent"
18
+ location="top"
19
+ />
20
+ </span>
23
21
  </template>
24
22
 
25
23
  <style lang="scss" scoped>
26
- .button {
27
- cursor: pointer !important;
28
- }
29
- .setmargin {
30
- margin-right: 2px !important;
31
- }
32
24
  .imprint {
33
- margin-left: 2px;
34
- }
35
- .link {
36
- text-decoration: underline;
37
- }
38
- .imprint-span {
39
25
  font-size: smaller;
40
-
41
- &:first-child::before {
42
- content: '';
43
- }
44
- span {
45
- font-size: inherit;
26
+ a {
27
+ color: var(--v-text-color);
46
28
  }
47
29
  }
48
30
  </style>
49
31
 
50
32
  <script>
51
33
  import { inject } from 'vue';
52
- import VcsTooltip from '../components/notification/VcsTooltip.vue';
34
+ import { VTooltip } from 'vuetify/components';
53
35
  import VcsTextPage from './VcsTextPage.vue';
54
36
  import { vcsAppSymbol } from '../pluginHelper.js';
55
37
  import { WindowSlot } from '../manager/window/windowManager.js';
@@ -61,7 +43,7 @@
61
43
  */
62
44
  export default {
63
45
  name: 'VcsTextPageFooter',
64
- components: { VcsTooltip },
46
+ components: { VTooltip },
65
47
  props: {
66
48
  textPage: {
67
49
  type: Object,
@@ -18,7 +18,7 @@
18
18
  import { useProxiedComplexModel } from '../modelHelper.js';
19
19
  import { setupExtentComponentActions } from '../../actions/extentActions.js';
20
20
  import VcsExtent from './VcsExtent.vue';
21
- import VcsFormSection from '../form-inputs-controls/VcsFormSection.vue';
21
+ import VcsFormSection from '../section/VcsFormSection.vue';
22
22
 
23
23
  /**
24
24
  * A VcsFormSection with actions to draw and edit an extent
@@ -7,13 +7,14 @@
7
7
  >
8
8
  <v-container class="py-0 px-0">
9
9
  <v-sheet v-if="items.length < 1" class="ma-2 pl-2">
10
- {{ $t('components.flight.noAnchor') }}
11
- <VcsButton
12
- :icon="addAnchorAction.icon"
13
- :tooltip="addAnchorAction.title"
14
- @click.stop="addAnchorAction.callback()"
15
- class="d-flex justify-center"
16
- />
10
+ <p>{{ $t('components.flight.noAnchor') }}</p>
11
+ <div class="d-flex justify-center">
12
+ <VcsButton
13
+ :icon="addAnchorAction.icon"
14
+ :tooltip="addAnchorAction.title"
15
+ @click.stop="addAnchorAction.callback()"
16
+ />
17
+ </div>
17
18
  </v-sheet>
18
19
  <VcsList
19
20
  v-else
@@ -22,32 +23,35 @@
22
23
  :show-title="false"
23
24
  @item-moved="move"
24
25
  >
25
- <!-- eslint-disable-next-line -->
26
- <template #item.append-title="{ item, index }">
27
- <VcsTextField
28
- v-if="showDuration(index)"
29
- v-model.number="item.duration"
30
- :hide-spin-buttons="true"
31
- type="number"
32
- unit="s"
33
- step="1"
34
- :decimals="2"
35
- :rules="[durationRule]"
36
- no-padding
37
- class="ml-auto"
38
- style="width: 50px"
39
- />
26
+ <template #item.title="{ item, index }">
27
+ <div class="d-flex align-center">
28
+ <span>{{ $st(item.title) }}</span>
29
+ <v-spacer />
30
+ <div class="duration-input">
31
+ <VcsTextField
32
+ v-if="showDuration(index)"
33
+ v-model.number="item.duration"
34
+ :hide-spin-buttons="true"
35
+ type="number"
36
+ unit="s"
37
+ step="1"
38
+ :decimals="2"
39
+ :rules="[durationRule]"
40
+ no-padding
41
+ class="ml-auto"
42
+ />
43
+ </div>
44
+ </div>
40
45
  </template>
41
- <!-- eslint-disable-next-line -->
42
- <template #item.intermediate="{ item, index }">
43
- <VcsButton
44
- :key="`item-intermediate-${index}`"
45
- :icon="addAnchorAction.icon"
46
- :tooltip="addAnchorAction.title"
47
- @click.stop="addAnchorAction.callback(index + 1)"
48
- class="d-flex justify-center z-index-99"
49
- height="0"
50
- />
46
+ <template #item.intermediate="{ index }">
47
+ <div class="d-flex justify-center h-0">
48
+ <VcsButton
49
+ :icon="addAnchorAction.icon"
50
+ :tooltip="addAnchorAction.title"
51
+ @click.stop="addAnchorAction.callback(index + 1)"
52
+ class="z-index-99 mx-auto add-in-button"
53
+ />
54
+ </div>
51
55
  </template>
52
56
  </VcsList>
53
57
  </v-container>
@@ -55,7 +59,7 @@
55
59
  </template>
56
60
  <script>
57
61
  import { computed, inject, onMounted, onUnmounted, ref } from 'vue';
58
- import { VContainer, VSheet } from 'vuetify/components';
62
+ import { VContainer, VSheet, VSpacer } from 'vuetify/components';
59
63
  import {
60
64
  anchorFromViewpoint,
61
65
  anchorToViewpoint,
@@ -63,7 +67,7 @@
63
67
  } from '@vcmap/core';
64
68
  import { Cartesian3 } from '@vcmap-cesium/engine';
65
69
  import { createToggleAction } from '../../actions/actionHelper.js';
66
- import VcsFormSection from '../form-inputs-controls/VcsFormSection.vue';
70
+ import VcsFormSection from '../section/VcsFormSection.vue';
67
71
  import VcsList from '../lists/VcsList.vue';
68
72
  import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
69
73
  import VcsButton from '../buttons/VcsButton.vue';
@@ -197,7 +201,8 @@
197
201
  }
198
202
 
199
203
  export function durationRule(value) {
200
- if (Number.isFinite(value) && value > 0) {
204
+ const v = Number.parseFloat(value);
205
+ if (Number.isFinite(v) && v > 0) {
201
206
  return true;
202
207
  }
203
208
  return 'components.flight.invalidDuration';
@@ -217,6 +222,7 @@
217
222
  VcsTextField,
218
223
  VContainer,
219
224
  VSheet,
225
+ VSpacer,
220
226
  VcsFormSection,
221
227
  VcsList,
222
228
  },
@@ -242,6 +248,14 @@
242
248
  flightInstance.propertyChanged.addEventListener((prop) => {
243
249
  if (prop === 'loop') {
244
250
  loop.value = flightInstance.loop;
251
+ // update last anchor's duration
252
+ const lastAnchor = flightInstance.anchors.get(
253
+ flightInstance.anchors.size - 1,
254
+ );
255
+ lastAnchor.duration = calculateDuration(
256
+ lastAnchor,
257
+ flightInstance.anchors.get(0),
258
+ );
245
259
  }
246
260
  });
247
261
 
@@ -328,7 +342,20 @@
328
342
  };
329
343
  </script>
330
344
  <style scoped lang="scss">
345
+ :deep(.v-list-item) {
346
+ padding: 0 8px 0 16px;
347
+ }
348
+ :deep(.v-list) {
349
+ overflow: visible;
350
+ }
351
+ .duration-input {
352
+ width: 60px;
353
+ }
331
354
  .z-index-99 {
332
- z-index: 99;
355
+ z-index: 99 !important;
356
+ }
357
+ .add-in-button {
358
+ min-height: 0 !important;
359
+ margin-top: -8px;
333
360
  }
334
361
  </style>
@@ -18,24 +18,23 @@
18
18
  <v-container class="py-0 px-1">
19
19
  <v-row no-gutters v-if="!hideName">
20
20
  <v-col cols="6">
21
- <VcsLabel html-for="name" dense required>
21
+ <VcsLabel html-for="name" required>
22
22
  {{ $t('components.flight.name') }}
23
23
  </VcsLabel>
24
24
  </v-col>
25
25
  <v-col>
26
- <VcsTextField id="name" dense clearable v-model="name" />
26
+ <VcsTextField id="name" clearable v-model="name" />
27
27
  </v-col>
28
28
  </v-row>
29
29
  <v-row no-gutters v-if="!hideTitle">
30
30
  <v-col cols="6">
31
- <VcsLabel html-for="title" dense>
31
+ <VcsLabel html-for="title">
32
32
  {{ $t('components.flight.title') }}
33
33
  </VcsLabel>
34
34
  </v-col>
35
35
  <v-col>
36
36
  <VcsTextField
37
37
  id="title"
38
- dense
39
38
  clearable
40
39
  :placeholder="$t('components.flight.titlePlaceholder')"
41
40
  v-model="title"
@@ -44,17 +43,16 @@
44
43
  </v-row>
45
44
  <v-row no-gutters v-if="!hideInterpolation">
46
45
  <v-col cols="6">
47
- <VcsLabel html-for="interpolation" dense>
46
+ <VcsLabel html-for="interpolation">
48
47
  {{ $t('components.flight.interpolation') }}
49
48
  </VcsLabel>
50
49
  </v-col>
51
50
  <v-col>
52
51
  <VcsSelect
53
52
  id="title"
54
- dense
55
53
  :items="[
56
- { value: 'spline', text: 'components.flight.spline' },
57
- { value: 'linear', text: 'components.flight.linear' },
54
+ { value: 'spline', title: 'components.flight.spline' },
55
+ { value: 'linear', title: 'components.flight.linear' },
58
56
  ]"
59
57
  v-model="interpolation"
60
58
  />
@@ -62,18 +60,17 @@
62
60
  </v-row>
63
61
  <v-row no-gutters v-if="!hideDuration">
64
62
  <v-col cols="6">
65
- <VcsLabel html-for="duration" dense>
63
+ <VcsLabel html-for="duration">
66
64
  {{ $t('components.flight.duration') }}
67
65
  </VcsLabel>
68
66
  </v-col>
69
67
  <v-col>
70
68
  <VcsTextField
71
69
  id="duration"
72
- v-model.number="duration"
70
+ v-model="duration"
73
71
  :hide-spin-buttons="true"
74
72
  type="number"
75
73
  unit="s"
76
- step="1"
77
74
  :decimals="2"
78
75
  :disabled="disablePlayer"
79
76
  :rules="[durationRule]"
@@ -85,7 +82,6 @@
85
82
  <VcsCheckbox
86
83
  id="animate"
87
84
  label="components.flight.loop"
88
- dense
89
85
  v-model="loop"
90
86
  />
91
87
  </v-col>
@@ -106,7 +102,7 @@
106
102
  import { computed, onUnmounted, ref, inject } from 'vue';
107
103
  import { VSheet, VContainer, VRow, VCol, VDivider } from 'vuetify/components';
108
104
  import { getSplineAndTimesForInstance } from '@vcmap/core';
109
- import VcsFormSection from '../form-inputs-controls/VcsFormSection.vue';
105
+ import VcsFormSection from '../section/VcsFormSection.vue';
110
106
  import VcsLabel from '../form-inputs-controls/VcsLabel.vue';
111
107
  import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
112
108
  import VcsSelect from '../form-inputs-controls/VcsSelect.vue';
@@ -128,7 +124,7 @@
128
124
  function getFlightDuration(instance) {
129
125
  if (instance.isValid()) {
130
126
  const { times } = getSplineAndTimesForInstance(instance);
131
- return times.at(-1);
127
+ return Math.round(times.at(-1) * 100) / 100;
132
128
  }
133
129
  return 0;
134
130
  }
@@ -208,6 +204,7 @@
208
204
  setup() {
209
205
  const app = inject('vcsApp');
210
206
  const flightInstance = getProvidedFlightInstance();
207
+ const loop = ref(flightInstance.loop);
211
208
  const flightDuration = ref(getFlightDuration(flightInstance));
212
209
  const disablePlayer = ref(!(flightDuration.value > 0));
213
210
  const flightDurationListener = [
@@ -258,12 +255,9 @@
258
255
  return flightDuration.value;
259
256
  },
260
257
  set(value) {
261
- if (
262
- Number.isFinite(value) &&
263
- value > 0 &&
264
- flightDuration.value > 0
265
- ) {
266
- const factor = value / flightDuration.value;
258
+ const v = parseFloat(value);
259
+ if (Number.isFinite(v) && v > 0 && flightDuration.value > 0) {
260
+ const factor = v / flightDuration.value;
267
261
  [...flightInstance.anchors].forEach((anchor) => {
268
262
  anchor.duration *= factor;
269
263
  });
@@ -273,9 +267,10 @@
273
267
  durationRule,
274
268
  loop: computed({
275
269
  get() {
276
- return flightInstance?.loop;
270
+ return loop.value;
277
271
  },
278
272
  set(value) {
273
+ loop.value = !!value;
279
274
  flightInstance.loop = !!value;
280
275
  },
281
276
  }),