@performant-software/semantic-components 0.5.19-beta.0 → 0.5.19-beta.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@performant-software/semantic-components",
|
|
3
|
-
"version": "0.5.19-beta.
|
|
3
|
+
"version": "0.5.19-beta.1",
|
|
4
4
|
"description": "A package of shared components based on the Semantic UI Framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build": "webpack --mode production && flow-copy-source -v src types"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@performant-software/shared-components": "^0.5.19-beta.
|
|
15
|
+
"@performant-software/shared-components": "^0.5.19-beta.1",
|
|
16
16
|
"@react-google-maps/api": "^2.8.1",
|
|
17
17
|
"axios": "^0.26.1",
|
|
18
18
|
"i18next": "^19.4.4",
|
|
@@ -13,6 +13,7 @@ type Sort = {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
type Props = {
|
|
16
|
+
defaultView?: number,
|
|
16
17
|
onSort?: (sortColumn: string, sortDirection?: ?string) => void,
|
|
17
18
|
sort?: Array<Sort>,
|
|
18
19
|
sortColumn?: string,
|
|
@@ -54,7 +55,7 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
|
|
|
54
55
|
super(props);
|
|
55
56
|
|
|
56
57
|
this.state = {
|
|
57
|
-
view: Views.list
|
|
58
|
+
view: props.defaultView || Views.list
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
|
package/src/index.js
CHANGED
|
@@ -95,5 +95,6 @@ export type { Props as ListProps } from './components/List';
|
|
|
95
95
|
export type { BatchEditProps } from './hooks/BatchEdit';
|
|
96
96
|
|
|
97
97
|
// Constants
|
|
98
|
+
export { Views as ItemViews } from './components/ItemsToggle';
|
|
98
99
|
export { SORT_ASCENDING, SORT_DESCENDING } from './components/DataList';
|
|
99
100
|
export { FilterTypes } from './components/ListFilters';
|
|
@@ -13,6 +13,7 @@ type Sort = {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
type Props = {
|
|
16
|
+
defaultView?: number,
|
|
16
17
|
onSort?: (sortColumn: string, sortDirection?: ?string) => void,
|
|
17
18
|
sort?: Array<Sort>,
|
|
18
19
|
sortColumn?: string,
|
|
@@ -54,7 +55,7 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
|
|
|
54
55
|
super(props);
|
|
55
56
|
|
|
56
57
|
this.state = {
|
|
57
|
-
view: Views.list
|
|
58
|
+
view: props.defaultView || Views.list
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
|
package/types/index.js.flow
CHANGED
|
@@ -95,5 +95,6 @@ export type { Props as ListProps } from './components/List';
|
|
|
95
95
|
export type { BatchEditProps } from './hooks/BatchEdit';
|
|
96
96
|
|
|
97
97
|
// Constants
|
|
98
|
+
export { Views as ItemViews } from './components/ItemsToggle';
|
|
98
99
|
export { SORT_ASCENDING, SORT_DESCENDING } from './components/DataList';
|
|
99
100
|
export { FilterTypes } from './components/ListFilters';
|