@jswork/antd-components 1.0.91 → 1.0.94
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/dist/main.cjs.js +1 -1
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.d.mts +3 -3
- package/dist/main.d.ts +3 -3
- package/dist/main.esm.js +1 -1
- package/dist/main.esm.js.map +1 -1
- package/package.json +8 -6
- package/src/lib/breadcrumb.tsx +1 -1
- package/src/lib/checkable-tag-list.tsx +1 -1
- package/src/lib/checkbox-group.tsx +1 -1
- package/src/lib/radio-group.tsx +1 -1
- package/src/lib/select.tsx +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jswork/antd-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.94",
|
|
4
4
|
"main": "dist/main.cjs.js",
|
|
5
5
|
"module": "dist/main.esm.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -14,20 +14,22 @@
|
|
|
14
14
|
"scripts": {
|
|
15
15
|
"build": "tsup",
|
|
16
16
|
"postbuild": "postsass -s src/style.scss -d dist/style.css -c",
|
|
17
|
-
"release": "release-it
|
|
17
|
+
"release": "release-it"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@jswork/harmony-events": "^1.2.
|
|
21
|
-
"@jswork/next": "^1.2.
|
|
20
|
+
"@jswork/harmony-events": "^1.2.11",
|
|
21
|
+
"@jswork/next": "^1.2.11",
|
|
22
22
|
"@swc/core": "^1.3.93",
|
|
23
23
|
"@types/react": "^18.2.28",
|
|
24
24
|
"@types/react-dom": "^18.2.13",
|
|
25
25
|
"antd": "^5.20.0",
|
|
26
|
-
"dayjs": "^1.11.12",
|
|
27
26
|
"autoprefixer": "^10.4.16",
|
|
28
27
|
"classnames": "^2.5.1",
|
|
29
28
|
"cssnano": "^6.0.1",
|
|
29
|
+
"dayjs": "^1.11.12",
|
|
30
30
|
"esbuild-plugin-copy": "^2.1.1",
|
|
31
|
+
"lodash": "^4.17.21",
|
|
32
|
+
"postcss": "^8.5.3",
|
|
31
33
|
"react": "^18.2.0",
|
|
32
34
|
"react-dom": "^18.2.0",
|
|
33
35
|
"tsup": "^7.2.0",
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
"@jswork/next-tree-walk": "^1.0.7",
|
|
46
48
|
"@jswork/noop": "^1.0.0",
|
|
47
49
|
"@jswork/react-codeflask": "^1.1.2",
|
|
48
|
-
"@jswork/react-list": "^1.
|
|
50
|
+
"@jswork/react-list": "^1.4.3",
|
|
49
51
|
"@jswork/weibo2res": "^1.0.4",
|
|
50
52
|
"fast-deep-equal": "^3.1.3",
|
|
51
53
|
"nanoid": "^4.0.2",
|
package/src/lib/breadcrumb.tsx
CHANGED
|
@@ -33,7 +33,7 @@ export class AcBreadcrumb extends React.Component<Props> {
|
|
|
33
33
|
const { className, value, items, template, onChange, ...props } = this.props;
|
|
34
34
|
return (
|
|
35
35
|
<Breadcrumb className={cx(className, CLASS_NAME)} {...props}>
|
|
36
|
-
<ReactList items={items} template={template} />
|
|
36
|
+
<ReactList items={items || []} template={template} />
|
|
37
37
|
</Breadcrumb>
|
|
38
38
|
);
|
|
39
39
|
}
|
|
@@ -89,7 +89,7 @@ export class AcCheckableTagList extends React.Component<Props> {
|
|
|
89
89
|
{label}
|
|
90
90
|
</Button>
|
|
91
91
|
<ReactList
|
|
92
|
-
items={items}
|
|
92
|
+
items={items || []}
|
|
93
93
|
template={({ item, index }) => {
|
|
94
94
|
const _value = this.state.value as any[];
|
|
95
95
|
const isChecked = _value?.includes(item.value);
|
|
@@ -65,7 +65,7 @@ export class AcCheckboxGroup extends React.Component<AcCheckboxGroupProps> {
|
|
|
65
65
|
value={stateValue}
|
|
66
66
|
onChange={this.handleChange}
|
|
67
67
|
{...props}>
|
|
68
|
-
<ReactList items={items} template={template} />
|
|
68
|
+
<ReactList items={items || []} template={template} />
|
|
69
69
|
</Checkbox.Group>
|
|
70
70
|
);
|
|
71
71
|
}
|
package/src/lib/radio-group.tsx
CHANGED
|
@@ -60,7 +60,7 @@ export class AcRadioGroup extends React.Component<Props> {
|
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
62
|
<Radio.Group className={cx(CLASS_NAME, className)} onChange={this.handleChange} {...props}>
|
|
63
|
-
<ReactList items={items} template={this.templateCallback} />
|
|
63
|
+
<ReactList items={items || []} template={this.templateCallback} />
|
|
64
64
|
</Radio.Group>
|
|
65
65
|
);
|
|
66
66
|
}
|
package/src/lib/select.tsx
CHANGED
|
@@ -71,13 +71,18 @@ export class AcSelect extends React.Component<Props> {
|
|
|
71
71
|
render() {
|
|
72
72
|
const { className, onChange, onSearch, value, template, ...props } = this.props;
|
|
73
73
|
const { value: _value } = this.state;
|
|
74
|
+
const asProps = {
|
|
75
|
+
onChange: this.handleChange,
|
|
76
|
+
value: _value,
|
|
77
|
+
} as any;
|
|
78
|
+
|
|
74
79
|
return (
|
|
75
80
|
<ReactList
|
|
81
|
+
allowEmpty
|
|
76
82
|
as={Select}
|
|
77
|
-
onChange={this.handleChange}
|
|
78
83
|
className={cx(CLASS_NAME, className)}
|
|
79
|
-
value={_value}
|
|
80
84
|
template={this.template}
|
|
85
|
+
{...asProps}
|
|
81
86
|
{...props}
|
|
82
87
|
/>
|
|
83
88
|
);
|