@hybridcore/ui 1.6.2 → 1.6.4

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/dist/main.d.ts CHANGED
@@ -52,6 +52,7 @@ import { TabsProps as TabsProps_2 } from '@mui/material';
52
52
  import { Theme } from '@mui/material';
53
53
  import { ThemeOptions } from '@mui/material';
54
54
  import { ThemeProvider } from '@mui/material';
55
+ import { TypographyProps } from '@mui/material';
55
56
 
56
57
  export declare const Access: <T extends string>(props: AccessProps<T>) => JSX_2.Element | null;
57
58
 
@@ -247,6 +248,12 @@ export declare interface ChartProps {
247
248
  initDelay?: number;
248
249
  interval?: string;
249
250
  baseInterval?: BaseInterval;
251
+ /**
252
+ * When `true`, the chart is still waiting on its async config/data. The wrapper
253
+ * holds back rendering (and the "missing config" validation error) until this
254
+ * clears, so a misconfiguration only surfaces once the data has settled.
255
+ */
256
+ loading?: boolean;
250
257
  /**
251
258
  * Color palette used for series. Defaults to the lib's built-in viridis-cool
252
259
  * palette. Pass `theme.palette.viridisCool` (or any sequential palette) from
@@ -336,13 +343,13 @@ declare interface ConditionalWrapperProps {
336
343
  */
337
344
  condition: boolean;
338
345
  /**
339
- * @param children React.ReactElement
346
+ * @param children React.ReactNode
340
347
  */
341
- wrapper(children: default_2.ReactElement): default_2.ReactElement;
348
+ wrapper(children: default_2.ReactNode): default_2.ReactNode;
342
349
  /**
343
350
  * Child components to wrap
344
351
  */
345
- children: default_2.ReactElement;
352
+ children: default_2.ReactNode;
346
353
  }
347
354
 
348
355
  declare function confirm_2(title: string, description: string, options?: OptionsType): Promise<unknown>;
