shineout 3.9.3-beta.1 → 3.9.3-beta.10
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/cjs/index.js +1 -1
- package/dist/shineout.js +154 -98
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.9.3-beta.
|
|
525
|
+
version: '3.9.3-beta.10'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -4548,15 +4548,14 @@ const figma = [
|
|
|
4548
4548
|
{
|
|
4549
4549
|
name: 'Shadow-4',
|
|
4550
4550
|
value: '0px -2px 10px rgba(232, 235, 240, 0.8)',
|
|
4551
|
-
describe: '
|
|
4551
|
+
describe: '详情页底部按钮模块阴影(向上)',
|
|
4552
4552
|
token: 'Shadow-4',
|
|
4553
4553
|
locked: true,
|
|
4554
4554
|
},
|
|
4555
4555
|
{
|
|
4556
4556
|
name: 'Shadow-5',
|
|
4557
|
-
value:
|
|
4558
|
-
|
|
4559
|
-
describe: 'Switch圆圈阴影',
|
|
4557
|
+
value: '0px 2px 10px rgba(232, 235, 240, 0.8)',
|
|
4558
|
+
describe: '详情页底部按钮模块阴影(向下)',
|
|
4560
4559
|
token: 'Shadow-5',
|
|
4561
4560
|
locked: true,
|
|
4562
4561
|
},
|
|
@@ -12402,17 +12401,21 @@ var handleStyle = function handleStyle(style) {
|
|
|
12402
12401
|
};
|
|
12403
12402
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12404
12403
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12405
|
-
/* harmony default export */ var version = ('3.9.3-beta.
|
|
12404
|
+
/* harmony default export */ var version = ('3.9.3-beta.10');
|
|
12406
12405
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12407
12406
|
|
|
12408
12407
|
|
|
12409
12408
|
|
|
12410
12409
|
|
|
12410
|
+
|
|
12411
12411
|
var jss_style_prefix = 'soui';
|
|
12412
12412
|
var jss_style_config = {};
|
|
12413
12413
|
var setJssConfig = function setJssConfig(newConfig) {
|
|
12414
12414
|
Object.assign(jss_style_config, newConfig);
|
|
12415
12415
|
};
|
|
12416
|
+
var getJssConfig = function getJssConfig() {
|
|
12417
|
+
return jss_style_config;
|
|
12418
|
+
};
|
|
12416
12419
|
var stringToHash = function stringToHash(str) {
|
|
12417
12420
|
var hash = 0;
|
|
12418
12421
|
if (str.length === 0) return '';
|
|
@@ -12446,12 +12449,27 @@ var createClassname = function createClassname(rule, sheet) {
|
|
|
12446
12449
|
// };
|
|
12447
12450
|
|
|
12448
12451
|
var styled = function styled(style, ns) {
|
|
12452
|
+
var styleElement = typeof window !== 'undefined' ? document.createElement('style') : undefined;
|
|
12449
12453
|
var hoc = createUseStyles(jss_style_handleStyle(style), {
|
|
12450
12454
|
name: ns,
|
|
12451
|
-
generateId: createClassname
|
|
12455
|
+
generateId: createClassname,
|
|
12456
|
+
element: styleElement
|
|
12452
12457
|
});
|
|
12453
12458
|
var styledCacheMap = {};
|
|
12459
|
+
var attributesApplied = false;
|
|
12454
12460
|
var getClassName = function getClassName() {
|
|
12461
|
+
if (!attributesApplied && styleElement) {
|
|
12462
|
+
var jssConfig = getJssConfig();
|
|
12463
|
+
if (jssConfig.styleAttributes) {
|
|
12464
|
+
Object.entries(jssConfig.styleAttributes).forEach(function (_ref) {
|
|
12465
|
+
var _ref2 = slicedToArray_default()(_ref, 2),
|
|
12466
|
+
key = _ref2[0],
|
|
12467
|
+
value = _ref2[1];
|
|
12468
|
+
styleElement.setAttribute(key, value);
|
|
12469
|
+
});
|
|
12470
|
+
}
|
|
12471
|
+
attributesApplied = true;
|
|
12472
|
+
}
|
|
12455
12473
|
var classes = hoc();
|
|
12456
12474
|
if (styledCacheMap[ns]) {
|
|
12457
12475
|
return styledCacheMap[ns];
|
|
@@ -12793,7 +12811,7 @@ var Token = {
|
|
|
12793
12811
|
'Shadow-2': '0px 4px 10px rgba(2, 11, 24, 0.1)',
|
|
12794
12812
|
'Shadow-3': '0px 8px 20px rgba(2, 11, 24, 0.1)',
|
|
12795
12813
|
'Shadow-4': '0px -2px 10px rgba(232, 235, 240, 0.8)',
|
|
12796
|
-
'Shadow-5': '
|
|
12814
|
+
'Shadow-5': '0px 2px 10px rgba(232, 235, 240, 0.8)',
|
|
12797
12815
|
'Line-height-dynamic': 'calc( 1em + 8px )',
|
|
12798
12816
|
'Line-height-dynamic-min': 'calc( max(1em, 14px) + 8px )',
|
|
12799
12817
|
Transparent: 'transparent',
|
|
@@ -14774,7 +14792,7 @@ var switchTokens = {
|
|
|
14774
14792
|
switchPaddingY: 'Spacing-2',
|
|
14775
14793
|
switchCircleSize: 'Size-9',
|
|
14776
14794
|
switchCircleFill: 'Neutral-text-1',
|
|
14777
|
-
switchCircleShadow: 'Shadow-
|
|
14795
|
+
switchCircleShadow: 'Shadow-3',
|
|
14778
14796
|
switchWidth: 'Size-21',
|
|
14779
14797
|
switchTextPaddingLeft: 'Spacing-8',
|
|
14780
14798
|
switchTextPaddingRight: 'Spacing-4',
|
|
@@ -24114,7 +24132,7 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
24114
24132
|
fontSize: src.selectSmallFontSize
|
|
24115
24133
|
},
|
|
24116
24134
|
'& $optionGroupTitle': {
|
|
24117
|
-
padding: "".concat(src.
|
|
24135
|
+
padding: "calc(".concat(src.selectFontSize, " - 10px) ").concat(src.selectGroupTitlePaddingX, " 0 ").concat(src.selectGroupTitlePaddingX)
|
|
24118
24136
|
}
|
|
24119
24137
|
},
|
|
24120
24138
|
pickerLarge: {
|
|
@@ -24126,7 +24144,7 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
24126
24144
|
fontSize: src.selectLargeFontSize
|
|
24127
24145
|
},
|
|
24128
24146
|
'& $optionGroupTitle': {
|
|
24129
|
-
padding: "".concat(src.
|
|
24147
|
+
padding: "calc(".concat(src.selectFontSize, " + 2px) ").concat(src.selectGroupTitlePaddingX, " ").concat(src.selectGroupTitleLargeBottom, " ").concat(src.selectGroupTitlePaddingX)
|
|
24130
24148
|
}
|
|
24131
24149
|
},
|
|
24132
24150
|
iconWrapper: {
|
|
@@ -24343,7 +24361,7 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
24343
24361
|
optionGroupTitle: {
|
|
24344
24362
|
fontSize: src.selectGroupTitleFontSize,
|
|
24345
24363
|
lineHeight: src.lineHeightDynamic,
|
|
24346
|
-
padding: "calc(".concat(src.
|
|
24364
|
+
padding: "calc(".concat(src.selectFontSize, " - 4px) ").concat(src.selectGroupTitlePaddingX, " ").concat(src.selectGroupTitlePaddingBottom, " ").concat(src.selectGroupTitlePaddingX),
|
|
24347
24365
|
color: src.selectGroupTitleFontColor,
|
|
24348
24366
|
fontWeight: src.selectGroupTitleFontWeight
|
|
24349
24367
|
},
|
|
@@ -26541,12 +26559,13 @@ var switchStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26541
26559
|
backgroundColor: src.switchDisabledCircleCheckedFill
|
|
26542
26560
|
},
|
|
26543
26561
|
'$wrapperDisabled &': {
|
|
26562
|
+
boxShadow: 'none',
|
|
26544
26563
|
backgroundColor: src.switchCheckedDisabledCircleFill
|
|
26545
26564
|
},
|
|
26546
26565
|
borderRadius: '50%',
|
|
26547
26566
|
position: 'absolute',
|
|
26548
26567
|
backgroundColor: src.switchCircleFill,
|
|
26549
|
-
|
|
26568
|
+
boxShadow: src.switchCircleShadow,
|
|
26550
26569
|
transition: "left ".concat(switch_transition, ", right ").concat(switch_transition)
|
|
26551
26570
|
},
|
|
26552
26571
|
content: {
|
|
@@ -40998,13 +41017,32 @@ var useTree = function useTree(props) {
|
|
|
40998
41017
|
}
|
|
40999
41018
|
});
|
|
41000
41019
|
};
|
|
41020
|
+
var getChildrenFromTiledData = function getChildrenFromTiledData(id) {
|
|
41021
|
+
if (!props.tiledData) return undefined;
|
|
41022
|
+
var findById = function findById(data, targetId) {
|
|
41023
|
+
for (var i = 0; i < data.length; i++) {
|
|
41024
|
+
var current = data[i];
|
|
41025
|
+
var currentId = getKey(current, '', i);
|
|
41026
|
+
if (currentId === targetId) return current;
|
|
41027
|
+
if (current[childrenKey]) {
|
|
41028
|
+
var found = findById(current[childrenKey], targetId);
|
|
41029
|
+
if (found) return found;
|
|
41030
|
+
}
|
|
41031
|
+
}
|
|
41032
|
+
return undefined;
|
|
41033
|
+
};
|
|
41034
|
+
var item = findById(props.tiledData, id);
|
|
41035
|
+
return item === null || item === void 0 ? void 0 : item[childrenKey];
|
|
41036
|
+
};
|
|
41001
41037
|
var insertFlat = function insertFlat(id) {
|
|
41002
41038
|
var item = getDataById(id);
|
|
41003
41039
|
if (isUnMatchedData(item)) return;
|
|
41004
41040
|
if (!item) return;
|
|
41005
41041
|
var status = context.dataFlatStatusMap.get(id);
|
|
41006
41042
|
if (!status) return;
|
|
41007
|
-
|
|
41043
|
+
|
|
41044
|
+
// 优先从 tiledData 中获取子节点数据,如果不存在则使用原始数据
|
|
41045
|
+
var childrenData = props.tiledData ? getChildrenFromTiledData(id) || [] : item[childrenKey];
|
|
41008
41046
|
var insertStartNode = dataFlat.find(function (item) {
|
|
41009
41047
|
return item.id === id;
|
|
41010
41048
|
});
|
|
@@ -41122,6 +41160,7 @@ var useTree = function useTree(props) {
|
|
|
41122
41160
|
if (!props.tiledData) return;
|
|
41123
41161
|
var tiledFlatData = initFlatData(props.tiledData, [], 1);
|
|
41124
41162
|
setDataFlat(tiledFlatData);
|
|
41163
|
+
// context.dataFlatStatusMap = new Map();
|
|
41125
41164
|
}, [props.tiledData]);
|
|
41126
41165
|
var datum = use_latest_obj({
|
|
41127
41166
|
get: get,
|
|
@@ -52140,6 +52179,7 @@ function use_previous_usePrevious(value) {
|
|
|
52140
52179
|
|
|
52141
52180
|
|
|
52142
52181
|
|
|
52182
|
+
|
|
52143
52183
|
var form_schema_builder_excluded = ["required"],
|
|
52144
52184
|
form_schema_builder_excluded2 = ["required"];
|
|
52145
52185
|
var SchemaBuilder = /*#__PURE__*/function () {
|
|
@@ -52181,7 +52221,6 @@ var SchemaBuilder = /*#__PURE__*/function () {
|
|
|
52181
52221
|
}, {
|
|
52182
52222
|
key: "buildSchemaFromComponent",
|
|
52183
52223
|
value: function buildSchemaFromComponent(params) {
|
|
52184
|
-
var _componentElement$pro;
|
|
52185
52224
|
var componentElement = params.componentElement,
|
|
52186
52225
|
rules = params.rules,
|
|
52187
52226
|
label = params.label,
|
|
@@ -52280,65 +52319,69 @@ var SchemaBuilder = /*#__PURE__*/function () {
|
|
|
52280
52319
|
if (componentElement.props.data.length > 0) {
|
|
52281
52320
|
fieldSchemaInfo.description += "enumData: ".concat(JSON.stringify(componentElement.props.data), ";");
|
|
52282
52321
|
}
|
|
52322
|
+
fieldSchemaInfo.props = objectSpread2_default()({}, componentElement.props);
|
|
52283
52323
|
break;
|
|
52284
52324
|
}
|
|
52285
52325
|
case 'ShineoutDatePicker':
|
|
52286
|
-
|
|
52287
|
-
|
|
52326
|
+
{
|
|
52327
|
+
var _componentElement$pro;
|
|
52328
|
+
if (componentElement.props.range) {
|
|
52329
|
+
if (finalFieldId !== null && finalFieldId !== void 0 && finalFieldId.includes(separator || '')) {
|
|
52330
|
+
fieldSchemaInfo.type = 'string';
|
|
52331
|
+
fieldSchemaInfo.format = 'date';
|
|
52332
|
+
} else {
|
|
52333
|
+
fieldSchemaInfo.type = 'array';
|
|
52334
|
+
fieldSchemaInfo.items = {
|
|
52335
|
+
type: 'string',
|
|
52336
|
+
format: 'date'
|
|
52337
|
+
};
|
|
52338
|
+
}
|
|
52339
|
+
} else {
|
|
52288
52340
|
fieldSchemaInfo.type = 'string';
|
|
52289
52341
|
fieldSchemaInfo.format = 'date';
|
|
52290
|
-
} else {
|
|
52291
|
-
fieldSchemaInfo.type = 'array';
|
|
52292
|
-
fieldSchemaInfo.items = {
|
|
52293
|
-
type: 'string',
|
|
52294
|
-
format: 'date'
|
|
52295
|
-
};
|
|
52296
52342
|
}
|
|
52297
|
-
|
|
52298
|
-
|
|
52299
|
-
|
|
52300
|
-
}
|
|
52301
|
-
var defaultTime = ((_componentElement$pro = componentElement.props.defaultTime) === null || _componentElement$pro === void 0 ? void 0 : _componentElement$pro.toString()) || '';
|
|
52302
|
-
if (defaultTime) {
|
|
52303
|
-
fieldSchemaInfo.description += "\u9ED8\u8BA4\u65F6\u95F4\uFF1A".concat(defaultTime, " ");
|
|
52304
|
-
}
|
|
52305
|
-
var dateformat = componentElement.props.format || '';
|
|
52306
|
-
if (!dateformat) {
|
|
52307
|
-
switch (componentElement.props.type) {
|
|
52308
|
-
case 'date':
|
|
52309
|
-
dateformat = 'YYYY-MM-DD';
|
|
52310
|
-
break;
|
|
52311
|
-
case 'time':
|
|
52312
|
-
dateformat = 'HH:mm:ss';
|
|
52313
|
-
break;
|
|
52314
|
-
case 'datetime':
|
|
52315
|
-
dateformat = 'YYYY-MM-DD HH:mm:ss';
|
|
52316
|
-
break;
|
|
52317
|
-
case 'week':
|
|
52318
|
-
dateformat = 'GGGG WW';
|
|
52319
|
-
break;
|
|
52320
|
-
case 'month':
|
|
52321
|
-
dateformat = 'YYYY-MM';
|
|
52322
|
-
break;
|
|
52323
|
-
case 'quarter':
|
|
52324
|
-
dateformat = 'YYYY-\[Q]Q';
|
|
52325
|
-
break;
|
|
52326
|
-
case 'year':
|
|
52327
|
-
dateformat = 'YYYY';
|
|
52328
|
-
break;
|
|
52329
|
-
default:
|
|
52330
|
-
dateformat = 'YYYY-MM-DD';
|
|
52331
|
-
break;
|
|
52343
|
+
var defaultTime = ((_componentElement$pro = componentElement.props.defaultTime) === null || _componentElement$pro === void 0 ? void 0 : _componentElement$pro.toString()) || '';
|
|
52344
|
+
if (defaultTime) {
|
|
52345
|
+
fieldSchemaInfo.description += "\u9ED8\u8BA4\u65F6\u95F4\uFF1A".concat(defaultTime, " ");
|
|
52332
52346
|
}
|
|
52347
|
+
var dateformat = componentElement.props.format || '';
|
|
52348
|
+
if (!dateformat) {
|
|
52349
|
+
switch (componentElement.props.type) {
|
|
52350
|
+
case 'date':
|
|
52351
|
+
dateformat = 'YYYY-MM-DD';
|
|
52352
|
+
break;
|
|
52353
|
+
case 'time':
|
|
52354
|
+
dateformat = 'HH:mm:ss';
|
|
52355
|
+
break;
|
|
52356
|
+
case 'datetime':
|
|
52357
|
+
dateformat = 'YYYY-MM-DD HH:mm:ss';
|
|
52358
|
+
break;
|
|
52359
|
+
case 'week':
|
|
52360
|
+
dateformat = 'GGGG WW';
|
|
52361
|
+
break;
|
|
52362
|
+
case 'month':
|
|
52363
|
+
dateformat = 'YYYY-MM';
|
|
52364
|
+
break;
|
|
52365
|
+
case 'quarter':
|
|
52366
|
+
dateformat = 'YYYY-[Q]Q';
|
|
52367
|
+
break;
|
|
52368
|
+
case 'year':
|
|
52369
|
+
dateformat = 'YYYY';
|
|
52370
|
+
break;
|
|
52371
|
+
default:
|
|
52372
|
+
dateformat = 'YYYY-MM-DD';
|
|
52373
|
+
break;
|
|
52374
|
+
}
|
|
52375
|
+
}
|
|
52376
|
+
fieldSchemaInfo.description += "\u683C\u5F0F\uFF1A".concat(dateformat, " ");
|
|
52377
|
+
if (componentElement.props.max) {
|
|
52378
|
+
fieldSchemaInfo.description += "\u6700\u5927\u65F6\u95F4\uFF1A".concat(componentElement.props.max, " ");
|
|
52379
|
+
}
|
|
52380
|
+
if (componentElement.props.min) {
|
|
52381
|
+
fieldSchemaInfo.description += "\u6700\u5C0F\u65F6\u95F4\uFF1A".concat(componentElement.props.min, " ");
|
|
52382
|
+
}
|
|
52383
|
+
break;
|
|
52333
52384
|
}
|
|
52334
|
-
fieldSchemaInfo.description += "\u683C\u5F0F\uFF1A".concat(dateformat, " ");
|
|
52335
|
-
if (componentElement.props.max) {
|
|
52336
|
-
fieldSchemaInfo.description += "\u6700\u5927\u65F6\u95F4\uFF1A".concat(componentElement.props.max, " ");
|
|
52337
|
-
}
|
|
52338
|
-
if (componentElement.props.min) {
|
|
52339
|
-
fieldSchemaInfo.description += "\u6700\u5C0F\u65F6\u95F4\uFF1A".concat(componentElement.props.min, " ");
|
|
52340
|
-
}
|
|
52341
|
-
break;
|
|
52342
52385
|
case 'ShineoutCheckbox':
|
|
52343
52386
|
case 'ShineoutCheckboxGroup':
|
|
52344
52387
|
{
|
|
@@ -52504,7 +52547,7 @@ var SchemaBuilder = /*#__PURE__*/function () {
|
|
|
52504
52547
|
}
|
|
52505
52548
|
|
|
52506
52549
|
// 过滤掉 required 属性,items 对象不应该包含 required
|
|
52507
|
-
var
|
|
52550
|
+
var _required = meta.required,
|
|
52508
52551
|
itemsMeta = objectWithoutProperties_default()(meta, form_schema_builder_excluded);
|
|
52509
52552
|
this.mergeSchema(currentSchema.items, remainingSegments, itemsMeta);
|
|
52510
52553
|
}
|
|
@@ -57867,7 +57910,8 @@ var Tree = function Tree(props) {
|
|
|
57867
57910
|
keygen: keygen,
|
|
57868
57911
|
virtual: virtual,
|
|
57869
57912
|
onExpand: onExpandProp,
|
|
57870
|
-
datum: propsDatum
|
|
57913
|
+
datum: propsDatum,
|
|
57914
|
+
tiledData: props.filteredData
|
|
57871
57915
|
}),
|
|
57872
57916
|
datum = _useTree.datum,
|
|
57873
57917
|
expanded = _useTree.expanded,
|
|
@@ -57995,7 +58039,7 @@ var Tree = function Tree(props) {
|
|
|
57995
58039
|
rootStyle: rootStyle,
|
|
57996
58040
|
isControlled: 'expanded' in props,
|
|
57997
58041
|
jssStyle: jssStyle,
|
|
57998
|
-
data: data,
|
|
58042
|
+
data: props.filteredData || data,
|
|
57999
58043
|
mode: mode,
|
|
58000
58044
|
line: line,
|
|
58001
58045
|
keygen: keygen,
|
|
@@ -64429,6 +64473,10 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
64429
64473
|
});
|
|
64430
64474
|
};
|
|
64431
64475
|
/* harmony default export */ var scroll_table = (scroll_table_Scroll);
|
|
64476
|
+
;// CONCATENATED MODULE: ../hooks/src/components/use-table/table-nested-context.tsx
|
|
64477
|
+
|
|
64478
|
+
var TableContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({});
|
|
64479
|
+
/* harmony default export */ var table_nested_context = (TableContext);
|
|
64432
64480
|
;// CONCATENATED MODULE: ../hooks/src/common/use-scrollbar-width/index.ts
|
|
64433
64481
|
|
|
64434
64482
|
|
|
@@ -64641,6 +64689,7 @@ var useColumns = function useColumns(props) {
|
|
|
64641
64689
|
columnInfo: {
|
|
64642
64690
|
handleScroll: handleScroll
|
|
64643
64691
|
},
|
|
64692
|
+
currentColIndex: startIndex,
|
|
64644
64693
|
expandHideCol: context.expandHideCol
|
|
64645
64694
|
};
|
|
64646
64695
|
};
|
|
@@ -66754,7 +66803,6 @@ function useComponentMemo(getValue, condition, shouldUpdate) {
|
|
|
66754
66803
|
;// CONCATENATED MODULE: ../base/src/table/td.tsx
|
|
66755
66804
|
|
|
66756
66805
|
|
|
66757
|
-
|
|
66758
66806
|
function Td(props) {
|
|
66759
66807
|
var col = props.col,
|
|
66760
66808
|
colSpan = props.colSpan,
|
|
@@ -66762,12 +66810,11 @@ function Td(props) {
|
|
|
66762
66810
|
className = props.className,
|
|
66763
66811
|
direction = props.direction,
|
|
66764
66812
|
role = props.role,
|
|
66765
|
-
data = props.data,
|
|
66766
66813
|
onClick = props.onClick,
|
|
66767
66814
|
onMouseEnter = props.onMouseEnter,
|
|
66768
66815
|
onMouseLeave = props.onMouseLeave,
|
|
66769
66816
|
renderContent = props.renderContent;
|
|
66770
|
-
|
|
66817
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
66771
66818
|
colSpan: colSpan,
|
|
66772
66819
|
rowSpan: rowSpan,
|
|
66773
66820
|
onMouseEnter: onMouseEnter,
|
|
@@ -66779,20 +66826,6 @@ function Td(props) {
|
|
|
66779
66826
|
onClick: onClick,
|
|
66780
66827
|
children: renderContent(props.col, props.data)
|
|
66781
66828
|
}, col.key);
|
|
66782
|
-
if (props.virtual === 'lazy') {
|
|
66783
|
-
var _props$style, _props$style2;
|
|
66784
|
-
return useComponentMemo(function () {
|
|
66785
|
-
return $td;
|
|
66786
|
-
}, [data, className, (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.left, (_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.right, col.type, col.treeColumnsName], function (prev, next) {
|
|
66787
|
-
if (col.type || col.treeColumnsName) {
|
|
66788
|
-
return true;
|
|
66789
|
-
}
|
|
66790
|
-
return prev.some(function (_, index) {
|
|
66791
|
-
return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
66792
|
-
}) || !props.scrolling;
|
|
66793
|
-
});
|
|
66794
|
-
}
|
|
66795
|
-
return $td;
|
|
66796
66829
|
}
|
|
66797
66830
|
;// CONCATENATED MODULE: ../base/src/table/tr.tsx
|
|
66798
66831
|
|
|
@@ -67101,6 +67134,7 @@ var Tr = function Tr(props) {
|
|
|
67101
67134
|
if (expandCol && typeof expandCol.render === 'function') {
|
|
67102
67135
|
var renderFunc = expandCol.render(props.rawData, props.rowIndex);
|
|
67103
67136
|
if (typeof renderFunc === 'function') {
|
|
67137
|
+
var _props$scrollRef;
|
|
67104
67138
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
67105
67139
|
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowExpand,
|
|
67106
67140
|
ref: expandRef,
|
|
@@ -67111,7 +67145,12 @@ var Tr = function Tr(props) {
|
|
|
67111
67145
|
style: {
|
|
67112
67146
|
padding: 0
|
|
67113
67147
|
},
|
|
67114
|
-
children:
|
|
67148
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table_nested_context.Provider, {
|
|
67149
|
+
value: {
|
|
67150
|
+
parentTableWidth: (_props$scrollRef = props.scrollRef) === null || _props$scrollRef === void 0 || (_props$scrollRef = _props$scrollRef.current) === null || _props$scrollRef === void 0 ? void 0 : _props$scrollRef.clientWidth
|
|
67151
|
+
},
|
|
67152
|
+
children: renderFunc()
|
|
67153
|
+
})
|
|
67115
67154
|
})
|
|
67116
67155
|
});
|
|
67117
67156
|
}
|
|
@@ -67188,8 +67227,9 @@ var Tr = function Tr(props) {
|
|
|
67188
67227
|
/* harmony default export */ var tbody = (function (props) {
|
|
67189
67228
|
var _props$columns = props.columns,
|
|
67190
67229
|
columns = _props$columns === void 0 ? [] : _props$columns,
|
|
67191
|
-
_props$
|
|
67192
|
-
|
|
67230
|
+
_props$currentRowInde = props.currentRowIndex,
|
|
67231
|
+
currentRowIndex = _props$currentRowInde === void 0 ? 0 : _props$currentRowInde,
|
|
67232
|
+
currentColIndex = props.currentColIndex,
|
|
67193
67233
|
_props$hover = props.hover,
|
|
67194
67234
|
hover = _props$hover === void 0 ? true : _props$hover;
|
|
67195
67235
|
var _useTableExpand = use_table_expand({
|
|
@@ -67202,7 +67242,7 @@ var Tr = function Tr(props) {
|
|
|
67202
67242
|
var _useTableRow = use_table_row({
|
|
67203
67243
|
columns: props.columns,
|
|
67204
67244
|
data: props.data,
|
|
67205
|
-
currentIndex:
|
|
67245
|
+
currentIndex: currentRowIndex,
|
|
67206
67246
|
hover: hover
|
|
67207
67247
|
}),
|
|
67208
67248
|
rowData = _useTableRow.rowData,
|
|
@@ -67214,7 +67254,7 @@ var Tr = function Tr(props) {
|
|
|
67214
67254
|
});
|
|
67215
67255
|
var renderRow = function renderRow(item, index) {
|
|
67216
67256
|
var _props$rowEvents;
|
|
67217
|
-
var rowIndex = index +
|
|
67257
|
+
var rowIndex = index + currentRowIndex;
|
|
67218
67258
|
var originKey = getKey(props.keygen, item, rowIndex);
|
|
67219
67259
|
var trRenderKey = props.loader || (_props$rowEvents = props.rowEvents) !== null && _props$rowEvents !== void 0 && _props$rowEvents.draggable ? originKey : "".concat(originKey, "-").concat(rowIndex);
|
|
67220
67260
|
|
|
@@ -67266,6 +67306,7 @@ var Tr = function Tr(props) {
|
|
|
67266
67306
|
rowEvents: props.rowEvents,
|
|
67267
67307
|
disabled: props.datum.disabledCheck(item),
|
|
67268
67308
|
bodyScrollWidth: props.bodyScrollWidth,
|
|
67309
|
+
scrollRef: props.scrollRef,
|
|
67269
67310
|
resizeFlag: props.resizeFlag,
|
|
67270
67311
|
treeCheckAll: props.treeCheckAll,
|
|
67271
67312
|
onCellClick: props.onCellClick,
|
|
@@ -67282,7 +67323,7 @@ var Tr = function Tr(props) {
|
|
|
67282
67323
|
if (props.virtual === 'lazy') {
|
|
67283
67324
|
return useComponentMemo(function () {
|
|
67284
67325
|
return $tbody;
|
|
67285
|
-
}, [props.data
|
|
67326
|
+
}, [currentRowIndex, currentColIndex, props.data], function (prev, next) {
|
|
67286
67327
|
return prev.some(function (_, index) {
|
|
67287
67328
|
return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
67288
67329
|
}) || !props.scrolling;
|
|
@@ -67442,6 +67483,7 @@ function Table(props) {
|
|
|
67442
67483
|
_props$pagination = props.pagination,
|
|
67443
67484
|
pagination = _props$pagination === void 0 ? {} : _props$pagination;
|
|
67444
67485
|
var config = useConfig();
|
|
67486
|
+
var nestedContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(table_nested_context);
|
|
67445
67487
|
var isRtl = config.direction === 'rtl';
|
|
67446
67488
|
var tableClasses = props === null || props === void 0 || (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$table = _props$jssStyle.table) === null || _props$jssStyle$table === void 0 ? void 0 : _props$jssStyle$table.call(_props$jssStyle);
|
|
67447
67489
|
var tbodyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -67528,7 +67570,8 @@ function Table(props) {
|
|
|
67528
67570
|
}),
|
|
67529
67571
|
columns = _useTableColumns.columns,
|
|
67530
67572
|
expandHideCol = _useTableColumns.expandHideCol,
|
|
67531
|
-
columnInfo = _useTableColumns.columnInfo
|
|
67573
|
+
columnInfo = _useTableColumns.columnInfo,
|
|
67574
|
+
currentColIndex = _useTableColumns.currentColIndex;
|
|
67532
67575
|
var _useTableLayout = use_table_layout({
|
|
67533
67576
|
theadRef: theadRef,
|
|
67534
67577
|
tbodyRef: tbodyRef,
|
|
@@ -67802,7 +67845,8 @@ function Table(props) {
|
|
|
67802
67845
|
resizeFlag: resizeFlag,
|
|
67803
67846
|
treeCheckAll: props.treeCheckAll,
|
|
67804
67847
|
onCellClick: props.onCellClick,
|
|
67805
|
-
strictRowHeight: props.strictRowHeight
|
|
67848
|
+
strictRowHeight: props.strictRowHeight,
|
|
67849
|
+
scrollRef: scrollRef
|
|
67806
67850
|
};
|
|
67807
67851
|
var headCommonProps = {
|
|
67808
67852
|
disabled: props.disabled,
|
|
@@ -67973,7 +68017,8 @@ function Table(props) {
|
|
|
67973
68017
|
}),
|
|
67974
68018
|
ref: tbodyRef,
|
|
67975
68019
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()(objectSpread2_default()({}, bodyCommonProps), {}, {
|
|
67976
|
-
|
|
68020
|
+
currentRowIndex: virtualInfo.startIndex,
|
|
68021
|
+
currentColIndex: currentColIndex,
|
|
67977
68022
|
data: virtualInfo.data,
|
|
67978
68023
|
setRowHeight: virtualInfo.setRowHeight,
|
|
67979
68024
|
scrolling: scrolling,
|
|
@@ -68084,6 +68129,19 @@ function Table(props) {
|
|
|
68084
68129
|
scrollElRef: scrollRef
|
|
68085
68130
|
};
|
|
68086
68131
|
}, [scrollRef]);
|
|
68132
|
+
var tableWrapperStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
68133
|
+
if (nestedContext.parentTableWidth && props.width) {
|
|
68134
|
+
return objectSpread2_default()({
|
|
68135
|
+
width: nestedContext.parentTableWidth,
|
|
68136
|
+
position: 'sticky',
|
|
68137
|
+
left: 0,
|
|
68138
|
+
height: defaultHeight
|
|
68139
|
+
}, props.style);
|
|
68140
|
+
}
|
|
68141
|
+
return objectSpread2_default()({
|
|
68142
|
+
height: defaultHeight
|
|
68143
|
+
}, props.style);
|
|
68144
|
+
}, [nestedContext.parentTableWidth, defaultHeight, props.style, props.width]);
|
|
68087
68145
|
var tableWrapperClass = classnames_default()(props.className, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rootClass, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.wrapper, props.bordered && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.bordered), verticalAlign === 'top' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.verticalAlignTop), verticalAlign === 'middle' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.verticalAlignMiddle), size === 'small' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.small), size === 'large' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.large), size === 'default' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.default));
|
|
68088
68146
|
if (!props.columns || columns.length === 0) return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
68089
68147
|
className: classnames_default()(tableWrapperClass, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.simple, props.striped && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.striped)),
|
|
@@ -68099,9 +68157,7 @@ function Table(props) {
|
|
|
68099
68157
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
68100
68158
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
68101
68159
|
className: classnames_default()(tableWrapperClass, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, tableClasses.sticky, props.sticky), tableClasses.floatLeft, floatLeft), tableClasses.floatRight, floatRight)),
|
|
68102
|
-
style:
|
|
68103
|
-
height: defaultHeight
|
|
68104
|
-
}, props.style)
|
|
68160
|
+
style: tableWrapperStyle
|
|
68105
68161
|
}, selection.getTableProps()), {}, {
|
|
68106
68162
|
ref: tableRef,
|
|
68107
68163
|
dir: config.direction,
|
|
@@ -74634,7 +74690,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
74634
74690
|
|
|
74635
74691
|
|
|
74636
74692
|
/* harmony default export */ var src_0 = ({
|
|
74637
|
-
version: '3.9.3-beta.
|
|
74693
|
+
version: '3.9.3-beta.10'
|
|
74638
74694
|
});
|
|
74639
74695
|
}();
|
|
74640
74696
|
/******/ return __webpack_exports__;
|