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,80 +1,104 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { j as s } from "../../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as M } from "../../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import { useState as q, useEffect as N, Fragment as Q } from "react";
|
|
4
|
+
import U from "../base/InputTextBase.js";
|
|
5
|
+
import W from "../../buttons/Button.js";
|
|
6
|
+
import z from "../../icons/index.js";
|
|
6
7
|
import '../../assets/button.css';import '../../assets/index25.css';/* empty css */
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
import X from "../../drawer/index.js";
|
|
9
|
+
import Y from "../../drawer/Header.js";
|
|
10
|
+
import Z from "../../drawer/Content.js";
|
|
11
|
+
const re = (t) => {
|
|
12
|
+
const e = M.c(53), {
|
|
13
|
+
resetButton: G,
|
|
14
|
+
advancedFilterProps: j,
|
|
15
|
+
value: r
|
|
16
|
+
} = t, P = G === void 0 ? !0 : G;
|
|
17
|
+
let O;
|
|
18
|
+
e[0] !== j ? (O = j === void 0 ? {} : j, e[0] = j, e[1] = O) : O = e[1];
|
|
19
|
+
const m = O, [d, J] = q(!1), [o, w] = q(""), [n, K] = q();
|
|
20
|
+
let u, h, c, l;
|
|
21
|
+
e[2] !== m ? ({
|
|
22
|
+
headerTitle: c,
|
|
23
|
+
content: h,
|
|
24
|
+
onStateChange: l,
|
|
25
|
+
...u
|
|
26
|
+
} = m, e[2] = m, e[3] = u, e[4] = h, e[5] = c, e[6] = l) : (u = e[3], h = e[4], c = e[5], l = e[6]);
|
|
27
|
+
let g;
|
|
28
|
+
e[7] !== t ? (g = (a) => {
|
|
29
|
+
t.onReset && t.onReset(a), w("");
|
|
30
|
+
}, e[7] = t, e[8] = g) : g = e[8];
|
|
31
|
+
const C = g;
|
|
32
|
+
let y;
|
|
33
|
+
e[9] !== t ? (y = (a) => {
|
|
34
|
+
a && (t.onChange && t.onChange(a), w(a.target.value));
|
|
35
|
+
}, e[9] = t, e[10] = y) : y = e[10];
|
|
36
|
+
const T = y;
|
|
37
|
+
let B;
|
|
38
|
+
e[11] !== n || e[12] !== t.disabled ? (B = () => t.disabled || n && (n.disabled || n.hideContent), e[11] = n, e[12] = t.disabled, e[13] = B) : B = e[13];
|
|
39
|
+
const f = B;
|
|
40
|
+
let F;
|
|
41
|
+
e[14] !== n || e[15] !== t.readOnly ? (F = () => t.readOnly || n && n.readOnly, e[14] = n, e[15] = t.readOnly, e[16] = F) : F = e[16];
|
|
42
|
+
const k = F, A = n?.hideContent;
|
|
43
|
+
let R;
|
|
44
|
+
e[17] !== d || e[18] !== A || e[19] !== l || e[20] !== t || e[21] !== k || e[22] !== f ? (R = () => {
|
|
45
|
+
const a = k() || f() || A;
|
|
46
|
+
let i = {
|
|
47
|
+
icon: /* @__PURE__ */ s.jsx(z, { name: "filter1", color: "#a9a8a8" }, "filter-icon"),
|
|
19
48
|
key: "advanced-filter-button",
|
|
20
49
|
boxShadow: !1,
|
|
21
|
-
readOnly:
|
|
22
|
-
style: {
|
|
50
|
+
readOnly: k(),
|
|
51
|
+
style: {
|
|
52
|
+
padding: "0 0 0 5px",
|
|
53
|
+
width: 30
|
|
54
|
+
},
|
|
23
55
|
transparent: !0,
|
|
24
|
-
disabled:
|
|
56
|
+
disabled: f()
|
|
25
57
|
};
|
|
26
|
-
return
|
|
27
|
-
...
|
|
28
|
-
onClick: (
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
...n
|
|
32
|
-
}), n;
|
|
33
|
-
}, F = () => {
|
|
34
|
-
const o = Object.keys(h).length > 0;
|
|
35
|
-
let n = [/* @__PURE__ */ a.jsx(m, { name: "search", color: "#a9a8a8", disabled: d() }, "search-icon")];
|
|
36
|
-
const f = /* @__PURE__ */ a.jsx(
|
|
37
|
-
m,
|
|
38
|
-
{
|
|
39
|
-
name: "cancel2",
|
|
40
|
-
color: "#a9a8a8",
|
|
41
|
-
style: { cursor: "pointer", pointerEvents: "auto" },
|
|
42
|
-
onClick: b
|
|
58
|
+
return a || (i = {
|
|
59
|
+
...i,
|
|
60
|
+
onClick: ($) => {
|
|
61
|
+
t.onClick && t.onClick($), J(!d), l && l(!d);
|
|
43
62
|
},
|
|
44
|
-
|
|
45
|
-
),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
)
|
|
76
|
-
] });
|
|
63
|
+
...i
|
|
64
|
+
}), i;
|
|
65
|
+
}, e[17] = d, e[18] = A, e[19] = l, e[20] = t, e[21] = k, e[22] = f, e[23] = R) : R = e[23];
|
|
66
|
+
const H = R;
|
|
67
|
+
let E;
|
|
68
|
+
e[24] !== m || e[25] !== H || e[26] !== C || e[27] !== P || e[28] !== f || e[29] !== o ? (E = () => {
|
|
69
|
+
const a = Object.keys(m).length > 0;
|
|
70
|
+
let i = [/* @__PURE__ */ s.jsx(z, { name: "search", color: "#a9a8a8", disabled: f() }, "search-icon")];
|
|
71
|
+
const $ = /* @__PURE__ */ s.jsx(z, { name: "cancel2", color: "#a9a8a8", style: {
|
|
72
|
+
cursor: "pointer",
|
|
73
|
+
pointerEvents: "auto"
|
|
74
|
+
}, onClick: C }, "inputSearchIcon"), L = /* @__PURE__ */ s.jsx(W, { ...H() });
|
|
75
|
+
return a && (i = [...i, L]), P && o.trim() !== "" && (i = [$, ...i]), i;
|
|
76
|
+
}, e[24] = m, e[25] = H, e[26] = C, e[27] = P, e[28] = f, e[29] = o, e[30] = E) : E = e[30];
|
|
77
|
+
const V = E;
|
|
78
|
+
let S;
|
|
79
|
+
e[31] !== o || e[32] !== r ? (S = () => {
|
|
80
|
+
r !== void 0 && r !== o && w(r);
|
|
81
|
+
}, e[31] = o, e[32] = r, e[33] = S) : S = e[33];
|
|
82
|
+
let D;
|
|
83
|
+
if (e[34] !== r ? (D = [r], e[34] = r, e[35] = D) : D = e[35], N(S, D), n && n.unvisible)
|
|
84
|
+
return null;
|
|
85
|
+
let x;
|
|
86
|
+
e[36] !== V ? (x = V(), e[36] = V, e[37] = x) : x = e[37];
|
|
87
|
+
let b;
|
|
88
|
+
e[38] !== T || e[39] !== C || e[40] !== t || e[41] !== x || e[42] !== o ? (b = /* @__PURE__ */ s.jsx(U, { ...t, onReset: C, onChange: T, value: o, customClass: "", handlerSetOnDenied: K, rightElements: x }), e[38] = T, e[39] = C, e[40] = t, e[41] = x, e[42] = o, e[43] = b) : b = e[43];
|
|
89
|
+
let v;
|
|
90
|
+
e[44] !== d || e[45] !== u || e[46] !== h || e[47] !== c || e[48] !== l ? (v = d && /* @__PURE__ */ s.jsxs(X, { handlerClose: () => {
|
|
91
|
+
J(!1), l && l(!1);
|
|
92
|
+
}, ...u, children: [
|
|
93
|
+
c && /* @__PURE__ */ s.jsx(Y, { title: c }),
|
|
94
|
+
/* @__PURE__ */ s.jsx(Z, { children: h })
|
|
95
|
+
] }), e[44] = d, e[45] = u, e[46] = h, e[47] = c, e[48] = l, e[49] = v) : v = e[49];
|
|
96
|
+
let I;
|
|
97
|
+
return e[50] !== b || e[51] !== v ? (I = /* @__PURE__ */ s.jsxs(Q, { children: [
|
|
98
|
+
b,
|
|
99
|
+
v
|
|
100
|
+
] }), e[50] = b, e[51] = v, e[52] = I) : I = e[52], I;
|
|
77
101
|
};
|
|
78
102
|
export {
|
|
79
|
-
|
|
103
|
+
re as default
|
|
80
104
|
};
|
|
@@ -1,49 +1,28 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { j as l } from "../../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as j } from "../../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import b from "../../icons/index.js";
|
|
4
|
+
const B = (x) => {
|
|
5
|
+
const t = j.c(14), {
|
|
6
|
+
disabled: m,
|
|
7
|
+
showClearButton: p,
|
|
8
|
+
dropDownOpened: f,
|
|
8
9
|
handlerOpenClose: c,
|
|
9
|
-
handlerClear:
|
|
10
|
-
customClassForSideButtons:
|
|
11
|
-
} =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
pointerEvents: "none"
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
/* @__PURE__ */ n.jsx(
|
|
30
|
-
"button",
|
|
31
|
-
{
|
|
32
|
-
disabled: t,
|
|
33
|
-
tabIndex: -1,
|
|
34
|
-
className: "actionbutton buttonopenclose",
|
|
35
|
-
onClick: c,
|
|
36
|
-
children: /* @__PURE__ */ n.jsx(
|
|
37
|
-
e,
|
|
38
|
-
{
|
|
39
|
-
pointerEvents: "none",
|
|
40
|
-
name: a ? "mini_up" : "mini_down"
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
] });
|
|
10
|
+
handlerClear: a,
|
|
11
|
+
customClassForSideButtons: h
|
|
12
|
+
} = x, e = m === void 0 ? !1 : m, r = p === void 0 ? !0 : p, d = `actionbuttonsselect ${h}`;
|
|
13
|
+
let n;
|
|
14
|
+
t[0] !== e || t[1] !== a || t[2] !== r ? (n = r && /* @__PURE__ */ l.jsx("button", { disabled: e, tabIndex: -1, className: "actionbutton buttonclear", onClick: a, children: /* @__PURE__ */ l.jsx(b, { name: "cancel", pointerEvents: "none" }) }), t[0] = e, t[1] = a, t[2] = r, t[3] = n) : n = t[3];
|
|
15
|
+
const u = f ? "mini_up" : "mini_down";
|
|
16
|
+
let o;
|
|
17
|
+
t[4] !== u ? (o = /* @__PURE__ */ l.jsx(b, { pointerEvents: "none", name: u }), t[4] = u, t[5] = o) : o = t[5];
|
|
18
|
+
let s;
|
|
19
|
+
t[6] !== e || t[7] !== c || t[8] !== o ? (s = /* @__PURE__ */ l.jsx("button", { disabled: e, tabIndex: -1, className: "actionbutton buttonopenclose", onClick: c, children: o }), t[6] = e, t[7] = c, t[8] = o, t[9] = s) : s = t[9];
|
|
20
|
+
let i;
|
|
21
|
+
return t[10] !== d || t[11] !== n || t[12] !== s ? (i = /* @__PURE__ */ l.jsxs("div", { className: d, children: [
|
|
22
|
+
n,
|
|
23
|
+
s
|
|
24
|
+
] }), t[10] = d, t[11] = n, t[12] = s, t[13] = i) : i = t[13], i;
|
|
46
25
|
};
|
|
47
26
|
export {
|
|
48
|
-
|
|
27
|
+
B as default
|
|
49
28
|
};
|
|
@@ -1,118 +1,69 @@
|
|
|
1
|
-
import { j as n } from "../../chunks/jsx-runtime.
|
|
2
|
-
import { useState as I, useEffect as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { returnDropdownDynamicStyles as
|
|
6
|
-
import
|
|
1
|
+
import { j as n } from "../../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { useState as I, useEffect as R } from "react";
|
|
3
|
+
import f from "../../icons/index.js";
|
|
4
|
+
import P from "../../avatar/index.js";
|
|
5
|
+
import { returnDropdownDynamicStyles as h, getDropdownItemCssClass as A } from "./helper.js";
|
|
6
|
+
import B from "../../dropdown/Popup.js";
|
|
7
7
|
const V = (s) => {
|
|
8
8
|
const {
|
|
9
|
-
imageAlign:
|
|
10
|
-
striped:
|
|
11
|
-
dataCombo:
|
|
9
|
+
imageAlign: c = "left",
|
|
10
|
+
striped: x = !1,
|
|
11
|
+
dataCombo: o,
|
|
12
12
|
descriptionKey: r,
|
|
13
|
-
imgSrcKey:
|
|
13
|
+
imgSrcKey: y,
|
|
14
14
|
dropdownRef: a,
|
|
15
15
|
currents: l = [],
|
|
16
|
-
dropdownWidth:
|
|
17
|
-
gridWrapperStyle:
|
|
18
|
-
handleOnSelect:
|
|
19
|
-
inputValue:
|
|
20
|
-
handleOnFocus:
|
|
21
|
-
opened:
|
|
22
|
-
handleOnFilter:
|
|
23
|
-
selected:
|
|
24
|
-
searchOnDropdown:
|
|
25
|
-
handleOnKeydown:
|
|
26
|
-
searchNotFoundText:
|
|
27
|
-
idKey:
|
|
28
|
-
selectFieldRef:
|
|
29
|
-
} = s, [
|
|
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
|
-
|
|
67
|
-
}
|
|
68
|
-
),
|
|
69
|
-
/* @__PURE__ */ n.jsx(h, { name: "search", viewBox: "0 0 32 32" })
|
|
70
|
-
] }),
|
|
71
|
-
t.map((e) => {
|
|
72
|
-
const u = l && l.length > 0 ? l.some((f) => f[o] === e[o]) : !1, F = !!(p && p[o] === e[o]);
|
|
73
|
-
return /* @__PURE__ */ n.jsx(
|
|
74
|
-
"div",
|
|
75
|
-
{
|
|
76
|
-
className: B(F, u, y),
|
|
77
|
-
children: /* @__PURE__ */ n.jsxs(
|
|
78
|
-
"button",
|
|
79
|
-
{
|
|
80
|
-
className: "menubutton",
|
|
81
|
-
tabIndex: -1,
|
|
82
|
-
onClick: (f) => {
|
|
83
|
-
u || j(e);
|
|
84
|
-
},
|
|
85
|
-
children: [
|
|
86
|
-
e.iconName && /* @__PURE__ */ n.jsx(
|
|
87
|
-
h,
|
|
88
|
-
{
|
|
89
|
-
name: e.iconName,
|
|
90
|
-
customClass: "menuicon",
|
|
91
|
-
style: { order: i === "left" ? 0 : 1 }
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
g && e.imgSrcKey && /* @__PURE__ */ n.jsx(
|
|
95
|
-
A,
|
|
96
|
-
{
|
|
97
|
-
src: e.imgSrcKey,
|
|
98
|
-
customClass: "menuicon",
|
|
99
|
-
style: { order: i === "left" ? 0 : 1 }
|
|
100
|
-
}
|
|
101
|
-
),
|
|
102
|
-
/* @__PURE__ */ n.jsx("span", { className: "label", children: typeof r == "string" ? e[r] : r(e) })
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
},
|
|
107
|
-
`dropdowmIten ${e[o]}}`
|
|
108
|
-
);
|
|
109
|
-
}),
|
|
110
|
-
t && t.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "notfound", children: b })
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
}
|
|
115
|
-
);
|
|
16
|
+
dropdownWidth: g,
|
|
17
|
+
gridWrapperStyle: i,
|
|
18
|
+
handleOnSelect: w,
|
|
19
|
+
inputValue: j,
|
|
20
|
+
handleOnFocus: D,
|
|
21
|
+
opened: N,
|
|
22
|
+
handleOnFilter: S,
|
|
23
|
+
selected: m = null,
|
|
24
|
+
searchOnDropdown: v,
|
|
25
|
+
handleOnKeydown: C,
|
|
26
|
+
searchNotFoundText: K,
|
|
27
|
+
idKey: t,
|
|
28
|
+
selectFieldRef: b
|
|
29
|
+
} = s, [d, F] = I(h({
|
|
30
|
+
...s
|
|
31
|
+
}));
|
|
32
|
+
return R(() => {
|
|
33
|
+
a.current && F(h({
|
|
34
|
+
...s
|
|
35
|
+
}));
|
|
36
|
+
}, [a.current, o]), /* @__PURE__ */ n.jsx(B, { align: "left", leftPosition: d.left, topPosition: d.top, targetRef: b?.current, children: /* @__PURE__ */ n.jsxs("div", { className: "select-dropdown", ref: a, style: {
|
|
37
|
+
width: g,
|
|
38
|
+
marginLeft: i ? i.paddingLeft : "0",
|
|
39
|
+
maxHeight: d.maxHeight
|
|
40
|
+
}, children: [
|
|
41
|
+
v && /* @__PURE__ */ n.jsxs("div", { className: "filtercontainer", children: [
|
|
42
|
+
/* @__PURE__ */ n.jsx("input", { className: "filterinput", type: "text", value: j, onFocus: () => {
|
|
43
|
+
D();
|
|
44
|
+
}, onChange: (e) => {
|
|
45
|
+
S(e.target.value);
|
|
46
|
+
}, onKeyDown: (e) => {
|
|
47
|
+
C(e);
|
|
48
|
+
}, autoFocus: N }),
|
|
49
|
+
/* @__PURE__ */ n.jsx(f, { name: "search", viewBox: "0 0 32 32" })
|
|
50
|
+
] }),
|
|
51
|
+
o.map((e) => {
|
|
52
|
+
const p = l && l.length > 0 ? l.some((u) => u[t] === e[t]) : !1, O = !!(m && m[t] === e[t]);
|
|
53
|
+
return /* @__PURE__ */ n.jsx("div", { className: A(O, p, x), children: /* @__PURE__ */ n.jsxs("button", { className: "menubutton", tabIndex: -1, onClick: (u) => {
|
|
54
|
+
p || w(e);
|
|
55
|
+
}, children: [
|
|
56
|
+
e.iconName && /* @__PURE__ */ n.jsx(f, { name: e.iconName, customClass: "menuicon", style: {
|
|
57
|
+
order: c === "left" ? 0 : 1
|
|
58
|
+
} }),
|
|
59
|
+
y && e.imgSrcKey && /* @__PURE__ */ n.jsx(P, { src: e.imgSrcKey, customClass: "menuicon", style: {
|
|
60
|
+
order: c === "left" ? 0 : 1
|
|
61
|
+
} }),
|
|
62
|
+
/* @__PURE__ */ n.jsx("span", { className: "label", children: typeof r == "string" ? e[r] : r(e) })
|
|
63
|
+
] }) }, `dropdowmIten ${e[t]}}`);
|
|
64
|
+
}),
|
|
65
|
+
o && o.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "notfound", children: K })
|
|
66
|
+
] }) });
|
|
116
67
|
};
|
|
117
68
|
export {
|
|
118
69
|
V as default
|
|
@@ -2,7 +2,7 @@ import { IDropdownSelectProps } from '../types';
|
|
|
2
2
|
import { GetMultipleFilteredParams, GetSimpleFilteredParams } from './types';
|
|
3
3
|
export declare const contentClass: (props: IDropdownSelectProps) => string;
|
|
4
4
|
export declare const getDropdownItemCssClass: (selected: boolean, disabled: boolean, striped: boolean) => string;
|
|
5
|
-
export declare const getFilteredSimpleDataCombo: ({ dataSource, descriptionKey, inputText, }: Omit<GetSimpleFilteredParams,
|
|
5
|
+
export declare const getFilteredSimpleDataCombo: ({ dataSource, descriptionKey, inputText, }: Omit<GetSimpleFilteredParams, "currents">) => any[];
|
|
6
6
|
export declare const getFilteredMultipleDataCombo: ({ dataSource, inputText, descriptionKey, currents, }: GetMultipleFilteredParams) => any[];
|
|
7
7
|
export declare const returnDropdownDynamicStyles: ({ selectFieldRef, dropdownMaxHeight, dropdownRef }: IDropdownSelectProps) => {
|
|
8
8
|
maxHeight: number;
|
|
@@ -1,50 +1,48 @@
|
|
|
1
|
-
const
|
|
2
|
-
let
|
|
3
|
-
return
|
|
4
|
-
},
|
|
5
|
-
dataSource:
|
|
6
|
-
descriptionKey:
|
|
7
|
-
inputText:
|
|
8
|
-
}) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
dropdownRef: r,
|
|
22
|
-
dropdownRects: t
|
|
23
|
-
}, o = !1) => o && (r != null && r.current) && (t != null && t.height) ? n.top + window.scrollY - (r.current && t.height) - 10 : n.top + window.scrollY + n.height, B = ({
|
|
24
|
-
selectFieldRef: n,
|
|
25
|
-
dropdownMaxHeight: r,
|
|
26
|
-
dropdownRef: t
|
|
1
|
+
const C = (o) => `content ${o.showClearButton ? "" : "noclear"}`, f = (o, n, e) => {
|
|
2
|
+
let t = "item";
|
|
3
|
+
return t += o && !n ? " -selected " : "", t += n ? " -disabled" : "", t += !o && !n && e ? " -striped " : "", t;
|
|
4
|
+
}, h = ({
|
|
5
|
+
dataSource: o,
|
|
6
|
+
descriptionKey: n,
|
|
7
|
+
inputText: e
|
|
8
|
+
}) => o && o.filter((t) => typeof n == "string" ? t[n]?.toLowerCase().indexOf(e?.toString().toLowerCase()) > -1 : n(t)?.toLowerCase().indexOf(e?.toString().toLowerCase()) > -1), D = ({
|
|
9
|
+
dataSource: o,
|
|
10
|
+
inputText: n,
|
|
11
|
+
descriptionKey: e,
|
|
12
|
+
currents: t
|
|
13
|
+
}) => o.filter((r) => typeof e == "string" ? r[e].toLowerCase().indexOf(n?.toString().toLowerCase()) > -1 && !t.includes(r) : e(r)?.toLowerCase().indexOf(n?.toString().toLowerCase()) > -1 && !t.includes(r)), l = ({
|
|
14
|
+
selectFieldRects: o,
|
|
15
|
+
dropdownRef: n,
|
|
16
|
+
dropdownRects: e
|
|
17
|
+
}, t = !1) => t && n?.current && e?.height ? o.top + window.scrollY - (n.current && e.height) - 10 : o.top + window.scrollY + o.height, m = ({
|
|
18
|
+
selectFieldRef: o,
|
|
19
|
+
dropdownMaxHeight: n,
|
|
20
|
+
dropdownRef: e
|
|
27
21
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
let
|
|
30
|
-
return !
|
|
31
|
-
selectFieldRects:
|
|
32
|
-
dropdownRef:
|
|
33
|
-
dropdownRects:
|
|
34
|
-
}, !0)) : (
|
|
35
|
-
selectFieldRects:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
const t = o?.current ? o.current.getBoundingClientRect() : void 0, r = e?.current ? e.current.getBoundingClientRect() : void 0, u = t ? t?.bottom : 0, g = t ? t?.top : 0, c = window.innerHeight - u, w = 30;
|
|
23
|
+
let a = 200, s = n, i;
|
|
24
|
+
return !s || s <= 0 ? c < a && t ? (s = g, i = l({
|
|
25
|
+
selectFieldRects: t,
|
|
26
|
+
dropdownRef: e,
|
|
27
|
+
dropdownRects: r
|
|
28
|
+
}, !0)) : (s = c, i = t ? l({
|
|
29
|
+
selectFieldRects: t
|
|
30
|
+
}) : 0) : (a = s, c < a && t ? i = l({
|
|
31
|
+
selectFieldRects: t,
|
|
32
|
+
dropdownRef: e,
|
|
33
|
+
dropdownRects: r
|
|
34
|
+
}, !0) : i = t ? l({
|
|
35
|
+
selectFieldRects: t
|
|
36
|
+
}) : 0), {
|
|
37
|
+
maxHeight: s - w,
|
|
38
|
+
top: i,
|
|
39
|
+
left: t ? t.left : 0
|
|
42
40
|
};
|
|
43
41
|
};
|
|
44
42
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
C as contentClass,
|
|
44
|
+
f as getDropdownItemCssClass,
|
|
45
|
+
D as getFilteredMultipleDataCombo,
|
|
46
|
+
h as getFilteredSimpleDataCombo,
|
|
47
|
+
m as returnDropdownDynamicStyles
|
|
50
48
|
};
|
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
1
|
+
import { j as y } from "../../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as n } from "../../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import m from "./multiple/index.js";
|
|
3
4
|
import '../../assets/gridlayout.css';import '../../assets/index26.css';/* empty css */
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
) : /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
return r !== void 0 ? /* @__PURE__ */ t.jsx(l, { customClass: "-withinput", cols: r, children: o }) : o;
|
|
5
|
+
import u from "../../gridlayout/GridCol.js";
|
|
6
|
+
import K from "./simple/index.js";
|
|
7
|
+
const A = (i) => {
|
|
8
|
+
const e = n.c(15);
|
|
9
|
+
let d, c, l, t;
|
|
10
|
+
e[0] !== i ? ({
|
|
11
|
+
gridLayout: d,
|
|
12
|
+
multiple: c,
|
|
13
|
+
value: t,
|
|
14
|
+
...l
|
|
15
|
+
} = i, e[0] = i, e[1] = d, e[2] = c, e[3] = l, e[4] = t) : (d = e[1], c = e[2], l = e[3], t = e[4]);
|
|
16
|
+
let r;
|
|
17
|
+
e[5] !== c || e[6] !== l || e[7] !== i.dataSource || e[8] !== i.descriptionKey || e[9] !== i.idKey || e[10] !== t ? (r = c ? /* @__PURE__ */ y.jsx(m, { ...l, dataSource: i.dataSource ? i.dataSource : [], idKey: i.idKey ? i.idKey : "", value: Array.isArray(t) ? t : void 0, descriptionKey: i.descriptionKey ? i.descriptionKey : "" }) : /* @__PURE__ */ y.jsx(K, { ...l, idKey: i.idKey ? i.idKey : "", value: Array.isArray(t) ? void 0 : t, descriptionKey: i.descriptionKey ? i.descriptionKey : "" }), e[5] = c, e[6] = l, e[7] = i.dataSource, e[8] = i.descriptionKey, e[9] = i.idKey, e[10] = t, e[11] = r) : r = e[11];
|
|
18
|
+
const a = r;
|
|
19
|
+
if (d !== void 0) {
|
|
20
|
+
let o;
|
|
21
|
+
return e[12] !== a || e[13] !== d ? (o = /* @__PURE__ */ y.jsx(u, { customClass: "-withinput", cols: d, children: a }), e[12] = a, e[13] = d, e[14] = o) : o = e[14], o;
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
26
24
|
};
|
|
27
25
|
export {
|
|
28
|
-
|
|
26
|
+
A as default
|
|
29
27
|
};
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { j as m } from "../../../chunks/jsx-runtime.D1SHvdVE.js";
|
|
2
|
+
import { c as p } from "../../../chunks/compiler-runtime.Cu50tn6L.js";
|
|
3
|
+
import d from "react";
|
|
4
|
+
const j = (a) => {
|
|
5
|
+
const e = p.c(11), {
|
|
6
|
+
currents: l,
|
|
7
|
+
descriptionKey: t,
|
|
8
|
+
idKey: s,
|
|
9
|
+
handlerOnUnselect: i
|
|
10
|
+
} = a;
|
|
11
|
+
let r;
|
|
12
|
+
if (e[0] !== l || e[1] !== t || e[2] !== i || e[3] !== s) {
|
|
13
|
+
let o;
|
|
14
|
+
e[5] !== t || e[6] !== i || e[7] !== s ? (o = (c) => /* @__PURE__ */ m.jsxs("div", { className: "selecteditem", children: [
|
|
15
|
+
typeof t == "string" ? c[t] : t(c),
|
|
16
|
+
/* @__PURE__ */ m.jsx("button", { className: "close", tabIndex: -1, onClick: () => i(c[s]) })
|
|
17
|
+
] }, `selected-${c[s]}`), e[5] = t, e[6] = i, e[7] = s, e[8] = o) : o = e[8], r = l.map(o), e[0] = l, e[1] = t, e[2] = i, e[3] = s, e[4] = r;
|
|
18
|
+
} else
|
|
19
|
+
r = e[4];
|
|
20
|
+
let n;
|
|
21
|
+
return e[9] !== r ? (n = /* @__PURE__ */ m.jsx(d.Fragment, { children: r }), e[9] = r, e[10] = n) : n = e[10], n;
|
|
22
|
+
};
|
|
19
23
|
export {
|
|
20
|
-
|
|
24
|
+
j as default
|
|
21
25
|
};
|