diginet-core-ui 1.3.88 → 1.3.89
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 +2 -6
- package/components/accordion/group.js +2 -9
- package/components/accordion/index.js +2 -15
- package/components/accordion/summary.js +4 -27
- package/components/alert/index.js +2 -33
- package/components/alert/notify.js +12 -22
- package/components/avatar/index.js +22 -81
- package/components/badge/index.js +20 -45
- package/components/button/icon.js +25 -56
- package/components/button/index.js +16 -65
- package/components/button/more.js +15 -35
- package/components/button/ripple-effect.js +0 -10
- package/components/card/body.js +2 -7
- package/components/card/extra.js +2 -7
- package/components/card/footer.js +2 -7
- package/components/card/header.js +2 -7
- package/components/card/index.js +2 -22
- package/components/chart/Pie/Circle.js +0 -1
- package/components/chart/Pie/Sector.js +2 -19
- package/components/chart/Pie/Sectors.js +0 -10
- package/components/chart/Pie/index.js +4 -36
- package/components/chart/Pie-v2/Circle.js +0 -1
- package/components/chart/Pie-v2/Sector.js +2 -15
- package/components/chart/Pie-v2/Sectors.js +0 -20
- package/components/chart/Pie-v2/index.js +11 -38
- package/components/chart/bar/Axis.js +0 -12
- package/components/chart/bar/Bar.js +13 -35
- package/components/chart/bar/Grid.js +0 -18
- package/components/chart/bar/Labels.js +4 -22
- package/components/chart/bar/Points.js +0 -17
- package/components/chart/bar/index.js +6 -26
- package/components/chart/bar-v2/Axis.js +0 -12
- package/components/chart/bar-v2/Bar.js +15 -36
- package/components/chart/bar-v2/Grid.js +0 -18
- package/components/chart/bar-v2/Labels.js +4 -22
- package/components/chart/bar-v2/Points.js +0 -17
- package/components/chart/bar-v2/index.js +6 -26
- package/components/chart/line/Axis.js +4 -16
- package/components/chart/line/Grid.js +2 -19
- package/components/chart/line/Labels.js +4 -22
- package/components/chart/line/Path.js +24 -34
- package/components/chart/line/Point.js +7 -41
- package/components/chart/line/Title.js +0 -3
- package/components/chart/line/index.js +12 -35
- package/components/chart/line-v2/Axis.js +0 -13
- package/components/chart/line-v2/Grid.js +0 -18
- package/components/chart/line-v2/Labels.js +4 -22
- package/components/chart/line-v2/Path.js +23 -33
- package/components/chart/line-v2/Point.js +6 -35
- package/components/chart/line-v2/Title.js +0 -3
- package/components/chart/line-v2/index.js +12 -30
- package/components/check-text/index.js +7 -15
- package/components/check-text/interview-confirmation.js +24 -31
- package/components/check-text/interview-status.js +24 -31
- package/components/chip/attach.js +9 -22
- package/components/chip/index.js +13 -38
- package/components/collapse/index.js +0 -13
- package/components/divider/index.js +2 -13
- package/components/form-control/attachment/index.js +41 -202
- package/components/form-control/calendar/function.js +154 -208
- package/components/form-control/calendar/index.js +21 -46
- package/components/form-control/calendar/range.js +11 -28
- package/components/form-control/checkbox/index.js +12 -46
- package/components/form-control/control/index.js +4 -14
- package/components/form-control/date-picker/index-old.js +18 -0
- package/components/form-control/date-picker/index.js +23 -99
- package/components/form-control/date-range-picker/index.js +44 -180
- package/components/form-control/dropdown/index.js +101 -314
- package/components/form-control/dropdown-box/index.js +7 -37
- package/components/form-control/form/index.js +0 -2
- package/components/form-control/form-group/index.js +1 -6
- package/components/form-control/helper-text/index.js +2 -9
- package/components/form-control/input-base/index.js +4 -68
- package/components/form-control/label/index.js +2 -12
- package/components/form-control/money-input/index.js +54 -143
- package/components/form-control/number-input/index.js +26 -124
- package/components/form-control/number-input/index2.js +95 -134
- package/components/form-control/phone-input/index.js +23 -85
- package/components/form-control/radio/index.js +16 -35
- package/components/form-control/text-input/index.js +10 -46
- package/components/form-control/time-picker/index.js +43 -100
- package/components/form-control/time-picker/swiper.js +21 -73
- package/components/form-control/toggle/index.js +26 -40
- package/components/form-view/helper-text.js +2 -2
- package/components/form-view/index.js +0 -14
- package/components/form-view/input.js +2 -13
- package/components/form-view/label.js +0 -2
- package/components/grid/Col.js +2 -16
- package/components/grid/Container.js +2 -21
- package/components/grid/Row.js +2 -21
- package/components/grid/index.js +2 -44
- package/components/image/index.js +2 -22
- package/components/index.js +62 -31
- package/components/list/list-item-action.js +12 -21
- package/components/list/list-item-icon.js +10 -19
- package/components/list/list-item-text.js +0 -5
- package/components/list/list-item.js +27 -38
- package/components/list/list.js +37 -50
- package/components/list/sub-header.js +13 -17
- package/components/modal/body.js +2 -6
- package/components/modal/footer.js +2 -11
- package/components/modal/header.js +2 -12
- package/components/modal/index.js +2 -10
- package/components/modal/modal.js +11 -52
- package/components/others/extra/index.js +3 -10
- package/components/others/import/index.js +0 -7
- package/components/others/option-wrapper/index.js +4 -7
- package/components/others/scrollbar/index.js +0 -3
- package/components/paging/page-info.js +35 -99
- package/components/paging/page-selector.js +10 -38
- package/components/paging/page-selector2.js +35 -74
- package/components/paper/index.js +23 -34
- package/components/popover/body.js +2 -6
- package/components/popover/footer.js +2 -11
- package/components/popover/header.js +2 -7
- package/components/popover/index.js +54 -146
- package/components/popup/danger_popup.js +0 -19
- package/components/popup/index.js +4 -50
- package/components/popup/proposals_popup.js +11 -50
- package/components/popup/v2/index.js +13 -47
- package/components/progress/circular.js +10 -48
- package/components/progress/linear.js +58 -74
- package/components/rating/index.js +10 -35
- package/components/slider/slider-container.js +4 -41
- package/components/slider/slider-item.js +10 -25
- package/components/status/index.js +2 -14
- package/components/tab/tab-container.js +4 -18
- package/components/tab/tab-header.js +4 -24
- package/components/tab/tab-panel.js +4 -16
- package/components/tab/tab.js +8 -33
- package/components/tooltip/index.js +12 -97
- package/components/tooltip/portal.js +0 -2
- package/components/transfer/index.js +28 -73
- package/components/tree-view/index.js +62 -202
- package/components/typography/index.js +14 -42
- package/global/index.js +0 -8
- package/icons/basic.js +0 -48
- package/icons/effect.js +15 -32
- package/icons/general/clock/clock.js +0 -2
- package/icons/general/color-handler/background.js +0 -2
- package/icons/general/color-handler/text.js +0 -2
- package/icons/general/emoji/emoji.js +0 -2
- package/icons/general/font-properties/bold.js +0 -2
- package/icons/general/font-properties/font-family.js +0 -2
- package/icons/general/font-properties/font-size.js +0 -2
- package/icons/general/font-properties/italic.js +0 -2
- package/icons/general/font-properties/underline.js +0 -2
- package/icons/general/hyperlink/hyperlink.js +0 -2
- package/icons/general/indent/decrease.js +0 -2
- package/icons/general/indent/increase.js +0 -2
- package/icons/general/list/bullets.js +0 -2
- package/icons/general/list/numbering.js +0 -2
- package/icons/general/picture/picture.js +0 -2
- package/icons/general/steps/redo.js +0 -2
- package/icons/general/steps/undo.js +0 -2
- package/icons/general/text-align/center.js +0 -2
- package/icons/general/text-align/justify.js +0 -2
- package/icons/general/text-align/left.js +0 -2
- package/icons/general/text-align/right.js +0 -2
- package/icons/menu/dhr.js +2 -1
- package/icons/menu/index.js +2 -2
- package/icons/menu/v2/index.js +2 -15
- package/package.json +42 -42
- package/readme.md +1034 -1027
- package/styles/animation.js +15 -58
- package/styles/color-helper.js +127 -157
- package/styles/colors.js +17 -9
- package/styles/general.js +16 -57
- package/styles/typography.js +4 -4
- package/styles/utils.js +18 -18
- package/theme/createBreakpoints.js +7 -18
- package/theme/make-styles.js +2 -5
- package/theme/set-theme.js +6 -9
- package/theme/settings.js +17 -22
- package/theme/theme-provider.js +0 -1
- package/utils/array/array.js +45 -54
- package/utils/classNames/index.js +0 -5
- package/utils/console.js +0 -6
- package/utils/date.js +69 -138
- package/utils/error/error.js +3 -11
- package/utils/error/errors.js +100 -147
- package/utils/getFileType.js +0 -9
- package/utils/handleBreakpoints.js +0 -5
- package/utils/intersectionObserver.js +0 -5
- package/utils/iterator.js +0 -9
- package/utils/map-parent.js +3 -10
- package/utils/object/extend.js +0 -10
- package/utils/object/object.js +12 -11
- package/utils/parseHTML.js +0 -1
- package/utils/promisify.js +0 -5
- package/utils/randomString.js +0 -7
- package/utils/remove-unicode.js +0 -1
- package/utils/render-portal.js +1 -9
- package/utils/renderHTML.js +4 -6
- package/utils/renderIcon.js +9 -19
- package/utils/sb-template.js +6 -5
- package/utils/string/capitalize.js +0 -1
- package/utils/string/capitalizeSentenceCase.js +0 -2
- package/utils/string/string.js +0 -13
- package/utils/type.js +0 -21
- package/utils/updatePosition.js +4 -5
- package/utils/useDelayUnmount.js +0 -4
- package/utils/useElementSize.js +9 -3
- package/utils/useEventListener.js +12 -6
- package/utils/useInput.js +0 -6
- package/utils/useMediaQuery/index.js +8 -10
- package/utils/useOnClickOutside.js +2 -4
- package/utils/usePortal.js +12 -19
- package/utils/validate.js +39 -53
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsxRuntime classic */
|
|
2
|
-
|
|
3
2
|
/** @jsx jsx */
|
|
3
|
+
|
|
4
4
|
import { css, jsx } from '@emotion/core';
|
|
5
5
|
import { render } from 'react-dom';
|
|
6
6
|
import { Button, ButtonIcon, Typography } from "../..";
|
|
@@ -8,7 +8,7 @@ import { getGlobal } from "../../../global";
|
|
|
8
8
|
import locale from "../../../locale";
|
|
9
9
|
import theme from "../../../theme/settings";
|
|
10
10
|
import { date as moment } from "../../../utils";
|
|
11
|
-
import {
|
|
11
|
+
import { useColor as colors } from "../../../theme";
|
|
12
12
|
import { typography } from "../../../styles/typography";
|
|
13
13
|
import { itemsCenter, border, boxBorder, borderRadius4px, cursorPointer, flexCol, flexRow, displayInlineFlex, justifyBetween, pointerEventsNone, positionAbsolute, positionRelative, textCenter, userSelectNone } from "../../../styles/general";
|
|
14
14
|
const {
|
|
@@ -31,17 +31,17 @@ const {
|
|
|
31
31
|
danger8,
|
|
32
32
|
info8
|
|
33
33
|
} = colors;
|
|
34
|
-
/**
|
|
35
|
-
* START STYLE
|
|
36
|
-
*/
|
|
37
34
|
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @param {Object} unique
|
|
41
|
-
* @param {Boolean} boxShadow
|
|
42
|
-
* @returns
|
|
35
|
+
/**
|
|
36
|
+
* START STYLE
|
|
43
37
|
*/
|
|
44
38
|
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @param {Object} unique
|
|
42
|
+
* @param {Boolean} boxShadow
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
45
|
const generateCalendarCSS = (unique, boxShadow = true, onClickActive = true) => css`
|
|
46
46
|
${borderRadius4px}
|
|
47
47
|
${boxBorder}
|
|
@@ -243,18 +243,16 @@ const generateCalendarCSS = (unique, boxShadow = true, onClickActive = true) =>
|
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
`;
|
|
246
|
-
/**
|
|
247
|
-
* END STYLE
|
|
246
|
+
/**
|
|
247
|
+
* END STYLE
|
|
248
248
|
*/
|
|
249
249
|
|
|
250
|
-
/**
|
|
251
|
-
*
|
|
252
|
-
* @description return props of the typography.
|
|
253
|
-
* @param {String} className
|
|
254
|
-
* @returns {Object} props of the typography
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* @description return props of the typography.
|
|
253
|
+
* @param {String} className
|
|
254
|
+
* @returns {Object} props of the typography
|
|
255
255
|
*/
|
|
256
|
-
|
|
257
|
-
|
|
258
256
|
const typographyProps = className => {
|
|
259
257
|
return {
|
|
260
258
|
className,
|
|
@@ -272,14 +270,12 @@ const typographyProps = className => {
|
|
|
272
270
|
type: 'h6'
|
|
273
271
|
};
|
|
274
272
|
};
|
|
275
|
-
/**
|
|
276
|
-
*
|
|
277
|
-
* @description return props of the button icon.
|
|
278
|
-
* @param {String} className
|
|
279
|
-
* @returns {Object} props of the button icon
|
|
273
|
+
/**
|
|
274
|
+
*
|
|
275
|
+
* @description return props of the button icon.
|
|
276
|
+
* @param {String} className
|
|
277
|
+
* @returns {Object} props of the button icon
|
|
280
278
|
*/
|
|
281
|
-
|
|
282
|
-
|
|
283
279
|
const buttonIconProps = className => {
|
|
284
280
|
return {
|
|
285
281
|
className,
|
|
@@ -290,14 +286,12 @@ const buttonIconProps = className => {
|
|
|
290
286
|
width: 28
|
|
291
287
|
};
|
|
292
288
|
};
|
|
293
|
-
/**
|
|
294
|
-
*
|
|
295
|
-
* @description return props of the button icon.
|
|
296
|
-
* @param {Function} fn
|
|
297
|
-
* @returns {Object} props of the button text
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
* @description return props of the button icon.
|
|
292
|
+
* @param {Function} fn
|
|
293
|
+
* @returns {Object} props of the button text
|
|
298
294
|
*/
|
|
299
|
-
|
|
300
|
-
|
|
301
295
|
const buttonTextProps = fn => {
|
|
302
296
|
return {
|
|
303
297
|
onClick: fn,
|
|
@@ -311,155 +305,132 @@ const buttonTextProps = fn => {
|
|
|
311
305
|
}
|
|
312
306
|
};
|
|
313
307
|
};
|
|
314
|
-
/**
|
|
315
|
-
* @description detect value is a Date object
|
|
316
|
-
* @param {String | Number | Array} value
|
|
317
|
-
* @returns boolean
|
|
318
|
-
*/
|
|
319
|
-
|
|
320
308
|
|
|
309
|
+
/**
|
|
310
|
+
* @description detect value is a Date object
|
|
311
|
+
* @param {String | Number | Array} value
|
|
312
|
+
* @returns boolean
|
|
313
|
+
*/
|
|
321
314
|
const isValidDate = value => {
|
|
322
315
|
return new Date(value) instanceof Date && !isNaN(new Date(value));
|
|
323
316
|
};
|
|
324
|
-
/**
|
|
325
|
-
*
|
|
326
|
-
* @description set Sunday (0) to the last day of week.
|
|
327
|
-
* @param {Date} date
|
|
328
|
-
* @returns number of day from 0 (Monday) to 6 (Sunday).
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @description set Sunday (0) to the last day of week.
|
|
320
|
+
* @param {Date} date
|
|
321
|
+
* @returns number of day from 0 (Monday) to 6 (Sunday).
|
|
329
322
|
*/
|
|
330
|
-
|
|
331
|
-
|
|
332
323
|
const getDateOfWeek = date => {
|
|
333
324
|
let day = date.getDay();
|
|
334
325
|
if (day === 0) day = 7;
|
|
335
326
|
return day - 1;
|
|
336
327
|
};
|
|
337
|
-
/**
|
|
338
|
-
*
|
|
339
|
-
* @description check day is today.
|
|
340
|
-
* @param {Date} day
|
|
341
|
-
* @param {Date} today
|
|
342
|
-
* @param {String} className
|
|
343
|
-
* @returns {Boolean} is today
|
|
328
|
+
/**
|
|
329
|
+
*
|
|
330
|
+
* @description check day is today.
|
|
331
|
+
* @param {Date} day
|
|
332
|
+
* @param {Date} today
|
|
333
|
+
* @param {String} className
|
|
334
|
+
* @returns {Boolean} is today
|
|
344
335
|
*/
|
|
345
|
-
|
|
346
|
-
|
|
347
336
|
const isToday = (day, today, className) => {
|
|
348
337
|
return +moment(day).diff(today) === 0 ? className : '';
|
|
349
338
|
};
|
|
350
|
-
/**
|
|
351
|
-
*
|
|
352
|
-
* @description check day is active day.
|
|
353
|
-
* @param {Date} day
|
|
354
|
-
* @param {Date} active
|
|
355
|
-
* @param {String} className
|
|
356
|
-
* @returns {Boolean} is active day
|
|
339
|
+
/**
|
|
340
|
+
*
|
|
341
|
+
* @description check day is active day.
|
|
342
|
+
* @param {Date} day
|
|
343
|
+
* @param {Date} active
|
|
344
|
+
* @param {String} className
|
|
345
|
+
* @returns {Boolean} is active day
|
|
357
346
|
*/
|
|
358
|
-
|
|
359
|
-
|
|
360
347
|
const isActive = (day, active, className) => {
|
|
361
348
|
if (Array.isArray(active)) {
|
|
362
349
|
if (+moment(day).diff(active[0]) === 0 || +moment(day).diff(active[1]) === 0) {
|
|
363
350
|
return className;
|
|
364
351
|
}
|
|
365
352
|
}
|
|
366
|
-
|
|
367
353
|
if (+moment(day).diff(active) === 0) {
|
|
368
354
|
return className;
|
|
369
355
|
}
|
|
370
|
-
|
|
371
356
|
return '';
|
|
372
357
|
};
|
|
373
|
-
/**
|
|
374
|
-
*
|
|
375
|
-
* @description check day is min/max day.
|
|
376
|
-
* @param {Date} day
|
|
377
|
-
* @param {Date} max
|
|
378
|
-
* @param {Date} min
|
|
379
|
-
* @param {Object} className
|
|
380
|
-
* @returns {Boolean} is limited day
|
|
358
|
+
/**
|
|
359
|
+
*
|
|
360
|
+
* @description check day is min/max day.
|
|
361
|
+
* @param {Date} day
|
|
362
|
+
* @param {Date} max
|
|
363
|
+
* @param {Date} min
|
|
364
|
+
* @param {Object} className
|
|
365
|
+
* @returns {Boolean} is limited day
|
|
381
366
|
*/
|
|
382
|
-
|
|
383
|
-
|
|
384
367
|
const isLimit = (day, max, min, className) => {
|
|
385
368
|
return isBeforeLimit(min, day) || isAfterLimit(max, day) ? className : '';
|
|
386
369
|
};
|
|
387
|
-
|
|
388
370
|
const isBetween = (day, from, to, className) => {
|
|
389
371
|
if (from && isValidDate(from) && +moment(day).diff(from) === 0) {
|
|
390
372
|
return className.from;
|
|
391
373
|
}
|
|
392
|
-
|
|
393
374
|
if (to && isValidDate(to) && +moment(day).diff(to) === 0) {
|
|
394
375
|
return className.to;
|
|
395
376
|
}
|
|
396
|
-
|
|
397
377
|
if (from && to && isValidDate(from) && isValidDate(to) && +moment(day).diff(from) > 0 && +moment(day).diff(to) < 0) {
|
|
398
378
|
return className.between;
|
|
399
379
|
}
|
|
400
|
-
|
|
401
380
|
return '';
|
|
402
381
|
};
|
|
403
|
-
|
|
404
382
|
const isBeforeLimit = (min, time) => {
|
|
405
383
|
return min && isValidDate(min) && moment(time).diff(new Date(min).setHours(0, 0, 0, 0)) < 0;
|
|
406
384
|
};
|
|
407
|
-
|
|
408
385
|
const isAfterLimit = (max, time) => {
|
|
409
386
|
return max && isValidDate(max) && moment(time).diff(new Date(max).setHours(0, 0, 0, 0)) > 0;
|
|
410
387
|
};
|
|
411
|
-
/**
|
|
412
|
-
*
|
|
413
|
-
* @description return the table body of the calendar.
|
|
414
|
-
* @param {Date} time
|
|
415
|
-
* @param {Date} activeValue
|
|
416
|
-
* @param {Object} className
|
|
417
|
-
* @param {Boolean} displayAnotherMonth
|
|
418
|
-
* @param {Function} onTableDataClick
|
|
419
|
-
* @param {Date} min
|
|
420
|
-
* @param {Date} max
|
|
421
|
-
* @returns {Element}
|
|
388
|
+
/**
|
|
389
|
+
*
|
|
390
|
+
* @description return the table body of the calendar.
|
|
391
|
+
* @param {Date} time
|
|
392
|
+
* @param {Date} activeValue
|
|
393
|
+
* @param {Object} className
|
|
394
|
+
* @param {Boolean} displayAnotherMonth
|
|
395
|
+
* @param {Function} onTableDataClick
|
|
396
|
+
* @param {Date} min
|
|
397
|
+
* @param {Date} max
|
|
398
|
+
* @returns {Element}
|
|
422
399
|
*/
|
|
423
|
-
|
|
424
|
-
|
|
425
400
|
const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTableDataClick, min, max) => {
|
|
426
401
|
time = new Date(time);
|
|
427
402
|
const firstDay = new Date(new Date(time).setDate(1)),
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
403
|
+
lastDay = new Date(firstDay.getFullYear(), firstDay.getMonth() + 1, 0),
|
|
404
|
+
prevDay = new Date(firstDay.getFullYear(), firstDay.getMonth(), 0),
|
|
405
|
+
today = new Date().setHours(0, 0, 0, 0),
|
|
406
|
+
lastDate = lastDay.getDate(),
|
|
407
|
+
prevDate = prevDay.getDate();
|
|
433
408
|
let active = Array.isArray(activeValue) ? new Date(activeValue[0]) : new Date(activeValue);
|
|
434
409
|
let tableBody = [],
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
410
|
+
tableRaw = [],
|
|
411
|
+
tableData = [],
|
|
412
|
+
weekDateFirst = getDateOfWeek(firstDay),
|
|
413
|
+
weekDateLast = getDateOfWeek(lastDay);
|
|
440
414
|
if (activeValue && Array.isArray(activeValue) && activeValue.length === 2 && activeValue[0] !== activeValue[1]) {
|
|
441
|
-
/**
|
|
442
|
-
* days of previous month
|
|
415
|
+
/**
|
|
416
|
+
* days of previous month
|
|
443
417
|
*/
|
|
444
418
|
active = activeValue;
|
|
445
|
-
|
|
446
419
|
for (let i = weekDateFirst; i > 0; i--) {
|
|
447
|
-
const day = new Date(time.getFullYear(), time.getMonth() - 1,
|
|
420
|
+
const day = new Date(time.getFullYear(), time.getMonth() - 1,
|
|
421
|
+
// displayAnotherMonth ? prevDate - i + 1 : 1
|
|
448
422
|
1);
|
|
449
423
|
tableData.push(jsx("td", {
|
|
450
424
|
key: `previous_month-${prevDate - i + 1}`,
|
|
451
|
-
"data-time": Date.parse(day) - 1
|
|
452
|
-
/*(displayAnotherMonth ? 0 : 1)*/
|
|
453
|
-
,
|
|
425
|
+
"data-time": Date.parse(day) - 1 /*(displayAnotherMonth ? 0 : 1)*/,
|
|
454
426
|
className: `${[className.table.data, 'previous_month', isToday(day, today, className.day.today), isActive(day, active, className.day.active), isBetween(day, active[0], active[1], className.day)].join(' ')}`
|
|
455
|
-
}, jsx(Typography, {
|
|
427
|
+
}, jsx(Typography, {
|
|
428
|
+
...typographyProps(className.day.day)
|
|
456
429
|
}, '')));
|
|
457
430
|
}
|
|
458
|
-
/**
|
|
459
|
-
* days of this month
|
|
431
|
+
/**
|
|
432
|
+
* days of this month
|
|
460
433
|
*/
|
|
461
|
-
|
|
462
|
-
|
|
463
434
|
for (let i = 0; i < lastDate; i++) {
|
|
464
435
|
const day = new Date(time.getFullYear(), time.getMonth(), i + 1);
|
|
465
436
|
tableData.push(jsx("td", {
|
|
@@ -467,29 +438,28 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
467
438
|
"data-time": Date.parse(day),
|
|
468
439
|
className: `${[className.table.data, 'this_month', isToday(day, today, className.day.today), isActive(day, active, className.day.active), isLimit(day, max, min, className.day.limit), isBetween(day, active[0], active[1], className.day)].join(' ')}`,
|
|
469
440
|
onClick: onTableDataClick
|
|
470
|
-
}, jsx(Typography, {
|
|
441
|
+
}, jsx(Typography, {
|
|
442
|
+
...typographyProps(className.day.day)
|
|
471
443
|
}, i + 1)));
|
|
472
444
|
}
|
|
473
|
-
/**
|
|
474
|
-
* days of next month
|
|
445
|
+
/**
|
|
446
|
+
* days of next month
|
|
475
447
|
*/
|
|
476
|
-
|
|
477
|
-
|
|
478
448
|
for (let i = 0; i < 20 - weekDateLast; i++) {
|
|
479
|
-
const day = new Date(time.getFullYear(), time.getMonth() + 1,
|
|
449
|
+
const day = new Date(time.getFullYear(), time.getMonth() + 1,
|
|
450
|
+
// displayAnotherMonth ? i + 1 : 6 - weekDateLast
|
|
480
451
|
6 - weekDateLast);
|
|
481
452
|
tableData.push(jsx("td", {
|
|
482
453
|
key: `next_month-${i + 1}`,
|
|
483
|
-
"data-time": Date.parse(day) + 1
|
|
484
|
-
/*(displayAnotherMonth ? 0 : 1)*/
|
|
485
|
-
,
|
|
454
|
+
"data-time": Date.parse(day) + 1 /*(displayAnotherMonth ? 0 : 1)*/,
|
|
486
455
|
className: `${[className.table.data, 'next_month', isToday(day, today, className.day.today), isActive(day, active, className.day.active), isBetween(day, active[0], active[1], className.day)].join(' ')}`
|
|
487
|
-
}, jsx(Typography, {
|
|
456
|
+
}, jsx(Typography, {
|
|
457
|
+
...typographyProps(className.day.day)
|
|
488
458
|
}, '')));
|
|
489
459
|
}
|
|
490
460
|
} else {
|
|
491
|
-
/**
|
|
492
|
-
* days of previous month
|
|
461
|
+
/**
|
|
462
|
+
* days of previous month
|
|
493
463
|
*/
|
|
494
464
|
for (let i = weekDateFirst; i > 0; i--) {
|
|
495
465
|
const day = new Date(time.getFullYear(), time.getMonth() - 1, displayAnotherMonth ? prevDate - i + 1 : 1);
|
|
@@ -498,14 +468,13 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
498
468
|
"data-time": Date.parse(day) - (displayAnotherMonth ? 0 : 1),
|
|
499
469
|
className: `${[className.table.data, 'previous_month', isToday(day, today, className.day.today), isActive(day, active, className.day.active), isLimit(day, max, min, className.day.limit)].join(' ')}`,
|
|
500
470
|
onClick: onTableDataClick
|
|
501
|
-
}, jsx(Typography, {
|
|
471
|
+
}, jsx(Typography, {
|
|
472
|
+
...typographyProps(className.day.day)
|
|
502
473
|
}, displayAnotherMonth ? prevDate - i + 1 : '')));
|
|
503
474
|
}
|
|
504
|
-
/**
|
|
505
|
-
* days of this month
|
|
475
|
+
/**
|
|
476
|
+
* days of this month
|
|
506
477
|
*/
|
|
507
|
-
|
|
508
|
-
|
|
509
478
|
for (let i = 0; i < lastDate; i++) {
|
|
510
479
|
const day = new Date(time.getFullYear(), time.getMonth(), i + 1);
|
|
511
480
|
tableData.push(jsx("td", {
|
|
@@ -513,14 +482,13 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
513
482
|
"data-time": Date.parse(day),
|
|
514
483
|
className: `${[className.table.data, 'this_month', isToday(day, today, className.day.today), isActive(day, active, className.day.active), isLimit(day, max, min, className.day.limit)].join(' ')}`,
|
|
515
484
|
onClick: onTableDataClick
|
|
516
|
-
}, jsx(Typography, {
|
|
485
|
+
}, jsx(Typography, {
|
|
486
|
+
...typographyProps(className.day.day)
|
|
517
487
|
}, i + 1)));
|
|
518
488
|
}
|
|
519
|
-
/**
|
|
520
|
-
* days of next month
|
|
489
|
+
/**
|
|
490
|
+
* days of next month
|
|
521
491
|
*/
|
|
522
|
-
|
|
523
|
-
|
|
524
492
|
for (let i = 0; i < 20 - weekDateLast; i++) {
|
|
525
493
|
const day = new Date(time.getFullYear(), time.getMonth() + 1, displayAnotherMonth ? i + 1 : 6 - weekDateLast);
|
|
526
494
|
tableData.push(jsx("td", {
|
|
@@ -528,36 +496,31 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
528
496
|
"data-time": Date.parse(day) + (displayAnotherMonth ? 0 : 1),
|
|
529
497
|
className: `${[className.table.data, 'next_month', isToday(day, today, className.day.today), isActive(day, active, className.day.active), isLimit(day, max, min, className.day.limit)].join(' ')}`,
|
|
530
498
|
onClick: onTableDataClick
|
|
531
|
-
}, jsx(Typography, {
|
|
499
|
+
}, jsx(Typography, {
|
|
500
|
+
...typographyProps(className.day.day)
|
|
532
501
|
}, displayAnotherMonth ? i + 1 : '')));
|
|
533
502
|
}
|
|
534
503
|
}
|
|
535
|
-
|
|
536
504
|
for (let i = 0; i < 6; i++) {
|
|
537
505
|
for (let j = 0; j < 7; j++) {
|
|
538
506
|
tableRaw.push(tableData[7 * i + j]);
|
|
539
507
|
}
|
|
540
|
-
|
|
541
508
|
tableBody.push(jsx("tr", {
|
|
542
509
|
key: i,
|
|
543
510
|
className: className.day.week
|
|
544
511
|
}, tableRaw));
|
|
545
512
|
tableRaw = [];
|
|
546
513
|
}
|
|
547
|
-
|
|
548
514
|
return tableBody;
|
|
549
515
|
};
|
|
550
|
-
/**
|
|
551
|
-
*
|
|
552
|
-
* @param {Object} className
|
|
553
|
-
* @returns
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
* @param {Object} className
|
|
519
|
+
* @returns
|
|
554
520
|
*/
|
|
555
|
-
|
|
556
|
-
|
|
557
521
|
const renderHeader = className => {
|
|
558
522
|
const weekdays = getGlobal(['weekdaysLong']);
|
|
559
523
|
const tableHeader = [];
|
|
560
|
-
|
|
561
524
|
for (let i in weekdays) {
|
|
562
525
|
tableHeader.push(jsx("th", {
|
|
563
526
|
key: i,
|
|
@@ -567,147 +530,130 @@ const renderHeader = className => {
|
|
|
567
530
|
type: 'h6'
|
|
568
531
|
}, weekdays[i])));
|
|
569
532
|
}
|
|
570
|
-
|
|
571
533
|
const header = jsx("thead", null, jsx("tr", {
|
|
572
534
|
className: className.table.raw
|
|
573
535
|
}, tableHeader));
|
|
574
536
|
return header;
|
|
575
537
|
};
|
|
576
|
-
/**
|
|
577
|
-
*
|
|
578
|
-
* @param {Object} className
|
|
579
|
-
* @param {Object} refs
|
|
580
|
-
* @param {Function} dbLeftFn
|
|
581
|
-
* @param {Function} leftFn
|
|
582
|
-
* @param {Function} rightFn
|
|
583
|
-
* @param {Function} dbRightFn
|
|
584
|
-
* @returns navigator
|
|
538
|
+
/**
|
|
539
|
+
*
|
|
540
|
+
* @param {Object} className
|
|
541
|
+
* @param {Object} refs
|
|
542
|
+
* @param {Function} dbLeftFn
|
|
543
|
+
* @param {Function} leftFn
|
|
544
|
+
* @param {Function} rightFn
|
|
545
|
+
* @param {Function} dbRightFn
|
|
546
|
+
* @returns navigator
|
|
585
547
|
*/
|
|
586
|
-
|
|
587
|
-
|
|
588
548
|
const renderNavigator = (className, refs, dbLeftFn, leftFn, rightFn, dbRightFn, fn) => jsx("div", {
|
|
589
549
|
className: className.navigator.navigator
|
|
590
550
|
}, jsx("div", {
|
|
591
551
|
className: className.navigator.around
|
|
592
|
-
}, jsx(ButtonIcon, {
|
|
552
|
+
}, jsx(ButtonIcon, {
|
|
553
|
+
...buttonIconProps(className.icon),
|
|
593
554
|
name: 'ArrowDoubleLeft',
|
|
594
555
|
onClick: dbLeftFn,
|
|
595
556
|
ref: refs.doubleLeft
|
|
596
|
-
}), jsx(ButtonIcon, {
|
|
557
|
+
}), jsx(ButtonIcon, {
|
|
558
|
+
...buttonIconProps(className.icon),
|
|
597
559
|
name: 'ArrowLeft',
|
|
598
560
|
onClick: leftFn,
|
|
599
561
|
ref: refs.left
|
|
600
562
|
})), jsx("div", {
|
|
601
563
|
className: className.navigator.center
|
|
602
|
-
}, jsx(Button, {
|
|
564
|
+
}, jsx(Button, {
|
|
565
|
+
...buttonTextProps(fn)
|
|
603
566
|
}, jsx(Typography, {
|
|
604
567
|
color: 'primary',
|
|
605
568
|
type: 'h3',
|
|
606
569
|
ref: refs.content
|
|
607
570
|
}))), jsx("div", {
|
|
608
571
|
className: className.navigator.around
|
|
609
|
-
}, jsx(ButtonIcon, {
|
|
572
|
+
}, jsx(ButtonIcon, {
|
|
573
|
+
...buttonIconProps(className.icon),
|
|
610
574
|
name: 'ArrowRight',
|
|
611
575
|
onClick: rightFn,
|
|
612
576
|
ref: refs.right
|
|
613
|
-
}), jsx(ButtonIcon, {
|
|
577
|
+
}), jsx(ButtonIcon, {
|
|
578
|
+
...buttonIconProps(className.icon),
|
|
614
579
|
name: 'ArrowDoubleRight',
|
|
615
580
|
onClick: dbRightFn,
|
|
616
581
|
ref: refs.doubleRight
|
|
617
582
|
})));
|
|
618
|
-
/**
|
|
619
|
-
*
|
|
620
|
-
* @param {Date} time
|
|
621
|
-
* @returns {String} month year
|
|
583
|
+
/**
|
|
584
|
+
*
|
|
585
|
+
* @param {Date} time
|
|
586
|
+
* @returns {String} month year
|
|
622
587
|
*/
|
|
623
|
-
|
|
624
|
-
|
|
625
588
|
const renderNavigatorContent = time => {
|
|
626
589
|
const value = new Date(time);
|
|
627
590
|
const months = getGlobal(['months', 'full']);
|
|
628
591
|
return [months[value.getMonth()], value.getFullYear()];
|
|
629
592
|
};
|
|
630
|
-
/**
|
|
631
|
-
*
|
|
632
|
-
* @param {Date} time
|
|
633
|
-
* @param {Object} refs
|
|
634
|
-
* @param {Date} min
|
|
635
|
-
* @param {Date} max
|
|
593
|
+
/**
|
|
594
|
+
*
|
|
595
|
+
* @param {Date} time
|
|
596
|
+
* @param {Object} refs
|
|
597
|
+
* @param {Date} min
|
|
598
|
+
* @param {Date} max
|
|
636
599
|
*/
|
|
637
|
-
|
|
638
|
-
|
|
639
600
|
const onUpdateNavigator = (time, refs, min, max) => {
|
|
640
601
|
var _refs$doubleLeft$curr, _refs$doubleLeft$curr2, _refs$doubleRight$cur, _refs$doubleRight$cur2, _refs$left$current, _refs$left$current$in, _refs$right$current, _refs$right$current$i;
|
|
641
|
-
|
|
642
602
|
const el = refs.content.current;
|
|
643
603
|
const vl = renderNavigatorContent(time);
|
|
644
604
|
const year = locale.get() === 'vi' ? ` ${getGlobal(['year'])} ` : '';
|
|
645
|
-
|
|
646
605
|
if (el) {
|
|
647
606
|
el.innerHTML = `${vl[0]} ${year}${vl[1]}`;
|
|
648
607
|
}
|
|
649
|
-
|
|
650
608
|
const firstDayOfMin = new Date(new Date(new Date(min).setDate(1)).setHours(0, 0, 0, 0));
|
|
651
609
|
const firstDayOfMax = new Date(new Date(new Date(max).setDate(1)).setHours(0, 0, 0, 0));
|
|
652
610
|
(_refs$doubleLeft$curr = refs.doubleLeft.current) === null || _refs$doubleLeft$curr === void 0 ? void 0 : (_refs$doubleLeft$curr2 = _refs$doubleLeft$curr.instance) === null || _refs$doubleLeft$curr2 === void 0 ? void 0 : _refs$doubleLeft$curr2.option('disabled', false);
|
|
653
611
|
(_refs$doubleRight$cur = refs.doubleRight.current) === null || _refs$doubleRight$cur === void 0 ? void 0 : (_refs$doubleRight$cur2 = _refs$doubleRight$cur.instance) === null || _refs$doubleRight$cur2 === void 0 ? void 0 : _refs$doubleRight$cur2.option('disabled', false);
|
|
654
612
|
(_refs$left$current = refs.left.current) === null || _refs$left$current === void 0 ? void 0 : (_refs$left$current$in = _refs$left$current.instance) === null || _refs$left$current$in === void 0 ? void 0 : _refs$left$current$in.option('disabled', false);
|
|
655
613
|
(_refs$right$current = refs.right.current) === null || _refs$right$current === void 0 ? void 0 : (_refs$right$current$i = _refs$right$current.instance) === null || _refs$right$current$i === void 0 ? void 0 : _refs$right$current$i.option('disabled', false);
|
|
656
|
-
|
|
657
614
|
if (min && isValidDate(min)) {
|
|
658
615
|
if (moment(time).diff(firstDayOfMin) < 365) {
|
|
659
616
|
var _refs$doubleLeft$curr3, _refs$doubleLeft$curr4;
|
|
660
|
-
|
|
661
617
|
(_refs$doubleLeft$curr3 = refs.doubleLeft.current) === null || _refs$doubleLeft$curr3 === void 0 ? void 0 : (_refs$doubleLeft$curr4 = _refs$doubleLeft$curr3.instance) === null || _refs$doubleLeft$curr4 === void 0 ? void 0 : _refs$doubleLeft$curr4.option('disabled', true);
|
|
662
618
|
}
|
|
663
|
-
|
|
664
619
|
if (moment(time).diff(firstDayOfMin) <= 28) {
|
|
665
620
|
var _refs$doubleLeft$curr5, _refs$doubleLeft$curr6, _refs$left$current2, _refs$left$current2$i;
|
|
666
|
-
|
|
667
621
|
(_refs$doubleLeft$curr5 = refs.doubleLeft.current) === null || _refs$doubleLeft$curr5 === void 0 ? void 0 : (_refs$doubleLeft$curr6 = _refs$doubleLeft$curr5.instance) === null || _refs$doubleLeft$curr6 === void 0 ? void 0 : _refs$doubleLeft$curr6.option('disabled', true);
|
|
668
622
|
(_refs$left$current2 = refs.left.current) === null || _refs$left$current2 === void 0 ? void 0 : (_refs$left$current2$i = _refs$left$current2.instance) === null || _refs$left$current2$i === void 0 ? void 0 : _refs$left$current2$i.option('disabled', true);
|
|
669
623
|
}
|
|
670
624
|
}
|
|
671
|
-
|
|
672
625
|
if (max && isValidDate(max)) {
|
|
673
626
|
if (moment(time).diff(firstDayOfMax) > -334) {
|
|
674
627
|
var _refs$doubleRight$cur3, _refs$doubleRight$cur4;
|
|
675
|
-
|
|
676
628
|
(_refs$doubleRight$cur3 = refs.doubleRight.current) === null || _refs$doubleRight$cur3 === void 0 ? void 0 : (_refs$doubleRight$cur4 = _refs$doubleRight$cur3.instance) === null || _refs$doubleRight$cur4 === void 0 ? void 0 : _refs$doubleRight$cur4.option('disabled', true);
|
|
677
629
|
}
|
|
678
|
-
|
|
679
630
|
if (moment(time).diff(firstDayOfMax) > -1) {
|
|
680
631
|
var _refs$doubleRight$cur5, _refs$doubleRight$cur6, _refs$right$current2, _refs$right$current2$;
|
|
681
|
-
|
|
682
632
|
(_refs$doubleRight$cur5 = refs.doubleRight.current) === null || _refs$doubleRight$cur5 === void 0 ? void 0 : (_refs$doubleRight$cur6 = _refs$doubleRight$cur5.instance) === null || _refs$doubleRight$cur6 === void 0 ? void 0 : _refs$doubleRight$cur6.option('disabled', true);
|
|
683
633
|
(_refs$right$current2 = refs.right.current) === null || _refs$right$current2 === void 0 ? void 0 : (_refs$right$current2$ = _refs$right$current2.instance) === null || _refs$right$current2$ === void 0 ? void 0 : _refs$right$current2$.option('disabled', true);
|
|
684
634
|
}
|
|
685
635
|
}
|
|
686
636
|
};
|
|
687
|
-
/**
|
|
688
|
-
*
|
|
689
|
-
* @param {Date} time
|
|
690
|
-
* @param {Object} navigatorRefs
|
|
691
|
-
* @param {Date} min
|
|
692
|
-
* @param {Date} max
|
|
693
|
-
* @param {Element} table
|
|
694
|
-
* @param {Date} activeValue
|
|
695
|
-
* @param {Object} className
|
|
696
|
-
* @param {Boolean} displayAnotherMonth
|
|
697
|
-
* @param {Function} onTableDataClick
|
|
698
|
-
* @param {Function} onUpdateNavigatorValue
|
|
637
|
+
/**
|
|
638
|
+
*
|
|
639
|
+
* @param {Date} time
|
|
640
|
+
* @param {Object} navigatorRefs
|
|
641
|
+
* @param {Date} min
|
|
642
|
+
* @param {Date} max
|
|
643
|
+
* @param {Element} table
|
|
644
|
+
* @param {Date} activeValue
|
|
645
|
+
* @param {Object} className
|
|
646
|
+
* @param {Boolean} displayAnotherMonth
|
|
647
|
+
* @param {Function} onTableDataClick
|
|
648
|
+
* @param {Function} onUpdateNavigatorValue
|
|
699
649
|
*/
|
|
700
|
-
|
|
701
|
-
|
|
702
650
|
const onUpdateCalendar = (time, navigatorRefs, min, max, table, activeValue, className, displayAnotherMonth, onTableDataClick, onUpdateNavigatorValue) => {
|
|
703
651
|
onUpdateNavigator(time, navigatorRefs, min, max);
|
|
704
652
|
onUpdateNavigatorValue(time);
|
|
705
|
-
|
|
706
653
|
if (table) {
|
|
707
654
|
const child = renderTableBody(time, activeValue, className, displayAnotherMonth, onTableDataClick, min, max);
|
|
708
655
|
table.querySelector('tbody').remove();
|
|
709
656
|
render(child, table.appendChild(document.createElement('tbody')));
|
|
710
657
|
}
|
|
711
658
|
};
|
|
712
|
-
|
|
713
659
|
export { renderTableBody, renderHeader, renderNavigator, onUpdateNavigator, renderNavigatorContent, onUpdateCalendar, isBeforeLimit, isAfterLimit, isValidDate, generateCalendarCSS };
|