@performant-software/semantic-components 0.5.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.
Files changed (218) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +0 -0
  3. package/build/index.js +2 -0
  4. package/build/index.js.map +1 -0
  5. package/build/main.css +786 -0
  6. package/index.js +1 -0
  7. package/package.json +37 -0
  8. package/src/components/AccordionDataList.css +8 -0
  9. package/src/components/AccordionDataList.js +224 -0
  10. package/src/components/AccordionList.css +27 -0
  11. package/src/components/AccordionList.js +596 -0
  12. package/src/components/AccordionSelector.css +3 -0
  13. package/src/components/AccordionSelector.js +359 -0
  14. package/src/components/ArrowButtons.css +4 -0
  15. package/src/components/ArrowButtons.js +38 -0
  16. package/src/components/AssociatedDropdown.css +44 -0
  17. package/src/components/AssociatedDropdown.js +338 -0
  18. package/src/components/BooleanIcon.css +0 -0
  19. package/src/components/BooleanIcon.js +33 -0
  20. package/src/components/CancelButton.css +0 -0
  21. package/src/components/CancelButton.js +25 -0
  22. package/src/components/ColorButton.css +4 -0
  23. package/src/components/ColorButton.js +34 -0
  24. package/src/components/ColorPickerModal.css +3 -0
  25. package/src/components/ColorPickerModal.js +77 -0
  26. package/src/components/ColumnResize.css +9 -0
  27. package/src/components/ColumnResize.js +20 -0
  28. package/src/components/DataList.css +0 -0
  29. package/src/components/DataList.js +531 -0
  30. package/src/components/DataTable.css +43 -0
  31. package/src/components/DataTable.js +596 -0
  32. package/src/components/DataTableColumnSelector.css +10 -0
  33. package/src/components/DataTableColumnSelector.js +146 -0
  34. package/src/components/DateInput.css +6 -0
  35. package/src/components/DateInput.js +58 -0
  36. package/src/components/DatePicker.css +72 -0
  37. package/src/components/DatePicker.js +81 -0
  38. package/src/components/DescriptorField.css +0 -0
  39. package/src/components/DescriptorField.js +42 -0
  40. package/src/components/DownloadButton.css +0 -0
  41. package/src/components/DownloadButton.js +23 -0
  42. package/src/components/Draggable.css +0 -0
  43. package/src/components/Draggable.js +94 -0
  44. package/src/components/DropdownButton.css +3 -0
  45. package/src/components/DropdownButton.js +65 -0
  46. package/src/components/DropdownMenu.css +0 -0
  47. package/src/components/DropdownMenu.js +68 -0
  48. package/src/components/EditModal.css +8 -0
  49. package/src/components/EditModal.js +99 -0
  50. package/src/components/EditPage.css +7 -0
  51. package/src/components/EditPage.js +249 -0
  52. package/src/components/EmbeddedList.css +7 -0
  53. package/src/components/EmbeddedList.js +278 -0
  54. package/src/components/FileInputButton.css +0 -0
  55. package/src/components/FileInputButton.js +54 -0
  56. package/src/components/FileUpload.css +31 -0
  57. package/src/components/FileUpload.js +188 -0
  58. package/src/components/FileUploadModal.css +0 -0
  59. package/src/components/FileUploadModal.js +408 -0
  60. package/src/components/FuzzyDate.css +8 -0
  61. package/src/components/FuzzyDate.js +575 -0
  62. package/src/components/GoogleMap.css +0 -0
  63. package/src/components/GoogleMap.js +105 -0
  64. package/src/components/GooglePlacesSearch.css +0 -0
  65. package/src/components/GooglePlacesSearch.js +43 -0
  66. package/src/components/HorizontalCards.css +50 -0
  67. package/src/components/HorizontalCards.js +226 -0
  68. package/src/components/ItemCollection.css +3 -0
  69. package/src/components/ItemCollection.js +159 -0
  70. package/src/components/ItemList.css +0 -0
  71. package/src/components/ItemList.js +126 -0
  72. package/src/components/Items.css +19 -0
  73. package/src/components/Items.js +365 -0
  74. package/src/components/ItemsToggle.css +0 -0
  75. package/src/components/ItemsToggle.js +168 -0
  76. package/src/components/KeyboardField.css +4 -0
  77. package/src/components/KeyboardField.js +147 -0
  78. package/src/components/LazyDocument.css +21 -0
  79. package/src/components/LazyDocument.js +113 -0
  80. package/src/components/LazyImage.css +21 -0
  81. package/src/components/LazyImage.js +119 -0
  82. package/src/components/LazyVideo.css +21 -0
  83. package/src/components/LazyVideo.js +131 -0
  84. package/src/components/LinkButton.css +8 -0
  85. package/src/components/LinkButton.js +23 -0
  86. package/src/components/LinkLabel.css +8 -0
  87. package/src/components/LinkLabel.js +29 -0
  88. package/src/components/List.css +8 -0
  89. package/src/components/List.js +761 -0
  90. package/src/components/ListFilters.css +0 -0
  91. package/src/components/ListFilters.js +408 -0
  92. package/src/components/ListLoader.css +8 -0
  93. package/src/components/ListLoader.js +32 -0
  94. package/src/components/ListTable.css +3 -0
  95. package/src/components/ListTable.js +86 -0
  96. package/src/components/LoginModal.css +7 -0
  97. package/src/components/LoginModal.js +102 -0
  98. package/src/components/MasonryGrid.css +48 -0
  99. package/src/components/MasonryGrid.js +202 -0
  100. package/src/components/MediaGallery.css +37 -0
  101. package/src/components/MediaGallery.js +148 -0
  102. package/src/components/MediaGrid.css +72 -0
  103. package/src/components/MediaGrid.js +74 -0
  104. package/src/components/MediaList.css +3 -0
  105. package/src/components/MediaList.js +98 -0
  106. package/src/components/ModalDropdown.css +11 -0
  107. package/src/components/ModalDropdown.js +84 -0
  108. package/src/components/NestedAccordion.css +41 -0
  109. package/src/components/NestedAccordion.js +276 -0
  110. package/src/components/PhotoViewer.css +3 -0
  111. package/src/components/PhotoViewer.js +36 -0
  112. package/src/components/PlayButton.css +3 -0
  113. package/src/components/PlayButton.js +37 -0
  114. package/src/components/RemoteDropdown.css +13 -0
  115. package/src/components/RemoteDropdown.js +368 -0
  116. package/src/components/SaveButton.css +0 -0
  117. package/src/components/SaveButton.js +31 -0
  118. package/src/components/Section.css +0 -0
  119. package/src/components/Section.js +41 -0
  120. package/src/components/Selectize.css +11 -0
  121. package/src/components/Selectize.js +297 -0
  122. package/src/components/SelectizeHeader.css +3 -0
  123. package/src/components/SelectizeHeader.js +40 -0
  124. package/src/components/TabbedModal.css +14 -0
  125. package/src/components/TabbedModal.js +165 -0
  126. package/src/components/TabsMenu.css +0 -0
  127. package/src/components/TabsMenu.js +35 -0
  128. package/src/components/TagsList.css +0 -0
  129. package/src/components/TagsList.js +43 -0
  130. package/src/components/Thumbnail.css +0 -0
  131. package/src/components/Thumbnail.js +47 -0
  132. package/src/components/Toaster.css +9 -0
  133. package/src/components/Toaster.js +73 -0
  134. package/src/components/VideoFrameSelector.css +3 -0
  135. package/src/components/VideoFrameSelector.js +148 -0
  136. package/src/components/VideoPlayer.css +3 -0
  137. package/src/components/VideoPlayer.js +55 -0
  138. package/src/components/VideoPlayerButton.css +17 -0
  139. package/src/components/VideoPlayerButton.js +17 -0
  140. package/src/components/ViewXML.css +0 -0
  141. package/src/components/ViewXML.js +72 -0
  142. package/src/i18n/en.json +204 -0
  143. package/src/i18n/i18n.js +24 -0
  144. package/src/index.js +76 -0
  145. package/types/components/AccordionDataList.js.flow +224 -0
  146. package/types/components/AccordionList.js.flow +596 -0
  147. package/types/components/AccordionSelector.js.flow +359 -0
  148. package/types/components/ArrowButtons.js.flow +38 -0
  149. package/types/components/AssociatedDropdown.js.flow +338 -0
  150. package/types/components/BooleanIcon.js.flow +33 -0
  151. package/types/components/CancelButton.js.flow +25 -0
  152. package/types/components/ColorButton.js.flow +34 -0
  153. package/types/components/ColorPickerModal.js.flow +77 -0
  154. package/types/components/ColumnResize.js.flow +20 -0
  155. package/types/components/DataList.js.flow +531 -0
  156. package/types/components/DataTable.js.flow +596 -0
  157. package/types/components/DataTableColumnSelector.js.flow +146 -0
  158. package/types/components/DataView.js.flow +125 -0
  159. package/types/components/DateInput.js.flow +58 -0
  160. package/types/components/DatePicker.js.flow +81 -0
  161. package/types/components/DescriptorField.js.flow +42 -0
  162. package/types/components/DownloadButton.js.flow +23 -0
  163. package/types/components/Draggable.js.flow +94 -0
  164. package/types/components/DropdownButton.js.flow +65 -0
  165. package/types/components/DropdownMenu.js.flow +68 -0
  166. package/types/components/EditModal.js.flow +99 -0
  167. package/types/components/EditPage.js.flow +249 -0
  168. package/types/components/EmbeddedList.js.flow +278 -0
  169. package/types/components/FileInputButton.js.flow +54 -0
  170. package/types/components/FileUpload.js.flow +188 -0
  171. package/types/components/FileUploadModal.js.flow +408 -0
  172. package/types/components/FuzzyDate.js.flow +575 -0
  173. package/types/components/GoogleMap.js.flow +105 -0
  174. package/types/components/GooglePlacesSearch.js.flow +43 -0
  175. package/types/components/HorizontalCards.js.flow +226 -0
  176. package/types/components/ItemCollection.js.flow +159 -0
  177. package/types/components/ItemList.js.flow +126 -0
  178. package/types/components/Items.js.flow +365 -0
  179. package/types/components/ItemsToggle.js.flow +168 -0
  180. package/types/components/KeyboardField.js.flow +147 -0
  181. package/types/components/LazyDocument.js.flow +113 -0
  182. package/types/components/LazyImage.js.flow +119 -0
  183. package/types/components/LazyVideo.js.flow +131 -0
  184. package/types/components/LinkButton.js.flow +23 -0
  185. package/types/components/LinkLabel.js.flow +29 -0
  186. package/types/components/List.js.flow +761 -0
  187. package/types/components/ListFilters.js.flow +408 -0
  188. package/types/components/ListLoader.js.flow +32 -0
  189. package/types/components/ListTable.js.flow +86 -0
  190. package/types/components/LoginModal.js.flow +102 -0
  191. package/types/components/MasonryGrid.js.flow +202 -0
  192. package/types/components/MediaGallery.js.flow +148 -0
  193. package/types/components/MediaGrid.js.flow +74 -0
  194. package/types/components/MediaList.js.flow +98 -0
  195. package/types/components/MenuBar.js.flow +77 -0
  196. package/types/components/MenuSidebar.js.flow +72 -0
  197. package/types/components/ModalDropdown.js.flow +84 -0
  198. package/types/components/NestedAccordion.js.flow +276 -0
  199. package/types/components/PhotoViewer.js.flow +36 -0
  200. package/types/components/PlayButton.js.flow +37 -0
  201. package/types/components/RemoteDropdown.js.flow +368 -0
  202. package/types/components/SaveButton.js.flow +31 -0
  203. package/types/components/Section.js.flow +41 -0
  204. package/types/components/Selectize.js.flow +297 -0
  205. package/types/components/SelectizeHeader.js.flow +40 -0
  206. package/types/components/TabbedModal.js.flow +165 -0
  207. package/types/components/TabsMenu.js.flow +35 -0
  208. package/types/components/TagsList.js.flow +43 -0
  209. package/types/components/Thumbnail.js.flow +47 -0
  210. package/types/components/Toaster.js.flow +73 -0
  211. package/types/components/VideoFrameSelector.js.flow +148 -0
  212. package/types/components/VideoPlayer.js.flow +55 -0
  213. package/types/components/VideoPlayerButton.js.flow +17 -0
  214. package/types/components/ViewXML.js.flow +72 -0
  215. package/types/hooks/Imageable.js.flow +54 -0
  216. package/types/i18n/i18n.js.flow +24 -0
  217. package/types/index.js.flow +78 -0
  218. package/webpack.config.js +3 -0
