@pointcloud/pcloud-components 0.1.3 → 0.1.4

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.
@@ -0,0 +1,380 @@
1
+ var _excluded = ["value", "thumbOption", "uploadButton", "itemClassName", "enablePreview", "className", "maxCount", "children", "itemRender", "customRequest", "onRemove", "onDownload", "onPreview", "onChange", "defaultFileList", "showUploadList", "fileList"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
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(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
9
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
10
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
11
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
12
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
14
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
15
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
19
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
20
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
+ 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; }
22
+ 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; }
23
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
24
+ /*
25
+ * @Author : wangfeihu
26
+ * @Date : 2023-06-16 09:37:07
27
+ * @LastEditors : wangfeihu
28
+ * @LastEditTime : 2023-06-30 16:32:19
29
+ * @Description : 基于antd的Upload组件
30
+ */
31
+
32
+ import React, { forwardRef, useEffect, useMemo, useRef, useState, useContext } from 'react';
33
+ import { Upload } from 'antd';
34
+ import helper from "./helper";
35
+ import { ConfigContext } from "../ConfigProvider";
36
+ import "./index.less";
37
+ var defaultUploadButton = /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
38
+ style: {
39
+ fontSize: 18
40
+ }
41
+ }, "+"), /*#__PURE__*/React.createElement("div", {
42
+ style: {
43
+ marginTop: 8
44
+ }
45
+ }, "\u4E0A\u4F20"));
46
+ function downloadFn(file) {
47
+ if (file instanceof Blob) {
48
+ helper.downloadFile(file);
49
+ } else if (file !== null && file !== void 0 && file.url) {
50
+ var fileName = (file === null || file === void 0 ? void 0 : file.fileName) || (file === null || file === void 0 ? void 0 : file.name) || (file === null || file === void 0 ? void 0 : file.id) || (file === null || file === void 0 ? void 0 : file.uid);
51
+ helper.downloadFile(file.url, typeof fileName === 'number' ? String(fileName) : fileName);
52
+ } else {
53
+ if (file) throw new TypeError("\u8FD4\u56DE\u503C\u5FC5\u987B\u662FBlob\u6216Dupload\u5BF9\u8C61,\u4F46\u5374\u5F97\u5230\u4E00\u4E2A: ".concat(_typeof(file)));
54
+ }
55
+ }
56
+ function previewFn(file) {
57
+ if (file instanceof Blob) {
58
+ helper.previewFile(file);
59
+ } else if (file !== null && file !== void 0 && file.url) {
60
+ helper.previewFile(file.url);
61
+ } else {
62
+ if (file) throw new TypeError("\u8FD4\u56DE\u503C\u5FC5\u987B\u662FBlob\u6216Dupload\u5BF9\u8C61,\u4F46\u5374\u5F97\u5230\u4E00\u4E2A: ".concat(_typeof(file)));
63
+ }
64
+ }
65
+ function downloadOrPreview(file, fn, execFn) {
66
+ if (typeof fn === 'function') {
67
+ var resultFile = fn(file);
68
+ if (resultFile && 'then' in resultFile && typeof resultFile.then === 'function') {
69
+ resultFile.then(function (_file) {
70
+ return execFn(_file);
71
+ });
72
+ } else {
73
+ execFn(resultFile);
74
+ }
75
+ // 默认的预览逻辑
76
+ } else {
77
+ execFn(file);
78
+ }
79
+ }
80
+ function InternalUpload(props, ref) {
81
+ var value = props.value,
82
+ thumbOption = props.thumbOption,
83
+ uploadButton = props.uploadButton,
84
+ _props$itemClassName = props.itemClassName,
85
+ itemClassName = _props$itemClassName === void 0 ? '' : _props$itemClassName,
86
+ enablePreview = props.enablePreview,
87
+ _props$className = props.className,
88
+ className = _props$className === void 0 ? '' : _props$className,
89
+ _props$maxCount = props.maxCount,
90
+ maxCount = _props$maxCount === void 0 ? 10 : _props$maxCount,
91
+ children = props.children,
92
+ itemRender = props.itemRender,
93
+ customRequest = props.customRequest,
94
+ onRemove = props.onRemove,
95
+ onDownload = props.onDownload,
96
+ onPreview = props.onPreview,
97
+ onChange = props.onChange,
98
+ defaultFileList = props.defaultFileList,
99
+ showUploadList = props.showUploadList,
100
+ _fileList = props.fileList,
101
+ otherProps = _objectWithoutProperties(props, _excluded);
102
+ var _useContext = useContext(ConfigContext),
103
+ getPrefixCls = _useContext.getPrefixCls;
104
+ var _useState = useState([]),
105
+ _useState2 = _slicedToArray(_useState, 2),
106
+ fileList = _useState2[0],
107
+ setFileList = _useState2[1];
108
+
109
+ // 缓存的文件列表
110
+ var listRef = useRef({
111
+ timer: null,
112
+ list: []
113
+ });
114
+
115
+ // 缩略图相关选项
116
+ var _thumbOption = useMemo(function () {
117
+ return thumbOption === null ? thumbOption : helper.getThumbOption(thumbOption);
118
+ }, [thumbOption]);
119
+ function updateFileList(file, status) {
120
+ var needChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
121
+ var thumbUrl = arguments.length > 3 ? arguments[3] : undefined;
122
+ file.status = status;
123
+ file.thumbUrl = thumbUrl;
124
+ file.id = file.uid;
125
+ var list = _toConsumableArray(listRef.current.list);
126
+ setFileList(list);
127
+ if (onChange && needChange) {
128
+ onChange(list, {
129
+ file: file,
130
+ fileList: list
131
+ });
132
+ }
133
+ }
134
+ var customRequestFun = /*#__PURE__*/function () {
135
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(requestOption) {
136
+ var file, _list, _thumbOption$filter, base64Url, _thumbOption$onError, _compress, _base64Url, _thumbOption$onError2;
137
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
138
+ while (1) switch (_context.prev = _context.next) {
139
+ case 0:
140
+ file = requestOption.file; // 若超出最大限制则不上传
141
+ if (!(listRef.current.list.filter(function (item) {
142
+ return (item === null || item === void 0 ? void 0 : item.status) !== 'removed';
143
+ }).length >= maxCount)) {
144
+ _context.next = 3;
145
+ break;
146
+ }
147
+ return _context.abrupt("return");
148
+ case 3:
149
+ // 标记当前文件为新上传的
150
+ file.source = 'upload';
151
+
152
+ // 用户自定义的上传逻辑
153
+ if (!(typeof customRequest === 'function')) {
154
+ _context.next = 9;
155
+ break;
156
+ }
157
+ _list = customRequest(file, listRef.current.list, requestOption);
158
+ if (_list && 'then' in _list && typeof _list.then === 'function') {
159
+ _list.then(function (list) {
160
+ if (list) {
161
+ setFileList(_toConsumableArray(list));
162
+ listRef.current.list = _toConsumableArray(list);
163
+ onChange === null || onChange === void 0 ? void 0 : onChange(list, {
164
+ file: file,
165
+ fileList: list
166
+ });
167
+ }
168
+ });
169
+ } else if (_list instanceof Array) {
170
+ if (_list) {
171
+ setFileList(_toConsumableArray(_list));
172
+ listRef.current.list = _toConsumableArray(_list);
173
+ onChange === null || onChange === void 0 ? void 0 : onChange(_list, {
174
+ file: file,
175
+ fileList: _list
176
+ });
177
+ }
178
+ }
179
+ _context.next = 42;
180
+ break;
181
+ case 9:
182
+ // 默认的上传逻辑
183
+ listRef.current.list.push(file);
184
+ if (!(_thumbOption && typeof _thumbOption.getThumbUrl === 'function')) {
185
+ _context.next = 25;
186
+ break;
187
+ }
188
+ updateFileList(file, 'uploading');
189
+ _context.prev = 12;
190
+ _context.next = 15;
191
+ return _thumbOption.getThumbUrl(file, _thumbOption);
192
+ case 15:
193
+ base64Url = _context.sent;
194
+ updateFileList(file, 'done', false, base64Url);
195
+ _context.next = 23;
196
+ break;
197
+ case 19:
198
+ _context.prev = 19;
199
+ _context.t0 = _context["catch"](12);
200
+ (_thumbOption$onError = _thumbOption.onError) === null || _thumbOption$onError === void 0 ? void 0 : _thumbOption$onError.call(_thumbOption, _context.t0);
201
+ updateFileList(file, 'done', false);
202
+ case 23:
203
+ _context.next = 42;
204
+ break;
205
+ case 25:
206
+ if (!(_thumbOption && (_thumbOption$filter = _thumbOption.filter) !== null && _thumbOption$filter !== void 0 && _thumbOption$filter.call(_thumbOption, file))) {
207
+ _context.next = 41;
208
+ break;
209
+ }
210
+ _compress = file.size > _thumbOption.size ? _thumbOption.compress : null;
211
+ updateFileList(file, 'uploading');
212
+ _context.prev = 28;
213
+ _context.next = 31;
214
+ return helper.imageToBase64(file, _compress);
215
+ case 31:
216
+ _base64Url = _context.sent;
217
+ updateFileList(file, 'done', false, _base64Url);
218
+ _context.next = 39;
219
+ break;
220
+ case 35:
221
+ _context.prev = 35;
222
+ _context.t1 = _context["catch"](28);
223
+ (_thumbOption$onError2 = _thumbOption.onError) === null || _thumbOption$onError2 === void 0 ? void 0 : _thumbOption$onError2.call(_thumbOption, _context.t1);
224
+ updateFileList(file, 'done', false);
225
+ case 39:
226
+ _context.next = 42;
227
+ break;
228
+ case 41:
229
+ updateFileList(file, 'done');
230
+ case 42:
231
+ case "end":
232
+ return _context.stop();
233
+ }
234
+ }, _callee, null, [[12, 19], [28, 35]]);
235
+ }));
236
+ return function customRequestFun(_x2) {
237
+ return _ref.apply(this, arguments);
238
+ };
239
+ }();
240
+ var onRemoveFun = function onRemoveFun(file) {
241
+ // 用户自定义的删除逻辑
242
+ if (typeof onRemove === 'function') {
243
+ var _list2 = onRemove(file, listRef.current.list);
244
+ if (_list2 && 'then' in _list2 && typeof _list2.then === 'function') {
245
+ _list2.then(function (list) {
246
+ if (list) {
247
+ setFileList(_toConsumableArray(list));
248
+ onChange === null || onChange === void 0 ? void 0 : onChange(list, {
249
+ file: file,
250
+ fileList: list
251
+ });
252
+ }
253
+ });
254
+ } else if (_list2 instanceof Array) {
255
+ if (_list2) {
256
+ setFileList(_toConsumableArray(_list2));
257
+ onChange === null || onChange === void 0 ? void 0 : onChange(_list2, {
258
+ file: file,
259
+ fileList: _list2
260
+ });
261
+ }
262
+ }
263
+ } else {
264
+ // 默认的删除逻辑
265
+ if (file.source === 'upload') {
266
+ var index = listRef.current.list.findIndex(function (item) {
267
+ return item.uid === file.uid;
268
+ });
269
+ if (index >= 0) listRef.current.list.splice(index, 1);
270
+ } else {
271
+ file.status = 'removed';
272
+ }
273
+ var _list3 = _toConsumableArray(listRef.current.list);
274
+ setFileList(_list3);
275
+ onChange === null || onChange === void 0 ? void 0 : onChange(_list3, {
276
+ file: file,
277
+ fileList: _list3
278
+ });
279
+ }
280
+ };
281
+ var _onDownload = function _onDownload(file) {
282
+ return downloadOrPreview(file, onDownload, downloadFn);
283
+ };
284
+ var _onPreview = function _onPreview(file) {
285
+ return downloadOrPreview(file, onPreview, previewFn);
286
+ };
287
+
288
+ // 拦截listItem的渲染,添加类名,强制修改预览图标的样式
289
+ var _itemRender = function _itemRender(originNode, file) {
290
+ // 给列表项添加类名,用以修改预览图标样式
291
+ var _enablePreview = typeof enablePreview === 'function' ? enablePreview(file) : enablePreview;
292
+ var _itemClassName = _enablePreview ? "".concat(originNode.props.className, " ").concat(itemClassName, " preview") : "".concat(originNode.props.className, " ").concat(itemClassName);
293
+ var _originNode = _objectSpread(_objectSpread({}, originNode), {}, {
294
+ props: _objectSpread(_objectSpread({}, originNode.props), {}, {
295
+ title: (file === null || file === void 0 ? void 0 : file.fileName) || (file === null || file === void 0 ? void 0 : file.name) || '',
296
+ className: _itemClassName
297
+ })
298
+ });
299
+
300
+ // 解决下载、删除按钮在Form组件 disable状态下被禁用的问题
301
+ var action = helper.deepFindJsx(_originNode, function (item) {
302
+ var _item$props;
303
+ return ((_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.className) === 'ant-upload-list-item-actions' && item.type === 'span';
304
+ });
305
+ if (action) {
306
+ // 查找下载、删除图标,将其外层包裹的的Button组件删除掉
307
+ var actionChildren = action.props.children.map(function (item, index) {
308
+ if (index > 0) {
309
+ var _item$props2, _item$props3, _children2;
310
+ var _children = (item === null || item === void 0 ? void 0 : (_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.children) || (item === null || item === void 0 ? void 0 : (_item$props3 = item.props) === null || _item$props3 === void 0 ? void 0 : _item$props3.icon);
311
+ if ((_children2 = _children) !== null && _children2 !== void 0 && _children2.props) {
312
+ _children = _objectSpread(_objectSpread({}, _children), {}, {
313
+ key: index,
314
+ props: _objectSpread(_objectSpread({
315
+ title: item.props.title
316
+ }, _children.props), {}, {
317
+ onClick: function onClick(e) {
318
+ var _item$props$onClick, _item$props4;
319
+ return (_item$props$onClick = (_item$props4 = item.props).onClick) === null || _item$props$onClick === void 0 ? void 0 : _item$props$onClick.call(_item$props4, e);
320
+ }
321
+ })
322
+ });
323
+ }
324
+ return _children || item;
325
+ }
326
+ return item;
327
+ });
328
+
329
+ // 替换修改后的action
330
+ var _children3 = _toConsumableArray(_originNode.props.children);
331
+ _children3[1] = _objectSpread(_objectSpread({}, _children3[1]), {}, {
332
+ props: _objectSpread(_objectSpread({}, _children3[1].props), {}, {
333
+ children: actionChildren
334
+ })
335
+ });
336
+ var _originNodeClone = _objectSpread(_objectSpread({}, _originNode), {}, {
337
+ props: _objectSpread(_objectSpread({}, _originNode.props), {}, {
338
+ children: _children3
339
+ })
340
+ });
341
+ return _originNodeClone;
342
+ }
343
+ return _originNode;
344
+ };
345
+ var _showUploadList = typeof showUploadList === 'boolean' ? showUploadList : _objectSpread(_objectSpread({}, showUploadList), {}, {
346
+ showPreviewIcon: true,
347
+ showDownloadIcon: true
348
+ });
349
+ var _finalFileList = listRef.current.list.filter(function (item) {
350
+ return item.status !== 'removed';
351
+ });
352
+ var _props = _objectSpread({
353
+ maxCount: maxCount,
354
+ action: undefined,
355
+ className: "".concat(getPrefixCls('upload'), " ").concat(className),
356
+ // @ts-ignore
357
+ fileList: fileList,
358
+ itemRender: itemRender || _itemRender,
359
+ customRequest: customRequestFun,
360
+ onRemove: onRemoveFun,
361
+ onDownload: _onDownload,
362
+ onPreview: _onPreview,
363
+ showUploadList: _showUploadList
364
+ }, otherProps);
365
+ var _uploadButton = uploadButton === null ? null : uploadButton || children || defaultUploadButton;
366
+ useEffect(function () {
367
+ var list = helper.getUploadFile(_fileList || value || defaultFileList, maxCount);
368
+ listRef.current.list = list;
369
+ setFileList(list);
370
+ }, [_fileList, value, defaultFileList]);
371
+ return /*#__PURE__*/React.createElement(Upload, _extends({
372
+ listType: "picture-card"
373
+ }, _props, {
374
+ fileList: _finalFileList,
375
+ ref: ref
376
+ }), _finalFileList.length >= maxCount ? null : _uploadButton);
377
+ }
378
+ var DUpload = /*#__PURE__*/forwardRef(InternalUpload);
379
+ DUpload.imageToBase64 = helper.imageToBase64;
380
+ export default DUpload;
@@ -0,0 +1,18 @@
1
+ @import '../commonStyle/index.less';
2
+ .@{prefix}-upload {
3
+ .preview .ant-upload-list-item-actions a[target='_blank'][rel='noopener noreferrer'] {
4
+ opacity: initial !important;
5
+ pointer-events: initial !important;
6
+ }
7
+
8
+ .ant-upload-list.ant-upload-list-picture-card .ant-upload-span {
9
+ .ant-upload-list-item-thumbnail {
10
+ height: 46px;
11
+ }
12
+
13
+ .ant-upload-list-item-name {
14
+ position: absolute;
15
+ display: initial;
16
+ }
17
+ }
18
+ }
@@ -13,6 +13,8 @@ export type { DCascaderProps } from './DCascader';
13
13
  export { default as DCascader } from './DCascader';
14
14
  export type { DTreeSelectProps } from './DTreeSelect';
15
15
  export { default as DTreeSelect } from './DTreeSelect';
16
+ export type { DUploadProps, DUploadFile } from './DUpload';
17
+ export { default as DUpload } from './DUpload';
16
18
  export type { DTableProps, DTableSourceProps, TableParamsProps } from './DTable';
17
19
  export { default as DTable } from './DTable';
18
20
  export type { DFormProps } from './DForm';
package/dist/esm/index.js CHANGED
@@ -8,6 +8,7 @@ export { default as DInput } from "./DInput";
8
8
  export { default as DSelect } from "./DSelect";
9
9
  export { default as DCascader } from "./DCascader";
10
10
  export { default as DTreeSelect } from "./DTreeSelect";
11
+ export { default as DUpload } from "./DUpload";
11
12
  export { default as DTable } from "./DTable";
12
13
  export { default as DForm } from "./DForm";
13
14
  export { default as LModal } from "./LModal";
@@ -1 +1 @@
1
- .pui-label-value{display:inline-flex}.pui-label-value span:first-child{max-width:120px;padding-right:4px;white-space:nowrap}.pui-label-value span:last-child{flex:1 1}.pui-label-value span:last-child.no-wrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pui-search-filter{align-items:center;background-color:#fff;margin-top:10px;width:100%}.pui-search-filter span.ant-collapse-header-text{cursor:auto!important;display:inline-block;width:100%}.pui-search-filter .ant-collapse-content-box{padding:0}.pui-search-filter .search-header{display:flex;width:100%}.pui-search-filter .search-header .left{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:no-wrap}.pui-search-filter .search-header .left :global .ant-radio-wrapper:first-child{border-left:1px solid #d9d9d9;border-radius:5px 0 0 5px}.pui-search-filter .search-header .left :global .ant-radio-wrapper:last-child{border-radius:0 5px 5px 0}.pui-search-filter .search-header .left :global .ant-radio-wrapper{border:1px solid #d9d9d9;border-left-color:#fff;margin-right:0;padding:4px 6px}.pui-search-filter .search-header .left :global .ant-radio-wrapper .ant-radio{display:none}.pui-search-filter .search-header .left :global .ant-radio-wrapper:hover{color:#1890ff}.pui-search-filter .search-header .left :global .ant-radio-wrapper-checked{background:#fff;border:1px solid #1890ff;border-left:1px solid #1890ff!important;color:#1890ff;z-index:1}.pui-search-filter .search-header .right{display:flex;justify-content:center}.pui-search-filter .search-header .right .input{border-radius:4px;width:200px}.pui-search-filter .search-header .right .button{background-color:#ff7e00;border-radius:4px;color:#fff;margin-left:10px}.pui-search-filter .search-header .right .button:active,.pui-search-filter .search-header .right .button:focus,.pui-search-filter .search-header .right .button:hover{border-color:transparent}.pui-search-filter .search-header .right .button .icon{margin-left:8px}.pui-search-filter .title{align-items:center;border-bottom:1px solid #f0f0f0;display:flex;font-weight:700;margin:0 10px;padding-bottom:10px}.pui-search-filter .title span.icon{background-color:#ff7e00;border-radius:2px;height:16px;margin-right:6px;width:4px}.pui-search-filter .search-content .filter-row{display:flex;flex-wrap:wrap;padding:10px;width:100%}.pui-search-filter .search-content .filter-col{height:30px;line-height:30px;margin-bottom:10px}.pui-search-filter .search-content .filter-col .ant-picker{width:100%}.pui-search-filter .search-content .search-btn{justify-content:center}.pui-search-filter .search-content .search-btn>button{margin:0 5px}.pui-error-boundary{align-items:center;background-color:#dd7f7f;border-radius:10px;display:flex;flex-direction:column;justify-content:center;margin:20px;padding:15px;width:auto}.pui-error-boundary .error-text{margin-top:20px}.pui-error-boundary .error-refresh{background-color:#4593ef;border-radius:5px;color:#fff;cursor:pointer;font-weight:700;height:40px;line-height:40px;text-align:center;width:140px}.pui-error-boundary .errorDetiles .detilesLink{color:blue}.pui-error-boundary .errorDetiles .errordetails{background-color:#ccc6be;border:1px solid #777;border-radius:5px;color:#777;font-size:80%;padding:10px}.pui-loading .mask{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:100000}.pui-loading .loading{background:#fff;border-radius:10px;box-shadow:3px 3px 3px rgba(0,0,0,.2);padding:20px;z-index:100001}.pui-loading .loading,.pui-nodata{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.pui-nodata .not-data-image{display:block;height:100px}.pui-nodata .noData-text{color:#000;display:inline-block;font-size:14px;font-weight:400;margin-top:5px;opacity:.65;text-align:center;width:100%}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar{height:8px;width:8px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.5);border-radius:8px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-track{border-radius:2px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-corner{background-color:#f1f1f1}.pui-tree-select-dropdown .ant-select-tree-node-content-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pui-tree-select-dropdown .ant-select-tree-node-content-wrapper .ant-select-tree-title{overflow:hidden}.pui-table .ant-spin-container,.pui-table .ant-spin-nested-loading,.pui-table .ant-table,.pui-table .ant-table-container{height:100%;width:100%}.pui-table .ant-table-body{max-height:calc(100% - 56px);max-width:100%;min-height:calc(100% - 56px);min-width:100%;position:absolute}.pui-table .ant-table-body .ant-table-tbody>tr>td.ant-table-cell.ant-table-cell-ellipsis{white-space:normal}.pui-table .ant-table-body::-webkit-scrollbar{height:8px;width:4px}.pui-table .ant-table-body::-webkit-scrollbar-thumb{background-color:#0084ff}.pui-table .ant-table-body::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:2px}.pui-table .ant-table-body::-webkit-scrollbar-corner{background-color:#f1f1f1}.pui-table .ant-spin-nested-loading>div>.ant-spin{max-height:none}.pui-table .ant-pagination-total-text span{color:#40a9ff;font-weight:700}.pui-table.height-on-page .ant-table{height:calc(100% - 56px)}.pui-form .form-wrapper>*{margin-bottom:24px;margin-right:0;min-height:32px;padding-right:16px}.pui-form.ant-form-horizontal .ant-form-item-label{min-width:80px}.pui-form.ant-form-inline .form-wrapper,.pui-form.ant-form-inline.inlineVertical .form-wrapper{align-items:flex-end;display:flex;flex-wrap:wrap;height:min-content}.pui-form.ant-form-inline.inlineVertical .ant-form-item-row{flex-direction:column}.pui-form.ant-form-inline.inlineVertical .ant-form-item-row .ant-form-item-label{text-align:left}.pui-modal-container .ant-modal-wrap .ant-modal{height:100%;max-width:none}.pui-modal-container .ant-modal-wrap .ant-modal .ant-modal-content{height:100%;width:100%}.pui-absolute-modal-container .ant-modal-wrap{position:fixed}.pui-relative-modal-container .ant-modal-wrap{position:absolute}
1
+ .pui-label-value{display:inline-flex}.pui-label-value span:first-child{max-width:120px;padding-right:4px;white-space:nowrap}.pui-label-value span:last-child{flex:1 1}.pui-label-value span:last-child.no-wrap{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pui-search-filter{align-items:center;background-color:#fff;margin-top:10px;width:100%}.pui-search-filter span.ant-collapse-header-text{cursor:auto!important;display:inline-block;width:100%}.pui-search-filter .ant-collapse-content-box{padding:0}.pui-search-filter .search-header{display:flex;width:100%}.pui-search-filter .search-header .left{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:no-wrap}.pui-search-filter .search-header .left :global .ant-radio-wrapper:first-child{border-left:1px solid #d9d9d9;border-radius:5px 0 0 5px}.pui-search-filter .search-header .left :global .ant-radio-wrapper:last-child{border-radius:0 5px 5px 0}.pui-search-filter .search-header .left :global .ant-radio-wrapper{border:1px solid #d9d9d9;border-left-color:#fff;margin-right:0;padding:4px 6px}.pui-search-filter .search-header .left :global .ant-radio-wrapper .ant-radio{display:none}.pui-search-filter .search-header .left :global .ant-radio-wrapper:hover{color:#1890ff}.pui-search-filter .search-header .left :global .ant-radio-wrapper-checked{background:#fff;border:1px solid #1890ff;border-left:1px solid #1890ff!important;color:#1890ff;z-index:1}.pui-search-filter .search-header .right{display:flex;justify-content:center}.pui-search-filter .search-header .right .input{border-radius:4px;width:200px}.pui-search-filter .search-header .right .button{background-color:#ff7e00;border-radius:4px;color:#fff;margin-left:10px}.pui-search-filter .search-header .right .button:active,.pui-search-filter .search-header .right .button:focus,.pui-search-filter .search-header .right .button:hover{border-color:transparent}.pui-search-filter .search-header .right .button .icon{margin-left:8px}.pui-search-filter .title{align-items:center;border-bottom:1px solid #f0f0f0;display:flex;font-weight:700;margin:0 10px;padding-bottom:10px}.pui-search-filter .title span.icon{background-color:#ff7e00;border-radius:2px;height:16px;margin-right:6px;width:4px}.pui-search-filter .search-content .filter-row{display:flex;flex-wrap:wrap;padding:10px;width:100%}.pui-search-filter .search-content .filter-col{height:30px;line-height:30px;margin-bottom:10px}.pui-search-filter .search-content .filter-col .ant-picker{width:100%}.pui-search-filter .search-content .search-btn{justify-content:center}.pui-search-filter .search-content .search-btn>button{margin:0 5px}.pui-error-boundary{align-items:center;background-color:#dd7f7f;border-radius:10px;display:flex;flex-direction:column;justify-content:center;margin:20px;padding:15px;width:auto}.pui-error-boundary .error-text{margin-top:20px}.pui-error-boundary .error-refresh{background-color:#4593ef;border-radius:5px;color:#fff;cursor:pointer;font-weight:700;height:40px;line-height:40px;text-align:center;width:140px}.pui-error-boundary .errorDetiles .detilesLink{color:blue}.pui-error-boundary .errorDetiles .errordetails{background-color:#ccc6be;border:1px solid #777;border-radius:5px;color:#777;font-size:80%;padding:10px}.pui-loading .mask{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:100000}.pui-loading .loading{background:#fff;border-radius:10px;box-shadow:3px 3px 3px rgba(0,0,0,.2);padding:20px;z-index:100001}.pui-loading .loading,.pui-nodata{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.pui-nodata .not-data-image{display:block;height:100px}.pui-nodata .noData-text{color:#000;display:inline-block;font-size:14px;font-weight:400;margin-top:5px;opacity:.65;text-align:center;width:100%}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar{height:8px;width:8px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.5);border-radius:8px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-track{border-radius:2px}.pui-cascader-dropdown .ant-cascader-menu::-webkit-scrollbar-corner{background-color:#f1f1f1}.pui-tree-select-dropdown .ant-select-tree-node-content-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pui-tree-select-dropdown .ant-select-tree-node-content-wrapper .ant-select-tree-title{overflow:hidden}.pui-upload .preview .ant-upload-list-item-actions a[target=_blank][rel="noopener noreferrer"]{opacity:1!important;pointer-events:auto!important}.pui-upload .ant-upload-list.ant-upload-list-picture-card .ant-upload-span .ant-upload-list-item-thumbnail{height:46px}.pui-upload .ant-upload-list.ant-upload-list-picture-card .ant-upload-span .ant-upload-list-item-name{display:inline;display:initial;position:absolute}.pui-table .ant-spin-container,.pui-table .ant-spin-nested-loading,.pui-table .ant-table,.pui-table .ant-table-container{height:100%;width:100%}.pui-table .ant-table-body{max-height:calc(100% - 56px);max-width:100%;min-height:calc(100% - 56px);min-width:100%;position:absolute}.pui-table .ant-table-body .ant-table-tbody>tr>td.ant-table-cell.ant-table-cell-ellipsis{white-space:normal}.pui-table .ant-table-body::-webkit-scrollbar{height:8px;width:4px}.pui-table .ant-table-body::-webkit-scrollbar-thumb{background-color:#0084ff}.pui-table .ant-table-body::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:2px}.pui-table .ant-table-body::-webkit-scrollbar-corner{background-color:#f1f1f1}.pui-table .ant-spin-nested-loading>div>.ant-spin{max-height:none}.pui-table .ant-pagination-total-text span{color:#40a9ff;font-weight:700}.pui-table.height-on-page .ant-table{height:calc(100% - 56px)}.pui-form .form-wrapper>*{margin-bottom:24px;margin-right:0;min-height:32px;padding-right:16px}.pui-form.ant-form-horizontal .ant-form-item-label{min-width:80px}.pui-form.ant-form-inline .form-wrapper,.pui-form.ant-form-inline.inlineVertical .form-wrapper{align-items:flex-end;display:flex;flex-wrap:wrap;height:min-content}.pui-form.ant-form-inline.inlineVertical .ant-form-item-row{flex-direction:column}.pui-form.ant-form-inline.inlineVertical .ant-form-item-row .ant-form-item-label{text-align:left}.pui-modal-container .ant-modal-wrap .ant-modal{height:100%;max-width:none}.pui-modal-container .ant-modal-wrap .ant-modal .ant-modal-content{height:100%;width:100%}.pui-absolute-modal-container .ant-modal-wrap{position:fixed}.pui-relative-modal-container .ant-modal-wrap{position:absolute}