@dative-gpi/foundation-shared-components 0.1.120 → 1.0.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 (197) hide show
  1. package/assets/images/map/imagery.png +0 -0
  2. package/assets/images/map/map.png +0 -0
  3. package/components/FSAccordion.vue +2 -1
  4. package/components/FSAccordionPanel.vue +20 -1
  5. package/components/FSBadge.vue +7 -3
  6. package/components/FSBreadcrumbs.vue +4 -2
  7. package/components/FSButton.vue +15 -8
  8. package/components/FSCalendar.vue +5 -2
  9. package/components/FSCalendarTwin.vue +6 -3
  10. package/components/FSCard.vue +4 -2
  11. package/components/FSCardPlaceholder.vue +80 -0
  12. package/components/FSCheckbox.vue +10 -7
  13. package/components/FSChip.vue +4 -2
  14. package/components/FSClickable.vue +5 -3
  15. package/components/FSClock.vue +18 -4
  16. package/components/FSCol.vue +12 -5
  17. package/components/FSColor.vue +4 -2
  18. package/components/FSColorIcon.vue +5 -3
  19. package/components/FSDialog.vue +28 -87
  20. package/components/FSDialogContent.vue +133 -0
  21. package/components/FSDialogForm.vue +25 -236
  22. package/components/FSDialogFormBody.vue +273 -0
  23. package/components/FSDialogMenu.vue +5 -2
  24. package/components/FSDialogMultiForm.vue +21 -197
  25. package/components/FSDialogMultiFormBody.vue +231 -0
  26. package/components/FSDialogSubmit.vue +4 -2
  27. package/components/FSDivider.vue +6 -4
  28. package/components/FSEditImage.vue +16 -9
  29. package/components/FSErrorToast.vue +2 -1
  30. package/components/FSFadeOut.vue +1 -1
  31. package/components/FSForm.vue +7 -7
  32. package/components/FSGrid.vue +4 -2
  33. package/components/FSGridMosaic.vue +3 -2
  34. package/components/FSIcon.vue +3 -2
  35. package/components/FSIconCard.vue +10 -3
  36. package/components/FSIconCheck.vue +2 -1
  37. package/components/FSIconFlag.vue +2 -1
  38. package/components/FSImage.vue +2 -1
  39. package/components/FSImageCard.vue +72 -0
  40. package/components/FSLabel.vue +4 -2
  41. package/components/FSLink.vue +5 -3
  42. package/components/FSLoader.vue +2 -1
  43. package/components/FSOptionGroup.vue +28 -20
  44. package/components/FSOptionItem.vue +8 -18
  45. package/components/FSPagination.vue +4 -2
  46. package/components/FSRadio.vue +23 -11
  47. package/components/FSRadioGroup.vue +23 -10
  48. package/components/FSRow.vue +8 -1
  49. package/components/FSSlideGroup.vue +27 -6
  50. package/components/FSSlider.vue +4 -2
  51. package/components/FSSpan.vue +2 -1
  52. package/components/FSSwitch.vue +13 -10
  53. package/components/FSTab.vue +4 -2
  54. package/components/FSTabs.vue +5 -14
  55. package/components/FSTag.vue +11 -4
  56. package/components/FSTagGroup.vue +4 -2
  57. package/components/FSText.vue +4 -2
  58. package/components/FSToggleSet.vue +30 -17
  59. package/components/FSTooltip.vue +15 -4
  60. package/components/FSWindow.vue +2 -2
  61. package/components/FSWrapGroup.vue +2 -1
  62. package/components/autocompletes/FSAutoCompleteAddress.vue +104 -0
  63. package/components/autocompletes/FSAutocompleteLanguage.vue +18 -26
  64. package/components/autocompletes/FSAutocompleteTag.vue +138 -0
  65. package/components/autocompletes/FSAutocompleteTimeZone.vue +19 -30
  66. package/components/buttons/FSButtonAdd.vue +28 -0
  67. package/components/buttons/FSButtonAddIcon.vue +28 -0
  68. package/components/buttons/FSButtonAddLabel.vue +27 -0
  69. package/components/buttons/FSButtonAddMini.vue +27 -0
  70. package/components/buttons/FSButtonFile.vue +4 -4
  71. package/components/buttons/FSButtonFileIcon.vue +4 -4
  72. package/components/buttons/FSButtonFileLabel.vue +4 -4
  73. package/components/buttons/FSButtonFileMini.vue +4 -4
  74. package/components/deviceOrganisations/FSConnectivity.vue +3 -2
  75. package/components/deviceOrganisations/FSConnectivityCard.vue +3 -2
  76. package/components/deviceOrganisations/FSStatus.vue +3 -2
  77. package/components/deviceOrganisations/FSStatusCard.vue +3 -2
  78. package/components/deviceOrganisations/FSStatusesCarousel.vue +3 -2
  79. package/components/deviceOrganisations/FSStatusesRow.vue +3 -2
  80. package/components/deviceOrganisations/FSWorstAlert.vue +5 -4
  81. package/components/deviceOrganisations/FSWorstAlertCard.vue +4 -2
  82. package/components/fields/FSAutocompleteField.vue +219 -97
  83. package/components/fields/FSBaseField.vue +2 -1
  84. package/components/fields/FSColorField.vue +65 -94
  85. package/components/fields/FSDateField.vue +12 -25
  86. package/components/fields/FSDateRangeField.vue +15 -27
  87. package/components/fields/FSDateTimeField.vue +22 -32
  88. package/components/fields/FSDateTimeRangeField.vue +43 -51
  89. package/components/fields/FSGradientField.vue +143 -0
  90. package/components/fields/FSIconField.vue +9 -6
  91. package/components/fields/FSMagicConfigField.vue +154 -0
  92. package/components/fields/FSMagicField.vue +185 -0
  93. package/components/fields/FSNumberField.vue +3 -1
  94. package/components/fields/FSPasswordField.vue +10 -10
  95. package/components/fields/FSRichTextField.vue +136 -50
  96. package/components/fields/FSSearchField.vue +41 -62
  97. package/components/fields/FSSelectField.vue +148 -53
  98. package/components/fields/FSTagField.vue +19 -16
  99. package/components/fields/FSTermField.vue +192 -186
  100. package/components/fields/FSTextArea.vue +4 -4
  101. package/components/fields/FSTextField.vue +29 -6
  102. package/components/fields/FSTimeField.vue +55 -20
  103. package/components/fields/FSTimeSlotField.vue +6 -5
  104. package/components/fields/FSTranslateField.vue +234 -0
  105. package/components/fields/FSTranslateRichTextField.vue +185 -0
  106. package/components/fields/FSTreeViewField.vue +520 -0
  107. package/components/lists/FSDataIteratorItem.vue +18 -3
  108. package/components/lists/FSDataTableUI.vue +138 -51
  109. package/components/lists/FSFilterButton.vue +4 -2
  110. package/components/lists/FSHiddenButton.vue +4 -2
  111. package/components/map/FSMap.vue +598 -0
  112. package/components/map/FSMapEditPointAddressOverlay.vue +164 -0
  113. package/components/map/FSMapLayerButton.vue +77 -0
  114. package/components/map/FSMapOverlay.vue +150 -0
  115. package/components/selects/FSSelectAutoRefresh.vue +62 -0
  116. package/components/selects/FSSelectDashboardVariableType.vue +47 -0
  117. package/components/selects/FSSelectDateSetting.vue +39 -37
  118. package/components/selects/FSSelectDays.vue +62 -0
  119. package/components/tiles/FSDashboardOrganisationTileUI.vue +8 -8
  120. package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +8 -8
  121. package/components/tiles/FSDashboardShallowTileUI.vue +8 -8
  122. package/components/tiles/FSDeviceOrganisationTileUI.vue +20 -15
  123. package/components/tiles/FSFolderTileUI.vue +7 -7
  124. package/components/tiles/FSGroupTileUI.vue +34 -27
  125. package/components/tiles/FSServiceAccountOrganisationTileUI.vue +142 -0
  126. package/components/tiles/{FSSimpleIconTileUI.vue → FSSimpleTileUI.vue} +48 -25
  127. package/components/tiles/FSTile.vue +51 -13
  128. package/components/tiles/FSUserOrganisationTileUI.vue +25 -34
  129. package/components/toggleSets/FSToggleSetPosition.vue +61 -0
  130. package/composables/index.ts +5 -1
  131. package/composables/useAddress.ts +158 -0
  132. package/composables/useAutocomplete.ts +4 -3
  133. package/composables/useColors.ts +8 -25
  134. package/composables/useDebounce.ts +2 -1
  135. package/composables/useMagicFieldProvider.ts +22 -0
  136. package/composables/useRules.ts +4 -12
  137. package/composables/useSlots.ts +65 -27
  138. package/composables/useTables.ts +29 -0
  139. package/composables/useTreeView.ts +48 -0
  140. package/elements/FSFormElement.ts +2 -1
  141. package/icons/flags/France.vue +21 -5
  142. package/icons/flags/Germany.vue +16 -4
  143. package/icons/flags/GreatBritain.vue +25 -6
  144. package/icons/flags/Italy.vue +21 -5
  145. package/icons/flags/Portugal.vue +225 -51
  146. package/icons/flags/Spain.vue +2781 -543
  147. package/icons/flags/UnitedStates.vue +31 -7
  148. package/icons/widgetTemplates/DevicesWidget.vue +189 -189
  149. package/icons/widgetTemplates/ProfileWidget.vue +9 -9
  150. package/icons/widgetTemplates/TextWidget.vue +6 -6
  151. package/models/breadcrumbs.ts +1 -1
  152. package/models/deviceAlerts.ts +1 -1
  153. package/models/deviceConnectivities.ts +1 -1
  154. package/models/index.ts +2 -0
  155. package/models/magicFields.ts +9 -0
  156. package/models/map.ts +18 -0
  157. package/models/richTextVariable.ts +5 -0
  158. package/models/rules.ts +11 -2
  159. package/models/tables.ts +30 -21
  160. package/models/variableNode.ts +104 -0
  161. package/package.json +21 -18
  162. package/plugins/colorPlugin.ts +2 -2
  163. package/plugins/index.ts +2 -1
  164. package/plugins/mapsPlugin.ts +37 -0
  165. package/shims-plugin.d.ts +2 -2
  166. package/shims-window.d.ts +3 -0
  167. package/styles/components/fs_button.scss +5 -0
  168. package/styles/components/fs_card.scss +0 -1
  169. package/styles/components/fs_col.scss +1 -0
  170. package/styles/components/fs_color_field.scss +12 -2
  171. package/styles/components/fs_data_iterator_item.scss +19 -6
  172. package/styles/components/fs_dialog.scss +12 -22
  173. package/styles/components/fs_gradient_field.scss +16 -0
  174. package/styles/components/fs_image_card.scss +18 -0
  175. package/styles/components/fs_magic_config_field.scss +13 -0
  176. package/styles/components/fs_map.scss +129 -0
  177. package/styles/components/fs_map_overlay.scss +38 -0
  178. package/styles/components/fs_meta_field.scss +6 -0
  179. package/styles/components/fs_option_group.scss +1 -0
  180. package/styles/components/fs_radio.scss +1 -1
  181. package/styles/components/fs_rich_text_field.scss +17 -5
  182. package/styles/components/fs_row.scss +1 -1
  183. package/styles/components/fs_select_field.scss +9 -14
  184. package/styles/components/fs_text.scss +1 -1
  185. package/styles/components/fs_time_field.scss +0 -4
  186. package/styles/components/fs_translate_field.scss +3 -0
  187. package/styles/components/fs_tree_view_field.scss +53 -0
  188. package/styles/components/index.scss +8 -1
  189. package/styles/globals/overrides.scss +54 -8
  190. package/styles/globals/scrollbars.scss +2 -2
  191. package/themes/default.ts +1 -1
  192. package/utils/gradient.ts +1601 -0
  193. package/utils/index.ts +3 -1
  194. package/utils/leafletMarkers.ts +23 -0
  195. package/utils/lexical.ts +3 -1
  196. package/components/selects/FSSelectTimeZone.vue +0 -67
  197. package/styles/components/fs_date_field.scss +0 -8
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ :label="$tr('ui.button.add', 'Add')"
4
+ :color="ColorEnum.Primary"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonAddLabel",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ prependIcon="mdi-plus-circle-outline"
4
+ :color="ColorEnum.Primary"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonAddMini",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -44,15 +44,15 @@ export default defineComponent({
44
44
  default: true
