@douyinfe/semi-foundation 2.1.1 → 2.1.2
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/anchor/foundation.ts +1 -1
- package/autoComplete/autoComplete.scss +3 -2
- package/autoComplete/foundation.ts +1 -1
- package/base/foundation.ts +1 -1
- package/cascader/foundation.ts +1 -1
- package/cascader/util.ts +1 -1
- package/datePicker/_utils/getFullDateOffset.ts +1 -1
- package/datePicker/foundation.ts +1 -1
- package/datePicker/monthsGridFoundation.ts +1 -1
- package/form/foundation.ts +1 -1
- package/form/utils.ts +1 -1
- package/getBabelConfig.js +36 -0
- package/gulpfile.js +27 -9
- package/input/foundation.ts +1 -1
- package/input/input.scss +2 -0
- package/input/textareaFoundation.ts +1 -1
- package/input/util/getSizingData.ts +1 -1
- package/input/variables.scss +1 -1
- package/inputNumber/foundation.ts +1 -1
- package/lib/cjs/_portal/portal.css +15 -0
- package/lib/cjs/_portal/portal.scss +17 -0
- package/lib/cjs/anchor/anchor.css +118 -0
- package/lib/cjs/anchor/anchor.scss +120 -0
- package/lib/cjs/anchor/constants.d.ts +11 -0
- package/lib/cjs/anchor/constants.js +24 -0
- package/lib/cjs/anchor/foundation.d.ts +41 -0
- package/lib/cjs/anchor/foundation.js +270 -0
- package/lib/cjs/anchor/linkFoundation.d.ts +14 -0
- package/lib/cjs/anchor/linkFoundation.js +50 -0
- package/lib/cjs/anchor/rtl.scss +18 -0
- package/lib/cjs/anchor/variables.scss +27 -0
- package/lib/cjs/autoComplete/autoComplete.css +103 -0
- package/lib/cjs/autoComplete/autoComplete.scss +38 -0
- package/lib/cjs/autoComplete/constants.d.ts +10 -0
- package/lib/cjs/autoComplete/constants.js +25 -0
- package/lib/cjs/autoComplete/foundation.d.ts +62 -0
- package/lib/cjs/autoComplete/foundation.js +465 -0
- package/lib/cjs/autoComplete/rtl.scss +8 -0
- package/lib/cjs/autoComplete/variables.scss +3 -0
- package/lib/cjs/avatar/avatar.css +426 -0
- package/lib/cjs/avatar/avatar.scss +205 -0
- package/lib/cjs/avatar/constants.d.ts +10 -0
- package/lib/cjs/avatar/constants.js +24 -0
- package/lib/cjs/avatar/foundation.d.ts +14 -0
- package/lib/cjs/avatar/foundation.js +49 -0
- package/lib/cjs/avatar/mixin.css +3 -0
- package/lib/cjs/avatar/mixin.scss +4 -0
- package/lib/cjs/avatar/rtl.scss +69 -0
- package/lib/cjs/avatar/variables.scss +45 -0
- package/lib/cjs/backtop/backtop.css +20 -0
- package/lib/cjs/backtop/backtop.scss +17 -0
- package/lib/cjs/backtop/constants.d.ts +5 -0
- package/lib/cjs/backtop/constants.js +18 -0
- package/lib/cjs/backtop/foundation.d.ts +21 -0
- package/lib/cjs/backtop/foundation.js +114 -0
- package/lib/cjs/backtop/rtl.scss +10 -0
- package/lib/cjs/backtop/variables.scss +3 -0
- package/lib/cjs/badge/badge.css +146 -0
- package/lib/cjs/badge/badge.scss +168 -0
- package/lib/cjs/badge/constants.d.ts +10 -0
- package/lib/cjs/badge/constants.js +24 -0
- package/lib/cjs/badge/rtl.scss +8 -0
- package/lib/cjs/badge/variables.scss +43 -0
- package/lib/cjs/banner/banner.css +92 -0
- package/lib/cjs/banner/banner.scss +109 -0
- package/lib/cjs/banner/constants.d.ts +7 -0
- package/lib/cjs/banner/constants.js +20 -0
- package/lib/cjs/banner/foundation.d.ts +9 -0
- package/lib/cjs/banner/foundation.js +30 -0
- package/lib/cjs/banner/rtl.scss +20 -0
- package/lib/cjs/banner/variables.scss +27 -0
- package/lib/cjs/base/base.css +24 -0
- package/lib/cjs/base/base.scss +33 -0
- package/lib/cjs/base/constants.d.ts +3 -0
- package/lib/cjs/base/constants.js +22 -0
- package/lib/cjs/base/env.d.ts +1 -0
- package/lib/cjs/base/env.js +11 -0
- package/lib/cjs/base/foundation.d.ts +59 -0
- package/lib/cjs/base/foundation.js +144 -0
- package/lib/cjs/base/index.d.ts +5 -0
- package/lib/cjs/base/index.js +18 -0
- package/lib/cjs/breadcrumb/breadcrumb.css +109 -0
- package/lib/cjs/breadcrumb/breadcrumb.scss +120 -0
- package/lib/cjs/breadcrumb/constants.d.ts +7 -0
- package/lib/cjs/breadcrumb/constants.js +20 -0
- package/lib/cjs/breadcrumb/foundation.d.ts +24 -0
- package/lib/cjs/breadcrumb/foundation.js +52 -0
- package/lib/cjs/breadcrumb/itemFoundation.d.ts +22 -0
- package/lib/cjs/breadcrumb/itemFoundation.js +31 -0
- package/lib/cjs/breadcrumb/rtl.scss +33 -0
- package/lib/cjs/breadcrumb/variables.scss +19 -0
- package/lib/cjs/button/button.css +309 -0
- package/lib/cjs/button/button.scss +219 -0
- package/lib/cjs/button/constants.d.ts +6 -0
- package/lib/cjs/button/constants.js +28 -0
- package/lib/cjs/button/iconButton.css +160 -0
- package/lib/cjs/button/iconButton.scss +70 -0
- package/lib/cjs/button/rtl.scss +128 -0
- package/lib/cjs/button/splitButtonGroup.scss +32 -0
- package/lib/cjs/button/variables.scss +128 -0
- package/lib/cjs/calendar/calendar.css +592 -0
- package/lib/cjs/calendar/calendar.scss +520 -0
- package/lib/cjs/calendar/constants.d.ts +7 -0
- package/lib/cjs/calendar/constants.js +20 -0
- package/lib/cjs/calendar/eventUtil.d.ts +93 -0
- package/lib/cjs/calendar/eventUtil.js +431 -0
- package/lib/cjs/calendar/foundation.d.ts +99 -0
- package/lib/cjs/calendar/foundation.js +483 -0
- package/lib/cjs/calendar/rtl.scss +134 -0
- package/lib/cjs/calendar/variables.scss +105 -0
- package/lib/cjs/card/card.css +148 -0
- package/lib/cjs/card/card.scss +146 -0
- package/lib/cjs/card/constants.d.ts +8 -0
- package/lib/cjs/card/constants.js +21 -0
- package/lib/cjs/card/rtl.scss +43 -0
- package/lib/cjs/card/variables.scss +30 -0
- package/lib/cjs/cascader/cascader.css +438 -0
- package/lib/cjs/cascader/cascader.scss +436 -0
- package/lib/cjs/cascader/constants.d.ts +14 -0
- package/lib/cjs/cascader/constants.js +28 -0
- package/lib/cjs/cascader/foundation.d.ts +221 -0
- package/lib/cjs/cascader/foundation.js +1061 -0
- package/lib/cjs/cascader/rtl.scss +114 -0
- package/lib/cjs/cascader/util.d.ts +4 -0
- package/lib/cjs/cascader/util.js +114 -0
- package/lib/cjs/cascader/variables.scss +117 -0
- package/lib/cjs/checkbox/checkbox.css +311 -0
- package/lib/cjs/checkbox/checkbox.scss +363 -0
- package/lib/cjs/checkbox/checkboxFoundation.d.ts +49 -0
- package/lib/cjs/checkbox/checkboxFoundation.js +105 -0
- package/lib/cjs/checkbox/checkboxGroupFoundation.d.ts +17 -0
- package/lib/cjs/checkbox/checkboxGroupFoundation.js +103 -0
- package/lib/cjs/checkbox/constants.d.ts +27 -0
- package/lib/cjs/checkbox/constants.js +42 -0
- package/lib/cjs/checkbox/mixin.css +3 -0
- package/lib/cjs/checkbox/mixin.scss +0 -0
- package/lib/cjs/checkbox/rtl.scss +54 -0
- package/lib/cjs/checkbox/variables.scss +62 -0
- package/lib/cjs/collapse/collapse.css +78 -0
- package/lib/cjs/collapse/collapse.scss +77 -0
- package/lib/cjs/collapse/constants.d.ts +7 -0
- package/lib/cjs/collapse/constants.js +20 -0
- package/lib/cjs/collapse/foundation.d.ts +28 -0
- package/lib/cjs/collapse/foundation.js +77 -0
- package/lib/cjs/collapse/rtl.scss +26 -0
- package/lib/cjs/collapse/variables.scss +22 -0
- package/lib/cjs/collapsible/constants.d.ts +4 -0
- package/lib/cjs/collapsible/constants.js +16 -0
- package/lib/cjs/datePicker/_utils/formatter.d.ts +14 -0
- package/lib/cjs/datePicker/_utils/formatter.js +72 -0
- package/lib/cjs/datePicker/_utils/getDayOfWeek.d.ts +11 -0
- package/lib/cjs/datePicker/_utils/getDayOfWeek.js +31 -0
- package/lib/cjs/datePicker/_utils/getDefaultFormatToken.d.ts +9 -0
- package/lib/cjs/datePicker/_utils/getDefaultFormatToken.js +29 -0
- package/lib/cjs/datePicker/_utils/getFullDateOffset.d.ts +7 -0
- package/lib/cjs/datePicker/_utils/getFullDateOffset.js +35 -0
- package/lib/cjs/datePicker/_utils/getMonthTable.d.ts +12 -0
- package/lib/cjs/datePicker/_utils/getMonthTable.js +97 -0
- package/lib/cjs/datePicker/_utils/getMonthsInYear.d.ts +2 -0
- package/lib/cjs/datePicker/_utils/getMonthsInYear.js +26 -0
- package/lib/cjs/datePicker/_utils/getYears.d.ts +2 -0
- package/lib/cjs/datePicker/_utils/getYears.js +24 -0
- package/lib/cjs/datePicker/_utils/index.d.ts +13 -0
- package/lib/cjs/datePicker/_utils/index.js +117 -0
- package/lib/cjs/datePicker/_utils/isAfter.d.ts +1 -0
- package/lib/cjs/datePicker/_utils/isAfter.js +21 -0
- package/lib/cjs/datePicker/_utils/isBefore.d.ts +1 -0
- package/lib/cjs/datePicker/_utils/isBefore.js +21 -0
- package/lib/cjs/datePicker/_utils/isBetween.d.ts +11 -0
- package/lib/cjs/datePicker/_utils/isBetween.js +36 -0
- package/lib/cjs/datePicker/_utils/isDate.d.ts +1 -0
- package/lib/cjs/datePicker/_utils/isDate.js +13 -0
- package/lib/cjs/datePicker/_utils/isSameDay.d.ts +1 -0
- package/lib/cjs/datePicker/_utils/isSameDay.js +21 -0
- package/lib/cjs/datePicker/_utils/isTimestamp.d.ts +1 -0
- package/lib/cjs/datePicker/_utils/isTimestamp.js +19 -0
- package/lib/cjs/datePicker/_utils/isUnixTimestamp.d.ts +1 -0
- package/lib/cjs/datePicker/_utils/isUnixTimestamp.js +19 -0
- package/lib/cjs/datePicker/_utils/isValidDate.d.ts +1 -0
- package/lib/cjs/datePicker/_utils/isValidDate.js +13 -0
- package/lib/cjs/datePicker/_utils/isWithinInterval.d.ts +4 -0
- package/lib/cjs/datePicker/_utils/isWithinInterval.js +29 -0
- package/lib/cjs/datePicker/_utils/parser.d.ts +4 -0
- package/lib/cjs/datePicker/_utils/parser.js +46 -0
- package/lib/cjs/datePicker/constants.d.ts +50 -0
- package/lib/cjs/datePicker/constants.js +75 -0
- package/lib/cjs/datePicker/datePicker.css +810 -0
- package/lib/cjs/datePicker/datePicker.scss +1034 -0
- package/lib/cjs/datePicker/foundation.d.ts +409 -0
- package/lib/cjs/datePicker/foundation.js +1167 -0
- package/lib/cjs/datePicker/inputFoundation.d.ts +59 -0
- package/lib/cjs/datePicker/inputFoundation.js +125 -0
- package/lib/cjs/datePicker/monthFoundation.d.ts +73 -0
- package/lib/cjs/datePicker/monthFoundation.js +96 -0
- package/lib/cjs/datePicker/monthsGridFoundation.d.ts +218 -0
- package/lib/cjs/datePicker/monthsGridFoundation.js +954 -0
- package/lib/cjs/datePicker/rtl.scss +171 -0
- package/lib/cjs/datePicker/variables.scss +169 -0
- package/lib/cjs/datePicker/yearAndMonthFoundation.d.ts +56 -0
- package/lib/cjs/datePicker/yearAndMonthFoundation.js +52 -0
- package/lib/cjs/descriptions/constants.d.ts +9 -0
- package/lib/cjs/descriptions/constants.js +23 -0
- package/lib/cjs/descriptions/descriptions.css +191 -0
- package/lib/cjs/descriptions/descriptions.scss +150 -0
- package/lib/cjs/descriptions/rtl.scss +91 -0
- package/lib/cjs/descriptions/variables.scss +15 -0
- package/lib/cjs/dropdown/constants.d.ts +16 -0
- package/lib/cjs/dropdown/constants.js +32 -0
- package/lib/cjs/dropdown/dropdown.css +123 -0
- package/lib/cjs/dropdown/dropdown.scss +106 -0
- package/lib/cjs/dropdown/foundation.d.ts +8 -0
- package/lib/cjs/dropdown/foundation.js +24 -0
- package/lib/cjs/dropdown/rtl.scss +27 -0
- package/lib/cjs/dropdown/variables.scss +38 -0
- package/lib/cjs/empty/constants.d.ts +7 -0
- package/lib/cjs/empty/constants.js +20 -0
- package/lib/cjs/empty/empty.css +50 -0
- package/lib/cjs/empty/empty.scss +54 -0
- package/lib/cjs/empty/rtl.scss +15 -0
- package/lib/cjs/empty/variables.scss +8 -0
- package/lib/cjs/form/constants.d.ts +11 -0
- package/lib/cjs/form/constants.js +25 -0
- package/lib/cjs/form/form.css +250 -0
- package/lib/cjs/form/form.scss +273 -0
- package/lib/cjs/form/foundation.d.ts +86 -0
- package/lib/cjs/form/foundation.js +845 -0
- package/lib/cjs/form/interface.d.ts +121 -0
- package/lib/cjs/form/interface.js +7 -0
- package/lib/cjs/form/rtl.scss +89 -0
- package/lib/cjs/form/utils.d.ts +52 -0
- package/lib/cjs/form/utils.js +242 -0
- package/lib/cjs/form/variables.scss +44 -0
- package/lib/cjs/grid/constants.d.ts +4 -0
- package/lib/cjs/grid/constants.js +16 -0
- package/lib/cjs/grid/grid.css +6295 -0
- package/lib/cjs/grid/grid.scss +121 -0
- package/lib/cjs/grid/mixin.css +3 -0
- package/lib/cjs/grid/mixin.scss +115 -0
- package/lib/cjs/grid/rtl.scss +9 -0
- package/lib/cjs/grid/variables.scss +35 -0
- package/lib/cjs/icons/constants.d.ts +9 -0
- package/lib/cjs/icons/constants.js +24 -0
- package/lib/cjs/input/constants.d.ts +12 -0
- package/lib/cjs/input/constants.js +26 -0
- package/lib/cjs/input/foundation.d.ts +79 -0
- package/lib/cjs/input/foundation.js +379 -0
- package/lib/cjs/input/input.css +568 -0
- package/lib/cjs/input/input.scss +630 -0
- package/lib/cjs/input/rtl.scss +100 -0
- package/lib/cjs/input/textarea.css +222 -0
- package/lib/cjs/input/textarea.scss +188 -0
- package/lib/cjs/input/textareaFoundation.d.ts +63 -0
- package/lib/cjs/input/textareaFoundation.js +299 -0
- package/lib/cjs/input/util/calculateNodeHeight.d.ts +1 -0
- package/lib/cjs/input/util/calculateNodeHeight.js +101 -0
- package/lib/cjs/input/util/getSizingData.d.ts +6 -0
- package/lib/cjs/input/util/getSizingData.js +47 -0
- package/lib/cjs/input/variables.scss +109 -0
- package/lib/cjs/inputNumber/constants.d.ts +17 -0
- package/lib/cjs/inputNumber/constants.js +27 -0
- package/lib/cjs/inputNumber/foundation.d.ts +107 -0
- package/lib/cjs/inputNumber/foundation.js +692 -0
- package/lib/cjs/inputNumber/inputNumber.css +99 -0
- package/lib/cjs/inputNumber/inputNumber.scss +108 -0
- package/lib/cjs/inputNumber/rtl.scss +30 -0
- package/lib/cjs/inputNumber/variables.scss +23 -0
- package/lib/cjs/keyframes/rotate.css +11 -0
- package/lib/cjs/keyframes/rotate.scss +8 -0
- package/lib/cjs/layout/constants.d.ts +7 -0
- package/lib/cjs/layout/constants.js +20 -0
- package/lib/cjs/layout/layout.css +40 -0
- package/lib/cjs/layout/layout.scss +49 -0
- package/lib/cjs/layout/rtl.scss +8 -0
- package/lib/cjs/list/constants.d.ts +9 -0
- package/lib/cjs/list/constants.js +22 -0
- package/lib/cjs/list/list.css +121 -0
- package/lib/cjs/list/list.scss +125 -0
- package/lib/cjs/list/rtl.scss +39 -0
- package/lib/cjs/list/variables.scss +17 -0
- package/lib/cjs/modal/constants.d.ts +10 -0
- package/lib/cjs/modal/constants.js +23 -0
- package/lib/cjs/modal/modal.css +233 -0
- package/lib/cjs/modal/modal.scss +267 -0
- package/lib/cjs/modal/modalContentFoundation.d.ts +33 -0
- package/lib/cjs/modal/modalContentFoundation.js +76 -0
- package/lib/cjs/modal/modalFoundation.d.ts +68 -0
- package/lib/cjs/modal/modalFoundation.js +52 -0
- package/lib/cjs/modal/rtl.scss +48 -0
- package/lib/cjs/modal/variables.scss +69 -0
- package/lib/cjs/navigation/NavItem.d.ts +10 -0
- package/lib/cjs/navigation/NavItem.js +74 -0
- package/lib/cjs/navigation/constants.d.ts +21 -0
- package/lib/cjs/navigation/constants.js +38 -0
- package/lib/cjs/navigation/foundation.d.ts +86 -0
- package/lib/cjs/navigation/foundation.js +313 -0
- package/lib/cjs/navigation/itemFoundation.d.ts +45 -0
- package/lib/cjs/navigation/itemFoundation.js +84 -0
- package/lib/cjs/navigation/mixin.css +3 -0
- package/lib/cjs/navigation/mixin.scss +98 -0
- package/lib/cjs/navigation/navigation.css +758 -0
- package/lib/cjs/navigation/navigation.scss +683 -0
- package/lib/cjs/navigation/rtl.scss +132 -0
- package/lib/cjs/navigation/subNavFoundation.d.ts +39 -0
- package/lib/cjs/navigation/subNavFoundation.js +147 -0
- package/lib/cjs/navigation/variables.scss +132 -0
- package/lib/cjs/notification/constants.d.ts +14 -0
- package/lib/cjs/notification/constants.js +29 -0
- package/lib/cjs/notification/notification.css +154 -0
- package/lib/cjs/notification/notification.scss +168 -0
- package/lib/cjs/notification/notificationFoundation.d.ts +48 -0
- package/lib/cjs/notification/notificationFoundation.js +74 -0
- package/lib/cjs/notification/notificationListFoundation.d.ts +28 -0
- package/lib/cjs/notification/notificationListFoundation.js +61 -0
- package/lib/cjs/notification/rtl.scss +23 -0
- package/lib/cjs/notification/variables.scss +43 -0
- package/lib/cjs/overflowList/constants.d.ts +23 -0
- package/lib/cjs/overflowList/constants.js +44 -0
- package/lib/cjs/overflowList/foundation.d.ts +14 -0
- package/lib/cjs/overflowList/foundation.js +143 -0
- package/lib/cjs/overflowList/overflowList.css +23 -0
- package/lib/cjs/overflowList/overflowList.scss +20 -0
- package/lib/cjs/overflowList/rtl.scss +8 -0
- package/lib/cjs/pagination/constants.d.ts +12 -0
- package/lib/cjs/pagination/constants.js +26 -0
- package/lib/cjs/pagination/foundation.d.ts +52 -0
- package/lib/cjs/pagination/foundation.js +385 -0
- package/lib/cjs/pagination/pagination.css +155 -0
- package/lib/cjs/pagination/pagination.scss +158 -0
- package/lib/cjs/pagination/rtl.scss +18 -0
- package/lib/cjs/pagination/variables.scss +51 -0
- package/lib/cjs/popconfirm/constants.d.ts +13 -0
- package/lib/cjs/popconfirm/constants.js +27 -0
- package/lib/cjs/popconfirm/popconfirm.css +117 -0
- package/lib/cjs/popconfirm/popconfirm.scss +105 -0
- package/lib/cjs/popconfirm/popconfirmFoundation.d.ts +16 -0
- package/lib/cjs/popconfirm/popconfirmFoundation.js +47 -0
- package/lib/cjs/popconfirm/rtl.scss +60 -0
- package/lib/cjs/popconfirm/variables.scss +36 -0
- package/lib/cjs/popover/constants.d.ts +25 -0
- package/lib/cjs/popover/constants.js +45 -0
- package/lib/cjs/popover/popover.css +160 -0
- package/lib/cjs/popover/popover.scss +54 -0
- package/lib/cjs/popover/rtl.scss +7 -0
- package/lib/cjs/popover/variables.scss +28 -0
- package/lib/cjs/progress/constants.d.ts +14 -0
- package/lib/cjs/progress/constants.js +28 -0
- package/lib/cjs/progress/progress.css +106 -0
- package/lib/cjs/progress/progress.scss +105 -0
- package/lib/cjs/progress/rtl.scss +29 -0
- package/lib/cjs/progress/variables.scss +25 -0
- package/lib/cjs/radio/constants.d.ts +29 -0
- package/lib/cjs/radio/constants.js +44 -0
- package/lib/cjs/radio/mixin.css +3 -0
- package/lib/cjs/radio/mixin.scss +0 -0
- package/lib/cjs/radio/radio.css +346 -0
- package/lib/cjs/radio/radio.scss +379 -0
- package/lib/cjs/radio/radioFoundation.d.ts +7 -0
- package/lib/cjs/radio/radioFoundation.js +22 -0
- package/lib/cjs/radio/radioGroupFoundation.d.ts +16 -0
- package/lib/cjs/radio/radioGroupFoundation.js +91 -0
- package/lib/cjs/radio/radioInnerFoundation.d.ts +22 -0
- package/lib/cjs/radio/radioInnerFoundation.js +74 -0
- package/lib/cjs/radio/rtl.scss +78 -0
- package/lib/cjs/radio/variables.scss +91 -0
- package/lib/cjs/rating/constants.d.ts +7 -0
- package/lib/cjs/rating/constants.js +20 -0
- package/lib/cjs/rating/foundation.d.ts +28 -0
- package/lib/cjs/rating/foundation.js +202 -0
- package/lib/cjs/rating/rating.css +81 -0
- package/lib/cjs/rating/rating.scss +87 -0
- package/lib/cjs/rating/rtl.scss +21 -0
- package/lib/cjs/rating/variables.scss +14 -0
- package/lib/cjs/scrollList/constants.d.ts +12 -0
- package/lib/cjs/scrollList/constants.js +26 -0
- package/lib/cjs/scrollList/foundation.d.ts +3 -0
- package/lib/cjs/scrollList/foundation.js +17 -0
- package/lib/cjs/scrollList/itemFoundation.d.ts +74 -0
- package/lib/cjs/scrollList/itemFoundation.js +320 -0
- package/lib/cjs/scrollList/rtl.scss +47 -0
- package/lib/cjs/scrollList/scrollList.css +181 -0
- package/lib/cjs/scrollList/scrollList.scss +182 -0
- package/lib/cjs/scrollList/scrollTo.d.ts +3 -0
- package/lib/cjs/scrollList/scrollTo.js +35 -0
- package/lib/cjs/scrollList/variables.scss +48 -0
- package/lib/cjs/select/constants.d.ts +16 -0
- package/lib/cjs/select/constants.js +33 -0
- package/lib/cjs/select/foundation.d.ts +107 -0
- package/lib/cjs/select/foundation.js +1220 -0
- package/lib/cjs/select/mixin.css +3 -0
- package/lib/cjs/select/mixin.scss +6 -0
- package/lib/cjs/select/option.css +76 -0
- package/lib/cjs/select/option.scss +95 -0
- package/lib/cjs/select/optionFoundation.d.ts +21 -0
- package/lib/cjs/select/optionFoundation.js +42 -0
- package/lib/cjs/select/rtl.scss +93 -0
- package/lib/cjs/select/select.css +465 -0
- package/lib/cjs/select/select.scss +422 -0
- package/lib/cjs/select/variables.scss +100 -0
- package/lib/cjs/sideSheet/constants.d.ts +15 -0
- package/lib/cjs/sideSheet/constants.js +28 -0
- package/lib/cjs/sideSheet/rtl.scss +17 -0
- package/lib/cjs/sideSheet/sideSheet.css +143 -0
- package/lib/cjs/sideSheet/sideSheet.scss +171 -0
- package/lib/cjs/sideSheet/sideSheetFoundation.d.ts +55 -0
- package/lib/cjs/sideSheet/sideSheetFoundation.js +126 -0
- package/lib/cjs/sideSheet/variables.scss +16 -0
- package/lib/cjs/skeleton/constants.d.ts +5 -0
- package/lib/cjs/skeleton/constants.js +18 -0
- package/lib/cjs/skeleton/rtl.scss +8 -0
- package/lib/cjs/skeleton/skeleton.css +87 -0
- package/lib/cjs/skeleton/skeleton.scss +115 -0
- package/lib/cjs/skeleton/variables.scss +20 -0
- package/lib/cjs/slider/constants.d.ts +15 -0
- package/lib/cjs/slider/constants.js +28 -0
- package/lib/cjs/slider/foundation.d.ts +203 -0
- package/lib/cjs/slider/foundation.js +734 -0
- package/lib/cjs/slider/slider.css +192 -0
- package/lib/cjs/slider/slider.scss +234 -0
- package/lib/cjs/slider/variables.scss +60 -0
- package/lib/cjs/space/constants.d.ts +10 -0
- package/lib/cjs/space/constants.js +23 -0
- package/lib/cjs/space/rtl.scss +8 -0
- package/lib/cjs/space/space.css +50 -0
- package/lib/cjs/space/space.scss +58 -0
- package/lib/cjs/space/variables.scss +3 -0
- package/lib/cjs/spin/constants.d.ts +8 -0
- package/lib/cjs/spin/constants.js +23 -0
- package/lib/cjs/spin/foundation.d.ts +12 -0
- package/lib/cjs/spin/foundation.js +62 -0
- package/lib/cjs/spin/mixin.css +3 -0
- package/lib/cjs/spin/mixin.scss +5 -0
- package/lib/cjs/spin/rtl.scss +12 -0
- package/lib/cjs/spin/spin.css +104 -0
- package/lib/cjs/spin/spin.scss +104 -0
- package/lib/cjs/spin/variables.scss +18 -0
- package/lib/cjs/steps/bacisSteps.scss +344 -0
- package/lib/cjs/steps/constants.d.ts +5 -0
- package/lib/cjs/steps/constants.js +17 -0
- package/lib/cjs/steps/fillSteps.scss +193 -0
- package/lib/cjs/steps/mixin.css +3 -0
- package/lib/cjs/steps/mixin.scss +0 -0
- package/lib/cjs/steps/navSteps.scss +63 -0
- package/lib/cjs/steps/rtl.scss +46 -0
- package/lib/cjs/steps/steps.css +444 -0
- package/lib/cjs/steps/steps.scss +9 -0
- package/lib/cjs/steps/variables.scss +104 -0
- package/lib/cjs/switch/constants.d.ts +18 -0
- package/lib/cjs/switch/constants.js +31 -0
- package/lib/cjs/switch/foundation.d.ts +14 -0
- package/lib/cjs/switch/foundation.js +58 -0
- package/lib/cjs/switch/rtl.scss +103 -0
- package/lib/cjs/switch/switch.css +288 -0
- package/lib/cjs/switch/switch.scss +282 -0
- package/lib/cjs/switch/variables.scss +70 -0
- package/lib/cjs/table/bodyFoundation.d.ts +38 -0
- package/lib/cjs/table/bodyFoundation.js +164 -0
- package/lib/cjs/table/cellFoundation.d.ts +7 -0
- package/lib/cjs/table/cellFoundation.js +22 -0
- package/lib/cjs/table/constants.d.ts +77 -0
- package/lib/cjs/table/constants.js +110 -0
- package/lib/cjs/table/foundation.d.ts +351 -0
- package/lib/cjs/table/foundation.js +1167 -0
- package/lib/cjs/table/mixin.css +3 -0
- package/lib/cjs/table/mixin.scss +10 -0
- package/lib/cjs/table/operationPanel.scss +46 -0
- package/lib/cjs/table/rtl.scss +158 -0
- package/lib/cjs/table/table.css +559 -0
- package/lib/cjs/table/table.scss +552 -0
- package/lib/cjs/table/tableRowFoundation.d.ts +14 -0
- package/lib/cjs/table/tableRowFoundation.js +44 -0
- package/lib/cjs/table/tableSelectionCellFoundation.d.ts +13 -0
- package/lib/cjs/table/tableSelectionCellFoundation.js +24 -0
- package/lib/cjs/table/utils.d.ts +95 -0
- package/lib/cjs/table/utils.js +617 -0
- package/lib/cjs/table/variables.scss +84 -0
- package/lib/cjs/tabs/constants.d.ts +28 -0
- package/lib/cjs/tabs/constants.js +42 -0
- package/lib/cjs/tabs/foundation.d.ts +23 -0
- package/lib/cjs/tabs/foundation.js +95 -0
- package/lib/cjs/tabs/rtl.scss +123 -0
- package/lib/cjs/tabs/tabs.css +378 -0
- package/lib/cjs/tabs/tabs.scss +411 -0
- package/lib/cjs/tabs/variables.scss +115 -0
- package/lib/cjs/tag/constants.d.ts +10 -0
- package/lib/cjs/tag/constants.js +24 -0
- package/lib/cjs/tag/mixin.css +3 -0
- package/lib/cjs/tag/mixin.scss +21 -0
- package/lib/cjs/tag/rtl.scss +61 -0
- package/lib/cjs/tag/tag.css +444 -0
- package/lib/cjs/tag/tag.scss +181 -0
- package/lib/cjs/tag/variables.scss +48 -0
- package/lib/cjs/tagInput/constants.d.ts +8 -0
- package/lib/cjs/tagInput/constants.js +21 -0
- package/lib/cjs/tagInput/foundation.d.ts +53 -0
- package/lib/cjs/tagInput/foundation.js +267 -0
- package/lib/cjs/tagInput/rtl.scss +23 -0
- package/lib/cjs/tagInput/tagInput.css +171 -0
- package/lib/cjs/tagInput/tagInput.scss +192 -0
- package/lib/cjs/tagInput/utils/getSplitedArray.d.ts +7 -0
- package/lib/cjs/tagInput/utils/getSplitedArray.js +47 -0
- package/lib/cjs/tagInput/variables.scss +39 -0
- package/lib/cjs/timePicker/ComboxFoundation.d.ts +31 -0
- package/lib/cjs/timePicker/ComboxFoundation.js +193 -0
- package/lib/cjs/timePicker/constants.d.ts +23 -0
- package/lib/cjs/timePicker/constants.js +43 -0
- package/lib/cjs/timePicker/foundation.d.ts +53 -0
- package/lib/cjs/timePicker/foundation.js +465 -0
- package/lib/cjs/timePicker/inputFoundation.d.ts +18 -0
- package/lib/cjs/timePicker/inputFoundation.js +81 -0
- package/lib/cjs/timePicker/rtl.scss +30 -0
- package/lib/cjs/timePicker/timePicker.css +72 -0
- package/lib/cjs/timePicker/timePicker.scss +86 -0
- package/lib/cjs/timePicker/utils/index.d.ts +41 -0
- package/lib/cjs/timePicker/utils/index.js +191 -0
- package/lib/cjs/timePicker/utils/localeDate.d.ts +2 -0
- package/lib/cjs/timePicker/utils/localeDate.js +47 -0
- package/lib/cjs/timePicker/variables.scss +22 -0
- package/lib/cjs/timeline/constants.d.ts +10 -0
- package/lib/cjs/timeline/constants.js +23 -0
- package/lib/cjs/timeline/rtl.scss +92 -0
- package/lib/cjs/timeline/timeline.css +197 -0
- package/lib/cjs/timeline/timeline.scss +175 -0
- package/lib/cjs/timeline/variables.scss +46 -0
- package/lib/cjs/toast/constants.d.ts +14 -0
- package/lib/cjs/toast/constants.js +30 -0
- package/lib/cjs/toast/rtl.scss +16 -0
- package/lib/cjs/toast/toast.css +76 -0
- package/lib/cjs/toast/toast.scss +92 -0
- package/lib/cjs/toast/toastFoundation.d.ts +48 -0
- package/lib/cjs/toast/toastFoundation.js +72 -0
- package/lib/cjs/toast/toastListFoundation.d.ts +17 -0
- package/lib/cjs/toast/toastListFoundation.js +62 -0
- package/lib/cjs/toast/variables.scss +34 -0
- package/lib/cjs/tooltip/arrow.scss +141 -0
- package/lib/cjs/tooltip/constants.d.ts +22 -0
- package/lib/cjs/tooltip/constants.js +37 -0
- package/lib/cjs/tooltip/foundation.d.ts +99 -0
- package/lib/cjs/tooltip/foundation.js +819 -0
- package/lib/cjs/tooltip/rtl.scss +12 -0
- package/lib/cjs/tooltip/tooltip.css +203 -0
- package/lib/cjs/tooltip/tooltip.scss +91 -0
- package/lib/cjs/tooltip/variables.scss +31 -0
- package/lib/cjs/transfer/constants.d.ts +10 -0
- package/lib/cjs/transfer/constants.js +24 -0
- package/lib/cjs/transfer/foundation.d.ts +51 -0
- package/lib/cjs/transfer/foundation.js +314 -0
- package/lib/cjs/transfer/rtl.scss +31 -0
- package/lib/cjs/transfer/transfer.css +202 -0
- package/lib/cjs/transfer/transfer.scss +200 -0
- package/lib/cjs/transfer/transferUtlls.d.ts +4 -0
- package/lib/cjs/transfer/transferUtlls.js +128 -0
- package/lib/cjs/transfer/variables.scss +55 -0
- package/lib/cjs/tree/constants.d.ts +9 -0
- package/lib/cjs/tree/constants.js +23 -0
- package/lib/cjs/tree/foundation.d.ts +281 -0
- package/lib/cjs/tree/foundation.js +711 -0
- package/lib/cjs/tree/rtl.scss +59 -0
- package/lib/cjs/tree/tree.css +478 -0
- package/lib/cjs/tree/tree.scss +372 -0
- package/lib/cjs/tree/treeUtil.d.ts +79 -0
- package/lib/cjs/tree/treeUtil.js +804 -0
- package/lib/cjs/tree/variables.scss +54 -0
- package/lib/cjs/treeSelect/constants.d.ts +13 -0
- package/lib/cjs/treeSelect/constants.js +27 -0
- package/lib/cjs/treeSelect/foundation.d.ts +162 -0
- package/lib/cjs/treeSelect/foundation.js +792 -0
- package/lib/cjs/treeSelect/rtl.scss +62 -0
- package/lib/cjs/treeSelect/treeSelect.css +308 -0
- package/lib/cjs/treeSelect/treeSelect.scss +332 -0
- package/lib/cjs/treeSelect/variables.scss +90 -0
- package/lib/cjs/typography/constants.d.ts +10 -0
- package/lib/cjs/typography/constants.js +23 -0
- package/lib/cjs/typography/rtl.scss +34 -0
- package/lib/cjs/typography/typography.css +220 -0
- package/lib/cjs/typography/typography.scss +218 -0
- package/lib/cjs/typography/variables.scss +45 -0
- package/lib/cjs/upload/constants.d.ts +28 -0
- package/lib/cjs/upload/constants.js +49 -0
- package/lib/cjs/upload/foundation.d.ts +166 -0
- package/lib/cjs/upload/foundation.js +1067 -0
- package/lib/cjs/upload/rtl.scss +87 -0
- package/lib/cjs/upload/upload.css +493 -0
- package/lib/cjs/upload/upload.scss +522 -0
- package/lib/cjs/upload/utils.d.ts +6 -0
- package/lib/cjs/upload/utils.js +165 -0
- package/lib/cjs/upload/variables.scss +81 -0
- package/lib/cjs/utils/Event.d.ts +7 -0
- package/lib/cjs/utils/Event.js +91 -0
- package/lib/cjs/utils/Logger.d.ts +15 -0
- package/lib/cjs/utils/Logger.js +77 -0
- package/lib/cjs/utils/Store.d.ts +9 -0
- package/lib/cjs/utils/Store.js +60 -0
- package/lib/cjs/utils/array.d.ts +22 -0
- package/lib/cjs/utils/array.js +64 -0
- package/lib/cjs/utils/classnames.d.ts +4 -0
- package/lib/cjs/utils/classnames.js +54 -0
- package/lib/cjs/utils/date-fns-extra.d.ts +55 -0
- package/lib/cjs/utils/date-fns-extra.js +148 -0
- package/lib/cjs/utils/dom.d.ts +27 -0
- package/lib/cjs/utils/dom.js +92 -0
- package/lib/cjs/utils/function.d.ts +4 -0
- package/lib/cjs/utils/function.js +15 -0
- package/lib/cjs/utils/getDataAttr.d.ts +1 -0
- package/lib/cjs/utils/getDataAttr.js +27 -0
- package/lib/cjs/utils/getHighlight.d.ts +45 -0
- package/lib/cjs/utils/getHighlight.js +211 -0
- package/lib/cjs/utils/getMotionObjFromProps.d.ts +26 -0
- package/lib/cjs/utils/getMotionObjFromProps.js +77 -0
- package/lib/cjs/utils/index.d.ts +2 -0
- package/lib/cjs/utils/index.js +41 -0
- package/lib/cjs/utils/isBothNaN.d.ts +8 -0
- package/lib/cjs/utils/isBothNaN.js +25 -0
- package/lib/cjs/utils/isElement.d.ts +1 -0
- package/lib/cjs/utils/isElement.js +21 -0
- package/lib/cjs/utils/isNullOrUndefined.d.ts +6 -0
- package/lib/cjs/utils/isNullOrUndefined.js +18 -0
- package/lib/cjs/utils/isNumber.d.ts +1 -0
- package/lib/cjs/utils/isNumber.js +13 -0
- package/lib/cjs/utils/isObject.d.ts +1 -0
- package/lib/cjs/utils/isObject.js +13 -0
- package/lib/cjs/utils/isPromise.d.ts +1 -0
- package/lib/cjs/utils/isPromise.js +17 -0
- package/lib/cjs/utils/isString.d.ts +1 -0
- package/lib/cjs/utils/isString.js +13 -0
- package/lib/cjs/utils/keyCode.d.ts +427 -0
- package/lib/cjs/utils/keyCode.js +542 -0
- package/lib/cjs/utils/log.d.ts +2 -0
- package/lib/cjs/utils/log.js +26 -0
- package/lib/cjs/utils/number.d.ts +10 -0
- package/lib/cjs/utils/number.js +29 -0
- package/lib/cjs/utils/object.d.ts +17 -0
- package/lib/cjs/utils/object.js +174 -0
- package/lib/cjs/utils/set.d.ts +7 -0
- package/lib/cjs/utils/set.js +44 -0
- package/lib/cjs/utils/shallowEqualObjects.d.ts +5 -0
- package/lib/cjs/utils/shallowEqualObjects.js +41 -0
- package/lib/cjs/utils/touchPolyfill.d.ts +2 -0
- package/lib/cjs/utils/touchPolyfill.js +50 -0
- package/lib/cjs/utils/type.d.ts +31 -0
- package/lib/cjs/utils/type.js +7 -0
- package/lib/cjs/utils/uuid.d.ts +3 -0
- package/lib/cjs/utils/uuid.js +29 -0
- package/lib/cjs/utils/warning.d.ts +1 -0
- package/lib/cjs/utils/warning.js +15 -0
- package/lib/es/anchor/foundation.js +8 -5
- package/lib/es/autoComplete/autoComplete.css +5 -5
- package/lib/es/autoComplete/autoComplete.scss +3 -2
- package/lib/es/autoComplete/foundation.js +8 -5
- package/lib/es/base/foundation.js +12 -12
- package/lib/es/cascader/foundation.js +25 -17
- package/lib/es/cascader/util.js +5 -3
- package/lib/es/datePicker/_utils/getFullDateOffset.js +2 -2
- package/lib/es/datePicker/foundation.js +15 -10
- package/lib/es/datePicker/monthsGridFoundation.js +8 -6
- package/lib/es/form/foundation.js +9 -6
- package/lib/es/form/utils.js +2 -2
- package/lib/es/input/foundation.js +15 -10
- package/lib/es/input/input.css +3 -2
- package/lib/es/input/input.scss +2 -0
- package/lib/es/input/textareaFoundation.js +17 -14
- package/lib/es/input/util/getSizingData.js +3 -3
- package/lib/es/input/variables.scss +1 -1
- package/lib/es/inputNumber/foundation.js +13 -11
- package/lib/es/navigation/foundation.js +2 -2
- package/lib/es/notification/notificationFoundation.js +2 -2
- package/lib/es/overflowList/foundation.js +6 -3
- package/lib/es/scrollList/itemFoundation.js +17 -7
- package/lib/es/select/foundation.js +9 -6
- package/lib/es/sideSheet/sideSheetFoundation.js +8 -7
- package/lib/es/table/bodyFoundation.js +14 -8
- package/lib/es/table/foundation.js +87 -67
- package/lib/es/table/utils.js +65 -42
- package/lib/es/tabs/foundation.js +2 -2
- package/lib/es/tagInput/foundation.js +10 -7
- package/lib/es/tagInput/utils/getSplitedArray.js +6 -4
- package/lib/es/timePicker/foundation.js +6 -4
- package/lib/es/timePicker/utils/index.js +5 -5
- package/lib/es/toast/toastFoundation.js +2 -2
- package/lib/es/tooltip/foundation.js +15 -16
- package/lib/es/transfer/foundation.js +2 -2
- package/lib/es/transfer/transferUtlls.js +4 -4
- package/lib/es/tree/foundation.js +14 -14
- package/lib/es/tree/treeUtil.js +21 -18
- package/lib/es/treeSelect/foundation.js +16 -9
- package/lib/es/utils/classnames.js +9 -5
- package/lib/es/utils/getHighlight.js +2 -3
- package/lib/es/utils/getMotionObjFromProps.js +6 -5
- package/lib/es/utils/log.js +2 -2
- package/lib/es/utils/object.js +31 -21
- package/lib/es/utils/set.js +2 -2
- package/navigation/foundation.ts +1 -1
- package/notification/notificationFoundation.ts +1 -1
- package/overflowList/foundation.ts +1 -1
- package/package.json +6 -4
- package/scrollList/itemFoundation.ts +1 -1
- package/select/foundation.ts +1 -1
- package/sideSheet/sideSheetFoundation.ts +1 -1
- package/table/bodyFoundation.ts +1 -1
- package/table/foundation.ts +1 -1
- package/table/utils.ts +1 -1
- package/tabs/foundation.ts +1 -1
- package/tagInput/foundation.ts +1 -1
- package/tagInput/utils/getSplitedArray.ts +1 -1
- package/timePicker/foundation.ts +1 -1
- package/timePicker/utils/index.ts +1 -1
- package/toast/toastFoundation.ts +1 -1
- package/tooltip/foundation.ts +1 -1
- package/transfer/foundation.ts +1 -1
- package/transfer/transferUtlls.ts +1 -1
- package/tree/foundation.ts +1 -1
- package/tree/treeUtil.ts +1 -1
- package/treeSelect/foundation.ts +1 -1
- package/utils/classnames.ts +1 -1
- package/utils/getHighlight.ts +1 -1
- package/utils/getMotionObjFromProps.ts +1 -1
- package/utils/log.ts +1 -1
- package/utils/object.ts +1 -1
- package/utils/set.ts +1 -1
- package/babel.config.js +0 -33
- package/icons/icons.scss +0 -39
- package/icons/variables.scss +0 -7
- package/lib/es/icons/icons.css +0 -40
- package/lib/es/icons/icons.scss +0 -39
- package/lib/es/icons/variables.scss +0 -7
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.arrayAdd = arrayAdd;
|
|
12
|
+
exports.assignColumnKeys = assignColumnKeys;
|
|
13
|
+
exports.cloneDeep = cloneDeep;
|
|
14
|
+
exports.equalWith = equalWith;
|
|
15
|
+
exports.expandBtnShouldInRow = expandBtnShouldInRow;
|
|
16
|
+
exports.filterColumns = filterColumns;
|
|
17
|
+
exports.findColumn = findColumn;
|
|
18
|
+
exports.flattenColumns = flattenColumns;
|
|
19
|
+
exports.genExpandedRowKey = genExpandedRowKey;
|
|
20
|
+
exports.getAllDisabledRowKeys = getAllDisabledRowKeys;
|
|
21
|
+
exports.getAllLevelColumns = getAllLevelColumns;
|
|
22
|
+
exports.getColumnByLevelIndex = getColumnByLevelIndex;
|
|
23
|
+
exports.getColumnKey = getColumnKey;
|
|
24
|
+
exports.getColumnsByLevel = getColumnsByLevel;
|
|
25
|
+
exports.getDefaultVirtualizedRowConfig = getDefaultVirtualizedRowConfig;
|
|
26
|
+
exports.getRecord = getRecord;
|
|
27
|
+
exports.getRecordChildren = getRecordChildren;
|
|
28
|
+
exports.getRecordKey = getRecordKey;
|
|
29
|
+
exports.getScrollbarColumnWidth = getScrollbarColumnWidth;
|
|
30
|
+
exports.isAnyFixed = isAnyFixed;
|
|
31
|
+
exports.isAnyFixedRight = isAnyFixedRight;
|
|
32
|
+
exports.isDisabled = isDisabled;
|
|
33
|
+
exports.isExpanded = isExpanded;
|
|
34
|
+
exports.isExpandedColumn = isExpandedColumn;
|
|
35
|
+
exports.isFirstFixedRight = isFirstFixedRight;
|
|
36
|
+
exports.isFixed = isFixed;
|
|
37
|
+
exports.isFixedLeft = isFixedLeft;
|
|
38
|
+
exports.isFixedRight = isFixedRight;
|
|
39
|
+
exports.isInnerColumnKey = isInnerColumnKey;
|
|
40
|
+
exports.isLastLeftFixed = isLastLeftFixed;
|
|
41
|
+
exports.isScrollbarColumn = isScrollbarColumn;
|
|
42
|
+
exports.isSelected = isSelected;
|
|
43
|
+
exports.isSelectionColumn = isSelectionColumn;
|
|
44
|
+
exports.mergeColumns = mergeColumns;
|
|
45
|
+
exports.mergeQueries = mergeQueries;
|
|
46
|
+
exports.sliceColumnsByLevel = sliceColumnsByLevel;
|
|
47
|
+
exports.warnIfNoDataIndex = warnIfNoDataIndex;
|
|
48
|
+
exports.withResizeWidth = withResizeWidth;
|
|
49
|
+
|
|
50
|
+
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
51
|
+
|
|
52
|
+
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
53
|
+
|
|
54
|
+
var _every = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/every"));
|
|
55
|
+
|
|
56
|
+
var _includes2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
57
|
+
|
|
58
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
59
|
+
|
|
60
|
+
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
61
|
+
|
|
62
|
+
var _some2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/some"));
|
|
63
|
+
|
|
64
|
+
var _findIndex2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find-index"));
|
|
65
|
+
|
|
66
|
+
var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
|
|
67
|
+
|
|
68
|
+
var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
|
|
69
|
+
|
|
70
|
+
var _toString2 = _interopRequireDefault(require("lodash/toString"));
|
|
71
|
+
|
|
72
|
+
var _includes3 = _interopRequireDefault(require("lodash/includes"));
|
|
73
|
+
|
|
74
|
+
var _some3 = _interopRequireDefault(require("lodash/some"));
|
|
75
|
+
|
|
76
|
+
var _findIndex3 = _interopRequireDefault(require("lodash/findIndex"));
|
|
77
|
+
|
|
78
|
+
var _each2 = _interopRequireDefault(require("lodash/each"));
|
|
79
|
+
|
|
80
|
+
var _clone2 = _interopRequireDefault(require("lodash/clone"));
|
|
81
|
+
|
|
82
|
+
var _map2 = _interopRequireDefault(require("lodash/map"));
|
|
83
|
+
|
|
84
|
+
var _find2 = _interopRequireDefault(require("lodash/find"));
|
|
85
|
+
|
|
86
|
+
var _filter2 = _interopRequireDefault(require("lodash/filter"));
|
|
87
|
+
|
|
88
|
+
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
89
|
+
|
|
90
|
+
var _isEqualWith2 = _interopRequireDefault(require("lodash/isEqualWith"));
|
|
91
|
+
|
|
92
|
+
var _cloneDeepWith2 = _interopRequireDefault(require("lodash/cloneDeepWith"));
|
|
93
|
+
|
|
94
|
+
var _constants = require("./constants");
|
|
95
|
+
|
|
96
|
+
var _isNullOrUndefined = _interopRequireDefault(require("../utils/isNullOrUndefined"));
|
|
97
|
+
|
|
98
|
+
var _Logger = _interopRequireDefault(require("../utils/Logger"));
|
|
99
|
+
|
|
100
|
+
function cloneDeep(value, customizer) {
|
|
101
|
+
return (0, _cloneDeepWith2.default)(value, v => {
|
|
102
|
+
if (typeof v === 'function') {
|
|
103
|
+
return v;
|
|
104
|
+
} else if (typeof customizer === 'function') {
|
|
105
|
+
return customizer(v);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return undefined;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function equalWith(value, other, customizer) {
|
|
113
|
+
return (0, _isEqualWith2.default)(value, other, function (objVal, othVal) {
|
|
114
|
+
if (typeof objVal === 'function' && typeof othVal === 'function') {
|
|
115
|
+
return (0, _toString2.default)(objVal) === (0, _toString2.default)(othVal);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (typeof customizer === 'function') {
|
|
119
|
+
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
120
|
+
rest[_key - 2] = arguments[_key];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return customizer(objVal, othVal, ...rest);
|
|
124
|
+
} // If customizer returns undefined, comparisons are handled by isEqual instead
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
return undefined;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function getColumnKey(column, keyPropNames) {
|
|
132
|
+
keyPropNames = (0, _isArray.default)(keyPropNames) ? keyPropNames : ['key', 'dataIndex'];
|
|
133
|
+
let key = null;
|
|
134
|
+
(0, _each2.default)(keyPropNames, propName => {
|
|
135
|
+
key = (0, _get2.default)(column, propName);
|
|
136
|
+
|
|
137
|
+
if (key != null) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return undefined;
|
|
142
|
+
});
|
|
143
|
+
return key;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function mergeColumns() {
|
|
147
|
+
let oldColumns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
148
|
+
let newColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
149
|
+
let keyPropNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
150
|
+
let deep = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
151
|
+
const finalColumns = [];
|
|
152
|
+
const clone = deep ? cloneDeep : _clone2.default;
|
|
153
|
+
(0, _map2.default)(newColumns, newColumn => {
|
|
154
|
+
newColumn = (0, _assign.default)({}, newColumn);
|
|
155
|
+
const key = getColumnKey(newColumn, keyPropNames);
|
|
156
|
+
const oldColumn = key != null && (0, _find2.default)(oldColumns, item => getColumnKey(item, keyPropNames) === key);
|
|
157
|
+
|
|
158
|
+
if (oldColumn) {
|
|
159
|
+
finalColumns.push(clone((0, _assign.default)((0, _assign.default)({}, oldColumn), newColumn)));
|
|
160
|
+
} else {
|
|
161
|
+
finalColumns.push(clone(newColumn));
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
return finalColumns;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
*
|
|
168
|
+
* @param {Array<number>} arr
|
|
169
|
+
* @param {number} [beginIndex] begin index, included
|
|
170
|
+
* @param {number} [endIndex] end index, not included
|
|
171
|
+
* @returns {number}
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
function arrayAdd() {
|
|
176
|
+
let arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
177
|
+
let beginIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
178
|
+
let endIndex = arguments.length > 2 ? arguments[2] : undefined;
|
|
179
|
+
beginIndex = beginIndex < 0 || typeof beginIndex !== 'number' ? 0 : beginIndex;
|
|
180
|
+
endIndex = endIndex > arr.length || typeof endIndex !== 'number' ? arr.length : endIndex;
|
|
181
|
+
let result = 0;
|
|
182
|
+
(0, _each2.default)(arr, (value, index) => {
|
|
183
|
+
if (index >= beginIndex && index < endIndex) {
|
|
184
|
+
result += typeof value === 'number' && !isNaN(value) ? value : 0;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
return result;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function isLastLeftFixed(columns, column) {
|
|
191
|
+
let checkKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ['key'];
|
|
192
|
+
const leftFixedColumns = (0, _filter2.default)(columns, col => col.fixed === true || col.fixed === 'left');
|
|
193
|
+
const index = (0, _findIndex3.default)(leftFixedColumns, col => (0, _every.default)(checkKeys).call(checkKeys, key => col[key] != null && col[key] === column[key]));
|
|
194
|
+
return leftFixedColumns.length > 0 && index === leftFixedColumns.length - 1;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function isFirstFixedRight(columns, column) {
|
|
198
|
+
let checkKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ['key'];
|
|
199
|
+
const rightFixedColumns = (0, _filter2.default)(columns, col => col.fixed === 'right');
|
|
200
|
+
const index = (0, _findIndex3.default)(rightFixedColumns, col => (0, _every.default)(checkKeys).call(checkKeys, key => col[key] != null && col[key] === column[key]));
|
|
201
|
+
return rightFixedColumns.length > 0 && index === 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function isAnyFixed(columns) {
|
|
205
|
+
let fixedSet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['left', true, 'right'];
|
|
206
|
+
|
|
207
|
+
if (typeof fixedSet === 'string' || typeof fixedSet === 'boolean') {
|
|
208
|
+
fixedSet = [fixedSet];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return fixedSet.length > 0 && (0, _some3.default)(columns, col => (0, _includes2.default)(fixedSet).call(fixedSet, col.fixed));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function isAnyFixedRight(columns) {
|
|
215
|
+
return (0, _some3.default)(columns, col => col.fixed === 'right');
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function isFixedLeft(column) {
|
|
219
|
+
var _context;
|
|
220
|
+
|
|
221
|
+
return (0, _includes2.default)(_context = ['left', true]).call(_context, (0, _get2.default)(column, 'fixed'));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function isFixedRight(column) {
|
|
225
|
+
var _context2;
|
|
226
|
+
|
|
227
|
+
return (0, _includes2.default)(_context2 = ['right']).call(_context2, (0, _get2.default)(column, 'fixed'));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function isFixed(column) {
|
|
231
|
+
return isFixedLeft(column) || isFixedRight(column);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function isInnerColumnKey(key) {
|
|
235
|
+
var _context3;
|
|
236
|
+
|
|
237
|
+
return (0, _includes2.default)(_context3 = [_constants.strings.DEFAULT_KEY_COLUMN_EXPAND, _constants.strings.DEFAULT_KEY_COLUMN_SCROLLBAR, _constants.strings.DEFAULT_KEY_COLUMN_SELECTION]).call(_context3, key);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function isExpandedColumn(column) {
|
|
241
|
+
return (0, _get2.default)(column, 'key') === _constants.strings.DEFAULT_KEY_COLUMN_EXPAND;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function isScrollbarColumn(column) {
|
|
245
|
+
return (0, _get2.default)(column, 'key') === _constants.strings.DEFAULT_KEY_COLUMN_SCROLLBAR;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function isSelectionColumn(column) {
|
|
249
|
+
return (0, _get2.default)(column, 'key') === _constants.strings.DEFAULT_KEY_COLUMN_SELECTION;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function filterColumns(columns) {
|
|
253
|
+
let ignoreKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [_constants.strings.DEFAULT_KEY_COLUMN_SCROLLBAR];
|
|
254
|
+
return (0, _filter2.default)(columns, col => !(0, _includes2.default)(ignoreKeys).call(ignoreKeys, col.key));
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* get width of scroll bar
|
|
258
|
+
* @param {Array} columns
|
|
259
|
+
* @returns {Number|undefined}
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
function getScrollbarColumnWidth() {
|
|
264
|
+
let columns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
265
|
+
const len = columns.length;
|
|
266
|
+
|
|
267
|
+
if (len) {
|
|
268
|
+
const lastColumn = columns[len - 1];
|
|
269
|
+
|
|
270
|
+
if ((0, _get2.default)(lastColumn, 'key') === _constants.strings.DEFAULT_KEY_COLUMN_SCROLLBAR) {
|
|
271
|
+
return (0, _get2.default)(lastColumn, 'width', 0);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
function getRecordKey(record, rowKey) {
|
|
277
|
+
if (rowKey === undefined) {
|
|
278
|
+
rowKey = 'key';
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
return typeof rowKey === 'function' ? rowKey(record) : (0, _get2.default)(record, rowKey);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Determine whether the expandedRowKeys includes a key (rowKey will be added to expandedRowKeys when the expand button is clicked)
|
|
285
|
+
* @param {*} expandedRowKeys
|
|
286
|
+
* @param {*} key
|
|
287
|
+
*/
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
function isExpanded(expandedRowKeys, key) {
|
|
291
|
+
return key != null && (0, _includes3.default)(expandedRowKeys, key);
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Determine whether the selectedKeysSet includes the key
|
|
295
|
+
* @param {Set} selectedRowKeysSet
|
|
296
|
+
* @param {String} key
|
|
297
|
+
*/
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
function isSelected(selectedRowKeysSet, key) {
|
|
301
|
+
return key !== null && selectedRowKeysSet.has(key);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Whether the key is included in the disabledRowKeysSet
|
|
305
|
+
* @param {Set} disabledRowKeysSet
|
|
306
|
+
* @param {String} key
|
|
307
|
+
*/
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
function isDisabled(disabledRowKeysSet, key) {
|
|
311
|
+
return key !== null && disabledRowKeysSet.has(key);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function getRecord(data, recordKey, rowKey) {
|
|
315
|
+
if (rowKey === undefined) {
|
|
316
|
+
rowKey = 'key';
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
return (0, _find2.default)(data, record => recordKey != null && recordKey !== '' && getRecordKey(record, rowKey) === recordKey);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
function getRecordChildren(record, childrenRecordName) {
|
|
323
|
+
if (childrenRecordName === undefined) {
|
|
324
|
+
childrenRecordName = 'children';
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return (0, _get2.default)(record, childrenRecordName);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function genExpandedRowKey() {
|
|
331
|
+
let recordKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
332
|
+
let suffix = arguments.length > 1 ? arguments[1] : undefined;
|
|
333
|
+
|
|
334
|
+
if (suffix === undefined) {
|
|
335
|
+
suffix = '__expanded_row';
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
return recordKey + suffix;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function getDefaultVirtualizedRowConfig() {
|
|
342
|
+
let size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
343
|
+
let sectionRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
344
|
+
const config = {};
|
|
345
|
+
|
|
346
|
+
if (size === 'small') {
|
|
347
|
+
config.height = sectionRow ? _constants.numbers.DEFAULT_VIRTUALIZED_SECTION_ROW_SMALL_HEIGHT : _constants.numbers.DEFAULT_VIRTUALIZED_ROW_SMALL_HEIGHT;
|
|
348
|
+
config.minHeight = _constants.numbers.DEFAULT_VIRTUALIZED_ROW_SMALL_MIN_HEIGHT;
|
|
349
|
+
} else if (size === 'middle') {
|
|
350
|
+
config.height = sectionRow ? _constants.numbers.DEFAULT_VIRTUALIZED_SECTION_ROW_MIDDLE_HEIGHT : _constants.numbers.DEFAULT_VIRTUALIZED_ROW_MIDDLE_HEIGHT;
|
|
351
|
+
config.minHeight = _constants.numbers.DEFAULT_VIRTUALIZED_ROW_MIDDLE_MIN_HEIGHT;
|
|
352
|
+
} else {
|
|
353
|
+
config.height = sectionRow ? _constants.numbers.DEFAULT_VIRTUALIZED_SECTION_ROW_HEIGHT : _constants.numbers.DEFAULT_VIRTUALIZED_ROW_HEIGHT;
|
|
354
|
+
config.minHeight = _constants.numbers.DEFAULT_VIRTUALIZED_ROW_MIN_HEIGHT;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return config;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
function flattenColumns(cols) {
|
|
361
|
+
let childrenColumnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children';
|
|
362
|
+
const list = [];
|
|
363
|
+
|
|
364
|
+
if ((0, _isArray.default)(cols) && cols.length) {
|
|
365
|
+
for (const col of cols) {
|
|
366
|
+
if ((0, _isArray.default)(col[childrenColumnName]) && col[childrenColumnName].length) {
|
|
367
|
+
list.push(...flattenColumns(col[childrenColumnName], childrenColumnName));
|
|
368
|
+
} else {
|
|
369
|
+
warnIfNoDataIndex(col);
|
|
370
|
+
list.push(col);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return list;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
function assignColumnKeys(columns) {
|
|
379
|
+
let childrenColumnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children';
|
|
380
|
+
let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
381
|
+
const sameLevelCols = [];
|
|
382
|
+
(0, _each2.default)(columns, (column, index) => {
|
|
383
|
+
if (column.key == null) {
|
|
384
|
+
var _context4;
|
|
385
|
+
|
|
386
|
+
column.key = (0, _concat.default)(_context4 = "".concat(level, "-")).call(_context4, index);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if ((0, _isArray.default)(column[childrenColumnName]) && column[childrenColumnName].length) {
|
|
390
|
+
sameLevelCols.push(...column[childrenColumnName]);
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
if (sameLevelCols.length) {
|
|
395
|
+
assignColumnKeys(sameLevelCols, childrenColumnName, level + 1);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return columns;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
function sliceColumnsByLevel(columns) {
|
|
402
|
+
let targetLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
403
|
+
let childrenColumnName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'children';
|
|
404
|
+
let currentLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
405
|
+
const slicedColumns = [];
|
|
406
|
+
|
|
407
|
+
if ((0, _isArray.default)(columns) && columns.length && currentLevel <= targetLevel) {
|
|
408
|
+
(0, _forEach.default)(columns).call(columns, column => {
|
|
409
|
+
const children = column[childrenColumnName];
|
|
410
|
+
|
|
411
|
+
if ((0, _isArray.default)(children) && children.length && currentLevel < targetLevel) {
|
|
412
|
+
slicedColumns.push(...sliceColumnsByLevel(children, targetLevel, childrenColumnName, currentLevel + 1));
|
|
413
|
+
} else {
|
|
414
|
+
slicedColumns.push(column);
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
return slicedColumns;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function getColumnsByLevel(columns) {
|
|
423
|
+
let targetLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
424
|
+
let targetColumns = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
425
|
+
let currentLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
426
|
+
let childrenColumnName = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'children';
|
|
427
|
+
|
|
428
|
+
if ((0, _isArray.default)(columns) && columns.length) {
|
|
429
|
+
if (targetLevel === currentLevel) {
|
|
430
|
+
targetColumns.push(...columns);
|
|
431
|
+
} else {
|
|
432
|
+
(0, _forEach.default)(columns).call(columns, column => {
|
|
433
|
+
getColumnsByLevel(column[childrenColumnName], targetLevel, targetColumns, currentLevel + 1, childrenColumnName);
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
return targetColumns;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
function getAllLevelColumns(columns) {
|
|
442
|
+
let childrenColumnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'children';
|
|
443
|
+
const all = [];
|
|
444
|
+
|
|
445
|
+
if ((0, _isArray.default)(columns) && columns.length) {
|
|
446
|
+
all.push([...columns]);
|
|
447
|
+
const sameLevelColumns = [];
|
|
448
|
+
(0, _forEach.default)(columns).call(columns, column => {
|
|
449
|
+
const children = column[childrenColumnName];
|
|
450
|
+
|
|
451
|
+
if ((0, _isArray.default)(children) && children.length) {
|
|
452
|
+
sameLevelColumns.push(...children);
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
|
|
456
|
+
if (sameLevelColumns.length) {
|
|
457
|
+
all.push(sameLevelColumns);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
return all;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
function getColumnByLevelIndex(columns, index) {
|
|
465
|
+
let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
466
|
+
let childrenColumnName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'children';
|
|
467
|
+
const allLevelColumns = getAllLevelColumns(columns, childrenColumnName);
|
|
468
|
+
return allLevelColumns[level][index];
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function findColumn(columns, column) {
|
|
472
|
+
let childrenColumnName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'children';
|
|
473
|
+
let found;
|
|
474
|
+
(0, _each2.default)(columns, item => {
|
|
475
|
+
if (item && item.key != null && !found) {
|
|
476
|
+
if (item.key === column.key) {
|
|
477
|
+
found = item;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
if (item && (0, _isArray.default)(item[childrenColumnName]) && !found) {
|
|
482
|
+
found = findColumn(item[childrenColumnName], column, childrenColumnName);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
if (found) {
|
|
486
|
+
return false;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
return undefined;
|
|
490
|
+
});
|
|
491
|
+
return found;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
function expandBtnShouldInRow(props) {
|
|
495
|
+
const {
|
|
496
|
+
expandedRowRender,
|
|
497
|
+
dataSource,
|
|
498
|
+
hideExpandedColumn,
|
|
499
|
+
childrenRecordName,
|
|
500
|
+
rowExpandable
|
|
501
|
+
} = props;
|
|
502
|
+
const hasExpandedRowRender = typeof expandedRowRender === 'function';
|
|
503
|
+
return hideExpandedColumn && hasExpandedRowRender || !hasExpandedRowRender && (0, _some2.default)(dataSource).call(dataSource, record => {
|
|
504
|
+
const children = (0, _get2.default)(record, childrenRecordName);
|
|
505
|
+
|
|
506
|
+
if ((0, _isArray.default)(children) && children.length || rowExpandable(record)) {
|
|
507
|
+
return true;
|
|
508
|
+
} else {
|
|
509
|
+
return false;
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* merge query
|
|
515
|
+
* @param {*} query
|
|
516
|
+
* @param {*} queries
|
|
517
|
+
*/
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
function mergeQueries(query) {
|
|
521
|
+
let queries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
522
|
+
|
|
523
|
+
let _mergedQuery;
|
|
524
|
+
|
|
525
|
+
const idx = (0, _findIndex2.default)(queries).call(queries, item => {
|
|
526
|
+
if (query.dataIndex === item.dataIndex) {
|
|
527
|
+
_mergedQuery = (0, _assign.default)((0, _assign.default)({}, item), query);
|
|
528
|
+
return true;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return false;
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
if (idx > -1) {
|
|
535
|
+
(0, _splice.default)(queries).call(queries, idx, 1, _mergedQuery);
|
|
536
|
+
} else {
|
|
537
|
+
queries.push(_mergedQuery);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
return [...queries];
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Replace the width of the newColumns column with the width of the column after resize
|
|
544
|
+
* @param {Object[]} columns columns retain the column width after resize
|
|
545
|
+
* @param {Object[]} newColumns
|
|
546
|
+
*/
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
function withResizeWidth(columns, newColumns) {
|
|
550
|
+
const _newColumns = cloneDeep(newColumns);
|
|
551
|
+
|
|
552
|
+
for (const column of columns) {
|
|
553
|
+
if (!(0, _isNullOrUndefined.default)(column.width)) {
|
|
554
|
+
const currentColumn = column.key;
|
|
555
|
+
const columnIndex = (0, _findIndex3.default)(_newColumns, item => item.key === currentColumn);
|
|
556
|
+
|
|
557
|
+
if (columnIndex !== -1) {
|
|
558
|
+
_newColumns[columnIndex].width = (0, _get2.default)(column, 'width');
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return _newColumns;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Pure function version of the same function in table foundation
|
|
567
|
+
* This is not accessible in getDerivedStateFromProps, so fork one out
|
|
568
|
+
*/
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
function getAllDisabledRowKeys(_ref) {
|
|
572
|
+
let {
|
|
573
|
+
dataSource,
|
|
574
|
+
getCheckboxProps,
|
|
575
|
+
childrenRecordName,
|
|
576
|
+
rowKey
|
|
577
|
+
} = _ref;
|
|
578
|
+
const disabledRowKeys = [];
|
|
579
|
+
|
|
580
|
+
if ((0, _isArray.default)(dataSource) && dataSource.length && typeof getCheckboxProps === 'function') {
|
|
581
|
+
for (const record of dataSource) {
|
|
582
|
+
const props = getCheckboxProps(record);
|
|
583
|
+
const recordKey = typeof rowKey === 'function' ? rowKey(record) : (0, _get2.default)(record, rowKey);
|
|
584
|
+
|
|
585
|
+
if (props && props.disabled) {
|
|
586
|
+
disabledRowKeys.push(recordKey);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
const children = (0, _get2.default)(record, childrenRecordName);
|
|
590
|
+
|
|
591
|
+
if ((0, _isArray.default)(children) && children.length) {
|
|
592
|
+
const keys = getAllDisabledRowKeys({
|
|
593
|
+
dataSource: children,
|
|
594
|
+
getCheckboxProps
|
|
595
|
+
});
|
|
596
|
+
disabledRowKeys.push(...keys);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return disabledRowKeys;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
function warnIfNoDataIndex(column) {
|
|
605
|
+
if (typeof column === 'object' && column !== null) {
|
|
606
|
+
const {
|
|
607
|
+
filters,
|
|
608
|
+
sorter,
|
|
609
|
+
dataIndex
|
|
610
|
+
} = column;
|
|
611
|
+
const logger = new _Logger.default('[@douyinfe/semi-ui Table]');
|
|
612
|
+
|
|
613
|
+
if (((0, _isArray.default)(filters) || (0, _isFunction2.default)(sorter)) && (0, _isNullOrUndefined.default)(dataIndex)) {
|
|
614
|
+
logger.warn("The column with sorter or filter must pass the 'dataIndex' prop");
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Spacing
|
|
2
|
+
$spacing-table-paddingY: $spacing-base; // 表格单元格垂直内边距
|
|
3
|
+
$spacing-table-paddingX: $spacing-base-tight; // 表格单元格水平内边距
|
|
4
|
+
$spacing-table_middle-paddingY: $spacing-base-tight; // 中尺寸表格单元格垂直内边距
|
|
5
|
+
$spacing-table_small-paddingY: $spacing-tight; // 小尺寸表格单元格垂直内边距
|
|
6
|
+
$spacing-table_th-paddingTop: $spacing-tight; // 表格顶部内边距
|
|
7
|
+
$spacing-table_th-paddingBottom: $spacing-tight; // 表格底部内边距
|
|
8
|
+
$spacing-table_title-paddingY: $spacing-base; // 表格标题垂直内边距
|
|
9
|
+
$spacing-table_title-paddingX: 0; // 表格标题水平内边距
|
|
10
|
+
$spacing-table_footer-padding: $spacing-base; // 表格 footer 内边距
|
|
11
|
+
$spacing-table_expand_row-paddingLeft: 16px; // 表格展开行左侧内边距
|
|
12
|
+
$spacing-table_expand_row-paddingRight: 16px; // 表格展开行右侧内边距
|
|
13
|
+
$spacing-table_expand_row-paddingTop: 16px; // 表格展开行顶部内边距
|
|
14
|
+
$spacing-table_expand_row-paddingBottom: 16px; // 表格展开行底部内边距
|
|
15
|
+
$spacing-table_resizable-offset-y: 4px; // 可拖动拉伸操作垂直偏移量
|
|
16
|
+
$spacing-table_resizable-bottom: 4px; // 可拖动拉伸操作底部距离
|
|
17
|
+
$spacing-table_row_head-paddingY: $spacing-tight; // 表头垂直内边距
|
|
18
|
+
$spacing-table_row_head-paddingX: $spacing-base; // 表头水平内边距
|
|
19
|
+
$spacing-table_react_resizable_handle-right: -1px; // 可拖动拉伸操作向右偏移量
|
|
20
|
+
$spacing-table_tbody_rowCell-padding: $spacing-base; // 表格单元格内边距
|
|
21
|
+
$spacing-table_tbody_rowSelection_rowCell_notSelection-paddingX: 16px; // 可选中的表格单元水平内边距
|
|
22
|
+
$spacing-table_tbody_rowSelection_rowCell_notSelection-paddingY: 10px; // 可选中的表格单元垂直内边距
|
|
23
|
+
$spacing-table_column_sorter-marginLeft: $spacing-extra-tight; // 列排序按钮左侧外边距
|
|
24
|
+
$spacing-table_column_filter-marginLeft: $spacing-extra-tight; // 列过滤器按钮左侧外边距
|
|
25
|
+
$spacing-table_bordered_titler-paddingLeft: $spacing-base; // 列过滤器按钮左侧外边距
|
|
26
|
+
$spacing-table_bordered_titler-paddingRight: $spacing-base; // 列过滤器按钮右侧外边距
|
|
27
|
+
$spacing-table_expand_icon-marginRight: 8px; // 行展开按钮右侧外边距
|
|
28
|
+
$spacing-table_panel_operation-paddingX: $spacing-base;
|
|
29
|
+
$spacing-table_panel_operation-paddingY: $spacing-tight;
|
|
30
|
+
|
|
31
|
+
// Size
|
|
32
|
+
$width-table_base_border: 1px; // 表格单元格分割线宽度
|
|
33
|
+
$width-table_header_border: 2px; // 表格表头分割线宽度
|
|
34
|
+
$width-table_resizer_border: 2px; // 表格拉伸列标示线宽度
|
|
35
|
+
$radius-table_base: 4px;
|
|
36
|
+
$width-table_column_selection: 48px; // 表格默认列宽
|
|
37
|
+
$width-table_column_sorter-icon: 16px; // 表格排序按钮宽度
|
|
38
|
+
$height-table_column_sorter-icon: 16px; // 表格排序按钮高度
|
|
39
|
+
$width-table_column_filter-icon: 12px; // 表格过滤按钮宽度
|
|
40
|
+
$height-table_column_filter-icon: 12px; // 表格过滤按钮高度
|
|
41
|
+
$width-table_cell_fixed_left_last: 1px; // 表格左上角单元格底部描边宽度
|
|
42
|
+
$width-table_cell_fixed_right_first: 1px; // 表格左上角单元格右侧描边宽度
|
|
43
|
+
$width-table_react_resizable_handle: 9px; // 表格伸缩列调节热区宽度
|
|
44
|
+
$height-table_pagination_outer_min: 60px; // 表格分页器高度
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// Color no need to change
|
|
48
|
+
$color-table_panel-bg-default: var(--semi-color-primary); // 操作区域样式默认背景颜色
|
|
49
|
+
$color-table_panel-text-default: var(--semi-color-primary-light-active); // 操作区域样式默认文字颜色
|
|
50
|
+
$color-table-bg-default: var(--semi-color-bg-2); // 单元格默认背景颜色
|
|
51
|
+
$color-table-text-default: var(--semi-color-text-0); // 单元格默认文字颜色
|
|
52
|
+
|
|
53
|
+
$color-table-border-default: var(--semi-color-border); // 表格描边颜色
|
|
54
|
+
$color-table_shadow-bg-default: var(--semi-color-shadow); // 表格滚动后阴影颜色
|
|
55
|
+
$color-table_shadow-border-default: var(--semi-color-border); // 表格拟阴影 描边颜色
|
|
56
|
+
$color-table_th-bg-default: transparent; // 表头背景色
|
|
57
|
+
$color-table_th-border-default: var(--semi-color-border); // 表头底部分割线颜色
|
|
58
|
+
$color-table_th-text-default: var(--semi-color-text-2); // 表头文字颜色
|
|
59
|
+
|
|
60
|
+
$color-table_pl-bg-default: transparent;
|
|
61
|
+
$color-table_body-bg-default: var(--semi-color-bg-2); // 表格背景颜色 - 默认
|
|
62
|
+
$color-table_body-bg-hover: var(--semi-color-fill-0); // 表格背景颜色 - 悬浮
|
|
63
|
+
$color-table_footer-bg-default: var(--semi-color-fill-0); // 表格 footer 背景颜色 - 默认
|
|
64
|
+
$color-table_row_expanded-bg-default: var(--semi-color-fill-0); // 表格展开行背景颜色 - 默认
|
|
65
|
+
$color-table_expanded_icon-default: var(--semi-color-text-2); // 表格展开行图标颜色 - 默认
|
|
66
|
+
$color-table_expanded-bg-default: transparent; // 表格展开行图标容器背景颜色 - 默认
|
|
67
|
+
$color-table_disabled-bg-default: var(--semi-color-disabled-bg);
|
|
68
|
+
$color-table_filter_on-text-default: var(--semi-color-primary); // 表格过滤按钮颜色 - 激活态
|
|
69
|
+
$color-table_filter-text-default: var(--semi-color-text-2); // 表格过滤按钮颜色 - 默认态
|
|
70
|
+
$color-table_sorter_on-text-default: var(--semi-color-primary); // 表格排序按钮颜色 - 激活态
|
|
71
|
+
$color-table_sorter-text-default: var(--semi-color-text-2); // 表格排序按钮颜色 - 默认态
|
|
72
|
+
$color-table_sorter-text-hover: var(--semi-color-text-2); // 表格排序按钮颜色 - 悬浮态
|
|
73
|
+
$color-table_page-text-default: var(--semi-color-text-2); // 表格翻页器文本颜色
|
|
74
|
+
$color-table_resizer-bg-default: var(--semi-color-primary); // 表格拉伸标示线颜色
|
|
75
|
+
$color-table_selection-bg-default: rgba(var(--semi-grey-0), 1); // 表格分组背景色
|
|
76
|
+
|
|
77
|
+
// Other
|
|
78
|
+
$font-table_base-fontSize: 14px; // 表格默认文本字号
|
|
79
|
+
$border-table_base-borderStyle: solid; // 表格描边样式
|
|
80
|
+
$shadow-table_left: -3px 0 0 0 $color-table_shadow-bg-default; // 表格滚动阴影 - 左侧
|
|
81
|
+
$shadow-table_right: 3px 0 0 0 $color-table_shadow-bg-default; // 表格滚动阴影 - 右侧
|
|
82
|
+
$border-table: #{$width-table_base_border} #{$border-table_base-borderStyle} $color-table-border-default; // 表格默认描边
|
|
83
|
+
$border-table_head-bottom: #{$width-table_header_border} #{$border-table_base-borderStyle} $color-table_th-border-default; // 表头单元格描边 - 底部
|
|
84
|
+
$border-table_resizer: $width-table_resizer_border solid $color-table_resizer-bg-default; // 表格拉伸标识描边
|