@hybridcore/ui 1.6.23 → 1.6.25
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/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/variable/index.js +1 -1
- package/dist/components/instance-form/components/variables/index.js +25 -23
- package/dist/components/instance-form/index.js +41 -39
- package/dist/components/instance-form/logic.js +41 -40
- package/dist/components/instance-variable-list/variable.js +14 -12
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/simple-pivot-table/index.js +46 -50
- package/dist/components/simple-pivot-table/styled.js +43 -28
- package/dist/components/template-form/components/property-list/property-list-columns.js +36 -29
- package/dist/components/template-form/components/property-list/property-list-form.js +332 -269
- package/dist/components/template-property-filters/index.js +25 -25
- package/dist/components/template-property-filters/logic.js +12 -10
- package/dist/constants/index.js +1 -0
- package/dist/{index-BtlzPygz.js → index-BQ4_OA4b.js} +103 -101
- package/dist/main.d.ts +16 -4
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { useSimplePivotTableLogic as
|
|
4
|
-
import { SimplePivotTableRoot as
|
|
5
|
-
import { I as
|
|
6
|
-
const
|
|
2
|
+
import { Typography as i, Divider as f, TableContainer as I, Table as R, TableHead as j, TableRow as v, TableCell as d, TableBody as w, Box as D, IconButton as G } from "@mui/material";
|
|
3
|
+
import { useSimplePivotTableLogic as V } from "./logic.js";
|
|
4
|
+
import { SimplePivotTableRoot as J, SimplePivotTableHeader as M, SimplePivotTableContent as O, SimplePivotTableValueHeadCell as X, SimplePivotTableFooter as q, SimplePivotTableScrollHint as A } from "./styled.js";
|
|
5
|
+
import { I as E } from "../../IconX-C2wmVYSK.js";
|
|
6
|
+
const _ = (s) => {
|
|
7
7
|
const {
|
|
8
8
|
title: m,
|
|
9
|
-
dimensions:
|
|
10
|
-
values:
|
|
9
|
+
dimensions: r,
|
|
10
|
+
values: n,
|
|
11
11
|
data: h,
|
|
12
|
-
summaries:
|
|
12
|
+
summaries: S,
|
|
13
13
|
selectedField: p,
|
|
14
|
-
selectedSummary:
|
|
14
|
+
selectedSummary: c,
|
|
15
15
|
selectColumn: b,
|
|
16
|
-
clearSelection:
|
|
16
|
+
clearSelection: g,
|
|
17
17
|
dimensionLabel: x,
|
|
18
18
|
valueLabel: T,
|
|
19
19
|
formatDimensionValue: y,
|
|
@@ -21,64 +21,60 @@ const Z = (s) => {
|
|
|
21
21
|
getCellStyle: F,
|
|
22
22
|
ownerState: o,
|
|
23
23
|
scrollRef: N,
|
|
24
|
-
canScroll:
|
|
25
|
-
scrollModifierLabel:
|
|
24
|
+
canScroll: P,
|
|
25
|
+
scrollModifierLabel: k,
|
|
26
26
|
sx: H,
|
|
27
27
|
other: L
|
|
28
|
-
} =
|
|
28
|
+
} = V(s), W = {
|
|
29
29
|
title: m,
|
|
30
30
|
description: s.description,
|
|
31
|
-
dimensions:
|
|
32
|
-
values:
|
|
31
|
+
dimensions: r,
|
|
32
|
+
values: n,
|
|
33
33
|
data: h,
|
|
34
|
-
summaries:
|
|
34
|
+
summaries: S
|
|
35
35
|
};
|
|
36
36
|
return /* @__PURE__ */ t(
|
|
37
|
-
|
|
37
|
+
J,
|
|
38
38
|
{
|
|
39
39
|
ownerState: o,
|
|
40
40
|
sx: H,
|
|
41
41
|
"data-snapshot": JSON.stringify(W),
|
|
42
42
|
...L,
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(M, { ownerState: o, children: /* @__PURE__ */ e(i, { sx: { paddingLeft: "0.5rem" }, variant: "h3", children: m }) }),
|
|
45
45
|
/* @__PURE__ */ e(f, {}),
|
|
46
|
-
/* @__PURE__ */ e(
|
|
47
|
-
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ t(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
/* @__PURE__ */ e(O, { ownerState: o, children: /* @__PURE__ */ e(I, { ref: N, children: /* @__PURE__ */ t(R, { size: "small", stickyHeader: !0, children: [
|
|
47
|
+
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ t(v, { children: [
|
|
48
|
+
r.map((l) => /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(i, { variant: "caption", fontWeight: 600, children: x(l) }) }, l.value)),
|
|
49
|
+
n.map((l) => /* @__PURE__ */ e(
|
|
50
|
+
X,
|
|
51
51
|
{
|
|
52
|
+
ownerState: o,
|
|
53
|
+
selected: p === l.dataFieldName,
|
|
52
54
|
align: "right",
|
|
53
55
|
onClick: () => b(l.dataFieldName),
|
|
54
|
-
|
|
55
|
-
cursor: "pointer",
|
|
56
|
-
...p === l.dataFieldName && {
|
|
57
|
-
backgroundColor: "action.selected"
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
children: /* @__PURE__ */ e(a, { variant: "caption", fontWeight: 600, children: T(l) })
|
|
56
|
+
children: /* @__PURE__ */ e(i, { variant: "caption", fontWeight: 600, children: T(l) })
|
|
61
57
|
},
|
|
62
58
|
l.dataFieldName
|
|
63
59
|
))
|
|
64
60
|
] }) }),
|
|
65
61
|
/* @__PURE__ */ e(w, { children: h.map((l, z) => /* @__PURE__ */ t(
|
|
66
|
-
|
|
62
|
+
v,
|
|
67
63
|
{
|
|
68
64
|
hover: !0,
|
|
69
65
|
sx: { "&:last-child td": { borderBottom: 0 } },
|
|
70
66
|
children: [
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
r.map((a) => /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(i, { variant: "body2", children: y(l[a.value], a) }) }, a.value)),
|
|
68
|
+
n.map((a) => {
|
|
73
69
|
const u = F(
|
|
74
|
-
l[
|
|
75
|
-
|
|
76
|
-
), B = p ===
|
|
70
|
+
l[a.dataFieldName],
|
|
71
|
+
a.format
|
|
72
|
+
), B = p === a.dataFieldName;
|
|
77
73
|
return /* @__PURE__ */ e(
|
|
78
|
-
|
|
74
|
+
d,
|
|
79
75
|
{
|
|
80
76
|
align: "right",
|
|
81
|
-
onClick: () => b(
|
|
77
|
+
onClick: () => b(a.dataFieldName),
|
|
82
78
|
sx: {
|
|
83
79
|
cursor: "pointer",
|
|
84
80
|
// Conditional background wins; otherwise tint the
|
|
@@ -86,16 +82,16 @@ const Z = (s) => {
|
|
|
86
82
|
backgroundColor: u.backgroundColor ?? (B ? "action.hover" : void 0)
|
|
87
83
|
},
|
|
88
84
|
children: /* @__PURE__ */ e(
|
|
89
|
-
|
|
85
|
+
i,
|
|
90
86
|
{
|
|
91
87
|
variant: "body2",
|
|
92
88
|
fontWeight: 500,
|
|
93
89
|
color: u.color ?? "text.primary",
|
|
94
|
-
children: C(l[
|
|
90
|
+
children: C(l[a.dataFieldName], a)
|
|
95
91
|
}
|
|
96
92
|
)
|
|
97
93
|
},
|
|
98
|
-
|
|
94
|
+
a.dataFieldName
|
|
99
95
|
);
|
|
100
96
|
})
|
|
101
97
|
]
|
|
@@ -104,13 +100,13 @@ const Z = (s) => {
|
|
|
104
100
|
)) })
|
|
105
101
|
] }) }) }),
|
|
106
102
|
/* @__PURE__ */ e(f, {}),
|
|
107
|
-
/* @__PURE__ */ t(
|
|
108
|
-
|
|
103
|
+
/* @__PURE__ */ t(q, { ownerState: o, children: [
|
|
104
|
+
P && /* @__PURE__ */ e(A, { ownerState: o, children: /* @__PURE__ */ t(i, { variant: "caption", children: [
|
|
109
105
|
"Hold ",
|
|
110
|
-
|
|
106
|
+
k,
|
|
111
107
|
" to scroll"
|
|
112
108
|
] }) }),
|
|
113
|
-
|
|
109
|
+
c ? /* @__PURE__ */ t(
|
|
114
110
|
D,
|
|
115
111
|
{
|
|
116
112
|
sx: {
|
|
@@ -121,21 +117,21 @@ const Z = (s) => {
|
|
|
121
117
|
rowGap: 0.5
|
|
122
118
|
},
|
|
123
119
|
children: [
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
|
|
120
|
+
/* @__PURE__ */ e(i, { variant: "caption", fontWeight: 600, children: c.name }),
|
|
121
|
+
c.items.map((l) => /* @__PURE__ */ t(i, { variant: "caption", color: "text.secondary", children: [
|
|
126
122
|
l.label,
|
|
127
123
|
": ",
|
|
128
124
|
l.value
|
|
129
125
|
] }, l.label)),
|
|
130
|
-
/* @__PURE__ */ e(G, { size: "small", onClick:
|
|
126
|
+
/* @__PURE__ */ e(G, { size: "small", onClick: g, sx: { p: 0.25 }, children: /* @__PURE__ */ e(E, { size: 14 }) })
|
|
131
127
|
]
|
|
132
128
|
}
|
|
133
|
-
) : /* @__PURE__ */ e(
|
|
129
|
+
) : /* @__PURE__ */ e(i, { variant: "caption", color: "text.disabled", children: "Select a column to summarize" })
|
|
134
130
|
] })
|
|
135
131
|
]
|
|
136
132
|
}
|
|
137
133
|
);
|
|
138
134
|
};
|
|
139
135
|
export {
|
|
140
|
-
|
|
136
|
+
_ as SimplePivotTable
|
|
141
137
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { styled as
|
|
2
|
-
const
|
|
1
|
+
import { styled as o, Paper as a, Box as t, TableCell as i, alpha as n } from "@mui/material";
|
|
2
|
+
const p = o(a, {
|
|
3
3
|
name: "HCSimplePivotTable",
|
|
4
4
|
slot: "Root",
|
|
5
|
-
shouldForwardProp: (
|
|
5
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
6
6
|
})(() => ({
|
|
7
7
|
height: "100%",
|
|
8
8
|
display: "flex",
|
|
@@ -10,17 +10,17 @@ const n = e(a, {
|
|
|
10
10
|
"&:hover .HCSimplePivotTable-scrollHint": {
|
|
11
11
|
opacity: 1
|
|
12
12
|
}
|
|
13
|
-
})),
|
|
13
|
+
})), d = o(t, {
|
|
14
14
|
name: "HCSimplePivotTable",
|
|
15
15
|
slot: "Header",
|
|
16
|
-
shouldForwardProp: (
|
|
17
|
-
})(({ theme:
|
|
16
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
17
|
+
})(({ theme: e }) => ({
|
|
18
18
|
flex: "0 0 auto",
|
|
19
|
-
padding:
|
|
20
|
-
})),
|
|
19
|
+
padding: e.spacing(1.25, 2)
|
|
20
|
+
})), s = o(t, {
|
|
21
21
|
name: "HCSimplePivotTable",
|
|
22
22
|
slot: "Content",
|
|
23
|
-
shouldForwardProp: (
|
|
23
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
24
24
|
})(() => ({
|
|
25
25
|
position: "relative",
|
|
26
26
|
display: "flex",
|
|
@@ -28,38 +28,53 @@ const n = e(a, {
|
|
|
28
28
|
flex: "1 1 auto",
|
|
29
29
|
minHeight: 0,
|
|
30
30
|
overflow: "hidden"
|
|
31
|
-
})),
|
|
31
|
+
})), c = o(i, {
|
|
32
|
+
name: "HCSimplePivotTable",
|
|
33
|
+
slot: "ValueHeadCell",
|
|
34
|
+
shouldForwardProp: (e) => e !== "ownerState" && e !== "selected"
|
|
35
|
+
})(
|
|
36
|
+
({ theme: e, selected: l }) => ({
|
|
37
|
+
cursor: "pointer",
|
|
38
|
+
// The sticky header must stay opaque or scrolled rows show through it, so
|
|
39
|
+
// the selection tint is layered *over* MUI's `background.default` instead
|
|
40
|
+
// of replacing it with the translucent `action.selected`.
|
|
41
|
+
...l && {
|
|
42
|
+
backgroundImage: `linear-gradient(${e.palette.action.selected}, ${e.palette.action.selected})`
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
), u = o(t, {
|
|
32
46
|
name: "HCSimplePivotTable",
|
|
33
47
|
slot: "ScrollHint",
|
|
34
|
-
shouldForwardProp: (
|
|
35
|
-
})(({ theme:
|
|
48
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
49
|
+
})(({ theme: e }) => ({
|
|
36
50
|
// Pinned to the left of the footer; aggregations stay grouped on the right.
|
|
37
51
|
marginRight: "auto",
|
|
38
|
-
padding:
|
|
39
|
-
borderRadius:
|
|
40
|
-
border: `1px solid ${
|
|
41
|
-
backgroundColor:
|
|
42
|
-
color:
|
|
52
|
+
padding: e.spacing(0.25, 1),
|
|
53
|
+
borderRadius: e.shape.borderRadius,
|
|
54
|
+
border: `1px solid ${e.palette.divider}`,
|
|
55
|
+
backgroundColor: n(e.palette.background.paper, 0.85),
|
|
56
|
+
color: e.palette.text.secondary,
|
|
43
57
|
pointerEvents: "none",
|
|
44
58
|
userSelect: "none",
|
|
45
59
|
opacity: 0.5,
|
|
46
|
-
transition:
|
|
47
|
-
})),
|
|
60
|
+
transition: e.transitions.create("opacity")
|
|
61
|
+
})), S = o(t, {
|
|
48
62
|
name: "HCSimplePivotTable",
|
|
49
63
|
slot: "Footer",
|
|
50
|
-
shouldForwardProp: (
|
|
51
|
-
})(({ theme:
|
|
64
|
+
shouldForwardProp: (e) => e !== "ownerState"
|
|
65
|
+
})(({ theme: e }) => ({
|
|
52
66
|
flex: "0 0 auto",
|
|
53
|
-
padding:
|
|
67
|
+
padding: e.spacing(1.25, 2),
|
|
54
68
|
display: "flex",
|
|
55
69
|
justifyContent: "flex-end",
|
|
56
70
|
alignItems: "flex-end",
|
|
57
|
-
gap:
|
|
71
|
+
gap: e.spacing(1)
|
|
58
72
|
}));
|
|
59
73
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
s as SimplePivotTableContent,
|
|
75
|
+
S as SimplePivotTableFooter,
|
|
76
|
+
d as SimplePivotTableHeader,
|
|
77
|
+
p as SimplePivotTableRoot,
|
|
78
|
+
u as SimplePivotTableScrollHint,
|
|
79
|
+
c as SimplePivotTableValueHeadCell
|
|
65
80
|
};
|
|
@@ -1,33 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { d as
|
|
3
|
-
import { T as
|
|
1
|
+
import { jsxs as r, jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { d as w, a as b } from "../../../../Delete-ofipLwkd.js";
|
|
3
|
+
import { T as d } from "../../../../Typography-B_LKrxyI.js";
|
|
4
4
|
import { I as s } from "../../../../IconButton-SJfF1cr9.js";
|
|
5
|
-
const
|
|
5
|
+
const I = (n) => [
|
|
6
6
|
{ field: "name", headerName: "Name", flex: 1 },
|
|
7
7
|
{ field: "propertyId", headerName: "Property ID", flex: 1 },
|
|
8
8
|
{
|
|
9
9
|
field: "type",
|
|
10
10
|
headerName: "Type",
|
|
11
11
|
width: 140,
|
|
12
|
-
renderCell: (
|
|
13
|
-
var
|
|
14
|
-
const { dataTypeInfo: e, defaultValue:
|
|
15
|
-
let
|
|
16
|
-
return e != null && e.datePattern && (
|
|
17
|
-
|
|
18
|
-
((
|
|
12
|
+
renderCell: (a) => {
|
|
13
|
+
var l, m, f, h, p;
|
|
14
|
+
const { dataTypeInfo: e, defaultValue: t } = a.row;
|
|
15
|
+
let i = a.value;
|
|
16
|
+
return e != null && e.datePattern && (i += ` ${e.datePattern}`), e != null && e.coordinateFormat && (i += ` ${e.coordinateFormat}`), e != null && e.enumValues && (i += ` ${e.enumValues.join(",")}`), (e == null ? void 0 : e.precision) !== void 0 && (i += ` (${e.precision},${e.scale ?? 0})`), t && (i += ` ${t}`), /* @__PURE__ */ r("div", { className: "MuiDataGrid-cellContent", title: i, children: [
|
|
17
|
+
a.value,
|
|
18
|
+
((l = a.row.dataTypeInfo) == null ? void 0 : l.datePattern) && /* @__PURE__ */ r(d, { variant: "caption", ml: 1, children: [
|
|
19
19
|
"(",
|
|
20
|
-
(m =
|
|
20
|
+
(m = a.row.dataTypeInfo) == null ? void 0 : m.datePattern,
|
|
21
21
|
")"
|
|
22
22
|
] }),
|
|
23
|
-
((f =
|
|
23
|
+
((f = a.row.dataTypeInfo) == null ? void 0 : f.coordinateFormat) && /* @__PURE__ */ r(d, { variant: "caption", ml: 1, children: [
|
|
24
24
|
"(",
|
|
25
|
-
(h =
|
|
25
|
+
(h = a.row.dataTypeInfo) == null ? void 0 : h.coordinateFormat,
|
|
26
26
|
")"
|
|
27
27
|
] }),
|
|
28
|
-
|
|
28
|
+
((p = a.row.dataTypeInfo) == null ? void 0 : p.precision) !== void 0 && /* @__PURE__ */ r(d, { variant: "caption", ml: 1, children: [
|
|
29
29
|
"(",
|
|
30
|
-
|
|
30
|
+
a.row.dataTypeInfo.precision,
|
|
31
|
+
",",
|
|
32
|
+
a.row.dataTypeInfo.scale ?? 0,
|
|
33
|
+
")"
|
|
34
|
+
] }),
|
|
35
|
+
a.row.defaultValue !== null && a.row.defaultValue !== "" && /* @__PURE__ */ r(d, { variant: "caption", ml: 1, children: [
|
|
36
|
+
"(",
|
|
37
|
+
a.row.defaultValue,
|
|
31
38
|
")"
|
|
32
39
|
] })
|
|
33
40
|
] });
|
|
@@ -37,14 +44,14 @@ const y = (d) => [
|
|
|
37
44
|
field: "inheritedFrom",
|
|
38
45
|
headerName: "Inherited From",
|
|
39
46
|
width: 120,
|
|
40
|
-
renderCell: (
|
|
41
|
-
var e,
|
|
47
|
+
renderCell: (a) => {
|
|
48
|
+
var e, t;
|
|
42
49
|
return /* @__PURE__ */ o(
|
|
43
50
|
"div",
|
|
44
51
|
{
|
|
45
52
|
className: "MuiDataGrid-cellContent",
|
|
46
|
-
title: (e =
|
|
47
|
-
children: ((
|
|
53
|
+
title: (e = a.value) == null ? void 0 : e.templateName,
|
|
54
|
+
children: ((t = a.value) == null ? void 0 : t.templateName) ?? "-"
|
|
48
55
|
}
|
|
49
56
|
);
|
|
50
57
|
}
|
|
@@ -97,23 +104,23 @@ const y = (d) => [
|
|
|
97
104
|
width: 120,
|
|
98
105
|
sortable: !1,
|
|
99
106
|
filterable: !1,
|
|
100
|
-
renderCell: (
|
|
101
|
-
const { inheritedFrom: e } =
|
|
102
|
-
return /* @__PURE__ */
|
|
107
|
+
renderCell: (a) => {
|
|
108
|
+
const { inheritedFrom: e } = a.row, t = !!(e != null && e.templateId) && e.templateId !== n.templateId;
|
|
109
|
+
return /* @__PURE__ */ r(c, { children: [
|
|
103
110
|
/* @__PURE__ */ o(
|
|
104
111
|
s,
|
|
105
112
|
{
|
|
106
113
|
size: "medium",
|
|
107
|
-
onClick: () =>
|
|
108
|
-
children: /* @__PURE__ */ o(
|
|
114
|
+
onClick: () => n.onEdit(a.row),
|
|
115
|
+
children: /* @__PURE__ */ o(w, { color: "primary" })
|
|
109
116
|
}
|
|
110
117
|
),
|
|
111
|
-
!
|
|
118
|
+
!t && /* @__PURE__ */ o(
|
|
112
119
|
s,
|
|
113
120
|
{
|
|
114
121
|
size: "medium",
|
|
115
|
-
onClick: () =>
|
|
116
|
-
children: /* @__PURE__ */ o(
|
|
122
|
+
onClick: () => n.onDelete(a.row),
|
|
123
|
+
children: /* @__PURE__ */ o(b, {})
|
|
117
124
|
}
|
|
118
125
|
)
|
|
119
126
|
] });
|
|
@@ -121,5 +128,5 @@ const y = (d) => [
|
|
|
121
128
|
}
|
|
122
129
|
];
|
|
123
130
|
export {
|
|
124
|
-
|
|
131
|
+
I as default
|
|
125
132
|
};
|