diginet-core-ui 1.4.55-beta.4 → 1.4.55-beta.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.
- package/components/accordion/details.js +1 -1
- package/components/accordion/group.js +1 -1
- package/components/accordion/index.js +1 -1
- package/components/accordion/summary.js +1 -1
- package/components/alert/index.js +1 -1
- package/components/alert/notify.js +1 -1
- package/components/avatar/index.js +2 -2
- package/components/badge/index.js +1 -1
- package/components/breadcrumb/index.js +1 -1
- package/components/button/icon.js +1 -1
- package/components/button/index.js +1 -1
- package/components/button/more.js +2 -2
- package/components/button/ripple-effect.js +1 -1
- package/components/card/body.js +1 -1
- package/components/card/extra.js +1 -1
- package/components/card/footer.js +1 -1
- package/components/card/header.js +1 -1
- package/components/card/index.js +1 -1
- package/components/chart/Pie/Circle.js +1 -1
- package/components/chart/Pie/Sector.js +1 -1
- package/components/chart/Pie/index.js +1 -1
- package/components/chart/Pie-v2/Circle.js +1 -1
- package/components/chart/Pie-v2/Sector.js +1 -1
- package/components/chart/Pie-v2/index.js +1 -1
- package/components/chart/bar/Bar.js +1 -1
- package/components/chart/bar/index.js +1 -1
- package/components/chart/bar-v2/Bar.js +1 -1
- package/components/chart/bar-v2/index.js +1 -1
- package/components/chart/line/index.js +1 -1
- package/components/chart/line-v2/index.js +1 -1
- package/components/check-text/index.js +1 -1
- package/components/check-text/interview-confirmation.js +1 -1
- package/components/check-text/interview-status.js +1 -1
- package/components/chip/index.js +1 -1
- package/components/collapse/index.js +1 -1
- package/components/divider/index.js +1 -1
- package/components/form-control/attachment/index.js +22 -22
- package/components/form-control/calendar/index.js +1 -1
- package/components/form-control/calendar/range.js +1 -1
- package/components/form-control/checkbox/index.js +1 -1
- package/components/form-control/control/index.js +1 -1
- package/components/form-control/date-input/index.js +1 -1
- package/components/form-control/date-picker/index.js +1 -1
- package/components/form-control/date-range-picker/index.js +6 -7
- package/components/form-control/dropdown/index.js +1 -1
- package/components/form-control/dropdown-box/index.js +1 -1
- package/components/form-control/form-group/index.js +1 -1
- package/components/form-control/helper-text/index.js +1 -1
- package/components/form-control/input-base/UncontrolledInputBase.js +1 -1
- package/components/form-control/input-base/index.js +1 -1
- package/components/form-control/label/index.js +1 -1
- package/components/form-control/money-input/index.js +1 -1
- package/components/form-control/number-input/index2.js +3 -2
- package/components/form-control/password-input/index.js +1 -1
- package/components/form-control/phone-input/index.js +1 -1
- package/components/form-control/radio/index.js +1 -1
- package/components/form-control/text-input/index.js +1 -1
- package/components/form-control/time-picker/index.js +1 -1
- package/components/form-control/time-picker/v2/index.js +1 -1
- package/components/form-control/toggle/index.js +1 -1
- package/components/form-view/input.js +1 -1
- package/components/grid/index.js +1 -1
- package/components/image/index.js +1 -1
- package/components/list/list-item-action.js +1 -1
- package/components/list/list-item-icon.js +1 -1
- package/components/list/list-item-text.js +1 -1
- package/components/list/list-item.js +1 -1
- package/components/list/list.js +1 -1
- package/components/list/sub-header.js +1 -1
- package/components/modal/body.js +1 -1
- package/components/modal/footer.js +1 -1
- package/components/modal/header.js +1 -1
- package/components/modal/index.js +1 -1
- package/components/modal/modal.js +1 -1
- package/components/others/option-wrapper/index.js +1 -1
- package/components/paging/page-info.js +35 -35
- package/components/paging/page-selector.js +1 -1
- package/components/paper/index.js +1 -1
- package/components/popover/body.js +1 -1
- package/components/popover/footer.js +1 -1
- package/components/popover/header.js +1 -1
- package/components/popover/index.js +14 -14
- package/components/popup/index.js +1 -1
- package/components/popup/v2/index.js +1 -1
- package/components/progress/circular.js +1 -1
- package/components/progress/linear.js +1 -1
- package/components/rating/index.js +1 -1
- package/components/skeleton/index.js +1 -1
- package/components/slider/slider-container.js +1 -1
- package/components/slider/slider-item.js +1 -1
- package/components/status/index.js +1 -1
- package/components/tab/tab-container.js +1 -1
- package/components/tab/tab-header.js +1 -1
- package/components/tab/tab-panel.js +1 -1
- package/components/tab/tab.js +1 -1
- package/components/tooltip/index.js +1 -1
- package/components/transfer/index.js +1 -1
- package/components/tree-view/index.js +1 -1
- package/components/typography/index.js +1 -1
- package/icons/effect.js +1 -1
- package/icons/menu/v2/index.js +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { boxBorder, overflowHidden, parseHeight, pointerEventsNone, positionRela
|
|
|
7
7
|
import { useTheme } from "../../theme";
|
|
8
8
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
9
9
|
import { classNames, getProp } from "../../utils";
|
|
10
|
-
const AccordionDetails = /*#__PURE__*/memo(
|
|
10
|
+
const AccordionDetails = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
11
|
if (!reference) reference = useRef(null);
|
|
12
12
|
const theme = useTheme();
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ import { borderRadius, borderRadius4px } from "../../styles/general";
|
|
|
7
7
|
import { useTheme } from "../../theme";
|
|
8
8
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
9
9
|
import { classNames } from "../../utils";
|
|
10
|
-
const AccordionGroup = /*#__PURE__*/memo(
|
|
10
|
+
const AccordionGroup = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
11
|
if (!reference) reference = useRef(null);
|
|
12
12
|
const theme = useTheme();
|
|
13
13
|
|
|
@@ -45,7 +45,7 @@ const handleTransition = (timer, el, beginHeight, endHeight = null) => {
|
|
|
45
45
|
el.style.height = endHeight;
|
|
46
46
|
}, duration);
|
|
47
47
|
};
|
|
48
|
-
const Accordion = /*#__PURE__*/memo(
|
|
48
|
+
const Accordion = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
49
49
|
var _ref$current;
|
|
50
50
|
if (!reference) reference = useRef(null);
|
|
51
51
|
const theme = useTheme();
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "../../theme";
|
|
|
9
9
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp } from "../../utils";
|
|
11
11
|
import AccordionContext from "./context";
|
|
12
|
-
const AccordionSummary = /*#__PURE__*/memo(
|
|
12
|
+
const AccordionSummary = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
const {
|
|
@@ -15,7 +15,7 @@ const primaryTypoMap = new Map([['tiny', 'typography.heading5'], ['small', 'typo
|
|
|
15
15
|
const iconSizeMap = new Map([['tiny', 16], ['small', 20], ['medium', 24]]);
|
|
16
16
|
const linearProgressSizeMap = new Map([['tiny', 2], ['small', 3], ['medium', 4]]);
|
|
17
17
|
const transitionTime = 300;
|
|
18
|
-
const Alert = /*#__PURE__*/memo(
|
|
18
|
+
const Alert = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
19
19
|
if (!reference) reference = useRef(null);
|
|
20
20
|
const theme = useTheme();
|
|
21
21
|
const {
|
|
@@ -27,7 +27,7 @@ const positionHorizontalMap = new Map([['left', css`
|
|
|
27
27
|
`], ['right', css`
|
|
28
28
|
right: 15px;
|
|
29
29
|
`]]);
|
|
30
|
-
const Notify = /*#__PURE__*/memo(
|
|
30
|
+
const Notify = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
31
31
|
if (!reference) reference = useRef(null);
|
|
32
32
|
const theme = useTheme();
|
|
33
33
|
|
|
@@ -22,7 +22,7 @@ const checkFileType = (type, matchType) => {
|
|
|
22
22
|
return new RegExp(matchType).test(type);
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const Avatar = /*#__PURE__*/memo(
|
|
25
|
+
const Avatar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
26
26
|
if (!reference) reference = useRef(null);
|
|
27
27
|
const theme = useTheme();
|
|
28
28
|
|
|
@@ -108,7 +108,7 @@ const Avatar = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference) =
|
|
|
108
108
|
!!onRemove && onRemove();
|
|
109
109
|
};
|
|
110
110
|
const renderData = () => {
|
|
111
|
-
if (
|
|
111
|
+
if (/*#__PURE__*/isValidElement(data)) return data;
|
|
112
112
|
const info = Object.keys(data || {});
|
|
113
113
|
if (info !== null && info !== void 0 && info.length) {
|
|
114
114
|
return info.map((key, index) => {
|
|
@@ -57,7 +57,7 @@ const calDotPos = (anchorOrigin, contentDirection, dotSize, hasContent, size) =>
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
const Badge = /*#__PURE__*/memo(
|
|
60
|
+
const Badge = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
61
61
|
if (!reference) reference = useRef(null);
|
|
62
62
|
const theme = useTheme();
|
|
63
63
|
const {
|
|
@@ -14,7 +14,7 @@ import { classNames, getProp } from "../../utils";
|
|
|
14
14
|
const sizeIconMap = new Map([['tiny', 16], ['small', 18], ['medium', 20]]);
|
|
15
15
|
const sizeTypographyPMap = new Map([['tiny', 'p3'], ['small', 'p2'], ['medium', 'p1']]);
|
|
16
16
|
const sizeTypographyHMap = new Map([['tiny', 'h5'], ['small', 'h4'], ['medium', 'h3']]);
|
|
17
|
-
const Breadcrumb = /*#__PURE__*/memo(
|
|
17
|
+
const Breadcrumb = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
18
18
|
if (!reference) reference = useRef(null);
|
|
19
19
|
const theme = useTheme();
|
|
20
20
|
const {
|
|
@@ -48,7 +48,7 @@ const IconLoadingView = iconSize => {
|
|
|
48
48
|
width: parseInt(iconSize)
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
|
-
const ButtonIcon = /*#__PURE__*/memo(
|
|
51
|
+
const ButtonIcon = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
52
52
|
var _sizeMap$get, _sizeMap$get2;
|
|
53
53
|
if (!reference) reference = useRef(null);
|
|
54
54
|
const theme = useTheme();
|
|
@@ -55,7 +55,7 @@ const typographySizeMap = new Map([['tiny', 'h5'], ['small', 'h5'], ['medium', '
|
|
|
55
55
|
const minHeightSizeMap = new Map([['tiny', '24px'], ['small', '32px'], ['medium', '40px'], ['large', '48px'], ['giant', '56px']]);
|
|
56
56
|
const minHeightSizeLinkMap = new Map([['tiny', '16px'], ['small', '20px'], ['medium', '24px'], ['large', '32px'], ['giant', '40px']]);
|
|
57
57
|
const alphaLoading = 0.2;
|
|
58
|
-
const Button = /*#__PURE__*/memo(
|
|
58
|
+
const Button = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
59
59
|
var _iconSizeMap;
|
|
60
60
|
if (!reference) reference = useRef(null);
|
|
61
61
|
const theme = useTheme();
|
|
@@ -9,7 +9,7 @@ import { bgColor, borderNone, cursorPointer, displayFlex, flexCol, flexRow, item
|
|
|
9
9
|
import { useTheme } from "../../theme";
|
|
10
10
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
11
11
|
import { classNames, getProp } from "../../utils";
|
|
12
|
-
const ButtonMore = /*#__PURE__*/memo(
|
|
12
|
+
const ButtonMore = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
|
|
@@ -58,7 +58,7 @@ const ButtonMore = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referenc
|
|
|
58
58
|
});
|
|
59
59
|
const renderOptions = () => {
|
|
60
60
|
return options.map((item, idx) => {
|
|
61
|
-
if (item !== null && item !== void 0 && item.hidden) return null;else if (
|
|
61
|
+
if (item !== null && item !== void 0 && item.hidden) return null;else if (/*#__PURE__*/isValidElement(item)) return item;else {
|
|
62
62
|
const icon = item === null || item === void 0 ? void 0 : item.icon;
|
|
63
63
|
const label = item === null || item === void 0 ? void 0 : item.label;
|
|
64
64
|
const className = (item === null || item === void 0 ? void 0 : item.className) || '';
|
|
@@ -13,7 +13,7 @@ const useDebouncedRippleCleanUp = (rippleCount, duration, cleanUpFunction) => {
|
|
|
13
13
|
return undefined;
|
|
14
14
|
}, [rippleCount, duration, cleanUpFunction]);
|
|
15
15
|
};
|
|
16
|
-
const Ripple = /*#__PURE__*/memo(
|
|
16
|
+
const Ripple = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
17
17
|
duration = 850,
|
|
18
18
|
color = 'system/standard',
|
|
19
19
|
circular = false,
|
package/components/card/body.js
CHANGED
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
|
|
7
7
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
8
8
|
import { classNames, refType as ref } from "../../utils";
|
|
9
|
-
const CardBody = /*#__PURE__*/memo(
|
|
9
|
+
const CardBody = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
10
10
|
if (!reference) reference = useRef(null);
|
|
11
11
|
|
|
12
12
|
// props priority: `inProps` > `themeDefaultProps`
|
package/components/card/extra.js
CHANGED
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
|
|
7
7
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
8
8
|
import { classNames, refType as ref } from "../../utils";
|
|
9
|
-
const CardExtra = /*#__PURE__*/memo(
|
|
9
|
+
const CardExtra = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
10
10
|
if (!reference) reference = useRef(null);
|
|
11
11
|
|
|
12
12
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
|
|
7
7
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
8
8
|
import { classNames, refType as ref } from "../../utils";
|
|
9
|
-
const CardFooter = /*#__PURE__*/memo(
|
|
9
|
+
const CardFooter = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
10
10
|
if (!reference) reference = useRef(null);
|
|
11
11
|
|
|
12
12
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { forwardRef, memo, useImperativeHandle, useMemo, useRef } from 'react';
|
|
8
8
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
9
9
|
import { classNames, refType as ref } from "../../utils";
|
|
10
|
-
const CardHeader = /*#__PURE__*/memo(
|
|
10
|
+
const CardHeader = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
11
|
if (!reference) reference = useRef(null);
|
|
12
12
|
|
|
13
13
|
// props priority: `inProps` > `themeDefaultProps`
|
package/components/card/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { CardBody } from "./body";
|
|
|
12
12
|
import { CardFooter } from "./footer";
|
|
13
13
|
import CardHeader from "./header";
|
|
14
14
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
15
|
-
const Card = /*#__PURE__*/memo(
|
|
15
|
+
const Card = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
16
16
|
if (!reference) reference = useRef(null);
|
|
17
17
|
const theme = useTheme();
|
|
18
18
|
const {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { memo, forwardRef } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
|
-
const Circle = /*#__PURE__*/memo(
|
|
6
|
+
const Circle = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
7
7
|
center,
|
|
8
8
|
color,
|
|
9
9
|
onMouseEnter,
|
|
@@ -4,7 +4,7 @@ import { useRef, memo, forwardRef } from 'react';
|
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
import { jsx, css } from '@emotion/core';
|
|
7
|
-
const Sector = /*#__PURE__*/memo(
|
|
7
|
+
const Sector = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
8
8
|
fill,
|
|
9
9
|
strokeColor,
|
|
10
10
|
strokeLinejoin,
|
|
@@ -7,7 +7,7 @@ import { jsx, css } from '@emotion/core';
|
|
|
7
7
|
import Circle from "./Circle";
|
|
8
8
|
import Sectors from "./Sectors";
|
|
9
9
|
import Sector from "./Sector";
|
|
10
|
-
const PieChart = /*#__PURE__*/memo(
|
|
10
|
+
const PieChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
11
11
|
expandOnHover,
|
|
12
12
|
renderSelectedItem,
|
|
13
13
|
type,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { memo, forwardRef } from 'react';
|
|
5
5
|
import { jsx } from '@emotion/core';
|
|
6
|
-
const Circle = /*#__PURE__*/memo(
|
|
6
|
+
const Circle = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
7
7
|
center,
|
|
8
8
|
color,
|
|
9
9
|
onMouseEnter,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useRef, memo, forwardRef } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { jsx, css } from '@emotion/core';
|
|
6
|
-
const Sector = /*#__PURE__*/memo(
|
|
6
|
+
const Sector = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
7
7
|
fill,
|
|
8
8
|
strokeColor,
|
|
9
9
|
strokeLinejoin,
|
|
@@ -9,7 +9,7 @@ import { typography } from "../../../styles/typography";
|
|
|
9
9
|
import Circle from "./Circle";
|
|
10
10
|
import Sectors from "./Sectors";
|
|
11
11
|
import Sector from "./Sector";
|
|
12
|
-
const PieChart = /*#__PURE__*/memo(
|
|
12
|
+
const PieChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
13
13
|
expandOnHover,
|
|
14
14
|
renderSelectedItem,
|
|
15
15
|
// type,
|
|
@@ -5,7 +5,7 @@ import { css, jsx } from '@emotion/core';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import Labels from "./Labels";
|
|
7
7
|
import { typography } from "../../../styles/typography";
|
|
8
|
-
const Bars = /*#__PURE__*/memo(
|
|
8
|
+
const Bars = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
9
9
|
// barsOpacity,
|
|
10
10
|
barsMargin,
|
|
11
11
|
barsColor,
|
|
@@ -9,7 +9,7 @@ import Labels from "./Labels";
|
|
|
9
9
|
import Grid from "./Grid";
|
|
10
10
|
import Bars from "./Bar";
|
|
11
11
|
import { randomString } from "../../../utils";
|
|
12
|
-
const BarChart = /*#__PURE__*/memo(
|
|
12
|
+
const BarChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
13
13
|
labelsVisible,
|
|
14
14
|
labelsCharacterWidth,
|
|
15
15
|
labelsCountY,
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import Labels from "./Labels";
|
|
7
7
|
import { randomString } from "../../../utils";
|
|
8
8
|
import { typography } from "../../../styles/typography";
|
|
9
|
-
const Bars = /*#__PURE__*/memo(
|
|
9
|
+
const Bars = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
10
10
|
// barsOpacity,
|
|
11
11
|
barsMargin,
|
|
12
12
|
barsColor,
|
|
@@ -9,7 +9,7 @@ import Labels from "./Labels";
|
|
|
9
9
|
import Grid from "./Grid";
|
|
10
10
|
import Bars from "./Bar";
|
|
11
11
|
import { randomString } from "../../../utils";
|
|
12
|
-
const BarChart = /*#__PURE__*/memo(
|
|
12
|
+
const BarChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
13
13
|
labelsVisible,
|
|
14
14
|
labelsCharacterWidth,
|
|
15
15
|
labelsCountY,
|
|
@@ -10,7 +10,7 @@ import Points from "./Point";
|
|
|
10
10
|
// import Title from './Title';
|
|
11
11
|
import Path from "./Path";
|
|
12
12
|
import { randomString } from "../../../utils";
|
|
13
|
-
const LineChart = /*#__PURE__*/memo(
|
|
13
|
+
const LineChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
14
14
|
labelsVisible,
|
|
15
15
|
labelsCharacterWidth,
|
|
16
16
|
labelsCountY,
|
|
@@ -10,7 +10,7 @@ import Points from "./Point";
|
|
|
10
10
|
// import Title from './Title';
|
|
11
11
|
import Path from "./Path";
|
|
12
12
|
import { randomString } from "../../../utils";
|
|
13
|
-
const BarChart = /*#__PURE__*/memo(
|
|
13
|
+
const BarChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
14
14
|
labelsVisible,
|
|
15
15
|
labelsCharacterWidth,
|
|
16
16
|
labelsCountY,
|
package/components/chip/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const iconSizeMap = new Map([['small', `16px`], ['medium', `20px`], ['large', `2
|
|
|
15
15
|
const typographySizeMap = new Map([['small', 'p3'], ['medium', 'p2'], ['large', 'p1']]);
|
|
16
16
|
const paddingSizeMap = new Map([['small', `0px 6px`], ['medium', `0px 8px`], ['large', `0px 10px`]]);
|
|
17
17
|
const minHeightSizeMap = new Map([['small', `20px`], ['medium', `24px`], ['large', `28px`]]);
|
|
18
|
-
const Chip = /*#__PURE__*/memo(
|
|
18
|
+
const Chip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
19
19
|
if (!reference) reference = useRef(null);
|
|
20
20
|
const theme = useTheme();
|
|
21
21
|
const {
|
|
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/core';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
6
6
|
import { displayBlock, parseWidthHeight, positionRelative } from "../../styles/general";
|
|
7
|
-
const Collapse = /*#__PURE__*/memo(
|
|
7
|
+
const Collapse = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
8
8
|
children,
|
|
9
9
|
className,
|
|
10
10
|
id,
|
|
@@ -8,7 +8,7 @@ import { bgColor, borderNone, flexShrink0, parseWidthHeight } from "../../styles
|
|
|
8
8
|
import { useTheme } from "../../theme";
|
|
9
9
|
import useThemeProps from "../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp } from "../../utils";
|
|
11
|
-
const Divider = /*#__PURE__*/memo(
|
|
11
|
+
const Divider = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
12
12
|
if (!reference) reference = useRef(null);
|
|
13
13
|
const theme = useTheme();
|
|
14
14
|
const {
|
|
@@ -127,7 +127,7 @@ const handleDownload = (url, name, onDownload) => {
|
|
|
127
127
|
const divideSizeMap = new Map([['B', 1], ['KB', 1024], ['MB', 1024 ** 2], ['GB', 1024 ** 3], ['TB', 1024 ** 4]]);
|
|
128
128
|
const viewTypeIconMap = new Map([['detail', 'ListView'], ['icon', 'IconView'], ['picture', 'ModuleView']]);
|
|
129
129
|
const viewTypeSwitchMap = new Map([['detail', 'icon'], ['icon', 'picture'], ['picture', 'detail']]);
|
|
130
|
-
const Attachment = /*#__PURE__*/memo(
|
|
130
|
+
const Attachment = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
131
131
|
if (!reference) reference = useRef(null);
|
|
132
132
|
const theme = useTheme();
|
|
133
133
|
const {
|
|
@@ -1442,17 +1442,17 @@ Attachment.propTypes = {
|
|
|
1442
1442
|
allowSort: PropTypes.bool,
|
|
1443
1443
|
/** Class for component. */
|
|
1444
1444
|
className: PropTypes.string,
|
|
1445
|
-
/** List attachment:<br />
|
|
1446
|
-
* [{<br />
|
|
1447
|
-
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1448
|
-
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/demo.jpg",<br />
|
|
1449
|
-
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1450
|
-
* "FileSize": 248837,<br />
|
|
1451
|
-
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1452
|
-
* "CreateUserID": "LEMONADMIN",<br />
|
|
1453
|
-
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1454
|
-
* "UserName": "Quản trị hệ thống"<br />
|
|
1455
|
-
* }, ...]
|
|
1445
|
+
/** List attachment:<br />
|
|
1446
|
+
* [{<br />
|
|
1447
|
+
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1448
|
+
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/demo.jpg",<br />
|
|
1449
|
+
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1450
|
+
* "FileSize": 248837,<br />
|
|
1451
|
+
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1452
|
+
* "CreateUserID": "LEMONADMIN",<br />
|
|
1453
|
+
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1454
|
+
* "UserName": "Quản trị hệ thống"<br />
|
|
1455
|
+
* }, ...]
|
|
1456
1456
|
*/
|
|
1457
1457
|
data: PropTypes.array,
|
|
1458
1458
|
/** The message to display when deleting files. */
|
|
@@ -1483,16 +1483,16 @@ Attachment.propTypes = {
|
|
|
1483
1483
|
onChange: PropTypes.func,
|
|
1484
1484
|
/** Download attached event, if not it will use default. */
|
|
1485
1485
|
onDownload: PropTypes.func,
|
|
1486
|
-
/**
|
|
1487
|
-
* event when removed file(s)
|
|
1488
|
-
*
|
|
1489
|
-
* return data: {<br/>
|
|
1490
|
-
* attached: [Files] (insist old and all new files )<br/>
|
|
1491
|
-
* allNewAttached: [Files]<br/>
|
|
1492
|
-
* oldAttached: [Files]<br/>
|
|
1493
|
-
* removedAttached: [Files]<br/>
|
|
1494
|
-
* element: [NodeList (just removed)]<br/>
|
|
1495
|
-
* }
|
|
1486
|
+
/**
|
|
1487
|
+
* event when removed file(s)
|
|
1488
|
+
*
|
|
1489
|
+
* return data: {<br/>
|
|
1490
|
+
* attached: [Files] (insist old and all new files )<br/>
|
|
1491
|
+
* allNewAttached: [Files]<br/>
|
|
1492
|
+
* oldAttached: [Files]<br/>
|
|
1493
|
+
* removedAttached: [Files]<br/>
|
|
1494
|
+
* element: [NodeList (just removed)]<br/>
|
|
1495
|
+
* }
|
|
1496
1496
|
*/
|
|
1497
1497
|
onRemove: PropTypes.func,
|
|
1498
1498
|
/** View attached event, if not it will use default. */
|
|
@@ -7,7 +7,7 @@ import { useTheme } from "../../../theme";
|
|
|
7
7
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
8
8
|
import { classNames, date as moment } from "../../../utils";
|
|
9
9
|
import { generateCalendarCSS, isAfterLimit, isBeforeLimit, isValidDate, onUpdateCalendar, renderHeader, renderNavigator } from "./function";
|
|
10
|
-
const Calendar = /*#__PURE__*/memo(
|
|
10
|
+
const Calendar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
11
11
|
var _zoomLevel$get, _zoomLevel$get2;
|
|
12
12
|
if (!reference) reference = useRef(null);
|
|
13
13
|
const theme = useTheme();
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "../../../theme";
|
|
|
9
9
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
10
10
|
import { getProp } from "../../../utils";
|
|
11
11
|
import { generateCalendarCSS, isValidDate, onUpdateCalendar, renderHeader, renderNavigator } from "./function";
|
|
12
|
-
const CalendarRange = /*#__PURE__*/memo(
|
|
12
|
+
const CalendarRange = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
const {
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "../../../theme";
|
|
|
9
9
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp, randomString, refType as ref } from "../../../utils";
|
|
11
11
|
const padding = 0.75;
|
|
12
|
-
const Checkbox = /*#__PURE__*/memo(
|
|
12
|
+
const Checkbox = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
|
|
15
15
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import { displayBlock, pointerEventsNone, positionRelative, textColor, userSelectNone } from "../../../styles/general";
|
|
8
8
|
import { getProp } from "../../../utils";
|
|
9
9
|
import { useTheme } from "../../../theme";
|
|
10
|
-
const Control = /*#__PURE__*/memo(
|
|
10
|
+
const Control = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
11
11
|
children,
|
|
12
12
|
className,
|
|
13
13
|
disabled,
|
|
@@ -14,7 +14,7 @@ import useDateInputState from "./useDateInputState";
|
|
|
14
14
|
import useIsFocused from "./useIsFocused";
|
|
15
15
|
import useKeyboardInputEvent from "./useKeyboardInputEvent";
|
|
16
16
|
import { getInputSelectedState, isFieldFullValue, useEventCallback, useInputSelection, validateDateTime } from "./utils";
|
|
17
|
-
const DateInput = /*#__PURE__*/memo(
|
|
17
|
+
const DateInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
18
18
|
if (!reference) reference = useRef(null);
|
|
19
19
|
|
|
20
20
|
// props priority: `inProps` > `themeDefaultProps`
|
|
@@ -64,7 +64,7 @@ const getDateFormats = (locale, minZoom) => {
|
|
|
64
64
|
}
|
|
65
65
|
return formatMap.get(minZoom);
|
|
66
66
|
};
|
|
67
|
-
const DatePicker = /*#__PURE__*/memo(
|
|
67
|
+
const DatePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
68
68
|
var _getDateFormats, _pickerReturnFormat$g, _ipRef$current, _ipRef$current2;
|
|
69
69
|
if (!reference) reference = useRef(null);
|
|
70
70
|
const theme = useTheme();
|
|
@@ -66,7 +66,7 @@ const isAfter = (max, time) => {
|
|
|
66
66
|
const parseDate = day => {
|
|
67
67
|
return Date.parse(new Date(day));
|
|
68
68
|
};
|
|
69
|
-
const DateRangePicker = /*#__PURE__*/memo(
|
|
69
|
+
const DateRangePicker = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
70
70
|
var _periodOptions$dataSo;
|
|
71
71
|
// props priority: `inProps` > `themeDefaultProps`
|
|
72
72
|
const props = useThemeProps({
|
|
@@ -554,6 +554,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, ref
|
|
|
554
554
|
updateValues(tempValues.current);
|
|
555
555
|
setButtonState();
|
|
556
556
|
closePicker();
|
|
557
|
+
setOpenState(false);
|
|
557
558
|
};
|
|
558
559
|
const onConfirm = () => {
|
|
559
560
|
setButtonState();
|
|
@@ -725,7 +726,6 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, ref
|
|
|
725
726
|
});
|
|
726
727
|
};
|
|
727
728
|
const closePicker = () => {
|
|
728
|
-
setOpenState(false);
|
|
729
729
|
const backGr = document.getElementById(unique.backGr);
|
|
730
730
|
if (!backGr) return;
|
|
731
731
|
const picker = backGr.querySelector(`#${unique.picker}`);
|
|
@@ -754,6 +754,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, ref
|
|
|
754
754
|
const onClickOutside = e => {
|
|
755
755
|
if (ipConRef.current && !ipConRef.current.contains(e.target) && ipRef.current && !ipRef.current.contains(e.target) && pickerRef.current && !pickerRef.current.contains(e.target)) {
|
|
756
756
|
controls ? onCancel() : closePicker();
|
|
757
|
+
setOpenState(false);
|
|
757
758
|
}
|
|
758
759
|
};
|
|
759
760
|
const triggerFocus = () => {
|
|
@@ -1084,7 +1085,7 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, ref
|
|
|
1084
1085
|
scrollHeight,
|
|
1085
1086
|
offsetHeight
|
|
1086
1087
|
} = e.target;
|
|
1087
|
-
if (scrollHeight <= Math.ceil(scrollTop) + offsetHeight && dropdownListRef.current) {
|
|
1088
|
+
if (scrollHeight <= Math.ceil(scrollTop + 2) + offsetHeight && dropdownListRef.current) {
|
|
1088
1089
|
var _dropdownListRef$curr;
|
|
1089
1090
|
const length = (_dropdownListRef$curr = dropdownListRef.current.children) === null || _dropdownListRef$curr === void 0 ? void 0 : _dropdownListRef$curr.length;
|
|
1090
1091
|
!!onLoadMore && onLoadMore({
|
|
@@ -1111,10 +1112,8 @@ const DateRangePicker = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, ref
|
|
|
1111
1112
|
})) : null, jsx("div", {
|
|
1112
1113
|
style: {
|
|
1113
1114
|
width: '100%',
|
|
1114
|
-
maxHeight:
|
|
1115
|
-
overflowY: 'scroll'
|
|
1116
|
-
boxSizing: 'border-box',
|
|
1117
|
-
paddingBottom: 36
|
|
1115
|
+
maxHeight: 175,
|
|
1116
|
+
overflowY: 'scroll'
|
|
1118
1117
|
},
|
|
1119
1118
|
ref: dropdownListRef,
|
|
1120
1119
|
onScroll: onLoadMoreHandler
|
|
@@ -47,7 +47,7 @@ const uniqBy = (arr, iteratee) => {
|
|
|
47
47
|
return true;
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
const Dropdown = /*#__PURE__*/memo(
|
|
50
|
+
const Dropdown = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
51
51
|
if (!reference) reference = useRef(null);
|
|
52
52
|
const theme = useTheme();
|
|
53
53
|
const {
|
|
@@ -10,7 +10,7 @@ import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
|
10
10
|
import { classNames, getProp } from "../../../utils";
|
|
11
11
|
const regexBetween = /[^{}]+(?=})/g;
|
|
12
12
|
const regexInclude = /{|}/g;
|
|
13
|
-
const DropdownBox = /*#__PURE__*/memo(
|
|
13
|
+
const DropdownBox = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
14
14
|
if (!reference) reference = useRef(null);
|
|
15
15
|
const theme = useTheme();
|
|
16
16
|
const {
|
|
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/core';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { Children, forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';
|
|
6
6
|
import { useTheme } from "../../../theme";
|
|
7
|
-
const FormGroup = /*#__PURE__*/memo(
|
|
7
|
+
const FormGroup = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(({
|
|
8
8
|
fullWidth,
|
|
9
9
|
oneHelperText,
|
|
10
10
|
marginRight,
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "../../../theme";
|
|
|
9
9
|
import useThemeProps from "../../../theme/utils/useThemeProps";
|
|
10
10
|
import { classNames, getProp } from "../../../utils";
|
|
11
11
|
const colorMap = new Map([['default', 'semantic/danger'], ['success', 'semantic/success'], ['warning', 'semantic/warning'], ['danger', 'semantic/danger'], ['info', 'semantic/info']]);
|
|
12
|
-
const HelperText = /*#__PURE__*/memo(
|
|
12
|
+
const HelperText = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((inProps, reference) => {
|
|
13
13
|
if (!reference) reference = useRef(null);
|
|
14
14
|
const theme = useTheme();
|
|
15
15
|
const {
|