@performant-software/semantic-components 0.5.5 → 0.5.8
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 +4 -4
- package/build/semantic-ui.css +1 -1
- package/package.json +3 -3
- package/src/components/DataTable.js +12 -1
- package/src/components/DataTableColumnSelector.js +2 -1
- package/src/components/ListTable.js +19 -10
- package/src/css/theme.config +1 -1
- package/src/css/themes/default/elements/step.overrides +2 -2
- package/src/index.js +1 -0
- package/types/components/AccordionList.js.flow +2 -2
- package/types/components/AccordionSelector.js.flow +93 -86
- package/types/components/ColorPickerModal.js.flow +36 -31
- package/types/components/DataTable.js.flow +12 -1
- package/types/components/DataTableColumnSelector.js.flow +12 -0
- package/types/components/DataView.js.flow +36 -30
- package/types/components/DatabaseView.js.flow +126 -0
- package/types/components/DropdownMenu.js.flow +11 -1
- package/types/components/FileUploadModal.js.flow +43 -38
- package/types/components/FuzzyDate.js.flow +114 -99
- package/types/components/ListFilters.js.flow +115 -109
- package/types/components/ListTable.js.flow +22 -10
- package/types/components/LoginModal.js.flow +72 -65
- package/types/components/MenuBar.js.flow +1 -0
- package/types/components/PhotoViewer.js.flow +23 -15
- package/types/components/ReferenceCodeModal.js.flow +27 -21
- package/types/components/ReferenceTableModal.js.flow +61 -55
- package/types/components/Selectize.js.flow +50 -45
- package/types/components/TabbedModal.js.flow +30 -24
- package/types/components/VideoFrameSelector.js.flow +90 -78
- package/types/components/VideoPlayer.js.flow +58 -30
- package/types/components/ViewXML.js.flow +38 -32
- package/types/context/ModalContext.js.flow +5 -0
- package/types/index.js.flow +1 -0
- package/webpack.config.js +2 -1
|
@@ -4,6 +4,7 @@ import React, { type ComponentType, useState } from 'react';
|
|
|
4
4
|
import SyntaxHighlighter from 'react-syntax-highlighter';
|
|
5
5
|
import { Button, Modal } from 'semantic-ui-react';
|
|
6
6
|
import i18n from '../i18n/i18n';
|
|
7
|
+
import ModalContext from '../context/ModalContext';
|
|
7
8
|
|
|
8
9
|
type Props = {
|
|
9
10
|
highlighter?: any,
|
|
@@ -21,39 +22,44 @@ const ViewXML = (props: Props) => {
|
|
|
21
22
|
const openerProps = props.opener.props;
|
|
22
23
|
|
|
23
24
|
return (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
className='view-xml-modal'
|
|
32
|
-
centered={false}
|
|
33
|
-
open={showModal}
|
|
34
|
-
onClose={() => setShowModal(false)}
|
|
35
|
-
>
|
|
36
|
-
<Modal.Header
|
|
37
|
-
content={i18n.t('ViewXML.title')}
|
|
38
|
-
/>
|
|
39
|
-
<Modal.Content>
|
|
40
|
-
<SyntaxHighlighter
|
|
41
|
-
language='xml'
|
|
42
|
-
style={props.highlighter}
|
|
43
|
-
>
|
|
44
|
-
{ props.xml }
|
|
45
|
-
</SyntaxHighlighter>
|
|
46
|
-
</Modal.Content>
|
|
47
|
-
<Modal.Actions>
|
|
48
|
-
<Button
|
|
49
|
-
content='Close'
|
|
50
|
-
inverted
|
|
51
|
-
primary
|
|
52
|
-
onClick={() => setShowModal(false)}
|
|
25
|
+
<ModalContext.Consumer>
|
|
26
|
+
{ (mountNode) => (
|
|
27
|
+
<>
|
|
28
|
+
<OpenerComponent
|
|
29
|
+
{...openerProps}
|
|
30
|
+
className='view-xml-trigger'
|
|
31
|
+
onClick={() => setShowModal(true)}
|
|
53
32
|
/>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
33
|
+
<Modal
|
|
34
|
+
className='view-xml-modal'
|
|
35
|
+
closeIcon
|
|
36
|
+
centered={false}
|
|
37
|
+
mountNode={mountNode}
|
|
38
|
+
open={showModal}
|
|
39
|
+
onClose={() => setShowModal(false)}
|
|
40
|
+
>
|
|
41
|
+
<Modal.Header
|
|
42
|
+
content={i18n.t('ViewXML.title')}
|
|
43
|
+
/>
|
|
44
|
+
<Modal.Content>
|
|
45
|
+
<SyntaxHighlighter
|
|
46
|
+
language='xml'
|
|
47
|
+
style={props.highlighter}
|
|
48
|
+
>
|
|
49
|
+
{ props.xml }
|
|
50
|
+
</SyntaxHighlighter>
|
|
51
|
+
</Modal.Content>
|
|
52
|
+
<Modal.Actions>
|
|
53
|
+
<Button
|
|
54
|
+
basic
|
|
55
|
+
content={i18n.t('Common.buttons.close')}
|
|
56
|
+
onClick={() => setShowModal(false)}
|
|
57
|
+
/>
|
|
58
|
+
</Modal.Actions>
|
|
59
|
+
</Modal>
|
|
60
|
+
</>
|
|
61
|
+
)}
|
|
62
|
+
</ModalContext.Consumer>
|
|
57
63
|
);
|
|
58
64
|
};
|
|
59
65
|
|
package/types/index.js.flow
CHANGED
|
@@ -16,6 +16,7 @@ export { default as ColorPickerModal } from './components/ColorPickerModal';
|
|
|
16
16
|
export { default as useDataList } from './components/DataList';
|
|
17
17
|
export { default as DataTable } from './components/DataTable';
|
|
18
18
|
export { default as DataView } from './components/DataView';
|
|
19
|
+
export { default as DatabaseView } from './components/DatabaseView';
|
|
19
20
|
export { default as DateInput } from './components/DateInput';
|
|
20
21
|
export { default as DatePicker } from './components/DatePicker';
|
|
21
22
|
export { default as DescriptorField } from './components/DescriptorField';
|
package/webpack.config.js
CHANGED
|
@@ -5,7 +5,8 @@ module.exports = configure(__dirname, {
|
|
|
5
5
|
resolve: {
|
|
6
6
|
alias: {
|
|
7
7
|
'../../theme.config$': path.join(__dirname, '/src/css/theme.config'),
|
|
8
|
-
'../src/css/site': path.join(__dirname, '/src/css/site')
|
|
8
|
+
'../src/css/site': path.join(__dirname, '/src/css/site'),
|
|
9
|
+
'../src/css/themes': path.join(__dirname, '/src/css/themes')
|
|
9
10
|
}
|
|
10
11
|
},
|
|
11
12
|
optimization: {
|