@kineticdata/react 5.1.2 → 6.0.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 (313) hide show
  1. package/assets/task/icons/drag-handle.svg +3 -0
  2. package/assets/task/icons/plus_small.svg +2 -4
  3. package/lib/apis/agent/adapters.js +16 -12
  4. package/lib/apis/agent/bridges.js +54 -41
  5. package/lib/apis/agent/handlers.js +51 -38
  6. package/lib/apis/core/activity.js +19 -11
  7. package/lib/apis/core/attributeDefinitions.js +54 -46
  8. package/lib/apis/core/attributeDefinitions.test.js +47 -55
  9. package/lib/apis/core/authentication.js +58 -63
  10. package/lib/apis/core/backgroundJobs.js +38 -30
  11. package/lib/apis/core/bridgeModelAttributeMappings.js +42 -34
  12. package/lib/apis/core/bridgeModelAttributes.js +47 -37
  13. package/lib/apis/core/bridgeModelMappings.js +42 -34
  14. package/lib/apis/core/bridgeModelQualificationMappings.js +42 -34
  15. package/lib/apis/core/bridgeModelQualifications.js +42 -34
  16. package/lib/apis/core/bridgeModels.js +56 -46
  17. package/lib/apis/core/bridgeModels.test.js +64 -80
  18. package/lib/apis/core/bridgedresources.js +64 -72
  19. package/lib/apis/core/bridgedresources.test.js +33 -30
  20. package/lib/apis/core/categories.js +59 -52
  21. package/lib/apis/core/categories.test.js +36 -33
  22. package/lib/apis/core/fileResources.js +41 -33
  23. package/lib/apis/core/filestores.js +42 -34
  24. package/lib/apis/core/formTypes.js +50 -44
  25. package/lib/apis/core/forms.js +53 -49
  26. package/lib/apis/core/forms.test.js +60 -74
  27. package/lib/apis/core/kapps.js +45 -39
  28. package/lib/apis/core/kapps.test.js +45 -52
  29. package/lib/apis/core/logs.js +20 -16
  30. package/lib/apis/core/memberships.js +23 -20
  31. package/lib/apis/core/meta.js +31 -19
  32. package/lib/apis/core/notices.js +17 -9
  33. package/lib/apis/core/oauthClients.js +49 -45
  34. package/lib/apis/core/platformComponents.js +73 -57
  35. package/lib/apis/core/platformItems.js +22 -13
  36. package/lib/apis/core/profile.js +28 -21
  37. package/lib/apis/core/profile.test.js +20 -17
  38. package/lib/apis/core/securityPolicyDefinitions.js +48 -41
  39. package/lib/apis/core/securityPolicyDefinitions.test.js +50 -60
  40. package/lib/apis/core/space.js +23 -16
  41. package/lib/apis/core/space.test.js +31 -38
  42. package/lib/apis/core/submissions.js +213 -186
  43. package/lib/apis/core/submissions.test.js +39 -36
  44. package/lib/apis/core/teams.js +51 -44
  45. package/lib/apis/core/teams.test.js +42 -39
  46. package/lib/apis/core/translations.js +123 -130
  47. package/lib/apis/core/translations.test.js +278 -368
  48. package/lib/apis/core/users.js +56 -49
  49. package/lib/apis/core/users.test.js +42 -39
  50. package/lib/apis/core/version.js +20 -11
  51. package/lib/apis/core/webApis.js +42 -34
  52. package/lib/apis/core/webhooks.js +48 -41
  53. package/lib/apis/core/webhooks.test.js +50 -60
  54. package/lib/apis/core/webhooksJobs.js +30 -26
  55. package/lib/apis/core/workflows.js +52 -44
  56. package/lib/apis/http.js +121 -80
  57. package/lib/apis/http.test.js +137 -38
  58. package/lib/apis/index.js +506 -50
  59. package/lib/apis/system/index.js +363 -215
  60. package/lib/apis/task/index.js +294 -227
  61. package/lib/components/agent/bridge/BridgeForm.js +50 -50
  62. package/lib/components/agent/bridge/BridgeTable.js +16 -9
  63. package/lib/components/agent/filestore/FilestoreForm.js +49 -48
  64. package/lib/components/agent/filestore/FilestoreTable.js +16 -9
  65. package/lib/components/agent/handler/AgentHandlerForm.js +24 -27
  66. package/lib/components/agent/handler/AgentHandlerTable.js +17 -10
  67. package/lib/components/common/AttributeSelect.js +15 -9
  68. package/lib/components/common/BridgeSelect.js +48 -43
  69. package/lib/components/common/ComponentConfigContext.js +9 -2
  70. package/lib/components/common/ContentEditable.js +36 -60
  71. package/lib/components/common/FormSelect.js +70 -58
  72. package/lib/components/common/NodeSelect.js +23 -19
  73. package/lib/components/common/Scroller.js +24 -23
  74. package/lib/components/common/StaticSelect.js +57 -50
  75. package/lib/components/common/TableInput.js +54 -57
  76. package/lib/components/common/TeamSelect.js +42 -39
  77. package/lib/components/common/ToastContainer.js +170 -0
  78. package/lib/components/common/Typeahead.js +121 -138
  79. package/lib/components/common/UserSelect.js +42 -41
  80. package/lib/components/common/authentication/AuthInterceptor.js +15 -19
  81. package/lib/components/common/authentication/AuthInterceptor.test.js +46 -64
  82. package/lib/components/common/authentication/AuthenticationContainer.js +350 -454
  83. package/lib/components/common/authentication/RequestInterceptor.js +16 -19
  84. package/lib/components/common/code_input/CodeInput.js +92 -122
  85. package/lib/components/common/code_input/draftHelpers.js +96 -90
  86. package/lib/components/common/code_input/languageHelpers.js +49 -47
  87. package/lib/components/common/code_input/languageHelpers.test.js +21 -16
  88. package/lib/components/common/defaults/Toast.js +26 -0
  89. package/lib/components/common/defaults/index.js +13 -0
  90. package/lib/components/core/CoreFormModal.js +26 -24
  91. package/lib/components/core/CoreModal.js +37 -31
  92. package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +24 -23
  93. package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +25 -18
  94. package/lib/components/core/bridge_model/BridgeModelForm.js +27 -37
  95. package/lib/components/core/bridge_model/BridgeModelTable.js +17 -10
  96. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +17 -16
  97. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +25 -21
  98. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +20 -20
  99. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +27 -22
  100. package/lib/components/core/category/CategoryForm.js +22 -22
  101. package/lib/components/core/category/CategoryTable.js +28 -16
  102. package/lib/components/core/core_form/CoreForm.js +209 -285
  103. package/lib/components/core/core_form/CoreForm.test.js +12 -10
  104. package/lib/components/core/core_form/defaults/index.js +52 -44
  105. package/lib/components/core/core_form/globals.js +14 -5
  106. package/lib/components/core/field_definition/FieldDefinitionForm.js +23 -21
  107. package/lib/components/core/field_definition/FieldDefinitionTable.js +26 -15
  108. package/lib/components/core/file_resource/FileResourceForm.js +38 -37
  109. package/lib/components/core/file_resource/FileResourceTable.js +16 -12
  110. package/lib/components/core/form/FormForm.js +56 -61
  111. package/lib/components/core/form/FormTable.js +47 -33
  112. package/lib/components/core/form_type/FormTypeForm.js +14 -13
  113. package/lib/components/core/form_type/FormTypeTable.js +15 -9
  114. package/lib/components/core/i18n/I18n.js +54 -61
  115. package/lib/components/core/i18n/I18nContext.js +9 -2
  116. package/lib/components/core/i18n/I18nProvider.js +40 -43
  117. package/lib/components/core/i18n/Moment.js +40 -50
  118. package/lib/components/core/index_definition/IndexDefinitionForm.js +23 -24
  119. package/lib/components/core/index_definition/IndexDefinitionTable.js +31 -16
  120. package/lib/components/core/index_job/IndexJobTable.js +20 -15
  121. package/lib/components/core/kapp/KappForm.js +57 -58
  122. package/lib/components/core/kapp/KappTable.js +34 -44
  123. package/lib/components/core/log/LogTable.js +42 -34
  124. package/lib/components/core/oauth_client/OAuthClientForm.js +17 -17
  125. package/lib/components/core/oauth_client/OAuthClientTable.js +12 -8
  126. package/lib/components/core/platform_component/AgentComponentForm.js +15 -15
  127. package/lib/components/core/platform_component/AgentComponentTable.js +10 -5
  128. package/lib/components/core/platform_component/TaskComponentForm.js +14 -14
  129. package/lib/components/core/profile/ProfileForm.js +40 -39
  130. package/lib/components/core/security_definition/SecurityDefinitionForm.js +28 -25
  131. package/lib/components/core/security_definition/SecurityDefinitionTable.js +27 -17
  132. package/lib/components/core/space/SpaceForm.js +79 -90
  133. package/lib/components/core/submission/DatastoreSubmissionFilters.js +39 -40
  134. package/lib/components/core/submission/DatastoreSubmissionTable.js +37 -34
  135. package/lib/components/core/submission/FormSubmissionFilters.js +79 -75
  136. package/lib/components/core/submission/FormSubmissionTable.js +64 -39
  137. package/lib/components/core/submission/KappSubmissionTable.js +67 -48
  138. package/lib/components/core/submission/SubmissionForm.js +126 -55
  139. package/lib/components/core/submission/SubmissionTable.js +24 -20
  140. package/lib/components/core/submission/helpers.js +37 -33
  141. package/lib/components/core/submission/helpers.test.js +69 -20
  142. package/lib/components/core/team/TeamForm.js +24 -21
  143. package/lib/components/core/team/TeamTable.js +27 -16
  144. package/lib/components/core/translation/ContextForm.js +13 -10
  145. package/lib/components/core/translation/ContextTable.js +13 -10
  146. package/lib/components/core/translation/EntryForm.js +27 -24
  147. package/lib/components/core/translation/EntryTable.js +19 -16
  148. package/lib/components/core/translation/LocaleForm.js +16 -13
  149. package/lib/components/core/translation/LocaleTable.js +12 -8
  150. package/lib/components/core/user/UserForm.js +38 -37
  151. package/lib/components/core/user/UserTable.js +42 -20
  152. package/lib/components/core/webapi/WebApiForm.js +87 -80
  153. package/lib/components/core/webapi/WebApiTable.js +28 -17
  154. package/lib/components/core/webhook/WebhookForm.js +33 -32
  155. package/lib/components/core/webhook/WebhookTable.js +41 -29
  156. package/lib/components/core/webhook_job/WebhookJobTable.js +58 -35
  157. package/lib/components/form/Form.helpers.js +182 -108
  158. package/lib/components/form/Form.js +467 -524
  159. package/lib/components/form/Form.models.js +39 -24
  160. package/lib/components/form/FormState.js +8 -5
  161. package/lib/components/form/KitchenSinkForm.js +135 -4
  162. package/lib/components/form/defaults/AttributesField.js +48 -59
  163. package/lib/components/form/defaults/CheckboxField.js +14 -6
  164. package/lib/components/form/defaults/CodeField.js +15 -7
  165. package/lib/components/form/defaults/FormButtons.js +12 -4
  166. package/lib/components/form/defaults/FormError.js +12 -4
  167. package/lib/components/form/defaults/FormField.js +15 -7
  168. package/lib/components/form/defaults/FormLayout.js +12 -4
  169. package/lib/components/form/defaults/FormMultiField.js +15 -7
  170. package/lib/components/form/defaults/PasswordField.js +14 -6
  171. package/lib/components/form/defaults/RadioField.js +15 -7
  172. package/lib/components/form/defaults/SampleTeamsRolesFIeld.js +17 -9
  173. package/lib/components/form/defaults/SelectField.js +16 -8
  174. package/lib/components/form/defaults/SelectMultiField.js +15 -7
  175. package/lib/components/form/defaults/TableField.js +14 -6
  176. package/lib/components/form/defaults/TeamField.js +15 -7
  177. package/lib/components/form/defaults/TeamMultiField.js +15 -7
  178. package/lib/components/form/defaults/TextField.js +14 -6
  179. package/lib/components/form/defaults/TextMultiField.js +26 -28
  180. package/lib/components/form/defaults/UserField.js +15 -7
  181. package/lib/components/form/defaults/UserMultiField.js +15 -7
  182. package/lib/components/form/defaults/index.js +48 -41
  183. package/lib/components/form/tests/Form.test.js +568 -864
  184. package/lib/components/form/tests/components.js +15 -25
  185. package/lib/components/form/tests/helpers.test.js +35 -33
  186. package/lib/components/index.js +1034 -135
  187. package/lib/components/system/SystemBackgroundTasksTable.js +14 -10
  188. package/lib/components/system/SystemCassandraForm.js +98 -0
  189. package/lib/components/system/SystemElasticSearchForm.js +98 -0
  190. package/lib/components/system/SystemFilestoreForm.js +36 -28
  191. package/lib/components/system/SystemForm.js +19 -16
  192. package/lib/components/system/SystemIngressForm.js +85 -36
  193. package/lib/components/system/SystemSecurityForm.js +17 -14
  194. package/lib/components/system/SystemSmtpForm.js +13 -13
  195. package/lib/components/system/SystemTaskAdapterForm.js +49 -21
  196. package/lib/components/system/SystemTrustedCertificateForm.js +40 -0
  197. package/lib/components/system/SystemTrustedCertificatesTable.js +74 -0
  198. package/lib/components/system/SystemUserForm.js +15 -14
  199. package/lib/components/system/helpers.js +281 -98
  200. package/lib/components/system/helpers.test.js +16 -12
  201. package/lib/components/system/spaces/SystemSpaceForm.js +25 -24
  202. package/lib/components/system/spaces/SystemTenantForm.js +112 -68
  203. package/lib/components/system/spaces/SystemTenantTable.js +12 -8
  204. package/lib/components/table/Table.js +295 -227
  205. package/lib/components/table/Table.redux.js +339 -355
  206. package/lib/components/table/Table.redux.test.js +49 -47
  207. package/lib/components/table/Table.test.js +146 -132
  208. package/lib/components/table/defaults/BodyCell.js +12 -6
  209. package/lib/components/table/defaults/BodyRow.js +10 -4
  210. package/lib/components/table/defaults/BooleanFilter.js +17 -11
  211. package/lib/components/table/defaults/ColumnControl.js +26 -0
  212. package/lib/components/table/defaults/EmptyBodyRow.js +12 -6
  213. package/lib/components/table/defaults/FilterLayout.js +17 -11
  214. package/lib/components/table/defaults/Footer.js +11 -5
  215. package/lib/components/table/defaults/FooterCell.js +10 -4
  216. package/lib/components/table/defaults/FooterRow.js +10 -4
  217. package/lib/components/table/defaults/Header.js +10 -4
  218. package/lib/components/table/defaults/HeaderCell.js +16 -10
  219. package/lib/components/table/defaults/HeaderRow.js +10 -4
  220. package/lib/components/table/defaults/PaginationControl.js +18 -9
  221. package/lib/components/table/defaults/TableBody.js +10 -4
  222. package/lib/components/table/defaults/TableLayout.js +12 -6
  223. package/lib/components/table/defaults/TextFilter.js +16 -10
  224. package/lib/components/table/defaults/index.js +43 -33
  225. package/lib/components/task/builder/Connector.js +100 -111
  226. package/lib/components/task/builder/ConnectorForm.js +17 -11
  227. package/lib/components/task/builder/Node.js +101 -83
  228. package/lib/components/task/builder/NodeForm.js +30 -27
  229. package/lib/components/task/builder/NodeParametersForm.js +27 -24
  230. package/lib/components/task/builder/SvgCanvas.js +67 -96
  231. package/lib/components/task/builder/SvgText.js +19 -134
  232. package/lib/components/task/builder/TaskDefinitionConfigForm.js +27 -22
  233. package/lib/components/task/builder/TreeBuilder.js +140 -115
  234. package/lib/components/task/builder/builder.redux.js +311 -326
  235. package/lib/components/task/builder/constants.js +94 -45
  236. package/lib/components/task/builder/helpers.js +184 -173
  237. package/lib/components/task/builder/helpers.test.js +20 -18
  238. package/lib/components/task/builder/models.js +121 -98
  239. package/lib/components/task/category/TaskCategoryForm.js +31 -29
  240. package/lib/components/task/category/TaskCategoryTable.js +12 -8
  241. package/lib/components/task/common/UsageTable.js +16 -12
  242. package/lib/components/task/engine/EngineSettingsForm.js +13 -11
  243. package/lib/components/task/errors/RunErrorTable.js +50 -27
  244. package/lib/components/task/errors/SystemErrorsTable.js +13 -9
  245. package/lib/components/task/handlers/HandlerForm.js +55 -55
  246. package/lib/components/task/handlers/HandlerTable.js +35 -19
  247. package/lib/components/task/handlers/MissingHandlerTable.js +12 -8
  248. package/lib/components/task/policy_rule/PolicyRuleForm.js +33 -32
  249. package/lib/components/task/policy_rule/PolicyRuleTable.js +12 -8
  250. package/lib/components/task/runs/CreateManualTriggerForm.js +17 -15
  251. package/lib/components/task/runs/RunTable.js +45 -29
  252. package/lib/components/task/runs/RunTaskTable.js +10 -6
  253. package/lib/components/task/sources/SourceForm.js +47 -47
  254. package/lib/components/task/sources/SourceTable.js +29 -18
  255. package/lib/components/task/triggers/TriggerTable.js +71 -41
  256. package/lib/components/task/workflows/LinkedWorkflowForm.js +48 -54
  257. package/lib/components/task/workflows/LinkedWorkflowTable.js +46 -26
  258. package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
  259. package/lib/components/task/workflows/WorkflowForm.js +49 -44
  260. package/lib/components/task/workflows/WorkflowTable.js +47 -29
  261. package/lib/helpers/SearchBuilder.js +73 -127
  262. package/lib/helpers/SearchBuilder.test.js +184 -175
  263. package/lib/helpers/index.js +116 -74
  264. package/lib/index.js +87 -38
  265. package/lib/reducer.js +11 -3
  266. package/lib/saga.js +42 -38
  267. package/lib/store.js +59 -35
  268. package/package.json +17 -29
  269. package/proxyhelper.js +122 -57
  270. package/assets/discussions/images/avi_128.png +0 -0
  271. package/assets/discussions/images/excel_128.png +0 -0
  272. package/assets/discussions/images/html_128.png +0 -0
  273. package/assets/discussions/images/illustrator_128.png +0 -0
  274. package/assets/discussions/images/indesign_128.png +0 -0
  275. package/assets/discussions/images/movie_128.png +0 -0
  276. package/assets/discussions/images/mpeg_128.png +0 -0
  277. package/assets/discussions/images/pdf_128.png +0 -0
  278. package/assets/discussions/images/photoshop_128.png +0 -0
  279. package/assets/discussions/images/powerpoint_128.png +0 -0
  280. package/assets/discussions/images/txt_128.png +0 -0
  281. package/assets/discussions/images/unknown_128.png +0 -0
  282. package/assets/discussions/images/word_128.png +0 -0
  283. package/assets/discussions/styles/_discussion.scss +0 -506
  284. package/lib/apis/discussions/index.js +0 -395
  285. package/lib/apis/socket/index.js +0 -77
  286. package/lib/apis/socket/socket.js +0 -350
  287. package/lib/apis/socket/socket.test.js +0 -90
  288. package/lib/apis/socket/timer.js +0 -45
  289. package/lib/apis/socket/timer.test.js +0 -51
  290. package/lib/apis/socket/topic.js +0 -185
  291. package/lib/apis/topics/index.js +0 -19
  292. package/lib/components/discussions/ChatInputForm.js +0 -424
  293. package/lib/components/discussions/DateBanner.js +0 -10
  294. package/lib/components/discussions/Discussion.js +0 -202
  295. package/lib/components/discussions/DiscussionForm.js +0 -227
  296. package/lib/components/discussions/InvitationForm.js +0 -107
  297. package/lib/components/discussions/MessageHistory.js +0 -110
  298. package/lib/components/discussions/MessagesByDate.js +0 -40
  299. package/lib/components/discussions/MessagesList.js +0 -30
  300. package/lib/components/discussions/MoreMessagesBanner.js +0 -26
  301. package/lib/components/discussions/ScrollHelper.js +0 -84
  302. package/lib/components/discussions/SystemMessage.js +0 -88
  303. package/lib/components/discussions/SystemMessageGroup.js +0 -15
  304. package/lib/components/discussions/UserMessage.js +0 -163
  305. package/lib/components/discussions/UserMessageGroup.js +0 -34
  306. package/lib/components/discussions/redux.js +0 -178
  307. package/lib/components/discussions/sagas.js +0 -500
  308. package/lib/helpers/discussions/canManage.js +0 -30
  309. package/lib/helpers/discussions/canManage.test.js +0 -69
  310. package/lib/helpers/discussions/generateSystemMessageContent.js +0 -131
  311. package/lib/helpers/discussions/generateSystemMessageContent.test.js +0 -450
  312. package/lib/models/discussions.js +0 -76
  313. package/lib/models/index.js +0 -1
