-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathContext.js
58 lines (51 loc) · 1.38 KB
/
Context.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import React from 'react';
import {DEBUG} from 'utils';
const FormContext = React.createContext({
uuid: '',
name: '',
slug: '',
url: '',
loginRequired: false,
loginOptions: [],
maintenanceMode: false,
showProgressIndicator: true,
submissionAllowed: 'yes',
submissionStatementsConfiguration: [],
literals: {
beginText: {value: '', resolved: 'Begin'},
changeText: {value: '', resolved: 'Change'},
confirmText: {value: '', resolved: 'Confirm'},
previousText: {value: '', resolved: 'Previous'},
},
steps: [],
});
FormContext.displayName = 'FormContext';
const AnalyticsToolsConfigContext = React.createContext({
govmetricSourceId: '',
govmetricSecureGuid: '',
enableGovmetricAnalytics: false,
});
const ConfigContext = React.createContext({
baseUrl: '',
clientBaseUrl: window.location.href,
basePath: '',
baseTitle: '',
requiredFieldsWithAsterisk: true,
displayComponents: {
app: null,
loginOptions: null,
},
debug: DEBUG,
});
ConfigContext.displayName = 'ConfigContext';
const FormioTranslations = React.createContext({i18n: {}, language: ''});
FormioTranslations.displayName = 'FormioTranslations';
const SubmissionContext = React.createContext({submission: null});
SubmissionContext.displayName = 'SubmissionContext';
export {
FormContext,
ConfigContext,
FormioTranslations,
SubmissionContext,
AnalyticsToolsConfigContext,
};