@omnsight/osint-entity-components 0.2.0 → 0.2.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.
@@ -0,0 +1,2 @@
1
+ .entity-avatar{border:2px solid var(--mantine-color-body);transition:all .2s}.entity-avatar:hover{transform:scale(1.25);box-shadow:0 4px 8px #0003;z-index:100!important}
2
+ /*$vite$:1*/
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.2.0",
6
+ "version": "0.2.1",
7
7
  "engines": {
8
8
  "node": ">=24.0.0"
9
9
  },
@@ -58,6 +58,7 @@
58
58
  "omni-osint-crud-client": "latest",
59
59
  "react": "^19.2.4",
60
60
  "react-dom": "^19.2.4",
61
+ "react-hook-form": "^7.72.0",
61
62
  "react-i18next": "^16.6.6"
62
63
  },
63
64
  "devDependencies": {
@@ -1,4 +1,4 @@
1
- import { Group, Paper, RingProgress, Stack, Text, Title, Textarea, ScrollArea } from "@mantine/core";
1
+ import { Group, Paper, RingProgress, Stack, Text, Title, ScrollArea } from "@mantine/core";
2
2
  import { type MonitoringSource } from "omni-monitoring-client";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import React from "react";
@@ -26,7 +26,7 @@ export const EventIconSelector: React.FC<EventIconSelectorProps> = ({
26
26
  <Select
27
27
  leftSection={<EventIcon event={data} />}
28
28
  defaultValue={translatedOptions[0].value}
29
- value={value}
29
+ value={value ?? ""}
30
30
  onChange={onChange}
31
31
  data={translatedOptions}
32
32
  style={{ flex: 1 }}
@@ -55,7 +55,8 @@ export const EventColorSelector: React.FC<EventColorSelectorProps> = ({
55
55
 
56
56
  return (
57
57
  <ColorInput
58
- value={value || colors[0]}
58
+ defaultValue={colors[0]}
59
+ value={value ?? ""}
59
60
  onChange={onChange}
60
61
  swatches={colors}
61
62
  style={{ flex: 1 }}
@@ -90,7 +91,7 @@ export const EventIconSelect: React.FC<EventIconSelectProps> = ({
90
91
  value={value.type}
91
92
  onChange={handleTypeChange}
92
93
  />
93
- <EventColorSelector
94
+ <EventColorSelector
94
95
  value={String(value.attributes?.icon_color)}
95
96
  onChange={handleColorChange}
96
97
  />
@@ -24,7 +24,7 @@ export const OrganizationIconSelector: React.FC<
24
24
  <Select
25
25
  leftSection={<OrganizationIcon organization={data} />}
26
26
  defaultValue={translatedOptions[0].value}
27
- value={value}
27
+ value={value ?? ""}
28
28
  onChange={onChange}
29
29
  data={translatedOptions}
30
30
  style={{ flex: 1 }}
@@ -52,7 +52,8 @@ export const OrganizationColorSelector: React.FC<
52
52
 
53
53
  return (
54
54
  <ColorInput
55
- value={value || colors[0]}
55
+ defaultValue={colors[0]}
56
+ value={value ?? ""}
56
57
  onChange={onChange}
57
58
  swatches={colors}
58
59
  style={{ flex: 1 }}
@@ -1,8 +1,8 @@
1
- import { type Person } from 'omni-osint-crud-client';
2
- import { useTranslation } from 'react-i18next';
3
- import { Group, Select, ColorInput } from '@mantine/core';
4
- import { ICON_OPTIONS } from './icons';
5
- import { PersonIcon } from './Icon';
1
+ import { type Person } from "omni-osint-crud-client";
2
+ import { useTranslation } from "react-i18next";
3
+ import { Group, Select, ColorInput } from "@mantine/core";
4
+ import { ICON_OPTIONS } from "./icons";
5
+ import { PersonIcon } from "./Icon";
6
6
 
7
7
  interface PersonIconSelectorProps {
8
8
  data: Person;
@@ -26,7 +26,7 @@ export const PersonIconSelector: React.FC<PersonIconSelectorProps> = ({
26
26
  <Select
27
27
  leftSection={<PersonIcon person={data} />}
28
28
  defaultValue={translatedOptions[0].value}
29
- value={value}
29
+ value={value ?? ""}
30
30
  onChange={onChange}
31
31
  data={translatedOptions}
32
32
  style={{ flex: 1 }}
@@ -55,7 +55,8 @@ export const PersonColorSelector: React.FC<PersonColorSelectorProps> = ({
55
55
 
56
56
  return (
57
57
  <ColorInput
58
- value={value || colors[0]}
58
+ defaultValue={colors[0]}
59
+ value={value ?? ""}
59
60
  onChange={onChange}
60
61
  swatches={colors}
61
62
  style={{ flex: 1 }}
@@ -26,7 +26,7 @@ export const SourceIconSelector: React.FC<SourceIconSelectorProps> = ({
26
26
  <Select
27
27
  leftSection={<SourceIcon source={data} />}
28
28
  defaultValue={translatedOptions[0].value}
29
- value={value}
29
+ value={value ?? ""}
30
30
  onChange={onChange}
31
31
  data={translatedOptions}
32
32
  style={{ flex: 1 }}
@@ -55,7 +55,8 @@ export const SourceColorSelector: React.FC<SourceColorSelectorProps> = ({
55
55
 
56
56
  return (
57
57
  <ColorInput
58
- value={value || colors[0]}
58
+ defaultValue={colors[0]}
59
+ value={value ?? ""}
59
60
  onChange={onChange}
60
61
  swatches={colors}
61
62
  style={{ flex: 1 }}
@@ -91,7 +92,7 @@ export const SourceIconSelect: React.FC<SourceIconSelectProps> = ({
91
92
  onChange={handleTypeChange}
92
93
  />
93
94
  <SourceColorSelector
94
- value={String(value.attributes?.icon_color)}
95
+ value={String(value.attributes?.icon_color ?? "")}
95
96
  onChange={handleColorChange}
96
97
  />
97
98
  </Group>
@@ -26,7 +26,7 @@ export const WebsiteIconSelector: React.FC<WebsiteIconSelectorProps> = ({
26
26
  <Select
27
27
  leftSection={<WebsiteIcon website={data} />}
28
28
  defaultValue={translatedOptions[0].value}
29
- value={value}
29
+ value={value ?? ""}
30
30
  onChange={onChange}
31
31
  data={translatedOptions}
32
32
  style={{ flex: 1 }}
@@ -55,7 +55,8 @@ export const WebsiteColorSelector: React.FC<WebsiteColorSelectorProps> = ({
55
55
 
56
56
  return (
57
57
  <ColorInput
58
- value={value || colors[0]}
58
+ defaultValue={colors[0]}
59
+ value={value ?? ""}
59
60
  onChange={onChange}
60
61
  swatches={colors}
61
62
  style={{ flex: 1 }}