@dative-gpi/foundation-shared-components 1.0.56 → 1.0.58-groupings

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 (297) hide show
  1. package/assets/images/map/snow.png +0 -0
  2. package/components/FSAccordionPanel.vue +40 -21
  3. package/components/FSBreadcrumbs.vue +21 -12
  4. package/components/FSButton.vue +16 -16
  5. package/components/FSCalendar.vue +50 -12
  6. package/components/FSCalendarTwin.vue +95 -43
  7. package/components/FSCard.vue +61 -9
  8. package/components/FSCardPlaceholder.vue +8 -5
  9. package/components/FSCheckbox.vue +5 -4
  10. package/components/FSChip.vue +73 -45
  11. package/components/FSChipGroup.vue +69 -0
  12. package/components/FSClickable.vue +11 -9
  13. package/components/FSClock.vue +30 -12
  14. package/components/FSCol.vue +11 -5
  15. package/components/FSColorIcon.vue +23 -5
  16. package/components/FSDialog.vue +2 -1
  17. package/components/FSDialogContent.vue +12 -11
  18. package/components/FSDialogForm.vue +22 -2
  19. package/components/FSDialogFormBody.vue +50 -31
  20. package/components/FSDialogMenu.vue +17 -8
  21. package/components/FSDialogMultiFormBody.vue +79 -56
  22. package/components/FSDialogRemove.vue +7 -8
  23. package/components/FSDialogSubmit.vue +20 -11
  24. package/components/FSEditImage.vue +1 -1
  25. package/components/FSEditImageUI.vue +20 -10
  26. package/components/FSFadeOut.vue +53 -21
  27. package/components/FSForm.vue +10 -8
  28. package/components/FSGrid.vue +1 -1
  29. package/components/FSIcon.vue +4 -3
  30. package/components/FSIconCard.vue +68 -12
  31. package/components/FSImage.vue +9 -2
  32. package/components/FSImageUI.vue +8 -15
  33. package/components/FSInformationsMenu.vue +142 -0
  34. package/components/FSInstantPicker.vue +269 -0
  35. package/components/FSLink.vue +25 -9
  36. package/components/FSLoader.vue +28 -10
  37. package/components/FSMenu.vue +47 -0
  38. package/components/FSOptionGroup.vue +57 -9
  39. package/components/FSOptionItem.vue +4 -4
  40. package/components/FSPagination.vue +1 -1
  41. package/components/FSPlayButtons.vue +72 -0
  42. package/components/FSProgressBar.vue +94 -0
  43. package/components/FSRadio.vue +5 -4
  44. package/components/FSRadioGroup.vue +3 -3
  45. package/components/FSRouterLink.vue +42 -0
  46. package/components/FSSlideGroup.vue +19 -5
  47. package/components/FSSlider.vue +6 -5
  48. package/components/FSSpan.vue +12 -7
  49. package/components/FSSwitch.vue +47 -21
  50. package/components/FSTab.vue +15 -13
  51. package/components/FSTabs.vue +32 -7
  52. package/components/FSTag.vue +16 -5
  53. package/components/FSTagGroup.vue +4 -4
  54. package/components/FSText.vue +11 -7
  55. package/components/FSToggleSet.vue +7 -7
  56. package/components/FSWindow.vue +122 -5
  57. package/components/FSWrapGroup.vue +13 -1
  58. package/components/agenda/FSAgenda.vue +50 -37
  59. package/components/agenda/FSAgendaDialogCalendar.vue +2 -2
  60. package/components/agenda/FSAgendaHeader.vue +35 -10
  61. package/components/agenda/FSAgendaHorizontalEvent.vue +18 -6
  62. package/components/agenda/FSAgendaHoursRow.vue +48 -8
  63. package/components/agenda/FSAgendaVerticalEvent.vue +1 -1
  64. package/components/agenda/FSDayAgenda.vue +1 -2
  65. package/components/agenda/FSMonthAgenda.vue +3 -9
  66. package/components/agenda/FSSelectAgendaMode.vue +2 -2
  67. package/components/agenda/FSWeekAgenda.vue +7 -13
  68. package/components/autocompletes/FSAutoCompleteAddress.vue +25 -20
  69. package/components/autocompletes/FSAutocompleteLanguage.vue +7 -1
  70. package/components/autocompletes/FSAutocompleteTimeZone.vue +7 -1
  71. package/components/buttons/FSButtonAdd.vue +1 -1
  72. package/components/buttons/FSButtonAddLabel.vue +1 -1
  73. package/components/buttons/FSButtonCancel.vue +1 -1
  74. package/components/buttons/FSButtonCancelLabel.vue +1 -1
  75. package/components/buttons/FSButtonCheckbox.vue +4 -4
  76. package/components/buttons/FSButtonCopy.vue +1 -1
  77. package/components/buttons/FSButtonCopyLabel.vue +1 -1
  78. package/components/buttons/FSButtonDuplicate.vue +1 -1
  79. package/components/buttons/FSButtonDuplicateLabel.vue +1 -1
  80. package/components/buttons/FSButtonEdit.vue +1 -1
  81. package/components/buttons/FSButtonEditLabel.vue +1 -1
  82. package/components/buttons/FSButtonFile.vue +1 -1
  83. package/components/buttons/FSButtonFileLabel.vue +1 -1
  84. package/components/buttons/FSButtonNext.vue +1 -1
  85. package/components/buttons/FSButtonNextLabel.vue +1 -1
  86. package/components/buttons/FSButtonPrevious.vue +1 -1
  87. package/components/buttons/FSButtonPreviousLabel.vue +1 -1
  88. package/components/buttons/FSButtonRedo.vue +1 -1
  89. package/components/buttons/FSButtonRedoLabel.vue +1 -1
  90. package/components/buttons/FSButtonRemove.vue +1 -1
  91. package/components/buttons/FSButtonRemoveLabel.vue +1 -1
  92. package/components/buttons/FSButtonSave.vue +1 -1
  93. package/components/buttons/FSButtonSaveLabel.vue +1 -1
  94. package/components/buttons/FSButtonSearch.vue +1 -1
  95. package/components/buttons/FSButtonSearchLabel.vue +1 -1
  96. package/components/buttons/FSButtonUndo.vue +1 -1
  97. package/components/buttons/FSButtonUndoLabel.vue +1 -1
  98. package/components/buttons/FSButtonUpdate.vue +1 -1
  99. package/components/buttons/FSButtonUpdateLabel.vue +1 -1
  100. package/components/buttons/FSButtonValidate.vue +1 -1
  101. package/components/buttons/FSButtonValidateLabel.vue +1 -1
  102. package/components/calendar/FSSimpleCalendar.vue +145 -0
  103. package/components/calendar/FSSimpleCalendarHeader.vue +60 -0
  104. package/components/calendar/FSSimpleMonthSelector.vue +138 -0
  105. package/components/deviceOrganisations/FSConnectivity.vue +16 -4
  106. package/components/deviceOrganisations/FSConnectivityCard.vue +17 -45
  107. package/components/deviceOrganisations/FSStatus.vue +16 -4
  108. package/components/deviceOrganisations/FSStatusCard.vue +33 -59
  109. package/components/deviceOrganisations/FSStatusRichCard.vue +171 -0
  110. package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
  111. package/components/deviceOrganisations/FSStatusesRow.vue +8 -2
  112. package/components/deviceOrganisations/FSWorstAlert.vue +37 -42
  113. package/components/deviceOrganisations/FSWorstAlertCard.vue +35 -84
  114. package/components/fields/FSAutocompleteField.vue +85 -82
  115. package/components/fields/FSAutocompleteTag.vue +1 -1
  116. package/components/fields/FSBaseField.vue +54 -30
  117. package/components/fields/FSClosableSearchField.vue +83 -0
  118. package/components/fields/FSColorField.vue +48 -44
  119. package/components/fields/FSCommentField.vue +28 -16
  120. package/components/fields/FSDateField.vue +13 -10
  121. package/components/fields/FSDateRangeField.vue +6 -5
  122. package/components/fields/FSDateTimeField.vue +14 -11
  123. package/components/fields/FSDateTimeRangeDialog.vue +160 -0
  124. package/components/fields/FSDateTimeRangeField.vue +23 -115
  125. package/components/fields/FSEntityFieldUI.vue +36 -19
  126. package/components/fields/FSGradientField.vue +5 -5
  127. package/components/fields/FSIconField.vue +16 -9
  128. package/components/fields/FSMagicConfigField.vue +15 -7
  129. package/components/fields/FSMagicField.vue +7 -2
  130. package/components/fields/FSNumberField.vue +9 -4
  131. package/components/fields/FSPasswordField.vue +7 -7
  132. package/components/fields/FSRichTextField.vue +78 -58
  133. package/components/fields/FSSearchField.vue +9 -115
  134. package/components/fields/FSSelectField.vue +69 -71
  135. package/components/fields/FSTagField.vue +10 -10
  136. package/components/fields/FSTermField.vue +72 -47
  137. package/components/fields/FSTextArea.vue +17 -11
  138. package/components/fields/FSTextField.vue +15 -10
  139. package/components/fields/FSTimeField.vue +14 -10
  140. package/components/fields/FSTimeRangeField.vue +310 -0
  141. package/components/fields/FSTimeStepField.vue +5 -5
  142. package/components/fields/FSTranslateField.vue +10 -10
  143. package/components/fields/FSTranslateRichTextField.vue +41 -20
  144. package/components/fields/FSTranslateTextArea.vue +10 -10
  145. package/components/fields/FSTreeViewField.vue +15 -13
  146. package/components/fields/periodicField/FSPeriodicDailyField.vue +7 -7
  147. package/components/fields/periodicField/FSPeriodicField.vue +15 -15
  148. package/components/fields/periodicField/FSPeriodicMonthlyField.vue +16 -16
  149. package/components/fields/periodicField/FSPeriodicWeeklyField.vue +28 -18
  150. package/components/fields/periodicField/FSPeriodicYearlyField.vue +12 -12
  151. package/components/lists/FSDataIteratorItem.vue +23 -67
  152. package/components/lists/FSDataTableUI.vue +220 -137
  153. package/components/lists/FSDraggable.vue +2 -2
  154. package/components/lists/FSFilterButton.vue +14 -16
  155. package/components/lists/FSHeaderButton.vue +11 -9
  156. package/components/lists/FSHiddenButton.vue +9 -9
  157. package/components/lists/FSLoadDataTable.vue +10 -7
  158. package/components/lists/FSSimpleList.vue +96 -102
  159. package/components/lists/FSSimpleListItem.vue +131 -0
  160. package/components/map/FSMap.vue +146 -158
  161. package/components/map/FSMapFeatureGroup.vue +7 -1
  162. package/components/map/FSMapLayerButton.vue +4 -3
  163. package/components/map/FSMapMarker.vue +70 -48
  164. package/components/map/FSMapMarkerClusterGroup.vue +32 -7
  165. package/components/map/FSMapOverlay.vue +44 -24
  166. package/components/map/FSMapPolygon.vue +16 -4
  167. package/components/map/FSMapTileLayer.vue +26 -9
  168. package/components/map/layers.ts +0 -0
  169. package/components/selects/FSSelectAutoRefresh.vue +8 -8
  170. package/components/selects/FSSelectDashboardVariableType.vue +4 -3
  171. package/components/selects/FSSelectDateSetting.vue +2 -2
  172. package/components/selects/FSSelectDays.vue +8 -8
  173. package/components/selects/FSSelectListMode.vue +2 -2
  174. package/components/selects/FSSelectMapLayer.vue +68 -0
  175. package/components/selects/FSSelectMonths.vue +13 -13
  176. package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
  177. package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
  178. package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
  179. package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
  180. package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
  181. package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
  182. package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
  183. package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
  184. package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
  185. package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
  186. package/components/tiles/FSAlertTileUI.vue +90 -0
  187. package/components/tiles/FSChartTileUI.vue +61 -52
  188. package/components/tiles/FSCommentTileUI.vue +38 -13
  189. package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +14 -2
  190. package/components/tiles/FSDashboardShallowTileUI.vue +14 -2
  191. package/components/tiles/FSDeviceOrganisationTileUI.vue +6 -6
  192. package/components/tiles/FSGroupTileUI.vue +58 -110
  193. package/components/tiles/FSGroupingTileUI.vue +115 -0
  194. package/components/tiles/FSLoadTile.vue +16 -10
  195. package/components/tiles/FSLocationTileUI.vue +63 -55
  196. package/components/tiles/FSModelTileUI.vue +5 -46
  197. package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
  198. package/components/tiles/FSSimpleTileUI.vue +34 -29
  199. package/components/tiles/FSTile.vue +46 -39
  200. package/components/tiles/FSUserOrganisationTileUI.vue +1 -7
  201. package/components/toggleSets/FSToggleSetPosition.vue +1 -1
  202. package/components/views/FSBaseView.vue +64 -0
  203. package/components/views/FSEntityView.vue +12 -140
  204. package/components/views/FSSimpleView.vue +29 -0
  205. package/components/views/desktop/FSBaseDefaultDesktopView.vue +135 -0
  206. package/components/views/desktop/FSBaseDesktopView.vue +53 -0
  207. package/components/views/desktop/FSBaseEntityDesktopView.vue +211 -0
  208. package/components/views/mobile/FSBaseDefaultMobileView.vue +133 -0
  209. package/components/views/mobile/FSBaseEntityMobileView.vue +206 -0
  210. package/components/views/mobile/FSBaseMobileView.vue +53 -0
  211. package/composables/index.ts +1 -0
  212. package/composables/useAddress.ts +40 -8
  213. package/composables/useBreakpoints.ts +40 -4
  214. package/composables/useColors.ts +16 -7
  215. package/composables/useMagicFieldProvider.ts +1 -0
  216. package/composables/useMapLayers.ts +62 -0
  217. package/composables/useSlots.ts +2 -1
  218. package/models/colors.ts +2 -1
  219. package/models/deviceAlerts.ts +1 -0
  220. package/models/magicFields.ts +1 -0
  221. package/models/map.ts +12 -10
  222. package/models/rules.ts +6 -3
  223. package/models/tables.ts +5 -2
  224. package/models/variableNode.ts +8 -5
  225. package/package.json +5 -5
  226. package/styles/components/fs_agenda.scss +4 -0
  227. package/styles/components/fs_agenda_event.scss +1 -1
  228. package/styles/components/fs_agenda_hours_row.scss +0 -8
  229. package/styles/components/fs_autocomplete_field.scss +0 -13
  230. package/styles/components/fs_breadcrumbs.scss +18 -36
  231. package/styles/components/fs_button.scss +7 -5
  232. package/styles/components/fs_calendar.scss +1 -0
  233. package/styles/components/fs_card.scss +9 -0
  234. package/styles/components/fs_chip.scss +13 -7
  235. package/styles/components/fs_clickable.scss +16 -23
  236. package/styles/components/fs_clock.scss +0 -10
  237. package/styles/components/fs_col.scss +1 -1
  238. package/styles/components/fs_color_field.scss +1 -4
  239. package/styles/components/fs_data_table.scss +6 -9
  240. package/styles/components/fs_dialog.scss +4 -10
  241. package/styles/components/fs_dialog_menu.scss +4 -2
  242. package/styles/components/fs_draggable.scss +0 -5
  243. package/styles/components/fs_edit_image.scss +8 -0
  244. package/styles/components/fs_fade_out.scss +10 -2
  245. package/styles/components/fs_filter_button.scss +1 -6
  246. package/styles/components/fs_hidden_button.scss +2 -7
  247. package/styles/components/fs_image_card.scss +6 -4
  248. package/styles/components/fs_magic_config_field.scss +1 -2
  249. package/styles/components/fs_map.scss +57 -17
  250. package/styles/components/fs_meta_field.scss +3 -5
  251. package/styles/components/fs_option_group.scss +15 -5
  252. package/styles/components/fs_password_field.scss +4 -2
  253. package/styles/components/fs_progress_bar.scss +14 -0
  254. package/styles/components/fs_radio.scss +0 -11
  255. package/styles/components/fs_rich_text_field.scss +1 -10
  256. package/styles/components/fs_select_field.scss +4 -13
  257. package/styles/components/fs_slide_group.scss +7 -0
  258. package/styles/components/fs_span.scss +13 -5
  259. package/styles/components/fs_status_rich_card.scss +6 -0
  260. package/styles/components/fs_switch.scss +1 -0
  261. package/styles/components/fs_tabs.scss +19 -33
  262. package/styles/components/fs_tag.scss +8 -22
  263. package/styles/components/fs_text_area.scss +2 -21
  264. package/styles/components/fs_tile.scss +0 -19
  265. package/styles/components/fs_window.scss +3 -1
  266. package/styles/components/fs_wrap_group.scss +7 -0
  267. package/styles/components/index.scss +2 -6
  268. package/styles/globals/index.scss +1 -5
  269. package/styles/globals/overrides.scss +28 -61
  270. package/styles/globals/scrollbars.scss +8 -0
  271. package/styles/globals/text_fonts.scss +18 -66
  272. package/styles/globals/touchscreen.scss +2 -2
  273. package/tools/alertsTools.ts +87 -12
  274. package/tools/chartsTools.ts +143 -16
  275. package/tools/index.ts +3 -1
  276. package/tools/reportsTools.ts +38 -0
  277. package/tools/timeRangeTools.ts +125 -0
  278. package/utils/badge.ts +9 -5
  279. package/utils/filter.ts +7 -4
  280. package/utils/index.ts +1 -0
  281. package/utils/leafletMarkers.ts +4 -4
  282. package/utils/operations.ts +108 -0
  283. package/utils/sort.ts +2 -2
  284. package/utils/time.ts +16 -16
  285. package/components/fields/FSTimeSlotField.vue +0 -250
  286. package/components/views/FSEntityHeader.vue +0 -350
  287. package/components/views/FSListHeader.vue +0 -83
  288. package/components/views/FSListView.vue +0 -83
  289. package/components/views/FSSkeletonView.vue +0 -100
  290. package/styles/components/fs_data_iterator_item.scss +0 -33
  291. package/styles/components/fs_icon_field.scss +0 -12
  292. package/styles/components/fs_search_field.scss +0 -3
  293. package/styles/components/fs_tag_field.scss +0 -8
  294. package/styles/components/fs_time_field.scss +0 -12
  295. package/styles/components/fs_timeslot_field.scss +0 -12
  296. package/styles/globals/breakpoints.scss +0 -20
  297. package/styles/globals/fixes.scss +0 -5