@@ -1,24 +1,27 @@
1
- import { fetchForm, fetchKapp, fetchSpace, updateForm, updateSpace, updateKapp } from '../../../apis';
2
- import { generateForm } from '../../form/Form';
3
- import { INDEX_STATIC_PARTS } from '../../../helpers';
1
+ "use strict";
4
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.IndexDefinitionForm = void 0;
7
+ var _apis = require("../../../apis");
8
+ var _Form = require("../../form/Form");
9
+ var _helpers = require("../../../helpers");
5
10
  var getFields = function getFields(form) {
6
11
  return form.get('fields');
7
12
  };
8
-
9
13
  var getIndexDefinition = function getIndexDefinition(form, indexName) {
10
14
  return form.get('indexDefinitions').find(function (indexDefinition) {
11
15
  return indexDefinition.get('name') === indexName;
12
16
  });
13
17
  };
14
-
15
18
  var dataSources = function dataSources(_ref) {
16
19
  var kappSlug = _ref.kappSlug,
17
- formSlug = _ref.formSlug,
18
- indexName = _ref.indexName;
20
+ formSlug = _ref.formSlug,
21
+ indexName = _ref.indexName;
19
22
  return {
20
23
  form: {
21
- fn: !kappSlug && !formSlug ? fetchSpace : kappSlug && !formSlug ? fetchKapp : fetchForm,
24
+ fn: !kappSlug && !formSlug ? _apis.fetchSpace : kappSlug && !formSlug ? _apis.fetchKapp : _apis.fetchForm,
22
25
  params: [{
23
26
  kappSlug: kappSlug,
24
27
  formSlug: formSlug,
@@ -44,26 +47,25 @@ var dataSources = function dataSources(_ref) {
44
47
  }
45
48
  };
46
49
  };
47
-
48
50
  var handleSubmit = function handleSubmit(_ref4) {
49
51
  var formSlug = _ref4.formSlug,
50
- kappSlug = _ref4.kappSlug,
51
- indexName = _ref4.indexName;
52
+ kappSlug = _ref4.kappSlug,
53
+ indexName = _ref4.indexName;
52
54
  return function (values, _ref5) {
53
55
  var form = _ref5.form;
54
56
  var indexDefinitions = indexName ? form.get('indexDefinitions').map(function (indexDefinition) {
55
57
  return indexDefinition.get('name') === indexName ? values : indexDefinition;
56
58
  }).toJS() : form.get('indexDefinitions').push(values).toJS();
57
- return (!kappSlug && !formSlug ? updateSpace({
59
+ return (!kappSlug && !formSlug ? (0, _apis.updateSpace)({
58
60
  space: {
59
61
  indexDefinitions: indexDefinitions
60
62
  }
61
- }) : kappSlug && !formSlug ? updateKapp({
63
+ }) : kappSlug && !formSlug ? (0, _apis.updateKapp)({
62
64
  kappSlug: kappSlug,
63
65
  kapp: {
64
66
  indexDefinitions: indexDefinitions
65
67
  }
66
- }) : updateForm({
68
+ }) : (0, _apis.updateForm)({
67
69
  kappSlug: kappSlug,
68
70
  formSlug: formSlug,
69
71
  form: {
@@ -71,22 +73,19 @@ var handleSubmit = function handleSubmit(_ref4) {
71
73
  }
72
74
  })).then(function (_ref6) {
73
75
  var form = _ref6.form,
74
- kapp = _ref6.kapp,
75
- space = _ref6.space,
76
- error = _ref6.error;
77
-
76
+ kapp = _ref6.kapp,
77
+ space = _ref6.space,
78
+ error = _ref6.error;
78
79
  if (error) {
79
80
  throw error.statusCode === 400 && error.message || 'There was an error saving the index definition';
80
81
  }
81
-
82
82
  return !kappSlug && !formSlug ? space : kappSlug && !formSlug ? kapp : form;
83
83
  });
84
84
  };
85
85
  };
86
-
87
86
  var fields = function fields(_ref7) {
88
87
  var formSlug = _ref7.formSlug,
89
- indexName = _ref7.indexName;
88
+ indexName = _ref7.indexName;
90
89
  return function (_ref8) {
91
90
  var indexDefinition = _ref8.indexDefinition;
92
91
  return (!indexName || indexDefinition) && [{
@@ -98,7 +97,7 @@ var fields = function fields(_ref7) {
98
97
  var fields = _ref9.fields;
99
98
  return fields ? fields.map(function (field) {
100
99
  return "values[".concat(field.get('name'), "]");
101
- }).sort().concat(INDEX_STATIC_PARTS).map(function (name) {
100
+ }).sort().concat(_helpers.INDEX_STATIC_PARTS).map(function (name) {
102
101
  return {
103
102
  label: name,
104
103
  value: name
@@ -115,11 +114,11 @@ var fields = function fields(_ref7) {
115
114
  }];
116
115
  };
117
116
  };
118
-
119
- export var IndexDefinitionForm = generateForm({
117
+ var IndexDefinitionForm = (0, _Form.generateForm)({
120
118
  formOptions: ['kappSlug', 'formSlug', 'indexName'],
121
119
  dataSources: dataSources,
122
120
  fields: fields,
123
121
  handleSubmit: handleSubmit
124
122
  });
123
+ exports.IndexDefinitionForm = IndexDefinitionForm;
125
124
  IndexDefinitionForm.displayName = 'IndexDefinitionForm';
@@ -1,18 +1,26 @@
1
- import React from 'react';
2
- import { generateTable } from '../../table/Table';
3
- import { fetchForm, fetchKapp, fetchSpace } from '../../../apis';
4
- import { defineFilter } from '../../../helpers';
5
- var clientSide = defineFilter(true).startsWith('name', 'name').equals('status', 'status').equals('unique', 'unique').end(); // const indexStatuses = ['New', 'Building', 'Built', 'Failed'];
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.IndexDefinitionTable = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _Table = require("../../table/Table");
10
+ var _apis = require("../../../apis");
11
+ var _helpers = require("../../../helpers");
12
+ var clientSide = (0, _helpers.defineFilter)(true).startsWith('name', 'name').equals('status', 'status').equals('unique', 'unique').end();
13
+
14
+ // const indexStatuses = ['New', 'Building', 'Built', 'Failed'];
6
15
 
7
16
  var BooleanYesNoCell = function BooleanYesNoCell(props) {
8
- return /*#__PURE__*/React.createElement("td", null, props.value ? 'Yes' : 'No');
17
+ return /*#__PURE__*/_react["default"].createElement("td", null, props.value ? 'Yes' : 'No');
9
18
  };
10
-
11
19
  var dataSource = function dataSource(_ref) {
12
20
  var kappSlug = _ref.kappSlug,
13
- formSlug = _ref.formSlug;
21
+ formSlug = _ref.formSlug;
14
22
  return {
15
- fn: !kappSlug && !formSlug ? fetchSpace : kappSlug && !formSlug ? fetchKapp : fetchForm,
23
+ fn: !kappSlug && !formSlug ? _apis.fetchSpace : kappSlug && !formSlug ? _apis.fetchKapp : _apis.fetchForm,
16
24
  clientSide: clientSide,
17
25
  params: function params() {
18
26
  return [{
@@ -28,34 +36,41 @@ var dataSource = function dataSource(_ref) {
28
36
  }
29
37
  };
30
38
  };
31
-
32
39
  var columns = [{
33
40
  value: 'name',
34
- title: 'Name'
41
+ title: 'Name',
42
+ toggleable: false,
43
+ columnOrder: 'first'
35
44
  }, {
36
45
  value: 'status',
37
- title: 'Status'
46
+ title: 'Status',
47
+ toggleable: true
38
48
  }, {
39
49
  value: 'unique',
40
50
  title: 'Unique',
51
+ toggleable: true,
41
52
  components: {
42
53
  BodyCell: BooleanYesNoCell
43
54
  }
44
55
  }, {
45
56
  value: 'parts',
46
- title: 'Parts'
57
+ title: 'Parts',
58
+ toggleable: true
47
59
  }, {
48
60
  value: 'unpopulatedForms',
49
- title: 'Unpopulated Forms'
61
+ title: 'Unpopulated Forms',
62
+ toggleable: true
50
63
  }, {
51
64
  value: 'detatchedForms',
52
- title: 'Detatched Forms'
65
+ title: 'Detatched Forms',
66
+ toggleable: true
53
67
  }];
54
- export var IndexDefinitionTable = generateTable({
68
+ var IndexDefinitionTable = (0, _Table.generateTable)({
55
69
  tableOptions: ['kappSlug', 'formSlug'],
56
70
  sortable: false,
57
71
  columns: columns,
58
72
  // filters,
59
73
  dataSource: dataSource
60
74
  });
75
+ exports.IndexDefinitionTable = IndexDefinitionTable;
61
76
  IndexDefinitionTable.displayName = 'IndexDefinitionTable';
@@ -1,18 +1,24 @@
1
- import React from 'react';
2
- import { fetchBackgroundJobs } from '../../../apis';
3
- import { generateTable } from '../../table/Table';
4
- import { defineFilter } from '../../../helpers';
5
- var clientSide = defineFilter(true).equals('status', 'status').between('startedAt', 'minStartedAt', 'maxStartedAt').end();
6
- var indexJobStatuses = ['Running', 'Paused'];
1
+ "use strict";
7
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.IndexJobTable = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _apis = require("../../../apis");
10
+ var _Table = require("../../table/Table");
11
+ var _helpers = require("../../../helpers");
12
+ var clientSide = (0, _helpers.defineFilter)(true).equals('status', 'status').between('startedAt', 'minStartedAt', 'maxStartedAt').end();
13
+ var indexJobStatuses = ['Running', 'Paused'];
8
14
  var dataSource = function dataSource(_ref) {
9
15
  var formSlug = _ref.formSlug,
10
- kappSlug = _ref.kappSlug,
11
- _ref$completed = _ref.completed,
12
- completed = _ref$completed === void 0 ? false : _ref$completed;
16
+ kappSlug = _ref.kappSlug,
17
+ _ref$completed = _ref.completed,
18
+ completed = _ref$completed === void 0 ? false : _ref$completed;
13
19
  return {
14
20
  fn: function fn() {
15
- return fetchBackgroundJobs({
21
+ return (0, _apis.fetchBackgroundJobs)({
16
22
  formSlug: formSlug,
17
23
  kappSlug: kappSlug,
18
24
  completed: completed
@@ -29,7 +35,6 @@ var dataSource = function dataSource(_ref) {
29
35
  }
30
36
  };
31
37
  };
32
-
33
38
  var filters = function filters() {
34
39
  return function () {
35
40
  return [{
@@ -53,13 +58,12 @@ var filters = function filters() {
53
58
  }];
54
59
  };
55
60
  };
56
-
57
61
  var columns = [{
58
62
  value: 'content',
59
63
  title: 'Content',
60
64
  components: {
61
65
  BodyCell: function BodyCell(props) {
62
- return /*#__PURE__*/React.createElement("td", null, JSON.stringify(props.value));
66
+ return /*#__PURE__*/_react["default"].createElement("td", null, JSON.stringify(props.value));
63
67
  }
64
68
  },
65
69
  sortable: false,
@@ -84,7 +88,7 @@ var columns = [{
84
88
  title: 'Progress',
85
89
  components: {
86
90
  BodyCell: function BodyCell(props) {
87
- return /*#__PURE__*/React.createElement("td", null, "".concat(props.value));
91
+ return /*#__PURE__*/_react["default"].createElement("td", null, "".concat(props.value));
88
92
  }
89
93
  }
90
94
  }, {
@@ -100,11 +104,12 @@ var columns = [{
100
104
  value: 'type',
101
105
  title: 'Type'
102
106
  }];
103
- export var IndexJobTable = generateTable({
107
+ var IndexJobTable = (0, _Table.generateTable)({
104
108
  tableOptions: ['formSlug', 'kappSlug', 'completed'],
105
109
  dataSource: dataSource,
106
110
  columns: columns,
107
111
  filters: filters,
108
112
  sortable: false
109
113
  });
114
+ exports.IndexJobTable = IndexJobTable;
110
115
  IndexJobTable.displayName = 'IndexJobTable';
@@ -1,18 +1,24 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import { get, Map } from 'immutable';
4
- import { generateForm } from '../../form/Form';
5
- import { fetchKapp, fetchSpace, fetchAttributeDefinitions, fetchSecurityPolicyDefinitions, createKapp, updateKapp } from '../../../apis';
6
- import { buildBindings, slugify } from '../../../helpers';
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.KappForm = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
9
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
10
+ var _immutable = require("immutable");
11
+ var _Form = require("../../form/Form");
12
+ var _apis = require("../../../apis");
13
+ var _helpers = require("../../../helpers");
7
14
  var DISPLAY_TYPES = ['Display Page', 'Redirect'];
8
15
  var SPACE_INCLUDES = 'details,spaceAttributeDefinitions';
9
16
  var KAPP_INCLUDES = 'attributesMap,securityPolicies,details,fields.details,formAttributeDefinitions';
10
-
11
17
  var dataSources = function dataSources(_ref) {
12
18
  var kappSlug = _ref.kappSlug;
13
19
  return {
14
20
  space: {
15
- fn: fetchSpace,
21
+ fn: _apis.fetchSpace,
16
22
  params: [{
17
23
  include: SPACE_INCLUDES
18
24
  }],
@@ -21,7 +27,7 @@ var dataSources = function dataSources(_ref) {
21
27
  }
22
28
  },
23
29
  kapp: {
24
- fn: fetchKapp,
30
+ fn: _apis.fetchKapp,
25
31
  params: kappSlug && [{
26
32
  kappSlug: kappSlug,
27
33
  include: KAPP_INCLUDES
@@ -31,7 +37,7 @@ var dataSources = function dataSources(_ref) {
31
37
  }
32
38
  },
33
39
  attributeDefinitions: {
34
- fn: fetchAttributeDefinitions,
40
+ fn: _apis.fetchAttributeDefinitions,
35
41
  params: kappSlug && [{
36
42
  kappSlug: kappSlug,
37
43
  attributeType: 'kappAttributeDefinitions'
@@ -41,7 +47,7 @@ var dataSources = function dataSources(_ref) {
41
47
  }
42
48
  },
43
49
  securityPolicyDefinitions: {
44
- fn: fetchSecurityPolicyDefinitions,
50
+ fn: _apis.fetchSecurityPolicyDefinitions,
45
51
  params: kappSlug && [{
46
52
  kappSlug: kappSlug
47
53
  }],
@@ -51,26 +57,22 @@ var dataSources = function dataSources(_ref) {
51
57
  }
52
58
  };
53
59
  };
54
-
55
60
  var handleSubmit = function handleSubmit(_ref2) {
56
61
  var kappSlug = _ref2.kappSlug;
57
62
  return function (values) {
58
- return (kappSlug ? updateKapp : createKapp)({
63
+ return (kappSlug ? _apis.updateKapp : _apis.createKapp)({
59
64
  kappSlug: kappSlug,
60
65
  kapp: values.toJS()
61
66
  }).then(function (_ref3) {
62
67
  var kapp = _ref3.kapp,
63
- error = _ref3.error;
64
-
68
+ error = _ref3.error;
65
69
  if (error) {
66
70
  throw error.statusCode === 400 && error.message || 'There was an error saving the kapp';
67
71
  }
68
-
69
72
  return kapp;
70
73
  });
71
74
  };
72
75
  };
73
-
74
76
  var securityEndpoints = {
75
77
  kappDisplay: {
76
78
  endpoint: 'Display',
@@ -113,7 +115,6 @@ var securityEndpoints = {
113
115
  types: ['Kapp', 'Form', 'Submission']
114
116
  }
115
117
  };
116
-
117
118
  var fields = function fields(_ref4) {
118
119
  var kappSlug = _ref4.kappSlug;
119
120
  return function (_ref5) {
@@ -122,51 +123,52 @@ var fields = function fields(_ref4) {
122
123
  name: 'afterLogoutPath',
123
124
  label: 'After Logout Path',
124
125
  type: 'text',
125
- initialValue: get(kapp, 'afterLogoutPath'),
126
+ initialValue: (0, _immutable.get)(kapp, 'afterLogoutPath'),
126
127
  visible: function visible(_ref6) {
127
128
  var space = _ref6.space;
128
- return get(space, 'displayType') !== 'Single Page App';
129
+ return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
129
130
  }
130
131
  }, {
131
132
  name: 'bundlePath',
132
133
  label: 'Bundle Path',
133
134
  type: 'text',
134
- initialValue: get(kapp, 'bundlePath'),
135
+ initialValue: (0, _immutable.get)(kapp, 'bundlePath'),
135
136
  visible: function visible(_ref7) {
136
137
  var space = _ref7.space;
137
- return get(space, 'displayType') !== 'Single Page App';
138
+ return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
138
139
  }
139
140
  }, {
140
141
  name: 'defaultFormConfirmationPage',
141
142
  label: 'Form Confirmation Page',
142
143
  type: 'text',
143
- initialValue: get(kapp, 'defaultFormConfirmationPage'),
144
+ initialValue: (0, _immutable.get)(kapp, 'defaultFormConfirmationPage'),
144
145
  visible: function visible(_ref8) {
145
146
  var space = _ref8.space;
146
- return get(space, 'displayType') !== 'Single Page App';
147
+ return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
147
148
  }
148
149
  }, {
149
150
  name: 'defaultFormDisplayPage',
150
151
  label: 'Form Display Page',
151
152
  type: 'text',
152
- initialValue: get(kapp, 'defaultFormDisplayPage'),
153
+ initialValue: (0, _immutable.get)(kapp, 'defaultFormDisplayPage'),
153
154
  visible: function visible(_ref9) {
154
155
  var space = _ref9.space;
155
- return get(space, 'displayType') !== 'Single Page App';
156
+ return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
156
157
  }
157
158
  }, {
158
159
  name: 'defaultSubmissionLabelExpression',
159
160
  label: 'Submission Label',
160
161
  type: 'code',
161
162
  language: 'js-template',
162
- initialValue: get(kapp, 'defaultSubmissionLabelExpression') || '',
163
- helpText: // eslint-disable-next-line no-template-curly-in-string
163
+ initialValue: (0, _immutable.get)(kapp, 'defaultSubmissionLabelExpression') || '',
164
+ helpText:
165
+ // eslint-disable-next-line no-template-curly-in-string
164
166
  "Default label for form submissions. Click the </> button to see available values derived from each submission. Example: ${form('name')}",
165
167
  options: function options(_ref10) {
166
168
  var space = _ref10.space,
167
- kapp = _ref10.kapp,
168
- attributeDefinitions = _ref10.attributeDefinitions;
169
- return buildBindings({
169
+ kapp = _ref10.kapp,
170
+ attributeDefinitions = _ref10.attributeDefinitions;
171
+ return (0, _helpers.buildBindings)({
170
172
  space: space,
171
173
  kapp: kapp && kapp.set('kappAttributeDefinitions', attributeDefinitions),
172
174
  scope: 'Submission'
@@ -184,9 +186,9 @@ var fields = function fields(_ref4) {
184
186
  }),
185
187
  enabled: function enabled(_ref11) {
186
188
  var space = _ref11.space;
187
- return get(space, 'displayType') !== 'Single Page App';
189
+ return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
188
190
  },
189
- initialValue: get(kapp, 'displayType') || 'Display Page',
191
+ initialValue: (0, _immutable.get)(kapp, 'displayType') || 'Display Page',
190
192
  helpText: 'Determines how the application works. Set in Space Settings.'
191
193
  }, {
192
194
  name: 'displayValue',
@@ -195,7 +197,7 @@ var fields = function fields(_ref4) {
195
197
  return values.get('displayType') === 'Redirect' ? 'Redirect URL' : 'Kapp Display Page';
196
198
  },
197
199
  type: 'text',
198
- initialValue: get(kapp, 'displayValue'),
200
+ initialValue: (0, _immutable.get)(kapp, 'displayValue'),
199
201
  required: function required(_ref13) {
200
202
  var values = _ref13.values;
201
203
  return values.get('displayType') === 'Redirect';
@@ -203,47 +205,46 @@ var fields = function fields(_ref4) {
203
205
  requiredMessage: "This field is required, when display type is 'Redirect'",
204
206
  visible: function visible(_ref14) {
205
207
  var space = _ref14.space;
206
- return get(space, 'displayType') !== 'Single Page App';
208
+ return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
207
209
  }
208
210
  }, {
209
211
  name: 'loginPage',
210
212
  label: 'Login Page',
211
213
  type: 'text',
212
- initialValue: get(kapp, 'loginPage'),
214
+ initialValue: (0, _immutable.get)(kapp, 'loginPage'),
213
215
  visible: function visible(_ref15) {
214
216
  var space = _ref15.space;
215
- return get(space, 'displayType') !== 'Single Page App';
217
+ return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
216
218
  }
217
219
  }, {
218
220
  name: 'name',
219
221
  label: 'Kapp Name',
220
222
  type: 'text',
221
223
  required: true,
222
- initialValue: get(kapp, 'name'),
224
+ initialValue: (0, _immutable.get)(kapp, 'name'),
223
225
  helpText: 'User friendly name for the Kapp, used throughout the system.',
224
226
  onChange: function onChange(_ref16, _ref17) {
225
227
  var values = _ref16.values;
226
228
  var setValue = _ref17.setValue;
227
-
228
229
  if (values.get('linked')) {
229
- setValue('slug', slugify(values.get('name')), false);
230
+ setValue('slug', (0, _helpers.slugify)(values.get('name')), false);
230
231
  }
231
232
  }
232
233
  }, {
233
234
  name: 'resetPasswordPage',
234
235
  label: 'Reset Password Page',
235
236
  type: 'text',
236
- initialValue: get(kapp, 'resetPasswordPage'),
237
+ initialValue: (0, _immutable.get)(kapp, 'resetPasswordPage'),
237
238
  visible: function visible(_ref18) {
238
239
  var space = _ref18.space;
239
- return get(space, 'displayType') !== 'Single Page App';
240
+ return (0, _immutable.get)(space, 'displayType') !== 'Single Page App';
240
241
  }
241
242
  }, {
242
243
  name: 'slug',
243
244
  label: 'Slug',
244
245
  type: 'text',
245
246
  required: true,
246
- initialValue: get(kapp, 'slug'),
247
+ initialValue: (0, _immutable.get)(kapp, 'slug'),
247
248
  helpText: 'Unique name used in the Kapp path.',
248
249
  onChange: function onChange(_bindings, _ref19) {
249
250
  var setValue = _ref19.setValue;
@@ -256,11 +257,10 @@ var fields = function fields(_ref4) {
256
257
  "transient": true,
257
258
  initialValue: kapp ? false : true,
258
259
  visible: false
259
- }].concat(_toConsumableArray(kappSlug ? Object.entries(securityEndpoints).map(function (_ref20) {
260
- var _ref21 = _slicedToArray(_ref20, 2),
261
- endpointFieldName = _ref21[0],
262
- endpoint = _ref21[1];
263
-
260
+ }].concat((0, _toConsumableArray2["default"])(kappSlug ? Object.entries(securityEndpoints).map(function (_ref20) {
261
+ var _ref21 = (0, _slicedToArray2["default"])(_ref20, 2),
262
+ endpointFieldName = _ref21[0],
263
+ endpoint = _ref21[1];
264
264
  return {
265
265
  name: endpointFieldName,
266
266
  label: endpoint.label,
@@ -270,7 +270,7 @@ var fields = function fields(_ref4) {
270
270
  return securityPolicyDefinitions ? securityPolicyDefinitions.filter(function (definition) {
271
271
  return endpoint.types.includes(definition.get('type'));
272
272
  }).map(function (definition) {
273
- return Map({
273
+ return (0, _immutable.Map)({
274
274
  value: definition.get('name'),
275
275
  label: definition.get('name')
276
276
  });
@@ -278,7 +278,7 @@ var fields = function fields(_ref4) {
278
278
  },
279
279
  initialValue: kapp ? kapp.get('securityPolicies').find(function (pol) {
280
280
  return pol.get('endpoint') === endpoint.endpoint;
281
- }, null, Map({})).get('name', '') : '',
281
+ }, null, (0, _immutable.Map)({})).get('name', '') : '',
282
282
  "transient": true
283
283
  };
284
284
  }) : []), [{
@@ -289,10 +289,9 @@ var fields = function fields(_ref4) {
289
289
  serialize: function serialize(_ref23) {
290
290
  var values = _ref23.values;
291
291
  return Object.entries(securityEndpoints).map(function (_ref24) {
292
- var _ref25 = _slicedToArray(_ref24, 2),
293
- endpointFieldName = _ref25[0],
294
- policy = _ref25[1];
295
-
292
+ var _ref25 = (0, _slicedToArray2["default"])(_ref24, 2),
293
+ endpointFieldName = _ref25[0],
294
+ policy = _ref25[1];
296
295
  return {
297
296
  endpoint: policy.endpoint,
298
297
  name: values.get(endpointFieldName)
@@ -301,7 +300,7 @@ var fields = function fields(_ref4) {
301
300
  return endpoint.name !== '';
302
301
  });
303
302
  },
304
- initialValue: get(kapp, 'securityPolicies')
303
+ initialValue: (0, _immutable.get)(kapp, 'securityPolicies')
305
304
  }, !!kappSlug && {
306
305
  name: 'attributesMap',
307
306
  label: 'Attributes',
@@ -311,15 +310,15 @@ var fields = function fields(_ref4) {
311
310
  var attributeDefinitions = _ref26.attributeDefinitions;
312
311
  return attributeDefinitions;
313
312
  },
314
- initialValue: get(kapp, 'attributesMap')
313
+ initialValue: (0, _immutable.get)(kapp, 'attributesMap')
315
314
  }]);
316
315
  };
317
316
  };
318
-
319
- export var KappForm = generateForm({
317
+ var KappForm = (0, _Form.generateForm)({
320
318
  formOptions: ['kappSlug'],
321
319
  dataSources: dataSources,
322
320
  fields: fields,
323
321
  handleSubmit: handleSubmit
324
322
  });
323
+ exports.KappForm = KappForm;
325
324
  KappForm.displayName = 'KappForm';