linear-react-components-ui 1.1.26-beta.4 → 1.1.26-beta.6
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/lib/alerts/AlertProvider.js +2 -2
- package/lib/alerts/BaseAlert.js +8 -8
- package/lib/alerts/Message.js +1 -1
- package/lib/alerts/withAlert.js +1 -1
- package/lib/assets/BaseAlert.css +1 -1
- package/lib/assets/Content.css +1 -1
- package/lib/assets/DefaultFile.css +1 -1
- package/lib/assets/Drawer.css +1 -1
- package/lib/assets/index11.css +1 -1
- package/lib/assets/index5.css +1 -1
- package/lib/avatar/index.js +1 -1
- package/lib/badge/index.js +1 -1
- package/lib/buttons/ActivateButton.js +1 -1
- package/lib/buttons/AddButton.js +1 -1
- package/lib/buttons/Button.js +1 -1
- package/lib/buttons/ButtonGroups.js +1 -1
- package/lib/buttons/CancelButton.js +1 -1
- package/lib/buttons/DangerButton.js +1 -1
- package/lib/buttons/DefaultButton.js +70 -71
- package/lib/buttons/DestroyButton.js +1 -1
- package/lib/buttons/EditButton.js +1 -1
- package/lib/buttons/InactivateButton.js +1 -1
- package/lib/buttons/InfoButton.js +1 -1
- package/lib/buttons/PrimaryButton.js +1 -1
- package/lib/buttons/RestoreButton.js +1 -1
- package/lib/buttons/SaveButton.js +1 -1
- package/lib/buttons/SuccessButton.js +1 -1
- package/lib/buttons/WarningButton.js +1 -1
- package/lib/buttons/button_container/index.js +1 -1
- package/lib/buttons/split_button/index.js +1 -1
- package/lib/calendar/DangerCalendar.js +1 -1
- package/lib/calendar/InfoCalendar.js +1 -1
- package/lib/calendar/PrimaryCalendar.js +1 -1
- package/lib/calendar/SuccessCalendar.js +1 -1
- package/lib/calendar/WarningCalendar.js +1 -1
- package/lib/calendar/base/Day.js +2 -2
- package/lib/calendar/base/Month.js +1 -1
- package/lib/calendar/base/Week.js +1 -1
- package/lib/calendar/base/helpers.js +10 -10
- package/lib/calendar/base/index.js +64 -66
- package/lib/checkbox/index.js +4 -4
- package/lib/chunks/index.CM1aLH2W.js +205 -0
- package/lib/chunks/{index.Da--18GT.js → index.Df3kt2LQ.js} +179 -181
- package/lib/chunks/{jsx-runtime.gtoSnx-V.js → jsx-runtime.C7wFtzyj.js} +2 -2
- package/lib/chunks/lodash.CIAK_hAg.js +3684 -0
- package/lib/chunks/moment.DMLRxgRE.js +2589 -0
- package/lib/chunks/{tabs.BP3DB7Gx.js → tabs.D0L_nVfP.js} +95 -96
- package/lib/chunks/v1.Ds1rkxUj.js +49 -0
- package/lib/dialog/Alert.js +1 -1
- package/lib/dialog/Custom.js +3 -3
- package/lib/dialog/Error.js +1 -1
- package/lib/dialog/Information.js +1 -1
- package/lib/dialog/Question.js +36 -39
- package/lib/dialog/Warning.js +1 -1
- package/lib/dialog/base/Content.js +1 -1
- package/lib/dialog/base/Footer.js +1 -1
- package/lib/dialog/base/Header.js +2 -2
- package/lib/dialog/base/index.js +2 -2
- package/lib/dialog/form/index.js +2 -2
- package/lib/dialog/index.js +1 -1
- package/lib/dialog/wizard/index.js +4 -4
- package/lib/dialog/wizard/progressbar.js +87 -3
- package/lib/dialog/wizard/step.js +2 -2
- package/lib/drawer/Content.js +1 -1
- package/lib/drawer/Drawer.js +19 -19
- package/lib/drawer/Header.js +1 -1
- package/lib/dropdown/Popup.js +1 -1
- package/lib/dropdown/withDropdown.js +31 -31
- package/lib/fieldset/index.js +1 -1
- package/lib/form/Field.js +2 -2
- package/lib/form/FieldArray.js +2 -2
- package/lib/form/FieldNumber.js +27 -27
- package/lib/form/FieldPeriod.js +2 -2
- package/lib/form/helpers.js +1 -1
- package/lib/form/index.js +49 -49
- package/lib/form/withFieldHOC.js +1 -1
- package/lib/form/withFormSecurity.js +1 -1
- package/lib/gridlayout/GridCol.js +1 -1
- package/lib/gridlayout/GridRow.js +1 -1
- package/lib/hint/helpers.js +1 -1
- package/lib/hint/index.js +1 -1
- package/lib/icons/index.js +51 -54
- package/lib/index.js +2 -2
- package/lib/inputs/base/InputTextBase.js +112 -114
- package/lib/inputs/base/Label.js +1 -1
- package/lib/inputs/base/helpers.d.ts +3 -3
- package/lib/inputs/base/helpers.js +1 -1
- package/lib/inputs/color/index.js +2 -2
- package/lib/inputs/date/Dialog.js +2 -2
- package/lib/inputs/date/Dropdown.js +10 -14
- package/lib/inputs/date/helpers.js +7 -7
- package/lib/inputs/date/index.js +102 -114
- package/lib/inputs/errorMessage/index.js +1 -1
- package/lib/inputs/file/DefaultFile.js +43 -44
- package/lib/inputs/file/DragDropFile.js +91 -93
- package/lib/inputs/file/File.d.ts +1 -1
- package/lib/inputs/file/File.js +33 -34
- package/lib/inputs/file/FileButtonSettings.js +1 -1
- package/lib/inputs/inputHOC.js +1 -1
- package/lib/inputs/mask/BaseMask.js +8 -8
- package/lib/inputs/mask/Cnpj.js +2 -2
- package/lib/inputs/mask/Cpf.js +2 -2
- package/lib/inputs/mask/Phone.js +1 -1
- package/lib/inputs/mask/ZipCode.js +1 -1
- package/lib/inputs/mask/helpers.d.ts +33 -33
- package/lib/inputs/mask/helpers.js +44 -44
- package/lib/inputs/multiSelect/ActionButtons.js +2 -2
- package/lib/inputs/multiSelect/Dropdown.js +63 -64
- package/lib/inputs/multiSelect/helper.js +4 -7
- package/lib/inputs/multiSelect/index.js +45 -47
- package/lib/inputs/number/BaseNumber.js +1 -1
- package/lib/inputs/number/Currency.js +1 -1
- package/lib/inputs/number/Decimal.js +1 -1
- package/lib/inputs/number/index.js +10 -10
- package/lib/inputs/period/Dialog.js +2 -2
- package/lib/inputs/period/Dropdown.js +10 -15
- package/lib/inputs/period/PeriodList.js +1 -1
- package/lib/inputs/period/helper.js +3 -3
- package/lib/inputs/period/index.js +207 -223
- package/lib/inputs/search/index.js +29 -29
- package/lib/inputs/select/ActionButtons.js +1 -1
- package/lib/inputs/select/Dropdown.js +53 -53
- package/lib/inputs/select/helper.d.ts +1 -1
- package/lib/inputs/select/helper.js +39 -45
- package/lib/inputs/select/index.js +1 -1
- package/lib/inputs/select/multiple/Selecteds.js +1 -1
- package/lib/inputs/select/multiple/index.js +139 -143
- package/lib/inputs/select/simple/index.js +157 -164
- package/lib/inputs/text/index.js +1 -1
- package/lib/inputs/textarea/index.js +1 -1
- package/lib/internals/withTooltip.js +1 -1
- package/lib/labelMessages/index.js +1 -1
- package/lib/labels/DangerLabel.js +1 -1
- package/lib/labels/DefaultLabel.js +1 -1
- package/lib/labels/InfoLabel.js +1 -1
- package/lib/labels/PrimaryLabel.js +1 -1
- package/lib/labels/SuccessLabel.js +1 -1
- package/lib/labels/WarningLabel.js +1 -1
- package/lib/labels/label_container/index.js +1 -1
- package/lib/list/Header.js +1 -1
- package/lib/list/Item.js +2 -2
- package/lib/list/Separator.js +1 -1
- package/lib/list/index.js +2 -2
- package/lib/menus/float/MenuItem.js +18 -18
- package/lib/menus/float/SubMenuContainer.d.ts +10 -10
- package/lib/menus/float/index.js +2 -2
- package/lib/menus/sidenav/ExpandMenu.js +1 -1
- package/lib/menus/sidenav/MenuLink.js +1 -1
- package/lib/menus/sidenav/NavMenuGroup.js +1 -1
- package/lib/menus/sidenav/NavMenuItem.js +54 -56
- package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
- package/lib/menus/sidenav/index.js +2 -2
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +1 -1
- package/lib/menus/sidenav/popup_menu_search/index.js +2 -2
- package/lib/noPermission/index.js +1 -1
- package/lib/panel/Content.js +30 -31
- package/lib/panel/DangerPanel.js +1 -1
- package/lib/panel/Default.js +1 -1
- package/lib/panel/Header.js +1 -1
- package/lib/panel/InfoPanel.js +1 -1
- package/lib/panel/PrimaryPanel.js +1 -1
- package/lib/panel/SuccessPanel.js +1 -1
- package/lib/panel/ToolBar.js +1 -1
- package/lib/panel/WarningPanel.js +1 -1
- package/lib/permissionValidations.js +11 -11
- package/lib/popover/PopoverText.js +1 -1
- package/lib/popover/PopoverTitle.js +1 -1
- package/lib/popover/index.js +1 -1
- package/lib/progress/Bar.js +1 -1
- package/lib/progress/index.js +1 -1
- package/lib/radio/index.js +1 -1
- package/lib/shortcuts/index.js +1 -1
- package/lib/skeleton/SkeletonContainer.js +1 -1
- package/lib/skeleton/index.js +1 -1
- package/lib/spinner/SpinnerLoading.js +1 -1
- package/lib/spinner/index.js +1 -1
- package/lib/split/Split.js +1 -1
- package/lib/split/SplitSide.js +1 -1
- package/lib/table/Body.js +25 -25
- package/lib/table/Header.js +28 -31
- package/lib/table/HeaderColumn.js +2 -2
- package/lib/table/Row.js +1 -1
- package/lib/table/RowColumn.js +1 -1
- package/lib/table/index.js +2 -2
- package/lib/tabs/DropdownTabs.js +4 -4
- package/lib/tabs/Menu.js +1 -1
- package/lib/tabs/MenuTabs.js +2 -2
- package/lib/tabs/Panel.js +29 -30
- package/lib/tabs/context.js +25 -29
- package/lib/tabs/index.js +2 -2
- package/lib/textContent/index.js +2 -2
- package/lib/toolbar/ButtonBar.js +1 -1
- package/lib/toolbar/LabelBar.js +1 -1
- package/lib/toolbar/Separator.js +1 -1
- package/lib/toolbar/ToolBarGroup.js +1 -1
- package/lib/toolbar/index.js +1 -1
- package/lib/tooltip/index.js +24 -24
- package/lib/treetable/Body.js +2 -2
- package/lib/treetable/Header.js +3 -3
- package/lib/treetable/Row.js +52 -52
- package/lib/treetable/helpers.d.ts +4 -5
- package/lib/treetable/index.js +1 -1
- package/lib/treeview/Header.js +1 -1
- package/lib/treeview/Node.js +4 -4
- package/lib/treeview/index.js +28 -28
- package/lib/uitour/index.js +32 -32
- package/package.json +24 -39
- package/lib/chunks/index.CjD97zna.js +0 -206
- package/lib/chunks/index.iA-fVKOP.js +0 -89
- package/lib/chunks/v1.CDXKvGzE.js +0 -41
- /package/lib/assets/{index29.css → progressbar.css} +0 -0
package/lib/table/Header.js
CHANGED
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
import { j as n } from "../chunks/jsx-runtime.
|
|
2
|
-
import { useContext as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
if (
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
var c, l;
|
|
1
|
+
import { j as n } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
|
+
import { useContext as f, useRef as d, useEffect as h, isValidElement as l } from "react";
|
|
3
|
+
import { _ as e } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
|
+
import u from "./helpers.js";
|
|
5
|
+
const m = (s) => {
|
|
6
|
+
const r = [];
|
|
7
|
+
if (l(s) && s.props) {
|
|
8
|
+
let o = s.props.children;
|
|
9
|
+
e.isArray(o) || (o = [o]), o.forEach((p) => {
|
|
11
10
|
let i = 0;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}) : p && p.props && (i = (l = (c = p.props) == null ? void 0 : c.style) == null ? void 0 : l.width, o.push(i));
|
|
11
|
+
e.isArray(p) ? p.forEach((a) => {
|
|
12
|
+
a && a.props && (i = a.props?.style?.width), r.push(i);
|
|
13
|
+
}) : p && p.props && (i = p.props?.style?.width, r.push(i));
|
|
16
14
|
});
|
|
17
15
|
}
|
|
18
|
-
return
|
|
19
|
-
},
|
|
20
|
-
const t =
|
|
21
|
-
if (
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
} else
|
|
25
|
-
},
|
|
26
|
-
var r, p;
|
|
16
|
+
return r;
|
|
17
|
+
}, c = (s, r) => {
|
|
18
|
+
const t = r;
|
|
19
|
+
if (l(s)) {
|
|
20
|
+
const o = s.props;
|
|
21
|
+
e.isArray(o?.children) ? s.props.children.forEach((i) => c(i, t)) : s && (t.current += 1);
|
|
22
|
+
} else e.isArray(s) && s.length > 0 && s.forEach((o) => c(o, t));
|
|
23
|
+
}, x = (s, r) => {
|
|
27
24
|
const t = s;
|
|
28
|
-
return
|
|
29
|
-
},
|
|
25
|
+
return e.isArray(s) && s.length > 0 && s[0].props ? c(s[0].props.children, r) : l(s) && s.props && t?.props?.children && c(t?.props?.children, r), r.current;
|
|
26
|
+
}, g = ({ customClass: s, children: r }) => {
|
|
30
27
|
const {
|
|
31
28
|
bodyScrollWidth: t,
|
|
32
|
-
bodyScrollable:
|
|
29
|
+
bodyScrollable: o,
|
|
33
30
|
handlerSetColumnsWidth: p,
|
|
34
31
|
handlerSetColumnsCount: i
|
|
35
|
-
} =
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
}, []),
|
|
32
|
+
} = f(u), a = d(0);
|
|
33
|
+
return h(() => {
|
|
34
|
+
r && p && i && (p(m(r)), i(x(r, a)));
|
|
35
|
+
}, []), o ? /* @__PURE__ */ n.jsx("div", { className: "headercontainer", style: { paddingRight: t }, children: /* @__PURE__ */ n.jsx("table", { className: "innertable", style: { tableLayout: "fixed" }, children: /* @__PURE__ */ n.jsx("thead", { className: `theader ${s}`, children: r }) }) }) : /* @__PURE__ */ n.jsx("thead", { className: `theader ${s}`, children: r });
|
|
39
36
|
};
|
|
40
37
|
export {
|
|
41
|
-
|
|
38
|
+
g as default
|
|
42
39
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as t } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as t } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useContext as g } from "react";
|
|
3
|
-
import C from "lodash";
|
|
3
|
+
import { _ as C } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import p from "../icons/index.js";
|
|
5
5
|
import j from "../skeleton/index.js";
|
|
6
6
|
import k from "./helpers.js";
|
package/lib/table/Row.js
CHANGED
package/lib/table/RowColumn.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as a } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as a } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useContext as h, useCallback as y } from "react";
|
|
3
3
|
import g from "../skeleton/index.js";
|
|
4
4
|
import { RowContext as j } from "./helpers.js";
|
package/lib/table/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as b } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as b } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useState as f, useRef as P, useCallback as C, useMemo as V, useEffect as S } from "react";
|
|
3
|
-
import W from "lodash";
|
|
3
|
+
import { _ as W } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import { default as Z } from "./Header.js";
|
|
5
5
|
import { default as te } from "./Row.js";
|
|
6
6
|
import { default as se } from "./Body.js";
|
package/lib/tabs/DropdownTabs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as o } from "../chunks/jsx-runtime.
|
|
2
|
-
import h from "lodash";
|
|
1
|
+
import { j as o } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
|
+
import { _ as h } from "../chunks/lodash.CIAK_hAg.js";
|
|
3
3
|
import a from "../buttons/Button.js";
|
|
4
4
|
import b from "../icons/index.js";
|
|
5
5
|
import '../assets/radio.css';import '../assets/toolbar.css';import '../assets/label.css';import '../assets/panel.css';import '../assets/noPermission.css';import '../assets/gridlayout.css';import '../assets/button.css';/* empty css */
|
|
@@ -20,9 +20,9 @@ import "../popover/index.js";
|
|
|
20
20
|
import "../textContent/index.js";
|
|
21
21
|
import "./MenuTabs.js";
|
|
22
22
|
import "./tabHelpers.js";
|
|
23
|
-
import { L as f } from "../chunks/tabs.
|
|
23
|
+
import { L as f } from "../chunks/tabs.D0L_nVfP.js";
|
|
24
24
|
import "./context.js";
|
|
25
|
-
import "../chunks/index.
|
|
25
|
+
import "../chunks/index.CM1aLH2W.js";
|
|
26
26
|
const j = ({
|
|
27
27
|
id: t,
|
|
28
28
|
title: e,
|
package/lib/tabs/Menu.js
CHANGED
package/lib/tabs/MenuTabs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as s } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as s } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import y from "react";
|
|
3
|
-
import N from "lodash";
|
|
3
|
+
import { _ as N } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import h from "../buttons/Button.js";
|
|
5
5
|
import "../icons/index.js";
|
|
6
6
|
import '../assets/button.css';/* empty css */
|
package/lib/tabs/Panel.js
CHANGED
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
import { j as a } from "../chunks/jsx-runtime.
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { onDeniedOptions as
|
|
1
|
+
import { j as a } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
|
+
import { useRef as i, useState as j, useCallback as C, useEffect as H } from "react";
|
|
3
|
+
import { onDeniedOptions as L, getCurrentThreshold as w } from "./tabHelpers.js";
|
|
4
4
|
import { actionsOnPermissionDenied as z } from "../permissionValidations.js";
|
|
5
5
|
import D from "../noPermission/index.js";
|
|
6
6
|
import { useTabs as S } from "./useTabs.js";
|
|
7
7
|
const q = (m) => {
|
|
8
8
|
const {
|
|
9
|
-
id:
|
|
9
|
+
id: l,
|
|
10
10
|
children: f,
|
|
11
|
-
onEndReached:
|
|
11
|
+
onEndReached: t,
|
|
12
12
|
permissionAttr: h,
|
|
13
13
|
customClass: p = "",
|
|
14
|
-
onEndReachedThreshold:
|
|
14
|
+
onEndReachedThreshold: d = 0.1,
|
|
15
15
|
style: E
|
|
16
|
-
} = m, { selectedTabId:
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
19
|
-
const { scrollTop:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}),
|
|
16
|
+
} = m, { selectedTabId: v } = S(), R = l !== v ? "hidepanel" : "", e = i(null), [b] = j(z(L, h)), { hideContent: g } = b, s = i(!0), o = i(0), n = C(async () => {
|
|
17
|
+
const r = e.current;
|
|
18
|
+
if (r && t) {
|
|
19
|
+
const { scrollTop: c, scrollHeight: u, clientHeight: x } = r, O = u - x - c - 1, P = w(r, d);
|
|
20
|
+
O <= P && s.current && (s.current = !1, await new Promise((T) => {
|
|
21
|
+
T(t());
|
|
22
|
+
}), o.current = u);
|
|
23
23
|
}
|
|
24
24
|
}, [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
t,
|
|
26
|
+
d,
|
|
27
|
+
e.current,
|
|
28
|
+
o.current
|
|
29
29
|
]);
|
|
30
|
-
return
|
|
31
|
-
let
|
|
32
|
-
return
|
|
33
|
-
const { scrollHeight:
|
|
34
|
-
|
|
35
|
-
}),
|
|
36
|
-
|
|
37
|
-
(t = n.current) == null || t.removeEventListener("scroll", r), (s = n.current) == null || s.removeEventListener("resize", r), e == null || e.disconnect();
|
|
30
|
+
return H(() => {
|
|
31
|
+
let r;
|
|
32
|
+
return e.current && t && (r = new ResizeObserver(() => {
|
|
33
|
+
const { scrollHeight: c } = e.current;
|
|
34
|
+
c !== o.current && (s.current = !0, r?.disconnect());
|
|
35
|
+
}), r.observe(e.current), e.current.addEventListener("scroll", n), e.current.addEventListener("resize", n)), () => {
|
|
36
|
+
e.current?.removeEventListener("scroll", n), e.current?.removeEventListener("resize", n), r?.disconnect();
|
|
38
37
|
};
|
|
39
|
-
}, [
|
|
38
|
+
}, [n]), /* @__PURE__ */ a.jsx(
|
|
40
39
|
"div",
|
|
41
40
|
{
|
|
42
|
-
ref:
|
|
43
|
-
id:
|
|
44
|
-
className: `${p} panel ${
|
|
41
|
+
ref: e,
|
|
42
|
+
id: l,
|
|
43
|
+
className: `${p} panel ${R}`,
|
|
45
44
|
style: E,
|
|
46
|
-
children:
|
|
45
|
+
children: g ? /* @__PURE__ */ a.jsx(D, {}) : f
|
|
47
46
|
}
|
|
48
47
|
);
|
|
49
48
|
};
|
package/lib/tabs/context.js
CHANGED
|
@@ -1,68 +1,64 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getTabs as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
children:
|
|
1
|
+
import { j as A } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
|
+
import F, { createContext as G, useState as y, useRef as H, useMemo as I, useCallback as x, useEffect as B } from "react";
|
|
3
|
+
import { _ as C } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
|
+
import { getTabs as D } from "./tabHelpers.js";
|
|
5
|
+
const J = G({});
|
|
6
|
+
function U({
|
|
7
|
+
children: E,
|
|
8
8
|
tabs: b,
|
|
9
9
|
container: d,
|
|
10
10
|
selectedTab: f = null,
|
|
11
11
|
onTabChange: T,
|
|
12
12
|
onTabClose: p,
|
|
13
13
|
tabsWidth: c,
|
|
14
|
-
firstTabIdent:
|
|
15
|
-
keepTabOriginalPosition:
|
|
14
|
+
firstTabIdent: M = !1,
|
|
15
|
+
keepTabOriginalPosition: O = !0
|
|
16
16
|
}) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return ((e = d.current) == null ? void 0 : e.clientWidth) ?? 0;
|
|
21
|
-
}), [n, a] = C(M(b)), v = K(null), h = (((y = v.current) == null ? void 0 : y.clientWidth) ?? 0) - 38 - (W ? 15 : 0), _ = I(() => typeof c == "string" ? c === "auto" ? 100 : parseInt(c) || 100 : c, [c]), m = Math.round(h / _);
|
|
22
|
-
f && f !== o && l(f), n.length > 0 && o === null && l((B = n[0]) == null ? void 0 : B.id);
|
|
23
|
-
const u = I(() => h === 0 ? [] : n.slice(m), [n, m, w]), z = I(() => n.slice(0, m), [n, m, w]), q = n.length, S = x((e) => {
|
|
17
|
+
const [o, l] = F.useState(f), [w, R] = y(() => d.current?.clientWidth ?? 0), [n, a] = y(D(b)), v = H(null), h = (v.current?.clientWidth ?? 0) - 38 - (M ? 15 : 0), W = I(() => typeof c == "string" ? c === "auto" ? 100 : parseInt(c) || 100 : c, [c]), m = Math.round(h / W);
|
|
18
|
+
f && f !== o && l(f), n.length > 0 && o === null && l(n[0]?.id);
|
|
19
|
+
const u = I(() => h === 0 ? [] : n.slice(m), [n, m, w]), z = I(() => n.slice(0, m), [n, m, w]), k = n.length, S = x((e) => {
|
|
24
20
|
const t = u.findIndex((r) => r.id === e);
|
|
25
21
|
if (t !== -1) {
|
|
26
22
|
const r = n.findIndex((i) => i.id === e), s = u[t];
|
|
27
23
|
a((i) => (i.splice(r, 1), [s, ...i]));
|
|
28
24
|
}
|
|
29
25
|
}, [a, z, n, u]), g = x((e) => {
|
|
30
|
-
|
|
31
|
-
}, [T, l, S]),
|
|
26
|
+
O || S(e), l(e), T && T(e);
|
|
27
|
+
}, [T, l, S]), _ = x((e) => {
|
|
32
28
|
const t = n.findIndex((s) => s.id === e), r = t === 0 ? n[t + 1] : n[t - 1];
|
|
33
29
|
o === e && g(r.id), t !== -1 && a((s) => (s.splice(t, 1), s)), p && p(String(e));
|
|
34
30
|
}, [p, n, u, o]), j = x((e) => {
|
|
35
31
|
R(e.width);
|
|
36
32
|
}, [R]);
|
|
37
|
-
return
|
|
38
|
-
const e =
|
|
33
|
+
return B(() => {
|
|
34
|
+
const e = D(b);
|
|
39
35
|
if (e !== n) {
|
|
40
|
-
const t =
|
|
36
|
+
const t = C.differenceBy(e, n, "id"), r = C.differenceBy(n, e, "id").map((s) => s.id);
|
|
41
37
|
a((s) => {
|
|
42
38
|
let i = s;
|
|
43
|
-
return r && (i = i.filter((
|
|
39
|
+
return r && (i = i.filter((q) => !r.includes(q.id))), [...i, ...t];
|
|
44
40
|
});
|
|
45
41
|
}
|
|
46
|
-
}, [b]),
|
|
42
|
+
}, [b]), B(() => {
|
|
47
43
|
const e = new ResizeObserver(([t]) => {
|
|
48
44
|
j(t.contentRect);
|
|
49
45
|
});
|
|
50
46
|
return d.current && e.observe(d.current), () => {
|
|
51
47
|
e.disconnect();
|
|
52
48
|
};
|
|
53
|
-
}, [d.current, j]), /* @__PURE__ */
|
|
49
|
+
}, [d.current, j]), /* @__PURE__ */ A.jsx(J.Provider, { value: {
|
|
54
50
|
tabs: n,
|
|
55
51
|
menuTabs: z,
|
|
56
52
|
dropdownTabs: u,
|
|
57
53
|
containerWidth: w,
|
|
58
|
-
tabsCount:
|
|
54
|
+
tabsCount: k,
|
|
59
55
|
selectTab: g,
|
|
60
56
|
selectedTabId: o,
|
|
61
|
-
removeTab:
|
|
57
|
+
removeTab: _,
|
|
62
58
|
menuRef: v
|
|
63
|
-
}, children:
|
|
59
|
+
}, children: E });
|
|
64
60
|
}
|
|
65
61
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
J as TabsContext,
|
|
63
|
+
U as TabsProvider
|
|
68
64
|
};
|
package/lib/tabs/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as r } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as r } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useRef as R, useMemo as T, Fragment as n } from "react";
|
|
3
3
|
import b from "./Menu.js";
|
|
4
4
|
import { default as z } from "./Panel.js";
|
|
5
5
|
import { tabsClass as C } from "./tabHelpers.js";
|
|
6
|
-
import "../chunks/tabs.
|
|
6
|
+
import "../chunks/tabs.D0L_nVfP.js";
|
|
7
7
|
import { TabsProvider as g } from "./context.js";
|
|
8
8
|
const q = ({
|
|
9
9
|
toolbar: f,
|
package/lib/textContent/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as m } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as m } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
|
-
import c from "lodash";
|
|
3
|
+
import { _ as c } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import x from "../internals/withTooltip.js";
|
|
5
5
|
import '../assets/index4.css';const o = f(({
|
|
6
6
|
as: t = "span",
|
package/lib/toolbar/ButtonBar.js
CHANGED
package/lib/toolbar/LabelBar.js
CHANGED
package/lib/toolbar/Separator.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as s } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as s } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
const t = ({ children: o, style: r = {} }) => /* @__PURE__ */ s.jsx("div", { className: "toolbar-group", style: r, children: o });
|
|
3
3
|
export {
|
|
4
4
|
t as default
|
package/lib/toolbar/index.js
CHANGED
package/lib/tooltip/index.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import { v } from "../chunks/v1.
|
|
1
|
+
import { j as f } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
|
+
import { useRef as h, useEffect as e } from "react";
|
|
3
|
+
import a from "react-dom";
|
|
4
|
+
import { v } from "../chunks/v1.Ds1rkxUj.js";
|
|
5
5
|
import '../assets/index5.css';const x = ({
|
|
6
6
|
text: m,
|
|
7
|
-
textError:
|
|
7
|
+
textError: n,
|
|
8
8
|
tooltipRef: u,
|
|
9
|
-
style:
|
|
10
|
-
tooltipDimensions:
|
|
9
|
+
style: r = "",
|
|
10
|
+
tooltipDimensions: c,
|
|
11
11
|
className: o = "bottom",
|
|
12
12
|
handlerSetDimensions: p = () => {
|
|
13
13
|
}
|
|
14
14
|
}) => {
|
|
15
|
-
const t =
|
|
16
|
-
|
|
17
|
-
t.current.id = `tooltip-${v()}`, t.current.className = `tooltip-component ${o} `, t.current.dataset.testid = "tooltip-component", t.current.style.cssText =
|
|
18
|
-
const
|
|
19
|
-
let d =
|
|
20
|
-
const
|
|
21
|
-
return
|
|
15
|
+
const t = h(document.createElement("div"));
|
|
16
|
+
e(() => {
|
|
17
|
+
t.current.id = `tooltip-${v()}`, t.current.className = `tooltip-component ${o} `, t.current.dataset.testid = "tooltip-component", t.current.style.cssText = r, document.body.appendChild(t.current);
|
|
18
|
+
const i = document.querySelector(`div#${t.current.id}`);
|
|
19
|
+
let d = i?.offsetWidth;
|
|
20
|
+
const l = i?.offsetHeight;
|
|
21
|
+
return c && c.width && (d = c.width), p({
|
|
22
22
|
width: d,
|
|
23
|
-
height: Number(
|
|
24
|
-
}), u && (u.current =
|
|
23
|
+
height: Number(l)
|
|
24
|
+
}), u && (u.current = i), () => {
|
|
25
25
|
document.body.removeChild(t.current);
|
|
26
26
|
};
|
|
27
|
-
}, []),
|
|
27
|
+
}, []), e(() => {
|
|
28
28
|
t.current.className = `tooltip-component ${o} `;
|
|
29
|
-
}, [o]),
|
|
30
|
-
t.current.style.cssText =
|
|
31
|
-
}, [
|
|
32
|
-
t.current.className =
|
|
33
|
-
}, [
|
|
34
|
-
const s = () => /* @__PURE__ */
|
|
35
|
-
return
|
|
29
|
+
}, [o]), e(() => {
|
|
30
|
+
t.current.style.cssText = r;
|
|
31
|
+
}, [r]), e(() => {
|
|
32
|
+
t.current.className = n ? `tooltip-error tooltip-component ${o}` : `tooltip-component ${o}`;
|
|
33
|
+
}, [n]);
|
|
34
|
+
const s = () => /* @__PURE__ */ f.jsx("div", { className: "tooltipcontent", children: n || m });
|
|
35
|
+
return a.createPortal(s(), t.current);
|
|
36
36
|
};
|
|
37
37
|
export {
|
|
38
38
|
x as default
|
package/lib/treetable/Body.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as s } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as s } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useContext as i, useState as l, useEffect as n } from "react";
|
|
3
|
-
import "lodash";
|
|
3
|
+
import "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import "../table/helpers.js";
|
|
5
5
|
import f from "../table/Body.js";
|
|
6
6
|
import "../icons/index.js";
|
package/lib/treetable/Header.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as t } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as t } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useContext as m } from "react";
|
|
3
|
-
import "lodash";
|
|
3
|
+
import "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import i from "../table/Header.js";
|
|
5
5
|
import p from "../table/Row.js";
|
|
6
6
|
import "../table/helpers.js";
|
|
@@ -9,7 +9,7 @@ import '../assets/table.css';import '../assets/skeleton.css';import '../assets/g
|
|
|
9
9
|
import a from "../table/HeaderColumn.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import { TreeTableContext as s } from "./helpers.js";
|
|
12
|
-
import { v as e } from "../chunks/v1.
|
|
12
|
+
import { v as e } from "../chunks/v1.Ds1rkxUj.js";
|
|
13
13
|
const $ = () => {
|
|
14
14
|
const { dataColumns: o } = m(s);
|
|
15
15
|
return /* @__PURE__ */ t.jsx(i, { children: /* @__PURE__ */ t.jsx(p, { children: o.map((r) => /* @__PURE__ */ t.jsx(
|