@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
@@ -0,0 +1,9 @@
1
+ export enum MagicFieldType {
2
+ None = 0,
3
+ NumberField = 1,
4
+ Switch = 2,
5
+ TextField = 3,
6
+ DateTimeField = 4,
7
+ IconField = 5,
8
+ TimeField = 6,
9
+ }
package/models/map.ts ADDED
@@ -0,0 +1,18 @@
1
+ import { type Layer } from "leaflet";
2
+
3
+ import { type Address } from "@dative-gpi/foundation-shared-domain/models";
4
+
5
+ export interface MapLayer {
6
+ name : string;
7
+ label: string;
8
+ image: string;
9
+ layer: Layer;
10
+ }
11
+
12
+ export interface FSLocation {
13
+ id: string;
14
+ label: string;
15
+ icon: string;
16
+ address: Address;
17
+ color: string;
18
+ }
@@ -0,0 +1,5 @@
1
+ export interface RichTextVariable {
2
+ label: string;
3
+ code: string;
4
+ defaultValue: string;
5
+ }
package/models/rules.ts CHANGED
@@ -13,11 +13,14 @@ export const TextRules = {
13
13
  min: (min: number, message: string | undefined = undefined) => (value: string) => value.length >= min || (message ?? $tr("ui.rules.text-min", "Must be at least {0} characters", min.toString())),
14
14
  max: (max: number, message: string | undefined = undefined) => (value: string) => value.length <= max || (message ?? $tr("ui.rules.text-max", "Must be at most {0} characters", max.toString())),
15
15
  email: (message: string | undefined = undefined) => (value: string) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value) || (message ?? $tr("ui.rules.text-email", "Must be a valid email")),
16
- phone: (message: string | undefined = undefined) => (value: string) => /^[+]?([0-9]+[ -]?)+$/.test(value) || (message ?? $tr("ui.rules.text-phone", "Must be a valid phone number")),
16
+ phone: (message: string | undefined = undefined) => (value: string) => /^[+]?([0-9]+[ -]?){7,}$/.test(value) || (message ?? $tr("ui.rules.text-phone", "Must be a valid phone number")),
17
17
  digit: (message: string | undefined = undefined) => (value: string) => /(?=.*\d)/.test(value) || (message ?? $tr("ui.rules.text-digit", "Must contain a digit")),
18
18
  uppercase: (message: string | undefined = undefined) => (value: string) => /(?=.*[A-Z])/.test(value) || (message ?? $tr("ui.rules.text-uppercase", "Must contain an uppercase letter")),
19
19
  lowercase: (message: string | undefined = undefined) => (value: string) => /(?=.*[a-z])/.test(value) || (message ?? $tr("ui.rules.text-lowercase", "Must contain a lowercase letter")),
