linear-react-components-ui 1.1.26-beta-1 → 1.1.26-beta.10
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/AlertContainer.js +8 -2
- package/lib/alerts/AlertProvider.js +11 -5
- package/lib/alerts/BaseAlert.js +10 -8
- package/lib/alerts/Message.js +91 -64
- package/lib/alerts/withAlert.js +10 -6
- 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 +29 -51
- package/lib/badge/index.js +25 -23
- package/lib/buttons/ActivateButton.js +9 -4
- package/lib/buttons/AddButton.js +12 -5
- package/lib/buttons/Button.js +16 -5
- package/lib/buttons/ButtonGroups.js +10 -3
- package/lib/buttons/CancelButton.js +14 -4
- package/lib/buttons/DangerButton.js +15 -4
- package/lib/buttons/DefaultButton.js +76 -111
- package/lib/buttons/DestroyButton.js +21 -5
- package/lib/buttons/EditButton.js +9 -4
- package/lib/buttons/InactivateButton.js +9 -4
- package/lib/buttons/InfoButton.js +15 -4
- package/lib/buttons/PrimaryButton.js +15 -4
- package/lib/buttons/RestoreButton.js +9 -4
- package/lib/buttons/SaveButton.js +14 -4
- package/lib/buttons/SuccessButton.js +15 -4
- package/lib/buttons/WarningButton.js +15 -4
- package/lib/buttons/button_container/index.js +21 -16
- package/lib/buttons/split_button/index.js +53 -55
- package/lib/calendar/DangerCalendar.js +18 -4
- package/lib/calendar/InfoCalendar.js +18 -4
- package/lib/calendar/PrimaryCalendar.js +18 -4
- package/lib/calendar/SuccessCalendar.js +18 -4
- package/lib/calendar/WarningCalendar.js +18 -4
- package/lib/calendar/base/Day.js +32 -22
- package/lib/calendar/base/Month.js +24 -21
- package/lib/calendar/base/Week.js +20 -19
- package/lib/calendar/base/helpers.js +11 -19
- package/lib/calendar/base/index.js +129 -97
- package/lib/checkbox/index.js +6 -5
- package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
- package/lib/chunks/{index.Da--18GT.js → index.Df3kt2LQ.js} +179 -181
- package/lib/chunks/index.aw0XaUkg.js +266 -0
- package/lib/chunks/jsx-runtime.D1SHvdVE.js +282 -0
- package/lib/chunks/lodash.CIAK_hAg.js +3684 -0
- package/lib/chunks/moment.DMLRxgRE.js +2589 -0
- package/lib/chunks/tabs.BvKfeA6Y.js +244 -0
- package/lib/chunks/v1.Ds1rkxUj.js +49 -0
- package/lib/dialog/Alert.js +18 -17
- package/lib/dialog/Custom.js +42 -28
- package/lib/dialog/Error.js +18 -17
- package/lib/dialog/Information.js +18 -17
- package/lib/dialog/Question.js +43 -59
- package/lib/dialog/Warning.js +18 -17
- package/lib/dialog/base/Content.js +13 -4
- package/lib/dialog/base/Footer.js +8 -3
- package/lib/dialog/base/Header.js +4 -3
- package/lib/dialog/base/index.js +5 -4
- package/lib/dialog/form/index.js +5 -4
- package/lib/dialog/index.js +1 -1
- package/lib/dialog/wizard/index.js +11 -10
- package/lib/dialog/wizard/progressbar.js +96 -3
- package/lib/dialog/wizard/step.js +4 -3
- package/lib/dialog/wizard/useWizard.js +42 -29
- package/lib/drawer/Content.js +15 -8
- package/lib/drawer/Drawer.js +38 -35
- package/lib/drawer/Header.js +53 -40
- package/lib/drawer/helpers.js +2 -2
- package/lib/dropdown/Popup.js +4 -2
- package/lib/dropdown/withDropdown.js +75 -50
- package/lib/fieldset/index.js +66 -47
- package/lib/form/Field.js +88 -62
- package/lib/form/FieldArray.js +18 -39
- package/lib/form/FieldNumber.js +42 -38
- package/lib/form/FieldPeriod.js +90 -59
- package/lib/form/helpers.js +14 -11
- package/lib/form/index.js +88 -100
- package/lib/form/withFieldHOC.js +57 -48
- package/lib/form/withFormSecurity.js +15 -18
- package/lib/gridlayout/GridCol.js +21 -20
- package/lib/gridlayout/GridRow.js +22 -20
- package/lib/hint/helpers.js +6 -2
- package/lib/hint/index.js +27 -25
- package/lib/icons/helper.js +142 -569
- package/lib/icons/index.js +62 -57
- package/lib/index.js +20 -19
- package/lib/inputs/base/InputTextBase.js +121 -207
- package/lib/inputs/base/Label.js +27 -29
- package/lib/inputs/base/helpers.d.ts +3 -3
- package/lib/inputs/base/helpers.js +4 -2
- package/lib/inputs/color/index.js +52 -73
- package/lib/inputs/date/Dialog.js +15 -16
- package/lib/inputs/date/Dropdown.js +16 -14
- package/lib/inputs/date/helpers.js +7 -7
- package/lib/inputs/date/index.js +101 -147
- package/lib/inputs/errorMessage/index.js +21 -13
- package/lib/inputs/file/DefaultFile.js +64 -67
- package/lib/inputs/file/DragDropFile.js +79 -135
- package/lib/inputs/file/File.d.ts +1 -1
- package/lib/inputs/file/File.js +24 -39
- package/lib/inputs/file/FileButtonSettings.js +20 -17
- package/lib/inputs/inputHOC.js +38 -20
- package/lib/inputs/mask/BaseMask.js +51 -30
- package/lib/inputs/mask/Cnpj.js +42 -36
- package/lib/inputs/mask/Cpf.js +45 -33
- package/lib/inputs/mask/Phone.js +10 -6
- package/lib/inputs/mask/ZipCode.js +9 -4
- package/lib/inputs/mask/helpers.d.ts +33 -33
- package/lib/inputs/mask/helpers.js +44 -44
- package/lib/inputs/multiSelect/ActionButtons.js +35 -46
- package/lib/inputs/multiSelect/Dropdown.js +94 -133
- package/lib/inputs/multiSelect/helper.js +4 -7
- package/lib/inputs/multiSelect/index.js +167 -127
- package/lib/inputs/number/BaseNumber.js +43 -31
- package/lib/inputs/number/Currency.js +19 -12
- package/lib/inputs/number/Decimal.js +9 -4
- package/lib/inputs/number/index.js +31 -35
- package/lib/inputs/period/Dialog.js +16 -16
- package/lib/inputs/period/Dropdown.js +15 -15
- package/lib/inputs/period/PeriodList.js +41 -27
- package/lib/inputs/period/helper.js +8 -4
- package/lib/inputs/period/index.js +192 -330
- package/lib/inputs/search/index.js +95 -71
- package/lib/inputs/select/ActionButtons.js +24 -45
- package/lib/inputs/select/Dropdown.js +61 -110
- package/lib/inputs/select/helper.d.ts +1 -1
- package/lib/inputs/select/helper.js +43 -45
- package/lib/inputs/select/index.js +23 -25
- package/lib/inputs/select/multiple/Selecteds.js +23 -19
- package/lib/inputs/select/multiple/index.js +106 -176
- package/lib/inputs/select/simple/index.js +126 -196
- package/lib/inputs/text/index.js +9 -4
- package/lib/inputs/textarea/index.js +13 -15
- package/lib/internals/withTooltip.js +114 -67
- package/lib/labelMessages/index.js +50 -45
- package/lib/labels/DangerLabel.js +18 -4
- package/lib/labels/DefaultLabel.js +53 -39
- package/lib/labels/InfoLabel.js +18 -4
- package/lib/labels/PrimaryLabel.js +18 -4
- package/lib/labels/SuccessLabel.js +18 -4
- package/lib/labels/WarningLabel.js +18 -4
- package/lib/labels/label_container/index.js +15 -9
- package/lib/list/Header.js +18 -6
- package/lib/list/Item.js +5 -4
- package/lib/list/Separator.js +8 -3
- package/lib/list/helpers.js +2 -2
- package/lib/list/index.js +21 -18
- package/lib/menus/float/MenuItem.js +49 -52
- package/lib/menus/float/SubMenuContainer.d.ts +10 -10
- package/lib/menus/float/index.js +102 -81
- package/lib/menus/sidenav/ExpandMenu.js +17 -15
- package/lib/menus/sidenav/MenuLink.js +21 -14
- package/lib/menus/sidenav/NavMenuGroup.js +19 -14
- package/lib/menus/sidenav/NavMenuItem.js +131 -111
- package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
- package/lib/menus/sidenav/helpers.js +4 -4
- package/lib/menus/sidenav/index.js +145 -123
- package/lib/menus/sidenav/popup_menu_search/EmptyList.js +21 -17
- package/lib/menus/sidenav/popup_menu_search/index.js +17 -51
- package/lib/noPermission/index.js +13 -8
- package/lib/panel/Content.js +49 -40
- package/lib/panel/DangerPanel.js +10 -5
- package/lib/panel/Default.js +62 -36
- package/lib/panel/Header.js +53 -37
- package/lib/panel/InfoPanel.js +10 -5
- package/lib/panel/PrimaryPanel.js +10 -5
- package/lib/panel/SuccessPanel.js +10 -5
- package/lib/panel/ToolBar.js +17 -4
- package/lib/panel/WarningPanel.js +10 -5
- package/lib/panel/helpers.js +8 -5
- package/lib/permissionValidations.js +15 -11
- package/lib/popover/PopoverText.js +12 -5
- package/lib/popover/PopoverTitle.js +10 -3
- package/lib/popover/index.js +36 -56
- package/lib/progress/Bar.js +43 -34
- package/lib/progress/index.js +23 -18
- package/lib/radio/index.js +105 -89
- package/lib/shortcuts/index.js +20 -7
- package/lib/skeleton/SkeletonContainer.js +16 -6
- package/lib/skeleton/index.js +42 -18
- package/lib/spinner/SpinnerLoading.js +53 -16
- package/lib/spinner/index.js +47 -37
- package/lib/split/Split.js +83 -79
- package/lib/split/SplitSide.js +24 -16
- package/lib/table/Body.js +36 -49
- package/lib/table/Header.js +45 -35
- package/lib/table/HeaderColumn.js +40 -27
- package/lib/table/Row.js +47 -48
- package/lib/table/RowColumn.js +50 -38
- package/lib/table/helpers.js +3 -1
- package/lib/table/index.js +101 -104
- package/lib/tabs/DropdownTabs.js +64 -61
- package/lib/tabs/Menu.js +35 -49
- package/lib/tabs/MenuTabs.js +59 -84
- package/lib/tabs/Panel.js +57 -47
- package/lib/tabs/context.js +36 -40
- package/lib/tabs/index.js +69 -64
- package/lib/tabs/tabHelpers.js +10 -8
- package/lib/textContent/index.js +30 -32
- package/lib/toolbar/ButtonBar.js +62 -58
- package/lib/toolbar/LabelBar.js +46 -38
- package/lib/toolbar/Separator.js +8 -3
- package/lib/toolbar/ToolBarGroup.js +14 -3
- package/lib/toolbar/index.js +35 -29
- package/lib/tooltip/index.js +24 -24
- package/lib/treetable/Body.js +26 -27
- package/lib/treetable/Header.js +23 -19
- package/lib/treetable/Row.js +210 -147
- package/lib/treetable/helpers.d.ts +4 -5
- package/lib/treetable/helpers.js +6 -14
- package/lib/treetable/index.js +25 -15
- package/lib/treeview/Header.js +13 -5
- package/lib/treeview/Node.js +198 -175
- package/lib/treeview/index.js +257 -174
- package/lib/uitour/index.js +167 -166
- package/package.json +32 -43
- package/lib/chunks/index.CmrLK9Qe.js +0 -675
- package/lib/chunks/index.D5f6Ow9V.js +0 -89
- package/lib/chunks/index.yztgndLc.js +0 -206
- package/lib/chunks/jsx-runtime.CYK1ROHF.js +0 -445
- package/lib/chunks/tabs.Cvj2MJH6.js +0 -246
- package/lib/chunks/v1.CDXKvGzE.js +0 -41
- /package/lib/assets/{index29.css → progressbar.css} +0 -0
|
@@ -1,55 +1,80 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { j as f } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as K } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { createContext as Q, useState as V, useRef as q, useEffect as z } from "react";
|
|
4
|
+
import T from "./Popup.js";
|
|
5
|
+
import '../assets/withDropdown.css';const U = Q({}), X = (o) => o.displayName || o.name || "Component", oe = (o) => {
|
|
6
|
+
const A = (n) => {
|
|
7
|
+
const e = K.c(30), {
|
|
8
|
+
dropdownOpened: c,
|
|
9
|
+
showDropdown: m,
|
|
9
10
|
dropdown: i,
|
|
10
|
-
closeDropdownOnClickOutside:
|
|
11
|
-
handlerClose:
|
|
12
|
-
customClassForDropdown:
|
|
13
|
-
children:
|
|
14
|
-
dropdownAlign:
|
|
15
|
-
isFloatMenu:
|
|
16
|
-
isDropdownOpened:
|
|
17
|
-
} =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
11
|
+
closeDropdownOnClickOutside: F,
|
|
12
|
+
handlerClose: d,
|
|
13
|
+
customClassForDropdown: P,
|
|
14
|
+
children: g,
|
|
15
|
+
dropdownAlign: L,
|
|
16
|
+
isFloatMenu: p,
|
|
17
|
+
isDropdownOpened: B
|
|
18
|
+
} = n, a = F === void 0 ? !0 : F, S = L === void 0 ? "left" : L, [s, u] = V(c), [G, H] = V(c), w = q(null), $ = q(null);
|
|
19
|
+
c !== G && (u(c), H(c));
|
|
20
|
+
let h;
|
|
21
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (h = (t) => {
|
|
22
|
+
const {
|
|
23
|
+
target: E
|
|
24
|
+
} = t;
|
|
25
|
+
w?.current && E !== w?.current && !t.composedPath().includes(w.current) && $.current !== E && u(!1);
|
|
26
|
+
}, e[0] = h) : h = e[0];
|
|
27
|
+
const M = h;
|
|
28
|
+
let D;
|
|
29
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (D = () => {
|
|
30
|
+
u(Y);
|
|
31
|
+
}, e[1] = D) : D = e[1];
|
|
32
|
+
const I = D;
|
|
33
|
+
let x;
|
|
34
|
+
e[2] !== g || e[3] !== P || e[4] !== S || e[5] !== p || e[6] !== s ? (x = (t) => !t || !s ? null : ($.current = t, /* @__PURE__ */ f.jsx(T, { targetRef: t, align: S, customClassForDropdown: P, isFloatMenu: p, children: /* @__PURE__ */ f.jsx("div", { className: p ? "items" : void 0, ref: (E) => {
|
|
35
|
+
w.current = E;
|
|
36
|
+
}, children: g }) })), e[2] = g, e[3] = P, e[4] = S, e[5] = p, e[6] = s, e[7] = x) : x = e[7];
|
|
37
|
+
const b = x;
|
|
38
|
+
let O;
|
|
39
|
+
e[8] !== a || e[9] !== i ? (O = () => (i && a && document.addEventListener("click", M), () => {
|
|
40
|
+
i && a && document.removeEventListener("click", M);
|
|
41
|
+
}), e[8] = a, e[9] = i, e[10] = O) : O = e[10];
|
|
42
|
+
let v;
|
|
43
|
+
e[11] === Symbol.for("react.memo_cache_sentinel") ? (v = [], e[11] = v) : v = e[11], z(O, v);
|
|
44
|
+
let C, _;
|
|
45
|
+
e[12] !== d ? (C = () => {
|
|
46
|
+
d && d(() => u(!1));
|
|
47
|
+
}, _ = [d], e[12] = d, e[13] = C, e[14] = _) : (C = e[13], _ = e[14]), z(C, _);
|
|
48
|
+
let j;
|
|
49
|
+
e[15] === Symbol.for("react.memo_cache_sentinel") ? (j = {
|
|
50
|
+
handleDropdownClose: I
|
|
51
|
+
}, e[15] = j) : j = e[15];
|
|
52
|
+
const J = j;
|
|
53
|
+
let r;
|
|
54
|
+
e[16] !== b ? (r = (t) => b(t), e[16] = b, e[17] = r) : r = e[17];
|
|
55
|
+
let l;
|
|
56
|
+
e[18] !== s || e[19] !== m ? (l = m || (() => u(!s)), e[18] = s, e[19] = m, e[20] = l) : l = e[20];
|
|
57
|
+
const N = B || s;
|
|
58
|
+
let y;
|
|
59
|
+
e[21] !== r || e[22] !== l || e[23] !== N ? (y = {
|
|
60
|
+
getDropdownPopup: r,
|
|
61
|
+
showDropdown: l,
|
|
62
|
+
isDropdownOpened: N
|
|
63
|
+
}, e[21] = r, e[22] = l, e[23] = N, e[24] = y) : y = e[24];
|
|
64
|
+
const R = y;
|
|
65
|
+
if (!i) {
|
|
66
|
+
let t;
|
|
67
|
+
return e[25] !== n ? (t = /* @__PURE__ */ f.jsx(o, { ...n }), e[25] = n, e[26] = t) : t = e[26], t;
|
|
68
|
+
}
|
|
69
|
+
let k;
|
|
70
|
+
return e[27] !== R || e[28] !== n ? (k = /* @__PURE__ */ f.jsx(U.Provider, { value: J, children: /* @__PURE__ */ f.jsx(o, { ...n, ...R }) }), e[27] = R, e[28] = n, e[29] = k) : k = e[29], k;
|
|
49
71
|
};
|
|
50
|
-
return
|
|
72
|
+
return A.displayName = `withDropdown(${X(o)})`, A;
|
|
51
73
|
};
|
|
74
|
+
function Y(o) {
|
|
75
|
+
return !o;
|
|
76
|
+
}
|
|
52
77
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
78
|
+
U as WithDropdownContext,
|
|
79
|
+
oe as default
|
|
55
80
|
};
|
package/lib/fieldset/index.js
CHANGED
|
@@ -1,51 +1,70 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
1
|
+
import { j as l } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as _ } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { useState as F, Fragment as I } from "react";
|
|
3
4
|
import '../assets/gridlayout.css';import '../assets/index12.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import { actionsOnPermissionDenied as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
const {
|
|
9
|
-
gridCols:
|
|
10
|
-
children:
|
|
11
|
-
title:
|
|
12
|
-
titleAlign:
|
|
13
|
-
style:
|
|
14
|
-
styleContent:
|
|
15
|
-
styleTitle:
|
|
16
|
-
template:
|
|
17
|
-
titleCustomClass:
|
|
18
|
-
permissionAttr:
|
|
19
|
-
leftElements:
|
|
20
|
-
rightElements:
|
|
21
|
-
} =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
5
|
+
import G from "../gridlayout/GridCol.js";
|
|
6
|
+
import { actionsOnPermissionDenied as k, OPTIONS_ON_DENIED as q } from "../permissionValidations.js";
|
|
7
|
+
import z from "../noPermission/index.js";
|
|
8
|
+
const V = (s) => {
|
|
9
|
+
const t = _.c(21), {
|
|
10
|
+
gridCols: o,
|
|
11
|
+
children: i,
|
|
12
|
+
title: e,
|
|
13
|
+
titleAlign: $,
|
|
14
|
+
style: u,
|
|
15
|
+
styleContent: C,
|
|
16
|
+
styleTitle: g,
|
|
17
|
+
template: y,
|
|
18
|
+
titleCustomClass: p,
|
|
19
|
+
permissionAttr: h,
|
|
20
|
+
leftElements: N,
|
|
21
|
+
rightElements: w
|
|
22
|
+
} = s, x = $ === void 0 ? "left" : $, n = y === void 0 ? "none" : y, j = N === void 0 ? null : N, v = w === void 0 ? null : w, {
|
|
23
|
+
hideContent: T,
|
|
24
|
+
unvisible: b
|
|
25
|
+
} = q;
|
|
26
|
+
let r;
|
|
27
|
+
t[0] !== h ? (r = k([T, b], h), t[0] = h, t[1] = r) : r = t[1];
|
|
28
|
+
const [c] = F(r), A = B;
|
|
29
|
+
let m;
|
|
30
|
+
t[2] !== n ? (m = (P) => {
|
|
31
|
+
const {
|
|
32
|
+
colsCount: O,
|
|
33
|
+
rowsCount: D
|
|
34
|
+
} = P, R = O === void 0 ? 2 : O, S = D === void 0 ? 2 : D;
|
|
35
|
+
return n === "rows" ? {
|
|
36
|
+
gridTemplateRows: `repeat(${S}, 1fr)`
|
|
37
|
+
} : n === "columns" ? {
|
|
38
|
+
gridTemplateColumns: `repeat(${R}, 1fr)`
|
|
39
|
+
} : {};
|
|
40
|
+
}, t[2] = n, t[3] = m) : m = t[3];
|
|
41
|
+
const E = m;
|
|
42
|
+
let d;
|
|
43
|
+
t[4] !== i || t[5] !== E || t[6] !== j || t[7] !== c.hideContent || t[8] !== s || t[9] !== v || t[10] !== u || t[11] !== C || t[12] !== g || t[13] !== n || t[14] !== e || t[15] !== x || t[16] !== p ? (d = () => /* @__PURE__ */ l.jsx("fieldset", { style: u, className: A({
|
|
44
|
+
...s
|
|
45
|
+
}), children: c.hideContent ? /* @__PURE__ */ l.jsx(z, {}) : /* @__PURE__ */ l.jsxs(I, { children: [
|
|
46
|
+
e && /* @__PURE__ */ l.jsxs("legend", { style: g, align: x, className: `legend ${p}`, children: [
|
|
47
|
+
j,
|
|
48
|
+
e,
|
|
49
|
+
v
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ l.jsx("div", { className: `contentfieldset -template${n} `, style: Object.assign(E(s), C), children: i })
|
|
52
|
+
] }) }), t[4] = i, t[5] = E, t[6] = j, t[7] = c.hideContent, t[8] = s, t[9] = v, t[10] = u, t[11] = C, t[12] = g, t[13] = n, t[14] = e, t[15] = x, t[16] = p, t[17] = d) : d = t[17];
|
|
53
|
+
const a = d;
|
|
54
|
+
if (c.unvisible)
|
|
55
|
+
return null;
|
|
56
|
+
let f;
|
|
57
|
+
return t[18] !== o || t[19] !== a ? (f = o ? /* @__PURE__ */ l.jsx(G, { cols: o, children: a() }) : a(), t[18] = o, t[19] = a, t[20] = f) : f = t[20], f;
|
|
48
58
|
};
|
|
59
|
+
function B(s) {
|
|
60
|
+
const {
|
|
61
|
+
type: t,
|
|
62
|
+
customClass: o,
|
|
63
|
+
hasError: i
|
|
64
|
+
} = s;
|
|
65
|
+
let e = `fieldset-component ${o}`;
|
|
66
|
+
return t && (e = `${e} -${t}`), i && (e = `${e} -witherror`), e;
|
|
67
|
+
}
|
|
49
68
|
export {
|
|
50
|
-
|
|
69
|
+
V as default
|
|
51
70
|
};
|
package/lib/form/Field.js
CHANGED
|
@@ -1,72 +1,98 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { j as N } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as V } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { forwardRef as A, useContext as L } from "react";
|
|
4
|
+
import { _ as C } from "../chunks/lodash.CIAK_hAg.js";
|
|
5
|
+
import M from "./withFieldHOC.js";
|
|
6
|
+
import { withFieldContext as S, getErrorMessages as $, getValidatorsArray as b } from "./helpers.js";
|
|
7
|
+
const B = ({
|
|
8
|
+
validators: o = [],
|
|
9
|
+
name: s,
|
|
10
|
+
onBlur: e,
|
|
11
|
+
handlerFieldValidate: r,
|
|
12
|
+
validatorFromComponent: l,
|
|
12
13
|
handlerFieldChange: n,
|
|
13
|
-
onChange:
|
|
14
|
+
onChange: t
|
|
14
15
|
}) => {
|
|
15
|
-
if (!(
|
|
16
|
-
const
|
|
16
|
+
if (!(o || l || e || t)) return {};
|
|
17
|
+
const i = b(o, l);
|
|
17
18
|
return {
|
|
18
|
-
onBlur: (
|
|
19
|
-
|
|
19
|
+
onBlur: (a) => {
|
|
20
|
+
i && a.target && r && r(s, a.target.value, i), e && e(a);
|
|
20
21
|
},
|
|
21
|
-
onChange: (
|
|
22
|
-
|
|
22
|
+
onChange: (a) => {
|
|
23
|
+
i && a.target && r && r(s, a.target.value, i), n && n(a), t && t(a);
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
|
-
},
|
|
26
|
-
const { value: s, data: e, name: o, fieldId: n, componentType: r, component: a } = t;
|
|
27
|
-
return r && r.toLowerCase() === "radio" ? { checked: l.get(e, o) === s, id: n } : r && r.toLowerCase() === "checkbox" ? { checked: l.get(e, o), id: n } : a.displayName === "CpfField" || a.displayName === "CnpjField" ? { value: l.get(e, o), handlerSetComponentValidator: d } : { value: l.get(e, o) };
|
|
28
|
-
}, m = C((t, d) => {
|
|
26
|
+
}, D = (o, s) => {
|
|
29
27
|
const {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
28
|
+
value: e,
|
|
29
|
+
data: r,
|
|
30
|
+
name: l,
|
|
31
|
+
fieldId: n,
|
|
32
|
+
componentType: t,
|
|
33
|
+
component: i
|
|
34
|
+
} = o;
|
|
35
|
+
return t && t.toLowerCase() === "radio" ? {
|
|
36
|
+
checked: C.get(r, l) === e,
|
|
37
|
+
id: n
|
|
38
|
+
} : t && t.toLowerCase() === "checkbox" ? {
|
|
39
|
+
checked: C.get(r, l),
|
|
40
|
+
id: n
|
|
41
|
+
} : i.displayName === "CpfField" || i.displayName === "CnpjField" ? {
|
|
42
|
+
value: C.get(r, l),
|
|
43
|
+
handlerSetComponentValidator: s
|
|
44
|
+
} : {
|
|
45
|
+
value: C.get(r, l)
|
|
46
|
+
};
|
|
47
|
+
}, x = A((o, s) => {
|
|
48
|
+
const e = V.c(30);
|
|
49
|
+
let r, l, n, t, i, a, d, m;
|
|
50
|
+
if (e[0] !== o) {
|
|
51
|
+
const {
|
|
52
|
+
handlerFieldChange: F,
|
|
53
|
+
handlerFieldValidate: E,
|
|
54
|
+
onChange: y,
|
|
55
|
+
onBlur: w,
|
|
56
|
+
name: j,
|
|
57
|
+
validators: p,
|
|
58
|
+
data: H,
|
|
59
|
+
fieldErrors: I,
|
|
60
|
+
handlerStoreValidators: O,
|
|
61
|
+
handlerRemoveValidators: P,
|
|
62
|
+
component: R,
|
|
63
|
+
externalFieldErrors: T,
|
|
64
|
+
originalData: _,
|
|
65
|
+
...k
|
|
66
|
+
} = o;
|
|
67
|
+
l = F, n = E, a = y, i = w, t = j, m = p, r = R, d = k, e[0] = o, e[1] = r, e[2] = l, e[3] = n, e[4] = t, e[5] = i, e[6] = a, e[7] = d, e[8] = m;
|
|
68
|
+
} else
|
|
69
|
+
r = e[1], l = e[2], n = e[3], t = e[4], i = e[5], a = e[6], d = e[7], m = e[8];
|
|
70
|
+
const {
|
|
71
|
+
handlerSetValidatorFromComponent: h,
|
|
72
|
+
validatorFromComponent: v
|
|
73
|
+
} = L(S);
|
|
74
|
+
let f;
|
|
75
|
+
e[9] !== l || e[10] !== n || e[11] !== t || e[12] !== i || e[13] !== a || e[14] !== v || e[15] !== m ? (f = B({
|
|
76
|
+
name: t,
|
|
77
|
+
validators: m,
|
|
78
|
+
onBlur: i,
|
|
79
|
+
validatorFromComponent: v,
|
|
80
|
+
handlerFieldValidate: n,
|
|
81
|
+
handlerFieldChange: l,
|
|
82
|
+
onChange: a
|
|
83
|
+
}), e[9] = l, e[10] = n, e[11] = t, e[12] = i, e[13] = a, e[14] = v, e[15] = m, e[16] = f) : f = e[16];
|
|
84
|
+
let c;
|
|
85
|
+
e[17] !== h || e[18] !== o ? (c = D(o, h), e[17] = h, e[18] = o, e[19] = c) : c = e[19];
|
|
86
|
+
let u;
|
|
87
|
+
e[20] !== o ? (u = $({
|
|
88
|
+
...o,
|
|
89
|
+
fieldErrors: o.fieldErrors
|
|
90
|
+
}), e[20] = o, e[21] = u) : u = e[21];
|
|
91
|
+
let g;
|
|
92
|
+
return e[22] !== r || e[23] !== t || e[24] !== s || e[25] !== d || e[26] !== f || e[27] !== c || e[28] !== u ? (g = /* @__PURE__ */ N.jsx(r, { ...d, ...f, ...c, ref: s, name: t, errorMessages: u }), e[22] = r, e[23] = t, e[24] = s, e[25] = d, e[26] = f, e[27] = c, e[28] = u, e[29] = g) : g = e[29], g;
|
|
67
93
|
});
|
|
68
|
-
|
|
69
|
-
const
|
|
94
|
+
x.displayName = "Field";
|
|
95
|
+
const U = M(x);
|
|
70
96
|
export {
|
|
71
|
-
|
|
97
|
+
U as default
|
|
72
98
|
};
|
package/lib/form/FieldArray.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { j as t } from "../chunks/jsx-runtime.
|
|
1
|
+
import { j as t } from "../chunks/jsx-runtime.D1SHvdVE.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
|
+
import "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
5
6
|
import '../assets/gridlayout.css';/* empty css */
|
|
6
7
|
import F from "../gridlayout/GridCol.js";
|
|
7
8
|
import b from "../fieldset/index.js";
|
|
@@ -22,7 +23,12 @@ const g = (e) => {
|
|
|
22
23
|
}, [a]),
|
|
23
24
|
[i]: x.get(m, n),
|
|
24
25
|
[r]: u((o) => {
|
|
25
|
-
l && l({
|
|
26
|
+
l && l({
|
|
27
|
+
target: {
|
|
28
|
+
value: o,
|
|
29
|
+
name: n
|
|
30
|
+
}
|
|
31
|
+
}), s && s(o);
|
|
26
32
|
}, [l, s, r])
|
|
27
33
|
};
|
|
28
34
|
}, j = (e) => {
|
|
@@ -49,41 +55,14 @@ const g = (e) => {
|
|
|
49
55
|
...c
|
|
50
56
|
} = e;
|
|
51
57
|
let d = null;
|
|
52
|
-
return f && (!l && r ? d = /* @__PURE__ */ t.jsx(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
f,
|
|
61
|
-
{
|
|
62
|
-
...c,
|
|
63
|
-
...g(e),
|
|
64
|
-
label: r,
|
|
65
|
-
name: a,
|
|
66
|
-
errorMessages: h({
|
|
67
|
-
...e,
|
|
68
|
-
fieldErrors: e.fieldErrors
|
|
69
|
-
})
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
) : d = /* @__PURE__ */ t.jsx(C, { children: /* @__PURE__ */ t.jsx(
|
|
74
|
-
f,
|
|
75
|
-
{
|
|
76
|
-
...c,
|
|
77
|
-
...g(e),
|
|
78
|
-
label: r,
|
|
79
|
-
name: a,
|
|
80
|
-
errorMessages: h({
|
|
81
|
-
...e,
|
|
82
|
-
fieldErrors: e.fieldErrors
|
|
83
|
-
})
|
|
84
|
-
}
|
|
85
|
-
) })), i ? /* @__PURE__ */ t.jsx(F, { cols: i, children: d }) : d;
|
|
86
|
-
}, O = E(j);
|
|
58
|
+
return f && (!l && r ? d = /* @__PURE__ */ t.jsx(b, { title: r, customClass: `arraycontainer ${m && "-bordered"}`, style: n, titleCustomClass: "label", children: /* @__PURE__ */ t.jsx(f, { ...c, ...g(e), label: r, name: a, errorMessages: h({
|
|
59
|
+
...e,
|
|
60
|
+
fieldErrors: e.fieldErrors
|
|
61
|
+
}) }) }) : d = /* @__PURE__ */ t.jsx(C, { children: /* @__PURE__ */ t.jsx(f, { ...c, ...g(e), label: r, name: a, errorMessages: h({
|
|
62
|
+
...e,
|
|
63
|
+
fieldErrors: e.fieldErrors
|
|
64
|
+
}) }) })), i ? /* @__PURE__ */ t.jsx(F, { cols: i, children: d }) : d;
|
|
65
|
+
}, _ = E(j);
|
|
87
66
|
export {
|
|
88
|
-
|
|
67
|
+
_ as default
|
|
89
68
|
};
|
package/lib/form/FieldNumber.js
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { j as E } from "../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as g } from "../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { _ as x } from "../chunks/lodash.CIAK_hAg.js";
|
|
4
|
+
import n from "./withFieldHOC.js";
|
|
5
|
+
import { getErrorMessages as N } from "./helpers.js";
|
|
6
|
+
import { keyCodes as b } from "../internals/constants.js";
|
|
7
|
+
const j = ({
|
|
8
|
+
name: f,
|
|
9
|
+
validators: t,
|
|
10
|
+
onBlur: o,
|
|
11
|
+
onKeyDown: s,
|
|
12
|
+
onChange: i,
|
|
13
|
+
handlerFieldValidate: m,
|
|
14
|
+
handlerFieldChange: u,
|
|
15
|
+
component: r
|
|
15
16
|
}) => ({
|
|
16
|
-
onBlur: (
|
|
17
|
-
|
|
17
|
+
onBlur: (e) => {
|
|
18
|
+
r?.name !== "NumberField" && u && u(e), t && m && m(f, e.target.value, t), o && o(e);
|
|
18
19
|
},
|
|
19
|
-
onKeyDown: (
|
|
20
|
-
[
|
|
20
|
+
onKeyDown: (e) => {
|
|
21
|
+
[b.ENTER].includes(e.keyCode) && (t && m?.(f, e.target.value, t), s && s(e));
|
|
21
22
|
},
|
|
22
|
-
onChange: (
|
|
23
|
-
|
|
23
|
+
onChange: (e) => {
|
|
24
|
+
r?.name === "NumberField" && (t && e.target && m && m(f, e.target.value, t), u && u(e)), i && i(e);
|
|
24
25
|
}
|
|
25
|
-
}),
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
26
|
+
}), k = (f) => {
|
|
27
|
+
const t = g.c(12), {
|
|
28
|
+
data: o,
|
|
29
|
+
name: s
|
|
30
|
+
} = f;
|
|
31
|
+
let i;
|
|
32
|
+
t[0] !== o || t[1] !== s ? (i = x.get(o, s), t[0] = o, t[1] = s, t[2] = i) : i = t[2];
|
|
33
|
+
const m = i, u = f.component;
|
|
34
|
+
let r;
|
|
35
|
+
t[3] !== f ? (r = j({
|
|
36
|
+
...f
|
|
37
|
+
}), t[3] = f, t[4] = r) : r = t[4];
|
|
38
|
+
let e;
|
|
39
|
+
t[5] !== f ? (e = N({
|
|
40
|
+
...f,
|
|
41
|
+
fieldErrors: f.fieldErrors
|
|
42
|
+
}), t[5] = f, t[6] = e) : e = t[6];
|
|
43
|
+
let c;
|
|
44
|
+
return t[7] !== m || t[8] !== f || t[9] !== r || t[10] !== e ? (c = /* @__PURE__ */ E.jsx(u, { ...f, ...r, errorMessages: e, value: m }), t[7] = m, t[8] = f, t[9] = r, t[10] = e, t[11] = c) : c = t[11], c;
|
|
45
|
+
}, O = n(k);
|
|
42
46
|
export {
|
|
43
|
-
|
|
47
|
+
O as default
|
|
44
48
|
};
|