@zohodesk/library-platform 1.0.2-exp.1.1 → 1.0.2-exp.1.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 (81) hide show
  1. package/es/bc/zlist/Constants.js +1 -0
  2. package/es/cc/action-icon/Properties.js +6 -46
  3. package/es/cc/component/properties/slotName.js +1 -0
  4. package/es/cc/fields/coloured-multi-select/Events.js +3 -0
  5. package/es/cc/fields/coloured-multi-select/Model.js +18 -0
  6. package/es/cc/fields/coloured-multi-select/Properties.js +37 -0
  7. package/es/cc/fields/coloured-pick-list/Events.js +3 -0
  8. package/es/cc/fields/coloured-pick-list/Model.js +16 -0
  9. package/es/cc/fields/coloured-pick-list/Properties.js +37 -0
  10. package/es/cc/fields/field/Types.js +2 -0
  11. package/es/cc/fields/index.js +2 -0
  12. package/es/cc/fields/multi-select/Model.js +2 -0
  13. package/es/cc/fields/multi-select/Properties.js +2 -4
  14. package/es/cc/fields/pick-list/Model.js +1 -3
  15. package/es/cc/fields/pick-list/Properties.js +1 -3
  16. package/es/cc/table-column-sort/Constants.js +1 -0
  17. package/es/cc/table-column-sort/Properties.js +30 -0
  18. package/es/cc/table-column-sort/index.js +3 -0
  19. package/es/cc/table-connected/constants/Events.js +2 -0
  20. package/es/cc/table-list/Properties.js +38 -27
  21. package/es/desk-frameworks/table-connected/frameworks/EventHandlersFactory.js +17 -6
  22. package/es/desk-frameworks/table-connected/frameworks/TableConnectedView.js +2 -0
  23. package/es/library/behaviours/table-column-resizer/domain/entities/Constants.js +1 -1
  24. package/es/library/custom-component/domain/entities/DefaultSlotNameAppend.js +10 -0
  25. package/es/library/custom-component/domain/entities/Properties.js +2 -0
  26. package/es/library/custom-component/frameworks/ui/CreateCustomComponent.js +15 -6
  27. package/es/library/custom-component/frameworks/ui/CreateSlotComponent.js +77 -22
  28. package/es/library/custom-component/frameworks/ui/__testcases__/CreateSlotComponent.spec.js +211 -0
  29. package/es/library/dot/components/action-location/frameworks/ui/ActionComponentMapping.js +4 -4
  30. package/es/library/dot/components/table-list/adapters/presenters/TableTranslator.js +4 -9
  31. package/es/library/dot/components/table-list/frameworks/ui/EventHandlersFactory.js +1 -3
  32. package/es/library/dot/components/table-list/frameworks/ui/TableList.js +1 -2
  33. package/es/library/dot/components/table-list/frameworks/ui/TableListView.js +6 -2
  34. package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +3 -0
  35. package/es/library/dot/components/table-list/frameworks/ui/sub-components/ErrorState.js +28 -0
  36. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +3 -10
  37. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/Headers.js +1 -3
  38. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIcon.js +4 -20
  39. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/ActionIconView.js +4 -84
  40. package/es/library/dot/legacy-to-new-arch/table-column-sort/frameworks/ui/TableColumnSort.js +11 -0
  41. package/es/library/dot/legacy-to-new-arch/table-column-sort/frameworks/ui/TableColumnSortView.js +44 -0
  42. package/es/library/dot/legacy-to-new-arch/table-column-sort/frameworks/ui/css/TableColumnSort.module.css +10 -0
  43. package/es/library/dot/legacy-to-new-arch/table-field-components/coloured-multiselect-field/frameworks/ui/ColouredMultiSelectField.js +12 -0
  44. package/es/library/dot/legacy-to-new-arch/table-field-components/coloured-multiselect-field/frameworks/ui/ColouredMultiSelectFieldView.js +23 -0
  45. package/es/library/dot/legacy-to-new-arch/table-field-components/coloured-picklist-field/frameworks/ui/ColouredPickListField.js +14 -0
  46. package/es/library/dot/legacy-to-new-arch/table-field-components/coloured-picklist-field/frameworks/ui/ColouredPickListFieldView.js +33 -0
  47. package/es/library/dot/legacy-to-new-arch/table-field-components/index.js +4 -0
  48. package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +2 -2
  49. package/es/platform/data-source/http-template/getAvailableFields.js +62 -0
  50. package/es/platform/zdata-source/domain/entities/APITemplate.js +3 -2
  51. package/es/platform/zhttp/applications/usecases/FetchUseCase.js +1 -1
  52. package/es/platform/zlist/adapters/controllers/RecordSuccessCallbackController.js +28 -0
  53. package/es/platform/zlist/adapters/controllers/SortController.js +1 -3
  54. package/es/platform/zlist/adapters/gateways/Repository.js +12 -2
  55. package/es/platform/zlist/adapters/gateways/Service.js +4 -0
  56. package/es/platform/zlist/adapters/presenters/Presenters.js +26 -0
  57. package/es/platform/zlist/adapters/presenters/TableTranslator.js +11 -2
  58. package/es/platform/zlist/adapters/presenters/translators/Header.js +28 -3
  59. package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +3 -2
  60. package/es/platform/zlist/adapters/presenters/translators/fields/MultiSelectFieldTranslator.js +28 -8
  61. package/es/platform/zlist/adapters/presenters/translators/fields/PickListFieldTranslator.js +28 -2
  62. package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +54 -0
  63. package/es/platform/zlist/applications/interfaces/output/IPresenter.js +1 -0
  64. package/es/platform/zlist/applications/usecases/AbstractUseCase.js +4 -2
  65. package/es/platform/zlist/applications/usecases/RecordSuccessCallbackUsecase.js +24 -0
  66. package/es/platform/zlist/applications/usecases/SortUseCase.js +9 -3
  67. package/es/platform/zlist/domain/entities/List.js +32 -8
  68. package/es/platform/zlist/domain/entities/SortBy.js +58 -0
  69. package/es/platform/zlist/domain/entities/interfaces/ISortBy.js +1 -0
  70. package/es/platform/zlist/domain/entities/interfaces/ListModel.js +1 -0
  71. package/es/platform/zlist/domain/entities/interfaces/Properties.js +6 -1
  72. package/es/platform/zlist/frameworks/EventHandlersFactory.js +9 -4
  73. package/es/platform/zlist/frameworks/ZListBehaviourFactory.js +7 -1
  74. package/es/platform/zrecord/adapters/controllers/ActionExecutorController.js +2 -1
  75. package/es/platform/zrecord/adapters/controllers/RefetchController.js +2 -1
  76. package/es/platform/zrecord/applications/usecases/ExecuteActionUseCase.js +3 -2
  77. package/es/platform/zrecord/applications/usecases/RefetchUseCase.js +3 -2
  78. package/es/platform/zrecord/domain/entities/RecordsManager.js +4 -3
  79. package/package.json +11 -11
  80. package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderText.js +0 -34
  81. package/es/library/dot/legacy-to-new-arch/action-icon/frameworks/ui/css/ActionIcon.module.css +0 -3