@@ -2,7 +2,7 @@
2
2
  <FSDialogSubmit
3
3
  width="460px"
4
4
  :title="title"
5
- :submitButtonLabel="$tr('ui.button.remove', 'Remove')"
5
+ :submitButtonLabel="$tr('ui.common.remove', 'Remove')"
6
6
  :submitButtonColor="ColorEnum.Error"
7
7
  :modelValue="$props.modelValue"
8
8
  @update:modelValue="$emit('update:modelValue', $event)"
@@ -21,20 +21,20 @@
21
21
  mdi-alert-outline
22
22
  </FSIcon>
23
23
  <FSRow
24
- gap="2px"
24
+ gap="4px"
25
25
  >
26
26
  <FSSpan>
27
- {{ $tr("ui.remove-dialog.body-regular", "This action is") }}
27
+ {{ $tr("dialog-remove.body-regular", "This action is") }}
28
28
  </FSSpan>
29
29
  <FSSpan
30
30
  font="text-button"
31
31
  >
32
- {{ $tr("ui.remove-dialog.body-bold", "definitive") }}
32
+ {{ $tr("dialog-remove.body-bold", "definitive") }}
33
33
  </FSSpan>
34
34
  </FSRow>
35
35
  </FSRow>
36
36
  <FSSpan>
