react-ui-basics 0.0.226 → 0.0.228
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/DateTools.js +1 -0
- package/DateTools.js.map +1 -1
- package/FilteredList.d.ts +2 -2
- package/FilteredList.js +1 -1
- package/FilteredList.js.map +1 -1
- package/HttpTools.js.map +1 -1
- package/MaterialIcon.js +1 -1
- package/MaterialIcon.js.map +1 -1
- package/bundle.css +586 -586
- package/package.json +1 -1
- package/src/DateTools.ts +1 -0
- package/src/FilteredList.tsx +3 -3
- package/src/HttpTools.ts +1 -1
- package/src/MaterialIcon.tsx +1 -1
package/package.json
CHANGED
package/src/DateTools.ts
CHANGED
|
@@ -19,6 +19,7 @@ export const min = (a: Date, b: Date) => {
|
|
|
19
19
|
|
|
20
20
|
// todo: add formatter base on
|
|
21
21
|
//https://stevenlevithan.com/assets/misc/date.format.js
|
|
22
|
+
//https://github.com/felixge/node-dateformat/tree/master
|
|
22
23
|
|
|
23
24
|
export class TimeUnit {
|
|
24
25
|
static MILLISECOND = new TimeUnit('Milliseconds');
|
package/src/FilteredList.tsx
CHANGED
|
@@ -63,19 +63,19 @@ class FilteredList<T extends string|number> extends PureComponent<FilteredListPr
|
|
|
63
63
|
this.updateList(this.props)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
componentDidUpdate(prevProps
|
|
66
|
+
componentDidUpdate(prevProps: FilteredListProps<T>, prevState: FilteredListState<T>, snapshot) {
|
|
67
67
|
if (this.props.data === prevProps.data)
|
|
68
68
|
return;
|
|
69
69
|
|
|
70
70
|
this.updateList(this.props)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
updateList = (props) => {
|
|
73
|
+
updateList = (props: FilteredListProps<T>) => {
|
|
74
74
|
const {data} = props;
|
|
75
75
|
const {selected} = this.state;
|
|
76
76
|
this.list = data || [];
|
|
77
77
|
|
|
78
|
-
if (!this.list.includes(selected))
|
|
78
|
+
if (selected && !this.list.includes(selected))
|
|
79
79
|
this.setState({selected: null})
|
|
80
80
|
};
|
|
81
81
|
|
package/src/HttpTools.ts
CHANGED
|
@@ -50,7 +50,7 @@ export const fetch = <T>(url, options: FetchOptions = DEFAULT_OPTIONS) => {
|
|
|
50
50
|
|
|
51
51
|
if (method === 'POST' || method === 'PUT') {
|
|
52
52
|
if (options.multipart) {
|
|
53
|
-
let formData;
|
|
53
|
+
let formData: FormData;
|
|
54
54
|
if (params instanceof FormData) {
|
|
55
55
|
formData = params;
|
|
56
56
|
} else {
|
package/src/MaterialIcon.tsx
CHANGED
|
@@ -1825,6 +1825,6 @@ export interface MaterialIconProps {
|
|
|
1825
1825
|
}
|
|
1826
1826
|
|
|
1827
1827
|
const MaterialIcon = ({icon, className}: MaterialIconProps) => (
|
|
1828
|
-
<i className={classNames('MaterialIcon', 'material-icons', className)}>{icon}</i>
|
|
1828
|
+
<i className={classNames('MaterialIcon', 'material-icons', className)} translate="no">{icon}</i>
|
|
1829
1829
|
);
|
|
1830
1830
|
export default MaterialIcon;
|