@@ -2,6 +2,7 @@ export const ZLIST_DELETE_RECORDS = 'ZLIST#DELETE_RECORDS';
2
2
  export const ZLIST_DELETE_RECORD = 'ZLIST#DELETE_RECORD';
3
3
  export const ZLIST_RECORD_UPDATE = 'ZLIST#RECORD_UPDATE';
4
4
  export const ZLIST_FETCH_MORE = 'ZLIST#FETCH_MORE';
5
+ export const ZLIST_SORT = 'ZLIST#SORT';
5
6
  export const ZLIST_FETCH_SORTED = 'ZLIST#FETCH_SORTED';
6
7
  export const ZLIST_RECORD_UPDATE_SUCCEEDED = 'ZLIST#RECORD_UPDATE_SUCCEEDED';
7
8
  export const ZLIST_RECORD_UPDATE_FAILED = 'ZLIST#RECORD_UPDATE_FAILED';
@@ -3,7 +3,7 @@ export default {
3
3
  required: true,
4
4
  typeMetadata: {
5
5
  schema: {
6
- type: "string"
6
+ type: 'string'
7
7
  }
8
8
  }
9
9
  },
@@ -11,17 +11,17 @@ export default {
11
11
  required: true,
12
12
  typeMetadata: {
13
13
  schema: {
14
- type: "string"
14
+ type: 'string'
15
15
  }
16
16
  }
17
17
  },
