@pisell/materials 1.0.379 → 1.0.381
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/components/iconfont/index.js +1 -1
- package/es/components/pisellDatePicker/datePickerCpt.js +6 -0
- package/es/components/pisellDatePicker/detePickerCpt.less +10 -0
- package/es/components/pisellInformationEntry/Input/index.js +2 -1
- package/es/components/pisellInformationEntry/Scan/index.js +1 -0
- package/es/components/pisellInformationEntry/constants.js +1 -1
- package/es/components/pisellScan/index.js +1 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/pisellDatePicker/datePickerCpt.js +4 -1
- package/lib/components/pisellDatePicker/detePickerCpt.less +10 -0
- package/lib/components/pisellInformationEntry/Input/index.js +1 -1
- package/lib/components/pisellInformationEntry/Scan/index.js +1 -0
- package/lib/components/pisellInformationEntry/constants.js +1 -1
- package/lib/components/pisellScan/index.js +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
var MyIcon = createFromIconfontCN({
|
|
5
|
-
scriptUrl: 'https://at.alicdn.com/t/c/
|
|
5
|
+
scriptUrl: 'https://at.alicdn.com/t/c/font_4075221_cy8sszjz7t7.js' // 在 iconfont.cn 上生成
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
var IconFont = function IconFont(props) {
|
|
@@ -38,6 +38,11 @@ var DatePickerInput = function DatePickerInput(props) {
|
|
|
38
38
|
var handleChange = function handleChange(e) {
|
|
39
39
|
var inputValue = e.target.value;
|
|
40
40
|
|
|
41
|
+
// 禁止特殊字符时
|
|
42
|
+
if (!/^[\d/]*$/.test(inputValue)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
41
46
|
// 根据 format 字符串,将字母部分分离开来
|
|
42
47
|
var parts = format.split(/[^a-zA-Z]/);
|
|
43
48
|
|
|
@@ -131,6 +136,7 @@ var DatePickerInput = function DatePickerInput(props) {
|
|
|
131
136
|
eventChange === null || eventChange === void 0 ? void 0 : eventChange(result);
|
|
132
137
|
};
|
|
133
138
|
return /*#__PURE__*/React.createElement(Input, _extends({}, others, {
|
|
139
|
+
type: "tel",
|
|
134
140
|
value: value,
|
|
135
141
|
onChange: handleChange
|
|
136
142
|
}));
|
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
padding: 11px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.pisell-lowcode-picker{
|
|
10
|
+
border-radius: 10px;
|
|
11
|
+
.pisell-lowcode-picker-input>input {
|
|
12
|
+
line-height: 1.5;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
border: none;
|
|
15
|
+
box-shadow: none!important;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
.pisell-lowcode-picker .pisell-lowcode-picker-input>input::placeholder {
|
|
10
20
|
color: #D0D5DD !important;
|
|
11
21
|
font-size: 16px !important;
|
|
@@ -41,7 +41,8 @@ var PisellEntryInput = function PisellEntryInput(props) {
|
|
|
41
41
|
size: "large",
|
|
42
42
|
onClick: function onClick() {
|
|
43
43
|
return onChange(value);
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
|
+
disabled: !value
|
|
45
46
|
}, getText('pisell-information-entry-input-search'))), /*#__PURE__*/React.createElement("div", {
|
|
46
47
|
className: "pisell-entry-input-describe"
|
|
47
48
|
}, searchDescribe));
|
|
@@ -39,7 +39,7 @@ var PisellScan = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
39
39
|
selectedDeviceId = videoInputDevices[0].deviceId;
|
|
40
40
|
|
|
41
41
|
// 使用所选的视频设备和 videoRef 中的视频元素进行解码
|
|
42
|
-
codeReader.decodeFromVideoDevice(
|
|
42
|
+
codeReader.decodeFromVideoDevice(null, videoRef.current, function (result, err) {
|
|
43
43
|
// 如果解码成功,调用 onChange 回调并传递解码结果的文本
|
|
44
44
|
if (result) {
|
|
45
45
|
onChange === null || onChange === void 0 ? void 0 : onChange(result.getText());
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
|
|
|
35
35
|
var import_icons = require("@ant-design/icons");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var MyIcon = (0, import_icons.createFromIconfontCN)({
|
|
38
|
-
scriptUrl: "https://at.alicdn.com/t/c/
|
|
38
|
+
scriptUrl: "https://at.alicdn.com/t/c/font_4075221_cy8sszjz7t7.js"
|
|
39
39
|
// 在 iconfont.cn 上生成
|
|
40
40
|
});
|
|
41
41
|
var IconFont = (props) => {
|
|
@@ -52,6 +52,9 @@ var DatePickerInput = (props) => {
|
|
|
52
52
|
};
|
|
53
53
|
const handleChange = (e) => {
|
|
54
54
|
let inputValue = e.target.value;
|
|
55
|
+
if (!/^[\d/]*$/.test(inputValue)) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
55
58
|
let parts = format.split(/[^a-zA-Z]/);
|
|
56
59
|
let separators = format.match(/[^a-zA-Z]+/g) || [];
|
|
57
60
|
if (inputValue.length < value.length) {
|
|
@@ -109,7 +112,7 @@ var DatePickerInput = (props) => {
|
|
|
109
112
|
}
|
|
110
113
|
eventChange == null ? void 0 : eventChange(result);
|
|
111
114
|
};
|
|
112
|
-
return /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { ...others, value, onChange: handleChange });
|
|
115
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { ...others, type: "tel", value, onChange: handleChange });
|
|
113
116
|
};
|
|
114
117
|
var DatePickerCpt = (props) => {
|
|
115
118
|
const { format, type, onChange, size, picker } = props;
|
|
@@ -6,6 +6,16 @@
|
|
|
6
6
|
padding: 11px;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.pisell-lowcode-picker{
|
|
10
|
+
border-radius: 10px;
|
|
11
|
+
.pisell-lowcode-picker-input>input {
|
|
12
|
+
line-height: 1.5;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
border: none;
|
|
15
|
+
box-shadow: none!important;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
.pisell-lowcode-picker .pisell-lowcode-picker-input>input::placeholder {
|
|
10
20
|
color: #D0D5DD !important;
|
|
11
21
|
font-size: 16px !important;
|
|
@@ -51,6 +51,6 @@ var PisellEntryInput = (props) => {
|
|
|
51
51
|
prefix: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { style: { color: "#667085" }, type: "pisell2-search-lg" }),
|
|
52
52
|
allowClear: true
|
|
53
53
|
}
|
|
54
|
-
), /* @__PURE__ */ import_react.default.createElement(import_button.default, { size: "large", onClick: () => onChange(value) }, (0, import_locales.getText)("pisell-information-entry-input-search"))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-entry-input-describe" }, searchDescribe));
|
|
54
|
+
), /* @__PURE__ */ import_react.default.createElement(import_button.default, { size: "large", onClick: () => onChange(value), disabled: !value }, (0, import_locales.getText)("pisell-information-entry-input-search"))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-entry-input-describe" }, searchDescribe));
|
|
55
55
|
};
|
|
56
56
|
var Input_default = PisellEntryInput;
|
|
@@ -51,7 +51,7 @@ var PisellScan = (0, import_react.forwardRef)((props, ref) => {
|
|
|
51
51
|
codeReaderRef.current.listVideoInputDevices().then((videoInputDevices) => {
|
|
52
52
|
selectedDeviceId = videoInputDevices[0].deviceId;
|
|
53
53
|
codeReader.decodeFromVideoDevice(
|
|
54
|
-
|
|
54
|
+
null,
|
|
55
55
|
videoRef.current,
|
|
56
56
|
(result, err) => {
|
|
57
57
|
if (result) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.381",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"crypto-js": "^4.2.0",
|
|
65
65
|
"@zxing/library": "0.21.2",
|
|
66
66
|
"@pisell/utils": "1.0.33",
|
|
67
|
-
"@pisell/
|
|
68
|
-
"@pisell/
|
|
67
|
+
"@pisell/date-picker": "1.0.95",
|
|
68
|
+
"@pisell/icon": "0.0.10"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"react": "^18.0.0",
|