@kineticdata/react 6.0.1 → 6.0.3

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 (258) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/lib/apis/agent/adapters.js +2 -3
  3. package/lib/apis/agent/bridges.js +7 -13
  4. package/lib/apis/agent/handlers.js +7 -13
  5. package/lib/apis/core/activity.js +2 -3
  6. package/lib/apis/core/attributeDefinitions.js +6 -11
  7. package/lib/apis/core/attributeDefinitions.test.js +201 -213
  8. package/lib/apis/core/authentication.js +74 -84
  9. package/lib/apis/core/backgroundJobs.js +5 -9
  10. package/lib/apis/core/bridgeModelAttributeMappings.js +5 -10
  11. package/lib/apis/core/bridgeModelAttributes.js +6 -11
  12. package/lib/apis/core/bridgeModelMappings.js +5 -10
  13. package/lib/apis/core/bridgeModelQualificationMappings.js +5 -10
  14. package/lib/apis/core/bridgeModelQualifications.js +5 -10
  15. package/lib/apis/core/bridgeModels.js +7 -13
  16. package/lib/apis/core/bridgeModels.test.js +313 -333
  17. package/lib/apis/core/bridgedresources.js +7 -13
  18. package/lib/apis/core/categories.js +6 -11
  19. package/lib/apis/core/fileResources.js +5 -10
  20. package/lib/apis/core/filestores.js +5 -10
  21. package/lib/apis/core/formTypes.js +6 -11
  22. package/lib/apis/core/forms.js +6 -11
  23. package/lib/apis/core/forms.test.js +201 -213
  24. package/lib/apis/core/kapps.js +6 -11
  25. package/lib/apis/core/kapps.test.js +122 -130
  26. package/lib/apis/core/logs.js +3 -5
  27. package/lib/apis/core/memberships.js +3 -5
  28. package/lib/apis/core/meta.js +6 -11
  29. package/lib/apis/core/notices.js +2 -3
  30. package/lib/apis/core/oauthClients.js +6 -11
  31. package/lib/apis/core/platformComponents.js +10 -19
  32. package/lib/apis/core/platformItems.js +2 -3
  33. package/lib/apis/core/profile.js +3 -5
  34. package/lib/apis/core/securityPolicyDefinitions.js +6 -11
  35. package/lib/apis/core/securityPolicyDefinitions.test.js +254 -268
  36. package/lib/apis/core/space.js +3 -5
  37. package/lib/apis/core/space.test.js +106 -114
  38. package/lib/apis/core/submissions.js +19 -35
  39. package/lib/apis/core/teams.js +6 -11
  40. package/lib/apis/core/translations.js +18 -35
  41. package/lib/apis/core/translations.test.js +1343 -1437
  42. package/lib/apis/core/users.js +6 -11
  43. package/lib/apis/core/version.js +2 -3
  44. package/lib/apis/core/webApis.js +5 -10
  45. package/lib/apis/core/webhooks.js +6 -11
  46. package/lib/apis/core/webhooks.test.js +243 -257
  47. package/lib/apis/core/webhooksJobs.js +3 -5
  48. package/lib/apis/core/workflows.js +7 -13
  49. package/lib/apis/http.js +16 -31
  50. package/lib/apis/system/index.js +46 -91
  51. package/lib/apis/task/index.js +60 -119
  52. package/lib/components/agent/bridge/BridgeForm.js +1 -2
  53. package/lib/components/agent/bridge/BridgeTable.js +1 -2
  54. package/lib/components/agent/filestore/FilestoreForm.js +1 -2
  55. package/lib/components/agent/filestore/FilestoreTable.js +1 -2
  56. package/lib/components/agent/handler/AgentHandlerForm.js +1 -2
  57. package/lib/components/agent/handler/AgentHandlerTable.js +1 -2
  58. package/lib/components/common/AttributeSelect.js +2 -3
  59. package/lib/components/common/BridgeSelect.js +16 -17
  60. package/lib/components/common/ComponentConfigContext.js +1 -2
  61. package/lib/components/common/ContentEditable.js +23 -3
  62. package/lib/components/common/FormSelect.js +16 -17
  63. package/lib/components/common/NodeSelect.js +2 -3
  64. package/lib/components/common/Scroller.js +2 -3
  65. package/lib/components/common/StaticSelect.js +14 -15
  66. package/lib/components/common/TableInput.js +276 -63
  67. package/lib/components/common/TeamSelect.js +16 -17
  68. package/lib/components/common/ToastContainer.js +7 -12
  69. package/lib/components/common/Typeahead.js +15 -2
  70. package/lib/components/common/UserSelect.js +16 -17
  71. package/lib/components/common/authentication/AuthInterceptor.js +2 -3
  72. package/lib/components/common/authentication/AuthInterceptor.test.js +141 -153
  73. package/lib/components/common/authentication/AuthenticationContainer.js +332 -343
  74. package/lib/components/common/authentication/RequestInterceptor.js +2 -10
  75. package/lib/components/common/code_input/CodeInput.js +4 -9
  76. package/lib/components/common/code_input/draftHelpers.js +20 -37
  77. package/lib/components/common/code_input/languageHelpers.js +6 -12
  78. package/lib/components/common/code_input/languageHelpers.test.js +10 -8
  79. package/lib/components/common/defaults/Toast.js +1 -2
  80. package/lib/components/common/defaults/index.js +2 -3
  81. package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +1 -2
  82. package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +1 -2
  83. package/lib/components/core/bridge_model/BridgeModelForm.js +52 -55
  84. package/lib/components/core/bridge_model/BridgeModelTable.js +1 -2
  85. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +1 -2
  86. package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +1 -2
  87. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +1 -2
  88. package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +1 -2
  89. package/lib/components/core/category/CategoryForm.js +1 -2
  90. package/lib/components/core/category/CategoryTable.js +1 -2
  91. package/lib/components/core/core_form/CoreForm.js +11 -22
  92. package/lib/components/core/core_form/defaults/index.js +11 -19
  93. package/lib/components/core/core_form/globals.js +3 -5
  94. package/lib/components/core/field_definition/FieldDefinitionForm.js +1 -2
  95. package/lib/components/core/field_definition/FieldDefinitionTable.js +2 -4
  96. package/lib/components/core/file_resource/FileResourceForm.js +1 -2
  97. package/lib/components/core/file_resource/FileResourceTable.js +1 -2
  98. package/lib/components/core/form/FormForm.js +4 -4
  99. package/lib/components/core/form/FormTable.js +1 -2
  100. package/lib/components/core/form_type/FormTypeForm.js +1 -2
  101. package/lib/components/core/form_type/FormTypeTable.js +1 -2
  102. package/lib/components/core/i18n/I18n.js +2 -4
  103. package/lib/components/core/i18n/I18nContext.js +1 -2
  104. package/lib/components/core/i18n/I18nProvider.js +2 -3
  105. package/lib/components/core/i18n/Moment.js +10 -9
  106. package/lib/components/core/index_definition/IndexDefinitionForm.js +1 -2
  107. package/lib/components/core/index_definition/IndexDefinitionTable.js +1 -2
  108. package/lib/components/core/index_job/IndexJobTable.js +1 -2
  109. package/lib/components/core/kapp/KappForm.js +1 -2
  110. package/lib/components/core/kapp/KappTable.js +1 -2
  111. package/lib/components/core/log/LogTable.js +2 -4
  112. package/lib/components/core/oauth_client/OAuthClientForm.js +1 -2
  113. package/lib/components/core/oauth_client/OAuthClientTable.js +1 -2
  114. package/lib/components/core/platform_component/AgentComponentForm.js +1 -2
  115. package/lib/components/core/platform_component/AgentComponentTable.js +1 -2
  116. package/lib/components/core/platform_component/TaskComponentForm.js +1 -2
  117. package/lib/components/core/profile/ProfileForm.js +1 -2
  118. package/lib/components/core/security_definition/SecurityDefinitionForm.js +3 -6
  119. package/lib/components/core/security_definition/SecurityDefinitionTable.js +1 -2
  120. package/lib/components/core/space/SpaceForm.js +1 -2
  121. package/lib/components/core/submission/DatastoreSubmissionFilters.js +3 -5
  122. package/lib/components/core/submission/DatastoreSubmissionTable.js +2 -4
  123. package/lib/components/core/submission/FormSubmissionFilters.js +4 -7
  124. package/lib/components/core/submission/FormSubmissionTable.js +2 -4
  125. package/lib/components/core/submission/KappSubmissionTable.js +2 -4
  126. package/lib/components/core/submission/SubmissionForm.js +1 -2
  127. package/lib/components/core/submission/SubmissionTable.js +2 -3
  128. package/lib/components/core/submission/helpers.js +4 -7
  129. package/lib/components/core/team/TeamForm.js +1 -2
  130. package/lib/components/core/team/TeamTable.js +1 -2
  131. package/lib/components/core/translation/ContextForm.js +1 -2
  132. package/lib/components/core/translation/ContextTable.js +1 -2
  133. package/lib/components/core/translation/EntryForm.js +1 -2
  134. package/lib/components/core/translation/EntryTable.js +1 -2
  135. package/lib/components/core/translation/LocaleForm.js +1 -2
  136. package/lib/components/core/translation/LocaleTable.js +1 -2
  137. package/lib/components/core/user/UserForm.js +1 -2
  138. package/lib/components/core/user/UserTable.js +1 -2
  139. package/lib/components/core/webapi/WebApiForm.js +97 -101
  140. package/lib/components/core/webapi/WebApiTable.js +1 -2
  141. package/lib/components/core/webhook/WebhookForm.js +1 -2
  142. package/lib/components/core/webhook/WebhookTable.js +1 -2
  143. package/lib/components/core/webhook_job/WebhookJobTable.js +1 -2
  144. package/lib/components/form/Form.helpers.js +10 -19
  145. package/lib/components/form/Form.js +312 -355
  146. package/lib/components/form/Form.models.js +6 -11
  147. package/lib/components/form/FormState.js +3 -3
  148. package/lib/components/form/KitchenSinkForm.js +23 -3
  149. package/lib/components/form/SimpleForm.helpers.js +262 -0
  150. package/lib/components/form/SimpleForm.js +462 -0
  151. package/lib/components/form/SimpleForm.models.js +62 -0
  152. package/lib/components/form/defaults/AttributesField.js +3 -4
  153. package/lib/components/form/defaults/CheckboxField.js +2 -3
  154. package/lib/components/form/defaults/CodeField.js +2 -3
  155. package/lib/components/form/defaults/FormButtons.js +2 -3
  156. package/lib/components/form/defaults/FormError.js +2 -3
  157. package/lib/components/form/defaults/FormField.js +2 -3
  158. package/lib/components/form/defaults/FormLayout.js +2 -3
  159. package/lib/components/form/defaults/FormMultiField.js +2 -3
  160. package/lib/components/form/defaults/PasswordField.js +2 -3
  161. package/lib/components/form/defaults/RadioField.js +2 -3
  162. package/lib/components/form/defaults/SampleTeamsRolesFIeld.js +2 -3
  163. package/lib/components/form/defaults/SelectField.js +2 -3
  164. package/lib/components/form/defaults/SelectMultiField.js +2 -3
  165. package/lib/components/form/defaults/TableField.js +2 -3
  166. package/lib/components/form/defaults/TeamField.js +2 -3
  167. package/lib/components/form/defaults/TeamMultiField.js +2 -3
  168. package/lib/components/form/defaults/TextField.js +2 -3
  169. package/lib/components/form/defaults/TextMultiField.js +2 -3
  170. package/lib/components/form/defaults/UserField.js +2 -3
  171. package/lib/components/form/defaults/UserMultiField.js +2 -3
  172. package/lib/components/form/defaults/index.js +2 -3
  173. package/lib/components/form/tests/Form.test.js +4354 -4508
  174. package/lib/components/form/tests/components.js +73 -64
  175. package/lib/components/index.js +7 -0
  176. package/lib/components/system/SystemBackgroundTasksTable.js +1 -2
  177. package/lib/components/system/SystemCassandraForm.js +1 -2
  178. package/lib/components/system/SystemElasticSearchForm.js +1 -2
  179. package/lib/components/system/SystemFilestoreForm.js +2 -3
  180. package/lib/components/system/SystemForm.js +1 -2
  181. package/lib/components/system/SystemIngressForm.js +1 -2
  182. package/lib/components/system/SystemSecurityForm.js +1 -2
  183. package/lib/components/system/SystemSmtpForm.js +1 -2
  184. package/lib/components/system/SystemTaskAdapterForm.js +1 -2
  185. package/lib/components/system/SystemTrustedCertificateForm.js +1 -2
  186. package/lib/components/system/SystemTrustedCertificatesTable.js +1 -2
  187. package/lib/components/system/SystemUserForm.js +1 -2
  188. package/lib/components/system/helpers.js +11 -21
  189. package/lib/components/system/spaces/SystemSpaceForm.js +2 -3
  190. package/lib/components/system/spaces/SystemTenantForm.js +2 -3
  191. package/lib/components/system/spaces/SystemTenantTable.js +1 -2
  192. package/lib/components/table/Table.js +48 -51
  193. package/lib/components/table/Table.redux.js +161 -188
  194. package/lib/components/table/Table.test.js +115 -123
  195. package/lib/components/table/defaults/BodyCell.js +1 -2
  196. package/lib/components/table/defaults/BodyRow.js +1 -2
  197. package/lib/components/table/defaults/BooleanFilter.js +1 -2
  198. package/lib/components/table/defaults/ColumnControl.js +1 -2
  199. package/lib/components/table/defaults/EmptyBodyRow.js +1 -2
  200. package/lib/components/table/defaults/FilterLayout.js +1 -2
  201. package/lib/components/table/defaults/Footer.js +1 -2
  202. package/lib/components/table/defaults/FooterCell.js +1 -2
  203. package/lib/components/table/defaults/FooterRow.js +1 -2
  204. package/lib/components/table/defaults/Header.js +1 -2
  205. package/lib/components/table/defaults/HeaderCell.js +1 -2
  206. package/lib/components/table/defaults/HeaderRow.js +1 -2
  207. package/lib/components/table/defaults/PaginationControl.js +2 -4
  208. package/lib/components/table/defaults/TableBody.js +1 -2
  209. package/lib/components/table/defaults/TableLayout.js +1 -2
  210. package/lib/components/table/defaults/TextFilter.js +1 -2
  211. package/lib/components/table/defaults/index.js +2 -3
  212. package/lib/components/table/tests/Table.redux.test.js +162 -0
  213. package/lib/components/table/tests/Table.test.js +767 -0
  214. package/lib/components/table/tests/components.js +182 -0
  215. package/lib/components/task/builder/Connector.js +26 -11
  216. package/lib/components/task/builder/ConnectorForm.js +1 -2
  217. package/lib/components/task/builder/Node.js +18 -9
  218. package/lib/components/task/builder/NodeForm.js +1 -2
  219. package/lib/components/task/builder/NodeParametersForm.js +1 -2
  220. package/lib/components/task/builder/SvgCanvas.js +2 -3
  221. package/lib/components/task/builder/SvgText.js +2 -3
  222. package/lib/components/task/builder/TaskDefinitionConfigForm.js +3 -6
  223. package/lib/components/task/builder/TreeBuilder.js +14 -5
  224. package/lib/components/task/builder/builder.redux.js +187 -186
  225. package/lib/components/task/builder/constants.js +38 -76
  226. package/lib/components/task/builder/helpers.js +23 -40
  227. package/lib/components/task/builder/models.js +24 -35
  228. package/lib/components/task/category/TaskCategoryForm.js +2 -3
  229. package/lib/components/task/category/TaskCategoryTable.js +1 -2
  230. package/lib/components/task/common/UsageTable.js +1 -2
  231. package/lib/components/task/engine/EngineSettingsForm.js +2 -3
  232. package/lib/components/task/errors/RunErrorTable.js +2 -3
  233. package/lib/components/task/errors/SystemErrorsTable.js +1 -2
  234. package/lib/components/task/handlers/HandlerForm.js +2 -3
  235. package/lib/components/task/handlers/HandlerTable.js +1 -2
  236. package/lib/components/task/handlers/MissingHandlerTable.js +1 -2
  237. package/lib/components/task/policy_rule/PolicyRuleForm.js +2 -3
  238. package/lib/components/task/policy_rule/PolicyRuleTable.js +1 -2
  239. package/lib/components/task/runs/CreateManualTriggerForm.js +1 -2
  240. package/lib/components/task/runs/RunTable.js +2 -3
  241. package/lib/components/task/runs/RunTaskTable.js +1 -2
  242. package/lib/components/task/sources/SourceForm.js +1 -2
  243. package/lib/components/task/sources/SourceTable.js +1 -2
  244. package/lib/components/task/triggers/TriggerTable.js +2 -3
  245. package/lib/components/task/workflows/LinkedWorkflowForm.js +3 -5
  246. package/lib/components/task/workflows/LinkedWorkflowTable.js +1 -2
  247. package/lib/components/task/workflows/MissingRoutineTable.js +1 -2
  248. package/lib/components/task/workflows/WorkflowForm.js +91 -41
  249. package/lib/components/task/workflows/WorkflowTable.js +1 -2
  250. package/lib/helpers/SearchBuilder.js +2 -4
  251. package/lib/helpers/index.js +13 -26
  252. package/lib/index.js +3 -6
  253. package/lib/reducer.js +3 -5
  254. package/lib/saga.js +32 -48
  255. package/lib/store.js +32 -42
  256. package/package.json +12 -15
  257. package/lib/components/core/CoreFormModal.js +0 -64
  258. package/lib/components/core/CoreModal.js +0 -114
