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
|
@@ -1,5 +1,89 @@
|
|
|
1
|
-
import "../../chunks/jsx-runtime.
|
|
2
|
-
import {
|
|
1
|
+
import { j as t } from "../../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
|
+
import m, { useEffect as b } from "react";
|
|
3
|
+
import { _ as f } from "../../chunks/lodash.CIAK_hAg.js";
|
|
4
|
+
import { F as j } from "../../chunks/index.CM1aLH2W.js";
|
|
5
|
+
import "./useWizard.js";
|
|
6
|
+
import '../../assets/progressbar.css';function W({
|
|
7
|
+
customClass: s,
|
|
8
|
+
customStyle: e,
|
|
9
|
+
stepsTitle: a,
|
|
10
|
+
position: n = "top"
|
|
11
|
+
}) {
|
|
12
|
+
const o = u();
|
|
13
|
+
if (!o)
|
|
14
|
+
throw new Error("WizardProgressbar must be used within a Wizard component");
|
|
15
|
+
const { currentStep: c } = o;
|
|
16
|
+
return /* @__PURE__ */ t.jsx(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: `wizard-progressbar ${s}`,
|
|
20
|
+
style: e,
|
|
21
|
+
"data-position": n,
|
|
22
|
+
children: a.map((r) => /* @__PURE__ */ t.jsxs(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: "title",
|
|
26
|
+
"data-completed": r.completed,
|
|
27
|
+
"data-disabled": r.number > c,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ t.jsx("div", { className: "step", children: /* @__PURE__ */ t.jsx("span", { className: "number", children: r.number }) }),
|
|
30
|
+
/* @__PURE__ */ t.jsx("span", { className: "step-title", children: r.title })
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
r.number
|
|
34
|
+
))
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function C({ children: s, customClass: e = "", customStyle: a }) {
|
|
39
|
+
if (!u())
|
|
40
|
+
throw new Error("WizardStep must be used within a Wizard component");
|
|
41
|
+
return /* @__PURE__ */ t.jsx("div", { className: `wizard-step-component ${e}`, style: a, children: s });
|
|
42
|
+
}
|
|
43
|
+
const p = m.createContext(null), u = () => m.useContext(p);
|
|
44
|
+
function E({
|
|
45
|
+
children: s,
|
|
46
|
+
controls: e,
|
|
47
|
+
showProgressbar: a = !0,
|
|
48
|
+
customStyleForProgressBar: n,
|
|
49
|
+
customStyleForBody: o,
|
|
50
|
+
progressBarPosition: c = "top",
|
|
51
|
+
...r
|
|
52
|
+
}) {
|
|
53
|
+
const { currentStep: l, setTotalSteps: h } = e, i = m.Children.toArray(s), x = i.map((z, d) => ({
|
|
54
|
+
title: String(z.props.title),
|
|
55
|
+
number: d + 1,
|
|
56
|
+
completed: d < l - 1 && d !== l
|
|
57
|
+
})), w = i[l - 1];
|
|
58
|
+
if (!e || f.isEmpty(e))
|
|
59
|
+
throw new Error("Wizard must be have controls by using useWizard hook or creating manually.");
|
|
60
|
+
return b(() => {
|
|
61
|
+
h(i.length);
|
|
62
|
+
}, [i.length]), /* @__PURE__ */ t.jsx(p.Provider, { value: e, children: /* @__PURE__ */ t.jsxs(
|
|
63
|
+
j,
|
|
64
|
+
{
|
|
65
|
+
className: "wizard-dialog",
|
|
66
|
+
wrapperClassName: "wizard-wrapper",
|
|
67
|
+
contentClassName: "wizard-content",
|
|
68
|
+
...r,
|
|
69
|
+
children: [
|
|
70
|
+
a && /* @__PURE__ */ t.jsx(
|
|
71
|
+
W,
|
|
72
|
+
{
|
|
73
|
+
stepsTitle: x,
|
|
74
|
+
customStyle: n,
|
|
75
|
+
position: c
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ t.jsx("div", { className: "wizard-body", style: o, children: w })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
) });
|
|
82
|
+
}
|
|
3
83
|
export {
|
|
4
|
-
|
|
84
|
+
W as Progressbar,
|
|
85
|
+
C as W,
|
|
86
|
+
p as a,
|
|
87
|
+
E as b,
|
|
88
|
+
u
|
|
5
89
|
};
|
package/lib/drawer/Content.js
CHANGED
package/lib/drawer/Drawer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as n } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as n } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useRef as f, useState as R, useEffect as v, Suspense as M } from "react";
|
|
3
3
|
import _ from "react-dom";
|
|
4
4
|
import H from "./helpers.js";
|
|
@@ -9,63 +9,63 @@ import "../form/withFormSecurity.js";
|
|
|
9
9
|
import F from "../spinner/index.js";
|
|
10
10
|
import '../assets/Drawer.css';const W = ({
|
|
11
11
|
position: w = "left",
|
|
12
|
-
customClass:
|
|
13
|
-
children:
|
|
14
|
-
style:
|
|
12
|
+
customClass: C = "",
|
|
13
|
+
children: h,
|
|
14
|
+
style: E,
|
|
15
15
|
customClassForContent: x = "",
|
|
16
16
|
targetId: o,
|
|
17
17
|
closeOnEsc: d,
|
|
18
18
|
overlay: D,
|
|
19
19
|
permissionAttr: N,
|
|
20
|
-
skeletonize:
|
|
21
|
-
handlerClose:
|
|
20
|
+
skeletonize: c,
|
|
21
|
+
handlerClose: m,
|
|
22
22
|
customClassForDrawer: j = "",
|
|
23
23
|
content: l,
|
|
24
24
|
title: u,
|
|
25
25
|
isWaiting: p = !1,
|
|
26
26
|
...S
|
|
27
27
|
}) => {
|
|
28
|
-
const b = { ...S, title: u },
|
|
29
|
-
|
|
28
|
+
const b = { ...S, title: u }, s = f(document.createElement("div"));
|
|
29
|
+
s.current.className = "drawercontainer";
|
|
30
30
|
const a = f(null), { hideContent: O } = V, [P] = R(q([O], N)), B = p ? { opacity: 0.4, pointerEvent: "none", placeContent: "center" } : {}, g = () => p ? /* @__PURE__ */ n.jsx("div", { className: "waitingspinner", children: /* @__PURE__ */ n.jsx(F, { style: { width: 60 }, delayTime: 0 }) }) : null, k = (e, r) => {
|
|
31
31
|
const t = document.createElement("div");
|
|
32
|
-
t.className = "drawer-component", t.id = String(r), e.appendChild(t), t.appendChild(
|
|
32
|
+
t.className = "drawer-component", t.id = String(r), e.appendChild(t), t.appendChild(s.current), a.current = t;
|
|
33
33
|
}, T = (e) => {
|
|
34
34
|
const r = document.createElement("div");
|
|
35
35
|
r.className = "drawer-overlay", r.dataset.testid = "drawer-overlay", e.appendChild(r);
|
|
36
|
-
},
|
|
37
|
-
d && e.key === "Escape" && (
|
|
36
|
+
}, i = (e) => {
|
|
37
|
+
d && e.key === "Escape" && (m?.(), e.stopPropagation());
|
|
38
38
|
};
|
|
39
39
|
v(() => {
|
|
40
40
|
let e;
|
|
41
41
|
const r = Math.round(+/* @__PURE__ */ new Date() / 1e3);
|
|
42
42
|
return o === void 0 ? e = document.getElementsByTagName("body")[0] : e = document.getElementById(o), e && k(e, r), D && !o && e && T(e), () => {
|
|
43
43
|
const t = document.getElementsByClassName("drawer-overlay")[0];
|
|
44
|
-
if (d && document.body.removeEventListener("keydown",
|
|
44
|
+
if (d && document.body.removeEventListener("keydown", i), o) {
|
|
45
45
|
const y = document.getElementById(o);
|
|
46
46
|
y && a.current && y.removeChild(a.current);
|
|
47
47
|
} else a.current && document.body.removeChild(a.current);
|
|
48
48
|
t && !o && e && e.removeChild(t);
|
|
49
49
|
};
|
|
50
|
-
}, []), v(() => (d && document.body.addEventListener("keydown",
|
|
50
|
+
}, []), v(() => (d && document.body.addEventListener("keydown", i), () => document.body.removeEventListener("keydown", i)), [d]);
|
|
51
51
|
const $ = {
|
|
52
|
-
handlerClose:
|
|
52
|
+
handlerClose: m,
|
|
53
53
|
hideContent: P.hideContent,
|
|
54
|
-
skeletonize:
|
|
55
|
-
}, L = () => /* @__PURE__ */ n.jsx(H.Provider, { value: $, children: /* @__PURE__ */ n.jsx("div", { "data-testid": "drawercontainer-component", className: `${w} ${
|
|
54
|
+
skeletonize: c
|
|
55
|
+
}, L = () => /* @__PURE__ */ n.jsx(H.Provider, { value: $, children: /* @__PURE__ */ n.jsx("div", { "data-testid": "drawercontainer-component", className: `${w} ${C}`, style: E, children: /* @__PURE__ */ n.jsxs(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
58
|
style: B,
|
|
59
59
|
"data-testid": "drawercontent",
|
|
60
|
-
className: `drawercontent ${
|
|
60
|
+
className: `drawercontent ${c ? "-skeletonized" : ""} ${x}`,
|
|
61
61
|
children: [
|
|
62
62
|
u && /* @__PURE__ */ n.jsx(z, { ...b, customClass: j }),
|
|
63
|
-
/* @__PURE__ */ n.jsx(M, { children: l ? /* @__PURE__ */ n.jsx(A, { children: l }) :
|
|
63
|
+
/* @__PURE__ */ n.jsx(M, { children: l ? /* @__PURE__ */ n.jsx(A, { children: l }) : h }),
|
|
64
64
|
g()
|
|
65
65
|
]
|
|
66
66
|
}
|
|
67
67
|
) }) });
|
|
68
|
-
return _.createPortal(L(),
|
|
68
|
+
return _.createPortal(L(), s.current);
|
|
69
69
|
};
|
|
70
70
|
export {
|
|
71
71
|
W as default
|
package/lib/drawer/Header.js
CHANGED
package/lib/dropdown/Popup.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as r } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { createContext as L, useState as h, useRef as x, useEffect as O } from "react";
|
|
3
|
-
import
|
|
4
|
-
import '../assets/withDropdown.css';const
|
|
5
|
-
const
|
|
3
|
+
import R from "./Popup.js";
|
|
4
|
+
import '../assets/withDropdown.css';const A = L({}), M = (o) => o.displayName || o.name || "Component", b = (o) => {
|
|
5
|
+
const u = (c) => {
|
|
6
6
|
const {
|
|
7
|
-
dropdownOpened:
|
|
8
|
-
showDropdown:
|
|
7
|
+
dropdownOpened: n,
|
|
8
|
+
showDropdown: a,
|
|
9
9
|
dropdown: i,
|
|
10
10
|
closeDropdownOnClickOutside: w = !0,
|
|
11
|
-
handlerClose:
|
|
11
|
+
handlerClose: p,
|
|
12
12
|
customClassForDropdown: v,
|
|
13
13
|
children: C,
|
|
14
14
|
dropdownAlign: j = "left",
|
|
15
|
-
isFloatMenu:
|
|
15
|
+
isFloatMenu: f,
|
|
16
16
|
isDropdownOpened: P
|
|
17
|
-
} = c, [
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const { target: d } =
|
|
21
|
-
|
|
17
|
+
} = c, [l, t] = h(n), [k, E] = h(n), s = x(null), m = x(null);
|
|
18
|
+
n !== k && (t(n), E(n));
|
|
19
|
+
const D = (e) => {
|
|
20
|
+
const { target: d } = e;
|
|
21
|
+
s?.current && d !== s?.current && !e.composedPath().includes(s.current) && m.current !== d && t(!1);
|
|
22
22
|
}, g = () => {
|
|
23
|
-
|
|
24
|
-
}, N = (
|
|
25
|
-
|
|
23
|
+
t((e) => !e);
|
|
24
|
+
}, N = (e) => !e || !l ? null : (m.current = e, /* @__PURE__ */ r.jsx(
|
|
25
|
+
R,
|
|
26
26
|
{
|
|
27
|
-
targetRef:
|
|
27
|
+
targetRef: e,
|
|
28
28
|
align: j,
|
|
29
29
|
customClassForDropdown: v,
|
|
30
|
-
isFloatMenu:
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
-
|
|
30
|
+
isFloatMenu: f,
|
|
31
|
+
children: /* @__PURE__ */ r.jsx("div", { className: f ? "items" : void 0, ref: (d) => {
|
|
32
|
+
s.current = d;
|
|
33
33
|
}, children: C })
|
|
34
34
|
}
|
|
35
35
|
));
|
|
36
|
-
O(() => (i && w && document.addEventListener("click",
|
|
37
|
-
i && w && document.removeEventListener("click",
|
|
36
|
+
O(() => (i && w && document.addEventListener("click", D), () => {
|
|
37
|
+
i && w && document.removeEventListener("click", D);
|
|
38
38
|
}), []), O(() => {
|
|
39
|
-
|
|
40
|
-
}, [
|
|
39
|
+
p && p(() => t(!1));
|
|
40
|
+
}, [p]);
|
|
41
41
|
const y = {
|
|
42
42
|
handleDropdownClose: g
|
|
43
43
|
}, F = {
|
|
44
|
-
getDropdownPopup: (
|
|
45
|
-
showDropdown:
|
|
46
|
-
isDropdownOpened: P ||
|
|
44
|
+
getDropdownPopup: (e) => N(e),
|
|
45
|
+
showDropdown: a || (() => t(!l)),
|
|
46
|
+
isDropdownOpened: P || l
|
|
47
47
|
};
|
|
48
|
-
return i ? /* @__PURE__ */
|
|
48
|
+
return i ? /* @__PURE__ */ r.jsx(A.Provider, { value: y, children: /* @__PURE__ */ r.jsx(o, { ...c, ...F }) }) : /* @__PURE__ */ r.jsx(o, { ...c });
|
|
49
49
|
};
|
|
50
|
-
return
|
|
50
|
+
return u.displayName = `withDropdown(${M(o)})`, u;
|
|
51
51
|
};
|
|
52
52
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
A as WithDropdownContext,
|
|
54
|
+
b as default
|
|
55
55
|
};
|
package/lib/fieldset/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as e } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useState as O, Fragment as D } from "react";
|
|
3
3
|
import '../assets/gridlayout.css';import '../assets/index12.css';/* empty css */
|
|
4
4
|
import T from "../gridlayout/GridCol.js";
|
package/lib/form/Field.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as p } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as p } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { forwardRef as C, useContext as v } from "react";
|
|
3
|
-
import l from "lodash";
|
|
3
|
+
import { _ as l } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import x from "./withFieldHOC.js";
|
|
5
5
|
import { withFieldContext as E, getErrorMessages as F, getValidatorsArray as h } from "./helpers.js";
|
|
6
6
|
const y = ({
|
package/lib/form/FieldArray.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 { Fragment as C, useCallback as u } from "react";
|
|
3
|
-
import x from "lodash";
|
|
3
|
+
import { _ as x } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import E from "./withFieldHOC.js";
|
|
5
5
|
import '../assets/gridlayout.css';/* empty css */
|
|
6
6
|
import F from "../gridlayout/GridCol.js";
|
package/lib/form/FieldNumber.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getErrorMessages as
|
|
5
|
-
import { keyCodes as
|
|
6
|
-
const
|
|
1
|
+
import { j as c } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
|
+
import { _ as E } from "../chunks/lodash.CIAK_hAg.js";
|
|
3
|
+
import g from "./withFieldHOC.js";
|
|
4
|
+
import { getErrorMessages as x } from "./helpers.js";
|
|
5
|
+
import { keyCodes as N } from "../internals/constants.js";
|
|
6
|
+
const b = ({
|
|
7
7
|
name: r,
|
|
8
|
-
validators:
|
|
9
|
-
onBlur:
|
|
10
|
-
onKeyDown:
|
|
11
|
-
onChange:
|
|
12
|
-
handlerFieldValidate:
|
|
13
|
-
handlerFieldChange:
|
|
14
|
-
component:
|
|
8
|
+
validators: f,
|
|
9
|
+
onBlur: o,
|
|
10
|
+
onKeyDown: u,
|
|
11
|
+
onChange: e,
|
|
12
|
+
handlerFieldValidate: m,
|
|
13
|
+
handlerFieldChange: s,
|
|
14
|
+
component: i
|
|
15
15
|
}) => ({
|
|
16
|
-
onBlur: (
|
|
17
|
-
|
|
16
|
+
onBlur: (t) => {
|
|
17
|
+
i?.name !== "NumberField" && s && s(t), f && m && m(r, t.target.value, f), o && o(t);
|
|
18
18
|
},
|
|
19
|
-
onKeyDown: (
|
|
20
|
-
[
|
|
19
|
+
onKeyDown: (t) => {
|
|
20
|
+
[N.ENTER].includes(t.keyCode) && (f && m?.(r, t.target.value, f), u && u(t));
|
|
21
21
|
},
|
|
22
|
-
onChange: (
|
|
23
|
-
|
|
22
|
+
onChange: (t) => {
|
|
23
|
+
i?.name === "NumberField" && (f && t.target && m && m(r, t.target.value, f), s && s(t)), e && e(t);
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
26
|
-
const { data:
|
|
27
|
-
return /* @__PURE__ */
|
|
25
|
+
}), j = (r) => {
|
|
26
|
+
const { data: f, name: o } = r, u = E.get(f, o);
|
|
27
|
+
return /* @__PURE__ */ c.jsx(
|
|
28
28
|
r.component,
|
|
29
29
|
{
|
|
30
30
|
...r,
|
|
31
|
-
...
|
|
31
|
+
...b({
|
|
32
32
|
...r
|
|
33
33
|
}),
|
|
34
|
-
errorMessages:
|
|
34
|
+
errorMessages: x({
|
|
35
35
|
...r,
|
|
36
36
|
fieldErrors: r.fieldErrors
|
|
37
37
|
}),
|
|
38
|
-
value:
|
|
38
|
+
value: u
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
|
-
},
|
|
41
|
+
}, w = g(j);
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
w as default
|
|
44
44
|
};
|
package/lib/form/FieldPeriod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as x } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as x } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import { useState as V, useEffect as $ } from "react";
|
|
3
|
-
import e from "lodash";
|
|
3
|
+
import { _ as e } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
4
|
import '../assets/gridlayout.css';/* empty css */
|
|
5
5
|
import j from "../gridlayout/GridCol.js";
|
|
6
6
|
import w from "./withFieldHOC.js";
|
package/lib/form/helpers.js
CHANGED
package/lib/form/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as x } from "../chunks/jsx-runtime.
|
|
2
|
-
import { useState as
|
|
3
|
-
import f from "lodash";
|
|
4
|
-
import { changeValue as B, FormContext as
|
|
1
|
+
import { j as x } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
|
+
import { useState as d, useContext as ar, useRef as U, useCallback as q, useEffect as F, Fragment as ur } from "react";
|
|
3
|
+
import { _ as f } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
|
+
import { changeValue as B, FormContext as dr } from "./helpers.js";
|
|
5
5
|
import { default as br } from "./Field.js";
|
|
6
6
|
import { default as Rr } from "./FieldNumber.js";
|
|
7
7
|
import { default as Sr } from "./FieldArray.js";
|
|
8
8
|
import { default as Pr } from "./FieldPeriod.js";
|
|
9
|
-
import "../chunks/index.
|
|
9
|
+
import "../chunks/index.CM1aLH2W.js";
|
|
10
10
|
import "../buttons/DefaultButton.js";
|
|
11
11
|
import "../icons/index.js";
|
|
12
12
|
import '../assets/button.css';import '../assets/index13.css';/* empty css */
|
|
13
|
-
import
|
|
13
|
+
import mr from "../dialog/Question.js";
|
|
14
14
|
import { FormSecurityContext as pr } from "./withFormSecurity.js";
|
|
15
|
-
import { v as Fr } from "../chunks/v1.
|
|
15
|
+
import { v as Fr } from "../chunks/v1.Ds1rkxUj.js";
|
|
16
16
|
const wr = ({
|
|
17
17
|
submitOnPressEnterKey: g = !0,
|
|
18
|
-
dataSource:
|
|
18
|
+
dataSource: m,
|
|
19
19
|
securityBeforeUnload: j,
|
|
20
20
|
handlerReset: k,
|
|
21
21
|
handlerSubmit: L,
|
|
@@ -25,57 +25,57 @@ const wr = ({
|
|
|
25
25
|
securityTitle: _,
|
|
26
26
|
securityText: $,
|
|
27
27
|
securityData: C,
|
|
28
|
-
onDataChange:
|
|
28
|
+
onDataChange: u,
|
|
29
29
|
onValidateForm: p,
|
|
30
30
|
externalFieldErrors: G,
|
|
31
31
|
onSubmit: H,
|
|
32
32
|
skeletonize: T,
|
|
33
|
-
disabled:
|
|
33
|
+
disabled: V,
|
|
34
34
|
children: W,
|
|
35
35
|
useInternalState: l = !1
|
|
36
36
|
}) => {
|
|
37
|
-
const X = Fr(), [
|
|
38
|
-
const
|
|
39
|
-
let
|
|
40
|
-
return
|
|
37
|
+
const X = Fr(), [h, J] = d(m), [E, Y] = d(m), [b, Z] = d(g), [v, O] = d({}), [A, K] = d(0), [I, rr] = d(!1), c = ar(pr), tr = U(null), a = U({}), i = l ? h : m, R = (r, t) => {
|
|
38
|
+
const e = r instanceof Array ? r : [r];
|
|
39
|
+
let o = [];
|
|
40
|
+
return e.forEach((s) => {
|
|
41
41
|
if (typeof s == "function") {
|
|
42
42
|
const n = s(t);
|
|
43
|
-
n && (
|
|
43
|
+
n && (o = [...o, n]);
|
|
44
44
|
}
|
|
45
|
-
}),
|
|
45
|
+
}), o;
|
|
46
46
|
}, or = (r, t) => {
|
|
47
|
-
const
|
|
48
|
-
let
|
|
47
|
+
const e = r || i;
|
|
48
|
+
let o = f.pickBy(v, (s, n) => Object.keys(t).includes(n));
|
|
49
49
|
return f.forEach(t, (s, n) => {
|
|
50
|
-
const P = f.get(
|
|
51
|
-
|
|
52
|
-
}),
|
|
53
|
-
}, y = (r, t = !0,
|
|
54
|
-
const
|
|
50
|
+
const P = f.get(e, n), lr = R(s, P);
|
|
51
|
+
o = { ...o, [n]: lr };
|
|
52
|
+
}), o;
|
|
53
|
+
}, y = (r, t = !0, e = null) => {
|
|
54
|
+
const o = or(r, e || a.current), s = Object.values(o).every((n) => n.length === 0);
|
|
55
55
|
return t && rr(s), s;
|
|
56
56
|
}, er = q((r) => {
|
|
57
57
|
const { target: t } = r;
|
|
58
|
-
!l &&
|
|
59
|
-
}, []), sr = (r, t,
|
|
60
|
-
if (
|
|
61
|
-
let
|
|
62
|
-
const s = R(
|
|
63
|
-
s.length === 0 ?
|
|
58
|
+
!l && u ? u((e) => B(e, t)) : J((e) => B(e, t));
|
|
59
|
+
}, []), sr = (r, t, e) => {
|
|
60
|
+
if (e) {
|
|
61
|
+
let o = v;
|
|
62
|
+
const s = R(e, t);
|
|
63
|
+
s.length === 0 ? o = f.omit(o, r) : o = { ...o, [r]: s }, O(o);
|
|
64
64
|
}
|
|
65
65
|
}, Q = q((r) => {
|
|
66
66
|
r && (r.preventDefault(), r.stopPropagation()), y(i) && H(i);
|
|
67
67
|
}, [i]), S = (r, t) => {
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
const s = JSON.parse(JSON.stringify(
|
|
71
|
-
return
|
|
68
|
+
const e = t ? t instanceof Array ? t : [t] : [];
|
|
69
|
+
e.length > 0 ? (r((o) => {
|
|
70
|
+
const s = JSON.parse(JSON.stringify(o));
|
|
71
|
+
return e.forEach((n) => {
|
|
72
72
|
n && f.set(s, n, f.get(E, n));
|
|
73
73
|
}), s;
|
|
74
|
-
}), O((
|
|
75
|
-
delete
|
|
76
|
-
}),
|
|
74
|
+
}), O((o) => (e.forEach((s) => {
|
|
75
|
+
delete o[s];
|
|
76
|
+
}), o))) : (r(JSON.parse(JSON.stringify(E))), O({}));
|
|
77
77
|
}, ir = (r) => {
|
|
78
|
-
S(!l &&
|
|
78
|
+
S(!l && u ? u : J, r);
|
|
79
79
|
}, nr = (r) => {
|
|
80
80
|
const t = f.omit(a, r);
|
|
81
81
|
a.current = t;
|
|
@@ -83,7 +83,7 @@ const wr = ({
|
|
|
83
83
|
r.preventDefault(), f.isEqual(i, E);
|
|
84
84
|
}, fr = () => {
|
|
85
85
|
let r = null;
|
|
86
|
-
return
|
|
86
|
+
return V || (r = {
|
|
87
87
|
onSubmit: (t) => t.preventDefault(),
|
|
88
88
|
onKeyPress: (t) => {
|
|
89
89
|
t && t.key === "Enter" && (t.preventDefault(), t.stopPropagation(), b && Q());
|
|
@@ -94,16 +94,16 @@ const wr = ({
|
|
|
94
94
|
const { onChangedData: r } = c;
|
|
95
95
|
C && !f.isEqual(i, C) ? r(!0) : r(!1);
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
u && l && u(i), p && p(y(i, !0)), V || (L(Q), k && k(ir), w && w(() => y(i))), f.isEmpty(i) && Y(i);
|
|
98
98
|
};
|
|
99
99
|
F(() => {
|
|
100
100
|
l && D();
|
|
101
|
-
}, [JSON.stringify(
|
|
102
|
-
!l &&
|
|
103
|
-
}, [JSON.stringify(
|
|
104
|
-
!
|
|
101
|
+
}, [JSON.stringify(h), l]), F(() => {
|
|
102
|
+
!l && u && D();
|
|
103
|
+
}, [JSON.stringify(m), l]), F(() => (j && (c && c.setSecurityBeforeUnload(!0), window.addEventListener("beforeunload", N)), () => window.removeEventListener("beforeunload", N)), [j, N]), F(() => {
|
|
104
|
+
!V && g !== b && Z(g);
|
|
105
105
|
}, [g]), F(() => {
|
|
106
|
-
const r = Object.values(a.current).reduce((t,
|
|
106
|
+
const r = Object.values(a.current).reduce((t, e) => t + (e?.length || 0), 0);
|
|
107
107
|
a.current && p && A !== r && (K(r), p(y(i, !0, a.current)));
|
|
108
108
|
}, [
|
|
109
109
|
a.current,
|
|
@@ -119,14 +119,14 @@ const wr = ({
|
|
|
119
119
|
a.current = { ...a.current, [r]: t };
|
|
120
120
|
},
|
|
121
121
|
handlerRemoveValidators: nr,
|
|
122
|
-
data: l ?
|
|
122
|
+
data: l ? h : m,
|
|
123
123
|
originalData: E,
|
|
124
|
-
fieldErrors:
|
|
124
|
+
fieldErrors: v,
|
|
125
125
|
externalFieldErrors: G,
|
|
126
126
|
isFormValid: I
|
|
127
127
|
};
|
|
128
|
-
return /* @__PURE__ */ x.jsxs(
|
|
129
|
-
/* @__PURE__ */ x.jsx(
|
|
128
|
+
return /* @__PURE__ */ x.jsxs(ur, { children: [
|
|
129
|
+
/* @__PURE__ */ x.jsx(dr.Provider, { value: cr, children: /* @__PURE__ */ x.jsx(
|
|
130
130
|
"form",
|
|
131
131
|
{
|
|
132
132
|
id: X,
|
|
@@ -139,7 +139,7 @@ const wr = ({
|
|
|
139
139
|
}
|
|
140
140
|
) }),
|
|
141
141
|
/* @__PURE__ */ x.jsx(
|
|
142
|
-
|
|
142
|
+
mr,
|
|
143
143
|
{
|
|
144
144
|
zIndex: "99999999",
|
|
145
145
|
title: _ || "Dados Alterados",
|
package/lib/form/withFieldHOC.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as i } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as i } from "../chunks/jsx-runtime.C7wFtzyj.js";
|
|
2
2
|
import h, { useState as C, useEffect as f } from "react";
|
|
3
3
|
import { FormContext as v, withFieldContext as V, getValidatorsArray as j } from "./helpers.js";
|
|
4
4
|
const E = (u) => {
|
|
@@ -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 d, { useRef as i, useState as m } from "react";
|
|
3
3
|
const h = d.createContext({}), k = (l) => (r) => {
|
|
4
4
|
const { onOpenChange: e, handlerClose: n } = r, s = i(!1), o = i(!1), [f, c] = m(!1), u = () => {
|
package/lib/hint/helpers.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 n = (t) => /* @__PURE__ */ s.jsx("div", { className: "rules-list", style: { padding: "15px 0px" }, children: /* @__PURE__ */ s.jsx("ul", { style: { listStyleType: "none" }, children: t.map((i, e) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
3
3
|
"-",
|
|
4
4
|
i
|
package/lib/hint/index.js
CHANGED