37
- {{ $tr("ui.remove-dialog.final-warning", "Once removed, entities won't be retrievable") }}
37
+ {{ $tr("dialog-remove.final-warning", "Once removed, entities won't be retrievable") }}
38
38
  </FSSpan>
39
39
  </FSCol>
40
40
  </template>
@@ -43,7 +43,6 @@
43
43
  v-if="$props.removing"
44
44
  >
45
45
  <FSRow
46
- padding="0 16px 0 0"
47
46
  align="center-right"
48
47
  :height="footerHeight"
49
48
  >
@@ -109,10 +108,10 @@ export default defineComponent({
109
108
 
110
109
  const title = computed((): string => {
111
110
  if (props.removeTotal > 1) {
112
- return $tr("ui.dialog-remove.remove-plural", "Remove {0} entities", props.removeTotal.toString());
111
+ return $tr("dialog-remove.remove-plural", "Remove {0} entities", props.removeTotal.toString());
113
112
  }
114
113
  else {
115
- return $tr("ui.dialog-remove.remove-singular", "Remove an entity");
114
+ return $tr("dialog-remove.remove-singular", "Remove an entity");
116
115
  }
117
116
  });
118
117
 
@@ -11,7 +11,6 @@
11
11
  #body
12
12
  >
13
13
  <FSFadeOut
14
- padding="0 8px 0 0"
15
14
  :maxHeight="maxHeight"
16
15
  >
17
16
  <slot
@@ -25,9 +24,7 @@
25
24
  <slot
26
25
  name="footer"
27
26
  >
28
- <FSRow
29
- padding="0 16px 0 0"
30
- >
27
+ <FSRow>
31
28
  <slot
32
29
  name="left-footer"
33
30
  />
@@ -36,6 +33,7 @@
36
33
  :wrap="false"
37
34
  >
38
35
  <FSButton
36
+ v-if="$props.showCancelButton"
39
37
  :prependIcon="$props.cancelButtonPrependIcon"
40
38
  :appendIcon="$props.cancelButtonAppendIcon"
41
39
  :variant="$props.cancelButtonVariant"
@@ -44,11 +42,12 @@
44
42
  @click="$emit('update:modelValue', false)"
45
43
  />
46
44
  <FSButton
45
+ v-if="$props.showSubmitButton"
47
46
  :prependIcon="$props.submitButtonPrependIcon"
48
47
  :appendIcon="$props.submitButtonAppendIcon"
49
48
  :variant="$props.submitButtonVariant"
50
49
  :color="$props.submitButtonColor"
51
- :editable="$props.editable"
50
+ :disabled="$props.disabled"
52
51
  :label="submitLabel"
53
52
  :load="$props.load"
54
53
  @click="$emit('click:submitButton')"
@@ -101,6 +100,11 @@ export default defineComponent({
101
100
  required: false,
102
101
  default: false
103
102
  },
103
+ showCancelButton: {
104
+ type: Boolean,
105
+ required: false,
106
+ default: true
107
+ },
104
108
  cancelButtonPrependIcon: {
105
109
  type: String as PropType<string | null>,
106
110
  required: false,
@@ -126,6 +130,11 @@ export default defineComponent({
126
130
  required: false,
127
131
  default: ColorEnum.Light
128
132
  },
133
+ showSubmitButton: {
134
+ type: Boolean,
135
+ required: false,
136
+ default: true
137
+ },
129
138
  submitButtonPrependIcon: {
130
139
  type: String as PropType<string | null>,
131
140
  required: false,
@@ -156,10 +165,10 @@ export default defineComponent({
156
165
  required: false,
157
166
  default: false
158
167
  },
159
- editable: {
168
+ disabled: {
160
169
  type: Boolean,
161
170
  required: false,
162
- default: true
171
+ default: false
163
172
  }
164
173
  },
165
174
  emits: ["update:modelValue", "click:submitButton"],
@@ -170,17 +179,17 @@ export default defineComponent({
170
179
  const maxHeight = computed(() => {
171
180
  const other = 24 + 24 // Paddings
172
181
  + (isMobileSized.value ? 24 : 32) + 24 // Title
173
- + (props.subtitle ? (isMobileSized.value ? 14 : 16) + 8 : 0) // Subtitle
182
+ + (props.subtitle ? (isMobileSized.value ? 16 : 20) + 8 : 0) // Subtitle
174
183
  + (isMobileSized.value ? 36 : 40) + 24; // Footer
175
- return `calc(100vh - 40px - ${other}px)`;
184
+ return `calc(100vh - 42px - ${other}px)`;
176
185
  });
177
186
 
178
187
  const cancelLabel = computed(() => {
179
- return props.cancelButtonLabel ?? $tr("ui.button.cancel", "Cancel");
188
+ return props.cancelButtonLabel ?? $tr("ui.common.cancel", "Cancel");
180
189
  });
181
190
 
182
191
  const submitLabel = computed(() => {
183
- return props.submitButtonLabel ?? $tr("ui.button.validate", "Validate");
192
+ return props.submitButtonLabel ?? $tr("ui.common.validate", "Validate");
184
193
  });
185
194
 
186
195
  return {
@@ -39,7 +39,7 @@ export default defineComponent({
39
39
 
40
40
  const onError = (): void => {
41
41
  if (props.imageId) {
42
- console.log("onError");
42
+ console.error("Error loading image", props.imageId);
43
43
  getImage(props.imageId);
44
44
  }
45
45
  };
@@ -39,6 +39,7 @@
39
39
  :wrap="false"
40
40
  >
41
41
  <FSRow
42
+ class="fs-edit-image-standard-row"
42
43
  gap="24px"
43
44
  :wrap="false"
44
45
  >
@@ -59,6 +60,7 @@
59
60
  :width="$props.width"
60
61
  />
61
62
  <FSCol
63
+ class="fs-edit-image-standard-label-wrapper"
62
64
  align="center-left"
63
65
  height="fill"
64
66
  width="hug"
@@ -79,24 +81,24 @@
79
81
  font="text-overline"
80
82
  :style="style"
81
83
  >
82
- {{ $tr('ui.edit-image.format', 'PNG or JPG format') }}
84
+ {{ $tr('edit-image.format', 'PNG or JPG format') }}
83
85
  </FSText>
84
86
  <FSText
85
87
  class="fs-edit-image-overline"
86
88
  font="text-overline"
87
89
  :style="style"
88
90
  >
89
- {{ $tr('ui.edit-image.size', '10 MB Maximum') }}
91
+ {{ $tr('edit-image.max-size', '10 MB Maximum') }}
90
92
  </FSText>
91
93
  </FSCol>
92
94
  </FSCol>
93
95
  </FSRow>
94
- <v-spacer />
95
96
  <FSRow
96
- width="hug"
97
+ align="center-right"
98
+ :width="isExtraSmall ? '40px' : 'hug'"
97
99
  >
98
100
  <FSButtonFileMini
99
- accept="image/*"
101
+ accept=".jpg,.jpeg,.png"
100
102
  :readFile="false"
101
103
  @update:metadata="onUpload"
102
104
  />
@@ -124,7 +126,7 @@
124
126
  padding="4px"
125
127
  >
126
128
  <FSButtonFileMini
127
- accept="image/*"
129
+ accept=".jpg,.jpeg,.png"
128
130
  :readFile="false"
129
131
  @update:metadata="onUpload"
130
132
  />
@@ -152,12 +154,12 @@
152
154
  font="text-body"
153
155
  :lineClamp="2"
154
156
  >
155
- {{ $tr('ui.edit-image.add-image', 'Add an image.') }}
157
+ {{ $tr('edit-image.add-image', 'Add an image.') }}
156
158
  </FSText>
157
159
  <FSButtonFileMini
158
160
  class="fs-edit-image-hidden-button"
159
161
  ref="invisibleButtonRef"
160
- accept="image/*"
162
+ accept=".jpg,.jpeg,.png"
161
163
  :readFile="false"
162
164
  @update:metadata="onUpload"
163
165
  />
@@ -241,7 +243,7 @@ export default defineComponent({
241
243
  default: false
242
244
  }
243
245
  },
244
- emits: ["update:modelValue", "update:source"],
246
+ emits: ["update", "update:modelValue", "update:source"],
245
247
  setup(props, { emit }) {
246
248
  const { isExtraSmall } = useBreakpoints();
247
249
  const { getColors } = useColors();
@@ -264,9 +266,15 @@ export default defineComponent({
264
266
  const content = (await readFile(payload)) as string;
265
267
  fileSelected.value.fileName = payload.name;
266
268
  fileSelected.value.fileContent = content;
267
- emit("update:modelValue", content.substring(content.indexOf(',') + 1));
269
+ const newModelValue = content.substring(content.indexOf(',') + 1);
268
270
  if (props.source) {
271
+ emit("update:modelValue", newModelValue);
269
272
  emit("update:source", null);
273
+ emit("update", { source: null, modelValue: newModelValue });
274
+ }
275
+ else {
276
+ emit("update:modelValue", newModelValue);
277
+ emit("update", { source: props.source, modelValue: newModelValue });
270
278
  }
271
279
  };
272
280
 
@@ -275,9 +283,11 @@ export default defineComponent({
275
283
  fileSelected.value.fileContent = null;
276
284
  if (props.modelValue) {
277
285
  emit("update:modelValue", null);
286
+ emit("update", { source: props.source, modelValue: null });
278
287
  }
279
288
  else {
280
289
  emit("update:source", null);
290
+ emit("update", { source: null, modelValue: props.modelValue });
281
291
  }
282
292
  };
283
293
 
@@ -3,15 +3,14 @@
3
3
  class="fs-fade-out"
4
4
  ref="fadeOutRef"
5
5
  :id="elementId"
6
- :style="style"
7
- @scroll="debounceMasks"
6
+ @scroll="$emit('scroll', $event); debounceMasks()"
8
7
  >
9
8
  <slot />
10
9
  </div>
11
10
  </template>
12
11
 
13
12
  <script lang="ts">
14
- import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, type StyleValue, watch } from "vue";
13
+ import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, watch } from "vue";
15
14
 
16
15
  import { useBreakpoints, useColors, useDebounce } from "@dative-gpi/foundation-shared-components/composables";
17
16
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
@@ -45,17 +44,41 @@ export default defineComponent({
45
44
  type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
46
45
  required: false,
47
46
  default: "64px"
47
+ },
48
+ scrollOutside: {
49
+ type: Boolean,
50
+ required: false,
51
+ default: true
52
+ },
53
+ hideHorizontalOverflow: {
54
+ type: Boolean,
55
+ required: false,
56
+ default: true
57
+ },
58
+ disableTopMask: {
59
+ type: Boolean,
60
+ required: false,
61
+ default: false
62
+ },
63
+ disableBottomMask: {
64
+ type: Boolean,
65
+ required: false,
66
+ default: false
67
+ },
68
+ style:{
69
+ type: Object,
70
+ required: false
48
71
  }
49
72
  },
50
73
  emits: ["scroll"],
51
- setup(props, { emit }) {
52
- const { windowHeight, windowWidth } = useBreakpoints();
74
+ setup(props) {
75
+ const { windowHeight, windowWidth, isTouchScreenEnabled } = useBreakpoints();
53
76
  const { debounce } = useDebounce();
54
77
  const { getColors } = useColors();
55
78
 
56
79
  const backgrounds = getColors(ColorEnum.Background);
57
80
 
58
- const fadeOutRef = ref(null);
81
+ const fadeOutRef = ref<HTMLElement | null>(null);
59
82
  const bottomMaskHeight = ref("0px");
60
83
  const topMaskHeight = ref("0px");
61
84
  const lastScroll = ref(0);
@@ -64,14 +87,21 @@ export default defineComponent({
64
87
 
65
88
  const elementId = `id${uuidv4()}`;
66
89
 
67
- const style = computed((): StyleValue => ({
68
- "--fs-fade-out-height" : props.height ? sizeToVar(props.height) : undefined,
69
- "--fs-fade-out-max-height" : props.maxHeight ? sizeToVar(props.maxHeight) : undefined,
90
+ const showOutsideScrollbar = computed(() => props.scrollOutside && !isTouchScreenEnabled.value);
91
+
92
+ const style = computed((): {[index: string]: string} => ({
93
+ "--fs-fade-out-height" : props.height ? sizeToVar(props.height) : "initial",
94
+ "--fs-fade-out-max-height" : props.maxHeight ? sizeToVar(props.maxHeight) : "initial",
70
95
  "--fs-fade-out-width" : sizeToVar(props.width),
71
96
  "--fs-fade-out-padding" : sizeToVar(props.padding),
97
+ "--fs-fade-out-width-offset" : showOutsideScrollbar.value ? '12px' : '0px',
98
+ "--fs-fade-out-padding-offset" : showOutsideScrollbar.value ? '4px' : '0px',
99
+ "--fs-fade-out-margin-right" : showOutsideScrollbar.value ? '-12px' : '0px',
72
100
  "--fs-fade-out-mask-color" : backgrounds.base,
73
- "--fs-fade-out-top-mask-height" : topMaskHeight.value,
74
- "--fs-fade-out-bottom-mask-height": bottomMaskHeight.value
101
+ "--fs-fade-out-top-mask-height" : props.disableTopMask ? '0px' : topMaskHeight.value,
102
+ "--fs-fade-out-bottom-mask-height": props.disableBottomMask ? '0px' : bottomMaskHeight.value,
103
+ "--fs-fade-out-x-overflow" : props.hideHorizontalOverflow ? 'hidden' : 'auto',
104
+ ...props.style
75
105
  }));
76
106
 
77
107
  const handleMasks = () => {
@@ -93,20 +123,13 @@ export default defineComponent({
93
123
  else {
94
124
  topMaskHeight.value = sizeToVar(props.maskHeight);
95
125
  }
96
-
97
- const event = {
98
- target: fadeOutRef.value,
99
- onTop: topMaskHeight.value === "0px",
100
- onBottom: bottomMaskHeight.value === "0px",
101
- goingUp: (fadeOutRef.value as any).scrollTop < lastScroll.value,
102
- };
103
-
104
- emit("scroll", event);
126
+
105
127
  lastScroll.value = (fadeOutRef.value as any).scrollTop;
106
128
  }
107
129
  };
108
130
 
109
- const debounceMasks = (): void => debounce(handleMasks, 50);
131
+ // Delay to wait for animations to end before computing masks
132
+ const debounceMasks = (): void => debounce(handleMasks, 280);
110
133
 
111
134
  onMounted((): void => {
112
135
  debounceMasks();
@@ -129,6 +152,15 @@ export default defineComponent({
129
152
 
130
153
  watch([() => windowWidth.value, () => windowHeight.value], debounceMasks);
131
154
 
155
+ watch(() => [style.value, fadeOutRef.value], () => {
156
+ if(!fadeOutRef.value || !style.value) {
157
+ return;
158
+ }
159
+ for(const key in style.value){
160
+ fadeOutRef.value.style.setProperty(key, style.value[key])
161
+ }
162
+ }, { immediate: true})
163
+
132
164
  return {
133
165
  fadeOutRef,
134
166
  elementId,
@@ -12,6 +12,9 @@
12
12
 
13
13
  <script lang="ts">
14
14
  import type { PropType} from "vue";
15
+
16
+ import type VForm from "vuetify/lib/components/VForm";
17
+
15
18
  import { computed, defineComponent, provide, ref } from "vue";
16
19
 
17
20
  export default defineComponent({
@@ -30,7 +33,7 @@ export default defineComponent({
30
33
  },
31
34
  emits: ["update:modelValue", "submit"],
32
35
  setup(props, { emit }) {
33
- const formRef = ref<HTMLFormElement | null>(null);
36
+ const formRef = ref<typeof VForm | null>(null);
34
37
  const submitted = ref(false);
35
38
 
36
39
  const validateOn = computed((): "submit" | "input" => {
@@ -44,25 +47,24 @@ export default defineComponent({
44
47
  event.stopImmediatePropagation();
45
48
  event.preventDefault();
46
49
  submitted.value = true;
47
- await (formRef.value as any).validate();
48
- emit("update:modelValue", !!((formRef.value as any).isValid ?? true));
49
- emit("submit", !!((formRef.value as any).isValid ?? true));
50
+ await formRef.value.validate();
51
+ emit("update:modelValue", !!(formRef.value.isValid ?? true));
52
+ emit("submit", !!(formRef.value.isValid ?? true));
50
53
  };
51
54
 
52
55
  const validate = async () => {
53
56
  submitted.value = true;
54
- await (formRef.value as any).validate();
55
- emit("update:modelValue", !!((formRef.value as any).isValid ?? true));
57
+ return await formRef.value.validate();
56
58
  };
57
59
 
58
60
  const reset = () => {
59
61
  submitted.value = false;
60
- (formRef.value as any).reset();
62
+ formRef.value.reset();
61
63
  };
62
64
 
63
65
  const resetValidation = () => {
64
66
  submitted.value = false;
65
- (formRef.value as any).resetValidation();
67
+ formRef.value.resetValidation();
66
68
  };
67
69
 
68
70
  provide("validateOn", validateOn);
@@ -27,6 +27,7 @@
27
27
  >
28
28
  <FSText
29
29
  :font="item.hideDefault ? 'text-body' : 'text-overline'"
30
+ variant="soft"
30
31
  >
31
32
  {{ item.label }}
32
33
  </FSText>
@@ -51,7 +52,6 @@
51
52
  </template>
52
53
  </template>
53
54
  </FSCol>
54
- <v-spacer />
55
55
  <FSRow
56
56
  v-if="itemEndSlot(item.code)"
57
57
  align="center-right"
@@ -13,8 +13,9 @@
13
13
  import { computed, defineComponent, type PropType, type StyleValue } from "vue";
14
14
 
15
15
  import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
16
- import { type ColorBase } from "@dative-gpi/foundation-shared-components/models";
17
- import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
16
+ import { type ColorBase, type ColorBaseVariations } from "@dative-gpi/foundation-shared-components/models";
17
+
18
+ import { sizeToVar } from "../utils";
18
19
 
19
20
  export default defineComponent({
20
21
  name: "FSIcon",
@@ -30,7 +31,7 @@ export default defineComponent({
30
31
  default: null
31
32
  },
32
33
  variant: {
33
- type: String as PropType<"base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
34
+ type: String as PropType<ColorBaseVariations>,
34
35
  required: false,
35
36
  default: "base"
36
37
  }
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <FSCard
3
3
  :variant="$props.backgroundVariant"
4
+ :borderColor="$props.backgroundVariant === 'background' ? ColorEnum.Light : null"
4
5
  :color="$props.backgroundColor"
5
6
  :border="$props.border"
6
7
  :height="$props.size"
@@ -9,10 +10,10 @@
9
10
  <FSRow
10
11
  align="center-center"
11
12
  >
12
- <FSIcon
13
- :variant="$props.iconVariant"
14
- :color="$props.iconColor"
15
- :size="$props.iconSize"
13
+ <FSIcon
14
+ :variant="iconVariant"
15
+ :color="iconColor"
16
+ :size="actualIconSize"
16
17
  >
17
18
  {{ $props.icon }}
18
19
  </FSIcon>
@@ -21,9 +22,11 @@
21
22
  </template>
22
23
 
23
24
  <script lang="ts">
24
- import { defineComponent, type PropType } from "vue";
25
+ import { defineComponent, type PropType, computed } from "vue";
25
26
 
26
- import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
27
+ import { ColorEnum, type ColorBase, type ColorBaseVariations } from "@dative-gpi/foundation-shared-components/models";
28
+
29
+ import { sizeToVar } from "../utils";
27
30
 
28
31
  import FSCard from "./FSCard.vue";
29
32
  import FSIcon from "./FSIcon.vue";
@@ -43,7 +46,7 @@ export default defineComponent({
43
46
  backgroundColor: {
44
47
  type: [Array, String] as PropType<ColorBase | ColorBase[]>,
45
48
  required: false,
46
- default: null
49
+ default: ColorEnum.Background
47
50
  },
48
51
  backgroundVariant: {
49
52
  type: String as PropType<"background" | "standard" | "full" | "gradient">,
@@ -57,24 +60,77 @@ export default defineComponent({
57
60
  },
58
61
  iconColor: {
59
62
  type: String as PropType<ColorBase>,
60
- required: false,
61
- default: ColorEnum.Dark
63
+ required: false
62
64
  },
63
65
  iconVariant: {
64
- type: String as PropType<"base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
66
+ type: String as PropType<ColorBaseVariations | null>,
65
67
  required: false,
66
- default: "base"
68
+ default: null
67
69
  },
68
70
  iconSize: {
69
71
  type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
70
72
  required: false,
71
- default: "56px"
73
+ default: null
72
74
  },
73
75
  border: {
74
76
  type: Boolean,
75
77
  required: false,
76
78
  default: true
77
79
  }
80
+ },
81
+ setup(props){
82
+ const actualIconSize = computed(() => {
83
+ if (props.iconSize){
84
+ return props.iconSize;
85
+ }
86
+ else if (props.size) {
87
+ return `calc(${sizeToVar(props.size)} * 0.42)`;
88
+ }
89
+ return "42px";
90
+ });
91
+
92
+ const iconVariant = computed((): ColorBaseVariations | undefined => {
93
+ if (props.iconVariant) {
94
+ return props.iconVariant;
95
+ }
96
+ if (props.iconColor) {
97
+ return "base";
98
+ }
99
+
100
+ switch (props.backgroundVariant) {
101
+ case "background":
102
+ return "lightContrast";
103
+ case "standard":
104
+ return "lightContrast";
105
+ case "full":
106
+ return "baseContrast";
107
+ case "gradient":
108
+ return "baseContrast";
109
+ default:
110
+ return "base";
111
+ }
112
+ });
113
+
114
+ const iconColor = computed((): ColorBase | undefined => {
115
+ if (props.iconColor) {
116
+ return props.iconColor;
117
+ }
118
+
119
+ if(Array.isArray(props.backgroundColor)) {
120
+ return props.backgroundColor[Math.floor(props.backgroundColor.length/2)];
121
+ }
122
+ if(props.backgroundVariant === "background") {
123
+ return ColorEnum.Light;
124
+ }
125
+ return props.backgroundColor;
126
+ });
127
+
128
+ return {
129
+ actualIconSize,
130
+ iconVariant,
131
+ ColorEnum,
132
+ iconColor,
133
+ };
78
134
  }
79
135
  });
80
136
  </script>
@@ -10,8 +10,7 @@
10
10
  <script lang="ts">
11
11
  import { computed, defineComponent, type PropType } from "vue";
12
12
 
13
- import { IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
14
-
13
+ import { IMAGE_THUMBNAIL_URL, IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
15
14
  import { useAppAuthToken, useImage } from "@dative-gpi/foundation-shared-services/composables";
16
15
 
17
16
  import FSImageUI from "./FSImageUI.vue";
@@ -26,6 +25,11 @@ export default defineComponent({
26
25
  type: String as PropType<string | null>,
27
26
  required: false,
28
27
  default: null
28
+ },
29
+ thumbnail: {
30
+ type: Boolean as PropType<boolean>,
31
+ required: false,
32
+ default: false
29
33
  }
30
34
  },
31
35
  setup(props) {
@@ -33,6 +37,9 @@ export default defineComponent({
33
37
  const { authToken } = useAppAuthToken();
34
38
 
35
39
  const source = computed(() => {
40
+ if (props.thumbnail) {
41
+ return props.imageId ? IMAGE_THUMBNAIL_URL(props.imageId, authToken.value) : null;
42
+ }
36
43
  return props.imageId ? IMAGE_RAW_URL(props.imageId, authToken.value) : null;
37
44
  });
38
45