@@ -16,25 +16,22 @@ var _store = require("../../../store");
16
16
  var _models = require("./models");
17
17
  var _apis = require("../../../apis");
18
18
  var _helpers = require("./helpers");
19
- var mountTreeBuilder = function mountTreeBuilder(treeKey) {
19
+ var mountTreeBuilder = exports.mountTreeBuilder = function mountTreeBuilder(treeKey) {
20
20
  return (0, _store.dispatch)('TREE_MOUNT', {
21
21
  treeKey: treeKey
22
22
  });
23
23
  };
24
- exports.mountTreeBuilder = mountTreeBuilder;
25
- var unmountTreeBuilder = function unmountTreeBuilder(treeKey) {
24
+ var unmountTreeBuilder = exports.unmountTreeBuilder = function unmountTreeBuilder(treeKey) {
26
25
  return (0, _store.dispatch)('TREE_UNMOUNT', {
27
26
  treeKey: treeKey
28
27
  });
29
28
  };
30
- exports.unmountTreeBuilder = unmountTreeBuilder;
31
- var configureTreeBuilder = function configureTreeBuilder(props) {
29
+ var configureTreeBuilder = exports.configureTreeBuilder = function configureTreeBuilder(props) {
32
30
  return (0, _store.dispatch)('TREE_CONFIGURE', props);
33
31
  };
34
32
 
35
33
  // Helper that adds the present state to the past stack and clears the future
36
34
  // stack. This should be called by reducer cases that will be undo/redo able.
37
- exports.configureTreeBuilder = configureTreeBuilder;
38
35
  var remember = function remember(state, treeKey) {
39
36
  return state.updateIn(['trees', treeKey, 'undoStack'], function (stack) {
40
37
  return stack.push({
@@ -46,74 +43,81 @@ var remember = function remember(state, treeKey) {
46
43
  (0, _store.regSaga)((0, _effects.takeEvery)('TREE_CONFIGURE', function (_ref) {
47
44
  var payload = _ref.payload;
48
45
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
49
- var name, sourceGroup, sourceName, treeKey, webApiProps, _yield$all, _yield$all2, tree, categories, webApi, platformItem, result;
46
+ var _getPlatformItemSlugs, name, sourceGroup, sourceName, treeKey, webApiProps, _yield$all, _yield$all2, tree, categories, webApi, platformItem, result, _yield$call, workflow;
50
47
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
51
- while (1) {
52
- switch (_context.prev = _context.next) {
53
- case 0:
54
- _context.prev = 0;
55
- name = payload.name, sourceGroup = payload.sourceGroup, sourceName = payload.sourceName, treeKey = payload.treeKey;
56
- webApiProps = getWebApiProps(payload);
57
- _context.next = 5;
58
- return (0, _effects.all)([(0, _effects.call)(_apis.fetchTree, {
59
- name: name,
60
- sourceGroup: sourceGroup,
61
- sourceName: sourceName,
62
- include: 'bindings,categories,details,treeJson,inputs,outputs'
63
- }), (0, _effects.call)(_apis.fetchTaskCategories, {
64
- include: 'handlers.results,handlers.parameters,trees.parameters,trees.inputs,trees.outputs'
65
- }), webApiProps ? (0, _effects.call)(_apis.fetchWebApi, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, webApiProps), {}, {
66
- include: 'details,securityPolicies'
67
- })) : {}]);
68
- case 5:
69
- _yield$all = _context.sent;
70
- _yield$all2 = (0, _slicedToArray2["default"])(_yield$all, 3);
71
- tree = _yield$all2[0].tree;
72
- categories = _yield$all2[1].categories;
73
- webApi = _yield$all2[2].webApi;
74
- platformItem = null;
75
- if (!tree.event) {
76
- _context.next = 16;
77
- break;
78
- }
79
- _context.next = 14;
80
- return (0, _effects.call)(_apis.fetchPlatformItem, {
81
- type: tree.platformItemType,
82
- id: tree.platformItemId
83
- });
84
- case 14:
85
- result = _context.sent;
86
- platformItem = result.platformItem;
87
- case 16:
88
- _context.next = 18;
89
- return (0, _effects.put)((0, _store.action)('TREE_LOADED', {
90
- categories: categories,
91
- kappSlug: webApiProps && webApiProps.kappSlug,
92
- platformItem: platformItem,
93
- treeKey: treeKey,
94
- tree: (0, _models.deserializeTree)(tree),
95
- webApi: webApiProps && (0, _models.deserializeWebApi)(webApi, webApiProps.kappSlug)
96
- }));
97
- case 18:
98
- _context.next = 23;
48
+ while (1) switch (_context.prev = _context.next) {
49
+ case 0:
50
+ _context.prev = 0;
51
+ name = payload.name, sourceGroup = payload.sourceGroup, sourceName = payload.sourceName, treeKey = payload.treeKey;
52
+ webApiProps = getWebApiProps(payload);
53
+ _context.next = 5;
54
+ return (0, _effects.all)([(0, _effects.call)(_apis.fetchTree, {
55
+ name: name,
56
+ sourceGroup: sourceGroup,
57
+ sourceName: sourceName,
58
+ include: 'bindings,categories,details,treeJson,inputs,outputs'
59
+ }), (0, _effects.call)(_apis.fetchTaskCategories, {
60
+ include: 'handlers.results,handlers.parameters,trees.parameters,trees.inputs,trees.outputs'
61
+ }), webApiProps ? (0, _effects.call)(_apis.fetchWebApi, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, webApiProps), {}, {
62
+ include: 'details,securityPolicies'
63
+ })) : {}]);
64
+ case 5:
65
+ _yield$all = _context.sent;
66
+ _yield$all2 = (0, _slicedToArray2["default"])(_yield$all, 3);
67
+ tree = _yield$all2[0].tree;
68
+ categories = _yield$all2[1].categories;
69
+ webApi = _yield$all2[2].webApi;
70
+ platformItem = null;
71
+ if (!tree.event) {
72
+ _context.next = 21;
99
73
  break;
100
- case 20:
101
- _context.prev = 20;
102
- _context.t0 = _context["catch"](0);
103
- console.error('Caught error loading tree', _context.t0);
104
- case 23:
105
- case "end":
106
- return _context.stop();
107
- }
74
+ }
75
+ _context.next = 14;
76
+ return (0, _effects.call)(_apis.fetchPlatformItem, {
77
+ type: tree.platformItemType,
78
+ id: tree.platformItemId
79
+ });
80
+ case 14:
81
+ result = _context.sent;
82
+ platformItem = result.platformItem;
83
+ _context.next = 18;
84
+ return (0, _effects.call)(_apis.fetchWorkflow, (0, _objectSpread2["default"])({
85
+ workflowId: sourceGroup
86
+ }, getPlatformItemSlugs(platformItem)));
87
+ case 18:
88
+ _yield$call = _context.sent;
89
+ workflow = _yield$call.workflow;
90
+ // Add workflow filter from core to the tree to be used in the Settings > WorkflowForm
91
+ tree['filter'] = workflow ? workflow.filter : '';
92
+ case 21:
93
+ _context.next = 23;
94
+ return (0, _effects.put)((0, _store.action)('TREE_LOADED', {
95
+ categories: categories,
96
+ kappSlug: webApiProps && webApiProps.kappSlug || ((_getPlatformItemSlugs = getPlatformItemSlugs(platformItem)) === null || _getPlatformItemSlugs === void 0 ? void 0 : _getPlatformItemSlugs.kappSlug),
97
+ platformItem: platformItem,
98
+ treeKey: treeKey,
99
+ tree: (0, _models.deserializeTree)(tree),
100
+ webApi: webApiProps && (0, _models.deserializeWebApi)(webApi, webApiProps.kappSlug)
101
+ }));
102
+ case 23:
103
+ _context.next = 28;
104
+ break;
105
+ case 25:
106
+ _context.prev = 25;
107
+ _context.t0 = _context["catch"](0);
108
+ console.error('Caught error loading tree', _context.t0);
109
+ case 28:
110
+ case "end":
111
+ return _context.stop();
108
112
  }
109
- }, _callee, null, [[0, 20]]);
113
+ }, _callee, null, [[0, 25]]);
110
114
  })();
111
115
  }));