18
18
  hoverVariant: {
19
19
  required: false,
20
- defaultValue: "primary",
20
+ defaultValue: 'primary',
21
21
  typeMetadata: {
22
22
  schema: {
23
- type: "string",
24
- enum: ["primary", "danger"]
23
+ type: 'string',
24
+ enum: ['primary', 'danger']
25
25
  }
26
26
  }
27
27
  },
@@ -30,47 +30,7 @@ export default {
30
30
  defaultValue: false,
31
31
  typeMetadata: {
32
32
  schema: {
33
- type: "boolean"
34
- }
35
- }
36
- },
37
- options: {
38
- // NOTE: This is only a sample for FilterDropdown action component
39
- required: false,
40
- defaultValue: [],
41
- typeMetadata: {
42
- schema: {
43
- type: "array",
44
- items: {
45
- type: "object",
46
- properties: {
47
- label: {
48
- type: "string"
49
- },
50
- value: {
51
- type: "string"
52
- }
53
- }
54
- }
55
- }
56
- }
57
- },
58
- isMultiselectable: {
59
- // NOTE: This is only a sample for FilterDropdown action component
60
- required: false,
61
- defaultValue: false,
62
- typeMetadata: {
63
- schema: {
64
- type: "boolean"
65
- }
66
- }
67
- },
68
- isVisible: {
69
- required: false,
70
- defaultValue: true,
71
- typeMetadata: {
72
- schema: {
73
- type: "boolean"
33
+ type: 'boolean'
74
34
  }
75
35
  }
76
36
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import FieldEvents from "../field/Events";
2
+ const Events = FieldEvents;
3
+ export default Events;
@@ -0,0 +1,18 @@
1
+ function ColouredMultiListFieldModel(_ref) {
2
+ let {
3
+ name,
4
+ value,
5
+ appendToActionPayload,
6
+ options,
7
+ uiType
8
+ } = _ref;
9
+ return {
10
+ name,
11
+ appendToActionPayload,
12
+ type: uiType,
13
+ options,
14
+ value
15
+ };
16
+ }
17
+
18
+ export default ColouredMultiListFieldModel;
@@ -0,0 +1,37 @@
1
+ import FieldProperties from "../field/Properties";
2
+ export default { ...FieldProperties,
3
+ value: {
4
+ required: true,
5
+ defaultValue: [],
6
+ typeMetadata: {
7
+ schema: {
8
+ type: 'array'
9
+ }
10
+ }
11
+ },
12
+ options: {
13
+ required: false,
14
+ defaultValue: [],
15
+ typeMetadata: {
16
+ schema: {
17
+ type: 'array',
18
+ items: {
19
+ type: 'object',
20
+ properties: {
21
+ value: {
22
+ type: 'string'
23
+ },
24
+ colorCode: {
25
+ anyOf: [{
26
+ type: 'string'
27
+ }, {
28
+ type: 'null'
29
+ }]
30
+ }
31
+ },
32
+ required: ['value']
33
+ }
34
+ }
35
+ }
36
+ }
37
+ };
@@ -0,0 +1,3 @@
1
+ import FieldEvents from "../field/Events";
2
+ const Events = FieldEvents;
3
+ export default Events;
@@ -0,0 +1,16 @@
1
+ export default function ColouredPickListFieldModel(_ref) {
2
+ let {
3
+ name,
4
+ value,
5
+ options,
6
+ uiType,
7
+ appendToActionPayload
8
+ } = _ref;
9
+ return {
10
+ name,
11
+ appendToActionPayload,
12
+ type: uiType,
13
+ options,
14
+ value
15
+ };
16
+ }
@@ -0,0 +1,37 @@
1
+ import FieldProperties from "../field/Properties";
2
+ export default { ...FieldProperties,
3
+ value: {
4
+ required: true,
5
+ defaultValue: '',
6
+ typeMetadata: {
7
+ schema: {
8
+ type: 'string'
9
+ }
10
+ }
11
+ },
12
+ options: {
13
+ required: false,
14
+ defaultValue: [],
15
+ typeMetadata: {
16
+ schema: {
17
+ type: 'array',
18
+ items: {
19
+ type: 'object',
20
+ properties: {
21
+ value: {
22
+ type: 'string'
23
+ },
24
+ colorCode: {
25
+ anyOf: [{
26
+ type: 'string'
27
+ }, {
28
+ type: 'null'
29
+ }]
30
+ }
31
+ },
32
+ required: ['value']
33
+ }
34
+ }
35
+ }
36
+ }
37
+ };
@@ -14,6 +14,8 @@ var Types = /*#__PURE__*/function (Types) {
14
14
  Types["DateTimeField"] = "DateTime";
15
15
  Types["NumberField"] = "Number";
16
16
  Types["DecimalField"] = "Decimal";
17
+ Types["ColouredPickListField"] = "ColouredPickList";
18
+ Types["ColouredMultiSelectField"] = "ColouredMultiSelect";
17
19
  Types["MultiSelectField"] = "MultiSelect";
18
20
  return Types;
19
21
  }(Types || {});
@@ -12,6 +12,8 @@ export { default as NumberFieldProperties } from "./number/Properties";
12
12
  export { default as PercentFieldProperties } from "./percent/Properties";
13
13
  export { default as PhoneFieldProperties } from "./phone/Properties";
14
14
  export { default as PickListFieldProperties } from "./pick-list/Properties";
15
+ export { default as ColouredMultiSelectFieldProperties } from "./coloured-multi-select/Properties";
16
+ export { default as ColouredPickListFieldProperties } from "./coloured-pick-list/Properties";
15
17
  export { default as TextFieldProperties } from "./text/Properties";
16
18
  export { default as UrlFieldProperties } from "./url/Properties";
17
19
  export { default as FieldTypes } from "./field/Types";
@@ -3,12 +3,14 @@ function MultiListFieldModel(_ref) {
3
3
  name,
4
4
  value,
5
5
  appendToActionPayload,
6
+ options,
6
7
  uiType
7
8
  } = _ref;
8
9
  return {
9
10
  name,
10
11
  appendToActionPayload,
11
12
  type: uiType,
13
+ options,
12
14
  value
13
15
  };
14
16
  }
