carbon-addons-iot-react 2.146.2 → 2.146.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.146.3](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.146.2...v2.146.3) (2021-10-01)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **table:** add old size values and add deprecation warning ([11e3bdb](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/11e3bdbaa3743f0e708e8718b75906f1db5779ec))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [2.146.2](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.146.1...v2.146.2) (2021-09-28)
7
18
 
8
19
 
@@ -8,8 +8,8 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
8
8
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
9
9
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
10
10
  import 'core-js/modules/es.array.includes.js';
11
- import 'core-js/modules/es.array.map.js';
12
11
  import 'core-js/modules/es.array.concat.js';
12
+ import 'core-js/modules/es.array.map.js';
13
13
  import 'core-js/modules/es.regexp.exec.js';
14
14
  import 'core-js/modules/es.string.search.js';
15
15
  import 'core-js/modules/es.array.slice.js';
@@ -32,6 +32,7 @@ import { TableContainer, Tag, Table as Table$1 } from 'carbon-components-react';
32
32
  import uniqueId from 'lodash/uniqueId';
33
33
  import classnames from 'classnames';
34
34
  import { useLangDirection } from 'use-lang-direction';
35
+ import warning from 'warning';
35
36
  import { defaultFunction } from '../../utils/componentUtilityFunctions.js';
36
37
  import { settings } from '../../constants/Settings.js';
37
38
  import FilterTags from '../FilterTags/FilterTags.js';
@@ -137,7 +138,11 @@ var propTypes = {
137
138
  }),
138
139
 
139
140
  /** Size prop from Carbon to shrink row height (and header height in some instances) */
140
- size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
141
+ size: function checkProps(props, propName, componentName) {
142
+ if (['compact', 'short', 'normal', 'tall'].includes(props[propName])) {
143
+ warning(false, "The value `".concat(props[propName], "` has been deprecated for the ") + "`".concat(propName, "` prop on the ").concat(componentName, " component. It will be removed in the next major ") + "release. Please use 'xs', 'sm', 'md', 'lg', or 'xl' instead.") ;
144
+ }
145
+ },
141
146
 
142
147
  /** Initial state of the table, should be updated via a local state wrapper component implementation or via a central store/redux see StatefulTable component for an example */
