@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.
@@ -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/font_4075221_v55dw714o2.js' // 在 iconfont.cn 上生成
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));
@@ -8,6 +8,7 @@ var Scan = function Scan(props) {
8
8
  var scanRef = useRef(null);
9
9
  return /*#__PURE__*/React.createElement(PisellScan, {
10
10
  width: "100%",
11
+ height: "200px",
11
12
  borderRadius: "12px",
12
13
  onChange: onChange,
13
14
  ref: scanRef
@@ -1,6 +1,6 @@
1
1
  export var entryModeTextIcon = {
2
2
  scanCode: {
3
- icon: 'pisell2-qr-code-02',
3
+ icon: 'pisell2-a-qr-code-02',
4
4
  text: 'Scan Bar/QR codes'
5
5
  },
6
6
  input: {
@@ -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(selectedDeviceId, videoRef.current, function (result, err) {
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/font_4075221_v55dw714o2.js"
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;
@@ -43,6 +43,7 @@ var Scan = (props) => {
43
43
  import_pisellScan.default,
44
44
  {
45
45
  width: "100%",
46
+ height: "200px",
46
47
  borderRadius: "12px",
47
48
  onChange,
48
49
  ref: scanRef
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
  var entryModeTextIcon = {
27
27
  scanCode: {
28
- icon: "pisell2-qr-code-02",
28
+ icon: "pisell2-a-qr-code-02",
29
29
  text: "Scan Bar/QR codes"
30
30
  },
31
31
  input: {
@@ -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
- selectedDeviceId,
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.379",
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/icon": "0.0.10",
68
- "@pisell/date-picker": "1.0.95"
67
+ "@pisell/date-picker": "1.0.95",
68
+ "@pisell/icon": "0.0.10"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": "^18.0.0",