@@ -9,12 +9,13 @@ export default { ...FieldProperties,
9
9
  }
10
10
  }
11
11
  },
12
+ // HACK: only present here for compatibility with the PlatformForm code, it is not need for PlatformTable
12
13
  subType: {
13
14
  required: false,
14
15
  typeMetadata: {
15
16
  schema: {
16
17
  type: 'string',
17
- enum: ['plain', 'colored', "Plain", "ColorCoded"]
18
+ enum: ['plain', 'colored', 'Plain', 'ColorCoded']
18
19
  }
19
20
  }
20
21
  },
@@ -29,9 +30,6 @@ export default { ...FieldProperties,
29
30
  properties: {
30
31
  value: {
31
32
  type: 'string'
32
- },
33
- colorCode: {
34
- type: 'string'
35
33
  }
36
34
  },
37
35
  required: ['value']
@@ -3,7 +3,6 @@ export default function PickListFieldModel(_ref) {
3
3
  name,
4
4
  value,
5
5
  options,
6
- subType,
7
6
  uiType,
8
7
  appendToActionPayload
9
8
  } = _ref;
@@ -11,8 +10,7 @@ export default function PickListFieldModel(_ref) {
11
10
  name,
12
11
  appendToActionPayload,
13
12
  type: uiType,
14
- // options,
15
- // subType,
13
+ options,
16
14
  value
17
15
  };
18
16
  }
@@ -9,6 +9,7 @@ export default { ...FieldProperties,
9
9
  }
10
10
  }
11
11
  },
