@hybridcore/ui 1.5.70 → 1.5.73

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.
@@ -1,84 +1,116 @@
1
- import { jsxs as s, jsx as t, Fragment as i } from "react/jsx-runtime";
2
- import { List as S, Box as E, Divider as l, ListItem as I, ListItemText as O, Typography as C, Button as P, TablePagination as j } from "@mui/material";
3
- import k from "lodash";
4
- import { useState as c } from "react";
5
- import { Container as z } from "../container/index.js";
6
- const A = [5, 10, 25, 50];
7
- function U({
8
- title: h,
9
- data: a = [],
1
+ import { jsxs as c, jsx as o, Fragment as p } from "react/jsx-runtime";
2
+ import { List as y, Box as j, Divider as P, ListItem as z, ListItemText as A, Typography as B, Button as u, TablePagination as F } from "@mui/material";
3
+ import G from "lodash";
4
+ import { useState as g } from "react";
5
+ import { Container as M } from "../container/index.js";
6
+ const U = [5, 10, 25, 50];
7
+ function K({
8
+ title: f,
9
+ data: l = [],
10
10
  payload: n,
11
- totalCount: m,
12
- onChange: o
11
+ totalCount: v,
12
+ onChange: s,
13
+ onItemClick: t,
14
+ sx: w
13
15
  }) {
14
- const [x, p] = c(0), [u, w] = c(5), [v, d] = c([]), f = (n == null ? void 0 : n.pageNumber) !== void 0 ? n.pageNumber : x, g = (n == null ? void 0 : n.rows) !== void 0 ? n.rows : u, L = (e, r) => {
15
- p(r), o && o({ ...n, pageNumber: r, rows: g });
16
- }, b = (e) => {
16
+ const [m, h] = g(0), [b, L] = g(5), [R, x] = g([]), a = (n == null ? void 0 : n.pageNumber) !== void 0 ? n.pageNumber : m, i = (n == null ? void 0 : n.rows) !== void 0 ? n.rows : b, T = (e, r) => {
17
+ h(r), s && s({ ...n, pageNumber: r, rows: i });
18
+ }, _ = (e) => {
17
19
  const r = parseInt(e.target.value, 10);
18
- w(r), p(0), o && o({ ...n, pageNumber: 0, rows: r });
19
- }, R = (e) => () => {
20
- d((r) => [...r, e]);
21
- }, T = (e) => () => {
22
- d((r) => r.filter((N) => N !== e));
23
- }, _ = o ? m || 0 : a.length;
24
- return /* @__PURE__ */ s(
25
- z,
20
+ L(r), h(0), s && s({ ...n, pageNumber: 0, rows: r });
21
+ }, D = (e) => (r) => {
22
+ r.stopPropagation(), x((d) => [...d, e]);
23
+ }, N = (e) => (r) => {
24
+ r.stopPropagation(), x((d) => d.filter((O) => O !== e));
25
+ }, S = s ? v || 0 : l.length, E = s ? l : l.slice(a * i, (a + 1) * i);
26
+ return /* @__PURE__ */ c(
27
+ M,
26
28
  {
27
- title: h,
29
+ title: f,
28
30
  headerSx: {
29
31
  py: 2,
30
32
  px: 3
31
33
  },
32
- contentSx: { p: "0px !important" },
34
+ contentSx: {
35
+ p: "0px !important",
36
+ display: "flex",
37
+ flexDirection: "column",
38
+ flex: 1,
39
+ overflow: "hidden"
40
+ },
41
+ sx: {
42
+ display: "flex",
43
+ flexDirection: "column",
44
+ height: "100%",
45
+ ...w
46
+ },
33
47
  children: [
34
- /* @__PURE__ */ t(S, { disablePadding: !0, children: a.map((e, r) => /* @__PURE__ */ s(E, { children: [
35
- r === 0 && /* @__PURE__ */ t(l, { component: "li" }),
36
- /* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(
37
- O,
48
+ /* @__PURE__ */ o(y, { disablePadding: !0, sx: { flex: 1, overflowY: "auto" }, children: E.map((e, r) => /* @__PURE__ */ c(j, { children: [
49
+ r === 0 && /* @__PURE__ */ o(P, { component: "li" }),
50
+ /* @__PURE__ */ o(
51
+ z,
38
52
  {
39
- primary: e.title,
40
- secondaryTypographyProps: {
41
- component: "div"
53
+ onClick: () => t == null ? void 0 : t(e),
54
+ sx: {
55
+ cursor: t ? "pointer" : "default",
56
+ "&:hover": t ? { backgroundColor: "action.hover" } : void 0
42
57
  },
43
- secondary: /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(C, { variant: "body2", children: v.includes(e.id) ? /* @__PURE__ */ s(i, { children: [
44
- e.description,
45
- /* @__PURE__ */ t(
46
- P,
47
- {
48
- variant: "text",
49
- size: "small",
50
- sx: { py: 0, px: 1 },
51
- onClick: T(e.id),
52
- children: "show less"
53
- }
54
- )
55
- ] }) : /* @__PURE__ */ s(i, { children: [
56
- k.truncate(e.description, { length: 100 }),
57
- e.description && e.description.length > 100 && /* @__PURE__ */ t(
58
- P,
59
- {
60
- variant: "text",
61
- size: "small",
62
- sx: { py: 0, px: 1 },
63
- onClick: R(e.id),
64
- children: "read more"
65
- }
66
- )
67
- ] }) }) })
58
+ children: /* @__PURE__ */ o(
59
+ A,
60
+ {
61
+ primary: e.title,
62
+ secondaryTypographyProps: {
63
+ component: "div"
64
+ },
65
+ secondary: /* @__PURE__ */ o(p, { children: /* @__PURE__ */ o(B, { variant: "body2", children: R.includes(e.id) ? /* @__PURE__ */ c(p, { children: [
66
+ e.description,
67
+ /* @__PURE__ */ o(
68
+ u,
69
+ {
70
+ variant: "text",
71
+ size: "small",
72
+ sx: { py: 0, px: 1 },
73
+ onClick: N(e.id),
74
+ children: "show less"
75
+ }
76
+ )
77
+ ] }) : /* @__PURE__ */ c(p, { children: [
78
+ G.truncate(e.description, { length: 100 }),
79
+ e.description && e.description.length > 100 && /* @__PURE__ */ o(
80
+ u,
81
+ {
82
+ variant: "text",
83
+ size: "small",
84
+ sx: { py: 0, px: 1 },
85
+ onClick: D(e.id),
86
+ children: "read more"
87
+ }
88
+ )
89
+ ] }) }) })
90
+ }
91
+ )
68
92
  }
69
- ) }),
70
- /* @__PURE__ */ t(l, { component: "li" })
93
+ ),
94
+ /* @__PURE__ */ o(P, { component: "li" })
71
95
  ] }, e.id || r)) }),
72
- /* @__PURE__ */ t(
73
- j,
96
+ /* @__PURE__ */ o(
97
+ "div",
74
98
  {
75
- component: "div",
76
- count: _,
77
- page: f,
78
- rowsPerPage: g,
79
- rowsPerPageOptions: A,
80
- onPageChange: L,
81
- onRowsPerPageChange: b
99
+ style: {
100
+ borderTop: "1px solid lightgray"
101
+ },
102
+ children: /* @__PURE__ */ o(
103
+ F,
104
+ {
105
+ component: "div",
106
+ count: S,
107
+ page: a,
108
+ rowsPerPage: i,
109
+ rowsPerPageOptions: U,
110
+ onPageChange: T,
111
+ onRowsPerPageChange: _
112
+ }
113
+ )
82
114
  }
83
115
  )
84
116
  ]
@@ -86,5 +118,5 @@ function U({
86
118
  );
87
119
  }
88
120
  export {
89
- U as PaginatedList
121
+ K as PaginatedList
90
122
  };
package/dist/main.d.ts CHANGED
@@ -27,6 +27,7 @@ import { SxProps } from '@mui/material';
27
27
  import { SxProps as SxProps_2 } from '@mui/material/styles';
28
28
  import { TabsProps as TabsProps_2 } from '@mui/material';
29
29
  import { Theme } from '@mui/material/styles';
30
+ import { Theme as Theme_2 } from '@mui/material';
30
31
  import { ThemeOptions } from '@mui/material';
31
32
  import { ThemeProvider } from '@mui/material';
32
33
  import { View } from 'ol';
@@ -294,6 +295,18 @@ declare const hasDataAccess: (role: string, access: AccessType, permissions: AUT
294
295
 
295
296
  declare const hasUIAccess: <T extends string>(feature: FeatureType | T, permissions?: AUTH.PermissionType) => boolean;
296
297
 
298
+ export declare function HighlightLineChart<T extends LineDataPoint>({ seriesData, height, width, chartId, showLegend, loading, emptyMessage, }: HighlightLineChartProps<T>): JSX_2.Element;
299
+
300
+ export declare interface HighlightLineChartProps<T extends LineDataPoint> {
301
+ seriesData: LineSeriesData<T>[];
302
+ height?: string | number;
303
+ width?: string | number;
304
+ chartId?: string;
305
+ showLegend?: boolean;
306
+ loading?: boolean;
307
+ emptyMessage?: string;
308
+ }
309
+
297
310
  export declare const IconButton: default_2.FC<Props_6>;
298
311
 
299
312
  declare function importKey(jwk: any): Promise<CryptoKey>;
@@ -546,6 +559,18 @@ declare interface LinearIndicatorProps {
546
559
  showMiddle?: boolean;
547
560
  }
548
561
 
562
+ export declare interface LineDataPoint {
563
+ date: number | Date; // timestamp veya Date
564
+ value: number;
565
+ }
566
+
567
+ export declare interface LineSeriesData<T extends LineDataPoint> {
568
+ id: string; // unique seri ID'si
569
+ name: string;
570
+ data: T[];
571
+ color?: string;
572
+ }
573
+
549
574
  export declare const Loading: React.FC<Props_8>;
550
575
 
551
576
  export { LocalizationProvider }
@@ -651,7 +676,7 @@ declare interface OptionsType {
651
676
 
652
677
  declare type OrientationType_2 = "portrait" | "landscape";
653
678
 
654
- export declare function PaginatedList({ title, data, payload, totalCount, onChange, }: PaginatedListProps): JSX_2.Element;
679
+ export declare function PaginatedList({ title, data, payload, totalCount, onChange, onItemClick, sx, }: PaginatedListProps): JSX_2.Element;
655
680
 
656
681
  export declare interface PaginatedListProps {
657
682
  title?: string;
@@ -659,6 +684,8 @@ export declare interface PaginatedListProps {
659
684
  totalCount?: number;
660
685
  payload?: Partial<FV.SearchDTO>;
661
686
  onChange?: (params: Partial<FV.SearchDTO>) => void;
687
+ onItemClick?: (item: API.Object) => void;
688
+ sx?: SxProps<Theme_2>;
662
689
  }
663
690
 
664
691
  export declare const PhoneInput: React.FC<Props_9>;
package/dist/main.js CHANGED
@@ -5,37 +5,38 @@ import { b as $t } from "./helpers-DaCoWmi2.js";
5
5
  import { Card as Et } from "./components/card/index.js";
6
6
  import { CardAlternate as zt } from "./components/card-alternate/index.js";
7
7
  import { CandlestickChart as Nt } from "./components/charts/candlestick/index.js";
8
- import { CollapsibleCard as Vt } from "./components/collapsible-card/index.js";
9
- import { ConditionalWrapper as qt } from "./components/conditional-wrapper/index.js";
10
- import { alert as Kt, confirm as Qt } from "./components/confirm/index.js";
11
- import { Container as Xt } from "./components/container/index.js";
12
- import { ContextMenu as ee } from "./components/context-menu/index.js";
13
- import { DisseminationList as se } from "./components/data-security-selectors/dissemination-list/index.js";
14
- import { SecurityLevel as oe } from "./components/data-security-selectors/security-level/index.js";
15
- import { DateTimePicker as ie } from "./components/date-time-picker/index.js";
16
- import { DocumentViewer as de } from "./components/document-viewer/index.js";
17
- import { GeometryPicker as ce } from "./components/geometry-picker/index.js";
18
- import { IconButton as me } from "./components/icon-button/index.js";
19
- import { InstanceForm as pe } from "./components/instance-form/index.js";
20
- import { InstanceHierarchyTable as Me } from "./components/instance-hierarchy-table/index.js";
21
- import { InstanceTable as De } from "./components/instance-table/index.js";
22
- import { InstanceVariableList as Ye } from "./components/instance-variable-list/index.js";
23
- import { KeyProtectionMenu as Te } from "./components/key-protection/menu.js";
24
- import { S as ke } from "./utils-Bq0ye5vf.js";
25
- import { LinearIndicator as Oe } from "./components/linear-indicator/index.js";
26
- import { Loading as Se } from "./components/loading/index.js";
27
- import { i as He } from "./index-JrtqxUdI.js";
28
- import { PaginatedList as Be } from "./components/paginated-list/index.js";
29
- import { PhoneInput as Ie } from "./components/phone-input/index.js";
30
- import { SearchInput as je } from "./components/search-input/index.js";
31
- import { Tabs as We } from "./components/tabs/index.js";
32
- import { TemplateFilters as Ue } from "./components/template-filters/index.js";
33
- import { TemplateForm as Ze } from "./components/template-form/index.js";
34
- import { TemplatePropertyFilters as Je } from "./components/template-property-filters/index.js";
35
- import { Property as _e } from "./components/template-property-filters/property.js";
36
- import { TreeSelect as Ge } from "./components/tree-select/index.js";
37
- import { TreeViewFilter as Qe } from "./components/treeview-filter/index.js";
38
- import { Uploader as Xe } from "./components/uploader/index.js";
8
+ import { HighlightLineChart as Vt } from "./components/charts/highlighting-line-data/index.js";
9
+ import { CollapsibleCard as qt } from "./components/collapsible-card/index.js";
10
+ import { ConditionalWrapper as Kt } from "./components/conditional-wrapper/index.js";
11
+ import { alert as Rt, confirm as Xt } from "./components/confirm/index.js";
12
+ import { Container as ee } from "./components/container/index.js";
13
+ import { ContextMenu as se } from "./components/context-menu/index.js";
14
+ import { DisseminationList as oe } from "./components/data-security-selectors/dissemination-list/index.js";
15
+ import { SecurityLevel as ie } from "./components/data-security-selectors/security-level/index.js";
16
+ import { DateTimePicker as de } from "./components/date-time-picker/index.js";
17
+ import { DocumentViewer as ce } from "./components/document-viewer/index.js";
18
+ import { GeometryPicker as me } from "./components/geometry-picker/index.js";
19
+ import { IconButton as pe } from "./components/icon-button/index.js";
20
+ import { InstanceForm as Me } from "./components/instance-form/index.js";
21
+ import { InstanceHierarchyTable as De } from "./components/instance-hierarchy-table/index.js";
22
+ import { InstanceTable as Ye } from "./components/instance-table/index.js";
23
+ import { InstanceVariableList as Te } from "./components/instance-variable-list/index.js";
24
+ import { KeyProtectionMenu as ke } from "./components/key-protection/menu.js";
25
+ import { S as Oe } from "./utils-Bq0ye5vf.js";
26
+ import { LinearIndicator as Se } from "./components/linear-indicator/index.js";
27
+ import { Loading as He } from "./components/loading/index.js";
28
+ import { i as Be } from "./index-JrtqxUdI.js";
29
+ import { PaginatedList as Ie } from "./components/paginated-list/index.js";
30
+ import { PhoneInput as je } from "./components/phone-input/index.js";
31
+ import { SearchInput as We } from "./components/search-input/index.js";
32
+ import { Tabs as Ue } from "./components/tabs/index.js";
33
+ import { TemplateFilters as Ze } from "./components/template-filters/index.js";
34
+ import { TemplateForm as Je } from "./components/template-form/index.js";
35
+ import { TemplatePropertyFilters as _e } from "./components/template-property-filters/index.js";
36
+ import { Property as Ge } from "./components/template-property-filters/property.js";
37
+ import { TreeSelect as Qe } from "./components/tree-select/index.js";
38
+ import { TreeViewFilter as Xe } from "./components/treeview-filter/index.js";
39
+ import { Uploader as er } from "./components/uploader/index.js";
39
40
  import { a as dt } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
40
41
  import C from "dayjs";
41
42
  import { h as U, j as z } from "./createTheme-DrgvKMA_.js";
@@ -397,39 +398,40 @@ export {
397
398
  Nt as CandlestickChart,
398
399
  Et as Card,
399
400
  zt as CardAlternate,
400
- Vt as CollapsibleCard,
401
- qt as ConditionalWrapper,
402
- Xt as Container,
403
- ee as ContextMenu,
404
- ie as DateTimePicker,
405
- se as DisseminationList,
406
- de as DocumentViewer,
407
- ce as GeometryPicker,
408
- me as IconButton,
409
- pe as InstanceForm,
410
- Me as InstanceHierarchyTable,
411
- De as InstanceTable,
412
- Ye as InstanceVariableList,
413
- ke as KeyProductionUtils,
414
- Te as KeyProtectionMenu,
415
- Oe as LinearIndicator,
416
- Se as Loading,
401
+ qt as CollapsibleCard,
402
+ Kt as ConditionalWrapper,
403
+ ee as Container,
404
+ se as ContextMenu,
405
+ de as DateTimePicker,
406
+ oe as DisseminationList,
407
+ ce as DocumentViewer,
408
+ me as GeometryPicker,
409
+ Vt as HighlightLineChart,
410
+ pe as IconButton,
411
+ Me as InstanceForm,
412
+ De as InstanceHierarchyTable,
413
+ Ye as InstanceTable,
414
+ Te as InstanceVariableList,
415
+ Oe as KeyProductionUtils,
416
+ ke as KeyProtectionMenu,
417
+ Se as LinearIndicator,
418
+ He as Loading,
417
419
  Ct as LocalizationProvider,
418
- He as Map,
419
- Be as PaginatedList,
420
- Ie as PhoneInput,
421
- _e as PropertyFilterInput,
422
- je as SearchInput,
423
- oe as SecurityLevel,
424
- We as Tabs,
425
- Ue as TemplateFilters,
426
- Ze as TemplateForm,
427
- Je as TemplatePropertyFilters,
420
+ Be as Map,
421
+ Ie as PaginatedList,
422
+ je as PhoneInput,
423
+ Ge as PropertyFilterInput,
424
+ We as SearchInput,
425
+ ie as SecurityLevel,
426
+ Ue as Tabs,
427
+ Ze as TemplateFilters,
428
+ Je as TemplateForm,
429
+ _e as TemplatePropertyFilters,
428
430
  Ht as ThemeProvider,
429
- Ge as TreeSelect,
430
- Qe as TreeViewFilter,
431
- Xe as Uploader,
432
- Kt as alert,
433
- Qt as confirm,
431
+ Qe as TreeSelect,
432
+ Xe as TreeViewFilter,
433
+ er as Uploader,
434
+ Rt as alert,
435
+ Xt as confirm,
434
436
  Ft as createTheme
435
437
  };
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.5.70",
4
+ "version": "1.5.73",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",