carbon-addons-iot-react 4.3.4 → 4.3.6

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.
@@ -11,7 +11,6 @@ import 'core-js/modules/es.array.find-index.js';
11
11
  import 'core-js/modules/es.array.includes.js';
12
12
  import 'core-js/modules/es.array.map.js';
13
13
  import 'core-js/modules/es.function.name.js';
14
- import 'core-js/modules/es.number.constructor.js';
15
14
  import 'core-js/modules/es.object.get-own-property-descriptor.js';
16
15
  import 'core-js/modules/es.object.get-own-property-descriptors.js';
17
16
  import 'core-js/modules/es.object.keys.js';
@@ -292,11 +291,11 @@ var ThresholdsFormItem = function ThresholdsFormItem(_ref) {
292
291
  invalid: false // don't allow invalid state
293
292
  ,
294
293
  value: ((_threshold$value2 = threshold.value) === null || _threshold$value2 === void 0 ? void 0 : _threshold$value2.toString()) || 0,
295
- onChange: function onChange(event, _ref7) {
294
+ onChange: function onChange(_ref7) {
296
295
  var value = _ref7.value;
297
296
  var updatedThresholds = _toConsumableArray(thresholds);
298
297
  updatedThresholds[i] = _objectSpread(_objectSpread({}, updatedThresholds[i]), {}, {
299
- value: Number(value !== null && value !== void 0 ? value : event.imaginaryTarget.value) || value || event.imaginaryTarget.value
298
+ value: value
300
299
  });
301
300
  _onChange(updatedThresholds.map(function (item) {
302
301
  return _omit(item, 'id');
@@ -25,10 +25,12 @@ loader.config({
25
25
  });
26
26
  var updateEditorAttribute = function updateEditorAttribute(disabled, editorValue) {
27
27
  var textarea = document.getElementsByClassName('inputarea monaco-mouse-cursor-text')[0];
28
- if (disabled && !!editorValue.current) {
29
- textarea.setAttribute('disabled', '');
30
- } else if (textarea !== null && textarea !== void 0 && textarea.hasAttribute('disabled')) {
31
- textarea.removeAttribute('disabled');
28
+ if (textarea) {
29
+ if (disabled && !!editorValue.current) {
30
+ textarea.setAttribute('disabled', '');
31
+ } else if (textarea !== null && textarea !== void 0 && textarea.hasAttribute('disabled')) {
32
+ textarea.removeAttribute('disabled');
33
+ }
32
34
  }
33
35
  };
34
36
  var propTypes = {
@@ -20,7 +20,7 @@ import 'core-js/modules/es.string.iterator.js';
20
20
  import 'core-js/modules/es.string.replace.js';
21
21
  import 'core-js/modules/web.dom-collections.for-each.js';
22
22
  import { useState, useRef, useCallback, useEffect } from 'react';
23
- import customParseFormat from '../../node_modules/dayjs/plugin/customParseFormat.js';
23
+ import customParseFormat from '../../packages/react/node_modules/dayjs/plugin/customParseFormat.js';
24
24
  import { settings } from '../../constants/Settings.js';
25
25
  import { PICKER_KINDS, RELATIVE_VALUES, INTERVAL_VALUES } from '../../constants/DateConstants.js';
26
26
  import dayjs from '../../utils/dayjs.js';
@@ -1,4 +1,4 @@
1
- import { createCommonjsModule, commonjsGlobal } from '../../../_virtual/_commonjsHelpers.js';
1
+ import { createCommonjsModule, commonjsGlobal } from '../../../../../_virtual/_commonjsHelpers.js';
2
2
 
3
3
  var customParseFormat = createCommonjsModule(function (module, exports) {
4
4
  !function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return (e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t;}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,!1);}],a:[o,function(e){this.afternoon=d(e,!0);}],Q:[n,function(e){this.month=3*(e-1)+1;}],S:[n,function(e){this.milliseconds=100*+e;}],SS:[r,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e);}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else {var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={};}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""));}else i.call(this,e);};}}));
@@ -13,7 +13,6 @@ require('core-js/modules/es.array.find-index.js');
13
13
  require('core-js/modules/es.array.includes.js');
14
14
  require('core-js/modules/es.array.map.js');
15
15
  require('core-js/modules/es.function.name.js');
16
- require('core-js/modules/es.number.constructor.js');
17
16
  require('core-js/modules/es.object.get-own-property-descriptor.js');
18
17
  require('core-js/modules/es.object.get-own-property-descriptors.js');
19
18
  require('core-js/modules/es.object.keys.js');
