@banch0u/core-project-test-repository 2.3.17 → 2.3.18
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.
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
.table_container {
|
|
2
|
-
table {
|
|
3
|
-
tr {
|
|
4
|
-
th:first-child {
|
|
5
|
-
font-family: Inter !important;
|
|
6
|
-
font-size: 18px !important;
|
|
7
|
-
font-weight: 400 !important;
|
|
8
|
-
line-height: 21.78px !important;
|
|
9
|
-
text-align: center !important;
|
|
10
|
-
color: #000000 !important;
|
|
11
|
-
}
|
|
12
|
-
th {
|
|
13
|
-
background: #fff !important;
|
|
14
|
-
text-align: center !important;
|
|
15
|
-
|
|
16
|
-
padding: 5px !important;
|
|
17
|
-
font-family: Inter !important;
|
|
18
|
-
font-size: 16px !important;
|
|
19
|
-
font-weight: 400 !important;
|
|
20
|
-
line-height: 19.36px !important;
|
|
21
|
-
|
|
22
|
-
border-color: #bebebe !important;
|
|
23
|
-
border-top: 1px solid #bebebe !important;
|
|
24
|
-
border-start-start-radius: 0px !important;
|
|
25
|
-
border-start-end-radius: 0px !important;
|
|
26
|
-
color: #646464 !important;
|
|
27
|
-
}
|
|
28
|
-
td {
|
|
29
|
-
padding: 0px !important;
|
|
30
|
-
font-size: 16px !important;
|
|
31
|
-
font-weight: 400 !important;
|
|
32
|
-
line-height: 24px !important;
|
|
33
|
-
text-align: center !important;
|
|
34
|
-
border-color: #fff !important;
|
|
35
|
-
color: #343434 !important;
|
|
36
|
-
}
|
|
37
|
-
// th:first-child {
|
|
38
|
-
// border-right: 1px solid #BEBEBE !important;
|
|
39
|
-
// }
|
|
40
|
-
// td:first-child {
|
|
41
|
-
// border-right: 1px solid #BEBEBE !important;
|
|
42
|
-
// }
|
|
43
|
-
|
|
44
|
-
// th:last-child {
|
|
45
|
-
// border-right: none !important;
|
|
46
|
-
// }
|
|
47
|
-
}
|
|
48
|
-
tr:first-child {
|
|
49
|
-
td {
|
|
50
|
-
padding: 0 !important;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
// @media screen and (max-width: 1537px) {
|
|
55
|
-
// table {
|
|
56
|
-
// tr {
|
|
57
|
-
// th {
|
|
58
|
-
// font-size: 12px !important;
|
|
59
|
-
// font-weight: 600 !important;
|
|
60
|
-
// line-height: 18px !important;
|
|
61
|
-
// }
|
|
62
|
-
// td {
|
|
63
|
-
// font-size: 12px !important;
|
|
64
|
-
// font-weight: 500 !important;
|
|
65
|
-
// line-height: 18px !important;
|
|
66
|
-
// text-align: center;
|
|
67
|
-
// }
|
|
68
|
-
// }
|
|
69
|
-
// }
|
|
70
|
-
// }
|
|
71
|
-
}
|
|
72
|
-
.draggableHeader {
|
|
73
|
-
background: #fff;
|
|
74
|
-
z-index: 2;
|
|
75
|
-
white-space: nowrap;
|
|
76
|
-
}
|
|
1
|
+
.table_container {
|
|
2
|
+
table {
|
|
3
|
+
tr {
|
|
4
|
+
th:first-child {
|
|
5
|
+
font-family: Inter !important;
|
|
6
|
+
font-size: 18px !important;
|
|
7
|
+
font-weight: 400 !important;
|
|
8
|
+
line-height: 21.78px !important;
|
|
9
|
+
text-align: center !important;
|
|
10
|
+
color: #000000 !important;
|
|
11
|
+
}
|
|
12
|
+
th {
|
|
13
|
+
background: #fff !important;
|
|
14
|
+
text-align: center !important;
|
|
15
|
+
|
|
16
|
+
padding: 5px !important;
|
|
17
|
+
font-family: Inter !important;
|
|
18
|
+
font-size: 16px !important;
|
|
19
|
+
font-weight: 400 !important;
|
|
20
|
+
line-height: 19.36px !important;
|
|
21
|
+
|
|
22
|
+
border-color: #bebebe !important;
|
|
23
|
+
border-top: 1px solid #bebebe !important;
|
|
24
|
+
border-start-start-radius: 0px !important;
|
|
25
|
+
border-start-end-radius: 0px !important;
|
|
26
|
+
color: #646464 !important;
|
|
27
|
+
}
|
|
28
|
+
td {
|
|
29
|
+
padding: 0px !important;
|
|
30
|
+
font-size: 16px !important;
|
|
31
|
+
font-weight: 400 !important;
|
|
32
|
+
line-height: 24px !important;
|
|
33
|
+
text-align: center !important;
|
|
34
|
+
border-color: #fff !important;
|
|
35
|
+
color: #343434 !important;
|
|
36
|
+
}
|
|
37
|
+
// th:first-child {
|
|
38
|
+
// border-right: 1px solid #BEBEBE !important;
|
|
39
|
+
// }
|
|
40
|
+
// td:first-child {
|
|
41
|
+
// border-right: 1px solid #BEBEBE !important;
|
|
42
|
+
// }
|
|
43
|
+
|
|
44
|
+
// th:last-child {
|
|
45
|
+
// border-right: none !important;
|
|
46
|
+
// }
|
|
47
|
+
}
|
|
48
|
+
tr:first-child {
|
|
49
|
+
td {
|
|
50
|
+
padding: 0 !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// @media screen and (max-width: 1537px) {
|
|
55
|
+
// table {
|
|
56
|
+
// tr {
|
|
57
|
+
// th {
|
|
58
|
+
// font-size: 12px !important;
|
|
59
|
+
// font-weight: 600 !important;
|
|
60
|
+
// line-height: 18px !important;
|
|
61
|
+
// }
|
|
62
|
+
// td {
|
|
63
|
+
// font-size: 12px !important;
|
|
64
|
+
// font-weight: 500 !important;
|
|
65
|
+
// line-height: 18px !important;
|
|
66
|
+
// text-align: center;
|
|
67
|
+
// }
|
|
68
|
+
// }
|
|
69
|
+
// }
|
|
70
|
+
// }
|
|
71
|
+
}
|
|
72
|
+
.draggableHeader {
|
|
73
|
+
background: #fff;
|
|
74
|
+
z-index: 2;
|
|
75
|
+
white-space: nowrap;
|
|
76
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["value", "onChange"];
|
|
4
|
+
import React, { useEffect } from "react";
|
|
5
|
+
import { TreeSelect } from "antd";
|
|
6
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
7
|
+
import { getVendorCategoriesAll } from "../../store/slices/questionnaire";
|
|
8
|
+
import style from "./index.module.scss";
|
|
9
|
+
var _mapCategoriesToTree = function mapCategoriesToTree() {
|
|
10
|
+
var nodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
11
|
+
return nodes.map(function (node) {
|
|
12
|
+
var _node$children;
|
|
13
|
+
return {
|
|
14
|
+
title: node.name,
|
|
15
|
+
value: node.id,
|
|
16
|
+
children: (_node$children = node.children) !== null && _node$children !== void 0 && _node$children.length ? _mapCategoriesToTree(node.children) : []
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var VendorCategoryTreeSelect = function VendorCategoryTreeSelect(_ref) {
|
|
21
|
+
var value = _ref.value,
|
|
22
|
+
onChange = _ref.onChange,
|
|
23
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
var dispatch = useDispatch();
|
|
25
|
+
var vendorCategoriesAll = useSelector(function (state) {
|
|
26
|
+
return state.questionnaire.vendorCategoriesAll;
|
|
27
|
+
});
|
|
28
|
+
useEffect(function () {
|
|
29
|
+
if (!(vendorCategoriesAll !== null && vendorCategoriesAll !== void 0 && vendorCategoriesAll.length)) {
|
|
30
|
+
dispatch(getVendorCategoriesAll("onlyactive"));
|
|
31
|
+
}
|
|
32
|
+
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
33
|
+
|
|
34
|
+
return /*#__PURE__*/React.createElement(TreeSelect, _extends({
|
|
35
|
+
value: value,
|
|
36
|
+
onChange: onChange,
|
|
37
|
+
treeData: _mapCategoriesToTree(vendorCategoriesAll !== null && vendorCategoriesAll !== void 0 ? vendorCategoriesAll : []),
|
|
38
|
+
showSearch: true,
|
|
39
|
+
allowClear: true,
|
|
40
|
+
treeNodeFilterProp: "title",
|
|
41
|
+
placeholder: "",
|
|
42
|
+
style: {
|
|
43
|
+
width: "100%",
|
|
44
|
+
height: 42
|
|
45
|
+
},
|
|
46
|
+
className: style.treeSelect
|
|
47
|
+
}, rest));
|
|
48
|
+
};
|
|
49
|
+
export default VendorCategoryTreeSelect;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.treeSelect > div {
|
|
2
|
+
padding: 5px 16px !important;
|
|
3
|
+
border-radius: 6px !important;
|
|
4
|
+
}
|
|
5
|
+
.treeSelect {
|
|
6
|
+
width: 100%;
|
|
7
|
+
span {
|
|
8
|
+
font-size: 16px !important;
|
|
9
|
+
font-weight: 500 !important;
|
|
10
|
+
line-height: 24px !important;
|
|
11
|
+
text-align: left !important;
|
|
12
|
+
}
|
|
13
|
+
}
|