@@ -607,6 +614,19 @@ export declare interface DurationSelectProps {
607
614
 
608
615
  export declare type DurationSelectValue = "24 Hours" | "7 Days" | "30 Days";
609
616
 
617
+ export declare const EditableText: (props: EditableTextProps) => JSX_2.Element;
618
+
619
+ export declare type EditableTextComponentOverride<Theme = unknown> = {
620
+ defaultProps?: Partial<EditableTextProps>;
621
+ styleOverrides?: ComponentsOverrides<Theme>["HCEditableText"];
622
+ };
623
+
624
+ export declare interface EditableTextProps extends TypographyProps {
625
+ text?: string;
626
+ placeholder?: string;
627
+ onChange?(text: string | null): void;
628
+ }
629
+
610
630
  export declare const FlexCol: StyledComponent<BoxOwnProps<Theme> & Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
611
631
  ref?: ((instance: HTMLDivElement | null) => void | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLDivElement> | null | undefined;
612
632
  }, keyof BoxOwnProps<Theme>> & MUIStyledCommonProps<Theme>, {}, {}>;
@@ -1110,6 +1130,15 @@ export declare interface MetricCardProps {
1110
1130
  variant?: MetricVariant;
1111
1131
  loading?: boolean;
1112
1132
 
1133
+ // "overlay" (default) = chart bleeds behind the value; "panel" = value/badge on the
1134
+ // left, chart inset on the right, wrapped in a nested card.
1135
+ layout?: MetricLayout;
1136
+
1137
+ // Rendered verbatim around the formatted number, e.g. valuePrefix "€ " → "€ 1,577",
1138
+ // valueSuffix " kg" → "1,577 kg". Include any spacing in the string itself.
1139
+ valuePrefix?: string;
1140
+ valueSuffix?: string;
1141
+
1113
1142
  showChange?: boolean;
1114
1143
  changeType?: MetricChangeType;
1115
1144
 
@@ -1144,6 +1173,8 @@ export declare type MetricIconPosition =
1144
1173
  | "bottom-left"
1145
1174
  | "bottom-right";
1146
1175
 
1176
+ declare type MetricLayout = "overlay" | "panel";
1177
+
1147
1178
  export declare type MetricTrend = "up" | "down" | "neutral";
1148
1179
 
1149
1180
  export declare type MetricVariant =
@@ -2867,6 +2898,22 @@ declare module "@mui/material/styles" {
2867
2898
 
2868
2899
 
2869
2900
 
2901
+ declare module "@mui/material/styles" {
2902
+ interface ComponentNameToClassKey {
2903
+ HCEditableText: "root";
2904
+ }
2905
+
2906
+ interface ComponentsPropsList {
2907
+ HCEditableText: Partial<EditableTextProps>;
2908
+ }
2909
+
2910
+ interface Components<Theme = unknown> {
2911
+ HCEditableText?: EditableTextComponentOverride<Theme>;
2912
+ }
2913
+ }
2914
+
2915
+
2916
+
2870
2917
  declare module "@mui/material/styles" {
2871
2918
  interface ComponentNameToClassKey {
2872
2919
  HCGeometryPicker:
@@ -3160,11 +3207,12 @@ declare module "@mui/material/styles" {
3160
3207
  | "label"
3161
3208
  | "value"
3162
3209
  | "trendContainer"
3163
- | "trendValue"
3164
3210
  | "description"
3165
3211
  | "icon"
3166
3212
  | "cornerIcon"
3167
- | "chart";
3213
+ | "chart"
3214
+ | "panel"
3215
+ | "sideChart";
3168
3216
  }
3169
3217
 
3170
3218
  interface ComponentsPropsList {
@@ -3652,22 +3700,6 @@ declare module "@mui/material/styles" {
3652
3700
  }
3653
3701
  }
3654
3702
 
3655
-
3656
-
3657
- declare module "@mui/material/styles" {
3658
- interface ComponentNameToClassKey {
3659
- HCEditableText: "root";
3660
- }
3661
-
3662
- interface ComponentsPropsList {
3663
- HCEditableText: Partial<EditableTextProps>;
3664
- }
3665
-
3666
- interface Components<Theme = unknown> {
3667
- HCEditableText?: EditableTextComponentOverride<Theme>;
3668
- }
3669
- }
3670
-
3671
3703
  declare namespace AUTH {
3672
3704
  type ModuleType =
3673
3705
  | "UI"
package/dist/main.js CHANGED
@@ -11,8 +11,8 @@ import { DrillDownTreemap as u } from "./components/charts/drill-down-treemap/in
11
11
  import { DrillDownVoronoiTreemap as I } from "./components/charts/drill-down-voronoi-treemap/index.js";
12
12
  import { Heatmap as y } from "./components/charts/heatmap/index.js";
13
13
  import { HighlightLineChart as F } from "./components/charts/highlighting-line-data/index.js";
14
- import { LineChart as M } from "./components/charts/line/index.js";
15
- import { LogaritmicScale as V } from "./components/charts/logaritmic-scale/index.js";
14
+ import { LineChart as k } from "./components/charts/line/index.js";
15
+ import { LogaritmicScale as R } from "./components/charts/logaritmic-scale/index.js";
16
16
  import { MultipleValueAxes as v } from "./components/charts/multiple-value-axes/index.js";
17
17
  import { NestedPie as E } from "./components/charts/nested-pie/index.js";
18
18
  import { PackedCircles as H } from "./components/charts/packed-circles/index.js";
@@ -37,52 +37,53 @@ import { A as hr, D as ur } from "./index-e9xTIYWt.js";
37
37
  import { DEFAULT_RELATIVE_PRESET_LABELS as Ir } from "./components/date-picker-with-custom-range/logic.js";
38
38
  import { DateTimePicker as yr } from "./components/date-time-picker/index.js";
39
39
  import { Divider as Fr } from "./components/divider/index.js";
40
- import { DateRangePicker as Mr } from "./components/date-range-picker/index.js";
41
- import { DocumentViewer as Vr } from "./components/document-viewer/index.js";
40
+ import { DateRangePicker as kr } from "./components/date-range-picker/index.js";
41
+ import { DocumentViewer as Rr } from "./components/document-viewer/index.js";
42
42
  import { DurationSelect as vr } from "./components/duration-select/index.js";
43
- import { GeometryPicker as Er } from "./components/geometry-picker/index.js";
44
- import { Geometry as Hr } from "./components/geometry-picker/geometry/index.js";
45
- import { Parser as Wr } from "./components/geometry-picker/parser/index.js";
46
- import { HeatMap as Or } from "./components/heat-map/index.js";
47
- import { IconButton as Nr } from "./components/icon-button/index.js";
48
- import { InstanceForm as zr } from "./components/instance-form/index.js";
49
- import { InstanceHierarchyTable as Yr } from "./components/instance-hierarchy-table/index.js";
50
- import { InstanceTable as Jr } from "./components/instance-table/index.js";
51
- import { InstanceVariableList as Qr } from "./components/instance-variable-list/index.js";
52
- import { LinearIndicator as $r } from "./components/linear-indicator/index.js";
53
- import { Loading as oo } from "./components/loading/index.js";
54
- import { Map as to } from "./components/map/index.js";
55
- import { MetricCard as mo } from "./components/metric-card/index.js";
56
- import { ObjectProfileCard as xo } from "./components/object-profile-card/index.js";
57
- import { PaginatedList as io } from "./components/paginated-list/index.js";
58
- import { PhoneInput as no } from "./components/phone-input/index.js";
59
- import { Placeholder as so } from "./components/placeholder/index.js";
60
- import { PositionalTooltip as Po } from "./components/positional-tooltip/index.js";
61
- import { PrrMap as Do } from "./components/prr-map/index.js";
62
- import { RangeSelector as ho } from "./components/range-selector/index.js";
63
- import { RasterGridMap as So } from "./components/raster-grid-map/index.js";
64
- import { SearchInput as go } from "./components/search-input/index.js";
65
- import { ScrollDrag as Ao } from "./components/scroll-drag/index.js";
66
- import { SimplePivotTable as ko } from "./components/simple-pivot-table/index.js";
67
- import { SortableList as Ro } from "./components/sortable-list/index.js";
68
- import { StatsBox as bo } from "./components/stats-box/index.js";
69
- import { StaticText as wo } from "./components/static-text/index.js";
70
- import { Tabs as Go } from "./components/tabs/index.js";
71
- import { TextOverflow as Bo } from "./components/text-overflow/index.js";
72
- import { TemplateFilters as _o } from "./components/template-filters/index.js";
73
- import { TemplateForm as Uo } from "./components/template-form/index.js";
74
- import { TemplatePropertyFilters as jo } from "./components/template-property-filters/index.js";
75
- import { Property as Xo } from "./components/template-property-filters/property.js";
76
- import { TimelineWidget as qo } from "./components/timeline/index.js";
77
- import { ToggleViewButton as Ko } from "./components/toggle-view-button/index.js";
78
- import { TreeSelect as Zo } from "./components/tree-select/index.js";
79
- import { TreeViewFilter as re } from "./components/treeview-filter/index.js";
80
- import { Uploader as ee } from "./components/uploader/index.js";
81
- import { VisuallyHiddenInput as pe } from "./components/visually-hidden-input/styled.js";
82
- import { Widget as ae } from "./components/widget/styled.js";
83
- import { FlexCol as fe } from "./components/flex-col/index.js";
84
- import { FlexRow as le } from "./components/flex-row/index.js";
85
- import { notify as ce, removeNotification as se } from "./components/notification/store.js";
43
+ import { EditableText as Er } from "./components/editable-text/index.js";
44
+ import { GeometryPicker as Hr } from "./components/geometry-picker/index.js";
45
+ import { Geometry as Wr } from "./components/geometry-picker/geometry/index.js";
46
+ import { Parser as Or } from "./components/geometry-picker/parser/index.js";
47
+ import { HeatMap as Nr } from "./components/heat-map/index.js";
48
+ import { IconButton as zr } from "./components/icon-button/index.js";
49
+ import { InstanceForm as Yr } from "./components/instance-form/index.js";
50
+ import { InstanceHierarchyTable as Jr } from "./components/instance-hierarchy-table/index.js";
51
+ import { InstanceTable as Qr } from "./components/instance-table/index.js";
52
+ import { InstanceVariableList as $r } from "./components/instance-variable-list/index.js";
53
+ import { LinearIndicator as oo } from "./components/linear-indicator/index.js";
54
+ import { Loading as to } from "./components/loading/index.js";
55
+ import { Map as mo } from "./components/map/index.js";
56
+ import { MetricCard as xo } from "./components/metric-card/index.js";
57
+ import { ObjectProfileCard as io } from "./components/object-profile-card/index.js";
58
+ import { PaginatedList as no } from "./components/paginated-list/index.js";
59
+ import { PhoneInput as so } from "./components/phone-input/index.js";
60
+ import { Placeholder as Po } from "./components/placeholder/index.js";
61
+ import { PositionalTooltip as Do } from "./components/positional-tooltip/index.js";
62
+ import { PrrMap as ho } from "./components/prr-map/index.js";
63
+ import { RangeSelector as So } from "./components/range-selector/index.js";
64
+ import { RasterGridMap as go } from "./components/raster-grid-map/index.js";
65
+ import { SearchInput as Ao } from "./components/search-input/index.js";
66
+ import { ScrollDrag as bo } from "./components/scroll-drag/index.js";
67
+ import { SimplePivotTable as Mo } from "./components/simple-pivot-table/index.js";
68
+ import { SortableList as Vo } from "./components/sortable-list/index.js";
69
+ import { StatsBox as wo } from "./components/stats-box/index.js";
70
+ import { StaticText as Go } from "./components/static-text/index.js";
71
+ import { Tabs as Bo } from "./components/tabs/index.js";
72
+ import { TextOverflow as _o } from "./components/text-overflow/index.js";
73
+ import { TemplateFilters as Uo } from "./components/template-filters/index.js";
74
+ import { TemplateForm as jo } from "./components/template-form/index.js";
75
+ import { TemplatePropertyFilters as Xo } from "./components/template-property-filters/index.js";
76
+ import { Property as qo } from "./components/template-property-filters/property.js";
77
+ import { TimelineWidget as Ko } from "./components/timeline/index.js";
78
+ import { ToggleViewButton as Zo } from "./components/toggle-view-button/index.js";
79
+ import { TreeSelect as re } from "./components/tree-select/index.js";
80
+ import { TreeViewFilter as ee } from "./components/treeview-filter/index.js";
81
+ import { Uploader as pe } from "./components/uploader/index.js";
82
+ import { VisuallyHiddenInput as ae } from "./components/visually-hidden-input/styled.js";
83
+ import { Widget as fe } from "./components/widget/styled.js";
84
+ import { FlexCol as le } from "./components/flex-col/index.js";
85
+ import { FlexRow as ce } from "./components/flex-row/index.js";
86
+ import { notify as de, removeNotification as Ce } from "./components/notification/store.js";
86
87
  export {
87
88
  x as Access,
88
89
  i as AccessUtils,
@@ -103,74 +104,75 @@ export {
103
104
  cr as DataGrid,
104
105
  dr as DataMap,
105
106
  ur as DatePickerWithCustomRange,
106
- Mr as DateRangePicker,
107
+ kr as DateRangePicker,
107
108
  yr as DateTimePicker,
108
109
  Pr as DisseminationList,
109
110
  Fr as Divider,
110
- Vr as DocumentViewer,
111
+ Rr as DocumentViewer,
111
112
  u as DrillDownTreemap,
112
113
  I as DrillDownVoronoiTreemap,
113
114
  vr as DurationSelect,
114
- fe as FlexCol,
115
- le as FlexRow,
116
- Hr as GeometryDraw,
117
- Wr as GeometryParser,
118
- Er as GeometryPicker,
115
+ Er as EditableText,
116
+ le as FlexCol,
117
+ ce as FlexRow,
118
+ Wr as GeometryDraw,
119
+ Or as GeometryParser,
120
+ Hr as GeometryPicker,
119
121
  ar as HCNotificationProvider,
120
- Or as HeatMap,
122
+ Nr as HeatMap,
121
123
  y as Heatmap,
122
124
  F as HighlightLineChart,
123
- Nr as IconButton,
124
- zr as InstanceForm,
125
- Yr as InstanceHierarchyTable,
126
- Jr as InstanceTable,
127
- Qr as InstanceVariableList,
128
- M as LineChart,
129
- $r as LinearIndicator,
130
- oo as Loading,
125
+ zr as IconButton,
126
+ Yr as InstanceForm,
127
+ Jr as InstanceHierarchyTable,
128
+ Qr as InstanceTable,
129
+ $r as InstanceVariableList,
130
+ k as LineChart,
131
+ oo as LinearIndicator,
132
+ to as Loading,
131
133
  m as LocalizationProvider,
132
- V as LogaritmicScale,
133
- to as Map,
134
- mo as MetricCard,
134
+ R as LogaritmicScale,
135
+ mo as Map,
136
+ xo as MetricCard,
135
137
  v as MultipleValueAxes,
136
138
  E as NestedPie,
137
- xo as ObjectProfileCard,
139
+ io as ObjectProfileCard,
138
140
  H as PackedCircles,
139
- io as PaginatedList,
140
- no as PhoneInput,
141
+ no as PaginatedList,
142
+ so as PhoneInput,
141
143
  W as PieChart,
142
- so as Placeholder,
143
- Po as PositionalTooltip,
144
- Xo as PropertyFilterInput,
145
- Do as PrrMap,
146
- ho as RangeSelector,
147
- So as RasterGridMap,
148
- Ao as ScrollDrag,
149
- go as SearchInput,
144
+ Po as Placeholder,
145
+ Do as PositionalTooltip,
146
+ qo as PropertyFilterInput,
147
+ ho as PrrMap,
148
+ So as RangeSelector,
149
+ go as RasterGridMap,
150
+ bo as ScrollDrag,
151
+ Ao as SearchInput,
150
152
  Dr as SecurityLevel,
151
- ko as SimplePivotTable,
152
- Ro as SortableList,
153
+ Mo as SimplePivotTable,
154
+ Vo as SortableList,
153
155
  O as StackedAreaRadar,
154
156
  N as StackedColumnChart,
155
- wo as StaticText,
156
- bo as StatsBox,
157
- Go as Tabs,
158
- _o as TemplateFilters,
159
- Uo as TemplateForm,
160
- jo as TemplatePropertyFilters,
161
- Bo as TextOverflow,
157
+ Go as StaticText,
158
+ wo as StatsBox,
159
+ Bo as Tabs,
160
+ Uo as TemplateFilters,
161
+ jo as TemplateForm,
162
+ Xo as TemplatePropertyFilters,
163
+ _o as TextOverflow,
162
164
  e as ThemeProvider,
163
- qo as TimelineWidget,
164
- Ko as ToggleViewButton,
165
- Zo as TreeSelect,
166
- re as TreeViewFilter,
167
- ee as Uploader,
168
- pe as VisuallyHiddenInput,
169
- ae as Widget,
165
+ Ko as TimelineWidget,
166
+ Zo as ToggleViewButton,
167
+ re as TreeSelect,
168
+ ee as TreeViewFilter,
169
+ pe as Uploader,
170
+ ae as VisuallyHiddenInput,
171
+ fe as Widget,
170
172
  z as XYChart,
171
173
  tr as alert,
172
174
  pr as confirm,
173
175
  t as createTheme,
174
- ce as notify,
175
- se as removeNotification
176
+ de as notify,
177
+ Ce as removeNotification
176
178
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.6.2",
4
+ "version": "1.6.4",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -55,7 +55,8 @@
55
55
  "react-number-format": "^5.3.4",
56
56
  "react-phone-number-input": "^3.3.7",
57
57
  "react-select": "^5.8.0",
58
- "react-sortablejs": "^6.1.4"
58
+ "react-sortablejs": "^6.1.4",
59
+ "sortablejs": "^1"
59
60
  },
60
61
  "dependencies": {
61
62
  "@amcharts/amcharts5": "^5.14.4",
@@ -98,6 +99,7 @@
98
99
  "@types/react": "^18.3.10",
99
100
  "@types/react-color": "^3.0.12",
100
101
  "@types/react-dom": "^18.3.0",
102
+ "@types/sortablejs": "^1",
101
103
  "@types/terraformer__wkt": "^2",
102
104
  "@vitejs/plugin-react": "^4.3.2",
103
105
  "@wojtekmaj/react-daterange-picker": "^5.5.0",
@@ -123,6 +125,7 @@
123
125
  "react-phone-number-input": "^3.3.7",
124
126
  "react-select": "^5.8.0",
125
127
  "react-sortablejs": "^6.1.4",
128
+ "sortablejs": "^1",
126
129
  "storybook": "^8.3.5",
127
130
  "typescript": "^5.5.3",
128
131
  "typescript-eslint": "^8.7.0",