wt-enjoy-link-antd-repack 4.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +26 -0
- package/dist/esm/assets/location.png +0 -0
- package/dist/esm/component/BiuAButton/index.d.ts +18 -0
- package/dist/esm/component/BiuAButton/index.js +8 -0
- package/dist/esm/component/BiuACard/index.d.ts +2 -0
- package/dist/esm/component/BiuACard/index.js +9 -0
- package/dist/esm/component/BiuACascader/index.d.ts +10 -0
- package/dist/esm/component/BiuACascader/index.js +8 -0
- package/dist/esm/component/BiuADatePicker/index.d.ts +19 -0
- package/dist/esm/component/BiuADatePicker/index.js +18 -0
- package/dist/esm/component/BiuAForm/index.d.ts +7 -0
- package/dist/esm/component/BiuAForm/index.js +10 -0
- package/dist/esm/component/BiuAInput/index.d.ts +14 -0
- package/dist/esm/component/BiuAInput/index.js +32 -0
- package/dist/esm/component/BiuASelect/index.d.ts +6 -0
- package/dist/esm/component/BiuASelect/index.js +14 -0
- package/dist/esm/component/BiuASwitch/index.d.ts +2 -0
- package/dist/esm/component/BiuASwitch/index.js +9 -0
- package/dist/esm/component/BiuATimePicker/index.d.ts +4 -0
- package/dist/esm/component/BiuATimePicker/index.js +8 -0
- package/dist/esm/component/BiuATreeSelect/index.d.ts +2 -0
- package/dist/esm/component/BiuATreeSelect/index.js +8 -0
- package/dist/esm/component/BiuBar/index.d.ts +13 -0
- package/dist/esm/component/BiuBar/index.js +42 -0
- package/dist/esm/component/BiuComSelect/index.d.ts +24 -0
- package/dist/esm/component/BiuComSelect/index.js +104 -0
- package/dist/esm/component/BiuCue/index.d.ts +18 -0
- package/dist/esm/component/BiuCue/index.js +44 -0
- package/dist/esm/component/BiuCustomSelect/index.d.ts +19 -0
- package/dist/esm/component/BiuCustomSelect/index.js +153 -0
- package/dist/esm/component/BiuCustomTable/index.d.ts +14 -0
- package/dist/esm/component/BiuCustomTable/index.js +76 -0
- package/dist/esm/component/BiuCustomerOperCard/component/editTable.d.ts +8 -0
- package/dist/esm/component/BiuCustomerOperCard/component/editTable.js +264 -0
- package/dist/esm/component/BiuCustomerOperCard/component/index.d.ts +1 -0
- package/dist/esm/component/BiuCustomerOperCard/component/index.js +1 -0
- package/dist/esm/component/BiuCustomerOperCard/index.d.ts +20 -0
- package/dist/esm/component/BiuCustomerOperCard/index.js +56 -0
- package/dist/esm/component/BiuCustomerOperCard/type.d.ts +117 -0
- package/dist/esm/component/BiuCustomerOperCard/type.js +1 -0
- package/dist/esm/component/BiuCustomerOperCard/utils.d.ts +48 -0
- package/dist/esm/component/BiuCustomerOperCard/utils.js +236 -0
- package/dist/esm/component/BiuDescriptions/index.d.ts +9 -0
- package/dist/esm/component/BiuDescriptions/index.js +39 -0
- package/dist/esm/component/BiuDetailDrawer/index.d.ts +15 -0
- package/dist/esm/component/BiuDetailDrawer/index.js +54 -0
- package/dist/esm/component/BiuDivider/index.d.ts +4 -0
- package/dist/esm/component/BiuDivider/index.js +29 -0
- package/dist/esm/component/BiuField/component/AddressTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/AddressTableSelect.js +150 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.d.ts +3 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.js +3 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.d.ts +2 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.js +49 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.d.ts +2 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.js +98 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.d.ts +5 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.js +82 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.d.ts +14 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +393 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/type.d.ts +123 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/type.js +1 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.d.ts +5 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.js +59 -0
- package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.js +130 -0
- package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.d.ts +7 -0
- package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.js +80 -0
- package/dist/esm/component/BiuField/component/SNInput.d.ts +13 -0
- package/dist/esm/component/BiuField/component/SNInput.js +622 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.d.ts +23 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.js +187 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/base.d.ts +13 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/base.js +153 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.d.ts +21 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.js +238 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/index.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/index.js +66 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/interface.d.ts +16 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/interface.js +1 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.d.ts +24 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +164 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/package.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/package.js +149 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.d.ts +18 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.js +145 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.js +113 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.d.ts +18 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.js +100 -0
- package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.js +75 -0
- package/dist/esm/component/BiuField/component/autoComplete.d.ts +8 -0
- package/dist/esm/component/BiuField/component/autoComplete.js +82 -0
- package/dist/esm/component/BiuField/component/boxTypeSelect.d.ts +11 -0
- package/dist/esm/component/BiuField/component/boxTypeSelect.js +139 -0
- package/dist/esm/component/BiuField/component/businessdistrictselect.d.ts +55 -0
- package/dist/esm/component/BiuField/component/businessdistrictselect.js +414 -0
- package/dist/esm/component/BiuField/component/carrierInfoSelect.d.ts +13 -0
- package/dist/esm/component/BiuField/component/carrierInfoSelect.js +145 -0
- package/dist/esm/component/BiuField/component/channelSelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/channelSelect.js +94 -0
- package/dist/esm/component/BiuField/component/cityAreaCascader.d.ts +11 -0
- package/dist/esm/component/BiuField/component/cityAreaCascader.js +86 -0
- package/dist/esm/component/BiuField/component/clientInfoTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/clientInfoTableSelect.js +175 -0
- package/dist/esm/component/BiuField/component/customMenu.d.ts +3 -0
- package/dist/esm/component/BiuField/component/customMenu.js +110 -0
- package/dist/esm/component/BiuField/component/databaseSelect.d.ts +6 -0
- package/dist/esm/component/BiuField/component/databaseSelect.js +42 -0
- package/dist/esm/component/BiuField/component/departmentTreeSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/departmentTreeSelect.js +107 -0
- package/dist/esm/component/BiuField/component/dicNameSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/dicNameSelect.js +53 -0
- package/dist/esm/component/BiuField/component/dicTypeSelect.d.ts +41 -0
- package/dist/esm/component/BiuField/component/dicTypeSelect.js +84 -0
- package/dist/esm/component/BiuField/component/dockingPartySelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/dockingPartySelect.js +63 -0
- package/dist/esm/component/BiuField/component/editLocationSelect.d.ts +18 -0
- package/dist/esm/component/BiuField/component/editLocationSelect.js +119 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.js +36 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.d.ts +14 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.js +97 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.d.ts +7 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.js +73 -0
- package/dist/esm/component/BiuField/component/goodsTypeSelect.d.ts +10 -0
- package/dist/esm/component/BiuField/component/goodsTypeSelect.js +92 -0
- package/dist/esm/component/BiuField/component/index.d.ts +37 -0
- package/dist/esm/component/BiuField/component/index.js +37 -0
- package/dist/esm/component/BiuField/component/interfaceNameSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/interfaceNameSelect.js +65 -0
- package/dist/esm/component/BiuField/component/lpnSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/lpnSelect.js +88 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +15 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.js +79 -0
- package/dist/esm/component/BiuField/component/orderTypeTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/orderTypeTableSelect.js +45 -0
- package/dist/esm/component/BiuField/component/parkSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/parkSelect.js +88 -0
- package/dist/esm/component/BiuField/component/personnelinfoselect.d.ts +57 -0
- package/dist/esm/component/BiuField/component/personnelinfoselect.js +431 -0
- package/dist/esm/component/BiuField/component/propertNameSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/propertNameSelect.js +114 -0
- package/dist/esm/component/BiuField/component/shipperTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/shipperTableSelect.js +94 -0
- package/dist/esm/component/BiuField/component/userSelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/userSelect.js +163 -0
- package/dist/esm/component/BiuField/component/warehouseAreaSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/warehouseAreaSelect.js +103 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +13 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +92 -0
- package/dist/esm/component/BiuField/component/warehouseLoctionSelect.d.ts +14 -0
- package/dist/esm/component/BiuField/component/warehouseLoctionSelect.js +124 -0
- package/dist/esm/component/BiuField/index.d.ts +8 -0
- package/dist/esm/component/BiuField/index.js +607 -0
- package/dist/esm/component/BiuFileInput/index.d.ts +11 -0
- package/dist/esm/component/BiuFileInput/index.js +53 -0
- package/dist/esm/component/BiuForm/index.d.ts +12 -0
- package/dist/esm/component/BiuForm/index.js +241 -0
- package/dist/esm/component/BiuForm/type.d.ts +45 -0
- package/dist/esm/component/BiuForm/type.js +1 -0
- package/dist/esm/component/BiuForm/utils.d.ts +2 -0
- package/dist/esm/component/BiuForm/utils.js +46 -0
- package/dist/esm/component/BiuIcon/index.d.ts +3 -0
- package/dist/esm/component/BiuIcon/index.js +15 -0
- package/dist/esm/component/BiuMapSelectSite/index.d.ts +48 -0
- package/dist/esm/component/BiuMapSelectSite/index.js +453 -0
- package/dist/esm/component/BiuModal/index.d.ts +24 -0
- package/dist/esm/component/BiuModal/index.js +239 -0
- package/dist/esm/component/BiuOperForm/index.d.ts +15 -0
- package/dist/esm/component/BiuOperForm/index.js +375 -0
- package/dist/esm/component/BiuOperForm/type.d.ts +23 -0
- package/dist/esm/component/BiuOperForm/type.js +1 -0
- package/dist/esm/component/BiuOperTable/index.d.ts +15 -0
- package/dist/esm/component/BiuOperTable/index.js +349 -0
- package/dist/esm/component/BiuOperTable/type.d.ts +142 -0
- package/dist/esm/component/BiuOperTable/type.js +1 -0
- package/dist/esm/component/BiuOperTable/utils.d.ts +6 -0
- package/dist/esm/component/BiuOperTable/utils.js +13 -0
- package/dist/esm/component/BiuPagination/index.d.ts +14 -0
- package/dist/esm/component/BiuPagination/index.js +34 -0
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.d.ts +1 -0
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +74 -0
- package/dist/esm/component/BiuResizeTable/component/index.d.ts +1 -0
- package/dist/esm/component/BiuResizeTable/component/index.js +1 -0
- package/dist/esm/component/BiuResizeTable/index.d.ts +2 -0
- package/dist/esm/component/BiuResizeTable/index.js +71 -0
- package/dist/esm/component/BiuResizeTable/index.less +19 -0
- package/dist/esm/component/BiuSplit/index.d.ts +32 -0
- package/dist/esm/component/BiuSplit/index.js +57 -0
- package/dist/esm/component/BiuTable/component/index.d.ts +3 -0
- package/dist/esm/component/BiuTable/component/index.js +3 -0
- package/dist/esm/component/BiuTable/component/tableActionBarRender.d.ts +9 -0
- package/dist/esm/component/BiuTable/component/tableActionBarRender.js +88 -0
- package/dist/esm/component/BiuTable/component/tableCellRender.d.ts +14 -0
- package/dist/esm/component/BiuTable/component/tableCellRender.js +108 -0
- package/dist/esm/component/BiuTable/component/tableSettingRender.d.ts +2 -0
- package/dist/esm/component/BiuTable/component/tableSettingRender.js +345 -0
- package/dist/esm/component/BiuTable/context.d.ts +2 -0
- package/dist/esm/component/BiuTable/context.js +2 -0
- package/dist/esm/component/BiuTable/hooks/index.d.ts +1 -0
- package/dist/esm/component/BiuTable/hooks/index.js +1 -0
- package/dist/esm/component/BiuTable/hooks/useFetchData.d.ts +4 -0
- package/dist/esm/component/BiuTable/hooks/useFetchData.js +64 -0
- package/dist/esm/component/BiuTable/index.d.ts +42 -0
- package/dist/esm/component/BiuTable/index.js +484 -0
- package/dist/esm/component/BiuTable/type.d.ts +168 -0
- package/dist/esm/component/BiuTable/type.js +1 -0
- package/dist/esm/component/BiuTable/utils.d.ts +10 -0
- package/dist/esm/component/BiuTable/utils.js +117 -0
- package/dist/esm/component/BiuTableLink/index.d.ts +11 -0
- package/dist/esm/component/BiuTableLink/index.js +54 -0
- package/dist/esm/component/BiuTableSelect/index.d.ts +49 -0
- package/dist/esm/component/BiuTableSelect/index.js +209 -0
- package/dist/esm/component/BiuTabs/index.d.ts +4 -0
- package/dist/esm/component/BiuTabs/index.js +18 -0
- package/dist/esm/component/BiuVirtualTable/index.d.ts +21 -0
- package/dist/esm/component/BiuVirtualTable/index.js +161 -0
- package/dist/esm/component/index.d.ts +35 -0
- package/dist/esm/component/index.js +35 -0
- package/dist/esm/constant/Cache_Key.d.ts +28 -0
- package/dist/esm/constant/Cache_Key.js +28 -0
- package/dist/esm/constant/DateTime.d.ts +12 -0
- package/dist/esm/constant/DateTime.js +15 -0
- package/dist/esm/constant/External.d.ts +64 -0
- package/dist/esm/constant/External.js +260 -0
- package/dist/esm/constant/Gateway_Path.d.ts +5 -0
- package/dist/esm/constant/Gateway_Path.js +5 -0
- package/dist/esm/constant/Layout.d.ts +210 -0
- package/dist/esm/constant/Layout.js +215 -0
- package/dist/esm/constant/Regexp.d.ts +109 -0
- package/dist/esm/constant/Regexp.js +130 -0
- package/dist/esm/constant/index.d.ts +6 -0
- package/dist/esm/constant/index.js +6 -0
- package/dist/esm/hooks/index.d.ts +6 -0
- package/dist/esm/hooks/index.js +6 -0
- package/dist/esm/hooks/useAuth.d.ts +4 -0
- package/dist/esm/hooks/useAuth.js +22 -0
- package/dist/esm/hooks/useCurrentSystem.d.ts +6 -0
- package/dist/esm/hooks/useCurrentSystem.js +15 -0
- package/dist/esm/hooks/useLayoutInfo.d.ts +10 -0
- package/dist/esm/hooks/useLayoutInfo.js +14 -0
- package/dist/esm/hooks/useReducerState.d.ts +16 -0
- package/dist/esm/hooks/useReducerState.js +43 -0
- package/dist/esm/hooks/useUserInfo.d.ts +4 -0
- package/dist/esm/hooks/useUserInfo.js +15 -0
- package/dist/esm/hooks/useWareInfo.d.ts +4 -0
- package/dist/esm/hooks/useWareInfo.js +15 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/package/index.d.ts +1 -0
- package/dist/esm/package/index.js +1 -0
- package/dist/esm/package/requestWrapper/baseRequest.d.ts +3 -0
- package/dist/esm/package/requestWrapper/baseRequest.js +47 -0
- package/dist/esm/package/requestWrapper/index.d.ts +4 -0
- package/dist/esm/package/requestWrapper/index.js +402 -0
- package/dist/esm/package/requestWrapper/type.d.ts +36 -0
- package/dist/esm/package/requestWrapper/type.js +1 -0
- package/dist/esm/package/requestWrapper/utils.d.ts +10 -0
- package/dist/esm/package/requestWrapper/utils.js +35 -0
- package/dist/esm/utils/authUtils.d.ts +18 -0
- package/dist/esm/utils/authUtils.js +36 -0
- package/dist/esm/utils/cacheUtils.d.ts +4 -0
- package/dist/esm/utils/cacheUtils.js +24 -0
- package/dist/esm/utils/chainUtils.d.ts +26 -0
- package/dist/esm/utils/chainUtils.js +54 -0
- package/dist/esm/utils/dateUtils.d.ts +23 -0
- package/dist/esm/utils/dateUtils.js +55 -0
- package/dist/esm/utils/decimalUtils.d.ts +5 -0
- package/dist/esm/utils/decimalUtils.js +7 -0
- package/dist/esm/utils/excelUtils.d.ts +22 -0
- package/dist/esm/utils/excelUtils.js +153 -0
- package/dist/esm/utils/index.d.ts +11 -0
- package/dist/esm/utils/index.js +11 -0
- package/dist/esm/utils/layoutUtils.d.ts +1 -0
- package/dist/esm/utils/layoutUtils.js +13 -0
- package/dist/esm/utils/objectUtils.d.ts +1 -0
- package/dist/esm/utils/objectUtils.js +3 -0
- package/dist/esm/utils/soundUtils.d.ts +5 -0
- package/dist/esm/utils/soundUtils.js +29 -0
- package/dist/esm/utils/stringUtils.d.ts +24 -0
- package/dist/esm/utils/stringUtils.js +39 -0
- package/dist/esm/utils/sysUtils.d.ts +4 -0
- package/dist/esm/utils/sysUtils.js +4 -0
- package/package.json +59 -0
@@ -0,0 +1,74 @@
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
var _excluded = ["onResize", "width", "style"];
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
10
|
+
import { useMemo } from 'react';
|
11
|
+
import ResizAble from 'react-resizable';
|
12
|
+
import { createElement as _createElement } from "react";
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
+
export var TableCell = function TableCell(props) {
|
15
|
+
var onResize = props.onResize,
|
16
|
+
width = props.width,
|
17
|
+
style = props.style,
|
18
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
19
|
+
/**
|
20
|
+
* hack react-resizable 不兼容 react18 的问题
|
21
|
+
*/
|
22
|
+
var Resizable = ResizAble.Resizable;
|
23
|
+
var title = useMemo(function () {
|
24
|
+
var _, _props$children;
|
25
|
+
return (_ = ((_props$children = props === null || props === void 0 ? void 0 : props.children) !== null && _props$children !== void 0 ? _props$children : ['', ''])[1]) !== null && _ !== void 0 ? _ : '';
|
26
|
+
}, [props === null || props === void 0 ? void 0 : props.children]);
|
27
|
+
if (['行号', '操作'].includes(title)) {
|
28
|
+
return /*#__PURE__*/_createElement("th", _objectSpread(_objectSpread({}, restProps), {}, {
|
29
|
+
key: title,
|
30
|
+
style: _objectSpread(_objectSpread({
|
31
|
+
width: width !== null && width !== void 0 ? width : 180,
|
32
|
+
whiteSpace: 'nowrap',
|
33
|
+
overflow: 'hidden',
|
34
|
+
textOverflow: 'ellipsis',
|
35
|
+
fontSize: 12
|
36
|
+
}, style), {}, {
|
37
|
+
boxSizing: 'border-box',
|
38
|
+
color: 'rgb(78, 89, 105)',
|
39
|
+
backgroundColor: '#F2F3F5',
|
40
|
+
textAlign: 'center',
|
41
|
+
fontWeight: '600'
|
42
|
+
})
|
43
|
+
}));
|
44
|
+
}
|
45
|
+
return /*#__PURE__*/_jsx(Resizable, {
|
46
|
+
width: width !== null && width !== void 0 ? width : 180,
|
47
|
+
height: 0,
|
48
|
+
handle: /*#__PURE__*/_jsx("span", {
|
49
|
+
className: "react-resizable-handle",
|
50
|
+
onClick: function onClick(e) {
|
51
|
+
e.stopPropagation();
|
52
|
+
}
|
53
|
+
}),
|
54
|
+
onResize: onResize,
|
55
|
+
draggableOpts: {
|
56
|
+
enableUserSelectHack: false
|
57
|
+
},
|
58
|
+
children: /*#__PURE__*/_jsx("th", _objectSpread(_objectSpread({}, restProps), {}, {
|
59
|
+
style: _objectSpread(_objectSpread({
|
60
|
+
width: width !== null && width !== void 0 ? width : 180,
|
61
|
+
whiteSpace: 'nowrap',
|
62
|
+
overflow: 'hidden',
|
63
|
+
textOverflow: 'ellipsis'
|
64
|
+
}, style), {}, {
|
65
|
+
fontSize: 12,
|
66
|
+
boxSizing: 'border-box',
|
67
|
+
color: 'rgb(78, 89, 105)',
|
68
|
+
backgroundColor: '#F2F3F5',
|
69
|
+
textAlign: 'center',
|
70
|
+
fontWeight: '600'
|
71
|
+
})
|
72
|
+
}))
|
73
|
+
}, title);
|
74
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './biuTableCell';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./biuTableCell";
|
@@ -0,0 +1,71 @@
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
var _excluded = ["columns", "isCellEdit"];
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
10
|
+
import { useDynamicList } from 'ahooks';
|
11
|
+
import { Table } from 'antd';
|
12
|
+
import React, { forwardRef, useCallback, useEffect } from 'react';
|
13
|
+
import { styled } from 'styled-components';
|
14
|
+
import { TableCell } from "./component";
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
16
|
+
var StyledTable = styled(Table).withConfig({
|
17
|
+
displayName: "StyledTable",
|
18
|
+
componentId: "enjoy-link-antd-repack__sc-1lp56n3-0"
|
19
|
+
})([".react-resizable{position:relative;background-clip:padding-box;}.react-resizable-handle{position:absolute;width:10px;height:100%;bottom:0;right:-5px;cursor:col-resize;background-image:none;z-index:1;}"]);
|
20
|
+
export var BiuResizeTable = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (_ref, ref) {
|
21
|
+
var columns = _ref.columns,
|
22
|
+
_ref$isCellEdit = _ref.isCellEdit,
|
23
|
+
isCellEdit = _ref$isCellEdit === void 0 ? false : _ref$isCellEdit,
|
24
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
25
|
+
var _useDynamicList = useDynamicList([]),
|
26
|
+
list = _useDynamicList.list,
|
27
|
+
replace = _useDynamicList.replace,
|
28
|
+
resetList = _useDynamicList.resetList;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* 此处依赖判断不能进行转换,转换时会丢掉函数
|
32
|
+
* 自定义 render 不能执行
|
33
|
+
*/
|
34
|
+
|
35
|
+
useEffect(function () {
|
36
|
+
resetList(columns || []);
|
37
|
+
}, [columns, resetList]);
|
38
|
+
var hanldeResize = useCallback(function (col, index) {
|
39
|
+
return _objectSpread(_objectSpread({}, col), {}, {
|
40
|
+
shouldCellUpdate: function shouldCellUpdate(record, preRecord) {
|
41
|
+
if (!isCellEdit) return !(record === preRecord);
|
42
|
+
return true;
|
43
|
+
},
|
44
|
+
onHeaderCell: function onHeaderCell() {
|
45
|
+
return {
|
46
|
+
width: col.width,
|
47
|
+
onResize: function onResize(event, _ref2) {
|
48
|
+
var size = _ref2.size;
|
49
|
+
replace(index, _objectSpread(_objectSpread({}, col), {}, {
|
50
|
+
width: size.width
|
51
|
+
}));
|
52
|
+
}
|
53
|
+
};
|
54
|
+
}
|
55
|
+
});
|
56
|
+
}, [replace, isCellEdit]);
|
57
|
+
|
58
|
+
// 绑定列事件以及宽度
|
59
|
+
var showColumns = list.map(hanldeResize);
|
60
|
+
return /*#__PURE__*/_jsx(StyledTable, _objectSpread({
|
61
|
+
ref: ref,
|
62
|
+
tableLayout: "fixed",
|
63
|
+
bordered: true,
|
64
|
+
components: {
|
65
|
+
header: {
|
66
|
+
cell: TableCell
|
67
|
+
}
|
68
|
+
},
|
69
|
+
columns: showColumns
|
70
|
+
}, restProps));
|
71
|
+
}));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.resizeTable {
|
2
|
+
:global {
|
3
|
+
.react-resizable {
|
4
|
+
position: relative;
|
5
|
+
background-clip: padding-box;
|
6
|
+
}
|
7
|
+
|
8
|
+
.react-resizable-handle {
|
9
|
+
position: absolute;
|
10
|
+
width: 10px;
|
11
|
+
height: 100%;
|
12
|
+
bottom: 0;
|
13
|
+
right: -5px;
|
14
|
+
cursor: col-resize;
|
15
|
+
background-image: none;
|
16
|
+
z-index: 1;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
/**
|
3
|
+
* BiuSplit 分割上下或者左右两个面板
|
4
|
+
*/
|
5
|
+
type BiuSplitPropsType = {
|
6
|
+
/**
|
7
|
+
* 第一个面板内容,建议使用 BiuSplitPanel,在上面或者左边的面板
|
8
|
+
*/
|
9
|
+
panel1: React.ReactNode;
|
10
|
+
/**
|
11
|
+
* 第二个面板内容,建议使用 BiuSplitPanel,在下面或者右边的面板
|
12
|
+
*/
|
13
|
+
panel2: React.ReactNode;
|
14
|
+
/**
|
15
|
+
* 分割方向,默认为水平分割
|
16
|
+
*/
|
17
|
+
direction?: 'row' | 'column';
|
18
|
+
/**
|
19
|
+
* 左边或上面的面板的大小,可以是百分比或者像素值,默认为 50%
|
20
|
+
*/
|
21
|
+
size?: string;
|
22
|
+
/**
|
23
|
+
* 面板1是否不需要 padding,默认为 false
|
24
|
+
*/
|
25
|
+
noPanel1Padding?: boolean;
|
26
|
+
/**
|
27
|
+
* 面板2是否不需要 padding,默认为 false
|
28
|
+
*/
|
29
|
+
noPanel2Padding?: boolean;
|
30
|
+
};
|
31
|
+
export declare const BiuSplit: React.MemoExoticComponent<(props: BiuSplitPropsType) => import("react/jsx-runtime").JSX.Element>;
|
32
|
+
export {};
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { styled } from 'styled-components';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* BiuSplit 分割上下或者左右两个面板
|
6
|
+
*/
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
+
var StyledSplit = styled.div.withConfig({
|
10
|
+
displayName: "StyledSplit",
|
11
|
+
componentId: "enjoy-link-antd-repack__sc-1gyxjgr-0"
|
12
|
+
})(["margin:0;width:100%;height:100%;display:flex;"]);
|
13
|
+
var StyledSplitPanel = styled.div.withConfig({
|
14
|
+
displayName: "StyledSplitPanel",
|
15
|
+
componentId: "enjoy-link-antd-repack__sc-1gyxjgr-1"
|
16
|
+
})(["box-sizing:border-box;overflow:auto;"]);
|
17
|
+
var RowDivider = styled.div.withConfig({
|
18
|
+
displayName: "RowDivider",
|
19
|
+
componentId: "enjoy-link-antd-repack__sc-1gyxjgr-2"
|
20
|
+
})(["border-left:1px solid #f0f0f0;width:1px;box-sizing:border-box;height:100%;"]);
|
21
|
+
var ColumnDivider = styled.div.withConfig({
|
22
|
+
displayName: "ColumnDivider",
|
23
|
+
componentId: "enjoy-link-antd-repack__sc-1gyxjgr-3"
|
24
|
+
})(["boder-top:1px solid #f0f0f0;height:1px;box-sizing:border-box;width:100%;"]);
|
25
|
+
export var BiuSplit = /*#__PURE__*/React.memo(function (props) {
|
26
|
+
var _props$panel = props.panel1,
|
27
|
+
panel1 = _props$panel === void 0 ? /*#__PURE__*/_jsx("div", {}) : _props$panel,
|
28
|
+
_props$panel2 = props.panel2,
|
29
|
+
panel2 = _props$panel2 === void 0 ? /*#__PURE__*/_jsx("div", {}) : _props$panel2,
|
30
|
+
_props$size = props.size,
|
31
|
+
size = _props$size === void 0 ? '50%' : _props$size,
|
32
|
+
_props$noPanel1Paddin = props.noPanel1Padding,
|
33
|
+
noPanel1Padding = _props$noPanel1Paddin === void 0 ? false : _props$noPanel1Paddin,
|
34
|
+
_props$noPanel2Paddin = props.noPanel2Padding,
|
35
|
+
noPanel2Padding = _props$noPanel2Paddin === void 0 ? false : _props$noPanel2Paddin,
|
36
|
+
_props$direction = props.direction,
|
37
|
+
direction = _props$direction === void 0 ? 'row' : _props$direction;
|
38
|
+
return /*#__PURE__*/_jsxs(StyledSplit, {
|
39
|
+
style: {
|
40
|
+
flexDirection: direction
|
41
|
+
},
|
42
|
+
children: [/*#__PURE__*/_jsx(StyledSplitPanel, {
|
43
|
+
style: {
|
44
|
+
width: direction === 'row' ? size : '100%',
|
45
|
+
height: direction === 'row' ? '100%' : size,
|
46
|
+
padding: noPanel1Padding ? 0 : '4px'
|
47
|
+
},
|
48
|
+
children: panel1
|
49
|
+
}), direction === 'row' ? /*#__PURE__*/_jsx(RowDivider, {}) : /*#__PURE__*/_jsx(ColumnDivider, {}), /*#__PURE__*/_jsx(StyledSplitPanel, {
|
50
|
+
style: {
|
51
|
+
padding: noPanel2Padding ? 0 : '4px',
|
52
|
+
flex: 1
|
53
|
+
},
|
54
|
+
children: panel2
|
55
|
+
})]
|
56
|
+
});
|
57
|
+
});
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { RefObject } from 'react';
|
2
|
+
import React from 'react';
|
3
|
+
import type { BiuTableTopOperaType, BiuFormRefProps } from "../..";
|
4
|
+
export type TopActionBarPropsType = {
|
5
|
+
operationOptions?: BiuTableTopOperaType[];
|
6
|
+
formRef: RefObject<BiuFormRefProps> | null;
|
7
|
+
dataSource?: Record<string, any>[];
|
8
|
+
};
|
9
|
+
export declare const TableActionBarRender: React.MemoExoticComponent<(props: TopActionBarPropsType) => import("react/jsx-runtime").JSX.Element>;
|
@@ -0,0 +1,88 @@
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
var _excluded = ["btnProps", "callback", "title", "popconfirm", "render", "auth"];
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
10
|
+
import { SlidersOutlined } from '@ant-design/icons';
|
11
|
+
import { Popconfirm, Space } from 'antd';
|
12
|
+
import React from 'react';
|
13
|
+
import { BiuAButton } from "../..";
|
14
|
+
import { useAuth } from "../../../hooks";
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
16
|
+
export var TableActionBarRender = /*#__PURE__*/React.memo(function (props) {
|
17
|
+
var _props$operationOptio = props.operationOptions,
|
18
|
+
operationOptions = _props$operationOptio === void 0 ? [] : _props$operationOptio,
|
19
|
+
formRef = props.formRef,
|
20
|
+
_props$dataSource = props.dataSource,
|
21
|
+
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource;
|
22
|
+
var _useAuth = useAuth(),
|
23
|
+
hasAuth = _useAuth.hasAuth;
|
24
|
+
return /*#__PURE__*/_jsx(Space, {
|
25
|
+
wrap: true,
|
26
|
+
size: [8, 8],
|
27
|
+
children: operationOptions.map(function (_ref) {
|
28
|
+
var _ref$btnProps = _ref.btnProps,
|
29
|
+
btnProps = _ref$btnProps === void 0 ? {} : _ref$btnProps,
|
30
|
+
callback = _ref.callback,
|
31
|
+
title = _ref.title,
|
32
|
+
popconfirm = _ref.popconfirm,
|
33
|
+
render = _ref.render,
|
34
|
+
auth = _ref.auth,
|
35
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
36
|
+
if (!hasAuth(auth)) return null;
|
37
|
+
if (render) {
|
38
|
+
return render();
|
39
|
+
}
|
40
|
+
if (popconfirm) {
|
41
|
+
return /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({}, popconfirm), {}, {
|
42
|
+
okText: popconfirm.okText || '确认',
|
43
|
+
cancelText: popconfirm.cancelText || '取消',
|
44
|
+
icon: /*#__PURE__*/_jsx("svg", {
|
45
|
+
viewBox: "0 0 48 48",
|
46
|
+
fill: "none",
|
47
|
+
style: {
|
48
|
+
color: 'rgb(22, 93, 255)',
|
49
|
+
fontSize: '20px',
|
50
|
+
width: '20px',
|
51
|
+
height: '20px'
|
52
|
+
},
|
53
|
+
stroke: "currentColor",
|
54
|
+
strokeWidth: "4",
|
55
|
+
strokeLinecap: "butt",
|
56
|
+
strokeLinejoin: "miter",
|
57
|
+
children: /*#__PURE__*/_jsx("path", {
|
58
|
+
fillRule: "evenodd",
|
59
|
+
clipRule: "evenodd",
|
60
|
+
d: "M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20Zm2-30a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2Zm0 17h1a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h1v-8a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v11Z",
|
61
|
+
fill: "currentColor",
|
62
|
+
stroke: "none"
|
63
|
+
})
|
64
|
+
}),
|
65
|
+
onConfirm: function onConfirm() {
|
66
|
+
var _formRef$current;
|
67
|
+
if (callback) callback(formRef === null || formRef === void 0 || (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.getFieldsValue(), dataSource);
|
68
|
+
},
|
69
|
+
children: /*#__PURE__*/_jsx(BiuAButton, _objectSpread(_objectSpread(_objectSpread({
|
70
|
+
icon: /*#__PURE__*/_jsx(SlidersOutlined, {})
|
71
|
+
}, btnProps), restProps), {}, {
|
72
|
+
children: title
|
73
|
+
}))
|
74
|
+
}), "".concat(title || ''));
|
75
|
+
}
|
76
|
+
return /*#__PURE__*/_jsx(BiuAButton, _objectSpread(_objectSpread(_objectSpread({
|
77
|
+
icon: /*#__PURE__*/_jsx(SlidersOutlined, {})
|
78
|
+
}, btnProps), restProps), {}, {
|
79
|
+
onClick: function onClick(event) {
|
80
|
+
var _formRef$current2;
|
81
|
+
event.preventDefault();
|
82
|
+
if (callback) callback(formRef === null || formRef === void 0 || (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.getFieldsValue(), dataSource);
|
83
|
+
},
|
84
|
+
children: title
|
85
|
+
}), "".concat(title || ''));
|
86
|
+
})
|
87
|
+
});
|
88
|
+
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { BiuTableColumnOpearType } from "../..";
|
3
|
+
export type ColumnActionItemPropsType = BiuTableColumnOpearType & {
|
4
|
+
value: any;
|
5
|
+
record: any;
|
6
|
+
index: number;
|
7
|
+
};
|
8
|
+
export type ColumnActionPropsType = {
|
9
|
+
actionList: BiuTableColumnOpearType[];
|
10
|
+
value: any;
|
11
|
+
record: any;
|
12
|
+
index: number;
|
13
|
+
};
|
14
|
+
export declare const TableCellRender: React.MemoExoticComponent<({ actionList, value, record, index }: ColumnActionPropsType) => import("react/jsx-runtime").JSX.Element>;
|
@@ -0,0 +1,108 @@
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
var _excluded = ["onConfirm", "onCancel", "title"];
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
10
|
+
import { Popconfirm, Space, Tooltip } from 'antd';
|
11
|
+
import React from 'react';
|
12
|
+
import { BUBU100_CACHE_AUTH_BUTTON_KEY } from "../../../constant";
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
+
var ColumnActionItem = /*#__PURE__*/React.memo(function (props) {
|
15
|
+
var showToggle = props.showToggle,
|
16
|
+
record = props.record,
|
17
|
+
popconfirm = props.popconfirm,
|
18
|
+
index = props.index,
|
19
|
+
icon = props.icon,
|
20
|
+
auth = props.auth,
|
21
|
+
title = props.title,
|
22
|
+
onLinkClick = props.onLinkClick;
|
23
|
+
var resolveCodeList = [];
|
24
|
+
var cacheButtonAuth = sessionStorage.getItem(BUBU100_CACHE_AUTH_BUTTON_KEY);
|
25
|
+
if (cacheButtonAuth) {
|
26
|
+
resolveCodeList = JSON.parse(cacheButtonAuth).resolveCodeList || [];
|
27
|
+
}
|
28
|
+
if (resolveCodeList.length > 0) {
|
29
|
+
if (typeof auth === 'string' && !resolveCodeList.includes(auth) || typeof auth === 'boolean' && !auth) {
|
30
|
+
return null;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
if (showToggle && showToggle(record) === false) return null;
|
34
|
+
if (popconfirm) {
|
35
|
+
var _onConfirm = popconfirm.onConfirm,
|
36
|
+
_onCancel = popconfirm.onCancel,
|
37
|
+
popconfirmTitle = popconfirm.title,
|
38
|
+
restPopProps = _objectWithoutProperties(popconfirm, _excluded);
|
39
|
+
var restTitle = typeof popconfirmTitle === 'function' ? popconfirmTitle(record) : popconfirmTitle;
|
40
|
+
return /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({
|
41
|
+
placement: "topRight",
|
42
|
+
arrowPointAtCenter: true,
|
43
|
+
title: restTitle
|
44
|
+
}, restPopProps), {}, {
|
45
|
+
destroyTooltipOnHide: true,
|
46
|
+
zIndex: 10002,
|
47
|
+
onCancel: function onCancel(event) {
|
48
|
+
if (_onCancel) {
|
49
|
+
_onCancel();
|
50
|
+
}
|
51
|
+
if (event) {
|
52
|
+
event.stopPropagation();
|
53
|
+
event.nativeEvent.stopImmediatePropagation();
|
54
|
+
}
|
55
|
+
},
|
56
|
+
onConfirm: function onConfirm(event) {
|
57
|
+
if (_onConfirm) {
|
58
|
+
_onConfirm(record, index);
|
59
|
+
}
|
60
|
+
if (event) {
|
61
|
+
event.stopPropagation();
|
62
|
+
event.nativeEvent.stopImmediatePropagation();
|
63
|
+
}
|
64
|
+
},
|
65
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
66
|
+
arrowPointAtCenter: true,
|
67
|
+
title: title,
|
68
|
+
children: /*#__PURE__*/_jsx("a", {
|
69
|
+
onClick: function onClick(event) {
|
70
|
+
event.stopPropagation();
|
71
|
+
event.nativeEvent.stopImmediatePropagation();
|
72
|
+
},
|
73
|
+
children: icon || title
|
74
|
+
})
|
75
|
+
}, title)
|
76
|
+
}), title);
|
77
|
+
}
|
78
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
79
|
+
arrowPointAtCenter: true,
|
80
|
+
title: title,
|
81
|
+
children: /*#__PURE__*/_jsx("a", {
|
82
|
+
onClick: function onClick(event) {
|
83
|
+
if (onLinkClick) {
|
84
|
+
onLinkClick(record, index);
|
85
|
+
}
|
86
|
+
event.stopPropagation();
|
87
|
+
event.nativeEvent.stopImmediatePropagation();
|
88
|
+
},
|
89
|
+
children: icon || title
|
90
|
+
})
|
91
|
+
}, title);
|
92
|
+
});
|
93
|
+
export var TableCellRender = /*#__PURE__*/React.memo(function (_ref) {
|
94
|
+
var actionList = _ref.actionList,
|
95
|
+
value = _ref.value,
|
96
|
+
record = _ref.record,
|
97
|
+
index = _ref.index;
|
98
|
+
return /*#__PURE__*/_jsx(Space, {
|
99
|
+
children: actionList.map(function (n, i) {
|
100
|
+
var key = "".concat(value).concat(index).concat(i);
|
101
|
+
return /*#__PURE__*/_jsx(ColumnActionItem, _objectSpread(_objectSpread({}, n), {}, {
|
102
|
+
value: value,
|
103
|
+
record: record,
|
104
|
+
index: index
|
105
|
+
}), key);
|
106
|
+
})
|
107
|
+
}, "".concat(value).concat(index));
|
108
|
+
});
|