112
116
  var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
113
- return platformItem.kapp ? {
117
+ return platformItem !== null && platformItem !== void 0 && platformItem.kapp ? {
114
118
  formSlug: platformItem.slug,
115
119
  kappSlug: platformItem.kapp.slug
116
- } : platformItem.space ? {
120
+ } : platformItem !== null && platformItem !== void 0 && platformItem.space ? {
117
121
  kappSlug: platformItem.slug
118
122
  } : {};
119
123
  };
@@ -122,82 +126,83 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
122
126
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
123
127
  var newName, onError, onSave, overwrite, treeKey, _yield$select, kappSlug, lastSave, lastWebApi, platformItem, tree, webApi, name, sourceGroup, sourceName, _yield, error1, newTree, newWorkflow, _yield2, error2, error;
124
128
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
125
- while (1) {
126
- switch (_context2.prev = _context2.next) {
127
- case 0:
128
- _context2.prev = 0;
129
- // because of the optimistic locking functionality newName / overwrite can
130
- // be passed as options to the builder's save function
131
- newName = payload.newName, onError = payload.onError, onSave = payload.onSave, overwrite = payload.overwrite, treeKey = payload.treeKey;
132
- _context2.next = 4;
133
- return (0, _effects.select)(function (state) {
134
- return state.getIn(['trees', treeKey]);
135
- });
136
- case 4:
137
- _yield$select = _context2.sent;
138
- kappSlug = _yield$select.kappSlug;
139
- lastSave = _yield$select.lastSave;
140
- lastWebApi = _yield$select.lastWebApi;
141
- platformItem = _yield$select.platformItem;
142
- tree = _yield$select.tree;
143
- webApi = _yield$select.webApi;
144
- name = lastSave.name, sourceGroup = lastSave.sourceGroup, sourceName = lastSave.sourceName; // if a newName was passed we will be creating a new tree with the builder
145
- // contents, otherwise just an update
146
- // additionally, if the tree is a linked workflow then we call a core
147
- // endpoint to create the workflow
148
- _context2.next = 14;
149
- return newName ? tree.event ? (0, _effects.call)(_apis.createWorkflow, (0, _objectSpread2["default"])({
150
- workflow: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree)), {}, {
151
- name: newName
152
- })
153
- }, getPlatformItemSlugs(platformItem))) : (0, _effects.call)(_apis.createTree, {
154
- tree: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree, true)), {}, {
155
- name: newName
156
- })
157
- }) : (0, _effects.call)(_apis.updateTree, {
158
- name: name,
159
- sourceGroup: sourceGroup,
160
- sourceName: sourceName,
161
- tree: (0, _models.serializeTree)(tree, overwrite)
162
- });
163
- case 14:
164
- _yield = _context2.sent;
165
- error1 = _yield.error;
166
- newTree = _yield.tree;
167
- newWorkflow = _yield.workflow;
168
- _context2.next = 20;
169
- return webApi && !error1 ? (0, _effects.call)(_apis.updateWebApi, {
170
- slug: lastWebApi.get('slug'),
171
- kappSlug: kappSlug,
172
- webApi: webApi
173
- }) : {};
174
- case 20:
175
- _yield2 = _context2.sent;
176
- error2 = _yield2.error;
177
- error = error1 || error2; // dispatch the appropriate action based on the result of the call above
178
- _context2.next = 25;
179
- return (0, _effects.put)(error ? (0, _store.action)('TREE_SAVE_ERROR', {
180
- treeKey: treeKey,
181
- error: error.message || error,
182
- onError: onError
183
- }) : (0, _store.action)('TREE_SAVE_SUCCESS', {
184
- previousTree: lastSave,
185
- treeKey: treeKey,
186
- tree: newTree || newWorkflow,
187
- webApi: webApi,
188
- onSave: onSave
189
- }));
190
- case 25:
191
- _context2.next = 30;
192
- break;
193
- case 27:
194
- _context2.prev = 27;
195
- _context2.t0 = _context2["catch"](0);
196
- console.error(_context2.t0);
197
- case 30:
198
- case "end":
199
- return _context2.stop();
200
- }
129
+ while (1) switch (_context2.prev = _context2.next) {
130
+ case 0:
131
+ _context2.prev = 0;
132
+ // because of the optimistic locking functionality newName / overwrite can
133
+ // be passed as options to the builder's save function
134
+ newName = payload.newName, onError = payload.onError, onSave = payload.onSave, overwrite = payload.overwrite, treeKey = payload.treeKey;
135
+ _context2.next = 4;
136
+ return (0, _effects.select)(function (state) {
137
+ return state.getIn(['trees', treeKey]);
138
+ });
139
+ case 4:
140
+ _yield$select = _context2.sent;
141
+ kappSlug = _yield$select.kappSlug;
142
+ lastSave = _yield$select.lastSave;
143
+ lastWebApi = _yield$select.lastWebApi;
144
+ platformItem = _yield$select.platformItem;
145
+ tree = _yield$select.tree;
146
+ webApi = _yield$select.webApi;
147
+ name = lastSave.name, sourceGroup = lastSave.sourceGroup, sourceName = lastSave.sourceName; // if a newName was passed we will be creating a new tree with the builder
148
+ // contents, otherwise just an update
149
+ // additionally, if the tree is a linked workflow then we call a core
150
+ // endpoint to create the workflow
151
+ _context2.next = 14;
152
+ return newName ? tree.event ? (0, _effects.call)(_apis.createWorkflow, (0, _objectSpread2["default"])({
153
+ workflow: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree)), {}, {
154
+ name: newName
155
+ })
156
+ }, getPlatformItemSlugs(platformItem))) : (0, _effects.call)(_apis.createTree, {
157
+ tree: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _models.serializeTree)(tree, true)), {}, {
158
+ name: newName
159
+ })
160
+ }) : tree.event ? (0, _effects.call)(_apis.updateWorkflow, (0, _objectSpread2["default"])({
161
+ workflowId: sourceGroup,
162
+ workflow: (0, _models.serializeTree)(tree, overwrite)
163
+ }, getPlatformItemSlugs(platformItem))) : (0, _effects.call)(_apis.updateTree, {
164
+ name: name,
165
+ sourceGroup: sourceGroup,
166
+ sourceName: sourceName,
167
+ tree: (0, _models.serializeTree)(tree, overwrite)
168
+ });
169
+ case 14:
170
+ _yield = _context2.sent;
171
+ error1 = _yield.error;
172
+ newTree = _yield.tree;
173
+ newWorkflow = _yield.workflow;
174
+ _context2.next = 20;
175
+ return webApi && !error1 ? (0, _effects.call)(_apis.updateWebApi, {
176
+ slug: lastWebApi.get('slug'),
177
+ kappSlug: kappSlug,
178
+ webApi: webApi
179
+ }) : {};
180
+ case 20:
181
+ _yield2 = _context2.sent;
182
+ error2 = _yield2.error;
183
+ error = error1 || error2; // dispatch the appropriate action based on the result of the call above
184
+ _context2.next = 25;
185
+ return (0, _effects.put)(error ? (0, _store.action)('TREE_SAVE_ERROR', {
186
+ treeKey: treeKey,
187
+ error: error.message || error,
188
+ onError: onError
189
+ }) : (0, _store.action)('TREE_SAVE_SUCCESS', {
190
+ previousTree: lastSave,
191
+ treeKey: treeKey,
192
+ tree: newTree || newWorkflow,
193
+ webApi: webApi,
194
+ onSave: onSave
195
+ }));
196
+ case 25:
197
+ _context2.next = 30;
198
+ break;
199
+ case 27:
200
+ _context2.prev = 27;
201
+ _context2.t0 = _context2["catch"](0);
202
+ console.error(_context2.t0);
203
+ case 30:
204
+ case "end":
205
+ return _context2.stop();
201
206
  }
