@bos-alpha/data
Version:
数据管理
593 lines (592 loc) • 35.4 kB
JavaScript
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useState, useEffect } from 'react';
import { Input, Menu, Dropdown, Button, Switch } from 'antd';
import * as api from '@bos-alpha/common/lib/services';
import { Icon } from '@bos-alpha/common/lib/components';
import { AdvancedSearch } from '../advanced-search';
import moment from 'moment';
import styled from '@emotion/styled';
import { ResizableTable } from '@bos-alpha/common/lib/components/table/resizable-table';
import { InfoCard } from '../info-card';
import { prefixCls, Modal } from '@bos-alpha/common';
/**
*
* @param {classDefined} 当前类定义
* @param {attributes} 当前类模型属性
* @returns
*/
export var EdgeTable = function (_a) {
var classDefined = _a.classDefined, attributes = _a.attributes;
// 表格列
var _b = useState([]), columns = _b[0], setColumns = _b[1];
// 表格数据加载中
var _c = useState(false), loading = _c[0], setLoading = _c[1];
// 菜单是否显示
var _d = useState(false), visible = _d[0], setVisible = _d[1];
// 搜索框检索词
var _e = useState(''), keywords = _e[0], setKeywords = _e[1];
// 触发高级搜索重置
var _f = useState(), searchReset = _f[0], setSearchReset = _f[1];
// 检索参数
var _g = useState({
noRelation: true,
page: 1,
per_page: 10,
conditions: [],
keyword: ''
}), searchParams = _g[0], setSearchParams = _g[1];
var _h = useState([]), tableData = _h[0], setTableData = _h[1];
var _j = useState(0), total = _j[0], setTotal = _j[1];
// 数据详情弹窗
var _k = useState(false), detailModalVisible = _k[0], setDetailModalVisible = _k[1];
// 数据详情
var _l = useState([]), detailInfo = _l[0], setDetailInfo = _l[1];
// 左对象属性
var _m = useState([]), leftAttr = _m[0], setLeftAttr = _m[1];
// 右对象属性
var _o = useState([]), rightAttr = _o[0], setRightAttr = _o[1];
// 左对象
var _p = useState({}), leftObj = _p[0], setLeftObj = _p[1];
// 右对象
var _q = useState({}), rightObj = _q[0], setRightObj = _q[1];
// 数据详情类型
var _r = useState('left'), detailType = _r[0], setDetailType = _r[1];
// 获取类数据列表
useEffect(function () {
if (!classDefined)
return;
if (columns.length === 0)
return;
getDataList();
}, [searchParams]); // eslint-disable-line react-hooks/exhaustive-deps
// 切换关系类 查询数据
useEffect(function () {
fetchData();
}, [classDefined]); // eslint-disable-line react-hooks/exhaustive-deps
useEffect(function () {
updateColumns();
}, [leftAttr, rightAttr]); // eslint-disable-line react-hooks/exhaustive-deps
var fetchData = function () { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!classDefined)
return [2 /*return*/];
// 关系类 可选属性列
return [4 /*yield*/, getRelationAttrs()];
case 1:
// 关系类 可选属性列
_a.sent();
setSearchParams(__assign(__assign({}, searchParams), { page: 1, keyword: '', conditions: [
{
bosclass: classDefined.leftObjectClass,
alias: 'e1'
},
{
bosclass: classDefined.rightObjectClass,
alias: 'e2'
},
{
bosclass: classDefined.className,
type: 'relationship',
alias: 'e3',
from: 'e1',
to: 'e2'
}
] }));
setKeywords('');
setSearchReset(undefined);
return [2 /*return*/];
}
});
}); };
// 关系类 可选属性列
var getRelationAttrs = function () {
return new Promise(function (resolve, reject) { return __awaiter(void 0, void 0, void 0, function () {
var resp, _a, leftRes, rightRes;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
resp = [classDefined.leftObjectClass];
if (classDefined.rightObjectClass !== 'objects') {
resp.push(classDefined.rightObjectClass);
}
return [4 /*yield*/, Promise.all(resp.map(function (className) { return api.getDatamodelDetail(className); }))];
case 1:
_a = _b.sent(), leftRes = _a[0], rightRes = _a[1];
setLeftAttr(leftRes.attributes);
setLeftObj(leftRes.classDefinition);
if (classDefined.rightObjectClass !== 'objects') {
setRightAttr(rightRes.attributes);
setRightObj(rightRes.classDefinition);
}
else {
setRightAttr([]);
}
resolve(true);
return [2 /*return*/];
}
});
}); });
};
// 数据格式转换
var dataTypeFix = function (data, dataCode, direction, record) {
// shares validTime时间类型
if (dataCode === 'validTime') {
return data
? moment(data).format('YYYY-MM-DD HH:mm:ss')
: '永久有效';
}
// 文档升版时间
if (dataCode === 'gupgrade') {
return data ? moment(data).format('YYYY-MM-DD HH:mm:ss') : '';
}
// parentId可被点击
if (dataCode === 'parentId') {
return (_jsx(Link, __assign({ onClick: function () { return dataKeyOnClick(record, direction, true); } }, { children: data }), void 0));
}
var type = typeof data;
switch (type) {
case 'string':
case 'boolean':
return "".concat(data);
case 'undefined':
return data;
case 'object':
return data === null ? '' : JSON.stringify(data);
default:
return data;
}
};
// 更新columns 区分左右对象
var updateColumns = function () {
var bosclassObj = attributes.find(function (item) { return item.code === 'bosclass'; });
var base = baseColumns(bosclassObj);
var baseLeft = base.slice(0, 3);
var baseRight = base.slice(3);
// 左对象新增列
var leftAppends = leftAttr
.filter(function (item) { return item.checked; })
.map(function (item) { return ({
dataIndex: "left.".concat(item.code),
ellipsis: true,
width: 240,
minWidth: 70,
title: (_jsxs("div", { children: [_jsx("div", { children: "\u5DE6\u5BF9\u8C61" }, void 0), _jsxs("div", { children: [classDefined.leftObjectClass, ":", item.code, "(", item.description, ")"] }, void 0)] }, void 0)),
render: function (val, record) {
return dataTypeFix(val, item.code, 'left', record);
}
}); });
// 右对象新增列
var rightAppends = rightAttr
.filter(function (item) { return item.checked; })
.map(function (item) { return ({
dataIndex: "right.".concat(item.code),
ellipsis: true,
width: 240,
minWidth: 70,
title: (_jsxs("div", { children: [_jsx("div", { children: "\u53F3\u5BF9\u8C61" }, void 0), _jsxs("div", { children: [classDefined.rightObjectClass, ":", item.code, "(", item.description, ")"] }, void 0)] }, void 0)),
render: function (val, record) {
return dataTypeFix(val, item.code, 'right', record);
}
}); });
setColumns(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], baseLeft, true), leftAppends, true), baseRight, true), rightAppends, true));
};
// 获取类数据
var getDataList = function () { return __awaiter(void 0, void 0, void 0, function () {
var keyword, conditions, params, conditionArr, select, res, dataList, res, err_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
keyword = searchParams.keyword, conditions = searchParams.conditions, params = __rest(searchParams, ["keyword", "conditions"]);
conditionArr = conditions;
if (keyword) {
conditionArr = [
{
bosclass: classDefined.leftObjectClass,
alias: 'e1'
},
{
bosclass: classDefined.rightObjectClass,
alias: 'e2'
},
{
bosclass: classDefined.className,
type: 'relationship',
alias: 'e3',
from: 'e1',
to: 'e2',
subCondition: [
{
operator: 'like',
value: keyword,
logic: 'or',
field: '_key'
},
{
operator: 'like',
value: keyword,
logic: 'or',
field: '_from'
},
{
operator: 'like',
value: keyword,
logic: 'or',
field: '_to'
}
]
}
];
}
select = {
'relation.key': 'e3._key',
'left.key': 'e1._key',
'right.key': 'e2._key'
};
// 关系类查询字段
attributes.forEach(function (item) {
select["relation.".concat(item.code)] = "e3.".concat(item.code);
});
// 左对象查询字段
leftAttr.forEach(function (item) {
select["left.".concat(item.code)] = "e1.".concat(item.code);
});
// 右对象查询字段
rightAttr.forEach(function (item) {
select["right.".concat(item.code)] = "e2.".concat(item.code);
});
setLoading(true);
_a.label = 1;
case 1:
_a.trys.push([1, 6, , 7]);
if (!(classDefined.rightObjectClass === 'objects')) return [3 /*break*/, 3];
return [4 /*yield*/, api.getEdgePrototype(classDefined.className, {
params: __assign({ withEntity: true }, params)
})];
case 2:
res = _a.sent();
dataList = res.map(function (item) {
var resSelect = {
'relation.key': item.key,
'left.key': item.from.key,
'right.key': item.to.key,
'relation.bosclass': item.bosclass
};
Object.keys(item.from).forEach(function (leftItemKey) {
resSelect["left.".concat(leftItemKey)] =
item.from[leftItemKey];
});
Object.keys(item.to).forEach(function (rightItemKey) {
resSelect["right.".concat(rightItemKey)] =
item.to[rightItemKey];
});
return resSelect;
});
setTableData(dataList);
setTotal(res.length);
return [3 /*break*/, 5];
case 3: return [4 /*yield*/, api.linkedQuery({
data: {
condition: conditionArr,
select: select
},
params: params
})];
case 4:
res = _a.sent();
setTableData(res.data);
setTotal(res.count);
_a.label = 5;
case 5: return [3 /*break*/, 7];
case 6:
err_1 = _a.sent();
return [3 /*break*/, 7];
case 7:
setLoading(false);
return [2 /*return*/];
}
});
}); };
// 数据行被点击
var dataKeyOnClick = function (record, direction, isParent) { return __awaiter(void 0, void 0, void 0, function () {
var labelAttrs, rightRes, kvList, bosclass, parentId, res, list;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
setDetailType(direction);
labelAttrs = direction === 'left' ? leftAttr : rightAttr;
if (!(classDefined.rightObjectClass === 'objects')) return [3 /*break*/, 2];
return [4 /*yield*/, api.getDatamodelDetail(record['right.bosclass'])];
case 1:
rightRes = _a.sent();
setRightObj(rightRes.classDefinition);
_a.label = 2;
case 2:
kvList = record;
if (!isParent) return [3 /*break*/, 4];
bosclass = record["".concat(direction, ".bosclass")];
parentId = record["".concat(direction, ".parentId")];
return [4 /*yield*/, api.getEntityKey(bosclass, parentId, {
params: {
noRelation: true
}
})];
case 3:
res = _a.sent();
kvList = res;
_a.label = 4;
case 4:
list = Object.keys(kvList)
.sort(function (a, b) { return (a < b ? -1 : 1); })
.filter(function (key) { return isParent || key.indexOf(direction) >= 0; })
.map(function (key) {
var label = isParent ? key : key.replace("".concat(direction, "."), '');
var curLabel = labelAttrs.find(function (item) { return item.code === label; });
if (curLabel) {
label = curLabel.description
? "".concat(label, "(").concat(curLabel.description, ")")
: label;
if (label === 'key') {
label = "id(".concat(curLabel.description, ")");
}
}
if (label === 'key') {
label = 'id';
}
var value = kvList[key];
if (typeof value === 'object' && value !== null) {
value = JSON.stringify(value);
}
return {
label: label,
value: value
};
});
setDetailInfo(list);
setDetailModalVisible(true);
return [2 /*return*/];
}
});
}); };
// 基础列 区分对象类 和 关系类
var baseColumns = function (bosclassObj) {
var leftBosclass = leftAttr.find(function (item) { return item.code === 'bosclass'; });
var rightBosclass = leftAttr.find(function (item) { return item.code === 'bosclass'; });
return [
{
dataIndex: 'relation.bosclass',
width: 200,
minWidth: 70,
title: (_jsxs("div", { children: [_jsx("div", { children: "bosclass" }, void 0), (bosclassObj === null || bosclassObj === void 0 ? void 0 : bosclassObj.description) ? (_jsxs("div", { children: ["(", bosclassObj.description, ")"] }, void 0)) : null] }, void 0))
},
{
dataIndex: 'relation.key',
title: 'id',
width: 210,
minWidth: 70,
ellipsis: true
},
{
dataIndex: 'left.bosclass',
width: 210,
minWidth: 70,
title: (_jsxs("div", { children: [_jsx("div", { children: "\u5DE6\u5BF9\u8C61" }, void 0), _jsxs(Ellipsis, __assign({ title: "".concat(classDefined === null || classDefined === void 0 ? void 0 : classDefined.leftObjectClass, ":bosclass(\n ").concat(leftBosclass === null || leftBosclass === void 0 ? void 0 : leftBosclass.description, ")") }, { children: [classDefined === null || classDefined === void 0 ? void 0 : classDefined.leftObjectClass, ":bosclass(", leftBosclass === null || leftBosclass === void 0 ? void 0 : leftBosclass.description, ")"] }), void 0)] }, void 0))
},
{
dataIndex: 'left.key',
width: 210,
minWidth: 70,
title: (_jsxs("div", { children: [_jsx("div", { children: "\u5DE6\u5BF9\u8C61" }, void 0), _jsx("div", { children: "id" }, void 0)] }, void 0)),
render: function (id, record) { return (_jsx(Link, __assign({ onClick: function () { return dataKeyOnClick(record, 'left'); } }, { children: id }), void 0)); }
},
{
dataIndex: 'right.bosclass',
width: 210,
minWidth: 70,
title: (_jsxs("div", { children: [_jsx("div", { children: "\u53F3\u5BF9\u8C61" }, void 0), _jsxs(Ellipsis, __assign({ title: "".concat(classDefined === null || classDefined === void 0 ? void 0 : classDefined.rightObjectClass, ":bosclass(\n ").concat(rightBosclass === null || rightBosclass === void 0 ? void 0 : rightBosclass.description, ")") }, { children: [classDefined === null || classDefined === void 0 ? void 0 : classDefined.rightObjectClass, ":bosclass(", rightBosclass === null || rightBosclass === void 0 ? void 0 : rightBosclass.description, ")"] }), void 0)] }, void 0))
},
{
dataIndex: 'right.key',
width: 210,
minWidth: 70,
ellipsis: true,
title: (_jsxs("div", { children: [_jsx("div", { children: "\u53F3\u5BF9\u8C61" }, void 0), _jsx("div", { children: "id" }, void 0)] }, void 0)),
render: function (id, record) { return (_jsx(Link, __assign({ onClick: function () { return dataKeyOnClick(record, 'right'); } }, { children: id }), void 0)); }
}
];
};
// 选择显示列
var onAttrCheck = function (checked, record) {
setLeftAttr(leftAttr.map(function (item) {
if (item.code === record.code) {
return __assign(__assign({}, item), { checked: checked });
}
return item;
}));
setRightAttr(rightAttr.map(function (item) {
if (item.code === record.code) {
return __assign(__assign({}, item), { checked: checked });
}
return item;
}));
};
// 高级搜索
var handleQuery = function (vals) {
setSearchParams(__assign(__assign({}, searchParams), { page: 1, keyword: '', conditions: vals }));
// 清空快捷搜索
setKeywords('');
};
// 高级搜索选项
var searchOptions = __spreadArray(__spreadArray([
{
label: 'id',
value: '_key'
}
], attributes.map(function (item) { return ({
label: item.code,
value: item.code
}); }), true), [
{
value: 'left',
label: '左对象',
children: __spreadArray([
{
label: 'id',
value: '_key'
}
], leftAttr.map(function (item) { return ({
label: item.code,
value: item.code
}); }), true)
},
{
value: 'right',
label: '右对象',
children: __spreadArray([
{
label: 'id',
value: '_key'
}
], rightAttr.map(function (item) { return ({
label: item.code,
value: item.code
}); }), true)
}
], false);
return (_jsxs("div", { children: [_jsxs(TopBar, { children: [_jsxs(Search, { children: [_jsx(Input.Search, { className: "ipt", placeholder: "\u901A\u8FC7ID\u5FEB\u901F\u68C0\u7D22", value: keywords, onInput: function (e) {
return setKeywords(e.target.value);
}, onSearch: function (val) {
return setSearchParams(__assign(__assign({}, searchParams), { page: 1, keyword: val }));
} }, void 0), _jsx(AdvancedSearch, { type: "edge", isReset: searchReset, fieldOptions: searchOptions, classDefined: classDefined, onQuery: handleQuery }, void 0), _jsx(Button, __assign({ type: "link", onClick: function (e) {
setKeywords('');
setSearchReset(new Date().getTime());
} }, { children: "\u91CD\u7F6E" }), void 0)] }, void 0), _jsx(Dropdown, __assign({ overlay: _jsxs(AttrMenu, { children: [_jsx(Menu.ItemGroup, __assign({ title: "\u5DE6\u5BF9\u8C61:".concat(classDefined === null || classDefined === void 0 ? void 0 : classDefined.leftObjectClass) }, { children: leftAttr
.filter(function (item) { return item.code !== 'bosclass'; })
.map(function (item, index) { return (_jsx(Menu.Item, { children: _jsxs(AttrItem, { children: [_jsxs("span", { children: [item.code, item.description
? "(".concat(item.description, ")")
: null] }, void 0), _jsx(Switch, { checked: item.checked, onChange: function (checked) {
return onAttrCheck(checked, item);
} }, void 0)] }, void 0) }, 'g1-' + index)); }) }), "g1"), _jsx(Menu.ItemGroup, __assign({ title: "\u53F3\u5BF9\u8C61:".concat(classDefined === null || classDefined === void 0 ? void 0 : classDefined.rightObjectClass) }, { children: rightAttr
.filter(function (item) { return item.code !== 'bosclass'; })
.map(function (item, index) { return (_jsx(Menu.Item, { children: _jsxs(AttrItem, { children: [_jsxs("span", { children: [item.code, item.description
? "(".concat(item.description, ")")
: null] }, void 0), _jsx(Switch, { checked: item.checked, onChange: function (checked) {
return onAttrCheck(checked, item);
} }, void 0)] }, void 0) }, 'g2' + index)); }) }), "g2")] }, void 0), trigger: ['click'], visible: visible, onVisibleChange: setVisible }, { children: _jsxs(Button, __assign({ className: "attr-btn" }, { children: ["\u8BBE\u7F6E\u9700\u8981\u663E\u793A\u7684\u5C5E\u6027\u5217", _jsx(Icon, { type: "iconicon_arrowdown" }, void 0)] }), void 0) }), void 0)] }, void 0), _jsx(ResizableTable, { rowKey: function (record) { return record['relation.key']; }, columns: columns, dataSource: tableData, loading: loading, style: { width: '100%' }, scroll: {
x: 1000,
y: 400
}, pagination: {
size: 'small',
total: total,
pageSize: searchParams.per_page,
current: searchParams.page,
onChange: function (page, pageSize) {
setSearchParams(__assign(__assign({}, searchParams), { page: page, per_page: pageSize }));
},
showSizeChanger: true,
showQuickJumper: true,
showTotal: function (total) {
return "\u5171".concat(total, "\u6761\uFF0C\u5F53\u524D\u7B2C").concat(searchParams.page, "\u9875");
}
} }, void 0), _jsxs(Modal, __assign({ visible: detailModalVisible, title: "\u6570\u636E\u8BE6\u60C5", width: 814, onCancel: function () { return setDetailModalVisible(false); }, footer: null }, { children: [_jsx(InfoCard, { curClass: detailType === 'left' ? leftObj : rightObj, isDetail: true }, void 0), detailInfo.map(function (item, index) { return (_jsxs(DetailRow, { children: [_jsx("div", __assign({ className: "detail-label" }, { children: item.label }), void 0), _jsx("div", __assign({ className: "detail-value", title: (item.value && item.value.toString()) || '' }, { children: item.value }), void 0)] }, index)); })] }), void 0)] }, void 0));
};
var Search = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n margin-bottom: 16px;\n & > .ipt {\n width: 350px;\n margin-right: 15px;\n .", "-input-group > .", "-input:first-of-type {\n border-radius: 16px;\n border-bottom-right-radius: 16px;\n border-bottom-right-radius: 16px;\n position: relative;\n }\n .", "-input-group\n > .", "-input-group-addon:last-of-type {\n background: none;\n position: absolute;\n z-index: 2;\n left: inherit;\n right: 36px;\n .", "-btn {\n border: 0;\n background: none;\n }\n }\n }\n"], ["\n display: flex;\n margin-bottom: 16px;\n & > .ipt {\n width: 350px;\n margin-right: 15px;\n .", "-input-group > .", "-input:first-of-type {\n border-radius: 16px;\n border-bottom-right-radius: 16px;\n border-bottom-right-radius: 16px;\n position: relative;\n }\n .", "-input-group\n > .", "-input-group-addon:last-of-type {\n background: none;\n position: absolute;\n z-index: 2;\n left: inherit;\n right: 36px;\n .", "-btn {\n border: 0;\n background: none;\n }\n }\n }\n"])), prefixCls, prefixCls, prefixCls, prefixCls, prefixCls);
var Link = styled.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: #2878ff;\n cursor: pointer;\n"], ["\n color: #2878ff;\n cursor: pointer;\n"])));
var AttrMenu = styled(Menu)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n max-height: 300px;\n overflow-y: auto;\n .", "-dropdown-menu-item {\n line-height: 26px;\n }\n .", "-dropdown-menu-item-active {\n background-color: #e6f7ff;\n color: #1890ff;\n }\n"], ["\n max-height: 300px;\n overflow-y: auto;\n .", "-dropdown-menu-item {\n line-height: 26px;\n }\n .", "-dropdown-menu-item-active {\n background-color: #e6f7ff;\n color: #1890ff;\n }\n"])), prefixCls, prefixCls);
var TopBar = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n .attr-btn {\n color: rgba(0, 0, 0, 0.65);\n }\n"], ["\n display: flex;\n justify-content: space-between;\n .attr-btn {\n color: rgba(0, 0, 0, 0.65);\n }\n"])));
var AttrItem = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: rgba(0, 0, 0, 0.65);\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: rgba(0, 0, 0, 0.65);\n"])));
var DetailRow = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n height: 40px;\n line-height: 40px;\n color: rgba(0, 0, 0, 0.65);\n border-bottom: 1px solid #e8e8e8;\n & > .detail-label {\n width: 30%;\n font-weight: 500;\n padding-left: 16px;\n color: rgba(0, 0, 0, 0.85);\n font-weight: 500;\n background: #fafafa;\n }\n & > .detail-value {\n background-color: #fff;\n width: 70%;\n padding-left: 16px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"], ["\n display: flex;\n height: 40px;\n line-height: 40px;\n color: rgba(0, 0, 0, 0.65);\n border-bottom: 1px solid #e8e8e8;\n & > .detail-label {\n width: 30%;\n font-weight: 500;\n padding-left: 16px;\n color: rgba(0, 0, 0, 0.85);\n font-weight: 500;\n background: #fafafa;\n }\n & > .detail-value {\n background-color: #fff;\n width: 70%;\n padding-left: 16px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"])));
var Ellipsis = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n"], ["\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n"])));
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;