@hybridcore/ui 1.4.0 → 1.4.2
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/card/index.js +341 -179
- package/dist/components/template-form/index.js +27 -24
- package/dist/main.d.ts +9 -8
- package/package.json +1 -1
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Box as
|
|
3
|
-
import { LandscapeCardRoot as
|
|
4
|
-
import { _ as
|
|
5
|
-
import * as
|
|
6
|
-
import { P as
|
|
7
|
-
import { g as
|
|
8
|
-
import { g as
|
|
9
|
-
import { C as
|
|
10
|
-
import { T as
|
|
11
|
-
function
|
|
12
|
-
return
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton as n, Box as g, Avatar as C } from "@mui/material";
|
|
3
|
+
import { LandscapeCardRoot as I, LandscapeInfoBox as P, LandscapeCardExtraActions as _, PortraitCardRoot as L, PortraitCardExtraActions as U } from "./styled.js";
|
|
4
|
+
import { _ as u, a as O } from "../../objectWithoutPropertiesLoose-BK36oJDi.js";
|
|
5
|
+
import * as T from "react";
|
|
6
|
+
import { P as i } from "../../createStyled-BzvgQjjR.js";
|
|
7
|
+
import { g as S, u as N, c as k, a as B, b as H } from "../../useThemeProps-uYx_RkOH.js";
|
|
8
|
+
import { g as j, s as R } from "../../styled-LNCprp4n.js";
|
|
9
|
+
import { C as M } from "../../CardContent-DFsCCOWk.js";
|
|
10
|
+
import { T as p } from "../../Typography-Bm7PFqUT.js";
|
|
11
|
+
function D(t) {
|
|
12
|
+
return j("MuiCardActions", t);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
const
|
|
14
|
+
S("MuiCardActions", ["root", "spacing"]);
|
|
15
|
+
const z = ["disableSpacing", "className"], $ = (t) => {
|
|
16
16
|
const {
|
|
17
|
-
classes:
|
|
18
|
-
disableSpacing:
|
|
19
|
-
} =
|
|
20
|
-
return
|
|
21
|
-
root: ["root", !
|
|
22
|
-
},
|
|
23
|
-
},
|
|
17
|
+
classes: o,
|
|
18
|
+
disableSpacing: s
|
|
19
|
+
} = t;
|
|
20
|
+
return B({
|
|
21
|
+
root: ["root", !s && "spacing"]
|
|
22
|
+
}, D, o);
|
|
23
|
+
}, F = R("div", {
|
|
24
24
|
name: "MuiCardActions",
|
|
25
25
|
slot: "Root",
|
|
26
|
-
overridesResolver: (
|
|
26
|
+
overridesResolver: (t, o) => {
|
|
27
27
|
const {
|
|
28
|
-
ownerState:
|
|
29
|
-
} =
|
|
30
|
-
return [
|
|
28
|
+
ownerState: s
|
|
29
|
+
} = t;
|
|
30
|
+
return [o.root, !s.disableSpacing && o.spacing];
|
|
31
31
|
}
|
|
32
32
|
})(({
|
|
33
|
-
ownerState:
|
|
34
|
-
}) =>
|
|
33
|
+
ownerState: t
|
|
34
|
+
}) => u({
|
|
35
35
|
display: "flex",
|
|
36
36
|
alignItems: "center",
|
|
37
37
|
padding: 8
|
|
38
|
-
}, !
|
|
38
|
+
}, !t.disableSpacing && {
|
|
39
39
|
"& > :not(:first-of-type)": {
|
|
40
40
|
marginLeft: 8
|
|
41
41
|
}
|
|
42
|
-
})),
|
|
43
|
-
const
|
|
44
|
-
props:
|
|
42
|
+
})), E = /* @__PURE__ */ T.forwardRef(function(o, s) {
|
|
43
|
+
const c = N({
|
|
44
|
+
props: o,
|
|
45
45
|
name: "MuiCardActions"
|
|
46
46
|
}), {
|
|
47
|
-
disableSpacing:
|
|
48
|
-
className:
|
|
49
|
-
} =
|
|
50
|
-
disableSpacing:
|
|
51
|
-
}),
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
className:
|
|
54
|
-
ownerState:
|
|
55
|
-
ref:
|
|
56
|
-
},
|
|
47
|
+
disableSpacing: l = !1,
|
|
48
|
+
className: f
|
|
49
|
+
} = c, d = O(c, z), m = u({}, c, {
|
|
50
|
+
disableSpacing: l
|
|
51
|
+
}), x = $(m);
|
|
52
|
+
return /* @__PURE__ */ e(F, u({
|
|
53
|
+
className: k(x.root, f),
|
|
54
|
+
ownerState: m,
|
|
55
|
+
ref: s
|
|
56
|
+
}, d));
|
|
57
57
|
});
|
|
58
|
-
process.env.NODE_ENV !== "production" && (
|
|
58
|
+
process.env.NODE_ENV !== "production" && (E.propTypes = {
|
|
59
59
|
// ----------------------------- Warning --------------------------------
|
|
60
60
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
61
61
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -63,93 +63,93 @@ process.env.NODE_ENV !== "production" && (k.propTypes = {
|
|
|
63
63
|
/**
|
|
64
64
|
* The content of the component.
|
|
65
65
|
*/
|
|
66
|
-
children:
|
|
66
|
+
children: i.node,
|
|
67
67
|
/**
|
|
68
68
|
* Override or extend the styles applied to the component.
|
|
69
69
|
*/
|
|
70
|
-
classes:
|
|
70
|
+
classes: i.object,
|
|
71
71
|
/**
|
|
72
72
|
* @ignore
|
|
73
73
|
*/
|
|
74
|
-
className:
|
|
74
|
+
className: i.string,
|
|
75
75
|
/**
|
|
76
76
|
* If `true`, the actions do not have additional margin.
|
|
77
77
|
* @default false
|
|
78
78
|
*/
|
|
79
|
-
disableSpacing:
|
|
79
|
+
disableSpacing: i.bool,
|
|
80
80
|
/**
|
|
81
81
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
82
82
|
*/
|
|
83
|
-
sx:
|
|
83
|
+
sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object])
|
|
84
84
|
});
|
|
85
|
-
function
|
|
86
|
-
return
|
|
85
|
+
function V(t) {
|
|
86
|
+
return j("MuiCardMedia", t);
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
const
|
|
88
|
+
S("MuiCardMedia", ["root", "media", "img"]);
|
|
89
|
+
const G = ["children", "className", "component", "image", "src", "style"], q = (t) => {
|
|
90
90
|
const {
|
|
91
|
-
classes:
|
|
92
|
-
isMediaComponent:
|
|
93
|
-
isImageComponent:
|
|
94
|
-
} =
|
|
95
|
-
return
|
|
96
|
-
root: ["root",
|
|
97
|
-
},
|
|
98
|
-
},
|
|
91
|
+
classes: o,
|
|
92
|
+
isMediaComponent: s,
|
|
93
|
+
isImageComponent: c
|
|
94
|
+
} = t;
|
|
95
|
+
return B({
|
|
96
|
+
root: ["root", s && "media", c && "img"]
|
|
97
|
+
}, V, o);
|
|
98
|
+
}, J = R("div", {
|
|
99
99
|
name: "MuiCardMedia",
|
|
100
100
|
slot: "Root",
|
|
101
|
-
overridesResolver: (
|
|
101
|
+
overridesResolver: (t, o) => {
|
|
102
102
|
const {
|
|
103
|
-
ownerState:
|
|
104
|
-
} =
|
|
105
|
-
isMediaComponent:
|
|
106
|
-
isImageComponent:
|
|
107
|
-
} =
|
|
108
|
-
return [
|
|
103
|
+
ownerState: s
|
|
104
|
+
} = t, {
|
|
105
|
+
isMediaComponent: c,
|
|
106
|
+
isImageComponent: l
|
|
107
|
+
} = s;
|
|
108
|
+
return [o.root, c && o.media, l && o.img];
|
|
109
109
|
}
|
|
110
110
|
})(({
|
|
111
|
-
ownerState:
|
|
112
|
-
}) =>
|
|
111
|
+
ownerState: t
|
|
112
|
+
}) => u({
|
|
113
113
|
display: "block",
|
|
114
114
|
backgroundSize: "cover",
|
|
115
115
|
backgroundRepeat: "no-repeat",
|
|
116
116
|
backgroundPosition: "center"
|
|
117
|
-
},
|
|
117
|
+
}, t.isMediaComponent && {
|
|
118
118
|
width: "100%"
|
|
119
|
-
},
|
|
119
|
+
}, t.isImageComponent && {
|
|
120
120
|
// ⚠️ object-fit is not supported by IE11.
|
|
121
121
|
objectFit: "cover"
|
|
122
|
-
})),
|
|
123
|
-
const
|
|
124
|
-
props:
|
|
122
|
+
})), K = ["video", "audio", "picture", "iframe", "img"], Q = ["picture", "img"], b = /* @__PURE__ */ T.forwardRef(function(o, s) {
|
|
123
|
+
const c = N({
|
|
124
|
+
props: o,
|
|
125
125
|
name: "MuiCardMedia"
|
|
126
126
|
}), {
|
|
127
|
-
children:
|
|
128
|
-
className:
|
|
129
|
-
component:
|
|
130
|
-
image:
|
|
131
|
-
src:
|
|
132
|
-
style:
|
|
133
|
-
} =
|
|
134
|
-
backgroundImage: `url("${
|
|
135
|
-
},
|
|
136
|
-
component:
|
|
137
|
-
isMediaComponent:
|
|
138
|
-
isImageComponent:
|
|
139
|
-
}),
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
className:
|
|
142
|
-
as:
|
|
143
|
-
role: !
|
|
144
|
-
ref:
|
|
145
|
-
style:
|
|
146
|
-
ownerState:
|
|
147
|
-
src:
|
|
148
|
-
},
|
|
149
|
-
children:
|
|
127
|
+
children: l,
|
|
128
|
+
className: f,
|
|
129
|
+
component: d = "div",
|
|
130
|
+
image: m,
|
|
131
|
+
src: x,
|
|
132
|
+
style: a
|
|
133
|
+
} = c, w = O(c, G), v = K.indexOf(d) !== -1, W = !v && m ? u({
|
|
134
|
+
backgroundImage: `url("${m}")`
|
|
135
|
+
}, a) : a, y = u({}, c, {
|
|
136
|
+
component: d,
|
|
137
|
+
isMediaComponent: v,
|
|
138
|
+
isImageComponent: Q.indexOf(d) !== -1
|
|
139
|
+
}), A = q(y);
|
|
140
|
+
return /* @__PURE__ */ e(J, u({
|
|
141
|
+
className: k(A.root, f),
|
|
142
|
+
as: d,
|
|
143
|
+
role: !v && m ? "img" : void 0,
|
|
144
|
+
ref: s,
|
|
145
|
+
style: W,
|
|
146
|
+
ownerState: y,
|
|
147
|
+
src: v ? m || x : void 0
|
|
148
|
+
}, w, {
|
|
149
|
+
children: l
|
|
150
150
|
}));
|
|
151
151
|
});
|
|
152
|
-
process.env.NODE_ENV !== "production" && (
|
|
152
|
+
process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
153
153
|
// ----------------------------- Warning --------------------------------
|
|
154
154
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
155
155
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -157,73 +157,107 @@ process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
|
157
157
|
/**
|
|
158
158
|
* The content of the component.
|
|
159
159
|
*/
|
|
160
|
-
children:
|
|
160
|
+
children: H(i.node, (t) => !t.children && !t.image && !t.src && !t.component ? new Error("MUI: Either `children`, `image`, `src` or `component` prop must be specified.") : null),
|
|
161
161
|
/**
|
|
162
162
|
* Override or extend the styles applied to the component.
|
|
163
163
|
*/
|
|
164
|
-
classes:
|
|
164
|
+
classes: i.object,
|
|
165
165
|
/**
|
|
166
166
|
* @ignore
|
|
167
167
|
*/
|
|
168
|
-
className:
|
|
168
|
+
className: i.string,
|
|
169
169
|
/**
|
|
170
170
|
* The component used for the root node.
|
|
171
171
|
* Either a string to use a HTML element or a component.
|
|
172
172
|
*/
|
|
173
|
-
component:
|
|
173
|
+
component: i.elementType,
|
|
174
174
|
/**
|
|
175
175
|
* Image to be displayed as a background image.
|
|
176
176
|
* Either `image` or `src` prop must be specified.
|
|
177
177
|
* Note that caller must specify height otherwise the image will not be visible.
|
|
178
178
|
*/
|
|
179
|
-
image:
|
|
179
|
+
image: i.string,
|
|
180
180
|
/**
|
|
181
181
|
* An alias for `image` property.
|
|
182
182
|
* Available only with media components.
|
|
183
183
|
* Media components: `video`, `audio`, `picture`, `iframe`, `img`.
|
|
184
184
|
*/
|
|
185
|
-
src:
|
|
185
|
+
src: i.string,
|
|
186
186
|
/**
|
|
187
187
|
* @ignore
|
|
188
188
|
*/
|
|
189
|
-
style:
|
|
189
|
+
style: i.object,
|
|
190
190
|
/**
|
|
191
191
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
192
192
|
*/
|
|
193
|
-
sx:
|
|
193
|
+
sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object])
|
|
194
194
|
});
|
|
195
|
-
const
|
|
196
|
-
title:
|
|
197
|
-
text:
|
|
198
|
-
image:
|
|
199
|
-
orientation:
|
|
200
|
-
avatar:
|
|
201
|
-
actions:
|
|
202
|
-
extraActions:
|
|
203
|
-
extraInfo:
|
|
204
|
-
stats:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
195
|
+
const re = ({
|
|
196
|
+
title: t,
|
|
197
|
+
text: o,
|
|
198
|
+
image: s,
|
|
199
|
+
orientation: c = "portrait",
|
|
200
|
+
avatar: l,
|
|
201
|
+
actions: f,
|
|
202
|
+
extraActions: d,
|
|
203
|
+
extraInfo: m,
|
|
204
|
+
stats: x,
|
|
205
|
+
loading: a = !1
|
|
206
|
+
}) => c === "landscape" ? /* @__PURE__ */ r(I, { children: [
|
|
207
|
+
a ? /* @__PURE__ */ e(
|
|
208
|
+
n,
|
|
209
|
+
{
|
|
210
|
+
sx: { width: 330, height: 200 },
|
|
211
|
+
animation: "wave",
|
|
212
|
+
variant: "rounded"
|
|
213
|
+
}
|
|
214
|
+
) : /* @__PURE__ */ e(
|
|
215
|
+
b,
|
|
208
216
|
{
|
|
209
217
|
component: "img",
|
|
210
|
-
alt:
|
|
211
|
-
image:
|
|
218
|
+
alt: t,
|
|
219
|
+
image: s,
|
|
212
220
|
sx: { width: 330, height: 200 }
|
|
213
221
|
}
|
|
214
222
|
),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
|
|
223
|
+
/* @__PURE__ */ r(M, { children: [
|
|
224
|
+
/* @__PURE__ */ e(g, { flex: 1, children: /* @__PURE__ */ r(
|
|
225
|
+
g,
|
|
218
226
|
{
|
|
219
227
|
display: "flex",
|
|
220
228
|
flexDirection: "column",
|
|
221
229
|
justifyContent: "space-between",
|
|
222
230
|
height: "100%",
|
|
223
231
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
|
|
232
|
+
/* @__PURE__ */ e(g, { children: a ? /* @__PURE__ */ r(h, { children: [
|
|
233
|
+
/* @__PURE__ */ e(
|
|
234
|
+
n,
|
|
235
|
+
{
|
|
236
|
+
animation: "wave",
|
|
237
|
+
height: 10,
|
|
238
|
+
style: { marginBottom: 16, marginTop: 10 }
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
/* @__PURE__ */ e(
|
|
242
|
+
n,
|
|
243
|
+
{
|
|
244
|
+
animation: "wave",
|
|
245
|
+
height: 10,
|
|
246
|
+
style: { marginBottom: 6 }
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
/* @__PURE__ */ e(
|
|
250
|
+
n,
|
|
251
|
+
{
|
|
252
|
+
animation: "wave",
|
|
253
|
+
height: 10,
|
|
254
|
+
width: "80%",
|
|
255
|
+
style: { marginBottom: 6 }
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
] }) : /* @__PURE__ */ r(h, { children: [
|
|
259
|
+
/* @__PURE__ */ e(
|
|
260
|
+
p,
|
|
227
261
|
{
|
|
228
262
|
gutterBottom: !0,
|
|
229
263
|
variant: "subtitle1",
|
|
@@ -235,11 +269,11 @@ const ne = ({
|
|
|
235
269
|
WebkitLineClamp: 3,
|
|
236
270
|
WebkitBoxOrient: "vertical"
|
|
237
271
|
},
|
|
238
|
-
children:
|
|
272
|
+
children: t
|
|
239
273
|
}
|
|
240
274
|
),
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
|
|
275
|
+
/* @__PURE__ */ e(
|
|
276
|
+
p,
|
|
243
277
|
{
|
|
244
278
|
variant: "caption",
|
|
245
279
|
component: "p",
|
|
@@ -252,54 +286,162 @@ const ne = ({
|
|
|
252
286
|
WebkitBoxOrient: "vertical",
|
|
253
287
|
lineHeight: "16px"
|
|
254
288
|
},
|
|
255
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ e("small", { children: o })
|
|
256
290
|
}
|
|
257
291
|
)
|
|
258
|
-
] }),
|
|
259
|
-
/* @__PURE__ */
|
|
292
|
+
] }) }),
|
|
293
|
+
/* @__PURE__ */ e(g, { children: a ? /* @__PURE__ */ e(
|
|
294
|
+
n,
|
|
295
|
+
{
|
|
296
|
+
animation: "wave",
|
|
297
|
+
height: 10,
|
|
298
|
+
width: "40%",
|
|
299
|
+
style: { marginBottom: 6 }
|
|
300
|
+
}
|
|
301
|
+
) : x })
|
|
260
302
|
]
|
|
261
303
|
}
|
|
262
304
|
) }),
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
-
|
|
266
|
-
d,
|
|
305
|
+
/* @__PURE__ */ r(P, { children: [
|
|
306
|
+
a ? /* @__PURE__ */ e(
|
|
307
|
+
n,
|
|
267
308
|
{
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
fontSize: "13px"
|
|
273
|
-
},
|
|
274
|
-
children: s.title
|
|
309
|
+
animation: "wave",
|
|
310
|
+
variant: "circular",
|
|
311
|
+
width: 42,
|
|
312
|
+
height: 42
|
|
275
313
|
}
|
|
276
|
-
),
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
|
|
314
|
+
) : /* @__PURE__ */ e(C, { src: l.image, sx: { width: 42, height: 42 } }),
|
|
315
|
+
a ? /* @__PURE__ */ r(h, { children: [
|
|
316
|
+
/* @__PURE__ */ e(
|
|
317
|
+
n,
|
|
318
|
+
{
|
|
319
|
+
animation: "wave",
|
|
320
|
+
height: 10,
|
|
321
|
+
width: "40%",
|
|
322
|
+
sx: { mb: 0.25, mt: 0.35 }
|
|
323
|
+
}
|
|
324
|
+
),
|
|
325
|
+
/* @__PURE__ */ e(
|
|
326
|
+
n,
|
|
327
|
+
{
|
|
328
|
+
animation: "wave",
|
|
329
|
+
height: 10,
|
|
330
|
+
width: "60%",
|
|
331
|
+
sx: { mb: 0.25 }
|
|
332
|
+
}
|
|
333
|
+
)
|
|
334
|
+
] }) : /* @__PURE__ */ r(h, { children: [
|
|
335
|
+
/* @__PURE__ */ e(
|
|
336
|
+
p,
|
|
337
|
+
{
|
|
338
|
+
variant: "subtitle2",
|
|
339
|
+
sx: {
|
|
340
|
+
fontWeight: "normal",
|
|
341
|
+
lineHeight: "14px",
|
|
342
|
+
fontSize: "13px"
|
|
343
|
+
},
|
|
344
|
+
children: l.title
|
|
345
|
+
}
|
|
346
|
+
),
|
|
347
|
+
/* @__PURE__ */ e(
|
|
348
|
+
p,
|
|
349
|
+
{
|
|
350
|
+
variant: "caption",
|
|
351
|
+
sx: { color: "text.secondary", lineHeight: "12px" },
|
|
352
|
+
children: /* @__PURE__ */ e("small", { children: l.subTitle })
|
|
353
|
+
}
|
|
354
|
+
)
|
|
355
|
+
] }),
|
|
356
|
+
/* @__PURE__ */ e(_, { children: a ? /* @__PURE__ */ r(h, { children: [
|
|
357
|
+
/* @__PURE__ */ e(
|
|
358
|
+
n,
|
|
359
|
+
{
|
|
360
|
+
animation: "wave",
|
|
361
|
+
variant: "circular",
|
|
362
|
+
width: 32,
|
|
363
|
+
height: 32
|
|
364
|
+
}
|
|
365
|
+
),
|
|
366
|
+
/* @__PURE__ */ e(
|
|
367
|
+
n,
|
|
368
|
+
{
|
|
369
|
+
animation: "wave",
|
|
370
|
+
variant: "circular",
|
|
371
|
+
width: 32,
|
|
372
|
+
height: 32
|
|
373
|
+
}
|
|
374
|
+
),
|
|
375
|
+
/* @__PURE__ */ e(
|
|
376
|
+
n,
|
|
377
|
+
{
|
|
378
|
+
animation: "wave",
|
|
379
|
+
variant: "circular",
|
|
380
|
+
width: 32,
|
|
381
|
+
height: 32
|
|
382
|
+
}
|
|
383
|
+
)
|
|
384
|
+
] }) : d }),
|
|
385
|
+
a ? /* @__PURE__ */ e(
|
|
386
|
+
n,
|
|
279
387
|
{
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
388
|
+
animation: "wave",
|
|
389
|
+
height: 10,
|
|
390
|
+
width: "40%",
|
|
391
|
+
sx: { mb: 0.05, mt: 0.35 }
|
|
283
392
|
}
|
|
284
|
-
)
|
|
285
|
-
|
|
286
|
-
/* @__PURE__ */ o(
|
|
287
|
-
d,
|
|
393
|
+
) : /* @__PURE__ */ e(
|
|
394
|
+
p,
|
|
288
395
|
{
|
|
289
396
|
variant: "caption",
|
|
290
397
|
sx: { color: "text.secondary", lineHeight: "12px" },
|
|
291
|
-
children: /* @__PURE__ */
|
|
398
|
+
children: /* @__PURE__ */ e("small", { children: m })
|
|
292
399
|
}
|
|
293
400
|
),
|
|
294
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ e(g, { display: "flex", mt: 1, width: "100%", children: a ? /* @__PURE__ */ e(
|
|
402
|
+
n,
|
|
403
|
+
{
|
|
404
|
+
variant: "rounded",
|
|
405
|
+
animation: "wave",
|
|
406
|
+
height: 36,
|
|
407
|
+
width: "100%",
|
|
408
|
+
sx: { borderRadius: (w) => w.shape.borderRadius }
|
|
409
|
+
}
|
|
410
|
+
) : f })
|
|
295
411
|
] })
|
|
296
412
|
] })
|
|
297
|
-
] }) : /* @__PURE__ */
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
|
|
302
|
-
|
|
413
|
+
] }) : /* @__PURE__ */ r(L, { children: [
|
|
414
|
+
a ? /* @__PURE__ */ e(n, { sx: { height: 172 }, animation: "wave", variant: "rectangular" }) : /* @__PURE__ */ e(b, { component: "img", alt: t, height: "172", image: s }),
|
|
415
|
+
/* @__PURE__ */ e(M, { children: a ? /* @__PURE__ */ r(h, { children: [
|
|
416
|
+
/* @__PURE__ */ e(
|
|
417
|
+
n,
|
|
418
|
+
{
|
|
419
|
+
animation: "wave",
|
|
420
|
+
height: 10,
|
|
421
|
+
style: { marginBottom: 16, marginTop: 10 }
|
|
422
|
+
}
|
|
423
|
+
),
|
|
424
|
+
/* @__PURE__ */ e(
|
|
425
|
+
n,
|
|
426
|
+
{
|
|
427
|
+
animation: "wave",
|
|
428
|
+
height: 10,
|
|
429
|
+
style: { marginBottom: 6 }
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
/* @__PURE__ */ e(
|
|
433
|
+
n,
|
|
434
|
+
{
|
|
435
|
+
animation: "wave",
|
|
436
|
+
height: 10,
|
|
437
|
+
width: "80%",
|
|
438
|
+
style: { marginBottom: 8 }
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
] }) : /* @__PURE__ */ r(h, { children: [
|
|
442
|
+
/* @__PURE__ */ e(p, { gutterBottom: !0, variant: "subtitle1", component: "h3", noWrap: !0, children: t }),
|
|
443
|
+
/* @__PURE__ */ e(
|
|
444
|
+
p,
|
|
303
445
|
{
|
|
304
446
|
variant: "caption",
|
|
305
447
|
component: "p",
|
|
@@ -312,24 +454,44 @@ const ne = ({
|
|
|
312
454
|
WebkitBoxOrient: "vertical",
|
|
313
455
|
lineHeight: "16px"
|
|
314
456
|
},
|
|
315
|
-
children: /* @__PURE__ */
|
|
457
|
+
children: /* @__PURE__ */ e("small", { children: o })
|
|
316
458
|
}
|
|
317
459
|
)
|
|
318
|
-
] }),
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
|
|
460
|
+
] }) }),
|
|
461
|
+
/* @__PURE__ */ r(
|
|
462
|
+
E,
|
|
321
463
|
{
|
|
322
464
|
sx: {
|
|
323
465
|
display: "flex",
|
|
324
466
|
justifyContent: "space-between",
|
|
325
|
-
p: (
|
|
467
|
+
p: (w) => w.spacing(2)
|
|
326
468
|
},
|
|
327
469
|
children: [
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
470
|
+
/* @__PURE__ */ r(g, { display: "flex", justifyItems: "center", flex: 1, children: [
|
|
471
|
+
a ? /* @__PURE__ */ e(
|
|
472
|
+
n,
|
|
473
|
+
{
|
|
474
|
+
animation: "wave",
|
|
475
|
+
variant: "circular",
|
|
476
|
+
width: 29,
|
|
477
|
+
height: 29,
|
|
478
|
+
sx: { mb: 0.6 }
|
|
479
|
+
}
|
|
480
|
+
) : /* @__PURE__ */ e(C, { src: l.image, sx: { width: 29, height: 29 } }),
|
|
481
|
+
/* @__PURE__ */ e(g, { display: "flex", flexDirection: "column", ml: 1, flex: 1, children: a ? /* @__PURE__ */ r(h, { children: [
|
|
482
|
+
/* @__PURE__ */ e(
|
|
483
|
+
n,
|
|
484
|
+
{
|
|
485
|
+
animation: "wave",
|
|
486
|
+
height: 10,
|
|
487
|
+
style: { marginBottom: 2, marginTop: 3 },
|
|
488
|
+
width: "40%"
|
|
489
|
+
}
|
|
490
|
+
),
|
|
491
|
+
/* @__PURE__ */ e(n, { animation: "wave", height: 10, width: "60%" })
|
|
492
|
+
] }) : /* @__PURE__ */ r(h, { children: [
|
|
493
|
+
/* @__PURE__ */ e(
|
|
494
|
+
p,
|
|
333
495
|
{
|
|
334
496
|
variant: "subtitle2",
|
|
335
497
|
sx: {
|
|
@@ -338,26 +500,26 @@ const ne = ({
|
|
|
338
500
|
fontSize: "13px"
|
|
339
501
|
},
|
|
340
502
|
noWrap: !0,
|
|
341
|
-
children:
|
|
503
|
+
children: l.title
|
|
342
504
|
}
|
|
343
505
|
),
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
|
|
506
|
+
/* @__PURE__ */ e(
|
|
507
|
+
p,
|
|
346
508
|
{
|
|
347
509
|
variant: "caption",
|
|
348
510
|
sx: { color: "text.secondary" },
|
|
349
511
|
noWrap: !0,
|
|
350
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ e("small", { children: l.subTitle })
|
|
351
513
|
}
|
|
352
514
|
)
|
|
353
|
-
] })
|
|
515
|
+
] }) })
|
|
354
516
|
] }),
|
|
355
|
-
/* @__PURE__ */
|
|
517
|
+
!a && /* @__PURE__ */ e(g, { display: "flex", children: f })
|
|
356
518
|
]
|
|
357
519
|
}
|
|
358
520
|
),
|
|
359
|
-
a !== void 0 && /* @__PURE__ */
|
|
521
|
+
a === !1 && d !== void 0 && /* @__PURE__ */ e(U, { className: "extra-actions", children: d })
|
|
360
522
|
] });
|
|
361
523
|
export {
|
|
362
|
-
|
|
524
|
+
re as Card
|
|
363
525
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import f from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useForm as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import M from "lodash";
|
|
4
|
+
import { useForm as P, Controller as l } from "react-hook-form";
|
|
5
|
+
import O from "./components/property-list/index.js";
|
|
6
|
+
import j from "./components/recognition-property-list/index.js";
|
|
7
7
|
import { CatalogueInstanceSelector as K } from "./components/catalogue-instance-selector/index.js";
|
|
8
8
|
import { getNestedChildrenFromMap as L } from "../../utils/ontology.js";
|
|
9
9
|
import { Container as _ } from "../container/index.js";
|
|
@@ -14,16 +14,16 @@ import { T as m } from "../../TextField-D87qTh1k.js";
|
|
|
14
14
|
import { F as g } from "../../property-list-form-BfP9gzSo.js";
|
|
15
15
|
import { F as d } from "../../FormControlLabel-D9KFjcIx.js";
|
|
16
16
|
import { C as c } from "../../Checkbox-qy3cjvnb.js";
|
|
17
|
-
import { B as
|
|
18
|
-
function D(e,
|
|
17
|
+
import { B as p } from "../../Box-BPyg-Ybm.js";
|
|
18
|
+
function D(e, x) {
|
|
19
19
|
const {
|
|
20
20
|
register: s,
|
|
21
21
|
handleSubmit: T,
|
|
22
22
|
control: i,
|
|
23
|
-
formState: { errors:
|
|
23
|
+
formState: { errors: C },
|
|
24
24
|
getValues: h,
|
|
25
|
-
reset:
|
|
26
|
-
} =
|
|
25
|
+
reset: v
|
|
26
|
+
} = P({
|
|
27
27
|
defaultValues: e.defaultValues
|
|
28
28
|
}), [V, F] = f.useState([]), I = (n) => {
|
|
29
29
|
const a = new Map(n);
|
|
@@ -44,9 +44,9 @@ function D(e, p) {
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
return f.useImperativeHandle(
|
|
47
|
+
return f.useImperativeHandle(x, () => ({
|
|
48
48
|
resetForm() {
|
|
49
|
-
|
|
49
|
+
v();
|
|
50
50
|
}
|
|
51
51
|
})), f.useEffect(() => (S(), () => {
|
|
52
52
|
}), [e.mappedTemplates]), /* @__PURE__ */ t(_, { disableHeader: !0, children: /* @__PURE__ */ u("form", { onSubmit: (n, a) => {
|
|
@@ -62,7 +62,7 @@ function D(e, p) {
|
|
|
62
62
|
fullWidth: !0,
|
|
63
63
|
sx: { mb: 2 },
|
|
64
64
|
...s("name", { required: !0 }),
|
|
65
|
-
...
|
|
65
|
+
...C.name && {
|
|
66
66
|
helperText: "This field is required!",
|
|
67
67
|
error: !0
|
|
68
68
|
}
|
|
@@ -157,13 +157,16 @@ function D(e, p) {
|
|
|
157
157
|
}), e.onAgentSelect && e.onAgentSelect(a);
|
|
158
158
|
},
|
|
159
159
|
onSearchSubmit: e.onCatalogueInstanceSearchSubmit,
|
|
160
|
-
openMapping: e.openMapping,
|
|
161
|
-
mappingData: e.mappingData,
|
|
162
|
-
objectTemplate: e.objectTemplate,
|
|
163
|
-
mapboxAccessToken: e.mapboxAccessToken,
|
|
164
|
-
onMappingSubmit: e.onMappingSubmit
|
|
165
|
-
|
|
166
|
-
|
|
160
|
+
openMapping: e.openMapping ?? !1,
|
|
161
|
+
mappingData: e.mappingData ?? [],
|
|
162
|
+
objectTemplate: e.objectTemplate ?? {},
|
|
163
|
+
mapboxAccessToken: e.mapboxAccessToken ?? "",
|
|
164
|
+
onMappingSubmit: e.onMappingSubmit ? e.onMappingSubmit : () => {
|
|
165
|
+
},
|
|
166
|
+
onMappingOpen: e.onMappingOpen ? e.onMappingOpen : () => {
|
|
167
|
+
},
|
|
168
|
+
onMappingClose: e.onMappingClose ? e.onMappingClose : () => {
|
|
169
|
+
}
|
|
167
170
|
}
|
|
168
171
|
)
|
|
169
172
|
}
|
|
@@ -267,11 +270,11 @@ function D(e, p) {
|
|
|
267
270
|
name: "properties",
|
|
268
271
|
control: i,
|
|
269
272
|
render: ({ field: { value: n, onChange: a } }) => /* @__PURE__ */ t(
|
|
270
|
-
|
|
273
|
+
O,
|
|
271
274
|
{
|
|
272
275
|
list: n || [],
|
|
273
276
|
inputVariant: e.inputVariant,
|
|
274
|
-
templateId:
|
|
277
|
+
templateId: M.get(e.defaultValues, "id"),
|
|
275
278
|
disablePropertyId: e.disablePropertyId,
|
|
276
279
|
onChange: a
|
|
277
280
|
}
|
|
@@ -284,7 +287,7 @@ function D(e, p) {
|
|
|
284
287
|
name: "recognitionPropertyList",
|
|
285
288
|
control: i,
|
|
286
289
|
render: ({ field: { value: n, onChange: a } }) => /* @__PURE__ */ t(
|
|
287
|
-
|
|
290
|
+
j,
|
|
288
291
|
{
|
|
289
292
|
list: n || [],
|
|
290
293
|
getFormValues: h,
|
|
@@ -293,7 +296,7 @@ function D(e, p) {
|
|
|
293
296
|
)
|
|
294
297
|
}
|
|
295
298
|
),
|
|
296
|
-
/* @__PURE__ */ u(
|
|
299
|
+
/* @__PURE__ */ u(p, { display: "flex", justifyContent: "space-between", mt: 3, children: [
|
|
297
300
|
/* @__PURE__ */ t(
|
|
298
301
|
b,
|
|
299
302
|
{
|
|
@@ -305,7 +308,7 @@ function D(e, p) {
|
|
|
305
308
|
children: "Cancel"
|
|
306
309
|
}
|
|
307
310
|
),
|
|
308
|
-
/* @__PURE__ */ t(
|
|
311
|
+
/* @__PURE__ */ t(p, { children: e.saveButtons ? e.saveButtons.map((n, a) => /* @__PURE__ */ t(
|
|
309
312
|
b,
|
|
310
313
|
{
|
|
311
314
|
type: "submit",
|
package/dist/main.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ declare interface CardProps {
|
|
|
63
63
|
* Only available on landscape
|
|
64
64
|
*/
|
|
65
65
|
stats?: default_2.ReactNode;
|
|
66
|
+
loading?: boolean;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
export declare const CollapsibleCard: FC<Props_2>;
|
|
@@ -785,15 +786,15 @@ K extends
|
|
|
785
786
|
onAgentSelect?(selectedIds: number[]): void;
|
|
786
787
|
|
|
787
788
|
//Props for mapping
|
|
788
|
-
openMapping
|
|
789
|
-
mappingData
|
|
790
|
-
objectTemplate
|
|
789
|
+
openMapping?: boolean;
|
|
790
|
+
mappingData?: POLICY.InstancePolicyMapping[];
|
|
791
|
+
objectTemplate?: ONTOLOGY.Object;
|
|
791
792
|
selectedInstances?: INSTANCE.Agent[];
|
|
792
|
-
mapboxAccessToken
|
|
793
|
-
onMappingSubmit(data: POLICY.InstancePolicyMapping[]): void;
|
|
794
|
-
onMappingOpen(event: MouseEvent<HTMLButtonElement>): void;
|
|
795
|
-
onMappingClose(): void;
|
|
796
|
-
onCatalogueInstanceSearchSubmit(value?: string): void;
|
|
793
|
+
mapboxAccessToken?: string;
|
|
794
|
+
onMappingSubmit?(data: POLICY.InstancePolicyMapping[]): void;
|
|
795
|
+
onMappingOpen?(event: MouseEvent<HTMLButtonElement>): void;
|
|
796
|
+
onMappingClose?(): void;
|
|
797
|
+
onCatalogueInstanceSearchSubmit?(value?: string): void;
|
|
797
798
|
}
|
|
798
799
|
|
|
799
800
|
export declare const TemplatePropertyFilters: FC<Props_10>;
|