@scaleflex/widget-common 4.0.7 → 4.3.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.
- package/CHANGELOG.md +8234 -8206
- package/LICENSE +0 -0
- package/README.md +58 -58
- package/dist/style.css +755 -581
- package/dist/style.min.css +1 -1
- package/lib/Avatar/index.js +13 -13
- package/lib/BadgeButton.js +2 -2
- package/lib/BaseButton.js +3 -3
- package/lib/Button.js +2 -2
- package/lib/DatePicker/index.scss +254 -254
- package/lib/FilterPopup/index.js +12 -12
- package/lib/FormHelperText.js +4 -4
- package/lib/IconLabeledButton.js +2 -2
- package/lib/Transitions/transitions.scss +49 -49
- package/lib/VirtualGrid/index.js +13 -13
- package/lib/VirtualList/index.js +12 -12
- package/lib/hooks/useInputWithLocaleNumber.js +3 -3
- package/lib/style.scss +1079 -1079
- package/package.json +4 -4
package/lib/VirtualGrid/index.js
CHANGED
|
@@ -17,19 +17,19 @@ import VirtualGridItem from './VirtualGridItem';
|
|
|
17
17
|
import { defaultGetItemKey, getLayoutInfo } from './VirtualGrid.utils';
|
|
18
18
|
|
|
19
19
|
// TODO: Refactor the VirtualGrid to consider also the skeleton loading to avoid jumping, and use the same size of skeleton's and align items size.
|
|
20
|
-
/**
|
|
21
|
-
* A Virtual grid that applies (windowing) concept for reusing the DOM elements and avoid rerendering for all items.
|
|
22
|
-
* @param {Array} items - The items that will be used in the grid (required).
|
|
23
|
-
* @param {ReactNode} children - The children that will be rendered for each item (required).
|
|
24
|
-
* @param {String} injectedItemPropName - The name of the prop that will be injected in the children (optional).
|
|
25
|
-
* @param {Number} overscan - The number of items that will be rendered before and after the viewport in rows (optional).
|
|
26
|
-
* @param {Function} getItemKey - The function that will be used to get the item key (optional).
|
|
27
|
-
* @param {Boolean} stopChildEventsPropagation - if `true`, the children's items click events won't be propagated outside of the virtual grid component (incase of needing to handle some specific case on grid's container empty space click).
|
|
28
|
-
* @param {Number} columnMinWidth - The minimum width of the column in pixels (optional - default is 214px).
|
|
29
|
-
* @param {String} scrollToKeyOnMount - The key of the item that will be scrolled to on mount the grid (optional).
|
|
30
|
-
* @param {ReactRef} apiRef - the reference that will contain the api functions to deal with the grid (optional)
|
|
31
|
-
* 1- `scrollToItem({ key, index })` function that scrolls the grid to the specified item's key, the key should be the same property that's returned from getItemKey, index should be the item's index.
|
|
32
|
-
* @returns {ReactNode} - The VirtualGrid component.
|
|
20
|
+
/**
|
|
21
|
+
* A Virtual grid that applies (windowing) concept for reusing the DOM elements and avoid rerendering for all items.
|
|
22
|
+
* @param {Array} items - The items that will be used in the grid (required).
|
|
23
|
+
* @param {ReactNode} children - The children that will be rendered for each item (required).
|
|
24
|
+
* @param {String} injectedItemPropName - The name of the prop that will be injected in the children (optional).
|
|
25
|
+
* @param {Number} overscan - The number of items that will be rendered before and after the viewport in rows (optional).
|
|
26
|
+
* @param {Function} getItemKey - The function that will be used to get the item key (optional).
|
|
27
|
+
* @param {Boolean} stopChildEventsPropagation - if `true`, the children's items click events won't be propagated outside of the virtual grid component (incase of needing to handle some specific case on grid's container empty space click).
|
|
28
|
+
* @param {Number} columnMinWidth - The minimum width of the column in pixels (optional - default is 214px).
|
|
29
|
+
* @param {String} scrollToKeyOnMount - The key of the item that will be scrolled to on mount the grid (optional).
|
|
30
|
+
* @param {ReactRef} apiRef - the reference that will contain the api functions to deal with the grid (optional)
|
|
31
|
+
* 1- `scrollToItem({ key, index })` function that scrolls the grid to the specified item's key, the key should be the same property that's returned from getItemKey, index should be the item's index.
|
|
32
|
+
* @returns {ReactNode} - The VirtualGrid component.
|
|
33
33
|
*/
|
|
34
34
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
35
35
|
var MARGIN_BOTTOM_SPACE = 24;
|
package/lib/VirtualList/index.js
CHANGED
|
@@ -9,18 +9,18 @@ import { ViewportList } from 'react-viewport-list';
|
|
|
9
9
|
import getScrollableParent from '@scaleflex/widget-explorer/lib/utils/getScrollableParent';
|
|
10
10
|
import VirtualListItem from './VirtualListItem';
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* A Virtual list that applies (windowing) concept for reusing the DOM elements and avoid rerendering for all items.
|
|
14
|
-
* @param {Array} items - The items that will be used in the list (required).
|
|
15
|
-
* @param {ReactNode} children - The children that will be rendered for each item (required).
|
|
16
|
-
* @param {String} injectedItemPropName - The name of the prop that will be injected in the children (optional).
|
|
17
|
-
* @param {Number} overscan - The number of items that will be rendered before and after the viewport (optional).
|
|
18
|
-
* @param {Function} getItemKey - The function that will be used to get the item key (optional).
|
|
19
|
-
* @param {Function} renderSpacer - The function that will be used to render the spacer (optional).
|
|
20
|
-
* @param {ReactRef} parentRef - the reference for the parent wrapper for the virtual list to be used in recognized the scroller/viewport element, not required if the virtual list is the parent and u don't need to have the apiRef (optional)
|
|
21
|
-
* @param {ReactRef} apiRef - the reference that will contain the api functions to deal with the grid (optional)
|
|
22
|
-
* 1- `scrollToItem({ key, index })` function that scrolls the grid to the specified item's key, the key should be the same property that's returned from getItemKey, index should be the item's index.
|
|
23
|
-
* @returns {ReactNode} - The VirtualList component.
|
|
12
|
+
/**
|
|
13
|
+
* A Virtual list that applies (windowing) concept for reusing the DOM elements and avoid rerendering for all items.
|
|
14
|
+
* @param {Array} items - The items that will be used in the list (required).
|
|
15
|
+
* @param {ReactNode} children - The children that will be rendered for each item (required).
|
|
16
|
+
* @param {String} injectedItemPropName - The name of the prop that will be injected in the children (optional).
|
|
17
|
+
* @param {Number} overscan - The number of items that will be rendered before and after the viewport (optional).
|
|
18
|
+
* @param {Function} getItemKey - The function that will be used to get the item key (optional).
|
|
19
|
+
* @param {Function} renderSpacer - The function that will be used to render the spacer (optional).
|
|
20
|
+
* @param {ReactRef} parentRef - the reference for the parent wrapper for the virtual list to be used in recognized the scroller/viewport element, not required if the virtual list is the parent and u don't need to have the apiRef (optional)
|
|
21
|
+
* @param {ReactRef} apiRef - the reference that will contain the api functions to deal with the grid (optional)
|
|
22
|
+
* 1- `scrollToItem({ key, index })` function that scrolls the grid to the specified item's key, the key should be the same property that's returned from getItemKey, index should be the item's index.
|
|
23
|
+
* @returns {ReactNode} - The VirtualList component.
|
|
24
24
|
*/
|
|
25
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
26
|
var defaultGetItemKey = function defaultGetItemKey(item, index) {
|
|
@@ -7,9 +7,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { useEffect, useMemo, useRef } from 'react';
|
|
8
8
|
import { convertToLocaleNumber, toInitialNumber, getLocaleNumberSeparator } from '@scaleflex/widget-utils/lib/formatNumbers';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Helper hook that can adapt number input value to selected locale format (ex: "1,000,000.12" for "us"
|
|
12
|
-
* and "1 000 000,12" for "fr"), but store changed value in number format like 1000000.12
|
|
10
|
+
/**
|
|
11
|
+
* Helper hook that can adapt number input value to selected locale format (ex: "1,000,000.12" for "us"
|
|
12
|
+
* and "1 000 000,12" for "fr"), but store changed value in number format like 1000000.12
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
var CHARS_COUNT_TO_SEPARATE = 4;
|