@kineticdata/react 5.0.16 → 5.1.0

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 (88) hide show
  1. package/lib/apis/core/attributeDefinitions.js +3 -2
  2. package/lib/apis/core/authentication.js +13 -5
  3. package/lib/apis/core/backgroundJobs.js +22 -39
  4. package/lib/apis/core/fileResources.js +36 -0
  5. package/lib/apis/core/filestores.js +40 -0
  6. package/lib/apis/core/forms.js +21 -36
  7. package/lib/apis/core/forms.test.js +51 -278
  8. package/lib/apis/core/securityPolicyDefinitions.test.js +4 -4
  9. package/lib/apis/core/submissions.js +46 -30
  10. package/lib/apis/core/webhooks.js +1 -2
  11. package/lib/apis/discussions/index.js +2 -1
  12. package/lib/apis/http.js +28 -13
  13. package/lib/apis/http.test.js +13 -15
  14. package/lib/apis/index.js +2 -0
  15. package/lib/apis/system/index.js +86 -1
  16. package/lib/apis/task/index.js +22 -14
  17. package/lib/components/agent/filestore/FilestoreForm.js +132 -0
  18. package/lib/components/agent/filestore/FilestoreTable.js +53 -0
  19. package/lib/components/common/BridgeSelect.js +2 -1
  20. package/lib/components/common/FormSelect.js +2 -1
  21. package/lib/components/common/Scroller.js +6 -6
  22. package/lib/components/common/TableInput.js +74 -29
  23. package/lib/components/common/TeamSelect.js +2 -1
  24. package/lib/components/common/Typeahead.js +7 -4
  25. package/lib/components/common/UserSelect.js +2 -1
  26. package/lib/components/common/authentication/AuthenticationContainer.js +50 -27
  27. package/lib/components/common/code_input/languageHelpers.test.js +1 -1
  28. package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +1 -1
  29. package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +1 -1
  30. package/lib/components/core/core_form/CoreForm.js +10 -10
  31. package/lib/components/core/field_definition/FieldDefinitionForm.js +130 -0
  32. package/lib/components/core/field_definition/FieldDefinitionTable.js +86 -0
  33. package/lib/components/core/file_resource/FileResourceForm.js +180 -0
  34. package/lib/components/core/file_resource/FileResourceTable.js +71 -0
  35. package/lib/components/core/form/FormForm.js +12 -17
  36. package/lib/components/core/form/FormTable.js +3 -8
  37. package/lib/components/core/i18n/I18n.js +15 -15
  38. package/lib/components/core/index_definition/IndexDefinitionForm.js +32 -19
  39. package/lib/components/core/index_definition/IndexDefinitionTable.js +15 -24
  40. package/lib/components/core/index_job/IndexJobTable.js +12 -9
  41. package/lib/components/core/security_definition/SecurityDefinitionForm.js +1 -1
  42. package/lib/components/core/space/SpaceForm.js +59 -10
  43. package/lib/components/core/submission/DatastoreSubmissionTable.js +31 -1
  44. package/lib/components/core/submission/FormSubmissionFilters.js +378 -0
  45. package/lib/components/core/submission/FormSubmissionTable.js +116 -0
  46. package/lib/components/core/submission/KappSubmissionTable.js +250 -0
  47. package/lib/components/core/submission/SubmissionForm.js +124 -0
  48. package/lib/components/core/submission/SubmissionTable.js +35 -249
  49. package/lib/components/core/submission/helpers.js +95 -0
  50. package/lib/components/core/submission/helpers.test.js +96 -0
  51. package/lib/components/core/translation/ContextTable.js +1 -1
  52. package/lib/components/core/user/UserForm.js +2 -2
  53. package/lib/components/core/webapi/WebApiForm.js +111 -126
  54. package/lib/components/core/webhook/WebhookForm.js +1 -1
  55. package/lib/components/form/Form.helpers.js +1 -1
  56. package/lib/components/form/Form.js +200 -144
  57. package/lib/components/index.js +16 -6
  58. package/lib/components/system/SystemBackgroundTasksTable.js +83 -0
  59. package/lib/components/system/SystemSecurityForm.js +69 -0
  60. package/lib/components/system/helpers.js +20 -6
  61. package/lib/components/system/spaces/SystemSpaceForm.js +44 -16
  62. package/lib/components/system/spaces/SystemTenantForm.js +15 -9
  63. package/lib/components/system/spaces/SystemTenantTable.js +21 -16
  64. package/lib/components/table/Table.js +37 -10
  65. package/lib/components/table/Table.redux.js +228 -57
  66. package/lib/components/table/Table.redux.test.js +73 -2
  67. package/lib/components/task/builder/Connector.js +21 -10
  68. package/lib/components/task/builder/ConnectorForm.js +1 -1
  69. package/lib/components/task/builder/Node.js +10 -3
  70. package/lib/components/task/builder/NodeForm.js +54 -22
  71. package/lib/components/task/builder/NodeParametersForm.js +5 -2
  72. package/lib/components/task/builder/SvgCanvas.js +13 -4
  73. package/lib/components/task/builder/TaskDefinitionConfigForm.js +113 -0
  74. package/lib/components/task/builder/TreeBuilder.js +27 -9
  75. package/lib/components/task/builder/builder.redux.js +159 -52
  76. package/lib/components/task/builder/helpers.js +5 -3
  77. package/lib/components/task/builder/models.js +84 -12
  78. package/lib/components/task/errors/RunErrorTable.js +1 -1
  79. package/lib/components/task/runs/CreateManualTriggerForm.js +15 -24
  80. package/lib/components/task/runs/RunTable.js +5 -3
  81. package/lib/components/task/triggers/TriggerTable.js +3 -2
  82. package/lib/components/task/workflows/WorkflowForm.js +67 -85
  83. package/lib/helpers/index.js +19 -2
  84. package/lib/index.js +1 -0
  85. package/lib/models/discussions.js +18 -2
  86. package/lib/models/index.js +1 -1
  87. package/package.json +3 -3
  88. package/proxyhelper.js +19 -6
