@hortiview/default-components 1.2.1 → 1.4.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.
- package/README.md +12 -0
- package/dist/{HealthCheckFailed-xzjSWKc-.js → HealthCheckFailed-CqLYAwpc.js} +13 -12
- package/dist/{Iconify-B64-1COA.js → Iconify-Cjdr-ccS.js} +11 -12
- package/dist/{LoadingSpinner-AfsNRWJD.js → LoadingSpinner-FRQEZvxs.js} +25 -24
- package/dist/OfflineView-HbuDPpQL-kqlzfoUS.js +46 -0
- package/dist/assets/DefaultFormSelect.css +1 -0
- package/dist/assets/GenericTable.css +1 -1
- package/dist/assets/OfflineView-HbuDPpQL.css +1 -0
- package/dist/{component-DsB0poTj-QmhaJp70.js → component-DsB0poTj-BDGiEcbP.js} +1 -1
- package/dist/components/DefaultFormNumber/DefaultFormNumber.js +239 -251
- package/dist/components/DefaultFormSelect/DefaultFormSelect.d.ts +14 -0
- package/dist/components/DefaultFormSelect/DefaultFormSelect.js +189 -0
- package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +2 -2
- package/dist/components/GenericTable/GenericTable.js +9938 -23557
- package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
- package/dist/components/HealthChecks/DefaultHealthCheck.js +2 -2
- package/dist/components/HealthChecks/IotServiceHealthCheck.js +2 -2
- package/dist/components/HealthChecks/PlatformHealthCheck.js +2 -2
- package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +2 -2
- package/dist/components/OfflineView/OfflineView.d.ts +4 -0
- package/dist/components/OfflineView/OfflineView.js +18 -0
- package/dist/{index.es-D-CKRzIB-DgKmS30c.js → index.es--yyG47az-DBKBm3yD.js} +316 -450
- package/dist/index.es-Bx1E5MPK-CaV59rEP.js +344 -0
- package/dist/index.es-CzUKBF7E-C0X-mcdY.js +13567 -0
- package/dist/index.es-D-ph6ImM-CWxTa_iD.js +63 -0
- package/dist/index.es-DDo_AHL0-VqD9ikmU.js +1033 -0
- package/dist/index.es-Kg9soDed-BkTwDySy.js +440 -0
- package/dist/index.es-U5-b20Gv-ChQ_O81C.js +1010 -0
- package/dist/locales/en-US.js +10 -6
- package/dist/locales/en-US.json.d.ts +10 -0
- package/dist/locales/es-MX.js +11 -7
- package/dist/locales/es-MX.json.d.ts +10 -0
- package/dist/locales/tr-TR.js +15 -11
- package/dist/locales/tr-TR.json.d.ts +10 -0
- package/dist/main.d.ts +4 -1
- package/dist/main.js +22 -18
- package/dist/{index.es-25EARqhH-LGdAiMHi.js → omit-1Eom1PmQ-BLY9iMqj.js} +748 -1314
- package/dist/useHelperText-DD9_Dtkk.js +21 -0
- package/dist/useTranslation-B_ODv8uN.js +4306 -0
- package/package.json +3 -3
- package/dist/index.es-6TJ1S8Jr-CxeupS6f.js +0 -1806
- package/dist/useTranslation-DaMPyebp.js +0 -4223
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as c, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import t, { useState as V, useEffect as k, useMemo as K, forwardRef as q, useRef as O, useImperativeHandle as
|
|
4
|
-
import { f as B, n as
|
|
5
|
-
import { n as
|
|
1
|
+
import { jsx as c, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import { G as j, c as M, I, h as P, p as W, a as F, f as H, j as l, m as U } from "./useTranslation-B_ODv8uN.js";
|
|
3
|
+
import t, { useState as V, useEffect as k, useMemo as K, forwardRef as q, useRef as O, useImperativeHandle as G, useCallback as Y } from "react";
|
|
4
|
+
import { f as B, n as Z } from "./index.es--yyG47az-DBKBm3yD.js";
|
|
5
|
+
import { n as J } from "./index.es-D-ph6ImM-CWxTa_iD.js";
|
|
6
|
+
import { n as Q } from "./Iconify-Cjdr-ccS.js";
|
|
6
7
|
import './assets/LoadingSpinner.css';const X = "_loadingBigOverlay_7dxo1_1", ee = "_bigLoadSpinnerCard_7dxo1_12", re = "_bigLoadSpinnerCardText_7dxo1_27", te = "_logo_7dxo1_33", x = {
|
|
7
8
|
loadingBigOverlay: X,
|
|
8
9
|
bigLoadSpinnerCard: ee,
|
|
9
10
|
bigLoadSpinnerCardText: re,
|
|
10
11
|
logo: te
|
|
11
|
-
}, se = ({ text: a }) => /* @__PURE__ */
|
|
12
|
+
}, se = ({ text: a }) => /* @__PURE__ */ R("div", { className: x.bigLoadSpinnerCard, role: "progressbar", "data-testid": "loading-spinner", children: [
|
|
12
13
|
/* @__PURE__ */ c(Q, { icon: "hortiview", className: x.logo, "data-testid": "logo-icon" }),
|
|
13
14
|
/* @__PURE__ */ c(B, { tag: "p", bold: !0, level: 1, className: x.bigLoadSpinnerCardText, children: a })
|
|
14
15
|
] }), ae = (a) => /* @__PURE__ */ c("div", { "data-testid": "big-loading-spinner", className: x.loadingBigOverlay, children: /* @__PURE__ */ c(se, { ...a }) });
|
|
@@ -44,12 +45,12 @@ var p = {
|
|
|
44
45
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
45
46
|
* THE SOFTWARE.
|
|
46
47
|
*/
|
|
47
|
-
var
|
|
48
|
+
var T = (
|
|
48
49
|
/** @class */
|
|
49
50
|
function(a) {
|
|
50
51
|
P(e, a);
|
|
51
52
|
function e(r) {
|
|
52
|
-
return a.call(this,
|
|
53
|
+
return a.call(this, W(W({}, e.defaultAdapter), r)) || this;
|
|
53
54
|
}
|
|
54
55
|
return Object.defineProperty(e, "cssClasses", {
|
|
55
56
|
get: function() {
|
|
@@ -106,7 +107,7 @@ var R = (
|
|
|
106
107
|
}, e.prototype.isClosed = function() {
|
|
107
108
|
return this.closed;
|
|
108
109
|
}, e;
|
|
109
|
-
}(
|
|
110
|
+
}(F)
|
|
110
111
|
);
|
|
111
112
|
/**
|
|
112
113
|
* @license
|
|
@@ -138,7 +139,7 @@ var ie = (
|
|
|
138
139
|
return a !== null && a.apply(this, arguments) || this;
|
|
139
140
|
}
|
|
140
141
|
return e.prototype.initialize = function() {
|
|
141
|
-
this.determinateCircle_ = this.root.querySelector(
|
|
142
|
+
this.determinateCircle_ = this.root.querySelector(T.strings.DETERMINATE_CIRCLE_SELECTOR);
|
|
142
143
|
}, e.attachTo = function(r) {
|
|
143
144
|
return new e(r);
|
|
144
145
|
}, Object.defineProperty(e.prototype, "determinate", {
|
|
@@ -200,9 +201,9 @@ var ie = (
|
|
|
200
201
|
return r.determinateCircle_.setAttribute(s, i);
|
|
201
202
|
}
|
|
202
203
|
};
|
|
203
|
-
return new
|
|
204
|
+
return new T(u);
|
|
204
205
|
}, e;
|
|
205
|
-
}(
|
|
206
|
+
}(H)
|
|
206
207
|
);
|
|
207
208
|
const oe = {
|
|
208
209
|
/**
|
|
@@ -242,7 +243,7 @@ const oe = {
|
|
|
242
243
|
*
|
|
243
244
|
* Defaults to **undefined**.
|
|
244
245
|
*/
|
|
245
|
-
size:
|
|
246
|
+
size: U(l.oneOf(["sm", "md", "lg"]), "CircularProgress", "Renamed, see indicatorSize instead."),
|
|
246
247
|
/**
|
|
247
248
|
* Color of the indicator stroke with 'primary' or 'secondary' theme color.
|
|
248
249
|
*
|
|
@@ -276,10 +277,10 @@ const oe = {
|
|
|
276
277
|
variant: h,
|
|
277
278
|
...E
|
|
278
279
|
} = a, _ = O(), g = O();
|
|
279
|
-
|
|
280
|
+
G(e, () => _.current, []), k(() => (g.current = ie.attachTo(_.current), () => {
|
|
280
281
|
g.current.destroy();
|
|
281
282
|
}), []), k(() => {
|
|
282
|
-
(h === "determinate" && i < 0 || i > 1) &&
|
|
283
|
+
(h === "determinate" && i < 0 || i > 1) && j("CircularProgress: `progress` must be between 0 and 1."), g.current.determinate = h === "determinate", g.current.progress = i;
|
|
283
284
|
}, [i, h]);
|
|
284
285
|
const $ = () => {
|
|
285
286
|
switch (b) {
|
|
@@ -366,7 +367,7 @@ const oe = {
|
|
|
366
367
|
strokeDashArray: C,
|
|
367
368
|
strokeDashoffset: z,
|
|
368
369
|
halfStrokeDashoffset: D
|
|
369
|
-
} = $(), S =
|
|
370
|
+
} = $(), S = Y(() => /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
370
371
|
className: "mdc-circular-progress__circle-clipper mdc-circular-progress__circle-left"
|
|
371
372
|
}, /* @__PURE__ */ t.createElement("svg", {
|
|
372
373
|
className: "mdc-circular-progress__indeterminate-circle-graphic",
|
|
@@ -406,9 +407,9 @@ const oe = {
|
|
|
406
407
|
strokeDashoffset: D,
|
|
407
408
|
strokeWidth: v
|
|
408
409
|
})))), [o, D, f, C, v, w, n]), L = m === "two-color" || m === "two-color-variant";
|
|
409
|
-
return /* @__PURE__ */ t.createElement("div",
|
|
410
|
+
return /* @__PURE__ */ t.createElement("div", M({
|
|
410
411
|
ref: _,
|
|
411
|
-
className:
|
|
412
|
+
className: I("lmnt", "mdc-circular-progress", h === "indeterminate" && "mdc-circular-progress--indeterminate", !s && "mdc-circular-progress--closed", m && `lmnt-circular-progress--${m}`, u),
|
|
412
413
|
style: {
|
|
413
414
|
width: N,
|
|
414
415
|
height: N
|
|
@@ -441,7 +442,7 @@ const oe = {
|
|
|
441
442
|
}))), /* @__PURE__ */ t.createElement("div", {
|
|
442
443
|
className: "mdc-circular-progress__indeterminate-container"
|
|
443
444
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
444
|
-
className:
|
|
445
|
+
className: I("mdc-circular-progress__spinner-layer", L && "mdc-circular-progress__color-1")
|
|
445
446
|
}, S()), L && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
446
447
|
className: "mdc-circular-progress__spinner-layer mdc-circular-progress__color-2"
|
|
447
448
|
}, S()), /* @__PURE__ */ t.createElement("div", {
|
|
@@ -455,7 +456,7 @@ A.propTypes = oe;
|
|
|
455
456
|
A.defaultProps = ne;
|
|
456
457
|
const ce = "_loadingSpinnerContainer_1f3ss_1", le = {
|
|
457
458
|
loadingSpinnerContainer: ce
|
|
458
|
-
},
|
|
459
|
+
}, fe = ({
|
|
459
460
|
size: a,
|
|
460
461
|
center: e = !1,
|
|
461
462
|
text: r,
|
|
@@ -482,13 +483,13 @@ const ce = "_loadingSpinnerContainer_1f3ss_1", le = {
|
|
|
482
483
|
indicatorSize: a ?? "md"
|
|
483
484
|
}
|
|
484
485
|
) : /* @__PURE__ */ c(
|
|
485
|
-
|
|
486
|
+
J,
|
|
486
487
|
{
|
|
487
488
|
variant: "standard",
|
|
488
489
|
style: { textAlign: "center" },
|
|
489
490
|
className: e ? le.loadingSpinnerContainer : "",
|
|
490
|
-
children: /* @__PURE__ */
|
|
491
|
-
|
|
491
|
+
children: /* @__PURE__ */ R(
|
|
492
|
+
Z,
|
|
492
493
|
{
|
|
493
494
|
direction: u === "right" ? "horizontal" : "vertical",
|
|
494
495
|
gap: "dense",
|
|
@@ -511,5 +512,5 @@ const ce = "_loadingSpinnerContainer_1f3ss_1", le = {
|
|
|
511
512
|
);
|
|
512
513
|
};
|
|
513
514
|
export {
|
|
514
|
-
|
|
515
|
+
fe as p
|
|
515
516
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { n as o, h as m, C as h, f as p } from "./index.es--yyG47az-DBKBm3yD.js";
|
|
3
|
+
import { n as v } from "./Iconify-Cjdr-ccS.js";
|
|
4
|
+
import { O as w } from "./index.es-Bx1E5MPK-CaV59rEP.js";
|
|
5
|
+
import './assets/OfflineView-HbuDPpQL.css';const y = "_gap_18we6_1", W = "_container_18we6_5", x = "_bgWhite_18we6_11", G = "_bgGrey_18we6_16", N = "_subtitle_18we6_21", i = {
|
|
6
|
+
gap: y,
|
|
7
|
+
container: W,
|
|
8
|
+
bgWhite: x,
|
|
9
|
+
bgGrey: G,
|
|
10
|
+
subtitle: N
|
|
11
|
+
}, A = ({
|
|
12
|
+
title: t = "You’re currently offline",
|
|
13
|
+
subtitle: l = "This feature is unavailable until you reconnect",
|
|
14
|
+
icon: c = "cloud_off",
|
|
15
|
+
size: s = "large",
|
|
16
|
+
variant: d = "basic",
|
|
17
|
+
"data-testid": u = "offline-view-container",
|
|
18
|
+
buttonLabel: n,
|
|
19
|
+
fullWidth: f = !1,
|
|
20
|
+
className: b,
|
|
21
|
+
onClick: _
|
|
22
|
+
}) => {
|
|
23
|
+
const r = s === "large", g = d === "filled";
|
|
24
|
+
return /* @__PURE__ */ a(
|
|
25
|
+
o,
|
|
26
|
+
{
|
|
27
|
+
className: `${b} ${i.container} ${g ? i.bgGrey : i.bgWhite}`,
|
|
28
|
+
gap: "standard",
|
|
29
|
+
direction: "vertical",
|
|
30
|
+
"data-testid": u,
|
|
31
|
+
secondaryAlign: "center",
|
|
32
|
+
fullWidth: f,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ a(o, { direction: "vertical", secondaryAlign: "center", className: i.gap, children: [
|
|
35
|
+
/* @__PURE__ */ e(v, { icon: c, iconSize: r ? "xlarge" : "medium" }),
|
|
36
|
+
r ? /* @__PURE__ */ e(m, { level: 6, children: t }) : /* @__PURE__ */ e(h, { level: 1, bold: !0, children: t })
|
|
37
|
+
] }),
|
|
38
|
+
l && /* @__PURE__ */ e(p, { className: i.subtitle, level: 2, children: l }),
|
|
39
|
+
n && /* @__PURE__ */ e(w, { "data-testid": "offline-view-action-button", label: n, onClick: _ })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
A as z
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._customPortal_8wq49_1>div[class*=lmnt__menu-portal]{transition:none}._customSelect_8wq49_7 div[class*=lmnt__menu-list--is-multi]{max-height:none}._invalidHelperText_1qcz0_1+*[class*=mdc-select-helper-text]{color:var(--lmnt-theme-danger)!important}._invalidBorder_1qcz0_5 *[class*=mdc-notched-outline]{border-color:var(--lmnt-theme-danger)!important}._invalidPlaceholder_1qcz0_9 *[class*=lmnt-select-label]{color:var(--lmnt-theme-danger)!important}._invalidDropdownIcon_1qcz0_13 *[class*=mdc-select__dropdown-icon]{fill:var(--lmnt-theme-danger)!important}._formSelectContainer_1qcz0_18{display:flex;flex-wrap:wrap;width:100%}._formSelectContainer_1qcz0_18 *[class*=mdc-select-helper-text]{color:var(--lmnt-helper-text-color)}._formSelectContainer_1qcz0_18 *[class*=lmnt__multi-value__label]{overflow:visible}._formSelect_1qcz0_18 *[class*=lmnt-select-menu]{z-index:2001}._multiText_1qcz0_40 *[class*=lmnt-select-value-container]{white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis;display:block!important;padding:1.125rem 0!important}._tooltip_1qcz0_49{z-index:42}._disabled_1qcz0_54+*[class*=mdc-select-helper-text]{color:var(--lmnt-theme-on-surface-disabled)}[id*=select-container][class*=top] [class*=mdc-menu-surface--open]{bottom:0}[id*=select-container][class*=bottom] [class*=mdc-menu-surface--open]{top:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._truncate_wgwcv_1{display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%;word-break:break-all}._truncate_wgwcv_1 *:not([class*=lmnt-icon]){overflow:hidden;text-overflow:ellipsis;word-break:break-all}.
|
|
1
|
+
._truncate_wgwcv_1{display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%;word-break:break-all}._truncate_wgwcv_1 *:not([class*=lmnt-icon]){overflow:hidden;text-overflow:ellipsis;word-break:break-all}._menu_1xwk3_1{width:15.875rem}._icon_1xwk3_5{color:var(--lmnt-theme-on-secondary-inactive)}._listItem_1xwk3_9 [class*=mdc-list-item__start]{color:var(--lmnt-theme-on-secondary-inactive);align-self:center!important;margin:0 1rem!important}._listItem_1xwk3_9 [class*=mdc-list-item__end]{color:var(--lmnt-theme-on-secondary-inactive)}._offlineViewMargin_1xwk3_19{margin:.5rem}._cardTitle_ny9m0_1{padding:.5rem!important}._cardBody_ny9m0_5{padding:.25rem .5rem!important;overflow:hidden!important}._cardContent_ny9m0_10{border-radius:.5rem}._row_ny9m0_14{padding:.25rem 0}._font_ny9m0_18{font-weight:400;align-self:end}._fontHeader_ny9m0_23{text-align:right}._title_ny9m0_27{display:inline-block;width:65vw;text-wrap:nowrap}._emptyContainer_ny9m0_33{width:inherit;height:inherit}._empty_ny9m0_33{position:relative;top:50%;left:50%;transform:translate(-50%,-25%)}._topBar_1tmb3_1 [class*=lmnt-table__top-bar__title]{display:none}._filterBar_1tmb3_5{padding:1rem;width:inherit!important}._start_1tmb3_10{padding-top:0;padding-bottom:0}._emptyTable_1tmb3_15{height:16rem}[class*=mnt-pagination][class*=mdc-data-table__pagination]{border-top:1px solid var(--lmnt-theme-on-secondary-stroke)}._elevation_1tmb3_23{border-radius:.4rem;width:100%}._table_1tmb3_28,._table_1tmb3_28 [class*=mdc-data-table__table-container]{border-radius:.4rem}._noBorder_1tmb3_36{border:none}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._gap_18we6_1{gap:.125rem!important}._container_18we6_5{border-radius:.5rem;padding:2.5rem 2rem;width:auto}._bgWhite_18we6_11{background:var(--lmnt-theme-surface);color:var(--lmnt-theme-on-surface-active)}._bgGrey_18we6_16{background:var(--lmnt-theme-surface-variant);color:var(--lmnt-theme-on-surface-active)}._subtitle_18we6_21{color:var(--on-colors-on-surface-inactive-medium, #000000BA);font-weight:500}
|