12
+ // HACK: only present here for compatibility with the PlatformForm code, it is not need for PlatformTable
12
13
  subType: {
13
14
  required: false,
14
15
  defaultValue: 'plain',
@@ -30,9 +31,6 @@ export default { ...FieldProperties,
30
31
  properties: {
31
32
  value: {
32
33
  type: 'string'
33
- },
34
- colorCode: {
35
- type: 'string'
36
34
  }
37
35
  },
38
36
  required: ['value']
@@ -0,0 +1 @@
1
+ export const SORT_CLICKED = 'SORT#CLICKED';
@@ -0,0 +1,30 @@
1
+ export default {
2
+ value: {
3
+ defaultValue: 'none',
4
+ required: false,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'string',
8
+ enum: ['none', 'ascending', 'descending']
9
+ }
10
+ }
11
+ },
12
+ ascendingLabel: {
13
+ defaultValue: 'Ascending',
14
+ required: false,
15
+ typeMetadata: {
16
+ schema: {
17
+ type: 'string'
18
+ }
19
+ }
20
+ },
21
+ descendingLabel: {
22
+ defaultValue: 'Descending',
23
+ required: false,
24
+ typeMetadata: {
25
+ schema: {
26
+ type: 'string'
27
+ }
28
+ }
29
+ }
30
+ };
@@ -0,0 +1,3 @@
1
+ export { default as TableColumnSortProperties } from "./Properties";
2
+ import * as _TableColumnSortConstants from "./Constants";
3
+ export { _TableColumnSortConstants as TableColumnSortConstants };
@@ -1,6 +1,8 @@
1
1
  export default {
2
2
  DELETE_RECORDS_SUCCESS: 'SMART_TABLE#RECORD_DELETED',
3
3
  UPDATE_RECORDS_SUCCESS: 'SMART_TABLE#RECORD_UPDATED',
4
+ SORT: 'SMART_TABLE#SORT',
5
+ SORTED: 'SMART_TABLE#SORTED',
4
6
  RECORDS_SELECTED: 'SMART_TABLE#RECORDS_SELECTED',
5
7
  RECORDS_DESELECTED: 'SMART_TABLE#RECORDS_DESELECTED',
6
8
  SELECTION_LIMIT_EXCEEDED: 'SMART_TABLE#SELECTION_LIMIT_EXCEEDED'
@@ -1,5 +1,6 @@
1
- import { Alignment, SortedBy, Width } from "./data-types/Header";
1
+ import { Alignment, Width, SortedBy } from "./data-types/Header";
2
2
  import RowCursor from "./data-types/RowCursor";
3
+ import SelectionConfigProperties from "../../bc/list-selection/Properties";
3
4
  import { actionsSchema } from "../../platform/client-actions/cc/action-event-mediator/Properties";
4
5
  import PropertiesConverter from "../component/properties/PropertiesConverter";
5
6
  import BooleanProperties from "../fields/boolean/Properties";
@@ -26,6 +27,36 @@ const TableListProperties = {
26
27
  },
27
28
  defaultValue: false
28
29
  },
30
+ isError: {
31
+ required: false,
32
+ typeMetadata: {
33
+ schema: {
34
+ type: 'boolean'
35
+ }
36
+ },
37
+ defaultValue: false
38
+ },
39
+ sortBy: {
40
+ required: false,
41
+ typeMetadata: {
42
+ schema: {
43
+ type: 'object',
44
+ properties: {
45
+ order: {
46
+ type: 'string',
47
+ enum: Object.values(SortedBy)
48
+ },
49
+ name: {
50
+ type: 'string'
51
+ },
52
+ id: {
53
+ type: 'string'
54
+ }
55
+ }
56
+ }
57
+ },
58
+ defaultValue: {}
59
+ },
29
60
  resizerState: {
30
61
  required: false,
31
62
  defaultValue: {
@@ -146,15 +177,9 @@ const TableListProperties = {
146
177
  type: 'string',
147
178
  enum: Object.values(Alignment)
148
179
  },
149
- sortable: {
150
- type: 'boolean'
151
- },
152
180
  sortOrder: {
153
181
  type: 'string',
154
182
  enum: Object.values(SortedBy)
155
- },
156
- sortTooltip: {
157
- type: 'string'
158
183
  }
159
184
  },
160
185
  required: ['id', 'name', 'text']
@@ -234,7 +259,11 @@ const TableListProperties = {
234
259
  }
235
260
  },
