@kineticdata/react 6.0.1 → 6.0.2
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/lib/apis/agent/adapters.js +2 -3
- package/lib/apis/agent/bridges.js +7 -13
- package/lib/apis/agent/handlers.js +7 -13
- package/lib/apis/core/activity.js +2 -3
- package/lib/apis/core/attributeDefinitions.js +6 -11
- package/lib/apis/core/attributeDefinitions.test.js +201 -213
- package/lib/apis/core/authentication.js +74 -84
- package/lib/apis/core/backgroundJobs.js +5 -9
- package/lib/apis/core/bridgeModelAttributeMappings.js +5 -10
- package/lib/apis/core/bridgeModelAttributes.js +6 -11
- package/lib/apis/core/bridgeModelMappings.js +5 -10
- package/lib/apis/core/bridgeModelQualificationMappings.js +5 -10
- package/lib/apis/core/bridgeModelQualifications.js +5 -10
- package/lib/apis/core/bridgeModels.js +7 -13
- package/lib/apis/core/bridgeModels.test.js +313 -333
- package/lib/apis/core/bridgedresources.js +7 -13
- package/lib/apis/core/categories.js +6 -11
- package/lib/apis/core/fileResources.js +5 -10
- package/lib/apis/core/filestores.js +5 -10
- package/lib/apis/core/formTypes.js +6 -11
- package/lib/apis/core/forms.js +6 -11
- package/lib/apis/core/forms.test.js +201 -213
- package/lib/apis/core/kapps.js +6 -11
- package/lib/apis/core/kapps.test.js +122 -130
- package/lib/apis/core/logs.js +3 -5
- package/lib/apis/core/memberships.js +3 -5
- package/lib/apis/core/meta.js +6 -11
- package/lib/apis/core/notices.js +2 -3
- package/lib/apis/core/oauthClients.js +6 -11
- package/lib/apis/core/platformComponents.js +10 -19
- package/lib/apis/core/platformItems.js +2 -3
- package/lib/apis/core/profile.js +3 -5
- package/lib/apis/core/securityPolicyDefinitions.js +6 -11
- package/lib/apis/core/securityPolicyDefinitions.test.js +254 -268
- package/lib/apis/core/space.js +3 -5
- package/lib/apis/core/space.test.js +106 -114
- package/lib/apis/core/submissions.js +17 -33
- package/lib/apis/core/teams.js +6 -11
- package/lib/apis/core/translations.js +18 -35
- package/lib/apis/core/translations.test.js +1343 -1437
- package/lib/apis/core/users.js +6 -11
- package/lib/apis/core/version.js +2 -3
- package/lib/apis/core/webApis.js +5 -10
- package/lib/apis/core/webhooks.js +6 -11
- package/lib/apis/core/webhooks.test.js +243 -257
- package/lib/apis/core/webhooksJobs.js +3 -5
- package/lib/apis/core/workflows.js +7 -13
- package/lib/apis/http.js +16 -31
- package/lib/apis/system/index.js +46 -91
- package/lib/apis/task/index.js +60 -119
- package/lib/components/agent/bridge/BridgeForm.js +1 -2
- package/lib/components/agent/bridge/BridgeTable.js +1 -2
- package/lib/components/agent/filestore/FilestoreForm.js +1 -2
- package/lib/components/agent/filestore/FilestoreTable.js +1 -2
- package/lib/components/agent/handler/AgentHandlerForm.js +1 -2
- package/lib/components/agent/handler/AgentHandlerTable.js +1 -2
- package/lib/components/common/AttributeSelect.js +2 -3
- package/lib/components/common/BridgeSelect.js +16 -17
- package/lib/components/common/ComponentConfigContext.js +1 -2
- package/lib/components/common/ContentEditable.js +23 -3
- package/lib/components/common/FormSelect.js +16 -17
- package/lib/components/common/NodeSelect.js +2 -3
- package/lib/components/common/Scroller.js +2 -3
- package/lib/components/common/StaticSelect.js +14 -15
- package/lib/components/common/TableInput.js +276 -63
- package/lib/components/common/TeamSelect.js +16 -17
- package/lib/components/common/ToastContainer.js +7 -12
- package/lib/components/common/Typeahead.js +15 -2
- package/lib/components/common/UserSelect.js +16 -17
- package/lib/components/common/authentication/AuthInterceptor.js +2 -3
- package/lib/components/common/authentication/AuthInterceptor.test.js +141 -153
- package/lib/components/common/authentication/AuthenticationContainer.js +332 -343
- package/lib/components/common/authentication/RequestInterceptor.js +2 -10
- package/lib/components/common/code_input/CodeInput.js +4 -9
- package/lib/components/common/code_input/draftHelpers.js +20 -37
- package/lib/components/common/code_input/languageHelpers.js +6 -12
- package/lib/components/common/code_input/languageHelpers.test.js +10 -8
- package/lib/components/common/defaults/Toast.js +1 -2
- package/lib/components/common/defaults/index.js +2 -3
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +1 -2
- package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +1 -2
- package/lib/components/core/bridge_model/BridgeModelForm.js +52 -55
- package/lib/components/core/bridge_model/BridgeModelTable.js +1 -2
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +1 -2
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +1 -2
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +1 -2
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +1 -2
- package/lib/components/core/category/CategoryForm.js +1 -2
- package/lib/components/core/category/CategoryTable.js +1 -2
- package/lib/components/core/core_form/CoreForm.js +11 -22
- package/lib/components/core/core_form/defaults/index.js +11 -19
- package/lib/components/core/core_form/globals.js +3 -5
- package/lib/components/core/field_definition/FieldDefinitionForm.js +1 -2
- package/lib/components/core/field_definition/FieldDefinitionTable.js +2 -4
- package/lib/components/core/file_resource/FileResourceForm.js +1 -2
- package/lib/components/core/file_resource/FileResourceTable.js +1 -2
- package/lib/components/core/form/FormForm.js +1 -2
- package/lib/components/core/form/FormTable.js +1 -2
- package/lib/components/core/form_type/FormTypeForm.js +1 -2
- package/lib/components/core/form_type/FormTypeTable.js +1 -2
- package/lib/components/core/i18n/I18n.js +2 -4
- package/lib/components/core/i18n/I18nContext.js +1 -2
- package/lib/components/core/i18n/I18nProvider.js +2 -3
- package/lib/components/core/i18n/Moment.js +10 -9
- package/lib/components/core/index_definition/IndexDefinitionForm.js +1 -2
- package/lib/components/core/index_definition/IndexDefinitionTable.js +1 -2
- package/lib/components/core/index_job/IndexJobTable.js +1 -2
- package/lib/components/core/kapp/KappForm.js +1 -2
- package/lib/components/core/kapp/KappTable.js +1 -2
- package/lib/components/core/log/LogTable.js +2 -4
- package/lib/components/core/oauth_client/OAuthClientForm.js +1 -2
- package/lib/components/core/oauth_client/OAuthClientTable.js +1 -2
- package/lib/components/core/platform_component/AgentComponentForm.js +1 -2
- package/lib/components/core/platform_component/AgentComponentTable.js +1 -2
- package/lib/components/core/platform_component/TaskComponentForm.js +1 -2
- package/lib/components/core/profile/ProfileForm.js +1 -2
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +3 -6
- package/lib/components/core/security_definition/SecurityDefinitionTable.js +1 -2
- package/lib/components/core/space/SpaceForm.js +1 -2
- package/lib/components/core/submission/DatastoreSubmissionFilters.js +3 -5
- package/lib/components/core/submission/DatastoreSubmissionTable.js +2 -4
- package/lib/components/core/submission/FormSubmissionFilters.js +4 -7
- package/lib/components/core/submission/FormSubmissionTable.js +2 -4
- package/lib/components/core/submission/KappSubmissionTable.js +2 -4
- package/lib/components/core/submission/SubmissionForm.js +1 -2
- package/lib/components/core/submission/SubmissionTable.js +2 -3
- package/lib/components/core/submission/helpers.js +4 -7
- package/lib/components/core/team/TeamForm.js +1 -2
- package/lib/components/core/team/TeamTable.js +1 -2
- package/lib/components/core/translation/ContextForm.js +1 -2
- package/lib/components/core/translation/ContextTable.js +1 -2
- package/lib/components/core/translation/EntryForm.js +1 -2
- package/lib/components/core/translation/EntryTable.js +1 -2
- package/lib/components/core/translation/LocaleForm.js +1 -2
- package/lib/components/core/translation/LocaleTable.js +1 -2
- package/lib/components/core/user/UserForm.js +1 -2
- package/lib/components/core/user/UserTable.js +1 -2
- package/lib/components/core/webapi/WebApiForm.js +97 -101
- package/lib/components/core/webapi/WebApiTable.js +1 -2
- package/lib/components/core/webhook/WebhookForm.js +1 -2
- package/lib/components/core/webhook/WebhookTable.js +1 -2
- package/lib/components/core/webhook_job/WebhookJobTable.js +1 -2
- package/lib/components/form/Form.helpers.js +10 -19
- package/lib/components/form/Form.js +312 -355
- package/lib/components/form/Form.models.js +6 -11
- package/lib/components/form/FormState.js +1 -2
- package/lib/components/form/KitchenSinkForm.js +23 -3
- package/lib/components/form/SimpleForm.helpers.js +262 -0
- package/lib/components/form/SimpleForm.js +462 -0
- package/lib/components/form/SimpleForm.models.js +62 -0
- package/lib/components/form/defaults/AttributesField.js +3 -4
- package/lib/components/form/defaults/CheckboxField.js +2 -3
- package/lib/components/form/defaults/CodeField.js +2 -3
- package/lib/components/form/defaults/FormButtons.js +2 -3
- package/lib/components/form/defaults/FormError.js +2 -3
- package/lib/components/form/defaults/FormField.js +2 -3
- package/lib/components/form/defaults/FormLayout.js +2 -3
- package/lib/components/form/defaults/FormMultiField.js +2 -3
- package/lib/components/form/defaults/PasswordField.js +2 -3
- package/lib/components/form/defaults/RadioField.js +2 -3
- package/lib/components/form/defaults/SampleTeamsRolesFIeld.js +2 -3
- package/lib/components/form/defaults/SelectField.js +2 -3
- package/lib/components/form/defaults/SelectMultiField.js +2 -3
- package/lib/components/form/defaults/TableField.js +2 -3
- package/lib/components/form/defaults/TeamField.js +2 -3
- package/lib/components/form/defaults/TeamMultiField.js +2 -3
- package/lib/components/form/defaults/TextField.js +2 -3
- package/lib/components/form/defaults/TextMultiField.js +2 -3
- package/lib/components/form/defaults/UserField.js +2 -3
- package/lib/components/form/defaults/UserMultiField.js +2 -3
- package/lib/components/form/defaults/index.js +2 -3
- package/lib/components/form/tests/Form.test.js +3865 -4257
- package/lib/components/form/tests/components.js +2 -3
- package/lib/components/index.js +7 -0
- package/lib/components/system/SystemBackgroundTasksTable.js +1 -2
- package/lib/components/system/SystemCassandraForm.js +1 -2
- package/lib/components/system/SystemElasticSearchForm.js +1 -2
- package/lib/components/system/SystemFilestoreForm.js +2 -3
- package/lib/components/system/SystemForm.js +1 -2
- package/lib/components/system/SystemIngressForm.js +1 -2
- package/lib/components/system/SystemSecurityForm.js +1 -2
- package/lib/components/system/SystemSmtpForm.js +1 -2
- package/lib/components/system/SystemTaskAdapterForm.js +1 -2
- package/lib/components/system/SystemTrustedCertificateForm.js +1 -2
- package/lib/components/system/SystemTrustedCertificatesTable.js +1 -2
- package/lib/components/system/SystemUserForm.js +1 -2
- package/lib/components/system/helpers.js +11 -21
- package/lib/components/system/spaces/SystemSpaceForm.js +2 -3
- package/lib/components/system/spaces/SystemTenantForm.js +2 -3
- package/lib/components/system/spaces/SystemTenantTable.js +1 -2
- package/lib/components/table/Table.js +48 -51
- package/lib/components/table/Table.redux.js +161 -188
- package/lib/components/table/Table.test.js +115 -123
- package/lib/components/table/defaults/BodyCell.js +1 -2
- package/lib/components/table/defaults/BodyRow.js +1 -2
- package/lib/components/table/defaults/BooleanFilter.js +1 -2
- package/lib/components/table/defaults/ColumnControl.js +1 -2
- package/lib/components/table/defaults/EmptyBodyRow.js +1 -2
- package/lib/components/table/defaults/FilterLayout.js +1 -2
- package/lib/components/table/defaults/Footer.js +1 -2
- package/lib/components/table/defaults/FooterCell.js +1 -2
- package/lib/components/table/defaults/FooterRow.js +1 -2
- package/lib/components/table/defaults/Header.js +1 -2
- package/lib/components/table/defaults/HeaderCell.js +1 -2
- package/lib/components/table/defaults/HeaderRow.js +1 -2
- package/lib/components/table/defaults/PaginationControl.js +2 -4
- package/lib/components/table/defaults/TableBody.js +1 -2
- package/lib/components/table/defaults/TableLayout.js +1 -2
- package/lib/components/table/defaults/TextFilter.js +1 -2
- package/lib/components/table/defaults/index.js +2 -3
- package/lib/components/task/builder/Connector.js +26 -11
- package/lib/components/task/builder/ConnectorForm.js +1 -2
- package/lib/components/task/builder/Node.js +18 -9
- package/lib/components/task/builder/NodeForm.js +1 -2
- package/lib/components/task/builder/NodeParametersForm.js +1 -2
- package/lib/components/task/builder/SvgCanvas.js +2 -3
- package/lib/components/task/builder/SvgText.js +2 -3
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +3 -6
- package/lib/components/task/builder/TreeBuilder.js +10 -4
- package/lib/components/task/builder/builder.redux.js +171 -182
- package/lib/components/task/builder/constants.js +38 -76
- package/lib/components/task/builder/helpers.js +23 -40
- package/lib/components/task/builder/models.js +19 -35
- package/lib/components/task/category/TaskCategoryForm.js +2 -3
- package/lib/components/task/category/TaskCategoryTable.js +1 -2
- package/lib/components/task/common/UsageTable.js +1 -2
- package/lib/components/task/engine/EngineSettingsForm.js +2 -3
- package/lib/components/task/errors/RunErrorTable.js +2 -3
- package/lib/components/task/errors/SystemErrorsTable.js +1 -2
- package/lib/components/task/handlers/HandlerForm.js +2 -3
- package/lib/components/task/handlers/HandlerTable.js +1 -2
- package/lib/components/task/handlers/MissingHandlerTable.js +1 -2
- package/lib/components/task/policy_rule/PolicyRuleForm.js +2 -3
- package/lib/components/task/policy_rule/PolicyRuleTable.js +1 -2
- package/lib/components/task/runs/CreateManualTriggerForm.js +1 -2
- package/lib/components/task/runs/RunTable.js +2 -3
- package/lib/components/task/runs/RunTaskTable.js +1 -2
- package/lib/components/task/sources/SourceForm.js +1 -2
- package/lib/components/task/sources/SourceTable.js +1 -2
- package/lib/components/task/triggers/TriggerTable.js +2 -3
- package/lib/components/task/workflows/LinkedWorkflowForm.js +3 -5
- package/lib/components/task/workflows/LinkedWorkflowTable.js +1 -2
- package/lib/components/task/workflows/MissingRoutineTable.js +1 -2
- package/lib/components/task/workflows/WorkflowForm.js +2 -3
- package/lib/components/task/workflows/WorkflowTable.js +1 -2
- package/lib/helpers/SearchBuilder.js +2 -4
- package/lib/helpers/index.js +13 -26
- package/lib/index.js +3 -6
- package/lib/reducer.js +3 -5
- package/lib/saga.js +32 -48
- package/lib/store.js +32 -42
- package/package.json +12 -15
- package/lib/components/core/CoreFormModal.js +0 -64
- package/lib/components/core/CoreModal.js +0 -114
|
@@ -85,93 +85,91 @@ var defaultLoginProps = {
|
|
|
85
85
|
(0, _store.regSaga)('WATCH_SYSTEM_AUTHENTICATION', /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
|
86
86
|
var system, pollingActive, _yield$race, authenticated, refresh, _yield$call, error, token;
|
|
87
87
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
|
88
|
-
while (1) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
_context.next = 41;
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
_context.prev = 7;
|
|
107
|
-
_context.next = 10;
|
|
108
|
-
return (0, _effects.race)({
|
|
109
|
-
authenticated: (0, _effects.take)('SET_AUTHENTICATED'),
|
|
110
|
-
refresh: (0, _effects.delay)(180000),
|
|
111
|
-
// 3 minutes.
|
|
112
|
-
isLoggingOut: (0, _effects.take)('LOGOUT'),
|
|
113
|
-
isTimingOut: (0, _effects.take)('TIMEOUT')
|
|
114
|
-
});
|
|
115
|
-
case 10:
|
|
116
|
-
_yield$race = _context.sent;
|
|
117
|
-
authenticated = _yield$race.authenticated;
|
|
118
|
-
refresh = _yield$race.refresh;
|
|
119
|
-
if (!authenticated) {
|
|
120
|
-
_context.next = 17;
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
// The authentication event occurred, so now we want to periodically
|
|
124
|
-
// refresh the token.
|
|
125
|
-
pollingActive = true;
|
|
126
|
-
_context.next = 34;
|
|
127
|
-
break;
|
|
128
|
-
case 17:
|
|
129
|
-
if (!(refresh && pollingActive)) {
|
|
130
|
-
_context.next = 33;
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
_context.next = 20;
|
|
134
|
-
return (0, _effects.call)(_apis.refreshSystemToken);
|
|
135
|
-
case 20:
|
|
136
|
-
_yield$call = _context.sent;
|
|
137
|
-
error = _yield$call.error;
|
|
138
|
-
token = _yield$call.token;
|
|
139
|
-
if (!error) {
|
|
140
|
-
_context.next = 28;
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
_context.next = 26;
|
|
144
|
-
return (0, _effects.put)((0, _store.action)('TIMEOUT'));
|
|
145
|
-
case 26:
|
|
146
|
-
_context.next = 31;
|
|
88
|
+
while (1) switch (_context.prev = _context.next) {
|
|
89
|
+
case 0:
|
|
90
|
+
_context.next = 2;
|
|
91
|
+
return (0, _effects.take)('LOGIN');
|
|
92
|
+
case 2:
|
|
93
|
+
_context.next = 4;
|
|
94
|
+
return (0, _effects.select)(function (state) {
|
|
95
|
+
return state.getIn(['session', 'system'], false);
|
|
96
|
+
});
|
|
97
|
+
case 4:
|
|
98
|
+
system = _context.sent;
|
|
99
|
+
pollingActive = false;
|
|
100
|
+
case 6:
|
|
101
|
+
if (!system) {
|
|
102
|
+
_context.next = 41;
|
|
147
103
|
break;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
104
|
+
}
|
|
105
|
+
_context.prev = 7;
|
|
106
|
+
_context.next = 10;
|
|
107
|
+
return (0, _effects.race)({
|
|
108
|
+
authenticated: (0, _effects.take)('SET_AUTHENTICATED'),
|
|
109
|
+
refresh: (0, _effects.delay)(180000),
|
|
110
|
+
// 3 minutes.
|
|
111
|
+
isLoggingOut: (0, _effects.take)('LOGOUT'),
|
|
112
|
+
isTimingOut: (0, _effects.take)('TIMEOUT')
|
|
113
|
+
});
|
|
114
|
+
case 10:
|
|
115
|
+
_yield$race = _context.sent;
|
|
116
|
+
authenticated = _yield$race.authenticated;
|
|
117
|
+
refresh = _yield$race.refresh;
|
|
118
|
+
if (!authenticated) {
|
|
119
|
+
_context.next = 17;
|
|
157
120
|
break;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
121
|
+
}
|
|
122
|
+
// The authentication event occurred, so now we want to periodically
|
|
123
|
+
// refresh the token.
|
|
124
|
+
pollingActive = true;
|
|
125
|
+
_context.next = 34;
|
|
126
|
+
break;
|
|
127
|
+
case 17:
|
|
128
|
+
if (!(refresh && pollingActive)) {
|
|
129
|
+
_context.next = 33;
|
|
163
130
|
break;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
131
|
+
}
|
|
132
|
+
_context.next = 20;
|
|
133
|
+
return (0, _effects.call)(_apis.refreshSystemToken);
|
|
134
|
+
case 20:
|
|
135
|
+
_yield$call = _context.sent;
|
|
136
|
+
error = _yield$call.error;
|
|
137
|
+
token = _yield$call.token;
|
|
138
|
+
if (!error) {
|
|
139
|
+
_context.next = 28;
|
|
170
140
|
break;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
141
|
+
}
|
|
142
|
+
_context.next = 26;
|
|
143
|
+
return (0, _effects.put)((0, _store.action)('TIMEOUT'));
|
|
144
|
+
case 26:
|
|
145
|
+
_context.next = 31;
|
|
146
|
+
break;
|
|
147
|
+
case 28:
|
|
148
|
+
_context.next = 30;
|
|
149
|
+
return (0, _effects.put)((0, _store.action)('SET_AUTHENTICATED', {
|
|
150
|
+
token: token
|
|
151
|
+
}));
|
|
152
|
+
case 30:
|
|
153
|
+
localStorage.setItem(SYSTEM_TOKEN, token);
|
|
154
|
+
case 31:
|
|
155
|
+
_context.next = 34;
|
|
156
|
+
break;
|
|
157
|
+
case 33:
|
|
158
|
+
// Logging out or timing out happened to stop refreshing.
|
|
159
|
+
pollingActive = false;
|
|
160
|
+
case 34:
|
|
161
|
+
_context.next = 39;
|
|
162
|
+
break;
|
|
163
|
+
case 36:
|
|
164
|
+
_context.prev = 36;
|
|
165
|
+
_context.t0 = _context["catch"](7);
|
|
166
|
+
console.error(_context.t0);
|
|
167
|
+
case 39:
|
|
168
|
+
_context.next = 6;
|
|
169
|
+
break;
|
|
170
|
+
case 41:
|
|
171
|
+
case "end":
|
|
172
|
+
return _context.stop();
|
|
175
173
|
}
|
|
176
174
|
}, _callee, null, [[7, 36]]);
|
|
177
175
|
}));
|
|
@@ -180,82 +178,80 @@ var defaultLoginProps = {
|
|
|
180
178
|
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
|
|
181
179
|
var system, _yield$select, username, password, _yield$call2, error, systemToken, token;
|
|
182
180
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
|
|
183
|
-
while (1) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
return (
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
_context2.next = 19;
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
_context2.next = 17;
|
|
215
|
-
return (0, _effects.put)({
|
|
216
|
-
type: 'SET_ERROR',
|
|
217
|
-
payload: error.message
|
|
218
|
-
});
|
|
219
|
-
case 17:
|
|
220
|
-
_context2.next = 30;
|
|
181
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
182
|
+
case 0:
|
|
183
|
+
_context2.prev = 0;
|
|
184
|
+
_context2.next = 3;
|
|
185
|
+
return (0, _effects.select)(function (state) {
|
|
186
|
+
return state.getIn(['session', 'system']);
|
|
187
|
+
});
|
|
188
|
+
case 3:
|
|
189
|
+
system = _context2.sent;
|
|
190
|
+
_context2.next = 6;
|
|
191
|
+
return (0, _effects.select)(function (state) {
|
|
192
|
+
return state.get('login');
|
|
193
|
+
});
|
|
194
|
+
case 6:
|
|
195
|
+
_yield$select = _context2.sent;
|
|
196
|
+
username = _yield$select.username;
|
|
197
|
+
password = _yield$select.password;
|
|
198
|
+
_context2.next = 11;
|
|
199
|
+
return (0, _effects.call)(system ? _apis.systemLogin : _apis.login, {
|
|
200
|
+
username: username,
|
|
201
|
+
password: password
|
|
202
|
+
});
|
|
203
|
+
case 11:
|
|
204
|
+
_yield$call2 = _context2.sent;
|
|
205
|
+
error = _yield$call2.error;
|
|
206
|
+
systemToken = _yield$call2.token;
|
|
207
|
+
if (!error) {
|
|
208
|
+
_context2.next = 19;
|
|
221
209
|
break;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
210
|
+
}
|
|
211
|
+
_context2.next = 17;
|
|
212
|
+
return (0, _effects.put)({
|
|
213
|
+
type: 'SET_ERROR',
|
|
214
|
+
payload: error.message
|
|
215
|
+
});
|
|
216
|
+
case 17:
|
|
217
|
+
_context2.next = 30;
|
|
218
|
+
break;
|
|
219
|
+
case 19:
|
|
220
|
+
if (!system) {
|
|
221
|
+
_context2.next = 23;
|
|
229
222
|
break;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
223
|
+
}
|
|
224
|
+
_context2.t0 = systemToken;
|
|
225
|
+
_context2.next = 26;
|
|
226
|
+
break;
|
|
227
|
+
case 23:
|
|
228
|
+
_context2.next = 25;
|
|
229
|
+
return (0, _effects.call)(_apis.retrieveJwt);
|
|
230
|
+
case 25:
|
|
231
|
+
_context2.t0 = _context2.sent;
|
|
232
|
+
case 26:
|
|
233
|
+
token = _context2.t0;
|
|
234
|
+
if (system) {
|
|
235
|
+
localStorage.setItem(SYSTEM_TOKEN, token);
|
|
236
|
+
}
|
|
237
|
+
_context2.next = 30;
|
|
238
|
+
return (0, _effects.put)({
|
|
239
|
+
type: 'SET_AUTHENTICATED',
|
|
240
|
+
payload: {
|
|
241
|
+
token: token,
|
|
242
|
+
callback: payload
|
|
239
243
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
case 32:
|
|
252
|
-
_context2.prev = 32;
|
|
253
|
-
_context2.t1 = _context2["catch"](0);
|
|
254
|
-
console.error(_context2.t1);
|
|
255
|
-
case 35:
|
|
256
|
-
case "end":
|
|
257
|
-
return _context2.stop();
|
|
258
|
-
}
|
|
244
|
+
});
|
|
245
|
+
case 30:
|
|
246
|
+
_context2.next = 35;
|
|
247
|
+
break;
|
|
248
|
+
case 32:
|
|
249
|
+
_context2.prev = 32;
|
|
250
|
+
_context2.t1 = _context2["catch"](0);
|
|
251
|
+
console.error(_context2.t1);
|
|
252
|
+
case 35:
|
|
253
|
+
case "end":
|
|
254
|
+
return _context2.stop();
|
|
259
255
|
}
|
|
260
256
|
}, _callee2, null, [[0, 32]]);
|
|
261
257
|
})();
|
|
@@ -267,54 +263,52 @@ var defaultLoginProps = {
|
|
|
267
263
|
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee3() {
|
|
268
264
|
var _yield$call3, error, token;
|
|
269
265
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee3$(_context3) {
|
|
270
|
-
while (1) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
_context3.next = 10;
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
_context3.next = 8;
|
|
287
|
-
return (0, _effects.put)({
|
|
288
|
-
type: 'SET_ERROR',
|
|
289
|
-
payload: error
|
|
290
|
-
});
|
|
291
|
-
case 8:
|
|
292
|
-
_context3.next = 15;
|
|
293
|
-
break;
|
|
294
|
-
case 10:
|
|
295
|
-
_context3.next = 12;
|
|
296
|
-
return (0, _effects.call)(_apis.retrieveJwt);
|
|
297
|
-
case 12:
|
|
298
|
-
token = _context3.sent;
|
|
299
|
-
_context3.next = 15;
|
|
300
|
-
return (0, _effects.put)({
|
|
301
|
-
type: 'SET_AUTHENTICATED',
|
|
302
|
-
payload: {
|
|
303
|
-
token: token,
|
|
304
|
-
callback: callback
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
case 15:
|
|
308
|
-
_context3.next = 20;
|
|
266
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
267
|
+
case 0:
|
|
268
|
+
_context3.prev = 0;
|
|
269
|
+
_context3.next = 3;
|
|
270
|
+
return (0, _effects.call)(_apis.singleSignOn, spaceSlug, {
|
|
271
|
+
width: 770,
|
|
272
|
+
height: 750
|
|
273
|
+
});
|
|
274
|
+
case 3:
|
|
275
|
+
_yield$call3 = _context3.sent;
|
|
276
|
+
error = _yield$call3.error;
|
|
277
|
+
if (!error) {
|
|
278
|
+
_context3.next = 10;
|
|
309
279
|
break;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
280
|
+
}
|
|
281
|
+
_context3.next = 8;
|
|
282
|
+
return (0, _effects.put)({
|
|
283
|
+
type: 'SET_ERROR',
|
|
284
|
+
payload: error
|
|
285
|
+
});
|
|
286
|
+
case 8:
|
|
287
|
+
_context3.next = 15;
|
|
288
|
+
break;
|
|
289
|
+
case 10:
|
|
290
|
+
_context3.next = 12;
|
|
291
|
+
return (0, _effects.call)(_apis.retrieveJwt);
|
|
292
|
+
case 12:
|
|
293
|
+
token = _context3.sent;
|
|
294
|
+
_context3.next = 15;
|
|
295
|
+
return (0, _effects.put)({
|
|
296
|
+
type: 'SET_AUTHENTICATED',
|
|
297
|
+
payload: {
|
|
298
|
+
token: token,
|
|
299
|
+
callback: callback
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
case 15:
|
|
303
|
+
_context3.next = 20;
|
|
304
|
+
break;
|
|
305
|
+
case 17:
|
|
306
|
+
_context3.prev = 17;
|
|
307
|
+
_context3.t0 = _context3["catch"](0);
|
|
308
|
+
console.error(_context3.t0);
|
|
309
|
+
case 20:
|
|
310
|
+
case "end":
|
|
311
|
+
return _context3.stop();
|
|
318
312
|
}
|
|
319
313
|
}, _callee3, null, [[0, 17]]);
|
|
320
314
|
})();
|
|
@@ -325,154 +319,152 @@ var SYSTEM_TOKEN = 'kd-system';
|
|
|
325
319
|
system = _ref3$payload.system,
|
|
326
320
|
skipInit = _ref3$payload.skipInit;
|
|
327
321
|
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee4() {
|
|
328
|
-
var token, localToken, parsedToken, isValid, _yield$call4, securityStrategies, _yield$call4$session, csrfToken, isAuthenticated, spaceSlug, error, _token;
|
|
322
|
+
var token, localToken, parsedToken, isValid, _yield$call4, securityStrategies, _yield$call4$session, _yield$call4$session2, csrfToken, isAuthenticated, spaceSlug, error, _token;
|
|
329
323
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee4$(_context4) {
|
|
330
|
-
while (1) {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
_context4.next = 8;
|
|
336
|
-
break;
|
|
337
|
-
}
|
|
338
|
-
localToken = localStorage ? localStorage.getItem(SYSTEM_TOKEN) : null;
|
|
339
|
-
if (localToken) {
|
|
340
|
-
parsedToken = JSON.parse(atob(localToken.split('.')[1]));
|
|
341
|
-
isValid = _moment["default"].unix(parsedToken.exp).isAfter(new Date());
|
|
342
|
-
token = isValid ? localToken : null;
|
|
343
|
-
}
|
|
344
|
-
_context4.next = 6;
|
|
345
|
-
return (0, _effects.put)((0, _store.action)('SET_INITIALIZED', {
|
|
346
|
-
system: system,
|
|
347
|
-
token: token
|
|
348
|
-
}));
|
|
349
|
-
case 6:
|
|
350
|
-
_context4.next = 30;
|
|
351
|
-
break;
|
|
352
|
-
case 8:
|
|
353
|
-
_context4.next = 10;
|
|
354
|
-
return (0, _effects.call)(_apis.fetchSpaMeta);
|
|
355
|
-
case 10:
|
|
356
|
-
_yield$call4 = _context4.sent;
|
|
357
|
-
securityStrategies = _yield$call4.securityStrategies;
|
|
358
|
-
_yield$call4$session = _yield$call4.session;
|
|
359
|
-
_yield$call4$session = _yield$call4$session === void 0 ? {} : _yield$call4$session;
|
|
360
|
-
csrfToken = _yield$call4$session.csrfToken, isAuthenticated = _yield$call4$session.isAuthenticated, spaceSlug = _yield$call4.spaceSlug, error = _yield$call4.error;
|
|
361
|
-
if (!error) {
|
|
362
|
-
_context4.next = 20;
|
|
363
|
-
break;
|
|
364
|
-
}
|
|
365
|
-
_context4.next = 18;
|
|
366
|
-
return (0, _effects.put)((0, _store.action)('SET_SERVER_ERROR', error));
|
|
367
|
-
case 18:
|
|
368
|
-
_context4.next = 30;
|
|
324
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
325
|
+
case 0:
|
|
326
|
+
_context4.prev = 0;
|
|
327
|
+
if (!system) {
|
|
328
|
+
_context4.next = 8;
|
|
369
329
|
break;
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
330
|
+
}
|
|
331
|
+
localToken = localStorage ? localStorage.getItem(SYSTEM_TOKEN) : null;
|
|
332
|
+
if (localToken) {
|
|
333
|
+
parsedToken = JSON.parse(atob(localToken.split('.')[1]));
|
|
334
|
+
isValid = _moment["default"].unix(parsedToken.exp).isAfter(new Date());
|
|
335
|
+
token = isValid ? localToken : null;
|
|
336
|
+
}
|
|
337
|
+
_context4.next = 6;
|
|
338
|
+
return (0, _effects.put)((0, _store.action)('SET_INITIALIZED', {
|
|
339
|
+
system: system,
|
|
340
|
+
token: token
|
|
341
|
+
}));
|
|
342
|
+
case 6:
|
|
343
|
+
_context4.next = 33;
|
|
344
|
+
break;
|
|
345
|
+
case 8:
|
|
346
|
+
_context4.next = 10;
|
|
347
|
+
return (0, _effects.call)(_apis.fetchSpaMeta);
|
|
348
|
+
case 10:
|
|
349
|
+
_yield$call4 = _context4.sent;
|
|
350
|
+
securityStrategies = _yield$call4.securityStrategies;
|
|
351
|
+
_yield$call4$session = _yield$call4.session;
|
|
352
|
+
_yield$call4$session2 = _yield$call4$session === void 0 ? {} : _yield$call4$session;
|
|
353
|
+
csrfToken = _yield$call4$session2.csrfToken;
|
|
354
|
+
isAuthenticated = _yield$call4$session2.isAuthenticated;
|
|
355
|
+
spaceSlug = _yield$call4.spaceSlug;
|
|
356
|
+
error = _yield$call4.error;
|
|
357
|
+
if (!error) {
|
|
375
358
|
_context4.next = 23;
|
|
376
|
-
return (0, _effects.call)(_apis.retrieveJwt);
|
|
377
|
-
case 23:
|
|
378
|
-
_context4.t0 = _context4.sent;
|
|
379
|
-
_context4.next = 27;
|
|
380
359
|
break;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
token: _token
|
|
391
|
-
}));
|
|
392
|
-
case 30:
|
|
393
|
-
_context4.next = 35;
|
|
360
|
+
}
|
|
361
|
+
_context4.next = 21;
|
|
362
|
+
return (0, _effects.put)((0, _store.action)('SET_SERVER_ERROR', error));
|
|
363
|
+
case 21:
|
|
364
|
+
_context4.next = 33;
|
|
365
|
+
break;
|
|
366
|
+
case 23:
|
|
367
|
+
if (!(isAuthenticated && !skipInit)) {
|
|
368
|
+
_context4.next = 29;
|
|
394
369
|
break;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
370
|
+
}
|
|
371
|
+
_context4.next = 26;
|
|
372
|
+
return (0, _effects.call)(_apis.retrieveJwt);
|
|
373
|
+
case 26:
|
|
374
|
+
_context4.t0 = _context4.sent;
|
|
375
|
+
_context4.next = 30;
|
|
376
|
+
break;
|
|
377
|
+
case 29:
|
|
378
|
+
_context4.t0 = null;
|
|
379
|
+
case 30:
|
|
380
|
+
_token = _context4.t0;
|
|
381
|
+
_context4.next = 33;
|
|
382
|
+
return (0, _effects.put)((0, _store.action)('SET_INITIALIZED', {
|
|
383
|
+
csrfToken: csrfToken,
|
|
384
|
+
securityStrategies: securityStrategies,
|
|
385
|
+
spaceSlug: spaceSlug,
|
|
386
|
+
token: _token
|
|
387
|
+
}));
|
|
388
|
+
case 33:
|
|
389
|
+
_context4.next = 38;
|
|
390
|
+
break;
|
|
391
|
+
case 35:
|
|
392
|
+
_context4.prev = 35;
|
|
393
|
+
_context4.t1 = _context4["catch"](0);
|
|
394
|
+
console.error(_context4.t1);
|
|
395
|
+
case 38:
|
|
396
|
+
case "end":
|
|
397
|
+
return _context4.stop();
|
|
403
398
|
}
|
|
404
|
-
}, _callee4, null, [[0,
|
|
399
|
+
}, _callee4, null, [[0, 35]]);
|
|
405
400
|
})();
|
|
406
401
|
}));
|
|
407
402
|
(0, _store.regSaga)((0, _effects.takeEvery)('LOGOUT_START', function (_ref4) {
|
|
408
403
|
var payload = _ref4.payload;
|
|
409
404
|
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee5() {
|
|
410
|
-
var system, loggedIn;
|
|
405
|
+
var callback, isSaml, system, loggedIn;
|
|
411
406
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee5$(_context5) {
|
|
412
|
-
while (1) {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
_context5.next = 10;
|
|
433
|
-
return (0, _effects.call)(_apis.logoutDirect);
|
|
434
|
-
case 10:
|
|
435
|
-
_context5.next = 12;
|
|
436
|
-
return (0, _effects.put)((0, _store.action)('LOGOUT'));
|
|
437
|
-
case 12:
|
|
438
|
-
if (!(0, _lodashEs.isFunction)(payload)) {
|
|
439
|
-
_context5.next = 15;
|
|
440
|
-
break;
|
|
441
|
-
}
|
|
442
|
-
_context5.next = 15;
|
|
443
|
-
return (0, _effects.call)(payload);
|
|
444
|
-
case 15:
|
|
445
|
-
_context5.next = 20;
|
|
407
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
408
|
+
case 0:
|
|
409
|
+
callback = payload.callback, isSaml = payload.isSaml;
|
|
410
|
+
_context5.prev = 1;
|
|
411
|
+
_context5.next = 4;
|
|
412
|
+
return (0, _effects.select)(function (state) {
|
|
413
|
+
return state.getIn(['session', 'system']);
|
|
414
|
+
});
|
|
415
|
+
case 4:
|
|
416
|
+
system = _context5.sent;
|
|
417
|
+
_context5.next = 7;
|
|
418
|
+
return (0, _effects.select)(function (state) {
|
|
419
|
+
return state.getIn(['session', 'token']);
|
|
420
|
+
});
|
|
421
|
+
case 7:
|
|
422
|
+
loggedIn = _context5.sent;
|
|
423
|
+
if (!(!system && loggedIn)) {
|
|
424
|
+
_context5.next = 11;
|
|
446
425
|
break;
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
426
|
+
}
|
|
427
|
+
_context5.next = 11;
|
|
428
|
+
return (0, _effects.call)(_apis.logoutDirect, isSaml);
|
|
429
|
+
case 11:
|
|
430
|
+
_context5.next = 13;
|
|
431
|
+
return (0, _effects.put)((0, _store.action)('LOGOUT'));
|
|
432
|
+
case 13:
|
|
433
|
+
if (!(0, _lodashEs.isFunction)(callback)) {
|
|
434
|
+
_context5.next = 16;
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
_context5.next = 16;
|
|
438
|
+
return (0, _effects.call)(callback);
|
|
439
|
+
case 16:
|
|
440
|
+
_context5.next = 21;
|
|
441
|
+
break;
|
|
442
|
+
case 18:
|
|
443
|
+
_context5.prev = 18;
|
|
444
|
+
_context5.t0 = _context5["catch"](1);
|
|
445
|
+
console.error(_context5.t0);
|
|
446
|
+
case 21:
|
|
447
|
+
case "end":
|
|
448
|
+
return _context5.stop();
|
|
455
449
|
}
|
|
456
|
-
}, _callee5, null, [[
|
|
450
|
+
}, _callee5, null, [[1, 18]]);
|
|
457
451
|
})();
|
|
458
452
|
}));
|
|
459
453
|
(0, _store.regSaga)((0, _effects.takeEvery)('SET_AUTHENTICATED', function (_ref5) {
|
|
460
454
|
var payload = _ref5.payload;
|
|
461
455
|
return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee6() {
|
|
462
456
|
return (0, _regeneratorRuntime2["default"])().wrap(function _callee6$(_context6) {
|
|
463
|
-
while (1) {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
if (!(0, _lodashEs.isFunction)(payload.callback)) {
|
|
467
|
-
_context6.next = 3;
|
|
468
|
-
break;
|
|
469
|
-
}
|
|
457
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
458
|
+
case 0:
|
|
459
|
+
if (!(0, _lodashEs.isFunction)(payload.callback)) {
|
|
470
460
|
_context6.next = 3;
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
461
|
+
break;
|
|
462
|
+
}
|
|
463
|
+
_context6.next = 3;
|
|
464
|
+
return (0, _effects.call)(payload.callback);
|
|
465
|
+
case 3:
|
|
466
|
+
case "end":
|
|
467
|
+
return _context6.stop();
|
|
476
468
|
}
|
|
477
469
|
}, _callee6);
|
|
478
470
|
})();
|
|
@@ -487,23 +479,22 @@ var onLogin = function onLogin(e, callback) {
|
|
|
487
479
|
e.preventDefault();
|
|
488
480
|
(0, _store.dispatch)('LOGIN', callback);
|
|
489
481
|
};
|
|
490
|
-
var logout = function logout(callback) {
|
|
491
|
-
(0, _store.dispatch)('LOGOUT_START',
|
|
482
|
+
var logout = exports.logout = function logout(callback, isSaml) {
|
|
483
|
+
(0, _store.dispatch)('LOGOUT_START', {
|
|
484
|
+
callback: callback,
|
|
485
|
+
isSaml: isSaml
|
|
486
|
+
});
|
|
492
487
|
};
|
|
493
|
-
exports.
|
|
494
|
-
var timedOut = function timedOut() {
|
|
488
|
+
var timedOut = exports.timedOut = function timedOut() {
|
|
495
489
|
(0, _store.dispatch)('TIMEOUT');
|
|
496
490
|
};
|
|
497
|
-
exports.
|
|
498
|
-
var getToken = function getToken() {
|
|
491
|
+
var getToken = exports.getToken = function getToken() {
|
|
499
492
|
return _store.store.getState().getIn(['session', 'token']);
|
|
500
493
|
};
|
|
501
|
-
exports.
|
|
502
|
-
var getCsrfToken = function getCsrfToken() {
|
|
494
|
+
var getCsrfToken = exports.getCsrfToken = function getCsrfToken() {
|
|
503
495
|
return _store.store.getState().getIn(['session', 'csrfToken']);
|
|
504
496
|
};
|
|
505
|
-
exports.
|
|
506
|
-
var AuthenticationComponent = /*#__PURE__*/function (_Component) {
|
|
497
|
+
var AuthenticationComponent = exports.AuthenticationComponent = /*#__PURE__*/function (_Component) {
|
|
507
498
|
(0, _inherits2["default"])(AuthenticationComponent, _Component);
|
|
508
499
|
var _super = (0, _createSuper2["default"])(AuthenticationComponent);
|
|
509
500
|
function AuthenticationComponent() {
|
|
@@ -555,7 +546,6 @@ var AuthenticationComponent = /*#__PURE__*/function (_Component) {
|
|
|
555
546
|
}]);
|
|
556
547
|
return AuthenticationComponent;
|
|
557
548
|
}(_react.Component);
|
|
558
|
-
exports.AuthenticationComponent = AuthenticationComponent;
|
|
559
549
|
var mapStateToProps = function mapStateToProps(state) {
|
|
560
550
|
return {
|
|
561
551
|
initialized: state.getIn(['session', 'initialized'], false),
|
|
@@ -567,5 +557,4 @@ var mapStateToProps = function mapStateToProps(state) {
|
|
|
567
557
|
serverError: state.get('serverError')
|
|
568
558
|
};
|
|
569
559
|
};
|
|
570
|
-
var AuthenticationContainer = (0, _store.connect)(mapStateToProps)(AuthenticationComponent);
|
|
571
|
-
exports.AuthenticationContainer = AuthenticationContainer;
|
|
560
|
+
var AuthenticationContainer = exports.AuthenticationContainer = (0, _store.connect)(mapStateToProps)(AuthenticationComponent);
|