diginet-core-ui 1.3.75-beta.2 → 1.3.75-beta.3
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/badge/index.js +5 -5
- package/components/form-control/dropdown/index.js +35 -35
- package/components/paging/page-info.js +23 -23
- package/components/paging/page-selector2.js +23 -23
- package/components/popover/index.js +21 -21
- package/components/tree-view/index.js +38 -38
- package/components/typography/index.js +10 -10
- package/icons/effect.js +15 -15
- package/package.json +1 -1
- package/utils/useInput.js +4 -1
|
@@ -213,11 +213,11 @@ Badge.propTypes = {
|
|
|
213
213
|
/** other icon props when use prop name */
|
|
214
214
|
iconProps: PropTypes.object,
|
|
215
215
|
|
|
216
|
-
/** size of Badge
|
|
217
|
-
*
|
|
218
|
-
* * medium (dot 8px, typography p3)
|
|
219
|
-
* * large (button 10px, typography p2)
|
|
220
|
-
* * giant (button 12px, typography p1)
|
|
216
|
+
/** size of Badge
|
|
217
|
+
*
|
|
218
|
+
* * medium (dot 8px, typography p3)
|
|
219
|
+
* * large (button 10px, typography p2)
|
|
220
|
+
* * giant (button 12px, typography p1)
|
|
221
221
|
* */
|
|
222
222
|
size: PropTypes.oneOf(['medium', 'large', 'giant']),
|
|
223
223
|
|
|
@@ -1850,14 +1850,14 @@ Dropdown.propTypes = {
|
|
|
1850
1850
|
/** The icon to display if not found the icon follow `iconExpr`. */
|
|
1851
1851
|
iconDefault: PropTypes.string,
|
|
1852
1852
|
|
|
1853
|
-
/** Field name used for icon display.<br/>
|
|
1854
|
-
* Example:<br/>
|
|
1855
|
-
* string: 'icon'<br/>
|
|
1856
|
-
* object: {<br/>
|
|
1857
|
-
* key: 'icon',<br/>
|
|
1858
|
-
* prefix: 'https://imglink.com',<br/>
|
|
1859
|
-
* suffix: '.jpg'<br/>
|
|
1860
|
-
* }
|
|
1853
|
+
/** Field name used for icon display.<br/>
|
|
1854
|
+
* Example:<br/>
|
|
1855
|
+
* string: 'icon'<br/>
|
|
1856
|
+
* object: {<br/>
|
|
1857
|
+
* key: 'icon',<br/>
|
|
1858
|
+
* prefix: 'https://imglink.com',<br/>
|
|
1859
|
+
* suffix: '.jpg'<br/>
|
|
1860
|
+
* }
|
|
1861
1861
|
*/
|
|
1862
1862
|
iconExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
1863
1863
|
key: PropTypes.string,
|
|
@@ -1872,9 +1872,9 @@ Dropdown.propTypes = {
|
|
|
1872
1872
|
/** The displayed value of component. */
|
|
1873
1873
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
|
|
1874
1874
|
|
|
1875
|
-
/** Field name used for text display in dropdown list.<br/>
|
|
1876
|
-
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1877
|
-
* Note: don't use 'id - name', return undefined
|
|
1875
|
+
/** Field name used for text display in dropdown list.<br/>
|
|
1876
|
+
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1877
|
+
* Note: don't use 'id - name', return undefined
|
|
1878
1878
|
*/
|
|
1879
1879
|
displayExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]),
|
|
1880
1880
|
|
|
@@ -1884,10 +1884,10 @@ Dropdown.propTypes = {
|
|
|
1884
1884
|
/** The field name used for the returned result. */
|
|
1885
1885
|
valueExpr: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
1886
1886
|
|
|
1887
|
-
/**
|
|
1888
|
-
* Duration wait enter search content on search.<br/>
|
|
1889
|
-
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1890
|
-
* If `true`, used default delayOnInput.
|
|
1887
|
+
/**
|
|
1888
|
+
* Duration wait enter search content on search.<br/>
|
|
1889
|
+
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1890
|
+
* If `true`, used default delayOnInput.
|
|
1891
1891
|
*/
|
|
1892
1892
|
searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
1893
1893
|
|
|
@@ -1954,19 +1954,19 @@ Dropdown.propTypes = {
|
|
|
1954
1954
|
/** The array of elements that appear in the dropdown list. */
|
|
1955
1955
|
dataSource: PropTypes.array,
|
|
1956
1956
|
|
|
1957
|
-
/** Function displays items by custom.<br/>
|
|
1958
|
-
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1959
|
-
* --> such as: displayExpr={'name - role'}
|
|
1957
|
+
/** Function displays items by custom.<br/>
|
|
1958
|
+
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1959
|
+
* --> such as: displayExpr={'name - role'}
|
|
1960
1960
|
*/
|
|
1961
1961
|
renderItem: PropTypes.func,
|
|
1962
1962
|
|
|
1963
|
-
/** Function or field name used for display selected items, example:<br/>
|
|
1964
|
-
* renderSelectedItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
1963
|
+
/** Function or field name used for display selected items, example:<br/>
|
|
1964
|
+
* renderSelectedItem={(data, index) => index + ' - ' + data.name}<br/>
|
|
1965
1965
|
*/
|
|
1966
1966
|
renderSelectedItem: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
1967
1967
|
|
|
1968
|
-
/** Callback fired when the input value changes.<br/>
|
|
1969
|
-
* if undefined: the filter function will run (default)
|
|
1968
|
+
/** Callback fired when the input value changes.<br/>
|
|
1969
|
+
* if undefined: the filter function will run (default)
|
|
1970
1970
|
*/
|
|
1971
1971
|
onInput: PropTypes.func,
|
|
1972
1972
|
|
|
@@ -1997,19 +1997,19 @@ Dropdown.propTypes = {
|
|
|
1997
1997
|
/** If `true`, show multi-line selected item(s). */
|
|
1998
1998
|
multilineSelectedItem: PropTypes.bool,
|
|
1999
1999
|
|
|
2000
|
-
/**
|
|
2001
|
-
* ref methods
|
|
2002
|
-
*
|
|
2003
|
-
* how to get component element? ref.current
|
|
2004
|
-
*
|
|
2005
|
-
* how to call method? ref.current.instance.{method}
|
|
2006
|
-
*
|
|
2007
|
-
* * showDropdown(): Show dropdown
|
|
2008
|
-
* * closeDropdown(): Close dropdown
|
|
2009
|
-
* * onClear(): Clear selected value
|
|
2010
|
-
* * setPreviousValue(): Set value to previous value
|
|
2011
|
-
* * setValue(value): Set value of dropdown
|
|
2012
|
-
* * @param {value} - string || number || array
|
|
2000
|
+
/**
|
|
2001
|
+
* ref methods
|
|
2002
|
+
*
|
|
2003
|
+
* how to get component element? ref.current
|
|
2004
|
+
*
|
|
2005
|
+
* how to call method? ref.current.instance.{method}
|
|
2006
|
+
*
|
|
2007
|
+
* * showDropdown(): Show dropdown
|
|
2008
|
+
* * closeDropdown(): Close dropdown
|
|
2009
|
+
* * onClear(): Clear selected value
|
|
2010
|
+
* * setPreviousValue(): Set value to previous value
|
|
2011
|
+
* * setValue(value): Set value of dropdown
|
|
2012
|
+
* * @param {value} - string || number || array
|
|
2013
2013
|
*/
|
|
2014
2014
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
2015
2015
|
current: PropTypes.instanceOf(Element)
|
|
@@ -601,23 +601,23 @@ PagingInfo.propTypes = {
|
|
|
601
601
|
/** Callback fired when quantity on per page changed. */
|
|
602
602
|
onChangePerPage: PropTypes.func,
|
|
603
603
|
|
|
604
|
-
/**
|
|
605
|
-
* Callback fired when page number is changing.
|
|
606
|
-
*
|
|
607
|
-
* * prevPage: Page before changed
|
|
608
|
-
* * newPage: Page after changed
|
|
609
|
-
* * cancel(value): Function cancel change page
|
|
610
|
-
* * @param {value} - bool
|
|
604
|
+
/**
|
|
605
|
+
* Callback fired when page number is changing.
|
|
606
|
+
*
|
|
607
|
+
* * prevPage: Page before changed
|
|
608
|
+
* * newPage: Page after changed
|
|
609
|
+
* * cancel(value): Function cancel change page
|
|
610
|
+
* * @param {value} - bool
|
|
611
611
|
*/
|
|
612
612
|
onChangingPage: PropTypes.func,
|
|
613
613
|
|
|
614
|
-
/**
|
|
615
|
-
* Callback fired when quantity on item per page is changing.
|
|
616
|
-
*
|
|
617
|
-
* * prevPerPage: Items per page before changed
|
|
618
|
-
* * newPerPage: Items per page after changed
|
|
619
|
-
* * cancel(value): Function cancel change items per page
|
|
620
|
-
* * @param {value} - bool
|
|
614
|
+
/**
|
|
615
|
+
* Callback fired when quantity on item per page is changing.
|
|
616
|
+
*
|
|
617
|
+
* * prevPerPage: Items per page before changed
|
|
618
|
+
* * newPerPage: Items per page after changed
|
|
619
|
+
* * cancel(value): Function cancel change items per page
|
|
620
|
+
* * @param {value} - bool
|
|
621
621
|
*/
|
|
622
622
|
onChangingPerPage: PropTypes.func,
|
|
623
623
|
|
|
@@ -630,15 +630,15 @@ PagingInfo.propTypes = {
|
|
|
630
630
|
/** Compact type for mobile. */
|
|
631
631
|
typeShort: PropTypes.bool,
|
|
632
632
|
|
|
633
|
-
/**
|
|
634
|
-
* ref methods (ref.current.instance.*method*)
|
|
635
|
-
*
|
|
636
|
-
* * onChangePage(page): Change page number
|
|
637
|
-
* * @param {page} - number
|
|
638
|
-
* * onChangePerPage(per): Change quantity on per page
|
|
639
|
-
* * @param {per} - number
|
|
640
|
-
* * setTotalItems(items): Set total items
|
|
641
|
-
* * @param {items} - number
|
|
633
|
+
/**
|
|
634
|
+
* ref methods (ref.current.instance.*method*)
|
|
635
|
+
*
|
|
636
|
+
* * onChangePage(page): Change page number
|
|
637
|
+
* * @param {page} - number
|
|
638
|
+
* * onChangePerPage(per): Change quantity on per page
|
|
639
|
+
* * @param {per} - number
|
|
640
|
+
* * setTotalItems(items): Set total items
|
|
641
|
+
* * @param {items} - number
|
|
642
642
|
*/
|
|
643
643
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
644
644
|
current: PropTypes.instanceOf(Element)
|
|
@@ -380,23 +380,23 @@ PagingSelector.propTypes = {
|
|
|
380
380
|
/** Callback fired when quantity on per page changed. */
|
|
381
381
|
onChangePerPage: PropTypes.func,
|
|
382
382
|
|
|
383
|
-
/**
|
|
384
|
-
* Callback fired when page number is changing.
|
|
385
|
-
*
|
|
386
|
-
* * prevPage: Page before changed
|
|
387
|
-
* * newPage: Page after changed
|
|
388
|
-
* * cancel(value): Function cancel change page
|
|
389
|
-
* * @param {value} - bool
|
|
383
|
+
/**
|
|
384
|
+
* Callback fired when page number is changing.
|
|
385
|
+
*
|
|
386
|
+
* * prevPage: Page before changed
|
|
387
|
+
* * newPage: Page after changed
|
|
388
|
+
* * cancel(value): Function cancel change page
|
|
389
|
+
* * @param {value} - bool
|
|
390
390
|
*/
|
|
391
391
|
onChangingPage: PropTypes.func,
|
|
392
392
|
|
|
393
|
-
/**
|
|
394
|
-
* Callback fired when quantity on item per page is changing.
|
|
395
|
-
*
|
|
396
|
-
* * prevPerPage: Items per page before changed
|
|
397
|
-
* * newPerPage: Items per page after changed
|
|
398
|
-
* * cancel(value): Function cancel change items per page
|
|
399
|
-
* * @param {value} - bool
|
|
393
|
+
/**
|
|
394
|
+
* Callback fired when quantity on item per page is changing.
|
|
395
|
+
*
|
|
396
|
+
* * prevPerPage: Items per page before changed
|
|
397
|
+
* * newPerPage: Items per page after changed
|
|
398
|
+
* * cancel(value): Function cancel change items per page
|
|
399
|
+
* * @param {value} - bool
|
|
400
400
|
*/
|
|
401
401
|
onChangingPerPage: PropTypes.func,
|
|
402
402
|
|
|
@@ -406,15 +406,15 @@ PagingSelector.propTypes = {
|
|
|
406
406
|
/** Total items. */
|
|
407
407
|
totalItems: PropTypes.number,
|
|
408
408
|
|
|
409
|
-
/**
|
|
410
|
-
* ref methods (ref.current.instance.*method*)
|
|
411
|
-
*
|
|
412
|
-
* * onChangePage(page): Change page number
|
|
413
|
-
* * @param {page} - number
|
|
414
|
-
* * onChangePerPage(per): Change quantity on per page
|
|
415
|
-
* * @param {per} - number
|
|
416
|
-
* * setTotalItems(items): Set total items
|
|
417
|
-
* * @param {items} - number
|
|
409
|
+
/**
|
|
410
|
+
* ref methods (ref.current.instance.*method*)
|
|
411
|
+
*
|
|
412
|
+
* * onChangePage(page): Change page number
|
|
413
|
+
* * @param {page} - number
|
|
414
|
+
* * onChangePerPage(per): Change quantity on per page
|
|
415
|
+
* * @param {per} - number
|
|
416
|
+
* * setTotalItems(items): Set total items
|
|
417
|
+
* * @param {items} - number
|
|
418
418
|
*/
|
|
419
419
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
420
420
|
current: PropTypes.instanceOf(Element)
|
|
@@ -628,9 +628,9 @@ Popover.propTypes = {
|
|
|
628
628
|
/** An HTML element, or a function that returns one. It's used to set the position of the popover. */
|
|
629
629
|
anchor: PropTypes.oneOfType([PropTypes.instanceOf(Element), PropTypes.func, PropTypes.object, PropTypes.node, ref]),
|
|
630
630
|
|
|
631
|
-
/**
|
|
632
|
-
* This is the point on the anchor where the popover's anchor will attach to.
|
|
633
|
-
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
631
|
+
/**
|
|
632
|
+
* This is the point on the anchor where the popover's anchor will attach to.
|
|
633
|
+
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
634
634
|
*/
|
|
635
635
|
anchorOrigin: PropTypes.shape({
|
|
636
636
|
horizontal: PropTypes.oneOf(['center', 'left', 'right']),
|
|
@@ -652,14 +652,14 @@ Popover.propTypes = {
|
|
|
652
652
|
/** If `true`, click outside will close component. */
|
|
653
653
|
clickOutsideToClose: PropTypes.bool,
|
|
654
654
|
|
|
655
|
-
/**
|
|
656
|
-
* Direction when Popover shown.
|
|
657
|
-
* Note: This prop will overwrite anchorOrigin & transformOrigin.
|
|
658
|
-
*
|
|
659
|
-
* * top: anchorOrigin: { vertical: 'top', horizontal: 'center' }, transformOrigin: { vertical: 'bottom', horizontal: 'center' }
|
|
660
|
-
* * left: anchorOrigin: { vertical: 'center', horizontal: 'left' }, transformOrigin: { vertical: 'center', horizontal: 'right' }
|
|
661
|
-
* * right: anchorOrigin: { vertical: 'center', horizontal: 'right' }, transformOrigin: { vertical: 'center', horizontal: 'left' }
|
|
662
|
-
* * bottom: anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }
|
|
655
|
+
/**
|
|
656
|
+
* Direction when Popover shown.
|
|
657
|
+
* Note: This prop will overwrite anchorOrigin & transformOrigin.
|
|
658
|
+
*
|
|
659
|
+
* * top: anchorOrigin: { vertical: 'top', horizontal: 'center' }, transformOrigin: { vertical: 'bottom', horizontal: 'center' }
|
|
660
|
+
* * left: anchorOrigin: { vertical: 'center', horizontal: 'left' }, transformOrigin: { vertical: 'center', horizontal: 'right' }
|
|
661
|
+
* * right: anchorOrigin: { vertical: 'center', horizontal: 'right' }, transformOrigin: { vertical: 'center', horizontal: 'left' }
|
|
662
|
+
* * bottom: anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }
|
|
663
663
|
*/
|
|
664
664
|
direction: PropTypes.oneOf(['top', 'left', 'right', 'bottom']),
|
|
665
665
|
|
|
@@ -678,9 +678,9 @@ Popover.propTypes = {
|
|
|
678
678
|
/** Style inline of component. */
|
|
679
679
|
style: PropTypes.object,
|
|
680
680
|
|
|
681
|
-
/**
|
|
682
|
-
* This is the point on the popover which will attach to the anchor's origin.
|
|
683
|
-
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
681
|
+
/**
|
|
682
|
+
* This is the point on the popover which will attach to the anchor's origin.
|
|
683
|
+
* Options: vertical: [top, center, bottom]; horizontal: [left, center, right].
|
|
684
684
|
*/
|
|
685
685
|
transformOrigin: PropTypes.shape({
|
|
686
686
|
horizontal: PropTypes.oneOf(['center', 'left', 'right']),
|
|
@@ -693,13 +693,13 @@ Popover.propTypes = {
|
|
|
693
693
|
/** Config z-index of the component. */
|
|
694
694
|
zIndex: PropTypes.number,
|
|
695
695
|
|
|
696
|
-
/**
|
|
697
|
-
* ref methods (ref.current.instance.*method*)
|
|
698
|
-
*
|
|
699
|
-
* * show: Show popover
|
|
700
|
-
* * close: Close popover
|
|
701
|
-
* * setPosition(element): Set position of popover
|
|
702
|
-
* * @param {element} - element
|
|
696
|
+
/**
|
|
697
|
+
* ref methods (ref.current.instance.*method*)
|
|
698
|
+
*
|
|
699
|
+
* * show: Show popover
|
|
700
|
+
* * close: Close popover
|
|
701
|
+
* * setPosition(element): Set position of popover
|
|
702
|
+
* * @param {element} - element
|
|
703
703
|
*/
|
|
704
704
|
reference: ref
|
|
705
705
|
};
|
|
@@ -1071,10 +1071,10 @@ TreeView.propTypes = {
|
|
|
1071
1071
|
/** class on element */
|
|
1072
1072
|
className: PropTypes.string,
|
|
1073
1073
|
|
|
1074
|
-
/**
|
|
1075
|
-
* field name used for text display<br/>
|
|
1076
|
-
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1077
|
-
* Note: don't use 'id - name', return undefined
|
|
1074
|
+
/**
|
|
1075
|
+
* field name used for text display<br/>
|
|
1076
|
+
* Example: 'name', '{id} - {name}', '{age} age(s)'<br/>
|
|
1077
|
+
* Note: don't use 'id - name', return undefined
|
|
1078
1078
|
*/
|
|
1079
1079
|
displayExpr: PropTypes.string,
|
|
1080
1080
|
|
|
@@ -1084,19 +1084,19 @@ TreeView.propTypes = {
|
|
|
1084
1084
|
/** return value for the select multiple use case */
|
|
1085
1085
|
multipleValueMode: PropTypes.oneOf(['single', 'multiple', 'inheritance']),
|
|
1086
1086
|
|
|
1087
|
-
/**
|
|
1088
|
-
* return value for the select multiple use case
|
|
1089
|
-
* * contains: "Công ty" contains "công", but not contains "cong"
|
|
1090
|
-
* * similar: "Công ty" contains "công" and "cong"
|
|
1087
|
+
/**
|
|
1088
|
+
* return value for the select multiple use case
|
|
1089
|
+
* * contains: "Công ty" contains "công", but not contains "cong"
|
|
1090
|
+
* * similar: "Công ty" contains "công" and "cong"
|
|
1091
1091
|
*/
|
|
1092
1092
|
searchMode: PropTypes.oneOf(['contains', 'similar']),
|
|
1093
1093
|
|
|
1094
1094
|
/** The content display for label of checkbox select all */
|
|
1095
1095
|
selectAllLabel: PropTypes.string,
|
|
1096
1096
|
|
|
1097
|
-
/**
|
|
1098
|
-
* duration wait enter search content on search<br/>
|
|
1099
|
-
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1097
|
+
/**
|
|
1098
|
+
* duration wait enter search content on search<br/>
|
|
1099
|
+
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
1100
1100
|
*/
|
|
1101
1101
|
searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
1102
1102
|
|
|
@@ -1112,20 +1112,20 @@ TreeView.propTypes = {
|
|
|
1112
1112
|
/** the value was selected */
|
|
1113
1113
|
value: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
1114
1114
|
|
|
1115
|
-
/** function displays items by custom<br/>
|
|
1116
|
-
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1117
|
-
* --> such as: displayExpr={'name - role'}
|
|
1115
|
+
/** function displays items by custom<br/>
|
|
1116
|
+
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1117
|
+
* --> such as: displayExpr={'name - role'}
|
|
1118
1118
|
*/
|
|
1119
1119
|
renderItem: PropTypes.func,
|
|
1120
1120
|
|
|
1121
|
-
/**
|
|
1122
|
-
* on change value function<br />
|
|
1123
|
-
* return 2 parameters (e, data)<br />
|
|
1124
|
-
* * e: element (insist {value, justSelected, data})<br/>
|
|
1125
|
-
* + value is one or an array of selected values<br />
|
|
1126
|
-
* + justSelected is value has just been selected (either true or false))<br />
|
|
1127
|
-
* + data is one or an array of selected values with full information<br />
|
|
1128
|
-
* * data: array of selected values (not recommend because it's the same e.value)
|
|
1121
|
+
/**
|
|
1122
|
+
* on change value function<br />
|
|
1123
|
+
* return 2 parameters (e, data)<br />
|
|
1124
|
+
* * e: element (insist {value, justSelected, data})<br/>
|
|
1125
|
+
* + value is one or an array of selected values<br />
|
|
1126
|
+
* + justSelected is value has just been selected (either true or false))<br />
|
|
1127
|
+
* + data is one or an array of selected values with full information<br />
|
|
1128
|
+
* * data: array of selected values (not recommend because it's the same e.value)
|
|
1129
1129
|
*/
|
|
1130
1130
|
onChange: PropTypes.func,
|
|
1131
1131
|
|
|
@@ -1138,22 +1138,22 @@ TreeView.propTypes = {
|
|
|
1138
1138
|
/** the icon to display for collapse icon */
|
|
1139
1139
|
collapseIcon: PropTypes.any,
|
|
1140
1140
|
|
|
1141
|
-
/**
|
|
1142
|
-
* get ref of TreeView component, insist:<br/>
|
|
1143
|
-
* {<br/>
|
|
1144
|
-
* disabled: true/false,<br/>
|
|
1145
|
-
* displayExpr: string,<br/>
|
|
1146
|
-
* valueExpr: string,<br/>
|
|
1147
|
-
* id: string,<br/>
|
|
1148
|
-
* parentID: string,<br/>
|
|
1149
|
-
* value: string/array<br/>
|
|
1150
|
-
* getValue: get selected values (instead of onChange function),<br/>
|
|
1151
|
-
* setValue: set array of value (only multiple),<br/>
|
|
1152
|
-
* handleCheckbox: checked/unchecked a Checkbox, includes 2 parameters (isChecked, value):<br/>
|
|
1153
|
-
* + isChecked: checked if true (default is false) <br/>
|
|
1154
|
-
* + value: selected values, use 'all' for all values (default is 'all') <br/>
|
|
1155
|
-
* get: get DOM of TreeView component<br/>
|
|
1156
|
-
* }
|
|
1141
|
+
/**
|
|
1142
|
+
* get ref of TreeView component, insist:<br/>
|
|
1143
|
+
* {<br/>
|
|
1144
|
+
* disabled: true/false,<br/>
|
|
1145
|
+
* displayExpr: string,<br/>
|
|
1146
|
+
* valueExpr: string,<br/>
|
|
1147
|
+
* id: string,<br/>
|
|
1148
|
+
* parentID: string,<br/>
|
|
1149
|
+
* value: string/array<br/>
|
|
1150
|
+
* getValue: get selected values (instead of onChange function),<br/>
|
|
1151
|
+
* setValue: set array of value (only multiple),<br/>
|
|
1152
|
+
* handleCheckbox: checked/unchecked a Checkbox, includes 2 parameters (isChecked, value):<br/>
|
|
1153
|
+
* + isChecked: checked if true (default is false) <br/>
|
|
1154
|
+
* + value: selected values, use 'all' for all values (default is 'all') <br/>
|
|
1155
|
+
* get: get DOM of TreeView component<br/>
|
|
1156
|
+
* }
|
|
1157
1157
|
*/
|
|
1158
1158
|
ref: PropTypes.any
|
|
1159
1159
|
};
|
|
@@ -172,16 +172,16 @@ Typography.defaultProps = {
|
|
|
172
172
|
tooltipDirection: 'bottom',
|
|
173
173
|
type: 'p1'
|
|
174
174
|
};
|
|
175
|
-
/** type of text<br/>
|
|
176
|
-
* h1: Title <br/>
|
|
177
|
-
* h2: Header Popup <br/>
|
|
178
|
-
* h3: Header popup <br/>
|
|
179
|
-
* h4: Button, Tab, Title group <br/>
|
|
180
|
-
* h5: Label column, Title group <br/>
|
|
181
|
-
* h6: Label form <br/>
|
|
182
|
-
* p1: Body text <br/>
|
|
183
|
-
* p2: Body text <br/>
|
|
184
|
-
* p3: Notice, Tooltip <br/>
|
|
175
|
+
/** type of text<br/>
|
|
176
|
+
* h1: Title <br/>
|
|
177
|
+
* h2: Header Popup <br/>
|
|
178
|
+
* h3: Header popup <br/>
|
|
179
|
+
* h4: Button, Tab, Title group <br/>
|
|
180
|
+
* h5: Label column, Title group <br/>
|
|
181
|
+
* h6: Label form <br/>
|
|
182
|
+
* p1: Body text <br/>
|
|
183
|
+
* p2: Body text <br/>
|
|
184
|
+
* p3: Notice, Tooltip <br/>
|
|
185
185
|
*/
|
|
186
186
|
|
|
187
187
|
export const arrTypeTypography = ['t1', 't2', 't3', 't4', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p1', 'p2', 'p3', 'title1', 'title2', 'title3', 'title4', 'heading1', 'heading2', 'heading3', 'heading4', 'heading5', 'heading6', 'paragraph1', 'paragraph2', 'paragraph3'];
|
package/icons/effect.js
CHANGED
|
@@ -97,8 +97,8 @@ Icon.propTypes = {
|
|
|
97
97
|
/** name of icon in icons store */
|
|
98
98
|
name: PropTypes.string.isRequired,
|
|
99
99
|
|
|
100
|
-
/** color of icon<br />
|
|
101
|
-
* default: #7F828E
|
|
100
|
+
/** color of icon<br />
|
|
101
|
+
* default: #7F828E
|
|
102
102
|
*/
|
|
103
103
|
color: PropTypes.string,
|
|
104
104
|
|
|
@@ -120,19 +120,19 @@ Icon.propTypes = {
|
|
|
120
120
|
/** have view box if true */
|
|
121
121
|
onClick: PropTypes.func,
|
|
122
122
|
|
|
123
|
-
/**
|
|
124
|
-
* ref methods
|
|
125
|
-
*
|
|
126
|
-
* * option(): Gets all UI component properties
|
|
127
|
-
* * Returns value - object
|
|
128
|
-
* * option(optionName): Gets the value of a single property
|
|
129
|
-
* * @param {optionName} - string
|
|
130
|
-
* * Returns value - any
|
|
131
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
132
|
-
* * @param {optionName} - string
|
|
133
|
-
* * @param {optionValue} - any
|
|
134
|
-
* * option(options): Updates the values of several properties
|
|
135
|
-
* * @param {options} - object
|
|
123
|
+
/**
|
|
124
|
+
* ref methods
|
|
125
|
+
*
|
|
126
|
+
* * option(): Gets all UI component properties
|
|
127
|
+
* * Returns value - object
|
|
128
|
+
* * option(optionName): Gets the value of a single property
|
|
129
|
+
* * @param {optionName} - string
|
|
130
|
+
* * Returns value - any
|
|
131
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
132
|
+
* * @param {optionName} - string
|
|
133
|
+
* * @param {optionValue} - any
|
|
134
|
+
* * option(options): Updates the values of several properties
|
|
135
|
+
* * @param {options} - object
|
|
136
136
|
*/
|
|
137
137
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
138
138
|
current: PropTypes.instanceOf(Element)
|
package/package.json
CHANGED
package/utils/useInput.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
const useInput = (defaultValue, valueProp, onChange, onInput, delayOnChange) => {
|
|
4
4
|
const [value, setValue] = useState(defaultValue || valueProp);
|
|
5
5
|
const timer = useRef(null);
|
|
6
6
|
delayOnChange = Number(delayOnChange || 0);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
setValue(valueProp);
|
|
9
|
+
}, [valueProp]);
|
|
7
10
|
|
|
8
11
|
const _onChange = e => {
|
|
9
12
|
e.persist();
|