diginet-core-ui 1.3.70-beta.4 → 1.3.70-beta.5
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.
|
@@ -1334,8 +1334,15 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
1334
1334
|
}
|
|
1335
1335
|
|
|
1336
1336
|
const data = dataFilter.find(v => v[valueExpr] === vl);
|
|
1337
|
-
let
|
|
1338
|
-
|
|
1337
|
+
let text = '';
|
|
1338
|
+
|
|
1339
|
+
if (data) {
|
|
1340
|
+
var _displayExpr4;
|
|
1341
|
+
|
|
1342
|
+
const mask = (_displayExpr4 = displayExpr) === null || _displayExpr4 === void 0 ? void 0 : _displayExpr4.replace(regexBetween, _ => data[_]);
|
|
1343
|
+
text = mask === null || mask === void 0 ? void 0 : mask.replace(regexInclude, '');
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1339
1346
|
let item = null;
|
|
1340
1347
|
|
|
1341
1348
|
if (typeof renderSelectedItem === 'function') {
|
|
@@ -1347,7 +1354,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
1347
1354
|
item = jsx(Chip, {
|
|
1348
1355
|
key: index,
|
|
1349
1356
|
startIcon: getIconFromData(data, true),
|
|
1350
|
-
label:
|
|
1357
|
+
label: text,
|
|
1351
1358
|
size: 'medium',
|
|
1352
1359
|
disabled: disabled,
|
|
1353
1360
|
clearAble: true,
|
|
@@ -1804,14 +1811,14 @@ Dropdown.propTypes = {
|
|
|
1804
1811
|
/** The icon to display if not found the icon follow `iconExpr`. */
|
|
1805
1812
|
iconDefault: PropTypes.string,
|
|
1806
1813
|
|
|
1807
|
-
/** Field name used for icon display.<br/>
|
|
1808
|
-
* Example:<br/>
|
|
1809
|
-
* string: 'icon'<br/>
|
|
1810
|
-
* object: {<br/>
|
|
1811
|
-
* key: 'icon',<br/>
|
|
1812
|
-
* prefix: 'https://imglink.com',<br/>
|
|
1813
|
-
* suffix: '.jpg'<br/>
|
|
1814
|
-
* }
|
|
1814
|
+
/** Field name used for icon display.<br/>
|
|
1815
|
+
* Example:<br/>
|
|
1816
|
+
* string: 'icon'<br/>
|
|
1817
|
+
* object: {<br/>
|
|
1818
|
+
* key: 'icon',<br/>
|
|
1819
|
+
* prefix: 'https://imglink.com',<br/>
|
|
1820
|
+
* suffix: '.jpg'<br/>
|
|
1821
|
+
* }
|
|
1815
1822
|
*/
|
|
1816
1823
|
iconExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
1817
1824
|
key: PropTypes.string,
|
|
@@ -1826,9 +1833,9 @@ Dropdown.propTypes = {
|
|
|
1826
1833
|
/** The displayed value of component. */
|
|
1827
1834
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
|
|
1828
1835
|
|
|
1829
|
-
/** Field name used for text display in dropdown list.<br/>
|
|
1830
|
-
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1831
|
-
* Note: don't use 'id - name', return undefined
|
|
1836
|
+
/** Field name used for text display in dropdown list.<br/>
|
|
1837
|
+
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1838
|
+
* Note: don't use 'id - name', return undefined
|
|
1832
1839
|
*/
|
|
1833
1840
|
displayExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
|
|
1834
1841
|
|
|
@@ -1838,10 +1845,10 @@ Dropdown.propTypes = {
|
|
|
1838
1845
|
/** The field name used for the returned result. */
|
|
1839
1846
|
valueExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
1840
1847
|
|
|
1841
|
-
/**
|
|
1842
|
-
* Duration wait enter search content on search.<br/>
|
|
1843
|
-
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1844
|
-
* If `true`, used default delayOnInput.
|
|
1848
|
+
/**
|
|
1849
|
+
* Duration wait enter search content on search.<br/>
|
|
1850
|
+
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1851
|
+
* If `true`, used default delayOnInput.
|
|
1845
1852
|
*/
|
|
1846
1853
|
searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
1847
1854
|
|
|
@@ -1908,19 +1915,19 @@ Dropdown.propTypes = {
|
|
|
1908
1915
|
/** The array of elements that appear in the dropdown list. */
|
|
1909
1916
|
dataSource: PropTypes.array,
|
|
1910
1917
|
|
|
1911
|
-
/** Function displays items by custom.<br/>
|
|
1912
|
-
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1913
|
-
* --> such as: displayExpr={'name - role'}
|
|
1918
|
+
/** Function displays items by custom.<br/>
|
|
1919
|
+
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1920
|
+
* --> such as: displayExpr={'name - role'}
|
|
1914
1921
|
*/
|
|
1915
1922
|
renderItem: PropTypes.func,
|
|
1916
1923
|
|
|
1917
|
-
/** Function or field name used for display selected items, example:<br/>
|
|
1918
|
-
* renderSelectedItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
1924
|
+
/** Function or field name used for display selected items, example:<br/>
|
|
1925
|
+
* renderSelectedItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
1919
1926
|
*/
|
|
1920
1927
|
renderSelectedItem: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
1921
1928
|
|
|
1922
|
-
/** Callback fired when the input value changes.<br/>
|
|
1923
|
-
* if undefined: the filter function will run (default)
|
|
1929
|
+
/** Callback fired when the input value changes.<br/>
|
|
1930
|
+
* if undefined: the filter function will run (default)
|
|
1924
1931
|
*/
|
|
1925
1932
|
onInput: PropTypes.func,
|
|
1926
1933
|
|
|
@@ -1948,19 +1955,19 @@ Dropdown.propTypes = {
|
|
|
1948
1955
|
/** Set restrictions regarding the maximum number of options that can be selected. (Use with prop `multiple`) */
|
|
1949
1956
|
maximumSelectionLength: PropTypes.number,
|
|
1950
1957
|
|
|
1951
|
-
/**
|
|
1952
|
-
* ref methods
|
|
1953
|
-
*
|
|
1954
|
-
* how to get component element? ref.current
|
|
1955
|
-
*
|
|
1956
|
-
* how to call method? ref.current.instance.{method}
|
|
1957
|
-
*
|
|
1958
|
-
* * showDropdown(): Show dropdown
|
|
1959
|
-
* * closeDropdown(): Close dropdown
|
|
1960
|
-
* * onClear(): Clear selected value
|
|
1961
|
-
* * setPreviousValue(): Set value to previous value
|
|
1962
|
-
* * setValue(value): Set value of dropdown
|
|
1963
|
-
* * @param {value} - string || number || array
|
|
1958
|
+
/**
|
|
1959
|
+
* ref methods
|
|
1960
|
+
*
|
|
1961
|
+
* how to get component element? ref.current
|
|
1962
|
+
*
|
|
1963
|
+
* how to call method? ref.current.instance.{method}
|
|
1964
|
+
*
|
|
1965
|
+
* * showDropdown(): Show dropdown
|
|
1966
|
+
* * closeDropdown(): Close dropdown
|
|
1967
|
+
* * onClear(): Clear selected value
|
|
1968
|
+
* * setPreviousValue(): Set value to previous value
|
|
1969
|
+
* * setValue(value): Set value of dropdown
|
|
1970
|
+
* * @param {value} - string || number || array
|
|
1964
1971
|
*/
|
|
1965
1972
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
1966
1973
|
current: PropTypes.instanceOf(Element)
|
|
@@ -550,10 +550,10 @@ MoneyInput.propTypes = {
|
|
|
550
550
|
/** style inline of input in MoneyInput component */
|
|
551
551
|
inputStyle: PropTypes.object,
|
|
552
552
|
|
|
553
|
-
/** validation value, argument can:<br/>
|
|
554
|
-
* * string: the validation rule. Example required.<br/>
|
|
555
|
-
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
556
|
-
* * array: the validation rule list, insist object/string
|
|
553
|
+
/** validation value, argument can:<br/>
|
|
554
|
+
* * string: the validation rule. Example required.<br/>
|
|
555
|
+
* * object: the validation rule insist name, property, message. Example {name: 'min', compareValue: 9, message: 'Error'} or {max: 99}<br/>
|
|
556
|
+
* * array: the validation rule list, insist object/string
|
|
557
557
|
*/
|
|
558
558
|
validates: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array, PropTypes.func]),
|
|
559
559
|
|
|
@@ -566,13 +566,13 @@ MoneyInput.propTypes = {
|
|
|
566
566
|
/** on input function */
|
|
567
567
|
onInput: PropTypes.func,
|
|
568
568
|
|
|
569
|
-
/**
|
|
570
|
-
* on change function, return an object:<br/>
|
|
571
|
-
* {<br/>
|
|
572
|
-
* value: is a number or null value<br/>
|
|
573
|
-
* target.value: value of input<br/>
|
|
574
|
-
* ...element<br/>
|
|
575
|
-
* }
|
|
569
|
+
/**
|
|
570
|
+
* on change function, return an object:<br/>
|
|
571
|
+
* {<br/>
|
|
572
|
+
* value: is a number or null value<br/>
|
|
573
|
+
* target.value: value of input<br/>
|
|
574
|
+
* ...element<br/>
|
|
575
|
+
* }
|
|
576
576
|
*/
|
|
577
577
|
onChange: PropTypes.func,
|
|
578
578
|
|