@hybridcore/ui 1.6.0 → 1.6.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.
- package/dist/{AccordionSummary-DgAwVTk8.js → AccordionSummary-CMg08YSA.js} +20 -23
- package/dist/{Add-DJLrrVHm.js → Add-DuVVJeQU.js} +65 -67
- package/dist/{ButtonBase-2bPw77UP.js → ButtonBase-sObABYY2.js} +60 -56
- package/dist/{Delete-CW0UZv1m.js → Delete-fBLhTHbF.js} +1 -1
- package/dist/{DialogContent-B3nbEbuv.js → DialogContent-CGJ7alb8.js} +8 -10
- package/dist/{FormControl-BLbrq4C7.js → FormControl-BCurCxRj.js} +377 -719
- package/dist/FormControlLabel-BkRfrhNy.js +601 -0
- package/dist/{IconButton-CHwRQF-g.js → IconButton-_opV1iNK.js} +26 -28
- package/dist/{InputAdornment-DLxWUE6H.js → InputAdornment-C7PEvvYr.js} +16 -18
- package/dist/InputLabel-rEwwnD4_.js +354 -0
- package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DrE50M_p.js} +92 -70
- package/dist/Modal-DlB6GH-f.js +1659 -0
- package/dist/Paper-q9kKjAKx.js +527 -0
- package/dist/{Select-BgYwkZgI.js → TextField-DSDIEEKu.js} +1449 -901
- package/dist/{Typography-CxbneZy_.js → Typography-B-Z5Y0Xq.js} +46 -48
- package/dist/{capitalize-ciszXJ7R.js → capitalize-quqpGCFu.js} +1 -1
- package/dist/components/access/index.js +8 -15
- package/dist/components/access/logic.js +25 -0
- package/dist/components/card/index.js +158 -498
- package/dist/components/card/logic.js +24 -0
- package/dist/components/card/styled.js +226 -51
- package/dist/components/card-alternate/index.js +111 -139
- package/dist/components/card-alternate/logic.js +17 -0
- package/dist/components/card-alternate/styled.js +113 -19
- package/dist/components/collapsible-card/index.js +1 -1
- package/dist/components/collapsible-card/styled.js +1 -1
- package/dist/components/confirm/dialog.js +3 -3
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/container/index.js +28 -269
- package/dist/components/container/logic.js +12 -0
- package/dist/components/container/styled.js +29 -0
- package/dist/components/context-menu/index.js +25 -457
- package/dist/components/context-menu/logic.js +14 -0
- package/dist/components/context-menu/styled.js +40 -0
- package/dist/components/data-security-selectors/security-level/index.js +36 -91
- package/dist/components/data-security-selectors/security-level/logic.js +73 -0
- package/dist/components/data-security-selectors/security-level/styled.js +47 -0
- package/dist/components/date-picker-with-custom-range/index.js +1 -1
- package/dist/components/geometry-picker/index.js +13 -12
- package/dist/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/variable/index.js +7 -9
- package/dist/components/instance-form/components/variables/index.js +1 -1
- package/dist/components/instance-form/index.js +1 -1
- package/dist/components/instance-hierarchy-table/index.js +32 -37
- package/dist/components/instance-hierarchy-table/logic.js +16 -0
- package/dist/components/instance-hierarchy-table/styled.js +53 -12
- package/dist/components/instance-table/index.js +30 -135
- package/dist/components/instance-table/logic.js +122 -0
- package/dist/components/instance-table/styled.js +53 -11
- package/dist/components/key-protection/index.js +45 -2
- package/dist/components/key-protection/logic.js +40 -0
- package/dist/components/key-protection/styled.js +45 -0
- package/dist/components/key-protection/utils.js +1 -1
- package/dist/components/loading/index.js +15 -9
- package/dist/components/loading/logic.js +15 -0
- package/dist/components/loading/styled.js +26 -19
- package/dist/components/phone-input/index.js +18 -22
- package/dist/components/phone-input/logic.js +14 -0
- package/dist/components/phone-input/styled.js +12 -4
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
- package/dist/components/range-selector/components/date-range/index.js +87 -4221
- package/dist/components/range-selector/components/geometry-range/index.js +11 -17
- package/dist/components/range-selector/components/number-range/index.js +48 -53
- package/dist/components/range-selector/components/string-range/index.js +15 -17
- package/dist/components/range-selector/index.js +63 -57
- package/dist/components/range-selector/logic.js +12 -0
- package/dist/components/range-selector/styled.js +4222 -0
- package/dist/components/template-filters/components/filter/index.js +13 -18
- package/dist/components/template-filters/components/tab-panel/index.js +8 -16
- package/dist/components/template-filters/index.js +21 -29
- package/dist/components/template-filters/logic.js +18 -0
- package/dist/components/template-filters/styled.js +44 -1
- package/dist/components/template-form/components/property-list/index.js +8 -8
- package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
- package/dist/components/template-form/components/property-list/property-list-form.js +8 -10
- package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
- 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 +8 -9
- package/dist/components/template-form/index.js +32 -33
- package/dist/components/template-property-filters/index.js +45 -95
- package/dist/components/template-property-filters/logic.js +27 -0
- package/dist/components/template-property-filters/property.js +105 -165
- package/dist/components/template-property-filters/styled.js +121 -20
- package/dist/components/tree-select/index.js +52 -67
- package/dist/components/tree-select/logic.js +59 -0
- package/dist/components/tree-select/styled.js +45 -62
- package/dist/components/treeview-filter/index.js +43 -65
- package/dist/components/treeview-filter/item/index.js +43 -42
- package/dist/components/treeview-filter/item-label/index.js +17 -37
- package/dist/components/treeview-filter/logic.js +28 -0
- package/dist/components/treeview-filter/styled.js +86 -0
- package/dist/components/uploader/index.js +532 -567
- package/dist/components/uploader/logic.js +74 -0
- package/dist/components/uploader/styled.js +93 -46
- package/dist/{createSvgIcon-BjpIhJ30.js → createSvgIcon-BM3-TsGy.js} +25 -26
- package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-DX-SqL8M.js} +23 -25
- package/dist/{dialog-DcwXug9J.js → dialog-cf4HUXXl.js} +26 -27
- package/dist/{index-syTc6m_V.js → index-C8C3YXle.js} +92 -94
- package/dist/{index-CcdvNlgr.js → index-DPKUmQnz.js} +11 -13
- package/dist/isMuiElement-BkJ72LB3.js +26 -0
- package/dist/main.d.ts +734 -298
- package/dist/main.js +15 -15
- package/dist/{property-list-form-zZQfpR0X.js → property-list-form-DL_dEoNn.js} +56 -61
- package/dist/{createTheme-DYxDnE9u.js → styled-Bsjp3kFh.js} +232 -176
- package/dist/{useMobilePicker-BLg3Blg8.js → useMobilePicker-B-M3dnTn.js} +2692 -2288
- package/dist/{utils-Bq0ye5vf.js → utils-Cxu-fHjQ.js} +7 -7
- package/package.json +1 -1
- package/dist/Box-p6OtTUEo.js +0 -30
- package/dist/Button-CvE2gnly.js +0 -370
- package/dist/CardContent-CSHh-ZlM.js +0 -74
- package/dist/Checkbox-CWRMFTBp.js +0 -421
- package/dist/FormControlLabel-C8SPv14J.js +0 -195
- package/dist/List-tqElle9C.js +0 -121
- package/dist/ListItem-CfjsIg4B.js +0 -430
- package/dist/Modal-DhPpOoGB.js +0 -1299
- package/dist/Paper-2B03OBmZ.js +0 -169
- package/dist/TextField-1yCesIbH.js +0 -457
- package/dist/components/key-protection/menu.js +0 -85
- package/dist/components/treeview-filter/item/styled.js +0 -39
- package/dist/debounce-46wSf_lW.js +0 -15
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/isMuiElement-CxT3_ACP.js +0 -13
- package/dist/listItemTextClasses-C3lndiXO.js +0 -16
- package/dist/styled-eZwjUruw.js +0 -12
- package/dist/useFormControl-CatNKXAi.js +0 -10
- package/dist/useThemeProps-BzzHcQyd.js +0 -58
- package/dist/utils-BDNynJcd.js +0 -365
|
@@ -1,462 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ClickAwayListener as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import { alpha as I } from "@mui/system";
|
|
10
|
-
import { s as B, r as A } from "../../styled-eZwjUruw.js";
|
|
11
|
-
import { B as z, u as q, a as H } from "../../ButtonBase-2bPw77UP.js";
|
|
12
|
-
import { g as J, l as w, b as K } from "../../listItemTextClasses-C3lndiXO.js";
|
|
13
|
-
import { T as C } from "../../Typography-CxbneZy_.js";
|
|
14
|
-
const Q = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"], X = (e, o) => {
|
|
15
|
-
const {
|
|
16
|
-
ownerState: s
|
|
17
|
-
} = e;
|
|
18
|
-
return [o.root, s.dense && o.dense, s.alignItems === "flex-start" && o.alignItemsFlexStart, s.divider && o.divider, !s.disableGutters && o.gutters];
|
|
19
|
-
}, Y = (e) => {
|
|
20
|
-
const {
|
|
21
|
-
alignItems: o,
|
|
22
|
-
classes: s,
|
|
23
|
-
dense: a,
|
|
24
|
-
disabled: n,
|
|
25
|
-
disableGutters: i,
|
|
26
|
-
divider: c,
|
|
27
|
-
selected: r
|
|
28
|
-
} = e, u = P({
|
|
29
|
-
root: ["root", a && "dense", !i && "gutters", c && "divider", n && "disabled", o === "flex-start" && "alignItemsFlexStart", r && "selected"]
|
|
30
|
-
}, D, s);
|
|
31
|
-
return d({}, s, u);
|
|
32
|
-
}, Z = B(z, {
|
|
33
|
-
shouldForwardProp: (e) => A(e) || e === "classes",
|
|
34
|
-
name: "MuiListItemButton",
|
|
35
|
-
slot: "Root",
|
|
36
|
-
overridesResolver: X
|
|
37
|
-
})(({
|
|
38
|
-
theme: e,
|
|
39
|
-
ownerState: o
|
|
40
|
-
}) => d({
|
|
41
|
-
display: "flex",
|
|
42
|
-
flexGrow: 1,
|
|
43
|
-
justifyContent: "flex-start",
|
|
44
|
-
alignItems: "center",
|
|
45
|
-
position: "relative",
|
|
46
|
-
textDecoration: "none",
|
|
47
|
-
minWidth: 0,
|
|
48
|
-
boxSizing: "border-box",
|
|
49
|
-
textAlign: "left",
|
|
50
|
-
paddingTop: 8,
|
|
51
|
-
paddingBottom: 8,
|
|
52
|
-
transition: e.transitions.create("background-color", {
|
|
53
|
-
duration: e.transitions.duration.shortest
|
|
54
|
-
}),
|
|
55
|
-
"&:hover": {
|
|
56
|
-
textDecoration: "none",
|
|
57
|
-
backgroundColor: (e.vars || e).palette.action.hover,
|
|
58
|
-
// Reset on touch devices, it doesn't add specificity
|
|
59
|
-
"@media (hover: none)": {
|
|
60
|
-
backgroundColor: "transparent"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
[`&.${v.selected}`]: {
|
|
64
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : I(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
65
|
-
[`&.${v.focusVisible}`]: {
|
|
66
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : I(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
[`&.${v.selected}:hover`]: {
|
|
70
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : I(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
71
|
-
// Reset on touch devices, it doesn't add specificity
|
|
72
|
-
"@media (hover: none)": {
|
|
73
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : I(e.palette.primary.main, e.palette.action.selectedOpacity)
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
[`&.${v.focusVisible}`]: {
|
|
77
|
-
backgroundColor: (e.vars || e).palette.action.focus
|
|
78
|
-
},
|
|
79
|
-
[`&.${v.disabled}`]: {
|
|
80
|
-
opacity: (e.vars || e).palette.action.disabledOpacity
|
|
81
|
-
}
|
|
82
|
-
}, o.divider && {
|
|
83
|
-
borderBottom: `1px solid ${(e.vars || e).palette.divider}`,
|
|
84
|
-
backgroundClip: "padding-box"
|
|
85
|
-
}, o.alignItems === "flex-start" && {
|
|
86
|
-
alignItems: "flex-start"
|
|
87
|
-
}, !o.disableGutters && {
|
|
88
|
-
paddingLeft: 16,
|
|
89
|
-
paddingRight: 16
|
|
90
|
-
}, o.dense && {
|
|
91
|
-
paddingTop: 4,
|
|
92
|
-
paddingBottom: 4
|
|
93
|
-
})), F = /* @__PURE__ */ f.forwardRef(function(o, s) {
|
|
94
|
-
const a = R({
|
|
95
|
-
props: o,
|
|
96
|
-
name: "MuiListItemButton"
|
|
97
|
-
}), {
|
|
98
|
-
alignItems: n = "center",
|
|
99
|
-
autoFocus: i = !1,
|
|
100
|
-
component: c = "div",
|
|
101
|
-
children: r,
|
|
102
|
-
dense: m = !1,
|
|
103
|
-
disableGutters: u = !1,
|
|
104
|
-
divider: L = !1,
|
|
105
|
-
focusVisibleClassName: O,
|
|
106
|
-
selected: N = !1,
|
|
107
|
-
className: x
|
|
108
|
-
} = a, l = k(a, Q), y = f.useContext(T), g = f.useMemo(() => ({
|
|
109
|
-
dense: m || y.dense || !1,
|
|
110
|
-
alignItems: n,
|
|
111
|
-
disableGutters: u
|
|
112
|
-
}), [n, y.dense, m, u]), b = f.useRef(null);
|
|
113
|
-
q(() => {
|
|
114
|
-
i && (b.current ? b.current.focus() : process.env.NODE_ENV !== "production" && console.error("MUI: Unable to set focus to a ListItemButton whose component has not been rendered."));
|
|
115
|
-
}, [i]);
|
|
116
|
-
const j = d({}, a, {
|
|
117
|
-
alignItems: n,
|
|
118
|
-
dense: g.dense,
|
|
119
|
-
disableGutters: u,
|
|
120
|
-
divider: L,
|
|
121
|
-
selected: N
|
|
122
|
-
}), $ = Y(j), _ = H(b, s);
|
|
123
|
-
return /* @__PURE__ */ p(T.Provider, {
|
|
124
|
-
value: g,
|
|
125
|
-
children: /* @__PURE__ */ p(Z, d({
|
|
126
|
-
ref: _,
|
|
127
|
-
href: l.href || l.to,
|
|
128
|
-
component: (l.href || l.to) && c === "div" ? "a" : c,
|
|
129
|
-
focusVisibleClassName: h($.focusVisible, O),
|
|
130
|
-
ownerState: j,
|
|
131
|
-
className: h($.root, x)
|
|
132
|
-
}, l, {
|
|
133
|
-
classes: $,
|
|
134
|
-
children: r
|
|
135
|
-
}))
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
139
|
-
// ----------------------------- Warning --------------------------------
|
|
140
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
141
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
142
|
-
// ----------------------------------------------------------------------
|
|
143
|
-
/**
|
|
144
|
-
* Defines the `align-items` style property.
|
|
145
|
-
* @default 'center'
|
|
146
|
-
*/
|
|
147
|
-
alignItems: t.oneOf(["center", "flex-start"]),
|
|
148
|
-
/**
|
|
149
|
-
* If `true`, the list item is focused during the first mount.
|
|
150
|
-
* Focus will also be triggered if the value changes from false to true.
|
|
151
|
-
* @default false
|
|
152
|
-
*/
|
|
153
|
-
autoFocus: t.bool,
|
|
154
|
-
/**
|
|
155
|
-
* The content of the component if a `ListItemSecondaryAction` is used it must
|
|
156
|
-
* be the last child.
|
|
157
|
-
*/
|
|
158
|
-
children: t.node,
|
|
159
|
-
/**
|
|
160
|
-
* Override or extend the styles applied to the component.
|
|
161
|
-
*/
|
|
162
|
-
classes: t.object,
|
|
163
|
-
/**
|
|
164
|
-
* @ignore
|
|
165
|
-
*/
|
|
166
|
-
className: t.string,
|
|
167
|
-
/**
|
|
168
|
-
* The component used for the root node.
|
|
169
|
-
* Either a string to use a HTML element or a component.
|
|
170
|
-
*/
|
|
171
|
-
component: t.elementType,
|
|
172
|
-
/**
|
|
173
|
-
* If `true`, compact vertical padding designed for keyboard and mouse input is used.
|
|
174
|
-
* The prop defaults to the value inherited from the parent List component.
|
|
175
|
-
* @default false
|
|
176
|
-
*/
|
|
177
|
-
dense: t.bool,
|
|
178
|
-
/**
|
|
179
|
-
* If `true`, the component is disabled.
|
|
180
|
-
* @default false
|
|
181
|
-
*/
|
|
182
|
-
disabled: t.bool,
|
|
183
|
-
/**
|
|
184
|
-
* If `true`, the left and right padding is removed.
|
|
185
|
-
* @default false
|
|
186
|
-
*/
|
|
187
|
-
disableGutters: t.bool,
|
|
188
|
-
/**
|
|
189
|
-
* If `true`, a 1px light border is added to the bottom of the list item.
|
|
190
|
-
* @default false
|
|
191
|
-
*/
|
|
192
|
-
divider: t.bool,
|
|
193
|
-
/**
|
|
194
|
-
* This prop can help identify which element has keyboard focus.
|
|
195
|
-
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
196
|
-
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
197
|
-
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
198
|
-
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
199
|
-
* if needed.
|
|
200
|
-
*/
|
|
201
|
-
focusVisibleClassName: t.string,
|
|
202
|
-
/**
|
|
203
|
-
* @ignore
|
|
204
|
-
*/
|
|
205
|
-
href: t.string,
|
|
206
|
-
/**
|
|
207
|
-
* Use to apply selected styling.
|
|
208
|
-
* @default false
|
|
209
|
-
*/
|
|
210
|
-
selected: t.bool,
|
|
211
|
-
/**
|
|
212
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
213
|
-
*/
|
|
214
|
-
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
215
|
-
});
|
|
216
|
-
const ee = ["className"], te = (e) => {
|
|
217
|
-
const {
|
|
218
|
-
alignItems: o,
|
|
219
|
-
classes: s
|
|
220
|
-
} = e;
|
|
221
|
-
return P({
|
|
222
|
-
root: ["root", o === "flex-start" && "alignItemsFlexStart"]
|
|
223
|
-
}, J, s);
|
|
224
|
-
}, oe = B("div", {
|
|
225
|
-
name: "MuiListItemIcon",
|
|
226
|
-
slot: "Root",
|
|
227
|
-
overridesResolver: (e, o) => {
|
|
228
|
-
const {
|
|
229
|
-
ownerState: s
|
|
230
|
-
} = e;
|
|
231
|
-
return [o.root, s.alignItems === "flex-start" && o.alignItemsFlexStart];
|
|
232
|
-
}
|
|
233
|
-
})(({
|
|
234
|
-
theme: e,
|
|
235
|
-
ownerState: o
|
|
236
|
-
}) => d({
|
|
237
|
-
minWidth: 56,
|
|
238
|
-
color: (e.vars || e).palette.action.active,
|
|
239
|
-
flexShrink: 0,
|
|
240
|
-
display: "inline-flex"
|
|
241
|
-
}, o.alignItems === "flex-start" && {
|
|
242
|
-
marginTop: 8
|
|
243
|
-
})), V = /* @__PURE__ */ f.forwardRef(function(o, s) {
|
|
244
|
-
const a = R({
|
|
245
|
-
props: o,
|
|
246
|
-
name: "MuiListItemIcon"
|
|
247
|
-
}), {
|
|
248
|
-
className: n
|
|
249
|
-
} = a, i = k(a, ee), c = f.useContext(T), r = d({}, a, {
|
|
250
|
-
alignItems: c.alignItems
|
|
251
|
-
}), m = te(r);
|
|
252
|
-
return /* @__PURE__ */ p(oe, d({
|
|
253
|
-
className: h(m.root, n),
|
|
254
|
-
ownerState: r,
|
|
255
|
-
ref: s
|
|
256
|
-
}, i));
|
|
257
|
-
});
|
|
258
|
-
process.env.NODE_ENV !== "production" && (V.propTypes = {
|
|
259
|
-
// ----------------------------- Warning --------------------------------
|
|
260
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
261
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
262
|
-
// ----------------------------------------------------------------------
|
|
263
|
-
/**
|
|
264
|
-
* The content of the component, normally `Icon`, `SvgIcon`,
|
|
265
|
-
* or a `@mui/icons-material` SVG icon element.
|
|
266
|
-
*/
|
|
267
|
-
children: t.node,
|
|
268
|
-
/**
|
|
269
|
-
* Override or extend the styles applied to the component.
|
|
270
|
-
*/
|
|
271
|
-
classes: t.object,
|
|
272
|
-
/**
|
|
273
|
-
* @ignore
|
|
274
|
-
*/
|
|
275
|
-
className: t.string,
|
|
276
|
-
/**
|
|
277
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
278
|
-
*/
|
|
279
|
-
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
280
|
-
});
|
|
281
|
-
const se = ["children", "className", "disableTypography", "inset", "primary", "primaryTypographyProps", "secondary", "secondaryTypographyProps"], ae = (e) => {
|
|
282
|
-
const {
|
|
283
|
-
classes: o,
|
|
284
|
-
inset: s,
|
|
285
|
-
primary: a,
|
|
286
|
-
secondary: n,
|
|
287
|
-
dense: i
|
|
288
|
-
} = e;
|
|
289
|
-
return P({
|
|
290
|
-
root: ["root", s && "inset", i && "dense", a && n && "multiline"],
|
|
291
|
-
primary: ["primary"],
|
|
292
|
-
secondary: ["secondary"]
|
|
293
|
-
}, K, o);
|
|
294
|
-
}, re = B("div", {
|
|
295
|
-
name: "MuiListItemText",
|
|
296
|
-
slot: "Root",
|
|
297
|
-
overridesResolver: (e, o) => {
|
|
298
|
-
const {
|
|
299
|
-
ownerState: s
|
|
300
|
-
} = e;
|
|
301
|
-
return [{
|
|
302
|
-
[`& .${w.primary}`]: o.primary
|
|
303
|
-
}, {
|
|
304
|
-
[`& .${w.secondary}`]: o.secondary
|
|
305
|
-
}, o.root, s.inset && o.inset, s.primary && s.secondary && o.multiline, s.dense && o.dense];
|
|
306
|
-
}
|
|
307
|
-
})(({
|
|
308
|
-
ownerState: e
|
|
309
|
-
}) => d({
|
|
310
|
-
flex: "1 1 auto",
|
|
311
|
-
minWidth: 0,
|
|
312
|
-
marginTop: 4,
|
|
313
|
-
marginBottom: 4
|
|
314
|
-
}, e.primary && e.secondary && {
|
|
315
|
-
marginTop: 6,
|
|
316
|
-
marginBottom: 6
|
|
317
|
-
}, e.inset && {
|
|
318
|
-
paddingLeft: 56
|
|
319
|
-
})), E = /* @__PURE__ */ f.forwardRef(function(o, s) {
|
|
320
|
-
const a = R({
|
|
321
|
-
props: o,
|
|
322
|
-
name: "MuiListItemText"
|
|
323
|
-
}), {
|
|
324
|
-
children: n,
|
|
325
|
-
className: i,
|
|
326
|
-
disableTypography: c = !1,
|
|
327
|
-
inset: r = !1,
|
|
328
|
-
primary: m,
|
|
329
|
-
primaryTypographyProps: u,
|
|
330
|
-
secondary: L,
|
|
331
|
-
secondaryTypographyProps: O
|
|
332
|
-
} = a, N = k(a, se), {
|
|
333
|
-
dense: x
|
|
334
|
-
} = f.useContext(T);
|
|
335
|
-
let l = m ?? n, y = L;
|
|
336
|
-
const g = d({}, a, {
|
|
337
|
-
disableTypography: c,
|
|
338
|
-
inset: r,
|
|
339
|
-
primary: !!l,
|
|
340
|
-
secondary: !!y,
|
|
341
|
-
dense: x
|
|
342
|
-
}), b = ae(g);
|
|
343
|
-
return l != null && l.type !== C && !c && (l = /* @__PURE__ */ p(C, d({
|
|
344
|
-
variant: x ? "body2" : "body1",
|
|
345
|
-
className: b.primary,
|
|
346
|
-
component: u != null && u.variant ? void 0 : "span",
|
|
347
|
-
display: "block"
|
|
348
|
-
}, u, {
|
|
349
|
-
children: l
|
|
350
|
-
}))), y != null && y.type !== C && !c && (y = /* @__PURE__ */ p(C, d({
|
|
351
|
-
variant: "body2",
|
|
352
|
-
className: b.secondary,
|
|
353
|
-
color: "text.secondary",
|
|
354
|
-
display: "block"
|
|
355
|
-
}, O, {
|
|
356
|
-
children: y
|
|
357
|
-
}))), /* @__PURE__ */ S(re, d({
|
|
358
|
-
className: h(b.root, i),
|
|
359
|
-
ownerState: g,
|
|
360
|
-
ref: s
|
|
361
|
-
}, N, {
|
|
362
|
-
children: [l, y]
|
|
363
|
-
}));
|
|
364
|
-
});
|
|
365
|
-
process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
366
|
-
// ----------------------------- Warning --------------------------------
|
|
367
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
368
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
369
|
-
// ----------------------------------------------------------------------
|
|
370
|
-
/**
|
|
371
|
-
* Alias for the `primary` prop.
|
|
372
|
-
*/
|
|
373
|
-
children: t.node,
|
|
374
|
-
/**
|
|
375
|
-
* Override or extend the styles applied to the component.
|
|
376
|
-
*/
|
|
377
|
-
classes: t.object,
|
|
378
|
-
/**
|
|
379
|
-
* @ignore
|
|
380
|
-
*/
|
|
381
|
-
className: t.string,
|
|
382
|
-
/**
|
|
383
|
-
* If `true`, the children won't be wrapped by a Typography component.
|
|
384
|
-
* This can be useful to render an alternative Typography variant by wrapping
|
|
385
|
-
* the `children` (or `primary`) text, and optional `secondary` text
|
|
386
|
-
* with the Typography component.
|
|
387
|
-
* @default false
|
|
388
|
-
*/
|
|
389
|
-
disableTypography: t.bool,
|
|
390
|
-
/**
|
|
391
|
-
* If `true`, the children are indented.
|
|
392
|
-
* This should be used if there is no left avatar or left icon.
|
|
393
|
-
* @default false
|
|
394
|
-
*/
|
|
395
|
-
inset: t.bool,
|
|
396
|
-
/**
|
|
397
|
-
* The main content element.
|
|
398
|
-
*/
|
|
399
|
-
primary: t.node,
|
|
400
|
-
/**
|
|
401
|
-
* These props will be forwarded to the primary typography component
|
|
402
|
-
* (as long as disableTypography is not `true`).
|
|
403
|
-
*/
|
|
404
|
-
primaryTypographyProps: t.object,
|
|
405
|
-
/**
|
|
406
|
-
* The secondary content element.
|
|
407
|
-
*/
|
|
408
|
-
secondary: t.node,
|
|
409
|
-
/**
|
|
410
|
-
* These props will be forwarded to the secondary typography component
|
|
411
|
-
* (as long as disableTypography is not `true`).
|
|
412
|
-
*/
|
|
413
|
-
secondaryTypographyProps: t.object,
|
|
414
|
-
/**
|
|
415
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
416
|
-
*/
|
|
417
|
-
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
|
|
418
|
-
});
|
|
419
|
-
const ve = ({
|
|
420
|
-
open: e,
|
|
421
|
-
buttons: o,
|
|
422
|
-
position: s,
|
|
423
|
-
width: a = 160,
|
|
424
|
-
sx: n,
|
|
425
|
-
onClose: i
|
|
426
|
-
}) => {
|
|
427
|
-
const c = () => {
|
|
428
|
-
i && i();
|
|
429
|
-
};
|
|
430
|
-
return e ? /* @__PURE__ */ p(U, { onClickAway: c, children: /* @__PURE__ */ p(
|
|
431
|
-
G,
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { ClickAwayListener as a } from "@mui/material";
|
|
3
|
+
import { useContextMenuLogic as d } from "./logic.js";
|
|
4
|
+
import { ContextMenuList as u, ContextMenuItem as x, ContextMenuItemButton as C, ContextMenuItemIcon as m, ContextMenuItemText as I } from "./styled.js";
|
|
5
|
+
const y = (e) => {
|
|
6
|
+
const { state: o, actions: r } = d(e), { ownerState: i, open: c } = o;
|
|
7
|
+
return c ? /* @__PURE__ */ t(a, { onClickAway: r.handleClickAway, children: /* @__PURE__ */ t(u, { ownerState: i, sx: e.sx, disablePadding: !0, children: e.buttons.map((n, l) => /* @__PURE__ */ t(
|
|
8
|
+
x,
|
|
432
9
|
{
|
|
433
|
-
|
|
434
|
-
position: "absolute",
|
|
435
|
-
zIndex: 9999999,
|
|
436
|
-
width: a,
|
|
437
|
-
maxWidth: 360,
|
|
438
|
-
bgcolor: "background.paper",
|
|
439
|
-
left: s == null ? void 0 : s.left,
|
|
440
|
-
top: s == null ? void 0 : s.top,
|
|
441
|
-
borderRadius: 0.5,
|
|
442
|
-
...n
|
|
443
|
-
},
|
|
10
|
+
secondaryAction: n.endIcon,
|
|
444
11
|
disablePadding: !0,
|
|
445
|
-
children:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
|
|
12
|
+
children: /* @__PURE__ */ s(
|
|
13
|
+
C,
|
|
14
|
+
{
|
|
15
|
+
role: void 0,
|
|
16
|
+
onClick: n.onClick,
|
|
17
|
+
dense: !0,
|
|
18
|
+
children: [
|
|
19
|
+
n.startIcon !== void 0 && /* @__PURE__ */ t(m, { children: n.startIcon }),
|
|
20
|
+
/* @__PURE__ */ t(I, { primary: n.label })
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
},
|
|
25
|
+
l
|
|
26
|
+
)) }) }) : null;
|
|
459
27
|
};
|
|
460
28
|
export {
|
|
461
|
-
|
|
29
|
+
y as ContextMenu
|
|
462
30
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useThemeProps as p } from "@mui/material";
|
|
2
|
+
const a = (t) => {
|
|
3
|
+
const o = p({ props: t, name: "HCContextMenu" }), { width: n = 160, onClose: e } = o, s = { ...o, width: n }, r = () => {
|
|
4
|
+
e && e();
|
|
5
|
+
};
|
|
6
|
+
return {
|
|
7
|
+
refs: {},
|
|
8
|
+
state: { ownerState: s, open: o.open },
|
|
9
|
+
actions: { handleClickAway: r }
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
a as useContextMenuLogic
|
|
14
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { styled as o, List as n, ListItem as i, ListItemButton as s, ListItemIcon as m, ListItemText as u } from "@mui/material";
|
|
2
|
+
const a = (t) => t !== "ownerState", C = o(n, {
|
|
3
|
+
name: "HCContextMenu",
|
|
4
|
+
slot: "list",
|
|
5
|
+
shouldForwardProp: a
|
|
6
|
+
})(({ theme: t, ownerState: e }) => ({
|
|
7
|
+
position: "absolute",
|
|
8
|
+
zIndex: 9999999,
|
|
9
|
+
width: e.width ?? 160,
|
|
10
|
+
maxWidth: 360,
|
|
11
|
+
backgroundColor: t.palette.background.paper,
|
|
12
|
+
borderRadius: t.shape.borderRadius * 0.5,
|
|
13
|
+
...e.position ? { left: e.position.left, top: e.position.top } : {}
|
|
14
|
+
})), p = o(i, {
|
|
15
|
+
name: "HCContextMenu",
|
|
16
|
+
slot: "item"
|
|
17
|
+
})({}), r = o(s, {
|
|
18
|
+
name: "HCContextMenu",
|
|
19
|
+
slot: "itemButton"
|
|
20
|
+
})({}), d = o(m, {
|
|
21
|
+
name: "HCContextMenu",
|
|
22
|
+
slot: "itemIcon"
|
|
23
|
+
})(({ theme: t }) => ({
|
|
24
|
+
minWidth: "auto",
|
|
25
|
+
marginRight: t.spacing(1)
|
|
26
|
+
})), l = o(u, {
|
|
27
|
+
name: "HCContextMenu",
|
|
28
|
+
slot: "itemText"
|
|
29
|
+
})({
|
|
30
|
+
"& .MuiListItemText-primary": {
|
|
31
|
+
fontSize: 12
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
p as ContextMenuItem,
|
|
36
|
+
r as ContextMenuItemButton,
|
|
37
|
+
d as ContextMenuItemIcon,
|
|
38
|
+
l as ContextMenuItemText,
|
|
39
|
+
C as ContextMenuList
|
|
40
|
+
};
|
|
@@ -1,94 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { b as
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (d && t.length > 0) {
|
|
37
|
-
const r = t.find(
|
|
38
|
-
(h) => h.id === d
|
|
39
|
-
);
|
|
40
|
-
if (r) return r.level;
|
|
41
|
-
}
|
|
42
|
-
return l;
|
|
43
|
-
}, [
|
|
44
|
-
l,
|
|
45
|
-
d,
|
|
46
|
-
t,
|
|
47
|
-
n,
|
|
48
|
-
i,
|
|
49
|
-
c,
|
|
50
|
-
o,
|
|
51
|
-
a
|
|
52
|
-
]), C = (r) => {
|
|
53
|
-
S(r.target.value);
|
|
54
|
-
};
|
|
55
|
-
return /* @__PURE__ */ e(
|
|
56
|
-
y,
|
|
57
|
-
{
|
|
58
|
-
condition: f === "left",
|
|
59
|
-
wrapper: (r) => /* @__PURE__ */ u(p, { display: "flex", alignItems: "center", children: [
|
|
60
|
-
/* @__PURE__ */ e(F, { width: "32%", children: "Security Level *" }),
|
|
61
|
-
/* @__PURE__ */ e(p, { width: "68%", children: r })
|
|
62
|
-
] }),
|
|
63
|
-
children: /* @__PURE__ */ u(A, { children: [
|
|
64
|
-
/* @__PURE__ */ u(
|
|
65
|
-
I,
|
|
66
|
-
{
|
|
67
|
-
fullWidth: !0,
|
|
68
|
-
variant: g,
|
|
69
|
-
error: m,
|
|
70
|
-
sx: { ...g === "outlined" && { mt: 1 } },
|
|
71
|
-
children: [
|
|
72
|
-
f === "default" && /* @__PURE__ */ e($, { id: "security-level-label", children: "Security Level *" }),
|
|
73
|
-
/* @__PURE__ */ e(
|
|
74
|
-
j,
|
|
75
|
-
{
|
|
76
|
-
label: f === "default" ? "Security Level *" : void 0,
|
|
77
|
-
labelId: "security-level-label",
|
|
78
|
-
id: "demo-simple-select",
|
|
79
|
-
value: x,
|
|
80
|
-
onChange: C,
|
|
81
|
-
children: t.filter((r) => r.level <= b).map((r, h) => /* @__PURE__ */ e(v, { value: r.id, children: r.name }, h))
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
m && /* @__PURE__ */ e(w, { error: !0, children: "This field is required!" })
|
|
88
|
-
] })
|
|
89
|
-
}
|
|
90
|
-
);
|
|
1
|
+
import { jsxs as t, Fragment as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { InputLabel as v } from "@mui/material";
|
|
3
|
+
import { useSecurityLevelLogic as y } from "./logic.js";
|
|
4
|
+
import { SecurityFormControl as L, SecuritySelect as f, SecurityMenuItem as m, SecurityHelperText as S, SecurityLevelRoot as b, LeftLayout as x, LeftLabel as g, LeftContent as C } from "./styled.js";
|
|
5
|
+
const F = (r) => {
|
|
6
|
+
const { state: o, actions: u } = y(r), { ownerState: i, visibleLevels: a, variant: d, labelPosition: l } = o, c = /* @__PURE__ */ t(h, { children: [
|
|
7
|
+
/* @__PURE__ */ t(
|
|
8
|
+
L,
|
|
9
|
+
{
|
|
10
|
+
ownerState: i,
|
|
11
|
+
fullWidth: !0,
|
|
12
|
+
variant: d,
|
|
13
|
+
error: r.showError,
|
|
14
|
+
children: [
|
|
15
|
+
l === "default" && /* @__PURE__ */ e(v, { id: "security-level-label", children: "Security Level *" }),
|
|
16
|
+
/* @__PURE__ */ e(
|
|
17
|
+
f,
|
|
18
|
+
{
|
|
19
|
+
label: l === "default" ? "Security Level *" : void 0,
|
|
20
|
+
labelId: "security-level-label",
|
|
21
|
+
id: "security-level-select",
|
|
22
|
+
value: r.value,
|
|
23
|
+
onChange: u.handleChange,
|
|
24
|
+
children: a.map((n, s) => /* @__PURE__ */ e(m, { value: n.id, children: n.name }, s))
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
r.showError && /* @__PURE__ */ e(S, { error: !0, children: "This field is required!" })
|
|
31
|
+
] });
|
|
32
|
+
return /* @__PURE__ */ e(b, { ownerState: i, sx: r.sx, children: l === "left" ? /* @__PURE__ */ t(x, { children: [
|
|
33
|
+
/* @__PURE__ */ e(g, { children: "Security Level *" }),
|
|
34
|
+
/* @__PURE__ */ e(C, { children: c })
|
|
35
|
+
] }) : c });
|
|
91
36
|
};
|
|
92
37
|
export {
|
|
93
|
-
|
|
38
|
+
F as SecurityLevel
|
|
94
39
|
};
|