236
261
  selection: {
237
- required: true,
262
+ required: false,
263
+ defaultValue: {
264
+ selected: [],
265
+ hasAllSelected: false
266
+ },
238
267
  typeMetadata: {
239
268
  schema: {
240
269
  type: 'object',
@@ -253,24 +282,6 @@ const TableListProperties = {
253
282
  }
254
283
  }
255
284
  },
256
- selectionConfig: {
257
- required: true,
258
- typeMetadata: {
259
- schema: {
260
- type: 'object',
261
- properties: {
262
- maxSelectionCount: {
263
- type: 'number'
264
- },
265
- isEnabled: {
266
- type: 'boolean'
267
- },
268
- isSelectAllEnabled: {
269
- type: 'boolean'
270
- }
271
- }
272
- }
273
- }
274
- }
285
+ ...SelectionConfigProperties
275
286
  };
276
287
  export default TableListProperties;
@@ -8,6 +8,7 @@ import ResizeEndController from "../adapters/controllers/ResizeEndController";
8
8
  import { RESIZE_FINISHED } from "../../../bc/table-column-resizer/Constants";
9
9
  import { ResizeFinishController } from "../adapters/controllers/ResizeFinishController";
10
10
  import ScrollController from "../adapters/controllers/ScrollController";
11
+ import { ZLIST_SORT } from "../../../bc/zlist/Constants";
11
12
  const {
12
13
  TABLE_LIST_RESIZE_START_REQUESTED,
13
14
  TABLE_LIST_RESIZE_MOVE_REQUESTED,
@@ -39,33 +40,43 @@ export default class EventHandlersFactory {
39
40
  [RESIZE_FINISHED]: new ResizeFinishController().handle,
40
41
  [TABLE_LIST_RESIZE_START_REQUESTED]: new ResizeStartController().handle,
41
42
  [TABLE_LIST_RESIZE_MOVE_REQUESTED]: new ResizeByMouseController().handle,
43
+ [SmartTableConstants.Events.SORT]: _ref => {
44
+ let {
45
+ action,
46
+ dispatch
47
+ } = _ref;
48
+ return dispatch({
49
+ type: ZLIST_SORT,
50
+ payload: action.payload
51
+ });
52
+ },
42
53
  [TABLE_LIST_RESIZE_END_REQUESTED]: new ResizeEndController().handle,
43
54
  [TABLE_LIST_SCROLLED]: new ScrollController().handle,
44
- [LIST_SELECTION_RECORDS_SELECTED]: _ref => {
55
+ [LIST_SELECTION_RECORDS_SELECTED]: _ref2 => {
45
56
  let {
46
57
  action,
47
58
  dispatch
48
- } = _ref;
59
+ } = _ref2;
49
60
  return dispatch({
50
61
  type: SmartTableConstants.Events.RECORDS_SELECTED,
51
62
  payload: action.payload
52
63
  });
53
64
  },
54
- [LIST_SELECTION_RECORDS_DESELECTED]: _ref2 => {
65
+ [LIST_SELECTION_RECORDS_DESELECTED]: _ref3 => {
55
66
  let {
56
67
  action,
57
68
  dispatch
58
- } = _ref2;
69
+ } = _ref3;
59
70
  return dispatch({
60
71
  type: SmartTableConstants.Events.RECORDS_DESELECTED,
61
72
  payload: action.payload
62
73
  });
63
74
  },
64
- [LIST_SELECTION_SELECTION_LIMIT_EXCEEDED]: _ref3 => {
75
+ [LIST_SELECTION_SELECTION_LIMIT_EXCEEDED]: _ref4 => {
65
76
  let {
66
77
  action,
67
78
  dispatch
68
- } = _ref3;
79
+ } = _ref4;
69
80
  return dispatch({
70
81
  type: SmartTableConstants.Events.SELECTION_LIMIT_EXCEEDED,
71
82
  payload: action.payload
@@ -11,6 +11,7 @@ function View(_ref, ref) {
11
11
  data = [],
12
12
  rowActionsConfig,
13
13
  rowCursor,
14
+ sortBy,
14
15
  selection,
15
16
  properties,
16
17
  emptyStateUiType
@@ -28,6 +29,7 @@ function View(_ref, ref) {
28
29
  return /*#__PURE__*/React.createElement(TableList, {
29
30
  data: data,
30
31
  rowCursor: rowCursor,
32
+ sortBy: sortBy,
31
33
  resizerState: resizerState,
32
34
  getRef: ref,
33
35
  isFlexibleColumns: autoColumnSizing,
@@ -1,3 +1,3 @@
1
- export const TABLE_COLUMN_MINIMUM_WIDTH = 120;
1
+ export const TABLE_COLUMN_MINIMUM_WIDTH = 100;
2
2
  export const TABLE_EDGE_DELTA = 20;
3
3
  export const SCROLL_MOVE_DELTA = 10;
@@ -0,0 +1,10 @@
1
+ export default {
2
+ name: "slotName",
3
+ required: false,
4
+ defaultValue: null,
5
+ typeMetadata: {
6
+ schema: {
7
+ type: 'string'
8
+ }
9
+ }
10
+ };
@@ -3,6 +3,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
3
3
  import Property from "./Property";
4
4
  import defaultAppendToActionPayload from "./DefaultAppendToActionPayload";
5
5
  import getRefPropertySchema from "../../../../cc/component/properties/getRefPropertySchema";
6
+ import defaultSlotNameAppend from "./DefaultSlotNameAppend";
6
7
  export default class Properties {
7
8
  constructor(properties, componentName) {
8
9
  this.componentName = componentName;
@@ -12,6 +13,7 @@ export default class Properties {
12
13
  this.data = properties;
13
14
  this.data.set('appendToActionPayload', new Property(defaultAppendToActionPayload));
14
15
  this.data.set('getRef', new Property(getRefPropertySchema));
16
+ typeof properties.get("slotName") === "undefined" && this.data.set('slotName', new Property(defaultSlotNameAppend));
15
17
  }
16
18
 
17
19
  getAllPropertiesValue() {
@@ -3,10 +3,18 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
3
3
  import React, { forwardRef } from 'react';
4
4
  import DependencyFactory from "./DependencyFactory";
5
5
  import Compare from "./Compare";
6
- import createSlotComponent from "./CreateSlotComponent";
6
+ import { generateSlotChildren } from "./CreateSlotComponent";
7
+
8
+ function discardChildren(props) {
9
+ const newObject = { ...props
10
+ };
11
+ delete newObject.children;
12
+ return newObject;
13
+ }
7
14
  /* eslint-disable max-lines-per-function */
8
15
  // TODO: Refactor this function to reduce the number of lines
9
16
 
17
+
10
18
  const createCustomComponent = input => {
11
19
  class Component extends React.Component {
12
20
  constructor(props) {
@@ -56,7 +64,7 @@ const createCustomComponent = input => {
56
64
  dispatch: dispatch.bind(controller)
57
65
  };
58
66
  this.controller.initialize({ ...input,
59
- newProps: props,
67
+ newProps: discardChildren(props),
60
68
  helpers: this.helpers
61
69
  });
62
70
  let proptypes = input.View.propTypes;
@@ -71,7 +79,7 @@ const createCustomComponent = input => {
71
79
  }
72
80
 
73
81
  shouldComponentUpdate(nextProps, nextState) {
74
- return !Compare.deepEqual(this.props, nextProps) || !Compare.deepEqual(this.state, nextState); // return true;
82
+ return !Compare.deepEqual(discardChildren(this.props), discardChildren(nextProps)) || !Compare.deepEqual(this.state, nextState); // return true;
75
83
  }
76
84
 
77
85
  componentWillUnmount() {
@@ -83,7 +91,7 @@ const createCustomComponent = input => {
83
91
  }
84
92
 
85
93
  componentWillReceiveProps(nextProps, nextContext) {
86
- this.controller.updateProperties(nextProps);
94
+ this.controller.updateProperties(discardChildren(nextProps));
87
95
  }
88
96
 
89
97
  componentDidUpdate() {// this.controller.updateProperties(this.props);
@@ -92,7 +100,8 @@ const createCustomComponent = input => {
92
100
  render() {
93
101
  let View = this.View;
94
102
  let {
95
- slots
103
+ slots,
104
+ children
96
105
  } = this.props;
97
106
 
98
107
  if (this.state.error) {
@@ -118,7 +127,7 @@ const createCustomComponent = input => {
118
127
  },
119
128
  helpers: this.helpers,
120
129
  state: this.state,
121
- children: slots.map(createSlotComponent)
130
+ slotChildren: generateSlotChildren(slots, children)
122
131
  });
123
132
  }
124
133
  }