carbon-addons-iot-react 4.1.0 → 4.1.2
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.
|
@@ -370,6 +370,7 @@ var CardEditor = function CardEditor(_ref) {
|
|
|
370
370
|
initialValue: modalJsonData,
|
|
371
371
|
i18n: _pick(mergedI18n, 'errorTitle', 'modalTitle', 'modalLabel', 'modalHelpText', 'modalIconDescription', 'copyBtnDescription', 'copyBtnFeedBack', 'expandBtnLabel', 'modalPrimaryButtonLabel', 'modalSecondaryButtonLabel')
|
|
372
372
|
}) : null, /*#__PURE__*/React__default.createElement(CardEditForm, {
|
|
373
|
+
key: cardConfig.id,
|
|
373
374
|
cardConfig: finalCardToEdit,
|
|
374
375
|
isSummaryDashboard: isSummaryDashboard,
|
|
375
376
|
onChange: onChange,
|
|
@@ -8,6 +8,7 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import React__default, { useEffect, useState, useRef, useLayoutEffect, Fragment } from 'react';
|
|
9
9
|
import classnames from 'classnames';
|
|
10
10
|
import warning from 'warning';
|
|
11
|
+
import { v4 } from 'uuid';
|
|
11
12
|
import { settings } from '../../constants/Settings.js';
|
|
12
13
|
import { scrollErrorIntoView } from '../../utils/componentUtilityFunctions.js';
|
|
13
14
|
import Button from '../Button/Button.js';
|
|
@@ -218,6 +219,9 @@ var ComposedModal = function ComposedModal(_ref) {
|
|
|
218
219
|
maxHeight: "calc(100vh - ".concat(modalExtrasHeight, "px)")
|
|
219
220
|
}
|
|
220
221
|
}, children) : null, error ? /*#__PURE__*/React__default.createElement(InlineNotification, {
|
|
222
|
+
key: v4() // regenerate the inline notification after they click on close button
|
|
223
|
+
,
|
|
224
|
+
lowContrast: true,
|
|
221
225
|
title: error,
|
|
222
226
|
subtitle: "",
|
|
223
227
|
kind: "error",
|
|
@@ -383,6 +383,7 @@ var CardEditor = function CardEditor(_ref) {
|
|
|
383
383
|
initialValue: modalJsonData,
|
|
384
384
|
i18n: pick(mergedI18n, 'errorTitle', 'modalTitle', 'modalLabel', 'modalHelpText', 'modalIconDescription', 'copyBtnDescription', 'copyBtnFeedBack', 'expandBtnLabel', 'modalPrimaryButtonLabel', 'modalSecondaryButtonLabel')
|
|
385
385
|
}) : null, /*#__PURE__*/React__default.default.createElement(CardEditForm, {
|
|
386
|
+
key: cardConfig.id,
|
|
386
387
|
cardConfig: finalCardToEdit,
|
|
387
388
|
isSummaryDashboard: isSummaryDashboard,
|
|
388
389
|
onChange: onChange,
|
|
@@ -12,6 +12,7 @@ var PropTypes = require('prop-types');
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var classnames = require('classnames');
|
|
14
14
|
var warning = require('warning');
|
|
15
|
+
var uuid = require('uuid');
|
|
15
16
|
var Settings = require('../../constants/Settings.js');
|
|
16
17
|
var componentUtilityFunctions = require('../../utils/componentUtilityFunctions.js');
|
|
17
18
|
var Button = require('../Button/Button.js');
|
|
@@ -233,6 +234,9 @@ var ComposedModal = function ComposedModal(_ref) {
|
|
|
233
234
|
maxHeight: "calc(100vh - ".concat(modalExtrasHeight, "px)")
|
|
234
235
|
}
|
|
235
236
|
}, children) : null, error ? /*#__PURE__*/React__default.default.createElement(react.InlineNotification, {
|
|
237
|
+
key: uuid.v4() // regenerate the inline notification after they click on close button
|
|
238
|
+
,
|
|
239
|
+
lowContrast: true,
|
|
236
240
|
title: error,
|
|
237
241
|
subtitle: "",
|
|
238
242
|
kind: "error",
|
package/package.json
CHANGED
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
},
|
|
173
173
|
"dependencies": {
|
|
174
174
|
"@babel/plugin-transform-optional-chaining": "^7.24.7",
|
|
175
|
-
"@babel/runtime": "^7.
|
|
175
|
+
"@babel/runtime": "^7.26.9",
|
|
176
176
|
"@carbon/charts": "1.22.0",
|
|
177
177
|
"@carbon/charts-react": "1.22.0",
|
|
178
178
|
"@carbon/colors": "^11.28.0",
|
|
@@ -345,11 +345,11 @@
|
|
|
345
345
|
"whatwg-fetch": "^3.0.0"
|
|
346
346
|
},
|
|
347
347
|
"sideEffects": false,
|
|
348
|
-
"version": "4.1.
|
|
348
|
+
"version": "4.1.2",
|
|
349
349
|
"resolutions": {
|
|
350
350
|
"chokidar": "3.3.1",
|
|
351
351
|
"react-grid-layout": "1.2.2",
|
|
352
352
|
"got": "11.8.5"
|
|
353
353
|
},
|
|
354
|
-
"gitHead": "
|
|
354
|
+
"gitHead": "e7c364e3b5f3879306a65c194058c0bbfc2edb46"
|
|
355
355
|
}
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
if (null == r) return {};
|
|
260
260
|
var t = {};
|
|
261
261
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
262
|
-
if (e.
|
|
262
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
263
263
|
t[n] = r[n];
|
|
264
264
|
}
|
|
265
265
|
return t;
|
|
@@ -271,8 +271,8 @@
|
|
|
271
271
|
r,
|
|
272
272
|
i = _objectWithoutPropertiesLoose$3(e, t);
|
|
273
273
|
if (Object.getOwnPropertySymbols) {
|
|
274
|
-
var
|
|
275
|
-
for (r = 0; r <
|
|
274
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
275
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
276
276
|
}
|
|
277
277
|
return i;
|
|
278
278
|
}
|
|
@@ -13793,6 +13793,71 @@
|
|
|
13793
13793
|
};
|
|
13794
13794
|
var BreadCrumb = Breadcrumb;
|
|
13795
13795
|
|
|
13796
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
13797
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
13798
|
+
// generators (like Math.random()).
|
|
13799
|
+
let getRandomValues;
|
|
13800
|
+
const rnds8 = new Uint8Array(16);
|
|
13801
|
+
function rng() {
|
|
13802
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
13803
|
+
if (!getRandomValues) {
|
|
13804
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
13805
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
13806
|
+
|
|
13807
|
+
if (!getRandomValues) {
|
|
13808
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
13809
|
+
}
|
|
13810
|
+
}
|
|
13811
|
+
|
|
13812
|
+
return getRandomValues(rnds8);
|
|
13813
|
+
}
|
|
13814
|
+
|
|
13815
|
+
/**
|
|
13816
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
13817
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
13818
|
+
*/
|
|
13819
|
+
|
|
13820
|
+
const byteToHex = [];
|
|
13821
|
+
|
|
13822
|
+
for (let i = 0; i < 256; ++i) {
|
|
13823
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
13824
|
+
}
|
|
13825
|
+
|
|
13826
|
+
function unsafeStringify(arr, offset = 0) {
|
|
13827
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
13828
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
13829
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
13830
|
+
}
|
|
13831
|
+
|
|
13832
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
13833
|
+
var native = {
|
|
13834
|
+
randomUUID
|
|
13835
|
+
};
|
|
13836
|
+
|
|
13837
|
+
function v4(options, buf, offset) {
|
|
13838
|
+
if (native.randomUUID && !buf && !options) {
|
|
13839
|
+
return native.randomUUID();
|
|
13840
|
+
}
|
|
13841
|
+
|
|
13842
|
+
options = options || {};
|
|
13843
|
+
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
13844
|
+
|
|
13845
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
13846
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
13847
|
+
|
|
13848
|
+
if (buf) {
|
|
13849
|
+
offset = offset || 0;
|
|
13850
|
+
|
|
13851
|
+
for (let i = 0; i < 16; ++i) {
|
|
13852
|
+
buf[offset + i] = rnds[i];
|
|
13853
|
+
}
|
|
13854
|
+
|
|
13855
|
+
return buf;
|
|
13856
|
+
}
|
|
13857
|
+
|
|
13858
|
+
return unsafeStringify(rnds);
|
|
13859
|
+
}
|
|
13860
|
+
|
|
13796
13861
|
/**
|
|
13797
13862
|
* A wrapper hook around useResizeObserver to throw a warning if the environment does not support
|
|
13798
13863
|
* ResizeObserver.
|
|
@@ -14038,6 +14103,9 @@
|
|
|
14038
14103
|
maxHeight: "calc(100vh - ".concat(modalExtrasHeight, "px)")
|
|
14039
14104
|
}
|
|
14040
14105
|
}, children) : null, error ? /*#__PURE__*/React$1.createElement(react.InlineNotification, {
|
|
14106
|
+
key: v4() // regenerate the inline notification after they click on close button
|
|
14107
|
+
,
|
|
14108
|
+
lowContrast: true,
|
|
14041
14109
|
title: error,
|
|
14042
14110
|
subtitle: "",
|
|
14043
14111
|
kind: "error",
|
|
@@ -194659,71 +194727,6 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
194659
194727
|
};
|
|
194660
194728
|
var CardCodeEditor$1 = CardCodeEditor;
|
|
194661
194729
|
|
|
194662
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
194663
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
194664
|
-
// generators (like Math.random()).
|
|
194665
|
-
let getRandomValues;
|
|
194666
|
-
const rnds8 = new Uint8Array(16);
|
|
194667
|
-
function rng() {
|
|
194668
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
194669
|
-
if (!getRandomValues) {
|
|
194670
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
194671
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
194672
|
-
|
|
194673
|
-
if (!getRandomValues) {
|
|
194674
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
194675
|
-
}
|
|
194676
|
-
}
|
|
194677
|
-
|
|
194678
|
-
return getRandomValues(rnds8);
|
|
194679
|
-
}
|
|
194680
|
-
|
|
194681
|
-
/**
|
|
194682
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
194683
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
194684
|
-
*/
|
|
194685
|
-
|
|
194686
|
-
const byteToHex = [];
|
|
194687
|
-
|
|
194688
|
-
for (let i = 0; i < 256; ++i) {
|
|
194689
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
194690
|
-
}
|
|
194691
|
-
|
|
194692
|
-
function unsafeStringify(arr, offset = 0) {
|
|
194693
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
194694
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
194695
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
194696
|
-
}
|
|
194697
|
-
|
|
194698
|
-
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
194699
|
-
var native = {
|
|
194700
|
-
randomUUID
|
|
194701
|
-
};
|
|
194702
|
-
|
|
194703
|
-
function v4(options, buf, offset) {
|
|
194704
|
-
if (native.randomUUID && !buf && !options) {
|
|
194705
|
-
return native.randomUUID();
|
|
194706
|
-
}
|
|
194707
|
-
|
|
194708
|
-
options = options || {};
|
|
194709
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
194710
|
-
|
|
194711
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
194712
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
194713
|
-
|
|
194714
|
-
if (buf) {
|
|
194715
|
-
offset = offset || 0;
|
|
194716
|
-
|
|
194717
|
-
for (let i = 0; i < 16; ++i) {
|
|
194718
|
-
buf[offset + i] = rnds[i];
|
|
194719
|
-
}
|
|
194720
|
-
|
|
194721
|
-
return buf;
|
|
194722
|
-
}
|
|
194723
|
-
|
|
194724
|
-
return unsafeStringify(rnds);
|
|
194725
|
-
}
|
|
194726
|
-
|
|
194727
194730
|
var getUniqueId = function getUniqueId() {
|
|
194728
194731
|
return v4();
|
|
194729
194732
|
};
|
|
@@ -318178,6 +318181,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
318178
318181
|
initialValue: modalJsonData,
|
|
318179
318182
|
i18n: _pick(mergedI18n, 'errorTitle', 'modalTitle', 'modalLabel', 'modalHelpText', 'modalIconDescription', 'copyBtnDescription', 'copyBtnFeedBack', 'expandBtnLabel', 'modalPrimaryButtonLabel', 'modalSecondaryButtonLabel')
|
|
318180
318183
|
}) : null, /*#__PURE__*/React$1.createElement(CardEditForm$1, {
|
|
318184
|
+
key: cardConfig.id,
|
|
318181
318185
|
cardConfig: finalCardToEdit,
|
|
318182
318186
|
isSummaryDashboard: isSummaryDashboard,
|
|
318183
318187
|
onChange: onChange,
|