@@ -0,0 +1,83 @@
1
+ import { generateTable } from '../table/Table';
2
+ import { fetchSystemBackgroundTasks } from '../../apis';
3
+ import { defineFilter } from '../../helpers';
4
+ import { List } from 'immutable';
5
+ var clientSide = defineFilter(true).startsWith('id', 'id').startsWith('status', 'status').end();
6
+
7
+ var dataSource = function dataSource(_ref) {
8
+ var spaceSlug = _ref.spaceSlug;
9
+ return {
10
+ fn: fetchSystemBackgroundTasks,
11
+ clientSide: clientSide,
12
+ params: function params() {
13
+ return [{
14
+ spaceSlug: spaceSlug
15
+ }];
16
+ },
17
+ transform: function transform(result) {
18
+ return {
19
+ data: result.backgroundTasks
20
+ };
21
+ }
22
+ };
23
+ };
24
+
25
+ var filters = function filters() {
26
+ return function () {
27
+ return [{
28
+ name: 'id',
29
+ label: 'ID',
30
+ type: 'text'
31
+ }, {
32
+ name: 'status',
33
+ label: 'Status',
34
+ type: 'text'
35
+ }];
36
+ };
37
+ };
38
+
39
+ var columns = [{
40
+ value: 'id',
41
+ title: 'ID',
42
+ sortable: false
43
+ }, {
44
+ value: 'createdAt',
45
+ title: 'Created At',
46
+ valueTransform: function valueTransform(_value, row) {
47
+ var createdTransition = row.get('transitions', List()).find(function (t) {
48
+ return t.has('Created');
49
+ });
50
+ return createdTransition ? createdTransition.get('Created') : 'N/A';
51
+ },
52
+ sortable: true
53
+ }, {
54
+ value: 'description',
55
+ title: 'Description',
56
+ sortable: false
57
+ }, {
58
+ value: 'exception',
59
+ title: 'Exception',
60
+ sortable: false
61
+ }, {
62
+ value: 'messages',
63
+ title: 'Messages',
64
+ sortable: false
65
+ }, {
66
+ value: 'Result',
67
+ title: 'Result',
68
+ sortable: false
69
+ }, {
70
+ value: 'status',
71
+ title: 'Status'
72
+ }, {
73
+ value: 'transitions',
74
+ title: 'Transitions',
75
+ sortable: false
76
+ }];
77
+ export var SystemBackgroundTasksTable = generateTable({
78
+ tableOptions: ['spaceSlug'],
79
+ columns: columns,
80
+ filters: filters,
81
+ dataSource: dataSource
82
+ });
83
+ SystemBackgroundTasksTable.displayName = 'SystemBackgroundTasksTable';
@@ -0,0 +1,69 @@
1
+ import { List, fromJS, get } from 'immutable';
2
+ import { generateForm } from '../form/Form';
3
+ import { fetchSystemSecurity, updateSystemSecurity } from '../../apis';
4
+ import { handleFormErrors } from '../form/Form.helpers';
5
+
6
+ var handleSubmit = function handleSubmit() {
7
+ return function (values) {
8
+ return updateSystemSecurity({
9
+ systemSecurity: values.toJS()
10
+ }).then(handleFormErrors());
11
+ };
12
+ };
13
+
14
+ var dataSources = function dataSources() {
15
+ return {
16
+ systemSecurity: {
17
+ fn: fetchSystemSecurity,
18
+ params: [],
19
+ transform: function transform(result) {
20
+ return result.systemSecurity;
21
+ }
22
+ }
23
+ };
24
+ };
25
+
26
+ var fields = function fields() {
27
+ return function (_ref) {
28
+ var systemSecurity = _ref.systemSecurity;
29
+ return systemSecurity && [{
30
+ name: 'allowedSystemIps',
31
+ label: 'Allowed IPs',
32
+ type: 'select',
33
+ options: function options() {
34
+ return fromJS([{
35
+ name: 'description',
36
+ label: 'Description',
37
+ type: 'text'
38
+ }, {
39
+ name: 'value',
40
+ label: 'IP Range',
41
+ type: 'text'
42
+ }]);
43
+ },
44
+ visible: function visible(_ref2) {
45
+ var values = _ref2.values;
46
+ return values.get('allowedSystemIpsEnabled', false);
47
+ },
48
+ initialValue: get(systemSecurity, 'allowedSystemIps', List()),
49
+ serialize: function serialize(_ref3) {
50
+ var values = _ref3.values;
51
+ return values.get('allowedSystemIpsEnabled', false) ? values.get('allowedSystemIps') : [];
52
+ }
53
+ }, {
54
+ name: 'allowedSystemIpsEnabled',
55
+ label: 'Enabled Allowed IP Restrictions?',
56
+ type: 'checkbox',
57
+ initialValue: get(systemSecurity, 'allowedSystemIps', List()).size > 0,
58
+ "transient": true
59
+ }];
60
+ };
61
+ };
62
+
63
+ export var SystemSecurityForm = generateForm({
64
+ formOptions: [],
65
+ dataSources: dataSources,
66
+ fields: fields,
67
+ handleSubmit: handleSubmit
68
+ });
69
+ SystemSecurityForm.displayName = 'SystemSecurityForm';
@@ -145,6 +145,20 @@ export var MSSQL_FIELDS = function MSSQL_FIELDS(adapter, persistedObject, persis
145
145
  visible: trueIfAdapter,
146
146
  initialValue: initialValues('username', '')
147
147
  }].concat(_toConsumableArray(generatePasswordFields('mssql', persistedObject, adapter, defaultAdapter, 'Password', 'password')), [{
148
+ name: 'mssql_windowsauthenabled',
149
+ label: 'Use Windows Authentication (Kerberos)',
150
+ type: 'select',
151
+ required: false,
152
+ visible: trueIfAdapter,
153
+ options: [{
154
+ label: 'True',
155
+ value: 'true'
156
+ }, {
157
+ label: 'False',
158
+ value: 'false'
159
+ }],
160
+ initialValue: initialValues('windowsauthenabled', 'false')
161
+ }, {
148
162
  name: 'mssql_sslEnabled',
149
163
  label: 'Enable SSL',
150
164
  type: 'select',
@@ -180,9 +194,9 @@ export var MSSQL_FIELDS = function MSSQL_FIELDS(adapter, persistedObject, persis
180
194
  required: false,
181
195
  visible: trueIfAdapter,
182
196
  initialValue: initialValues('sslcert', '')
183
- }], _toConsumableArray(generatePasswordFields('mssql', persistedObject, adapter, defaultAdapter, 'Truststore Password', 'ssltruststorepw', function (values) {
197
+ }], _toConsumableArray(generatePasswordFields('mssql', persistedObject, adapter, defaultAdapter, 'Truststore Password', 'trustStorePassword', function (values) {
184
198
  return values.get('mssql_sslrootcert', '') !== '';
185
- })), _toConsumableArray(generatePasswordFields('mssql', persistedObject, adapter, defaultAdapter, 'Keystore Password', 'sslkeystorepw', function (values) {
199
+ })), _toConsumableArray(generatePasswordFields('mssql', persistedObject, adapter, defaultAdapter, 'Keystore Password', 'keyStoreSecret', function (values) {
186
200
  return values.get('mssql_sslcert', '') !== '';
187
201
  })));
188
202
  };
@@ -278,9 +292,9 @@ export var ORACLE_FIELDS = function ORACLE_FIELDS(adapter, persistedObject, pers
278
292
  required: false,
279
293
  visible: trueIfAdapter,
280
294
  initialValue: initialValues('clientCert', '')
281
- }], _toConsumableArray(generatePasswordFields('oracle', persistedObject, adapter, defaultAdapter, 'Truststore Password', 'truststorePassword', function (values) {
295
+ }], _toConsumableArray(generatePasswordFields('oracle', persistedObject, adapter, defaultAdapter, 'Truststore Password', 'trustStorePassword', function (values) {
282
296
  return values.get('oracle_serverCert', '') !== '';
283
- })), _toConsumableArray(generatePasswordFields('oracle', persistedObject, adapter, defaultAdapter, 'Keystore Password', 'keystorePassword', function (values) {
297
+ })), _toConsumableArray(generatePasswordFields('oracle', persistedObject, adapter, defaultAdapter, 'Keystore Password', 'keyStorePassword', function (values) {
284
298
  return values.get('oracle_clientCert', '') !== '';
285
299
  })));