202
207
  }, _callee2, null, [[0, 27]]);
203
208
  })();
@@ -208,27 +213,25 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
208
213
  onError = _ref3$payload.onError;
209
214
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee3() {
210
215
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee3$(_context3) {
211
- while (1) {
212
- switch (_context3.prev = _context3.next) {
213
- case 0:
214
- _context3.prev = 0;
215
- if (!(0, _lodashEs.isFunction)(onError)) {
216
- _context3.next = 4;
217
- break;
218
- }
216
+ while (1) switch (_context3.prev = _context3.next) {
217
+ case 0:
218
+ _context3.prev = 0;
219
+ if (!(0, _lodashEs.isFunction)(onError)) {
219
220
  _context3.next = 4;
220
- return (0, _effects.call)(onError, error);
221
- case 4:
222
- _context3.next = 9;
223
221
  break;
224
- case 6:
225
- _context3.prev = 6;
226
- _context3.t0 = _context3["catch"](0);
227
- console.error(_context3.t0);
228
- case 9:
229
- case "end":
230
- return _context3.stop();
231
- }
222
+ }
223
+ _context3.next = 4;
224
+ return (0, _effects.call)(onError, error);
225
+ case 4:
226
+ _context3.next = 9;
227
+ break;
228
+ case 6:
229
+ _context3.prev = 6;
230
+ _context3.t0 = _context3["catch"](0);
231
+ console.error(_context3.t0);
232
+ case 9:
233
+ case "end":
234
+ return _context3.stop();
232
235
  }
233
236
  }, _callee3, null, [[0, 6]]);
234
237
  })();