45
45
  }
46
46
  },
47
- emits: ["update:modelValue"],
47
+ emits: ["update:modelValue", "update:metadata"],
48
48
  setup(props, { emit }) {
49
49
  const { readFile } = useFiles();
50
50
 
51
51
  const input = ref<HTMLFormElement | null>(null);
52
52
 
53
53
  const clear = (): void => {
54
- if (input.value) {
55
- input.value.form && input.value.form.reset();
54
+ if (input.value && input.value.form) {
55
+ input.value.form.reset();
56
56
  }
57
57
  };
58
58
 
@@ -70,8 +70,8 @@ export default defineComponent({
70
70
  if (!file) {
71
71
  return;
72
72
  }
73
+ emit("update:metadata", file);
73
74
  if (!props.readFile) {
74
- emit("update:modelValue", file);
75
75
  clear();
76
76
  }
77
77
  else {
@@ -44,15 +44,15 @@ export default defineComponent({
44
44
  default: true
45
45
  }
46
46
  },
47
- emits: ["update:modelValue"],
47
+ emits: ["update:modelValue", "update:metadata"],
48
48
  setup(props, { emit }) {
49
49
  const { readFile } = useFiles();
50
50
 
51
51
  const input = ref<HTMLFormElement | null>(null);
52
52
 
53
53
  const clear = (): void => {
54
- if (input.value) {
55
- input.value.form && input.value.form.reset();
54
+ if (input.value && input.value.form) {
55
+ input.value.form.reset();
56
56
  }
57
57
  };
58
58
 
@@ -70,8 +70,8 @@ export default defineComponent({
70
70
  if (!file) {
71
71
  return;
72
72
  }
73
+ emit("update:metadata", file);
73
74
  if (!props.readFile) {
74
- emit("update:modelValue", file);
75
75
  clear();
76
76
  }
77
77
  else {
@@ -43,15 +43,15 @@ export default defineComponent({
43
43
  default: true
44
44
  }
45
45
  },
46
- emits: ["update:modelValue"],
46
+ emits: ["update:modelValue", "update:metadata"],
47
47
  setup(props, { emit }) {
48
48
  const { readFile } = useFiles();
49
49
 
50
50
  const input = ref<HTMLFormElement | null>(null);
51
51
 
52
52
  const clear = (): void => {
53
- if (input.value) {
54
- input.value.form && input.value.form.reset();
53
+ if (input.value && input.value.form) {
54
+ input.value.form.reset();
55
55
  }
56
56
  };
57
57
 
@@ -69,8 +69,8 @@ export default defineComponent({
69
69
  if (!file) {
70
70
  return;
71
71
  }
72
+ emit("update:metadata", file);
72
73
  if (!props.readFile) {
73
- emit("update:modelValue", file);
74
74
  clear();
75
75
  }
76
76
  else {
@@ -48,15 +48,15 @@ export default defineComponent({
48
48
  default: "mdi-upload-outline"
49
49
  }
50
50
  },
51
- emits: ["update:modelValue"],
51
+ emits: ["update:modelValue", "update:metadata"],
52
52
  setup(props, { emit }) {
53
53
  const { readFile } = useFiles();
54
54
 
55
55
  const input = ref<HTMLFormElement | null>(null);
56
56
 
57
57
  const clear = (): void => {
58
- if (input.value) {
59
- input.value.form && input.value.form.reset();
58
+ if (input.value && input.value.form) {
59
+ input.value.form.reset();
60
60
  }
61
61
  };
62
62
 
@@ -74,8 +74,8 @@ export default defineComponent({
74
74
  if (!file) {
75
75
  return;
76
76
  }
77
+ emit("update:metadata", file);
77
78
  if (!props.readFile) {
78
- emit("update:modelValue", file);
79
79
  clear();
80
80
  }
81
81
  else {
@@ -24,9 +24,10 @@
24
24
  </template>
25
25
 
26
26
  <script lang="ts">
27
- import { defineComponent, PropType, ref } from "vue";
27
+ import type { PropType} from "vue";
28
+ import { defineComponent, ref } from "vue";
28
29
 
29
- import { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
30
+ import type { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
30
31
 
31
32
  import FSConnectivityCard from "./FSConnectivityCard.vue";
32
33
  import FSColorIcon from "../FSColorIcon.vue";
@@ -55,9 +55,10 @@
55
55
  </template>
56
56
 
57
57
  <script lang="ts">
58
- import { computed, defineComponent, PropType } from "vue";
58
+ import type { PropType } from "vue";
59
+ import { computed, defineComponent } from "vue";
59
60
 
60
- import { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
61
+ import type { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
61
62
  import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
62
63
 
63
64
  import { connectivityLabel } from "../../utils";
@@ -25,9 +25,10 @@
25
25
  </template>
26
26
 
27
27
  <script lang="ts">
28
- import { defineComponent, PropType, ref } from "vue";
28
+ import type { PropType} from "vue";
29
+ import { defineComponent, ref } from "vue";
29
30
 
30
- import { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
31
+ import type { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
31
32
 
32
33
  import FSStatusCard from "./FSStatusCard.vue";
33
34
  import FSColorIcon from "../FSColorIcon.vue";
@@ -67,9 +67,10 @@
67
67
  </template>
68
68
 
69
69
  <script lang="ts">
70
- import { computed, defineComponent, PropType } from "vue";
70
+ import type { PropType } from "vue";
71
+ import { computed, defineComponent } from "vue";
71
72
 
72
- import { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
73
+ import type { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
73
74
  import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
74
75
 
75
76
  import FSButton from "../FSButton.vue";
@@ -39,9 +39,10 @@
39
39
  </template>
40
40
 
41
41
  <script lang="ts">
42
- import { defineComponent, PropType, ref } from "vue";
42
+ import type { PropType} from "vue";
43
+ import { defineComponent, ref } from "vue";
43
44
 
44
- import { FSDeviceStatus, FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
45
+ import type { FSDeviceStatus, FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
45
46
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
46
47
 
47
48
  import FSButton from "../FSButton.vue";
@@ -27,9 +27,10 @@
27
27
  </template>
28
28
 
29
29
  <script lang="ts">
30
- import { defineComponent, PropType } from "vue";
30
+ import type { PropType } from "vue";
31
+ import { defineComponent } from "vue";
31
32
 
32
- import { FSDeviceAlert, FSDeviceConnectivity, FSDeviceStatus, FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
33
+ import type { FSDeviceAlert, FSDeviceConnectivity, FSDeviceStatus, FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
33
34
  import { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/models";
34
35
 
35
36
  import FSConnectivity from "./FSConnectivity.vue";
@@ -29,10 +29,11 @@
29
29
  </template>
30
30
 
31
31
  <script lang="ts">
32
- import { computed, defineComponent, PropType, ref } from "vue";
32
+ import type { PropType} from "vue";
33
+ import { computed, defineComponent, ref } from "vue";
33
34
 
34
35
  import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
35
- import { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
36
+ import type { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
36
37
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
37
38
 
38
39
  import FSWorstAlertCard from "./FSWorstAlertCard.vue";
@@ -85,10 +86,10 @@ export default defineComponent({
85
86
  if (props.deviceAlerts < 1) {
86
87
  return null;
87
88
  }
88
- if (props.deviceAlerts > 8) {
89
+ if (props.deviceAlerts > 9) {
89
90
  return "9+";
90
91
  }
91
- return (props.deviceAlerts + 1).toString();
92
+ return (props.deviceAlerts).toString();
92
93
  });
93
94
 
94
95
  return {
@@ -55,10 +55,12 @@
55
55
  </template>
56
56
 
57
57
  <script lang="ts">
58
- import { computed, defineComponent, PropType } from "vue";
58
+ import type { PropType } from "vue";
59
+ import { computed, defineComponent } from "vue";
59
60
 
60
61
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
61
- import { FSDeviceAlert, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
62
+ import type { FSDeviceAlert} from "@dative-gpi/foundation-shared-components/models";
63
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
62
64
  import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
63
65
  import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
64
66