@ant-design/pro-components 2.3.24 → 2.3.26
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 +400 -324
- 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.04),
|
|
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,21 +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
|
-
antCls: antCls
|
|
26486
|
-
}, proProvide.token), {}, {
|
|
26490
|
+
antCls: antCls,
|
|
26487
26491
|
layout: proLayoutTokenMerge
|
|
26488
|
-
}) : objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, proProvide.token), {}, {
|
|
26489
|
-
proComponentsCls: proComponentsCls,
|
|
26490
|
-
antCls: antCls
|
|
26491
26492
|
}),
|
|
26492
|
-
isDeps: true,
|
|
26493
26493
|
intl: intl || zhCNIntl
|
|
26494
26494
|
});
|
|
26495
|
-
}, [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]);
|
|
26496
26496
|
var finalToken = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, (proProvideValue === null || proProvideValue === void 0 ? void 0 : proProvideValue.token) || {}), {}, {
|
|
26497
26497
|
proComponentsCls: proComponentsCls
|
|
26498
26498
|
});
|
|
@@ -26531,13 +26531,12 @@ var ConfigProviderWrap = function ConfigProviderWrap(props) {
|
|
|
26531
26531
|
})
|
|
26532
26532
|
})
|
|
26533
26533
|
}));
|
|
26534
|
-
if (proProvide.isDeps) return provide;
|
|
26535
26534
|
return (0,jsx_runtime.jsx)("div", {
|
|
26536
26535
|
className: "".concat((getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls('pro')) || 'ant-pro').concat(hashId ? ' ' + hashId : ''),
|
|
26537
26536
|
children: provide
|
|
26538
26537
|
});
|
|
26539
26538
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
26540
|
-
}, [autoClearCache, children, getPrefixCls, hashId, locale,
|
|
26539
|
+
}, [autoClearCache, children, getPrefixCls, hashId, locale, proProvideValue, token]);
|
|
26541
26540
|
if (!autoClearCache) return configProviderDom;
|
|
26542
26541
|
return (0,jsx_runtime.jsx)(SWRConfig, {
|
|
26543
26542
|
value: {
|
|
@@ -30491,7 +30490,10 @@ var CheckCard_style_genProStyle = function genProStyle(token) {
|
|
|
30491
30490
|
height: '14px',
|
|
30492
30491
|
marginBlock: '4px',
|
|
30493
30492
|
background: "linear-gradient(90deg, rgba(54, 61, 64, 0.2), rgba(54, 61, 64, 0.4), rgba(54, 61, 64, 0.2))",
|
|
30494
|
-
|
|
30493
|
+
animationName: 'card-loading',
|
|
30494
|
+
animationDuration: '1.4s',
|
|
30495
|
+
animationTimingFunction: 'ease',
|
|
30496
|
+
animationIterationCount: 'infinite'
|
|
30495
30497
|
}), defineProperty_defineProperty(_content, '@keyframes card-loading', {
|
|
30496
30498
|
'0%': {
|
|
30497
30499
|
backgroundPosition: '0 50%'
|
|
@@ -30911,7 +30913,6 @@ var Statistic = function Statistic(props) {
|
|
|
30911
30913
|
className: iconClass,
|
|
30912
30914
|
children: icon
|
|
30913
30915
|
});
|
|
30914
|
-
console.log('classString', classString);
|
|
30915
30916
|
return wrapSSR((0,jsx_runtime.jsxs)("div", {
|
|
30916
30917
|
className: classString,
|
|
30917
30918
|
style: style,
|
|
@@ -31109,7 +31110,10 @@ var Loading_style_genProStyle = function genProStyle(token) {
|
|
|
31109
31110
|
background: "linear-gradient(90deg, rgba(54, 61, 64, 0.2), rgba(54, 61, 64, 0.4), rgba(54, 61, 64, 0.2))",
|
|
31110
31111
|
backgroundSize: '600% 600%',
|
|
31111
31112
|
borderRadius: token.radiusBase,
|
|
31112
|
-
|
|
31113
|
+
animationName: 'card-loading',
|
|
31114
|
+
animationDuration: '1.4s',
|
|
31115
|
+
animationTimingFunction: 'ease',
|
|
31116
|
+
animationIterationCount: 'infinite'
|
|
31113
31117
|
}), defineProperty_defineProperty(_token$componentCls, '@keyframes card-loading', {
|
|
31114
31118
|
'0%': {
|
|
31115
31119
|
backgroundPosition: '0 50%'
|
|
@@ -32272,8 +32276,8 @@ function toArray_toArray(children) {
|
|
|
32272
32276
|
;// CONCATENATED MODULE: ./node_modules/rc-field-form/es/FieldContext.js
|
|
32273
32277
|
|
|
32274
32278
|
|
|
32275
|
-
var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';
|
|
32276
|
-
|
|
32279
|
+
var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';
|
|
32280
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32277
32281
|
var warningFunc = function warningFunc() {
|
|
32278
32282
|
es_warning(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');
|
|
32279
32283
|
};
|
|
@@ -33540,7 +33544,6 @@ function cloneArrayDeep(val) {
|
|
|
33540
33544
|
* 123 => [123]
|
|
33541
33545
|
* ['a', 123] => ['a', 123]
|
|
33542
33546
|
*/
|
|
33543
|
-
|
|
33544
33547
|
function getNamePath(path) {
|
|
33545
33548
|
return typeUtil_toArray(path);
|
|
33546
33549
|
}
|
|
@@ -33573,7 +33576,6 @@ function valueUtil_isObject(obj) {
|
|
|
33573
33576
|
* Copy values into store and return a new values object
|
|
33574
33577
|
* ({ a: 1, b: { c: 2 } }, { a: 4, b: { d: 5 } }) => { a: 4, b: { c: 2, d: 5 } }
|
|
33575
33578
|
*/
|
|
33576
|
-
|
|
33577
33579
|
function internalSetValues(store, values) {
|
|
33578
33580
|
var newStore = Array.isArray(store) ? toConsumableArray_toConsumableArray(store) : objectSpread2_objectSpread2({}, store);
|
|
33579
33581
|
if (!values) {
|
|
@@ -33581,8 +33583,8 @@ function internalSetValues(store, values) {
|
|
|
33581
33583
|
}
|
|
33582
33584
|
Object.keys(values).forEach(function (key) {
|
|
33583
33585
|
var prevValue = newStore[key];
|
|
33584
|
-
var value = values[key];
|
|
33585
|
-
|
|
33586
|
+
var value = values[key];
|
|
33587
|
+
// If both are object (but target is not array), we use recursion to set deep value
|
|
33586
33588
|
var recursive = valueUtil_isObject(prevValue) && valueUtil_isObject(value);
|
|
33587
33589
|
newStore[key] = recursive ? internalSetValues(prevValue, value || {}) : utils_cloneDeep(value); // Clone deep for arrays
|
|
33588
33590
|
});
|
|
@@ -33644,7 +33646,6 @@ function defaultGetValueFromEvent(valuePropName) {
|
|
|
33644
33646
|
* @param moveIndex The index of the item to move. (required)
|
|
33645
33647
|
* @param toIndex The index to move item at moveIndex to. (required)
|
|
33646
33648
|
*/
|
|
33647
|
-
|
|
33648
33649
|
function valueUtil_move(array, moveIndex, toIndex) {
|
|
33649
33650
|
var length = array.length;
|
|
33650
33651
|
if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {
|
|
@@ -33672,14 +33673,13 @@ function valueUtil_move(array, moveIndex, toIndex) {
|
|
|
33672
33673
|
|
|
33673
33674
|
|
|
33674
33675
|
|
|
33675
|
-
// Remove incorrect original ts define
|
|
33676
33676
|
|
|
33677
|
+
// Remove incorrect original ts define
|
|
33677
33678
|
var AsyncValidator = Schema;
|
|
33678
33679
|
/**
|
|
33679
33680
|
* Replace with template.
|
|
33680
33681
|
* `I'm ${name}` + { name: 'bamboo' } = I'm bamboo
|
|
33681
33682
|
*/
|
|
33682
|
-
|
|
33683
33683
|
function replaceMessage(template, kv) {
|
|
33684
33684
|
return template.replace(/\$\{\w+\}/g, function (str) {
|
|
33685
33685
|
var key = str.slice(2, -1);
|
|
@@ -33694,7 +33694,6 @@ function validateRule(_x, _x2, _x3, _x4, _x5) {
|
|
|
33694
33694
|
* We use `async-validator` to validate the value.
|
|
33695
33695
|
* But only check one value in a time to avoid namePath validate issue.
|
|
33696
33696
|
*/
|
|
33697
|
-
|
|
33698
33697
|
function _validateRule() {
|
|
33699
33698
|
_validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {
|
|
33700
33699
|
var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;
|
|
@@ -33705,7 +33704,6 @@ function _validateRule() {
|
|
|
33705
33704
|
cloneRule = objectSpread2_objectSpread2({}, rule); // Bug of `async-validator`
|
|
33706
33705
|
// https://github.com/react-component/field-form/issues/316
|
|
33707
33706
|
// https://github.com/react-component/field-form/issues/313
|
|
33708
|
-
|
|
33709
33707
|
delete cloneRule.ruleIndex;
|
|
33710
33708
|
if (cloneRule.validator) {
|
|
33711
33709
|
originValidator = cloneRule.validator;
|
|
@@ -33717,8 +33715,8 @@ function _validateRule() {
|
|
|
33717
33715
|
return Promise.reject(CODE_LOGIC_ERROR);
|
|
33718
33716
|
}
|
|
33719
33717
|
};
|
|
33720
|
-
}
|
|
33721
|
-
|
|
33718
|
+
}
|
|
33719
|
+
// We should special handle array validate
|
|
33722
33720
|
subRuleField = null;
|
|
33723
33721
|
if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {
|
|
33724
33722
|
subRuleField = cloneRule.defaultField;
|
|
@@ -33785,23 +33783,22 @@ function _validateRule() {
|
|
|
33785
33783
|
return _validateRule.apply(this, arguments);
|
|
33786
33784
|
}
|
|
33787
33785
|
function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {
|
|
33788
|
-
var name = namePath.join('.');
|
|
33789
|
-
|
|
33786
|
+
var name = namePath.join('.');
|
|
33787
|
+
// Fill rule with context
|
|
33790
33788
|
var filledRules = rules.map(function (currentRule, ruleIndex) {
|
|
33791
33789
|
var originValidatorFunc = currentRule.validator;
|
|
33792
33790
|
var cloneRule = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, currentRule), {}, {
|
|
33793
33791
|
ruleIndex: ruleIndex
|
|
33794
|
-
});
|
|
33795
|
-
|
|
33792
|
+
});
|
|
33793
|
+
// Replace validator if needed
|
|
33796
33794
|
if (originValidatorFunc) {
|
|
33797
33795
|
cloneRule.validator = function (rule, val, callback) {
|
|
33798
|
-
var hasPromise = false;
|
|
33799
|
-
|
|
33796
|
+
var hasPromise = false;
|
|
33797
|
+
// Wrap callback only accept when promise not provided
|
|
33800
33798
|
var wrappedCallback = function wrappedCallback() {
|
|
33801
33799
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
33802
33800
|
args[_key] = arguments[_key];
|
|
33803
33801
|
}
|
|
33804
|
-
|
|
33805
33802
|
// Wait a tick to make sure return type is a promise
|
|
33806
33803
|
Promise.resolve().then(function () {
|
|
33807
33804
|
es_warning(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');
|
|
@@ -33809,15 +33806,14 @@ function validateRules(namePath, value, rules, options, validateFirst, messageVa
|
|
|
33809
33806
|
callback.apply(void 0, args);
|
|
33810
33807
|
}
|
|
33811
33808
|
});
|
|
33812
|
-
};
|
|
33813
|
-
|
|
33809
|
+
};
|
|
33810
|
+
// Get promise
|
|
33814
33811
|
var promise = originValidatorFunc(rule, val, wrappedCallback);
|
|
33815
33812
|
hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';
|
|
33816
33813
|
/**
|
|
33817
33814
|
* 1. Use promise as the first priority.
|
|
33818
33815
|
* 2. If promise not exist, use callback with warning instead
|
|
33819
33816
|
*/
|
|
33820
|
-
|
|
33821
33817
|
es_warning(hasPromise, '`callback` is deprecated. Please return a promise instead.');
|
|
33822
33818
|
if (hasPromise) {
|
|
33823
33819
|
promise.then(function () {
|
|
@@ -33842,8 +33838,8 @@ function validateRules(namePath, value, rules, options, validateFirst, messageVa
|
|
|
33842
33838
|
return 1;
|
|
33843
33839
|
}
|
|
33844
33840
|
return -1;
|
|
33845
|
-
});
|
|
33846
|
-
|
|
33841
|
+
});
|
|
33842
|
+
// Do validate rules
|
|
33847
33843
|
var summaryPromise;
|
|
33848
33844
|
if (validateFirst === true) {
|
|
33849
33845
|
// >>>>> Validate by serialization
|
|
@@ -33906,8 +33902,8 @@ function validateRules(namePath, value, rules, options, validateFirst, messageVa
|
|
|
33906
33902
|
// Always change to rejection for Field to catch
|
|
33907
33903
|
return Promise.reject(errors);
|
|
33908
33904
|
});
|
|
33909
|
-
}
|
|
33910
|
-
|
|
33905
|
+
}
|
|
33906
|
+
// Internal catch error to avoid console error log.
|
|
33911
33907
|
summaryPromise.catch(function (e) {
|
|
33912
33908
|
return e;
|
|
33913
33909
|
});
|
|
@@ -33996,12 +33992,11 @@ function requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {
|
|
|
33996
33992
|
} : {});
|
|
33997
33993
|
}
|
|
33998
33994
|
return prevValue !== nextValue;
|
|
33999
|
-
}
|
|
34000
|
-
|
|
33995
|
+
}
|
|
33996
|
+
// We use Class instead of Hooks here since it will cost much code by using Hooks.
|
|
34001
33997
|
var Field = /*#__PURE__*/function (_React$Component) {
|
|
34002
33998
|
_inherits(Field, _React$Component);
|
|
34003
33999
|
var _super = _createSuper(Field);
|
|
34004
|
-
|
|
34005
34000
|
/**
|
|
34006
34001
|
* Follow state should not management in State since it will async update by React.
|
|
34007
34002
|
* This makes first render of form can not get correct state value.
|
|
@@ -34012,12 +34007,13 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34012
34007
|
* Note that we do not think field with `initialValue` is dirty
|
|
34013
34008
|
* but this will be by `isFieldDirty` func.
|
|
34014
34009
|
*/
|
|
34010
|
+
|
|
34015
34011
|
// ============================== Subscriptions ==============================
|
|
34016
34012
|
function Field(props) {
|
|
34017
34013
|
var _this;
|
|
34018
34014
|
_classCallCheck(this, Field);
|
|
34019
|
-
_this = _super.call(this, props);
|
|
34020
|
-
|
|
34015
|
+
_this = _super.call(this, props);
|
|
34016
|
+
// Register on init
|
|
34021
34017
|
_this.state = {
|
|
34022
34018
|
resetCount: 0
|
|
34023
34019
|
};
|
|
@@ -34064,7 +34060,6 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34064
34060
|
/**
|
|
34065
34061
|
* Clean up current node.
|
|
34066
34062
|
*/
|
|
34067
|
-
|
|
34068
34063
|
_this.setState(function (_ref) {
|
|
34069
34064
|
var resetCount = _ref.resetCount;
|
|
34070
34065
|
return {
|
|
@@ -34088,8 +34083,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34088
34083
|
var namePath = _this.getNamePath();
|
|
34089
34084
|
var prevValue = _this.getValue(prevStore);
|
|
34090
34085
|
var curValue = _this.getValue(store);
|
|
34091
|
-
var namePathMatch = namePathList && containsNamePath(namePathList, namePath);
|
|
34092
|
-
|
|
34086
|
+
var namePathMatch = namePathList && containsNamePath(namePathList, namePath);
|
|
34087
|
+
// `setFieldsValue` is a quick access to update related status
|
|
34093
34088
|
if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) {
|
|
34094
34089
|
_this.touched = true;
|
|
34095
34090
|
_this.dirty = true;
|
|
@@ -34113,14 +34108,12 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34113
34108
|
return;
|
|
34114
34109
|
}
|
|
34115
34110
|
break;
|
|
34116
|
-
|
|
34117
34111
|
/**
|
|
34118
34112
|
* In case field with `preserve = false` nest deps like:
|
|
34119
34113
|
* - A = 1 => show B
|
|
34120
34114
|
* - B = 1 => show C
|
|
34121
34115
|
* - Reset A, need clean B, C
|
|
34122
34116
|
*/
|
|
34123
|
-
|
|
34124
34117
|
case 'remove':
|
|
34125
34118
|
{
|
|
34126
34119
|
if (shouldUpdate) {
|
|
@@ -34149,8 +34142,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34149
34142
|
_this.triggerMetaEvent();
|
|
34150
34143
|
_this.reRender();
|
|
34151
34144
|
return;
|
|
34152
|
-
}
|
|
34153
|
-
|
|
34145
|
+
}
|
|
34146
|
+
// Handle update by `setField` with `shouldUpdate`
|
|
34154
34147
|
if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
|
|
34155
34148
|
_this.reRender();
|
|
34156
34149
|
return;
|
|
@@ -34162,10 +34155,10 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34162
34155
|
/**
|
|
34163
34156
|
* Trigger when marked `dependencies` updated. Related fields will all update
|
|
34164
34157
|
*/
|
|
34165
|
-
var dependencyList = dependencies.map(getNamePath);
|
|
34158
|
+
var dependencyList = dependencies.map(getNamePath);
|
|
34159
|
+
// No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be
|
|
34166
34160
|
// emitted earlier and they will work there
|
|
34167
34161
|
// If set it may cause unnecessary twice rerendering
|
|
34168
|
-
|
|
34169
34162
|
if (dependencyList.some(function (dependency) {
|
|
34170
34163
|
return containsNamePath(info.relatedFields, dependency);
|
|
34171
34164
|
})) {
|
|
@@ -34198,8 +34191,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34198
34191
|
_this.validateRules = function (options) {
|
|
34199
34192
|
// We should fixed namePath & value to avoid developer change then by form function
|
|
34200
34193
|
var namePath = _this.getNamePath();
|
|
34201
|
-
var currentValue = _this.getValue();
|
|
34202
|
-
|
|
34194
|
+
var currentValue = _this.getValue();
|
|
34195
|
+
// Force change to async to avoid rule OOD under renderProps field
|
|
34203
34196
|
var rootPromise = Promise.resolve().then(function () {
|
|
34204
34197
|
if (!_this.mounted) {
|
|
34205
34198
|
return [];
|
|
@@ -34213,6 +34206,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34213
34206
|
var filteredRules = _this.getRules();
|
|
34214
34207
|
if (triggerName) {
|
|
34215
34208
|
filteredRules = filteredRules.filter(function (rule) {
|
|
34209
|
+
return rule;
|
|
34210
|
+
}).filter(function (rule) {
|
|
34216
34211
|
var validateTrigger = rule.validateTrigger;
|
|
34217
34212
|
if (!validateTrigger) {
|
|
34218
34213
|
return true;
|
|
@@ -34228,8 +34223,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34228
34223
|
var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;
|
|
34229
34224
|
if (_this.validatePromise === rootPromise) {
|
|
34230
34225
|
var _ruleErrors$forEach;
|
|
34231
|
-
_this.validatePromise = null;
|
|
34232
|
-
|
|
34226
|
+
_this.validatePromise = null;
|
|
34227
|
+
// Get errors & warnings
|
|
34233
34228
|
var nextErrors = [];
|
|
34234
34229
|
var nextWarnings = [];
|
|
34235
34230
|
(_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 ? void 0 : _ruleErrors$forEach.call(ruleErrors, function (_ref3) {
|
|
@@ -34254,8 +34249,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34254
34249
|
_this.dirty = true;
|
|
34255
34250
|
_this.errors = EMPTY_ERRORS;
|
|
34256
34251
|
_this.warnings = EMPTY_ERRORS;
|
|
34257
|
-
_this.triggerMetaEvent();
|
|
34258
|
-
|
|
34252
|
+
_this.triggerMetaEvent();
|
|
34253
|
+
// Force trigger re-render since we need sync renderProps with new meta
|
|
34259
34254
|
_this.reRender();
|
|
34260
34255
|
return rootPromise;
|
|
34261
34256
|
};
|
|
@@ -34269,8 +34264,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34269
34264
|
// Touched or validate or has initialValue
|
|
34270
34265
|
if (_this.dirty || _this.props.initialValue !== undefined) {
|
|
34271
34266
|
return true;
|
|
34272
|
-
}
|
|
34273
|
-
|
|
34267
|
+
}
|
|
34268
|
+
// Form set initialValue
|
|
34274
34269
|
var fieldContext = _this.props.fieldContext;
|
|
34275
34270
|
var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),
|
|
34276
34271
|
getInitialValue = _fieldContext$getInte.getInitialValue;
|
|
@@ -34313,8 +34308,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34313
34308
|
return objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, _this.getOnlyChild(children(_this.getControlled(), meta, _this.props.fieldContext))), {}, {
|
|
34314
34309
|
isFunction: true
|
|
34315
34310
|
});
|
|
34316
|
-
}
|
|
34317
|
-
|
|
34311
|
+
}
|
|
34312
|
+
// Filed element only
|
|
34318
34313
|
var childList = toArray_toArray(children);
|
|
34319
34314
|
if (childList.length !== 1 || ! /*#__PURE__*/external_React_.isValidElement(childList[0])) {
|
|
34320
34315
|
return {
|
|
@@ -34351,11 +34346,11 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34351
34346
|
var value = _this.getValue();
|
|
34352
34347
|
var mergedGetValueProps = getValueProps || function (val) {
|
|
34353
34348
|
return defineProperty_defineProperty({}, valuePropName, val);
|
|
34354
|
-
};
|
|
34355
|
-
|
|
34349
|
+
};
|
|
34350
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34356
34351
|
var originTriggerFunc = childProps[trigger];
|
|
34357
|
-
var control = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, childProps), mergedGetValueProps(value));
|
|
34358
|
-
|
|
34352
|
+
var control = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, childProps), mergedGetValueProps(value));
|
|
34353
|
+
// Add trigger
|
|
34359
34354
|
control[trigger] = function () {
|
|
34360
34355
|
// Mark as touched
|
|
34361
34356
|
_this.touched = true;
|
|
@@ -34381,8 +34376,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34381
34376
|
if (originTriggerFunc) {
|
|
34382
34377
|
originTriggerFunc.apply(void 0, args);
|
|
34383
34378
|
}
|
|
34384
|
-
};
|
|
34385
|
-
|
|
34379
|
+
};
|
|
34380
|
+
// Add validateTrigger
|
|
34386
34381
|
var validateTriggerList = typeUtil_toArray(mergedValidateTrigger || []);
|
|
34387
34382
|
validateTriggerList.forEach(function (triggerName) {
|
|
34388
34383
|
// Wrap additional function of component, so that we can get latest value from store
|
|
@@ -34390,8 +34385,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34390
34385
|
control[triggerName] = function () {
|
|
34391
34386
|
if (originTrigger) {
|
|
34392
34387
|
originTrigger.apply(void 0, arguments);
|
|
34393
|
-
}
|
|
34394
|
-
|
|
34388
|
+
}
|
|
34389
|
+
// Always use latest rules
|
|
34395
34390
|
var rules = _this.props.rules;
|
|
34396
34391
|
if (rules && rules.length) {
|
|
34397
34392
|
// We dispatch validate to root,
|
|
@@ -34420,15 +34415,15 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34420
34415
|
var _this$props7 = this.props,
|
|
34421
34416
|
shouldUpdate = _this$props7.shouldUpdate,
|
|
34422
34417
|
fieldContext = _this$props7.fieldContext;
|
|
34423
|
-
this.mounted = true;
|
|
34424
|
-
|
|
34418
|
+
this.mounted = true;
|
|
34419
|
+
// Register on init
|
|
34425
34420
|
if (fieldContext) {
|
|
34426
34421
|
var getInternalHooks = fieldContext.getInternalHooks;
|
|
34427
34422
|
var _getInternalHooks3 = getInternalHooks(HOOK_MARK),
|
|
34428
34423
|
registerField = _getInternalHooks3.registerField;
|
|
34429
34424
|
this.cancelRegisterFunc = registerField(this);
|
|
34430
|
-
}
|
|
34431
|
-
|
|
34425
|
+
}
|
|
34426
|
+
// One more render for component in case fields not ready
|
|
34432
34427
|
if (shouldUpdate === true) {
|
|
34433
34428
|
this.reRender();
|
|
34434
34429
|
}
|
|
@@ -34453,8 +34448,8 @@ var Field = /*#__PURE__*/function (_React$Component) {
|
|
|
34453
34448
|
var children = this.props.children;
|
|
34454
34449
|
var _this$getOnlyChild = this.getOnlyChild(children),
|
|
34455
34450
|
child = _this$getOnlyChild.child,
|
|
34456
|
-
isFunction = _this$getOnlyChild.isFunction;
|
|
34457
|
-
|
|
34451
|
+
isFunction = _this$getOnlyChild.isFunction;
|
|
34452
|
+
// Not need to `cloneElement` since user can handle this in render function self
|
|
34458
34453
|
var returnChildNode;
|
|
34459
34454
|
if (isFunction) {
|
|
34460
34455
|
returnChildNode = child;
|
|
@@ -34484,9 +34479,9 @@ function WrapperField(_ref5) {
|
|
|
34484
34479
|
var key = 'keep';
|
|
34485
34480
|
if (!restProps.isListField) {
|
|
34486
34481
|
key = "_".concat((namePath || []).join('_'));
|
|
34487
|
-
}
|
|
34482
|
+
}
|
|
34483
|
+
// Warning if it's a directly list field.
|
|
34488
34484
|
// We can still support multiple level field preserve.
|
|
34489
|
-
|
|
34490
34485
|
if (false) {}
|
|
34491
34486
|
return /*#__PURE__*/external_React_.createElement(Field, extends_extends({
|
|
34492
34487
|
key: key,
|
|
@@ -34529,8 +34524,8 @@ var List = function List(_ref) {
|
|
|
34529
34524
|
return objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, context), {}, {
|
|
34530
34525
|
prefixName: prefixName
|
|
34531
34526
|
});
|
|
34532
|
-
}, [context, prefixName]);
|
|
34533
|
-
|
|
34527
|
+
}, [context, prefixName]);
|
|
34528
|
+
// List context
|
|
34534
34529
|
var listContext = external_React_.useMemo(function () {
|
|
34535
34530
|
return {
|
|
34536
34531
|
getKey: function getKey(namePath) {
|
|
@@ -34539,8 +34534,8 @@ var List = function List(_ref) {
|
|
|
34539
34534
|
return [keyManager.keys[pathName], namePath.slice(len + 1)];
|
|
34540
34535
|
}
|
|
34541
34536
|
};
|
|
34542
|
-
}, [prefixName]);
|
|
34543
|
-
|
|
34537
|
+
}, [prefixName]);
|
|
34538
|
+
// User should not pass `children` as other type.
|
|
34544
34539
|
if (typeof children !== 'function') {
|
|
34545
34540
|
es_warning(false, 'Form.List only accepts function as children.');
|
|
34546
34541
|
return null;
|
|
@@ -34575,7 +34570,6 @@ var List = function List(_ref) {
|
|
|
34575
34570
|
/**
|
|
34576
34571
|
* Always get latest value in case user update fields by `form` api.
|
|
34577
34572
|
*/
|
|
34578
|
-
|
|
34579
34573
|
var operations = {
|
|
34580
34574
|
add: function add(defaultValue, index) {
|
|
34581
34575
|
// Mapping keys
|
|
@@ -34598,8 +34592,8 @@ var List = function List(_ref) {
|
|
|
34598
34592
|
}
|
|
34599
34593
|
keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {
|
|
34600
34594
|
return !indexSet.has(keysIndex);
|
|
34601
|
-
});
|
|
34602
|
-
|
|
34595
|
+
});
|
|
34596
|
+
// Trigger store change
|
|
34603
34597
|
onChange(newValue.filter(function (_, valueIndex) {
|
|
34604
34598
|
return !indexSet.has(valueIndex);
|
|
34605
34599
|
}));
|
|
@@ -34608,13 +34602,13 @@ var List = function List(_ref) {
|
|
|
34608
34602
|
if (from === to) {
|
|
34609
34603
|
return;
|
|
34610
34604
|
}
|
|
34611
|
-
var newValue = getNewValue();
|
|
34612
|
-
|
|
34605
|
+
var newValue = getNewValue();
|
|
34606
|
+
// Do not handle out of range
|
|
34613
34607
|
if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {
|
|
34614
34608
|
return;
|
|
34615
34609
|
}
|
|
34616
|
-
keyManager.keys = valueUtil_move(keyManager.keys, from, to);
|
|
34617
|
-
|
|
34610
|
+
keyManager.keys = valueUtil_move(keyManager.keys, from, to);
|
|
34611
|
+
// Trigger store change
|
|
34618
34612
|
onChange(valueUtil_move(newValue, from, to));
|
|
34619
34613
|
}
|
|
34620
34614
|
};
|
|
@@ -34676,17 +34670,16 @@ var SPLIT = '__@field_split__';
|
|
|
34676
34670
|
/**
|
|
34677
34671
|
* Convert name path into string to fast the fetch speed of Map.
|
|
34678
34672
|
*/
|
|
34679
|
-
|
|
34680
34673
|
function NameMap_normalize(namePath) {
|
|
34681
34674
|
return namePath.map(function (cell) {
|
|
34682
34675
|
return "".concat(typeof_typeof(cell), ":").concat(cell);
|
|
34683
|
-
})
|
|
34676
|
+
})
|
|
34677
|
+
// Magic split
|
|
34684
34678
|
.join(SPLIT);
|
|
34685
34679
|
}
|
|
34686
34680
|
/**
|
|
34687
34681
|
* NameMap like a `Map` but accepts `string[]` as key.
|
|
34688
34682
|
*/
|
|
34689
|
-
|
|
34690
34683
|
var NameMap = /*#__PURE__*/function () {
|
|
34691
34684
|
function NameMap() {
|
|
34692
34685
|
_classCallCheck(this, NameMap);
|
|
@@ -34717,7 +34710,8 @@ var NameMap = /*#__PURE__*/function () {
|
|
|
34717
34710
|
key: "delete",
|
|
34718
34711
|
value: function _delete(key) {
|
|
34719
34712
|
this.kvs.delete(NameMap_normalize(key));
|
|
34720
|
-
}
|
|
34713
|
+
}
|
|
34714
|
+
// Since we only use this in test, let simply realize this
|
|
34721
34715
|
}, {
|
|
34722
34716
|
key: "map",
|
|
34723
34717
|
value: function map(callback) {
|
|
@@ -34833,10 +34827,10 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
34833
34827
|
_this.initialValues = initialValues || {};
|
|
34834
34828
|
if (init) {
|
|
34835
34829
|
var _this$prevWithoutPres;
|
|
34836
|
-
var nextStore = setValues({}, initialValues, _this.store);
|
|
34830
|
+
var nextStore = setValues({}, initialValues, _this.store);
|
|
34831
|
+
// We will take consider prev form unmount fields.
|
|
34837
34832
|
// When the field is not `preserve`, we need fill this with initialValues instead of store.
|
|
34838
34833
|
// eslint-disable-next-line array-callback-return
|
|
34839
|
-
|
|
34840
34834
|
(_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 ? void 0 : _this$prevWithoutPres.map(function (_ref) {
|
|
34841
34835
|
var namePath = _ref.key;
|
|
34842
34836
|
nextStore = setValue(nextStore, namePath, valueUtil_getValue(initialValues, namePath));
|
|
@@ -34855,8 +34849,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
34855
34849
|
_this.prevWithoutPreserves = prevWithoutPreserves;
|
|
34856
34850
|
};
|
|
34857
34851
|
this.getInitialValue = function (namePath) {
|
|
34858
|
-
var initValue = valueUtil_getValue(_this.initialValues, namePath);
|
|
34859
|
-
|
|
34852
|
+
var initValue = valueUtil_getValue(_this.initialValues, namePath);
|
|
34853
|
+
// Not cloneDeep when without `namePath`
|
|
34860
34854
|
return namePath.length ? utils_cloneDeep(initValue) : initValue;
|
|
34861
34855
|
};
|
|
34862
34856
|
this.setCallbacks = function (callbacks) {
|
|
@@ -34879,7 +34873,6 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
34879
34873
|
};
|
|
34880
34874
|
this.notifyWatch = function () {
|
|
34881
34875
|
var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
34882
|
-
|
|
34883
34876
|
// No need to cost perf when nothing need to watch
|
|
34884
34877
|
if (_this.watchList.length) {
|
|
34885
34878
|
var values = _this.getFieldsValue();
|
|
@@ -34934,9 +34927,9 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
34934
34927
|
var filteredNameList = [];
|
|
34935
34928
|
fieldEntities.forEach(function (entity) {
|
|
34936
34929
|
var _entity$isListField;
|
|
34937
|
-
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,
|
|
34938
34932
|
// since parent field is already take in count
|
|
34939
|
-
|
|
34940
34933
|
if (!nameList && ((_entity$isListField = entity.isListField) === null || _entity$isListField === void 0 ? void 0 : _entity$isListField.call(entity))) {
|
|
34941
34934
|
return;
|
|
34942
34935
|
}
|
|
@@ -35012,19 +35005,19 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35012
35005
|
var fieldEntities = _this.getFieldEntities(true);
|
|
35013
35006
|
var isFieldTouched = function isFieldTouched(field) {
|
|
35014
35007
|
return field.isFieldTouched();
|
|
35015
|
-
};
|
|
35016
|
-
|
|
35008
|
+
};
|
|
35009
|
+
// ===== Will get fully compare when not config namePathList =====
|
|
35017
35010
|
if (!namePathList) {
|
|
35018
35011
|
return isAllFieldsTouched ? fieldEntities.every(isFieldTouched) : fieldEntities.some(isFieldTouched);
|
|
35019
|
-
}
|
|
35020
|
-
|
|
35012
|
+
}
|
|
35013
|
+
// Generate a nest tree for validate
|
|
35021
35014
|
var map = new utils_NameMap();
|
|
35022
35015
|
namePathList.forEach(function (shortNamePath) {
|
|
35023
35016
|
map.set(shortNamePath, []);
|
|
35024
35017
|
});
|
|
35025
35018
|
fieldEntities.forEach(function (field) {
|
|
35026
|
-
var fieldNamePath = field.getNamePath();
|
|
35027
|
-
|
|
35019
|
+
var fieldNamePath = field.getNamePath();
|
|
35020
|
+
// Find matched entity and put into list
|
|
35028
35021
|
namePathList.forEach(function (shortNamePath) {
|
|
35029
35022
|
if (shortNamePath.every(function (nameUnit, i) {
|
|
35030
35023
|
return fieldNamePath[i] === nameUnit;
|
|
@@ -35034,8 +35027,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35034
35027
|
});
|
|
35035
35028
|
}
|
|
35036
35029
|
});
|
|
35037
|
-
});
|
|
35038
|
-
|
|
35030
|
+
});
|
|
35031
|
+
// Check if NameMap value is touched
|
|
35039
35032
|
var isNamePathListTouched = function isNamePathListTouched(entities) {
|
|
35040
35033
|
return entities.some(isFieldTouched);
|
|
35041
35034
|
};
|
|
@@ -35074,8 +35067,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35074
35067
|
var fieldEntities = _this.getFieldEntities(true);
|
|
35075
35068
|
fieldEntities.forEach(function (field) {
|
|
35076
35069
|
var initialValue = field.props.initialValue;
|
|
35077
|
-
var namePath = field.getNamePath();
|
|
35078
|
-
|
|
35070
|
+
var namePath = field.getNamePath();
|
|
35071
|
+
// Record only if has `initialValue`
|
|
35079
35072
|
if (initialValue !== undefined) {
|
|
35080
35073
|
var records = cache.get(namePath) || new Set();
|
|
35081
35074
|
records.add({
|
|
@@ -35084,8 +35077,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35084
35077
|
});
|
|
35085
35078
|
cache.set(namePath, records);
|
|
35086
35079
|
}
|
|
35087
|
-
});
|
|
35088
|
-
|
|
35080
|
+
});
|
|
35081
|
+
// Reset
|
|
35089
35082
|
var resetWithFields = function resetWithFields(entities) {
|
|
35090
35083
|
entities.forEach(function (field) {
|
|
35091
35084
|
var initialValue = field.props.initialValue;
|
|
@@ -35101,8 +35094,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35101
35094
|
// Warning if multiple field set `initialValue`and do not modify value
|
|
35102
35095
|
es_warning(false, "Multiple Field with path '".concat(namePath.join('.'), "' set 'initialValue'. Can not decide which one to pick."));
|
|
35103
35096
|
} else if (records) {
|
|
35104
|
-
var originValue = _this.getFieldValue(namePath);
|
|
35105
|
-
|
|
35097
|
+
var originValue = _this.getFieldValue(namePath);
|
|
35098
|
+
// Set `initialValue`
|
|
35106
35099
|
if (!info.skipExist || originValue === undefined) {
|
|
35107
35100
|
_this.updateStore(setValue(_this.store, namePath, toConsumableArray_toConsumableArray(records)[0].value));
|
|
35108
35101
|
}
|
|
@@ -35141,8 +35134,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35141
35134
|
});
|
|
35142
35135
|
_this.notifyWatch();
|
|
35143
35136
|
return;
|
|
35144
|
-
}
|
|
35145
|
-
|
|
35137
|
+
}
|
|
35138
|
+
// Reset by `nameList`
|
|
35146
35139
|
var namePathList = nameList.map(getNamePath);
|
|
35147
35140
|
namePathList.forEach(function (namePath) {
|
|
35148
35141
|
var initialValue = _this.getInitialValue(namePath);
|
|
@@ -35165,8 +35158,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35165
35158
|
errors = fieldData.errors,
|
|
35166
35159
|
data = objectWithoutProperties_objectWithoutProperties(fieldData, useForm_excluded);
|
|
35167
35160
|
var namePath = getNamePath(name);
|
|
35168
|
-
namePathList.push(namePath);
|
|
35169
|
-
|
|
35161
|
+
namePathList.push(namePath);
|
|
35162
|
+
// Value
|
|
35170
35163
|
if ('value' in data) {
|
|
35171
35164
|
_this.updateStore(setValue(_this.store, namePath, data.value));
|
|
35172
35165
|
}
|
|
@@ -35210,8 +35203,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35210
35203
|
this.registerField = function (entity) {
|
|
35211
35204
|
_this.fieldEntities.push(entity);
|
|
35212
35205
|
var namePath = entity.getNamePath();
|
|
35213
|
-
_this.notifyWatch([namePath]);
|
|
35214
|
-
|
|
35206
|
+
_this.notifyWatch([namePath]);
|
|
35207
|
+
// Set initial values
|
|
35215
35208
|
if (entity.props.initialValue !== undefined) {
|
|
35216
35209
|
var prevStore = _this.store;
|
|
35217
35210
|
_this.resetWithFieldInitialValue({
|
|
@@ -35222,14 +35215,14 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35222
35215
|
type: 'valueUpdate',
|
|
35223
35216
|
source: 'internal'
|
|
35224
35217
|
});
|
|
35225
|
-
}
|
|
35226
|
-
|
|
35218
|
+
}
|
|
35219
|
+
// un-register field callback
|
|
35227
35220
|
return function (isListField, preserve) {
|
|
35228
35221
|
var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
35229
35222
|
_this.fieldEntities = _this.fieldEntities.filter(function (item) {
|
|
35230
35223
|
return item !== entity;
|
|
35231
|
-
});
|
|
35232
|
-
|
|
35224
|
+
});
|
|
35225
|
+
// Clean up store value if not preserve
|
|
35233
35226
|
if (!_this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {
|
|
35234
35227
|
var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);
|
|
35235
35228
|
if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {
|
|
@@ -35239,12 +35232,12 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35239
35232
|
);
|
|
35240
35233
|
})) {
|
|
35241
35234
|
var _prevStore = _this.store;
|
|
35242
|
-
_this.updateStore(setValue(_prevStore, namePath, defaultValue, true));
|
|
35243
|
-
|
|
35235
|
+
_this.updateStore(setValue(_prevStore, namePath, defaultValue, true));
|
|
35236
|
+
// Notify that field is unmount
|
|
35244
35237
|
_this.notifyObservers(_prevStore, [namePath], {
|
|
35245
35238
|
type: 'remove'
|
|
35246
|
-
});
|
|
35247
|
-
|
|
35239
|
+
});
|
|
35240
|
+
// Dependencies update
|
|
35248
35241
|
_this.triggerDependenciesUpdate(_prevStore, namePath);
|
|
35249
35242
|
}
|
|
35250
35243
|
}
|
|
@@ -35269,7 +35262,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35269
35262
|
});
|
|
35270
35263
|
break;
|
|
35271
35264
|
}
|
|
35272
|
-
default:
|
|
35265
|
+
default:
|
|
35266
|
+
// Currently we don't have other action. Do nothing.
|
|
35273
35267
|
}
|
|
35274
35268
|
};
|
|
35275
35269
|
|
|
@@ -35305,10 +35299,10 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35305
35299
|
type: 'valueUpdate',
|
|
35306
35300
|
source: 'internal'
|
|
35307
35301
|
});
|
|
35308
|
-
_this.notifyWatch([namePath]);
|
|
35309
|
-
|
|
35310
|
-
var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);
|
|
35311
|
-
|
|
35302
|
+
_this.notifyWatch([namePath]);
|
|
35303
|
+
// Dependencies update
|
|
35304
|
+
var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);
|
|
35305
|
+
// trigger callback function
|
|
35312
35306
|
var onValuesChange = _this.callbacks.onValuesChange;
|
|
35313
35307
|
if (onValuesChange) {
|
|
35314
35308
|
var changedValues = cloneByNamePathList(_this.store, [namePath]);
|
|
@@ -35343,7 +35337,6 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35343
35337
|
* Generate maps
|
|
35344
35338
|
* Can use cache to save perf if user report performance issue with this
|
|
35345
35339
|
*/
|
|
35346
|
-
|
|
35347
35340
|
_this.getFieldEntities().forEach(function (field) {
|
|
35348
35341
|
var dependencies = field.props.dependencies;
|
|
35349
35342
|
(dependencies || []).forEach(function (dependency) {
|
|
@@ -35378,7 +35371,6 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35378
35371
|
/**
|
|
35379
35372
|
* Fill errors since `fields` may be replaced by controlled fields
|
|
35380
35373
|
*/
|
|
35381
|
-
|
|
35382
35374
|
if (filedErrors) {
|
|
35383
35375
|
var cache = new utils_NameMap();
|
|
35384
35376
|
filedErrors.forEach(function (_ref4) {
|
|
@@ -35401,8 +35393,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35401
35393
|
this.validateFields = function (nameList, options) {
|
|
35402
35394
|
_this.warningUnhooked();
|
|
35403
35395
|
var provideNameList = !!nameList;
|
|
35404
|
-
var namePathList = provideNameList ? nameList.map(getNamePath) : [];
|
|
35405
|
-
|
|
35396
|
+
var namePathList = provideNameList ? nameList.map(getNamePath) : [];
|
|
35397
|
+
// Collect result in promise list
|
|
35406
35398
|
var promiseList = [];
|
|
35407
35399
|
_this.getFieldEntities(true).forEach(function (field) {
|
|
35408
35400
|
// Add field if not provide `nameList`
|
|
@@ -35413,7 +35405,6 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35413
35405
|
* Recursive validate if configured.
|
|
35414
35406
|
* TODO: perf improvement @zombieJ
|
|
35415
35407
|
*/
|
|
35416
|
-
|
|
35417
35408
|
if ((options === null || options === void 0 ? void 0 : options.recursive) && provideNameList) {
|
|
35418
35409
|
var namePath = field.getNamePath();
|
|
35419
35410
|
if (
|
|
@@ -35424,18 +35415,18 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35424
35415
|
})) {
|
|
35425
35416
|
namePathList.push(namePath);
|
|
35426
35417
|
}
|
|
35427
|
-
}
|
|
35428
|
-
|
|
35418
|
+
}
|
|
35419
|
+
// Skip if without rule
|
|
35429
35420
|
if (!field.props.rules || !field.props.rules.length) {
|
|
35430
35421
|
return;
|
|
35431
35422
|
}
|
|
35432
|
-
var fieldNamePath = field.getNamePath();
|
|
35433
|
-
|
|
35423
|
+
var fieldNamePath = field.getNamePath();
|
|
35424
|
+
// Add field validate rule in to promise list
|
|
35434
35425
|
if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) {
|
|
35435
35426
|
var promise = field.validateRules(objectSpread2_objectSpread2({
|
|
35436
35427
|
validateMessages: objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, defaultValidateMessages), _this.validateMessages)
|
|
35437
|
-
}, options));
|
|
35438
|
-
|
|
35428
|
+
}, options));
|
|
35429
|
+
// Wrap promise with field
|
|
35439
35430
|
promiseList.push(promise.then(function () {
|
|
35440
35431
|
return {
|
|
35441
35432
|
name: fieldNamePath,
|
|
@@ -35471,8 +35462,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35471
35462
|
}
|
|
35472
35463
|
});
|
|
35473
35464
|
var summaryPromise = allPromiseFinish(promiseList);
|
|
35474
|
-
_this.lastValidatePromise = summaryPromise;
|
|
35475
|
-
|
|
35465
|
+
_this.lastValidatePromise = summaryPromise;
|
|
35466
|
+
// Notify fields with rule that validate has finished and need update
|
|
35476
35467
|
summaryPromise.catch(function (results) {
|
|
35477
35468
|
return results;
|
|
35478
35469
|
}).then(function (results) {
|
|
@@ -35499,8 +35490,8 @@ var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {
|
|
|
35499
35490
|
errorFields: errorList,
|
|
35500
35491
|
outOfDate: _this.lastValidatePromise !== summaryPromise
|
|
35501
35492
|
});
|
|
35502
|
-
});
|
|
35503
|
-
|
|
35493
|
+
});
|
|
35494
|
+
// Do not throw in console
|
|
35504
35495
|
returnPromise.catch(function (e) {
|
|
35505
35496
|
return e;
|
|
35506
35497
|
});
|
|
@@ -35633,9 +35624,9 @@ var Form = function Form(_ref, ref) {
|
|
|
35633
35624
|
_onFinish = _ref.onFinish,
|
|
35634
35625
|
onFinishFailed = _ref.onFinishFailed,
|
|
35635
35626
|
restProps = objectWithoutProperties_objectWithoutProperties(_ref, Form_excluded);
|
|
35636
|
-
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:
|
|
35637
35629
|
// https://reactjs.org/docs/context.html#contextprovider
|
|
35638
|
-
|
|
35639
35630
|
var _useForm = es_useForm(form),
|
|
35640
35631
|
_useForm2 = slicedToArray_slicedToArray(_useForm, 1),
|
|
35641
35632
|
formInstance = _useForm2[0];
|
|
@@ -35645,19 +35636,19 @@ var Form = function Form(_ref, ref) {
|
|
|
35645
35636
|
setCallbacks = _formInstance$getInte.setCallbacks,
|
|
35646
35637
|
setValidateMessages = _formInstance$getInte.setValidateMessages,
|
|
35647
35638
|
setPreserve = _formInstance$getInte.setPreserve,
|
|
35648
|
-
destroyForm = _formInstance$getInte.destroyForm;
|
|
35649
|
-
|
|
35639
|
+
destroyForm = _formInstance$getInte.destroyForm;
|
|
35640
|
+
// Pass ref with form instance
|
|
35650
35641
|
external_React_.useImperativeHandle(ref, function () {
|
|
35651
35642
|
return formInstance;
|
|
35652
|
-
});
|
|
35653
|
-
|
|
35643
|
+
});
|
|
35644
|
+
// Register form into Context
|
|
35654
35645
|
external_React_.useEffect(function () {
|
|
35655
35646
|
formContext.registerForm(name, formInstance);
|
|
35656
35647
|
return function () {
|
|
35657
35648
|
formContext.unregisterForm(name);
|
|
35658
35649
|
};
|
|
35659
|
-
}, [formContext, formInstance, name]);
|
|
35660
|
-
|
|
35650
|
+
}, [formContext, formInstance, name]);
|
|
35651
|
+
// Pass props to store
|
|
35661
35652
|
setValidateMessages(objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, formContext.validateMessages), validateMessages));
|
|
35662
35653
|
setCallbacks({
|
|
35663
35654
|
onValuesChange: onValuesChange,
|
|
@@ -35678,8 +35669,8 @@ var Form = function Form(_ref, ref) {
|
|
|
35678
35669
|
},
|
|
35679
35670
|
onFinishFailed: onFinishFailed
|
|
35680
35671
|
});
|
|
35681
|
-
setPreserve(preserve);
|
|
35682
|
-
|
|
35672
|
+
setPreserve(preserve);
|
|
35673
|
+
// Set initial value, init store value when first mount
|
|
35683
35674
|
var mountRef = external_React_.useRef(null);
|
|
35684
35675
|
setInitialValues(initialValues, !mountRef.current);
|
|
35685
35676
|
if (!mountRef.current) {
|
|
@@ -35689,8 +35680,8 @@ var Form = function Form(_ref, ref) {
|
|
|
35689
35680
|
return destroyForm;
|
|
35690
35681
|
},
|
|
35691
35682
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35692
|
-
[]);
|
|
35693
|
-
|
|
35683
|
+
[]);
|
|
35684
|
+
// Prepare children by `children` type
|
|
35694
35685
|
var childrenNode;
|
|
35695
35686
|
var childrenRenderProps = typeof children === 'function';
|
|
35696
35687
|
if (childrenRenderProps) {
|
|
@@ -35698,10 +35689,10 @@ var Form = function Form(_ref, ref) {
|
|
|
35698
35689
|
childrenNode = children(values, formInstance);
|
|
35699
35690
|
} else {
|
|
35700
35691
|
childrenNode = children;
|
|
35701
|
-
}
|
|
35702
|
-
|
|
35703
|
-
useSubscribe(!childrenRenderProps);
|
|
35704
|
-
|
|
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
|
|
35705
35696
|
var prevFieldsRef = external_React_.useRef();
|
|
35706
35697
|
external_React_.useEffect(function () {
|
|
35707
35698
|
if (!isSimilar(prevFieldsRef.current || [], fields || [])) {
|
|
@@ -35767,8 +35758,8 @@ function useWatch() {
|
|
|
35767
35758
|
valueStrRef.current = valueStr;
|
|
35768
35759
|
var fieldContext = (0,external_React_.useContext)(FieldContext);
|
|
35769
35760
|
var formInstance = form || fieldContext;
|
|
35770
|
-
var isValidForm = formInstance && formInstance._init;
|
|
35771
|
-
|
|
35761
|
+
var isValidForm = formInstance && formInstance._init;
|
|
35762
|
+
// Warning if not exist form instance
|
|
35772
35763
|
if (false) {}
|
|
35773
35764
|
var namePath = getNamePath(dependencies);
|
|
35774
35765
|
var namePathRef = (0,external_React_.useRef)(namePath);
|
|
@@ -35784,14 +35775,14 @@ function useWatch() {
|
|
|
35784
35775
|
registerWatch = _getInternalHooks.registerWatch;
|
|
35785
35776
|
var cancelRegister = registerWatch(function (store) {
|
|
35786
35777
|
var newValue = valueUtil_getValue(store, namePathRef.current);
|
|
35787
|
-
var nextValueStr = useWatch_stringify(newValue);
|
|
35788
|
-
|
|
35778
|
+
var nextValueStr = useWatch_stringify(newValue);
|
|
35779
|
+
// Compare stringify in case it's nest object
|
|
35789
35780
|
if (valueStrRef.current !== nextValueStr) {
|
|
35790
35781
|
valueStrRef.current = nextValueStr;
|
|
35791
35782
|
setValue(newValue);
|
|
35792
35783
|
}
|
|
35793
|
-
});
|
|
35794
|
-
|
|
35784
|
+
});
|
|
35785
|
+
// TODO: We can improve this perf in future
|
|
35795
35786
|
var initialValue = valueUtil_getValue(getFieldsValue(), namePathRef.current);
|
|
35796
35787
|
setValue(initialValue);
|
|
35797
35788
|
return cancelRegister;
|
|
@@ -49436,7 +49427,7 @@ function BaseForm(props) {
|
|
|
49436
49427
|
form: form
|
|
49437
49428
|
}, omit_js_es(propRest, ['labelWidth', 'autoFocusFirstInput'])), {}, {
|
|
49438
49429
|
// 组合 urlSearch 和 initialValues
|
|
49439
|
-
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),
|
|
49440
49431
|
onValuesChange: function onValuesChange(changedValues, values) {
|
|
49441
49432
|
var _propRest$onValuesCha;
|
|
49442
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));
|
|
@@ -51869,9 +51860,7 @@ var PageHeader = function PageHeader(props) {
|
|
|
51869
51860
|
prefixCls: prefixCls
|
|
51870
51861
|
}), defaultBreadcrumbDom)) !== null && _breadcrumbRender !== void 0 ? _breadcrumbRender : defaultBreadcrumbDom;
|
|
51871
51862
|
var breadcrumbDom = isBreadcrumbComponent ? breadcrumb : breadcrumbRenderDomFromProps;
|
|
51872
|
-
var className = classnames_default()(prefixCls, customizeClassName, (_classNames = {
|
|
51873
|
-
hashId: hashId
|
|
51874
|
-
}, defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-has-breadcrumb"), !!breadcrumbDom), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-has-footer"), !!footer), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-compact"), compact), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-ghost"), true), _classNames));
|
|
51863
|
+
var className = classnames_default()(prefixCls, hashId, customizeClassName, (_classNames = {}, defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-has-breadcrumb"), !!breadcrumbDom), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-has-footer"), !!footer), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-compact"), compact), defineProperty_defineProperty(_classNames, "".concat(prefixCls, "-ghost"), true), _classNames));
|
|
51875
51864
|
var title = renderTitle(prefixCls, props, direction, hashId);
|
|
51876
51865
|
var childDom = children && renderChildren(prefixCls, children, hashId);
|
|
51877
51866
|
var footerDom = renderFooter(prefixCls, footer, hashId);
|
|
@@ -52272,8 +52261,8 @@ var memoRenderPageHeader = function memoRenderPageHeader(props) {
|
|
|
52272
52261
|
children: (header === null || header === void 0 ? void 0 : header.children) || renderPageHeader(content, extraContent, prefixedClassName, hashId)
|
|
52273
52262
|
}));
|
|
52274
52263
|
};
|
|
52275
|
-
var
|
|
52276
|
-
var _restProps$header2,
|
|
52264
|
+
var PageContainerBase = function PageContainerBase(props) {
|
|
52265
|
+
var _restProps$header2, _classNames, _token$layout, _token$layout$header;
|
|
52277
52266
|
var children = props.children,
|
|
52278
52267
|
_props$loading = props.loading,
|
|
52279
52268
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
@@ -52340,23 +52329,13 @@ var PageContainer = function PageContainer(props) {
|
|
|
52340
52329
|
return spinProps.spinning ? (0,jsx_runtime.jsx)(PageLoading, objectSpread2_objectSpread2({}, spinProps)) : null;
|
|
52341
52330
|
}, [loading]);
|
|
52342
52331
|
var content = (0,external_React_.useMemo)(function () {
|
|
52343
|
-
|
|
52344
|
-
|
|
52345
|
-
children: [(0,jsx_runtime.jsx)("div", {
|
|
52332
|
+
return children ? (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
52333
|
+
children: (0,jsx_runtime.jsx)("div", {
|
|
52346
52334
|
className: classnames_default()("".concat(basePageContainer, "-children-content ").concat(hashId)),
|
|
52347
|
-
style: {
|
|
52348
|
-
paddingBlock: propsToken === null || propsToken === void 0 ? void 0 : propsToken.paddingBlockPageContainerContent,
|
|
52349
|
-
paddingInline: propsToken === null || propsToken === void 0 ? void 0 : propsToken.paddingInlinePageContainerContent
|
|
52350
|
-
},
|
|
52351
52335
|
children: children
|
|
52352
|
-
})
|
|
52353
|
-
style: {
|
|
52354
|
-
height: 64,
|
|
52355
|
-
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
|
|
52356
|
-
}
|
|
52357
|
-
})]
|
|
52336
|
+
})
|
|
52358
52337
|
}) : null;
|
|
52359
|
-
}, [children, basePageContainer, hashId
|
|
52338
|
+
}, [children, basePageContainer, hashId]);
|
|
52360
52339
|
var renderContentDom = (0,external_React_.useMemo)(function () {
|
|
52361
52340
|
// 只要loadingDom非空我们就渲染loadingDom,否则渲染内容
|
|
52362
52341
|
var dom = loadingDom || content;
|
|
@@ -52369,15 +52348,14 @@ var PageContainer = function PageContainer(props) {
|
|
|
52369
52348
|
return dom;
|
|
52370
52349
|
}, [props.waterMarkProps, value.waterMarkProps, loadingDom, content]);
|
|
52371
52350
|
var containerClassName = classnames_default()(basePageContainer, hashId, className, (_classNames = {}, defineProperty_defineProperty(_classNames, "".concat(basePageContainer, "-with-footer"), footer), defineProperty_defineProperty(_classNames, "".concat(basePageContainer, "-with-affix"), fixedHeader && pageHeaderDom), _classNames));
|
|
52372
|
-
return wrapSSR((0,jsx_runtime.jsxs)(
|
|
52373
|
-
needDeps: true,
|
|
52351
|
+
return wrapSSR((0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
52374
52352
|
children: [(0,jsx_runtime.jsxs)("div", {
|
|
52375
52353
|
style: style,
|
|
52376
52354
|
className: containerClassName,
|
|
52377
52355
|
children: [fixedHeader && pageHeaderDom ?
|
|
52378
52356
|
// 在 hasHeader 且 fixedHeader 的情况下,才需要设置高度
|
|
52379
52357
|
(0,jsx_runtime.jsx)(external_antd_.Affix, objectSpread2_objectSpread2(objectSpread2_objectSpread2({
|
|
52380
|
-
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
|
|
52381
52359
|
}, affixProps), {}, {
|
|
52382
52360
|
className: "".concat(basePageContainer, "-affix ").concat(hashId),
|
|
52383
52361
|
children: (0,jsx_runtime.jsx)("div", {
|
|
@@ -52393,6 +52371,12 @@ var PageContainer = function PageContainer(props) {
|
|
|
52393
52371
|
})]
|
|
52394
52372
|
}));
|
|
52395
52373
|
};
|
|
52374
|
+
var PageContainer = function PageContainer(props) {
|
|
52375
|
+
return (0,jsx_runtime.jsx)(ConfigProviderWrap, {
|
|
52376
|
+
needDeps: true,
|
|
52377
|
+
children: (0,jsx_runtime.jsx)(PageContainerBase, objectSpread2_objectSpread2({}, props))
|
|
52378
|
+
});
|
|
52379
|
+
};
|
|
52396
52380
|
var ProPageHeader = function ProPageHeader(props) {
|
|
52397
52381
|
var value = (0,external_React_.useContext)(RouteContext);
|
|
52398
52382
|
return memoRenderPageHeader(objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, props), {}, {
|
|
@@ -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.19",
|
|
85276
|
+
"@ant-design/pro-components": "2.3.25",
|
|
85277
|
+
"@ant-design/pro-descriptions": "2.0.21",
|
|
85278
|
+
"@ant-design/pro-field": "2.1.14",
|
|
85279
|
+
"@ant-design/pro-form": "2.2.12",
|
|
85280
|
+
"@ant-design/pro-layout": "7.1.13",
|
|
85281
|
+
"@ant-design/pro-list": "2.0.22",
|
|
85282
|
+
"@ant-design/pro-provider": "2.0.11",
|
|
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.0.22",
|
|
85285
|
+
"@ant-design/pro-utils": "2.2.11"
|
|
85210
85286
|
};
|
|
85211
85287
|
;// CONCATENATED MODULE: ./packages/components/src/index.tsx
|
|
85212
85288
|
|