@lowdefy/blocks-antd 4.2.1 → 4.2.2

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.
@@ -53,9 +53,9 @@ function AddOnSelect({ blockId, defaultValue, loading, methods, properties, uniq
53
53
  mode: "single",
54
54
  notFoundContent: 'Not found',
55
55
  onChange: (newVal)=>{
56
- const input = value?.input;
57
- const region = uniqueValueOptions[newVal].value;
58
- const phone_number = `${region.dial_code}${input}`;
56
+ const input = value?.input ?? '';
57
+ const region = uniqueValueOptions[newVal]?.value ?? {};
58
+ const phone_number = `${region?.dial_code ?? ''}${input}`;
59
59
  methods.setValue({
60
60
  input,
61
61
  region,
@@ -166,8 +166,8 @@ const PhoneNumberInput = ({ blockId, components: { Icon, Link }, events, loading
166
166
  const regex = new RegExp(properties.replaceInput.pattern, properties.replaceInput.flags ?? 'gm');
167
167
  input = input.replace(regex, properties.replaceInput.replacement ?? '');
168
168
  }
169
- const region = value.region;
170
- const phone_number = `${region.dial_code}${input}`;
169
+ const region = value?.region ?? {};
170
+ const phone_number = `${region?.dial_code ?? ''}${input}`;
171
171
  methods.setValue({
172
172
  input,
173
173
  region,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-antd",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy Ant Design Blocks",
6
6
  "homepage": "https://lowdefy.com",
@@ -43,8 +43,8 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@ant-design/icons": "4.8.0",
46
- "@lowdefy/block-utils": "4.2.1",
47
- "@lowdefy/helpers": "4.2.1",
46
+ "@lowdefy/block-utils": "4.2.2",
47
+ "@lowdefy/helpers": "4.2.2",
48
48
  "antd": "4.24.14",
49
49
  "classnames": "2.3.2",
50
50
  "moment": "2.29.4",
@@ -55,9 +55,9 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@emotion/jest": "11.10.5",
58
- "@lowdefy/block-dev": "4.2.1",
59
- "@lowdefy/jest-yaml-transform": "4.2.1",
60
- "@lowdefy/node-utils": "4.2.1",
58
+ "@lowdefy/block-dev": "4.2.2",
59
+ "@lowdefy/jest-yaml-transform": "4.2.2",
60
+ "@lowdefy/node-utils": "4.2.2",
61
61
  "@swc/cli": "0.1.63",
62
62
  "@swc/core": "1.3.99",
63
63
  "@swc/jest": "0.2.29",