@dative-gpi/foundation-shared-components 0.1.120 → 1.0.0

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 (196) 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 +210 -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 +7 -5
  120. package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +7 -5
  121. package/components/tiles/FSDashboardShallowTileUI.vue +7 -5
  122. package/components/tiles/FSDeviceOrganisationTileUI.vue +11 -12
  123. package/components/tiles/FSFolderTileUI.vue +8 -6
  124. package/components/tiles/FSGroupTileUI.vue +13 -15
  125. package/components/tiles/{FSSimpleIconTileUI.vue → FSSimpleTileUI.vue} +29 -15
  126. package/components/tiles/FSTile.vue +5 -11
  127. package/components/tiles/FSUserOrganisationTileUI.vue +2 -1
  128. package/components/toggleSets/FSToggleSetPosition.vue +61 -0
  129. package/composables/index.ts +5 -1
  130. package/composables/useAddress.ts +158 -0
  131. package/composables/useAutocomplete.ts +4 -3
  132. package/composables/useColors.ts +8 -25
  133. package/composables/useDebounce.ts +2 -1
  134. package/composables/useMagicFieldProvider.ts +22 -0
  135. package/composables/useRules.ts +4 -12
  136. package/composables/useSlots.ts +46 -26
  137. package/composables/useTables.ts +29 -0
  138. package/composables/useTreeView.ts +48 -0
  139. package/elements/FSFormElement.ts +2 -1
  140. package/icons/flags/France.vue +21 -5
  141. package/icons/flags/Germany.vue +16 -4
  142. package/icons/flags/GreatBritain.vue +25 -6
  143. package/icons/flags/Italy.vue +21 -5
  144. package/icons/flags/Portugal.vue +225 -51
  145. package/icons/flags/Spain.vue +2781 -543
  146. package/icons/flags/UnitedStates.vue +31 -7
  147. package/icons/widgetTemplates/DevicesWidget.vue +189 -189
  148. package/icons/widgetTemplates/ProfileWidget.vue +9 -9
  149. package/icons/widgetTemplates/TextWidget.vue +6 -6
  150. package/models/breadcrumbs.ts +1 -1
  151. package/models/deviceAlerts.ts +1 -1
  152. package/models/deviceConnectivities.ts +1 -1
  153. package/models/index.ts +2 -0
  154. package/models/magicFields.ts +9 -0
  155. package/models/map.ts +18 -0
  156. package/models/richTextVariable.ts +5 -0
  157. package/models/rules.ts +11 -2
  158. package/models/tables.ts +30 -21
  159. package/models/variableNode.ts +104 -0
  160. package/package.json +21 -18
  161. package/plugins/colorPlugin.ts +2 -2
  162. package/plugins/index.ts +2 -1
  163. package/plugins/mapsPlugin.ts +37 -0
  164. package/shims-plugin.d.ts +2 -2
  165. package/shims-window.d.ts +3 -0
  166. package/styles/components/fs_button.scss +5 -0
  167. package/styles/components/fs_card.scss +0 -1
  168. package/styles/components/fs_col.scss +1 -0
  169. package/styles/components/fs_color_field.scss +12 -2
  170. package/styles/components/fs_data_iterator_item.scss +19 -6
  171. package/styles/components/fs_dialog.scss +12 -22
  172. package/styles/components/fs_gradient_field.scss +16 -0
  173. package/styles/components/fs_image_card.scss +18 -0
  174. package/styles/components/fs_magic_config_field.scss +13 -0
  175. package/styles/components/fs_map.scss +129 -0
  176. package/styles/components/fs_map_overlay.scss +38 -0
  177. package/styles/components/fs_meta_field.scss +6 -0
  178. package/styles/components/fs_option_group.scss +1 -0
  179. package/styles/components/fs_radio.scss +1 -1
  180. package/styles/components/fs_rich_text_field.scss +17 -5
  181. package/styles/components/fs_row.scss +1 -1
  182. package/styles/components/fs_select_field.scss +9 -14
  183. package/styles/components/fs_text.scss +1 -1
  184. package/styles/components/fs_time_field.scss +0 -4
  185. package/styles/components/fs_translate_field.scss +3 -0
  186. package/styles/components/fs_tree_view_field.scss +53 -0
  187. package/styles/components/index.scss +8 -1
  188. package/styles/globals/overrides.scss +54 -8
  189. package/styles/globals/scrollbars.scss +2 -2
  190. package/themes/default.ts +1 -1
  191. package/utils/gradient.ts +1601 -0
  192. package/utils/index.ts +3 -1
  193. package/utils/leafletMarkers.ts +23 -0
  194. package/utils/lexical.ts +3 -1
  195. package/components/selects/FSSelectTimeZone.vue +0 -67
  196. package/styles/components/fs_date_field.scss +0 -8
