@ercioko/meblotex-api 0.2.2 → 0.2.3
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/api/Api.d.ts +33 -0
- package/dist/api/Api.js +152 -0
- package/dist/api/Endpoint.d.ts +13 -0
- package/dist/api/Endpoint.js +126 -0
- package/dist/api/createApi.d.ts +52 -0
- package/dist/api/createApi.js +81 -0
- package/dist/api/error.d.ts +15 -0
- package/dist/api/error.js +18 -0
- package/{src/api/index.ts → dist/api/index.d.ts} +0 -1
- package/dist/api/index.js +34 -0
- package/dist/api/status.d.ts +3 -0
- package/dist/api/status.js +6 -0
- package/dist/api/utils/getAlert.d.ts +6 -0
- package/dist/api/utils/getAlert.js +65 -0
- package/dist/api/utils/index.js +8 -0
- package/dist/app_types.d.ts +607 -0
- package/dist/app_types.js +75 -0
- package/dist/components/ApiHostProvider.d.ts +7 -0
- package/dist/components/ApiHostProvider.js +35 -0
- package/dist/components/StatusTag.d.ts +11 -0
- package/dist/components/StatusTag.js +86 -0
- package/dist/components/Table/DataTableWrapper.d.ts +3 -0
- package/dist/components/Table/DataTableWrapper.js +44 -0
- package/dist/components/Table/FloatingActions.d.ts +14 -0
- package/dist/components/Table/FloatingActions.js +32 -0
- package/dist/components/Table/Spinner.d.ts +2 -0
- package/dist/components/Table/Spinner.js +26 -0
- package/dist/components/Table/Table.d.ts +28 -0
- package/dist/components/Table/Table.js +330 -0
- package/dist/components/Table/addIndexToObject.d.ts +3 -0
- package/dist/components/Table/addIndexToObject.js +17 -0
- package/dist/components/Table/areProvidedColumnsDifferent.d.ts +2 -0
- package/dist/components/Table/areProvidedColumnsDifferent.js +16 -0
- package/dist/components/Table/hooks/useFetchPage.d.ts +18 -0
- package/dist/components/Table/hooks/useFetchPage.js +123 -0
- package/dist/components/Table/hooks/useGetCellRenderer.d.ts +25 -0
- package/dist/components/Table/hooks/useGetCellRenderer.js +166 -0
- package/dist/components/Table/hooks/useGetColumnsWithCheckbox.d.ts +5 -0
- package/dist/components/Table/hooks/useGetColumnsWithCheckbox.js +53 -0
- package/dist/components/Table/hooks/useGetDeleteRow.d.ts +9 -0
- package/dist/components/Table/hooks/useGetDeleteRow.js +74 -0
- package/dist/components/Table/hooks/useGetResizeColumn.d.ts +8 -0
- package/dist/components/Table/hooks/useGetResizeColumn.js +28 -0
- package/dist/components/Table/hooks/useGetRowCheckbox.d.ts +5 -0
- package/dist/components/Table/hooks/useGetRowCheckbox.js +54 -0
- package/dist/components/Table/hooks/useLoadDataSource.d.ts +10 -0
- package/dist/components/Table/hooks/useLoadDataSource.js +20 -0
- package/dist/components/Table/hooks/usePageSize.d.ts +5 -0
- package/dist/components/Table/hooks/usePageSize.js +16 -0
- package/dist/components/Table/hooks/useRenderRowActions.d.ts +6 -0
- package/dist/components/Table/hooks/useRenderRowActions.js +51 -0
- package/dist/components/Table/hooks/useResizeColumns.d.ts +9 -0
- package/dist/components/Table/hooks/useResizeColumns.js +60 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +8 -0
- package/dist/components/Table/providers/OrderProvider.d.ts +9 -0
- package/dist/components/Table/providers/OrderProvider.js +17 -0
- package/dist/components/Table/styles.d.ts +6 -0
- package/dist/components/Table/styles.js +37 -0
- package/dist/components/index.js +26 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.js +8 -0
- package/dist/db_types.d.ts +208 -0
- package/dist/db_types.js +2 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/useApi.d.ts +2 -0
- package/dist/hooks/useApi.js +42 -0
- package/dist/hooks/useEndpoint.d.ts +2 -0
- package/dist/hooks/useEndpoint.js +34 -0
- package/dist/index.js +19 -0
- package/dist/lib/index.js +18 -0
- package/dist/lib/jednostkaNazwa.d.ts +6 -0
- package/dist/lib/jednostkaNazwa.js +9 -0
- package/dist/lib/typDokumentuNazwa.d.ts +6 -0
- package/dist/lib/typDokumentuNazwa.js +11 -0
- package/dist/src/api/Api.js +316 -0
- package/dist/src/api/Endpoint.js +365 -0
- package/dist/src/api/createApi.js +50 -0
- package/dist/src/api/error.js +15 -0
- package/dist/src/api/index.js +5 -0
- package/dist/src/api/status.js +3 -0
- package/dist/src/api/utils/getAlert.js +63 -0
- package/dist/src/api/utils/index.js +1 -0
- package/dist/src/app_types.js +72 -0
- package/dist/src/components/ApiHostProvider.js +11 -0
- package/dist/src/components/StatusTag.js +153 -0
- package/dist/src/components/Table/DataTableWrapper.js +115 -0
- package/dist/src/components/Table/FloatingActions.js +60 -0
- package/dist/src/components/Table/Spinner.js +40 -0
- package/dist/src/components/Table/Summary.js +16 -0
- package/dist/src/components/Table/Table.js +498 -0
- package/dist/src/components/Table/addIndexToObject.js +57 -0
- package/dist/src/components/Table/areProvidedColumnsDifferent.js +19 -0
- package/dist/src/components/Table/clicked.js +12 -0
- package/dist/src/components/Table/displayActions.js +11 -0
- package/dist/src/components/Table/hooks/useFetchPage.js +254 -0
- package/dist/src/components/Table/hooks/useGetCellRenderer.js +231 -0
- package/dist/src/components/Table/hooks/useGetColumnsWithCheckbox.js +33 -0
- package/dist/src/components/Table/hooks/useGetDeleteRow.js +181 -0
- package/dist/src/components/Table/hooks/useGetResizeColumn.js +72 -0
- package/dist/src/components/Table/hooks/useGetRowCheckbox.js +55 -0
- package/dist/src/components/Table/hooks/useLoadDataSource.js +16 -0
- package/dist/src/components/Table/hooks/usePageSize.js +15 -0
- package/dist/src/components/Table/hooks/useRenderRowActions.js +50 -0
- package/dist/src/components/Table/hooks/useResizeColumns.js +70 -0
- package/dist/src/components/Table/index.js +1 -0
- package/dist/src/components/Table/providers/OrderProvider.js +65 -0
- package/dist/src/components/Table/styles.js +66 -0
- package/dist/src/components/index.js +4 -0
- package/dist/src/config.js +6 -0
- package/dist/src/db_types.js +1 -0
- package/dist/src/hooks/index.js +2 -0
- package/dist/src/hooks/useApi.js +84 -0
- package/dist/src/hooks/useEndpoint.js +60 -0
- package/dist/src/index.js +3 -0
- package/dist/src/lib/index.js +2 -0
- package/dist/src/lib/jednostkaNazwa.js +6 -0
- package/dist/src/lib/typDokumentuNazwa.js +16 -0
- package/dist/src/utils/Query.js +73 -0
- package/dist/src/utils/getWZNumber.js +4 -0
- package/dist/src/utils/getZamowienieDokumentNumber.js +4 -0
- package/{src/utils/index.ts → dist/src/utils/index.js} +2 -2
- package/dist/utils/Query.d.ts +6 -0
- package/dist/utils/Query.js +33 -0
- package/dist/utils/getWZNumber.d.ts +2 -0
- package/dist/utils/getWZNumber.js +10 -0
- package/dist/utils/getZamowienieDokumentNumber.d.ts +2 -0
- package/dist/utils/getZamowienieDokumentNumber.js +8 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +12 -0
- package/package.json +3 -2
- package/.eslintrc +0 -6
- package/.nvmrc +0 -1
- package/.prettierrc +0 -11
- package/src/api/Api.ts +0 -140
- package/src/api/Endpoint.ts +0 -76
- package/src/api/createApi.ts +0 -116
- package/src/api/error.ts +0 -17
- package/src/api/status.ts +0 -3
- package/src/api/utils/getAlert.ts +0 -75
- package/src/app_types.ts +0 -695
- package/src/components/ApiHostProvider.tsx +0 -13
- package/src/components/StatusTag.tsx +0 -83
- package/src/components/Table/DataTableWrapper.tsx +0 -28
- package/src/components/Table/FloatingActions.tsx +0 -152
- package/src/components/Table/Spinner.tsx +0 -35
- package/src/components/Table/Summary.tsx +0 -18
- package/src/components/Table/Table.tsx +0 -474
- package/src/components/Table/addIndexToObject.ts +0 -6
- package/src/components/Table/areProvidedColumnsDifferent.ts +0 -26
- package/src/components/Table/clicked.js +0 -12
- package/src/components/Table/displayActions.tsx +0 -19
- package/src/components/Table/hooks/useFetchPage.tsx +0 -83
- package/src/components/Table/hooks/useGetCellRenderer.tsx +0 -197
- package/src/components/Table/hooks/useGetColumnsWithCheckbox.tsx +0 -34
- package/src/components/Table/hooks/useGetDeleteRow.tsx +0 -37
- package/src/components/Table/hooks/useGetResizeColumn.ts +0 -33
- package/src/components/Table/hooks/useGetRowCheckbox.tsx +0 -25
- package/src/components/Table/hooks/useLoadDataSource.ts +0 -24
- package/src/components/Table/hooks/usePageSize.tsx +0 -20
- package/src/components/Table/hooks/useRenderRowActions.tsx +0 -45
- package/src/components/Table/hooks/useResizeColumns.ts +0 -61
- package/src/components/Table/index.ts +0 -1
- package/src/components/Table/providers/OrderProvider.tsx +0 -20
- package/src/components/Table/styles.ts +0 -208
- package/src/config.ts +0 -7
- package/src/db_types.ts +0 -220
- package/src/hooks/useApi.ts +0 -43
- package/src/hooks/useEndpoint.ts +0 -35
- package/src/lib/jednostkaNazwa.ts +0 -6
- package/src/lib/typDokumentuNazwa.ts +0 -8
- package/src/utils/Query.ts +0 -30
- package/src/utils/getWZNumber.ts +0 -13
- package/src/utils/getZamowienieDokumentNumber.ts +0 -11
- package/tsconfig.json +0 -25
- package/tsconfig.tsbuildinfo +0 -1
- /package/{src/api/utils/index.ts → dist/api/utils/index.d.ts} +0 -0
- /package/{src/components/index.ts → dist/components/index.d.ts} +0 -0
- /package/{src/hooks/index.ts → dist/hooks/index.d.ts} +0 -0
- /package/{src/index.ts → dist/index.d.ts} +0 -0
- /package/{src/lib/index.ts → dist/lib/index.d.ts} +0 -0
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { Tag as AntTag, TagProps } from 'antd';
|
|
3
|
-
|
|
4
|
-
export const statuses = [
|
|
5
|
-
'ZAM',
|
|
6
|
-
'PRZ',
|
|
7
|
-
'PRO',
|
|
8
|
-
'WYP',
|
|
9
|
-
'DWY',
|
|
10
|
-
'WYB',
|
|
11
|
-
'PDM',
|
|
12
|
-
'WZM',
|
|
13
|
-
'N',
|
|
14
|
-
'B',
|
|
15
|
-
'ARC',
|
|
16
|
-
'WZ',
|
|
17
|
-
'PW',
|
|
18
|
-
] as const;
|
|
19
|
-
|
|
20
|
-
export type Status = typeof statuses[number];
|
|
21
|
-
|
|
22
|
-
export const StyledTag: FC<TagProps> = ({
|
|
23
|
-
style,
|
|
24
|
-
...props
|
|
25
|
-
}) => (
|
|
26
|
-
<AntTag
|
|
27
|
-
style={{
|
|
28
|
-
textAlign: 'center',
|
|
29
|
-
overflow: 'hidden',
|
|
30
|
-
textOverflow: 'ellipsis',
|
|
31
|
-
position: 'absolute',
|
|
32
|
-
top: '50%',
|
|
33
|
-
transform: 'translateY(-50%)',
|
|
34
|
-
right: '0',
|
|
35
|
-
left: '0',
|
|
36
|
-
...style,
|
|
37
|
-
}}
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
type Props = {
|
|
44
|
-
status: Status;
|
|
45
|
-
Tag?: FC<TagProps>;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const StatusTag: FC<Props> = ({ status, Tag = StyledTag }) => {
|
|
49
|
-
switch (status) {
|
|
50
|
-
case 'ZAM':
|
|
51
|
-
return <Tag color="cyan">Zamówione</Tag>;
|
|
52
|
-
case 'PRZ':
|
|
53
|
-
return <Tag color="blue">Przyjete</Tag>;
|
|
54
|
-
case 'PRO':
|
|
55
|
-
return <Tag color="gold">W produkcji</Tag>;
|
|
56
|
-
case 'WYP':
|
|
57
|
-
return <Tag color="orange">Wyprodukowane</Tag>;
|
|
58
|
-
case 'DWY':
|
|
59
|
-
return <Tag color="green">Do wydania</Tag>;
|
|
60
|
-
case 'WYB':
|
|
61
|
-
return <Tag color="lime">Wybieranie</Tag>;
|
|
62
|
-
case 'PDM':
|
|
63
|
-
return <Tag color="gray">Przyjęte do magazynu</Tag>;
|
|
64
|
-
case 'WZM':
|
|
65
|
-
return <Tag color="green">Wydane z magazynu</Tag>;
|
|
66
|
-
case 'N':
|
|
67
|
-
return <Tag color="gold">Bufor portal</Tag>;
|
|
68
|
-
case 'B':
|
|
69
|
-
return <Tag color="blue">Bufor</Tag>;
|
|
70
|
-
case 'ARC':
|
|
71
|
-
return <Tag color="black">Archiwum</Tag>;
|
|
72
|
-
case 'WZ':
|
|
73
|
-
return <Tag color="blue">Wydanie zewnętrzne</Tag>;
|
|
74
|
-
case 'PW':
|
|
75
|
-
return <Tag color="green">Przychód wewnętrzny</Tag>;
|
|
76
|
-
default:
|
|
77
|
-
// eslint-disable-next-line no-console
|
|
78
|
-
console.log('nieznany: ', status);
|
|
79
|
-
return <Tag color="red">Nieznany</Tag>;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export default StatusTag;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React, { ForwardedRef, forwardRef } from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
const Wrapper = styled.div`
|
|
5
|
-
position: relative;
|
|
6
|
-
width: 100%;
|
|
7
|
-
max-height: 100%;
|
|
8
|
-
border-bottom: 1px solid #e8e8e8;
|
|
9
|
-
margin-top: 0;
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
Wrapper.defaultProps = {
|
|
13
|
-
className: 'data-table-wrapper',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
function DataTableWrapper(
|
|
17
|
-
{ children, ...props }: React.PropsWithChildren<Record<string, unknown>>,
|
|
18
|
-
ref: ForwardedRef<HTMLDivElement>
|
|
19
|
-
) {
|
|
20
|
-
return (
|
|
21
|
-
<Wrapper className="data-table-wrapper" {...props} ref={ref}>
|
|
22
|
-
{children}
|
|
23
|
-
</Wrapper>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default Wrapper;
|
|
28
|
-
// export default forwardRef(DataTableWrapper);
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { Space } from 'antd';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { DeleteTwoTone } from '@ant-design/icons';
|
|
4
|
-
import { ActionFunction, Actions, DataRow } from '../../app_types';
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
|
|
7
|
-
const StyledFloatingActions = styled.div`
|
|
8
|
-
& {
|
|
9
|
-
position: absolute;
|
|
10
|
-
left: 100px;
|
|
11
|
-
pointer-events: none;
|
|
12
|
-
transition: width 300ms ease-in-out, padding 300ms ease-in-out;
|
|
13
|
-
box-sizing: content-box;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
padding-top: 20px;
|
|
16
|
-
z-index: 2;
|
|
17
|
-
}
|
|
18
|
-
&.shown {
|
|
19
|
-
pointer-events: all;
|
|
20
|
-
}
|
|
21
|
-
& > div {
|
|
22
|
-
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
|
|
23
|
-
height: 58px;
|
|
24
|
-
background: #fff;
|
|
25
|
-
border-radius: 10px;
|
|
26
|
-
margin: 10px;
|
|
27
|
-
}
|
|
28
|
-
& > div > div:first-child {
|
|
29
|
-
margin-left: 27px;
|
|
30
|
-
}
|
|
31
|
-
& > div > div:last-child {
|
|
32
|
-
margin-right: 27px;
|
|
33
|
-
}
|
|
34
|
-
& > div .action {
|
|
35
|
-
width: 24px;
|
|
36
|
-
height: 24px;
|
|
37
|
-
display: flex;
|
|
38
|
-
align-items: center;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
transition: 150ms ease-in-out;
|
|
41
|
-
position: relative;
|
|
42
|
-
}
|
|
43
|
-
& > div .action .action-tooltip {
|
|
44
|
-
position: absolute;
|
|
45
|
-
top: -35px;
|
|
46
|
-
background: #595959;
|
|
47
|
-
color: #fff;
|
|
48
|
-
border-radius: 8px;
|
|
49
|
-
padding: 2px 10px;
|
|
50
|
-
display: none;
|
|
51
|
-
}
|
|
52
|
-
& > div .action .action-tooltip::after {
|
|
53
|
-
content: '';
|
|
54
|
-
position: absolute;
|
|
55
|
-
top: 100%;
|
|
56
|
-
left: calc(50% - 8px);
|
|
57
|
-
display: block;
|
|
58
|
-
width: 0;
|
|
59
|
-
height: 0;
|
|
60
|
-
border-width: 8px;
|
|
61
|
-
border-style: solid;
|
|
62
|
-
border-color: #595959 transparent transparent transparent;
|
|
63
|
-
}
|
|
64
|
-
& > div .action:hover {
|
|
65
|
-
width: 48px;
|
|
66
|
-
height: 48px;
|
|
67
|
-
}
|
|
68
|
-
& > div .action:hover:enabled {
|
|
69
|
-
cursor: pointer;
|
|
70
|
-
}
|
|
71
|
-
& > div .action:hover .action-tooltip {
|
|
72
|
-
display: initial;
|
|
73
|
-
}
|
|
74
|
-
& > div .action:hover span {
|
|
75
|
-
background: rgba(0, 0, 0, 0.1);
|
|
76
|
-
}
|
|
77
|
-
& > div .action:hover span svg {
|
|
78
|
-
font-size: 28px;
|
|
79
|
-
}
|
|
80
|
-
& > div .action span {
|
|
81
|
-
padding: 10px;
|
|
82
|
-
border-radius: 100px;
|
|
83
|
-
transition: 150ms ease-in-out;
|
|
84
|
-
}
|
|
85
|
-
& > div .action span svg {
|
|
86
|
-
transition: 150ms ease-in-out;
|
|
87
|
-
font-size: 24px;
|
|
88
|
-
}
|
|
89
|
-
`
|
|
90
|
-
|
|
91
|
-
export default function FloatingActions<DataType = DataRow>({
|
|
92
|
-
actionsDimensions,
|
|
93
|
-
actionsFor,
|
|
94
|
-
floatingButtons,
|
|
95
|
-
actionHover,
|
|
96
|
-
actionLeave,
|
|
97
|
-
hide,
|
|
98
|
-
actions,
|
|
99
|
-
}: {
|
|
100
|
-
actionsDimensions: { top: number; width: number; transition: string };
|
|
101
|
-
actionsFor: undefined;
|
|
102
|
-
floatingButtons: ActionFunction<DataType>[] | undefined;
|
|
103
|
-
actionHover: () => void;
|
|
104
|
-
actionLeave: () => void;
|
|
105
|
-
hide: (e?: MouseEvent | undefined) => void;
|
|
106
|
-
actions: Actions<DataType>;
|
|
107
|
-
}): JSX.Element {
|
|
108
|
-
return (
|
|
109
|
-
<StyledFloatingActions
|
|
110
|
-
role="button"
|
|
111
|
-
style={actionsDimensions}
|
|
112
|
-
className={`floating-actions ${actionsFor ? 'shown' : ''}`}
|
|
113
|
-
onClick={(e) => {
|
|
114
|
-
e.stopPropagation();
|
|
115
|
-
e.preventDefault();
|
|
116
|
-
}}
|
|
117
|
-
>
|
|
118
|
-
<Space size={28}>
|
|
119
|
-
{floatingButtons?.map((_, i) => (
|
|
120
|
-
<div
|
|
121
|
-
role="button"
|
|
122
|
-
key={i.toString()}
|
|
123
|
-
className="action"
|
|
124
|
-
onMouseEnter={actionHover}
|
|
125
|
-
onMouseLeave={actionLeave}
|
|
126
|
-
onClick={() => hide()}
|
|
127
|
-
>
|
|
128
|
-
{actions.tooltips && actions.tooltips[i] ? (
|
|
129
|
-
<div className="action-tooltip">{actions.tooltips[i]}</div>
|
|
130
|
-
) : undefined}
|
|
131
|
-
{/* {e(actionsFor)} */}
|
|
132
|
-
</div>
|
|
133
|
-
))}
|
|
134
|
-
{actions.delete ? (
|
|
135
|
-
<div
|
|
136
|
-
className="action"
|
|
137
|
-
onMouseEnter={actionHover}
|
|
138
|
-
onMouseLeave={actionLeave}
|
|
139
|
-
>
|
|
140
|
-
<div className="action-tooltip">Usuń</div>
|
|
141
|
-
{typeof actionsFor !== 'undefined' && (
|
|
142
|
-
<DeleteTwoTone
|
|
143
|
-
// onClick={() => deleteRow(actionsFor.id)}
|
|
144
|
-
twoToneColor="#F5222D"
|
|
145
|
-
/>
|
|
146
|
-
)}
|
|
147
|
-
</div>
|
|
148
|
-
) : undefined}
|
|
149
|
-
</Space>
|
|
150
|
-
</StyledFloatingActions>
|
|
151
|
-
);
|
|
152
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import config from '../../config';
|
|
2
|
-
import { Spin } from 'antd';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
|
|
6
|
-
const { ROW_SIZE } = config;
|
|
7
|
-
const StyledSpinner = styled.div`
|
|
8
|
-
& {
|
|
9
|
-
position: absolute;
|
|
10
|
-
bottom: -34px;
|
|
11
|
-
left: 50%;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.ant-spin {
|
|
15
|
-
display: flex;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
margin: 15px 0;
|
|
18
|
-
}
|
|
19
|
-
`
|
|
20
|
-
|
|
21
|
-
export default function Spinner() {
|
|
22
|
-
return (
|
|
23
|
-
<StyledSpinner
|
|
24
|
-
className="spinner-wrapper"
|
|
25
|
-
style={{
|
|
26
|
-
height: ROW_SIZE,
|
|
27
|
-
display: 'flex',
|
|
28
|
-
justifyContent: 'center',
|
|
29
|
-
alignItems: 'center',
|
|
30
|
-
}}
|
|
31
|
-
>
|
|
32
|
-
<Spin style={{ margin: 0 }} />
|
|
33
|
-
</StyledSpinner>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TableData } from './styles'
|
|
3
|
-
|
|
4
|
-
export default function Summary({ summary, widths }) {
|
|
5
|
-
return summary ? (
|
|
6
|
-
<div className="tr summary">
|
|
7
|
-
{summary.map((e, i) => (
|
|
8
|
-
<TableData
|
|
9
|
-
key={i}
|
|
10
|
-
style={{ width: `${widths[i]}px` }}
|
|
11
|
-
className={e === undefined ? 'td orphan' : 'td'}
|
|
12
|
-
>
|
|
13
|
-
{e}
|
|
14
|
-
</TableData>
|
|
15
|
-
))}
|
|
16
|
-
</div>
|
|
17
|
-
) : null;
|
|
18
|
-
}
|