@@ -302,11 +301,11 @@ var ThresholdsFormItem = function ThresholdsFormItem(_ref) {
302
301
  invalid: false // don't allow invalid state
303
302
  ,
304
303
  value: ((_threshold$value2 = threshold.value) === null || _threshold$value2 === void 0 ? void 0 : _threshold$value2.toString()) || 0,
305
- onChange: function onChange(event, _ref7) {
304
+ onChange: function onChange(_ref7) {
306
305
  var value = _ref7.value;
307
306
  var updatedThresholds = _toConsumableArray__default.default(thresholds);
308
307
  updatedThresholds[i] = _objectSpread(_objectSpread({}, updatedThresholds[i]), {}, {
309
- value: Number(value !== null && value !== void 0 ? value : event.imaginaryTarget.value) || value || event.imaginaryTarget.value
308
+ value: value
310
309
  });
311
310
  _onChange(updatedThresholds.map(function (item) {
312
311
  return omit(item, 'id');
@@ -57,10 +57,12 @@ Editor.loader.config({
57
57
  });
58
58
  var updateEditorAttribute = function updateEditorAttribute(disabled, editorValue) {
59
59
  var textarea = document.getElementsByClassName('inputarea monaco-mouse-cursor-text')[0];
60
- if (disabled && !!editorValue.current) {
61
- textarea.setAttribute('disabled', '');
62
- } else if (textarea !== null && textarea !== void 0 && textarea.hasAttribute('disabled')) {
63
- textarea.removeAttribute('disabled');
60
+ if (textarea) {
61
+ if (disabled && !!editorValue.current) {
62
+ textarea.setAttribute('disabled', '');
63
+ } else if (textarea !== null && textarea !== void 0 && textarea.hasAttribute('disabled')) {
64
+ textarea.removeAttribute('disabled');
65
+ }
64
66
  }
65
67
  };
66
68
  var propTypes = {
@@ -22,7 +22,7 @@ require('core-js/modules/es.string.iterator.js');
22
22
  require('core-js/modules/es.string.replace.js');
23
23
  require('core-js/modules/web.dom-collections.for-each.js');
24
24
  var React = require('react');
25
- var customParseFormat = require('../../node_modules/dayjs/plugin/customParseFormat.js');
25
+ var customParseFormat = require('../../packages/react/node_modules/dayjs/plugin/customParseFormat.js');
26
26
  var Settings = require('../../constants/Settings.js');
27
27
  var DateConstants = require('../../constants/DateConstants.js');
28
28
  var dayjs = require('../../utils/dayjs.js');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var _commonjsHelpers = require('../../../_virtual/_commonjsHelpers.js');
3
+ var _commonjsHelpers = require('../../../../../_virtual/_commonjsHelpers.js');
4
4
 
5
5
  var customParseFormat = _commonjsHelpers.createCommonjsModule(function (module, exports) {
6
6
  !function(e,t){module.exports=t();}(_commonjsHelpers.commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return (e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t;}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e);}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,!1);}],a:[o,function(e){this.afternoon=d(e,!0);}],Q:[n,function(e){this.month=3*(e-1)+1;}],S:[n,function(e){this.milliseconds=100*+e;}],SS:[r,function(e){this.milliseconds=10*+e;}],SSS:[/\d{3}/,function(e){this.milliseconds=+e;}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r);}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t;}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e);}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f<a;f+=1){var h=o[f],u=c[h],d=u&&u[0],l=u&&u[1];o[f]=l?{regex:d,parser:l}:h.replace(/^\[|\]$/g,"");}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=o[n];if("string"==typeof i)r+=i.length;else {var s=i.regex,f=i.parser,h=e.slice(r),u=s.exec(h)[0];f.call(t,u),e=e.replace(u,"");}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon;}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(a=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,o=e.args;this.$u=r;var a=o[1];if("string"==typeof a){var f=!0===o[2],h=!0===o[3],u=f||h,d=o[2];h&&(d=o[2]),s=this.$locale(),!f&&d&&(s=n.Ls[d]),this.$d=function(e,t,n,r){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={};}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""));}else i.call(this,e);};}}));
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.26.9",
175
+ "@babel/runtime": "^7.28.4",
176
176
  "@carbon/charts": "1.22.0",
177
177
  "@carbon/charts-react": "1.22.0",
178
178
  "@carbon/colors": "^11.28.0",
@@ -192,12 +192,12 @@
192
192
  "carbon-icons": "^7.0.7",
193
193
  "classnames": "^2.2.5",
194
194
  "core-js": "3.26.1",
195
- "dayjs": "^1.11.13",
195
+ "dayjs": "^1.11.19",
196
196
  "immutability-helper": "^3.1.1",
197
197
  "js-file-download": "^0.4.12",
198
198
  "lodash-es": "^4.17.22",
199
- "monaco-editor": "^0.52.0",
200
- "monaco-editor-webpack-plugin": "^7.1.0",
199
+ "monaco-editor": "^0.54.0",
200
+ "monaco-editor-webpack-plugin": "^7.1.1",
201
201
  "object-hash": "^3.0.0",
202
202
  "prop-types": "^15.8.1",
203
203
  "react-dnd": "14.0.2",
@@ -344,7 +344,7 @@
344
344
  "whatwg-fetch": "^3.0.0"
345
345
  },
346
346
  "sideEffects": false,
347
- "version": "4.3.4",
347
+ "version": "4.3.6",
348
348
  "resolutions": {
349
349
  "chokidar": "3.3.1",
350
350
  "react-grid-layout": "1.2.2",