carbon-addons-iot-react 5.4.4 → 5.5.0
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.
|
@@ -22,7 +22,8 @@ var CARD_SIZES = {
|
|
|
22
22
|
LARGETHIN: 'LARGETHIN',
|
|
23
23
|
LARGE: 'LARGE',
|
|
24
24
|
LARGETHICK: 'LARGETHICK',
|
|
25
|
-
LARGEWIDE: 'LARGEWIDE'
|
|
25
|
+
LARGEWIDE: 'LARGEWIDE',
|
|
26
|
+
FULL: 'FULL'
|
|
26
27
|
};
|
|
27
28
|
var LEGACY_CARD_SIZES = _objectSpread({
|
|
28
29
|
XSMALL: 'XSMALL',
|
|
@@ -552,6 +553,32 @@ var CARD_DIMENSIONS = {
|
|
|
552
553
|
w: 4,
|
|
553
554
|
h: 4
|
|
554
555
|
}
|
|
556
|
+
},
|
|
557
|
+
FULL: {
|
|
558
|
+
max: {
|
|
559
|
+
w: 16,
|
|
560
|
+
h: 11
|
|
561
|
+
},
|
|
562
|
+
xl: {
|
|
563
|
+
w: 16,
|
|
564
|
+
h: 11
|
|
565
|
+
},
|
|
566
|
+
lg: {
|
|
567
|
+
w: 16,
|
|
568
|
+
h: 11
|
|
569
|
+
},
|
|
570
|
+
md: {
|
|
571
|
+
w: 8,
|
|
572
|
+
h: 11
|
|
573
|
+
},
|
|
574
|
+
sm: {
|
|
575
|
+
w: 8,
|
|
576
|
+
h: 11
|
|
577
|
+
},
|
|
578
|
+
xs: {
|
|
579
|
+
w: 4,
|
|
580
|
+
h: 11
|
|
581
|
+
}
|
|
555
582
|
}
|
|
556
583
|
};
|
|
557
584
|
var CARD_LAYOUTS = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
-
import {
|
|
2
|
+
import { useRef, useState, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* React hook that returns the current language direction ('ltr' or 'rtl')
|
|
@@ -8,25 +8,29 @@ import { useState, useRef, useEffect } from 'react';
|
|
|
8
8
|
* @returns {string} The current language direction ('ltr' or 'rtl')
|
|
9
9
|
*/
|
|
10
10
|
function useLangDirection() {
|
|
11
|
-
|
|
12
|
-
var
|
|
11
|
+
var isServerSide = useRef(typeof window === 'undefined' || typeof document === 'undefined');
|
|
12
|
+
var observer = useRef(null);
|
|
13
|
+
|
|
14
|
+
// Lazy initialize direction
|
|
15
|
+
var _useState = useState(function () {
|
|
16
|
+
if (isServerSide.current) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
// Target the HTML element
|
|
20
|
+
var element = document.getElementsByTagName('html')[0];
|
|
21
|
+
// Set initial direction
|
|
22
|
+
return element.getAttribute('dir') || 'ltr';
|
|
23
|
+
}),
|
|
13
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14
25
|
direction = _useState2[0],
|
|
15
26
|
setDirection = _useState2[1];
|
|
16
|
-
var observer = useRef(null);
|
|
17
|
-
var isServerSide = useRef(typeof window === 'undefined' || typeof document === 'undefined');
|
|
18
27
|
useEffect(function () {
|
|
19
28
|
// Return early if in server environment
|
|
20
29
|
if (isServerSide.current) {
|
|
21
30
|
return;
|
|
22
31
|
}
|
|
23
|
-
|
|
24
32
|
// Target the HTML element
|
|
25
33
|
var element = document.getElementsByTagName('html')[0];
|
|
26
|
-
|
|
27
|
-
// Set initial direction
|
|
28
|
-
setDirection(element.getAttribute('dir') || 'ltr');
|
|
29
|
-
|
|
30
34
|
// Callback function to execute when mutations are observed
|
|
31
35
|
var callback = function callback(mutationsList) {
|
|
32
36
|
// Use traditional for loop for better compatibility
|
|
@@ -28,7 +28,8 @@ var CARD_SIZES = {
|
|
|
28
28
|
LARGETHIN: 'LARGETHIN',
|
|
29
29
|
LARGE: 'LARGE',
|
|
30
30
|
LARGETHICK: 'LARGETHICK',
|
|
31
|
-
LARGEWIDE: 'LARGEWIDE'
|
|
31
|
+
LARGEWIDE: 'LARGEWIDE',
|
|
32
|
+
FULL: 'FULL'
|
|
32
33
|
};
|
|
33
34
|
var LEGACY_CARD_SIZES = _objectSpread({
|
|
34
35
|
XSMALL: 'XSMALL',
|
|
@@ -558,6 +559,32 @@ var CARD_DIMENSIONS = {
|
|
|
558
559
|
w: 4,
|
|
559
560
|
h: 4
|
|
560
561
|
}
|
|
562
|
+
},
|
|
563
|
+
FULL: {
|
|
564
|
+
max: {
|
|
565
|
+
w: 16,
|
|
566
|
+
h: 11
|
|
567
|
+
},
|
|
568
|
+
xl: {
|
|
569
|
+
w: 16,
|
|
570
|
+
h: 11
|
|
571
|
+
},
|
|
572
|
+
lg: {
|
|
573
|
+
w: 16,
|
|
574
|
+
h: 11
|
|
575
|
+
},
|
|
576
|
+
md: {
|
|
577
|
+
w: 8,
|
|
578
|
+
h: 11
|
|
579
|
+
},
|
|
580
|
+
sm: {
|
|
581
|
+
w: 8,
|
|
582
|
+
h: 11
|
|
583
|
+
},
|
|
584
|
+
xs: {
|
|
585
|
+
w: 4,
|
|
586
|
+
h: 11
|
|
587
|
+
}
|
|
561
588
|
}
|
|
562
589
|
};
|
|
563
590
|
var CARD_LAYOUTS = {
|
|
@@ -14,25 +14,29 @@ var _slicedToArray__default = /*#__PURE__*/_interopDefault(_slicedToArray);
|
|
|
14
14
|
* @returns {string} The current language direction ('ltr' or 'rtl')
|
|
15
15
|
*/
|
|
16
16
|
function useLangDirection() {
|
|
17
|
-
|
|
18
|
-
var
|
|
17
|
+
var isServerSide = React.useRef(typeof window === 'undefined' || typeof document === 'undefined');
|
|
18
|
+
var observer = React.useRef(null);
|
|
19
|
+
|
|
20
|
+
// Lazy initialize direction
|
|
21
|
+
var _useState = React.useState(function () {
|
|
22
|
+
if (isServerSide.current) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
// Target the HTML element
|
|
26
|
+
var element = document.getElementsByTagName('html')[0];
|
|
27
|
+
// Set initial direction
|
|
28
|
+
return element.getAttribute('dir') || 'ltr';
|
|
29
|
+
}),
|
|
19
30
|
_useState2 = _slicedToArray__default.default(_useState, 2),
|
|
20
31
|
direction = _useState2[0],
|
|
21
32
|
setDirection = _useState2[1];
|
|
22
|
-
var observer = React.useRef(null);
|
|
23
|
-
var isServerSide = React.useRef(typeof window === 'undefined' || typeof document === 'undefined');
|
|
24
33
|
React.useEffect(function () {
|
|
25
34
|
// Return early if in server environment
|
|
26
35
|
if (isServerSide.current) {
|
|
27
36
|
return;
|
|
28
37
|
}
|
|
29
|
-
|
|
30
38
|
// Target the HTML element
|
|
31
39
|
var element = document.getElementsByTagName('html')[0];
|
|
32
|
-
|
|
33
|
-
// Set initial direction
|
|
34
|
-
setDirection(element.getAttribute('dir') || 'ltr');
|
|
35
|
-
|
|
36
40
|
// Callback function to execute when mutations are observed
|
|
37
41
|
var callback = function callback(mutationsList) {
|
|
38
42
|
// Use traditional for loop for better compatibility
|
package/package.json
CHANGED
|
@@ -353,11 +353,11 @@
|
|
|
353
353
|
"whatwg-fetch": "^3.0.0"
|
|
354
354
|
},
|
|
355
355
|
"sideEffects": false,
|
|
356
|
-
"version": "5.
|
|
356
|
+
"version": "5.5.0",
|
|
357
357
|
"resolutions": {
|
|
358
358
|
"chokidar": "3.3.1",
|
|
359
359
|
"react-grid-layout": "1.2.2",
|
|
360
360
|
"got": "11.8.5"
|
|
361
361
|
},
|
|
362
|
-
"gitHead": "
|
|
362
|
+
"gitHead": "738bdec6326c4951d687251967493acb62cbf92f"
|
|
363
363
|
}
|
|
@@ -9826,25 +9826,29 @@
|
|
|
9826
9826
|
* @returns {string} The current language direction ('ltr' or 'rtl')
|
|
9827
9827
|
*/
|
|
9828
9828
|
function useLangDirection() {
|
|
9829
|
-
|
|
9830
|
-
var
|
|
9829
|
+
var isServerSide = React$1.useRef(typeof window === 'undefined' || typeof document === 'undefined');
|
|
9830
|
+
var observer = React$1.useRef(null);
|
|
9831
|
+
|
|
9832
|
+
// Lazy initialize direction
|
|
9833
|
+
var _useState = React$1.useState(function () {
|
|
9834
|
+
if (isServerSide.current) {
|
|
9835
|
+
return null;
|
|
9836
|
+
}
|
|
9837
|
+
// Target the HTML element
|
|
9838
|
+
var element = document.getElementsByTagName('html')[0];
|
|
9839
|
+
// Set initial direction
|
|
9840
|
+
return element.getAttribute('dir') || 'ltr';
|
|
9841
|
+
}),
|
|
9831
9842
|
_useState2 = _slicedToArray$9(_useState, 2),
|
|
9832
9843
|
direction = _useState2[0],
|
|
9833
9844
|
setDirection = _useState2[1];
|
|
9834
|
-
var observer = React$1.useRef(null);
|
|
9835
|
-
var isServerSide = React$1.useRef(typeof window === 'undefined' || typeof document === 'undefined');
|
|
9836
9845
|
React$1.useEffect(function () {
|
|
9837
9846
|
// Return early if in server environment
|
|
9838
9847
|
if (isServerSide.current) {
|
|
9839
9848
|
return;
|
|
9840
9849
|
}
|
|
9841
|
-
|
|
9842
9850
|
// Target the HTML element
|
|
9843
9851
|
var element = document.getElementsByTagName('html')[0];
|
|
9844
|
-
|
|
9845
|
-
// Set initial direction
|
|
9846
|
-
setDirection(element.getAttribute('dir') || 'ltr');
|
|
9847
|
-
|
|
9848
9852
|
// Callback function to execute when mutations are observed
|
|
9849
9853
|
var callback = function callback(mutationsList) {
|
|
9850
9854
|
// Use traditional for loop for better compatibility
|
|
@@ -13027,7 +13031,8 @@
|
|
|
13027
13031
|
LARGETHIN: 'LARGETHIN',
|
|
13028
13032
|
LARGE: 'LARGE',
|
|
13029
13033
|
LARGETHICK: 'LARGETHICK',
|
|
13030
|
-
LARGEWIDE: 'LARGEWIDE'
|
|
13034
|
+
LARGEWIDE: 'LARGEWIDE',
|
|
13035
|
+
FULL: 'FULL'
|
|
13031
13036
|
};
|
|
13032
13037
|
var LEGACY_CARD_SIZES = _objectSpread$26({
|
|
13033
13038
|
XSMALL: 'XSMALL',
|
|
@@ -13557,6 +13562,32 @@
|
|
|
13557
13562
|
w: 4,
|
|
13558
13563
|
h: 4
|
|
13559
13564
|
}
|
|
13565
|
+
},
|
|
13566
|
+
FULL: {
|
|
13567
|
+
max: {
|
|
13568
|
+
w: 16,
|
|
13569
|
+
h: 11
|
|
13570
|
+
},
|
|
13571
|
+
xl: {
|
|
13572
|
+
w: 16,
|
|
13573
|
+
h: 11
|
|
13574
|
+
},
|
|
13575
|
+
lg: {
|
|
13576
|
+
w: 16,
|
|
13577
|
+
h: 11
|
|
13578
|
+
},
|
|
13579
|
+
md: {
|
|
13580
|
+
w: 8,
|
|
13581
|
+
h: 11
|
|
13582
|
+
},
|
|
13583
|
+
sm: {
|
|
13584
|
+
w: 8,
|
|
13585
|
+
h: 11
|
|
13586
|
+
},
|
|
13587
|
+
xs: {
|
|
13588
|
+
w: 4,
|
|
13589
|
+
h: 11
|
|
13590
|
+
}
|
|
13560
13591
|
}
|
|
13561
13592
|
};
|
|
13562
13593
|
var CARD_LAYOUTS = {
|