ns-base-module 2.0.29 → 2.0.31
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.
|
@@ -14,6 +14,15 @@ var Index = function Index(_ref) {
|
|
|
14
14
|
var _props$statusTagItem3;
|
|
15
15
|
var classFilter = _ref.classFilter,
|
|
16
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
var getCountDisplay = function getCountDisplay(count) {
|
|
18
|
+
if (typeof count !== "number") return null;
|
|
19
|
+
return count > 99 ? "99+" : "".concat(count);
|
|
20
|
+
};
|
|
21
|
+
var getCountClassName = function getCountClassName(count) {
|
|
22
|
+
var displayCount = getCountDisplay(count);
|
|
23
|
+
if (!displayCount) return "num-txt";
|
|
24
|
+
return displayCount.length === 1 ? "num-txt num-txt-single" : "num-txt";
|
|
25
|
+
};
|
|
17
26
|
var handleStatus = function handleStatus(item) {
|
|
18
27
|
var _props$onStatusTag;
|
|
19
28
|
var serchList = adapterFilter(item);
|
|
@@ -35,7 +44,7 @@ var Index = function Index(_ref) {
|
|
|
35
44
|
};
|
|
36
45
|
var loopSetLabel = function loopSetLabel(tree) {
|
|
37
46
|
var _loop = function _loop() {
|
|
38
|
-
var _props$statusTagItem2, _props$statusTagCount, _props$statusTagCount2;
|
|
47
|
+
var _props$statusTagItem2, _props$statusTagCount, _props$statusTagCount2, _props$statusTagCount3;
|
|
39
48
|
var d = tree[i];
|
|
40
49
|
tree[i].label = /*#__PURE__*/React.createElement("div", {
|
|
41
50
|
style: {
|
|
@@ -54,12 +63,12 @@ var Index = function Index(_ref) {
|
|
|
54
63
|
fontSize: 10
|
|
55
64
|
}
|
|
56
65
|
})), /*#__PURE__*/React.createElement("span", null, d.label), typeof ((_props$statusTagCount = props.statusTagCounts) === null || _props$statusTagCount === void 0 ? void 0 : _props$statusTagCount[d.key]) === "number" ? /*#__PURE__*/React.createElement("span", {
|
|
57
|
-
className:
|
|
66
|
+
className: getCountClassName((_props$statusTagCount2 = props.statusTagCounts) === null || _props$statusTagCount2 === void 0 ? void 0 : _props$statusTagCount2[d.key]),
|
|
58
67
|
style: {
|
|
59
68
|
backgroundColor: d.backgroundColor,
|
|
60
69
|
color: d.fontColor
|
|
61
70
|
}
|
|
62
|
-
}, (_props$
|
|
71
|
+
}, getCountDisplay((_props$statusTagCount3 = props.statusTagCounts) === null || _props$statusTagCount3 === void 0 ? void 0 : _props$statusTagCount3[d.key])) : null);
|
|
63
72
|
if (d.children && d.children.length) {
|
|
64
73
|
loopSetLabel(d.children);
|
|
65
74
|
}
|
|
@@ -83,7 +92,7 @@ var Index = function Index(_ref) {
|
|
|
83
92
|
return /*#__PURE__*/React.createElement("span", {
|
|
84
93
|
className: "tags-wrap class-filter-component"
|
|
85
94
|
}, datas === null || datas === void 0 ? void 0 : datas.map(function (item) {
|
|
86
|
-
var _props$statusTagItem4, _props$
|
|
95
|
+
var _props$statusTagItem4, _props$statusTagCount4, _props$statusTagCount5, _props$statusTagCount6;
|
|
87
96
|
var baseDom = /*#__PURE__*/React.createElement("span", {
|
|
88
97
|
className: "tags-list".concat(" ", item.key === (props === null || props === void 0 || (_props$statusTagItem4 = props.statusTagItem) === null || _props$statusTagItem4 === void 0 ? void 0 : _props$statusTagItem4.key) ? "action" : ""),
|
|
89
98
|
key: item.key,
|
|
@@ -97,13 +106,13 @@ var Index = function Index(_ref) {
|
|
|
97
106
|
marginRight: 3,
|
|
98
107
|
fontSize: 10
|
|
99
108
|
}
|
|
100
|
-
})), item.label, typeof ((_props$
|
|
101
|
-
className:
|
|
109
|
+
})), item.label, typeof ((_props$statusTagCount4 = props.statusTagCounts) === null || _props$statusTagCount4 === void 0 ? void 0 : _props$statusTagCount4[item.key]) === "number" ? /*#__PURE__*/React.createElement("span", {
|
|
110
|
+
className: getCountClassName((_props$statusTagCount5 = props.statusTagCounts) === null || _props$statusTagCount5 === void 0 ? void 0 : _props$statusTagCount5[item.key]),
|
|
102
111
|
style: {
|
|
103
112
|
backgroundColor: item.backgroundColor,
|
|
104
113
|
color: item.fontColor
|
|
105
114
|
}
|
|
106
|
-
}, ((_props$
|
|
115
|
+
}, getCountDisplay((_props$statusTagCount6 = props.statusTagCounts) === null || _props$statusTagCount6 === void 0 ? void 0 : _props$statusTagCount6[item.key])) :
|
|
107
116
|
// `(${contextFilter.statusTagCounts?.[item.key]})`
|
|
108
117
|
null, item.children && item.children.length ? /*#__PURE__*/React.createElement(DownOutlined, {
|
|
109
118
|
style: iconStyle(item.children)
|
|
@@ -13,6 +13,15 @@ var Index = function Index(_ref) {
|
|
|
13
13
|
var classFilter = _ref.classFilter,
|
|
14
14
|
fieldFilterStatus = _ref.fieldFilterStatus,
|
|
15
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
var getCountDisplay = function getCountDisplay(count) {
|
|
17
|
+
if (typeof count !== "number") return null;
|
|
18
|
+
return count > 99 ? "99+" : "".concat(count);
|
|
19
|
+
};
|
|
20
|
+
var getCountClassName = function getCountClassName(count) {
|
|
21
|
+
var displayCount = getCountDisplay(count);
|
|
22
|
+
if (!displayCount) return "num-txt";
|
|
23
|
+
return displayCount.length === 1 ? "num-txt num-txt-single" : "num-txt";
|
|
24
|
+
};
|
|
16
25
|
var onCheck = function onCheck(checkedKeys, e) {
|
|
17
26
|
var _props$onStatusTag;
|
|
18
27
|
var arr = checkFilter(e);
|
|
@@ -20,7 +29,7 @@ var Index = function Index(_ref) {
|
|
|
20
29
|
};
|
|
21
30
|
console.log("fieldFilterStatus", fieldFilterStatus);
|
|
22
31
|
var titleRender = function titleRender(item) {
|
|
23
|
-
var _props$statusTagCount, _props$statusTagCount2;
|
|
32
|
+
var _props$statusTagCount, _props$statusTagCount2, _props$statusTagCount3;
|
|
24
33
|
return /*#__PURE__*/React.createElement("span", {
|
|
25
34
|
style: {
|
|
26
35
|
width: "100%"
|
|
@@ -35,12 +44,12 @@ var Index = function Index(_ref) {
|
|
|
35
44
|
fontSize: 10
|
|
36
45
|
}
|
|
37
46
|
})), item.label, typeof ((_props$statusTagCount = props.statusTagCounts) === null || _props$statusTagCount === void 0 ? void 0 : _props$statusTagCount[item.key]) === "number" ? /*#__PURE__*/React.createElement("span", {
|
|
38
|
-
className:
|
|
47
|
+
className: getCountClassName((_props$statusTagCount2 = props.statusTagCounts) === null || _props$statusTagCount2 === void 0 ? void 0 : _props$statusTagCount2[item.key]),
|
|
39
48
|
style: {
|
|
40
49
|
backgroundColor: item.backgroundColor,
|
|
41
50
|
color: item.fontColor
|
|
42
51
|
}
|
|
43
|
-
}, (_props$
|
|
52
|
+
}, getCountDisplay((_props$statusTagCount3 = props.statusTagCounts) === null || _props$statusTagCount3 === void 0 ? void 0 : _props$statusTagCount3[item.key])) : null);
|
|
44
53
|
};
|
|
45
54
|
if (!classFilter) return null;
|
|
46
55
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.class-filter-component.tags-wrap{flex:1 1;z-index:2}.class-filter-component.tags-wrap .tags-list{background-color:#fff;background-color:var(--order-tab-bg-color,#fff);border-radius:4px 4px 0 0;color:#666;cursor:pointer;display:inline-block;font-weight:500;line-height:1;margin-right:8px;padding:11px 16px}.class-filter-component.tags-wrap .tags-list.action{background-color:var(--primary-color);background-color:var(--order-tab-bg-color-active,var(--primary-color));color:var(--primary-text-color);color:var(--order-tab-text-color-active,var(--primary-text-color))}.class-filter-component .filter-component-tree-content .tags-list{font-size:12px;margin-right:0}.class-filter-component .filter-component-tree-content :global .ant-tree-node-content-wrapper{padding:0}.class-filter-component .filter-component-tree-content :global .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:transparent}.class-filter-component .num-txt{background:#fff;border-radius:
|
|
1
|
+
.class-filter-component{align-items:flex-start;display:flex;flex:1 1;flex-wrap:wrap;row-gap:8px}.class-filter-component.tags-wrap{flex:1 1;z-index:2}.class-filter-component.tags-wrap .tags-list{background-color:#fff;background-color:var(--order-tab-bg-color,#fff);border-radius:4px 4px 0 0;color:#666;cursor:pointer;display:inline-block;font-weight:500;line-height:1;margin-right:8px;padding:11px 16px}.class-filter-component.tags-wrap .tags-list.action{background-color:var(--primary-color);background-color:var(--order-tab-bg-color-active,var(--primary-color));color:var(--primary-text-color);color:var(--order-tab-text-color-active,var(--primary-text-color))}.class-filter-component .filter-component-tree-content .tags-list{font-size:12px;margin-right:0}.class-filter-component .filter-component-tree-content :global .ant-tree-node-content-wrapper{padding:0}.class-filter-component .filter-component-tree-content :global .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:transparent}.class-filter-component .num-txt{align-items:center;background:#fff;border-radius:999px;box-sizing:border-box;color:#9b9b9b;display:inline-flex;font-size:12px;height:20px;justify-content:center;line-height:12px;margin-left:4px;min-width:20px;padding:0 8px;text-align:center;vertical-align:middle}.class-filter-component .num-txt-single{border-radius:50%;min-width:20px;padding:0;width:20px}.class-filter-component .actionMenu{background-color:var(--primary-color);color:var(--primary-text-color)}.dropdownWrap :global .ant-dropdown-menu-submenu-vertical{width:120px}.dropdownWrap :global .ant-dropdown-menu-item,.dropdownWrap :global .ant-dropdown-menu-submenu-title{align-items:center;display:flex;padding:0}.dropdownWrap :global .ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon,.dropdownWrap :global .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon{padding-left:18px}.dropdownWrap .actionMenu{background-color:var(--primary-color);color:var(--primary-text-color)}.dropdownWrap .num-txt{align-items:center;background:#fff;border-radius:999px;box-sizing:border-box;color:#9b9b9b;display:inline-flex;font-size:12px;height:20px;justify-content:center;line-height:12px;margin-left:2px;min-width:20px;padding:0 8px;text-align:center;vertical-align:middle}.dropdownWrap .num-txt-single{border-radius:50%;min-width:20px;padding:0;width:20px}.filter-wrapper-body{font-size:12px;width:260px}.filter-wrapper-body .sort{border-bottom:1px solid #eee;width:100%}.filter-wrapper-body .sort>span{cursor:pointer;display:inline-block;padding:5px 0;text-align:center;width:33%}.filter-wrapper-body .sort>span:hover{background-color:#eee}.filter-wrapper-body .filter{padding:10px 20px}.filter-wrapper-body .filter .search{margin-bottom:10px}.filter-wrapper-body .filter .search :global .ant-input-sm{padding:.2px 7px}.filter-wrapper-body .filter .filter-group{margin-bottom:10px;max-height:400px;overflow:auto;width:100%}.filter-modal-wrap .ant-modal-body{padding:12px}.chart-type-wrap{align-items:center;display:flex;margin-bottom:8px}.chart-type-wrap .chart-type-ul{display:flex}.chart-type-wrap .chart-type-li{border-radius:4px;cursor:pointer;display:flex;flex-direction:column;height:40px;justify-content:center;margin-right:4px;text-align:center;width:50px}.chart-type-wrap .chart-type-li:hover{background-color:rgba(5,14,26,.031)}.chart-type-wrap .chart-type-li.action{background-color:#e0edfd;color:#267ef0}.chart-type-wrap .chart-type-icon{display:block;font-size:16px}.dnd_quota_main{display:flex;height:100%}.dnd_quota_main .dnd_quota_left{flex:1 1;height:100%}.dnd_quota_main .dnd_quota_left::-webkit-scrollbar{background-color:#f5f5f5;width:4px}.dnd_quota_main .dnd_quota_left::-webkit-scrollbar-track{background-color:#f5f5f5;border-radius:3px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.2)}.dnd_quota_main .dnd_quota_left::-webkit-scrollbar-thumb{background-color:#959595;border-radius:3px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.2)}.dnd_quota_main .dnd_quota_block_top{border:1px solid #eee;border-radius:8px;height:50%;margin-bottom:8px;padding:8px}.dnd_quota_main .dnd_quota_block_top.classify-type{border-bottom:none;border-radius:8px 8px 0 0;margin-bottom:0;padding-bottom:0}.dnd_quota_main .dnd_quota_block_bottom{border:1px solid #eee;border-radius:8px;height:50%;margin-bottom:8px;padding:8px}.dnd_quota_main .dnd_quota_block_bottom.number-type{border-radius:0 0 8px 8px;border-top:none;margin-top:0}.dnd_quota_main .dnd_quota_left-title{display:flex;justify-content:space-between;margin-bottom:6px}.dnd_quota_main .dnd_quota-icon{cursor:pointer}.dnd_quota_main .drag-txt-empty{left:50%;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);width:90%}.dnd_quota_main .dnd_quota__item{background-color:#f5f5f5;border-radius:4px;cursor:grab;display:flex;margin-bottom:4px;padding:8px}.dnd_quota_main .dnd_quota__item .item-icon{line-height:1;margin-right:4px;padding-top:1px}.dnd_quota_main .dnd_quota__item .dnd_quota__item_label{flex:1 1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dnd_quota_main .dnd_quota__item .dnd_quota__item_txt{cursor:pointer}.dnd_quota_main .dnd-quota-sortable-wrap{height:calc(100% - 20px);overflow:auto;position:relative}.dnd_quota_main .dnd-quota-sortable-wrap::-webkit-scrollbar{background-color:#f5f5f5;width:4px}.dnd_quota_main .dnd-quota-sortable-wrap::-webkit-scrollbar-track{background-color:#f5f5f5;border-radius:3px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.2)}.dnd_quota_main .dnd-quota-sortable-wrap::-webkit-scrollbar-thumb{background-color:#959595;border-radius:3px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.2)}.dnd_quota_main .dnd-quota-sortable-wrap.init .dnd_quota__item:hover{background-color:#0273b0;color:#fff}.dnd_quota_main .dnd-quota-sortable-wrap.init .dnd_quota__item:hover .item-icon{color:#fff}.dnd_quota_main .dnd-quota-sortable-wrap.init .dnd_quota__item .item-icon{color:#0273b0}.dnd_quota_main .dnd-quota-sortable-wrap.number .dnd_quota__item:hover{background-color:#97c95d;color:#fff}.dnd_quota_main .dnd-quota-sortable-wrap.number .dnd_quota__item:hover .item-icon{color:#fff}.dnd_quota_main .dnd-quota-sortable-wrap.number .dnd_quota__item .item-icon{color:#97c95d}.dnd_quota_main .dnd-quota-sortable-wrap.dimension .dnd_quota__item,.dnd_quota_main .dnd-quota-sortable-wrap.list .dnd_quota__item{background-color:#0273b0;color:#fff}.dnd_quota_main .dnd-quota-sortable-wrap.quota .dnd_quota__item{background-color:#97c95d;color:#fff}.dnd_quota_main .dnd-quota-spce{margin:0 4px}.dnd_quota_main .dnd_quota_right{flex:1 1}.dnd_quota_main .dnd_quota_right .dnd_quota_block_bottom,.dnd_quota_main .dnd_quota_right .dnd_quota_block_top{height:auto}.dnd_quota_main .dnd_quota_right .dnd_quota_right_payground{max-height:340px;min-height:140px}.dnd_quota_main .dnd_quota_right_payground{height:100%}.dnd_quota_main .dnd_quota_right_payground.empty{background:rgba(0,0,0,.08);position:relative}.dnd_quota_main .dnd_quota_right_payground.empty:after{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);white-space:nowrap}.modal-wrap{z-index:1040!important}.subtotals-modal-wrap{display:flex;height:100%}.subtotals-modal-wrap .subtotals-modal-left{height:100%;width:420px}.subtotals-modal-wrap .subtotals-modal-right{flex:1 1;height:100%;margin-left:16px;width:0}.subtotals-modal-wrap .subtotals-modal-table-top{align-items:center;display:flex;margin-bottom:16px;margin-top:4px;min-width:400px}.subtotals-modal-wrap .subtotals-modal-table-top .subtotals-modal-radio-wrap{flex:1 1;margin-right:-100px;text-align:center;width:0}.add-subtotals-wrap{height:100%}.add-subtotals-bot{height:calc(100% - 50px)}.popover-sum-content .ant-popover-inner-content{padding:0}.popover-sum-content .popover-sum-wrap .popover-sum-list:last-child{border-top:1px solid #e4e4e4}.popover-sum-content .popover-sum-wrap .popover-sum-title{font-weight:700;padding:8px 12px}.popover-sum-content .popover-sum-wrap .popover-sum-li{cursor:pointer;margin:0;padding:8px 12px}.popover-sum-content .popover-sum-wrap .popover-sum-li:hover{background-color:#f5f5f5}.popover-sum-content .popover-sum-wrap .popover-sum-li.action{background-color:#0273b0;color:#fff}.popover-body{min-height:340px;width:270px}.popover-body.config-body{width:320px}.popover-body.config-body .top-wrap{margin-bottom:6px}.popover-body .top-wrap{align-items:center;display:flex;justify-content:space-between;margin-bottom:18px}.popover-body .title{font-size:14px}.popover-body .add-icon{cursor:pointer;font-weight:700}.popover-body .list-title{font-size:12px;margin-bottom:14px}.popover-body .list-title-icon{margin-right:6px}.popover-body .list-radio{align-items:center;display:flex;margin-bottom:10px;width:100%}.popover-body .list-radio-label{flex:1 1;font-weight:700}.popover-body .set-icon{cursor:pointer;font-size:12px;text-align:right;width:20px}.mode-name-wrap{padding:12px 0}.icon-button-wrapper{cursor:pointer;margin-left:10px}.columns-fixed-title{color:rgba(0,0,0,.45);font-size:12px;margin-bottom:6px;margin-top:6px}.tree_selectall{-ms-user-select:none;user-select:none}.tree_selectall>span:first-child{margin:4px 0 10px 24px!important}.tree_selectall>span:nth-child(2){padding-left:12px}.set-text-default{font-size:12px}.columns-tree-main{align-items:center;display:flex}.columns-tree-main .drag-title{margin:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:50px}.columns-tree-main .columns-tree-icon{color:#000;font-size:14px;text-align:right;visibility:hidden}.columns-tree-main:hover .columns-tree-icon{visibility:visible}
|