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,7 +1,9 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import PropTypes from "prop-types";
|
|
4
5
|
import { jsx } from '@emotion/core';
|
|
6
|
+
|
|
5
7
|
const Points = ({
|
|
6
8
|
data,
|
|
7
9
|
getX,
|
|
@@ -45,37 +47,52 @@ const Points = ({
|
|
|
45
47
|
}, jsx("title", null, point.name, " : ", point.quantity));
|
|
46
48
|
})) : null;
|
|
47
49
|
};
|
|
50
|
+
|
|
48
51
|
Points.propTypes = {
|
|
49
52
|
data: PropTypes.arrayOf(PropTypes.shape({
|
|
50
53
|
x: PropTypes.number,
|
|
51
54
|
quantity: PropTypes.number
|
|
52
55
|
})).isRequired,
|
|
56
|
+
|
|
53
57
|
/** the getX position x on Ox*/
|
|
54
58
|
getX: PropTypes.func,
|
|
59
|
+
|
|
55
60
|
/** the getY position y on Oy */
|
|
56
61
|
getY: PropTypes.func,
|
|
62
|
+
|
|
57
63
|
/** the maxX is maximum of Ox quantity returned by data*/
|
|
58
64
|
maxX: PropTypes.number,
|
|
65
|
+
|
|
59
66
|
/** the maxY is maximum of Oy quantity returned by data*/
|
|
60
67
|
maxY: PropTypes.number,
|
|
68
|
+
|
|
61
69
|
/** the minX is minimum of OX quantity returned by data*/
|
|
62
70
|
minX: PropTypes.number,
|
|
71
|
+
|
|
63
72
|
/** the minY is minimum of Oy quantity returned by data*/
|
|
64
73
|
minY: PropTypes.number,
|
|
74
|
+
|
|
65
75
|
/** change the inner color of the point button */
|
|
66
76
|
pointsColor: PropTypes.string,
|
|
77
|
+
|
|
67
78
|
/** show data information when hovering in the area containing the column */
|
|
68
79
|
pointsIsHoverOnZone: PropTypes.bool,
|
|
80
|
+
|
|
69
81
|
/** function change event hover */
|
|
70
82
|
onHover: PropTypes.func,
|
|
83
|
+
|
|
71
84
|
/** change the radius of the point is created */
|
|
72
85
|
pointsRadius: PropTypes.number,
|
|
86
|
+
|
|
73
87
|
/** change the border color of the point button */
|
|
74
88
|
pointsStrokeColor: PropTypes.string,
|
|
89
|
+
|
|
75
90
|
/** the thickness of the inner core point */
|
|
76
91
|
pointsStrokeWidth: PropTypes.number,
|
|
92
|
+
|
|
77
93
|
/** show or hiden point */
|
|
78
94
|
pointsVisible: PropTypes.bool,
|
|
95
|
+
|
|
79
96
|
/** the unitWidth */
|
|
80
97
|
unitWidth: PropTypes.number
|
|
81
98
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import { memo, forwardRef } from 'react';
|
|
@@ -21,8 +22,7 @@ const BarChart = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
21
22
|
labelsHeightX,
|
|
22
23
|
...props
|
|
23
24
|
}, ref) => {
|
|
24
|
-
const dataSource = data.map((item, i) => ({
|
|
25
|
-
...item,
|
|
25
|
+
const dataSource = data.map((item, i) => ({ ...item,
|
|
26
26
|
x: i
|
|
27
27
|
}));
|
|
28
28
|
const UNIT_WIDTH = 1;
|
|
@@ -30,39 +30,48 @@ const BarChart = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
30
30
|
allowNumber: false,
|
|
31
31
|
allowSymbol: false
|
|
32
32
|
});
|
|
33
|
+
|
|
33
34
|
const round = n => {
|
|
34
35
|
return Math.round(n * 100) / 100;
|
|
35
36
|
};
|
|
37
|
+
|
|
36
38
|
const getMinX = () => {
|
|
37
39
|
return dataSource.length > 0 ? dataSource[0].x : 0;
|
|
38
40
|
};
|
|
41
|
+
|
|
39
42
|
const getMaxX = () => {
|
|
40
43
|
return dataSource.length > 0 ? dataSource[dataSource.length - 1].x : 0;
|
|
41
44
|
};
|
|
45
|
+
|
|
42
46
|
const getMinY = () => {
|
|
43
47
|
return 0;
|
|
44
48
|
};
|
|
49
|
+
|
|
45
50
|
const getMaxY = () => {
|
|
46
51
|
const yStep = labelsCountY > 0 ? labelsCountY : 1;
|
|
47
52
|
const maxY = dataSource.length > 0 ? dataSource.reduce((max, point) => point.quantity > max ? point.quantity : max, dataSource[0].quantity) : 0;
|
|
48
53
|
return maxY ? Math.ceil(maxY / yStep) * yStep : yStep;
|
|
49
54
|
};
|
|
55
|
+
|
|
50
56
|
const getSvgX = x => {
|
|
51
57
|
const minX = getMinX();
|
|
52
58
|
const maxX = getMaxX();
|
|
53
59
|
const paddingLeft = getLabelsYWidth();
|
|
54
60
|
return round((x - minX) / (maxX + 1 - minX) * (Math.abs(viewBoxWidth) - paddingLeft));
|
|
55
61
|
};
|
|
62
|
+
|
|
56
63
|
const getSvgY = y => {
|
|
57
64
|
const paddingBottom = labelsVisible ? labelsHeightX + labelsOffsetX : 0;
|
|
58
65
|
const height = Math.abs(viewBoxHeight) - paddingBottom;
|
|
59
66
|
const maxY = getMaxY();
|
|
60
67
|
return round(height - y / maxY * height);
|
|
61
68
|
};
|
|
69
|
+
|
|
62
70
|
const getLabelsYWidth = () => {
|
|
63
71
|
const maxY = getMaxY();
|
|
64
72
|
return labelsVisible ? maxY.toString().length * labelsCharacterWidth + labelsOffsetY : 0;
|
|
65
73
|
};
|
|
74
|
+
|
|
66
75
|
const minX = getMinX();
|
|
67
76
|
const maxX = getMaxX();
|
|
68
77
|
const maxY = getMaxY();
|
|
@@ -87,11 +96,9 @@ const BarChart = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
87
96
|
overflow: 'visible',
|
|
88
97
|
margin: `${getLabelsYWidth() * 2}`
|
|
89
98
|
}
|
|
90
|
-
}, jsx(Axis, {
|
|
91
|
-
...props,
|
|
99
|
+
}, jsx(Axis, { ...props,
|
|
92
100
|
...commonProps
|
|
93
|
-
}), jsx(Grid, {
|
|
94
|
-
...props,
|
|
101
|
+
}), jsx(Grid, { ...props,
|
|
95
102
|
...commonProps
|
|
96
103
|
}), jsx(Bars, {
|
|
97
104
|
data: dataSource,
|
|
@@ -124,32 +131,45 @@ BarChart.propTypes = {
|
|
|
124
131
|
x: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
125
132
|
quantity: PropTypes.number
|
|
126
133
|
})).isRequired,
|
|
134
|
+
|
|
127
135
|
/** drawn Ratio of viewBoxHeight entered by user, default is: 200px */
|
|
128
136
|
viewBoxHeight: PropTypes.number,
|
|
137
|
+
|
|
129
138
|
/** drawn Ratio of viewBoxWidth entered by user, default is: 500px */
|
|
130
139
|
viewBoxWidth: PropTypes.number,
|
|
140
|
+
|
|
131
141
|
/** change color of Bar in BarChart */
|
|
132
142
|
barsColor: PropTypes.string,
|
|
143
|
+
|
|
133
144
|
/** change ColumB grid display style ['full' , 'horizontal', 'none']*/
|
|
134
145
|
GridLines: PropTypes.string,
|
|
135
146
|
//** change style show of label (default, italic) */
|
|
136
147
|
labelStyle: PropTypes.string,
|
|
148
|
+
|
|
137
149
|
/** the axisVisible Hide or show the Axis axis */
|
|
138
150
|
axisVisible: PropTypes.bool,
|
|
151
|
+
|
|
139
152
|
/** the axisColor change color */
|
|
140
153
|
axisColor: PropTypes.string,
|
|
154
|
+
|
|
141
155
|
/** change color of grid Columb*/
|
|
142
156
|
gridColor: PropTypes.string,
|
|
157
|
+
|
|
143
158
|
/** show data information when hovering in the area containing the column */
|
|
144
159
|
pointsIsHoverOnZone: PropTypes.bool,
|
|
160
|
+
|
|
145
161
|
/** show or hiden point */
|
|
146
162
|
pointsVisible: PropTypes.bool,
|
|
163
|
+
|
|
147
164
|
/** change the inner color of the point button */
|
|
148
165
|
pointsColor: PropTypes.string,
|
|
166
|
+
|
|
149
167
|
/** change the border color of the point button */
|
|
150
168
|
pointsStrokeColor: PropTypes.string,
|
|
169
|
+
|
|
151
170
|
/** the thickness of the inner core point */
|
|
152
171
|
pointsStrokeWidth: PropTypes.number,
|
|
172
|
+
|
|
153
173
|
/** change the radius of the point is created */
|
|
154
174
|
pointsRadius: PropTypes.number,
|
|
155
175
|
...Bars.propTypes,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import { jsx } from '@emotion/core';
|
|
6
|
+
|
|
5
7
|
const Axis = ({
|
|
6
8
|
axisColor,
|
|
7
9
|
axisVisible,
|
|
@@ -11,8 +13,8 @@ const Axis = ({
|
|
|
11
13
|
// maxX,
|
|
12
14
|
// maxY,
|
|
13
15
|
minX,
|
|
14
|
-
minY
|
|
15
|
-
|
|
16
|
+
minY // unitWidth,
|
|
17
|
+
|
|
16
18
|
}) => {
|
|
17
19
|
// drawn Oxygen coordinate systems for width and height are entered or by default
|
|
18
20
|
return axisVisible ? jsx("g", {
|
|
@@ -21,8 +23,7 @@ const Axis = ({
|
|
|
21
23
|
strokeWidth: axisWidth
|
|
22
24
|
}, jsx("line", {
|
|
23
25
|
x1: getX(minX),
|
|
24
|
-
y1: getY(minY)
|
|
25
|
-
// x2={getX(maxX + unitWidth + 0.5)}
|
|
26
|
+
y1: getY(minY) // x2={getX(maxX + unitWidth + 0.5)}
|
|
26
27
|
,
|
|
27
28
|
x2: '100%',
|
|
28
29
|
y2: getY(minY)
|
|
@@ -33,6 +34,7 @@ const Axis = ({
|
|
|
33
34
|
y2: '-10%'
|
|
34
35
|
})) : null;
|
|
35
36
|
};
|
|
37
|
+
|
|
36
38
|
Axis.defaultProps = {
|
|
37
39
|
axisColor: '#7F828E',
|
|
38
40
|
axisVisible: true,
|
|
@@ -44,24 +46,34 @@ Axis.defaultProps = {
|
|
|
44
46
|
Axis.propTypes = {
|
|
45
47
|
/** the axisColor change color */
|
|
46
48
|
axisColor: PropTypes.string,
|
|
49
|
+
|
|
47
50
|
/** the axisOpacity property sets the opacity of an element*/
|
|
48
51
|
axisOpacity: PropTypes.number,
|
|
52
|
+
|
|
49
53
|
/** the axisVisible Hide or show the Axis axis */
|
|
50
54
|
axisVisible: PropTypes.bool,
|
|
55
|
+
|
|
51
56
|
/** the axisWidth change the thickness of the column */
|
|
52
57
|
axisWidth: PropTypes.number,
|
|
58
|
+
|
|
53
59
|
/** the getX position x on Ox*/
|
|
54
60
|
getX: PropTypes.func,
|
|
61
|
+
|
|
55
62
|
/** the getY position y on Oy */
|
|
56
63
|
getY: PropTypes.func,
|
|
64
|
+
|
|
57
65
|
/** the maxX is maximum of Ox quantity returned by data*/
|
|
58
66
|
maxX: PropTypes.number,
|
|
67
|
+
|
|
59
68
|
/** the maxY is maximum of Oy quantity returned by data*/
|
|
60
69
|
maxY: PropTypes.number,
|
|
70
|
+
|
|
61
71
|
/** the minX is minimum of OX quantity returned by data*/
|
|
62
72
|
minX: PropTypes.number,
|
|
73
|
+
|
|
63
74
|
/** the minY is minimum of Oy quantity returned by data*/
|
|
64
75
|
minY: PropTypes.number,
|
|
76
|
+
|
|
65
77
|
/** the unitWidth */
|
|
66
78
|
unitWidth: PropTypes.number
|
|
67
79
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
+
|
|
2
3
|
/** @jsx jsx */
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import { jsx } from '@emotion/core';
|
|
6
|
+
|
|
5
7
|
const Grid = ({
|
|
6
8
|
getX,
|
|
7
9
|
getY,
|
|
@@ -17,6 +19,7 @@ const Grid = ({
|
|
|
17
19
|
}) => {
|
|
18
20
|
let gridX = [];
|
|
19
21
|
let gridY = [];
|
|
22
|
+
|
|
20
23
|
for (let i = minX; i <= maxX; i++) {
|
|
21
24
|
gridX.push(jsx("line", {
|
|
22
25
|
key: i,
|
|
@@ -26,18 +29,20 @@ const Grid = ({
|
|
|
26
29
|
y2: getY(maxY + 10)
|
|
27
30
|
}));
|
|
28
31
|
}
|
|
32
|
+
|
|
29
33
|
const yStep = labelsCountY > 0 ? labelsCountY : unitWidth;
|
|
34
|
+
|
|
30
35
|
for (let i = minY; i <= maxY; i += Math.floor(maxY / yStep)) {
|
|
31
36
|
gridY.push(jsx("line", {
|
|
32
37
|
key: i,
|
|
33
38
|
x1: getX(minX),
|
|
34
|
-
y1: getY(i)
|
|
35
|
-
// x2={getX(maxX + unitWidth + 0.5)}
|
|
39
|
+
y1: getY(i) // x2={getX(maxX + unitWidth + 0.5)}
|
|
36
40
|
,
|
|
37
41
|
x2: '100%',
|
|
38
42
|
y2: getY(i)
|
|
39
43
|
}));
|
|
40
44
|
}
|
|
45
|
+
|
|
41
46
|
if (GridLines === 'full') {
|
|
42
47
|
return jsx("g", {
|
|
43
48
|
className: 'DGN-Grid-LineChart',
|
|
@@ -45,6 +50,7 @@ const Grid = ({
|
|
|
45
50
|
strokeWidth: gridWidth
|
|
46
51
|
}, gridX, gridY);
|
|
47
52
|
}
|
|
53
|
+
|
|
48
54
|
if (GridLines === 'horizontal') {
|
|
49
55
|
return jsx("g", {
|
|
50
56
|
className: 'DGN-Grid-LineChart',
|
|
@@ -52,6 +58,7 @@ const Grid = ({
|
|
|
52
58
|
strokeWidth: gridWidth
|
|
53
59
|
}, gridY);
|
|
54
60
|
}
|
|
61
|
+
|
|
55
62
|
if (GridLines === 'none') {
|
|
56
63
|
return null;
|
|
57
64
|
} else {
|
|
@@ -62,27 +69,37 @@ const Grid = ({
|
|
|
62
69
|
}, gridY);
|
|
63
70
|
}
|
|
64
71
|
};
|
|
72
|
+
|
|
65
73
|
Grid.propTypes = {
|
|
66
74
|
/** the getX position x on Ox*/
|
|
67
75
|
getX: PropTypes.func,
|
|
76
|
+
|
|
68
77
|
/** the getY position y on Oy */
|
|
69
78
|
getY: PropTypes.func,
|
|
79
|
+
|
|
70
80
|
/** change color of grid Line*/
|
|
71
81
|
gridColor: PropTypes.string,
|
|
82
|
+
|
|
72
83
|
/** change Line grid display style ['full' , 'horizontal', 'none'], default: 'full'*/
|
|
73
84
|
GridLines: PropTypes.string,
|
|
85
|
+
|
|
74
86
|
/** hiden or show grid Line*/
|
|
75
87
|
gridVisible: PropTypes.bool,
|
|
76
88
|
gridWidth: PropTypes.number,
|
|
77
89
|
labelsCountY: PropTypes.number,
|
|
90
|
+
|
|
78
91
|
/** the maxX is maximum of Ox quantity returned by data*/
|
|
79
92
|
maxX: PropTypes.number,
|
|
93
|
+
|
|
80
94
|
/** the maxY is maximum of Oy quantity returned by data*/
|
|
81
95
|
maxY: PropTypes.number,
|
|
96
|
+
|
|
82
97
|
/** the minX is minimum of OX quantity returned by data*/
|
|
83
98
|
minX: PropTypes.number,
|
|
99
|
+
|
|
84
100
|
/** the minY is minimum of Oy quantity returned by data*/
|
|
85
101
|
minY: PropTypes.number,
|
|
102
|
+
|
|
86
103
|
/** the unitWidth */
|
|
87
104
|
unitWidth: PropTypes.number
|
|
88
105
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
|
+
|
|
2
3
|
/** @jsxRuntime classic */
|
|
4
|
+
|
|
3
5
|
/** @jsx jsx */
|
|
4
6
|
import PropTypes from 'prop-types';
|
|
5
7
|
import { jsx, css } from '@emotion/core';
|
|
6
8
|
import theme from "../../../theme/settings";
|
|
7
9
|
import { typography } from "../../../styles/typography";
|
|
10
|
+
|
|
8
11
|
const Labels = ({
|
|
9
12
|
getX,
|
|
10
13
|
getY,
|
|
@@ -51,11 +54,13 @@ const Labels = ({
|
|
|
51
54
|
${typography.paragraph3};
|
|
52
55
|
fill: ${theme.colors.secondary};
|
|
53
56
|
`;
|
|
57
|
+
|
|
54
58
|
if (labelsVisible) {
|
|
55
59
|
let xLabels;
|
|
56
60
|
let yLabels;
|
|
57
61
|
let tile = 4;
|
|
58
62
|
let tile2 = 9;
|
|
63
|
+
|
|
59
64
|
const TiLe = () => {
|
|
60
65
|
// eslint-disable-next-line no-undef
|
|
61
66
|
if (viewBoxWidth >= 800) {
|
|
@@ -64,6 +69,7 @@ const Labels = ({
|
|
|
64
69
|
return tile2;
|
|
65
70
|
}
|
|
66
71
|
};
|
|
72
|
+
|
|
67
73
|
xLabels = labelStyle === 'italic' ? data.map((point, x) => jsx("text", {
|
|
68
74
|
key: x,
|
|
69
75
|
css: LabelCSS,
|
|
@@ -82,9 +88,11 @@ const Labels = ({
|
|
|
82
88
|
}, labelsFormatX(point.name))));
|
|
83
89
|
const yLabelsRange = [];
|
|
84
90
|
const yStep = labelsCountY > 0 ? labelsCountY : 1;
|
|
91
|
+
|
|
85
92
|
for (let i = 0; i <= maxY; i += Math.floor(maxY / yStep)) {
|
|
86
93
|
yLabelsRange.push(i);
|
|
87
94
|
}
|
|
95
|
+
|
|
88
96
|
yLabels = yLabelsRange.map(quantity => jsx("text", {
|
|
89
97
|
key: quantity,
|
|
90
98
|
fill: labelsColor,
|
|
@@ -106,6 +114,7 @@ const Labels = ({
|
|
|
106
114
|
return null;
|
|
107
115
|
}
|
|
108
116
|
};
|
|
117
|
+
|
|
109
118
|
Labels.defaultProps = {
|
|
110
119
|
getX: x => x,
|
|
111
120
|
getY: quantity => quantity,
|
|
@@ -125,10 +134,13 @@ Labels.defaultProps = {
|
|
|
125
134
|
Labels.propTypes = {
|
|
126
135
|
/** the getX position x on Ox*/
|
|
127
136
|
getX: PropTypes.func,
|
|
137
|
+
|
|
128
138
|
/** the getY position y on Oy */
|
|
129
139
|
getY: PropTypes.func,
|
|
140
|
+
|
|
130
141
|
/** the labelsColor change color */
|
|
131
142
|
labelsColor: PropTypes.string,
|
|
143
|
+
|
|
132
144
|
/** change style show of label ['', 'italic'], default: 'italic' */
|
|
133
145
|
labelStyle: PropTypes.string,
|
|
134
146
|
labelsCountY: PropTypes.number,
|
|
@@ -138,16 +150,22 @@ Labels.propTypes = {
|
|
|
138
150
|
labelsOffsetX: PropTypes.number,
|
|
139
151
|
labelsOffsetY: PropTypes.number,
|
|
140
152
|
labelsStepX: PropTypes.number,
|
|
153
|
+
|
|
141
154
|
/** change show or hiden of label */
|
|
142
155
|
labelsVisible: PropTypes.bool,
|
|
156
|
+
|
|
143
157
|
/** the maxX is maximum of Ox quantity returned by data*/
|
|
144
158
|
maxX: PropTypes.number,
|
|
159
|
+
|
|
145
160
|
/** the maxY is maximum of Oy quantity returned by data*/
|
|
146
161
|
maxY: PropTypes.number,
|
|
162
|
+
|
|
147
163
|
/** the minX is minimum of OX quantity returned by data*/
|
|
148
164
|
minX: PropTypes.number,
|
|
165
|
+
|
|
149
166
|
/** the minY is minimum of Oy quantity returned by data*/
|
|
150
167
|
minY: PropTypes.number,
|
|
168
|
+
|
|
151
169
|
/** the unitWidth */
|
|
152
170
|
unitWidth: PropTypes.number
|
|
153
171
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
|
+
|
|
2
3
|
/** @jsxRuntime classic */
|
|
4
|
+
|
|
3
5
|
/** @jsx jsx */
|
|
4
6
|
import PropTypes from 'prop-types';
|
|
5
7
|
import { jsx, css } from '@emotion/core';
|
|
6
8
|
import { color as colors } from "../../../styles/colors";
|
|
9
|
+
|
|
7
10
|
const Path = ({
|
|
8
11
|
data,
|
|
9
12
|
getX,
|
|
@@ -19,9 +22,7 @@ const Path = ({
|
|
|
19
22
|
const x = getX(element.x + unitWidth / 1.5);
|
|
20
23
|
const y = getY(element.quantity);
|
|
21
24
|
return [x, y];
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
// const Colors = data.map(element => {
|
|
25
|
+
}); // const Colors = data.map(element => {
|
|
25
26
|
// const colors = element.color;
|
|
26
27
|
// return colors;
|
|
27
28
|
// });
|
|
@@ -38,58 +39,58 @@ const Path = ({
|
|
|
38
39
|
stroke-linejoin: round;
|
|
39
40
|
stroke-width: ${STROKEHover};
|
|
40
41
|
} */
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
// Properties of a line
|
|
42
|
+
`; // Properties of a line
|
|
44
43
|
// I: - pointA (array) [x,y]: coordinates
|
|
45
44
|
// - pointB (array) [x,y]: coordinates
|
|
46
45
|
// O: - (object) { length: l, angle: a }: properties of the line
|
|
46
|
+
|
|
47
47
|
const line = (pointA, pointB) => {
|
|
48
48
|
const lengthX = pointB[0] - pointA[0];
|
|
49
49
|
const lengthY = pointB[1] - pointA[1];
|
|
50
50
|
const Balance = 0.005 * Math.PI;
|
|
51
51
|
const Re = 0.38 * Math.PI;
|
|
52
52
|
let angle = Math.atan2(lengthY, lengthX);
|
|
53
|
+
|
|
53
54
|
if (angle < -0.32 * Math.PI) {
|
|
54
55
|
angle += Re; // make sure the returned angle is in the range of (-PI/2, 3PI/2]
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
if (angle > 0.16 * Math.PI) {
|
|
58
59
|
angle -= Balance;
|
|
59
|
-
}
|
|
60
|
+
} // console.log(angle);
|
|
60
61
|
|
|
61
|
-
// console.log(angle);
|
|
62
62
|
|
|
63
63
|
return {
|
|
64
64
|
length: Math.sqrt(Math.pow(lengthX, 2) + Math.pow(lengthY, 2)),
|
|
65
65
|
angle
|
|
66
66
|
};
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// Position of a control point
|
|
67
|
+
}; // Position of a control point
|
|
70
68
|
// I: - current (array) [x, y]: current point coordinates
|
|
71
69
|
// - previous (array) [x, y]: previous point coordinates
|
|
72
70
|
// - next (array) [x, y]: next point coordinates
|
|
73
71
|
// - reverse (boolean, optional): sets the direction
|
|
74
72
|
// O: - (array) [x,y]: a tuple of coordinates
|
|
73
|
+
|
|
74
|
+
|
|
75
75
|
const controlPoint = (current, previous, next, reverse) => {
|
|
76
76
|
// When 'current' is the first or last point of the array
|
|
77
77
|
// 'previous' or 'next' don't exist.
|
|
78
78
|
// Replace with 'current'
|
|
79
79
|
const c = current;
|
|
80
80
|
const p = previous ? previous : c;
|
|
81
|
-
const n = next ? next : c;
|
|
82
|
-
|
|
83
|
-
const smoothing = 0.15;
|
|
84
|
-
|
|
85
|
-
const o = line(p, n);
|
|
86
|
-
|
|
87
|
-
const rev = reverse ? Math.PI : 0;
|
|
88
|
-
|
|
81
|
+
const n = next ? next : c; // The smoothing ratio
|
|
82
|
+
|
|
83
|
+
const smoothing = 0.15; // Properties of the opposed-line
|
|
84
|
+
|
|
85
|
+
const o = line(p, n); // If is end-control-point, add PI to the angle to go backward
|
|
86
|
+
|
|
87
|
+
const rev = reverse ? Math.PI : 0; // The control point position is relative to the current point
|
|
88
|
+
|
|
89
89
|
const x = c[0] + Math.cos(o.angle + rev) * o.length * smoothing;
|
|
90
90
|
const y = c[1] + Math.sin(o.angle * 0.095 + rev) * o.length * smoothing;
|
|
91
91
|
return [x, y];
|
|
92
92
|
};
|
|
93
|
+
|
|
93
94
|
const svgPathRender = point => {
|
|
94
95
|
const d = point.reduce((acc, e, i, a) => {
|
|
95
96
|
if (i > 0) {
|
|
@@ -106,13 +107,13 @@ const Path = ({
|
|
|
106
107
|
fill: 'none'
|
|
107
108
|
});
|
|
108
109
|
};
|
|
110
|
+
|
|
109
111
|
const command = point => `L ${point[0]} ${point[1]} `;
|
|
112
|
+
|
|
110
113
|
const svgPath = points => {
|
|
111
114
|
// build the d attributes by looping over the points
|
|
112
|
-
const d = points.reduce((acc, point, i, a) => i === 0 ?
|
|
113
|
-
|
|
114
|
-
`M ${point[0]},${point[1]}` :
|
|
115
|
-
// else
|
|
115
|
+
const d = points.reduce((acc, point, i, a) => i === 0 ? // if first point
|
|
116
|
+
`M ${point[0]},${point[1]}` : // else
|
|
116
117
|
`${acc} ${command(point, i, a)}`, '');
|
|
117
118
|
return jsx("path", {
|
|
118
119
|
d: d,
|
|
@@ -120,27 +121,36 @@ const Path = ({
|
|
|
120
121
|
fill: 'none'
|
|
121
122
|
});
|
|
122
123
|
};
|
|
124
|
+
|
|
123
125
|
return PathVisible ? jsx("g", {
|
|
124
126
|
className: 'DGN-Path-LineChart'
|
|
125
127
|
}, Smooth ? svgPathRender(point) : svgPath(point)) : null;
|
|
126
128
|
};
|
|
129
|
+
|
|
127
130
|
Path.defaultProps = {
|
|
128
131
|
data: PropTypes.arrayOf(PropTypes.shape({
|
|
129
132
|
x: PropTypes.number,
|
|
130
133
|
quantity: PropTypes.number
|
|
131
134
|
})).isRequired,
|
|
135
|
+
|
|
132
136
|
/** the getX position x on Ox*/
|
|
133
137
|
getX: PropTypes.func,
|
|
138
|
+
|
|
134
139
|
/** the getY position y on Oy */
|
|
135
140
|
getY: PropTypes.func,
|
|
141
|
+
|
|
136
142
|
/** The color of the line drawn is the default color according to the data returned from the API, otherwise it will be generated by the design. */
|
|
137
143
|
pathColor: PropTypes.string,
|
|
144
|
+
|
|
138
145
|
/** shows the line to be drawn */
|
|
139
146
|
PathVisible: PropTypes.bool,
|
|
147
|
+
|
|
140
148
|
/** show or hiden the line to be drawn smooth */
|
|
141
149
|
Smooth: PropTypes.bool,
|
|
150
|
+
|
|
142
151
|
/** the thickness of the line to be drawn */
|
|
143
152
|
STROKE: PropTypes.number,
|
|
153
|
+
|
|
144
154
|
/** the unitWidth */
|
|
145
155
|
unitWidth: PropTypes.number
|
|
146
156
|
};
|