@gobolt/genesis 0.2.1 → 0.2.2
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/_virtual/index5.cjs +1 -1
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.cjs +1 -0
- package/dist/_virtual/index6.js +7 -0
- package/dist/_virtual/index7.cjs +1 -0
- package/dist/_virtual/index7.js +4 -0
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.js +34 -21
- package/dist/components/Badge/styles.cjs +5 -7
- package/dist/components/Badge/styles.js +5 -7
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Select/Select.cjs +2 -2
- package/dist/components/Select/Select.js +25 -22
- package/dist/components/Table/Table.d.ts +5 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.cjs +1 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.d.ts +16 -0
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +119 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.cjs +1 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.d.ts +11 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.js +72 -0
- package/dist/components/Table/TableControls/TableControls.cjs +1 -0
- package/dist/components/Table/TableControls/TableControls.d.ts +11 -5
- package/dist/components/Table/TableControls/TableControls.js +36 -0
- package/dist/components/Table/TableWithControls/TableWithControls.cjs +1 -0
- package/dist/components/Table/TableWithControls/TableWithControls.d.ts +4 -4
- package/dist/components/Table/TableWithControls/TableWithControls.js +39 -0
- package/dist/components/Table/TableWithControls/index.d.ts +1 -0
- package/dist/components/Table/TableWithControls/useTableWithControls.cjs +1 -0
- package/dist/components/Table/TableWithControls/useTableWithControls.d.ts +31 -0
- package/dist/components/Table/TableWithControls/useTableWithControls.js +133 -0
- package/dist/components/Table/__mocks__/table-mocks.cjs +1 -0
- package/dist/components/Table/__mocks__/table-mocks.js +63 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/useTable.cjs +1 -0
- package/dist/components/Table/useTable.d.ts +24 -0
- package/dist/components/Table/useTable.js +93 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +48 -42
- package/dist/node_modules/antd/es/typography/hooks/useCopyClick.cjs +1 -1
- package/dist/node_modules/antd/es/typography/hooks/useCopyClick.js +1 -1
- package/dist/node_modules/debounce/index.cjs +1 -0
- package/dist/node_modules/debounce/index.js +44 -0
- package/dist/node_modules/react-icons/fi/index.cjs +1 -0
- package/dist/node_modules/react-icons/fi/index.js +8 -0
- package/dist/node_modules/react-icons/hi/index.cjs +1 -1
- package/dist/node_modules/react-icons/hi/index.js +22 -6
- package/dist/node_modules/react-icons/hi2/index.cjs +1 -0
- package/dist/node_modules/react-icons/hi2/index.js +8 -0
- package/dist/node_modules/react-icons/lu/index.cjs +1 -0
- package/dist/node_modules/react-icons/lu/index.js +8 -0
- package/dist/node_modules/react-icons/tb/index.cjs +1 -1
- package/dist/node_modules/react-icons/tb/index.js +6 -2
- package/dist/utils/icon-util.cjs +1 -1
- package/dist/utils/icon-util.js +44 -31
- package/package.json +3 -2
- package/dist/components/Table/TableControls/PrimaryTableControls.d.ts +0 -15
- package/dist/components/Table/TableControls/SecondaryTableControls.d.ts +0 -10
- package/dist/components/Table/__stories__/use-table-hook.d.ts +0 -9
- package/dist/components/Table/use-table-hook.d.ts +0 -23
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsxs as h, Fragment as m, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import g from "../TableControls/TableControls.js";
|
|
3
|
+
import d from "../Table.js";
|
|
4
|
+
const x = ({
|
|
5
|
+
tableData: t,
|
|
6
|
+
tableControlsData: r,
|
|
7
|
+
onChange: a
|
|
8
|
+
}) => {
|
|
9
|
+
const { primaryTableRowData: s, secondaryTableRowData: c } = r, { dataSource: b, columns: C, rowSelection: T } = t;
|
|
10
|
+
return /* @__PURE__ */ h(m, { children: [
|
|
11
|
+
/* @__PURE__ */ l(
|
|
12
|
+
g,
|
|
13
|
+
{
|
|
14
|
+
primaryTableRowData: s,
|
|
15
|
+
secondaryTableRowData: c,
|
|
16
|
+
onChange: (o) => {
|
|
17
|
+
a(o);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ l(
|
|
22
|
+
d,
|
|
23
|
+
{
|
|
24
|
+
dataSource: b,
|
|
25
|
+
columns: C,
|
|
26
|
+
rowSelection: T,
|
|
27
|
+
onChange: (o, e, n) => {
|
|
28
|
+
console.log("Table changed:", o, e, n), a({
|
|
29
|
+
event: "tableChange",
|
|
30
|
+
payload: { pagination: o, filters: e, sorter: n }
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
] });
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
x as default
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("react"),T=require("../useTable.cjs"),C=require("../__mocks__/table-mocks.cjs"),l={primaryTableRowData:{sortOptions:[{value:"status",label:o.jsx("span",{children:"Status"})},{value:"address",label:o.jsx("span",{children:"Address"})},{value:"job_subtype",label:o.jsx("span",{children:"Type"})}],searchByPlaceholder:"Search by Address",isSortedAscending:!0},secondaryTableRowData:{groups:{orders:["Cancelled","Paused"],warehouse:["D2C"],availability:["Out of Stock"]},totalRecords:0}},O={columns:C.mockColumns,filters:{order:"asc"},fetchUrl:"/table/data",fetchOptions:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filters:{order:"asc",search:"",page:1,per_page:10,sort:null}})}},m=w=>{const[c,a]=r.useState(O),[n,d]=r.useState(l.secondaryTableRowData.groups),[u,f]=r.useState(l.primaryTableRowData),{secondaryTableRowData:b}=l,y={...b,groups:n},{dataSource:i,columns:p,rowSelection:h}=T.useTable(c);if(!i)return null;const g=(t,s)=>{const e={...n};e[t]=e[t].filter(S=>S!==s),d(e)};return{onChange:t=>{if(t.event==="inputChange"&&a(s=>({...s,filters:{...s.filters,search:t.payload},fetchOptions:{...s.fetchOptions,body:JSON.stringify({filters:{...s.filters,search:t.payload}})}})),t.event==="primaryChange"){const{value:s}=t.payload;a(e=>({...e,filters:{...e.filters,sort:s},fetchOptions:{...e.fetchOptions,body:JSON.stringify({filters:{...e.filters,sort:s}})}}))}if(t.event==="groupItemClick"){const{title:s,item:e}=t.payload;g(s,e)}if(t.event==="orderClick"){f(e=>({...e,isSortedAscending:!e.isSortedAscending}));const s=t.payload.value;a(e=>({...e,filters:{...e.filters,order:s},fetchOptions:{...e.fetchOptions,body:JSON.stringify({filters:{...e.filters,order:s}})}}))}},primaryTableRowData:u,secondaryTableRowData:y,dataSource:i,columns:p,rowSelection:h}};exports.useTableWithControls=m;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UseTableConfig } from '../useTable';
|
|
2
|
+
import { ActionEvent } from '../Table';
|
|
3
|
+
export declare const useTableWithControls: (tableConfig: UseTableConfig) => {
|
|
4
|
+
onChange: (actionEvent: ActionEvent) => void;
|
|
5
|
+
primaryTableRowData: {
|
|
6
|
+
sortOptions: {
|
|
7
|
+
value: string;
|
|
8
|
+
label: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
}[];
|
|
10
|
+
searchByPlaceholder: string;
|
|
11
|
+
isSortedAscending: boolean;
|
|
12
|
+
};
|
|
13
|
+
secondaryTableRowData: {
|
|
14
|
+
groups: {
|
|
15
|
+
orders: string[];
|
|
16
|
+
warehouse: string[];
|
|
17
|
+
availability: string[];
|
|
18
|
+
};
|
|
19
|
+
totalRecords: number;
|
|
20
|
+
};
|
|
21
|
+
dataSource: Record<string, any>[];
|
|
22
|
+
columns: import('antd').TableColumnsType<Record<string, any>>;
|
|
23
|
+
rowSelection: {
|
|
24
|
+
type: import('../Table').SelectionType;
|
|
25
|
+
onChange: (selectedRowKeys: React.Key[], selectedRows: Record<string, any>[]) => void;
|
|
26
|
+
getCheckboxProps: (record: Record<string, any>) => {
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
name: any;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as r } from "react";
|
|
3
|
+
import { useTable as C } from "../useTable.js";
|
|
4
|
+
import { mockColumns as T } from "../__mocks__/table-mocks.js";
|
|
5
|
+
const l = {
|
|
6
|
+
primaryTableRowData: {
|
|
7
|
+
sortOptions: [
|
|
8
|
+
{ value: "status", label: /* @__PURE__ */ a("span", { children: "Status" }) },
|
|
9
|
+
{ value: "address", label: /* @__PURE__ */ a("span", { children: "Address" }) },
|
|
10
|
+
{ value: "job_subtype", label: /* @__PURE__ */ a("span", { children: "Type" }) }
|
|
11
|
+
],
|
|
12
|
+
searchByPlaceholder: "Search by Address",
|
|
13
|
+
isSortedAscending: !0
|
|
14
|
+
},
|
|
15
|
+
secondaryTableRowData: {
|
|
16
|
+
groups: {
|
|
17
|
+
orders: ["Cancelled", "Paused"],
|
|
18
|
+
warehouse: ["D2C"],
|
|
19
|
+
availability: ["Out of Stock"]
|
|
20
|
+
},
|
|
21
|
+
totalRecords: 0
|
|
22
|
+
}
|
|
23
|
+
}, S = {
|
|
24
|
+
columns: T,
|
|
25
|
+
filters: {
|
|
26
|
+
order: "asc"
|
|
27
|
+
},
|
|
28
|
+
fetchUrl: "/table/data",
|
|
29
|
+
fetchOptions: {
|
|
30
|
+
method: "POST",
|
|
31
|
+
headers: {
|
|
32
|
+
"Content-Type": "application/json"
|
|
33
|
+
},
|
|
34
|
+
body: JSON.stringify({
|
|
35
|
+
filters: {
|
|
36
|
+
order: "asc",
|
|
37
|
+
search: "",
|
|
38
|
+
page: 1,
|
|
39
|
+
per_page: 10,
|
|
40
|
+
sort: null
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
}, J = (O) => {
|
|
45
|
+
const [c, o] = r(
|
|
46
|
+
S
|
|
47
|
+
), [i, d] = r(
|
|
48
|
+
l.secondaryTableRowData.groups
|
|
49
|
+
), [f, u] = r(
|
|
50
|
+
l.primaryTableRowData
|
|
51
|
+
), { secondaryTableRowData: p } = l, y = {
|
|
52
|
+
...p,
|
|
53
|
+
groups: i
|
|
54
|
+
}, { dataSource: n, columns: b, rowSelection: h } = C(c);
|
|
55
|
+
if (!n) return null;
|
|
56
|
+
const g = (t, s) => {
|
|
57
|
+
const e = { ...i };
|
|
58
|
+
e[t] = e[t].filter((m) => m !== s), d(e);
|
|
59
|
+
};
|
|
60
|
+
return {
|
|
61
|
+
onChange: (t) => {
|
|
62
|
+
if (t.event === "inputChange" && o((s) => ({
|
|
63
|
+
...s,
|
|
64
|
+
filters: {
|
|
65
|
+
...s.filters,
|
|
66
|
+
search: t.payload
|
|
67
|
+
},
|
|
68
|
+
fetchOptions: {
|
|
69
|
+
...s.fetchOptions,
|
|
70
|
+
body: JSON.stringify({
|
|
71
|
+
filters: {
|
|
72
|
+
...s.filters,
|
|
73
|
+
search: t.payload
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
})), t.event === "primaryChange") {
|
|
78
|
+
const { value: s } = t.payload;
|
|
79
|
+
o((e) => ({
|
|
80
|
+
...e,
|
|
81
|
+
filters: {
|
|
82
|
+
...e.filters,
|
|
83
|
+
sort: s
|
|
84
|
+
},
|
|
85
|
+
fetchOptions: {
|
|
86
|
+
...e.fetchOptions,
|
|
87
|
+
body: JSON.stringify({
|
|
88
|
+
filters: {
|
|
89
|
+
...e.filters,
|
|
90
|
+
sort: s
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
if (t.event === "groupItemClick") {
|
|
97
|
+
const { title: s, item: e } = t.payload;
|
|
98
|
+
g(s, e);
|
|
99
|
+
}
|
|
100
|
+
if (t.event === "orderClick") {
|
|
101
|
+
u((e) => ({
|
|
102
|
+
...e,
|
|
103
|
+
isSortedAscending: !e.isSortedAscending
|
|
104
|
+
}));
|
|
105
|
+
const s = t.payload.value;
|
|
106
|
+
o((e) => ({
|
|
107
|
+
...e,
|
|
108
|
+
filters: {
|
|
109
|
+
...e.filters,
|
|
110
|
+
order: s
|
|
111
|
+
},
|
|
112
|
+
fetchOptions: {
|
|
113
|
+
...e.fetchOptions,
|
|
114
|
+
body: JSON.stringify({
|
|
115
|
+
filters: {
|
|
116
|
+
...e.filters,
|
|
117
|
+
order: s
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
primaryTableRowData: f,
|
|
125
|
+
secondaryTableRowData: y,
|
|
126
|
+
dataSource: n,
|
|
127
|
+
columns: b,
|
|
128
|
+
rowSelection: h
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
export {
|
|
132
|
+
J as useTableWithControls
|
|
133
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),o=require("../../Badge/Badge.cjs"),a=e=>e&&e.replace(/([A-Z])/g," $1").replace(/^./,t=>t.toUpperCase()),c=[{key:"number",title:"Number",dataIndex:"number"},{key:"timeslot",title:"Timeslot",dataIndex:"timerange"},{key:"status",title:"Status",dataIndex:"status",render:e=>{const t={in_progress:"warning",scheduled:"generic",completed:"success"},r=e==="in_progress"?"in progress":e;return n.createElement(o,{label:a(r),state:t[e]})}},{key:"address",title:"Address",render:e=>{const{address:{nickname:t,address:r}}=e;return t?`${t} (${r})`:r}},{title:"Type",dataIndex:"job_subtype",render:e=>{const t={delivery:"info",pickup:"success"};return n.createElement(o,{label:a(e),state:t[e]})}}],s=c.map(e=>({...e}));s[1].sorter=!0;s[2].sorter=!0;s[4].sorter=!0;exports.mockColumns=c;exports.mockColumnsWithSort=s;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import a from "react";
|
|
2
|
+
import n from "../../Badge/Badge.js";
|
|
3
|
+
const o = (e) => e && e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()), c = [
|
|
4
|
+
{
|
|
5
|
+
key: "number",
|
|
6
|
+
title: "Number",
|
|
7
|
+
dataIndex: "number"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
key: "timeslot",
|
|
11
|
+
title: "Timeslot",
|
|
12
|
+
dataIndex: "timerange"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: "status",
|
|
16
|
+
title: "Status",
|
|
17
|
+
dataIndex: "status",
|
|
18
|
+
render: (e) => {
|
|
19
|
+
const t = {
|
|
20
|
+
in_progress: "warning",
|
|
21
|
+
scheduled: "generic",
|
|
22
|
+
completed: "success"
|
|
23
|
+
}, r = e === "in_progress" ? "in progress" : e;
|
|
24
|
+
return a.createElement(n, {
|
|
25
|
+
label: o(r),
|
|
26
|
+
state: t[e]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: "address",
|
|
32
|
+
title: "Address",
|
|
33
|
+
render: (e) => {
|
|
34
|
+
const {
|
|
35
|
+
address: { nickname: t, address: r }
|
|
36
|
+
} = e;
|
|
37
|
+
return t ? `${t} (${r})` : r;
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
title: "Type",
|
|
42
|
+
dataIndex: "job_subtype",
|
|
43
|
+
render: (e) => {
|
|
44
|
+
const t = {
|
|
45
|
+
delivery: "info",
|
|
46
|
+
pickup: "success"
|
|
47
|
+
};
|
|
48
|
+
return a.createElement(n, {
|
|
49
|
+
label: o(e),
|
|
50
|
+
state: t[e]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
], s = c.map((e) => ({
|
|
55
|
+
...e
|
|
56
|
+
}));
|
|
57
|
+
s[1].sorter = !0;
|
|
58
|
+
s[2].sorter = !0;
|
|
59
|
+
s[4].sorter = !0;
|
|
60
|
+
export {
|
|
61
|
+
c as mockColumns,
|
|
62
|
+
s as mockColumnsWithSort
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),D=(a,e)=>{if(!e||Array.isArray(e)&&e.length===0)return[...a];if(Array.isArray(e))return[...a].sort((s,i)=>{for(const r of e){if(!r.field)continue;const n=r.field,o=s[n],u=i[n];if(o<u)return r.order==="ascend"?-1:1;if(o>u)return r.order==="ascend"?1:-1}return 0});if(e.field){const s=e.field;return[...a].sort((i,r)=>{const n=i[s],o=r[s];return e.order==="ascend"?n<o?-1:n>o?1:0:e.order==="descend"?n<o?1:n>o?-1:0:0})}return[...a]},w=a=>{const{columns:e,filters:s=null,fetchUrl:i="/table/data",fetchOptions:r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)},selectionType:n="checkbox",simulateDelay:o=0}=a,[u,b]=l.useState([]),[h,f]=l.useState({dataSource:[],columns:[],error:null}),[y,g]=l.useState([]);l.useEffect(()=>{(async()=>{try{const S=(await(await fetch(i,r)).json()).data||[];b(S),f({dataSource:S,columns:e,error:null})}catch(t){console.error("Error fetching table data:",t),f({dataSource:[],columns:e,error:t instanceof Error?t:new Error(String(t))})}})()},[r]),l.useCallback(c=>{setTimeout(()=>{const t=D(u,c);f(d=>({...d,dataSource:t}))},o)},[u]);const p=l.useCallback((c,t)=>{console.log("Row Selected:",c,t),g(t)},[]);return{...h,rowSelection:{type:n,onChange:p,getCheckboxProps:c=>({disabled:!1,name:c.id})},selectedRows:y}};exports.useTable=w;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ColumnsType } from 'antd/es/table';
|
|
2
|
+
import { SelectionType } from './Table';
|
|
3
|
+
export type UseTableConfig = {
|
|
4
|
+
columns: ColumnsType<any>;
|
|
5
|
+
filters?: Record<string, any>;
|
|
6
|
+
fetchUrl?: string;
|
|
7
|
+
fetchOptions?: RequestInit;
|
|
8
|
+
selectionType?: SelectionType;
|
|
9
|
+
simulateDelay?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const useTable: <T extends Record<string, any>>(useTableConfig: any) => {
|
|
12
|
+
rowSelection: {
|
|
13
|
+
type: SelectionType;
|
|
14
|
+
onChange: (selectedRowKeys: React.Key[], selectedRows: T[]) => void;
|
|
15
|
+
getCheckboxProps: (record: T) => {
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
name: any;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
selectedRows: T[];
|
|
21
|
+
dataSource: T[];
|
|
22
|
+
columns: ColumnsType<T>;
|
|
23
|
+
error: Error | null;
|
|
24
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { useState as f, useEffect as m, useCallback as S } from "react";
|
|
2
|
+
const w = (a, e) => {
|
|
3
|
+
if (!e || Array.isArray(e) && e.length === 0)
|
|
4
|
+
return [...a];
|
|
5
|
+
if (Array.isArray(e))
|
|
6
|
+
return [...a].sort((c, i) => {
|
|
7
|
+
for (const r of e) {
|
|
8
|
+
if (!r.field) continue;
|
|
9
|
+
const n = r.field, o = c[n], l = i[n];
|
|
10
|
+
if (o < l) return r.order === "ascend" ? -1 : 1;
|
|
11
|
+
if (o > l) return r.order === "ascend" ? 1 : -1;
|
|
12
|
+
}
|
|
13
|
+
return 0;
|
|
14
|
+
});
|
|
15
|
+
if (e.field) {
|
|
16
|
+
const c = e.field;
|
|
17
|
+
return [...a].sort((i, r) => {
|
|
18
|
+
const n = i[c], o = r[c];
|
|
19
|
+
return e.order === "ascend" ? n < o ? -1 : n > o ? 1 : 0 : e.order === "descend" ? n < o ? 1 : n > o ? -1 : 0 : 0;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return [...a];
|
|
23
|
+
}, C = (a) => {
|
|
24
|
+
const {
|
|
25
|
+
columns: e,
|
|
26
|
+
filters: c = null,
|
|
27
|
+
fetchUrl: i = "/table/data",
|
|
28
|
+
fetchOptions: r = {
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers: {
|
|
31
|
+
"Content-Type": "application/json"
|
|
32
|
+
},
|
|
33
|
+
body: JSON.stringify(c)
|
|
34
|
+
},
|
|
35
|
+
selectionType: n = "checkbox",
|
|
36
|
+
simulateDelay: o = 0
|
|
37
|
+
} = a, [l, y] = f([]), [p, u] = f({
|
|
38
|
+
dataSource: [],
|
|
39
|
+
columns: [],
|
|
40
|
+
error: null
|
|
41
|
+
}), [b, g] = f([]);
|
|
42
|
+
m(() => {
|
|
43
|
+
(async () => {
|
|
44
|
+
try {
|
|
45
|
+
const h = (await (await fetch(i, r)).json()).data || [];
|
|
46
|
+
y(h), u({
|
|
47
|
+
dataSource: h,
|
|
48
|
+
columns: e,
|
|
49
|
+
error: null
|
|
50
|
+
});
|
|
51
|
+
} catch (t) {
|
|
52
|
+
console.error("Error fetching table data:", t), u({
|
|
53
|
+
dataSource: [],
|
|
54
|
+
columns: e,
|
|
55
|
+
error: t instanceof Error ? t : new Error(String(t))
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
})();
|
|
59
|
+
}, [r]), S(
|
|
60
|
+
(s) => {
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
const t = w(l, s);
|
|
63
|
+
u((d) => ({
|
|
64
|
+
...d,
|
|
65
|
+
dataSource: t
|
|
66
|
+
}));
|
|
67
|
+
}, o);
|
|
68
|
+
},
|
|
69
|
+
[l]
|
|
70
|
+
);
|
|
71
|
+
const D = S(
|
|
72
|
+
(s, t) => {
|
|
73
|
+
console.log("Row Selected:", s, t), g(t);
|
|
74
|
+
},
|
|
75
|
+
[]
|
|
76
|
+
);
|
|
77
|
+
return {
|
|
78
|
+
...p,
|
|
79
|
+
rowSelection: {
|
|
80
|
+
type: n,
|
|
81
|
+
onChange: D,
|
|
82
|
+
getCheckboxProps: (s) => ({
|
|
83
|
+
disabled: !1,
|
|
84
|
+
// Add your disable logic here
|
|
85
|
+
name: s.id
|
|
86
|
+
})
|
|
87
|
+
},
|
|
88
|
+
selectedRows: b
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
C as useTable
|
|
93
|
+
};
|
|
@@ -4,6 +4,7 @@ export { default as Badge } from './Badge';
|
|
|
4
4
|
export type { BadgeProps } from './Badge';
|
|
5
5
|
export { default as Breadcrumb } from './Breadcrumb';
|
|
6
6
|
export type { BreadcrumbProps } from './Breadcrumb';
|
|
7
|
+
export type { BreadcrumbItem } from './Breadcrumb/Breadcrumb.types';
|
|
7
8
|
export { default as Button } from './Button';
|
|
8
9
|
export type { ButtonProps } from './Button';
|
|
9
10
|
export { default as UtilityButton } from './Button/UtilityButton';
|
|
@@ -50,6 +51,10 @@ export { default as Switch } from './Switch';
|
|
|
50
51
|
export type { SwitchProps } from './Switch';
|
|
51
52
|
export { default as Table } from './Table';
|
|
52
53
|
export type { TableProps } from './Table';
|
|
54
|
+
export { default as TableWithControls } from './Table/TableWithControls';
|
|
55
|
+
export type { TableWithControlsProps } from './Table/TableWithControls';
|
|
56
|
+
export { useTable } from './Table';
|
|
57
|
+
export { useTableWithControls } from './Table/TableWithControls';
|
|
53
58
|
export { default as Tabs } from './Tabs';
|
|
54
59
|
export type { TabsProps } from './Tabs';
|
|
55
60
|
export { default as Tile } from './Tile';
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants/index.cjs"),r=require("./styles/global-styles.cjs"),o=require("./components/Avatar/Avatar.cjs"),t=require("./components/Badge/Badge.cjs"),s=require("./components/Breadcrumb/Breadcrumb.cjs"),i=require("./components/Button/Button.cjs"),n=require("./components/Button/UtilityButton.cjs"),u=require("./components/Button/IconButton.cjs"),c=require("./components/Card/Card.cjs"),a=require("./components/Checkbox/Checkbox.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./constants/index.cjs"),r=require("./styles/global-styles.cjs"),o=require("./components/Avatar/Avatar.cjs"),t=require("./components/Badge/Badge.cjs"),s=require("./components/Breadcrumb/Breadcrumb.cjs"),i=require("./components/Button/Button.cjs"),n=require("./components/Button/UtilityButton.cjs"),u=require("./components/Button/IconButton.cjs"),c=require("./components/Card/Card.cjs"),a=require("./components/Checkbox/Checkbox.cjs"),l=require("./components/DatePicker/DatePicker.cjs"),q=require("./components/DateRangePicker/DateRangePicker.cjs"),b=require("./components/ErrorBoundary/ErrorBoundary.cjs"),d=require("./components/ErrorBoundaryFallback/ErrorBoundaryFallback.cjs"),T=require("./components/Form/Form.cjs"),y=require("./components/Input/Input.cjs"),g=require("./components/Layout/Layout.cjs"),p=require("./components/Message/Message.cjs"),S=require("./components/Notification/Notification.cjs"),B=require("./components/Popover/Popover.cjs"),h=require("./components/Progress/Progress.cjs"),P=require("./components/Radio/RadioGroup.cjs"),C=require("./components/Row/Row.cjs"),G=require("./components/SegmentedControls/SegmentedControls.cjs"),k=require("./components/Select/Select.cjs"),v=require("./components/Shapes/Shapes.cjs"),m=require("./components/Switch/Switch.cjs"),E=require("./components/Table/Table.cjs"),R=require("./components/Table/TableWithControls/TableWithControls.cjs"),f=require("./components/Tabs/Tabs.cjs"),I=require("./components/Tile/Tile.cjs"),W=require("./components/Toast/Toast.cjs"),w=require("./components/Tooltip/Tooltip.cjs"),D=require("./components/Typography/Typography.cjs"),F=require("./providers/GenesisProvider.cjs"),x=require("./components/Table/useTable.cjs"),M=require("./components/Table/TableWithControls/useTableWithControls.cjs"),N=require("./providers/useGenesis.cjs");exports.GENESIS=e.default;exports.GlobalStyles=r.GlobalStyles;exports.Avatar=o;exports.Badge=t;exports.Breadcrumb=s;exports.Button=i;exports.UtilityButton=n;exports.IconButton=u;exports.Card=c;exports.Checkbox=a;exports.DatePicker=l;exports.DateRangePicker=q;exports.ErrorBoundary=b;exports.ErrorBoundaryFallback=d;exports.Form=T.default;exports.Input=y;exports.Layout=g;exports.Message=p;exports.Notification=S;exports.Popover=B;exports.Progress=h;exports.RadioGroup=P;exports.Row=C;exports.SegmentedControls=G;exports.Select=k;exports.Shapes=v;exports.Switch=m;exports.Table=E;exports.TableWithControls=R;exports.Tabs=f;exports.Tile=I;exports.Toast=W;exports.Tooltip=w;exports.Typography=D;exports.GenesisProvider=F.GenesisProvider;exports.useTable=x.useTable;exports.useTableWithControls=M.useTableWithControls;exports.useGenesis=N.useGenesis;
|
package/dist/index.js
CHANGED
|
@@ -5,68 +5,74 @@ import { default as p } from "./components/Badge/Badge.js";
|
|
|
5
5
|
import { default as d } from "./components/Breadcrumb/Breadcrumb.js";
|
|
6
6
|
import { default as x } from "./components/Button/Button.js";
|
|
7
7
|
import { default as n } from "./components/Button/UtilityButton.js";
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
8
|
+
import { default as c } from "./components/Button/IconButton.js";
|
|
9
|
+
import { default as y } from "./components/Card/Card.js";
|
|
10
|
+
import { default as S } from "./components/Checkbox/Checkbox.js";
|
|
11
|
+
import { default as h } from "./components/DatePicker/DatePicker.js";
|
|
12
|
+
import { default as G } from "./components/DateRangePicker/DateRangePicker.js";
|
|
13
|
+
import { default as k } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
14
|
+
import { default as v } from "./components/ErrorBoundaryFallback/ErrorBoundaryFallback.js";
|
|
15
15
|
import { default as R } from "./components/Form/Form.js";
|
|
16
16
|
import { default as D } from "./components/Input/Input.js";
|
|
17
17
|
import { default as N } from "./components/Layout/Layout.js";
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
18
|
+
import { default as A } from "./components/Message/Message.js";
|
|
19
|
+
import { default as M } from "./components/Notification/Notification.js";
|
|
20
|
+
import { default as j } from "./components/Popover/Popover.js";
|
|
21
|
+
import { default as z } from "./components/Progress/Progress.js";
|
|
22
|
+
import { default as J } from "./components/Radio/RadioGroup.js";
|
|
23
|
+
import { default as O } from "./components/Row/Row.js";
|
|
24
|
+
import { default as V } from "./components/SegmentedControls/SegmentedControls.js";
|
|
25
25
|
import { default as Y } from "./components/Select/Select.js";
|
|
26
26
|
import { default as _ } from "./components/Shapes/Shapes.js";
|
|
27
27
|
import { default as oo } from "./components/Switch/Switch.js";
|
|
28
28
|
import { default as ro } from "./components/Table/Table.js";
|
|
29
|
-
import { default as ao } from "./components/
|
|
30
|
-
import { default as so } from "./components/
|
|
31
|
-
import { default as po } from "./components/
|
|
32
|
-
import { default as mo } from "./components/
|
|
33
|
-
import { default as io } from "./components/
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
29
|
+
import { default as ao } from "./components/Table/TableWithControls/TableWithControls.js";
|
|
30
|
+
import { default as so } from "./components/Tabs/Tabs.js";
|
|
31
|
+
import { default as po } from "./components/Tile/Tile.js";
|
|
32
|
+
import { default as mo } from "./components/Toast/Toast.js";
|
|
33
|
+
import { default as io } from "./components/Tooltip/Tooltip.js";
|
|
34
|
+
import { default as bo } from "./components/Typography/Typography.js";
|
|
35
|
+
import { GenesisProvider as To } from "./providers/GenesisProvider.js";
|
|
36
|
+
import { useTable as Bo } from "./components/Table/useTable.js";
|
|
37
|
+
import { useTableWithControls as go } from "./components/Table/TableWithControls/useTableWithControls.js";
|
|
38
|
+
import { useGenesis as Co } from "./providers/useGenesis.js";
|
|
36
39
|
export {
|
|
37
40
|
s as Avatar,
|
|
38
41
|
p as Badge,
|
|
39
42
|
d as Breadcrumb,
|
|
40
43
|
x as Button,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
y as Card,
|
|
45
|
+
S as Checkbox,
|
|
46
|
+
h as DatePicker,
|
|
47
|
+
G as DateRangePicker,
|
|
48
|
+
k as ErrorBoundary,
|
|
49
|
+
v as ErrorBoundaryFallback,
|
|
47
50
|
R as Form,
|
|
48
51
|
r as GENESIS,
|
|
49
|
-
|
|
52
|
+
To as GenesisProvider,
|
|
50
53
|
a as GlobalStyles,
|
|
51
|
-
|
|
54
|
+
c as IconButton,
|
|
52
55
|
D as Input,
|
|
53
56
|
N as Layout,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
A as Message,
|
|
58
|
+
M as Notification,
|
|
59
|
+
j as Popover,
|
|
60
|
+
z as Progress,
|
|
61
|
+
J as RadioGroup,
|
|
62
|
+
O as Row,
|
|
63
|
+
V as SegmentedControls,
|
|
61
64
|
Y as Select,
|
|
62
65
|
_ as Shapes,
|
|
63
66
|
oo as Switch,
|
|
64
67
|
ro as Table,
|
|
65
|
-
ao as
|
|
66
|
-
so as
|
|
67
|
-
po as
|
|
68
|
-
mo as
|
|
69
|
-
io as
|
|
68
|
+
ao as TableWithControls,
|
|
69
|
+
so as Tabs,
|
|
70
|
+
po as Tile,
|
|
71
|
+
mo as Toast,
|
|
72
|
+
io as Tooltip,
|
|
73
|
+
bo as Typography,
|
|
70
74
|
n as UtilityButton,
|
|
71
|
-
|
|
75
|
+
Co as useGenesis,
|
|
76
|
+
Bo as useTable,
|
|
77
|
+
go as useTableWithControls
|
|
72
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const v=require("react"),m=require("../../../../../_virtual/
|
|
1
|
+
"use strict";const v=require("react"),m=require("../../../../../_virtual/index6.cjs"),x=require("../../../../rc-util/es/hooks/useEvent.cjs"),C=require("../../_util/toList.cjs");function _(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const c=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,c.get?c:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const d=_(v);var h=function(o,t,e,c){function s(u){return u instanceof e?u:new e(function(r){r(u)})}return new(e||(e=Promise))(function(u,r){function f(i){try{a(c.next(i))}catch(n){r(n)}}function l(i){try{a(c.throw(i))}catch(n){r(n)}}function a(i){i.done?u(i.value):s(i.value).then(f,l)}a((c=c.apply(o,t||[])).next())})};const w=o=>{let{copyConfig:t,children:e}=o;const[c,s]=d.useState(!1),[u,r]=d.useState(!1),f=d.useRef(null),l=()=>{f.current&&clearTimeout(f.current)},a={};t.format&&(a.format=t.format),d.useEffect(()=>l,[]);const i=x(n=>h(void 0,void 0,void 0,function*(){var p;n==null||n.preventDefault(),n==null||n.stopPropagation(),r(!0);try{const y=typeof t.text=="function"?yield t.text():t.text;m(y||C(e,!0).join("")||"",a),r(!1),s(!0),l(),f.current=setTimeout(()=>{s(!1)},3e3),(p=t.onCopy)===null||p===void 0||p.call(t,n)}catch(y){throw r(!1),y}}));return{copied:c,copyLoading:u,onClick:i}};module.exports=w;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../_virtual/index7.cjs");var b;function h(){if(b)return u.__module.exports;b=1;function a(d,i=100,c={}){if(typeof d!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof d}\`.`);if(i<0)throw new RangeError("`wait` must not be negative.");const{immediate:m}=typeof c=="boolean"?{immediate:c}:c;let n,f,e,p,o;function s(){const r=n,l=f;return n=void 0,f=void 0,o=d.apply(r,l),o}function g(){const r=Date.now()-p;r<i&&r>=0?e=setTimeout(g,i-r):(e=void 0,m||(o=s()))}const t=function(...r){if(n&&this!==n&&Object.getPrototypeOf(this)===Object.getPrototypeOf(n))throw new Error("Debounced method called with different contexts of the same prototype.");n=this,f=r,p=Date.now();const l=m&&!e;return e||(e=setTimeout(g,i)),l&&(o=s()),o};return Object.defineProperty(t,"isPending",{get(){return e!==void 0}}),t.clear=()=>{e&&(clearTimeout(e),e=void 0)},t.flush=()=>{e&&t.trigger()},t.trigger=()=>{o=s(),t.clear()},t}return u.__module.exports.debounce=a,u.__module.exports=a,u.__module.exports}exports.__require=h;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { __module as u } from "../../_virtual/index7.js";
|
|
2
|
+
var g;
|
|
3
|
+
function x() {
|
|
4
|
+
if (g) return u.exports;
|
|
5
|
+
g = 1;
|
|
6
|
+
function l(f, i = 100, c = {}) {
|
|
7
|
+
if (typeof f != "function")
|
|
8
|
+
throw new TypeError(`Expected the first parameter to be a function, got \`${typeof f}\`.`);
|
|
9
|
+
if (i < 0)
|
|
10
|
+
throw new RangeError("`wait` must not be negative.");
|
|
11
|
+
const { immediate: m } = typeof c == "boolean" ? { immediate: c } : c;
|
|
12
|
+
let n, s, e, p, o;
|
|
13
|
+
function d() {
|
|
14
|
+
const r = n, a = s;
|
|
15
|
+
return n = void 0, s = void 0, o = f.apply(r, a), o;
|
|
16
|
+
}
|
|
17
|
+
function b() {
|
|
18
|
+
const r = Date.now() - p;
|
|
19
|
+
r < i && r >= 0 ? e = setTimeout(b, i - r) : (e = void 0, m || (o = d()));
|
|
20
|
+
}
|
|
21
|
+
const t = function(...r) {
|
|
22
|
+
if (n && this !== n && Object.getPrototypeOf(this) === Object.getPrototypeOf(n))
|
|
23
|
+
throw new Error("Debounced method called with different contexts of the same prototype.");
|
|
24
|
+
n = this, s = r, p = Date.now();
|
|
25
|
+
const a = m && !e;
|
|
26
|
+
return e || (e = setTimeout(b, i)), a && (o = d()), o;
|
|
27
|
+
};
|
|
28
|
+
return Object.defineProperty(t, "isPending", {
|
|
29
|
+
get() {
|
|
30
|
+
return e !== void 0;
|
|
31
|
+
}
|
|
32
|
+
}), t.clear = () => {
|
|
33
|
+
e && (clearTimeout(e), e = void 0);
|
|
34
|
+
}, t.flush = () => {
|
|
35
|
+
e && t.trigger();
|
|
36
|
+
}, t.trigger = () => {
|
|
37
|
+
o = d(), t.clear();
|
|
38
|
+
}, t;
|
|
39
|
+
}
|
|
40
|
+
return u.exports.debounce = l, u.exports = l, u.exports;
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
x as __require
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../lib/iconBase.cjs");require("../lib/iconContext.cjs");function e(a){return t.GenIcon({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]},{tag:"path",attr:{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"},child:[]}]})(a)}exports.FiSettings=e;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GenIcon as t } from "../lib/iconBase.js";
|
|
2
|
+
import "../lib/iconContext.js";
|
|
3
|
+
function i(a) {
|
|
4
|
+
return t({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "12", cy: "12", r: "3" }, child: [] }, { tag: "path", attr: { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" }, child: [] }] })(a);
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
i as FiSettings
|
|
8
|
+
};
|