@hybridcore/ui 1.4.42 → 1.5.0
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.
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as c } from "react";
|
|
3
|
+
import { IndicatorRoot as w, IndicatorBarContainer as g, IndicatorBarBackground as $, IndicatorBar as m, IndicatorMiddleContainer as N, IndicatorMiddle as P } from "./styled.js";
|
|
4
|
+
import i from "lodash";
|
|
5
|
+
const R = ({
|
|
6
|
+
value: n,
|
|
7
|
+
positiveBarColor: o,
|
|
8
|
+
negativeBarColor: s,
|
|
9
|
+
middleColor: e,
|
|
10
|
+
barBgColor: h,
|
|
11
|
+
showPositive: b = !0,
|
|
12
|
+
showNegative: x,
|
|
13
|
+
showMiddle: I
|
|
14
|
+
}) => {
|
|
15
|
+
const k = c(() => i.isArray(n) ? n.find((r) => r > 0) ?? 0 : n ?? 0, [n]), l = c(() => i.isArray(n) ? n.find((r) => r < 0) ?? 0 : n < 0 ? n : 0, [n]), a = (r) => {
|
|
16
|
+
let d = [];
|
|
17
|
+
const M = 100 / (r.length - 1);
|
|
18
|
+
return r.forEach((u, f) => {
|
|
19
|
+
if (f === 0) {
|
|
20
|
+
d.push(`${u} 0%`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (f === r.length - 1) {
|
|
24
|
+
d.push(`${u} 100%`);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
d.push(`${u} ${M * f}%`);
|
|
28
|
+
}), d;
|
|
29
|
+
}, y = c(() => i.isArray(o) ? `linear-gradient(45deg, ${a(o).join(", ")})` : o, [o]), A = c(() => i.isArray(s) ? `linear-gradient(45deg, ${a(s).join(", ")})` : s, [s]), j = c(() => i.isArray(e) ? `radial-gradient(circle, ${a(e).join(", ")})` : e, [e]);
|
|
30
|
+
return /* @__PURE__ */ p(w, { children: [
|
|
31
|
+
x && /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(
|
|
32
|
+
$,
|
|
33
|
+
{
|
|
34
|
+
flexDirection: "row-reverse",
|
|
35
|
+
sx: {
|
|
36
|
+
background: h
|
|
37
|
+
},
|
|
38
|
+
children: /* @__PURE__ */ t(
|
|
39
|
+
m,
|
|
40
|
+
{
|
|
41
|
+
width: `${Math.abs(l)}%`,
|
|
42
|
+
sx: {
|
|
43
|
+
background: A
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
I && /* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(P, { sx: { background: j } }) }),
|
|
50
|
+
b && /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(
|
|
51
|
+
$,
|
|
52
|
+
{
|
|
53
|
+
sx: {
|
|
54
|
+
background: h
|
|
55
|
+
},
|
|
56
|
+
children: /* @__PURE__ */ t(
|
|
57
|
+
m,
|
|
58
|
+
{
|
|
59
|
+
width: `${k}%`,
|
|
60
|
+
sx: {
|
|
61
|
+
background: y
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
) })
|
|
67
|
+
] });
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
R as LinearIndicator
|
|
71
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { styled as o, Box as r } from "@mui/material";
|
|
2
|
+
const n = o(r, {
|
|
3
|
+
name: "HCLinearIndicator",
|
|
4
|
+
// The component name
|
|
5
|
+
slot: "root"
|
|
6
|
+
// The slot name
|
|
7
|
+
})({
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
gap: 6
|
|
11
|
+
}), t = o(r, {
|
|
12
|
+
name: "HCLinearIndicator",
|
|
13
|
+
// The component name
|
|
14
|
+
slot: "barContainer"
|
|
15
|
+
// The slot name
|
|
16
|
+
})(({ theme: a }) => ({
|
|
17
|
+
display: "flex",
|
|
18
|
+
flex: 1,
|
|
19
|
+
backgroundColor: a.palette.background.default,
|
|
20
|
+
boxShadow: "inset 0px 5px 6px rgba(0,0,0,0.15)",
|
|
21
|
+
paddingTop: 7,
|
|
22
|
+
paddingBottom: 7,
|
|
23
|
+
paddingLeft: 6,
|
|
24
|
+
paddingRight: 6,
|
|
25
|
+
borderRadius: 10
|
|
26
|
+
})), i = o(r, {
|
|
27
|
+
name: "HCLinearIndicator",
|
|
28
|
+
// The component name
|
|
29
|
+
slot: "barBackground"
|
|
30
|
+
// The slot name
|
|
31
|
+
})(() => ({
|
|
32
|
+
display: "flex",
|
|
33
|
+
width: "100%",
|
|
34
|
+
background: "#ECECEC",
|
|
35
|
+
borderRadius: 10
|
|
36
|
+
})), e = o(r, {
|
|
37
|
+
name: "HCLinearIndicator",
|
|
38
|
+
// The component name
|
|
39
|
+
slot: "bar"
|
|
40
|
+
// The slot name
|
|
41
|
+
})(({ theme: a }) => ({
|
|
42
|
+
background: a.palette.primary.main,
|
|
43
|
+
height: 7,
|
|
44
|
+
borderRadius: 10
|
|
45
|
+
})), c = o(r, {
|
|
46
|
+
name: "HCLinearIndicator",
|
|
47
|
+
// The component name
|
|
48
|
+
slot: "middleContainer"
|
|
49
|
+
// The slot name
|
|
50
|
+
})(({ theme: a }) => ({
|
|
51
|
+
backgroundColor: a.palette.background.default,
|
|
52
|
+
boxShadow: "inset 0px 5px 6px rgba(0,0,0,0.15)",
|
|
53
|
+
padding: 6,
|
|
54
|
+
borderRadius: "50%"
|
|
55
|
+
})), l = o(r, {
|
|
56
|
+
name: "HCLinearIndicator",
|
|
57
|
+
// The component name
|
|
58
|
+
slot: "middle"
|
|
59
|
+
// The slot name
|
|
60
|
+
})(({ theme: a }) => ({
|
|
61
|
+
background: a.palette.primary.main,
|
|
62
|
+
height: 9,
|
|
63
|
+
width: 9,
|
|
64
|
+
borderRadius: "50%"
|
|
65
|
+
}));
|
|
66
|
+
export {
|
|
67
|
+
e as IndicatorBar,
|
|
68
|
+
i as IndicatorBarBackground,
|
|
69
|
+
t as IndicatorBarContainer,
|
|
70
|
+
l as IndicatorMiddle,
|
|
71
|
+
c as IndicatorMiddleContainer,
|
|
72
|
+
n as IndicatorRoot
|
|
73
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as d, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import s from "lodash";
|
|
3
|
-
import
|
|
3
|
+
import y from "./property.js";
|
|
4
4
|
import { Box as c, Typography as I } from "@mui/material";
|
|
5
5
|
import { Accordion as A, AccordionSummary as K, AccordionDetails as N } from "./styled.js";
|
|
6
6
|
const j = ({
|
|
@@ -10,7 +10,7 @@ const j = ({
|
|
|
10
10
|
fieldOptions: i,
|
|
11
11
|
onChange: g
|
|
12
12
|
}) => {
|
|
13
|
-
const
|
|
13
|
+
const p = (a) => (n) => {
|
|
14
14
|
if (a) {
|
|
15
15
|
let e = f.find((r) => r.templateKey === a);
|
|
16
16
|
if (e) {
|
|
@@ -48,13 +48,13 @@ const j = ({
|
|
|
48
48
|
order: i[e.propertyId].order
|
|
49
49
|
},
|
|
50
50
|
children: /* @__PURE__ */ d(
|
|
51
|
-
|
|
51
|
+
y,
|
|
52
52
|
{
|
|
53
53
|
property: e,
|
|
54
54
|
value: t,
|
|
55
55
|
size: "small",
|
|
56
56
|
variant: m,
|
|
57
|
-
onChange:
|
|
57
|
+
onChange: p(n == null ? void 0 : n.templateKey)
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
},
|
|
@@ -89,20 +89,20 @@ const j = ({
|
|
|
89
89
|
order: i[r.propertyId].order
|
|
90
90
|
},
|
|
91
91
|
children: /* @__PURE__ */ d(
|
|
92
|
-
|
|
92
|
+
y,
|
|
93
93
|
{
|
|
94
94
|
property: r,
|
|
95
95
|
value: o,
|
|
96
96
|
size: "small",
|
|
97
97
|
variant: m,
|
|
98
|
-
onChange:
|
|
98
|
+
onChange: p(e == null ? void 0 : e.templateKey)
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
},
|
|
102
102
|
t
|
|
103
103
|
);
|
|
104
104
|
}) })
|
|
105
|
-
] });
|
|
105
|
+
] }, n);
|
|
106
106
|
});
|
|
107
107
|
};
|
|
108
108
|
export {
|
package/dist/main.d.ts
CHANGED
|
@@ -433,6 +433,19 @@ export declare namespace KeyProductionUtils {
|
|
|
433
433
|
|
|
434
434
|
export declare const KeyProtectionMenu: React.FC<Props_7>;
|
|
435
435
|
|
|
436
|
+
export declare const LinearIndicator: FC<LinearIndicatorProps>;
|
|
437
|
+
|
|
438
|
+
declare interface LinearIndicatorProps {
|
|
439
|
+
value: number | number[];
|
|
440
|
+
positiveBarColor?: string | string[];
|
|
441
|
+
negativeBarColor?: string | string[];
|
|
442
|
+
middleColor?: string | string[];
|
|
443
|
+
barBgColor?: string;
|
|
444
|
+
showPositive?: boolean;
|
|
445
|
+
showNegative?: boolean;
|
|
446
|
+
showMiddle?: boolean;
|
|
447
|
+
}
|
|
448
|
+
|
|
436
449
|
export declare const Loading: React.FC<Props_8>;
|
|
437
450
|
|
|
438
451
|
export { LocalizationProvider }
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Access as Ht } from "./components/access/index.js";
|
|
2
2
|
import { alert as Ft, confirm as Ct } from "./components/confirm/index.js";
|
|
3
|
-
import { Card as
|
|
3
|
+
import { Card as jt } from "./components/card/index.js";
|
|
4
4
|
import { CardAlternate as $t } from "./components/card-alternate/index.js";
|
|
5
5
|
import { CollapsibleCard as Et } from "./components/collapsible-card/index.js";
|
|
6
6
|
import { ConditionalWrapper as zt } from "./components/conditional-wrapper/index.js";
|
|
@@ -14,20 +14,21 @@ import { InstanceForm as re } from "./components/instance-form/index.js";
|
|
|
14
14
|
import { InstanceHierarchyTable as ne } from "./components/instance-hierarchy-table/index.js";
|
|
15
15
|
import { InstanceTable as ae } from "./components/instance-table/index.js";
|
|
16
16
|
import { KeyProtectionMenu as he } from "./components/key-protection/menu.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
17
|
+
import { LinearIndicator as ue } from "./components/linear-indicator/index.js";
|
|
18
|
+
import { Loading as fe } from "./components/loading/index.js";
|
|
19
|
+
import { LocalizationProvider as le } from "@mui/x-date-pickers";
|
|
20
|
+
import { PhoneInput as ye } from "./components/phone-input/index.js";
|
|
21
|
+
import { SearchInput as De } from "./components/search-input/index.js";
|
|
22
|
+
import { SecurityLevel as ge } from "./components/data-security-selectors/security-level/index.js";
|
|
23
|
+
import { TemplateForm as Te } from "./components/template-form/index.js";
|
|
24
|
+
import { TemplateFilters as we } from "./components/template-filters/index.js";
|
|
25
|
+
import { TemplatePropertyFilters as ve } from "./components/template-property-filters/index.js";
|
|
26
|
+
import { TreeSelect as Se } from "./components/tree-select/index.js";
|
|
27
|
+
import { TreeViewFilter as be } from "./components/treeview-filter/index.js";
|
|
28
|
+
import { S as Be } from "./utils-Bq0ye5vf.js";
|
|
29
|
+
import { i as Ce } from "./index-DlnzUkwe.js";
|
|
30
|
+
import { b as je } from "./helpers-DaCoWmi2.js";
|
|
31
|
+
import { ThemeProvider as $e, createTheme as We } from "@mui/material";
|
|
31
32
|
import { a as dt } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
|
|
32
33
|
import C from "dayjs";
|
|
33
34
|
import { h as U, j as z } from "./createTheme-DrgvKMA_.js";
|
|
@@ -123,15 +124,15 @@ var et = { exports: {} };
|
|
|
123
124
|
return v || A.slice(1);
|
|
124
125
|
});
|
|
125
126
|
})).match(c), g = u.length, Y = 0; Y < g; Y += 1) {
|
|
126
|
-
var
|
|
127
|
-
u[Y] = L ? { regex: T, parser: L } :
|
|
127
|
+
var I = u[Y], O = Z[I], T = O && O[0], L = O && O[1];
|
|
128
|
+
u[Y] = L ? { regex: T, parser: L } : I.replace(/^\[|\]$/g, "");
|
|
128
129
|
}
|
|
129
130
|
return function(S) {
|
|
130
131
|
for (var w = {}, M = 0, y = 0; M < g; M += 1) {
|
|
131
132
|
var k = u[M];
|
|
132
133
|
if (typeof k == "string") y += k.length;
|
|
133
134
|
else {
|
|
134
|
-
var v = k.regex, A = k.parser,
|
|
135
|
+
var v = k.regex, A = k.parser, j = S.slice(y), F = v.exec(j)[0];
|
|
135
136
|
A.call(w, F), S = S.replace(F, "");
|
|
136
137
|
}
|
|
137
138
|
}
|
|
@@ -148,22 +149,22 @@ var et = { exports: {} };
|
|
|
148
149
|
d.p.customParseFormat = !0, r && r.parseTwoDigitYear && (i = r.parseTwoDigitYear);
|
|
149
150
|
var u = h.prototype, g = u.parse;
|
|
150
151
|
u.parse = function(Y) {
|
|
151
|
-
var
|
|
152
|
+
var I = Y.date, O = Y.utc, T = Y.args;
|
|
152
153
|
this.$u = O;
|
|
153
154
|
var L = T[1];
|
|
154
155
|
if (typeof L == "string") {
|
|
155
156
|
var S = T[2] === !0, w = T[3] === !0, M = S || w, y = T[2];
|
|
156
|
-
w && (y = T[2]), n = this.$locale(), !S && y && (n = d.Ls[y]), this.$d = function(
|
|
157
|
+
w && (y = T[2]), n = this.$locale(), !S && y && (n = d.Ls[y]), this.$d = function(j, F, b, P) {
|
|
157
158
|
try {
|
|
158
|
-
if (["x", "X"].indexOf(F) > -1) return new Date((F === "X" ? 1e3 : 1) *
|
|
159
|
-
var m = B(F)(
|
|
159
|
+
if (["x", "X"].indexOf(F) > -1) return new Date((F === "X" ? 1e3 : 1) * j);
|
|
160
|
+
var m = B(F)(j), N = m.year, $ = m.month, nt = m.day, ot = m.hours, at = m.minutes, it = m.seconds, ht = m.milliseconds, R = m.zone, X = m.week, J = /* @__PURE__ */ new Date(), _ = nt || (N || $ ? 1 : J.getDate()), V = N || J.getFullYear(), W = 0;
|
|
160
161
|
N && !$ || (W = $ > 0 ? $ - 1 : J.getMonth());
|
|
161
162
|
var E, q = ot || 0, G = at || 0, K = it || 0, Q = ht || 0;
|
|
162
163
|
return R ? new Date(Date.UTC(V, W, _, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(V, W, _, q, G, K, Q)) : (E = new Date(V, W, _, q, G, K, Q), X && (E = P(E).week(X).toDate()), E);
|
|
163
164
|
} catch {
|
|
164
165
|
return /* @__PURE__ */ new Date("");
|
|
165
166
|
}
|
|
166
|
-
}(
|
|
167
|
+
}(I, L, O, d), this.init(), y && y !== !0 && (this.$L = this.locale(y).$L), M && I != this.format(L) && (this.$d = /* @__PURE__ */ new Date("")), n = {};
|
|
167
168
|
} else if (L instanceof Array) for (var k = L.length, v = 1; v <= k; v += 1) {
|
|
168
169
|
T[1] = L[v - 1];
|
|
169
170
|
var A = d.apply(this, T);
|
|
@@ -384,9 +385,9 @@ class St {
|
|
|
384
385
|
}
|
|
385
386
|
export {
|
|
386
387
|
Ht as Access,
|
|
387
|
-
|
|
388
|
+
je as AccessUtils,
|
|
388
389
|
St as AdapterDayjs,
|
|
389
|
-
|
|
390
|
+
jt as Card,
|
|
390
391
|
$t as CardAlternate,
|
|
391
392
|
Et as CollapsibleCard,
|
|
392
393
|
zt as ConditionalWrapper,
|
|
@@ -399,21 +400,22 @@ export {
|
|
|
399
400
|
re as InstanceForm,
|
|
400
401
|
ne as InstanceHierarchyTable,
|
|
401
402
|
ae as InstanceTable,
|
|
402
|
-
|
|
403
|
+
Be as KeyProductionUtils,
|
|
403
404
|
he as KeyProtectionMenu,
|
|
404
|
-
ue as
|
|
405
|
-
fe as
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
ye as
|
|
409
|
-
De as
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
Se as
|
|
405
|
+
ue as LinearIndicator,
|
|
406
|
+
fe as Loading,
|
|
407
|
+
le as LocalizationProvider,
|
|
408
|
+
Ce as Map,
|
|
409
|
+
ye as PhoneInput,
|
|
410
|
+
De as SearchInput,
|
|
411
|
+
ge as SecurityLevel,
|
|
412
|
+
we as TemplateFilters,
|
|
413
|
+
Te as TemplateForm,
|
|
414
|
+
ve as TemplatePropertyFilters,
|
|
415
|
+
$e as ThemeProvider,
|
|
416
|
+
Se as TreeSelect,
|
|
417
|
+
be as TreeViewFilter,
|
|
416
418
|
Ft as alert,
|
|
417
419
|
Ct as confirm,
|
|
418
|
-
|
|
420
|
+
We as createTheme
|
|
419
421
|
};
|