143
148
  view: PropTypes.shape({
@@ -1148,23 +1153,8 @@ Table.__docgenInfo = {
1148
1153
  },
1149
1154
  "size": {
1150
1155
  "type": {
1151
- "name": "enum",
1152
- "value": [{
1153
- "value": "'xs'",
1154
- "computed": false
1155
- }, {
1156
- "value": "'sm'",
1157
- "computed": false
1158
- }, {
1159
- "value": "'md'",
1160
- "computed": false
1161
- }, {
1162
- "value": "'lg'",
1163
- "computed": false
1164
- }, {
1165
- "value": "'xl'",
1166
- "computed": false
1167
- }]
1156
+ "name": "custom",
1157
+ "raw": "function checkProps(props, propName, componentName) {\n if (['compact', 'short', 'normal', 'tall'].includes(props[propName])) {\n warning(\n false,\n `The value \\`${props[propName]}\\` has been deprecated for the ` +\n `\\`${propName}\\` prop on the ${componentName} component. It will be removed in the next major ` +\n `release. Please use 'xs', 'sm', 'md', 'lg', or 'xl' instead.`\n );\n }\n}"
1168
1158
  },
1169
1159
  "required": false,
1170
1160
  "description": "Size prop from Carbon to shrink row height (and header height in some instances)"
@@ -12,8 +12,8 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
12
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
13
13
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
14
14
  require('core-js/modules/es.array.includes.js');
15
- require('core-js/modules/es.array.map.js');
16
15
  require('core-js/modules/es.array.concat.js');
16
+ require('core-js/modules/es.array.map.js');
17
17
  require('core-js/modules/es.regexp.exec.js');
18
18
  require('core-js/modules/es.string.search.js');
19
19
  require('core-js/modules/es.array.slice.js');
@@ -36,6 +36,7 @@ var carbonComponentsReact = require('carbon-components-react');
36
36
  var uniqueId = require('lodash/uniqueId');
37
37
  var classnames = require('classnames');
38
38
  var useLangDirection = require('use-lang-direction');
39
+ var warning = require('warning');
39
40
  var componentUtilityFunctions = require('../../utils/componentUtilityFunctions.js');
40
41
  var Settings = require('../../constants/Settings.js');
41
42
  var FilterTags = require('../FilterTags/FilterTags.js');
@@ -66,6 +67,7 @@ var pick__default = /*#__PURE__*/_interopDefaultLegacy(pick);
66
67
  var useDeepCompareEffect__default = /*#__PURE__*/_interopDefaultLegacy(useDeepCompareEffect);
67
68
  var uniqueId__default = /*#__PURE__*/_interopDefaultLegacy(uniqueId);
68
69
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
70
+ var warning__default = /*#__PURE__*/_interopDefaultLegacy(warning);
69
71
 
70
72
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
71
73
 
@@ -155,7 +157,11 @@ var propTypes = {
155
157
  }),
156
158
 
157
159
  /** Size prop from Carbon to shrink row height (and header height in some instances) */
158
- size: PropTypes__default['default'].oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
160
+ size: function checkProps(props, propName, componentName) {
161
+ if (['compact', 'short', 'normal', 'tall'].includes(props[propName])) {
162
+ warning__default['default'](false, "The value `".concat(props[propName], "` has been deprecated for the ") + "`".concat(propName, "` prop on the ").concat(componentName, " component. It will be removed in the next major ") + "release. Please use 'xs', 'sm', 'md', 'lg', or 'xl' instead.") ;
163
+ }
164
+ },
159
165
 
160
166
  /** Initial state of the table, should be updated via a local state wrapper component implementation or via a central store/redux see StatefulTable component for an example */
161
167
  view: PropTypes__default['default'].shape({
@@ -1166,23 +1172,8 @@ Table.__docgenInfo = {
1166
1172
  },
1167
1173
  "size": {
1168
1174
  "type": {
1169
- "name": "enum",
1170
- "value": [{
1171
- "value": "'xs'",
1172
- "computed": false
1173
- }, {
1174
- "value": "'sm'",
1175
- "computed": false
1176
- }, {
1177
- "value": "'md'",
1178
- "computed": false
1179
- }, {
1180
- "value": "'lg'",
1181
- "computed": false
1182
- }, {
1183
- "value": "'xl'",
1184
- "computed": false
1185
- }]
1175
+ "name": "custom",
1176
+ "raw": "function checkProps(props, propName, componentName) {\n if (['compact', 'short', 'normal', 'tall'].includes(props[propName])) {\n warning(\n false,\n `The value \\`${props[propName]}\\` has been deprecated for the ` +\n `\\`${propName}\\` prop on the ${componentName} component. It will be removed in the next major ` +\n `release. Please use 'xs', 'sm', 'md', 'lg', or 'xl' instead.`\n );\n }\n}"
1186
1177
  },
1187
1178
  "required": false,
1188
1179
  "description": "Size prop from Carbon to shrink row height (and header height in some instances)"
package/package.json CHANGED
@@ -339,10 +339,10 @@
339
339
  "whatwg-fetch": "^3.0.0"
340
340
  },
341
341
  "sideEffects": false,
342
- "version": "2.146.2",
342
+ "version": "2.146.3",
343
343
  "resolutions": {
344
344
  "chokidar": "3.3.1",
345
345
  "react-grid-layout": "1.2.2"
346
346
  },
347
- "gitHead": "804d93bd4eabc184e33e02395856ac6877b34175"
347
+ "gitHead": "534189e6ed827323268c99caa2a0bce56da8d6b5"
348
348
  }
@@ -36045,7 +36045,11 @@
36045
36045
  }),
36046
36046
 
36047
36047
  /** Size prop from Carbon to shrink row height (and header height in some instances) */
36048
- size: PropTypes__default['default'].oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
36048
+ size: function checkProps(props, propName, componentName) {
36049
+ if (['compact', 'short', 'normal', 'tall'].includes(props[propName])) {
36050
+ warning_1(false, "The value `".concat(props[propName], "` has been deprecated for the ") + "`".concat(propName, "` prop on the ").concat(componentName, " component. It will be removed in the next major ") + "release. Please use 'xs', 'sm', 'md', 'lg', or 'xl' instead.") ;
36051
+ }
36052
+ },
36049
36053
 
36050
36054
  /** Initial state of the table, should be updated via a local state wrapper component implementation or via a central store/redux see StatefulTable component for an example */
36051
36055
  view: PropTypes__default['default'].shape({
@@ -37056,23 +37060,8 @@
37056
37060
  },
37057
37061
  "size": {
37058
37062
  "type": {
37059
- "name": "enum",
37060
- "value": [{
37061
- "value": "'xs'",
37062
- "computed": false
37063
- }, {
37064
- "value": "'sm'",
37065
- "computed": false
37066
- }, {
37067
- "value": "'md'",
37068
- "computed": false
37069
- }, {
37070
- "value": "'lg'",
37071
- "computed": false
37072
- }, {
37073
- "value": "'xl'",
37074
- "computed": false
37075
- }]
37063
+ "name": "custom",
37064
+ "raw": "function checkProps(props, propName, componentName) {\n if (['compact', 'short', 'normal', 'tall'].includes(props[propName])) {\n warning(\n false,\n `The value \\`${props[propName]}\\` has been deprecated for the ` +\n `\\`${propName}\\` prop on the ${componentName} component. It will be removed in the next major ` +\n `release. Please use 'xs', 'sm', 'md', 'lg', or 'xl' instead.`\n );\n }\n}"
37076
37065
  },
37077
37066
  "required": false,
37078
37067
  "description": "Size prop from Carbon to shrink row height (and header height in some instances)"