@pnkx-lib/ui 1.9.507 → 1.9.509
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.
- package/dist/style.css +2 -2
- package/es/chunks/{GenericUploadModal-BNQ9cWDf.js → GenericUploadModal-CkhTggnS.js} +540 -578
- package/es/chunks/{bundle-mjs-BME7zF0Z.js → bundle-mjs-BBFHkixS.js} +1 -1
- package/es/chunks/{index.esm-AaUjBMaK.js → index.esm-Ds4t-z37.js} +90 -55
- package/es/chunks/{toArray-Czwb0MFW.js → toArray-DzhjhY0s.js} +44 -42
- package/es/fields/CascaderField.js +1 -1
- package/es/fields/Checkbox.js +1 -1
- package/es/fields/DatePicker.js +1 -1
- package/es/fields/DateRangePicker.js +1 -1
- package/es/fields/Input.js +1 -1
- package/es/fields/InputRangePicker.js +1 -1
- package/es/fields/PnkxField.js +1 -1
- package/es/fields/Select.js +1 -1
- package/es/fields/SliderRanger.js +1 -1
- package/es/fields/SliderSingle.js +1 -1
- package/es/fields/Switch.js +1 -1
- package/es/fields/Textarea.js +2 -2
- package/es/fields/TimePicker.js +1 -1
- package/es/fields/TimeRangePicker.js +1 -1
- package/es/fields/TinyMCE.js +16 -35
- package/es/index.js +2 -1
- package/es/ui/Button.js +1 -1
- package/es/ui/Cascader.js +1 -1
- package/es/ui/CategoryStatus.js +1 -1
- package/es/ui/Container.js +1 -1
- package/es/ui/Descriptions.js +1 -1
- package/es/ui/FloatButton.js +15 -0
- package/es/ui/GenericUploadModal.js +2 -2
- package/es/ui/Label.js +1 -1
- package/es/ui/Layout.js +28 -31
- package/es/ui/Modal.js +1 -1
- package/es/ui/SearchFilterForm.js +1 -1
- package/es/ui/SelectSingleTable.js +1 -1
- package/es/ui/SelectTable.js +1 -1
- package/es/ui/Sidebar/index.js +33 -15
- package/es/ui/UploadComponent.js +1 -1
- package/es/ui/UploadImage.js +1 -1
- package/es/ui/index.js +424 -514
- package/package.json +1 -1
- package/types/components/ui/FloatButton.d.ts +4 -0
- package/types/components/ui/index.d.ts +1 -0
- package/types/ui/FloatButton.d.ts +2 -0
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Modal, Spin } from 'antd';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { isValidElement, version as version$1, useRef, useLayoutEffect, useEffect, forwardRef, useImperativeHandle, Component, useContext, useMemo as useMemo$1, useState, Children } from 'react';
|
|
5
|
-
import { b as useMemo, i as isFragment$1, L as LocaleContext, l as localeValues, c as useLayoutUpdateEffect, d as Context, e as useLayoutEffect$1, _ as _toConsumableArray, t as toArray$2, u as unit, f as clearFix, h as textEllipsis, g as genStyleHooks, m as merge, r as resetComponent, j as defaultPrefixCls, k as genComponentStyleHook, w as warning$1, C as ConfigContext, n as useToken, S as SizeContext, p as devUseWarning, q as getAlphaColor, s as getLineHeight, v as genFocusStyle, x as resetIcon, y as genSubStyleComponent, a as useComponentConfig, D as DisabledContext, o as omit } from './toArray-
|
|
5
|
+
import { b as useMemo, i as isFragment$1, L as LocaleContext, l as localeValues, c as useLayoutUpdateEffect, d as Context, e as useLayoutEffect$1, _ as _toConsumableArray, t as toArray$2, u as unit, f as clearFix, h as textEllipsis, g as genStyleHooks, m as merge, r as resetComponent, j as defaultPrefixCls, k as genComponentStyleHook, w as warning$1, C as ConfigContext, n as useToken, S as SizeContext, p as devUseWarning, q as getAlphaColor, s as getLineHeight, v as genFocusStyle, x as resetIcon, y as genSubStyleComponent, a as useComponentConfig, D as DisabledContext, o as omit } from './toArray-DzhjhY0s.js';
|
|
6
6
|
import * as ReactDOM from 'react-dom';
|
|
7
7
|
import ReactDOM__default, { createPortal, flushSync } from 'react-dom';
|
|
8
8
|
import { c as classNames } from './index-BLRvgOFN.js';
|
|
@@ -12,7 +12,7 @@ import { _ as _typeof, b as _defineProperty } from './defineProperty-CTLrw71t.js
|
|
|
12
12
|
import { R as RefIcon$7 } from './LoadingOutlined-DCtDXz9K.js';
|
|
13
13
|
import { R as RefIcon$8, a as RefIcon$a } from './CloseCircleFilled-Bo29sDEQ.js';
|
|
14
14
|
import { R as RefIcon$9 } from './CloseOutlined-CZUJ_3tW.js';
|
|
15
|
-
import { C as Controller } from './index.esm-
|
|
15
|
+
import { C as Controller } from './index.esm-Ds4t-z37.js';
|
|
16
16
|
import { toast } from '@pnkx-lib/core';
|
|
17
17
|
import { R as RefIcon$b } from './InboxOutlined-BBuIJe6u.js';
|
|
18
18
|
|
|
@@ -4819,259 +4819,274 @@ var Tooltip$1 = function Tooltip(props, ref) {
|
|
|
4819
4819
|
};
|
|
4820
4820
|
const Tooltip$2 = /*#__PURE__*/forwardRef(Tooltip$1);
|
|
4821
4821
|
|
|
4822
|
-
function
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4822
|
+
function _regeneratorRuntime() {
|
|
4823
|
+
_regeneratorRuntime = function _regeneratorRuntime() {
|
|
4824
|
+
return r;
|
|
4825
|
+
};
|
|
4826
|
+
var t,
|
|
4827
|
+
r = {},
|
|
4828
|
+
e = Object.prototype,
|
|
4829
|
+
n = e.hasOwnProperty,
|
|
4830
|
+
o = "function" == typeof Symbol ? Symbol : {},
|
|
4831
|
+
i = o.iterator || "@@iterator",
|
|
4832
|
+
a = o.asyncIterator || "@@asyncIterator",
|
|
4833
|
+
u = o.toStringTag || "@@toStringTag";
|
|
4834
|
+
function c(t, r, e, n) {
|
|
4835
|
+
return Object.defineProperty(t, r, {
|
|
4836
|
+
value: e,
|
|
4837
|
+
enumerable: !n,
|
|
4838
|
+
configurable: !n,
|
|
4839
|
+
writable: !n
|
|
4840
|
+
});
|
|
4841
|
+
}
|
|
4828
4842
|
try {
|
|
4829
|
-
|
|
4830
|
-
} catch (
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
}
|
|
4849
|
-
|
|
4850
|
-
function _regenerator() {
|
|
4851
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
4852
|
-
var e,
|
|
4853
|
-
t,
|
|
4854
|
-
r = "function" == typeof Symbol ? Symbol : {},
|
|
4855
|
-
n = r.iterator || "@@iterator",
|
|
4856
|
-
o = r.toStringTag || "@@toStringTag";
|
|
4857
|
-
function i(r, n, o, i) {
|
|
4858
|
-
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
4859
|
-
u = Object.create(c.prototype);
|
|
4860
|
-
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
4861
|
-
var i,
|
|
4862
|
-
c,
|
|
4863
|
-
u,
|
|
4864
|
-
f = 0,
|
|
4865
|
-
p = o || [],
|
|
4866
|
-
y = false,
|
|
4867
|
-
G = {
|
|
4868
|
-
p: 0,
|
|
4869
|
-
n: 0,
|
|
4870
|
-
v: e,
|
|
4871
|
-
a: d,
|
|
4872
|
-
f: d.bind(e, 4),
|
|
4873
|
-
d: function d(t, r) {
|
|
4874
|
-
return i = t, c = 0, u = e, G.n = r, a;
|
|
4875
|
-
}
|
|
4876
|
-
};
|
|
4877
|
-
function d(r, n) {
|
|
4878
|
-
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
4879
|
-
var o,
|
|
4880
|
-
i = p[t],
|
|
4881
|
-
d = G.p,
|
|
4882
|
-
l = i[2];
|
|
4883
|
-
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
4843
|
+
c({}, "");
|
|
4844
|
+
} catch (t) {
|
|
4845
|
+
c = function c(t, r, e) {
|
|
4846
|
+
return t[r] = e;
|
|
4847
|
+
};
|
|
4848
|
+
}
|
|
4849
|
+
function h(r, e, n, o) {
|
|
4850
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
4851
|
+
a = Object.create(i.prototype);
|
|
4852
|
+
return c(a, "_invoke", function (r, e, n) {
|
|
4853
|
+
var o = 1;
|
|
4854
|
+
return function (i, a) {
|
|
4855
|
+
if (3 === o) throw Error("Generator is already running");
|
|
4856
|
+
if (4 === o) {
|
|
4857
|
+
if ("throw" === i) throw a;
|
|
4858
|
+
return {
|
|
4859
|
+
value: t,
|
|
4860
|
+
done: true
|
|
4861
|
+
};
|
|
4884
4862
|
}
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4863
|
+
for (n.method = i, n.arg = a;;) {
|
|
4864
|
+
var u = n.delegate;
|
|
4865
|
+
if (u) {
|
|
4866
|
+
var c = d(u, n);
|
|
4867
|
+
if (c) {
|
|
4868
|
+
if (c === f) continue;
|
|
4869
|
+
return c;
|
|
4870
|
+
}
|
|
4871
|
+
}
|
|
4872
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
4873
|
+
if (1 === o) throw o = 4, n.arg;
|
|
4874
|
+
n.dispatchException(n.arg);
|
|
4875
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
4876
|
+
o = 3;
|
|
4877
|
+
var h = s(r, e, n);
|
|
4878
|
+
if ("normal" === h.type) {
|
|
4879
|
+
if (o = n.done ? 4 : 2, h.arg === f) continue;
|
|
4880
|
+
return {
|
|
4881
|
+
value: h.arg,
|
|
4882
|
+
done: n.done
|
|
4883
|
+
};
|
|
4905
4884
|
}
|
|
4885
|
+
"throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg);
|
|
4906
4886
|
}
|
|
4907
|
-
return {
|
|
4908
|
-
value: t,
|
|
4909
|
-
done: y
|
|
4910
|
-
};
|
|
4911
4887
|
};
|
|
4912
|
-
}(r,
|
|
4888
|
+
}(r, n, new Context(o || [])), true), a;
|
|
4913
4889
|
}
|
|
4914
|
-
|
|
4915
|
-
function Generator() {}
|
|
4916
|
-
function GeneratorFunction() {}
|
|
4917
|
-
function GeneratorFunctionPrototype() {}
|
|
4918
|
-
t = Object.getPrototypeOf;
|
|
4919
|
-
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
4920
|
-
return this;
|
|
4921
|
-
}), t),
|
|
4922
|
-
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
4923
|
-
function f(e) {
|
|
4924
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
4925
|
-
}
|
|
4926
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
|
|
4927
|
-
return this;
|
|
4928
|
-
}), _regeneratorDefine(u, "toString", function () {
|
|
4929
|
-
return "[object Generator]";
|
|
4930
|
-
}), (_regenerator = function _regenerator() {
|
|
4931
|
-
return {
|
|
4932
|
-
w: i,
|
|
4933
|
-
m: f
|
|
4934
|
-
};
|
|
4935
|
-
})();
|
|
4936
|
-
}
|
|
4937
|
-
|
|
4938
|
-
function AsyncIterator(t, e) {
|
|
4939
|
-
function n(r, o, i, f) {
|
|
4890
|
+
function s(t, r, e) {
|
|
4940
4891
|
try {
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
}, function (t) {
|
|
4946
|
-
n("throw", t, i, f);
|
|
4947
|
-
}) : e.resolve(u).then(function (t) {
|
|
4948
|
-
c.value = t, i(c);
|
|
4949
|
-
}, function (t) {
|
|
4950
|
-
return n("throw", t, i, f);
|
|
4951
|
-
});
|
|
4892
|
+
return {
|
|
4893
|
+
type: "normal",
|
|
4894
|
+
arg: t.call(r, e)
|
|
4895
|
+
};
|
|
4952
4896
|
} catch (t) {
|
|
4953
|
-
|
|
4897
|
+
return {
|
|
4898
|
+
type: "throw",
|
|
4899
|
+
arg: t
|
|
4900
|
+
};
|
|
4954
4901
|
}
|
|
4955
4902
|
}
|
|
4956
|
-
|
|
4957
|
-
|
|
4903
|
+
r.wrap = h;
|
|
4904
|
+
var f = {};
|
|
4905
|
+
function Generator() {}
|
|
4906
|
+
function GeneratorFunction() {}
|
|
4907
|
+
function GeneratorFunctionPrototype() {}
|
|
4908
|
+
var l = {};
|
|
4909
|
+
c(l, i, function () {
|
|
4958
4910
|
return this;
|
|
4959
|
-
})
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4911
|
+
});
|
|
4912
|
+
var p = Object.getPrototypeOf,
|
|
4913
|
+
y = p && p(p(x([])));
|
|
4914
|
+
y && y !== e && n.call(y, i) && (l = y);
|
|
4915
|
+
var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l);
|
|
4916
|
+
function g(t) {
|
|
4917
|
+
["next", "throw", "return"].forEach(function (r) {
|
|
4918
|
+
c(t, r, function (t) {
|
|
4919
|
+
return this._invoke(r, t);
|
|
4963
4920
|
});
|
|
4921
|
+
});
|
|
4922
|
+
}
|
|
4923
|
+
function AsyncIterator(t, r) {
|
|
4924
|
+
function e(o, i, a, u) {
|
|
4925
|
+
var c = s(t[o], t, i);
|
|
4926
|
+
if ("throw" !== c.type) {
|
|
4927
|
+
var h = c.arg,
|
|
4928
|
+
f = h.value;
|
|
4929
|
+
return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) {
|
|
4930
|
+
e("next", t, a, u);
|
|
4931
|
+
}, function (t) {
|
|
4932
|
+
e("throw", t, a, u);
|
|
4933
|
+
}) : r.resolve(f).then(function (t) {
|
|
4934
|
+
h.value = t, a(h);
|
|
4935
|
+
}, function (t) {
|
|
4936
|
+
return e("throw", t, a, u);
|
|
4937
|
+
});
|
|
4938
|
+
}
|
|
4939
|
+
u(c.arg);
|
|
4964
4940
|
}
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
}
|
|
4972
|
-
|
|
4973
|
-
function _regeneratorAsync(n, e, r, t, o) {
|
|
4974
|
-
var a = _regeneratorAsyncGen(n, e, r, t, o);
|
|
4975
|
-
return a.next().then(function (n) {
|
|
4976
|
-
return n.done ? n.value : a.next();
|
|
4977
|
-
});
|
|
4978
|
-
}
|
|
4979
|
-
|
|
4980
|
-
function _regeneratorKeys(e) {
|
|
4981
|
-
var n = Object(e),
|
|
4982
|
-
r = [];
|
|
4983
|
-
for (var t in n) r.unshift(t);
|
|
4984
|
-
return function e() {
|
|
4985
|
-
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = false, e;
|
|
4986
|
-
return e.done = true, e;
|
|
4987
|
-
};
|
|
4988
|
-
}
|
|
4989
|
-
|
|
4990
|
-
function _regeneratorValues(e) {
|
|
4991
|
-
if (null != e) {
|
|
4992
|
-
var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"],
|
|
4993
|
-
r = 0;
|
|
4994
|
-
if (t) return t.call(e);
|
|
4995
|
-
if ("function" == typeof e.next) return e;
|
|
4996
|
-
if (!isNaN(e.length)) return {
|
|
4997
|
-
next: function next() {
|
|
4998
|
-
return e && r >= e.length && (e = void 0), {
|
|
4999
|
-
value: e && e[r++],
|
|
5000
|
-
done: !e
|
|
5001
|
-
};
|
|
4941
|
+
var o;
|
|
4942
|
+
c(this, "_invoke", function (t, n) {
|
|
4943
|
+
function i() {
|
|
4944
|
+
return new r(function (r, o) {
|
|
4945
|
+
e(t, n, r, o);
|
|
4946
|
+
});
|
|
5002
4947
|
}
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
e =
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
"
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
return e.resultName = o, t(n.d, _regeneratorValues(r), a);
|
|
5038
|
-
},
|
|
5039
|
-
finish: function finish(r) {
|
|
5040
|
-
return t(n.f, r);
|
|
5041
|
-
}
|
|
5042
|
-
}, t = function t(r, _t, o) {
|
|
5043
|
-
n.p = e.prev, n.n = e.next;
|
|
5044
|
-
try {
|
|
5045
|
-
return r(_t, o);
|
|
5046
|
-
} finally {
|
|
5047
|
-
e.next = n.n;
|
|
5048
|
-
}
|
|
5049
|
-
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
|
|
5050
|
-
try {
|
|
5051
|
-
return r.call(this, e);
|
|
5052
|
-
} finally {
|
|
5053
|
-
n.p = e.prev, n.n = e.next;
|
|
4948
|
+
return o = o ? o.then(i, i) : i();
|
|
4949
|
+
}, true);
|
|
4950
|
+
}
|
|
4951
|
+
function d(r, e) {
|
|
4952
|
+
var n = e.method,
|
|
4953
|
+
o = r.i[n];
|
|
4954
|
+
if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f;
|
|
4955
|
+
var i = s(o, r.i, e.arg);
|
|
4956
|
+
if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f;
|
|
4957
|
+
var a = i.arg;
|
|
4958
|
+
return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f);
|
|
4959
|
+
}
|
|
4960
|
+
function w(t) {
|
|
4961
|
+
this.tryEntries.push(t);
|
|
4962
|
+
}
|
|
4963
|
+
function m(r) {
|
|
4964
|
+
var e = r[4] || {};
|
|
4965
|
+
e.type = "normal", e.arg = t, r[4] = e;
|
|
4966
|
+
}
|
|
4967
|
+
function Context(t) {
|
|
4968
|
+
this.tryEntries = [[-1]], t.forEach(w, this), this.reset(true);
|
|
4969
|
+
}
|
|
4970
|
+
function x(r) {
|
|
4971
|
+
if (null != r) {
|
|
4972
|
+
var e = r[i];
|
|
4973
|
+
if (e) return e.call(r);
|
|
4974
|
+
if ("function" == typeof r.next) return r;
|
|
4975
|
+
if (!isNaN(r.length)) {
|
|
4976
|
+
var o = -1,
|
|
4977
|
+
a = function e() {
|
|
4978
|
+
for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = false, e;
|
|
4979
|
+
return e.value = t, e.done = true, e;
|
|
4980
|
+
};
|
|
4981
|
+
return a.next = a;
|
|
5054
4982
|
}
|
|
5055
|
-
}
|
|
4983
|
+
}
|
|
4984
|
+
throw new TypeError(_typeof(r) + " is not iterable");
|
|
5056
4985
|
}
|
|
5057
|
-
return (
|
|
4986
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) {
|
|
4987
|
+
var r = "function" == typeof t && t.constructor;
|
|
4988
|
+
return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name));
|
|
4989
|
+
}, r.mark = function (t) {
|
|
4990
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t;
|
|
4991
|
+
}, r.awrap = function (t) {
|
|
5058
4992
|
return {
|
|
5059
|
-
|
|
5060
|
-
return r.w(a(e), t, n, o && o.reverse());
|
|
5061
|
-
},
|
|
5062
|
-
isGeneratorFunction: n,
|
|
5063
|
-
mark: r.m,
|
|
5064
|
-
awrap: function awrap(r, e) {
|
|
5065
|
-
return new _OverloadYield(r, e);
|
|
5066
|
-
},
|
|
5067
|
-
AsyncIterator: AsyncIterator,
|
|
5068
|
-
async: function async(r, e, t, o, u) {
|
|
5069
|
-
return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u);
|
|
5070
|
-
},
|
|
5071
|
-
keys: _regeneratorKeys,
|
|
5072
|
-
values: _regeneratorValues
|
|
4993
|
+
__await: t
|
|
5073
4994
|
};
|
|
5074
|
-
})()
|
|
4995
|
+
}, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () {
|
|
4996
|
+
return this;
|
|
4997
|
+
}), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) {
|
|
4998
|
+
void 0 === i && (i = Promise);
|
|
4999
|
+
var a = new AsyncIterator(h(t, e, n, o), i);
|
|
5000
|
+
return r.isGeneratorFunction(e) ? a : a.next().then(function (t) {
|
|
5001
|
+
return t.done ? t.value : a.next();
|
|
5002
|
+
});
|
|
5003
|
+
}, g(v), c(v, u, "Generator"), c(v, i, function () {
|
|
5004
|
+
return this;
|
|
5005
|
+
}), c(v, "toString", function () {
|
|
5006
|
+
return "[object Generator]";
|
|
5007
|
+
}), r.keys = function (t) {
|
|
5008
|
+
var r = Object(t),
|
|
5009
|
+
e = [];
|
|
5010
|
+
for (var n in r) e.unshift(n);
|
|
5011
|
+
return function t() {
|
|
5012
|
+
for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = false, t;
|
|
5013
|
+
return t.done = true, t;
|
|
5014
|
+
};
|
|
5015
|
+
}, r.values = x, Context.prototype = {
|
|
5016
|
+
constructor: Context,
|
|
5017
|
+
reset: function reset(r) {
|
|
5018
|
+
if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t);
|
|
5019
|
+
},
|
|
5020
|
+
stop: function stop() {
|
|
5021
|
+
this.done = true;
|
|
5022
|
+
var t = this.tryEntries[0][4];
|
|
5023
|
+
if ("throw" === t.type) throw t.arg;
|
|
5024
|
+
return this.rval;
|
|
5025
|
+
},
|
|
5026
|
+
dispatchException: function dispatchException(r) {
|
|
5027
|
+
if (this.done) throw r;
|
|
5028
|
+
var e = this;
|
|
5029
|
+
function n(t) {
|
|
5030
|
+
a.type = "throw", a.arg = r, e.next = t;
|
|
5031
|
+
}
|
|
5032
|
+
for (var o = e.tryEntries.length - 1; o >= 0; --o) {
|
|
5033
|
+
var i = this.tryEntries[o],
|
|
5034
|
+
a = i[4],
|
|
5035
|
+
u = this.prev,
|
|
5036
|
+
c = i[1],
|
|
5037
|
+
h = i[2];
|
|
5038
|
+
if (-1 === i[0]) return n("end"), false;
|
|
5039
|
+
if (!c && !h) throw Error("try statement without catch or finally");
|
|
5040
|
+
if (null != i[0] && i[0] <= u) {
|
|
5041
|
+
if (u < c) return this.method = "next", this.arg = t, n(c), true;
|
|
5042
|
+
if (u < h) return n(h), false;
|
|
5043
|
+
}
|
|
5044
|
+
}
|
|
5045
|
+
},
|
|
5046
|
+
abrupt: function abrupt(t, r) {
|
|
5047
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
5048
|
+
var n = this.tryEntries[e];
|
|
5049
|
+
if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) {
|
|
5050
|
+
var o = n;
|
|
5051
|
+
break;
|
|
5052
|
+
}
|
|
5053
|
+
}
|
|
5054
|
+
o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null);
|
|
5055
|
+
var i = o ? o[4] : {};
|
|
5056
|
+
return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i);
|
|
5057
|
+
},
|
|
5058
|
+
complete: function complete(t, r) {
|
|
5059
|
+
if ("throw" === t.type) throw t.arg;
|
|
5060
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f;
|
|
5061
|
+
},
|
|
5062
|
+
finish: function finish(t) {
|
|
5063
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
5064
|
+
var e = this.tryEntries[r];
|
|
5065
|
+
if (e[2] === t) return this.complete(e[4], e[3]), m(e), f;
|
|
5066
|
+
}
|
|
5067
|
+
},
|
|
5068
|
+
"catch": function _catch(t) {
|
|
5069
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
5070
|
+
var e = this.tryEntries[r];
|
|
5071
|
+
if (e[0] === t) {
|
|
5072
|
+
var n = e[4];
|
|
5073
|
+
if ("throw" === n.type) {
|
|
5074
|
+
var o = n.arg;
|
|
5075
|
+
m(e);
|
|
5076
|
+
}
|
|
5077
|
+
return o;
|
|
5078
|
+
}
|
|
5079
|
+
}
|
|
5080
|
+
throw Error("illegal catch attempt");
|
|
5081
|
+
},
|
|
5082
|
+
delegateYield: function delegateYield(r, e, n) {
|
|
5083
|
+
return this.delegate = {
|
|
5084
|
+
i: x(r),
|
|
5085
|
+
r: e,
|
|
5086
|
+
n: n
|
|
5087
|
+
}, "next" === this.method && (this.arg = t), f;
|
|
5088
|
+
}
|
|
5089
|
+
}, r;
|
|
5075
5090
|
}
|
|
5076
5091
|
|
|
5077
5092
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
@@ -5566,26 +5581,26 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5566
5581
|
_this.onClick(e);
|
|
5567
5582
|
}
|
|
5568
5583
|
});
|
|
5569
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
5570
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(
|
|
5571
|
-
var
|
|
5584
|
+
_defineProperty(_assertThisInitialized(_this), "onFileDrop", /*#__PURE__*/function () {
|
|
5585
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
5586
|
+
var multiple, files, _files;
|
|
5572
5587
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5573
5588
|
while (1) switch (_context.prev = _context.next) {
|
|
5574
5589
|
case 0:
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
})) {
|
|
5581
|
-
existFileCallback === null || existFileCallback === void 0 || existFileCallback();
|
|
5590
|
+
multiple = _this.props.multiple;
|
|
5591
|
+
e.preventDefault();
|
|
5592
|
+
if (!(e.type === 'dragover')) {
|
|
5593
|
+
_context.next = 4;
|
|
5594
|
+
break;
|
|
5582
5595
|
}
|
|
5583
|
-
|
|
5596
|
+
return _context.abrupt("return");
|
|
5597
|
+
case 4:
|
|
5598
|
+
if (!_this.props.directory) {
|
|
5584
5599
|
_context.next = 11;
|
|
5585
5600
|
break;
|
|
5586
5601
|
}
|
|
5587
5602
|
_context.next = 7;
|
|
5588
|
-
return traverseFileTree(Array.prototype.slice.call(items), function (_file) {
|
|
5603
|
+
return traverseFileTree(Array.prototype.slice.call(e.dataTransfer.items), function (_file) {
|
|
5589
5604
|
return attrAccept(_file, _this.props.accept);
|
|
5590
5605
|
});
|
|
5591
5606
|
case 7:
|
|
@@ -5594,80 +5609,23 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5594
5609
|
_context.next = 14;
|
|
5595
5610
|
break;
|
|
5596
5611
|
case 11:
|
|
5597
|
-
|
|
5598
|
-
return attrAccept(file, accept);
|
|
5612
|
+
_files = _toConsumableArray(e.dataTransfer.files).filter(function (file) {
|
|
5613
|
+
return attrAccept(file, _this.props.accept);
|
|
5599
5614
|
});
|
|
5600
5615
|
if (multiple === false) {
|
|
5601
|
-
|
|
5616
|
+
_files = _files.slice(0, 1);
|
|
5602
5617
|
}
|
|
5603
|
-
_this.uploadFiles(
|
|
5618
|
+
_this.uploadFiles(_files);
|
|
5604
5619
|
case 14:
|
|
5605
5620
|
case "end":
|
|
5606
5621
|
return _context.stop();
|
|
5607
5622
|
}
|
|
5608
5623
|
}, _callee);
|
|
5609
5624
|
}));
|
|
5610
|
-
return function (_x
|
|
5625
|
+
return function (_x) {
|
|
5611
5626
|
return _ref.apply(this, arguments);
|
|
5612
5627
|
};
|
|
5613
5628
|
}());
|
|
5614
|
-
_defineProperty(_assertThisInitialized(_this), "onFilePaste", /*#__PURE__*/function () {
|
|
5615
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
|
|
5616
|
-
var pastable, clipboardData;
|
|
5617
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
5618
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
5619
|
-
case 0:
|
|
5620
|
-
pastable = _this.props.pastable;
|
|
5621
|
-
if (pastable) {
|
|
5622
|
-
_context2.next = 3;
|
|
5623
|
-
break;
|
|
5624
|
-
}
|
|
5625
|
-
return _context2.abrupt("return");
|
|
5626
|
-
case 3:
|
|
5627
|
-
if (!(e.type === 'paste')) {
|
|
5628
|
-
_context2.next = 6;
|
|
5629
|
-
break;
|
|
5630
|
-
}
|
|
5631
|
-
clipboardData = e.clipboardData;
|
|
5632
|
-
return _context2.abrupt("return", _this.onDataTransferFiles(clipboardData, function () {
|
|
5633
|
-
e.preventDefault();
|
|
5634
|
-
}));
|
|
5635
|
-
case 6:
|
|
5636
|
-
case "end":
|
|
5637
|
-
return _context2.stop();
|
|
5638
|
-
}
|
|
5639
|
-
}, _callee2);
|
|
5640
|
-
}));
|
|
5641
|
-
return function (_x3) {
|
|
5642
|
-
return _ref2.apply(this, arguments);
|
|
5643
|
-
};
|
|
5644
|
-
}());
|
|
5645
|
-
_defineProperty(_assertThisInitialized(_this), "onFileDragOver", function (e) {
|
|
5646
|
-
e.preventDefault();
|
|
5647
|
-
});
|
|
5648
|
-
_defineProperty(_assertThisInitialized(_this), "onFileDrop", /*#__PURE__*/function () {
|
|
5649
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
|
|
5650
|
-
var dataTransfer;
|
|
5651
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
5652
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
5653
|
-
case 0:
|
|
5654
|
-
e.preventDefault();
|
|
5655
|
-
if (!(e.type === 'drop')) {
|
|
5656
|
-
_context3.next = 4;
|
|
5657
|
-
break;
|
|
5658
|
-
}
|
|
5659
|
-
dataTransfer = e.dataTransfer;
|
|
5660
|
-
return _context3.abrupt("return", _this.onDataTransferFiles(dataTransfer));
|
|
5661
|
-
case 4:
|
|
5662
|
-
case "end":
|
|
5663
|
-
return _context3.stop();
|
|
5664
|
-
}
|
|
5665
|
-
}, _callee3);
|
|
5666
|
-
}));
|
|
5667
|
-
return function (_x4) {
|
|
5668
|
-
return _ref3.apply(this, arguments);
|
|
5669
|
-
};
|
|
5670
|
-
}());
|
|
5671
5629
|
_defineProperty(_assertThisInitialized(_this), "uploadFiles", function (files) {
|
|
5672
5630
|
var originFiles = _toConsumableArray(files);
|
|
5673
5631
|
var postFiles = originFiles.map(function (file) {
|
|
@@ -5679,9 +5637,9 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5679
5637
|
// Batch upload files
|
|
5680
5638
|
Promise.all(postFiles).then(function (fileList) {
|
|
5681
5639
|
var onBatchStart = _this.props.onBatchStart;
|
|
5682
|
-
onBatchStart === null || onBatchStart === void 0 || onBatchStart(fileList.map(function (
|
|
5683
|
-
var origin =
|
|
5684
|
-
parsedFile =
|
|
5640
|
+
onBatchStart === null || onBatchStart === void 0 || onBatchStart(fileList.map(function (_ref2) {
|
|
5641
|
+
var origin = _ref2.origin,
|
|
5642
|
+
parsedFile = _ref2.parsedFile;
|
|
5685
5643
|
return {
|
|
5686
5644
|
file: origin,
|
|
5687
5645
|
parsedFile: parsedFile
|
|
@@ -5698,35 +5656,35 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5698
5656
|
* Process file before upload. When all the file is ready, we start upload.
|
|
5699
5657
|
*/
|
|
5700
5658
|
_defineProperty(_assertThisInitialized(_this), "processFile", /*#__PURE__*/function () {
|
|
5701
|
-
var
|
|
5659
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file, fileList) {
|
|
5702
5660
|
var beforeUpload, transformedFile, action, mergedAction, data, mergedData, parsedData, parsedFile, mergedParsedFile;
|
|
5703
|
-
return _regeneratorRuntime().wrap(function
|
|
5704
|
-
while (1) switch (
|
|
5661
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
5662
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
5705
5663
|
case 0:
|
|
5706
5664
|
beforeUpload = _this.props.beforeUpload;
|
|
5707
5665
|
transformedFile = file;
|
|
5708
5666
|
if (!beforeUpload) {
|
|
5709
|
-
|
|
5667
|
+
_context2.next = 14;
|
|
5710
5668
|
break;
|
|
5711
5669
|
}
|
|
5712
|
-
|
|
5713
|
-
|
|
5670
|
+
_context2.prev = 3;
|
|
5671
|
+
_context2.next = 6;
|
|
5714
5672
|
return beforeUpload(file, fileList);
|
|
5715
5673
|
case 6:
|
|
5716
|
-
transformedFile =
|
|
5717
|
-
|
|
5674
|
+
transformedFile = _context2.sent;
|
|
5675
|
+
_context2.next = 12;
|
|
5718
5676
|
break;
|
|
5719
5677
|
case 9:
|
|
5720
|
-
|
|
5721
|
-
|
|
5678
|
+
_context2.prev = 9;
|
|
5679
|
+
_context2.t0 = _context2["catch"](3);
|
|
5722
5680
|
// Rejection will also trade as false
|
|
5723
5681
|
transformedFile = false;
|
|
5724
5682
|
case 12:
|
|
5725
5683
|
if (!(transformedFile === false)) {
|
|
5726
|
-
|
|
5684
|
+
_context2.next = 14;
|
|
5727
5685
|
break;
|
|
5728
5686
|
}
|
|
5729
|
-
return
|
|
5687
|
+
return _context2.abrupt("return", {
|
|
5730
5688
|
origin: file,
|
|
5731
5689
|
parsedFile: null,
|
|
5732
5690
|
action: null,
|
|
@@ -5736,14 +5694,14 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5736
5694
|
// Get latest action
|
|
5737
5695
|
action = _this.props.action;
|
|
5738
5696
|
if (!(typeof action === 'function')) {
|
|
5739
|
-
|
|
5697
|
+
_context2.next = 21;
|
|
5740
5698
|
break;
|
|
5741
5699
|
}
|
|
5742
|
-
|
|
5700
|
+
_context2.next = 18;
|
|
5743
5701
|
return action(file);
|
|
5744
5702
|
case 18:
|
|
5745
|
-
mergedAction =
|
|
5746
|
-
|
|
5703
|
+
mergedAction = _context2.sent;
|
|
5704
|
+
_context2.next = 22;
|
|
5747
5705
|
break;
|
|
5748
5706
|
case 21:
|
|
5749
5707
|
mergedAction = action;
|
|
@@ -5751,14 +5709,14 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5751
5709
|
// Get latest data
|
|
5752
5710
|
data = _this.props.data;
|
|
5753
5711
|
if (!(typeof data === 'function')) {
|
|
5754
|
-
|
|
5712
|
+
_context2.next = 29;
|
|
5755
5713
|
break;
|
|
5756
5714
|
}
|
|
5757
|
-
|
|
5715
|
+
_context2.next = 26;
|
|
5758
5716
|
return data(file);
|
|
5759
5717
|
case 26:
|
|
5760
|
-
mergedData =
|
|
5761
|
-
|
|
5718
|
+
mergedData = _context2.sent;
|
|
5719
|
+
_context2.next = 30;
|
|
5762
5720
|
break;
|
|
5763
5721
|
case 29:
|
|
5764
5722
|
mergedData = data;
|
|
@@ -5776,7 +5734,7 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5776
5734
|
}
|
|
5777
5735
|
mergedParsedFile = parsedFile;
|
|
5778
5736
|
mergedParsedFile.uid = file.uid;
|
|
5779
|
-
return
|
|
5737
|
+
return _context2.abrupt("return", {
|
|
5780
5738
|
origin: file,
|
|
5781
5739
|
data: mergedData,
|
|
5782
5740
|
parsedFile: mergedParsedFile,
|
|
@@ -5784,12 +5742,12 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5784
5742
|
});
|
|
5785
5743
|
case 35:
|
|
5786
5744
|
case "end":
|
|
5787
|
-
return
|
|
5745
|
+
return _context2.stop();
|
|
5788
5746
|
}
|
|
5789
|
-
},
|
|
5747
|
+
}, _callee2, null, [[3, 9]]);
|
|
5790
5748
|
}));
|
|
5791
|
-
return function (
|
|
5792
|
-
return
|
|
5749
|
+
return function (_x2, _x3) {
|
|
5750
|
+
return _ref3.apply(this, arguments);
|
|
5793
5751
|
};
|
|
5794
5752
|
}());
|
|
5795
5753
|
_defineProperty(_assertThisInitialized(_this), "saveFileInput", function (node) {
|
|
@@ -5801,46 +5759,31 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5801
5759
|
key: "componentDidMount",
|
|
5802
5760
|
value: function componentDidMount() {
|
|
5803
5761
|
this._isMounted = true;
|
|
5804
|
-
var pastable = this.props.pastable;
|
|
5805
|
-
if (pastable) {
|
|
5806
|
-
document.addEventListener('paste', this.onFilePaste);
|
|
5807
|
-
}
|
|
5808
5762
|
}
|
|
5809
5763
|
}, {
|
|
5810
5764
|
key: "componentWillUnmount",
|
|
5811
5765
|
value: function componentWillUnmount() {
|
|
5812
5766
|
this._isMounted = false;
|
|
5813
5767
|
this.abort();
|
|
5814
|
-
document.removeEventListener('paste', this.onFilePaste);
|
|
5815
|
-
}
|
|
5816
|
-
}, {
|
|
5817
|
-
key: "componentDidUpdate",
|
|
5818
|
-
value: function componentDidUpdate(prevProps) {
|
|
5819
|
-
var pastable = this.props.pastable;
|
|
5820
|
-
if (pastable && !prevProps.pastable) {
|
|
5821
|
-
document.addEventListener('paste', this.onFilePaste);
|
|
5822
|
-
} else if (!pastable && prevProps.pastable) {
|
|
5823
|
-
document.removeEventListener('paste', this.onFilePaste);
|
|
5824
|
-
}
|
|
5825
5768
|
}
|
|
5826
5769
|
}, {
|
|
5827
5770
|
key: "post",
|
|
5828
|
-
value: function post(
|
|
5771
|
+
value: function post(_ref4) {
|
|
5829
5772
|
var _this2 = this;
|
|
5830
|
-
var data =
|
|
5831
|
-
origin =
|
|
5832
|
-
action =
|
|
5833
|
-
parsedFile =
|
|
5773
|
+
var data = _ref4.data,
|
|
5774
|
+
origin = _ref4.origin,
|
|
5775
|
+
action = _ref4.action,
|
|
5776
|
+
parsedFile = _ref4.parsedFile;
|
|
5834
5777
|
if (!this._isMounted) {
|
|
5835
5778
|
return;
|
|
5836
5779
|
}
|
|
5837
|
-
var _this$
|
|
5838
|
-
onStart = _this$
|
|
5839
|
-
customRequest = _this$
|
|
5840
|
-
name = _this$
|
|
5841
|
-
headers = _this$
|
|
5842
|
-
withCredentials = _this$
|
|
5843
|
-
method = _this$
|
|
5780
|
+
var _this$props2 = this.props,
|
|
5781
|
+
onStart = _this$props2.onStart,
|
|
5782
|
+
customRequest = _this$props2.customRequest,
|
|
5783
|
+
name = _this$props2.name,
|
|
5784
|
+
headers = _this$props2.headers,
|
|
5785
|
+
withCredentials = _this$props2.withCredentials,
|
|
5786
|
+
method = _this$props2.method;
|
|
5844
5787
|
var uid = origin.uid;
|
|
5845
5788
|
var request = customRequest || upload;
|
|
5846
5789
|
var requestOption = {
|
|
@@ -5898,28 +5841,28 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5898
5841
|
}, {
|
|
5899
5842
|
key: "render",
|
|
5900
5843
|
value: function render() {
|
|
5901
|
-
var _this$
|
|
5902
|
-
Tag = _this$
|
|
5903
|
-
prefixCls = _this$
|
|
5904
|
-
className = _this$
|
|
5905
|
-
_this$
|
|
5906
|
-
classNames$1 = _this$
|
|
5907
|
-
disabled = _this$
|
|
5908
|
-
id = _this$
|
|
5909
|
-
name = _this$
|
|
5910
|
-
style = _this$
|
|
5911
|
-
_this$
|
|
5912
|
-
styles = _this$
|
|
5913
|
-
multiple = _this$
|
|
5914
|
-
accept = _this$
|
|
5915
|
-
capture = _this$
|
|
5916
|
-
children = _this$
|
|
5917
|
-
directory = _this$
|
|
5918
|
-
openFileDialogOnClick = _this$
|
|
5919
|
-
onMouseEnter = _this$
|
|
5920
|
-
onMouseLeave = _this$
|
|
5921
|
-
hasControlInside = _this$
|
|
5922
|
-
otherProps = _objectWithoutProperties(_this$
|
|
5844
|
+
var _this$props3 = this.props,
|
|
5845
|
+
Tag = _this$props3.component,
|
|
5846
|
+
prefixCls = _this$props3.prefixCls,
|
|
5847
|
+
className = _this$props3.className,
|
|
5848
|
+
_this$props3$classNam = _this$props3.classNames,
|
|
5849
|
+
classNames$1 = _this$props3$classNam === void 0 ? {} : _this$props3$classNam,
|
|
5850
|
+
disabled = _this$props3.disabled,
|
|
5851
|
+
id = _this$props3.id,
|
|
5852
|
+
name = _this$props3.name,
|
|
5853
|
+
style = _this$props3.style,
|
|
5854
|
+
_this$props3$styles = _this$props3.styles,
|
|
5855
|
+
styles = _this$props3$styles === void 0 ? {} : _this$props3$styles,
|
|
5856
|
+
multiple = _this$props3.multiple,
|
|
5857
|
+
accept = _this$props3.accept,
|
|
5858
|
+
capture = _this$props3.capture,
|
|
5859
|
+
children = _this$props3.children,
|
|
5860
|
+
directory = _this$props3.directory,
|
|
5861
|
+
openFileDialogOnClick = _this$props3.openFileDialogOnClick,
|
|
5862
|
+
onMouseEnter = _this$props3.onMouseEnter,
|
|
5863
|
+
onMouseLeave = _this$props3.onMouseLeave,
|
|
5864
|
+
hasControlInside = _this$props3.hasControlInside,
|
|
5865
|
+
otherProps = _objectWithoutProperties(_this$props3, _excluded$1);
|
|
5923
5866
|
var cls = classNames(_defineProperty(_defineProperty(_defineProperty({}, prefixCls, true), "".concat(prefixCls, "-disabled"), disabled), className, className));
|
|
5924
5867
|
// because input don't have directory/webkitdirectory type declaration
|
|
5925
5868
|
var dirProps = directory ? {
|
|
@@ -5932,7 +5875,7 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
|
|
|
5932
5875
|
onMouseEnter: onMouseEnter,
|
|
5933
5876
|
onMouseLeave: onMouseLeave,
|
|
5934
5877
|
onDrop: this.onFileDrop,
|
|
5935
|
-
onDragOver: this.
|
|
5878
|
+
onDragOver: this.onFileDrop,
|
|
5936
5879
|
tabIndex: hasControlInside ? undefined : '0'
|
|
5937
5880
|
};
|
|
5938
5881
|
return /*#__PURE__*/React__default.createElement(Tag, _extends({}, events, {
|
|
@@ -6050,7 +5993,8 @@ const initMotionCommonLeave = duration => ({
|
|
|
6050
5993
|
animationDuration: duration,
|
|
6051
5994
|
animationFillMode: 'both'
|
|
6052
5995
|
});
|
|
6053
|
-
const initMotion = (motionCls, inKeyframes, outKeyframes, duration
|
|
5996
|
+
const initMotion = function (motionCls, inKeyframes, outKeyframes, duration) {
|
|
5997
|
+
let sameLevel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6054
5998
|
const sameLevelPrefix = sameLevel ? '&' : '';
|
|
6055
5999
|
return {
|
|
6056
6000
|
[`
|
|
@@ -6093,7 +6037,8 @@ const fadeOut = new Keyframe('antFadeOut', {
|
|
|
6093
6037
|
opacity: 0
|
|
6094
6038
|
}
|
|
6095
6039
|
});
|
|
6096
|
-
const initFadeMotion = (token
|
|
6040
|
+
const initFadeMotion = function (token) {
|
|
6041
|
+
let sameLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
6097
6042
|
const {
|
|
6098
6043
|
antCls
|
|
6099
6044
|
} = token;
|
|
@@ -6416,7 +6361,7 @@ const genListStyle = token => {
|
|
|
6416
6361
|
}
|
|
6417
6362
|
},
|
|
6418
6363
|
[`${componentCls}-icon ${iconCls}`]: {
|
|
6419
|
-
color: token.
|
|
6364
|
+
color: token.colorTextDescription,
|
|
6420
6365
|
fontSize
|
|
6421
6366
|
},
|
|
6422
6367
|
[`${itemCls}-progress`]: {
|
|
@@ -6775,7 +6720,7 @@ const genBaseStyle$1 = token => {
|
|
|
6775
6720
|
};
|
|
6776
6721
|
};
|
|
6777
6722
|
const prepareComponentToken$3 = token => ({
|
|
6778
|
-
actionsColor: token.
|
|
6723
|
+
actionsColor: token.colorTextDescription
|
|
6779
6724
|
});
|
|
6780
6725
|
// ============================== Export ==============================
|
|
6781
6726
|
const useStyle$4 = genStyleHooks('Upload', token => {
|
|
@@ -6817,19 +6762,22 @@ const getCurrentHeight = node => ({
|
|
|
6817
6762
|
height: node ? node.offsetHeight : 0
|
|
6818
6763
|
});
|
|
6819
6764
|
const skipOpacityTransition = (_, event) => (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
|
|
6820
|
-
const initCollapseMotion = (
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6765
|
+
const initCollapseMotion = function () {
|
|
6766
|
+
let rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultPrefixCls;
|
|
6767
|
+
return {
|
|
6768
|
+
motionName: `${rootCls}-motion-collapse`,
|
|
6769
|
+
onAppearStart: getCollapsedHeight,
|
|
6770
|
+
onEnterStart: getCollapsedHeight,
|
|
6771
|
+
onAppearActive: getRealHeight,
|
|
6772
|
+
onEnterActive: getRealHeight,
|
|
6773
|
+
onLeaveStart: getCurrentHeight,
|
|
6774
|
+
onLeaveActive: getCollapsedHeight,
|
|
6775
|
+
onAppearEnd: skipOpacityTransition,
|
|
6776
|
+
onEnterEnd: skipOpacityTransition,
|
|
6777
|
+
onLeaveEnd: skipOpacityTransition,
|
|
6778
|
+
motionDeadline: 500
|
|
6779
|
+
};
|
|
6780
|
+
};
|
|
6833
6781
|
const getTransitionName = (rootPrefixCls, motion, transitionName) => {
|
|
6834
6782
|
if (transitionName !== undefined) {
|
|
6835
6783
|
return transitionName;
|
|
@@ -6987,12 +6935,7 @@ const defaultReactRender = (node, container) => {
|
|
|
6987
6935
|
};
|
|
6988
6936
|
};
|
|
6989
6937
|
let unstableRender = defaultReactRender;
|
|
6990
|
-
|
|
6991
|
-
* @deprecated Set React render function for compatible usage.
|
|
6992
|
-
* This is internal usage only compatible with React 19.
|
|
6993
|
-
* And will be removed in next major version.
|
|
6994
|
-
*/
|
|
6995
|
-
function unstableSetRender(render) {
|
|
6938
|
+
function getReactRender() {
|
|
6996
6939
|
return unstableRender;
|
|
6997
6940
|
}
|
|
6998
6941
|
|
|
@@ -7115,15 +7058,18 @@ const WaveEffect = props => {
|
|
|
7115
7058
|
}
|
|
7116
7059
|
return false;
|
|
7117
7060
|
}
|
|
7118
|
-
}, ({
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7061
|
+
}, (_ref, ref) => {
|
|
7062
|
+
let {
|
|
7063
|
+
className: motionClassName
|
|
7064
|
+
} = _ref;
|
|
7065
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7066
|
+
ref: composeRef(divRef, ref),
|
|
7067
|
+
className: classNames(className, motionClassName, {
|
|
7068
|
+
'wave-quick': isSmallComponent
|
|
7069
|
+
}),
|
|
7070
|
+
style: waveStyle
|
|
7071
|
+
});
|
|
7072
|
+
});
|
|
7127
7073
|
};
|
|
7128
7074
|
const showWaveEffect = (target, info) => {
|
|
7129
7075
|
var _a;
|
|
@@ -7140,7 +7086,7 @@ const showWaveEffect = (target, info) => {
|
|
|
7140
7086
|
holder.style.left = '0px';
|
|
7141
7087
|
holder.style.top = '0px';
|
|
7142
7088
|
target === null || target === void 0 ? void 0 : target.insertBefore(holder, target === null || target === void 0 ? void 0 : target.firstChild);
|
|
7143
|
-
const reactRender =
|
|
7089
|
+
const reactRender = getReactRender();
|
|
7144
7090
|
let unmountCallback = null;
|
|
7145
7091
|
function registerUnmount() {
|
|
7146
7092
|
return unmountCallback;
|
|
@@ -7452,10 +7398,11 @@ const DefaultLoadingIcon = props => {
|
|
|
7452
7398
|
onEnterActive: getRealWidth,
|
|
7453
7399
|
onLeaveStart: getRealWidth,
|
|
7454
7400
|
onLeaveActive: getCollapsedWidth
|
|
7455
|
-
}, ({
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7401
|
+
}, (_ref, ref) => {
|
|
7402
|
+
let {
|
|
7403
|
+
className: motionCls,
|
|
7404
|
+
style: motionStyle
|
|
7405
|
+
} = _ref;
|
|
7459
7406
|
const mergedStyle = Object.assign(Object.assign({}, style), motionStyle);
|
|
7460
7407
|
return /*#__PURE__*/React__default.createElement(InnerLoadingIcon, {
|
|
7461
7408
|
prefixCls: prefixCls,
|
|
@@ -7551,13 +7498,16 @@ let AggregationColor = /*#__PURE__*/function () {
|
|
|
7551
7498
|
}
|
|
7552
7499
|
const isArray = Array.isArray(color);
|
|
7553
7500
|
if (isArray && color.length) {
|
|
7554
|
-
this.colors = color.map(
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7501
|
+
this.colors = color.map(_ref => {
|
|
7502
|
+
let {
|
|
7503
|
+
color: c,
|
|
7504
|
+
percent
|
|
7505
|
+
} = _ref;
|
|
7506
|
+
return {
|
|
7507
|
+
color: new AggregationColor(c),
|
|
7508
|
+
percent
|
|
7509
|
+
};
|
|
7510
|
+
});
|
|
7561
7511
|
this.metaColor = new Color(this.colors[0].color.metaColor);
|
|
7562
7512
|
} else {
|
|
7563
7513
|
this.metaColor = new Color(isArray ? '' : color);
|
|
@@ -8096,7 +8046,8 @@ const genCompatibleButtonStyle = token => Object.assign(Object.assign(Object.ass
|
|
|
8096
8046
|
color: token.colorLinkActive
|
|
8097
8047
|
}));
|
|
8098
8048
|
// =============================== Size ===============================
|
|
8099
|
-
const genButtonStyle = (token
|
|
8049
|
+
const genButtonStyle = function (token) {
|
|
8050
|
+
let prefixCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
8100
8051
|
const {
|
|
8101
8052
|
componentCls,
|
|
8102
8053
|
controlHeight,
|
|
@@ -8246,9 +8197,10 @@ function compactItemBorderRadius(prefixCls, parentCls, options) {
|
|
|
8246
8197
|
}
|
|
8247
8198
|
};
|
|
8248
8199
|
}
|
|
8249
|
-
function genCompactItemStyle(token
|
|
8250
|
-
|
|
8251
|
-
|
|
8200
|
+
function genCompactItemStyle(token) {
|
|
8201
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
8202
|
+
focus: true
|
|
8203
|
+
};
|
|
8252
8204
|
const {
|
|
8253
8205
|
componentCls
|
|
8254
8206
|
} = token;
|
|
@@ -8394,29 +8346,16 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
8394
8346
|
// https://github.com/ant-design/ant-design/issues/47605
|
|
8395
8347
|
// Compatible with original `type` behavior
|
|
8396
8348
|
const mergedType = type || 'default';
|
|
8397
|
-
const {
|
|
8398
|
-
button
|
|
8399
|
-
} = React__default.useContext(ConfigContext);
|
|
8400
8349
|
const [mergedColor, mergedVariant] = useMemo$1(() => {
|
|
8401
|
-
// >>>>> Local
|
|
8402
|
-
// Color & Variant
|
|
8403
8350
|
if (color && variant) {
|
|
8404
8351
|
return [color, variant];
|
|
8405
8352
|
}
|
|
8406
|
-
|
|
8407
|
-
if (
|
|
8408
|
-
|
|
8409
|
-
if (danger) {
|
|
8410
|
-
return ['danger', colorVariantPair[1]];
|
|
8411
|
-
}
|
|
8412
|
-
return colorVariantPair;
|
|
8413
|
-
}
|
|
8414
|
-
// >>> Context fallback
|
|
8415
|
-
if ((button === null || button === void 0 ? void 0 : button.color) && (button === null || button === void 0 ? void 0 : button.variant)) {
|
|
8416
|
-
return [button.color, button.variant];
|
|
8353
|
+
const colorVariantPair = ButtonTypeMap[mergedType] || [];
|
|
8354
|
+
if (danger) {
|
|
8355
|
+
return ['danger', colorVariantPair[1]];
|
|
8417
8356
|
}
|
|
8418
|
-
return
|
|
8419
|
-
}, [type, color, variant, danger
|
|
8357
|
+
return colorVariantPair;
|
|
8358
|
+
}, [type, color, variant, danger]);
|
|
8420
8359
|
const isDanger = mergedColor === 'danger';
|
|
8421
8360
|
const mergedColorText = isDanger ? 'dangerous' : mergedColor;
|
|
8422
8361
|
const {
|
|
@@ -8451,9 +8390,8 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
8451
8390
|
};
|
|
8452
8391
|
}, []);
|
|
8453
8392
|
// ========================= Effect =========================
|
|
8454
|
-
// Loading
|
|
8455
|
-
|
|
8456
|
-
useLayoutEffect(() => {
|
|
8393
|
+
// Loading
|
|
8394
|
+
useEffect(() => {
|
|
8457
8395
|
let delayTimer = null;
|
|
8458
8396
|
if (loadingOrDelay.delay > 0) {
|
|
8459
8397
|
delayTimer = setTimeout(() => {
|
|
@@ -8470,7 +8408,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
8470
8408
|
}
|
|
8471
8409
|
}
|
|
8472
8410
|
return cleanupTimer;
|
|
8473
|
-
}, [loadingOrDelay
|
|
8411
|
+
}, [loadingOrDelay]);
|
|
8474
8412
|
// Two chinese characters check
|
|
8475
8413
|
useEffect(() => {
|
|
8476
8414
|
// FIXME: for HOC usage like <FormatMessage />
|
|
@@ -8528,7 +8466,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
8528
8466
|
// ========================= Render =========================
|
|
8529
8467
|
const classes = classNames(prefixCls, hashId, cssVarCls, {
|
|
8530
8468
|
[`${prefixCls}-${shape}`]: shape !== 'default' && shape,
|
|
8531
|
-
// Compatible with versions earlier than 5.21.0
|
|
8469
|
+
// line(253 - 254): Compatible with versions earlier than 5.21.0
|
|
8532
8470
|
[`${prefixCls}-${mergedType}`]: mergedType,
|
|
8533
8471
|
[`${prefixCls}-dangerous`]: danger,
|
|
8534
8472
|
[`${prefixCls}-color-${mergedColorText}`]: mergedColorText,
|
|
@@ -8612,9 +8550,12 @@ function file2Obj(file) {
|
|
|
8612
8550
|
/** Upload fileList. Replace file if exist or just push into it. */
|
|
8613
8551
|
function updateFileList(file, fileList) {
|
|
8614
8552
|
const nextFileList = _toConsumableArray(fileList);
|
|
8615
|
-
const fileIndex = nextFileList.findIndex(
|
|
8616
|
-
|
|
8617
|
-
|
|
8553
|
+
const fileIndex = nextFileList.findIndex(_ref => {
|
|
8554
|
+
let {
|
|
8555
|
+
uid
|
|
8556
|
+
} = _ref;
|
|
8557
|
+
return uid === file.uid;
|
|
8558
|
+
});
|
|
8618
8559
|
if (fileIndex === -1) {
|
|
8619
8560
|
nextFileList.push(file);
|
|
8620
8561
|
} else {
|
|
@@ -8635,7 +8576,8 @@ function removeFileItem(file, fileList) {
|
|
|
8635
8576
|
return removed;
|
|
8636
8577
|
}
|
|
8637
8578
|
// ==================== Default Image Preview ====================
|
|
8638
|
-
const extname = (
|
|
8579
|
+
const extname = function () {
|
|
8580
|
+
let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
8639
8581
|
const temp = url.split('/');
|
|
8640
8582
|
const filename = temp[temp.length - 1];
|
|
8641
8583
|
const filenameWithoutSuffix = filename.split(/#|\?/)[0];
|
|
@@ -9016,11 +8958,12 @@ const FormItemInputContext = /*#__PURE__*/React.createContext({});
|
|
|
9016
8958
|
if (process.env.NODE_ENV !== 'production') {
|
|
9017
8959
|
FormItemInputContext.displayName = 'FormItemInputContext';
|
|
9018
8960
|
}
|
|
9019
|
-
const NoFormStyle =
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
8961
|
+
const NoFormStyle = _ref => {
|
|
8962
|
+
let {
|
|
8963
|
+
children,
|
|
8964
|
+
status,
|
|
8965
|
+
override
|
|
8966
|
+
} = _ref;
|
|
9024
8967
|
const formItemInputContext = React.useContext(FormItemInputContext);
|
|
9025
8968
|
const newFormItemInputContext = React.useMemo(() => {
|
|
9026
8969
|
const newContext = Object.assign({}, formItemInputContext);
|
|
@@ -9595,18 +9538,21 @@ const genTooltipStyle = token => {
|
|
|
9595
9538
|
[`${componentCls}-content`]: {
|
|
9596
9539
|
position: 'relative'
|
|
9597
9540
|
}
|
|
9598
|
-
}), genPresetColor(token, (colorKey, {
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9541
|
+
}), genPresetColor(token, (colorKey, _ref) => {
|
|
9542
|
+
let {
|
|
9543
|
+
darkColor
|
|
9544
|
+
} = _ref;
|
|
9545
|
+
return {
|
|
9546
|
+
[`&${componentCls}-${colorKey}`]: {
|
|
9547
|
+
[`${componentCls}-inner`]: {
|
|
9548
|
+
backgroundColor: darkColor
|
|
9549
|
+
},
|
|
9550
|
+
[`${componentCls}-arrow`]: {
|
|
9551
|
+
'--antd-arrow-background-color': darkColor
|
|
9552
|
+
}
|
|
9607
9553
|
}
|
|
9608
|
-
}
|
|
9609
|
-
}))
|
|
9554
|
+
};
|
|
9555
|
+
})), {
|
|
9610
9556
|
// RTL
|
|
9611
9557
|
'&-rtl': {
|
|
9612
9558
|
direction: 'rtl'
|
|
@@ -9633,7 +9579,8 @@ const prepareComponentToken$1 = token => Object.assign(Object.assign({
|
|
|
9633
9579
|
})), getArrowToken(merge(token, {
|
|
9634
9580
|
borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)
|
|
9635
9581
|
})));
|
|
9636
|
-
const useStyle$1 = (prefixCls
|
|
9582
|
+
const useStyle$1 = (function (prefixCls) {
|
|
9583
|
+
let injectStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
9637
9584
|
const useStyle = genStyleHooks('Tooltip', token => {
|
|
9638
9585
|
const {
|
|
9639
9586
|
borderRadius,
|
|
@@ -9654,7 +9601,7 @@ const useStyle$1 = (prefixCls, injectStyle = true) => {
|
|
|
9654
9601
|
injectStyle
|
|
9655
9602
|
});
|
|
9656
9603
|
return useStyle(prefixCls);
|
|
9657
|
-
};
|
|
9604
|
+
});
|
|
9658
9605
|
|
|
9659
9606
|
const inverseColors = PresetColors.map(color => `${color}-inverse`);
|
|
9660
9607
|
/**
|
|
@@ -9662,7 +9609,8 @@ const inverseColors = PresetColors.map(color => `${color}-inverse`);
|
|
|
9662
9609
|
* @param color color to be judged
|
|
9663
9610
|
* @param includeInverse whether to include reversed colors
|
|
9664
9611
|
*/
|
|
9665
|
-
function isPresetColor(color
|
|
9612
|
+
function isPresetColor(color) {
|
|
9613
|
+
let includeInverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
9666
9614
|
if (includeInverse) {
|
|
9667
9615
|
return [].concat(_toConsumableArray(inverseColors), _toConsumableArray(PresetColors)).includes(color);
|
|
9668
9616
|
}
|
|
@@ -9740,7 +9688,6 @@ const InternalTooltip = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
9740
9688
|
afterOpenChange,
|
|
9741
9689
|
afterVisibleChange,
|
|
9742
9690
|
destroyTooltipOnHide,
|
|
9743
|
-
destroyOnHidden,
|
|
9744
9691
|
arrow = true,
|
|
9745
9692
|
title,
|
|
9746
9693
|
overlay,
|
|
@@ -9757,7 +9704,7 @@ const InternalTooltip = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
9757
9704
|
styles,
|
|
9758
9705
|
classNames: tooltipClassNames
|
|
9759
9706
|
} = props,
|
|
9760
|
-
restProps = __rest$3(props, ["prefixCls", "openClassName", "getTooltipContainer", "color", "overlayInnerStyle", "children", "afterOpenChange", "afterVisibleChange", "destroyTooltipOnHide", "
|
|
9707
|
+
restProps = __rest$3(props, ["prefixCls", "openClassName", "getTooltipContainer", "color", "overlayInnerStyle", "children", "afterOpenChange", "afterVisibleChange", "destroyTooltipOnHide", "arrow", "title", "overlay", "builtinPlacements", "arrowPointAtCenter", "autoAdjustOverflow", "motion", "getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "rootClassName", "overlayClassName", "styles", "classNames"]);
|
|
9761
9708
|
const mergedShowArrow = !!arrow;
|
|
9762
9709
|
const [, token] = useToken();
|
|
9763
9710
|
const {
|
|
@@ -9790,7 +9737,8 @@ const InternalTooltip = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
9790
9737
|
});
|
|
9791
9738
|
// ============================== Warn ==============================
|
|
9792
9739
|
if (process.env.NODE_ENV !== 'production') {
|
|
9793
|
-
[['visible', 'open'], ['defaultVisible', 'defaultOpen'], ['onVisibleChange', 'onOpenChange'], ['afterVisibleChange', 'afterOpenChange'], ['
|
|
9740
|
+
[['visible', 'open'], ['defaultVisible', 'defaultOpen'], ['onVisibleChange', 'onOpenChange'], ['afterVisibleChange', 'afterOpenChange'], ['arrowPointAtCenter', 'arrow={{ pointAtCenter: true }}'], ['overlayStyle', 'styles={{ root: {} }}'], ['overlayInnerStyle', 'styles={{ body: {} }}'], ['overlayClassName', 'classNames={{ root: "" }}']].forEach(_ref => {
|
|
9741
|
+
let [deprecatedName, newName] = _ref;
|
|
9794
9742
|
warning.deprecated(!(deprecatedName in props), deprecatedName, newName);
|
|
9795
9743
|
});
|
|
9796
9744
|
process.env.NODE_ENV !== "production" ? warning(!destroyTooltipOnHide || typeof destroyTooltipOnHide === 'boolean', 'usage', '`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.') : void 0;
|
|
@@ -9884,8 +9832,7 @@ const InternalTooltip = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
9884
9832
|
motionName: getTransitionName(rootPrefixCls, 'zoom-big-fast', props.transitionName),
|
|
9885
9833
|
motionDeadline: 1000
|
|
9886
9834
|
},
|
|
9887
|
-
|
|
9888
|
-
destroyTooltipOnHide: destroyOnHidden !== null && destroyOnHidden !== void 0 ? destroyOnHidden : !!destroyTooltipOnHide
|
|
9835
|
+
destroyTooltipOnHide: !!destroyTooltipOnHide
|
|
9889
9836
|
}), tempOpen ? cloneElement(child, {
|
|
9890
9837
|
className: childCls
|
|
9891
9838
|
}) : child);
|
|
@@ -9908,10 +9855,11 @@ function validProgress(progress) {
|
|
|
9908
9855
|
}
|
|
9909
9856
|
return progress;
|
|
9910
9857
|
}
|
|
9911
|
-
function getSuccessPercent({
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9858
|
+
function getSuccessPercent(_ref) {
|
|
9859
|
+
let {
|
|
9860
|
+
success,
|
|
9861
|
+
successPercent
|
|
9862
|
+
} = _ref;
|
|
9915
9863
|
let percent = successPercent;
|
|
9916
9864
|
/** @deprecated Use `percent` instead */
|
|
9917
9865
|
if (success && 'progress' in success) {
|
|
@@ -9922,21 +9870,23 @@ function getSuccessPercent({
|
|
|
9922
9870
|
}
|
|
9923
9871
|
return percent;
|
|
9924
9872
|
}
|
|
9925
|
-
const getPercentage =
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9873
|
+
const getPercentage = _ref2 => {
|
|
9874
|
+
let {
|
|
9875
|
+
percent,
|
|
9876
|
+
success,
|
|
9877
|
+
successPercent
|
|
9878
|
+
} = _ref2;
|
|
9930
9879
|
const realSuccessPercent = validProgress(getSuccessPercent({
|
|
9931
9880
|
success,
|
|
9932
9881
|
successPercent
|
|
9933
9882
|
}));
|
|
9934
9883
|
return [realSuccessPercent, validProgress(validProgress(percent) - realSuccessPercent)];
|
|
9935
9884
|
};
|
|
9936
|
-
const getStrokeColor =
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9885
|
+
const getStrokeColor = _ref3 => {
|
|
9886
|
+
let {
|
|
9887
|
+
success = {},
|
|
9888
|
+
strokeColor
|
|
9889
|
+
} = _ref3;
|
|
9940
9890
|
const {
|
|
9941
9891
|
strokeColor: successColor
|
|
9942
9892
|
} = success;
|
|
@@ -10382,10 +10332,13 @@ const sortGradient = gradients => {
|
|
|
10382
10332
|
}
|
|
10383
10333
|
});
|
|
10384
10334
|
tempArr = tempArr.sort((a, b) => a.key - b.key);
|
|
10385
|
-
return tempArr.map(
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10335
|
+
return tempArr.map(_ref => {
|
|
10336
|
+
let {
|
|
10337
|
+
key,
|
|
10338
|
+
value
|
|
10339
|
+
} = _ref;
|
|
10340
|
+
return `${value} ${key}%`;
|
|
10341
|
+
}).join(', ');
|
|
10389
10342
|
};
|
|
10390
10343
|
/**
|
|
10391
10344
|
* Then this man came to realize the truth: Besides six pence, there is the moon. Besides bread and
|
|
@@ -10681,30 +10634,31 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
10681
10634
|
Progress.displayName = 'Progress';
|
|
10682
10635
|
}
|
|
10683
10636
|
|
|
10684
|
-
const ListItem = /*#__PURE__*/React.forwardRef(({
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10637
|
+
const ListItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
10638
|
+
let {
|
|
10639
|
+
prefixCls,
|
|
10640
|
+
className,
|
|
10641
|
+
style,
|
|
10642
|
+
locale,
|
|
10643
|
+
listType,
|
|
10644
|
+
file,
|
|
10645
|
+
items,
|
|
10646
|
+
progress: progressProps,
|
|
10647
|
+
iconRender,
|
|
10648
|
+
actionIconRender,
|
|
10649
|
+
itemRender,
|
|
10650
|
+
isImgUrl,
|
|
10651
|
+
showPreviewIcon,
|
|
10652
|
+
showRemoveIcon,
|
|
10653
|
+
showDownloadIcon,
|
|
10654
|
+
previewIcon: customPreviewIcon,
|
|
10655
|
+
removeIcon: customRemoveIcon,
|
|
10656
|
+
downloadIcon: customDownloadIcon,
|
|
10657
|
+
extra: customExtra,
|
|
10658
|
+
onPreview,
|
|
10659
|
+
onDownload,
|
|
10660
|
+
onClose
|
|
10661
|
+
} = _ref;
|
|
10708
10662
|
var _a, _b;
|
|
10709
10663
|
// Status: which will ignore `removed` status
|
|
10710
10664
|
const {
|
|
@@ -10810,16 +10764,17 @@ const ListItem = /*#__PURE__*/React.forwardRef(({
|
|
|
10810
10764
|
motionName: `${rootPrefixCls}-fade`,
|
|
10811
10765
|
visible: mergedStatus === 'uploading',
|
|
10812
10766
|
motionDeadline: 2000
|
|
10813
|
-
},
|
|
10814
|
-
|
|
10815
|
-
|
|
10767
|
+
}, _ref2 => {
|
|
10768
|
+
let {
|
|
10769
|
+
className: motionClassName
|
|
10770
|
+
} = _ref2;
|
|
10816
10771
|
// show loading icon if upload progress listener is disabled
|
|
10817
|
-
const loadingProgress = 'percent' in file ? (/*#__PURE__*/React.createElement(Progress, Object.assign({
|
|
10772
|
+
const loadingProgress = 'percent' in file ? (/*#__PURE__*/React.createElement(Progress, Object.assign({}, progressProps, {
|
|
10818
10773
|
type: "line",
|
|
10819
10774
|
percent: file.percent,
|
|
10820
10775
|
"aria-label": file['aria-label'],
|
|
10821
10776
|
"aria-labelledby": file['aria-labelledby']
|
|
10822
|
-
}
|
|
10777
|
+
}))) : null;
|
|
10823
10778
|
return /*#__PURE__*/React.createElement("div", {
|
|
10824
10779
|
className: classNames(`${prefixCls}-list-item-progress`, motionClassName)
|
|
10825
10780
|
}, loadingProgress);
|
|
@@ -10933,9 +10888,11 @@ const InternalUploadList = (props, ref) => {
|
|
|
10933
10888
|
(_b = (_a = customIcon.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
10934
10889
|
}
|
|
10935
10890
|
},
|
|
10936
|
-
className: `${prefixCls}-list-item-action
|
|
10937
|
-
disabled: acceptUploadDisabled ? disabled : false
|
|
10891
|
+
className: `${prefixCls}-list-item-action`
|
|
10938
10892
|
};
|
|
10893
|
+
if (acceptUploadDisabled) {
|
|
10894
|
+
btnProps.disabled = disabled;
|
|
10895
|
+
}
|
|
10939
10896
|
return /*#__PURE__*/React.isValidElement(customIcon) ? (/*#__PURE__*/React.createElement(Button, Object.assign({}, btnProps, {
|
|
10940
10897
|
icon: cloneElement(customIcon, Object.assign(Object.assign({}, customIcon.props), {
|
|
10941
10898
|
onClick: () => {}
|
|
@@ -10969,48 +10926,54 @@ const InternalUploadList = (props, ref) => {
|
|
|
10969
10926
|
className: listClassNames
|
|
10970
10927
|
}, /*#__PURE__*/React.createElement(CSSMotionList, Object.assign({}, motionConfig, {
|
|
10971
10928
|
component: false
|
|
10972
|
-
}),
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
10929
|
+
}), _ref => {
|
|
10930
|
+
let {
|
|
10931
|
+
key,
|
|
10932
|
+
file,
|
|
10933
|
+
className: motionClassName,
|
|
10934
|
+
style: motionStyle
|
|
10935
|
+
} = _ref;
|
|
10936
|
+
return /*#__PURE__*/React.createElement(ListItem, {
|
|
10937
|
+
key: key,
|
|
10938
|
+
locale: locale,
|
|
10939
|
+
prefixCls: prefixCls,
|
|
10940
|
+
className: motionClassName,
|
|
10941
|
+
style: motionStyle,
|
|
10942
|
+
file: file,
|
|
10943
|
+
items: items,
|
|
10944
|
+
progress: progress,
|
|
10945
|
+
listType: listType,
|
|
10946
|
+
isImgUrl: isImgUrl,
|
|
10947
|
+
showPreviewIcon: showPreviewIcon,
|
|
10948
|
+
showRemoveIcon: showRemoveIcon,
|
|
10949
|
+
showDownloadIcon: showDownloadIcon,
|
|
10950
|
+
removeIcon: removeIcon,
|
|
10951
|
+
previewIcon: previewIcon,
|
|
10952
|
+
downloadIcon: downloadIcon,
|
|
10953
|
+
extra: extra,
|
|
10954
|
+
iconRender: internalIconRender,
|
|
10955
|
+
actionIconRender: actionIconRender,
|
|
10956
|
+
itemRender: itemRender,
|
|
10957
|
+
onPreview: onInternalPreview,
|
|
10958
|
+
onDownload: onInternalDownload,
|
|
10959
|
+
onClose: onInternalClose
|
|
10960
|
+
});
|
|
10961
|
+
}), appendAction && (/*#__PURE__*/React.createElement(CSSMotion, Object.assign({}, motionConfig, {
|
|
11002
10962
|
visible: appendActionVisible,
|
|
11003
10963
|
forceRender: true
|
|
11004
|
-
}),
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
10964
|
+
}), _ref2 => {
|
|
10965
|
+
let {
|
|
10966
|
+
className: motionClassName,
|
|
10967
|
+
style: motionStyle
|
|
10968
|
+
} = _ref2;
|
|
10969
|
+
return cloneElement(appendAction, oriProps => ({
|
|
10970
|
+
className: classNames(oriProps.className, motionClassName),
|
|
10971
|
+
style: Object.assign(Object.assign(Object.assign({}, motionStyle), {
|
|
10972
|
+
// prevent the element has hover css pseudo-class that may cause animation to end prematurely.
|
|
10973
|
+
pointerEvents: motionClassName ? 'none' : undefined
|
|
10974
|
+
}), oriProps.style)
|
|
10975
|
+
}));
|
|
10976
|
+
})));
|
|
11014
10977
|
};
|
|
11015
10978
|
const UploadList = /*#__PURE__*/React.forwardRef(InternalUploadList);
|
|
11016
10979
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -11400,8 +11363,7 @@ const InternalUpload = (props, ref) => {
|
|
|
11400
11363
|
[`${prefixCls}-hidden`]: !children
|
|
11401
11364
|
});
|
|
11402
11365
|
const uploadButton = /*#__PURE__*/React.createElement("div", {
|
|
11403
|
-
className: uploadBtnCls
|
|
11404
|
-
style: mergedStyle
|
|
11366
|
+
className: uploadBtnCls
|
|
11405
11367
|
}, /*#__PURE__*/React.createElement(Upload$1, Object.assign({}, rcUploadProps, {
|
|
11406
11368
|
ref: upload
|
|
11407
11369
|
})));
|