20
- special: (message: string | undefined = undefined) => (value: string) => /(?=.*[!@#$%^&*])/.test(value) || (message ?? $tr("ui.rules.text-special-character", "Must contain a special character"))
20
+ special: (message: string | undefined = undefined) => (value: string) => /(?=.*[!@#$%^&*])/.test(value) || (message ?? $tr("ui.rules.text-special-character", "Must contain a special character")),
21
+ different: (original: string, message: string | undefined = undefined) => (value: string) => value != original || (message ?? $tr("ui.rules.text-different", "Must be different from original")),
22
+ outside: (values: string[], message: string | undefined = undefined) => (value: string) => !values.includes(value) || (message ?? $tr("ui.rules.text-outside", "Must be different from others")),
23
+ inside: (values: string[], message: string | undefined = undefined) => (value: string) => values.includes(value) || (message ?? $tr("ui.rules.text-inside", "Must be one of the options")),
21
24
  };
22
25
 
23
26
  export const TagRules = {
@@ -64,4 +67,10 @@ export const TimeRules = {
64
67
 
65
68
  export const ToggleRules = {
66
69
  required: (message: string | undefined = undefined) => (value: boolean) => value || (message ?? $tr("ui.rules.required", "Required"))
70
+ };
71
+
72
+ export const TreeViewRules = {
73
+ required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
74
+ min: (min: number, message: string | undefined = undefined) => (value: string[]) => { console.log(value); return (Array.isArray(value) && value.length >= min) || (message ?? $tr("ui.rules.tree-view-min", "Must select at least {0} elements", min.toString())); },
75
+ max: (max: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length <= max) || (message ?? $tr("ui.rules.tree-view-max", "Must select at most {0} elements", max.toString()))
67
76
  };
package/models/tables.ts CHANGED
@@ -1,33 +1,42 @@
1
1
  export interface FSDataTableColumn {
2
- [key: string]: any;
3
- text?: string | null;
4
- value?: string | null;
5
- index: number;
6
- hidden: boolean;
7
- width?: string | number | null;
2
+ [key: string]: any;
3
+ text?: string | null;
4
+ value?: string | null;
5
+ index: number;
6
+ hidden: boolean;
7
+ width?: string | number | null;
8
8
 
9
- sortable?: boolean | null;
10
- sort?: ((a: any, b: any) => number) | null;
9
+ sortable?: boolean | null;
10
+ sort?: ((a: any, b: any) => number) | null;
11
11
 
12
- filterable?: boolean | null;
13
- fixedFilters?: { value: any, text: string }[] | null;
14
- methodFilter?: ((value: any, item: any) => boolean) | null;
15
- filter?: ((value: any, search: string, item: any) => boolean) | null;
12
+ filterable?: boolean | null;
13
+ fixedFilters?: { value: any, text: string }[] | null;
14
+ methodFilter?: ((value: any, item: any) => boolean) | null;
15
+ filter?: ((value: any, search: string, item: any) => boolean) | null;
16
16
 
17
- innerValue?: ((value: any) => any) | null;
17
+ innerValue?: ((value: any) => any) | null;
18
18
 
19
- // Should not be set directly !
20
- slotName?: string | null;
19
+ // Should not be set directly !
20
+ slotName?: string | null;
21
21
  }
22
22
 
23
23
  export interface FSDataTableFilter {
24
- text: string;
25
- value: string;
26
- hidden: boolean;
27
- filter?: ((value: any, property: any, item: any) => boolean) | null;
24
+ text: string;
25
+ value: string;
26
+ hidden: boolean;
27
+ filter?: ((value: any, property: any, item: any) => boolean) | null;
28
28
  }
29
29
 
30
30
  export interface FSDataTableOrder {
31
- key: string | null;
32
- order: "asc" | "desc" | null;
31
+ key: string | null;
32
+ order: "asc" | "desc" | null;
33
+ }
34
+
35
+ export interface FSDataTable {
36
+ headers: FSDataTableColumn[];
37
+ sortBy: FSDataTableOrder | null;
38
+ mode: "table" | "iterator";
39
+ rowsPerPage: -1 | 10 | 30;
40
+ filters: { [key: string]: FSDataTableFilter[] };
41
+ page: number;
33
42
  }
@@ -0,0 +1,104 @@
1
+ import { type LexicalNode, DecoratorNode, type SerializedLexicalNode, type Spread, type EditorConfig, type LexicalEditor } from "lexical";
2
+
3
+ import { type RichTextVariable } from "./richTextVariable";
4
+
5
+ export type SerializedVariableNode = Spread<
6
+ {
7
+ type: "variable";
8
+ code: string;
9
+ defaultValue: string;
10
+ },
11
+ SerializedLexicalNode
12
+ >;
13
+
14
+ export class VariableNode extends DecoratorNode<Element> {
15
+ __code: string;
16
+ __defaultValue: string;
17
+ readonlyMode: boolean;
18
+
19
+ static getType() {
20
+ return "variable";
21
+ }
22
+
23
+ static clone(node: VariableNode) {
24
+ return new VariableNode(node.__code, node.__defaultValue, node.__key);
25
+ }
26
+
27
+ constructor(code: string, defaultValue: string, key?: string) {
28
+ super(key);
29
+ this.__code = code;
30
+ this.__defaultValue = defaultValue;
31
+ this.readonlyMode = false;
32
+ }
33
+
34
+ getValue(editorElement: HTMLElement): any {
35
+ const variableValues = editorElement.dataset.variableValues;
36
+ if (!variableValues) {
37
+ return this.__defaultValue;
38
+ }
39
+ const values = JSON.parse(variableValues);
40
+ return values[this.__code] ?? this.__defaultValue;
41
+ }
42
+
43
+ createDOM(_config: EditorConfig, _editor: LexicalEditor) {
44
+ const readonlyMode = _editor._rootElement?.dataset.readonly === "true" || false;
45
+
46
+ const container = document.createElement("span");
47
+ container.classList.add("fs-richtextfield-node-variable");
48
+
49
+ const content = document.createElement("span");
50
+ if (readonlyMode) {
51
+ content.classList.add("fs-rich-text-field-node-variable-value");
52
+ if (_editor._rootElement) {
53
+ content.textContent = this.getValue(_editor._rootElement);
54
+ }
55
+ else {
56
+ content.textContent = this.__defaultValue;
57
+ }
58
+ }
59
+ else {
60
+ content.classList.add("fs-rich-text-field-node-variable-code");
61
+ content.textContent = `{${this.__code}}`
62
+ }
63
+ container.appendChild(content);
64
+ return container;
65
+ }
66
+
67
+ updateDOM(): boolean {
68
+ return false;
69
+ }
70
+
71
+ exportJSON(): SerializedVariableNode {
72
+ return {
73
+ type: "variable",
74
+ version: 1,
75
+ code: this.__code,
76
+ defaultValue: this.__defaultValue
77
+ };
78
+ }
79
+
80
+ decorate(editor: LexicalEditor, config: EditorConfig): Element {
81
+ return this.createDOM(config, editor);
82
+ }
83
+
84
+ static importJSON(serializedNode: SerializedVariableNode): VariableNode {
85
+ return new VariableNode(
86
+ serializedNode.code,
87
+ serializedNode.defaultValue
88
+ );
89
+ }
90
+ }
91
+
92
+ export function $createVariableNode(code: string, defaultValue: string): VariableNode {
93
+ return new VariableNode(code, defaultValue);
94
+ }
95
+
96
+ export function $modifyVariableNode(node: VariableNode, newValue: RichTextVariable): VariableNode {
97
+ node.__code = newValue.code;
98
+ node.__defaultValue = newValue.defaultValue;
99
+ return node;
100
+ }
101
+
102
+ export function $isVariableNode(node: LexicalNode | null | undefined): node is VariableNode {
103
+ return node instanceof VariableNode;
104
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "0.1.120",
4
+ "version": "1.0.0",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,27 +10,30 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "0.1.120",
14
- "@dative-gpi/foundation-shared-services": "0.1.120",
13
+ "@dative-gpi/foundation-shared-domain": "1.0.0",
14
+ "@dative-gpi/foundation-shared-services": "1.0.0"
15
+ },
16
+ "peerDependencies": {
17
+ "@dative-gpi/bones-ui": "^0.0.75",
15
18
  "@fontsource/montserrat": "^5.0.16",
16
- "@lexical/clipboard": "^0.12.5",
17
- "@lexical/history": "^0.12.5",
18
- "@lexical/link": "^0.12.5",
19
- "@lexical/plain-text": "^0.12.5",
20
- "@lexical/rich-text": "^0.12.5",
21
- "@lexical/selection": "^0.12.5",
22
- "@lexical/text": "^0.12.5",
23
- "@lexical/utils": "^0.12.5",
19
+ "@lexical/clipboard": "0.12.5",
20
+ "@lexical/history": "0.12.5",
21
+ "@lexical/link": "0.12.5",
22
+ "@lexical/plain-text": "0.12.5",
23
+ "@lexical/rich-text": "0.12.5",
24
+ "@lexical/selection": "0.12.5",
25
+ "@lexical/text": "0.12.5",
26
+ "@lexical/utils": "0.12.5",
24
27
  "@mdi/font": "^7.4.47",
25
- "blurhash": "^2.0.5",
28
+ "blurhash": "2.0.5",
26
29
  "color": "^4.2.3",
27
- "lexical": "^0.12.5",
28
- "vue": "^3.4.23"
30
+ "leaflet": "1.9.4",
31
+ "leaflet.markercluster": "1.5.3"
29
32
  },
30
33
  "devDependencies": {
31
- "@types/color": "^3.0.6",
32
- "sass": "^1.69.5",
33
- "sass-loader": "^13.3.2"
34
+ "@types/color": "3.0.6",
35
+ "sass": "1.71.1",
36
+ "sass-loader": "13.3.2"
34
37
  },
35
- "gitHead": "ea777a3a70e01d2b96981b2cb2e3da7b3af5f59c"
38
+ "gitHead": "93365f65d39d6c9cc3821ffb48cba187200deaf9"
36
39
  }
@@ -1,7 +1,7 @@
1
- import { DefineComponent, Plugin } from "vue";
1
+ import type { DefineComponent, Plugin } from "vue";
2
2
  import { useTheme } from "vuetify";
3
3
 
4
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
4
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
5
5
 
6
6
  export const ColorPlugin: Plugin = {
7
7
  install: (app) => {
package/plugins/index.ts CHANGED
@@ -1 +1,2 @@
1
- export * from "./colorPlugin";
1
+ export * from "./colorPlugin";
2
+ export * from "./mapsPlugin";
@@ -0,0 +1,37 @@
1
+ import type { Plugin } from "vue";
2
+
3
+ export const MapsPlugin: Plugin = {
4
+ install: (_app, options: MapsOptions) => {
5
+ if(window?.initMap) {
6
+ return;
7
+ }
8
+ const key = options?.key ?? import.meta.env.VITE_GOOGLE_MAPS_API_KEY;
9
+ const maps = document.createElement("script");
10
+ maps.setAttribute(
11
+ "src",
12
+ `https://maps.googleapis.com/maps/api/js?key=${key}&loading=async&libraries=geometry,places,geocoding`
13
+ );
14
+
15
+ let resolvePromise: (value: void) => void;
16
+
17
+ const promise = new Promise<void>((resolve) => {
18
+ resolvePromise = resolve;
19
+ });
20
+
21
+ window.initMap = promise;
22
+
23
+ maps.onload = () => {
24
+ resolvePromise();
25
+ };
26
+
27
+ document.head.appendChild(maps);
28
+
29
+ const autocomplete = document.createElement("div");
30
+ autocomplete.id = "places";
31
+ document.body.appendChild(autocomplete);
32
+ }
33
+ }
34
+
35
+ export interface MapsOptions {
36
+ key?: string;
37
+ }
package/shims-plugin.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import Vue from "vue";
1
+ import Vue from "vue"; // eslint-disable-line
2
2
 
3
- import { ColorBase } from "@dative-gpi/foundation-shared-components/models";
3
+ import type { ColorBase } from "@dative-gpi/foundation-shared-components/models";
4
4
 
5
5
  declare module "vue" {
6
6
  interface ComponentCustomProperties {
@@ -0,0 +1,3 @@
1
+ declare interface Window {
2
+ initMap?: Promise<void>;
3
+ }
@@ -11,4 +11,9 @@
11
11
  &:has(.fs-button-load) {
12
12
  cursor: default !important;
13
13
  }
14
+
15
+ & > a, a:hover, a:visited, a:active {
16
+ color: inherit;
17
+ text-decoration: none;
18
+ }
14
19
  }
@@ -1,6 +1,5 @@
1
1
  .fs-card {
2
2
  border: var(--fs-card-border-size) var(--fs-card-border-style);
3
- transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
4
3
  border-radius: var(--fs-card-border-radius);
5
4
  padding: var(--fs-card-padding);
6
5
  height: var(--fs-card-height);
@@ -1,6 +1,7 @@
1
1
  .fs-col {
2
2
  display: flex;
3
3
  flex-direction: column;
4
+ overflow-y: var(--fs-col-overflow);
4
5
  padding: var(--fs-col-padding);
5
6
  gap: var(--fs-col-gap);
6
7
  max-width: 100%;
@@ -1,4 +1,14 @@
1
- .fs-color-field .v-field__prepend-inner > .v-icon {
1
+ .fs-color-field .fs-card {
2
+ cursor: var(--fs-color-field-cursor) !important;
3
+ border-color: var(--fs-color-field-border-color) !important;
4
+ .fs-text {
5
+ color: var(--fs-color-field-color) !important;
6
+ }
7
+ }
8
+
9
+ .fs-color-field .v-icon {
10
+ background-color: var(--fs-color-field-colorvalue) !important;
11
+ border-radius: 100%;
2
12
  opacity: 1 !important;
3
13
  }
4
14
 
@@ -9,5 +19,5 @@
9
19
  }
10
20
 
11
21
  .fs-color-field-description {
12
- color: var(--fs-color-field-color);
22
+ color: var(--fs-color-field-color);
13
23
  }
@@ -1,4 +1,5 @@
1
1
  .fs-data-iterator-item {
2
+ cursor: var(--fs-data-iterator-item-cursor);
2
3
  position: relative;
3
4
  min-height: 36px;
4
5
  flex: 1 0 0;
@@ -6,15 +7,27 @@
6
7
  & > .fs-col > .fs-row:first-of-type > :last-child {
7
8
  padding-right: 32px;
8
9
  }
10
+
11
+ &:hover::after {
12
+ content: "";
13
+ background-color: black;
14
+ pointer-events: none;
15
+ position: absolute;
16
+ opacity: 0.04;
17
+ height: 100%;
18
+ width: 100%;
19
+ left: 0;
20
+ top: 0;
21
+ }
9
22
  }
10
23
 
11
24
  .fs-data-iterator-item-checkbox {
12
- border-radius: 4px;
13
- position: absolute;
14
- align-items: center;
15
25
  justify-content: center;
16
- top: 1px;
17
- right: 1px;
18
- width: 32px;
26
+ align-items: center;
27
+ position: absolute;
28
+ border-radius: 4px;
19
29
  height: 32px;
30
+ width: 32px;
31
+ right: 1px;
32
+ top: 1px;
20
33
  }
@@ -1,28 +1,18 @@
1
- .v-overlay__scrim:has(.v-overlay__content:has(.fs-dialog-mobile)) {
2
- display: flex;
3
- }
4
-
5
- .v-overlay__content:has(.fs-dialog-mobile) {
6
- justify-content: flex-end;
1
+ .fs-dialog-mobile {
2
+ & > .v-overlay__content {
3
+ max-height: calc(100% - 40px) !important;
4
+ max-width: 100% !important;
5
+ width: 100% !important;
6
+ margin: 0 !important;
7
7
  align-self: flex-end;
8
- margin-top: 40px !important;
9
- width: 100vw !important;
10
- margin: 0px !important;
11
- }
12
-
13
- .v-overlay__content:has(.fs-dialog) {
14
- max-height: calc(100vh - 40px) !important;
15
- width: var(--fs-dialog-width) !important;
16
- min-width: 35vw !important;
8
+ }
17
9
  }
18
10
 
19
11
  .fs-dialog {
20
- max-height: calc(100vh - 40px) !important;
21
- width: var(--fs-dialog-width) !important;
12
+ & > .v-overlay__content {
13
+ max-height: calc(100% - 40px) !important;
14
+ max-width: calc(100% - 40px) !important;
22
15
  min-width: 35vw !important;
23
- }
24
-
25
- .fs-dialog-mobile {
26
- max-height: calc(100vh - 40px) !important;
27
- width: 100vw !important;
16
+ width: fit-content !important;
17
+ }
28
18
  }
@@ -0,0 +1,16 @@
1
+
2
+ .fs-gradient-select-field .v-select__selection {
3
+ width: 100%;
4
+
5
+
6
+ }
7
+
8
+ .fs-gradient-field-preview {
9
+ padding: 13px 20px;
10
+ > span {
11
+ height: 12px;
12
+ background: var(--fs-gradient-field-background) !important;
13
+ width: 100%;
14
+ }
15
+ }
16
+
@@ -0,0 +1,18 @@
1
+ .fs-image-card {
2
+ > .fs-card {
3
+ background-image: var(--fs-image-card-background);
4
+ background-size: 100%;
5
+ background-position: center;
6
+ }
7
+
8
+ .fs-image-card-label {
9
+ background-color: #0000009d;
10
+ color: white;
11
+ }
12
+ }
13
+
14
+ .fs-image-card:hover {
15
+ > .fs-card {
16
+ background-size: 105%;
17
+ }
18
+ }
@@ -0,0 +1,13 @@
1
+ .fs-row > .fs-col:has(.v-switch) {
2
+ margin: 0 0 8px 0;
3
+ align-self: end;
4
+ }
5
+
6
+ .fs-magic-config-field-value {
7
+ min-width: 15%;
8
+ }
9
+
10
+ .fs-magic-config-field-actions {
11
+ margin: 0 0 8px 0;
12
+ align-self: end;
13
+ }
@@ -0,0 +1,129 @@
1
+ @import 'leaflet/dist/leaflet.css';
2
+
3
+ .fs-map {
4
+ position: relative;
5
+
6
+ .fs-leaflet-container {
7
+ width: 100%;
8
+ height: var(--fs-map-leaflet-container-height);
9
+ filter: grayscale(var(--fs-map-container-grayscale));
10
+ }
11
+
12
+ .fs-map-overlay-edit-button {
13
+ position: absolute;
14
+ top: 0;
15
+ right: 0;
16
+ z-index: 960;
17
+ margin: 8px;
18
+ }
19
+
20
+ .fs-map-overlay-right-top {
21
+ position: absolute;
22
+ top: 0;
23
+ right: 0;
24
+ margin: 4px 8px;
25
+ }
26
+
27
+ .fs-map-overlay-right-bottom {
28
+ position: absolute;
29
+ bottom: 0;
30
+ right: 0;
31
+ z-index: 1000;
32
+ margin: 4px 8px;
33
+ width: calc(100% - 16px);
34
+
35
+
36
+ .fs-map-zoom-overlay {
37
+ position: absolute;
38
+ bottom: 100%;
39
+ right: 0;
40
+ z-index: 1001;
41
+ margin-bottom: calc(var(--fs-map-leaflet-bottom-overlay-margin) + 8px);
42
+
43
+ button.fs-map-zoom-plus > * {
44
+ border-bottom-left-radius: 0 !important;
45
+ border-bottom-right-radius: 0 !important;
46
+ }
47
+
48
+ button.fs-map-zoom-minus > * {
49
+ margin-top: 1px;
50
+ border-top-left-radius: 0 !important;
51
+ border-top-right-radius: 0 !important;
52
+
53
+ border-top: solid 1px var(--fs-card-border-color) !important;
54
+ }
55
+ }
56
+ }
57
+
58
+ .fs-map-mylocation {
59
+ border: 3px solid white;
60
+ background-color: var(--fs-map-mylocation-pin-color);
61
+ border-radius: 100%;
62
+ animation: fs-map-shadow-mylocation 1.4s linear infinite;
63
+
64
+ @keyframes fs-map-shadow-mylocation {
65
+ 0% {
66
+ box-shadow: 0 0 0px 0px var(--fs-map-mylocation-pin-color-alpha);
67
+ }
68
+
69
+ 50% {
70
+ box-shadow: 0 0 0px 7px var(--fs-map-mylocation-pin-color-alpha);
71
+ }
72
+
73
+ 100% {
74
+ box-shadow: 0 0 0px 20px transparent;
75
+ }
76
+ }
77
+ }
78
+
79
+ .fs-map-location > div {
80
+ display: flex;
81
+ height: 100%;
82
+ color: var(--fs-map-location-pin-color);
83
+ border-radius: 50%;
84
+ background-color: white;
85
+ filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
86
+ align-items: center;
87
+ justify-content: center;
88
+
89
+ &:hover {
90
+ filter: brightness(0.92) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
91
+
92
+ > * {
93
+ transform: scale(1.15);
94
+ }
95
+ }
96
+ }
97
+
98
+ .fs-map-location-full > div {
99
+ background-color: var(--fs-map-location-pin-color);
100
+ color: white;
101
+ }
102
+
103
+ .fs-map-location-selected > div {
104
+ animation: fs-map-shadow-location 1.4s linear infinite;
105
+
106
+ @keyframes fs-map-shadow-location {
107
+ 0% {
108
+ box-shadow: 0 0 0px 0px var(--fs-map-mylocation-pin-color-alpha);
109
+ }
110
+
111
+ 50% {
112
+ box-shadow: 0 0 0px 7px var(--fs-map-mylocation-pin-color-alpha);
113
+ }
114
+
115
+ 100% {
116
+ box-shadow: 0 0 0px 20px transparent;
117
+ }
118
+ }
119
+ }
120
+
121
+ .fs-map-site {
122
+ opacity: 0.6;
123
+ transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
124
+
125
+ &:hover {
126
+ opacity: 1;
127
+ }
128
+ }
129
+ }