@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.
- package/assets/images/map/imagery.png +0 -0
- package/assets/images/map/map.png +0 -0
- package/components/FSAccordion.vue +2 -1
- package/components/FSAccordionPanel.vue +20 -1
- package/components/FSBadge.vue +7 -3
- package/components/FSBreadcrumbs.vue +4 -2
- package/components/FSButton.vue +15 -8
- package/components/FSCalendar.vue +5 -2
- package/components/FSCalendarTwin.vue +6 -3
- package/components/FSCard.vue +4 -2
- package/components/FSCardPlaceholder.vue +80 -0
- package/components/FSCheckbox.vue +10 -7
- package/components/FSChip.vue +4 -2
- package/components/FSClickable.vue +5 -3
- package/components/FSClock.vue +18 -4
- package/components/FSCol.vue +12 -5
- package/components/FSColor.vue +4 -2
- package/components/FSColorIcon.vue +5 -3
- package/components/FSDialog.vue +28 -87
- package/components/FSDialogContent.vue +133 -0
- package/components/FSDialogForm.vue +25 -236
- package/components/FSDialogFormBody.vue +273 -0
- package/components/FSDialogMenu.vue +5 -2
- package/components/FSDialogMultiForm.vue +21 -197
- package/components/FSDialogMultiFormBody.vue +231 -0
- package/components/FSDialogSubmit.vue +4 -2
- package/components/FSDivider.vue +6 -4
- package/components/FSEditImage.vue +16 -9
- package/components/FSErrorToast.vue +2 -1
- package/components/FSFadeOut.vue +1 -1
- package/components/FSForm.vue +7 -7
- package/components/FSGrid.vue +4 -2
- package/components/FSGridMosaic.vue +3 -2
- package/components/FSIcon.vue +3 -2
- package/components/FSIconCard.vue +10 -3
- package/components/FSIconCheck.vue +2 -1
- package/components/FSIconFlag.vue +2 -1
- package/components/FSImage.vue +2 -1
- package/components/FSImageCard.vue +72 -0
- package/components/FSLabel.vue +4 -2
- package/components/FSLink.vue +5 -3
- package/components/FSLoader.vue +2 -1
- package/components/FSOptionGroup.vue +28 -20
- package/components/FSOptionItem.vue +8 -18
- package/components/FSPagination.vue +4 -2
- package/components/FSRadio.vue +23 -11
- package/components/FSRadioGroup.vue +23 -10
- package/components/FSRow.vue +8 -1
- package/components/FSSlideGroup.vue +27 -6
- package/components/FSSlider.vue +4 -2
- package/components/FSSpan.vue +2 -1
- package/components/FSSwitch.vue +13 -10
- package/components/FSTab.vue +4 -2
- package/components/FSTabs.vue +5 -14
- package/components/FSTag.vue +11 -4
- package/components/FSTagGroup.vue +4 -2
- package/components/FSText.vue +4 -2
- package/components/FSToggleSet.vue +30 -17
- package/components/FSTooltip.vue +15 -4
- package/components/FSWindow.vue +2 -2
- package/components/FSWrapGroup.vue +2 -1
- package/components/autocompletes/FSAutoCompleteAddress.vue +104 -0
- package/components/autocompletes/FSAutocompleteLanguage.vue +18 -26
- package/components/autocompletes/FSAutocompleteTag.vue +138 -0
- package/components/autocompletes/FSAutocompleteTimeZone.vue +19 -30
- package/components/buttons/FSButtonAdd.vue +28 -0
- package/components/buttons/FSButtonAddIcon.vue +28 -0
- package/components/buttons/FSButtonAddLabel.vue +27 -0
- package/components/buttons/FSButtonAddMini.vue +27 -0
- package/components/buttons/FSButtonFile.vue +4 -4
- package/components/buttons/FSButtonFileIcon.vue +4 -4
- package/components/buttons/FSButtonFileLabel.vue +4 -4
- package/components/buttons/FSButtonFileMini.vue +4 -4
- package/components/deviceOrganisations/FSConnectivity.vue +3 -2
- package/components/deviceOrganisations/FSConnectivityCard.vue +3 -2
- package/components/deviceOrganisations/FSStatus.vue +3 -2
- package/components/deviceOrganisations/FSStatusCard.vue +3 -2
- package/components/deviceOrganisations/FSStatusesCarousel.vue +3 -2
- package/components/deviceOrganisations/FSStatusesRow.vue +3 -2
- package/components/deviceOrganisations/FSWorstAlert.vue +5 -4
- package/components/deviceOrganisations/FSWorstAlertCard.vue +4 -2
- package/components/fields/FSAutocompleteField.vue +210 -97
- package/components/fields/FSBaseField.vue +2 -1
- package/components/fields/FSColorField.vue +65 -94
- package/components/fields/FSDateField.vue +12 -25
- package/components/fields/FSDateRangeField.vue +15 -27
- package/components/fields/FSDateTimeField.vue +22 -32
- package/components/fields/FSDateTimeRangeField.vue +43 -51
- package/components/fields/FSGradientField.vue +143 -0
- package/components/fields/FSIconField.vue +9 -6
- package/components/fields/FSMagicConfigField.vue +154 -0
- package/components/fields/FSMagicField.vue +185 -0
- package/components/fields/FSNumberField.vue +3 -1
- package/components/fields/FSPasswordField.vue +10 -10
- package/components/fields/FSRichTextField.vue +136 -50
- package/components/fields/FSSearchField.vue +41 -62
- package/components/fields/FSSelectField.vue +148 -53
- package/components/fields/FSTagField.vue +19 -16
- package/components/fields/FSTermField.vue +192 -186
- package/components/fields/FSTextArea.vue +4 -4
- package/components/fields/FSTextField.vue +29 -6
- package/components/fields/FSTimeField.vue +55 -20
- package/components/fields/FSTimeSlotField.vue +6 -5
- package/components/fields/FSTranslateField.vue +234 -0
- package/components/fields/FSTranslateRichTextField.vue +185 -0
- package/components/fields/FSTreeViewField.vue +520 -0
- package/components/lists/FSDataIteratorItem.vue +18 -3
- package/components/lists/FSDataTableUI.vue +138 -51
- package/components/lists/FSFilterButton.vue +4 -2
- package/components/lists/FSHiddenButton.vue +4 -2
- package/components/map/FSMap.vue +598 -0
- package/components/map/FSMapEditPointAddressOverlay.vue +164 -0
- package/components/map/FSMapLayerButton.vue +77 -0
- package/components/map/FSMapOverlay.vue +150 -0
- package/components/selects/FSSelectAutoRefresh.vue +62 -0
- package/components/selects/FSSelectDashboardVariableType.vue +47 -0
- package/components/selects/FSSelectDateSetting.vue +39 -37
- package/components/selects/FSSelectDays.vue +62 -0
- package/components/tiles/FSDashboardOrganisationTileUI.vue +7 -5
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +7 -5
- package/components/tiles/FSDashboardShallowTileUI.vue +7 -5
- package/components/tiles/FSDeviceOrganisationTileUI.vue +11 -12
- package/components/tiles/FSFolderTileUI.vue +8 -6
- package/components/tiles/FSGroupTileUI.vue +13 -15
- package/components/tiles/{FSSimpleIconTileUI.vue → FSSimpleTileUI.vue} +29 -15
- package/components/tiles/FSTile.vue +5 -11
- package/components/tiles/FSUserOrganisationTileUI.vue +2 -1
- package/components/toggleSets/FSToggleSetPosition.vue +61 -0
- package/composables/index.ts +5 -1
- package/composables/useAddress.ts +158 -0
- package/composables/useAutocomplete.ts +4 -3
- package/composables/useColors.ts +8 -25
- package/composables/useDebounce.ts +2 -1
- package/composables/useMagicFieldProvider.ts +22 -0
- package/composables/useRules.ts +4 -12
- package/composables/useSlots.ts +46 -26
- package/composables/useTables.ts +29 -0
- package/composables/useTreeView.ts +48 -0
- package/elements/FSFormElement.ts +2 -1
- package/icons/flags/France.vue +21 -5
- package/icons/flags/Germany.vue +16 -4
- package/icons/flags/GreatBritain.vue +25 -6
- package/icons/flags/Italy.vue +21 -5
- package/icons/flags/Portugal.vue +225 -51
- package/icons/flags/Spain.vue +2781 -543
- package/icons/flags/UnitedStates.vue +31 -7
- package/icons/widgetTemplates/DevicesWidget.vue +189 -189
- package/icons/widgetTemplates/ProfileWidget.vue +9 -9
- package/icons/widgetTemplates/TextWidget.vue +6 -6
- package/models/breadcrumbs.ts +1 -1
- package/models/deviceAlerts.ts +1 -1
- package/models/deviceConnectivities.ts +1 -1
- package/models/index.ts +2 -0
- package/models/magicFields.ts +9 -0
- package/models/map.ts +18 -0
- package/models/richTextVariable.ts +5 -0
- package/models/rules.ts +11 -2
- package/models/tables.ts +30 -21
- package/models/variableNode.ts +104 -0
- package/package.json +21 -18
- package/plugins/colorPlugin.ts +2 -2
- package/plugins/index.ts +2 -1
- package/plugins/mapsPlugin.ts +37 -0
- package/shims-plugin.d.ts +2 -2
- package/shims-window.d.ts +3 -0
- package/styles/components/fs_button.scss +5 -0
- package/styles/components/fs_card.scss +0 -1
- package/styles/components/fs_col.scss +1 -0
- package/styles/components/fs_color_field.scss +12 -2
- package/styles/components/fs_data_iterator_item.scss +19 -6
- package/styles/components/fs_dialog.scss +12 -22
- package/styles/components/fs_gradient_field.scss +16 -0
- package/styles/components/fs_image_card.scss +18 -0
- package/styles/components/fs_magic_config_field.scss +13 -0
- package/styles/components/fs_map.scss +129 -0
- package/styles/components/fs_map_overlay.scss +38 -0
- package/styles/components/fs_meta_field.scss +6 -0
- package/styles/components/fs_option_group.scss +1 -0
- package/styles/components/fs_radio.scss +1 -1
- package/styles/components/fs_rich_text_field.scss +17 -5
- package/styles/components/fs_row.scss +1 -1
- package/styles/components/fs_select_field.scss +9 -14
- package/styles/components/fs_text.scss +1 -1
- package/styles/components/fs_time_field.scss +0 -4
- package/styles/components/fs_translate_field.scss +3 -0
- package/styles/components/fs_tree_view_field.scss +53 -0
- package/styles/components/index.scss +8 -1
- package/styles/globals/overrides.scss +54 -8
- package/styles/globals/scrollbars.scss +2 -2
- package/themes/default.ts +1 -1
- package/utils/gradient.ts +1601 -0
- package/utils/index.ts +3 -1
- package/utils/leafletMarkers.ts +23 -0
- package/utils/lexical.ts +3 -1
- package/components/selects/FSSelectTimeZone.vue +0 -67
- package/styles/components/fs_date_field.scss +0 -8
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
|
+
}
|
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]+[ -]?)
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
9
|
+
sortable?: boolean | null;
|
|
10
|
+
sort?: ((a: any, b: any) => number) | null;
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
17
|
+
innerValue?: ((value: any) => any) | null;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
// Should not be set directly !
|
|
20
|
+
slotName?: string | null;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface FSDataTableFilter {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
32
|
-
|
|
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.
|
|
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.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.
|
|
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": "
|
|
17
|
-
"@lexical/history": "
|
|
18
|
-
"@lexical/link": "
|
|
19
|
-
"@lexical/plain-text": "
|
|
20
|
-
"@lexical/rich-text": "
|
|
21
|
-
"@lexical/selection": "
|
|
22
|
-
"@lexical/text": "
|
|
23
|
-
"@lexical/utils": "
|
|
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": "
|
|
28
|
+
"blurhash": "2.0.5",
|
|
26
29
|
"color": "^4.2.3",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
30
|
+
"leaflet": "1.9.4",
|
|
31
|
+
"leaflet.markercluster": "1.5.3"
|
|
29
32
|
},
|
|
30
33
|
"devDependencies": {
|
|
31
|
-
"@types/color": "
|
|
32
|
-
"sass": "
|
|
33
|
-
"sass-loader": "
|
|
34
|
+
"@types/color": "3.0.6",
|
|
35
|
+
"sass": "1.71.1",
|
|
36
|
+
"sass-loader": "13.3.2"
|
|
34
37
|
},
|
|
35
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "93365f65d39d6c9cc3821ffb48cba187200deaf9"
|
|
36
39
|
}
|
package/plugins/colorPlugin.ts
CHANGED
|
@@ -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
|
|
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 {
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
.fs-color-field .
|
|
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
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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,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
|
+
}
|