diginet-core-ui 1.4.60 → 1.4.61
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.
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_2454_31)">
|
|
3
|
+
<path d="M17.0998 10.7C17.0998 11 17.0998 11.2 16.9998 11.5C16.8998 11.8 16.7998 12 16.5998 12.1C16.3998 12.3 16.0998 12.5 15.7998 12.6C15.4998 12.7 15.1998 12.8 14.6998 12.8H13.7998V14.7H12.2998V8.80005H14.7998C15.1998 8.80005 15.4998 8.80005 15.6998 8.90005C15.9998 9.00005 16.1998 9.10005 16.3998 9.20005C16.5998 9.40005 16.7998 9.60005 16.8998 9.80005C16.9998 10.1 17.0998 10.3 17.0998 10.7ZM15.4998 10.7C15.4998 10.5 15.4998 10.4 15.3998 10.3C15.2998 10.2 15.1998 10.1 15.0998 10.1C14.8998 10 14.7998 10 14.5998 10C14.4998 10 14.2998 10 13.9998 10H13.6998V11.7H14.0998C14.3998 11.7 14.5998 11.7 14.6998 11.7C14.8998 11.7 14.9998 11.6 15.0998 11.5C15.1998 11.4 15.2998 11.3 15.2998 11.2C15.4998 11 15.4998 10.9 15.4998 10.7Z" fill="#2680EB"/>
|
|
4
|
+
<path d="M22.2998 14.7H18.0998V8.80005H19.5998V13.5H22.2998V14.7Z" fill="#2680EB"/>
|
|
5
|
+
<path d="M28.5998 14.7H26.9998L26.5998 13.5H24.3998L23.9998 14.7H22.4998L24.6998 8.90005H26.3998L28.5998 14.7ZM26.2998 12.4L25.5998 10.3L24.8998 12.4H26.2998Z" fill="#2680EB"/>
|
|
6
|
+
<path d="M34.7998 14.7H33.3998L30.8998 10.7V14.7H29.4998V8.80005H31.2998L33.3998 12.1V8.80005H34.7998V14.7Z" fill="#2680EB"/>
|
|
7
|
+
<path d="M30 25C29.7 25 29.5 24.9 29.3 24.7L27.3 22.7C26.9 22.3 26.9 21.7 27.3 21.3C27.7 20.9 28.3 20.9 28.7 21.3L30 22.6L33.3 19.3C33.7 18.9 34.3 18.9 34.7 19.3C35.1 19.7 35.1 20.3 34.7 20.7L30.7 24.7C30.5 24.9 30.3 25 30 25Z" fill="#1CA261"/>
|
|
8
|
+
<path d="M32.4 30.5L34.2 28.7C34.6 28.3 34.6 27.7 34.2 27.3C33.8 26.9 33.2 26.9 32.8 27.3L31 29.1L29.2 27.3C28.8 26.9 28.2 26.9 27.8 27.3C27.4 27.7 27.4 28.3 27.8 28.7L29.6 30.5L27.8 32.3C27.4 32.7 27.4 33.3 27.8 33.7C28 33.9 28.3 34 28.5 34C28.7 34 29 33.9 29.2 33.7L31 31.9L32.8 33.7C33 33.9 33.3 34 33.5 34C33.7 34 34 33.9 34.2 33.7C34.6 33.3 34.6 32.7 34.2 32.3L32.4 30.5Z" fill="#FF4444"/>
|
|
9
|
+
<path d="M26.3 24.9999H20.8C20.4 24.9999 20 24.6999 20 24.1999C20 23.6999 20.3 23.3999 20.8 23.3999H26.3C26.7 23.3999 27.1 23.6999 27.1 24.1999C27.1 24.6999 26.7 24.9999 26.3 24.9999Z" fill="#7BC0F9"/>
|
|
10
|
+
<path d="M26.3 33.9999H20.8C20.4 33.9999 20 33.6999 20 33.1999C20 32.6999 20.3 32.3999 20.8 32.3999H26.3C26.7 32.3999 27.1 32.6999 27.1 33.1999C27.1 33.6999 26.7 33.9999 26.3 33.9999Z" fill="#7BC0F9"/>
|
|
11
|
+
<path d="M7.90004 25.8C4.70004 25.8 2.10004 23.1 2.10004 19.9C2.10004 16.7 4.70004 14 7.90004 14C11.1 14 13.7 16.7 13.7 19.9C13.7 23.1 11.1 25.8 7.90004 25.8Z" fill="#2680EB"/>
|
|
12
|
+
<path d="M15.6 32.6L15.2 31C15 30 14.5 29.4 13.5 29C11.7 28.3 10.6 27.6 10.6 27.6L9.10004 32L8.90004 32.6L8.30004 30.8C9.80004 28.8 8.20004 28.7 7.90004 28.7C7.60004 28.7 6.10004 28.8 7.50004 30.8L6.90004 32.6L6.70004 32L5.30004 27.5C5.30004 27.5 4.20004 28.2 2.40004 28.9C1.50004 29.2 1.10004 29.7 0.800039 30.4L0.400039 32.1C0.300039 32.6 0.200039 33.1 0.100039 33.6C-0.0999609 34.5 0.200039 35.3 1.00004 35.8C2.30004 36.8 3.80004 37.6 5.30004 38.3C6.70004 38.9 8.10004 39.1 9.60004 38.6C11.6 38 13.4 37 15 35.7C15.7 35.2 15.9 34.3 15.8 33.5C15.7 33.3 15.6 33 15.6 32.6Z" fill="#2680EB"/>
|
|
13
|
+
<path d="M34.9999 2H31.9999C31.9999 0.9 31.0999 0 29.9999 0H16.9999C15.8999 0 14.9999 0.9 14.9999 2V4C14.9999 5.1 15.8999 6 16.9999 6H29.9999C31.0999 6 31.9999 5.1 31.9999 4H34.9999C36.0999 4 36.9999 4.9 36.9999 6V35C36.9999 36.1 36.0999 37 34.9999 37H15.1999C14.0999 37.8 12.9999 38.5 11.8999 39H11.9999H34.9999C37.1999 39 38.9999 37.2 38.9999 35V6C38.9999 3.8 37.1999 2 34.9999 2ZM16.9999 4V2H29.9999V4H16.9999Z" fill="#2680EB"/>
|
|
14
|
+
<path d="M10 6C10 4.9 10.9 4 12 4H17V2H12C9.8 2 8 3.8 8 6V13C8.7 13 9.4 13.1 10 13.3V6Z" fill="#2680EB"/>
|
|
15
|
+
<path d="M14.8998 28.4999H17.4998V32.4999H16.5998V32.6999C16.5998 32.8999 16.6998 33.1999 16.6998 33.3999C16.6998 33.5999 16.7998 33.7999 16.7998 33.8999H17.9998C18.5998 33.8999 18.9998 33.4999 18.9998 32.8999V27.8999C18.9998 27.2999 18.5998 26.8999 17.9998 26.8999H12.9998C12.6998 26.8999 12.4998 26.9999 12.2998 27.1999C12.6998 27.3999 13.1998 27.5999 13.7998 27.8999C14.1998 28.0999 14.5998 28.2999 14.8998 28.4999Z" fill="#2680EB"/>
|
|
16
|
+
<path d="M17.5001 19.5V23.5H13.7001C13.4001 24 13.0001 24.5 12.6001 24.9C12.7001 25 12.9001 25 13.0001 25H18.0001C18.6001 25 19.0001 24.6 19.0001 24V19C19.0001 18.4 18.6001 18 18.0001 18H14.5001C14.6001 18.5 14.7001 19 14.7001 19.5H17.5001Z" fill="#2680EB"/>
|
|
17
|
+
</g>
|
|
18
|
+
<defs>
|
|
19
|
+
<clipPath id="clip0_2454_31">
|
|
20
|
+
<rect width="39" height="39" fill="white"/>
|
|
21
|
+
</clipPath>
|
|
22
|
+
</defs>
|
|
23
|
+
</svg>
|
|
@@ -5,7 +5,7 @@ import { Avatar, ButtonIcon, Checkbox, Chip, CircularProgress, HelperText, Input
|
|
|
5
5
|
import Popover from "../../popover";
|
|
6
6
|
import { getGlobal } from "../../../global";
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { Fragment, forwardRef, memo, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
8
|
+
import { Fragment, forwardRef, memo, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useCallback } from 'react';
|
|
9
9
|
import ReactDOM from 'react-dom';
|
|
10
10
|
import { animation, bgColor, border, borderBottom, borderBottomColor, borderColor, borderNone, borderRadius, bottom, boxBorder, breakWord, cursorDefault, cursorNotAllowed, cursorPointer, displayBlock, displayFlex, fill, flexRow, flexWrap, inset, insetX, invisible, italic, itemsCenter, justifyCenter, justifyStart, outlineNone, overflowYScroll, overflowHidden, parseHeight, parseMaxHeight, parseMaxWidth, parseMinHeight, parseWidth, parseWidthHeight, pointerEventsNone, positionAbsolute, positionRelative, textColor, top, userSelectNone, z } from "../../../styles/general";
|
|
11
11
|
import { useTheme } from "../../../theme";
|
|
@@ -89,6 +89,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
89
89
|
multiple,
|
|
90
90
|
noDataText: noDataTextProp,
|
|
91
91
|
onChange,
|
|
92
|
+
onOpened,
|
|
92
93
|
onClosed,
|
|
93
94
|
onInput,
|
|
94
95
|
onKeyDown,
|
|
@@ -201,14 +202,14 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
201
202
|
}
|
|
202
203
|
!!blur && inputRef.current.blur();
|
|
203
204
|
};
|
|
204
|
-
const onClickInput = e => {
|
|
205
|
+
const onClickInput = useCallback(e => {
|
|
205
206
|
if (disabled || readOnly || loadingState) return;
|
|
206
207
|
if (!dropdownListRef.current) {
|
|
207
208
|
if (!multiple || !Array.from(inputRef.current.querySelectorAll('.DGN-UI-Chip')).some(item => item.contains(e === null || e === void 0 ? void 0 : e.target))) {
|
|
208
209
|
setOpenState(true);
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
|
-
};
|
|
212
|
+
}, [disabled, readOnly, loadingState]);
|
|
212
213
|
const showDropdown = () => {
|
|
213
214
|
const dropdown = children ? jsx("div", {
|
|
214
215
|
css: _DropdownListCSS,
|
|
@@ -1110,6 +1111,8 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, reference)
|
|
|
1110
1111
|
filter.current.strSearch = '';
|
|
1111
1112
|
handleActionLoadData(true);
|
|
1112
1113
|
}
|
|
1114
|
+
} else if (openState) {
|
|
1115
|
+
onOpened && onOpened();
|
|
1113
1116
|
}
|
|
1114
1117
|
}, [openState]);
|
|
1115
1118
|
useLayoutEffect(() => {
|
|
@@ -1852,6 +1855,8 @@ Dropdown.propTypes = {
|
|
|
1852
1855
|
noDataText: PropTypes.string,
|
|
1853
1856
|
/** Callback function fired when the value changes. */
|
|
1854
1857
|
onChange: PropTypes.func,
|
|
1858
|
+
/** Callback function fired when the dropdown is opened. */
|
|
1859
|
+
onOpened: PropTypes.func,
|
|
1855
1860
|
/** Callback function fired when the dropdown is closed. */
|
|
1856
1861
|
onClosed: PropTypes.func,
|
|
1857
1862
|
/** Callback function fired when the input value changes.<br/>
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -42,7 +42,12 @@ npm test
|
|
|
42
42
|
|
|
43
43
|
## Changelog
|
|
44
44
|
|
|
45
|
-
## 1.4.
|
|
45
|
+
## 1.4.61
|
|
46
|
+
- \[Added\]: Icon – Add IconMenu MHRM38N1051
|
|
47
|
+
- \[Fixed\]: Dropdown – Dropdown multiple core has a disable bug
|
|
48
|
+
- \[Fixed\]: Dropdown – Add a prop to support callback when clicking on the Dropdown.
|
|
49
|
+
|
|
50
|
+
## 1.4.60
|
|
46
51
|
- \[Added\]: Icon – Add IconMenu MHRP09N0039, MHRP09N0040
|
|
47
52
|
- \[Fixed\]: NumberInput – Negative values can still be pasted when disabledNegative is enabled
|
|
48
53
|
- \[Fixed\]: Dropdown, NumberInput, TextInput, .... – Updated the default delayOnSearch value to 1200 ms
|