@lanaco/lnc-react-ui 4.0.20 → 4.0.22
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/dist/ActionsToolbar.cjs +2 -2
- package/dist/ActionsToolbar.js +27 -24
- package/dist/TableView.cjs +2 -2
- package/dist/TableView.js +132 -128
- package/package.json +2 -1
package/dist/ActionsToolbar.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime")
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),B=require("react"),e=require("./index-BIlhCoy2.cjs"),V=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),Y=require("./DropdownMenu.cjs"),i=require("./DropdownItem.cjs"),M=require("./Separator.cjs"),y=require("./Button.cjs"),b=require("./utils-DTAPpJXU.cjs"),Z=require("./ThemeProvider.cjs"),F=V.newStyled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
border-radius: 8px;
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
gap: 0.5rem;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
`,c
|
|
19
|
+
`,c=B.forwardRef((t,T)=>{const{__TYPE__:G="ACTIONS_TOOLBAR",showCreate:u=!0,enableCreate:x=!0,createText:d="Create new item",showEdit:m=!0,enableEditOnSelection:g=!0,editText:P="Edit",showDelete:w=!0,enableDeleteOnSelection:h=!0,deleteText:C="Delete",showCopy:f=!0,enableCopyOnSelection:O=!0,copyText:j="Copy",actionsText:S="Actions",customActions:a,selectedRowsLength:n=0,readOnly:s=!1,actionDropdownProps:D,actionsDropdownZIndex:_,actionsDropdownPlacement:q,onCreate:R=()=>{},onEdit:E=()=>{},onDelete:k=()=>{},onCopy:v=()=>{},className:A="",style:I={},color:l="primary",size:p="small",selectedRows:N,...z}=t,{theme:L}=Z.useTheme();return o.jsxs(F,{ref:T,theme:L,color:l,className:`lnc-table-view-actions-toolbar ${A}`,style:I,...z,children:[o.jsx("div",{children:u&&s==!1&&o.jsx(y,{leadingIcon:"plus",btnType:"outline",type:"button",color:l,size:p,title:d,disabled:!x,onClick:R,text:d})}),o.jsx("div",{children:o.jsxs(Y,{className:"lnc-table-view-actions-toolbar-dropdown",color:l,size:p,zIndex:_,placement:q,...D,control:o.jsx(y,{text:S,btnType:"outline",trailingIcon:"angle-down",color:l,size:p,type:"button"}),children:[f&&s==!1&&o.jsx(i,{icon:"copy",disabled:!(O&&n>0),onClick:v,children:j}),m&&s==!1&&o.jsx(i,{icon:"pen",disabled:!(g&&n>0),onClick:E,children:P}),w&&s==!1&&o.jsx(i,{icon:"trash",disabled:!(h&&n>0),onClick:k,children:C}),o.jsx(M,{}),a==null?void 0:a.map((r,$)=>{if((r==null?void 0:r.show)!=!1)return o.jsx(i,{icon:r.icon,disabled:!(r.enableOnSelection==!0&&n>0||r.enable==!0&&r.enableOnSelection==!1),onClick:()=>{r.onAction(N)},children:r.name},$)})]})})]})});c.propTypes={__TYPE__:e.PropTypes.string,showCreate:e.PropTypes.bool,enableCreate:e.PropTypes.bool,createText:e.PropTypes.string,showEdit:e.PropTypes.bool,enableEditOnSelection:e.PropTypes.bool,editText:e.PropTypes.string,showDelete:e.PropTypes.bool,enableDeleteOnSelection:e.PropTypes.bool,deleteText:e.PropTypes.string,showCopy:e.PropTypes.bool,enableCopyOnSelection:e.PropTypes.bool,copyText:e.PropTypes.string,actionsText:e.PropTypes.string,customActions:e.PropTypes.array,selectedRowsLength:e.PropTypes.number,readOnly:e.PropTypes.bool,onCreate:e.PropTypes.func,onEdit:e.PropTypes.func,onDelete:e.PropTypes.func,onCopy:e.PropTypes.func,className:e.PropTypes.string,style:e.PropTypes.object,size:e.PropTypes.oneOf(["small","medium","large"]),color:e.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};c.displayName="ACTIONS_TOOLBAR";module.exports=c;
|
package/dist/ActionsToolbar.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as M } from "react";
|
|
3
3
|
import { P as e } from "./index-BYnWp42a.js";
|
|
4
|
-
import { n as
|
|
5
|
-
import
|
|
4
|
+
import { n as V } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
+
import Z from "./DropdownMenu.js";
|
|
6
6
|
import i from "./DropdownItem.js";
|
|
7
|
-
import
|
|
7
|
+
import q from "./Separator.js";
|
|
8
8
|
import b from "./Button.js";
|
|
9
9
|
import { a as m } from "./utils-C52T57HO.js";
|
|
10
|
-
import { useTheme as
|
|
11
|
-
const
|
|
10
|
+
import { useTheme as F } from "./ThemeProvider.js";
|
|
11
|
+
const G = V.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
14
|
border-radius: 8px;
|
|
@@ -40,9 +40,9 @@ const F = M.div`
|
|
|
40
40
|
gap: 0.5rem;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
`, u =
|
|
43
|
+
`, u = M((n, f) => {
|
|
44
44
|
const {
|
|
45
|
-
__TYPE__:
|
|
45
|
+
__TYPE__: H = "ACTIONS_TOOLBAR",
|
|
46
46
|
showCreate: y = !0,
|
|
47
47
|
enableCreate: g = !0,
|
|
48
48
|
createText: c = "Create new item",
|
|
@@ -65,27 +65,28 @@ const F = M.div`
|
|
|
65
65
|
//----------------
|
|
66
66
|
onCreate: N = () => {
|
|
67
67
|
},
|
|
68
|
-
onEdit:
|
|
68
|
+
onEdit: R = () => {
|
|
69
69
|
},
|
|
70
|
-
onDelete:
|
|
70
|
+
onDelete: v = () => {
|
|
71
71
|
},
|
|
72
|
-
onCopy:
|
|
72
|
+
onCopy: P = () => {
|
|
73
73
|
},
|
|
74
74
|
className: j = "",
|
|
75
75
|
style: z = {},
|
|
76
76
|
color: a = "primary",
|
|
77
77
|
size: d = "small",
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
selectedRows: L,
|
|
79
|
+
...$
|
|
80
|
+
} = n, { theme: B } = F();
|
|
80
81
|
return /* @__PURE__ */ p(
|
|
81
|
-
|
|
82
|
+
G,
|
|
82
83
|
{
|
|
83
84
|
ref: f,
|
|
84
|
-
theme:
|
|
85
|
+
theme: B,
|
|
85
86
|
color: a,
|
|
86
87
|
className: `lnc-table-view-actions-toolbar ${j}`,
|
|
87
88
|
style: z,
|
|
88
|
-
|
|
89
|
+
...$,
|
|
89
90
|
children: [
|
|
90
91
|
/* @__PURE__ */ t("div", { children: y && l == !1 && /* @__PURE__ */ t(
|
|
91
92
|
b,
|
|
@@ -102,7 +103,7 @@ const F = M.div`
|
|
|
102
103
|
}
|
|
103
104
|
) }),
|
|
104
105
|
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ p(
|
|
105
|
-
|
|
106
|
+
Z,
|
|
106
107
|
{
|
|
107
108
|
className: "lnc-table-view-actions-toolbar-dropdown",
|
|
108
109
|
color: a,
|
|
@@ -127,7 +128,7 @@ const F = M.div`
|
|
|
127
128
|
{
|
|
128
129
|
icon: "copy",
|
|
129
130
|
disabled: !(D && r > 0),
|
|
130
|
-
onClick:
|
|
131
|
+
onClick: P,
|
|
131
132
|
children: _
|
|
132
133
|
}
|
|
133
134
|
),
|
|
@@ -136,7 +137,7 @@ const F = M.div`
|
|
|
136
137
|
{
|
|
137
138
|
icon: "pen",
|
|
138
139
|
disabled: !(h && r > 0),
|
|
139
|
-
onClick:
|
|
140
|
+
onClick: R,
|
|
140
141
|
children: T
|
|
141
142
|
}
|
|
142
143
|
),
|
|
@@ -145,22 +146,24 @@ const F = M.div`
|
|
|
145
146
|
{
|
|
146
147
|
icon: "trash",
|
|
147
148
|
disabled: !(C && r > 0),
|
|
148
|
-
onClick:
|
|
149
|
+
onClick: v,
|
|
149
150
|
children: O
|
|
150
151
|
}
|
|
151
152
|
),
|
|
152
|
-
/* @__PURE__ */ t(
|
|
153
|
-
s == null ? void 0 : s.map((o,
|
|
153
|
+
/* @__PURE__ */ t(q, {}),
|
|
154
|
+
s == null ? void 0 : s.map((o, Y) => {
|
|
154
155
|
if ((o == null ? void 0 : o.show) != !1)
|
|
155
156
|
return /* @__PURE__ */ t(
|
|
156
157
|
i,
|
|
157
158
|
{
|
|
158
159
|
icon: o.icon,
|
|
159
160
|
disabled: !(o.enableOnSelection == !0 && r > 0 || o.enable == !0 && o.enableOnSelection == !1),
|
|
160
|
-
onClick:
|
|
161
|
+
onClick: () => {
|
|
162
|
+
o.onAction(L);
|
|
163
|
+
},
|
|
161
164
|
children: o.name
|
|
162
165
|
},
|
|
163
|
-
|
|
166
|
+
Y
|
|
164
167
|
);
|
|
165
168
|
})
|
|
166
169
|
]
|
package/dist/TableView.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const b=require("react/jsx-runtime"),g=require("react"),e=require("./index-BIlhCoy2.cjs"),ne=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),re=require("./ActionsToolbar.cjs"),te=require("./Pagination.cjs"),T=require("./utils-DTAPpJXU.cjs"),le=require("./Table.cjs"),se=ne.newStyled.div`
|
|
2
2
|
& .table-view-pagination-lnc {
|
|
3
3
|
padding: 0 0.625rem;
|
|
4
4
|
}
|
|
5
5
|
& .table-view-toolbar-lnc {
|
|
6
6
|
margin: 0 0.625rem;
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,h=g.forwardRef((z,E)=>{const{__TYPE__:ce="TABLE_VIEW",goToPreviousView:ie,tableProps:o={},paginationProps:n={},actionsToolbarProps:D={},rowsSingleSelect:w=!0,rowsMultiSelect:d=!1,loading:ae=!1,showCreate:N=!0,enableCreate:P=!0,enableDetails:ue=!0,showEdit:O,enableEditOnSelection:f,showDelete:_=!0,enableDeleteOnSelection:x=!0,showCopy:A=!0,enableCopyOnSelection:j=!0,customActions:v,pagination:q=!0,readOnly:S=!1,actionsDropdownZIndex:k=null,actionsDropdownPlacement:I=null,actionDropdownProps:L,onCreate:V=()=>{},onEdit:B=()=>{},onDelete:F=()=>{},onDetails:M=()=>{},onCopy:W=()=>{},onFilter:ye=()=>{},onSort:pe=()=>{},onPageChange:Y=()=>{},onEmptyRowsSelection:Te=()=>{},className:de="",style:me={},color:a="primary",size:u="small",children:y,onChangeRowsSelection:p=()=>{},...Z}=z,r={...D,showCreate:N,enableCreate:P,showCopy:A,enableCopyOnSelection:j,showEdit:O,enableEditOnSelection:f,showDelete:_,enableDeleteOnSelection:x,customActions:v,readOnly:S},[c,m]=g.useState([]),t=g.useRef([]),G=(l,s)=>{var i;s?(d||w)&&(t.current=d?[...t.current,l]:[l],p(t==null?void 0:t.current),m(t==null?void 0:t.current)):(t.current=d?(i=t==null?void 0:t.current)==null?void 0:i.filter(C=>C!=l):[],p==null||p(t==null?void 0:t.current),m(t==null?void 0:t.current))},H=(l,s)=>{var i,C;((i=l.target)==null?void 0:i.type)!=="checkbox"&&((C=l.target)==null?void 0:C.className)!=="checkmark"&&(o!=null&&o.onRowClick&&o.onRowClick(l,s),J(s,l))},J=(l,s)=>{M(l,s)},K=l=>{V(l)},Q=l=>{W(c,l)},U=l=>{B(c,l),t.current=[],m([]),p([])},X=l=>{F(c,l),t.current=[],m([]),p([])},$=l=>{Y(l)},R=()=>T.renderCustomElement(T.getCustomRender("ACTIONS_TOOLBAR",y),{...r,size:r!=null&&r.size?r.size:u,color:r!=null&&r.color?r.color:a,className:"table-view-toolbar-lnc "+(r==null?void 0:r.className)},y)||b.jsx(re,{...r,className:"table-view-toolbar-lnc "+(r==null?void 0:r.className),size:r!=null&&r.size?r.size:u,color:r!=null&&r.color?r.color:a,selectedRowsLength:c!=null&&c.length?c.length:0,onCreate:K,onCopy:Q,onEdit:U,onDelete:X,actionsDropdownZIndex:k,actionDropdownProps:L,actionsDropdownPlacement:I,selectedRows:t==null?void 0:t.current}),ee=()=>T.renderCustomElement(T.getCustomRender("TABLE",y),{...o,size:o!=null&&o.size?o.size:u,color:o!=null&&o.color?o.color:a,className:"table-view-pagination-lnc "+(o==null?void 0:o.className)},y)||b.jsx(le.default,{size:o!=null&&o.size?o.size:u,color:o!=null&&o.color?o.color:a,EnableSelection:(w||d)&&S==!1,onSelectRow:(l,s,i)=>G(s,!i),SelectedData:c,onRowClick:(l,s)=>H(l,s),...o}),oe=()=>T.renderCustomElement(T.getCustomRender("PAGINATION",y),{...n,size:n!=null&&n.size?n.size:u,color:n!=null&&n.color?n.color:a,className:"table-view-pagination-lnc "+(n==null?void 0:n.className)},y)||b.jsx(te,{...n,size:n!=null&&n.size?n.size:u,color:n!=null&&n.color?n.color:a,className:"table-view-pagination-lnc "+(n==null?void 0:n.className),onPageChange:$});return b.jsxs(se,{ref:E,...Z,children:[R(),ee(),q==!0&&oe()]})});h.propTypes={__TYPE__:e.PropTypes.string,tableProps:e.PropTypes.object,actionsToolbarProps:e.PropTypes.object,paginationProps:e.PropTypes.object,rowsSingleSelect:e.PropTypes.bool,rowsMultiSelect:e.PropTypes.bool,loading:e.PropTypes.bool,showCreate:e.PropTypes.bool,actionsDropdownZIndex:e.PropTypes.any,actionsDropdownPlacement:e.PropTypes.any,enableCreate:e.PropTypes.bool,enableDetails:e.PropTypes.bool,showEdit:e.PropTypes.bool,enableEditOnSelection:e.PropTypes.bool,showDelete:e.PropTypes.bool,enableDeleteOnSelection:e.PropTypes.bool,showCopy:e.PropTypes.bool,enableCopyOnSelection:e.PropTypes.bool,customActions:e.PropTypes.array,pagination:e.PropTypes.bool,readOnly:e.PropTypes.bool,onCreate:e.PropTypes.func,onEdit:e.PropTypes.func,onDelete:e.PropTypes.func,onDetails:e.PropTypes.func,onCopy:e.PropTypes.func,onFilter:e.PropTypes.func,onSort:e.PropTypes.func,onPageChange:e.PropTypes.func,className:e.PropTypes.string,style:e.PropTypes.object,size:e.PropTypes.oneOf(["small","medium","large"]),color:e.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};h.displayName="TABLE_VIEW";module.exports=h;
|
package/dist/TableView.js
CHANGED
|
@@ -1,169 +1,173 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as oe, jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as le, useState as te, useRef as ce } from "react";
|
|
3
3
|
import { P as e } from "./index-BYnWp42a.js";
|
|
4
|
-
import { n as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { r as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
4
|
+
import { n as re } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
+
import ae from "./ActionsToolbar.js";
|
|
6
|
+
import ie from "./Pagination.js";
|
|
7
|
+
import { r as g, i as w } from "./utils-C52T57HO.js";
|
|
8
|
+
import se from "./Table.js";
|
|
9
|
+
const me = re.div`
|
|
10
10
|
& .table-view-pagination-lnc {
|
|
11
11
|
padding: 0 0.625rem;
|
|
12
12
|
}
|
|
13
13
|
& .table-view-toolbar-lnc {
|
|
14
14
|
margin: 0 0.625rem;
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
16
|
+
`, z = le((D, E) => {
|
|
17
17
|
const {
|
|
18
|
-
__TYPE__:
|
|
19
|
-
goToPreviousView:
|
|
20
|
-
tableProps:
|
|
21
|
-
paginationProps:
|
|
22
|
-
actionsToolbarProps:
|
|
23
|
-
rowsSingleSelect:
|
|
24
|
-
rowsMultiSelect:
|
|
25
|
-
loading:
|
|
26
|
-
showCreate:
|
|
27
|
-
enableCreate:
|
|
28
|
-
enableDetails:
|
|
29
|
-
showEdit:
|
|
30
|
-
enableEditOnSelection:
|
|
31
|
-
showDelete:
|
|
32
|
-
enableDeleteOnSelection:
|
|
33
|
-
showCopy:
|
|
34
|
-
enableCopyOnSelection:
|
|
35
|
-
customActions:
|
|
36
|
-
pagination:
|
|
37
|
-
readOnly:
|
|
38
|
-
actionsDropdownZIndex:
|
|
39
|
-
actionsDropdownPlacement:
|
|
40
|
-
actionDropdownProps:
|
|
18
|
+
__TYPE__: ue = "TABLE_VIEW",
|
|
19
|
+
goToPreviousView: de,
|
|
20
|
+
tableProps: n = {},
|
|
21
|
+
paginationProps: o = {},
|
|
22
|
+
actionsToolbarProps: T = {},
|
|
23
|
+
rowsSingleSelect: S = !0,
|
|
24
|
+
rowsMultiSelect: b = !1,
|
|
25
|
+
loading: be = !1,
|
|
26
|
+
showCreate: N = !0,
|
|
27
|
+
enableCreate: O = !0,
|
|
28
|
+
enableDetails: he = !0,
|
|
29
|
+
showEdit: _,
|
|
30
|
+
enableEditOnSelection: A,
|
|
31
|
+
showDelete: v = !0,
|
|
32
|
+
enableDeleteOnSelection: k = !0,
|
|
33
|
+
showCopy: I = !0,
|
|
34
|
+
enableCopyOnSelection: j = !0,
|
|
35
|
+
customActions: x,
|
|
36
|
+
pagination: L = !0,
|
|
37
|
+
readOnly: f = !1,
|
|
38
|
+
actionsDropdownZIndex: V = null,
|
|
39
|
+
actionsDropdownPlacement: B = null,
|
|
40
|
+
actionDropdownProps: F,
|
|
41
41
|
//----------------
|
|
42
|
-
onCreate:
|
|
42
|
+
onCreate: M = () => {
|
|
43
43
|
},
|
|
44
|
-
onEdit:
|
|
44
|
+
onEdit: W = () => {
|
|
45
45
|
},
|
|
46
|
-
onDelete:
|
|
46
|
+
onDelete: Y = () => {
|
|
47
47
|
},
|
|
48
|
-
onDetails:
|
|
48
|
+
onDetails: Z = () => {
|
|
49
49
|
},
|
|
50
|
-
onCopy:
|
|
50
|
+
onCopy: p = () => {
|
|
51
51
|
},
|
|
52
|
-
onFilter:
|
|
52
|
+
onFilter: ye = () => {
|
|
53
53
|
},
|
|
54
|
-
onSort:
|
|
54
|
+
onSort: Ce = () => {
|
|
55
55
|
},
|
|
56
|
-
onPageChange:
|
|
56
|
+
onPageChange: G = () => {
|
|
57
57
|
},
|
|
58
|
-
onEmptyRowsSelection:
|
|
58
|
+
onEmptyRowsSelection: ge = () => {
|
|
59
59
|
},
|
|
60
60
|
//------------------
|
|
61
|
-
className:
|
|
62
|
-
style:
|
|
63
|
-
color:
|
|
64
|
-
size:
|
|
65
|
-
children:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
...
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
var
|
|
83
|
-
((
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
61
|
+
className: we = "",
|
|
62
|
+
style: Se = {},
|
|
63
|
+
color: s = "primary",
|
|
64
|
+
size: m = "small",
|
|
65
|
+
children: u,
|
|
66
|
+
onChangeRowsSelection: d = () => {
|
|
67
|
+
},
|
|
68
|
+
...q
|
|
69
|
+
} = D, l = {
|
|
70
|
+
...T,
|
|
71
|
+
showCreate: N,
|
|
72
|
+
enableCreate: O,
|
|
73
|
+
showCopy: I,
|
|
74
|
+
enableCopyOnSelection: j,
|
|
75
|
+
showEdit: _,
|
|
76
|
+
enableEditOnSelection: A,
|
|
77
|
+
showDelete: v,
|
|
78
|
+
enableDeleteOnSelection: k,
|
|
79
|
+
customActions: x,
|
|
80
|
+
readOnly: f
|
|
81
|
+
}, [a, h] = te([]), t = ce([]), H = (c, r) => {
|
|
82
|
+
var i;
|
|
83
|
+
r ? (b || S) && (t.current = b ? [...t.current, c] : [c], d(t == null ? void 0 : t.current), h(t == null ? void 0 : t.current)) : (t.current = b ? (i = t == null ? void 0 : t.current) == null ? void 0 : i.filter((y) => y != c) : [], d == null || d(t == null ? void 0 : t.current), h(t == null ? void 0 : t.current));
|
|
84
|
+
}, J = (c, r) => {
|
|
85
|
+
var i, y;
|
|
86
|
+
((i = c.target) == null ? void 0 : i.type) !== "checkbox" && ((y = c.target) == null ? void 0 : y.className) !== "checkmark" && (n != null && n.onRowClick && n.onRowClick(c, r), K(r, c));
|
|
87
|
+
}, K = (c, r) => {
|
|
88
|
+
Z(c, r);
|
|
89
|
+
}, Q = (c) => {
|
|
90
|
+
M(c);
|
|
91
|
+
}, U = (c) => {
|
|
92
|
+
p(a, c);
|
|
93
|
+
}, X = (c) => {
|
|
94
|
+
W(a, c), t.current = [], h([]), d([]);
|
|
95
|
+
}, $ = (c) => {
|
|
96
|
+
Y(a, c), t.current = [], h([]), d([]);
|
|
97
|
+
}, R = (c) => {
|
|
98
|
+
G(c);
|
|
99
|
+
}, P = () => g(
|
|
100
|
+
w("ACTIONS_TOOLBAR", u),
|
|
98
101
|
{
|
|
99
102
|
...l,
|
|
100
|
-
size: l != null && l.size ? l.size :
|
|
101
|
-
color: l != null && l.color ? l.color :
|
|
103
|
+
size: l != null && l.size ? l.size : m,
|
|
104
|
+
color: l != null && l.color ? l.color : s,
|
|
102
105
|
className: "table-view-toolbar-lnc " + (l == null ? void 0 : l.className)
|
|
103
106
|
},
|
|
104
|
-
|
|
105
|
-
) || /* @__PURE__ */
|
|
106
|
-
|
|
107
|
+
u
|
|
108
|
+
) || /* @__PURE__ */ C(
|
|
109
|
+
ae,
|
|
107
110
|
{
|
|
108
111
|
...l,
|
|
109
112
|
className: "table-view-toolbar-lnc " + (l == null ? void 0 : l.className),
|
|
110
|
-
size: l != null && l.size ? l.size :
|
|
111
|
-
color: l != null && l.color ? l.color :
|
|
113
|
+
size: l != null && l.size ? l.size : m,
|
|
114
|
+
color: l != null && l.color ? l.color : s,
|
|
112
115
|
selectedRowsLength: a != null && a.length ? a.length : 0,
|
|
113
|
-
onCreate:
|
|
114
|
-
onCopy:
|
|
115
|
-
onEdit:
|
|
116
|
-
onDelete:
|
|
117
|
-
actionsDropdownZIndex:
|
|
118
|
-
actionDropdownProps:
|
|
119
|
-
actionsDropdownPlacement:
|
|
116
|
+
onCreate: Q,
|
|
117
|
+
onCopy: U,
|
|
118
|
+
onEdit: X,
|
|
119
|
+
onDelete: $,
|
|
120
|
+
actionsDropdownZIndex: V,
|
|
121
|
+
actionDropdownProps: F,
|
|
122
|
+
actionsDropdownPlacement: B,
|
|
123
|
+
selectedRows: t == null ? void 0 : t.current
|
|
120
124
|
}
|
|
121
|
-
),
|
|
122
|
-
|
|
125
|
+
), ee = () => g(
|
|
126
|
+
w("TABLE", u),
|
|
123
127
|
{
|
|
124
|
-
...
|
|
125
|
-
size:
|
|
126
|
-
color:
|
|
127
|
-
className: "table-view-pagination-lnc " + (
|
|
128
|
+
...n,
|
|
129
|
+
size: n != null && n.size ? n.size : m,
|
|
130
|
+
color: n != null && n.color ? n.color : s,
|
|
131
|
+
className: "table-view-pagination-lnc " + (n == null ? void 0 : n.className)
|
|
128
132
|
},
|
|
129
|
-
|
|
130
|
-
) || /* @__PURE__ */
|
|
131
|
-
|
|
133
|
+
u
|
|
134
|
+
) || /* @__PURE__ */ C(
|
|
135
|
+
se,
|
|
132
136
|
{
|
|
133
|
-
size:
|
|
134
|
-
color:
|
|
135
|
-
EnableSelection: (
|
|
136
|
-
onSelectRow: (
|
|
137
|
+
size: n != null && n.size ? n.size : m,
|
|
138
|
+
color: n != null && n.color ? n.color : s,
|
|
139
|
+
EnableSelection: (S || b) && f == !1,
|
|
140
|
+
onSelectRow: (c, r, i) => H(r, !i),
|
|
137
141
|
SelectedData: a,
|
|
138
|
-
onRowClick: (
|
|
139
|
-
...
|
|
142
|
+
onRowClick: (c, r) => J(c, r),
|
|
143
|
+
...n
|
|
140
144
|
}
|
|
141
|
-
),
|
|
142
|
-
|
|
145
|
+
), ne = () => g(
|
|
146
|
+
w("PAGINATION", u),
|
|
143
147
|
{
|
|
144
|
-
...
|
|
145
|
-
size:
|
|
146
|
-
color:
|
|
147
|
-
className: "table-view-pagination-lnc " + (
|
|
148
|
+
...o,
|
|
149
|
+
size: o != null && o.size ? o.size : m,
|
|
150
|
+
color: o != null && o.color ? o.color : s,
|
|
151
|
+
className: "table-view-pagination-lnc " + (o == null ? void 0 : o.className)
|
|
148
152
|
},
|
|
149
|
-
|
|
150
|
-
) || /* @__PURE__ */
|
|
151
|
-
|
|
153
|
+
u
|
|
154
|
+
) || /* @__PURE__ */ C(
|
|
155
|
+
ie,
|
|
152
156
|
{
|
|
153
|
-
...
|
|
154
|
-
size:
|
|
155
|
-
color:
|
|
156
|
-
className: "table-view-pagination-lnc " + (
|
|
157
|
-
onPageChange:
|
|
157
|
+
...o,
|
|
158
|
+
size: o != null && o.size ? o.size : m,
|
|
159
|
+
color: o != null && o.color ? o.color : s,
|
|
160
|
+
className: "table-view-pagination-lnc " + (o == null ? void 0 : o.className),
|
|
161
|
+
onPageChange: R
|
|
158
162
|
}
|
|
159
163
|
);
|
|
160
|
-
return /* @__PURE__ */
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
return /* @__PURE__ */ oe(me, { ref: E, ...q, children: [
|
|
165
|
+
P(),
|
|
166
|
+
ee(),
|
|
167
|
+
L == !0 && ne()
|
|
164
168
|
] });
|
|
165
169
|
});
|
|
166
|
-
|
|
170
|
+
z.propTypes = {
|
|
167
171
|
__TYPE__: e.string,
|
|
168
172
|
tableProps: e.object,
|
|
169
173
|
actionsToolbarProps: e.object,
|
|
@@ -234,7 +238,7 @@ g.propTypes = {
|
|
|
234
238
|
"gray"
|
|
235
239
|
])
|
|
236
240
|
};
|
|
237
|
-
|
|
241
|
+
z.displayName = "TABLE_VIEW";
|
|
238
242
|
export {
|
|
239
|
-
|
|
243
|
+
z as default
|
|
240
244
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lanaco/lnc-react-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.22",
|
|
4
4
|
"description": "React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -142,6 +142,7 @@
|
|
|
142
142
|
"react-hook-form": "^7.39.1",
|
|
143
143
|
"react-modern-drawer": "^1.1.2",
|
|
144
144
|
"react-number-format": "^4.9.3",
|
|
145
|
+
"react-responsive-carousel": "^3.2.23",
|
|
145
146
|
"react-select": "^5.4.0",
|
|
146
147
|
"react-syntax-highlighter": "^15.5.0",
|
|
147
148
|
"react-textarea-autosize": "^8.3.4",
|