@@ -1,4 +1,5 @@
1
- import { computed, onMounted, ref, Ref, watch } from "vue";
1
+ import type { Ref} from "vue";
2
+ import { computed, onMounted, ref, watch } from "vue";
2
3
  import _ from "lodash";
3
4
 
4
5
  import { useDebounce } from "./useDebounce";
@@ -60,11 +61,11 @@ export const useAutocomplete = <TInfos>(
60
61
  }
61
62
  });
62
63
 
63
- watch(entities, () => {
64
+ watch(() => entities.value, () => {
64
65
  if (init.value) {
65
66
  init.value = false;
66
- entitiesLength.value = entities.value.length;
67
67
  }
68
+ entitiesLength.value = entities.value.length;
68
69
  });
69
70
 
70
71
  onMounted((): void => {
@@ -2,7 +2,8 @@ import { useTheme } from "vuetify";
2
2
 
3
3
  import Color from "color";
4
4
 
5
- import { ColorBase, ColorEnum, ColorVariations } from "@dative-gpi/foundation-shared-components/models";
5
+ import type { ColorBase, ColorVariations } from "@dative-gpi/foundation-shared-components/models";
6
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
6
7
 
7
8
  export const useColors = () => {
8
9
  const theme = useTheme().current.value;
@@ -34,10 +35,6 @@ export const useColors = () => {
34
35
  return base.value(Math.min(base.value() + 10, 100));
35
36
  };
36
37
 
37
- const getBase = (base: Color): Color => {
38
- return base;
39
- };
40
-
41
38
  const getDark = (base: Color): Color => {
42
39
  return base.value(Math.max(base.value() - 15, 0));
43
40
  };
@@ -54,7 +51,7 @@ export const useColors = () => {
54
51
  }
55
52
 
56
53
  if(color.darken(0.15).isLight()){
57
- return color.darken(0.6);
54
+ return color.darken(0.8);
58
55
  }
59
56
  return color.lighten(color.value() / 50);
60
57
  }
@@ -62,33 +59,19 @@ export const useColors = () => {
62
59
  const getColors = (color: ColorBase): ColorVariations => {
63
60
  const themed = (Object as any).values(ColorEnum).includes(color);
64
61
 
65
- const seed = themed ? new Color(theme.colors[color as ColorEnum]) : new Color(color);
62
+ const base = themed ? new Color(theme.colors[color as ColorEnum]) : new Color(color);
66
63
 
67
- const base = getBase(seed);
68
64
  const light = getLight(base);
69
65
  const soft = getSoft(base);
70
66
  const dark = getDark(base);
71
67
 
72
- if (color === ColorEnum.Background) {
73
- return {
74
- get light(): string { throw new Error("Don't use it !") },
75
- get lightContrast(): string { throw new Error("Don't use it !") },
76
- get soft(): string { throw new Error("Don't use it !") },
77
- get softContrast(): string { throw new Error("Don't use it !") },
78
- base: base.hex(),
79
- get baseContrast(): string { throw new Error("Don't use it !") },
80
- get dark(): string { throw new Error("Don't use it !") },
81
- get darkContrast(): string { throw new Error("Don't use it !") }
82
- };
83
- }
84
-
85
68
  return {
86
69
  light: light.hex(),
87
70
  lightContrast: getContrast(light).hex(),
88
71
  soft: soft.hex(),
89
72
  softContrast: getContrast(soft).hex(),
90
- base: seed.hex(),
91
- baseContrast: getContrast(seed).hex(),
73
+ base: base.hex(),
74
+ baseContrast: getContrast(base).hex(),
92
75
  dark: dark.hex(),
93
76
  darkContrast: getContrast(dark).hex()
94
77
  };
@@ -112,7 +95,7 @@ export const useColors = () => {
112
95
  const columnCount = 8
113
96
  const colors: string[][] = [];
114
97
  for (let saturation = baseMinSaturation; saturation <= 100; saturation += (100 - baseMinSaturation) / (columnCount - 1)) {
115
- let colorsRow = [];
98
+ const colorsRow = [];
116
99
  for (let hue = 0; hue < 360; hue += 15) {
117
100
  const color = new Color({ h: hue, s: saturation, v: baseFixedBrightness });
118
101
  colorsRow.push(color.hex());
@@ -134,4 +117,4 @@ export const useColors = () => {
134
117
  getGradients,
135
118
  getBasePaletteColors
136
119
  };
137
- }
120
+ }
@@ -1,4 +1,5 @@
1
- import { ref, Ref } from "vue";
1
+ import type { Ref } from "vue";
2
+ import { ref } from "vue";
2
3
 
3
4
  export const useDebounce = () => {
4
5
  const timeOutId: Ref<any> = ref(null);
@@ -0,0 +1,22 @@
1
+ import { defineAsyncComponent } from "vue";
2
+
3
+ import { MagicFieldType } from "../models/magicFields";
4
+
5
+ const FIELDS = {
6
+ [MagicFieldType.NumberField] : defineAsyncComponent(() => import("../components/fields/FSNumberField.vue")),
7
+ [MagicFieldType.TextField] : defineAsyncComponent(() => import("../components/fields/FSTextField.vue")),
8
+ [MagicFieldType.Switch] : defineAsyncComponent(() => import("../components/FSSwitch.vue")),
9
+ [MagicFieldType.DateTimeField]: defineAsyncComponent(() => import("../components/fields/FSDateTimeField.vue")),
10
+ [MagicFieldType.IconField] : defineAsyncComponent(() => import("../components/fields/FSIconField.vue")),
11
+ [MagicFieldType.TimeField] : defineAsyncComponent(() => import("../components/fields/FSTimeField.vue")),
12
+ };
13
+
14
+ export const useMagicFieldProvider = () => {
15
+ const get = (code: keyof typeof FIELDS) => {
16
+ return FIELDS[code];
17
+ };
18
+
19
+ return {
20
+ get
21
+ };
22
+ };
@@ -1,15 +1,13 @@
1
- import { Ref, computed, inject, ref } from "vue";
1
+ import type { Ref} from "vue";
2
+ import { computed, inject, ref } from "vue";
2
3
 
3
4
  export const useRules = () => {
4
- const innerValidateOn = inject<Ref<"submit" | "blur" | "input">>("validateOn", ref('input'));
5
+ const innerValidateOn = inject<Ref<"submit" | "input">>("validateOn", ref('input'));
5
6
  const submitted = inject<Ref<boolean>>("submitted", ref(false));
6
7
 
7
- const blurred = ref(false);
8
-
9
- const validateOn = computed((): "input" | "submit" | "blur" => {
8
+ const validateOn = computed((): "input" | "submit" => {
10
9
  switch (innerValidateOn.value) {
11
10
  case "submit": return submitted.value ? "input" : "submit";
12
- case "blur": return blurred.value ? "input" : "blur";
13
11
  case "input": return "input";
14
12
  }
15
13
  });
@@ -24,11 +22,6 @@ export const useRules = () => {
24
22
  return [];
25
23
  }
26
24
  break;
27
- case "blur":
28
- if (!blurred.value) {
29
- return [];
30
- }
31
- break;
32
25
  case "input":
33
26
  break;
34
27
  }
@@ -69,7 +62,6 @@ export const useRules = () => {
69
62
 
70
63
  return {
71
64
  validateOn,
72
- blurred,
73
65
  getMessages
74
66
  };
75
67
  }
@@ -1,31 +1,51 @@
1
- import { Slot, useSlots as useVueSlots } from "vue"
1
+ import { type Slot, useSlots as useVueSlots } from "vue"
2
2
 
3
3
  export const useSlots = () => {
4
- const getChildren = (name: string | undefined = undefined): any => {
5
- const innerSlots = { ...useVueSlots() };
6
- const innerName = name ?? "default";
7
- if (innerSlots[innerName] != null) {
8
- const slot = innerSlots[innerName]!;
9
- switch (typeof(slot()[0].type)) {
10
- // Directive wrapper (v-for, v-if)
11
- case "symbol":
12
- switch (slot()[0].type) {
13
- case Symbol.for("v-fgt"): return slot()[0].children;
14
- case Symbol.for("v-cmt"): return slot();
15
- default: return slot();
16
- }
17
- // Custom component
18
- case "object": return slot();
19
- // Pre-existing component
20
- case "string": return slot();
21
- }
22
- return slot();
4
+ const getChildren = (name: string | undefined = undefined): any => {
5
+ const innerSlots = { ...useVueSlots() };
6
+ const innerName = name ?? "default";
7
+ if (innerSlots[innerName] != null) {
8
+ const slot = innerSlots[innerName]!;
9
+ switch (typeof(slot()[0].type)) {
10
+ // Directive wrapper (v-for, v-if)
11
+ case "symbol":
12
+ switch (slot()[0].type) {
13
+ case Symbol.for("v-fgt"): return recursiveGetChildren(slot()[0].children);
14
+ case Symbol.for("v-cmt"): return slot();
15
+ default: return slot();
16
+ }
17
+ // Custom component
18
+ case "object": return slot();
19
+ // Pre-existing component
20
+ case "string": return slot();
21
+ }
22
+ return slot();
23
+ }
24
+ return null;
25
+ };
26
+
27
+ const recursiveGetChildren = (element: any): any => {
28
+ if (element == null) {
29
+ return null;
30
+ }
31
+ switch (typeof(element[0].type)) {
32
+ // Directive wrapper (v-for, v-if)
33
+ case "symbol":
34
+ switch (element[0].type) {
35
+ case Symbol.for("v-fgt"): return recursiveGetChildren(element[0].children);
36
+ case Symbol.for("v-cmt"): return element;
37
+ default: return element;
23
38
  }
24
- return null;
25
- };
39
+ // Custom component
40
+ case "object": return element;
41
+ // Pre-existing component
42
+ case "string": return element;
43
+ }
44
+ return element;
45
+ };
26
46
 
27
- return {
28
- slots: { ...useVueSlots() } as { [label: string]: Slot<any> },
29
- getChildren
30
- };
47
+ return {
48
+ slots: { ...useVueSlots() } as { [label: string]: Slot<any> },
49
+ getChildren
50
+ };
31
51
  }
@@ -0,0 +1,29 @@
1
+ import { ref } from "vue";
2
+
3
+ import { Single } from "@dative-gpi/foundation-shared-domain/tools/single";
4
+
5
+ import type { FSDataTable } from "../models";
6
+
7
+ const tables = ref<{ [key: string]: FSDataTable }>({});
8
+
9
+ const single = new Single();
10
+
11
+ export const useTables = () => {
12
+ return single.call(() => {
13
+ const getTable = (tableCode: string): FSDataTable | null => {
14
+ if (tables.value[tableCode] != null) {
15
+ return tables.value[tableCode];
16
+ }
17
+ return null;
18
+ };
19
+
20
+ const setTable = (tableCode: string, value: FSDataTable) => {
21
+ tables.value[tableCode] = { ...value };
22
+ };
23
+
24
+ return {
25
+ getTable,
26
+ setTable
27
+ };
28
+ });
29
+ };
@@ -0,0 +1,48 @@
1
+ import type { Ref} from "vue";
2
+ import { onMounted, watch } from "vue";
3
+ import _ from "lodash";
4
+
5
+ import { useDebounce } from "./useDebounce";
6
+
7
+ export const useTreeView = <TInfos>(
8
+ entities: Ref<TInfos[]>,
9
+ filters: (() => any)[],
10
+ emit: (event: "update:modelValue", value: string[] | string | null) => void,
11
+ customFetch: () => Promise<any>,
12
+ customUpdate: ((item: TInfos[] | TInfos | null) => void) | null = null,
13
+ toId: (item: TInfos) => string | null = (item: TInfos) => (item as any).id,
14
+ debounceInterval: number = 1000
15
+ ) => {
16
+ const { debounce } = useDebounce();
17
+
18
+ const debouncedFetch = () => debounce(customFetch, debounceInterval);
19
+
20
+ const onUpdate = (value: string[] | string | null) => {
21
+ if (customUpdate) {
22
+ if (Array.isArray(value)) {
23
+ const items = value.map(v => entities.value.find(e => toId(e) === v) || null).filter(e => e !== null) as TInfos[];
24
+ customUpdate(items);
25
+ }
26
+ else {
27
+ customUpdate((value && entities.value.find(e => toId(e) === value)) || null);
28
+ }
29
+ }
30
+ else {
31
+ emit("update:modelValue", value);
32
+ }
33
+ };
34
+
35
+ watch(filters, (newValue, oldValue) => {
36
+ if (!_.isEqual(newValue, oldValue)) {
37
+ debouncedFetch();
38
+ }
39
+ });
40
+
41
+ onMounted((): void => {
42
+ customFetch();
43
+ });
44
+
45
+ return {
46
+ onUpdate
47
+ };
48
+ }
@@ -1,4 +1,5 @@
1
- import { defineCustomElement, PropType } from "vue";
1
+ import type { PropType } from "vue";
2
+ import { defineCustomElement } from "vue";
2
3
 
3
4
  export default defineCustomElement({
4
5
  name: "FSFormElement",
@@ -1,9 +1,25 @@
1
1
  <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-fr" viewBox="0 0 640 480">
3
- <g fill-rule="evenodd" stroke-width="1pt">
4
- <path fill="#fff" d="M0 0h640v480H0z"/>
5
- <path fill="#00267f" d="M0 0h213.3v480H0z"/>
6
- <path fill="#f31830" d="M426.7 0H640v480H426.7z"/>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ id="flag-icons-fr"
5
+ viewBox="0 0 640 480"
6
+ >
7
+ <g
8
+ fill-rule="evenodd"
9
+ stroke-width="1pt"
10
+ >
11
+ <path
12
+ fill="#fff"
13
+ d="M0 0h640v480H0z"
14
+ />
15
+ <path
16
+ fill="#00267f"
17
+ d="M0 0h213.3v480H0z"
18
+ />
19
+ <path
20
+ fill="#f31830"
21
+ d="M426.7 0H640v480H426.7z"
22
+ />
7
23
  </g>
8
24
  </svg>
9
25
  </template>
@@ -1,7 +1,19 @@
1
1
  <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-de" viewBox="0 0 640 480">
3
- <path fill="#ffce00" d="M0 320h640v160H0z"/>
4
- <path d="M0 0h640v160H0z"/>
5
- <path fill="#d00" d="M0 160h640v160H0z"/>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ id="flag-icons-de"
5
+ viewBox="0 0 640 480"
6
+ >
7
+ <path
8
+ fill="#ffce00"
9
+ d="M0 320h640v160H0z"
10
+ />
11
+ <path
12
+ d="M0 0h640v160H0z"
13
+ />
14
+ <path
15
+ fill="#d00"
16
+ d="M0 160h640v160H0z"
17
+ />
6
18
  </svg>
7
19
  </template>
@@ -1,9 +1,28 @@
1
1
  <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-gb" viewBox="0 0 640 480">
3
- <path fill="#012169" d="M0 0h640v480H0z"/>
4
- <path fill="#FFF" d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0h75z"/>
5
- <path fill="#C8102E" d="m424 281 216 159v40L369 281h55zm-184 20 6 35L54 480H0l240-179zM640 0v3L391 191l2-44L590 0h50zM0 0l239 176h-60L0 42V0z"/>
6
- <path fill="#FFF" d="M241 0v480h160V0H241zM0 160v160h640V160H0z"/>
7
- <path fill="#C8102E" d="M0 193v96h640v-96H0zM273 0v480h96V0h-96z"/>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ id="flag-icons-gb"
5
+ viewBox="0 0 640 480"
6
+ >
7
+ <path
8
+ fill="#012169"
9
+ d="M0 0h640v480H0z"
10
+ />
11
+ <path
12
+ fill="#FFF"
13
+ d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0h75z"
14
+ />
15
+ <path
16
+ fill="#C8102E"
17
+ d="m424 281 216 159v40L369 281h55zm-184 20 6 35L54 480H0l240-179zM640 0v3L391 191l2-44L590 0h50zM0 0l239 176h-60L0 42V0z"
18
+ />
19
+ <path
20
+ fill="#FFF"
21
+ d="M241 0v480h160V0H241zM0 160v160h640V160H0z"
22
+ />
23
+ <path
24
+ fill="#C8102E"
25
+ d="M0 193v96h640v-96H0zM273 0v480h96V0h-96z"
26
+ />
8
27
  </svg>
9
28
  </template>
@@ -1,9 +1,25 @@
1
1
  <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-it" viewBox="0 0 640 480">
3
- <g fill-rule="evenodd" stroke-width="1pt">
4
- <path fill="#fff" d="M0 0h640v480H0z"/>
5
- <path fill="#009246" d="M0 0h213.3v480H0z"/>
6
- <path fill="#ce2b37" d="M426.7 0H640v480H426.7z"/>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ id="flag-icons-it"
5
+ viewBox="0 0 640 480"
6
+ >
7
+ <g
8
+ fill-rule="evenodd"
9
+ stroke-width="1pt"
10
+ >
11
+ <path
12
+ fill="#fff"
13
+ d="M0 0h640v480H0z"
14
+ />
15
+ <path
16
+ fill="#009246"
17
+ d="M0 0h213.3v480H0z"
18
+ />
19
+ <path
20
+ fill="#ce2b37"
21
+ d="M426.7 0H640v480H426.7z"
22
+ />
7
23
  </g>
8
24
  </svg>
9
25
  </template>