carbon-addons-iot-react 2.149.0-next.0 → 2.149.0-next.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 +12 -0
- package/es/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItems/DataSeriesFormContent.js +1 -1
- package/es/components/CardEditor/CardEditForm/CardEditFormItems/TableCardFormItems/TableCardFormContent.js +1 -1
- package/es/components/CardEditor/CardEditForm/CardEditFormItems/ThresholdsFormItem.js +1 -1
- package/es/components/DashboardEditor/editorUtils.js +1 -1
- package/es/components/DateTimePicker/DateTimePicker.js +1 -1
- package/es/components/DateTimePicker/DateTimePickerV2.js +1 -1
- package/es/hooks/useUniqueId.js +1 -1
- package/lib/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItems/DataSeriesFormContent.js +23 -3
- package/lib/components/CardEditor/CardEditForm/CardEditFormItems/TableCardFormItems/TableCardFormContent.js +22 -2
- package/lib/components/CardEditor/CardEditForm/CardEditFormItems/ThresholdsFormItem.js +23 -3
- package/lib/components/DashboardEditor/editorUtils.js +23 -3
- package/lib/components/DateTimePicker/DateTimePicker.js +22 -2
- package/lib/components/DateTimePicker/DateTimePickerV2.js +22 -2
- package/lib/hooks/useUniqueId.js +21 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.149.0-next.1](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.149.0-next.0...v2.149.0-next.1) (2022-02-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **repo:** change uuid imports to use uuid/v4 ([63dffa4](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/63dffa4d8979ea64c67e628d2a98eb8b043f990f))
|
|
12
|
+
* **repo:** use wildcard import for uuid ([1d6c0f9](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/1d6c0f9cd1baad85da8c27aa614bfdf4eda87539))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [2.149.0-next.0](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.148.1-next.2...v2.149.0-next.0) (2022-02-14)
|
|
7
19
|
|
|
8
20
|
|
|
@@ -17,7 +17,7 @@ import 'core-js/modules/es.array.filter.js';
|
|
|
17
17
|
import React__default, { useMemo, useState, useRef, useCallback } from 'react';
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
19
|
import { Edit16, Subtract16 } from '@carbon/icons-react';
|
|
20
|
-
import uuid from 'uuid';
|
|
20
|
+
import * as uuid from 'uuid';
|
|
21
21
|
import hash from 'object-hash';
|
|
22
22
|
import { settings } from '../../../../../constants/Settings.js';
|
|
23
23
|
import { DataItemsPropTypes, handleDataSeriesChange, DATAITEM_COLORS_OPTIONS } from '../../../../DashboardEditor/editorUtils.js';
|
|
@@ -18,7 +18,7 @@ import 'core-js/modules/es.array.concat.js';
|
|
|
18
18
|
import React__default, { useState, useMemo, useCallback } from 'react';
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
20
|
import { Edit16, Subtract16 } from '@carbon/icons-react';
|
|
21
|
-
import uuid from 'uuid';
|
|
21
|
+
import * as uuid from 'uuid';
|
|
22
22
|
import hash from 'object-hash';
|
|
23
23
|
import { settings } from '../../../../../constants/Settings.js';
|
|
24
24
|
import { DataItemsPropTypes, handleDataSeriesChange } from '../../../../DashboardEditor/editorUtils.js';
|
|
@@ -20,7 +20,7 @@ import 'core-js/modules/es.array.filter.js';
|
|
|
20
20
|
import React__default, { useState } from 'react';
|
|
21
21
|
import PropTypes from 'prop-types';
|
|
22
22
|
import { TrashCan32, Add16 } from '@carbon/icons-react';
|
|
23
|
-
import uuid from 'uuid';
|
|
23
|
+
import * as uuid from 'uuid';
|
|
24
24
|
import { red60 } from '@carbon/colors';
|
|
25
25
|
import { Dropdown, TextInput, NumberInput } from 'carbon-components-react';
|
|
26
26
|
import { settings } from '../../../../constants/Settings.js';
|
|
@@ -19,7 +19,7 @@ import 'core-js/modules/es.function.name.js';
|
|
|
19
19
|
import 'core-js/modules/es.array.fill.js';
|
|
20
20
|
import React__default from 'react';
|
|
21
21
|
import PropTypes from 'prop-types';
|
|
22
|
-
import uuid from 'uuid';
|
|
22
|
+
import * as uuid from 'uuid';
|
|
23
23
|
import { purple70, cyan50, teal70, magenta70, red50, red90, green60, blue80, magenta50, purple50, teal50, cyan90, red60, green50, orange40, yellow30, blue60 } from '@carbon/colors';
|
|
24
24
|
import { User24, Location24, Temperature24, Flag24, Tag24, Alarm24, Checkmark24, CheckmarkFilled24, CheckmarkOutline24, Error24, ErrorFilled24, ErrorOutline24, Help24, HelpFilled24, Information24, InformationFilled24, Misuse24, MisuseOutline24, Undefined24, UndefinedFilled24, Unknown24, UnknownFilled24, Warning24, WarningAlt24, WarningAltFilled24, WarningAltInverted24, WarningAltInvertedFilled24, WarningFilled24, WarningSquare24, WarningSquareFilled24 } from '@carbon/icons-react';
|
|
25
25
|
import { DASHBOARD_EDITOR_CARD_TYPES, CARD_SIZES, CARD_TYPES, BAR_CHART_TYPES, BAR_CHART_LAYOUTS } from '../../constants/LayoutConstants.js';
|
|
@@ -22,7 +22,7 @@ import PropTypes from 'prop-types';
|
|
|
22
22
|
import { TooltipDefinition, OrderedList, ListItem, FormGroup, RadioButtonGroup, RadioButton, NumberInput, Select, SelectItem, DatePicker, DatePickerInput, Button } from 'carbon-components-react';
|
|
23
23
|
import { Calendar16 } from '@carbon/icons-react';
|
|
24
24
|
import classnames from 'classnames';
|
|
25
|
-
import uuid from 'uuid';
|
|
25
|
+
import * as uuid from 'uuid';
|
|
26
26
|
import TimePickerSpinner from '../TimePickerSpinner/TimePickerSpinner.js';
|
|
27
27
|
import { settings } from '../../constants/Settings.js';
|
|
28
28
|
import dayjs from '../../utils/dayjs.js';
|
|
@@ -16,7 +16,7 @@ import PropTypes from 'prop-types';
|
|
|
16
16
|
import { TooltipDefinition, OrderedList, ListItem, FormGroup, RadioButtonGroup, RadioButton, NumberInput, Select, SelectItem, DatePicker, DatePickerInput } from 'carbon-components-react';
|
|
17
17
|
import { Calendar16 } from '@carbon/icons-react';
|
|
18
18
|
import classnames from 'classnames';
|
|
19
|
-
import uuid from 'uuid';
|
|
19
|
+
import * as uuid from 'uuid';
|
|
20
20
|
import warning from 'warning';
|
|
21
21
|
import TimePickerSpinner from '../TimePickerSpinner/TimePickerSpinner.js';
|
|
22
22
|
import { settings } from '../../constants/Settings.js';
|
package/es/hooks/useUniqueId.js
CHANGED
|
@@ -36,12 +36,32 @@ var carbonComponentsReact = require('carbon-components-react');
|
|
|
36
36
|
|
|
37
37
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
38
38
|
|
|
39
|
+
function _interopNamespace(e) {
|
|
40
|
+
if (e && e.__esModule) return e;
|
|
41
|
+
var n = Object.create(null);
|
|
42
|
+
if (e) {
|
|
43
|
+
Object.keys(e).forEach(function (k) {
|
|
44
|
+
if (k !== 'default') {
|
|
45
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
46
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () {
|
|
49
|
+
return e[k];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
n['default'] = e;
|
|
56
|
+
return Object.freeze(n);
|
|
57
|
+
}
|
|
58
|
+
|
|
39
59
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
40
60
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
41
61
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
42
62
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
43
63
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
44
|
-
var
|
|
64
|
+
var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
|
|
45
65
|
var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash);
|
|
46
66
|
|
|
47
67
|
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; }
|
|
@@ -299,7 +319,7 @@ var DataSeriesFormItem = function DataSeriesFormItem(_ref2) {
|
|
|
299
319
|
var selectedItems = [].concat(_toConsumableArray__default['default'](dataSection), [_objectSpread(_objectSpread({}, itemWithMetaData && _objectSpread({}, itemWithMetaData)), {}, {
|
|
300
320
|
// create a unique dataSourceId if it's going into attributes
|
|
301
321
|
// if it's going into the groupBy section then just use the dataItem ID
|
|
302
|
-
dataSourceId: (itemWithMetaData === null || itemWithMetaData === void 0 ? void 0 : itemWithMetaData.destination) === 'groupBy' ? selectedItem.id : "".concat(selectedItem.id, "_").concat(
|
|
322
|
+
dataSourceId: (itemWithMetaData === null || itemWithMetaData === void 0 ? void 0 : itemWithMetaData.destination) === 'groupBy' ? selectedItem.id : "".concat(selectedItem.id, "_").concat(uuid__namespace.v4())
|
|
303
323
|
})]); // need to remove the category if the card is a stacked timeseries bar
|
|
304
324
|
|
|
305
325
|
var card = cardConfig.content.type === LayoutConstants.BAR_CHART_TYPES.STACKED && cardConfig.content.timeDataSourceId && selectedItems.length > 1 ? omit(cardConfig, 'content.categoryDataSourceId') : cardConfig;
|
|
@@ -474,7 +494,7 @@ var DataSeriesFormItem = function DataSeriesFormItem(_ref2) {
|
|
|
474
494
|
var newCard = editorUtils.handleDataSeriesChange([_objectSpread(_objectSpread({
|
|
475
495
|
id: selectedItem
|
|
476
496
|
}, itemWithMetaData && _objectSpread({}, itemWithMetaData)), {}, {
|
|
477
|
-
dataSourceId: "".concat(selectedItem, "_").concat(
|
|
497
|
+
dataSourceId: "".concat(selectedItem, "_").concat(uuid__namespace.v4())
|
|
478
498
|
})], cardConfig, setEditDataSeries);
|
|
479
499
|
setSelectedDataItems([selectedItem]);
|
|
480
500
|
|
|
@@ -34,13 +34,33 @@ var carbonComponentsReact = require('carbon-components-react');
|
|
|
34
34
|
|
|
35
35
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
36
36
|
|
|
37
|
+
function _interopNamespace(e) {
|
|
38
|
+
if (e && e.__esModule) return e;
|
|
39
|
+
var n = Object.create(null);
|
|
40
|
+
if (e) {
|
|
41
|
+
Object.keys(e).forEach(function (k) {
|
|
42
|
+
if (k !== 'default') {
|
|
43
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
44
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return e[k];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
n['default'] = e;
|
|
54
|
+
return Object.freeze(n);
|
|
55
|
+
}
|
|
56
|
+
|
|
37
57
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
38
58
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
39
59
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
40
60
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
41
61
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
42
62
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
43
|
-
var
|
|
63
|
+
var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
|
|
44
64
|
var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash);
|
|
45
65
|
|
|
46
66
|
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; }
|
|
@@ -231,7 +251,7 @@ var TableCardFormContent = function TableCardFormContent(_ref) {
|
|
|
231
251
|
var selectedItems = [].concat(_toConsumableArray__default['default'](dataSection), [_objectSpread(_objectSpread({}, itemWithMetaData && _objectSpread({}, itemWithMetaData)), {}, {
|
|
232
252
|
// create a unique dataSourceId if it's going into the attributes section
|
|
233
253
|
// if it's going into the groupBy section, then just use the dataItemId
|
|
234
|
-
dataSourceId: (itemWithMetaData === null || itemWithMetaData === void 0 ? void 0 : itemWithMetaData.destination) === 'groupBy' ? selectedItem.id : "".concat(selectedItem.id, "_").concat(
|
|
254
|
+
dataSourceId: (itemWithMetaData === null || itemWithMetaData === void 0 ? void 0 : itemWithMetaData.destination) === 'groupBy' ? selectedItem.id : "".concat(selectedItem.id, "_").concat(uuid__namespace.v4())
|
|
235
255
|
})]);
|
|
236
256
|
var newCard = editorUtils.handleDataSeriesChange(selectedItems, cardConfig, null, null);
|
|
237
257
|
setSelectedDataItems(selectedItems.map(function (_ref4) {
|
|
@@ -34,12 +34,32 @@ var SharedPropTypes = require('../../../../constants/SharedPropTypes.js');
|
|
|
34
34
|
|
|
35
35
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
36
36
|
|
|
37
|
+
function _interopNamespace(e) {
|
|
38
|
+
if (e && e.__esModule) return e;
|
|
39
|
+
var n = Object.create(null);
|
|
40
|
+
if (e) {
|
|
41
|
+
Object.keys(e).forEach(function (k) {
|
|
42
|
+
if (k !== 'default') {
|
|
43
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
44
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () {
|
|
47
|
+
return e[k];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
n['default'] = e;
|
|
54
|
+
return Object.freeze(n);
|
|
55
|
+
}
|
|
56
|
+
|
|
37
57
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
38
58
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
39
59
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
40
60
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
41
61
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
42
|
-
var
|
|
62
|
+
var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
|
|
43
63
|
|
|
44
64
|
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; }
|
|
45
65
|
|
|
@@ -145,7 +165,7 @@ var ThresholdsFormItem = function ThresholdsFormItem(_ref) {
|
|
|
145
165
|
|
|
146
166
|
var _useState = React.useState(thresholdsProp.map(function (threshold) {
|
|
147
167
|
return _objectSpread(_objectSpread({}, threshold), {}, {
|
|
148
|
-
id:
|
|
168
|
+
id: uuid__namespace.v4()
|
|
149
169
|
});
|
|
150
170
|
})),
|
|
151
171
|
_useState2 = _slicedToArray__default['default'](_useState, 2),
|
|
@@ -341,7 +361,7 @@ var ThresholdsFormItem = function ThresholdsFormItem(_ref) {
|
|
|
341
361
|
}
|
|
342
362
|
|
|
343
363
|
setThresholds([].concat(_toConsumableArray__default['default'](thresholds), [_objectSpread({
|
|
344
|
-
id:
|
|
364
|
+
id: uuid__namespace.v4()
|
|
345
365
|
}, newThreshold)]));
|
|
346
366
|
|
|
347
367
|
_onChange([].concat(_toConsumableArray__default['default'](thresholds), [newThreshold]));
|
|
@@ -30,11 +30,31 @@ var LayoutConstants = require('../../constants/LayoutConstants.js');
|
|
|
30
30
|
|
|
31
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
32
32
|
|
|
33
|
+
function _interopNamespace(e) {
|
|
34
|
+
if (e && e.__esModule) return e;
|
|
35
|
+
var n = Object.create(null);
|
|
36
|
+
if (e) {
|
|
37
|
+
Object.keys(e).forEach(function (k) {
|
|
38
|
+
if (k !== 'default') {
|
|
39
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
40
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () {
|
|
43
|
+
return e[k];
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
n['default'] = e;
|
|
50
|
+
return Object.freeze(n);
|
|
51
|
+
}
|
|
52
|
+
|
|
33
53
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
34
54
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
35
55
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
36
56
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
37
|
-
var
|
|
57
|
+
var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
|
|
38
58
|
|
|
39
59
|
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; }
|
|
40
60
|
|
|
@@ -87,7 +107,7 @@ var DataItemsPropTypes = PropTypes__default['default'].arrayOf(PropTypes__defaul
|
|
|
87
107
|
|
|
88
108
|
var getDuplicateCard = function getDuplicateCard(cardConfig) {
|
|
89
109
|
return _objectSpread(_objectSpread({}, cardConfig), {}, {
|
|
90
|
-
id:
|
|
110
|
+
id: uuid__namespace.v4()
|
|
91
111
|
});
|
|
92
112
|
};
|
|
93
113
|
/**
|
|
@@ -102,7 +122,7 @@ var getDefaultCard = function getDefaultCard(type, i18n) {
|
|
|
102
122
|
var defaultSizeForType = (_defaultSizeForType = {}, _defineProperty__default['default'](_defaultSizeForType, LayoutConstants.DASHBOARD_EDITOR_CARD_TYPES.VALUE, LayoutConstants.CARD_SIZES.SMALL), _defineProperty__default['default'](_defaultSizeForType, LayoutConstants.DASHBOARD_EDITOR_CARD_TYPES.SIMPLE_BAR, LayoutConstants.CARD_SIZES.MEDIUM), _defineProperty__default['default'](_defaultSizeForType, LayoutConstants.DASHBOARD_EDITOR_CARD_TYPES.GROUPED_BAR, LayoutConstants.CARD_SIZES.MEDIUM), _defineProperty__default['default'](_defaultSizeForType, LayoutConstants.DASHBOARD_EDITOR_CARD_TYPES.STACKED_BAR, LayoutConstants.CARD_SIZES.MEDIUM), _defineProperty__default['default'](_defaultSizeForType, LayoutConstants.DASHBOARD_EDITOR_CARD_TYPES.TIMESERIES, LayoutConstants.CARD_SIZES.MEDIUM), _defineProperty__default['default'](_defaultSizeForType, LayoutConstants.DASHBOARD_EDITOR_CARD_TYPES.IMAGE, LayoutConstants.CARD_SIZES.MEDIUM), _defineProperty__default['default'](_defaultSizeForType, LayoutConstants.DASHBOARD_EDITOR_CARD_TYPES.TABLE, LayoutConstants.CARD_SIZES.LARGE), _defaultSizeForType);
|
|
103
123
|
|
|
104
124
|
var baseCardProps = _objectSpread({
|
|
105
|
-
id:
|
|
125
|
+
id: uuid__namespace.v4(),
|
|
106
126
|
title: i18n.defaultCardTitle,
|
|
107
127
|
size: (_defaultSizeForType$t = defaultSizeForType[type]) !== null && _defaultSizeForType$t !== void 0 ? _defaultSizeForType$t : LayoutConstants.CARD_SIZES.MEDIUM
|
|
108
128
|
}, type.includes(LayoutConstants.CARD_TYPES.BAR) ? {
|
|
@@ -36,6 +36,26 @@ var dateTimePickerUtils = require('./dateTimePickerUtils.js');
|
|
|
36
36
|
|
|
37
37
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
38
38
|
|
|
39
|
+
function _interopNamespace(e) {
|
|
40
|
+
if (e && e.__esModule) return e;
|
|
41
|
+
var n = Object.create(null);
|
|
42
|
+
if (e) {
|
|
43
|
+
Object.keys(e).forEach(function (k) {
|
|
44
|
+
if (k !== 'default') {
|
|
45
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
46
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () {
|
|
49
|
+
return e[k];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
n['default'] = e;
|
|
56
|
+
return Object.freeze(n);
|
|
57
|
+
}
|
|
58
|
+
|
|
39
59
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
40
60
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
41
61
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
@@ -43,7 +63,7 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_obje
|
|
|
43
63
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
44
64
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
45
65
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
46
|
-
var
|
|
66
|
+
var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
|
|
47
67
|
|
|
48
68
|
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; }
|
|
49
69
|
|
|
@@ -295,7 +315,7 @@ var DateTimePicker = function DateTimePicker(_ref) {
|
|
|
295
315
|
light = _ref.light,
|
|
296
316
|
locale = _ref.locale,
|
|
297
317
|
_ref$id = _ref.id,
|
|
298
|
-
id = _ref$id === void 0 ?
|
|
318
|
+
id = _ref$id === void 0 ? uuid__namespace.v4() : _ref$id,
|
|
299
319
|
others = _objectWithoutProperties__default['default'](_ref, ["testId", "defaultValue", "dateTimeMask", "presets", "intervals", "relatives", "expanded", "disabled", "showRelativeOption", "showCustomRangeLink", "hasTimeInput", "renderPresetTooltipText", "onCancel", "onApply", "i18n", "light", "locale", "id"]);
|
|
300
320
|
|
|
301
321
|
var strings = _objectSpread(_objectSpread({}, defaultProps.i18n), i18n); // initialize the dayjs locale
|
|
@@ -32,6 +32,26 @@ var dateTimePickerUtils = require('./dateTimePickerUtils.js');
|
|
|
32
32
|
|
|
33
33
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
34
34
|
|
|
35
|
+
function _interopNamespace(e) {
|
|
36
|
+
if (e && e.__esModule) return e;
|
|
37
|
+
var n = Object.create(null);
|
|
38
|
+
if (e) {
|
|
39
|
+
Object.keys(e).forEach(function (k) {
|
|
40
|
+
if (k !== 'default') {
|
|
41
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
42
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return e[k];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
n['default'] = e;
|
|
52
|
+
return Object.freeze(n);
|
|
53
|
+
}
|
|
54
|
+
|
|
35
55
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
36
56
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
37
57
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
@@ -39,7 +59,7 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_obje
|
|
|
39
59
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
40
60
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
41
61
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
42
|
-
var
|
|
62
|
+
var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
|
|
43
63
|
var warning__default = /*#__PURE__*/_interopDefaultLegacy(warning);
|
|
44
64
|
|
|
45
65
|
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; }
|
|
@@ -263,7 +283,7 @@ var DateTimePicker = function DateTimePicker(_ref) {
|
|
|
263
283
|
light = _ref.light,
|
|
264
284
|
locale = _ref.locale,
|
|
265
285
|
_ref$id = _ref.id,
|
|
266
|
-
id = _ref$id === void 0 ?
|
|
286
|
+
id = _ref$id === void 0 ? uuid__namespace.v4() : _ref$id,
|
|
267
287
|
hasIconOnly = _ref.hasIconOnly,
|
|
268
288
|
others = _objectWithoutProperties__default['default'](_ref, ["testId", "defaultValue", "dateTimeMask", "presets", "intervals", "relatives", "expanded", "disabled", "showRelativeOption", "showCustomRangeLink", "hasTimeInput", "renderPresetTooltipText", "onCancel", "onApply", "i18n", "light", "locale", "id", "hasIconOnly"]);
|
|
269
289
|
|
package/lib/hooks/useUniqueId.js
CHANGED
|
@@ -5,12 +5,30 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var uuid = require('uuid');
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () {
|
|
18
|
+
return e[k];
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n['default'] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
9
27
|
|
|
10
|
-
var
|
|
28
|
+
var uuid__namespace = /*#__PURE__*/_interopNamespace(uuid);
|
|
11
29
|
|
|
12
30
|
var getUniqueId = function getUniqueId() {
|
|
13
|
-
return
|
|
31
|
+
return uuid__namespace.v4();
|
|
14
32
|
};
|
|
15
33
|
|
|
16
34
|
function useUniqueId() {
|
package/package.json
CHANGED
|
@@ -339,10 +339,10 @@
|
|
|
339
339
|
"whatwg-fetch": "^3.0.0"
|
|
340
340
|
},
|
|
341
341
|
"sideEffects": false,
|
|
342
|
-
"version": "2.149.0-next.
|
|
342
|
+
"version": "2.149.0-next.1",
|
|
343
343
|
"resolutions": {
|
|
344
344
|
"chokidar": "3.3.1",
|
|
345
345
|
"react-grid-layout": "1.2.2"
|
|
346
346
|
},
|
|
347
|
-
"gitHead": "
|
|
347
|
+
"gitHead": "87ee6ff0451d824ecda49936fec3b94fab26bab9"
|
|
348
348
|
}
|