@@ -0,0 +1,73 @@
1
+ // @flow
2
+
3
+ import React, { type Element, useEffect, useState } from 'react';
4
+ import { Message, Transition } from 'semantic-ui-react';
5
+ import _ from 'underscore';
6
+ import './Toaster.css';
7
+
8
+ type Props = {
9
+ children: Array<Element<any>>,
10
+ onDismiss?: () => void,
11
+ timeout: number,
12
+ type: string
13
+ };
14
+
15
+ const TRANSITION_DURATION = 700;
16
+
17
+ const Toaster = (props: Props) => {
18
+ const [visible, setVisible] = useState(true);
19
+
20
+ /*
21
+ * If a timeout is provided, automatically hide the message after <code>timeout</code> milliseconds.
22
+ */
23
+ if (props.timeout && props.timeout > 0) {
24
+ _.delay(() => {
25
+ setVisible(false);
26
+ }, props.timeout);
27
+ }
28
+
29
+ /*
30
+ * If the toaster visibility has change to "false", call the onDismiss prop. We'll delay the call
31
+ * by <code>TRANSITION_DURATION</code> milliseconds in order for the transition to run.
32
+ */
33
+ useEffect(() => {
34
+ if (!visible && props.onDismiss) {
35
+ _.delay(props.onDismiss.bind(this), TRANSITION_DURATION);
36
+ }
37
+ }, [visible]);
38
+
39
+ return (
40
+ <Transition
41
+ animation='slide down'
42
+ duration={TRANSITION_DURATION}
43
+ transitionOnMount
44
+ visible={visible}
45
+ >
46
+ <Message
47
+ className='toaster'
48
+ info={props.type === Toaster.MessageTypes.info}
49
+ negative={props.type === Toaster.MessageTypes.negative}
50
+ onDismiss={() => setVisible(false)}
51
+ positive={props.type === Toaster.MessageTypes.positive}
52
+ warning={props.type === Toaster.MessageTypes.negative}
53
+ >
54
+ { props.children }
55
+ </Message>
56
+ </Transition>
57
+ );
58
+ };
59
+
60
+ Toaster.MessageTypes = {
61
+ info: 'info',
62
+ negative: 'negative',
63
+ positive: 'positive',
64
+ warning: 'warning'
65
+ };
66
+
67
+ Toaster.defaultProps = {
68
+ onDismiss: undefined,
69
+ timeout: 3000,
70
+ type: Toaster.MessageTypes.info
71
+ };
72
+
73
+ export default Toaster;
@@ -0,0 +1,3 @@
1
+ .video-frame-selector video {
2
+ width: 100%;
3
+ }
@@ -0,0 +1,148 @@
1
+ // @flow
2
+
3
+ import { Browser } from '@performant-software/shared-components';
4
+ import React, { useEffect, useRef, useState } from 'react';
5
+ import { withTranslation } from 'react-i18next';
6
+ import {
7
+ Button,
8
+ Grid,
9
+ Input,
10
+ Label,
11
+ Modal,
12
+ Segment
13
+ } from 'semantic-ui-react';
14
+ import i18n from '../i18n/i18n';
15
+ import './VideoFrameSelector.css';
16
+
17
+ type Props = {
18
+ button: any,
19
+ defaultInterval: number,
20
+ onSelect: (file: File) => void,
21
+ src: string,
22
+ title: string
23
+ };
24
+
25
+ const INTERVAL_STEP = 1;
26
+ const MIN_INTERVAL = 1;
27
+ const MAX_INTERVAL = 300;
28
+
29
+ const VideoFrameSelector = (props: Props) => {
30
+ const [duration, setDuration] = useState(0);
31
+ const [interval, setInterval] = useState(props.defaultInterval);
32
+ const [time, setTime] = useState(0);
33
+ const [modal, setModal] = useState(false);
34
+
35
+ const videoRef = useRef(null);
36
+
37
+ useEffect(() => {
38
+ if (videoRef.current) {
39
+ videoRef.current.currentTime = time;
40
+ }
41
+ }, [time]);
42
+
43
+ return (
44
+ <>
45
+ <Button
46
+ {...props.button}
47
+ onClick={() => setModal(true)}
48
+ />
49
+ <Modal
50
+ centered={false}
51
+ className='video-frame-selector'
52
+ open={modal}
53
+ size='small'
54
+ >
55
+ <Modal.Header
56
+ content={props.title}
57
+ />
58
+ <Modal.Content>
59
+ <Segment>
60
+ <video
61
+ crossOrigin='anonymous'
62
+ onLoadedMetadata={() => videoRef.current && setDuration(videoRef.current.duration)}
63
+ ref={videoRef}
64
+ src={props.src}
65
+ />
66
+ </Segment>
67
+ <Grid
68
+ columns={2}
69
+ >
70
+ <Grid.Column>
71
+ <div>
72
+ <Label
73
+ content={i18n.t('VideoFrameSelector.labels.interval', { count: interval })}
74
+ />
75
+ </div>
76
+ <Input
77
+ min={MIN_INTERVAL}
78
+ max={MAX_INTERVAL}
79
+ name='duration'
80
+ onChange={(e, { value }) => setInterval(Number(value))}
81
+ step={INTERVAL_STEP}
82
+ type='range'
83
+ value={interval}
84
+ />
85
+ </Grid.Column>
86
+ <Grid.Column
87
+ textAlign='right'
88
+ >
89
+ <Button
90
+ basic
91
+ disabled={time === 0}
92
+ icon='arrow left'
93
+ onClick={() => setTime(Math.max(time - interval, 0))}
94
+ />
95
+ <Button
96
+ basic
97
+ disabled={time === duration}
98
+ icon='arrow right'
99
+ onClick={() => setTime(Math.min(time + interval, duration))}
100
+ />
101
+ </Grid.Column>
102
+ </Grid>
103
+ </Modal.Content>
104
+ <Modal.Actions>
105
+ <Button
106
+ content={i18n.t('Common.buttons.ok')}
107
+ primary
108
+ onClick={() => {
109
+ const video = videoRef.current;
110
+
111
+ if (video && Browser.isBrowser()) {
112
+ const canvas = document.createElement('canvas');
113
+ canvas.width = video.videoWidth;
114
+ canvas.height = video.videoHeight;
115
+
116
+ canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);
117
+
118
+ canvas.toBlob((blob) => {
119
+ const file = new File([blob], 'test.png', { lastModified: new Date().getTime(), type: blob.type });
120
+ props.onSelect(file);
121
+ setModal(false);
122
+ });
123
+ }
124
+ }}
125
+ />
126
+ <Button
127
+ content={i18n.t('Common.buttons.cancel')}
128
+ inverted
129
+ onClick={() => setModal(false)}
130
+ primary
131
+ />
132
+ </Modal.Actions>
133
+ </Modal>
134
+ </>
135
+ );
136
+ };
137
+
138
+ VideoFrameSelector.defaultProps = {
139
+ button: {
140
+ basic: true,
141
+ content: i18n.t('VideoFrameSelector.buttons.select'),
142
+ icon: 'image'
143
+ },
144
+ defaultInterval: 15,
145
+ title: i18n.t('VideoFrameSelector.title'),
146
+ };
147
+
148
+ export default withTranslation()(VideoFrameSelector);
@@ -0,0 +1,3 @@
1
+ .video-player video {
2
+ width: 100%;
3
+ }
@@ -0,0 +1,55 @@
1
+ // @flow
2
+
3
+ import React, { type Element } from 'react';
4
+ import { Embed, Modal } from 'semantic-ui-react';
5
+ import './VideoPlayer.css';
6
+
7
+ type Props = {
8
+ autoPlay?: boolean,
9
+ embedded?: boolean,
10
+ icon?: string | Element<any>,
11
+ onClose: () => void,
12
+ open: boolean,
13
+ placeholder?: ?string,
14
+ size?: string,
15
+ video: string
16
+ };
17
+
18
+ const VideoPlayer = (props: Props) => (
19
+ <Modal
20
+ centered={false}
21
+ className='video-player'
22
+ closeIcon
23
+ onClose={props.onClose.bind(this)}
24
+ open={props.open}
25
+ size={props.size}
26
+ >
27
+ <Modal.Content>
28
+ { props.embedded && (
29
+ <Embed
30
+ active={props.autoPlay}
31
+ icon={props.icon}
32
+ iframe={props.autoPlay ? { allow: 'autoplay' } : undefined}
33
+ placeholder={props.placeholder}
34
+ url={`${props.video}${props.autoPlay ? '?autoplay=true' : ''}`}
35
+ />
36
+ )}
37
+ { !props.embedded && (
38
+ <video
39
+ autoPlay={props.autoPlay}
40
+ controls
41
+ src={props.video}
42
+ />
43
+ )}
44
+ </Modal.Content>
45
+ </Modal>
46
+ );
47
+
48
+ VideoPlayer.defaultProps = {
49
+ autoPlay: false,
50
+ embedded: false,
51
+ icon: 'right circle arrow',
52
+ size: 'small'
53
+ };
54
+
55
+ export default VideoPlayer;
@@ -0,0 +1,17 @@
1
+ .video-player-button {
2
+ height: 100%;
3
+ left: 0;
4
+ position: absolute;
5
+ top: 0;
6
+ width: 100%;
7
+ z-index: 2;
8
+ }
9
+
10
+ .video-player-button > div:first-child {
11
+ align-items: center;
12
+ display: flex;
13
+ height: 100%;
14
+ justify-content: center;
15
+ width: 100%;
16
+ }
17
+
@@ -0,0 +1,17 @@
1
+ // @flow
2
+
3
+ import React from 'react';
4
+ import PlayButton from './PlayButton';
5
+ import './VideoPlayerButton.css';
6
+
7
+ const VideoPlayerButton = () => (
8
+ <div
9
+ className='icon video-player-button'
10
+ >
11
+ <div>
12
+ <PlayButton />
13
+ </div>
14
+ </div>
15
+ );
16
+
17
+ export default VideoPlayerButton;
File without changes
@@ -0,0 +1,72 @@
1
+ // @flow
2
+
3
+ import React, { type ComponentType, useState } from 'react';
4
+ import SyntaxHighlighter from 'react-syntax-highlighter';
5
+ import { Button, Modal } from 'semantic-ui-react';
6
+ import i18n from '../i18n/i18n';
7
+
8
+ type Props = {
9
+ highlighter?: any,
10
+ opener: {
11
+ component: ComponentType<any>,
12
+ props: any
13
+ },
14
+ style: any,
15
+ xml: string
16
+ };
17
+
18
+ const ViewXML = (props: Props) => {
19
+ const [showModal, setShowModal] = useState(false);
20
+ const OpenerComponent = props.opener.component;
21
+ const openerProps = props.opener.props;
22
+
23
+ return (
24
+ <>
25
+ <OpenerComponent
26
+ {...openerProps}
27
+ className='view-xml-trigger'
28
+ onClick={() => setShowModal(true)}
29
+ />
30
+ <Modal
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)}
53
+ />
54
+ </Modal.Actions>
55
+ </Modal>
56
+ </>
57
+ );
58
+ };
59
+
60
+ ViewXML.defaultProps = {
61
+ opener: {
62
+ component: Button,
63
+ props: {
64
+ content: i18n.t('ViewXML.buttons.view')
65
+ }
66
+ },
67
+ style: {
68
+ maxHeight: '70vh'
69
+ }
70
+ };
71
+
72
+ export default ViewXML;
@@ -0,0 +1,204 @@
1
+ {
2
+ "AccordionList": {
3
+ "deleteContent": "Are you sure you want to remove this record?",
4
+ "deleteHeader": "Confirm Remove",
5
+ "record": "Record",
6
+ "record_plural": "Records"
7
+ },
8
+ "AccordionSelector": {
9
+ "title": "Select Items"
10
+ },
11
+ "Common": {
12
+ "buttons": {
13
+ "add": "Add",
14
+ "cancel": "Cancel",
15
+ "clear": "Clear",
16
+ "edit": "Edit",
17
+ "ok": "OK",
18
+ "save": "Save"
19
+ },
20
+ "errors": {
21
+ "title": "Oops!"
22
+ },
23
+ "messages": {
24
+ "error": {
25
+ "header": "Oops!"
26
+ },
27
+ "loading": "Loading",
28
+ "save": {
29
+ "content": "Your changes have been saved.",
30
+ "header": "Success!"
31
+ }
32
+ }
33
+ },
34
+ "EditContainer": {
35
+ "errors": {
36
+ "general": "Something went wrong while saving the record. Please make sure all required fields are filled out.",
37
+ "required": "The {{key}} field is required.",
38
+ "system": "A system error occurred while saving the record. Please contact your system administrator.",
39
+ "unique": "A record with the {{key}} \"{{value}}\" already exists."
40
+ }
41
+ },
42
+ "DataTable": {
43
+ "actions": {
44
+ "copy": {
45
+ "content": "Creates an editable copy to be saved as a new record",
46
+ "title": "Copy"
47
+ },
48
+ "delete": {
49
+ "content": "Removes the record, permanently",
50
+ "title": "Remove"
51
+ },
52
+ "edit": {
53
+ "content": "Opens the modal to edit the record",
54
+ "title": "Edit"
55
+ }
56
+ },
57
+ "columns": {
58
+ "actions": "Actions",
59
+ "select": "Select"
60
+ },
61
+ "loading": "Loading"
62
+ },
63
+ "EditProvider": {
64
+ "errors": {
65
+ "general": "Something went wrong while saving the record. Please make sure all required fields are filled out.",
66
+ "required": "The {{key}} field is required.",
67
+ "unique": "A record with the {{key}} \"{{value}}\" already exists."
68
+ }
69
+ },
70
+ "FileUpload": {
71
+ "add": "<0>Add files</0> or drop files here",
72
+ "errors": {
73
+ "fileType": "Unable to upload {{name}} because {{type}} files are not allowed.",
74
+ "maxSize": "Unable to upload {{name}} because it exceeds 10 MB."
75
+ }
76
+ },
77
+ "FileUploadModal": {
78
+ "errors": {
79
+ "required": "{{filename}} - The following fields are required: {{fields}}"
80
+ },
81
+ "loader": "Uploading files...",
82
+ "title": "Upload Files"
83
+ },
84
+ "FuzzyDate": {
85
+ "accuracy": {
86
+ "date": "Date",
87
+ "month": "Month",
88
+ "year": "Year"
89
+ },
90
+ "buttons": {
91
+ "addRange": "Add Range",
92
+ "removeRange": "Remove Range"
93
+ },
94
+ "labels": {
95
+ "accuracy": "Accuracy",
96
+ "date": "Date",
97
+ "description": "Description",
98
+ "month": "Month",
99
+ "year": "Year"
100
+ },
101
+ "title": "Fuzzy Date"
102
+ },
103
+ "ItemList": {
104
+ "actions": {
105
+ "copy": "Copy",
106
+ "delete": "Remove",
107
+ "edit": "Edit"
108
+ },
109
+ "buttons": {
110
+ "clear": "Clear selected",
111
+ "deselectAll": "Deselect all",
112
+ "selectAll": "Select all"
113
+ }
114
+ },
115
+ "KeyboardField": {
116
+ "labels": {
117
+ "hideKeyboard": "Hide Keyboard",
118
+ "showKeyboard": "Show Keyboard"
119
+ }
120
+ },
121
+ "LazyDocument": {
122
+ "buttons": {
123
+ "download": "Download"
124
+ }
125
+ },
126
+ "LazyImage": {
127
+ "buttons": {
128
+ "view": "View image"
129
+ }
130
+ },
131
+ "LazyVideo": {
132
+ "buttons": {
133
+ "play": "Play video"
134
+ }
135
+ },
136
+ "List": {
137
+ "buttons": {
138
+ "add": "Add",
139
+ "deleteAll": "Delete all"
140
+ },
141
+ "deleteAllContent": "Are you sure you want to remove all records? This action cannot be undone.",
142
+ "deleteAllHeader": "Confirm Remove All",
143
+ "deleteContent": "Are you sure you want to remove this record?",
144
+ "deleteHeader": "Confirm Remove",
145
+ "emptyList": "No matching records found.",
146
+ "emptyListAdd": "You haven't added any yet. Click <1><0><0></0><1></1></0></1> to get started.",
147
+ "labels": {
148
+ "perPage": "Show {{perPage}}"
149
+ },
150
+ "record": "Record",
151
+ "record_plural": "Records"
152
+ },
153
+ "ListFilters": {
154
+ "buttons": {
155
+ "add": "Add",
156
+ "reset": "Reset filters"
157
+ },
158
+ "operators": {
159
+ "contain": "Contains",
160
+ "empty": "Is empty",
161
+ "equal": "Equals",
162
+ "greaterThan": "Is greater than",
163
+ "lessThan": "Is less than",
164
+ "notContain": "Does not contain",
165
+ "notEmpty": "Is not empty",
166
+ "notEqual": "Does not equal"
167
+ },
168
+ "title": "Filters"
169
+ },
170
+ "LoginModal": {
171
+ "buttonCancel": "Cancel",
172
+ "buttonLogin": "Login",
173
+ "email": "Email",
174
+ "header": "Login",
175
+ "loginErrorContent": "The username and/or password you entered is invalid. Please double check and try again.",
176
+ "loginErrorHeader": "Invalid Credentials",
177
+ "password": "Password"
178
+ },
179
+ "RemoteDropdown": {
180
+ "labels": {
181
+ "add": "Add",
182
+ "loadMore": "Load more"
183
+ }
184
+ },
185
+ "Selectize": {
186
+ "noRecords": "No matching records."
187
+ },
188
+ "VideoFrameSelector": {
189
+ "buttons": {
190
+ "select": "Select frame"
191
+ },
192
+ "labels": {
193
+ "interval": "Interval: {{count}} second",
194
+ "interval_plural": "Interval: {{count}} seconds"
195
+ },
196
+ "title": "Select Frame"
197
+ },
198
+ "ViewXML": {
199
+ "buttons": {
200
+ "view": "View XML"
201
+ },
202
+ "title": "XML"
203
+ }
204
+ }
@@ -0,0 +1,24 @@
1
+ import i18next from 'i18next';
2
+
3
+ import en from './en.json';
4
+
5
+ const resources = {
6
+ en: {
7
+ translation: en
8
+ }
9
+ };
10
+
11
+ const i18n = i18next.createInstance();
12
+
13
+ i18n
14
+ .init({
15
+ debug: true,
16
+ fallbackLng: 'en',
17
+ lng: 'en',
18
+ interpolation: {
19
+ escapeValue: false,
20
+ },
21
+ resources
22
+ });
23
+
24
+ export default i18n;