norma-library 0.6.76 → 0.6.78
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/.storybook/preview.ts +5 -0
- package/dist/esm/components/Modal.js +1 -1
- package/dist/esm/components/Modal.js.map +1 -1
- package/dist/esm/components/Tabs.js +1 -1
- package/dist/esm/components/Tabs.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/components/index.d.ts +4 -2
- package/dist/esm/components/UncontrolledTable/components/index.js +4 -2
- package/dist/esm/components/UncontrolledTable/components/index.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/components/row/DraggableRow.d.ts +3 -0
- package/dist/esm/components/UncontrolledTable/components/row/DraggableRow.js +23 -0
- package/dist/esm/components/UncontrolledTable/components/row/DraggableRow.js.map +1 -0
- package/dist/esm/components/UncontrolledTable/components/row/RowDragHandleCell.d.ts +3 -0
- package/dist/esm/components/UncontrolledTable/components/row/RowDragHandleCell.js +15 -0
- package/dist/esm/components/UncontrolledTable/components/row/RowDragHandleCell.js.map +1 -0
- package/dist/esm/components/UncontrolledTable/components/row/SimpleRow.d.ts +3 -0
- package/dist/esm/components/UncontrolledTable/components/row/SimpleRow.js +13 -0
- package/dist/esm/components/UncontrolledTable/components/row/SimpleRow.js.map +1 -0
- package/dist/esm/components/UncontrolledTable/components/row/styles.d.ts +2 -0
- package/dist/esm/components/UncontrolledTable/components/row/styles.js +12 -0
- package/dist/esm/components/UncontrolledTable/components/row/styles.js.map +1 -0
- package/dist/esm/components/UncontrolledTable/index.js +86 -50
- package/dist/esm/components/UncontrolledTable/index.js.map +1 -1
- package/dist/esm/components/UncontrolledTable/interface.d.ts +6 -4
- package/package.json +4 -1
- package/src/components/Modal.tsx +1 -1
- package/src/components/Tabs.tsx +1 -1
- package/src/components/UncontrolledTable/components/index.tsx +6 -2
- package/src/components/UncontrolledTable/components/row/DraggableRow.tsx +34 -0
- package/src/components/UncontrolledTable/components/row/RowDragHandleCell.tsx +17 -0
- package/src/components/UncontrolledTable/components/row/SimpleRow.tsx +26 -0
- package/src/components/UncontrolledTable/index.tsx +191 -105
- package/src/components/UncontrolledTable/interface.ts +6 -4
- package/src/stories/ModalStatus.stories.tsx +1 -0
- package/src/stories/UncontrolledTable.stories.tsx +464 -206
- package/src/components/UncontrolledTable/components/tbody/index.tsx +0 -33
- /package/src/components/UncontrolledTable/components/{tbody → row}/styles.tsx +0 -0
|
@@ -28,236 +28,58 @@ export default {
|
|
|
28
28
|
argTypes: {},
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const
|
|
32
|
-
{
|
|
33
|
-
date: format(new Date('8-14-2023 21:29'), 'dd/MM/yyyy'),
|
|
34
|
-
duration: 60,
|
|
35
|
-
campaign: 'Campaign 1',
|
|
36
|
-
agent: 'Maggie Leach',
|
|
37
|
-
dnis: 'dnis',
|
|
38
|
-
disposition: 'Disposition 1',
|
|
39
|
-
origin: 'origin',
|
|
40
|
-
id: '1',
|
|
41
|
-
action: (
|
|
42
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
43
|
-
Editar
|
|
44
|
-
</Button>
|
|
45
|
-
),
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
date: format(new Date('8-13-2023 21:29'), 'dd/MM/yyyy'),
|
|
49
|
-
duration: 60,
|
|
50
|
-
campaign: 'Campaign 2',
|
|
51
|
-
agent: 'Christina Harris',
|
|
52
|
-
ani: 'ani',
|
|
53
|
-
dnis: 'dnis',
|
|
54
|
-
disposition: 'Disposition 2',
|
|
55
|
-
origin: 'origin',
|
|
56
|
-
id: '2',
|
|
57
|
-
action: (
|
|
58
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
59
|
-
Editar
|
|
60
|
-
</Button>
|
|
61
|
-
),
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
date: format(new Date('8-12-2023 21:29'), 'dd/MM/yyyy'),
|
|
65
|
-
duration: 60,
|
|
66
|
-
campaign: 'Campaign 3',
|
|
67
|
-
agent: 'Alexia Crawford',
|
|
68
|
-
ani: 'ani',
|
|
69
|
-
dnis: 'dnis',
|
|
70
|
-
disposition: 'Disposition 3',
|
|
71
|
-
origin: 'origin',
|
|
72
|
-
id: '3',
|
|
73
|
-
action: (
|
|
74
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
75
|
-
Editar
|
|
76
|
-
</Button>
|
|
77
|
-
),
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
date: format(new Date('8-11-2023 21:29'), 'dd/MM/yyyy'),
|
|
81
|
-
duration: 60,
|
|
82
|
-
campaign: 'Campaign 4',
|
|
83
|
-
agent: 'Robyn Phillips',
|
|
84
|
-
ani: 'ani',
|
|
85
|
-
dnis: 'dnis',
|
|
86
|
-
disposition: 'Disposition 4',
|
|
87
|
-
origin: 'origin',
|
|
88
|
-
id: '4',
|
|
89
|
-
action: (
|
|
90
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
91
|
-
Editar
|
|
92
|
-
</Button>
|
|
93
|
-
),
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
date: format(new Date('8-10-2023 21:29'), 'dd/MM/yyyy'),
|
|
97
|
-
duration: 60,
|
|
98
|
-
campaign: 'Campaign 5',
|
|
99
|
-
agent: 'Bruce Robinson',
|
|
100
|
-
ani: 'ani',
|
|
101
|
-
dnis: 'dnis',
|
|
102
|
-
disposition: 'Disposition 5',
|
|
103
|
-
origin: 'origin',
|
|
104
|
-
id: '5',
|
|
105
|
-
action: (
|
|
106
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
107
|
-
Editar
|
|
108
|
-
</Button>
|
|
109
|
-
),
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
date: format(new Date('8-9-2023 21:29'), 'dd/MM/yyyy'),
|
|
113
|
-
duration: 60,
|
|
114
|
-
campaign: 'Campaign 6',
|
|
115
|
-
agent: 'Sophia Fletcher',
|
|
116
|
-
ani: 'ani',
|
|
117
|
-
dnis: 'dnis',
|
|
118
|
-
disposition: 'Disposition 6',
|
|
119
|
-
origin: 'origin',
|
|
120
|
-
id: '6',
|
|
121
|
-
action: (
|
|
122
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
123
|
-
Editar
|
|
124
|
-
</Button>
|
|
125
|
-
),
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
date: format(new Date('8-8-2023 21:29'), 'dd/MM/yyyy'),
|
|
129
|
-
duration: 60,
|
|
130
|
-
campaign: 'Campaign 7',
|
|
131
|
-
agent: 'Blanca Roberts',
|
|
132
|
-
ani: 'ani',
|
|
133
|
-
dnis: 'dnis',
|
|
134
|
-
disposition: 'Disposition 7',
|
|
135
|
-
origin: 'origin',
|
|
136
|
-
id: '7',
|
|
137
|
-
action: (
|
|
138
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
139
|
-
Editar
|
|
140
|
-
</Button>
|
|
141
|
-
),
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
145
|
-
duration: 60,
|
|
146
|
-
campaign: 'Campaign 8',
|
|
147
|
-
agent: 'Peter Warburton',
|
|
148
|
-
ani: 'ani',
|
|
149
|
-
dnis: 'dnis',
|
|
150
|
-
disposition: 'Disposition 8',
|
|
151
|
-
origin: 'origin',
|
|
152
|
-
id: '8',
|
|
153
|
-
action: (
|
|
154
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
155
|
-
Editar
|
|
156
|
-
</Button>
|
|
157
|
-
),
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
161
|
-
duration: 60,
|
|
162
|
-
campaign: 'Campaign 8',
|
|
163
|
-
agent: 'Peter Warburton',
|
|
164
|
-
ani: 'ani',
|
|
165
|
-
dnis: 'dnis',
|
|
166
|
-
disposition: 'Disposition 8',
|
|
167
|
-
origin: 'origin',
|
|
168
|
-
id: '8',
|
|
169
|
-
action: (
|
|
170
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
171
|
-
Editar
|
|
172
|
-
</Button>
|
|
173
|
-
),
|
|
174
|
-
},
|
|
31
|
+
const columns = [
|
|
175
32
|
{
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
dnis: 'dnis',
|
|
182
|
-
disposition: 'Disposition 8',
|
|
183
|
-
origin: 'origin',
|
|
184
|
-
id: '8',
|
|
185
|
-
action: (
|
|
186
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
187
|
-
Editar
|
|
188
|
-
</Button>
|
|
189
|
-
),
|
|
33
|
+
header: 'Data',
|
|
34
|
+
accessorKey: 'date',
|
|
35
|
+
type: 'date',
|
|
36
|
+
enableColumnFilter: true,
|
|
37
|
+
filterFn: 'customFilterText',
|
|
190
38
|
},
|
|
191
39
|
{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
dnis: 'dnis',
|
|
198
|
-
disposition: 'Disposition 8',
|
|
199
|
-
origin: 'origin',
|
|
200
|
-
id: '8',
|
|
201
|
-
action: (
|
|
202
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
203
|
-
Editar
|
|
204
|
-
</Button>
|
|
205
|
-
),
|
|
40
|
+
header: 'Duração',
|
|
41
|
+
accessorKey: 'duration',
|
|
42
|
+
type: 'number',
|
|
43
|
+
enableColumnFilter: true,
|
|
44
|
+
filterFn: 'customFilterText',
|
|
206
45
|
},
|
|
207
46
|
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
dnis: 'dnis',
|
|
214
|
-
disposition: 'Disposition 8',
|
|
215
|
-
origin: 'origin',
|
|
216
|
-
id: '8',
|
|
217
|
-
action: (
|
|
218
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
219
|
-
Editar
|
|
220
|
-
</Button>
|
|
221
|
-
),
|
|
47
|
+
header: 'Campanha',
|
|
48
|
+
accessorKey: 'campaign',
|
|
49
|
+
type: 'string',
|
|
50
|
+
enableColumnFilter: true,
|
|
51
|
+
filterFn: 'customFilterText',
|
|
222
52
|
},
|
|
223
53
|
{
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
disposition: 'Disposition 8',
|
|
231
|
-
origin: 'origin',
|
|
232
|
-
id: '8',
|
|
233
|
-
action: (
|
|
234
|
-
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
235
|
-
Editar
|
|
236
|
-
</Button>
|
|
237
|
-
),
|
|
54
|
+
header: 'Ação',
|
|
55
|
+
accessorKey: 'action',
|
|
56
|
+
type: 'action',
|
|
57
|
+
enableColumnFilter: false,
|
|
58
|
+
filterFn: 'customFilterText',
|
|
59
|
+
disableMenu: true,
|
|
238
60
|
},
|
|
239
61
|
];
|
|
240
62
|
|
|
241
|
-
const
|
|
63
|
+
const dnd_columns = [
|
|
242
64
|
{
|
|
243
65
|
header: 'Data',
|
|
244
66
|
accessorKey: 'date',
|
|
245
67
|
type: 'date',
|
|
246
|
-
enableColumnFilter:
|
|
68
|
+
enableColumnFilter: false,
|
|
247
69
|
filterFn: 'customFilterText',
|
|
248
70
|
},
|
|
249
71
|
{
|
|
250
72
|
header: 'Duração',
|
|
251
73
|
accessorKey: 'duration',
|
|
252
74
|
type: 'number',
|
|
253
|
-
enableColumnFilter:
|
|
75
|
+
enableColumnFilter: false,
|
|
254
76
|
filterFn: 'customFilterText',
|
|
255
77
|
},
|
|
256
78
|
{
|
|
257
79
|
header: 'Campanha',
|
|
258
80
|
accessorKey: 'campaign',
|
|
259
81
|
type: 'string',
|
|
260
|
-
enableColumnFilter:
|
|
82
|
+
enableColumnFilter: false,
|
|
261
83
|
filterFn: 'customFilterText',
|
|
262
84
|
},
|
|
263
85
|
{
|
|
@@ -266,11 +88,220 @@ const columns = [
|
|
|
266
88
|
type: 'action',
|
|
267
89
|
enableColumnFilter: false,
|
|
268
90
|
filterFn: 'customFilterText',
|
|
269
|
-
disableMenu: true,
|
|
270
91
|
},
|
|
271
92
|
];
|
|
272
93
|
|
|
273
94
|
export const Default = args => {
|
|
95
|
+
const data = [
|
|
96
|
+
{
|
|
97
|
+
date: format(new Date('8-14-2023 21:29'), 'dd/MM/yyyy'),
|
|
98
|
+
duration: 60,
|
|
99
|
+
campaign: 'Campaign 1',
|
|
100
|
+
agent: 'Maggie Leach',
|
|
101
|
+
dnis: 'dnis',
|
|
102
|
+
disposition: 'Disposition 1',
|
|
103
|
+
origin: 'origin',
|
|
104
|
+
id: '1',
|
|
105
|
+
action: (
|
|
106
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
107
|
+
Editar
|
|
108
|
+
</Button>
|
|
109
|
+
),
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
date: format(new Date('8-13-2023 21:29'), 'dd/MM/yyyy'),
|
|
113
|
+
duration: 60,
|
|
114
|
+
campaign: 'Campaign 2',
|
|
115
|
+
agent: 'Christina Harris',
|
|
116
|
+
ani: 'ani',
|
|
117
|
+
dnis: 'dnis',
|
|
118
|
+
disposition: 'Disposition 2',
|
|
119
|
+
origin: 'origin',
|
|
120
|
+
id: '2',
|
|
121
|
+
action: (
|
|
122
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
123
|
+
Editar
|
|
124
|
+
</Button>
|
|
125
|
+
),
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
date: format(new Date('8-12-2023 21:29'), 'dd/MM/yyyy'),
|
|
129
|
+
duration: 60,
|
|
130
|
+
campaign: 'Campaign 3',
|
|
131
|
+
agent: 'Alexia Crawford',
|
|
132
|
+
ani: 'ani',
|
|
133
|
+
dnis: 'dnis',
|
|
134
|
+
disposition: 'Disposition 3',
|
|
135
|
+
origin: 'origin',
|
|
136
|
+
id: '3',
|
|
137
|
+
action: (
|
|
138
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
139
|
+
Editar
|
|
140
|
+
</Button>
|
|
141
|
+
),
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
date: format(new Date('8-11-2023 21:29'), 'dd/MM/yyyy'),
|
|
145
|
+
duration: 60,
|
|
146
|
+
campaign: 'Campaign 4',
|
|
147
|
+
agent: 'Robyn Phillips',
|
|
148
|
+
ani: 'ani',
|
|
149
|
+
dnis: 'dnis',
|
|
150
|
+
disposition: 'Disposition 4',
|
|
151
|
+
origin: 'origin',
|
|
152
|
+
id: '4',
|
|
153
|
+
action: (
|
|
154
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
155
|
+
Editar
|
|
156
|
+
</Button>
|
|
157
|
+
),
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
date: format(new Date('8-10-2023 21:29'), 'dd/MM/yyyy'),
|
|
161
|
+
duration: 60,
|
|
162
|
+
campaign: 'Campaign 5',
|
|
163
|
+
agent: 'Bruce Robinson',
|
|
164
|
+
ani: 'ani',
|
|
165
|
+
dnis: 'dnis',
|
|
166
|
+
disposition: 'Disposition 5',
|
|
167
|
+
origin: 'origin',
|
|
168
|
+
id: '5',
|
|
169
|
+
action: (
|
|
170
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
171
|
+
Editar
|
|
172
|
+
</Button>
|
|
173
|
+
),
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
date: format(new Date('8-9-2023 21:29'), 'dd/MM/yyyy'),
|
|
177
|
+
duration: 60,
|
|
178
|
+
campaign: 'Campaign 6',
|
|
179
|
+
agent: 'Sophia Fletcher',
|
|
180
|
+
ani: 'ani',
|
|
181
|
+
dnis: 'dnis',
|
|
182
|
+
disposition: 'Disposition 6',
|
|
183
|
+
origin: 'origin',
|
|
184
|
+
id: '6',
|
|
185
|
+
action: (
|
|
186
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
187
|
+
Editar
|
|
188
|
+
</Button>
|
|
189
|
+
),
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
date: format(new Date('8-8-2023 21:29'), 'dd/MM/yyyy'),
|
|
193
|
+
duration: 60,
|
|
194
|
+
campaign: 'Campaign 7',
|
|
195
|
+
agent: 'Blanca Roberts',
|
|
196
|
+
ani: 'ani',
|
|
197
|
+
dnis: 'dnis',
|
|
198
|
+
disposition: 'Disposition 7',
|
|
199
|
+
origin: 'origin',
|
|
200
|
+
id: '7',
|
|
201
|
+
action: (
|
|
202
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
203
|
+
Editar
|
|
204
|
+
</Button>
|
|
205
|
+
),
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
209
|
+
duration: 60,
|
|
210
|
+
campaign: 'Campaign 8',
|
|
211
|
+
agent: 'Peter Warburton',
|
|
212
|
+
ani: 'ani',
|
|
213
|
+
dnis: 'dnis',
|
|
214
|
+
disposition: 'Disposition 8',
|
|
215
|
+
origin: 'origin',
|
|
216
|
+
id: '8',
|
|
217
|
+
action: (
|
|
218
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
219
|
+
Editar
|
|
220
|
+
</Button>
|
|
221
|
+
),
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
225
|
+
duration: 60,
|
|
226
|
+
campaign: 'Campaign 8',
|
|
227
|
+
agent: 'Peter Warburton',
|
|
228
|
+
ani: 'ani',
|
|
229
|
+
dnis: 'dnis',
|
|
230
|
+
disposition: 'Disposition 8',
|
|
231
|
+
origin: 'origin',
|
|
232
|
+
id: '8',
|
|
233
|
+
action: (
|
|
234
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
235
|
+
Editar
|
|
236
|
+
</Button>
|
|
237
|
+
),
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
241
|
+
duration: 60,
|
|
242
|
+
campaign: 'Campaign 8',
|
|
243
|
+
agent: 'Peter Warburton',
|
|
244
|
+
ani: 'ani',
|
|
245
|
+
dnis: 'dnis',
|
|
246
|
+
disposition: 'Disposition 8',
|
|
247
|
+
origin: 'origin',
|
|
248
|
+
id: '8',
|
|
249
|
+
action: (
|
|
250
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
251
|
+
Editar
|
|
252
|
+
</Button>
|
|
253
|
+
),
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
257
|
+
duration: 60,
|
|
258
|
+
campaign: 'Campaign 8',
|
|
259
|
+
agent: 'Peter Warburton',
|
|
260
|
+
ani: 'ani',
|
|
261
|
+
dnis: 'dnis',
|
|
262
|
+
disposition: 'Disposition 8',
|
|
263
|
+
origin: 'origin',
|
|
264
|
+
id: '8',
|
|
265
|
+
action: (
|
|
266
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
267
|
+
Editar
|
|
268
|
+
</Button>
|
|
269
|
+
),
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
273
|
+
duration: 60,
|
|
274
|
+
campaign: 'Campaign 8',
|
|
275
|
+
agent: 'Peter Warburton',
|
|
276
|
+
ani: 'ani',
|
|
277
|
+
dnis: 'dnis',
|
|
278
|
+
disposition: 'Disposition 8',
|
|
279
|
+
origin: 'origin',
|
|
280
|
+
id: '8',
|
|
281
|
+
action: (
|
|
282
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
283
|
+
Editar
|
|
284
|
+
</Button>
|
|
285
|
+
),
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
289
|
+
duration: 60,
|
|
290
|
+
campaign: 'Campaign 8',
|
|
291
|
+
agent: 'Peter Warburton',
|
|
292
|
+
ani: 'ani',
|
|
293
|
+
dnis: 'dnis',
|
|
294
|
+
disposition: 'Disposition 8',
|
|
295
|
+
origin: 'origin',
|
|
296
|
+
id: '8',
|
|
297
|
+
action: (
|
|
298
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
299
|
+
Editar
|
|
300
|
+
</Button>
|
|
301
|
+
),
|
|
302
|
+
},
|
|
303
|
+
];
|
|
304
|
+
|
|
274
305
|
const [hiddenColumns, setHiddenColumns] = useState<string[]>(() =>
|
|
275
306
|
JSON.parse(localStorage.getItem('hiddenColumns') || '[]'),
|
|
276
307
|
);
|
|
@@ -289,7 +320,7 @@ export const Default = args => {
|
|
|
289
320
|
};
|
|
290
321
|
|
|
291
322
|
useEffect(() => {
|
|
292
|
-
console.
|
|
323
|
+
console.info('Colunas escondidas ao carregar:::', hiddenColumns);
|
|
293
324
|
}, [hiddenColumns]);
|
|
294
325
|
|
|
295
326
|
return (
|
|
@@ -336,3 +367,230 @@ export const Default = args => {
|
|
|
336
367
|
};
|
|
337
368
|
|
|
338
369
|
Default.args = {};
|
|
370
|
+
|
|
371
|
+
export const RowDnd = args => {
|
|
372
|
+
const [data, setData] = useState([
|
|
373
|
+
{
|
|
374
|
+
date: format(new Date('8-14-2023 21:29'), 'dd/MM/yyyy'),
|
|
375
|
+
duration: 60,
|
|
376
|
+
campaign: 'Campaign 1',
|
|
377
|
+
agent: 'Maggie Leach',
|
|
378
|
+
dnis: 'dnis',
|
|
379
|
+
disposition: 'Disposition 1',
|
|
380
|
+
origin: 'origin',
|
|
381
|
+
id: '1',
|
|
382
|
+
action: (
|
|
383
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
384
|
+
Editar
|
|
385
|
+
</Button>
|
|
386
|
+
),
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
date: format(new Date('8-13-2023 21:29'), 'dd/MM/yyyy'),
|
|
390
|
+
duration: 60,
|
|
391
|
+
campaign: 'Campaign 2',
|
|
392
|
+
agent: 'Christina Harris',
|
|
393
|
+
ani: 'ani',
|
|
394
|
+
dnis: 'dnis',
|
|
395
|
+
disposition: 'Disposition 2',
|
|
396
|
+
origin: 'origin',
|
|
397
|
+
id: '2',
|
|
398
|
+
action: (
|
|
399
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
400
|
+
Editar
|
|
401
|
+
</Button>
|
|
402
|
+
),
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
date: format(new Date('8-12-2023 21:29'), 'dd/MM/yyyy'),
|
|
406
|
+
duration: 60,
|
|
407
|
+
campaign: 'Campaign 3',
|
|
408
|
+
agent: 'Alexia Crawford',
|
|
409
|
+
ani: 'ani',
|
|
410
|
+
dnis: 'dnis',
|
|
411
|
+
disposition: 'Disposition 3',
|
|
412
|
+
origin: 'origin',
|
|
413
|
+
id: '3',
|
|
414
|
+
action: (
|
|
415
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
416
|
+
Editar
|
|
417
|
+
</Button>
|
|
418
|
+
),
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
date: format(new Date('8-11-2023 21:29'), 'dd/MM/yyyy'),
|
|
422
|
+
duration: 60,
|
|
423
|
+
campaign: 'Campaign 4',
|
|
424
|
+
agent: 'Robyn Phillips',
|
|
425
|
+
ani: 'ani',
|
|
426
|
+
dnis: 'dnis',
|
|
427
|
+
disposition: 'Disposition 4',
|
|
428
|
+
origin: 'origin',
|
|
429
|
+
id: '4',
|
|
430
|
+
action: (
|
|
431
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
432
|
+
Editar
|
|
433
|
+
</Button>
|
|
434
|
+
),
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
date: format(new Date('8-10-2023 21:29'), 'dd/MM/yyyy'),
|
|
438
|
+
duration: 60,
|
|
439
|
+
campaign: 'Campaign 5',
|
|
440
|
+
agent: 'Bruce Robinson',
|
|
441
|
+
ani: 'ani',
|
|
442
|
+
dnis: 'dnis',
|
|
443
|
+
disposition: 'Disposition 5',
|
|
444
|
+
origin: 'origin',
|
|
445
|
+
id: '5',
|
|
446
|
+
action: (
|
|
447
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
448
|
+
Editar
|
|
449
|
+
</Button>
|
|
450
|
+
),
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
date: format(new Date('8-9-2023 21:29'), 'dd/MM/yyyy'),
|
|
454
|
+
duration: 60,
|
|
455
|
+
campaign: 'Campaign 6',
|
|
456
|
+
agent: 'Sophia Fletcher',
|
|
457
|
+
ani: 'ani',
|
|
458
|
+
dnis: 'dnis',
|
|
459
|
+
disposition: 'Disposition 6',
|
|
460
|
+
origin: 'origin',
|
|
461
|
+
id: '6',
|
|
462
|
+
action: (
|
|
463
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
464
|
+
Editar
|
|
465
|
+
</Button>
|
|
466
|
+
),
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
date: format(new Date('8-8-2023 21:29'), 'dd/MM/yyyy'),
|
|
470
|
+
duration: 60,
|
|
471
|
+
campaign: 'Campaign 7',
|
|
472
|
+
agent: 'Blanca Roberts',
|
|
473
|
+
ani: 'ani',
|
|
474
|
+
dnis: 'dnis',
|
|
475
|
+
disposition: 'Disposition 7',
|
|
476
|
+
origin: 'origin',
|
|
477
|
+
id: '7',
|
|
478
|
+
action: (
|
|
479
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
480
|
+
Editar
|
|
481
|
+
</Button>
|
|
482
|
+
),
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
486
|
+
duration: 60,
|
|
487
|
+
campaign: 'Campaign 8',
|
|
488
|
+
agent: 'Peter Warburton',
|
|
489
|
+
ani: 'ani',
|
|
490
|
+
dnis: 'dnis',
|
|
491
|
+
disposition: 'Disposition 8',
|
|
492
|
+
origin: 'origin',
|
|
493
|
+
id: '55',
|
|
494
|
+
action: (
|
|
495
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
496
|
+
Editar
|
|
497
|
+
</Button>
|
|
498
|
+
),
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
502
|
+
duration: 60,
|
|
503
|
+
campaign: 'Campaign 8',
|
|
504
|
+
agent: 'Peter Warburton',
|
|
505
|
+
ani: 'ani',
|
|
506
|
+
dnis: 'dnis',
|
|
507
|
+
disposition: 'Disposition 8',
|
|
508
|
+
origin: 'origin',
|
|
509
|
+
id: '8',
|
|
510
|
+
action: (
|
|
511
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
512
|
+
Editar
|
|
513
|
+
</Button>
|
|
514
|
+
),
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
518
|
+
duration: 60,
|
|
519
|
+
campaign: 'Campaign 8',
|
|
520
|
+
agent: 'Peter Warburton',
|
|
521
|
+
ani: 'ani',
|
|
522
|
+
dnis: 'dnis',
|
|
523
|
+
disposition: 'Disposition 8',
|
|
524
|
+
origin: 'origin',
|
|
525
|
+
id: '9',
|
|
526
|
+
action: (
|
|
527
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
528
|
+
Editar
|
|
529
|
+
</Button>
|
|
530
|
+
),
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
534
|
+
duration: 60,
|
|
535
|
+
campaign: 'Campaign 8',
|
|
536
|
+
agent: 'Peter Warburton',
|
|
537
|
+
ani: 'ani',
|
|
538
|
+
dnis: 'dnis',
|
|
539
|
+
disposition: 'Disposition 8',
|
|
540
|
+
origin: 'origin',
|
|
541
|
+
id: '10',
|
|
542
|
+
action: (
|
|
543
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
544
|
+
Editar
|
|
545
|
+
</Button>
|
|
546
|
+
),
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
550
|
+
duration: 60,
|
|
551
|
+
campaign: 'Campaign 8',
|
|
552
|
+
agent: 'Peter Warburton',
|
|
553
|
+
ani: 'ani',
|
|
554
|
+
dnis: 'dnis',
|
|
555
|
+
disposition: 'Disposition 8',
|
|
556
|
+
origin: 'origin',
|
|
557
|
+
id: '11',
|
|
558
|
+
action: (
|
|
559
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
560
|
+
Editar
|
|
561
|
+
</Button>
|
|
562
|
+
),
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
date: format(new Date('8-7-2023 21:29'), 'dd/MM/yyyy'),
|
|
566
|
+
duration: 60,
|
|
567
|
+
campaign: 'Campaign 8',
|
|
568
|
+
agent: 'Peter Warburton',
|
|
569
|
+
ani: 'ani',
|
|
570
|
+
dnis: 'dnis',
|
|
571
|
+
disposition: 'Disposition 8',
|
|
572
|
+
origin: 'origin',
|
|
573
|
+
id: '12',
|
|
574
|
+
action: (
|
|
575
|
+
<Button color="primary" disableElevation variant="text" onClick={() => console.log('click')}>
|
|
576
|
+
Editar
|
|
577
|
+
</Button>
|
|
578
|
+
),
|
|
579
|
+
},
|
|
580
|
+
]);
|
|
581
|
+
|
|
582
|
+
return (
|
|
583
|
+
<>
|
|
584
|
+
<UncontrolledTable
|
|
585
|
+
data={data}
|
|
586
|
+
columns={dnd_columns}
|
|
587
|
+
stickyHeader
|
|
588
|
+
draggable
|
|
589
|
+
onDragEnd={data => setData(data)}
|
|
590
|
+
{...args}
|
|
591
|
+
/>
|
|
592
|
+
</>
|
|
593
|
+
);
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
RowDnd.args = {};
|