diginet-core-ui 1.3.37 → 1.3.39
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/assets/avatar/default.svg +3 -3
- package/assets/images/icons/wifi.svg +3 -3
- package/assets/images/menu/dhr/ALL.svg +6 -6
- package/assets/images/menu/dhr/D00.svg +12 -12
- package/assets/images/menu/dhr/D09.svg +8 -8
- package/assets/images/menu/dhr/D13.svg +10 -10
- package/assets/images/menu/dhr/D15.svg +10 -10
- package/assets/images/menu/dhr/D21.svg +10 -10
- package/assets/images/menu/dhr/D25.svg +11 -11
- package/assets/images/menu/dhr/D29.svg +11 -11
- package/assets/images/menu/dhr/D38.svg +6 -6
- package/assets/images/menu/dhr/D39.svg +10 -10
- package/assets/images/menu/dhr/D51.svg +12 -12
- package/assets/images/menu/dhr/D52.svg +16 -16
- package/assets/images/menu/dhr/D77.svg +16 -16
- package/assets/images/menu/dhr/D84.svg +12 -12
- package/assets/images/menu/dhr/D89.svg +8 -8
- package/assets/images/menu/dhr/Default.svg +13 -13
- package/assets/images/menu/dhr/MHRM00N0001.svg +14 -14
- package/assets/images/menu/dhr/MHRM09N0002.svg +3 -3
- package/assets/images/menu/dhr/MHRM09N0003.svg +25 -25
- package/assets/images/menu/dhr/MHRM09N0004.svg +14 -14
- package/assets/images/menu/dhr/MHRM09N0005.svg +7 -7
- package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRM25N0001.svg +26 -26
- package/assets/images/menu/dhr/MHRM29N0001.svg +30 -30
- package/assets/images/menu/dhr/MHRM29N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM29N0003.svg +17 -0
- package/assets/images/menu/dhr/MHRM29N0015.svg +63 -63
- package/assets/images/menu/dhr/MHRM39N0012.svg +43 -43
- package/assets/images/menu/dhr/MHRM39N0013.svg +24 -24
- package/assets/images/menu/dhr/MHRM39N0014.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0015.svg +36 -36
- package/assets/images/menu/dhr/MHRM39N0016.svg +23 -23
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
- package/assets/images/menu/dhr/MHRM84N0001.svg +27 -27
- package/assets/images/menu/dhr/MHRM84N0002.svg +24 -24
- package/assets/images/menu/dhr/MHRM89N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRP00N0001.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0001.svg +22 -22
- package/assets/images/menu/dhr/MHRP09N0002.svg +19 -19
- package/assets/images/menu/dhr/MHRP09N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0004.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0005.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0007.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0008.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0009.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0010.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0011.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0012.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0013.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP09N0015.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0016.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0017.svg +18 -18
- package/assets/images/menu/dhr/MHRP09N0018.svg +12 -12
- package/assets/images/menu/dhr/MHRP09N0019.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0020.svg +17 -17
- package/assets/images/menu/dhr/MHRP09N0021.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0022.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0023.svg +8 -8
- package/assets/images/menu/dhr/MHRP09N0024.svg +15 -15
- package/assets/images/menu/dhr/MHRP09N0025.svg +16 -16
- package/assets/images/menu/dhr/MHRP09N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP09N0027.svg +10 -10
- package/assets/images/menu/dhr/MHRP09N0028.svg +6 -6
- package/assets/images/menu/dhr/MHRP09N0029.svg +14 -14
- package/assets/images/menu/dhr/MHRP09N0030.svg +4 -4
- package/assets/images/menu/dhr/MHRP09N0031.svg +5 -5
- package/assets/images/menu/dhr/MHRP09N0032.svg +7 -7
- package/assets/images/menu/dhr/MHRP13N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP21N0001.svg +12 -12
- package/assets/images/menu/dhr/MHRP21N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP25N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP25N0002.svg +16 -16
- package/assets/images/menu/dhr/MHRP25N0003.svg +38 -38
- package/assets/images/menu/dhr/MHRP25N0004.svg +17 -17
- package/assets/images/menu/dhr/MHRP25N0005.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0001.svg +18 -18
- package/assets/images/menu/dhr/MHRP29N0002.svg +15 -15
- package/assets/images/menu/dhr/MHRP29N0003.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0004.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0005.svg +21 -21
- package/assets/images/menu/dhr/MHRP29N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP29N0008.svg +20 -20
- package/assets/images/menu/dhr/MHRP29N0009.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0010.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0011.svg +12 -12
- package/assets/images/menu/dhr/MHRP29N0012.svg +7 -7
- package/assets/images/menu/dhr/MHRP29N0013.svg +27 -27
- package/assets/images/menu/dhr/MHRP29N0014.svg +32 -32
- package/assets/images/menu/dhr/MHRP29N0016.svg +54 -54
- package/assets/images/menu/dhr/MHRP29N0017.svg +24 -24
- package/assets/images/menu/dhr/MHRP29N0018.svg +44 -44
- package/assets/images/menu/dhr/MHRP29N0019.svg +17 -17
- package/assets/images/menu/dhr/MHRP29N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRP29N0021.svg +8 -8
- package/assets/images/menu/dhr/MHRP29N0022.svg +9 -9
- package/assets/images/menu/dhr/MHRP29N0023.svg +22 -22
- package/assets/images/menu/dhr/MHRP38N0001.svg +13 -13
- package/assets/images/menu/dhr/MHRP38N0002.svg +14 -14
- package/assets/images/menu/dhr/MHRP39N0001.svg +15 -15
- package/assets/images/menu/dhr/MHRP39N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0004.svg +22 -22
- package/assets/images/menu/dhr/MHRP39N0005.svg +16 -16
- package/assets/images/menu/dhr/MHRP39N0006.svg +17 -17
- package/assets/images/menu/dhr/MHRP39N0007.svg +13 -13
- package/assets/images/menu/dhr/MHRP39N0008.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0009.svg +3 -3
- package/assets/images/menu/dhr/MHRP39N0010.svg +7 -7
- package/assets/images/menu/dhr/MHRP39N0011.svg +14 -14
- package/assets/images/menu/dhr/MHRP39N0013.svg +10 -10
- package/assets/images/menu/dhr/MHRP39N0014.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0015.svg +5 -5
- package/assets/images/menu/dhr/MHRP39N0017.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N0018.svg +11 -11
- package/assets/images/menu/dhr/MHRP39N1222.svg +12 -12
- package/assets/images/menu/dhr/MHRP51N0001.svg +9 -9
- package/assets/images/menu/dhr/MHRP51N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRP52N0001.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0002.svg +21 -21
- package/assets/images/menu/dhr/MHRP52N0003.svg +16 -16
- package/assets/images/menu/dhr/MHRP75N0001.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0002.svg +25 -25
- package/assets/images/menu/dhr/MHRP75N0003.svg +3 -3
- package/assets/images/menu/dhr/MHRP75N0006.svg +14 -14
- package/assets/images/menu/dhr/MHRP75N0007.svg +19 -19
- package/assets/images/menu/dhr/MHRP75N0008.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0007.svg +28 -28
- package/assets/images/menu/dhr/MHRP77N0008.svg +17 -17
- package/assets/images/menu/dhr/MHRP77N0009.svg +19 -19
- package/assets/images/menu/dhr/MHRP77N0010.svg +20 -20
- package/assets/images/menu/dhr/MHRP89N1000.svg +6 -6
- package/assets/images/menu/dhr/MHRP89N1001.svg +6 -6
- package/assets/images/menu/dhr/TASK.svg +9 -9
- package/assets/images/menu/dhr/W00F0001.svg +3 -3
- package/assets/images/menu/dhr/W00F0002.svg +3 -3
- package/assets/images/menu/dhr/W00F0003.svg +3 -3
- package/assets/images/menu/dhr/W00F0004.svg +3 -3
- package/assets/images/menu/dhr/W09F2000-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W09F2000.svg +6 -6
- package/assets/images/menu/dhr/W09F2002-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W09F2005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W09F2020-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2022-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2150-WEB5.svg +16 -16
- package/assets/images/menu/dhr/W09F2152-WEB5.svg +20 -20
- package/assets/images/menu/dhr/W09F2160-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W09F2162-WEB5.svg +18 -18
- package/assets/images/menu/dhr/W29F4006-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F2260-WEB5.svg +15 -15
- package/assets/images/menu/dhr/W75F2261-WEB5.svg +19 -19
- package/assets/images/menu/dhr/W75F3005-WEB5.svg +13 -13
- package/assets/images/menu/dhr/W75F4070-WEB5.svg +21 -21
- package/assets/images/menu/dhr/W75F4071-WEB5.svg +17 -17
- package/assets/images/menu/dhr/W75F4100-WEB5.svg +14 -14
- package/assets/images/menu/dhr/W77F1011.svg +19 -19
- package/assets/images/menu/dhr/W77F1013.svg +22 -22
- package/assets/images/menu/erp/D05.svg +8 -8
- package/assets/images/menu/erp/D06.svg +4 -4
- package/assets/images/menu/erp/D90R.svg +9 -9
- package/assets/images/menu/erp/DBC.svg +9 -9
- package/assets/images/menu/erp/W00F0001.svg +3 -3
- package/assets/images/menu/erp/W00F0002.svg +3 -3
- package/assets/images/menu/erp/W00F0003.svg +3 -3
- package/assets/images/menu/erp/W00F0004.svg +3 -3
- package/assets/images/menu/erp/W05F0001.svg +16 -16
- package/assets/images/menu/erp/W05F0001N0000.svg +16 -16
- package/assets/images/menu/erp/W05F0004N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0006N0000.svg +30 -30
- package/assets/images/menu/erp/W05F0007N0000.svg +6 -6
- package/assets/images/menu/erp/W05F0008N0000.svg +14 -14
- package/assets/images/menu/erp/W05F0011N0000.svg +20 -20
- package/assets/images/menu/erp/W05F0013N0000.svg +9 -9
- package/assets/images/menu/erp/W05F4000N0000.svg +9 -9
- package/assets/images/menu/erp/W06F0001.svg +17 -17
- package/assets/images/menu/erp/W06F0001N0000.svg +17 -17
- package/assets/images/menu/erp/W06F0004N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0005N0000.svg +22 -22
- package/assets/images/menu/erp/W06F0006N0000.svg +55 -55
- package/assets/images/menu/erp/W06F0008N0000.svg +17 -17
- package/assets/images/menu/erp/W94F1000N0000.svg +9 -9
- package/assets/images/menu/erp/W94F1000N0001.svg +9 -9
- package/assets/images/menu/erp/WA3F1025.svg +5 -5
- package/assets/images/menu/erp/WA3F2100.svg +10 -10
- package/components/accordion/css.js +42 -35
- package/components/accordion/details.js +48 -42
- package/components/accordion/group.js +88 -82
- package/components/accordion/index.js +54 -48
- package/components/accordion/summary.js +52 -43
- package/components/alert/notify.js +16 -16
- package/components/avatar/index.js +19 -19
- package/components/badge/index.js +5 -5
- package/components/button/icon.js +21 -21
- package/components/button/index.js +13 -13
- package/components/chart/Pie/Sector.js +2 -2
- package/components/chart/Pie-v2/Sector.js +2 -2
- package/components/chip/attach.js +5 -5
- package/components/divider/index.js +17 -15
- package/components/form-control/attachment/index.js +20 -20
- package/components/form-control/calendar/function.js +295 -289
- package/components/form-control/calendar/index.js +16 -16
- package/components/form-control/checkbox/index.js +5 -5
- package/components/form-control/date-picker/index.js +7 -3
- package/components/form-control/date-range-picker/index.js +12 -8
- package/components/form-control/dropdown/index.js +7 -3
- package/components/form-control/input-base/index.js +32 -27
- package/components/form-control/money-input/index.js +17 -17
- package/components/form-control/number-input/index.js +11 -11
- package/components/form-control/number-input/index2.js +432 -0
- package/components/form-control/phone-input/index.js +7 -7
- package/components/form-control/radio/index.js +98 -146
- package/components/form-control/text-input/index.js +4 -4
- package/components/form-control/time-picker/index.js +305 -300
- package/components/form-control/toggle/index.js +92 -90
- package/components/index.js +1 -1
- package/components/paging/page-selector.js +53 -49
- package/components/popover/index.js +21 -21
- package/components/popup/index.js +5 -1
- package/components/popup/proposals_popup.js +5 -1
- package/components/popup/v2/index.js +12 -8
- package/components/progress/circular.js +12 -12
- package/components/rating/index.js +3 -3
- package/components/tab/tab-container.js +2 -2
- package/components/tab/tab-header.js +2 -2
- package/components/tab/tab-panel.js +2 -2
- package/components/tab/tab.js +2 -2
- package/components/transfer/index.js +3 -3
- package/components/tree-view/index.js +38 -38
- package/components/typography/index.js +11 -11
- package/icons/effect.js +15 -15
- package/package.json +45 -45
- package/readme.md +677 -668
- package/styles/color-helper.js +103 -103
- package/styles/colors.js +7 -7
- package/styles/general.js +11 -11
- package/styles/utils.js +5 -5
- package/theme/set-theme.js +3 -3
- package/utils/array/array.js +36 -36
- package/utils/date.js +56 -56
- package/utils/error/error.js +2 -2
- package/utils/error/errors.js +99 -99
- package/utils/number.js +6 -6
- package/utils/render-portal.js +5 -1
- package/utils/renderIcon.js +5 -5
- package/utils/useOnClickOutside.js +2 -2
- package/utils/usePortal.js +9 -9
- package/utils/validate.js +33 -33
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { memo, useEffect, useRef, useContext, forwardRef } from 'react';
|
|
5
|
-
import
|
|
4
|
+
import { memo, useEffect, useRef, useContext, forwardRef, useMemo, useImperativeHandle } from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
6
|
import { jsx } from '@emotion/core';
|
|
7
7
|
import { renderIcon } from '../../utils';
|
|
8
|
-
import {
|
|
8
|
+
import { SummaryRootCSS } from './css';
|
|
9
9
|
import AccordionContext from './context';
|
|
10
10
|
const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
11
11
|
expandIcon,
|
|
@@ -16,12 +16,9 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
16
16
|
onClick,
|
|
17
17
|
children,
|
|
18
18
|
expandIconProps,
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
ref = useRef(null);
|
|
23
|
-
}
|
|
24
|
-
|
|
19
|
+
style
|
|
20
|
+
}, reference) => {
|
|
21
|
+
const ref = useRef(null);
|
|
25
22
|
const expandIconRef = useRef(null);
|
|
26
23
|
const timer = useRef(null);
|
|
27
24
|
const {
|
|
@@ -81,7 +78,7 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
81
78
|
}, (detailsEl.firstChild.childNodes.length || 2.5) * 100);
|
|
82
79
|
}
|
|
83
80
|
} else {
|
|
84
|
-
if (detailsEl) {
|
|
81
|
+
if (detailsEl && detailsEl.style.height) {
|
|
85
82
|
detailsEl.style.height = detailsEl.scrollHeight + 'px';
|
|
86
83
|
|
|
87
84
|
if (timer.current) {
|
|
@@ -116,59 +113,71 @@ const AccordionSummary = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
116
113
|
showHideDetailHandler('hide');
|
|
117
114
|
}
|
|
118
115
|
}, [expandState]);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
116
|
+
useImperativeHandle(reference, () => {
|
|
117
|
+
const currentRef = ref.current || {};
|
|
118
|
+
const _instance = {}; // methods
|
|
119
|
+
|
|
120
|
+
_instance.__proto__ = {}; // hidden methods
|
|
121
|
+
|
|
122
|
+
currentRef.instance = _instance;
|
|
123
|
+
return currentRef;
|
|
124
|
+
});
|
|
125
|
+
return useMemo(() => {
|
|
126
|
+
return jsx("div", {
|
|
127
|
+
css: SummaryRootCSS,
|
|
128
|
+
ref: ref,
|
|
129
|
+
tabIndex: "-1",
|
|
130
|
+
onClick: onClickHandler,
|
|
131
|
+
style: style,
|
|
132
|
+
className: ['DGN-UI-Accordion-Summary', disabled ? 'disabled' : '', expandIcon ? expandIconAt : '', className, background === true ? 'background' : '', expandState ? 'expanding' : ''].join(' ').trim().replace(/\s+/g, ' ')
|
|
133
|
+
}, jsx("div", {
|
|
134
|
+
className: 'DGN-UI-Accordion-Summary-Content'
|
|
135
|
+
}, children), !!expandIcon && jsx("div", {
|
|
136
|
+
className: 'Accordion-Icon-Root'
|
|
137
|
+
}, jsx("div", { ...expandIconProps,
|
|
138
|
+
ref: expandIconRef,
|
|
139
|
+
className: ['Accordion-Icon', collapseIcon ? '' : 'rotate-able', expandIconProps.className ? expandIconProps.className : ''].join(' ').trim()
|
|
140
|
+
}, typeof expandIcon === 'string' ? renderIcon(expandIcon, 'effect', {
|
|
141
|
+
className: 'Accordion-Expand-Icon'
|
|
142
|
+
}) : jsx("span", {
|
|
143
|
+
className: 'Accordion-Expand-Icon effect'
|
|
144
|
+
}, expandIcon), !!collapseIcon && (typeof collapseIcon === 'string' ? renderIcon(collapseIcon, 'effect', {
|
|
145
|
+
className: 'Accordion-Collapse-Icon'
|
|
146
|
+
}) : jsx("span", {
|
|
147
|
+
className: 'Accordion-Collapse-Icon effect'
|
|
148
|
+
}, collapseIcon)))));
|
|
149
|
+
}, [expandIcon, expandIconAt, className, background, children, collapseIcon, expandIconProps, expandState]);
|
|
142
150
|
}));
|
|
143
151
|
AccordionSummary.defaultProps = {
|
|
144
152
|
expandIconAt: 'start',
|
|
145
153
|
expandIconProps: {},
|
|
146
154
|
className: '',
|
|
147
|
-
expandIcon: 'ArrowRight'
|
|
155
|
+
expandIcon: 'ArrowRight',
|
|
156
|
+
style: {}
|
|
148
157
|
};
|
|
149
158
|
AccordionSummary.propTypes = {
|
|
150
159
|
/** the icon to display for expand icon */
|
|
151
|
-
expandIcon: any,
|
|
160
|
+
expandIcon: PropTypes.any,
|
|
152
161
|
|
|
153
162
|
/** the icon to display for collapse icon */
|
|
154
|
-
collapseIcon: any,
|
|
163
|
+
collapseIcon: PropTypes.any,
|
|
155
164
|
|
|
156
165
|
/** the position to render expand icon */
|
|
157
|
-
expandIconAt: oneOf(['start', 'end']),
|
|
166
|
+
expandIconAt: PropTypes.oneOf(['start', 'end']),
|
|
158
167
|
|
|
159
168
|
/** background for label summary */
|
|
160
|
-
background: oneOfType([string, bool]),
|
|
169
|
+
background: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
161
170
|
|
|
162
171
|
/** class for Summary component */
|
|
163
|
-
className: string,
|
|
172
|
+
className: PropTypes.string,
|
|
164
173
|
|
|
165
174
|
/** The element to display in alert like text props (priority) */
|
|
166
|
-
children: node,
|
|
175
|
+
children: PropTypes.node,
|
|
167
176
|
|
|
168
177
|
/** props of expand and collapse icons */
|
|
169
|
-
expandIconProps: any,
|
|
178
|
+
expandIconProps: PropTypes.any,
|
|
170
179
|
|
|
171
|
-
/**
|
|
172
|
-
|
|
180
|
+
/** style inline of component */
|
|
181
|
+
style: PropTypes.object
|
|
173
182
|
};
|
|
174
183
|
export default AccordionSummary;
|
|
@@ -152,28 +152,28 @@ AlertNotify.defaultProps = {
|
|
|
152
152
|
}
|
|
153
153
|
};
|
|
154
154
|
AlertNotify.propTypes = {
|
|
155
|
-
/**
|
|
156
|
-
* used to set position of Alert (is a string or an object)
|
|
157
|
-
* string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
|
|
155
|
+
/**
|
|
156
|
+
* used to set position of Alert (is a string or an object)
|
|
157
|
+
* string is center (obligatory) as {vertical: 'center', horizontal: 'center'}
|
|
158
158
|
*/
|
|
159
159
|
position: PropTypes.oneOfType([PropTypes.oneOf(['center']), PropTypes.shape({
|
|
160
160
|
vertical: PropTypes.oneOf(['top', 'center', 'bottom']).isRequired,
|
|
161
161
|
horizontal: PropTypes.oneOf(['left', 'center', 'right']).isRequired
|
|
162
162
|
})]),
|
|
163
163
|
|
|
164
|
-
/**
|
|
165
|
-
* get the function used to add a new alert<br />
|
|
166
|
-
* 2 parameters:<br />
|
|
167
|
-
* + message: message for notify<br />
|
|
168
|
-
* + options: is an object insist {<br />
|
|
169
|
-
* position: position other than the default (if necessary)<br />
|
|
170
|
-
* duration: new duration,<br />
|
|
171
|
-
* color: new color,<br />
|
|
172
|
-
* progressing: new progressing value,<br />
|
|
173
|
-
* autoDisappear: new autoDisappear value,<br />
|
|
174
|
-
* size: new autoDisappear,<br />
|
|
175
|
-
* and any props else in Alert component <br />
|
|
176
|
-
* }
|
|
164
|
+
/**
|
|
165
|
+
* get the function used to add a new alert<br />
|
|
166
|
+
* 2 parameters:<br />
|
|
167
|
+
* + message: message for notify<br />
|
|
168
|
+
* + options: is an object insist {<br />
|
|
169
|
+
* position: position other than the default (if necessary)<br />
|
|
170
|
+
* duration: new duration,<br />
|
|
171
|
+
* color: new color,<br />
|
|
172
|
+
* progressing: new progressing value,<br />
|
|
173
|
+
* autoDisappear: new autoDisappear value,<br />
|
|
174
|
+
* size: new autoDisappear,<br />
|
|
175
|
+
* and any props else in Alert component <br />
|
|
176
|
+
* }
|
|
177
177
|
*/
|
|
178
178
|
getAddNotify: PropTypes.func.isRequired,
|
|
179
179
|
|
|
@@ -498,18 +498,18 @@ Avatar.propTypes = {
|
|
|
498
498
|
/** source of file (http:// or https://) */
|
|
499
499
|
src: PropTypes.string,
|
|
500
500
|
|
|
501
|
-
/**
|
|
502
|
-
* it is used to display the default if there is no src<br />
|
|
503
|
-
* if undefined, will display icons available in the icons store
|
|
501
|
+
/**
|
|
502
|
+
* it is used to display the default if there is no src<br />
|
|
503
|
+
* if undefined, will display icons available in the icons store
|
|
504
504
|
*/
|
|
505
505
|
defaultSrc: PropTypes.string,
|
|
506
506
|
|
|
507
507
|
/** the direction to display more info */
|
|
508
508
|
direction: PropTypes.oneOf(['top', 'down', 'left', 'right']),
|
|
509
509
|
|
|
510
|
-
/**
|
|
511
|
-
* data to display when hoverAble is true<br />
|
|
512
|
-
* data is an object or function return a jsx element
|
|
510
|
+
/**
|
|
511
|
+
* data to display when hoverAble is true<br />
|
|
512
|
+
* data is an object or function return a jsx element
|
|
513
513
|
*/
|
|
514
514
|
data: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
|
|
515
515
|
|
|
@@ -525,19 +525,19 @@ Avatar.propTypes = {
|
|
|
525
525
|
/** any props else */
|
|
526
526
|
props: PropTypes.any,
|
|
527
527
|
|
|
528
|
-
/**
|
|
529
|
-
* ref methods
|
|
530
|
-
*
|
|
531
|
-
* * option(): Gets all UI component properties
|
|
532
|
-
* * Returns value - object
|
|
533
|
-
* * option(optionName): Gets the value of a single property
|
|
534
|
-
* * @param {optionName} - string
|
|
535
|
-
* * Returns value - any
|
|
536
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
537
|
-
* * @param {optionName} - string
|
|
538
|
-
* * @param {optionValue} - any
|
|
539
|
-
* * option(options): Updates the values of several properties
|
|
540
|
-
* * @param {options} - object
|
|
528
|
+
/**
|
|
529
|
+
* ref methods
|
|
530
|
+
*
|
|
531
|
+
* * option(): Gets all UI component properties
|
|
532
|
+
* * Returns value - object
|
|
533
|
+
* * option(optionName): Gets the value of a single property
|
|
534
|
+
* * @param {optionName} - string
|
|
535
|
+
* * Returns value - any
|
|
536
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
537
|
+
* * @param {optionName} - string
|
|
538
|
+
* * @param {optionValue} - any
|
|
539
|
+
* * option(options): Updates the values of several properties
|
|
540
|
+
* * @param {options} - object
|
|
541
541
|
*/
|
|
542
542
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
543
543
|
current: PropTypes.instanceOf(Element)
|
|
@@ -210,11 +210,11 @@ Badge.propTypes = {
|
|
|
210
210
|
/** other icon props when use prop name */
|
|
211
211
|
iconProps: PropTypes.object,
|
|
212
212
|
|
|
213
|
-
/** size of Badge
|
|
214
|
-
*
|
|
215
|
-
* * medium (dot 8px, typography p3)
|
|
216
|
-
* * large (button 10px, typography p2)
|
|
217
|
-
* * giant (button 12px, typography p1)
|
|
213
|
+
/** size of Badge
|
|
214
|
+
*
|
|
215
|
+
* * medium (dot 8px, typography p3)
|
|
216
|
+
* * large (button 10px, typography p2)
|
|
217
|
+
* * giant (button 12px, typography p1)
|
|
218
218
|
* */
|
|
219
219
|
size: PropTypes.oneOf(['medium', 'large', 'giant']),
|
|
220
220
|
|
|
@@ -359,14 +359,14 @@ ButtonIcon.propTypes = {
|
|
|
359
359
|
/** custom hover color for button with color 'default' */
|
|
360
360
|
colorHover: PropTypes.string,
|
|
361
361
|
|
|
362
|
-
/**
|
|
363
|
-
* size of button
|
|
364
|
-
*
|
|
365
|
-
* * tiny (button 24px, icon 16px)
|
|
366
|
-
* * small (button 32px, icon 20px)
|
|
367
|
-
* * medium (button 40px, icon 24px)
|
|
368
|
-
* * large (button 48px, icon 32px)
|
|
369
|
-
* * giant (button 56px, icon 40px)
|
|
362
|
+
/**
|
|
363
|
+
* size of button
|
|
364
|
+
*
|
|
365
|
+
* * tiny (button 24px, icon 16px)
|
|
366
|
+
* * small (button 32px, icon 20px)
|
|
367
|
+
* * medium (button 40px, icon 24px)
|
|
368
|
+
* * large (button 48px, icon 32px)
|
|
369
|
+
* * giant (button 56px, icon 40px)
|
|
370
370
|
* */
|
|
371
371
|
size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant']),
|
|
372
372
|
|
|
@@ -403,19 +403,19 @@ ButtonIcon.propTypes = {
|
|
|
403
403
|
/** status loading of button */
|
|
404
404
|
loading: PropTypes.bool,
|
|
405
405
|
|
|
406
|
-
/**
|
|
407
|
-
* ref methods
|
|
408
|
-
*
|
|
409
|
-
* * option(): Gets all UI component properties
|
|
410
|
-
* * Returns value - object
|
|
411
|
-
* * option(optionName): Gets the value of a single property
|
|
412
|
-
* * @param {optionName} - string
|
|
413
|
-
* * Returns value - any
|
|
414
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
415
|
-
* * @param {optionName} - string
|
|
416
|
-
* * @param {optionValue} - any
|
|
417
|
-
* * option(options): Updates the values of several properties
|
|
418
|
-
* * @param {options} - object
|
|
406
|
+
/**
|
|
407
|
+
* ref methods
|
|
408
|
+
*
|
|
409
|
+
* * option(): Gets all UI component properties
|
|
410
|
+
* * Returns value - object
|
|
411
|
+
* * option(optionName): Gets the value of a single property
|
|
412
|
+
* * @param {optionName} - string
|
|
413
|
+
* * Returns value - any
|
|
414
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
415
|
+
* * @param {optionName} - string
|
|
416
|
+
* * @param {optionValue} - any
|
|
417
|
+
* * option(options): Updates the values of several properties
|
|
418
|
+
* * @param {options} - object
|
|
419
419
|
*/
|
|
420
420
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
421
421
|
current: PropTypes.instanceOf(Element)
|
|
@@ -484,19 +484,19 @@ Button.propTypes = {
|
|
|
484
484
|
/** status loading of button */
|
|
485
485
|
loading: PropTypes.bool,
|
|
486
486
|
|
|
487
|
-
/**
|
|
488
|
-
* ref methods
|
|
489
|
-
*
|
|
490
|
-
* * option(): Gets all UI component properties
|
|
491
|
-
* * Returns value - object
|
|
492
|
-
* * option(optionName): Gets the value of a single property
|
|
493
|
-
* * @param {optionName} - string
|
|
494
|
-
* * Returns value - any
|
|
495
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
496
|
-
* * @param {optionName} - string
|
|
497
|
-
* * @param {optionValue} - any
|
|
498
|
-
* * option(options): Updates the values of several properties
|
|
499
|
-
* * @param {options} - object
|
|
487
|
+
/**
|
|
488
|
+
* ref methods
|
|
489
|
+
*
|
|
490
|
+
* * option(): Gets all UI component properties
|
|
491
|
+
* * Returns value - object
|
|
492
|
+
* * option(optionName): Gets the value of a single property
|
|
493
|
+
* * @param {optionName} - string
|
|
494
|
+
* * Returns value - any
|
|
495
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
496
|
+
* * @param {optionName} - string
|
|
497
|
+
* * @param {optionValue} - any
|
|
498
|
+
* * option(options): Updates the values of several properties
|
|
499
|
+
* * @param {options} - object
|
|
500
500
|
*/
|
|
501
501
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
502
502
|
current: PropTypes.instanceOf(Element)
|
|
@@ -111,8 +111,8 @@ Sector.propTypes = {
|
|
|
111
111
|
onTouchEnd: PropTypes.func,
|
|
112
112
|
onTouchStart: PropTypes.func,
|
|
113
113
|
|
|
114
|
-
/** function displays selected items by custom, example:<br/>
|
|
115
|
-
* renderItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
114
|
+
/** function displays selected items by custom, example:<br/>
|
|
115
|
+
* renderItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
116
116
|
*/
|
|
117
117
|
renderSelectedItem: PropTypes.func,
|
|
118
118
|
path: PropTypes.string.isRequired,
|
|
@@ -97,8 +97,8 @@ Sector.propTypes = {
|
|
|
97
97
|
onTouchEnd: PropTypes.func,
|
|
98
98
|
onTouchStart: PropTypes.func,
|
|
99
99
|
|
|
100
|
-
/** function displays selected items by custom, example:<br/>
|
|
101
|
-
* renderItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
100
|
+
/** function displays selected items by custom, example:<br/>
|
|
101
|
+
* renderItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
102
102
|
*/
|
|
103
103
|
renderSelectedItem: PropTypes.func,
|
|
104
104
|
path: PropTypes.string.isRequired,
|
|
@@ -156,11 +156,11 @@ const AttachChip = /*#__PURE__*/memo(({
|
|
|
156
156
|
}))), attachView);
|
|
157
157
|
});
|
|
158
158
|
AttachChip.propTypes = {
|
|
159
|
-
/** the file info, such as:<br/>
|
|
160
|
-
* {<br/>
|
|
161
|
-
* URL: https://url.com/pathname,<br/>
|
|
162
|
-
* FileName: file.name,<br/>
|
|
163
|
-
* }
|
|
159
|
+
/** the file info, such as:<br/>
|
|
160
|
+
* {<br/>
|
|
161
|
+
* URL: https://url.com/pathname,<br/>
|
|
162
|
+
* FileName: file.name,<br/>
|
|
163
|
+
* }
|
|
164
164
|
*/
|
|
165
165
|
file: PropTypes.shape({
|
|
166
166
|
URL: PropTypes.string.isRequired,
|
|
@@ -24,22 +24,24 @@ const Divider = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
24
24
|
ref = useRef(null);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
if (typeof width === 'number') width = `${width}px`;
|
|
28
|
+
if (typeof height === 'number') height = `${height}px`;
|
|
27
29
|
const DividerRoot = css`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
${noBorder}
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
margin: 0;
|
|
33
|
+
background-color: ${colors.semantic[color] || color};
|
|
34
|
+
&.vertical {
|
|
35
|
+
width: ${width || '1px'};
|
|
36
|
+
height: ${height || '100%'};
|
|
37
|
+
/* margin: auto 5px; */
|
|
38
|
+
}
|
|
39
|
+
&.horizontal {
|
|
40
|
+
width: ${width || '100%'};
|
|
41
|
+
height: ${height || '1px'};
|
|
42
|
+
/* margin: 5px auto; */
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
43
45
|
useEffect(() => {
|
|
44
46
|
if (direction === 'vertical' && !height && ref.current && ref.current.parentNode) {
|
|
45
47
|
ref.current.style.height = ref.current.parentNode.offsetHeight + 'px';
|
|
@@ -1881,17 +1881,17 @@ Attachment.defaultProps = {
|
|
|
1881
1881
|
uploadErrorInfo: {}
|
|
1882
1882
|
};
|
|
1883
1883
|
Attachment.propTypes = {
|
|
1884
|
-
/** List attachment:<br />
|
|
1885
|
-
* [{<br />
|
|
1886
|
-
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1887
|
-
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/8a07bee1eeff17a14eee.jpg?path=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlUGF0aCI6Ii8yMDIwLzA4LzQ0YjNhYjQ4LTMwNGQtNDQ3NC05ZDk0LWNkNGVlMDQwOGNlMy5qcGciLCJmaWxlTmFtZSI6IjhhMDdiZWUxZWVmZjE3YTE0ZWVlLmpwZyIsImZpbGVTaXplIjoyNDg4MzcsImZpbGVUeXBlIjoiaW1hZ2UvanBlZyIsImlhdCI6MTU5ODI0NDMwMiwiZXhwIjo4Nzk5ODI0NDMwMn0.fow6O5fp2z3vieA9gom5RRwQ7xxwBx9_7X2Fe8T2YI0",<br />
|
|
1888
|
-
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1889
|
-
* "FileSize": 248837,<br />
|
|
1890
|
-
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1891
|
-
* "CreateUserID": "LEMONADMIN",<br />
|
|
1892
|
-
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1893
|
-
* "UserName": "Quản trị hệ thống"<br />
|
|
1894
|
-
* }, ...]
|
|
1884
|
+
/** List attachment:<br />
|
|
1885
|
+
* [{<br />
|
|
1886
|
+
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1887
|
+
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/8a07bee1eeff17a14eee.jpg?path=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlUGF0aCI6Ii8yMDIwLzA4LzQ0YjNhYjQ4LTMwNGQtNDQ3NC05ZDk0LWNkNGVlMDQwOGNlMy5qcGciLCJmaWxlTmFtZSI6IjhhMDdiZWUxZWVmZjE3YTE0ZWVlLmpwZyIsImZpbGVTaXplIjoyNDg4MzcsImZpbGVUeXBlIjoiaW1hZ2UvanBlZyIsImlhdCI6MTU5ODI0NDMwMiwiZXhwIjo4Nzk5ODI0NDMwMn0.fow6O5fp2z3vieA9gom5RRwQ7xxwBx9_7X2Fe8T2YI0",<br />
|
|
1888
|
+
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1889
|
+
* "FileSize": 248837,<br />
|
|
1890
|
+
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1891
|
+
* "CreateUserID": "LEMONADMIN",<br />
|
|
1892
|
+
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1893
|
+
* "UserName": "Quản trị hệ thống"<br />
|
|
1894
|
+
* }, ...]
|
|
1895
1895
|
*/
|
|
1896
1896
|
data: PropTypes.array,
|
|
1897
1897
|
|
|
@@ -1964,15 +1964,15 @@ Attachment.propTypes = {
|
|
|
1964
1964
|
/** event when uploading file failed */
|
|
1965
1965
|
onUploadError: PropTypes.func,
|
|
1966
1966
|
|
|
1967
|
-
/**
|
|
1968
|
-
* event when removed file(s)<br/>
|
|
1969
|
-
* return data: {<br/>
|
|
1970
|
-
* attached: [Files] (insist old and all new files )<br/>
|
|
1971
|
-
* allNewAttached: [Files]<br/>
|
|
1972
|
-
* oldAttached: [Files]<br/>
|
|
1973
|
-
* removedAttached: [Files]<br/>
|
|
1974
|
-
* element: [NodeList (just removed)]<br/>
|
|
1975
|
-
* }
|
|
1967
|
+
/**
|
|
1968
|
+
* event when removed file(s)<br/>
|
|
1969
|
+
* return data: {<br/>
|
|
1970
|
+
* attached: [Files] (insist old and all new files )<br/>
|
|
1971
|
+
* allNewAttached: [Files]<br/>
|
|
1972
|
+
* oldAttached: [Files]<br/>
|
|
1973
|
+
* removedAttached: [Files]<br/>
|
|
1974
|
+
* element: [NodeList (just removed)]<br/>
|
|
1975
|
+
* }
|
|
1976
1976
|
*/
|
|
1977
1977
|
onRemove: PropTypes.func,
|
|
1978
1978
|
|