@@ -241,33 +244,31 @@ var getPlatformItemSlugs = function getPlatformItemSlugs(platformItem) {
241
244
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee4() {
242
245
  var tree;
243
246
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee4$(_context4) {
244
- while (1) {
245
- switch (_context4.prev = _context4.next) {
246
- case 0:
247
- _context4.prev = 0;
248
- if (!(0, _lodashEs.isFunction)(onSave)) {
249
- _context4.next = 7;
250
- break;
251
- }
252
- _context4.next = 4;
253
- return (0, _effects.select)(function (state) {
254
- return state.getIn(['trees', treeKey, 'tree']);
255
- });
256
- case 4:
257
- tree = _context4.sent;
247
+ while (1) switch (_context4.prev = _context4.next) {
248
+ case 0:
249
+ _context4.prev = 0;
250
+ if (!(0, _lodashEs.isFunction)(onSave)) {
258
251
  _context4.next = 7;
259
- return (0, _effects.call)(onSave, tree, previousTree);
260
- case 7:
261
- _context4.next = 12;
262
252
  break;
263
- case 9:
264
- _context4.prev = 9;
265
- _context4.t0 = _context4["catch"](0);
266
- console.error(_context4.t0);
267
- case 12:
268
- case "end":
269
- return _context4.stop();
270
- }
253
+ }
254
+ _context4.next = 4;
255
+ return (0, _effects.select)(function (state) {
256
+ return state.getIn(['trees', treeKey, 'tree']);
257
+ });
258
+ case 4:
259
+ tree = _context4.sent;
260
+ _context4.next = 7;
261
+ return (0, _effects.call)(onSave, tree, previousTree);
262
+ case 7:
263
+ _context4.next = 12;
264
+ break;
265
+ case 9:
266
+ _context4.prev = 9;
267
+ _context4.t0 = _context4["catch"](0);
268
+ console.error(_context4.t0);
269
+ case 12:
270
+ case "end":
271
+ return _context4.stop();
271
272
  }
272
273
  }, _callee4, null, [[0, 9]]);
273
274
  })();
