@sheinx/base 3.7.4-beta.5 → 3.7.4-beta.7
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/date-picker/date-picker.d.ts.map +1 -1
- package/cjs/date-picker/date-picker.js +2 -9
- package/cjs/table/td.d.ts.map +1 -1
- package/cjs/table/td.js +5 -22
- package/esm/date-picker/date-picker.d.ts.map +1 -1
- package/esm/date-picker/date-picker.js +2 -9
- package/esm/table/td.d.ts.map +1 -1
- package/esm/table/td.js +4 -19
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB1E,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB1E,QAAA,MAAM,UAAU,gHA0Vf,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -203,15 +203,8 @@ var DatePicker = function DatePicker(props0) {
|
|
|
203
203
|
setFocused(false);
|
|
204
204
|
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e, index);
|
|
205
205
|
if (props.needConfirm) return;
|
|
206
|
-
if (props.inputable && index !== undefined) {
|
|
207
|
-
|
|
208
|
-
// why: 快速选择时,需要加上timeout,否则e.target.value 获取不到最新的值
|
|
209
|
-
setTimeout(function () {
|
|
210
|
-
func.handleInputBlur(e.target.value, index);
|
|
211
|
-
});
|
|
212
|
-
} else {
|
|
213
|
-
func.handleInputBlur(e.target.value, index);
|
|
214
|
-
}
|
|
206
|
+
if (props.inputable && !props.quickSelect && index !== undefined) {
|
|
207
|
+
func.handleInputBlur(e.target.value, index);
|
|
215
208
|
}
|
|
216
209
|
|
|
217
210
|
// 当输入框有值时,失焦时需要立即触发 onChange,否则触控板的轻触模拟出来的click事件就获取不到最新的值
|
package/cjs/table/td.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"td.d.ts","sourceRoot":"","sources":["td.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"td.d.ts","sourceRoot":"","sources":["td.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,UAAU,OAAQ,SAAQ,IAAI,CAAC,UAAU,EAAI,SAAS,CAAC;IACrD,GAAG,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,CAAC,OAAO,CAwDtD"}
|
package/cjs/table/td.js
CHANGED
|
@@ -1,32 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = Td;
|
|
8
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
8
|
var _hooks = require("@sheinx/hooks");
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
17
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
18
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
11
|
function Td(props) {
|
|
20
|
-
var
|
|
21
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
22
|
-
style = _React$useState2[0],
|
|
23
|
-
setStyle = _React$useState2[1];
|
|
24
|
-
(0, _react.useEffect)(function () {
|
|
25
|
-
if (_hooks.util.shallowEqual(props.style, style)) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
setStyle(props.style);
|
|
29
|
-
}, [props.style]);
|
|
12
|
+
var _props$style, _props$style2;
|
|
30
13
|
var col = props.col,
|
|
31
14
|
colSpan = props.colSpan,
|
|
32
15
|
rowSpan = props.rowSpan,
|
|
@@ -46,13 +29,13 @@ function Td(props) {
|
|
|
46
29
|
onMouseEnter: onMouseEnter,
|
|
47
30
|
onMouseLeave: onMouseLeave,
|
|
48
31
|
className: className,
|
|
49
|
-
style: style,
|
|
32
|
+
style: props.style,
|
|
50
33
|
dir: direction,
|
|
51
34
|
"data-role": role,
|
|
52
35
|
onClick: onClick,
|
|
53
36
|
children: content
|
|
54
37
|
}, col.key);
|
|
55
|
-
}, [data, className, style, col.type, col.treeColumnsName], props.virtual === 'lazy' ? function (prev, next) {
|
|
38
|
+
}, [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], props.virtual === 'lazy' ? function (prev, next) {
|
|
56
39
|
if (col.type || col.treeColumnsName) {
|
|
57
40
|
return true;
|
|
58
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB1E,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["date-picker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAmB1E,QAAA,MAAM,UAAU,gHA0Vf,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -196,15 +196,8 @@ var DatePicker = function DatePicker(props0) {
|
|
|
196
196
|
setFocused(false);
|
|
197
197
|
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e, index);
|
|
198
198
|
if (props.needConfirm) return;
|
|
199
|
-
if (props.inputable && index !== undefined) {
|
|
200
|
-
|
|
201
|
-
// why: 快速选择时,需要加上timeout,否则e.target.value 获取不到最新的值
|
|
202
|
-
setTimeout(function () {
|
|
203
|
-
func.handleInputBlur(e.target.value, index);
|
|
204
|
-
});
|
|
205
|
-
} else {
|
|
206
|
-
func.handleInputBlur(e.target.value, index);
|
|
207
|
-
}
|
|
199
|
+
if (props.inputable && !props.quickSelect && index !== undefined) {
|
|
200
|
+
func.handleInputBlur(e.target.value, index);
|
|
208
201
|
}
|
|
209
202
|
|
|
210
203
|
// 当输入框有值时,失焦时需要立即触发 onChange,否则触控板的轻触模拟出来的click事件就获取不到最新的值
|
package/esm/table/td.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"td.d.ts","sourceRoot":"","sources":["td.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"td.d.ts","sourceRoot":"","sources":["td.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,UAAU,OAAQ,SAAQ,IAAI,CAAC,UAAU,EAAI,SAAS,CAAC;IACrD,GAAG,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,CAAC,GAAG,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,GAAG,CAAC,OAAO,CAwDtD"}
|
package/esm/table/td.js
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useEffect } from 'react';
|
|
1
|
+
import React from 'react';
|
|
8
2
|
import { useComponentMemo, util } from '@sheinx/hooks';
|
|
9
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
4
|
export default function Td(props) {
|
|
11
|
-
var
|
|
12
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
13
|
-
style = _React$useState2[0],
|
|
14
|
-
setStyle = _React$useState2[1];
|
|
15
|
-
useEffect(function () {
|
|
16
|
-
if (util.shallowEqual(props.style, style)) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
setStyle(props.style);
|
|
20
|
-
}, [props.style]);
|
|
5
|
+
var _props$style, _props$style2;
|
|
21
6
|
var col = props.col,
|
|
22
7
|
colSpan = props.colSpan,
|
|
23
8
|
rowSpan = props.rowSpan,
|
|
@@ -37,13 +22,13 @@ export default function Td(props) {
|
|
|
37
22
|
onMouseEnter: onMouseEnter,
|
|
38
23
|
onMouseLeave: onMouseLeave,
|
|
39
24
|
className: className,
|
|
40
|
-
style: style,
|
|
25
|
+
style: props.style,
|
|
41
26
|
dir: direction,
|
|
42
27
|
"data-role": role,
|
|
43
28
|
onClick: onClick,
|
|
44
29
|
children: content
|
|
45
30
|
}, col.key);
|
|
46
|
-
}, [data, className, style, col.type, col.treeColumnsName], props.virtual === 'lazy' ? function (prev, next) {
|
|
31
|
+
}, [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], props.virtual === 'lazy' ? function (prev, next) {
|
|
47
32
|
if (col.type || col.treeColumnsName) {
|
|
48
33
|
return true;
|
|
49
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.7.4-beta.
|
|
3
|
+
"version": "3.7.4-beta.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.7.4-beta.
|
|
13
|
+
"@sheinx/hooks": "3.7.4-beta.7",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.1.3-alpha.0"
|