@k-int/stripes-kint-components 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 2.3.1 2022-03-28
2
+ * Custom Property component fixes
3
+
1
4
  ## 2.3.0 2022-03-25
2
5
  * FormModal
3
6
  * Ability to override labels for "save" and "cancel"
@@ -55,7 +55,8 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
55
55
  var CustomPropertiesFilterField = function CustomPropertiesFilterField(_ref) {
56
56
  var _labelOverrides$custo, _customProperties$fin, _customProperties$fin2, _fields$value$index2;
57
57
 
58
- var customProperties = _ref.customProperties,
58
+ var _ref$customProperties = _ref.customProperties,
59
+ customProperties = _ref$customProperties === void 0 ? [] : _ref$customProperties,
59
60
  fields = _ref.fields,
60
61
  index = _ref.index,
61
62
  _ref$labelOverrides = _ref.labelOverrides,
@@ -44,7 +44,8 @@ var CustomPropertiesViewCtx = function CustomPropertiesViewCtx(_ref) {
44
44
  var _custprops$filter$len, _custprops$filter, _Object$entries$filte, _Object$entries, _Object$entries$filte2;
45
45
 
46
46
  var ctx = _ref.ctx,
47
- customProperties = _ref.customProperties,
47
+ _ref$customProperties = _ref.customProperties,
48
+ customProperties = _ref$customProperties === void 0 ? [] : _ref$customProperties,
48
49
  customPropertiesEndpoint = _ref.customPropertiesEndpoint,
49
50
  id = _ref.id,
50
51
  labelOverrides = _ref.labelOverrides;
@@ -32,7 +32,8 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
32
32
  return a;
33
33
  };
34
34
 
35
- var groupCustomPropertiesByCtx = function groupCustomPropertiesByCtx(customProperties) {
35
+ var groupCustomPropertiesByCtx = function groupCustomPropertiesByCtx() {
36
+ var customProperties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
36
37
  return customProperties.reduce(function (acc, curr) {
37
38
  var _curr$ctx, _acc$ctx;
38
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k-int/stripes-kint-components",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Stripes Component library for K-Int specific applications",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -19,7 +19,7 @@ import { required as requiredValidator } from '../../utils/validators';
19
19
  import CustomPropertiesRule from './CustomPropertiesRule';
20
20
 
21
21
  const CustomPropertiesFilterField = ({
22
- customProperties,
22
+ customProperties = [],
23
23
  fields,
24
24
  index,
25
25
  labelOverrides = {},
@@ -8,7 +8,7 @@ import CustomPropertyCard from './CustomPropertyCard';
8
8
 
9
9
  const CustomPropertiesViewCtx = ({
10
10
  ctx,
11
- customProperties,
11
+ customProperties = [],
12
12
  customPropertiesEndpoint,
13
13
  id,
14
14
  labelOverrides
@@ -1,4 +1,4 @@
1
- const groupCustomPropertiesByCtx = (customProperties) => (
1
+ const groupCustomPropertiesByCtx = (customProperties = []) => (
2
2
  customProperties.reduce((acc, curr) => {
3
3
  const ctx = curr.ctx ?? 'isNull';
4
4
  const returnObj = {