@@ -5,77 +5,45 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.THROTTLE_ZOOM = exports.THROTTLE_DRAG = exports.NODE_WIDTH = exports.NODE_TOP_BAR_PATH = exports.NODE_STROKE_WIDTH = exports.NODE_START_RADIUS = exports.NODE_RADIUS = exports.NODE_PADDING = exports.NODE_NAME_PADDING = exports.NODE_LEFT_TOP_BAR_PATH = exports.NODE_LEFT_BOTTOM_BAR_PATH = exports.NODE_LEFT_BAR_PATH = exports.NODE_JOIN_JUNCTION_HEIGHT = exports.NODE_JOIN_JUNCTION_CENTER_Y = exports.NODE_HEIGHT = exports.NODE_DECORATION_STROKE_WIDTH = exports.NODE_CORNER_TAB_PATH = exports.NODE_CENTER_Y = exports.NODE_CENTER_X = exports.NODE_BOTTOM_BAR_PATH = exports.NODE_BAR_THICKNESS = exports.NODE_BADGE_OFFSET = exports.NEW_TASK_DY = exports.NEW_TASK_DX = exports.ICON_SIZE = exports.ICON_CENTER = exports.CONNECTOR_TAIL_RADIUS = exports.CONNECTOR_STROKE_WIDTH = exports.CONNECTOR_LABEL_WIDTH = exports.CONNECTOR_LABEL_RADIUS = exports.CONNECTOR_LABEL_PADDING = exports.CONNECTOR_LABEL_HEIGHT = exports.CONNECTOR_LABEL_CENTER_Y = exports.CONNECTOR_LABEL_CENTER_X = exports.CONNECTOR_HEAD_POINTS = exports.CANVAS_ZOOM_MODIFIER = exports.CANVAS_ZOOM_DURATION = exports.CANVAS_SCALE_OPTIONS = void 0;
7
7
  var _immutable = require("immutable");
