@performant-software/semantic-components 0.5.2 → 0.5.3
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/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/main.css +5 -0
- package/package.json +4 -3
- package/src/components/DataList.js +10 -2
- package/src/components/DataTableColumnSelector.js +37 -33
- package/src/components/DataView.css +4 -0
- package/src/components/DataView.js +407 -0
- package/src/components/MenuBar.css +0 -0
- package/src/components/MenuBar.js +82 -0
- package/src/components/MenuSidebar.css +0 -0
- package/src/components/MenuSidebar.js +84 -0
- package/src/components/ReferenceCodeDropdown.css +0 -0
- package/src/components/ReferenceCodeDropdown.js +118 -0
- package/src/components/ReferenceCodeModal.css +0 -0
- package/src/components/ReferenceCodeModal.js +32 -0
- package/src/components/ReferenceTableModal.css +0 -0
- package/src/components/ReferenceTableModal.js +67 -0
- package/src/components/ReferenceTablesList.css +0 -0
- package/src/components/ReferenceTablesList.js +44 -0
- package/src/i18n/en.json +32 -0
- package/src/index.js +7 -0
- package/types/components/DataList.js.flow +10 -2
- package/types/components/DataTableColumnSelector.js.flow +37 -33
- package/types/components/DataView.js.flow +302 -20
- package/types/components/MenuBar.js.flow +9 -4
- package/types/components/MenuSidebar.js.flow +18 -6
- package/types/components/ReferenceCodeDropdown.js.flow +118 -0
- package/types/components/ReferenceCodeModal.js.flow +32 -0
- package/types/components/ReferenceTableModal.js.flow +67 -0
- package/types/components/ReferenceTablesList.js.flow +44 -0
- package/types/index.js.flow +5 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
import { ReferenceTablesService } from '@performant-software/shared-components';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import ListTable from './ListTable';
|
|
6
|
+
import ReferenceTableModal from './ReferenceTableModal';
|
|
7
|
+
|
|
8
|
+
const ReferenceTablesList = () => (
|
|
9
|
+
<ListTable
|
|
10
|
+
actions={[{
|
|
11
|
+
name: 'edit'
|
|
12
|
+
}, {
|
|
13
|
+
name: 'copy'
|
|
14
|
+
}, {
|
|
15
|
+
name: 'delete'
|
|
16
|
+
}]}
|
|
17
|
+
collectionName='reference_tables'
|
|
18
|
+
columns={[{
|
|
19
|
+
name: 'name',
|
|
20
|
+
label: 'Name',
|
|
21
|
+
sortable: true
|
|
22
|
+
}, {
|
|
23
|
+
name: 'key',
|
|
24
|
+
label: 'Key',
|
|
25
|
+
sortable: true
|
|
26
|
+
}]}
|
|
27
|
+
modal={{
|
|
28
|
+
component: ReferenceTableModal,
|
|
29
|
+
props: {
|
|
30
|
+
onInitialize: (id) => (
|
|
31
|
+
ReferenceTablesService
|
|
32
|
+
.fetchOne(id)
|
|
33
|
+
.then(({ data }) => data.reference_table)
|
|
34
|
+
),
|
|
35
|
+
required: ['name', 'key']
|
|
36
|
+
}
|
|
37
|
+
}}
|
|
38
|
+
onDelete={(referenceTable) => ReferenceTablesService.delete(referenceTable)}
|
|
39
|
+
onLoad={(params) => ReferenceTablesService.fetchAll(params)}
|
|
40
|
+
onSave={(referenceTable) => ReferenceTablesService.save(referenceTable)}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export default ReferenceTablesList;
|
package/types/index.js.flow
CHANGED
|
@@ -12,6 +12,7 @@ export { default as ColorButton } from './components/ColorButton';
|
|
|
12
12
|
export { default as ColorPickerModal } from './components/ColorPickerModal';
|
|
13
13
|
export { default as useDataList } from './components/DataList';
|
|
14
14
|
export { default as DataTable } from './components/DataTable';
|
|
15
|
+
export { default as DataView } from './components/DataView';
|
|
15
16
|
export { default as DateInput } from './components/DateInput';
|
|
16
17
|
export { default as DatePicker } from './components/DatePicker';
|
|
17
18
|
export { default as DescriptorField } from './components/DescriptorField';
|
|
@@ -53,6 +54,10 @@ export { default as ModalDropdown } from './components/ModalDropdown';
|
|
|
53
54
|
export { default as NestedAccordion } from './components/NestedAccordion';
|
|
54
55
|
export { default as PlayButton } from './components/PlayButton';
|
|
55
56
|
export { default as PhotoViewer } from './components/PhotoViewer';
|
|
57
|
+
export { default as ReferenceCodeDropdown } from './components/ReferenceCodeDropdown';
|
|
58
|
+
export { default as ReferenceCodeModal } from './components/ReferenceCodeModal';
|
|
59
|
+
export { default as ReferenceTableModal } from './components/ReferenceTableModal';
|
|
60
|
+
export { default as ReferenceTablesList } from './components/ReferenceTablesList';
|
|
56
61
|
export { default as RemoteDropdown } from './components/RemoteDropdown';
|
|
57
62
|
export { default as SaveButton } from './components/SaveButton';
|
|
58
63
|
export { default as Section } from './components/Section';
|