286
300
  };
@@ -382,14 +396,13 @@ export var POSTGRES_FIELDS = function POSTGRES_FIELDS(adapter, persistedObject,
382
396
  };
383
397
  export var adapterProperties = function adapterProperties(values, adapter) {
384
398
  var adapterPrefix = "".concat(adapter, "_");
385
- var properties = values // Remove the other adapters properties.
399
+ return values // Remove the other adapters properties.
386
400
  .filter(function (_v, key) {
387
401
  return key.startsWith(adapterPrefix);
388
402
  }) // Remove the adapter prefix from the property names.
389
403
  .mapKeys(function (key) {
390
404
  return key.replace(adapterPrefix, '');
391
405
  }).toObject();
392
- return properties;
393
406
  };
394
407
  export var propertiesFromAdapters = function propertiesFromAdapters() {
395
408
  var taskDbAdapters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : List();
@@ -450,6 +463,7 @@ export var adapterPropertiesFields = function adapterPropertiesFields(_ref9) {
450
463
  return values.get(formPropertyName(prefix, adapterType)) === property.get('type');
451
464
  },
452
465
  type: property.get('sensitive') ? 'password' : property.has('options') ? 'select' : 'text',
466
+ placeholder: property.get('sensitive') && defaultAdapter.get('adapterClass') === property.get('type') ? '•••••••' : undefined,
453
467
  helpText: property.get('description'),
454
468
  required: function required(_ref11) {
455
469
  var values = _ref11.values;
@@ -1,5 +1,5 @@
1
1
  import { fetchSpace, updateSpace } from '../../../apis';
2
- import { get } from 'immutable';
2
+ import { fromJS, get } from 'immutable';
3
3
  import { generateForm } from '../../form/Form';
4
4
  import { handleFormErrors } from '../../form/Form.helpers';
5
5
 
@@ -10,7 +10,7 @@ var dataSources = function dataSources(_ref) {
10
10
  fn: fetchSpace,
11
11
  params: slug && [{
12
12
  slug: slug,
13
- include: 'details'
13
+ include: 'details,allowedIps'
14
14
  }],
15
15
  transform: function transform(result) {
16
16
  return result.space;
@@ -29,10 +29,9 @@ var handleSubmit = function handleSubmit(_ref2) {
29
29
  };
30
30
  };
31
31
 
32
- var fields = function fields(_ref3) {
33
- var slug = _ref3.slug;
34
- return function (_ref4) {
35
- var space = _ref4.space;
32
+ var fields = function fields() {
33
+ return function (_ref3) {
34
+ var space = _ref3.space;
36
35
  return space && [{
37
36
  name: 'name',
38
37
  label: 'Name',
@@ -52,9 +51,9 @@ var fields = function fields(_ref3) {
52
51
  type: 'checkbox',
53
52
  "transient": true,
54
53
  initialValue: (get(space, 'sharedBundleBase') || '') !== '',
55
- onChange: function onChange(_ref5, _ref6) {
56
- var values = _ref5.values;
57
- var setValue = _ref6.setValue;
54
+ onChange: function onChange(_ref4, _ref5) {
55
+ var values = _ref4.values;
56
+ var setValue = _ref5.setValue;
58
57
 
59
58
  if (values.get('sharedBundleBase') !== '') {
60
59
  setValue('sharedBundleBase', '');
@@ -70,12 +69,12 @@ var fields = function fields(_ref3) {
70
69
  type: 'text',
71
70
  initialValue: get(space, 'sharedBundleBase') || '',
72
71
  helpText: 'Directory used as path prefix for bundles.',
73
- visible: function visible(_ref7) {
74
- var values = _ref7.values;
72
+ visible: function visible(_ref6) {
73
+ var values = _ref6.values;
75
74
  return values.get('sharedBundle');
76
75
  },
77
- required: function required(_ref8) {
78
- var values = _ref8.values;
76
+ required: function required(_ref7) {
77
+ var values = _ref7.values;
79
78
  return values.get('sharedBundle');
80
79
  }
81
80
  }, {
@@ -83,14 +82,43 @@ var fields = function fields(_ref3) {
83
82
  label: 'Bundle Path',
84
83
  type: 'text',
85
84
  initialValue: get(space, 'bundlePath') || '',
86
- visible: function visible(_ref9) {
85
+ visible: function visible(_ref8) {
86
+ var values = _ref8.values;
87
+ return get(values, 'sharedBundle');
88
+ },
89
+ required: function required(_ref9) {
87
90
  var values = _ref9.values;
88
91
  return get(values, 'sharedBundle');
92
+ }
93
+ }, {
94
+ name: 'allowedIps',
95
+ label: 'Allowed IPs',
96
+ type: 'select',
97
+ options: function options() {
98
+ return fromJS([{
99
+ name: 'description',
100
+ label: 'Description',
101
+ type: 'text'
102
+ }, {
103
+ name: 'value',
104
+ label: 'IP Range',
105
+ type: 'text'
106
+ }]);
89
107
  },
90
- required: function required(_ref10) {
108
+ visible: function visible(_ref10) {
91
109
  var values = _ref10.values;
92
- return get(values, 'sharedBundle');
110
+ return values.get('allowedIpsEnabled', false);
111
+ },
112
+ initialValue: get(space, 'allowedIps', []),
113
+ serialize: function serialize(_ref11) {
114
+ var values = _ref11.values;
115
+ return values.get('allowedIpsEnabled', false) ? values.get('allowedIps') : [];
93
116
  }
117
+ }, {
118
+ name: 'allowedIpsEnabled',
119
+ label: 'Enabled Allowed IP Restrictions?',
120
+ type: 'checkbox',
121
+ initialValue: get(space, 'allowedIpsEnabled', false) || false
94
122
  }];
95
123
  };
96
124
  };
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import { get, getIn } from 'immutable';
4
4
  import { generateForm } from '../../form/Form';
5
- import { createTenant, fetchSystemDefaultTaskDbAdapter, fetchTenant, updateTenant } from '../../../apis/system';
5
+ import { createTenant, fetchSystemDefaultTaskDbAdapter, fetchTenant, updateTenant } from '../../../apis';
6
6
  import { slugify } from '../../../helpers';
7
7
  import { VALIDATE_DB_ADAPTERS, ORACLE_FIELDS, MSSQL_FIELDS, POSTGRES_FIELDS, adapterProperties } from '../helpers';
8
8
  import { handleFormErrors } from '../../form/Form.helpers';
@@ -34,26 +34,32 @@ var dataSources = function dataSources(_ref) {
34
34
  var handleSubmit = function handleSubmit(_ref2) {
35
35
  var slug = _ref2.slug;
36
36
  return function (values) {
37
- var tenant = {
37
+ var authenticationSecret = values.get('authenticationSecret') ? {
38
+ authenticationSecret: values.get('authenticationSecret')
39
+ } : {};
40
+ var deployment = slug ? {
41
+ deployment: {
42
+ image: values.get('image'),
43
+ replicas: parseInt(values.get('replicas'))
44
+ }
45
+ } : {};
46
+
47
+ var tenant = _objectSpread(_objectSpread({}, authenticationSecret), {}, {
38
48
  space: {
39
49
  slug: values.get('slug'),
40
50
  name: values.get('name')
41
51
  },
42
52
  task: _objectSpread(_objectSpread({
43
53
  autoCreateDatabase: values.get('task_autoCreateDatabase') ? 'true' : 'false'
44
- }, slug ? {
45
- deployment: {
46
- image: values.get('image'),
47
- replicas: parseInt(values.get('replicas'))
48
- }
49
- } : {}), {}, {
54
+ }, deployment), {}, {
50
55
  databaseAdapter: {
51
56
  type: values.get('task_databaseAdapter_type'),
52
57
  properties: adapterProperties(values, values.get('task_databaseAdapter_type'))
53
58
  }
54
59
  }),
55
60
  users: values.get('users')
56
- };
61
+ });
62
+
57
63
  return slug ? updateTenant({
58
64
  slug: slug,
59
65
  tenant: tenant
@@ -1,5 +1,5 @@
1
1
  import { generateTable } from '../../table/Table';
2
- import { fetchTenants } from '../../../apis/system';
2
+ import { fetchTenants } from '../../../apis';
3
3
  import { defineFilter } from '../../../helpers';
4
4
  var clientSide = defineFilter(true).startsWith('slug', 'slug').startsWith('space.name', 'space.name').end();
5
5
 
@@ -19,15 +19,20 @@ var dataSource = function dataSource() {
19
19
  };
20
20
  };
21
21
 
22
- var filters = [{
23
- name: 'slug',
24
- label: 'Slug',
25
- type: 'text'
26
- }, {
27
- name: 'space.name',
28
- label: 'Name',
29
- type: 'text'
30
- }];
22
+ var filters = function filters() {
23
+ return function () {
24
+ return [{
25
+ name: 'slug',
26
+ label: 'Slug',
27
+ type: 'text'
28
+ }, {
29
+ name: 'space.name',
30
+ label: 'Name',
31
+ type: 'text'
32
+ }];
33
+ };
34
+ };
35
+
31
36
  var columns = [{
32
37
  value: 'slug',
33
38
  title: 'Slug',
@@ -117,18 +122,18 @@ var columns = [{
117
122
  return row.getIn(['space', 'customTranslationContexts']);
118
123
  }
119
124
  }, {
120
- value: 'space.defaultDatastoreFormConfirmationPage',
121
- title: 'Default Datastore Form Confirmation Page',
125
+ value: 'space.defaultFormConfirmationPage',
126
+ title: 'Default Form Confirmation Page',
122
127
  sortable: false,
123
128
  valueTransform: function valueTransform(_value, row) {
124
- return row.getIn(['space', 'defaultDatastoreFormConfirmationPage']);
129
+ return row.getIn(['space', 'defaultFormConfirmationPage']);
125
130
  }
126
131
  }, {
127
- value: 'space.defaultDatastoreFormDisplayPage',
128
- title: 'Default Datastore Form Display Page',
132
+ value: 'space.defaultFormDisplayPage',
133
+ title: 'Default Form Display Page',
129
134
  sortable: false,
130
135
  valueTransform: function valueTransform(_value, row) {
131
- return row.getIn(['space', 'defaultDatastoreFormDisplayPage']);
136
+ return row.getIn(['space', 'defaultFormDisplayPage']);
132
137
  }
133
138
  }, {
134
139
  value: 'space.defaultLocale',
@@ -10,7 +10,7 @@ import { compose, lifecycle } from 'recompose';
10
10
  import { List, Map, mergeDeep } from 'immutable';
11
11
  import { ComponentConfigContext } from '../common/ComponentConfigContext';
12
12
  import { connect, dispatch } from '../../store';
13
- import { configureTable, mountTable, unmountTable, isClientSide, filterFormKey } from './Table.redux';
13
+ import { configureTable, filterFormKey, isClientSide, mountTable, unmountTable } from './Table.redux';
14
14
  import { generateKey } from '../../helpers';
15
15
  import { generateForm } from '../form/Form';
16
16
 
@@ -37,7 +37,8 @@ var TableComponent = function TableComponent(props) {
37
37
  appliedFilters = props.appliedFilters,
38
38
  components = props.components,
39
39
  tableKey = props.tableKey,
40
- _filterFormKey = props.filterFormKey;
40
+ _filterFormKey = props.filterFormKey,
41
+ count = props.count;
41
42
  var table = buildTable(props);
42
43
  var filter = components.FilterForm ? buildFilterForm(props) : buildFilterLayout(props);
43
44
  var pagination = buildPaginationControl(props);
@@ -51,6 +52,7 @@ var TableComponent = function TableComponent(props) {
51
52
  initializing: initializing,
52
53
  loading: loading,
53
54
  rows: rows,
55
+ count: count,
54
56
  error: error
55
57
  });
56
58
  }
@@ -261,8 +263,10 @@ var buildPaginationControl = function buildPaginationControl(props) {
261
263
  pageSize = props.pageSize,
262
264
  pageOffset = props.pageOffset,
263
265
  currentPageToken = props.currentPageToken,
266
+ count = props.count,
264
267
  components = props.components,
265
- loading = props.loading;
268
+ loading = props.loading,
269
+ renderOptions = props.renderOptions;
266
270
  var PaginationControl = components.PaginationControl;
267
271
  var prevPage = hasPrevPage(data, dataSource, tableOptions, pageTokens, pageOffset) ? onPrevPage(tableKey) : null;
268
272
  var nextPage = hasNextPage(data, dataSource, tableOptions, pageOffset, pageSize, currentPageToken, rows) ? onNextPage(tableKey) : null;
@@ -276,9 +280,13 @@ var buildPaginationControl = function buildPaginationControl(props) {
276
280
  filterFormKey: filterFormKey,
277
281
  prevPage: prevPage,
278
282
  nextPage: nextPage,
283
+ gotoPage: onGotoPage(tableKey),
279
284
  loading: loading,
280
285
  startIndex: startIndex,
281
- endIndex: endIndex
286
+ endIndex: endIndex,
287
+ count: count,
288
+ renderOptions: renderOptions,
289
+ tableOptions: tableOptions
282
290
  });
283
291
  };
284
292
 
@@ -332,7 +340,8 @@ export var buildTableHeaderCell = function buildTableHeaderCell(props) {
332
340
  components = props.components,
333
341
  columnComponents = props.columnComponents,
334
342
  renderOptions = props.renderOptions,
335
- tableOptions = props.tableOptions;
343
+ tableOptions = props.tableOptions,
344
+ appliedFilters = props.appliedFilters;
336
345
  var HeaderCell = columnComponents.getIn([column.get('value'), 'HeaderCell'], components.HeaderCell);
337
346
  var sorting = column === props.sortColumn && props.sortDirection;
338
347
  var sortable = props.sortable && column.get('sortable');
@@ -344,7 +353,8 @@ export var buildTableHeaderCell = function buildTableHeaderCell(props) {
344
353
  renderOptions: renderOptions,
345
354
  sorting: sorting,
346
355
  sortable: sortable,
347
- tableOptions: tableOptions
356
+ tableOptions: tableOptions,
357
+ filters: appliedFilters
348
358
  }));
349
359
  };
350
360
  };
@@ -371,7 +381,7 @@ export var buildTableBodyRows = function buildTableBodyRows(props) {
371
381
  tableOptions = props.tableOptions;
372
382
  var BodyRow = components.BodyRow;
373
383
  var EmptyBodyRow = components.EmptyBodyRow;
374
- var tableRows = rows.size > 0 ? rows.map(function (row, index) {
384
+ return rows.size > 0 ? rows.map(function (row, index) {
375
385
  var cells = buildTableBodyCells(props, row, index);
376
386
  return /*#__PURE__*/React.createElement(KeyWrapper, {
377
387
  key: "row-".concat(index)
@@ -392,7 +402,6 @@ export var buildTableBodyRows = function buildTableBodyRows(props) {
392
402
  tableOptions: tableOptions,
393
403
  error: props.error
394
404
  });
395
- return tableRows;
396
405
  };
397
406
  export var buildTableBodyCells = function buildTableBodyCells(props, row, rowIndex) {
398
407
  var tableKey = props.tableKey,
@@ -401,6 +410,7 @@ export var buildTableBodyCells = function buildTableBodyCells(props, row, rowInd
401
410
  columns = props.columns,
402
411
  columnSet = props.columnSet,
403
412
  columnComponents = props.columnComponents,
413
+ appliedFilters = props.appliedFilters,
404
414
  renderOptions = props.renderOptions,
405
415
  tableOptions = props.tableOptions;
406
416
  return fromColumnSet(columns, columnSet).map(function (column, index) {
@@ -416,6 +426,7 @@ export var buildTableBodyCells = function buildTableBodyCells(props, row, rowInd
416
426
  value: value,
417
427
  rows: rows,
418
428
  column: column,
429
+ filters: appliedFilters,
419
430
  renderOptions: renderOptions,
420
431
  tableOptions: tableOptions
421
432
  }));
@@ -485,6 +496,17 @@ var onPrevPage = function onPrevPage(tableKey) {
485
496
  };
486
497
  };
487
498
 
499
+ var onGotoPage = function onGotoPage(tableKey) {
500
+ return function (pageNumber) {
501
+ return function () {
502
+ return dispatch('GOTO_PAGE', {
503
+ tableKey: tableKey,
504
+ pageNumber: pageNumber
505
+ });
506
+ };
507
+ };
508
+ };
509
+
488
510
  var onSortColumn = function onSortColumn(tableKey, column) {
489
511
  return function () {
490
512
  return dispatch('SORT_COLUMN', {
@@ -494,7 +516,7 @@ var onSortColumn = function onSortColumn(tableKey, column) {
494
516
  };
495
517
  };
496
518
 
497
- var mapStateToProps = function mapStateToProps(state) {
519
+ var mapStateToProps = function mapStateToProps() {
498
520
  return function (state, props) {
499
521
  return state.getIn(['tables', props.tableKey], Map()).toObject();
500
522
  };
@@ -563,6 +585,9 @@ export var generateTable = function generateTable(_ref4) {
563
585
  tableKey: tableKey,
564
586
  appliedFilters: values
565
587
  });
588
+ return {
589
+ values: values
590
+ };
566
591
  };
567
592
  }
568
593
  });
@@ -598,13 +623,15 @@ export var generateTable = function generateTable(_ref4) {
598
623
  defaultSortDirection: props.defaultSortDirection,
599
624
  omitHeader: props.omitHeader,
600
625
  includeFooter: props.includeFooter,
626
+ refreshInterval: props.refreshInterval,
601
627
  renderOptions: props.renderOptions,
602
628
  uncontrolled: props.uncontrolled,
603
629
  // For full client-side tables, with no datasource.
604
630
  data: props.data,
605
631
  filterForm: !!filters,
606
632
  initialFilterValues: props.initialFilterValues || {},
607
- onSearch: props.onSearch
633
+ onSearch: props.onSearch,
634
+ onFetch: props.onFetch
608
635
  };
609
636
  return /*#__PURE__*/React.createElement(Table, setProps, props.children);
610
637
  };