@hybridcore/ui 1.6.25 → 1.6.27
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/CATALOG.md +1 -0
- package/dist/{AccordionSummary-c6-Buzbq.js → AccordionSummary-B6-hHjCC.js} +3 -3
- package/dist/{Add-CB4mPrke.js → Add-eXYPgCCB.js} +1 -1
- package/dist/{Alert-BsT46Tgd.js → Alert-OoSOUjZM.js} +2 -2
- package/dist/{Button-BMUZn0cT.js → Button-gZFgy23t.js} +1 -1
- package/dist/{ButtonBase-DG5J0YgP.js → ButtonBase-Dgg9dzM8.js} +2 -2
- package/dist/{Delete-ofipLwkd.js → Delete-B8COyxKI.js} +1 -1
- package/dist/{IconButton-SJfF1cr9.js → IconButton-CQwROBzr.js} +1 -1
- package/dist/IconCheck-BcUcbvno.js +19 -0
- package/dist/{MenuItem-BjnnhDbD.js → MenuItem-BAKBPyZx.js} +3 -3
- package/dist/{Modal-Djf5pMjD.js → Modal-DVdqH5dj.js} +1 -1
- package/dist/{Select-nL91eUH9.js → Select-B4zhu5G_.js} +2 -2
- package/dist/{SwitchBase-BcJAJYsB.js → SwitchBase-BqUrfIHp.js} +1 -1
- package/dist/{TextField-Db63_GNb.js → TextField-Cx5T7iJn.js} +4 -3
- package/dist/components/button/styled.js +1 -1
- package/dist/components/charts/forecast-cone/index.js +1 -1
- package/dist/components/collapsible-card/index.js +1 -1
- package/dist/components/collapsible-card/styled.js +1 -1
- package/dist/components/color-picker/index.js +2 -2
- package/dist/components/color-picker/styled.js +1 -1
- package/dist/components/confirm/dialog.js +2 -2
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/data-list/index.js +139 -0
- package/dist/components/data-list/logic.js +224 -0
- package/dist/components/data-list/styled.js +260 -0
- package/dist/components/duration-select/index.js +1 -1
- package/dist/components/duration-select/styled.js +1 -1
- package/dist/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/variable/index.js +3 -2
- package/dist/components/instance-form/components/variables/index.js +1 -1
- package/dist/components/instance-hierarchy-table/styled.js +1 -1
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/status-indicator/logic.js +28 -41
- package/dist/components/template-form/components/default-value-input/index.js +120 -0
- package/dist/components/template-form/components/default-value-input/logic.js +76 -0
- package/dist/components/template-form/components/property-list/index.js +5 -5
- package/dist/components/template-form/components/property-list/property-list-columns.js +2 -2
- package/dist/components/template-form/components/property-list/property-list-form.js +245 -240
- package/dist/components/template-form/components/property-list/property-list-logic.js +59 -42
- package/dist/components/template-form/components/recognition-property-list/index.js +5 -5
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +5 -5
- package/dist/components/template-form/index.js +39 -37
- package/dist/components/template-form/logic.js +24 -23
- package/dist/components/template-property-filters/property.js +23 -20
- package/dist/createSvgIcon-Bi-IzY8I.js +83 -0
- package/dist/{dialog-CNxZ7uox.js → dialog-DwmnOp5c.js} +2 -2
- package/dist/{index-BQ4_OA4b.js → index-Dvh8D1yM.js} +26 -25
- package/dist/isMuiElement-CxT3_ACP.js +13 -0
- package/dist/main.d.ts +270 -50
- package/dist/main.js +117 -115
- package/dist/{styled-DObpn_Bi.js → styled-C5WQOj4E.js} +1 -1
- package/dist/{useIsFocusVisible-BHPF-Pml.js → useIsFocusVisible-CVnvB5M2.js} +1 -1
- package/dist/{useSlot-gpKOd92R.js → useSlot-BOHuz6Wu.js} +1 -1
- package/dist/{useTimeout-CM6EsHyp.js → useTimeout-D5vWrF1x.js} +2 -2
- package/dist/utils/ontology.js +49 -43
- package/package.json +1 -1
- package/dist/createSvgIcon-jKAqRXE2.js +0 -93
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { styled as a, List as u, ButtonBase as L, alpha as g, Typography as l, Box as f } from "@mui/material";
|
|
2
|
+
import { resolvePaletteColor as s } from "../metric-card/helpers.js";
|
|
3
|
+
import { Widget as p } from "../widget/styled.js";
|
|
4
|
+
const e = {
|
|
5
|
+
shouldForwardProp: (t) => t !== "ownerState"
|
|
6
|
+
}, m = a(p.Root, {
|
|
7
|
+
name: "HCDataList",
|
|
8
|
+
slot: "Root",
|
|
9
|
+
...e
|
|
10
|
+
})(() => ({
|
|
11
|
+
overflow: "hidden"
|
|
12
|
+
})), C = a(p.Header, {
|
|
13
|
+
name: "HCDataList",
|
|
14
|
+
slot: "Header",
|
|
15
|
+
...e
|
|
16
|
+
})(({ theme: t, ownerState: o }) => ({
|
|
17
|
+
display: "flex",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
justifyContent: "space-between",
|
|
20
|
+
gap: t.spacing(2),
|
|
21
|
+
padding: t.spacing(1.75, 2),
|
|
22
|
+
// Separates the header from the first row, as the dashboard cards are drawn. Same
|
|
23
|
+
// rule the rows use between themselves, so the whole card reads as one ruled list.
|
|
24
|
+
borderBottom: `1px solid ${t.palette.divider}`,
|
|
25
|
+
// Clears the widget store's floating menu trigger (absolute, top/right 8px) and
|
|
26
|
+
// the error badge that parks beside it, so neither lands on the header content.
|
|
27
|
+
...o.headerGutter && {
|
|
28
|
+
paddingRight: typeof o.headerGutter == "number" ? o.headerGutter : 44
|
|
29
|
+
}
|
|
30
|
+
})), y = ({ theme: t }) => ({
|
|
31
|
+
...t.typography.body2,
|
|
32
|
+
color: t.palette.primary.main,
|
|
33
|
+
fontWeight: 500,
|
|
34
|
+
background: "none",
|
|
35
|
+
border: "none",
|
|
36
|
+
cursor: "pointer",
|
|
37
|
+
textDecoration: "none",
|
|
38
|
+
borderRadius: t.shape.borderRadius,
|
|
39
|
+
padding: t.spacing(0.25, 0.5),
|
|
40
|
+
flex: "0 0 auto",
|
|
41
|
+
"&:hover": {
|
|
42
|
+
textDecoration: "underline"
|
|
43
|
+
}
|
|
44
|
+
}), H = a("button", {
|
|
45
|
+
name: "HCDataList",
|
|
46
|
+
slot: "HeaderAction"
|
|
47
|
+
})(y), I = a("a", {
|
|
48
|
+
name: "HCDataList",
|
|
49
|
+
slot: "HeaderAction"
|
|
50
|
+
})(y), w = a(p.Content, {
|
|
51
|
+
name: "HCDataList",
|
|
52
|
+
slot: "Content",
|
|
53
|
+
...e
|
|
54
|
+
})(() => ({
|
|
55
|
+
overflow: "hidden"
|
|
56
|
+
})), v = a(u, {
|
|
57
|
+
name: "HCDataList",
|
|
58
|
+
slot: "List",
|
|
59
|
+
...e
|
|
60
|
+
})(() => ({
|
|
61
|
+
flex: 1,
|
|
62
|
+
overflowY: "auto",
|
|
63
|
+
padding: 0
|
|
64
|
+
})), h = a("li", {
|
|
65
|
+
name: "HCDataList",
|
|
66
|
+
slot: "Item",
|
|
67
|
+
...e
|
|
68
|
+
})(({ theme: t, ownerState: o }) => ({
|
|
69
|
+
display: "flex",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
gap: t.spacing(1.5),
|
|
72
|
+
padding: t.spacing(o.dense ? 1 : 1.5, 2),
|
|
73
|
+
listStyle: "none",
|
|
74
|
+
...o.divider && {
|
|
75
|
+
"& + &": {
|
|
76
|
+
borderTop: `1px solid ${t.palette.divider}`
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
})), B = a(L, {
|
|
80
|
+
name: "HCDataList",
|
|
81
|
+
slot: "ItemButton"
|
|
82
|
+
})(({ theme: t }) => ({
|
|
83
|
+
flex: "1 1 auto",
|
|
84
|
+
minWidth: 0,
|
|
85
|
+
display: "flex",
|
|
86
|
+
alignItems: "center",
|
|
87
|
+
gap: t.spacing(1.5),
|
|
88
|
+
justifyContent: "flex-start",
|
|
89
|
+
textAlign: "left",
|
|
90
|
+
borderRadius: t.shape.borderRadius,
|
|
91
|
+
padding: t.spacing(0.5),
|
|
92
|
+
margin: t.spacing(-0.5),
|
|
93
|
+
"&:hover": {
|
|
94
|
+
backgroundColor: t.palette.action.hover
|
|
95
|
+
},
|
|
96
|
+
"&.Mui-disabled": {
|
|
97
|
+
opacity: t.palette.action.disabledOpacity
|
|
98
|
+
}
|
|
99
|
+
})), R = a("span", {
|
|
100
|
+
name: "HCDataList",
|
|
101
|
+
slot: "ItemStart",
|
|
102
|
+
shouldForwardProp: (t) => t !== "ownerState" && t !== "iconColor" && t !== "iconBackground"
|
|
103
|
+
})(({ theme: t, ownerState: o, iconColor: r, iconBackground: d }) => {
|
|
104
|
+
const i = s(t, r) ?? t.palette.text.secondary, n = {
|
|
105
|
+
flex: "0 0 auto",
|
|
106
|
+
display: "inline-flex",
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
justifyContent: "center",
|
|
109
|
+
color: i
|
|
110
|
+
};
|
|
111
|
+
if (o.iconShape === "plain") return n;
|
|
112
|
+
const c = o.dense ? 32 : 40;
|
|
113
|
+
return {
|
|
114
|
+
...n,
|
|
115
|
+
width: c,
|
|
116
|
+
height: c,
|
|
117
|
+
// The dashboard's alert rows use a solid disc with a light glyph; a state that
|
|
118
|
+
// sets only `color` gets a tint of that color instead of a hard-coded grey.
|
|
119
|
+
backgroundColor: s(t, d) ?? g(i, 0.12),
|
|
120
|
+
borderRadius: o.iconShape === "circle" ? "50%" : t.shape.borderRadius
|
|
121
|
+
};
|
|
122
|
+
}), M = a("span", {
|
|
123
|
+
name: "HCDataList",
|
|
124
|
+
slot: "ItemMain",
|
|
125
|
+
...e
|
|
126
|
+
})(() => ({
|
|
127
|
+
flex: "1 1 auto",
|
|
128
|
+
minWidth: 0,
|
|
129
|
+
display: "flex",
|
|
130
|
+
flexDirection: "column"
|
|
131
|
+
})), k = a(l, {
|
|
132
|
+
name: "HCDataList",
|
|
133
|
+
slot: "ItemTitle"
|
|
134
|
+
})(({ theme: t }) => ({
|
|
135
|
+
...t.typography.subtitle2,
|
|
136
|
+
color: t.palette.text.primary,
|
|
137
|
+
// Rows live in a resizable widget grid with no character limit — clip to one line
|
|
138
|
+
// so a long title never reflows the row. Full text on hover.
|
|
139
|
+
whiteSpace: "nowrap",
|
|
140
|
+
overflow: "hidden",
|
|
141
|
+
textOverflow: "ellipsis"
|
|
142
|
+
})), P = a(l, {
|
|
143
|
+
name: "HCDataList",
|
|
144
|
+
slot: "ItemMeta",
|
|
145
|
+
...e
|
|
146
|
+
})(({ theme: t, ownerState: o }) => ({
|
|
147
|
+
...t.typography.body2,
|
|
148
|
+
color: t.palette.text.secondary,
|
|
149
|
+
marginTop: t.spacing(0.25),
|
|
150
|
+
...o.descriptionLines > 0 && {
|
|
151
|
+
display: "-webkit-box",
|
|
152
|
+
WebkitBoxOrient: "vertical",
|
|
153
|
+
WebkitLineClamp: o.descriptionLines,
|
|
154
|
+
overflow: "hidden"
|
|
155
|
+
}
|
|
156
|
+
})), T = a("span", {
|
|
157
|
+
name: "HCDataList",
|
|
158
|
+
slot: "ItemEnd",
|
|
159
|
+
...e
|
|
160
|
+
})(({ theme: t, ownerState: o }) => ({
|
|
161
|
+
flex: "0 0 auto",
|
|
162
|
+
display: "flex",
|
|
163
|
+
alignItems: "center",
|
|
164
|
+
justifyContent: "flex-end",
|
|
165
|
+
gap: t.spacing(1),
|
|
166
|
+
// A bar needs room to read as a bar; a badge should only take the width it needs.
|
|
167
|
+
...o.endSlot === "progress" && {
|
|
168
|
+
flex: "0 1 45%",
|
|
169
|
+
minWidth: 120
|
|
170
|
+
}
|
|
171
|
+
})), W = a("span", {
|
|
172
|
+
name: "HCDataList",
|
|
173
|
+
slot: "Badge",
|
|
174
|
+
shouldForwardProp: (t) => t !== "badgeColor" && t !== "badgeBackground" && t !== "badgeBorder"
|
|
175
|
+
})(({ theme: t, badgeColor: o, badgeBackground: r, badgeBorder: d }) => {
|
|
176
|
+
const i = s(t, o) ?? t.palette.text.secondary, n = s(t, d);
|
|
177
|
+
return {
|
|
178
|
+
...t.typography.caption,
|
|
179
|
+
display: "inline-flex",
|
|
180
|
+
alignItems: "center",
|
|
181
|
+
whiteSpace: "nowrap",
|
|
182
|
+
color: i,
|
|
183
|
+
// Filled tint by default; an outlined chip is opt-in per state via `borderColor`,
|
|
184
|
+
// which is how the design's two chip styles differ.
|
|
185
|
+
backgroundColor: s(t, r) ?? (n ? "transparent" : g(i, 0.12)),
|
|
186
|
+
border: `1px solid ${n ?? "transparent"}`,
|
|
187
|
+
borderRadius: 999,
|
|
188
|
+
padding: t.spacing(0.5, 1.25),
|
|
189
|
+
fontWeight: 500,
|
|
190
|
+
lineHeight: 1.2
|
|
191
|
+
};
|
|
192
|
+
}), S = a(l, {
|
|
193
|
+
name: "HCDataList",
|
|
194
|
+
slot: "ItemEnd"
|
|
195
|
+
})(({ theme: t }) => ({
|
|
196
|
+
...t.typography.body2,
|
|
197
|
+
color: t.palette.text.primary,
|
|
198
|
+
fontWeight: 500,
|
|
199
|
+
whiteSpace: "nowrap"
|
|
200
|
+
})), j = a(f, {
|
|
201
|
+
name: "HCDataList",
|
|
202
|
+
slot: "Empty",
|
|
203
|
+
...e
|
|
204
|
+
})(({ theme: t }) => ({
|
|
205
|
+
flex: 1,
|
|
206
|
+
display: "flex",
|
|
207
|
+
alignItems: "center",
|
|
208
|
+
justifyContent: "center",
|
|
209
|
+
padding: t.spacing(4, 2),
|
|
210
|
+
color: t.palette.text.secondary,
|
|
211
|
+
...t.typography.body2
|
|
212
|
+
})), A = a("li", {
|
|
213
|
+
name: "HCDataList",
|
|
214
|
+
slot: "LoadMore",
|
|
215
|
+
...e
|
|
216
|
+
})(({ theme: t }) => ({
|
|
217
|
+
listStyle: "none",
|
|
218
|
+
display: "flex",
|
|
219
|
+
alignItems: "center",
|
|
220
|
+
justifyContent: "center",
|
|
221
|
+
minHeight: t.spacing(5),
|
|
222
|
+
color: t.palette.text.secondary
|
|
223
|
+
})), E = a("div", {
|
|
224
|
+
name: "HCDataList",
|
|
225
|
+
slot: "Pagination",
|
|
226
|
+
...e
|
|
227
|
+
})(({ theme: t }) => ({
|
|
228
|
+
flex: "0 0 auto",
|
|
229
|
+
borderTop: `1px solid ${t.palette.divider}`,
|
|
230
|
+
".MuiToolbar-root": {
|
|
231
|
+
minHeight: 24,
|
|
232
|
+
paddingLeft: t.spacing(1)
|
|
233
|
+
},
|
|
234
|
+
".MuiTablePagination-actions .MuiButtonBase-root": {
|
|
235
|
+
padding: t.spacing(0.5)
|
|
236
|
+
},
|
|
237
|
+
".MuiTablePagination-displayedRows": {
|
|
238
|
+
lineHeight: 1
|
|
239
|
+
}
|
|
240
|
+
}));
|
|
241
|
+
export {
|
|
242
|
+
W as DataListBadge,
|
|
243
|
+
w as DataListContent,
|
|
244
|
+
j as DataListEmpty,
|
|
245
|
+
S as DataListEndLabel,
|
|
246
|
+
C as DataListHeader,
|
|
247
|
+
H as DataListHeaderActionButton,
|
|
248
|
+
I as DataListHeaderActionLink,
|
|
249
|
+
B as DataListItemButton,
|
|
250
|
+
T as DataListItemEnd,
|
|
251
|
+
M as DataListItemMain,
|
|
252
|
+
P as DataListItemMeta,
|
|
253
|
+
h as DataListItemRow,
|
|
254
|
+
R as DataListItemStart,
|
|
255
|
+
k as DataListItemTitle,
|
|
256
|
+
v as DataListList,
|
|
257
|
+
A as DataListLoadMore,
|
|
258
|
+
E as DataListPagination,
|
|
259
|
+
m as DataListRoot
|
|
260
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useDurationSelectLogic as l } from "./logic.js";
|
|
3
3
|
import { DurationSelectRoot as n, DurationSelectSelect as i } from "./styled.js";
|
|
4
|
-
import { M as c } from "../../MenuItem-
|
|
4
|
+
import { M as c } from "../../MenuItem-BAKBPyZx.js";
|
|
5
5
|
const h = (o) => {
|
|
6
6
|
const { state: a, actions: r } = l(o);
|
|
7
7
|
return /* @__PURE__ */ t(n, { sx: o.sx, children: /* @__PURE__ */ t(
|
|
@@ -9,7 +9,7 @@ import "../../../conditional-wrapper/index.js";
|
|
|
9
9
|
import "../../helpers.js";
|
|
10
10
|
import "../../styled.js";
|
|
11
11
|
import "../TopLabelWrapper.js";
|
|
12
|
-
import { C as b } from "../../../../index-
|
|
12
|
+
import { C as b } from "../../../../index-Dvh8D1yM.js";
|
|
13
13
|
export {
|
|
14
14
|
b as CompositeList
|
|
15
15
|
};
|
|
@@ -3,15 +3,16 @@ import "@mui/icons-material";
|
|
|
3
3
|
import "@mui/material";
|
|
4
4
|
import "dayjs";
|
|
5
5
|
import "lodash";
|
|
6
|
+
import "../../../../utils/ontology.js";
|
|
6
7
|
import "../../../conditional-wrapper/index.js";
|
|
7
8
|
import "../../../date-time-picker/index.js";
|
|
8
9
|
import "../../../geometry-picker/index.js";
|
|
9
10
|
import "../../../phone-input/index.js";
|
|
10
11
|
import "../../helpers.js";
|
|
11
12
|
import "../../styled.js";
|
|
12
|
-
import { V as
|
|
13
|
+
import { V as g } from "../../../../index-Dvh8D1yM.js";
|
|
13
14
|
import "../composite-matrix/index.js";
|
|
14
15
|
import "../TopLabelWrapper.js";
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
g as Variable
|
|
17
18
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as v } from "react/jsx-runtime";
|
|
|
2
2
|
import l from "lodash";
|
|
3
3
|
import x from "react";
|
|
4
4
|
import { VariablesContainer as y, FieldContainer as C } from "../../styled.js";
|
|
5
|
-
import { V as I } from "../../../../index-
|
|
5
|
+
import { V as I } from "../../../../index-Dvh8D1yM.js";
|
|
6
6
|
const P = (d) => {
|
|
7
7
|
const {
|
|
8
8
|
template: n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled as a, Box as n, Typography as o, Chip as r } from "@mui/material";
|
|
2
|
-
import { A as t, a as c, b as i } from "../../AccordionSummary-
|
|
2
|
+
import { A as t, a as c, b as i } from "../../AccordionSummary-B6-hHjCC.js";
|
|
3
3
|
const s = (e) => e !== "ownerState", l = a(n, {
|
|
4
4
|
name: "HCInstanceHierarchyTable",
|
|
5
5
|
slot: "root",
|
|
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as e, Fragment as m } from "react/jsx-runtime";
|
|
|
2
2
|
import { CloseOutlined as W, ChevronRight as $, ErrorOutline as q, Refresh as J, Check as U } from "@mui/icons-material";
|
|
3
3
|
import { Button as N, IconButton as _, FormControl as O, Select as D, MenuItem as C, Typography as H } from "@mui/material";
|
|
4
4
|
import F from "lodash";
|
|
5
|
-
import { V as G } from "../../index-
|
|
5
|
+
import { V as G } from "../../index-Dvh8D1yM.js";
|
|
6
6
|
import { d as L } from "../../ol-yOE-NV0X.js";
|
|
7
7
|
import { RangeSelector as Q } from "../range-selector/index.js";
|
|
8
8
|
import { usePropertyMappingLogic as X } from "./logic.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { useThemeProps as
|
|
2
|
-
import { a as
|
|
1
|
+
import { useThemeProps as w } from "@mui/material";
|
|
2
|
+
import { a as g, b as I, I as m } from "../../IconTrendingUp-CW4SFYmc.js";
|
|
3
3
|
import { c as n } from "../../createReactComponent-C7L-DMHj.js";
|
|
4
|
-
import { I } from "../../IconMinus-B6OPYVyo.js";
|
|
4
|
+
import { I as k } from "../../IconMinus-B6OPYVyo.js";
|
|
5
|
+
import { I as v, a as C } from "../../IconCheck-BcUcbvno.js";
|
|
5
6
|
import { I as y } from "../../IconCircle-HcgE1lHy.js";
|
|
6
7
|
/**
|
|
7
8
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
@@ -9,28 +10,21 @@ import { I as y } from "../../IconCircle-HcgE1lHy.js";
|
|
|
9
10
|
* This source code is licensed under the MIT license.
|
|
10
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
12
|
*/
|
|
12
|
-
const M = [["path", { d: "M12
|
|
13
|
+
const M = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M18 13l-6 6", key: "svg-1" }], ["path", { d: "M6 13l6 6", key: "svg-2" }]], _ = n("outline", "arrow-down", "ArrowDown", M);
|
|
13
14
|
/**
|
|
14
15
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
15
16
|
*
|
|
16
17
|
* This source code is licensed under the MIT license.
|
|
17
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
18
19
|
*/
|
|
19
|
-
const
|
|
20
|
+
const $ = [["path", { d: "M12 5l0 14", key: "svg-0" }], ["path", { d: "M18 11l-6 -6", key: "svg-1" }], ["path", { d: "M6 11l6 -6", key: "svg-2" }]], f = n("outline", "arrow-up", "ArrowUp", $);
|
|
20
21
|
/**
|
|
21
22
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
22
23
|
*
|
|
23
24
|
* This source code is licensed under the MIT license.
|
|
24
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
26
|
*/
|
|
26
|
-
const
|
|
27
|
-
/**
|
|
28
|
-
* @license @tabler/icons-react v3.44.0 - MIT
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
33
|
-
const b = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }], ["path", { d: "M5.7 5.7l12.6 12.6", key: "svg-1" }]], f = n("outline", "ban", "Ban", b);
|
|
27
|
+
const b = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-0" }], ["path", { d: "M5.7 5.7l12.6 12.6", key: "svg-1" }]], N = n("outline", "ban", "Ban", b);
|
|
34
28
|
/**
|
|
35
29
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
36
30
|
*
|
|
@@ -44,42 +38,35 @@ const A = [["path", { d: "M6 10l6 6l6 -6h-12", key: "svg-0" }]], D = n("outline"
|
|
|
44
38
|
* This source code is licensed under the MIT license.
|
|
45
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
40
|
*/
|
|
47
|
-
const L = [["path", { d: "M18 14l-6 -6l-6 6h12", key: "svg-0" }]],
|
|
48
|
-
/**
|
|
49
|
-
* @license @tabler/icons-react v3.44.0 - MIT
|
|
50
|
-
*
|
|
51
|
-
* This source code is licensed under the MIT license.
|
|
52
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/
|
|
54
|
-
const U = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], B = n("outline", "check", "Check", U);
|
|
41
|
+
const L = [["path", { d: "M18 14l-6 -6l-6 6h12", key: "svg-0" }]], U = n("outline", "caret-up", "CaretUp", L);
|
|
55
42
|
/**
|
|
56
43
|
* @license @tabler/icons-react v3.44.0 - MIT
|
|
57
44
|
*
|
|
58
45
|
* This source code is licensed under the MIT license.
|
|
59
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
47
|
*/
|
|
61
|
-
const
|
|
62
|
-
"trending-up":
|
|
63
|
-
"trending-down":
|
|
64
|
-
"arrow-right":
|
|
65
|
-
"arrow-up":
|
|
48
|
+
const T = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 16v.01", key: "svg-1" }], ["path", { d: "M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483", key: "svg-2" }]], B = n("outline", "help-circle", "HelpCircle", T), H = {
|
|
49
|
+
"trending-up": g,
|
|
50
|
+
"trending-down": I,
|
|
51
|
+
"arrow-right": m,
|
|
52
|
+
"arrow-up": f,
|
|
66
53
|
"arrow-down": _,
|
|
67
|
-
"caret-up":
|
|
54
|
+
"caret-up": U,
|
|
68
55
|
"caret-down": D,
|
|
69
|
-
minus:
|
|
70
|
-
ban:
|
|
71
|
-
help:
|
|
72
|
-
check:
|
|
73
|
-
alert:
|
|
56
|
+
minus: k,
|
|
57
|
+
ban: N,
|
|
58
|
+
help: B,
|
|
59
|
+
check: v,
|
|
60
|
+
alert: C,
|
|
74
61
|
circle: y
|
|
75
|
-
},
|
|
76
|
-
const t =
|
|
77
|
-
value:
|
|
78
|
-
states:
|
|
62
|
+
}, q = (p) => {
|
|
63
|
+
const t = w({ props: p, name: "HCStatusIndicator" }), {
|
|
64
|
+
value: r,
|
|
65
|
+
states: i = [],
|
|
79
66
|
variant: c = "prominent",
|
|
80
67
|
showIcon: s = !0,
|
|
81
68
|
emptyLabel: a = "—"
|
|
82
|
-
} = t,
|
|
69
|
+
} = t, e = r != null && `${r}`.trim() !== "", o = e ? i.find((h) => `${h.value}`.toLowerCase() === `${r}`.toLowerCase()) : void 0, l = (o == null ? void 0 : o.label) ?? (e ? `${r}` : a), d = s && (o != null && o.icon) ? H[o.icon] : void 0, u = {
|
|
83
70
|
...t,
|
|
84
71
|
variant: c,
|
|
85
72
|
showIcon: s,
|
|
@@ -87,19 +74,19 @@ const H = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }]
|
|
|
87
74
|
activeLabel: l,
|
|
88
75
|
resolvedColor: o == null ? void 0 : o.color,
|
|
89
76
|
resolvedBackgroundColor: o == null ? void 0 : o.backgroundColor,
|
|
90
|
-
hasValue:
|
|
77
|
+
hasValue: e
|
|
91
78
|
};
|
|
92
79
|
return {
|
|
93
80
|
refs: {},
|
|
94
81
|
state: {
|
|
95
|
-
ownerState:
|
|
82
|
+
ownerState: u,
|
|
96
83
|
variant: c,
|
|
97
84
|
activeLabel: l,
|
|
98
|
-
Icon:
|
|
85
|
+
Icon: d
|
|
99
86
|
},
|
|
100
87
|
actions: {}
|
|
101
88
|
};
|
|
102
89
|
};
|
|
103
90
|
export {
|
|
104
|
-
|
|
91
|
+
q as useStatusIndicatorLogic
|
|
105
92
|
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { DateTimePicker as I } from "../../../date-time-picker/index.js";
|
|
3
|
+
import { PhoneInput as B } from "../../../phone-input/index.js";
|
|
4
|
+
import { useDefaultValueInputLogic as D } from "./logic.js";
|
|
5
|
+
import { F as E, a as L, B as b, T as c } from "../../../../TextField-Cx5T7iJn.js";
|
|
6
|
+
import { I as P } from "../../../../InputLabel-jPm6Xuco.js";
|
|
7
|
+
import { S as A } from "../../../../Select-B4zhu5G_.js";
|
|
8
|
+
import { M as u } from "../../../../MenuItem-BAKBPyZx.js";
|
|
9
|
+
import { B as S } from "../../../../Button-gZFgy23t.js";
|
|
10
|
+
const o = "Default Value", C = "No default", H = (x) => {
|
|
11
|
+
const { state: d, actions: n } = D(x), {
|
|
12
|
+
editor: a,
|
|
13
|
+
value: t,
|
|
14
|
+
booleanValue: V,
|
|
15
|
+
enumOptions: p,
|
|
16
|
+
inputVariant: s,
|
|
17
|
+
labelPosition: T,
|
|
18
|
+
disabled: f,
|
|
19
|
+
helperText: v
|
|
20
|
+
} = d, r = T === "default", m = {
|
|
21
|
+
label: r ? o : void 0,
|
|
22
|
+
name: "defaultValue",
|
|
23
|
+
variant: s,
|
|
24
|
+
disabled: f,
|
|
25
|
+
fullWidth: !0,
|
|
26
|
+
sx: { mb: 2 },
|
|
27
|
+
helperText: v
|
|
28
|
+
};
|
|
29
|
+
if (a === "boolean" || a === "enum") {
|
|
30
|
+
const i = a === "enum", g = i && p.length === 0, F = (l) => l ? i ? l : l === "true" ? "True" : "False" : C;
|
|
31
|
+
return /* @__PURE__ */ h(
|
|
32
|
+
E,
|
|
33
|
+
{
|
|
34
|
+
fullWidth: !0,
|
|
35
|
+
variant: s,
|
|
36
|
+
sx: { mb: 2 },
|
|
37
|
+
disabled: f || g,
|
|
38
|
+
children: [
|
|
39
|
+
r && /* @__PURE__ */ e(P, { id: "default-value-select-label", children: o }),
|
|
40
|
+
/* @__PURE__ */ h(
|
|
41
|
+
A,
|
|
42
|
+
{
|
|
43
|
+
label: r ? o : void 0,
|
|
44
|
+
name: "defaultValue",
|
|
45
|
+
labelId: "default-value-select-label",
|
|
46
|
+
id: "default-value-select",
|
|
47
|
+
value: i ? t : V,
|
|
48
|
+
displayEmpty: !r,
|
|
49
|
+
renderValue: r ? void 0 : (l) => F(l),
|
|
50
|
+
onChange: n.handleSelectChange,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ e(u, { value: "", children: C }),
|
|
53
|
+
i ? p.map((l) => /* @__PURE__ */ e(u, { value: l, children: l }, l)) : [
|
|
54
|
+
/* @__PURE__ */ e(u, { value: "true", children: "True" }, "true"),
|
|
55
|
+
/* @__PURE__ */ e(u, { value: "false", children: "False" }, "false")
|
|
56
|
+
]
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
g && /* @__PURE__ */ e(L, { children: "Add the enum values above to pick a default." })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
return a === "date" ? /* @__PURE__ */ h(b, { sx: { mb: 2 }, children: [
|
|
66
|
+
/* @__PURE__ */ e(
|
|
67
|
+
I,
|
|
68
|
+
{
|
|
69
|
+
label: r ? o : void 0,
|
|
70
|
+
labelPosition: r ? "default" : "top",
|
|
71
|
+
name: "defaultValue",
|
|
72
|
+
value: t || void 0,
|
|
73
|
+
variant: s,
|
|
74
|
+
size: "medium",
|
|
75
|
+
onChange: n.handleValueChange
|
|
76
|
+
},
|
|
77
|
+
t ? "date-set" : "date-empty"
|
|
78
|
+
),
|
|
79
|
+
!!t && /* @__PURE__ */ e(S, { size: "small", onClick: n.handleClear, sx: { mt: 0.5 }, children: "Clear" })
|
|
80
|
+
] }) : a === "integer" || a === "decimal" ? /* @__PURE__ */ e(
|
|
81
|
+
c,
|
|
82
|
+
{
|
|
83
|
+
...m,
|
|
84
|
+
value: t,
|
|
85
|
+
onChange: a === "integer" ? n.handleIntegerChange : n.handleDecimalChange,
|
|
86
|
+
inputProps: {
|
|
87
|
+
inputMode: a === "integer" ? "numeric" : "decimal"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
) : a === "phone" ? /* @__PURE__ */ e(b, { sx: { mb: 2 }, children: /* @__PURE__ */ e(
|
|
91
|
+
B,
|
|
92
|
+
{
|
|
93
|
+
label: r ? o : void 0,
|
|
94
|
+
placeholder: "Enter phone number",
|
|
95
|
+
value: t,
|
|
96
|
+
onChange: n.handleValueChange
|
|
97
|
+
}
|
|
98
|
+
) }) : a === "list" ? /* @__PURE__ */ e(
|
|
99
|
+
c,
|
|
100
|
+
{
|
|
101
|
+
...m,
|
|
102
|
+
value: t,
|
|
103
|
+
onChange: n.handleTextChange,
|
|
104
|
+
helperText: v ?? "Add list values with the comma (,) separated string"
|
|
105
|
+
}
|
|
106
|
+
) : /* @__PURE__ */ e(
|
|
107
|
+
c,
|
|
108
|
+
{
|
|
109
|
+
...m,
|
|
110
|
+
value: t,
|
|
111
|
+
onChange: n.handleTextChange,
|
|
112
|
+
multiline: a === "multiline",
|
|
113
|
+
minRows: a === "multiline" ? 2 : void 0,
|
|
114
|
+
placeholder: d.coordinateFormat ? `e.g. ${d.coordinateFormat}` : void 0
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
export {
|
|
119
|
+
H as DefaultValueInput
|
|
120
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import V from "react";
|
|
2
|
+
import { toBooleanText as v } from "../../../../utils/ontology.js";
|
|
3
|
+
const f = {
|
|
4
|
+
boolean: "boolean",
|
|
5
|
+
enum: "enum",
|
|
6
|
+
date: "date",
|
|
7
|
+
integer: "integer",
|
|
8
|
+
long: "integer",
|
|
9
|
+
byte: "integer",
|
|
10
|
+
double: "decimal",
|
|
11
|
+
decimal: "decimal",
|
|
12
|
+
list: "list",
|
|
13
|
+
"phone-number": "phone",
|
|
14
|
+
text: "multiline"
|
|
15
|
+
}, D = (e) => {
|
|
16
|
+
const n = e.trimStart().startsWith("-"), t = e.replace(/[^\d]/g, "");
|
|
17
|
+
return n ? `-${t}` : t;
|
|
18
|
+
}, E = (e) => {
|
|
19
|
+
const n = e.trimStart().startsWith("-"), [t, ...a] = e.replace(/,/g, ".").replace(/[^\d.]/g, "").split("."), r = a.length > 0 ? `${t}.${a.join("")}` : t;
|
|
20
|
+
return n ? `-${r}` : r;
|
|
21
|
+
}, _ = (e, n) => {
|
|
22
|
+
var r;
|
|
23
|
+
const a = ((e == null ? void 0 : e.enumValues) ?? ((r = e == null ? void 0 : e.innerType) == null ? void 0 : r.enumValues) ?? []).map((i) => i.trim()).filter((i) => i.length > 0);
|
|
24
|
+
return n && !a.includes(n) ? [...a, n] : a;
|
|
25
|
+
}, S = (e) => {
|
|
26
|
+
var u;
|
|
27
|
+
const {
|
|
28
|
+
property: n,
|
|
29
|
+
value: t,
|
|
30
|
+
inputVariant: a = "outlined",
|
|
31
|
+
labelPosition: r = "default",
|
|
32
|
+
disabled: i = !1,
|
|
33
|
+
helperText: g,
|
|
34
|
+
onChange: l
|
|
35
|
+
} = e, s = f[n.type] ?? "text", d = _(n.dataTypeInfo, t), c = s === "boolean" ? v(t) : "";
|
|
36
|
+
V.useEffect(() => {
|
|
37
|
+
s !== "boolean" || t === c || l(c);
|
|
38
|
+
}, [s, t, c, l]);
|
|
39
|
+
const m = (o) => {
|
|
40
|
+
l(o.target.value);
|
|
41
|
+
}, h = (o) => {
|
|
42
|
+
l(D(o.target.value));
|
|
43
|
+
}, p = (o) => {
|
|
44
|
+
l(E(o.target.value));
|
|
45
|
+
}, b = (o) => {
|
|
46
|
+
l(o.target.value);
|
|
47
|
+
}, C = (o) => {
|
|
48
|
+
l(o);
|
|
49
|
+
}, x = () => {
|
|
50
|
+
l("");
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
state: {
|
|
54
|
+
editor: s,
|
|
55
|
+
value: t,
|
|
56
|
+
booleanValue: c,
|
|
57
|
+
enumOptions: d,
|
|
58
|
+
inputVariant: a,
|
|
59
|
+
labelPosition: r,
|
|
60
|
+
disabled: i,
|
|
61
|
+
helperText: g,
|
|
62
|
+
coordinateFormat: (u = n.dataTypeInfo) == null ? void 0 : u.coordinateFormat
|
|
63
|
+
},
|
|
64
|
+
actions: {
|
|
65
|
+
handleTextChange: m,
|
|
66
|
+
handleIntegerChange: h,
|
|
67
|
+
handleDecimalChange: p,
|
|
68
|
+
handleSelectChange: b,
|
|
69
|
+
handleValueChange: C,
|
|
70
|
+
handleClear: x
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
S as useDefaultValueInputLogic
|
|
76
|
+
};
|