8
- var CANVAS_SCALE_OPTIONS = _immutable.List.of(0.25, 0.5, 0.75, 1, 1.33);
9
- exports.CANVAS_SCALE_OPTIONS = CANVAS_SCALE_OPTIONS;
10
- var CANVAS_ZOOM_DURATION = 200;
11
- exports.CANVAS_ZOOM_DURATION = CANVAS_ZOOM_DURATION;
12
- var CANVAS_ZOOM_MODIFIER = 2000;
13
- exports.CANVAS_ZOOM_MODIFIER = CANVAS_ZOOM_MODIFIER;
14
- var THROTTLE_DRAG = 16;
15
- exports.THROTTLE_DRAG = THROTTLE_DRAG;
16
- var THROTTLE_ZOOM = 16;
17
- exports.THROTTLE_ZOOM = THROTTLE_ZOOM;
18
- var CONNECTOR_HEAD_POINTS = '-8,0 4,-8 0,0 4,8';
19
- exports.CONNECTOR_HEAD_POINTS = CONNECTOR_HEAD_POINTS;
20
- var CONNECTOR_TAIL_RADIUS = 6;
21
- exports.CONNECTOR_TAIL_RADIUS = CONNECTOR_TAIL_RADIUS;
22
- var CONNECTOR_LABEL_WIDTH = 130;
23
- exports.CONNECTOR_LABEL_WIDTH = CONNECTOR_LABEL_WIDTH;
24
- var CONNECTOR_LABEL_HEIGHT = 18;
25
- exports.CONNECTOR_LABEL_HEIGHT = CONNECTOR_LABEL_HEIGHT;
26
- var CONNECTOR_LABEL_PADDING = 5;
27
- exports.CONNECTOR_LABEL_PADDING = CONNECTOR_LABEL_PADDING;
28
- var CONNECTOR_LABEL_RADIUS = 2;
29
- exports.CONNECTOR_LABEL_RADIUS = CONNECTOR_LABEL_RADIUS;
30
- var CONNECTOR_STROKE_WIDTH = 4;
31
- exports.CONNECTOR_STROKE_WIDTH = CONNECTOR_STROKE_WIDTH;
32
- var ICON_SIZE = 16;
33
- exports.ICON_SIZE = ICON_SIZE;
34
- var NEW_TASK_DX = 350;
35
- exports.NEW_TASK_DX = NEW_TASK_DX;
36
- var NEW_TASK_DY = 75;
37
- exports.NEW_TASK_DY = NEW_TASK_DY;
38
- var NODE_BADGE_OFFSET = 6;
39
- exports.NODE_BADGE_OFFSET = NODE_BADGE_OFFSET;
40
- var NODE_BAR_THICKNESS = 8;
41
- exports.NODE_BAR_THICKNESS = NODE_BAR_THICKNESS;
42
- var NODE_RADIUS = 8;
43
- exports.NODE_RADIUS = NODE_RADIUS;
44
- var NODE_HEIGHT = 45;
45
- exports.NODE_HEIGHT = NODE_HEIGHT;
46
- var NODE_JOIN_JUNCTION_HEIGHT = 45;
47
- exports.NODE_JOIN_JUNCTION_HEIGHT = NODE_JOIN_JUNCTION_HEIGHT;
48
- var NODE_START_RADIUS = 28;
49
- exports.NODE_START_RADIUS = NODE_START_RADIUS;
50
- var NODE_STROKE_WIDTH = 1;
51
- exports.NODE_STROKE_WIDTH = NODE_STROKE_WIDTH;
52
- var NODE_PADDING = 10;
53
- exports.NODE_PADDING = NODE_PADDING;
54
- var NODE_NAME_PADDING = 7.5;
55
- exports.NODE_NAME_PADDING = NODE_NAME_PADDING;
56
- var NODE_WIDTH = 200;
57
- exports.NODE_WIDTH = NODE_WIDTH;
58
- var NODE_DECORATION_STROKE_WIDTH = 1;
8
+ var CANVAS_SCALE_OPTIONS = exports.CANVAS_SCALE_OPTIONS = _immutable.List.of(0.25, 0.5, 0.75, 1, 1.33);
9
+ var CANVAS_ZOOM_DURATION = exports.CANVAS_ZOOM_DURATION = 200;
10
+ var CANVAS_ZOOM_MODIFIER = exports.CANVAS_ZOOM_MODIFIER = 2000;
11
+ var THROTTLE_DRAG = exports.THROTTLE_DRAG = 16;
12
+ var THROTTLE_ZOOM = exports.THROTTLE_ZOOM = 16;
13
+ var CONNECTOR_HEAD_POINTS = exports.CONNECTOR_HEAD_POINTS = '-8,0 4,-8 0,0 4,8';
14
+ var CONNECTOR_TAIL_RADIUS = exports.CONNECTOR_TAIL_RADIUS = 6;
15
+ var CONNECTOR_LABEL_WIDTH = exports.CONNECTOR_LABEL_WIDTH = 130;
16
+ var CONNECTOR_LABEL_HEIGHT = exports.CONNECTOR_LABEL_HEIGHT = 18;
17
+ var CONNECTOR_LABEL_PADDING = exports.CONNECTOR_LABEL_PADDING = 5;
18
+ var CONNECTOR_LABEL_RADIUS = exports.CONNECTOR_LABEL_RADIUS = 2;
19
+ var CONNECTOR_STROKE_WIDTH = exports.CONNECTOR_STROKE_WIDTH = 4;
20
+ var ICON_SIZE = exports.ICON_SIZE = 16;
21
+ var NEW_TASK_DX = exports.NEW_TASK_DX = 350;
22
+ var NEW_TASK_DY = exports.NEW_TASK_DY = 75;
23
+ var NODE_BADGE_OFFSET = exports.NODE_BADGE_OFFSET = 6;
24
+ var NODE_BAR_THICKNESS = exports.NODE_BAR_THICKNESS = 8;
25
+ var NODE_RADIUS = exports.NODE_RADIUS = 8;
26
+ var NODE_HEIGHT = exports.NODE_HEIGHT = 45;
27
+ var NODE_JOIN_JUNCTION_HEIGHT = exports.NODE_JOIN_JUNCTION_HEIGHT = 45;
28
+ var NODE_START_RADIUS = exports.NODE_START_RADIUS = 28;
29
+ var NODE_STROKE_WIDTH = exports.NODE_STROKE_WIDTH = 1;
30
+ var NODE_PADDING = exports.NODE_PADDING = 10;
31
+ var NODE_NAME_PADDING = exports.NODE_NAME_PADDING = 7.5;
32
+ var NODE_WIDTH = exports.NODE_WIDTH = 200;
33
+ var NODE_DECORATION_STROKE_WIDTH = exports.NODE_DECORATION_STROKE_WIDTH = 1;
59
34
 
60
35
  // Derived constants
61
- exports.NODE_DECORATION_STROKE_WIDTH = NODE_DECORATION_STROKE_WIDTH;
62
- var NODE_CENTER_X = NODE_WIDTH / 2;
63
- exports.NODE_CENTER_X = NODE_CENTER_X;
64
- var NODE_CENTER_Y = NODE_HEIGHT / 2;
65
- exports.NODE_CENTER_Y = NODE_CENTER_Y;
66
- var NODE_JOIN_JUNCTION_CENTER_Y = NODE_JOIN_JUNCTION_HEIGHT / 2;
67
- exports.NODE_JOIN_JUNCTION_CENTER_Y = NODE_JOIN_JUNCTION_CENTER_Y;
68
- var ICON_CENTER = ICON_SIZE / 2;
69
- exports.ICON_CENTER = ICON_CENTER;
70
- var CONNECTOR_LABEL_CENTER_X = CONNECTOR_LABEL_WIDTH / 2;
71
- exports.CONNECTOR_LABEL_CENTER_X = CONNECTOR_LABEL_CENTER_X;
72
- var CONNECTOR_LABEL_CENTER_Y = CONNECTOR_LABEL_HEIGHT / 2;
36
+ var NODE_CENTER_X = exports.NODE_CENTER_X = NODE_WIDTH / 2;
37
+ var NODE_CENTER_Y = exports.NODE_CENTER_Y = NODE_HEIGHT / 2;
38
+ var NODE_JOIN_JUNCTION_CENTER_Y = exports.NODE_JOIN_JUNCTION_CENTER_Y = NODE_JOIN_JUNCTION_HEIGHT / 2;
39
+ var ICON_CENTER = exports.ICON_CENTER = ICON_SIZE / 2;
40
+ var CONNECTOR_LABEL_CENTER_X = exports.CONNECTOR_LABEL_CENTER_X = CONNECTOR_LABEL_WIDTH / 2;
41
+ var CONNECTOR_LABEL_CENTER_Y = exports.CONNECTOR_LABEL_CENTER_Y = CONNECTOR_LABEL_HEIGHT / 2;
73
42
 
74
43
  // Node Decorations
75
44
 
76
45
  // compute x, y coordinates for outer boundaries of nodes (which includes the
77
46
  // stroke width)
78
- exports.CONNECTOR_LABEL_CENTER_Y = CONNECTOR_LABEL_CENTER_Y;
79
47
  var MIN = -NODE_STROKE_WIDTH / 2 + NODE_DECORATION_STROKE_WIDTH / 2;
80
48
  var MAX_X = NODE_WIDTH + NODE_STROKE_WIDTH / 2 - NODE_DECORATION_STROKE_WIDTH / 2;
81
49
  var MAX_Y = NODE_HEIGHT + NODE_STROKE_WIDTH / 2 - NODE_DECORATION_STROKE_WIDTH / 2;
@@ -91,15 +59,9 @@ var ARC_DOWN_RIGHT = "".concat(NODE_RADIUS, " ").concat(NODE_RADIUS, " 0 0 1 ")
91
59
  var ARC_UP_RIGHT = " ".concat(NODE_RADIUS, " ").concat(NODE_RADIUS, " 0 0 1 ").concat(NODE_RADIUS, " -").concat(NODE_RADIUS);
