diginet-core-ui 1.3.87 → 1.3.88
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/bem/WA3F0100.svg +6 -6
- package/assets/images/menu/bem/WA3F1025.svg +10 -10
- package/assets/images/menu/bem/WA3F2000.svg +10 -10
- package/assets/images/menu/bem/WA3F2020.svg +6 -6
- package/assets/images/menu/bem/WA3F2030.svg +14 -14
- package/assets/images/menu/bem/WA3F2040.svg +8 -8
- package/assets/images/menu/bem/WA3F2100.svg +6 -6
- 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/MHRM00N0002.svg +22 -22
- package/assets/images/menu/dhr/MHRM00N0003.svg +17 -17
- package/assets/images/menu/dhr/MHRM00N0004.svg +12 -12
- package/assets/images/menu/dhr/MHRM00N0005.svg +11 -11
- 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/MHRM09N1010.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1015.svg +18 -18
- package/assets/images/menu/dhr/MHRM09N1020.svg +13 -13
- package/assets/images/menu/dhr/MHRM09N1025.svg +12 -12
- package/assets/images/menu/dhr/MHRM09N1030.svg +11 -11
- package/assets/images/menu/dhr/MHRM09N1035.svg +15 -15
- package/assets/images/menu/dhr/MHRM09N1040.svg +8 -8
- package/assets/images/menu/dhr/MHRM09N1400.svg +11 -11
- package/assets/images/menu/dhr/MHRM13N0001.svg +16 -16
- package/assets/images/menu/dhr/MHRM13N0002.svg +13 -13
- package/assets/images/menu/dhr/MHRM13N0003.svg +12 -12
- package/assets/images/menu/dhr/MHRM13N0004.svg +21 -21
- 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 -17
- package/assets/images/menu/dhr/MHRM29N0004.svg +18 -18
- package/assets/images/menu/dhr/MHRM29N0005.svg +13 -13
- 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/MHRM39N0017.svg +14 -14
- package/assets/images/menu/dhr/MHRM39N0018.svg +5 -5
- package/assets/images/menu/dhr/MHRM39N0019.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0020.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0021.svg +11 -11
- package/assets/images/menu/dhr/MHRM39N0022.svg +18 -18
- package/assets/images/menu/dhr/MHRM39N0023.svg +13 -13
- package/assets/images/menu/dhr/MHRM77N0001.svg +28 -28
- package/assets/images/menu/dhr/MHRM82N0001.svg +8 -8
- package/assets/images/menu/dhr/MHRM82N0002.svg +5 -5
- 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/MHRP25L0101.svg +15 -15
- package/assets/images/menu/dhr/MHRP25L0501.svg +14 -14
- 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/MHRP29N0026.svg +13 -13
- package/assets/images/menu/dhr/MHRP29N0027.svg +14 -14
- package/assets/images/menu/dhr/MHRP29N0028.svg +15 -15
- 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 +7 -7
- 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 +5 -5
- package/assets/images/menu/dhr/MHRP89N1001.svg +5 -5
- 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 +4 -4
- 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/assets/storybook/avatar01.svg +9 -9
- package/assets/storybook/cover01.svg +9 -9
- package/components/accordion/details.js +6 -2
- package/components/accordion/group.js +9 -2
- package/components/accordion/index.js +15 -2
- package/components/accordion/summary.js +27 -4
- package/components/alert/index.js +33 -2
- package/components/alert/notify.js +22 -12
- package/components/avatar/index.js +81 -22
- package/components/badge/index.js +45 -20
- package/components/button/icon.js +56 -25
- package/components/button/index.js +65 -16
- package/components/button/more.js +35 -15
- package/components/button/ripple-effect.js +10 -0
- package/components/card/body.js +7 -2
- package/components/card/extra.js +7 -2
- package/components/card/footer.js +7 -2
- package/components/card/header.js +7 -2
- package/components/card/index.js +22 -2
- package/components/chart/Pie/Circle.js +1 -0
- package/components/chart/Pie/Sector.js +19 -2
- package/components/chart/Pie/Sectors.js +10 -0
- package/components/chart/Pie/index.js +36 -4
- package/components/chart/Pie-v2/Circle.js +1 -0
- package/components/chart/Pie-v2/Sector.js +15 -2
- package/components/chart/Pie-v2/Sectors.js +20 -0
- package/components/chart/Pie-v2/index.js +38 -11
- package/components/chart/bar/Axis.js +12 -0
- package/components/chart/bar/Bar.js +35 -13
- package/components/chart/bar/Grid.js +18 -0
- package/components/chart/bar/Labels.js +18 -0
- package/components/chart/bar/Points.js +17 -0
- package/components/chart/bar/index.js +26 -6
- package/components/chart/bar-v2/Axis.js +12 -0
- package/components/chart/bar-v2/Bar.js +36 -15
- package/components/chart/bar-v2/Grid.js +18 -0
- package/components/chart/bar-v2/Labels.js +18 -0
- package/components/chart/bar-v2/Points.js +17 -0
- package/components/chart/bar-v2/index.js +26 -6
- package/components/chart/line/Axis.js +16 -4
- package/components/chart/line/Grid.js +19 -2
- package/components/chart/line/Labels.js +18 -0
- package/components/chart/line/Path.js +33 -23
- package/components/chart/line/Point.js +40 -6
- package/components/chart/line/Title.js +3 -0
- package/components/chart/line/index.js +35 -12
- package/components/chart/line-v2/Axis.js +13 -0
- package/components/chart/line-v2/Grid.js +18 -0
- package/components/chart/line-v2/Labels.js +18 -0
- package/components/chart/line-v2/Path.js +33 -23
- package/components/chart/line-v2/Point.js +35 -6
- package/components/chart/line-v2/Title.js +3 -0
- package/components/chart/line-v2/index.js +30 -12
- package/components/check-text/index.js +8 -0
- package/components/check-text/interview-confirmation.js +7 -0
- package/components/check-text/interview-status.js +7 -0
- package/components/chip/attach.js +22 -9
- package/components/chip/index.js +33 -6
- package/components/collapse/index.js +13 -0
- package/components/divider/index.js +13 -2
- package/components/form-control/attachment/index.js +202 -41
- package/components/form-control/calendar/function.js +207 -153
- package/components/form-control/calendar/index.js +46 -21
- package/components/form-control/calendar/range.js +28 -11
- package/components/form-control/checkbox/index.js +37 -4
- package/components/form-control/control/index.js +13 -3
- package/components/form-control/date-picker/index-old.js +0 -18
- package/components/form-control/date-picker/index.js +99 -23
- package/components/form-control/date-range-picker/index.js +180 -44
- package/components/form-control/dropdown/index.js +314 -101
- package/components/form-control/dropdown-box/index.js +35 -6
- package/components/form-control/form/index.js +2 -0
- package/components/form-control/form-group/index.js +6 -1
- package/components/form-control/helper-text/index.js +9 -2
- package/components/form-control/input-base/index.js +73 -9
- package/components/form-control/label/index.js +12 -2
- package/components/form-control/money-input/index.js +143 -54
- package/components/form-control/number-input/index.js +124 -26
- package/components/form-control/number-input/index2.js +119 -78
- package/components/form-control/phone-input/index.js +85 -23
- package/components/form-control/radio/index.js +28 -9
- package/components/form-control/text-input/index.js +46 -10
- package/components/form-control/time-picker/index.js +71 -14
- package/components/form-control/time-picker/swiper.js +73 -21
- package/components/form-control/toggle/index.js +23 -8
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +14 -0
- package/components/form-view/input.js +13 -2
- package/components/form-view/label.js +2 -0
- package/components/grid/Col.js +16 -2
- package/components/grid/Container.js +21 -2
- package/components/grid/Row.js +21 -2
- package/components/grid/index.js +44 -2
- package/components/image/index.js +22 -2
- package/components/index.js +31 -62
- package/components/list/list-item-action.js +9 -0
- package/components/list/list-item-icon.js +9 -0
- package/components/list/list-item-text.js +5 -0
- package/components/list/list-item.js +11 -0
- package/components/list/list.js +13 -0
- package/components/list/sub-header.js +4 -0
- package/components/modal/body.js +6 -2
- package/components/modal/footer.js +11 -2
- package/components/modal/header.js +12 -2
- package/components/modal/index.js +10 -2
- package/components/modal/modal.js +52 -11
- package/components/others/extra/index.js +10 -3
- package/components/others/import/index.js +7 -0
- package/components/others/option-wrapper/index.js +7 -4
- package/components/others/scrollbar/index.js +3 -0
- package/components/paging/page-info.js +99 -35
- package/components/paging/page-selector.js +35 -7
- package/components/paging/page-selector2.js +74 -35
- package/components/paper/index.js +11 -0
- package/components/popover/body.js +6 -2
- package/components/popover/footer.js +11 -2
- package/components/popover/header.js +7 -2
- package/components/popover/index.js +146 -54
- package/components/popup/danger_popup.js +19 -0
- package/components/popup/index.js +48 -2
- package/components/popup/proposals_popup.js +49 -10
- package/components/popup/v2/index.js +47 -13
- package/components/progress/circular.js +48 -10
- package/components/progress/linear.js +20 -4
- package/components/rating/index.js +32 -8
- package/components/slider/slider-container.js +40 -3
- package/components/slider/slider-item.js +25 -10
- package/components/status/index.js +14 -2
- package/components/tab/tab-container.js +18 -4
- package/components/tab/tab-header.js +24 -4
- package/components/tab/tab-panel.js +16 -4
- package/components/tab/tab.js +30 -6
- package/components/tooltip/index.js +97 -12
- package/components/tooltip/portal.js +2 -0
- package/components/transfer/index.js +70 -25
- package/components/tree-view/index.js +202 -62
- package/components/typography/index.js +70 -47
- package/global/index.js +8 -0
- package/icons/basic.js +232 -0
- package/icons/effect.js +32 -15
- package/icons/general/clock/clock.js +2 -0
- package/icons/general/color-handler/background.js +2 -0
- package/icons/general/color-handler/text.js +2 -0
- package/icons/general/emoji/emoji.js +2 -0
- package/icons/general/font-properties/bold.js +2 -0
- package/icons/general/font-properties/font-family.js +2 -0
- package/icons/general/font-properties/font-size.js +2 -0
- package/icons/general/font-properties/italic.js +2 -0
- package/icons/general/font-properties/underline.js +2 -0
- package/icons/general/hyperlink/hyperlink.js +2 -0
- package/icons/general/indent/decrease.js +2 -0
- package/icons/general/indent/increase.js +2 -0
- package/icons/general/list/bullets.js +2 -0
- package/icons/general/list/numbering.js +2 -0
- package/icons/general/picture/picture.js +2 -0
- package/icons/general/steps/redo.js +2 -0
- package/icons/general/steps/undo.js +2 -0
- package/icons/general/text-align/center.js +2 -0
- package/icons/general/text-align/justify.js +2 -0
- package/icons/general/text-align/left.js +2 -0
- package/icons/general/text-align/right.js +2 -0
- package/icons/menu/dhr.js +1 -2
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +15 -2
- package/package.json +42 -42
- package/readme.md +1027 -1022
- package/styles/animation.js +58 -15
- package/styles/color-helper.js +157 -127
- package/styles/colors.js +9 -17
- package/styles/general.js +80 -18
- package/styles/typography.js +4 -4
- package/styles/utils.js +20 -19
- package/theme/createBreakpoints.js +18 -7
- package/theme/make-styles.js +5 -2
- package/theme/set-theme.js +9 -6
- package/theme/settings.js +2 -3
- package/theme/theme-provider.js +1 -0
- package/utils/array/array.js +54 -45
- package/utils/{classNames.js → classNames/index.js} +5 -0
- package/utils/console.js +6 -0
- package/utils/date.js +138 -69
- package/utils/error/error.js +11 -3
- package/utils/error/errors.js +147 -100
- package/utils/getFileType.js +9 -0
- package/utils/handleBreakpoints.js +5 -0
- package/utils/intersectionObserver.js +5 -0
- package/utils/{isMobile.js → isMobile/index.js} +0 -0
- package/utils/iterator.js +9 -0
- package/utils/map-parent.js +10 -3
- package/utils/object/extend.js +10 -0
- package/utils/object/object.js +11 -12
- package/utils/parseHTML.js +1 -0
- package/utils/promisify.js +5 -0
- package/utils/randomString.js +7 -0
- package/utils/remove-unicode.js +1 -0
- package/utils/render-portal.js +9 -1
- package/utils/renderHTML.js +6 -4
- package/utils/renderIcon.js +19 -9
- package/utils/sb-template.js +5 -6
- package/utils/string/capitalize.js +1 -0
- package/utils/string/capitalizeSentenceCase.js +2 -0
- package/utils/string/string.js +13 -0
- package/utils/type.js +21 -0
- package/utils/updatePosition.js +5 -4
- package/utils/useDelayUnmount.js +4 -0
- package/utils/useElementSize.js +3 -9
- package/utils/useEventListener.js +6 -12
- package/utils/useInput.js +6 -0
- package/utils/{useMediaQuery.js → useMediaQuery/index.js} +10 -8
- package/utils/useOnClickOutside.js +4 -2
- package/utils/usePortal.js +19 -12
- package/utils/validate.js +53 -39
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import { memo, useMemo, useState, useEffect, useRef, forwardRef, Fragment, useImperativeHandle } from 'react';
|
|
4
5
|
import { render } from 'react-dom';
|
|
@@ -27,7 +28,7 @@ const {
|
|
|
27
28
|
} = theme;
|
|
28
29
|
const separatorPattern = /\{\w+\}/g;
|
|
29
30
|
const currentValue = {},
|
|
30
|
-
|
|
31
|
+
itemsRenderAsync = {};
|
|
31
32
|
const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
32
33
|
action = {},
|
|
33
34
|
allowSearch,
|
|
@@ -71,6 +72,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
71
72
|
allowNumber: false,
|
|
72
73
|
allowSymbol: false
|
|
73
74
|
}));
|
|
75
|
+
|
|
74
76
|
const determinateCheckbox = (input, determinate) => {
|
|
75
77
|
if (multipleValueMode === 'multiple' || disabledRelevantValue) {
|
|
76
78
|
input.classList[determinate ? 'add' : 'remove']('determinate');
|
|
@@ -78,9 +80,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
78
80
|
input.nextElementSibling.firstChild.classList[determinate ? 'add' : 'remove']('determinate');
|
|
79
81
|
input.nextElementSibling.firstChild.classList[determinate ? 'remove' : 'add']('indeterminate');
|
|
80
82
|
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// const triggerCheckboxRecursion = (nodes, isChecked) => {
|
|
83
|
+
}; // const triggerCheckboxRecursion = (nodes, isChecked) => {
|
|
84
84
|
// nodes.forEach(el => {
|
|
85
85
|
// if (el.classList.contains('non-child')) {
|
|
86
86
|
// el.querySelector('input').checked = isChecked;
|
|
@@ -91,32 +91,40 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
91
91
|
// });
|
|
92
92
|
// };
|
|
93
93
|
|
|
94
|
+
|
|
94
95
|
const checkedParentFollowValue = nodes => {
|
|
95
96
|
if (nodes && nodes !== null && nodes !== void 0 && nodes.length) {
|
|
96
97
|
nodes.forEach(node => {
|
|
97
98
|
if (!node.classList.contains('non-child')) {
|
|
98
99
|
const input = node.firstChild.querySelector('input');
|
|
100
|
+
|
|
99
101
|
if (input.checked) {
|
|
100
102
|
if (!input.classList.contains('determinate')) {
|
|
101
103
|
determinateCheckbox(input, true);
|
|
102
104
|
}
|
|
105
|
+
|
|
103
106
|
Array.from(node.querySelectorAll('input')).forEach(el => {
|
|
104
107
|
el.checked = true;
|
|
108
|
+
|
|
105
109
|
if (!el.classList.contains('determinate')) {
|
|
106
110
|
determinateCheckbox(el, true);
|
|
107
111
|
}
|
|
108
112
|
});
|
|
109
113
|
} else {
|
|
110
114
|
var _node$lastChild, _node$lastChild$first;
|
|
115
|
+
|
|
111
116
|
const checkedLeastOfOne = Array.from(node.querySelectorAll('input')).some(el => el.checked);
|
|
117
|
+
|
|
112
118
|
if (checkedLeastOfOne) {
|
|
113
119
|
input.checked = checkedLeastOfOne;
|
|
120
|
+
|
|
114
121
|
if (input.classList.contains('determinate')) {
|
|
115
122
|
determinateCheckbox(input, false);
|
|
116
123
|
}
|
|
117
124
|
} else if (input.checked) {
|
|
118
125
|
input.checked = false;
|
|
119
126
|
}
|
|
127
|
+
|
|
120
128
|
const childNodes = Array.from((node === null || node === void 0 ? void 0 : (_node$lastChild = node.lastChild) === null || _node$lastChild === void 0 ? void 0 : (_node$lastChild$first = _node$lastChild.firstChild) === null || _node$lastChild$first === void 0 ? void 0 : _node$lastChild$first.childNodes) || '');
|
|
121
129
|
checkedParentFollowValue(childNodes);
|
|
122
130
|
}
|
|
@@ -124,39 +132,48 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
124
132
|
});
|
|
125
133
|
}
|
|
126
134
|
};
|
|
135
|
+
|
|
127
136
|
const checkParentCheckbox = node => {
|
|
128
137
|
while (ref.current.contains(node)) {
|
|
129
138
|
node = node.parentNode;
|
|
139
|
+
|
|
130
140
|
if (multipleValueMode === 'multiple' && node.classList.contains('DGN-UI-Accordion-Details-Content')) {
|
|
131
141
|
const childNodes = Array.from(node.childNodes);
|
|
142
|
+
|
|
132
143
|
if (childNodes) {
|
|
133
144
|
var _node$parentNode;
|
|
145
|
+
|
|
134
146
|
// Số lượng input đã check, dùng để kiểm tra là đã check tất cả, check chưa đầy đủ hoặc chưa check phần tử nào
|
|
135
147
|
let determinateQuantity = 0;
|
|
136
148
|
const checkedQuantity = childNodes.reduce((quantity, el) => {
|
|
137
149
|
const input = el.querySelector('input');
|
|
138
150
|
determinateQuantity += +input.classList.contains('determinate');
|
|
139
151
|
return quantity + +input.checked;
|
|
140
|
-
}, 0);
|
|
141
|
-
|
|
152
|
+
}, 0); // Accordion root
|
|
153
|
+
|
|
142
154
|
node = (_node$parentNode = node.parentNode) === null || _node$parentNode === void 0 ? void 0 : _node$parentNode.parentNode;
|
|
155
|
+
|
|
143
156
|
if (node && node.firstChild) {
|
|
144
157
|
const input = node.firstChild.querySelector('input');
|
|
158
|
+
|
|
145
159
|
if (input) {
|
|
146
160
|
if (!checkedQuantity) {
|
|
147
161
|
input.checked = false;
|
|
148
162
|
currentValue[unique][input.value] = false;
|
|
149
163
|
} else {
|
|
150
164
|
input.checked = true;
|
|
165
|
+
|
|
151
166
|
if (checkedQuantity === (childNodes === null || childNodes === void 0 ? void 0 : childNodes.length) && checkedQuantity === determinateQuantity) {
|
|
152
167
|
if (!input.classList.contains('determinate')) {
|
|
153
168
|
determinateCheckbox(input, true);
|
|
154
169
|
}
|
|
170
|
+
|
|
155
171
|
currentValue[unique][input.value] = true;
|
|
156
172
|
} else {
|
|
157
173
|
if (input.classList.contains('determinate')) {
|
|
158
174
|
determinateCheckbox(input, false);
|
|
159
175
|
}
|
|
176
|
+
|
|
160
177
|
currentValue[unique][input.value] = false;
|
|
161
178
|
}
|
|
162
179
|
}
|
|
@@ -170,6 +187,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
170
187
|
}
|
|
171
188
|
}
|
|
172
189
|
};
|
|
190
|
+
|
|
173
191
|
const checkChildrenCheckbox = (node, isChecked) => {
|
|
174
192
|
// node = node.nextElementSibling?.firstChild;
|
|
175
193
|
// if (node) {
|
|
@@ -183,14 +201,18 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
183
201
|
if (!el.classList.contains('determinate')) {
|
|
184
202
|
determinateCheckbox(el, true);
|
|
185
203
|
}
|
|
204
|
+
|
|
186
205
|
el.checked = isChecked;
|
|
187
206
|
});
|
|
188
207
|
}
|
|
189
208
|
};
|
|
209
|
+
|
|
190
210
|
const checkedSelectAllCheckbox = () => {
|
|
191
211
|
const allInput = Array.from(ref.current.querySelectorAll('input'));
|
|
212
|
+
|
|
192
213
|
if (allInput.some(i => i.checked)) {
|
|
193
214
|
const isCheckedAll = allInput.every(i => i.checked);
|
|
215
|
+
|
|
194
216
|
if (isCheckedAll) {
|
|
195
217
|
if (!selectAllRef.current.classList.contains('determinate')) {
|
|
196
218
|
determinateCheckbox(selectAllRef.current, true);
|
|
@@ -200,15 +222,18 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
200
222
|
determinateCheckbox(selectAllRef.current, false);
|
|
201
223
|
}
|
|
202
224
|
}
|
|
225
|
+
|
|
203
226
|
selectAllRef.current.checked = true;
|
|
204
227
|
} else if (selectAllRef.current.checked) {
|
|
205
228
|
selectAllRef.current.checked = false;
|
|
206
229
|
}
|
|
207
230
|
};
|
|
231
|
+
|
|
208
232
|
const handleDisabledChildren = (node, isChecked) => {
|
|
209
233
|
if (node) {
|
|
210
234
|
node.querySelectorAll('.TreeView-Item.non-child, .DGN-UI-Accordion').forEach(el => {
|
|
211
235
|
el.classList[isChecked ? 'add' : 'remove']('disabled');
|
|
236
|
+
|
|
212
237
|
if (el.classList.contains('DGN-UI-Accordion')) {
|
|
213
238
|
el.firstChild.firstChild.lastChild.firstChild.firstChild.firstChild.classList[isChecked ? 'add' : 'remove']('disabled');
|
|
214
239
|
el.firstChild.firstChild.lastChild.firstChild.firstChild.firstChild.disabled = isChecked;
|
|
@@ -223,20 +248,25 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
223
248
|
});
|
|
224
249
|
}
|
|
225
250
|
};
|
|
251
|
+
|
|
226
252
|
const handleDisabledParent = (node, isChecked) => {
|
|
227
253
|
while (ref.current.contains(node)) {
|
|
228
254
|
node = node.parentNode;
|
|
255
|
+
|
|
229
256
|
if (node.classList.contains('DGN-UI-Accordion') && node.firstChild.classList.contains('DGN-UI-Accordion-Summary')) {
|
|
230
257
|
var _node$querySelectorAl;
|
|
258
|
+
|
|
231
259
|
const summaryEl = node.firstChild;
|
|
260
|
+
|
|
232
261
|
if (!summaryEl.classList.contains('expanding')) {
|
|
233
262
|
summaryEl.lastChild.firstChild.click();
|
|
234
263
|
}
|
|
235
|
-
|
|
236
|
-
// Trường hợp phải set về false để xét các input đã check không bao gồm node này
|
|
264
|
+
|
|
265
|
+
const checkbox = node.firstChild.firstChild.lastChild.firstChild.firstChild.firstChild; // Trường hợp phải set về false để xét các input đã check không bao gồm node này
|
|
266
|
+
|
|
237
267
|
checkbox.firstChild.checked = isChecked;
|
|
238
|
-
const mustDisabled = !!((_node$querySelectorAl = node.querySelectorAll('input:checked')) !== null && _node$querySelectorAl !== void 0 && _node$querySelectorAl.length);
|
|
239
|
-
|
|
268
|
+
const mustDisabled = !!((_node$querySelectorAl = node.querySelectorAll('input:checked')) !== null && _node$querySelectorAl !== void 0 && _node$querySelectorAl.length); // Nếu có ít nhất một input con được check thì phải checked cho input này
|
|
269
|
+
|
|
240
270
|
checkbox.firstChild.checked = mustDisabled;
|
|
241
271
|
determinateCheckbox(checkbox.firstChild, !mustDisabled);
|
|
242
272
|
node.classList[mustDisabled || isChecked ? 'add' : 'remove']('disabled');
|
|
@@ -249,10 +279,13 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
249
279
|
}
|
|
250
280
|
}
|
|
251
281
|
};
|
|
282
|
+
|
|
252
283
|
const setValue = (data, isChecked) => {
|
|
253
284
|
if (multiple && multipleValueMode !== 'single') {
|
|
254
285
|
var _data$childItems;
|
|
286
|
+
|
|
255
287
|
currentValue[unique][typeof data === 'object' ? data[valueExpr] : data] = isChecked;
|
|
288
|
+
|
|
256
289
|
if (data.childItems && (_data$childItems = data.childItems) !== null && _data$childItems !== void 0 && _data$childItems.length) {
|
|
257
290
|
data.childItems.forEach(d => {
|
|
258
291
|
setValue(d, isChecked);
|
|
@@ -260,6 +293,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
260
293
|
}
|
|
261
294
|
}
|
|
262
295
|
};
|
|
296
|
+
|
|
263
297
|
const clearAllValue = () => {
|
|
264
298
|
inputValueRef.current.value = '';
|
|
265
299
|
clearIconRef.current.style.opacity = 0;
|
|
@@ -274,17 +308,22 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
274
308
|
data: []
|
|
275
309
|
}, []);
|
|
276
310
|
};
|
|
311
|
+
|
|
277
312
|
const setValueIntoInput = data => {
|
|
278
313
|
var _clearIconRef$current2;
|
|
314
|
+
|
|
279
315
|
if (!data || !(data !== null && data !== void 0 && data.length)) {
|
|
280
316
|
var _clearIconRef$current;
|
|
317
|
+
|
|
281
318
|
inputValueRef.current.value = '';
|
|
282
319
|
if ((_clearIconRef$current = clearIconRef.current) !== null && _clearIconRef$current !== void 0 && _clearIconRef$current.element) clearIconRef.current.element.style.opacity = 0;
|
|
283
320
|
return;
|
|
284
321
|
}
|
|
322
|
+
|
|
285
323
|
if ((_clearIconRef$current2 = clearIconRef.current) !== null && _clearIconRef$current2 !== void 0 && _clearIconRef$current2.element && clearIconRef.current.element.style.opacity === '0') {
|
|
286
324
|
clearIconRef.current.element.style.opacity = null;
|
|
287
325
|
}
|
|
326
|
+
|
|
288
327
|
let result = '';
|
|
289
328
|
const keyArr = displayExpr.match(separatorPattern);
|
|
290
329
|
data.forEach(d => {
|
|
@@ -292,6 +331,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
292
331
|
});
|
|
293
332
|
inputValueRef.current.value = result.replace(/, $/, '');
|
|
294
333
|
};
|
|
334
|
+
|
|
295
335
|
const handleCheckbox = (isChecked = false, value = 'all') => {
|
|
296
336
|
if ((selectBox || multiple) && ref.current) {
|
|
297
337
|
if (value === 'all') {
|
|
@@ -300,8 +340,10 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
300
340
|
if (typeof value === 'string') {
|
|
301
341
|
value = [value];
|
|
302
342
|
}
|
|
343
|
+
|
|
303
344
|
value.forEach(v => {
|
|
304
345
|
const input = ref.current.querySelector(`input[value="${v}"]`);
|
|
346
|
+
|
|
305
347
|
if (input) {
|
|
306
348
|
input.checked = isChecked;
|
|
307
349
|
}
|
|
@@ -309,6 +351,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
309
351
|
}
|
|
310
352
|
}
|
|
311
353
|
};
|
|
354
|
+
|
|
312
355
|
const onClickHandler = (e, data) => {
|
|
313
356
|
if (disabled) return;
|
|
314
357
|
const target = e.target;
|
|
@@ -317,11 +360,13 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
317
360
|
const justSelected = value;
|
|
318
361
|
const result = [];
|
|
319
362
|
const checkBoxEl = currentTarget.querySelector('.TreeView-Item-Checkbox');
|
|
363
|
+
|
|
320
364
|
if (multiple) {
|
|
321
365
|
var _value;
|
|
366
|
+
|
|
322
367
|
let checked = false;
|
|
323
|
-
let inputEl = null;
|
|
324
|
-
|
|
368
|
+
let inputEl = null; // Click on text (not checkbox)
|
|
369
|
+
|
|
325
370
|
if (!checkBoxEl.contains(target)) {
|
|
326
371
|
inputEl = checkBoxEl.querySelector('input');
|
|
327
372
|
checked = !inputEl.checked || inputEl.classList.contains('indeterminate');
|
|
@@ -331,43 +376,52 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
331
376
|
checked = inputEl.checked || inputEl.classList.contains('indeterminate');
|
|
332
377
|
inputEl.checked = checked;
|
|
333
378
|
}
|
|
379
|
+
|
|
334
380
|
if (multipleValueMode !== 'single') {
|
|
335
381
|
if (!currentTarget.classList.contains('non-child')) {
|
|
336
382
|
checkChildrenCheckbox(currentTarget.nextElementSibling, checked);
|
|
383
|
+
|
|
337
384
|
if (checked) {
|
|
338
385
|
determinateCheckbox(inputEl, true);
|
|
339
386
|
}
|
|
340
387
|
}
|
|
388
|
+
|
|
341
389
|
if (checked || multipleValueMode === 'multiple') {
|
|
342
390
|
checkParentCheckbox(currentTarget);
|
|
343
|
-
}
|
|
344
|
-
|
|
391
|
+
} // Handle result when multiple
|
|
392
|
+
|
|
393
|
+
|
|
345
394
|
setValue(data, checked);
|
|
346
395
|
} else {
|
|
347
396
|
currentValue[unique][value] = checked;
|
|
397
|
+
|
|
348
398
|
if (disabledRelevantValue) {
|
|
349
399
|
// Disabled/Enabled parent and children node
|
|
350
400
|
if (!currentTarget.classList.contains('non-child')) {
|
|
351
401
|
handleDisabledChildren(currentTarget.nextElementSibling, checked);
|
|
352
402
|
}
|
|
403
|
+
|
|
353
404
|
handleDisabledParent(currentTarget.parentNode, checked);
|
|
354
405
|
}
|
|
355
406
|
}
|
|
407
|
+
|
|
356
408
|
result.push(...Object.keys(currentValue[unique]).filter(v => currentValue[unique][v]));
|
|
357
409
|
value = result;
|
|
410
|
+
|
|
358
411
|
if ((_value = value) !== null && _value !== void 0 && _value.length) {
|
|
359
412
|
data = dataSource.filter(obj => value.includes(typeof obj === 'object' ? obj[valueExpr] : obj));
|
|
360
413
|
} else {
|
|
361
414
|
data = [];
|
|
362
415
|
}
|
|
416
|
+
|
|
363
417
|
if (showSelectedItems) {
|
|
364
418
|
setValueIntoInput(data);
|
|
365
419
|
}
|
|
366
420
|
} else {
|
|
367
421
|
if (selectBox) {
|
|
368
422
|
const checkedInput = ref.current.querySelectorAll('input:checked');
|
|
369
|
-
let input = currentTarget.querySelector('input');
|
|
370
|
-
|
|
423
|
+
let input = currentTarget.querySelector('input'); // Click on checkbox
|
|
424
|
+
|
|
371
425
|
if (checkBoxEl.contains(target)) {
|
|
372
426
|
if (!input.checked) {
|
|
373
427
|
input.checked = true;
|
|
@@ -376,24 +430,31 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
376
430
|
} else if (checkedInput[0].isSameNode(input)) {
|
|
377
431
|
return;
|
|
378
432
|
}
|
|
433
|
+
|
|
379
434
|
if (checkedInput) {
|
|
380
435
|
checkedInput.forEach(el => el.checked = false);
|
|
381
436
|
}
|
|
437
|
+
|
|
382
438
|
input.checked = true;
|
|
383
439
|
}
|
|
440
|
+
|
|
384
441
|
currentValue[unique][value] = true;
|
|
385
442
|
result.push(value);
|
|
386
443
|
}
|
|
444
|
+
|
|
387
445
|
if (selectAllRef.current) {
|
|
388
446
|
checkedSelectAllCheckbox();
|
|
389
447
|
}
|
|
448
|
+
|
|
390
449
|
e.value = value;
|
|
391
450
|
e.justSelected = justSelected;
|
|
392
451
|
e.data = data;
|
|
393
452
|
!!onChange && onChange(e, result);
|
|
394
453
|
};
|
|
454
|
+
|
|
395
455
|
const onSelectAll = e => {
|
|
396
456
|
let result;
|
|
457
|
+
|
|
397
458
|
if (!e.target.checked && e.target.classList.contains('determinate')) {
|
|
398
459
|
ref.current.querySelectorAll('input:checked').forEach(input => input.checked = false);
|
|
399
460
|
e.value = [];
|
|
@@ -402,9 +463,11 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
402
463
|
if (!e.target.classList.contains('determinate')) {
|
|
403
464
|
determinateCheckbox(e.target, true);
|
|
404
465
|
}
|
|
466
|
+
|
|
405
467
|
e.target.checked = true;
|
|
406
468
|
ref.current.querySelectorAll('input').forEach(input => {
|
|
407
469
|
input.checked = true;
|
|
470
|
+
|
|
408
471
|
if (!input.classList.contains('determinate')) {
|
|
409
472
|
determinateCheckbox(input, true);
|
|
410
473
|
}
|
|
@@ -412,10 +475,13 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
412
475
|
result = Object.keys(currentValue[unique]).map(v => v);
|
|
413
476
|
e.value = result;
|
|
414
477
|
}
|
|
478
|
+
|
|
415
479
|
!!onChange && onChange(e, result);
|
|
416
480
|
};
|
|
481
|
+
|
|
417
482
|
const onChangeHandler = e => {
|
|
418
483
|
const value = e.target.value;
|
|
484
|
+
|
|
419
485
|
if (timeout.current) {
|
|
420
486
|
if (timer.current) clearTimeout(timer.current);
|
|
421
487
|
timer.current = setTimeout(() => {
|
|
@@ -425,13 +491,15 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
425
491
|
onSearchHandler(value);
|
|
426
492
|
}
|
|
427
493
|
};
|
|
494
|
+
|
|
428
495
|
const onSearchHandler = value => {
|
|
429
496
|
const entries = ref.current.querySelectorAll('.TreeView-Item.non-child, .DGN-UI-Accordion');
|
|
497
|
+
|
|
430
498
|
if (value) {
|
|
431
499
|
entries.forEach(entry => {
|
|
432
500
|
if (compareTwoString(value, entry.textContent)) {
|
|
433
|
-
entry.classList.remove('DGN-Hidden');
|
|
434
|
-
|
|
501
|
+
entry.classList.remove('DGN-Hidden'); // Check exactly entry
|
|
502
|
+
|
|
435
503
|
if (entry.classList.contains('TreeView-Item')) {
|
|
436
504
|
if (!disabledBoldResult && !entry.classList.contains('TreeView-Item-active')) {
|
|
437
505
|
entry.classList.add('TreeView-Item-active');
|
|
@@ -439,12 +507,14 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
439
507
|
} else {
|
|
440
508
|
const summaryEl = entry.firstChild;
|
|
441
509
|
const TreeViewItemEl = summaryEl.querySelector('.TreeView-Item');
|
|
510
|
+
|
|
442
511
|
if (TreeViewItemEl) {
|
|
443
512
|
if (compareTwoString(value, TreeViewItemEl.textContent)) {
|
|
444
513
|
if (!disabledBoldResult && !TreeViewItemEl.classList.contains('TreeView-Item-active')) {
|
|
445
514
|
TreeViewItemEl.classList.add('TreeView-Item-active');
|
|
446
515
|
entry.classList.add('TreeView-Item-contain-children-active');
|
|
447
516
|
}
|
|
517
|
+
|
|
448
518
|
if (!compareTwoString(value, entry.lastChild.textContent)) {
|
|
449
519
|
summaryEl.lastChild.classList.add('DGN-Invisible');
|
|
450
520
|
} else {
|
|
@@ -454,6 +524,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
454
524
|
TreeViewItemEl.classList.remove('TreeView-Item-active');
|
|
455
525
|
entry.classList.remove('TreeView-Item-contain-children-active');
|
|
456
526
|
}
|
|
527
|
+
|
|
457
528
|
if (autoExpandToResult && !summaryEl.classList.contains('expanding')) {
|
|
458
529
|
summaryEl.lastChild.firstChild.click();
|
|
459
530
|
}
|
|
@@ -461,27 +532,33 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
461
532
|
}
|
|
462
533
|
} else {
|
|
463
534
|
entry.classList.add('DGN-Hidden');
|
|
535
|
+
|
|
464
536
|
if (entry.classList.contains('TreeView-Item')) {
|
|
465
537
|
if (entry.classList.contains('TreeView-Item-active')) {
|
|
466
538
|
entry.classList.remove('TreeView-Item-active');
|
|
467
539
|
}
|
|
540
|
+
|
|
468
541
|
entry.classList.remove('TreeView-Item-contain-children-active');
|
|
469
542
|
} else {
|
|
470
543
|
const summaryEl = entry.firstChild;
|
|
471
544
|
const TreeViewItemEl = summaryEl.querySelector('.TreeView-Item');
|
|
545
|
+
|
|
472
546
|
if (TreeViewItemEl) {
|
|
473
547
|
if (TreeViewItemEl.classList.contains('TreeView-Item-active')) {
|
|
474
548
|
TreeViewItemEl.classList.remove('TreeView-Item-active');
|
|
475
549
|
}
|
|
550
|
+
|
|
476
551
|
summaryEl.lastChild.classList.remove('DGN-Invisible');
|
|
477
552
|
}
|
|
478
553
|
}
|
|
479
554
|
}
|
|
480
555
|
});
|
|
556
|
+
|
|
481
557
|
if (showChildrenOfResult) {
|
|
482
558
|
entries.forEach(entry => {
|
|
483
559
|
if (entry.classList.contains('TreeView-Item-contain-children-active')) {
|
|
484
560
|
const hiddenEls = entry.querySelectorAll('.DGN-Hidden, .DGN-Invisible');
|
|
561
|
+
|
|
485
562
|
if (hiddenEls && hiddenEls !== null && hiddenEls !== void 0 && hiddenEls.length) {
|
|
486
563
|
hiddenEls.forEach(hiddenEl => hiddenEl.classList.remove('DGN-Hidden', 'DGN-Invisible'));
|
|
487
564
|
}
|
|
@@ -491,11 +568,13 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
491
568
|
} else {
|
|
492
569
|
entries.forEach(entry => {
|
|
493
570
|
entry.classList.remove('DGN-Hidden');
|
|
571
|
+
|
|
494
572
|
if (!entry.classList.contains('TreeView-Item') && entry.firstChild.lastChild.classList.contains('DGN-Invisible')) {
|
|
495
573
|
entry.firstChild.lastChild.classList.remove('DGN-Invisible');
|
|
496
574
|
}
|
|
497
575
|
});
|
|
498
576
|
const activeEls = ref.current.querySelectorAll('.TreeView-Item-active');
|
|
577
|
+
|
|
499
578
|
if (!disabledBoldResult && activeEls && activeEls !== null && activeEls !== void 0 && activeEls.length) {
|
|
500
579
|
activeEls.forEach(activeEl => {
|
|
501
580
|
activeEl.classList.remove('TreeView-Item-active', 'TreeView-Item-contain-children-active');
|
|
@@ -503,13 +582,16 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
503
582
|
}
|
|
504
583
|
}
|
|
505
584
|
};
|
|
585
|
+
|
|
506
586
|
const compareTwoString = (search, content) => {
|
|
507
587
|
if (searchMode === 'similar') {
|
|
508
588
|
search = removeUnicode(search.normalize(), '.*?');
|
|
509
589
|
content = removeUnicode(content);
|
|
510
590
|
}
|
|
591
|
+
|
|
511
592
|
return new RegExp(search.normalize(), 'img').test(content.normalize());
|
|
512
593
|
};
|
|
594
|
+
|
|
513
595
|
const renderDataAsync = (id, array) => {
|
|
514
596
|
return new Promise(res => {
|
|
515
597
|
const node = array.map(({
|
|
@@ -520,21 +602,26 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
520
602
|
return renderTreeView(data, index, level, false);
|
|
521
603
|
});
|
|
522
604
|
const container = document.getElementById(id);
|
|
605
|
+
|
|
523
606
|
if (container && node) {
|
|
524
607
|
render(node, container.firstChild, () => res(1));
|
|
525
608
|
}
|
|
526
609
|
});
|
|
527
610
|
};
|
|
611
|
+
|
|
528
612
|
const renderData = (data, keyArr) => {
|
|
529
613
|
const pattern = keyArr.join('|').replace(/([{}])/g, '\\$1');
|
|
530
614
|
const separatorArr = displayExpr.split(new RegExp(pattern));
|
|
531
615
|
let str = '';
|
|
532
616
|
let i = 0;
|
|
617
|
+
|
|
533
618
|
for (i; i < (keyArr === null || keyArr === void 0 ? void 0 : keyArr.length); i++) {
|
|
534
619
|
str += separatorArr[i] + (data[keyArr[i].replace(/\W/g, '')] !== undefined ? data[keyArr[i].replace(/\W/g, '')] : keyArr[i]);
|
|
535
620
|
}
|
|
621
|
+
|
|
536
622
|
return str + separatorArr[i];
|
|
537
623
|
};
|
|
624
|
+
|
|
538
625
|
const renderContent = (item, keyArr, index) => {
|
|
539
626
|
const displayText = renderItem && typeof renderItem === 'function' ? renderItem({
|
|
540
627
|
data: item,
|
|
@@ -548,6 +635,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
548
635
|
}
|
|
549
636
|
}, displayText);
|
|
550
637
|
};
|
|
638
|
+
|
|
551
639
|
const renderTreeView = (data, index, level, sync = true, id) => {
|
|
552
640
|
if (level > renderAsyncFromLevel - 1 && sync) {
|
|
553
641
|
if (itemsRenderAsync[unique][id]) {
|
|
@@ -563,14 +651,16 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
563
651
|
level
|
|
564
652
|
}];
|
|
565
653
|
}
|
|
654
|
+
|
|
566
655
|
return null;
|
|
567
656
|
}
|
|
657
|
+
|
|
568
658
|
const keyArr = displayExpr.match(separatorPattern);
|
|
569
659
|
const isTrue = value.includes(data[valueExpr] || data);
|
|
570
660
|
const isParentTrue = value.includes(data[parentID]);
|
|
571
661
|
const focusClass = isTrue && !selectBox && !multiple ? 'focus' : '';
|
|
572
|
-
const childItems = data.childItems;
|
|
573
|
-
|
|
662
|
+
const childItems = data.childItems; // is Summary
|
|
663
|
+
|
|
574
664
|
if (childItems && childItems !== null && childItems !== void 0 && childItems.length) {
|
|
575
665
|
const id = randomString(6, {
|
|
576
666
|
allowSymbol: false,
|
|
@@ -616,6 +706,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
616
706
|
id: id
|
|
617
707
|
}, childItems.map((child, i) => renderTreeView(child, index + i, level + 1, sync, id))));
|
|
618
708
|
}
|
|
709
|
+
|
|
619
710
|
return jsx("div", {
|
|
620
711
|
className: 'TreeView-Item non-child ' + focusClass,
|
|
621
712
|
style: {
|
|
@@ -634,6 +725,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
634
725
|
disabled: disabled
|
|
635
726
|
})), renderContent(data, keyArr, index));
|
|
636
727
|
};
|
|
728
|
+
|
|
637
729
|
useEffect(() => {
|
|
638
730
|
currentValue[unique] = {};
|
|
639
731
|
return () => {
|
|
@@ -643,6 +735,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
643
735
|
useEffect(() => {
|
|
644
736
|
if (searchDelayTime) {
|
|
645
737
|
var _searchDelayTime$matc, _searchDelayTime$matc2;
|
|
738
|
+
|
|
646
739
|
if (searchDelayTime === true) searchDelayTime = getGlobal('delayOnInput');
|
|
647
740
|
const units = {
|
|
648
741
|
m: 60000,
|
|
@@ -657,14 +750,17 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
657
750
|
}, [searchDelayTime]);
|
|
658
751
|
useEffect(() => {
|
|
659
752
|
var _value2;
|
|
753
|
+
|
|
660
754
|
dataSource.forEach(data => {
|
|
661
755
|
currentValue[unique][typeof data === 'object' ? data[valueExpr] : data] = false;
|
|
662
756
|
});
|
|
757
|
+
|
|
663
758
|
if (value && (_value2 = value) !== null && _value2 !== void 0 && _value2.length) {
|
|
664
759
|
value.forEach(v => {
|
|
665
760
|
currentValue[unique][v] = true;
|
|
666
761
|
});
|
|
667
762
|
}
|
|
763
|
+
|
|
668
764
|
return () => {
|
|
669
765
|
currentValue[unique] = {};
|
|
670
766
|
};
|
|
@@ -673,13 +769,16 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
673
769
|
if (value && multiple) {
|
|
674
770
|
if (multipleValueMode !== 'single') {
|
|
675
771
|
const childNodes = Array.from(ref.current.childNodes);
|
|
772
|
+
|
|
676
773
|
if (childNodes && childNodes !== null && childNodes !== void 0 && childNodes.length) {
|
|
677
774
|
checkedParentFollowValue(childNodes);
|
|
678
775
|
}
|
|
776
|
+
|
|
679
777
|
if (showSelectedItems) {
|
|
680
778
|
const data = dataSource.filter(d => value.includes(d[valueExpr]));
|
|
681
779
|
setValueIntoInput(data);
|
|
682
780
|
}
|
|
781
|
+
|
|
683
782
|
return () => {
|
|
684
783
|
if (ref.current) {
|
|
685
784
|
Array.from(ref.current.querySelectorAll('input')).forEach(input => {
|
|
@@ -693,6 +792,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
693
792
|
if (!el.classList.contains('non-child')) {
|
|
694
793
|
handleDisabledChildren(el, true);
|
|
695
794
|
}
|
|
795
|
+
|
|
696
796
|
handleDisabledParent(el.parentNode, true);
|
|
697
797
|
}
|
|
698
798
|
});
|
|
@@ -703,10 +803,12 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
703
803
|
if (selectAllRef.current) {
|
|
704
804
|
checkedSelectAllCheckbox();
|
|
705
805
|
}
|
|
806
|
+
|
|
706
807
|
if (ref.current.querySelector('.DGN-UI-Accordion-Details-Content')) {
|
|
707
808
|
if (!ref.current.parentNode.classList.contains('expand-able')) {
|
|
708
809
|
ref.current.parentNode.classList.add('expand-able');
|
|
709
810
|
}
|
|
811
|
+
|
|
710
812
|
return () => {
|
|
711
813
|
if (ref.current) {
|
|
712
814
|
ref.current.parentNode.classList.remove('expand-able');
|
|
@@ -716,6 +818,7 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
716
818
|
}, [dataSource, value, multiple, selectBox]);
|
|
717
819
|
useEffect(() => {
|
|
718
820
|
var _Object$keys;
|
|
821
|
+
|
|
719
822
|
if ((_Object$keys = Object.keys(itemsRenderAsync[unique])) !== null && _Object$keys !== void 0 && _Object$keys.length) {
|
|
720
823
|
Object.keys(itemsRenderAsync[unique]).forEach(async key => {
|
|
721
824
|
await renderDataAsync(key, itemsRenderAsync[unique][key]);
|
|
@@ -725,32 +828,40 @@ const TreeView = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
725
828
|
useImperativeHandle(reference, () => {
|
|
726
829
|
const currentRef = ref.current || {};
|
|
727
830
|
currentRef.element = ref.current;
|
|
728
|
-
const _instance = {
|
|
729
|
-
...action
|
|
831
|
+
const _instance = { ...action
|
|
730
832
|
}; // methods
|
|
833
|
+
|
|
731
834
|
_instance.__proto__ = {}; // hidden methods
|
|
732
|
-
|
|
733
|
-
// keep old method
|
|
835
|
+
|
|
836
|
+
currentRef.instance = _instance; // keep old method
|
|
837
|
+
|
|
734
838
|
currentRef.disabled = disabled;
|
|
735
839
|
currentRef.displayExpr = displayExpr;
|
|
736
840
|
currentRef.valueExpr = valueExpr;
|
|
737
841
|
currentRef.id = id;
|
|
738
842
|
currentRef.parentID = parentID;
|
|
739
843
|
currentRef.value = value;
|
|
844
|
+
|
|
740
845
|
currentRef.getValue = () => Object.keys(currentValue[unique]).filter(v => currentValue[unique][v]);
|
|
846
|
+
|
|
741
847
|
currentRef.setValue = setValue;
|
|
742
848
|
currentRef.handleCheckbox = handleCheckbox;
|
|
849
|
+
|
|
743
850
|
currentRef.get = () => ref.current;
|
|
851
|
+
|
|
744
852
|
return currentRef;
|
|
745
853
|
});
|
|
746
854
|
return useMemo(() => {
|
|
747
855
|
var _value3;
|
|
856
|
+
|
|
748
857
|
if (typeof value === 'string') {
|
|
749
858
|
value = [value];
|
|
750
859
|
}
|
|
860
|
+
|
|
751
861
|
if (!multiple && ((_value3 = value) === null || _value3 === void 0 ? void 0 : _value3.length) > 1) {
|
|
752
862
|
value.length = 1;
|
|
753
863
|
}
|
|
864
|
+
|
|
754
865
|
itemsRenderAsync[unique] = {};
|
|
755
866
|
const sync = (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > renderAsyncWithLength;
|
|
756
867
|
return jsx("div", {
|
|
@@ -920,100 +1031,129 @@ TreeView.defaultProps = {
|
|
|
920
1031
|
TreeView.propTypes = {
|
|
921
1032
|
/** expand immediate if true */
|
|
922
1033
|
expand: PropTypes.bool,
|
|
1034
|
+
|
|
923
1035
|
/** prevent all event if true */
|
|
924
1036
|
disabled: PropTypes.bool,
|
|
1037
|
+
|
|
925
1038
|
/** show checkbox in each item */
|
|
926
1039
|
selectBox: PropTypes.bool,
|
|
1040
|
+
|
|
927
1041
|
/** allow select multiple item if true */
|
|
928
1042
|
multiple: PropTypes.bool,
|
|
1043
|
+
|
|
929
1044
|
/** allow select/unselect all items on one click (just support for multiple) */
|
|
930
1045
|
selectAll: PropTypes.bool,
|
|
1046
|
+
|
|
931
1047
|
/** display input box search if true */
|
|
932
1048
|
allowSearch: PropTypes.bool,
|
|
1049
|
+
|
|
933
1050
|
/** display all value in a box */
|
|
934
1051
|
showSelectedItems: PropTypes.bool,
|
|
1052
|
+
|
|
935
1053
|
/** disabled parent and children item if true (only supported for multipleValueMode is single) */
|
|
936
1054
|
disabledRelevantValue: PropTypes.bool,
|
|
1055
|
+
|
|
937
1056
|
/** prevent display content of match values with bold style */
|
|
938
1057
|
disabledBoldResult: PropTypes.bool,
|
|
1058
|
+
|
|
939
1059
|
/** expand TreeView to match result if true */
|
|
940
1060
|
autoExpandToResult: PropTypes.bool,
|
|
1061
|
+
|
|
941
1062
|
/** still show children of last result was found if true */
|
|
942
1063
|
showChildrenOfResult: PropTypes.bool,
|
|
1064
|
+
|
|
943
1065
|
/** Used to identify the parent key */
|
|
944
1066
|
id: PropTypes.string.isRequired,
|
|
1067
|
+
|
|
945
1068
|
/** used for mapping into a nested list */
|
|
946
1069
|
parentID: PropTypes.string.isRequired,
|
|
1070
|
+
|
|
947
1071
|
/** class on element */
|
|
948
1072
|
className: PropTypes.string,
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
*
|
|
952
|
-
*
|
|
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
|
|
953
1078
|
*/
|
|
954
1079
|
displayExpr: PropTypes.string,
|
|
1080
|
+
|
|
955
1081
|
/** the key to determine value to return */
|
|
956
1082
|
valueExpr: PropTypes.string,
|
|
1083
|
+
|
|
957
1084
|
/** return value for the select multiple use case */
|
|
958
1085
|
multipleValueMode: PropTypes.oneOf(['single', 'multiple', 'inheritance']),
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
*
|
|
962
|
-
* *
|
|
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"
|
|
963
1091
|
*/
|
|
964
1092
|
searchMode: PropTypes.oneOf(['contains', 'similar']),
|
|
1093
|
+
|
|
965
1094
|
/** The content display for label of checkbox select all */
|
|
966
1095
|
selectAllLabel: PropTypes.string,
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
*
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* duration wait enter search content on search<br/>
|
|
1099
|
+
* Example: 700 -> 700ms, '700ms' -> 700ms, '0.7s' -> 700ms, '1m' -> 60000ms
|
|
970
1100
|
*/
|
|
971
1101
|
searchDelayTime: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
1102
|
+
|
|
972
1103
|
/** will render asynchronously if the number of elements is greater than this number */
|
|
973
1104
|
renderAsyncWithLength: PropTypes.number,
|
|
1105
|
+
|
|
974
1106
|
/** will render asynchronously from level equal this number */
|
|
975
1107
|
renderAsyncFromLevel: PropTypes.oneOf([2, 3, 4, 5]),
|
|
1108
|
+
|
|
976
1109
|
/** data to show in tree list */
|
|
977
1110
|
dataSource: PropTypes.array,
|
|
1111
|
+
|
|
978
1112
|
/** the value was selected */
|
|
979
1113
|
value: PropTypes.oneOfType([PropTypes.array, PropTypes.string]),
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
*
|
|
1114
|
+
|
|
1115
|
+
/** function displays items by custom<br/>
|
|
1116
|
+
* renderItem={(data, index) => data.name + ' - ' + data.role}<br/>
|
|
1117
|
+
* --> such as: displayExpr={'name - role'}
|
|
983
1118
|
*/
|
|
984
1119
|
renderItem: PropTypes.func,
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
*
|
|
988
|
-
*
|
|
989
|
-
*
|
|
990
|
-
* +
|
|
991
|
-
* +
|
|
992
|
-
*
|
|
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)
|
|
993
1129
|
*/
|
|
994
1130
|
onChange: PropTypes.func,
|
|
1131
|
+
|
|
995
1132
|
/** the icon to display for expand icon */
|
|
996
1133
|
expandIcon: PropTypes.any,
|
|
1134
|
+
|
|
997
1135
|
/** the props for InputBase */
|
|
998
1136
|
searchProps: PropTypes.object,
|
|
1137
|
+
|
|
999
1138
|
/** the icon to display for collapse icon */
|
|
1000
1139
|
collapseIcon: PropTypes.any,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
*
|
|
1004
|
-
*
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1008
|
-
*
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
*
|
|
1012
|
-
*
|
|
1013
|
-
*  
|
|
1014
|
-
* +
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
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
|
+
* }
|
|
1017
1157
|
*/
|
|
1018
1158
|
ref: PropTypes.any
|
|
1019
1159
|
};
|