@ant-design/pro-components 2.3.25 → 2.3.27
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/components.js +390 -314
- package/dist/components.min.js +1 -1
- package/es/version.js +10 -10
- package/package.json +10 -10
package/dist/components.js
CHANGED
|
@@ -21170,7 +21170,7 @@ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, decla
|
|
|
21170
21170
|
// { rule/at-rule
|
|
21171
21171
|
default:
|
|
21172
21172
|
Utility_append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
|
21173
|
-
if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule) {
|
|
21173
|
+
if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
21174
21174
|
// d m s
|
|
21175
21175
|
case 100:
|
|
21176
21176
|
case 109:
|
|
@@ -26104,6 +26104,7 @@ var defaultAlgorithm = function defaultAlgorithm() {
|
|
|
26104
26104
|
|
|
26105
26105
|
|
|
26106
26106
|
|
|
26107
|
+
|
|
26107
26108
|
/**
|
|
26108
26109
|
* 把一个颜色设置一下透明度
|
|
26109
26110
|
* @example (#fff, 0.5) => rgba(255, 255, 255, 0.5)
|
|
@@ -26166,10 +26167,14 @@ var operationUnit = function operationUnit(token) {
|
|
|
26166
26167
|
*/
|
|
26167
26168
|
function useStyle(componentName, styleFn) {
|
|
26168
26169
|
var _useContext = (0,external_React_.useContext)(ProProvider),
|
|
26169
|
-
token = _useContext.token,
|
|
26170
|
+
_useContext$token = _useContext.token,
|
|
26171
|
+
token = _useContext$token === void 0 ? {} : _useContext$token,
|
|
26170
26172
|
_useContext$hashId = _useContext.hashId,
|
|
26171
26173
|
hashId = _useContext$hashId === void 0 ? '' : _useContext$hashId,
|
|
26172
26174
|
theme = _useContext.theme;
|
|
26175
|
+
var _useContext2 = (0,external_React_.useContext)(external_antd_.ConfigProvider.ConfigContext),
|
|
26176
|
+
getPrefixCls = _useContext2.getPrefixCls;
|
|
26177
|
+
token.antCls = ".".concat(getPrefixCls());
|
|
26173
26178
|
return {
|
|
26174
26179
|
wrapSSR: useStyleRegister({
|
|
26175
26180
|
theme: theme,
|
|
@@ -26211,7 +26216,7 @@ var getLayoutDesignToken = function getLayoutDesignToken(designTokens, antdToken
|
|
|
26211
26216
|
}, finalDesignTokens.header),
|
|
26212
26217
|
sider: objectSpread2_objectSpread2({
|
|
26213
26218
|
paddingInlineLayoutMenu: 8,
|
|
26214
|
-
paddingBlockLayoutMenu:
|
|
26219
|
+
paddingBlockLayoutMenu: 0,
|
|
26215
26220
|
colorBgCollapsedButton: '#fff',
|
|
26216
26221
|
colorTextCollapsedButtonHover: antdToken.colorTextSecondary,
|
|
26217
26222
|
colorTextCollapsedButton: setAlpha(antdToken.colorTextBase, 0.25),
|
|
@@ -26221,6 +26226,7 @@ var getLayoutDesignToken = function getLayoutDesignToken(designTokens, antdToken
|
|
|
26221
26226
|
colorMenuItemDivider: setAlpha(antdToken.colorTextBase, 0.06),
|
|
26222
26227
|
colorBgMenuItemHover: setAlpha(antdToken.colorTextBase, 0.03),
|
|
26223
26228
|
colorBgMenuItemSelected: setAlpha(antdToken.colorTextBase, 0.04),
|
|
26229
|
+
colorTextMenuItemHover: setAlpha(antdToken.colorTextBase, 0.88),
|
|
26224
26230
|
colorTextMenuSelected: setAlpha(antdToken.colorTextBase, 0.95),
|
|
26225
26231
|
colorTextMenuActive: antdToken.colorText,
|
|
26226
26232
|
colorTextMenu: setAlpha(antdToken.colorTextBase, 0.65),
|
|
@@ -26399,7 +26405,6 @@ var es_ConfigContext = /*#__PURE__*/external_React_default().createContext({
|
|
|
26399
26405
|
intl: objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, zhCNIntl), {}, {
|
|
26400
26406
|
locale: 'default'
|
|
26401
26407
|
}),
|
|
26402
|
-
isDeps: false,
|
|
26403
26408
|
valueTypeMap: {},
|
|
26404
26409
|
theme: emptyTheme,
|
|
26405
26410
|
token: defaultTheme
|
|
@@ -26459,7 +26464,7 @@ var ConfigProviderWrap = function ConfigProviderWrap(props) {
|
|
|
26459
26464
|
// 如果 locale 不存在自动注入的 AntdConfigProvider
|
|
26460
26465
|
var ANTDProvider = locale === undefined ? external_antd_.ConfigProvider : (external_React_default()).Fragment;
|
|
26461
26466
|
var proProvide = (0,external_React_.useContext)(es_ConfigContext);
|
|
26462
|
-
var isNullProvide = needDeps && proProvide.hashId && Object.keys(props).sort().join('-') === 'children-needDeps';
|
|
26467
|
+
var isNullProvide = needDeps && proProvide.hashId !== undefined && Object.keys(props).sort().join('-') === 'children-needDeps';
|
|
26463
26468
|
/**
|
|
26464
26469
|
* pro 的 类
|
|
26465
26470
|
* @type {string}
|
|
@@ -26469,7 +26474,7 @@ var ConfigProviderWrap = function ConfigProviderWrap(props) {
|
|
|
26469
26474
|
var salt = "".concat(proComponentsCls);
|
|
26470
26475
|
var antCls = '.' + getPrefixCls();
|
|
26471
26476
|
var proProvideValue = (0,external_React_.useMemo)(function () {
|
|
26472
|
-
var _proProvide$intl, _proProvide$token;
|
|
26477
|
+
var _proProvide$intl, _proProvide$token, _proProvide$token2;
|
|
26473
26478
|
if (isNullProvide) return null;
|
|
26474
26479
|
var localeName = locale === null || locale === void 0 ? void 0 : locale.locale;
|
|
26475
26480
|
var key = findIntlKeyByAntdLocaleKey(localeName);
|
|
@@ -26478,17 +26483,16 @@ var ConfigProviderWrap = function ConfigProviderWrap(props) {
|
|
|
26478
26483
|
/**
|
|
26479
26484
|
* 合并一下token,不然导致嵌套 token 失效
|
|
26480
26485
|
*/
|
|
26481
|
-
var proLayoutTokenMerge = propsToken ? merge((
|
|
26486
|
+
var proLayoutTokenMerge = propsToken ? getLayoutDesignToken(merge((_proProvide$token = proProvide.token) === null || _proProvide$token === void 0 ? void 0 : _proProvide$token.layout, propsToken.layout || {}), defaultTheme) : getLayoutDesignToken(((_proProvide$token2 = proProvide.token) === null || _proProvide$token2 === void 0 ? void 0 : _proProvide$token2.layout) || {}, defaultTheme);
|
|
26482
26487
|
return objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, proProvide), {}, {
|
|
26483
|
-
token:
|
|
26488
|
+
token: merge(proProvide.token, {
|
|
26484
26489
|
proComponentsCls: proComponentsCls,
|
|
26485
26490
|
antCls: antCls,
|
|
26486
26491
|
layout: proLayoutTokenMerge
|
|
26487
26492
|
}),
|
|
26488
|
-
isDeps: true,
|
|
26489
26493
|
intl: intl || zhCNIntl
|
|
26490
26494
|
});
|
|
26491
|
-
}, [isNullProvide, locale === null || locale === void 0 ? void 0 : locale.locale, proProvide, propsToken,
|
|
26495
|
+
}, [isNullProvide, locale === null || locale === void 0 ? void 0 : locale.locale, proProvide, propsToken, proComponentsCls, antCls]);
|
|
26492
26496
|
var finalToken = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, (proProvideValue === null || proProvideValue === void 0 ? void 0 : proProvideValue.token) || {}), {}, {
|
|
26493
26497
|
proComponentsCls: proComponentsCls
|
|
26494
26498
|
});
|
|
@@ -26527,13 +26531,12 @@ var ConfigProviderWrap = function ConfigProviderWrap(props) {
|
|
|
26527
26531
|
})
|
|
26528
26532
|
})
|
|
26529
26533
|
}));
|
|
26530
|
-
if (proProvide.isDeps) return provide;
|
|
26531
26534
|
return (0,jsx_runtime.jsx)("div", {
|
|
26532
26535
|
className: "".concat((getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls('pro')) || 'ant-pro').concat(hashId ? ' ' + hashId : ''),
|
|
26533
26536
|
children: provide
|
|
26534
26537
|
});
|
|
26535
26538
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26536
|
-
}, [autoClearCache, children, getPrefixCls, hashId, locale,
|
|
26539
|
+
}, [autoClearCache, children, getPrefixCls, hashId, locale, proProvideValue, token]);
|
|
26537
26540
|
if (!autoClearCache) return configProviderDom;
|
|
26538
26541
|
return (0,jsx_runtime.jsx)(SWRConfig, {
|
|
26539
26542
|
value: {
|
|
@@ -30487,7 +30490,10 @@ var CheckCard_style_genProStyle = function genProStyle(token) {
|
|
|
30487
30490
|
height: '14px',
|
|
30488
30491
|
marginBlock: '4px',
|
|
30489
30492
|
background: "linear-gradient(90deg, rgba(54, 61, 64, 0.2), rgba(54, 61, 64, 0.4), rgba(54, 61, 64, 0.2))",
|
|
30490
|
-
|
|
30493
|
+
animationName: 'card-loading',
|
|
30494
|
+
animationDuration: '1.4s',
|
|
30495
|
+
animationTimingFunction: 'ease',
|
|
30496
|
+
animationIterationCount: 'infinite'
|
|
30491
30497
|
}), defineProperty_defineProperty(_content, '@keyframes card-loading', {
|
|
30492
30498
|
'0%': {
|
|
30493
30499
|
backgroundPosition: '0 50%'
|
|
@@ -30907,7 +30913,6 @@ var Statistic = function Statistic(props) {
|
|
|
30907
30913
|
className: iconClass,
|
|
30908
30914
|
children: icon
|
|
30909
30915
|
});
|
|
30910
|
-
console.log('classString', classString);
|
|
30911
30916
|
return wrapSSR((0,jsx_runtime.jsxs)("div", {
|
|
30912
30917
|
className: classString,
|
|
30913
30918
|
style: style,
|
|
@@ -31105,7 +31110,10 @@ var Loading_style_genProStyle = function genProStyle(token) {
|
|
|
31105
31110
|
background: "linear-gradient(90deg, rgba(54, 61, 64, 0.2), rgba(54, 61, 64, 0.4), rgba(54, 61, 64, 0.2))",
|
|
31106
31111
|
backgroundSize: '600% 600%',
|
|
31107
31112
|
borderRadius: token.radiusBase,
|
|
31108
|
-
|
|
31113
|
+
animationName: 'card-loading',
|
|
31114
|
+
animationDuration: '1.4s',
|
|
31115
|
+
animationTimingFunction: 'ease',
|
|
31116
|
+
animationIterationCount: 'infinite'
|
|
31109
31117
|
}), defineProperty_defineProperty(_token$componentCls, '@keyframes card-loading', {
|
|
31110
31118
|
'0%': {
|
|
31111
31119
|
backgroundPosition: '0 50%'
|
|
@@ -32268,8 +32276,8 @@ function toArray_toArray(children) {
|
|
|
32268
32276
|
;// CONCATENATED MODULE: ./node_modules/rc-field-form/es/FieldContext.js
|
|
32269
32277
|
|
|
32270
32278
|
|
|
32271
|
-
var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';
|
|
32272
|
-
|
|
32279
|
+
var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';
|
|
32280
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32273
32281
|
var warningFunc = function warningFunc() {
|
|
32274
32282
|
es_warning(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');
|
|
32275
32283
|
};
|
|
@@ -33536,7 +33544,6 @@ function cloneArrayDeep(val) {
|
|
|
33536
33544
|
* 123 => [123]
|
|
33537
33545
|
* ['a', 123] => ['a', 123]
|
|
33538
33546
|
*/
|
|
33539
|
-
|
|
33540
33547
|
function getNamePath(path) {
|
|
33541
33548
|
return typeUtil_toArray(path);
|
|
33542
33549
|
}
|
|
@@ -33569,7 +33576,6 @@ function valueUtil_isObject(obj) {
|
|
|
33569
33576
|
* Copy values into store and return a new values object
|
|
33570
33577
|
* ({ a: 1, b: { c: 2 } }, { a: 4, b: { d: 5 } }) => { a: 4, b: { c: 2, d: 5 } }
|
|
33571
33578
|
*/
|
|
33572
|
-
|
|
33573
33579
|
function internalSetValues(store, values) {
|
|
33574
33580
|
var newStore = Array.isArray(store) ? toConsumableArray_toConsumableArray(store) : objectSpread2_objectSpread2({}, store);
|
|
33575
33581
|
if (!values) {
|
|
@@ -33577,8 +33583,8 @@ function internalSetValues(store, values) {
|
|
|
33577
33583
|
}
|
|
33578
33584
|
Object.keys(values).forEach(function (key) {
|
|
33579
33585
|
var prevValue = newStore[key];
|
|
33580
|
-
var value = values[key];
|
|
33581
|
-
|
|
33586
|
+
var value = values[key];
|
|
33587
|
+
// If both are object (but target is not array), we use recursion to set deep value
|
|
33582
33588
|
var recursive = valueUtil_isObject(prevValue) && valueUtil_isObject(value);
|
|
33583
33589
|
newStore[key] = recursive ? internalSetValues(prevValue, value || {}) : utils_cloneDeep(value); // Clone deep for arrays
|
|
33584
33590
|
});
|
|
@@ -33640,7 +33646,6 @@ function defaultGetValueFromEvent(valuePropName) {
|
|
|
33640
33646
|
* @param moveIndex The index of the item to move. (required)
|
|
33641
33647
|
* @param toIndex The index to move item at moveIndex to. (required)
|
|
33642
33648
|
*/
|
|
33643
|
-
|
|
33644
33649
|
function valueUtil_move(array, moveIndex, toIndex) {
|
|
33645
33650
|
var length = array.length;
|
|
33646
33651
|
if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {
|
|
@@ -33668,14 +33673,13 @@ function valueUtil_move(array, moveIndex, toIndex) {
|
|
|
33668
33673
|
|
|
33669
33674
|
|
|
33670
33675
|
|
|
33671
|
-
// Remove incorrect original ts define
|
|
33672
33676
|
|
|
33677
|
+
// Remove incorrect original ts define
|
|
33673
33678
|
var AsyncValidator = Schema;
|
|
33674
33679
|
/**
|
|
33675
33680
|
* Replace with template.
|
|
33676
33681
|
* `I'm ${name}` + { name: 'bamboo' } = I'm bamboo
|
|
33677
33682
|
*/
|
|
33678
|
-
|
|
33679
33683
|
function replaceMessage(template, kv) {
|
|
33680
33684
|
return template.replace(/\$\{\w+\}/g, function (str) {
|
|
33681
33685
|
var key = str.slice(2, -1);
|
|
@@ -33690,7 +33694,6 @@ function validateRule(_x, _x2, _x3, _x4, _x5) {
|
|
|
33690
33694
|
* We use `async-validator` to validate the value.
|
|
33691
33695
|
* But only check one value in a time to avoid namePath validate issue.
|
|
33692
33696
|
*/
|
|
33693
|
-
|
|
33694
33697
|
function _validateRule() {
|
|
33695
33698
|
_validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {
|
|
33696
33699
|
var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;
|
|
@@ -33701,7 +33704,6 @@ function _validateRule() {
|
|
|
33701
33704
|
cloneRule = objectSpread2_objectSpread2({}, rule); // Bug of `async-validator`
|
|
33702
33705
|
// https://github.com/react-component/field-form/issues/316
|
|
33703
33706
|
// https://github.com/react-component/field-form/issues/313
|
|
33704
|
-
|
|
33705
33707
|
delete cloneRule.ruleIndex;
|
|
33706
33708
|
if (cloneRule.validator) {
|
|
33707
33709
|
originValidator = cloneRule.validator;
|
|
@@ -33713,8 +33715,8 @@ function _validateRule() {
|
|
|
33713
33715
|
return Promise.reject(CODE_LOGIC_ERROR);
|
|
33714
33716
|
}
|
|
33715
33717
|
};
|
|
33716
|
-
}
|
|
33717
|
-
|
|
33718
|
+
}
|
|
33719
|
+
// We should special handle array validate
|
|
33718
33720
|
subRuleField = null;
|
|
33719
33721
|
if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {
|
|
33720
33722
|
subRuleField = cloneRule.defaultField;
|
|
@@ -33781,23 +33783,22 @@ function _validateRule() {
|
|
|
33781
33783
|
return _validateRule.apply(this, arguments);
|
|
33782
33784
|
}
|
|
33783
33785
|
function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {
|
|
33784
|
-
var name = namePath.join('.');
|
|
33785
|
-
|
|
33786
|
+
var name = namePath.join('.');
|
|
33787
|
+
// Fill rule with context
|
|
33786
33788
|
var filledRules = rules.map(function (currentRule, ruleIndex) {
|
|
33787
33789
|
var originValidatorFunc = currentRule.validator;
|
|
33788
33790
|
var cloneRule = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, currentRule), {}, {
|
|
33789
33791
|
ruleIndex: ruleIndex
|
|
33790
|
-
});
|
|
33791
|
-
|
|
33792
|
+
});
|
|
33793
|
+
// Replace validator if needed
|
|
33792
33794
|
if (originValidatorFunc) {
|
|
33793
33795
|
cloneRule.validator = function (rule, val, callback) {
|
|
33794
|
-
var hasPromise = false;
|
|
33795
|
-
|
|
33796
|
+
var hasPromise = false;
|
|
33797
|
+
// Wrap callback only accept when promise not provided
|
|
33796
33798
|
var wrappedCallback = function wrappedCallback() {
|
|
33797
33799
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
33798
33800
|
args[_key] = arguments[_key];
|
|
33799
33801
|
}
|
|
33800
|
-
|
|
33801
33802
|
// Wait a tick to make sure return type is a promise
|
|
33802
33803
|
Promise.resolve().then(function () {
|
|
33803
33804
|
es_warning(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');
|
|
@@ -33805,15 +33806,14 @@ function validateRules(namePath, value, rules, options, validateFirst, messageVa
|
|
|
33805
33806
|
callback.apply(void 0, args);
|
|
33806
33807
|
}
|
|
33807
33808
|
});
|
|
33808
|
-
};
|
|
33809
|
-
|
|
33809
|
+
};
|
|
33810
|
+
// Get promise
|
|
33810
33811
|
var promise = originValidatorFunc(rule, val, wrappedCallback);
|
|
33811
33812
|
hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';
|
|
33812
33813
|
/**
|
|
33813
33814
|
* 1. Use promise as the first priority.
|
|
33814
33815
|
* 2. If promise not exist, use callback with warning instead
|
|
33815
33816
|
*/
|
|
33816
|
-
|
|
33817
33817
|
es_warning(hasPromise, '`callback` is deprecated. Please return a promise instead.');
|
|
33818
33818
|
if (hasPromise) {
|
|
33819
33819
|
promise.then(function () {
|
|
@@ -33838,8 +33838,8 @@ function validateRules(namePath, value, rules, options, validateFirst, messageVa
|
|
|
33838
33838
|
return 1;
|
|
33839
33839
|
}
|
|
33840
33840
|
return -1;
|
|
33841
|
-
});
|
|
33842
|
-
|
|
33841
|
+
});
|
|
33842
|
+
// Do validate rules
|
|
33843
33843
|
var summaryPromise;
|
|
33844
33844
|
if (validateFirst === true) {
|
|
33845
33845
|
// >>>>> Validate by serialization
|
|
@@ -33902,8 +33902,8 @@ function validateRules(namePath, value, rules, options, validateFirst, messageVa
|
|
|
33902
33902
|
// Always change to rejection for Field to catch
|
|
33903
33903
|
return Promise.reject(errors);
|
|
33904
33904
|
});
|
|
33905
|
-
}
|
|
33906
|
-
|
|
33905
|
+
}
|
|
33906
|
+
// Internal catch error to avoid console error log.
|
|
33907
33907
|
summaryPromise.catch(function (e) {
|
|
33908
33908
|
return e;
|
|
33909
33909
|
});
|
|
@@ -33992,12 +33992,11 @@ function requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {
|
|
|
33992
33992
|
} : {});
|
|
33993
33993
|
}
|
|
33994
33994
|
return prevValue !== nextValue;
|
|
33995
|
-
}
|
|
33996
|
-
|
|
33995
|
+
}
|
|
33996
|
+
// We use Class instead of Hooks here since it will cost much code by using Hooks.
|
|
33997
33997
|
var Field = /*#__PURE__*/function (_React$Component) {
|
|
33998
33998
|
_inherits(Field, _React$Component);
|
|
33999
33999
|
var _super = _createSuper(Field);
|
|
34000
|
-
|
|
34001
34000
|
/**
|
|
34002
34001
|
* Follow state should not management in State since it will async update by React.
|
|
34003
34002
|
* This makes first render of form can not get correct state value.
|
|
@@ -34008,12 +34007,13 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34008
34007
|
* Note that we do not think field with `initialValue` is dirty
|
|
34009
34008
|
* but this will be by `isFieldDirty` func.
|
|
34010
34009
|
*/
|
|
34010
|
+
|
|
34011
34011
|
// ============================== Subscriptions ==============================
|
|
34012
34012
|
function Field(props) {
|
|
34013
34013
|
var _this;
|
|
34014
34014
|
_classCallCheck(this, Field);
|
|
34015
|
-
_this = _super.call(this, props);
|
|
34016
|
-
|
|
34015
|
+
_this = _super.call(this, props);
|
|
34016
|
+
// Register on init
|
|
34017
34017
|
_this.state = {
|
|
34018
34018
|
resetCount: 0
|
|
34019
34019
|
};
|
|
@@ -34060,7 +34060,6 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34060
34060
|
/**
|
|
34061
34061
|
* Clean up current node.
|
|
34062
34062
|
*/
|
|
34063
|
-
|
|
34064
34063
|
_this.setState(function (_ref) {
|
|
34065
34064
|
var resetCount = _ref.resetCount;
|
|
34066
34065
|
return {
|
|
@@ -34084,8 +34083,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34084
34083
|
var namePath = _this.getNamePath();
|
|
34085
34084
|
var prevValue = _this.getValue(prevStore);
|
|
34086
34085
|
var curValue = _this.getValue(store);
|
|
34087
|
-
var namePathMatch = namePathList && containsNamePath(namePathList, namePath);
|
|
34088
|
-
|
|
34086
|
+
var namePathMatch = namePathList && containsNamePath(namePathList, namePath);
|
|
34087
|
+
// `setFieldsValue` is a quick access to update related status
|
|
34089
34088
|
if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) {
|
|
34090
34089
|
_this.touched = true;
|
|
34091
34090
|
_this.dirty = true;
|
|
@@ -34109,14 +34108,12 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34109
34108
|
return;
|
|
34110
34109
|
}
|
|
34111
34110
|
break;
|
|
34112
|
-
|
|
34113
34111
|
/**
|
|
34114
34112
|
* In case field with `preserve = false` nest deps like:
|
|
34115
34113
|
* - A = 1 => show B
|
|
34116
34114
|
* - B = 1 => show C
|
|
34117
34115
|
* - Reset A, need clean B, C
|
|
34118
34116
|
*/
|
|
34119
|
-
|
|
34120
34117
|
case 'remove':
|
|
34121
34118
|
{
|
|
34122
34119
|
if (shouldUpdate) {
|
|
@@ -34145,8 +34142,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34145
34142
|
_this.triggerMetaEvent();
|
|
34146
34143
|
_this.reRender();
|
|
34147
34144
|
return;
|
|
34148
|
-
}
|
|
34149
|
-
|
|
34145
|
+
}
|
|
34146
|
+
// Handle update by `setField` with `shouldUpdate`
|
|
34150
34147
|
if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
|
|
34151
34148
|
_this.reRender();
|
|
34152
34149
|
return;
|
|
@@ -34158,10 +34155,10 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34158
34155
|
/**
|
|
34159
34156
|
* Trigger when marked `dependencies` updated. Related fields will all update
|
|
34160
34157
|
*/
|
|
34161
|
-
var dependencyList = dependencies.map(getNamePath);
|
|
34158
|
+
var dependencyList = dependencies.map(getNamePath);
|
|
34159
|
+
// No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be
|
|
34162
34160
|
// emitted earlier and they will work there
|
|
34163
34161
|
// If set it may cause unnecessary twice rerendering
|
|
34164
|
-
|
|
34165
34162
|
if (dependencyList.some(function (dependency) {
|
|
34166
34163
|
return containsNamePath(info.relatedFields, dependency);
|
|
34167
34164
|
})) {
|
|
@@ -34194,8 +34191,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34194
34191
|
_this.validateRules = function (options) {
|
|
34195
34192
|
// We should fixed namePath & value to avoid developer change then by form function
|
|
34196
34193
|
var namePath = _this.getNamePath();
|
|
34197
|
-
var currentValue = _this.getValue();
|
|
34198
|
-
|
|
34194
|
+
var currentValue = _this.getValue();
|
|
34195
|
+
// Force change to async to avoid rule OOD under renderProps field
|
|
34199
34196
|
var rootPromise = Promise.resolve().then(function () {
|
|
34200
34197
|
if (!_this.mounted) {
|
|
34201
34198
|
return [];
|
|
@@ -34209,6 +34206,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34209
34206
|
var filteredRules = _this.getRules();
|
|
34210
34207
|
if (triggerName) {
|
|
34211
34208
|
filteredRules = filteredRules.filter(function (rule) {
|
|
34209
|
+
return rule;
|
|
34210
|
+
}).filter(function (rule) {
|
|
34212
34211
|
var validateTrigger = rule.validateTrigger;
|
|
34213
34212
|
if (!validateTrigger) {
|
|
34214
34213
|
return true;
|
|
@@ -34224,8 +34223,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34224
34223
|
var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;
|
|
34225
34224
|
if (_this.validatePromise === rootPromise) {
|
|
34226
34225
|
var _ruleErrors$forEach;
|
|
34227
|
-
_this.validatePromise = null;
|
|
34228
|
-
|
|
34226
|
+
_this.validatePromise = null;
|
|
34227
|
+
// Get errors & warnings
|
|
34229
34228
|
var nextErrors = [];
|
|
34230
34229
|
var nextWarnings = [];
|
|
34231
34230
|
(_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 ? void 0 : _ruleErrors$forEach.call(ruleErrors, function (_ref3) {
|
|
@@ -34250,8 +34249,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34250
34249
|
_this.dirty = true;
|
|
34251
34250
|
_this.errors = EMPTY_ERRORS;
|
|
34252
34251
|
_this.warnings = EMPTY_ERRORS;
|
|
34253
|
-
_this.triggerMetaEvent();
|
|
34254
|
-
|
|
34252
|
+
_this.triggerMetaEvent();
|
|
34253
|
+
// Force trigger re-render since we need sync renderProps with new meta
|
|
34255
34254
|
_this.reRender();
|
|
34256
34255
|
return rootPromise;
|
|
34257
34256
|
};
|
|
@@ -34265,8 +34264,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34265
34264
|
// Touched or validate or has initialValue
|
|
34266
34265
|
if (_this.dirty || _this.props.initialValue !== undefined) {
|
|
34267
34266
|
return true;
|
|
34268
|
-
}
|
|
34269
|
-
|
|
34267
|
+
}
|
|
34268
|
+
// Form set initialValue
|
|
34270
34269
|
var fieldContext = _this.props.fieldContext;
|
|
34271
34270
|
var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),
|
|
34272
34271
|
getInitialValue = _fieldContext$getInte.getInitialValue;
|
|
@@ -34309,8 +34308,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34309
34308
|
return objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, _this.getOnlyChild(children(_this.getControlled(), meta, _this.props.fieldContext))), {}, {
|
|
34310
34309
|
isFunction: true
|
|
34311
34310
|
});
|
|
34312
|
-
}
|
|
34313
|
-
|
|
34311
|
+
}
|
|
34312
|
+
// Filed element only
|
|
34314
34313
|
var childList = toArray_toArray(children);
|
|
34315
34314
|
if (childList.length !== 1 || ! /*#__PURE__*/external_React_.isValidElement(childList[0])) {
|
|
34316
34315
|
return {
|
|
@@ -34347,11 +34346,11 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34347
34346
|
var value = _this.getValue();
|
|
34348
34347
|
var mergedGetValueProps = getValueProps || function (val) {
|
|
34349
34348
|
return defineProperty_defineProperty({}, valuePropName, val);
|
|
34350
|
-
};
|
|
34351
|
-
|
|
34349
|
+
};
|
|
34350
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34352
34351
|
var originTriggerFunc = childProps[trigger];
|
|
34353
|
-
var control = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, childProps), mergedGetValueProps(value));
|
|
34354
|
-
|
|
34352
|
+
var control = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, childProps), mergedGetValueProps(value));
|
|
34353
|
+
// Add trigger
|
|
34355
34354
|
control[trigger] = function () {
|
|
34356
34355
|
// Mark as touched
|
|
34357
34356
|
_this.touched = true;
|
|
@@ -34377,8 +34376,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34377
34376
|
if (originTriggerFunc) {
|
|
34378
34377
|
originTriggerFunc.apply(void 0, args);
|
|
34379
34378
|
}
|
|
34380
|
-
};
|
|
34381
|
-
|
|
34379
|
+
};
|
|
34380
|
+
// Add validateTrigger
|
|
34382
34381
|
var validateTriggerList = typeUtil_toArray(mergedValidateTrigger || []);
|
|
34383
34382
|
validateTriggerList.forEach(function (triggerName) {
|
|
34384
34383
|
// Wrap additional function of component, so that we can get latest value from store
|
|
@@ -34386,8 +34385,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34386
34385
|
control[triggerName] = function () {
|
|
34387
34386
|
if (originTrigger) {
|
|
34388
34387
|
originTrigger.apply(void 0, arguments);
|
|
34389
|
-
}
|
|
34390
|
-
|
|
34388
|
+
}
|
|
34389
|
+
// Always use latest rules
|
|
34391
34390
|
var rules = _this.props.rules;
|
|
34392
34391
|
if (rules && rules.length) {
|
|
34393
34392
|
// We dispatch validate to root,
|
|
@@ -34416,15 +34415,15 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34416
34415
|
var _this$props7 = this.props,
|
|
34417
34416
|
shouldUpdate = _this$props7.shouldUpdate,
|
|
34418
34417
|
fieldContext = _this$props7.fieldContext;
|
|
34419
|
-
this.mounted = true;
|
|
34420
|
-
|
|
34418
|
+
this.mounted = true;
|
|
34419
|
+
// Register on init
|
|
34421
34420
|
if (fieldContext) {
|
|
34422
34421
|
var getInternalHooks = fieldContext.getInternalHooks;
|
|
34423
34422
|
var _getInternalHooks3 = getInternalHooks(HOOK_MARK),
|
|
34424
34423
|
registerField = _getInternalHooks3.registerField;
|
|
34425
34424
|
this.cancelRegisterFunc = registerField(this);
|
|
34426
|
-
}
|
|
34427
|
-
|
|
34425
|
+
}
|
|
34426
|
+
// One more render for component in case fields not ready
|
|
34428
34427
|
if (shouldUpdate === true) {
|
|
34429
34428
|
this.reRender();
|
|
34430
34429
|
}
|
|
@@ -34449,8 +34448,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34449
34448
|
var children = this.props.children;
|
|
34450
34449
|
var _this$getOnlyChild = this.getOnlyChild(children),
|
|
34451
34450
|
child = _this$getOnlyChild.child,
|
|
34452
|
-
isFunction = _this$getOnlyChild.isFunction;
|
|
34453
|
-
|
|
34451
|
+
isFunction = _this$getOnlyChild.isFunction;
|
|
34452
|
+
// Not need to `cloneElement` since user can handle this in render function self
|
|
34454
34453
|
var returnChildNode;
|
|
34455
34454
|
if (isFunction) {
|
|
34456
34455
|
returnChildNode = child;
|
|
@@ -34480,9 +34479,9 @@ function WrapperField(_ref5) {
|
|
|
34480
34479
|
var key = 'keep';
|
|
34481
34480
|
if (!restProps.isListField) {
|
|
34482
34481
|
key = "_".concat((namePath || []).join('_'));
|
|
34483
|
-
}
|
|
34482
|
+
}
|
|
34483
|
+
// Warning if it's a directly list field.
|
|
34484
34484
|
// We can still support multiple level field preserve.
|
|
34485
|
-
|
|
34486
34485
|
if (false) {}
|
|
34487
34486
|
return /*#__PURE__*/external_React_.createElement(Field, extends_extends({
|
|
34488
34487
|
key: key,
|
|
@@ -34525,8 +34524,8 @@ var List = function List(_ref) {
|
|
|
34525
34524
|
return objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, context), {}, {
|
|
34526
34525
|
prefixName: prefixName
|
|
34527
34526
|
});
|
|
34528
|
-
}, [context, prefixName]);
|
|
34529
|
-
|
|
34527
|
+
}, [context, prefixName]);
|
|
34528
|
+
// List context
|
|
34530
34529
|
var listContext = external_React_.useMemo(function () {
|
|
34531
34530
|
return {
|
|
34532
34531
|
getKey: function getKey(namePath) {
|
|
@@ -34535,8 +34534,8 @@ var List = function List(_ref) {
|
|
|
34535
34534
|
return [keyManager.keys[pathName], namePath.slice(len + 1)];
|
|
34536
34535
|
}
|
|
34537
34536
|
};
|
|
34538
|
-
}, [prefixName]);
|
|
34539
|
-
|
|
34537
|
+
}, [prefixName]);
|
|
34538
|
+
// User should not pass `children` as other type.
|
|
34540
34539
|
if (typeof children !== 'function') {
|
|
34541
34540
|
es_warning(false, 'Form.List only accepts function as children.');
|
|
34542
34541
|
return null;
|
|
@@ -34571,7 +34570,6 @@ var List = function List(_ref) {
|
|
|
34571
34570
|
/**
|
|
34572
34571
|
* Always get latest value in case user update fields by `form` api.
|
|
34573
34572
|
*/
|
|
34574
|
-
|
|
34575
34573
|
var operations = {
|
|
34576
34574
|
add: function add(defaultValue, index) {
|
|
34577
34575
|
// Mapping keys
|
|
@@ -34594,8 +34592,8 @@ var List = function List(_ref) {
|
|
|
34594
34592
|
}
|
|
34595
34593
|
keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {
|
|
34596
34594
|
return !indexSet.has(keysIndex);
|
|
34597
|
-
});
|
|
34598
|
-
|
|
34595
|
+
});
|
|
34596
|
+
// Trigger store change
|
|
34599
34597
|
onChange(newValue.filter(function (_, valueIndex) {
|
|
34600
34598
|
return !indexSet.has(valueIndex);
|
|
34601
34599
|
}));
|
|
@@ -34604,13 +34602,13 @@ var List = function List(_ref) {
|
|
|
34604
34602
|
if (from === to) {
|
|
34605
34603
|
return;
|
|
34606
34604
|
}
|
|
34607
|
-
var newValue = getNewValue();
|
|
34608
|
-
|
|
34605
|
+
var newValue = getNewValue();
|
|
34606
|
+
// Do not handle out of range
|
|
34609
34607
|
if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {
|
|
34610
34608
|
return;
|
|
34611
34609
|
}
|
|
34612
|
-
keyManager.keys = valueUtil_move(keyManager.keys, from, to);
|
|
34613
|
-
|
|
34610
|
+
keyManager.keys = valueUtil_move(keyManager.keys, from, to);
|
|
34611
|
+
// Trigger store change
|
|
34614
34612
|
onChange(valueUtil_move(newValue, from, to));
|
|
34615
34613
|
}
|
|
34616
34614
|
};
|
|
@@ -34672,17 +34670,16 @@ var SPLIT = '__@field_split__';
|
|
|
34672
34670
|
/**
|
|
34673
34671
|
* Convert name path into string to fast the fetch speed of Map.
|
|
34674
34672
|
*/
|
|
34675
|
-
|
|
34676
34673
|
function NameMap_normalize(namePath) {
|
|
34677
34674
|
return namePath.map(function (cell) {
|
|
34678
34675
|
return "".concat(typeof_typeof(cell), ":").concat(cell);
|
|
34679
|
-
})
|
|
34676
|
+
})
|
|
34677
|
+
// Magic split
|
|
34680
34678
|
.join(SPLIT);
|
|
34681
34679
|
}
|
|
34682
34680
|
/**
|
|
34683
34681
|
* NameMap like a `Map` but accepts `string[]` as key.
|
|
34684
34682
|
*/
|
|
34685
|
-
|
|
34686
34683
|
var NameMap = /*#__PURE__*/function () {
|
|
34687
34684
|
function NameMap() {
|
|
34688
34685
|
_classCallCheck(this, NameMap);
|
|
@@ -34713,7 +34710,8 @@ var NameMap = /*#__PURE__*/function () {
|
|
|
34713
34710
|
key: "delete",
|
|
34714
34711
|
value: function _delete(key) {
|
|
34715
34712
|
this.kvs.delete(NameMap_normalize(key));
|
|
34716
|
-
}
|
|
34713
|
+
}
|
|
34714
|
+
// Since we only use this in test, let simply realize this
|
|
34717
34715
|
}, {
|
|
34718
34716
|
key: "map",
|
|
34719
34717
|
value: function map(callback) {
|
|
@@ -34829,10 +34827,10 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
34829
34827
|
_this.initialValues = initialValues || {};
|
|
34830
34828
|
if (init) {
|
|
34831
34829
|
var _this$prevWithoutPres;
|
|
34832
|
-
var nextStore = setValues({}, initialValues, _this.store);
|
|
34830
|
+
var nextStore = setValues({}, initialValues, _this.store);
|
|
34831
|
+
// We will take consider prev form unmount fields.
|
|
34833
34832
|
// When the field is not `preserve`, we need fill this with initialValues instead of store.
|
|
34834
34833
|
// eslint-disable-next-line array-callback-return
|
|
34835
|
-
|
|
34836
34834
|
(_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 ? void 0 : _this$prevWithoutPres.map(function (_ref) {
|
|
34837
34835
|
var namePath = _ref.key;
|
|
34838
34836
|
nextStore = setValue(nextStore, namePath, valueUtil_getValue(initialValues, namePath));
|
|
@@ -34851,8 +34849,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
34851
34849
|
_this.prevWithoutPreserves = prevWithoutPreserves;
|
|
34852
34850
|
};
|
|
34853
34851
|
this.getInitialValue = function (namePath) {
|
|
34854
|
-
var initValue = valueUtil_getValue(_this.initialValues, namePath);
|
|
34855
|
-
|
|
34852
|
+
var initValue = valueUtil_getValue(_this.initialValues, namePath);
|
|
34853
|
+
// Not cloneDeep when without `namePath`
|
|
34856
34854
|
return namePath.length ? utils_cloneDeep(initValue) : initValue;
|
|
34857
34855
|
};
|
|
34858
34856
|
this.setCallbacks = function (callbacks) {
|
|
@@ -34875,7 +34873,6 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
34875
34873
|
};
|
|
34876
34874
|
this.notifyWatch = function () {
|
|
34877
34875
|
var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
34878
|
-
|
|
34879
34876
|
// No need to cost perf when nothing need to watch
|
|
34880
34877
|
if (_this.watchList.length) {
|
|
34881
34878
|
var values = _this.getFieldsValue();
|
|
@@ -34930,9 +34927,9 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
34930
34927
|
var filteredNameList = [];
|
|
34931
34928
|
fieldEntities.forEach(function (entity) {
|
|
34932
34929
|
var _entity$isListField;
|
|
34933
|
-
var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();
|
|
34930
|
+
var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();
|
|
34931
|
+
// Ignore when it's a list item and not specific the namePath,
|
|
34934
34932
|
// since parent field is already take in count
|
|
34935
|
-
|
|
34936
34933
|
if (!nameList && ((_entity$isListField = entity.isListField) === null || _entity$isListField === void 0 ? void 0 : _entity$isListField.call(entity))) {
|
|
34937
34934
|
return;
|
|
34938
34935
|
}
|
|
@@ -35008,19 +35005,19 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35008
35005
|
var fieldEntities = _this.getFieldEntities(true);
|
|
35009
35006
|
var isFieldTouched = function isFieldTouched(field) {
|
|
35010
35007
|
return field.isFieldTouched();
|
|
35011
|
-
};
|
|
35012
|
-
|
|
35008
|
+
};
|
|
35009
|
+
// ===== Will get fully compare when not config namePathList =====
|
|
35013
35010
|
if (!namePathList) {
|
|
35014
35011
|
return isAllFieldsTouched ? fieldEntities.every(isFieldTouched) : fieldEntities.some(isFieldTouched);
|
|
35015
|
-
}
|
|
35016
|
-
|
|
35012
|
+
}
|
|
35013
|
+
// Generate a nest tree for validate
|
|
35017
35014
|
var map = new utils_NameMap();
|
|
35018
35015
|
namePathList.forEach(function (shortNamePath) {
|
|
35019
35016
|
map.set(shortNamePath, []);
|
|
35020
35017
|
});
|
|
35021
35018
|
fieldEntities.forEach(function (field) {
|
|
35022
|
-
var fieldNamePath = field.getNamePath();
|
|
35023
|
-
|
|
35019
|
+
var fieldNamePath = field.getNamePath();
|
|
35020
|
+
// Find matched entity and put into list
|
|
35024
35021
|
namePathList.forEach(function (shortNamePath) {
|
|
35025
35022
|
if (shortNamePath.every(function (nameUnit, i) {
|
|
35026
35023
|
return fieldNamePath[i] === nameUnit;
|
|
@@ -35030,8 +35027,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35030
35027
|
});
|
|
35031
35028
|
}
|
|
35032
35029
|
});
|
|
35033
|
-
});
|
|
35034
|
-
|
|
35030
|
+
});
|
|
35031
|
+
// Check if NameMap value is touched
|
|
35035
35032
|
var isNamePathListTouched = function isNamePathListTouched(entities) {
|
|
35036
35033
|
return entities.some(isFieldTouched);
|
|
35037
35034
|
};
|
|
@@ -35070,8 +35067,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35070
35067
|
var fieldEntities = _this.getFieldEntities(true);
|
|
35071
35068
|
fieldEntities.forEach(function (field) {
|
|
35072
35069
|
var initialValue = field.props.initialValue;
|
|
35073
|
-
var namePath = field.getNamePath();
|
|
35074
|
-
|
|
35070
|
+
var namePath = field.getNamePath();
|
|
35071
|
+
// Record only if has `initialValue`
|
|
35075
35072
|
if (initialValue !== undefined) {
|
|
35076
35073
|
var records = cache.get(namePath) || new Set();
|
|
35077
35074
|
records.add({
|
|
@@ -35080,8 +35077,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35080
35077
|
});
|
|
35081
35078
|
cache.set(namePath, records);
|
|
35082
35079
|
}
|
|
35083
|
-
});
|
|
35084
|
-
|
|
35080
|
+
});
|
|
35081
|
+
// Reset
|
|
35085
35082
|
var resetWithFields = function resetWithFields(entities) {
|
|
35086
35083
|
entities.forEach(function (field) {
|
|
35087
35084
|
var initialValue = field.props.initialValue;
|
|
@@ -35097,8 +35094,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35097
35094
|
// Warning if multiple field set `initialValue`and do not modify value
|
|
35098
35095
|
es_warning(false, "Multiple Field with path '".concat(namePath.join('.'), "' set 'initialValue'. Can not decide which one to pick."));
|
|
35099
35096
|
} else if (records) {
|
|
35100
|
-
var originValue = _this.getFieldValue(namePath);
|
|
35101
|
-
|
|
35097
|
+
var originValue = _this.getFieldValue(namePath);
|
|
35098
|
+
// Set `initialValue`
|
|
35102
35099
|
if (!info.skipExist || originValue === undefined) {
|
|
35103
35100
|
_this.updateStore(setValue(_this.store, namePath, toConsumableArray_toConsumableArray(records)[0].value));
|
|
35104
35101
|
}
|
|
@@ -35137,8 +35134,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35137
35134
|
});
|
|
35138
35135
|
_this.notifyWatch();
|
|
35139
35136
|
return;
|
|
35140
|
-
}
|
|
35141
|
-
|
|
35137
|
+
}
|
|
35138
|
+
// Reset by `nameList`
|
|
35142
35139
|
var namePathList = nameList.map(getNamePath);
|
|
35143
35140
|
namePathList.forEach(function (namePath) {
|
|
35144
35141
|
var initialValue = _this.getInitialValue(namePath);
|
|
@@ -35161,8 +35158,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35161
35158
|
errors = fieldData.errors,
|
|
35162
35159
|
data = objectWithoutProperties_objectWithoutProperties(fieldData, useForm_excluded);
|
|
35163
35160
|
var namePath = getNamePath(name);
|
|
35164
|
-
namePathList.push(namePath);
|
|
35165
|
-
|
|
35161
|
+
namePathList.push(namePath);
|
|
35162
|
+
// Value
|
|
35166
35163
|
if ('value' in data) {
|
|
35167
35164
|
_this.updateStore(setValue(_this.store, namePath, data.value));
|
|
35168
35165
|
}
|
|
@@ -35206,8 +35203,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35206
35203
|
this.registerField = function (entity) {
|
|
35207
35204
|
_this.fieldEntities.push(entity);
|
|
35208
35205
|
var namePath = entity.getNamePath();
|
|
35209
|
-
_this.notifyWatch([namePath]);
|
|
35210
|
-
|
|
35206
|
+
_this.notifyWatch([namePath]);
|
|
35207
|
+
// Set initial values
|
|
35211
35208
|
if (entity.props.initialValue !== undefined) {
|
|
35212
35209
|
var prevStore = _this.store;
|
|
35213
35210
|
_this.resetWithFieldInitialValue({
|
|
@@ -35218,14 +35215,14 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35218
35215
|
type: 'valueUpdate',
|
|
35219
35216
|
source: 'internal'
|
|
35220
35217
|
});
|
|
35221
|
-
}
|
|
35222
|
-
|
|
35218
|
+
}
|
|
35219
|
+
// un-register field callback
|
|
35223
35220
|
return function (isListField, preserve) {
|
|
35224
35221
|
var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
35225
35222
|
_this.fieldEntities = _this.fieldEntities.filter(function (item) {
|
|
35226
35223
|
return item !== entity;
|
|
35227
|
-
});
|
|
35228
|
-
|
|
35224
|
+
});
|
|
35225
|
+
// Clean up store value if not preserve
|
|
35229
35226
|
if (!_this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {
|
|
35230
35227
|
var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);
|
|
35231
35228
|
if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {
|
|
@@ -35235,12 +35232,12 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35235
35232
|
);
|
|
35236
35233
|
})) {
|
|
35237
35234
|
var _prevStore = _this.store;
|
|
35238
|
-
_this.updateStore(setValue(_prevStore, namePath, defaultValue, true));
|
|
35239
|
-
|
|
35235
|
+
_this.updateStore(setValue(_prevStore, namePath, defaultValue, true));
|
|
35236
|
+
// Notify that field is unmount
|
|
35240
35237
|
_this.notifyObservers(_prevStore, [namePath], {
|
|
35241
35238
|
type: 'remove'
|
|
35242
|
-
});
|
|
35243
|
-
|
|
35239
|
+
});
|
|
35240
|
+
// Dependencies update
|
|
35244
35241
|
_this.triggerDependenciesUpdate(_prevStore, namePath);
|
|
35245
35242
|
}
|
|
35246
35243
|
}
|
|
@@ -35265,7 +35262,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35265
35262
|
});
|
|
35266
35263
|
break;
|
|
35267
35264
|
}
|
|
35268
|
-
default:
|
|
35265
|
+
default:
|
|
35266
|
+
// Currently we don't have other action. Do nothing.
|
|
35269
35267
|
}
|
|
35270
35268
|
};
|
|
35271
35269
|
|
|
@@ -35301,10 +35299,10 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35301
35299
|
type: 'valueUpdate',
|
|
35302
35300
|
source: 'internal'
|
|
35303
35301
|
});
|
|
35304
|
-
_this.notifyWatch([namePath]);
|
|
35305
|
-
|
|
35306
|
-
var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);
|
|
35307
|
-
|
|
35302
|
+
_this.notifyWatch([namePath]);
|
|
35303
|
+
// Dependencies update
|
|
35304
|
+
var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);
|
|
35305
|
+
// trigger callback function
|
|
35308
35306
|
var onValuesChange = _this.callbacks.onValuesChange;
|
|
35309
35307
|
if (onValuesChange) {
|
|
35310
35308
|
var changedValues = cloneByNamePathList(_this.store, [namePath]);
|
|
@@ -35339,7 +35337,6 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35339
35337
|
* Generate maps
|
|
35340
35338
|
* Can use cache to save perf if user report performance issue with this
|
|
35341
35339
|
*/
|
|
35342
|
-
|
|
35343
35340
|
_this.getFieldEntities().forEach(function (field) {
|
|
35344
35341
|
var dependencies = field.props.dependencies;
|
|
35345
35342
|
(dependencies || []).forEach(function (dependency) {
|
|
@@ -35374,7 +35371,6 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35374
35371
|
/**
|
|
35375
35372
|
* Fill errors since `fields` may be replaced by controlled fields
|
|
35376
35373
|
*/
|
|
35377
|
-
|
|
35378
35374
|
if (filedErrors) {
|
|
35379
35375
|
var cache = new utils_NameMap();
|
|
35380
35376
|
filedErrors.forEach(function (_ref4) {
|
|
@@ -35397,8 +35393,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35397
35393
|
this.validateFields = function (nameList, options) {
|
|
35398
35394
|
_this.warningUnhooked();
|
|
35399
35395
|
var provideNameList = !!nameList;
|
|
35400
|
-
var namePathList = provideNameList ? nameList.map(getNamePath) : [];
|
|
35401
|
-
|
|
35396
|
+
var namePathList = provideNameList ? nameList.map(getNamePath) : [];
|
|
35397
|
+
// Collect result in promise list
|
|
35402
35398
|
var promiseList = [];
|
|
35403
35399
|
_this.getFieldEntities(true).forEach(function (field) {
|
|
35404
35400
|
// Add field if not provide `nameList`
|
|
@@ -35409,7 +35405,6 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35409
35405
|
* Recursive validate if configured.
|
|
35410
35406
|
* TODO: perf improvement @zombieJ
|
|
35411
35407
|
*/
|
|
35412
|
-
|
|
35413
35408
|
if ((options === null || options === void 0 ? void 0 : options.recursive) && provideNameList) {
|
|
35414
35409
|
var namePath = field.getNamePath();
|
|
35415
35410
|
if (
|
|
@@ -35420,18 +35415,18 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35420
35415
|
})) {
|
|
35421
35416
|
namePathList.push(namePath);
|
|
35422
35417
|
}
|
|
35423
|
-
}
|
|
35424
|
-
|
|
35418
|
+
}
|
|
35419
|
+
// Skip if without rule
|
|
35425
35420
|
if (!field.props.rules || !field.props.rules.length) {
|
|
35426
35421
|
return;
|
|
35427
35422
|
}
|
|
35428
|
-
var fieldNamePath = field.getNamePath();
|
|
35429
|
-
|
|
35423
|
+
var fieldNamePath = field.getNamePath();
|
|
35424
|
+
// Add field validate rule in to promise list
|
|
35430
35425
|
if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) {
|
|
35431
35426
|
var promise = field.validateRules(objectSpread2_objectSpread2({
|
|
35432
35427
|
validateMessages: objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, defaultValidateMessages), _this.validateMessages)
|
|
35433
|
-
}, options));
|
|
35434
|
-
|
|
35428
|
+
}, options));
|
|
35429
|
+
// Wrap promise with field
|
|
35435
35430
|
promiseList.push(promise.then(function () {
|
|
35436
35431
|
return {
|
|
35437
35432
|
name: fieldNamePath,
|
|
@@ -35467,8 +35462,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35467
35462
|
}
|
|
35468
35463
|
});
|
|
35469
35464
|
var summaryPromise = allPromiseFinish(promiseList);
|
|
35470
|
-
_this.lastValidatePromise = summaryPromise;
|
|
35471
|
-
|
|
35465
|
+
_this.lastValidatePromise = summaryPromise;
|
|
35466
|
+
// Notify fields with rule that validate has finished and need update
|
|
35472
35467
|
summaryPromise.catch(function (results) {
|
|
35473
35468
|
return results;
|
|
35474
35469
|
}).then(function (results) {
|
|
@@ -35495,8 +35490,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35495
35490
|
errorFields: errorList,
|
|
35496
35491
|
outOfDate: _this.lastValidatePromise !== summaryPromise
|
|
35497
35492
|
});
|
|
35498
|
-
});
|
|
35499
|
-
|
|
35493
|
+
});
|
|
35494
|
+
// Do not throw in console
|
|
35500
35495
|
returnPromise.catch(function (e) {
|
|
35501
35496
|
return e;
|
|
35502
35497
|
});
|
|
@@ -35629,9 +35624,9 @@ var Form = function Form(_ref, ref) {
|
|
|
35629
35624
|
_onFinish = _ref.onFinish,
|
|
35630
35625
|
onFinishFailed = _ref.onFinishFailed,
|
|
35631
35626
|
restProps = objectWithoutProperties_objectWithoutProperties(_ref, Form_excluded);
|
|
35632
|
-
var formContext = external_React_.useContext(es_FormContext);
|
|
35627
|
+
var formContext = external_React_.useContext(es_FormContext);
|
|
35628
|
+
// We customize handle event since Context will makes all the consumer re-render:
|
|
35633
35629
|
// https://reactjs.org/docs/context.html#contextprovider
|
|
35634
|
-
|
|
35635
35630
|
var _useForm = es_useForm(form),
|
|
35636
35631
|
_useForm2 = slicedToArray_slicedToArray(_useForm, 1),
|
|
35637
35632
|
formInstance = _useForm2[0];
|
|
@@ -35641,19 +35636,19 @@ var Form = function Form(_ref, ref) {
|
|
|
35641
35636
|
setCallbacks = _formInstance$getInte.setCallbacks,
|
|
35642
35637
|
setValidateMessages = _formInstance$getInte.setValidateMessages,
|
|
35643
35638
|
setPreserve = _formInstance$getInte.setPreserve,
|
|
35644
|
-
destroyForm = _formInstance$getInte.destroyForm;
|
|
35645
|
-
|
|
35639
|
+
destroyForm = _formInstance$getInte.destroyForm;
|
|
35640
|
+
// Pass ref with form instance
|
|
35646
35641
|
external_React_.useImperativeHandle(ref, function () {
|
|
35647
35642
|
return formInstance;
|
|
35648
|
-
});
|
|
35649
|
-
|
|
35643
|
+
});
|
|
35644
|
+
// Register form into Context
|
|
35650
35645
|
external_React_.useEffect(function () {
|
|
35651
35646
|
formContext.registerForm(name, formInstance);
|
|
35652
35647
|
return function () {
|
|
35653
35648
|
formContext.unregisterForm(name);
|
|
35654
35649
|
};
|
|
35655
|
-
}, [formContext, formInstance, name]);
|
|
35656
|
-
|
|
35650
|
+
}, [formContext, formInstance, name]);
|
|
35651
|
+
// Pass props to store
|
|
35657
35652
|
setValidateMessages(objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, formContext.validateMessages), validateMessages));
|
|
35658
35653
|
setCallbacks({
|
|
35659
35654
|
onValuesChange: onValuesChange,
|
|
@@ -35674,8 +35669,8 @@ var Form = function Form(_ref, ref) {
|
|
|
35674
35669
|
},
|
|
35675
35670
|
onFinishFailed: onFinishFailed
|
|
35676
35671
|
});
|
|
35677
|
-
setPreserve(preserve);
|
|
35678
|
-
|
|
35672
|
+
setPreserve(preserve);
|
|
35673
|
+
// Set initial value, init store value when first mount
|
|
35679
35674
|
var mountRef = external_React_.useRef(null);
|
|
35680
35675
|
setInitialValues(initialValues, !mountRef.current);
|
|
35681
35676
|
if (!mountRef.current) {
|
|
@@ -35685,8 +35680,8 @@ var Form = function Form(_ref, ref) {
|
|
|
35685
35680
|
return destroyForm;
|
|
35686
35681
|
},
|
|
35687
35682
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35688
|
-
[]);
|
|
35689
|
-
|
|
35683
|
+
[]);
|
|
35684
|
+
// Prepare children by `children` type
|
|
35690
35685
|
var childrenNode;
|
|
35691
35686
|
var childrenRenderProps = typeof children === 'function';
|
|
35692
35687
|
if (childrenRenderProps) {
|
|
@@ -35694,10 +35689,10 @@ var Form = function Form(_ref, ref) {
|
|
|
35694
35689
|
childrenNode = children(values, formInstance);
|
|
35695
35690
|
} else {
|
|
35696
35691
|
childrenNode = children;
|
|
35697
|
-
}
|
|
35698
|
-
|
|
35699
|
-
useSubscribe(!childrenRenderProps);
|
|
35700
|
-
|
|
35692
|
+
}
|
|
35693
|
+
// Not use subscribe when using render props
|
|
35694
|
+
useSubscribe(!childrenRenderProps);
|
|
35695
|
+
// Listen if fields provided. We use ref to save prev data here to avoid additional render
|
|
35701
35696
|
var prevFieldsRef = external_React_.useRef();
|
|
35702
35697
|
external_React_.useEffect(function () {
|
|
35703
35698
|
if (!isSimilar(prevFieldsRef.current || [], fields || [])) {
|
|
@@ -35763,8 +35758,8 @@ function useWatch() {
|
|
|
35763
35758
|
valueStrRef.current = valueStr;
|
|
35764
35759
|
var fieldContext = (0,external_React_.useContext)(FieldContext);
|
|
35765
35760
|
var formInstance = form || fieldContext;
|
|
35766
|
-
var isValidForm = formInstance && formInstance._init;
|
|
35767
|
-
|
|
35761
|
+
var isValidForm = formInstance && formInstance._init;
|
|
35762
|
+
// Warning if not exist form instance
|
|
35768
35763
|
if (false) {}
|
|
35769
35764
|
var namePath = getNamePath(dependencies);
|
|
35770
35765
|
var namePathRef = (0,external_React_.useRef)(namePath);
|
|
@@ -35780,14 +35775,14 @@ function useWatch() {
|
|
|
35780
35775
|
registerWatch = _getInternalHooks.registerWatch;
|
|
35781
35776
|
var cancelRegister = registerWatch(function (store) {
|
|
35782
35777
|
var newValue = valueUtil_getValue(store, namePathRef.current);
|
|
35783
|
-
var nextValueStr = useWatch_stringify(newValue);
|
|
35784
|
-
|
|
35778
|
+
var nextValueStr = useWatch_stringify(newValue);
|
|
35779
|
+
// Compare stringify in case it's nest object
|
|
35785
35780
|
if (valueStrRef.current !== nextValueStr) {
|
|
35786
35781
|
valueStrRef.current = nextValueStr;
|
|
35787
35782
|
setValue(newValue);
|
|
35788
35783
|
}
|
|
35789
|
-
});
|
|
35790
|
-
|
|
35784
|
+
});
|
|
35785
|
+
// TODO: We can improve this perf in future
|
|
35791
35786
|
var initialValue = valueUtil_getValue(getFieldsValue(), namePathRef.current);
|
|
35792
35787
|
setValue(initialValue);
|
|
35793
35788
|
return cancelRegister;
|
|
@@ -49432,7 +49427,7 @@ function BaseForm(props) {
|
|
|
49432
49427
|
form: form
|
|
49433
49428
|
}, omit_js_es(propRest, ['labelWidth', 'autoFocusFirstInput'])), {}, {
|
|
49434
49429
|
// 组合 urlSearch 和 initialValues
|
|
49435
|
-
initialValues: syncToUrlAsImportant ? objectSpread2_objectSpread2(objectSpread2_objectSpread2(objectSpread2_objectSpread2({},
|
|
49430
|
+
initialValues: syncToUrlAsImportant ? objectSpread2_objectSpread2(objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, initialValues), initialData), urlParamsMergeInitialValues) : objectSpread2_objectSpread2(objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, urlParamsMergeInitialValues), initialValues), initialData),
|
|
49436
49431
|
onValuesChange: function onValuesChange(changedValues, values) {
|
|
49437
49432
|
var _propRest$onValuesCha;
|
|
49438
49433
|
propRest === null || propRest === void 0 ? void 0 : (_propRest$onValuesCha = propRest.onValuesChange) === null || _propRest$onValuesCha === void 0 ? void 0 : _propRest$onValuesCha.call(propRest, transformKey(changedValues, !!omitNil), transformKey(values, !!omitNil));
|
|
@@ -52049,7 +52044,6 @@ var _map = [576, 768, 992, 1200].map(function (bp) {
|
|
|
52049
52044
|
xl = _map2[3];
|
|
52050
52045
|
var genPageContainerStyle = function genPageContainerStyle(token) {
|
|
52051
52046
|
var _token$layout, _token$layout$pageCon, _token$layout2, _token$layout2$pageCo, _token$layout3, _token$layout3$pageCo, _token$layout$pageCon2, _token$layout4, _token$layout4$pageCo, _token$layout5, _token$layout5$pageCo, _token$layout6, _token$layout6$pageCo, _token$layout$pageCon3, _token$layout7, _token$layout7$pageCo, _extraContent, _token$componentCls;
|
|
52052
|
-
console.log(token.layout);
|
|
52053
52047
|
return defineProperty_defineProperty({}, token.componentCls, (_token$componentCls = {
|
|
52054
52048
|
position: 'relative',
|
|
52055
52049
|
'&-children-content': {
|
|
@@ -52268,7 +52262,7 @@ var memoRenderPageHeader = function memoRenderPageHeader(props) {
|
|
|
52268
52262
|
}));
|
|
52269
52263
|
};
|
|
52270
52264
|
var PageContainerBase = function PageContainerBase(props) {
|
|
52271
|
-
var _restProps$header2,
|
|
52265
|
+
var _restProps$header2, _classNames, _token$layout, _token$layout$header;
|
|
52272
52266
|
var children = props.children,
|
|
52273
52267
|
_props$loading = props.loading,
|
|
52274
52268
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
@@ -52335,23 +52329,13 @@ var PageContainerBase = function PageContainerBase(props) {
|
|
|
52335
52329
|
return spinProps.spinning ? (0,jsx_runtime.jsx)(PageLoading, objectSpread2_objectSpread2({}, spinProps)) : null;
|
|
52336
52330
|
}, [loading]);
|
|
52337
52331
|
var content = (0,external_React_.useMemo)(function () {
|
|
52338
|
-
|
|
52339
|
-
|
|
52340
|
-
children: [(0,jsx_runtime.jsx)("div", {
|
|
52332
|
+
return children ? (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
52333
|
+
children: (0,jsx_runtime.jsx)("div", {
|
|
52341
52334
|
className: classnames_default()("".concat(basePageContainer, "-children-content ").concat(hashId)),
|
|
52342
|
-
style: {
|
|
52343
|
-
paddingBlock: propsToken === null || propsToken === void 0 ? void 0 : propsToken.paddingBlockPageContainerContent,
|
|
52344
|
-
paddingInline: propsToken === null || propsToken === void 0 ? void 0 : propsToken.paddingInlinePageContainerContent
|
|
52345
|
-
},
|
|
52346
52335
|
children: children
|
|
52347
|
-
})
|
|
52348
|
-
style: {
|
|
52349
|
-
height: 64,
|
|
52350
|
-
marginBlockStart: token === null || token === void 0 ? void 0 : (_token$layout = token.layout) === null || _token$layout === void 0 ? void 0 : (_token$layout$pageCon = _token$layout.pageContainer) === null || _token$layout$pageCon === void 0 ? void 0 : _token$layout$pageCon.paddingBlockPageContainerContent
|
|
52351
|
-
}
|
|
52352
|
-
})]
|
|
52336
|
+
})
|
|
52353
52337
|
}) : null;
|
|
52354
|
-
}, [children, basePageContainer, hashId
|
|
52338
|
+
}, [children, basePageContainer, hashId]);
|
|
52355
52339
|
var renderContentDom = (0,external_React_.useMemo)(function () {
|
|
52356
52340
|
// 只要loadingDom非空我们就渲染loadingDom,否则渲染内容
|
|
52357
52341
|
var dom = loadingDom || content;
|
|
@@ -52371,7 +52355,7 @@ var PageContainerBase = function PageContainerBase(props) {
|
|
|
52371
52355
|
children: [fixedHeader && pageHeaderDom ?
|
|
52372
52356
|
// 在 hasHeader 且 fixedHeader 的情况下,才需要设置高度
|
|
52373
52357
|
(0,jsx_runtime.jsx)(external_antd_.Affix, objectSpread2_objectSpread2(objectSpread2_objectSpread2({
|
|
52374
|
-
offsetTop: value.hasHeader && value.fixedHeader ? token === null || token === void 0 ? void 0 : (_token$
|
|
52358
|
+
offsetTop: value.hasHeader && value.fixedHeader ? token === null || token === void 0 ? void 0 : (_token$layout = token.layout) === null || _token$layout === void 0 ? void 0 : (_token$layout$header = _token$layout.header) === null || _token$layout$header === void 0 ? void 0 : _token$layout$header.heightLayoutHeader : 0
|
|
52375
52359
|
}, affixProps), {}, {
|
|
52376
52360
|
className: "".concat(basePageContainer, "-affix ").concat(hashId),
|
|
52377
52361
|
children: (0,jsx_runtime.jsx)("div", {
|
|
@@ -52553,7 +52537,7 @@ var DefaultFooter = function DefaultFooter(_ref) {
|
|
|
52553
52537
|
|
|
52554
52538
|
var genProLayoutHeaderStyle = function genProLayoutHeaderStyle(token) {
|
|
52555
52539
|
var _token$layout, _token$layout$header, _token$layout2, _token$layout2$header, _token$layout3, _token$layout3$header;
|
|
52556
|
-
return defineProperty_defineProperty({}, token.proLayoutCls, defineProperty_defineProperty({}, ".
|
|
52540
|
+
return defineProperty_defineProperty({}, token.proLayoutCls, defineProperty_defineProperty({}, "".concat(token.antCls, "-layout-header").concat(token.componentCls), {
|
|
52557
52541
|
height: (token === null || token === void 0 ? void 0 : (_token$layout = token.layout) === null || _token$layout === void 0 ? void 0 : (_token$layout$header = _token$layout.header) === null || _token$layout$header === void 0 ? void 0 : _token$layout$header.heightLayoutHeader) || 56,
|
|
52558
52542
|
lineHeight: "".concat((token === null || token === void 0 ? void 0 : (_token$layout2 = token.layout) === null || _token$layout2 === void 0 ? void 0 : (_token$layout2$header = _token$layout2.header) === null || _token$layout2$header === void 0 ? void 0 : _token$layout2$header.heightLayoutHeader) || 56, "px"),
|
|
52559
52543
|
// hitu 用了这个属性,不能删除哦 @南取
|
|
@@ -53428,11 +53412,13 @@ var MenuCounter = createContainer(useMenuCounter);
|
|
|
53428
53412
|
|
|
53429
53413
|
|
|
53430
53414
|
var genProLayoutBaseMenuStyle = function genProLayoutBaseMenuStyle(token) {
|
|
53431
|
-
var _token$layout, _token$layout$sider, _collapsed, _collapsed2, _$concat2, _$concat4;
|
|
53415
|
+
var _token$layout, _token$layout$sider, _collapsed, _collapsed2, _$concat2, _itemTitle, _$concat4;
|
|
53432
53416
|
return defineProperty_defineProperty({}, "".concat(token.componentCls), (_$concat4 = {
|
|
53433
53417
|
background: 'transparent',
|
|
53434
53418
|
border: 'none'
|
|
53435
|
-
}, defineProperty_defineProperty(_$concat4, "
|
|
53419
|
+
}, defineProperty_defineProperty(_$concat4, "".concat(token.componentCls, "-menu-item"), {
|
|
53420
|
+
transition: 'none !important'
|
|
53421
|
+
}), defineProperty_defineProperty(_$concat4, "& &-collapsed", (_collapsed = {}, defineProperty_defineProperty(_collapsed, "".concat(token.antCls, "-menu-item, \n ").concat(token.antCls, "-menu-item-group > ").concat(token.antCls, "-menu-item-group-list > ").concat(token.antCls, "-menu-item, \n ").concat(token.antCls, "-menu-item-group > ").concat(token.antCls, "-menu-item-group-list > ").concat(token.antCls, "-menu-submenu > ").concat(token.antCls, "-menu-submenu-title, \n ").concat(token.antCls, "-menu-submenu > ").concat(token.antCls, "-menu-submenu-title"), {
|
|
53436
53422
|
paddingInline: '0 !important',
|
|
53437
53423
|
height: 'auto !important',
|
|
53438
53424
|
marginBlock: '8px !important'
|
|
@@ -53449,7 +53435,7 @@ var genProLayoutBaseMenuStyle = function genProLayoutBaseMenuStyle(token) {
|
|
|
53449
53435
|
lineHeight: '14px',
|
|
53450
53436
|
height: '14px'
|
|
53451
53437
|
}
|
|
53452
|
-
}), defineProperty_defineProperty(_$concat4, '& &-item-title',
|
|
53438
|
+
}), defineProperty_defineProperty(_$concat4, '& &-item-title', (_itemTitle = {
|
|
53453
53439
|
display: 'flex',
|
|
53454
53440
|
flexDirection: 'row',
|
|
53455
53441
|
alignItems: 'center',
|
|
@@ -53461,7 +53447,11 @@ var genProLayoutBaseMenuStyle = function genProLayoutBaseMenuStyle(token) {
|
|
|
53461
53447
|
}), defineProperty_defineProperty(_collapsed2, "".concat(token.componentCls, "-item-text-has-icon"), {
|
|
53462
53448
|
display: 'none !important'
|
|
53463
53449
|
}), _collapsed2)
|
|
53464
|
-
}, "&".concat(token.componentCls, "-item-
|
|
53450
|
+
}, defineProperty_defineProperty(_itemTitle, "&".concat(token.componentCls, "-group-item-title"), {
|
|
53451
|
+
gap: 4,
|
|
53452
|
+
height: 18,
|
|
53453
|
+
overflow: 'hidden'
|
|
53454
|
+
}), defineProperty_defineProperty(_itemTitle, "&".concat(token.componentCls, "-item-collapsed-show-title"), defineProperty_defineProperty({
|
|
53465
53455
|
lineHeight: '16px',
|
|
53466
53456
|
height: '48px'
|
|
53467
53457
|
}, "&".concat(token.componentCls, "-item-title-collapsed"), (_$concat2 = {
|
|
@@ -53487,7 +53477,7 @@ var genProLayoutBaseMenuStyle = function genProLayoutBaseMenuStyle(token) {
|
|
|
53487
53477
|
margin: 0,
|
|
53488
53478
|
padding: 0,
|
|
53489
53479
|
marginBlockStart: 4
|
|
53490
|
-
}), _$concat2)))), defineProperty_defineProperty(_$concat4, '&-group', defineProperty_defineProperty({}, "".concat(token.antCls, "-menu-item-group-title"), {
|
|
53480
|
+
}), _$concat2))), _itemTitle)), defineProperty_defineProperty(_$concat4, '&-group', defineProperty_defineProperty({}, "".concat(token.antCls, "-menu-item-group-title"), {
|
|
53491
53481
|
fontSize: 12,
|
|
53492
53482
|
color: token.colorTextLabel,
|
|
53493
53483
|
'.anticon': {
|
|
@@ -53601,7 +53591,7 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(props) {
|
|
|
53601
53591
|
var defaultIcon = collapsed && shouldHasIcon ? getMenuTitleSymbol(name) : null;
|
|
53602
53592
|
var defaultTitle = (0,jsx_runtime.jsxs)("div", {
|
|
53603
53593
|
title: name,
|
|
53604
|
-
className: classnames_default()("".concat(baseClassName, "-item-title"), (_this$props3 = _this.props) === null || _this$props3 === void 0 ? void 0 : _this$props3.hashId, (_classNames = {}, defineProperty_defineProperty(_classNames, "".concat(baseClassName, "-item-title-collapsed"), collapsed), defineProperty_defineProperty(_classNames, "".concat(baseClassName, "-item-collapsed-show-title"), (menu === null || menu === void 0 ? void 0 : menu.collapsedShowTitle) && collapsed), _classNames)),
|
|
53594
|
+
className: classnames_default()("".concat(baseClassName, "-item-title"), (_this$props3 = _this.props) === null || _this$props3 === void 0 ? void 0 : _this$props3.hashId, (_classNames = {}, defineProperty_defineProperty(_classNames, "".concat(baseClassName, "-item-title-collapsed"), collapsed), defineProperty_defineProperty(_classNames, "".concat(baseClassName, "-group-item-title"), menuType === 'group'), defineProperty_defineProperty(_classNames, "".concat(baseClassName, "-item-collapsed-show-title"), (menu === null || menu === void 0 ? void 0 : menu.collapsedShowTitle) && collapsed), _classNames)),
|
|
53605
53595
|
children: [menuType === 'group' && collapsed ? null : shouldHasIcon && iconDom ? (0,jsx_runtime.jsx)("span", {
|
|
53606
53596
|
className: "anticon ".concat(baseClassName, "-item-icon ").concat((_this$props4 = _this.props) === null || _this$props4 === void 0 ? void 0 : _this$props4.hashId),
|
|
53607
53597
|
children: iconDom
|
|
@@ -54659,7 +54649,9 @@ var GlobalHeader = function GlobalHeader(props) {
|
|
|
54659
54649
|
prefixCls = props.prefixCls;
|
|
54660
54650
|
var _useContext = (0,external_React_.useContext)(external_antd_.ConfigProvider.ConfigContext),
|
|
54661
54651
|
direction = _useContext.direction;
|
|
54662
|
-
var
|
|
54652
|
+
var _useContext2 = (0,external_React_.useContext)(external_antd_.ConfigProvider.ConfigContext),
|
|
54653
|
+
getPrefixCls = _useContext2.getPrefixCls;
|
|
54654
|
+
var baseClassName = "".concat(prefixCls || getPrefixCls('pro'), "-global-header");
|
|
54663
54655
|
var _useStyle = GlobalHeader_style_useStyle(baseClassName),
|
|
54664
54656
|
wrapSSR = _useStyle.wrapSSR,
|
|
54665
54657
|
hashId = _useStyle.hashId;
|
|
@@ -58200,8 +58192,23 @@ var Logo = function Logo() {
|
|
|
58200
58192
|
|
|
58201
58193
|
|
|
58202
58194
|
|
|
58195
|
+
|
|
58196
|
+
var proLayoutTitleHide = new Keyframes('antBadgeLoadingCircle', {
|
|
58197
|
+
'0%': {
|
|
58198
|
+
display: 'none',
|
|
58199
|
+
opacity: 0
|
|
58200
|
+
},
|
|
58201
|
+
'80%': {
|
|
58202
|
+
display: 'none',
|
|
58203
|
+
opacity: 0
|
|
58204
|
+
},
|
|
58205
|
+
'100%': {
|
|
58206
|
+
display: 'unset',
|
|
58207
|
+
opacity: 1
|
|
58208
|
+
}
|
|
58209
|
+
});
|
|
58203
58210
|
var style_genSiderMenuStyle = function genSiderMenuStyle(token) {
|
|
58204
|
-
var _token$layout, _token$layout$sider, _token$layout2, _token$layout2$sider, _token$layout3, _token$layout3$sider, _token$layout4, _token$layout4$sider, _token$layout5, _token$layout5$sider, _token$layout6, _token$layout6$sider, _token$layout7, _token$layout7$sider, _token$layout8, _token$layout8$sider, _token$layout9, _token$layout9$
|
|
58211
|
+
var _token$layout, _token$layout$sider, _token$layout2, _token$layout2$sider, _token$layout3, _token$layout3$sider, _token$layout4, _token$layout4$sider, _$concat, _token$layout5, _token$layout5$sider, _token$layout6, _token$layout6$sider, _token$layout7, _token$layout7$sider, _token$layout8, _token$layout8$sider, _token$layout9, _token$layout9$sider, _token$layout10, _token$layout10$heade, _token$layout11, _token$layout11$heade, _token$layout12, _token$layout12$sider, _token$componentCls;
|
|
58205
58212
|
return defineProperty_defineProperty({}, token.proComponentsCls, defineProperty_defineProperty({}, "".concat(token.proComponentsCls, "-layout"), defineProperty_defineProperty({}, token.componentCls, (_token$componentCls = {
|
|
58206
58213
|
position: 'relative',
|
|
58207
58214
|
background: ((_token$layout = token.layout) === null || _token$layout === void 0 ? void 0 : (_token$layout$sider = _token$layout.sider) === null || _token$layout$sider === void 0 ? void 0 : _token$layout$sider.colorMenuBackground) || 'transparent',
|
|
@@ -58226,19 +58233,21 @@ var style_genSiderMenuStyle = function genSiderMenuStyle(token) {
|
|
|
58226
58233
|
paddingInline: (_token$layout2 = token.layout) === null || _token$layout2 === void 0 ? void 0 : (_token$layout2$sider = _token$layout2.sider) === null || _token$layout2$sider === void 0 ? void 0 : _token$layout2$sider.paddingInlineLayoutMenu,
|
|
58227
58234
|
paddingBlock: (_token$layout3 = token.layout) === null || _token$layout3 === void 0 ? void 0 : (_token$layout3$sider = _token$layout3.sider) === null || _token$layout3$sider === void 0 ? void 0 : _token$layout3$sider.paddingBlockLayoutMenu,
|
|
58228
58235
|
borderInlineEnd: "1px solid ".concat(token.colorSplit)
|
|
58229
|
-
}), defineProperty_defineProperty(_token$componentCls, "".concat(token.antCls, "-menu"),
|
|
58236
|
+
}), defineProperty_defineProperty(_token$componentCls, "".concat(token.antCls, "-menu"), (_$concat = {}, defineProperty_defineProperty(_$concat, "".concat(token.antCls, "-menu-item-group-title"), {
|
|
58230
58237
|
fontSize: token.fontSizeSM,
|
|
58231
58238
|
paddingBottom: 4
|
|
58232
|
-
})
|
|
58239
|
+
}), defineProperty_defineProperty(_$concat, "".concat(token.antCls, "-menu-item:hover"), {
|
|
58240
|
+
color: token === null || token === void 0 ? void 0 : (_token$layout4 = token.layout) === null || _token$layout4 === void 0 ? void 0 : (_token$layout4$sider = _token$layout4.sider) === null || _token$layout4$sider === void 0 ? void 0 : _token$layout4$sider.colorTextMenuItemHover
|
|
58241
|
+
}), _$concat)), defineProperty_defineProperty(_token$componentCls, '&-logo', {
|
|
58233
58242
|
position: 'relative',
|
|
58234
58243
|
display: 'flex',
|
|
58235
58244
|
alignItems: 'center',
|
|
58236
58245
|
justifyContent: 'space-between',
|
|
58237
58246
|
paddingInline: 12,
|
|
58238
58247
|
paddingBlock: 16,
|
|
58239
|
-
color: (_token$
|
|
58248
|
+
color: (_token$layout5 = token.layout) === null || _token$layout5 === void 0 ? void 0 : (_token$layout5$sider = _token$layout5.sider) === null || _token$layout5$sider === void 0 ? void 0 : _token$layout5$sider.colorTextMenu,
|
|
58240
58249
|
cursor: 'pointer',
|
|
58241
|
-
borderBlockEnd: "1px solid ".concat((_token$
|
|
58250
|
+
borderBlockEnd: "1px solid ".concat((_token$layout6 = token.layout) === null || _token$layout6 === void 0 ? void 0 : (_token$layout6$sider = _token$layout6.sider) === null || _token$layout6$sider === void 0 ? void 0 : _token$layout6$sider.colorMenuItemDivider),
|
|
58242
58251
|
'> a': {
|
|
58243
58252
|
display: 'flex',
|
|
58244
58253
|
alignItems: 'center',
|
|
@@ -58256,7 +58265,7 @@ var style_genSiderMenuStyle = function genSiderMenuStyle(token) {
|
|
|
58256
58265
|
marginBlock: 0,
|
|
58257
58266
|
marginInlineEnd: 0,
|
|
58258
58267
|
marginInlineStart: 6,
|
|
58259
|
-
color: (_token$
|
|
58268
|
+
color: (_token$layout7 = token.layout) === null || _token$layout7 === void 0 ? void 0 : (_token$layout7$sider = _token$layout7.sider) === null || _token$layout7$sider === void 0 ? void 0 : _token$layout7$sider.colorTextMenuTitle,
|
|
58260
58269
|
fontWeight: 600,
|
|
58261
58270
|
fontSize: 16,
|
|
58262
58271
|
lineHeight: '22px',
|
|
@@ -58278,7 +58287,7 @@ var style_genSiderMenuStyle = function genSiderMenuStyle(token) {
|
|
|
58278
58287
|
justifyContent: 'space-between',
|
|
58279
58288
|
marginBlock: 4,
|
|
58280
58289
|
marginInline: 0,
|
|
58281
|
-
color: (_token$
|
|
58290
|
+
color: (_token$layout8 = token.layout) === null || _token$layout8 === void 0 ? void 0 : (_token$layout8$sider = _token$layout8.sider) === null || _token$layout8$sider === void 0 ? void 0 : _token$layout8$sider.colorTextMenu,
|
|
58282
58291
|
'&-collapsed': {
|
|
58283
58292
|
flexDirection: 'column-reverse',
|
|
58284
58293
|
paddingBlock: 0,
|
|
@@ -58287,10 +58296,10 @@ var style_genSiderMenuStyle = function genSiderMenuStyle(token) {
|
|
|
58287
58296
|
transition: 'font-size 0.3s ease-in-out'
|
|
58288
58297
|
},
|
|
58289
58298
|
'&-list': {
|
|
58290
|
-
color: (_token$
|
|
58299
|
+
color: (_token$layout9 = token.layout) === null || _token$layout9 === void 0 ? void 0 : (_token$layout9$sider = _token$layout9.sider) === null || _token$layout9$sider === void 0 ? void 0 : _token$layout9$sider.colorTextMenuSecondary,
|
|
58291
58300
|
'&-collapsed': {
|
|
58292
58301
|
marginBlockEnd: 8,
|
|
58293
|
-
|
|
58302
|
+
animationName: 'none'
|
|
58294
58303
|
},
|
|
58295
58304
|
'&-item': {
|
|
58296
58305
|
paddingInline: 6,
|
|
@@ -58320,8 +58329,8 @@ var style_genSiderMenuStyle = function genSiderMenuStyle(token) {
|
|
|
58320
58329
|
insetInlineStart: "-".concat(token.proLayoutCollapsedWidth - 12, "px"),
|
|
58321
58330
|
position: 'absolute'
|
|
58322
58331
|
}), defineProperty_defineProperty(_token$componentCls, '&-mix', {
|
|
58323
|
-
height: "calc(100% - ".concat((token === null || token === void 0 ? void 0 : (_token$
|
|
58324
|
-
insetBlockStart: "".concat((token === null || token === void 0 ? void 0 : (_token$
|
|
58332
|
+
height: "calc(100% - ".concat((token === null || token === void 0 ? void 0 : (_token$layout10 = token.layout) === null || _token$layout10 === void 0 ? void 0 : (_token$layout10$heade = _token$layout10.header) === null || _token$layout10$heade === void 0 ? void 0 : _token$layout10$heade.heightLayoutHeader) || 56, "px)"),
|
|
58333
|
+
insetBlockStart: "".concat((token === null || token === void 0 ? void 0 : (_token$layout11 = token.layout) === null || _token$layout11 === void 0 ? void 0 : (_token$layout11$heade = _token$layout11.header) === null || _token$layout11$heade === void 0 ? void 0 : _token$layout11$heade.heightLayoutHeader) || 56, "px")
|
|
58325
58334
|
}), defineProperty_defineProperty(_token$componentCls, '&-extra', {
|
|
58326
58335
|
marginBlockEnd: 16,
|
|
58327
58336
|
marginBlock: 0,
|
|
@@ -58339,9 +58348,12 @@ var style_genSiderMenuStyle = function genSiderMenuStyle(token) {
|
|
|
58339
58348
|
boxShadow: 'none',
|
|
58340
58349
|
background: 'transparent'
|
|
58341
58350
|
}), defineProperty_defineProperty(_token$componentCls, '&-footer', {
|
|
58342
|
-
color: (_token$
|
|
58351
|
+
color: (_token$layout12 = token.layout) === null || _token$layout12 === void 0 ? void 0 : (_token$layout12$sider = _token$layout12.sider) === null || _token$layout12$sider === void 0 ? void 0 : _token$layout12$sider.colorTextMenuSecondary,
|
|
58343
58352
|
paddingBlockEnd: 16,
|
|
58344
|
-
fontSize: token.fontSize
|
|
58353
|
+
fontSize: token.fontSize,
|
|
58354
|
+
animationName: proLayoutTitleHide,
|
|
58355
|
+
animationDuration: '.3s',
|
|
58356
|
+
animationTimingFunction: 'ease'
|
|
58345
58357
|
}), _token$componentCls))));
|
|
58346
58358
|
};
|
|
58347
58359
|
function SiderMenu_style_useStyle(prefixCls, _ref2) {
|
|
@@ -58461,7 +58473,7 @@ var SiderMenuWrapper = function SiderMenuWrapper(props) {
|
|
|
58461
58473
|
* @returns
|
|
58462
58474
|
*/
|
|
58463
58475
|
var compatibleStyle = function compatibleStyle(token) {
|
|
58464
|
-
var _token$layout, _token$layout$sider, _token$layout2, _token$layout2$sider, _token$layout3, _token$layout3$sider, _token$layout4, _token$layout4$sider, _token$layout5, _token$layout5$sider, _token$layout6, _token$layout6$sider, _token$layout7, _token$layout7$sider, _token$layout8, _token$layout8$sider, _token$layout9, _token$layout9$sider, _$concat$concat, _token$layout10, _token$layout10$sider, _token$layout11, _token$layout11$sider, _token$layout12, _token$layout12$sider, _token$layout13, _token$layout13$sider, _token$layout14, _token$layout14$sider, _token$layout15, _token$layout15$heade, _token$layout16, _token$layout16$heade, _token$layout17, _token$layout17$heade, _token$layout18, _token$layout18$heade, _token$layout19, _token$layout19$heade, _$concat5, _$concat6, _token$layout20, _token$layout20$heade, _token$layout21, _token$layout21$heade, _token$layout22, _token$layout22$heade, _token$layout23, _token$layout23$heade, _token$layout24, _token$layout24$heade, _token$layout25, _token$layout25$heade, _$concat8, _$concat9, _token$componentCls, _token$layout26, _token$layout26$sider, _token$layout27, _token$layout27$sider, _token$layout28, _token$layout28$sider, _token$layout29, _token$layout29$sider, _token$layout30, _token$layout30$sider, _$concat$concat2, _$concat11, _ref;
|
|
58476
|
+
var _token$layout, _token$layout$sider, _token$layout2, _token$layout2$sider, _token$layout3, _token$layout3$sider, _$concat, _token$layout4, _token$layout4$sider, _token$layout5, _token$layout5$sider, _token$layout6, _token$layout6$sider, _token$layout7, _token$layout7$sider, _token$layout8, _token$layout8$sider, _token$layout9, _token$layout9$sider, _$concat$concat, _token$layout10, _token$layout10$sider, _token$layout11, _token$layout11$sider, _token$layout12, _token$layout12$sider, _token$layout13, _token$layout13$sider, _token$layout14, _token$layout14$sider, _token$layout15, _token$layout15$heade, _token$layout16, _token$layout16$heade, _token$layout17, _token$layout17$heade, _token$layout18, _token$layout18$heade, _token$layout19, _token$layout19$heade, _$concat5, _$concat6, _token$layout20, _token$layout20$heade, _token$layout21, _token$layout21$heade, _token$layout22, _token$layout22$heade, _token$layout23, _token$layout23$heade, _token$layout24, _token$layout24$heade, _token$layout25, _token$layout25$heade, _$concat8, _$concat9, _token$componentCls, _token$layout26, _token$layout26$sider, _token$layout27, _token$layout27$sider, _token$layout28, _token$layout28$sider, _token$layout29, _token$layout29$sider, _token$layout30, _token$layout30$sider, _$concat$concat2, _$concat11, _ref;
|
|
58465
58477
|
if (external_antd_.version.startsWith('5')) {
|
|
58466
58478
|
return {};
|
|
58467
58479
|
}
|
|
@@ -58481,11 +58493,15 @@ var compatibleStyle = function compatibleStyle(token) {
|
|
|
58481
58493
|
width: '100%'
|
|
58482
58494
|
}), defineProperty_defineProperty(_$concat6, "".concat(token.antCls, "-menu-submenu-expand-icon, ").concat(token.antCls, "-menu-submenu-arrow"), {
|
|
58483
58495
|
color: 'inherit'
|
|
58484
|
-
}), defineProperty_defineProperty(_$concat6, "&".concat(token.antCls, "-menu"),
|
|
58496
|
+
}), defineProperty_defineProperty(_$concat6, "&".concat(token.antCls, "-menu"), (_$concat = {
|
|
58485
58497
|
color: token === null || token === void 0 ? void 0 : (_token$layout3 = token.layout) === null || _token$layout3 === void 0 ? void 0 : (_token$layout3$sider = _token$layout3.sider) === null || _token$layout3$sider === void 0 ? void 0 : _token$layout3$sider.colorTextMenu
|
|
58486
|
-
}, "".concat(token.antCls, "-menu-item
|
|
58498
|
+
}, defineProperty_defineProperty(_$concat, "".concat(token.antCls, "-menu-item"), {
|
|
58499
|
+
'*': {
|
|
58500
|
+
transition: 'none !important'
|
|
58501
|
+
}
|
|
58502
|
+
}), defineProperty_defineProperty(_$concat, "".concat(token.antCls, "-menu-item a"), {
|
|
58487
58503
|
color: 'inherit'
|
|
58488
|
-
})), defineProperty_defineProperty(_$concat6, "&".concat(token.antCls, "-menu-inline"), defineProperty_defineProperty({}, "".concat(token.antCls, "-menu-selected::after,").concat(token.antCls, "-menu-item-selected::after"), {
|
|
58504
|
+
}), _$concat)), defineProperty_defineProperty(_$concat6, "&".concat(token.antCls, "-menu-inline"), defineProperty_defineProperty({}, "".concat(token.antCls, "-menu-selected::after,").concat(token.antCls, "-menu-item-selected::after"), {
|
|
58489
58505
|
display: 'none'
|
|
58490
58506
|
})), defineProperty_defineProperty(_$concat6, "".concat(token.antCls, "-menu-sub ").concat(token.antCls, "-menu-inline"), {
|
|
58491
58507
|
backgroundColor: 'transparent!important'
|
|
@@ -58518,11 +58534,13 @@ var compatibleStyle = function compatibleStyle(token) {
|
|
|
58518
58534
|
color: token === null || token === void 0 ? void 0 : (_token$layout14 = token.layout) === null || _token$layout14 === void 0 ? void 0 : (_token$layout14$sider = _token$layout14.sider) === null || _token$layout14$sider === void 0 ? void 0 : _token$layout14$sider.colorTextMenuActive
|
|
58519
58535
|
}), defineProperty_defineProperty(_$concat6, "&".concat(token.antCls, "-menu-horizontal"), (_$concat5 = {}, defineProperty_defineProperty(_$concat5, "".concat(token.antCls, "-menu-item:hover,\n ").concat(token.antCls, "-menu-submenu:hover,\n ").concat(token.antCls, "-menu-item-active,\n ").concat(token.antCls, "-menu-submenu-active"), {
|
|
58520
58536
|
borderRadius: 4,
|
|
58537
|
+
transition: 'none',
|
|
58521
58538
|
color: token === null || token === void 0 ? void 0 : (_token$layout15 = token.layout) === null || _token$layout15 === void 0 ? void 0 : (_token$layout15$heade = _token$layout15.header) === null || _token$layout15$heade === void 0 ? void 0 : _token$layout15$heade.colorTextMenuActive,
|
|
58522
58539
|
backgroundColor: token === null || token === void 0 ? void 0 : (_token$layout16 = token.layout) === null || _token$layout16 === void 0 ? void 0 : (_token$layout16$heade = _token$layout16.header) === null || _token$layout16$heade === void 0 ? void 0 : _token$layout16$heade.colorBgMenuItemHover
|
|
58523
58540
|
}), defineProperty_defineProperty(_$concat5, "".concat(token.antCls, "-menu-item-open,\n ").concat(token.antCls, "-menu-submenu-open,\n ").concat(token.antCls, "-menu-item-selected,\n ").concat(token.antCls, "-menu-submenu-selected"), defineProperty_defineProperty({
|
|
58524
58541
|
backgroundColor: token === null || token === void 0 ? void 0 : (_token$layout17 = token.layout) === null || _token$layout17 === void 0 ? void 0 : (_token$layout17$heade = _token$layout17.header) === null || _token$layout17$heade === void 0 ? void 0 : _token$layout17$heade.colorBgMenuItemSelected,
|
|
58525
58542
|
borderRadius: token.radiusBase,
|
|
58543
|
+
transition: 'none',
|
|
58526
58544
|
color: token === null || token === void 0 ? void 0 : (_token$layout18 = token.layout) === null || _token$layout18 === void 0 ? void 0 : (_token$layout18$heade = _token$layout18.header) === null || _token$layout18$heade === void 0 ? void 0 : _token$layout18$heade.colorTextMenuSelected
|
|
58527
58545
|
}, "".concat(token.antCls, "-menu-submenu-arrow"), {
|
|
58528
58546
|
color: token === null || token === void 0 ? void 0 : (_token$layout19 = token.layout) === null || _token$layout19 === void 0 ? void 0 : (_token$layout19$heade = _token$layout19.header) === null || _token$layout19$heade === void 0 ? void 0 : _token$layout19$heade.colorTextMenuSelected
|
|
@@ -58538,6 +58556,7 @@ var compatibleStyle = function compatibleStyle(token) {
|
|
|
58538
58556
|
})), defineProperty_defineProperty(_$concat9, "&".concat(token.antCls, "-menu-light"), (_$concat8 = {}, defineProperty_defineProperty(_$concat8, "".concat(token.antCls, "-menu-item:hover, \n ").concat(token.antCls, "-menu-item-active,\n ").concat(token.antCls, "-menu-submenu-active, \n ").concat(token.antCls, "-menu-submenu-title:hover"), defineProperty_defineProperty({
|
|
58539
58557
|
color: token === null || token === void 0 ? void 0 : (_token$layout21 = token.layout) === null || _token$layout21 === void 0 ? void 0 : (_token$layout21$heade = _token$layout21.header) === null || _token$layout21$heade === void 0 ? void 0 : _token$layout21$heade.colorTextMenuActive,
|
|
58540
58558
|
borderRadius: token.radiusBase,
|
|
58559
|
+
transition: 'none',
|
|
58541
58560
|
backgroundColor: token === null || token === void 0 ? void 0 : (_token$layout22 = token.layout) === null || _token$layout22 === void 0 ? void 0 : (_token$layout22$heade = _token$layout22.header) === null || _token$layout22$heade === void 0 ? void 0 : _token$layout22$heade.colorBgMenuItemSelected
|
|
58542
58561
|
}, "".concat(token.antCls, "-menu-submenu-arrow"), {
|
|
58543
58562
|
color: token === null || token === void 0 ? void 0 : (_token$layout23 = token.layout) === null || _token$layout23 === void 0 ? void 0 : (_token$layout23$heade = _token$layout23.header) === null || _token$layout23$heade === void 0 ? void 0 : _token$layout23$heade.colorTextMenuActive
|
|
@@ -58979,7 +58998,7 @@ var getpaddingInlineStart = function getpaddingInlineStart(hasLeftPadding, colla
|
|
|
58979
58998
|
* @param props
|
|
58980
58999
|
*/
|
|
58981
59000
|
var BaseProLayout = function BaseProLayout(props) {
|
|
58982
|
-
var _props$prefixCls, _classNames, _location$pathname;
|
|
59001
|
+
var _props$prefixCls, _classNames, _location$pathname, _token$layout, _token$layout$pageCon;
|
|
58983
59002
|
var _ref3 = props || {},
|
|
58984
59003
|
children = _ref3.children,
|
|
58985
59004
|
propsOnCollapse = _ref3.onCollapse,
|
|
@@ -59230,6 +59249,8 @@ var BaseProLayout = function BaseProLayout(props) {
|
|
|
59230
59249
|
}
|
|
59231
59250
|
return null;
|
|
59232
59251
|
}, [bgLayoutImgList]);
|
|
59252
|
+
var _useContext2 = (0,external_React_.useContext)(ProProvider),
|
|
59253
|
+
token = _useContext2.token;
|
|
59233
59254
|
return wrapSSR((0,jsx_runtime.jsx)(MenuCounter.Provider, {
|
|
59234
59255
|
children: (0,jsx_runtime.jsx)(RouteContext.Provider, {
|
|
59235
59256
|
value: objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, defaultProps), {}, {
|
|
@@ -59276,7 +59297,13 @@ var BaseProLayout = function BaseProLayout(props) {
|
|
|
59276
59297
|
prefixCls: proLayoutClassName,
|
|
59277
59298
|
style: contentStyle,
|
|
59278
59299
|
children: loading ? (0,jsx_runtime.jsx)(PageLoading, {}) : children
|
|
59279
|
-
})), footerDom
|
|
59300
|
+
})), footerDom, hasFooterToolbar && (0,jsx_runtime.jsx)("div", {
|
|
59301
|
+
className: "".concat(proLayoutClassName, "-has-footer"),
|
|
59302
|
+
style: {
|
|
59303
|
+
height: 64,
|
|
59304
|
+
marginBlockStart: token === null || token === void 0 ? void 0 : (_token$layout = token.layout) === null || _token$layout === void 0 ? void 0 : (_token$layout$pageCon = _token$layout.pageContainer) === null || _token$layout$pageCon === void 0 ? void 0 : _token$layout$pageCon.paddingBlockPageContainerContent
|
|
59305
|
+
}
|
|
59306
|
+
})]
|
|
59280
59307
|
})]
|
|
59281
59308
|
})]
|
|
59282
59309
|
})
|
|
@@ -59289,7 +59316,7 @@ BaseProLayout.defaultProps = objectSpread2_objectSpread2(objectSpread2_objectSpr
|
|
|
59289
59316
|
location: isBrowser() ? window.location : undefined
|
|
59290
59317
|
});
|
|
59291
59318
|
var ProLayout_ProLayout = function ProLayout(props) {
|
|
59292
|
-
var _process$env$NODE_ENV;
|
|
59319
|
+
var _process$env$NODE_ENV, _tokenContext$token;
|
|
59293
59320
|
var colorPrimary = props.colorPrimary;
|
|
59294
59321
|
var tokenContext = (0,external_React_.useContext)(ProProvider);
|
|
59295
59322
|
return (0,jsx_runtime.jsx)(external_antd_.ConfigProvider
|
|
@@ -59307,9 +59334,9 @@ var ProLayout_ProLayout = function ProLayout(props) {
|
|
|
59307
59334
|
},
|
|
59308
59335
|
children: (0,jsx_runtime.jsx)(ConfigProviderWrap, {
|
|
59309
59336
|
autoClearCache: true,
|
|
59310
|
-
token:
|
|
59311
|
-
layout: props.token
|
|
59312
|
-
}),
|
|
59337
|
+
token: props.token ? merge_merge(tokenContext.token, {
|
|
59338
|
+
layout: merge_merge((_tokenContext$token = tokenContext.token) === null || _tokenContext$token === void 0 ? void 0 : _tokenContext$token.layout, props.token || {})
|
|
59339
|
+
}) : undefined,
|
|
59313
59340
|
children: (0,jsx_runtime.jsx)(BaseProLayout, objectSpread2_objectSpread2({}, props))
|
|
59314
59341
|
})
|
|
59315
59342
|
});
|
|
@@ -63280,7 +63307,10 @@ var style_genProListStyle = function genProListStyle(token) {
|
|
|
63280
63307
|
'&-polling': defineProperty_defineProperty({}, "".concat(token.componentCls, "-list-toolbar-setting-item"), {
|
|
63281
63308
|
'.anticon.anticon-reload': {
|
|
63282
63309
|
transform: 'rotate(0deg)',
|
|
63283
|
-
|
|
63310
|
+
animationName: 'turn',
|
|
63311
|
+
animationDuration: '1s',
|
|
63312
|
+
animationTimingFunction: 'linear',
|
|
63313
|
+
animationIterationCount: 'infinite'
|
|
63284
63314
|
}
|
|
63285
63315
|
}),
|
|
63286
63316
|
'td${token.antCls}-table-cell': {
|
|
@@ -63352,20 +63382,18 @@ var style_genProListStyle = function genProListStyle(token) {
|
|
|
63352
63382
|
'100%': {
|
|
63353
63383
|
transform: 'rotate(360deg)'
|
|
63354
63384
|
}
|
|
63355
|
-
}), defineProperty_defineProperty(_ref, "@media (max-width: ".concat(token.screenXS, ")"), defineProperty_defineProperty({}, token.componentCls, {
|
|
63356
|
-
'
|
|
63357
|
-
|
|
63358
|
-
|
|
63359
|
-
'
|
|
63360
|
-
|
|
63361
|
-
|
|
63362
|
-
'
|
|
63363
|
-
display: 'block'
|
|
63364
|
-
}
|
|
63385
|
+
}), defineProperty_defineProperty(_ref, "@media (max-width: ".concat(token.screenXS, ")"), defineProperty_defineProperty({}, token.componentCls, defineProperty_defineProperty({}, "".concat(token.antCls, "-table"), {
|
|
63386
|
+
width: '100%',
|
|
63387
|
+
overflowX: 'auto',
|
|
63388
|
+
'&-thead > tr,&-tbody > tr': {
|
|
63389
|
+
'> th,> td': {
|
|
63390
|
+
whiteSpace: 'pre',
|
|
63391
|
+
'>span': {
|
|
63392
|
+
display: 'block'
|
|
63365
63393
|
}
|
|
63366
63394
|
}
|
|
63367
63395
|
}
|
|
63368
|
-
})), defineProperty_defineProperty(_ref, '@media (max-width: 575px)', defineProperty_defineProperty({}, "".concat(token.componentCls, "-toolbar"), {
|
|
63396
|
+
}))), defineProperty_defineProperty(_ref, '@media (max-width: 575px)', defineProperty_defineProperty({}, "".concat(token.componentCls, "-toolbar"), {
|
|
63369
63397
|
flexDirection: 'column',
|
|
63370
63398
|
alignItems: 'flex-start',
|
|
63371
63399
|
justifyContent: 'flex-start',
|
|
@@ -65065,7 +65093,11 @@ function DragSortTable_style_useStyle(prefixCls) {
|
|
|
65065
65093
|
;// CONCATENATED MODULE: ./packages/table/es/components/DragSortTable/index.js
|
|
65066
65094
|
|
|
65067
65095
|
|
|
65068
|
-
|
|
65096
|
+
|
|
65097
|
+
|
|
65098
|
+
|
|
65099
|
+
var DragSortTable_excluded = ["rowKey", "dragSortKey", "dragSortHandlerRender", "onDragSortEnd", "onDataSourceChange", "columns", "dataSource", "onLoad"];
|
|
65100
|
+
|
|
65069
65101
|
|
|
65070
65102
|
|
|
65071
65103
|
|
|
@@ -65090,9 +65122,14 @@ function DragSortTable(props) {
|
|
|
65090
65122
|
onDataSourceChange = props.onDataSourceChange,
|
|
65091
65123
|
propsColumns = props.columns,
|
|
65092
65124
|
oriDs = props.dataSource,
|
|
65125
|
+
onLoad = props.onLoad,
|
|
65093
65126
|
otherProps = objectWithoutProperties_objectWithoutProperties(props, DragSortTable_excluded);
|
|
65094
65127
|
var _useContext = (0,external_React_.useContext)(external_antd_.ConfigProvider.ConfigContext),
|
|
65095
65128
|
getPrefixCls = _useContext.getPrefixCls;
|
|
65129
|
+
var _useMergedState = (0,useMergedState/* default */.Z)(oriDs),
|
|
65130
|
+
_useMergedState2 = slicedToArray_slicedToArray(_useMergedState, 2),
|
|
65131
|
+
mergedDs = _useMergedState2[0],
|
|
65132
|
+
setMergedDs = _useMergedState2[1];
|
|
65096
65133
|
// 默认拖拽把手
|
|
65097
65134
|
var DragHandle = (0,external_React_.useMemo)(function () {
|
|
65098
65135
|
return handleCreator((0,jsx_runtime.jsx)(icons_MenuOutlined, {
|
|
@@ -65114,7 +65151,7 @@ function DragSortTable(props) {
|
|
|
65114
65151
|
var originColumnRef = (0,external_React_.useRef)(objectSpread2_objectSpread2({}, handleColumn));
|
|
65115
65152
|
// 使用自定义hooks获取拖拽相关组件的components集合
|
|
65116
65153
|
var _useDragSort = useDragSort({
|
|
65117
|
-
dataSource:
|
|
65154
|
+
dataSource: mergedDs === null || mergedDs === void 0 ? void 0 : mergedDs.slice(),
|
|
65118
65155
|
dragSortKey: dragSortKey,
|
|
65119
65156
|
onDragSortEnd: onDragSortEnd,
|
|
65120
65157
|
components: props.components,
|
|
@@ -65153,16 +65190,37 @@ function DragSortTable(props) {
|
|
|
65153
65190
|
});
|
|
65154
65191
|
});
|
|
65155
65192
|
}, [DragHandle, dragSortHandlerRender, getPrefixCls, handleColumn, isDragSortColumn, propsColumns]);
|
|
65193
|
+
var wrapOnload = /*#__PURE__*/function () {
|
|
65194
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ds) {
|
|
65195
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
65196
|
+
while (1) {
|
|
65197
|
+
switch (_context.prev = _context.next) {
|
|
65198
|
+
case 0:
|
|
65199
|
+
setMergedDs(ds);
|
|
65200
|
+
return _context.abrupt("return", onLoad === null || onLoad === void 0 ? void 0 : onLoad(ds));
|
|
65201
|
+
case 2:
|
|
65202
|
+
case "end":
|
|
65203
|
+
return _context.stop();
|
|
65204
|
+
}
|
|
65205
|
+
}
|
|
65206
|
+
}, _callee);
|
|
65207
|
+
}));
|
|
65208
|
+
return function wrapOnload(_x) {
|
|
65209
|
+
return _ref.apply(this, arguments);
|
|
65210
|
+
};
|
|
65211
|
+
}();
|
|
65156
65212
|
return wrapSSR(handleColumn ? (0,jsx_runtime.jsx)(es_Table, objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, otherProps), {}, {
|
|
65213
|
+
onLoad: wrapOnload,
|
|
65157
65214
|
rowKey: rowKey,
|
|
65158
|
-
dataSource:
|
|
65215
|
+
dataSource: mergedDs,
|
|
65159
65216
|
components: components,
|
|
65160
65217
|
columns: columns,
|
|
65161
65218
|
onDataSourceChange: onDataSourceChange
|
|
65162
65219
|
})) : /* istanbul ignore next */
|
|
65163
65220
|
(0,jsx_runtime.jsx)(es_Table, objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, otherProps), {}, {
|
|
65221
|
+
onLoad: wrapOnload,
|
|
65164
65222
|
rowKey: rowKey,
|
|
65165
|
-
dataSource:
|
|
65223
|
+
dataSource: mergedDs,
|
|
65166
65224
|
columns: columns,
|
|
65167
65225
|
onDataSourceChange: onDataSourceChange
|
|
65168
65226
|
})));
|
|
@@ -73850,6 +73908,17 @@ RcAlign.displayName = 'Align';
|
|
|
73850
73908
|
|
|
73851
73909
|
|
|
73852
73910
|
|
|
73911
|
+
/**
|
|
73912
|
+
* Popup should follow the steps for each component work correctly:
|
|
73913
|
+
* measure - check for the current stretch size
|
|
73914
|
+
* align - let component align the position
|
|
73915
|
+
* aligned - re-align again in case additional className changed the size
|
|
73916
|
+
* afterAlign - choice next step is trigger motion or finished
|
|
73917
|
+
* beforeMotion - should reset motion to invisible so that CSSMotion can do normal motion
|
|
73918
|
+
* motion - play the motion
|
|
73919
|
+
* stable - everything is done
|
|
73920
|
+
*/
|
|
73921
|
+
|
|
73853
73922
|
var StatusQueue = ['measure', 'alignPre', 'align', null, 'motion'];
|
|
73854
73923
|
/* harmony default export */ var useVisibleStatus = (function (visible, doMeasure) {
|
|
73855
73924
|
var _useState = useState_useSafeState(null),
|
|
@@ -74021,6 +74090,11 @@ var PopupInner = /*#__PURE__*/external_React_.forwardRef(function (props, ref) {
|
|
|
74021
74090
|
* We will reset `alignTimes` for each status switch to `alignPre`
|
|
74022
74091
|
* and let `rc-align` to align for multiple times to ensure get final stable place.
|
|
74023
74092
|
* Currently we mark `alignTimes < 2` repeat align, it will increase if user report for align issue.
|
|
74093
|
+
*
|
|
74094
|
+
* Update:
|
|
74095
|
+
* In React 18. `rc-align` effect of align may faster than ref called trigger `forceAlign`.
|
|
74096
|
+
* We adjust this to `alignTimes < 2`.
|
|
74097
|
+
* We need refactor `rc-align` to support mark of `forceAlign` call if this still happen.
|
|
74024
74098
|
*/
|
|
74025
74099
|
|
|
74026
74100
|
var _useState3 = (0,external_React_.useState)(0),
|
|
@@ -74062,7 +74136,7 @@ var PopupInner = /*#__PURE__*/external_React_.forwardRef(function (props, ref) {
|
|
|
74062
74136
|
hooks_useLayoutEffect(function () {
|
|
74063
74137
|
if (status === 'align') {
|
|
74064
74138
|
// Repeat until not more align needed
|
|
74065
|
-
if (alignTimes <
|
|
74139
|
+
if (alignTimes < 3) {
|
|
74066
74140
|
forceAlign();
|
|
74067
74141
|
} else {
|
|
74068
74142
|
goNextStatus(function () {
|
|
@@ -74111,7 +74185,7 @@ var PopupInner = /*#__PURE__*/external_React_.forwardRef(function (props, ref) {
|
|
|
74111
74185
|
}, style); // Align status
|
|
74112
74186
|
|
|
74113
74187
|
var alignDisabled = true;
|
|
74114
|
-
if (
|
|
74188
|
+
if (align !== null && align !== void 0 && align.points && (status === 'align' || status === 'stable')) {
|
|
74115
74189
|
alignDisabled = false;
|
|
74116
74190
|
}
|
|
74117
74191
|
var childNode = children; // Wrapper when multiple children
|
|
@@ -74288,6 +74362,7 @@ var TriggerContext = /*#__PURE__*/external_React_.createContext(null);
|
|
|
74288
74362
|
|
|
74289
74363
|
|
|
74290
74364
|
|
|
74365
|
+
|
|
74291
74366
|
function es_noop() {}
|
|
74292
74367
|
function returnEmptyString() {
|
|
74293
74368
|
return '';
|
|
@@ -74299,10 +74374,10 @@ function returnDocument(element) {
|
|
|
74299
74374
|
return window.document;
|
|
74300
74375
|
}
|
|
74301
74376
|
var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];
|
|
74377
|
+
|
|
74302
74378
|
/**
|
|
74303
74379
|
* Internal usage. Do not use in your code since this will be removed.
|
|
74304
74380
|
*/
|
|
74305
|
-
|
|
74306
74381
|
function generateTrigger(PortalComponent) {
|
|
74307
74382
|
var Trigger = /*#__PURE__*/function (_React$Component) {
|
|
74308
74383
|
_inherits(Trigger, _React$Component);
|
|
@@ -74313,37 +74388,37 @@ function generateTrigger(PortalComponent) {
|
|
|
74313
74388
|
var _this;
|
|
74314
74389
|
_classCallCheck(this, Trigger);
|
|
74315
74390
|
_this = _super.call(this, props);
|
|
74316
|
-
_this
|
|
74317
|
-
_this
|
|
74318
|
-
_this
|
|
74319
|
-
_this
|
|
74320
|
-
_this
|
|
74321
|
-
_this
|
|
74322
|
-
_this
|
|
74323
|
-
_this
|
|
74324
|
-
_this
|
|
74325
|
-
_this
|
|
74326
|
-
_this
|
|
74327
|
-
_this
|
|
74328
|
-
_this
|
|
74329
|
-
_this
|
|
74330
|
-
_this
|
|
74391
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "popupRef", /*#__PURE__*/external_React_.createRef());
|
|
74392
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "triggerRef", /*#__PURE__*/external_React_.createRef());
|
|
74393
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "portalContainer", void 0);
|
|
74394
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "attachId", void 0);
|
|
74395
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "clickOutsideHandler", void 0);
|
|
74396
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "touchOutsideHandler", void 0);
|
|
74397
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "contextMenuOutsideHandler1", void 0);
|
|
74398
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "contextMenuOutsideHandler2", void 0);
|
|
74399
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "mouseDownTimeout", void 0);
|
|
74400
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "focusTime", void 0);
|
|
74401
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "preClickTime", void 0);
|
|
74402
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "preTouchTime", void 0);
|
|
74403
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "delayTimer", void 0);
|
|
74404
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "hasPopupMouseDown", void 0);
|
|
74405
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onMouseEnter", function (e) {
|
|
74331
74406
|
var mouseEnterDelay = _this.props.mouseEnterDelay;
|
|
74332
74407
|
_this.fireEvents('onMouseEnter', e);
|
|
74333
74408
|
_this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);
|
|
74334
|
-
};
|
|
74335
|
-
_this
|
|
74409
|
+
});
|
|
74410
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onMouseMove", function (e) {
|
|
74336
74411
|
_this.fireEvents('onMouseMove', e);
|
|
74337
74412
|
_this.setPoint(e);
|
|
74338
|
-
};
|
|
74339
|
-
_this
|
|
74413
|
+
});
|
|
74414
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onMouseLeave", function (e) {
|
|
74340
74415
|
_this.fireEvents('onMouseLeave', e);
|
|
74341
74416
|
_this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);
|
|
74342
|
-
};
|
|
74343
|
-
_this
|
|
74417
|
+
});
|
|
74418
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onPopupMouseEnter", function () {
|
|
74344
74419
|
_this.clearDelayTimer();
|
|
74345
|
-
};
|
|
74346
|
-
_this
|
|
74420
|
+
});
|
|
74421
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onPopupMouseLeave", function (e) {
|
|
74347
74422
|
var _this$popupRef$curren;
|
|
74348
74423
|
|
|
74349
74424
|
// https://github.com/react-component/trigger/pull/13
|
|
@@ -74352,8 +74427,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74352
74427
|
return;
|
|
74353
74428
|
}
|
|
74354
74429
|
_this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);
|
|
74355
|
-
};
|
|
74356
|
-
_this
|
|
74430
|
+
});
|
|
74431
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onFocus", function (e) {
|
|
74357
74432
|
_this.fireEvents('onFocus', e); // incase focusin and focusout
|
|
74358
74433
|
|
|
74359
74434
|
_this.clearDelayTimer();
|
|
@@ -74361,33 +74436,33 @@ function generateTrigger(PortalComponent) {
|
|
|
74361
74436
|
_this.focusTime = Date.now();
|
|
74362
74437
|
_this.delaySetPopupVisible(true, _this.props.focusDelay);
|
|
74363
74438
|
}
|
|
74364
|
-
};
|
|
74365
|
-
_this
|
|
74439
|
+
});
|
|
74440
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onMouseDown", function (e) {
|
|
74366
74441
|
_this.fireEvents('onMouseDown', e);
|
|
74367
74442
|
_this.preClickTime = Date.now();
|
|
74368
|
-
};
|
|
74369
|
-
_this
|
|
74443
|
+
});
|
|
74444
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onTouchStart", function (e) {
|
|
74370
74445
|
_this.fireEvents('onTouchStart', e);
|
|
74371
74446
|
_this.preTouchTime = Date.now();
|
|
74372
|
-
};
|
|
74373
|
-
_this
|
|
74447
|
+
});
|
|
74448
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onBlur", function (e) {
|
|
74374
74449
|
_this.fireEvents('onBlur', e);
|
|
74375
74450
|
_this.clearDelayTimer();
|
|
74376
74451
|
if (_this.isBlurToHide()) {
|
|
74377
74452
|
_this.delaySetPopupVisible(false, _this.props.blurDelay);
|
|
74378
74453
|
}
|
|
74379
|
-
};
|
|
74380
|
-
_this
|
|
74454
|
+
});
|
|
74455
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onContextMenu", function (e) {
|
|
74381
74456
|
e.preventDefault();
|
|
74382
74457
|
_this.fireEvents('onContextMenu', e);
|
|
74383
74458
|
_this.setPopupVisible(true, e);
|
|
74384
|
-
};
|
|
74385
|
-
_this
|
|
74459
|
+
});
|
|
74460
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onContextMenuClose", function () {
|
|
74386
74461
|
if (_this.isContextMenuToShow()) {
|
|
74387
74462
|
_this.close();
|
|
74388
74463
|
}
|
|
74389
|
-
};
|
|
74390
|
-
_this
|
|
74464
|
+
});
|
|
74465
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onClick", function (event) {
|
|
74391
74466
|
_this.fireEvents('onClick', event); // focus will trigger click
|
|
74392
74467
|
|
|
74393
74468
|
if (_this.focusTime) {
|
|
@@ -74416,8 +74491,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74416
74491
|
if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {
|
|
74417
74492
|
_this.setPopupVisible(!_this.state.popupVisible, event);
|
|
74418
74493
|
}
|
|
74419
|
-
};
|
|
74420
|
-
_this
|
|
74494
|
+
});
|
|
74495
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onPopupMouseDown", function () {
|
|
74421
74496
|
_this.hasPopupMouseDown = true;
|
|
74422
74497
|
clearTimeout(_this.mouseDownTimeout);
|
|
74423
74498
|
_this.mouseDownTimeout = window.setTimeout(function () {
|
|
@@ -74427,8 +74502,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74427
74502
|
var _this$context;
|
|
74428
74503
|
(_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);
|
|
74429
74504
|
}
|
|
74430
|
-
};
|
|
74431
|
-
_this
|
|
74505
|
+
});
|
|
74506
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "onDocumentClick", function (event) {
|
|
74432
74507
|
if (_this.props.mask && !_this.props.maskClosable) {
|
|
74433
74508
|
return;
|
|
74434
74509
|
}
|
|
@@ -74441,8 +74516,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74441
74516
|
(!contains(root, target) || _this.isContextMenuOnly()) && !contains(popupNode, target) && !_this.hasPopupMouseDown) {
|
|
74442
74517
|
_this.close();
|
|
74443
74518
|
}
|
|
74444
|
-
};
|
|
74445
|
-
_this
|
|
74519
|
+
});
|
|
74520
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "getRootDomNode", function () {
|
|
74446
74521
|
var getTriggerDOMNode = _this.props.getTriggerDOMNode;
|
|
74447
74522
|
if (getTriggerDOMNode) {
|
|
74448
74523
|
return getTriggerDOMNode(_this.triggerRef.current);
|
|
@@ -74455,8 +74530,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74455
74530
|
} catch (err) {// Do nothing
|
|
74456
74531
|
}
|
|
74457
74532
|
return external_ReactDOM_default().findDOMNode(_assertThisInitialized(_this));
|
|
74458
|
-
};
|
|
74459
|
-
_this
|
|
74533
|
+
});
|
|
74534
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "getPopupClassNameFromAlign", function (align) {
|
|
74460
74535
|
var className = [];
|
|
74461
74536
|
var _this$props = _this.props,
|
|
74462
74537
|
popupPlacement = _this$props.popupPlacement,
|
|
@@ -74471,8 +74546,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74471
74546
|
className.push(getPopupClassNameFromAlign(align));
|
|
74472
74547
|
}
|
|
74473
74548
|
return className.join(' ');
|
|
74474
|
-
};
|
|
74475
|
-
_this
|
|
74549
|
+
});
|
|
74550
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "getComponent", function () {
|
|
74476
74551
|
var _this$props2 = _this.props,
|
|
74477
74552
|
prefixCls = _this$props2.prefixCls,
|
|
74478
74553
|
destroyPopupOnHide = _this$props2.destroyPopupOnHide,
|
|
@@ -74532,8 +74607,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74532
74607
|
forceRender: forceRender,
|
|
74533
74608
|
onClick: onPopupClick
|
|
74534
74609
|
}), typeof popup === 'function' ? popup() : popup);
|
|
74535
|
-
};
|
|
74536
|
-
_this
|
|
74610
|
+
});
|
|
74611
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "attachParent", function (popupContainer) {
|
|
74537
74612
|
wrapperRaf.cancel(_this.attachId);
|
|
74538
74613
|
var _this$props3 = _this.props,
|
|
74539
74614
|
getPopupContainer = _this$props3.getPopupContainer,
|
|
@@ -74556,8 +74631,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74556
74631
|
_this.attachParent(popupContainer);
|
|
74557
74632
|
});
|
|
74558
74633
|
}
|
|
74559
|
-
};
|
|
74560
|
-
_this
|
|
74634
|
+
});
|
|
74635
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "getContainer", function () {
|
|
74561
74636
|
if (!_this.portalContainer) {
|
|
74562
74637
|
// In React.StrictMode component will call render multiple time in first mount.
|
|
74563
74638
|
// When you want to refactor with FC, useRef will also init multiple time and
|
|
@@ -74576,8 +74651,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74576
74651
|
}
|
|
74577
74652
|
_this.attachParent(_this.portalContainer);
|
|
74578
74653
|
return _this.portalContainer;
|
|
74579
|
-
};
|
|
74580
|
-
_this
|
|
74654
|
+
});
|
|
74655
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "setPoint", function (point) {
|
|
74581
74656
|
var alignPoint = _this.props.alignPoint;
|
|
74582
74657
|
if (!alignPoint || !point) return;
|
|
74583
74658
|
_this.setState({
|
|
@@ -74586,15 +74661,15 @@ function generateTrigger(PortalComponent) {
|
|
|
74586
74661
|
pageY: point.pageY
|
|
74587
74662
|
}
|
|
74588
74663
|
});
|
|
74589
|
-
};
|
|
74590
|
-
_this
|
|
74664
|
+
});
|
|
74665
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "handlePortalUpdate", function () {
|
|
74591
74666
|
if (_this.state.prevPopupVisible !== _this.state.popupVisible) {
|
|
74592
74667
|
_this.props.afterPopupVisibleChange(_this.state.popupVisible);
|
|
74593
74668
|
}
|
|
74594
|
-
};
|
|
74595
|
-
_this
|
|
74669
|
+
});
|
|
74670
|
+
defineProperty_defineProperty(_assertThisInitialized(_this), "triggerContextValue", {
|
|
74596
74671
|
onPopupMouseDown: _this.onPopupMouseDown
|
|
74597
|
-
};
|
|
74672
|
+
});
|
|
74598
74673
|
var _popupVisible;
|
|
74599
74674
|
if ('popupVisible' in props) {
|
|
74600
74675
|
_popupVisible = !!props.popupVisible;
|
|
@@ -74942,8 +75017,8 @@ function generateTrigger(PortalComponent) {
|
|
|
74942
75017
|
}]);
|
|
74943
75018
|
return Trigger;
|
|
74944
75019
|
}(external_React_.Component);
|
|
74945
|
-
Trigger
|
|
74946
|
-
Trigger
|
|
75020
|
+
defineProperty_defineProperty(Trigger, "contextType", context);
|
|
75021
|
+
defineProperty_defineProperty(Trigger, "defaultProps", {
|
|
74947
75022
|
prefixCls: 'rc-trigger-popup',
|
|
74948
75023
|
getPopupClassNameFromAlign: returnEmptyString,
|
|
74949
75024
|
getDocument: returnDocument,
|
|
@@ -74965,7 +75040,7 @@ function generateTrigger(PortalComponent) {
|
|
|
74965
75040
|
showAction: [],
|
|
74966
75041
|
hideAction: [],
|
|
74967
75042
|
autoDestroy: false
|
|
74968
|
-
};
|
|
75043
|
+
});
|
|
74969
75044
|
return Trigger;
|
|
74970
75045
|
}
|
|
74971
75046
|
/* harmony default export */ var rc_trigger_es = (generateTrigger(es_Portal));
|
|
@@ -84896,7 +84971,8 @@ var es_style_genProListStyle = function genProListStyle(token) {
|
|
|
84896
84971
|
backgroundColor: token.colorPrimaryBgHover
|
|
84897
84972
|
}
|
|
84898
84973
|
}), defineProperty_defineProperty(_row, "&".concat(token.componentCls, "-row-type-new"), {
|
|
84899
|
-
|
|
84974
|
+
animationName: 'techUiListActive',
|
|
84975
|
+
animationDuration: '3s'
|
|
84900
84976
|
}), defineProperty_defineProperty(_row, "&".concat(token.componentCls, "-row-type-inline"), defineProperty_defineProperty({}, "".concat(token.componentCls, "-row-title"), {
|
|
84901
84977
|
fontWeight: 'normal'
|
|
84902
84978
|
})), defineProperty_defineProperty(_row, "&".concat(token.componentCls, "-row-type-top"), {
|
|
@@ -85196,17 +85272,17 @@ function BaseProList(props) {
|
|
|
85196
85272
|
/* harmony default export */ var list_es = ((/* unused pure expression or super */ null && (ProList)));
|
|
85197
85273
|
;// CONCATENATED MODULE: ./packages/components/src/version.ts
|
|
85198
85274
|
var version_version = {
|
|
85199
|
-
"@ant-design/pro-card": "2.0.
|
|
85200
|
-
"@ant-design/pro-components": "2.3.
|
|
85201
|
-
"@ant-design/pro-descriptions": "2.0.
|
|
85202
|
-
"@ant-design/pro-field": "2.1.
|
|
85203
|
-
"@ant-design/pro-form": "2.2.
|
|
85204
|
-
"@ant-design/pro-layout": "7.1.
|
|
85205
|
-
"@ant-design/pro-list": "2.0.
|
|
85206
|
-
"@ant-design/pro-provider": "2.0.
|
|
85275
|
+
"@ant-design/pro-card": "2.0.20",
|
|
85276
|
+
"@ant-design/pro-components": "2.3.26",
|
|
85277
|
+
"@ant-design/pro-descriptions": "2.0.22",
|
|
85278
|
+
"@ant-design/pro-field": "2.1.15",
|
|
85279
|
+
"@ant-design/pro-form": "2.2.13",
|
|
85280
|
+
"@ant-design/pro-layout": "7.1.14",
|
|
85281
|
+
"@ant-design/pro-list": "2.0.23",
|
|
85282
|
+
"@ant-design/pro-provider": "2.0.12",
|
|
85207
85283
|
"@ant-design/pro-skeleton": "2.0.4",
|
|
85208
|
-
"@ant-design/pro-table": "3.0
|
|
85209
|
-
"@ant-design/pro-utils": "2.2.
|
|
85284
|
+
"@ant-design/pro-table": "3.1.0",
|
|
85285
|
+
"@ant-design/pro-utils": "2.2.12"
|
|
85210
85286
|
};
|
|
85211
85287
|
;// CONCATENATED MODULE: ./packages/components/src/index.tsx
|
|
85212
85288
|
|