92
60
  var ARC_DOWN_LEFT = " ".concat(NODE_RADIUS, " ").concat(NODE_RADIUS, " 0 0 1 -").concat(NODE_RADIUS, " ").concat(NODE_RADIUS);
93
61
  var ARC_UP_LEFT = " ".concat(NODE_RADIUS, " ").concat(NODE_RADIUS, " 0 0 1 -").concat(NODE_RADIUS, " -").concat(NODE_RADIUS);
94
- var NODE_BOTTOM_BAR_PATH = "\n M ".concat(MIN, " ").concat(MAX_Y - NODE_BAR_THICKNESS, "\n h ").concat(OUTER_WIDTH, "\n v ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n a ").concat(ARC_DOWN_LEFT, "\n h -").concat(OUTER_WIDTH - NODE_RADIUS * 2, "\n a ").concat(ARC_UP_LEFT, "\n v -").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n");
95
- exports.NODE_BOTTOM_BAR_PATH = NODE_BOTTOM_BAR_PATH;
96
- var NODE_LEFT_BAR_PATH = "\n M ".concat(MIN + NODE_BAR_THICKNESS, " ").concat(MIN, "\n v ").concat(OUTER_HEIGHT, "\n h -").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n a ").concat(ARC_UP_LEFT, "\n v -").concat(OUTER_HEIGHT - NODE_RADIUS * 2, "\n a ").concat(ARC_UP_RIGHT, "\n h ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n ");
97
- exports.NODE_LEFT_BAR_PATH = NODE_LEFT_BAR_PATH;
98
- var NODE_LEFT_TOP_BAR_PATH = "\n M ".concat(MIN + NODE_BAR_THICKNESS, " ").concat(MIN, "\n v ").concat(OUTER_HEIGHT / 2, "\n h -").concat(NODE_BAR_THICKNESS, "\n v -").concat(OUTER_HEIGHT / 2 - NODE_RADIUS, "\n a ").concat(ARC_UP_RIGHT, "\n h ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n ");
99
- exports.NODE_LEFT_TOP_BAR_PATH = NODE_LEFT_TOP_BAR_PATH;
100
- var NODE_LEFT_BOTTOM_BAR_PATH = "\n M ".concat(MIN + NODE_BAR_THICKNESS, " ").concat(MIN + OUTER_HEIGHT / 2, "\n v ").concat(OUTER_HEIGHT / 2, "\n h -").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n a ").concat(ARC_UP_LEFT, "\n v -").concat(OUTER_HEIGHT / 2 - NODE_RADIUS, "\n h ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n ");
101
- exports.NODE_LEFT_BOTTOM_BAR_PATH = NODE_LEFT_BOTTOM_BAR_PATH;
102
- var NODE_TOP_BAR_PATH = "\n M ".concat(MIN, " ").concat(MIN + NODE_BAR_THICKNESS, "\n v -").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n a ").concat(ARC_UP_RIGHT, "\n h ").concat(OUTER_WIDTH - NODE_RADIUS * 2, "\n a ").concat(ARC_DOWN_RIGHT, "\n v ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n h -").concat(OUTER_WIDTH, "\n");
103
- exports.NODE_TOP_BAR_PATH = NODE_TOP_BAR_PATH;
104
- var NODE_CORNER_TAB_PATH = "\n M ".concat(MAX_X - NODE_BAR_THICKNESS * 3, " ").concat(MIN, "\n h ").concat(NODE_BAR_THICKNESS * 3 - NODE_RADIUS, "\n a ").concat(ARC_DOWN_RIGHT, "\n v ").concat(NODE_BAR_THICKNESS * 3 - NODE_RADIUS, "\n L ").concat(MAX_X - NODE_BAR_THICKNESS * 3, " ").concat(MIN, "\n");
105
- exports.NODE_CORNER_TAB_PATH = NODE_CORNER_TAB_PATH;
62
+ var NODE_BOTTOM_BAR_PATH = exports.NODE_BOTTOM_BAR_PATH = "\n M ".concat(MIN, " ").concat(MAX_Y - NODE_BAR_THICKNESS, "\n h ").concat(OUTER_WIDTH, "\n v ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n a ").concat(ARC_DOWN_LEFT, "\n h -").concat(OUTER_WIDTH - NODE_RADIUS * 2, "\n a ").concat(ARC_UP_LEFT, "\n v -").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n");
63
+ var NODE_LEFT_BAR_PATH = exports.NODE_LEFT_BAR_PATH = "\n M ".concat(MIN + NODE_BAR_THICKNESS, " ").concat(MIN, "\n v ").concat(OUTER_HEIGHT, "\n h -").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n a ").concat(ARC_UP_LEFT, "\n v -").concat(OUTER_HEIGHT - NODE_RADIUS * 2, "\n a ").concat(ARC_UP_RIGHT, "\n h ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n ");
64
+ var NODE_LEFT_TOP_BAR_PATH = exports.NODE_LEFT_TOP_BAR_PATH = "\n M ".concat(MIN + NODE_BAR_THICKNESS, " ").concat(MIN, "\n v ").concat(OUTER_HEIGHT / 2, "\n h -").concat(NODE_BAR_THICKNESS, "\n v -").concat(OUTER_HEIGHT / 2 - NODE_RADIUS, "\n a ").concat(ARC_UP_RIGHT, "\n h ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n ");
65
+ var NODE_LEFT_BOTTOM_BAR_PATH = exports.NODE_LEFT_BOTTOM_BAR_PATH = "\n M ".concat(MIN + NODE_BAR_THICKNESS, " ").concat(MIN + OUTER_HEIGHT / 2, "\n v ").concat(OUTER_HEIGHT / 2, "\n h -").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n a ").concat(ARC_UP_LEFT, "\n v -").concat(OUTER_HEIGHT / 2 - NODE_RADIUS, "\n h ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n ");
66
+ var NODE_TOP_BAR_PATH = exports.NODE_TOP_BAR_PATH = "\n M ".concat(MIN, " ").concat(MIN + NODE_BAR_THICKNESS, "\n v -").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n a ").concat(ARC_UP_RIGHT, "\n h ").concat(OUTER_WIDTH - NODE_RADIUS * 2, "\n a ").concat(ARC_DOWN_RIGHT, "\n v ").concat(NODE_BAR_THICKNESS - NODE_RADIUS, "\n h -").concat(OUTER_WIDTH, "\n");
67
+ var NODE_CORNER_TAB_PATH = exports.NODE_CORNER_TAB_PATH = "\n M ".concat(MAX_X - NODE_BAR_THICKNESS * 3, " ").concat(MIN, "\n h ").concat(NODE_BAR_THICKNESS * 3 - NODE_RADIUS, "\n a ").concat(ARC_DOWN_RIGHT, "\n v ").concat(NODE_BAR_THICKNESS * 3 - NODE_RADIUS, "\n L ").concat(MAX_X - NODE_BAR_THICKNESS * 3, " ").concat(MIN, "\n");