tntd 3.0.27 → 3.0.28
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/es/alert/index.js +1 -1
- package/es/alert/index.js.map +1 -1
- package/es/alert/style/index.less +0 -1
- package/es/array-input/index.js +12 -14
- package/es/array-input/index.js.map +1 -1
- package/es/button/button.js +3 -30
- package/es/button/button.js.map +1 -1
- package/es/button/button.less +2 -72
- package/es/cascader/index.js +6 -3
- package/es/cascader/index.js.map +1 -1
- package/es/checkbox/index.js +7 -3
- package/es/checkbox/index.js.map +1 -1
- package/es/date-picker/index.js +12 -6
- package/es/date-picker/index.js.map +1 -1
- package/es/date-picker/style/Calendar.less +1 -1
- package/es/descriptions/descriptions.less +0 -1
- package/es/descriptions/index.js +2 -2
- package/es/descriptions/index.js.map +1 -1
- package/es/drawer/drawer.js +5 -5
- package/es/drawer/drawer.js.map +1 -1
- package/es/drawer/index.less +1 -15
- package/es/drawer/style/drawer.less +3 -18
- package/es/drawer/style/index.js +1 -2
- package/es/drawer/style/index.js.map +1 -1
- package/es/form/style/index.less +0 -6
- package/es/handle/index.js +6 -9
- package/es/handle/index.js.map +1 -1
- package/es/handle/index.less +0 -16
- package/es/input/index.js +1 -1
- package/es/input/index.js.map +1 -1
- package/es/input/input.js +30 -21
- package/es/input/input.js.map +1 -1
- package/es/input/input.less +20 -123
- package/es/input-number/index.js +29 -4
- package/es/input-number/index.js.map +1 -1
- package/es/locale/en_US.js +5 -9
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +3 -7
- package/es/locale/zh_CN.js.map +1 -1
- package/es/message/message.less +1 -2
- package/es/modal/index.js +3 -2
- package/es/modal/index.js.map +1 -1
- package/es/modal/modal.js +16 -103
- package/es/modal/modal.js.map +1 -1
- package/es/modal/style/index.js +1 -2
- package/es/modal/style/index.js.map +1 -1
- package/es/modal/style/modal.less +3 -15
- package/es/notification/notification.less +2 -27
- package/es/notification/style/index.less +0 -1
- package/es/page-container/index.js +1 -1
- package/es/page-container/index.js.map +1 -1
- package/es/page-container/index.less +2 -3
- package/es/page-loading/index.js +1 -1
- package/es/page-loading/index.js.map +1 -1
- package/es/popconfirm/index.js +2 -2
- package/es/popconfirm/index.js.map +1 -1
- package/es/popconfirm/style/index.js +1 -2
- package/es/popconfirm/style/index.js.map +1 -1
- package/es/popover/index.js +2 -2
- package/es/popover/index.js.map +1 -1
- package/es/popover/style/index.js +0 -1
- package/es/popover/style/index.js.map +1 -1
- package/es/preview-text/index.js.map +1 -1
- package/es/progress/index.js +2 -2
- package/es/progress/index.js.map +1 -1
- package/es/query-list-scene/List.js +1 -3
- package/es/query-list-scene/List.js.map +1 -1
- package/es/query-list-scene/QueryForm.js +3 -1
- package/es/query-list-scene/QueryForm.js.map +1 -1
- package/es/query-list-scene/index.less +7 -7
- package/es/radio/index.js +5 -3
- package/es/radio/index.js.map +1 -1
- package/es/segmented/index.less +112 -126
- package/es/select/index.js +1 -1
- package/es/select/index.js.map +1 -1
- package/es/select/select.js +6 -5
- package/es/select/select.js.map +1 -1
- package/es/select/select.less +9 -83
- package/es/select/style/index.less +4 -4
- package/es/spin/index.js +2 -3
- package/es/spin/index.js.map +1 -1
- package/es/steps/index.js +2 -9
- package/es/steps/index.js.map +1 -1
- package/es/steps/stepStyle/index.less +8 -173
- package/es/steps/stepStyle/nav.less +259 -51
- package/es/steps/steps.js +27 -53
- package/es/steps/steps.js.map +1 -1
- package/es/steps/style/index.js +0 -8
- package/es/steps/style/index.js.map +1 -1
- package/es/style/themes/default.less +5 -6
- package/es/switch/style/index.js +1 -2
- package/es/switch/style/index.js.map +1 -1
- package/es/switch/switch.js +2 -40
- package/es/switch/switch.js.map +1 -1
- package/es/table/hooks/use-expand-fixed.js.map +1 -1
- package/es/table/resizableTable/index.less +18 -0
- package/es/table/style/index.less +21 -19
- package/es/table/style/size.less +12 -11
- package/es/table/table.js +39 -65
- package/es/table/table.js.map +1 -1
- package/es/table/table.less +6 -31
- package/es/table/table.stories.js +3 -3
- package/es/table/table.stories.js.map +1 -1
- package/es/table-container/index.js +2 -5
- package/es/table-container/index.js.map +1 -1
- package/es/table-container/index.less +1 -4
- package/es/tabs/index.js +0 -1
- package/es/tabs/index.js.map +1 -1
- package/es/tabs/style/index.js.map +1 -1
- package/es/tabs/style/index.less +0 -1
- package/es/tabs/tabs.js +3 -27
- package/es/tabs/tabs.js.map +1 -1
- package/es/tabs-container/index.js +1 -1
- package/es/tabs-container/index.js.map +1 -1
- package/es/tag/tag.less +3 -4
- package/es/time-picker/index.js +2 -2
- package/es/time-picker/index.js.map +1 -1
- package/es/title/index.less +45 -47
- package/es/tntd-action/index.js +6 -69
- package/es/tntd-action/index.js.map +1 -1
- package/es/tntd-cascader/AntdCascader/index.less +29 -35
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js +1 -1
- package/es/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
- package/es/tntd-select/index.js +4 -3
- package/es/tntd-select/index.js.map +1 -1
- package/es/tntd-virtual-tree/index.less +1 -2
- package/es/tntd-virtual-tree-select/index.less +14 -1
- package/es/tooltip/index.less +5 -4
- package/es/tooltip/style/index.js +1 -2
- package/es/tooltip/style/index.js.map +1 -1
- package/es/upload/index.js +191 -3
- package/es/upload/index.js.map +1 -1
- package/es/upload/style/index.less +1 -1
- package/es/utils/lang.js +2 -8
- package/es/utils/lang.js.map +1 -1
- package/lib/_util/context.js +1 -1
- package/lib/_util/defaultRenderEmpty.js +1 -1
- package/lib/_util/hooks/useFlexGapSupport.js +4 -4
- package/lib/_util/hooks/useForceUpdate.js +4 -4
- package/lib/_util/responsiveObserve.js +1 -1
- package/lib/_util/styleChecker.js +1 -1
- package/lib/actions/index.js +1 -1
- package/lib/alert/index.d.ts +1 -1
- package/lib/alert/index.d.ts.map +1 -1
- package/lib/alert/index.js +8 -7
- package/lib/alert/index.js.map +1 -1
- package/lib/alert/style/index.less +0 -1
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +23 -26
- package/lib/array-input/index.js.map +1 -1
- package/lib/button/button.d.ts +4 -9
- package/lib/button/button.d.ts.map +1 -1
- package/lib/button/button.js +4 -28
- package/lib/button/button.js.map +1 -1
- package/lib/button/button.less +2 -72
- package/lib/cascader/index.d.ts +7 -3
- package/lib/cascader/index.d.ts.map +1 -1
- package/lib/cascader/index.js +10 -5
- package/lib/cascader/index.js.map +1 -1
- package/lib/check-card/group.js +8 -8
- package/lib/check-card/index.js +6 -6
- package/lib/checkbox/checkbox-group.js +1 -1
- package/lib/checkbox/index.d.ts +3 -3
- package/lib/checkbox/index.d.ts.map +1 -1
- package/lib/checkbox/index.js +17 -2
- package/lib/checkbox/index.js.map +1 -1
- package/lib/color-picker/ColorPicker.js +6 -6
- package/lib/color-picker/index.js +1 -1
- package/lib/columns/index.js +1 -1
- package/lib/config-provider/config-provider.js +1 -1
- package/lib/date-picker/index.d.ts +6 -2
- package/lib/date-picker/index.d.ts.map +1 -1
- package/lib/date-picker/index.js +37 -6
- package/lib/date-picker/index.js.map +1 -1
- package/lib/date-picker/style/Calendar.less +1 -1
- package/lib/descriptions/descriptions.js +5 -5
- package/lib/descriptions/descriptions.less +0 -1
- package/lib/descriptions/index.d.ts +1 -1
- package/lib/descriptions/index.d.ts.map +1 -1
- package/lib/descriptions/index.js +7 -7
- package/lib/descriptions/index.js.map +1 -1
- package/lib/development-login/LoginModal.js +6 -6
- package/lib/development-login/index.js +4 -4
- package/lib/drawer/drawer.d.ts +3 -3
- package/lib/drawer/drawer.d.ts.map +1 -1
- package/lib/drawer/drawer.js +7 -7
- package/lib/drawer/drawer.js.map +1 -1
- package/lib/drawer/index.less +1 -15
- package/lib/drawer/style/drawer.less +3 -18
- package/lib/drawer/style/index.d.ts +0 -1
- package/lib/drawer/style/index.d.ts.map +1 -1
- package/lib/drawer/style/index.js +1 -2
- package/lib/drawer/style/index.js.map +1 -1
- package/lib/ellipsis/Svg/CopySVG.js +1 -1
- package/lib/ellipsis/Svg/TickSVG.js +1 -1
- package/lib/ellipsis/index.js +5 -5
- package/lib/empty/empty.js +2 -2
- package/lib/empty/empty.stories.js +2 -2
- package/lib/exception/exception.js +1 -1
- package/lib/form/form.js +2 -2
- package/lib/form/style/index.less +0 -6
- package/lib/grid-v4/col.js +2 -2
- package/lib/grid-v4/hooks/useBreakpoint.js +1 -1
- package/lib/grid-v4/index.js +1 -1
- package/lib/grid-v4/row.js +6 -6
- package/lib/handle/index.d.ts.map +1 -1
- package/lib/handle/index.js +11 -16
- package/lib/handle/index.js.map +1 -1
- package/lib/handle/index.less +0 -16
- package/lib/handle-icon/index.js +11 -11
- package/lib/icon/IconFont.js +1 -1
- package/lib/icon/components/Icon.js +9 -9
- package/lib/icon/components/index.js +1 -1
- package/lib/icon/components/utils.js +3 -3
- package/lib/icon/index.js +7 -7
- package/lib/icon/twoTonePrimaryColor.js +1 -1
- package/lib/icon/utils.js +1 -1
- package/lib/img/Contain.js +1 -1
- package/lib/img/Cover.js +5 -5
- package/lib/img/index.js +5 -5
- package/lib/index.js +1 -1
- package/lib/input/index.d.ts +1 -1
- package/lib/input/index.d.ts.map +1 -1
- package/lib/input/index.js +7 -7
- package/lib/input/index.js.map +1 -1
- package/lib/input/input.d.ts +5 -5
- package/lib/input/input.d.ts.map +1 -1
- package/lib/input/input.js +22 -13
- package/lib/input/input.js.map +1 -1
- package/lib/input/input.less +20 -123
- package/lib/input-number/index.d.ts +10 -4
- package/lib/input-number/index.d.ts.map +1 -1
- package/lib/input-number/index.js +32 -5
- package/lib/input-number/index.js.map +1 -1
- package/lib/label/index.js +2 -2
- package/lib/loading-button/index.js +5 -5
- package/lib/locale/default.d.ts +3 -7
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/default.js +1 -1
- package/lib/locale/en_US.d.ts +3 -7
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +6 -10
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +3 -7
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +4 -8
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/message/message.less +1 -2
- package/lib/modal/index.d.ts +1 -0
- package/lib/modal/index.d.ts.map +1 -1
- package/lib/modal/index.js +3 -2
- package/lib/modal/index.js.map +1 -1
- package/lib/modal/modal.d.ts.map +1 -1
- package/lib/modal/modal.js +16 -91
- package/lib/modal/modal.js.map +1 -1
- package/lib/modal/style/index.d.ts +0 -1
- package/lib/modal/style/index.d.ts.map +1 -1
- package/lib/modal/style/index.js +1 -2
- package/lib/modal/style/index.js.map +1 -1
- package/lib/modal/style/modal.less +3 -15
- package/lib/notification/assets/index.js +1 -1
- package/lib/notification/assets/svg-error-tip.d.ts +1 -1
- package/lib/notification/assets/svg-success-tip.d.ts +1 -1
- package/lib/notification/index.js +1 -1
- package/lib/notification/notification.js +1 -1
- package/lib/notification/notification.less +2 -27
- package/lib/notification/style/index.less +0 -1
- package/lib/page/Box.js +1 -1
- package/lib/page/index.js +7 -7
- package/lib/page-container/index.js +2 -2
- package/lib/page-container/index.js.map +1 -1
- package/lib/page-container/index.less +2 -3
- package/lib/page-loading/index.js +2 -2
- package/lib/page-loading/index.js.map +1 -1
- package/lib/popconfirm/index.d.ts +2 -2
- package/lib/popconfirm/index.d.ts.map +1 -1
- package/lib/popconfirm/index.js +1 -1
- package/lib/popconfirm/index.js.map +1 -1
- package/lib/popconfirm/style/index.d.ts +0 -1
- package/lib/popconfirm/style/index.d.ts.map +1 -1
- package/lib/popconfirm/style/index.js +1 -2
- package/lib/popconfirm/style/index.js.map +1 -1
- package/lib/popover/index.d.ts +2 -2
- package/lib/popover/index.d.ts.map +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/popover/index.js.map +1 -1
- package/lib/popover/style/index.d.ts +0 -1
- package/lib/popover/style/index.d.ts.map +1 -1
- package/lib/popover/style/index.js +1 -2
- package/lib/popover/style/index.js.map +1 -1
- package/lib/preview-text/index.d.ts +1 -1
- package/lib/preview-text/index.d.ts.map +1 -1
- package/lib/preview-text/index.js +7 -7
- package/lib/preview-text/index.js.map +1 -1
- package/lib/progress/index.d.ts +2 -2
- package/lib/progress/index.d.ts.map +1 -1
- package/lib/progress/index.js +1 -1
- package/lib/progress/index.js.map +1 -1
- package/lib/query-form/Field/Checkbox.js +1 -1
- package/lib/query-form/Field/Select.js +6 -6
- package/lib/query-form/Field/SelectInput.js +6 -6
- package/lib/query-form/Field/fieldsMap.js +1 -1
- package/lib/query-form/Field/index.js +10 -10
- package/lib/query-form/createActions.js +1 -1
- package/lib/query-form/index.js +10 -10
- package/lib/query-form/useForm.js +1 -1
- package/lib/query-list-scene/List.d.ts.map +1 -1
- package/lib/query-list-scene/List.js +14 -16
- package/lib/query-list-scene/List.js.map +1 -1
- package/lib/query-list-scene/QueryForm.js +12 -11
- package/lib/query-list-scene/QueryForm.js.map +1 -1
- package/lib/query-list-scene/QueryListScene.js +10 -10
- package/lib/query-list-scene/Title.js +1 -1
- package/lib/query-list-scene/Toolbar.js +2 -2
- package/lib/query-list-scene/createActions.js +1 -1
- package/lib/query-list-scene/index.js +1 -1
- package/lib/query-list-scene/index.less +7 -7
- package/lib/query-list-scene/useActions.js +1 -1
- package/lib/radio/index.d.ts +2 -3
- package/lib/radio/index.d.ts.map +1 -1
- package/lib/radio/index.js +5 -2
- package/lib/radio/index.js.map +1 -1
- package/lib/radio/radio-group.js +1 -1
- package/lib/render-empty/render-empty.js +1 -1
- package/lib/segmented/index.d.ts +1 -1
- package/lib/segmented/index.js +2 -2
- package/lib/segmented/index.less +112 -126
- package/lib/select/index.d.ts +1 -1
- package/lib/select/index.d.ts.map +1 -1
- package/lib/select/index.js +6 -6
- package/lib/select/index.js.map +1 -1
- package/lib/select/select.d.ts +1 -1
- package/lib/select/select.d.ts.map +1 -1
- package/lib/select/select.js +6 -5
- package/lib/select/select.js.map +1 -1
- package/lib/select/select.less +9 -83
- package/lib/select/style/index.less +4 -4
- package/lib/spin/index.d.ts +2 -3
- package/lib/spin/index.d.ts.map +1 -1
- package/lib/spin/index.js +6 -4
- package/lib/spin/index.js.map +1 -1
- package/lib/steps/index.d.ts +2 -1
- package/lib/steps/index.d.ts.map +1 -1
- package/lib/steps/index.js +2 -9
- package/lib/steps/index.js.map +1 -1
- package/lib/steps/stepStyle/index.less +8 -173
- package/lib/steps/stepStyle/nav.less +259 -51
- package/lib/steps/steps.d.ts +2 -10
- package/lib/steps/steps.d.ts.map +1 -1
- package/lib/steps/steps.js +24 -52
- package/lib/steps/steps.js.map +1 -1
- package/lib/steps/style/index.d.ts.map +1 -1
- package/lib/steps/style/index.js.map +1 -1
- package/lib/style/themes/default.less +5 -6
- package/lib/svg-components/illustration-403.d.ts +1 -1
- package/lib/svg-components/illustration-404.d.ts +1 -1
- package/lib/svg-components/illustration-500.d.ts +1 -1
- package/lib/svg-components/illustration-empty.d.ts +1 -1
- package/lib/svg-components/illustration-failure.d.ts +1 -1
- package/lib/svg-components/illustration-no-access.d.ts +1 -1
- package/lib/svg-components/illustration-no-chart.d.ts +1 -1
- package/lib/svg-components/illustration-no-result.d.ts +1 -1
- package/lib/svg-components/illustration-offline.d.ts +1 -1
- package/lib/svg-components/illustration-success.d.ts +1 -1
- package/lib/svg-components/index.js +1 -1
- package/lib/switch/style/index.d.ts +0 -1
- package/lib/switch/style/index.d.ts.map +1 -1
- package/lib/switch/style/index.js +1 -2
- package/lib/switch/style/index.js.map +1 -1
- package/lib/switch/switch.d.ts +0 -8
- package/lib/switch/switch.d.ts.map +1 -1
- package/lib/switch/switch.js +5 -40
- package/lib/switch/switch.js.map +1 -1
- package/lib/table/assets/image-loading-background.d.ts +1 -1
- package/lib/table/assets/image-loading.d.ts +1 -1
- package/lib/table/hooks/use-column-setting.js +4 -4
- package/lib/table/hooks/use-expand-fixed.js +6 -6
- package/lib/table/hooks/use-expand-fixed.js.map +1 -1
- package/lib/table/resizableTable/index.js +6 -6
- package/lib/table/resizableTable/index.less +18 -0
- package/lib/table/style/index.less +21 -19
- package/lib/table/style/size.less +12 -11
- package/lib/table/table-hoc.js +1 -1
- package/lib/table/table.d.ts +1 -2
- package/lib/table/table.d.ts.map +1 -1
- package/lib/table/table.js +41 -61
- package/lib/table/table.js.map +1 -1
- package/lib/table/table.less +6 -31
- package/lib/table/table.stories.js +5 -5
- package/lib/table/table.stories.js.map +1 -1
- package/lib/table/total-shower.js +1 -1
- package/lib/table/utils.js +1 -1
- package/lib/table-container/index.d.ts.map +1 -1
- package/lib/table-container/index.js +3 -7
- package/lib/table-container/index.js.map +1 -1
- package/lib/table-container/index.less +1 -4
- package/lib/tabs/index.d.ts +0 -1
- package/lib/tabs/index.d.ts.map +1 -1
- package/lib/tabs/index.js +5 -6
- package/lib/tabs/index.js.map +1 -1
- package/lib/tabs/style/index.js.map +1 -1
- package/lib/tabs/style/index.less +0 -1
- package/lib/tabs/tabs.d.ts +2 -3
- package/lib/tabs/tabs.d.ts.map +1 -1
- package/lib/tabs/tabs.js +3 -30
- package/lib/tabs/tabs.js.map +1 -1
- package/lib/tabs-container/index.js +2 -2
- package/lib/tabs-container/index.js.map +1 -1
- package/lib/tag/tag.js +2 -2
- package/lib/tag/tag.less +3 -4
- package/lib/time-picker/index.d.ts +6 -7
- package/lib/time-picker/index.d.ts.map +1 -1
- package/lib/time-picker/index.js +17 -4
- package/lib/time-picker/index.js.map +1 -1
- package/lib/title/index.js +1 -1
- package/lib/title/index.less +45 -47
- package/lib/tntd-action/index.d.ts +2 -4
- package/lib/tntd-action/index.d.ts.map +1 -1
- package/lib/tntd-action/index.js +5 -79
- package/lib/tntd-action/index.js.map +1 -1
- package/lib/tntd-cascader/AntdCascader/component/context.js +1 -1
- package/lib/tntd-cascader/AntdCascader/component/defaultRenderEmpty.js +1 -1
- package/lib/tntd-cascader/AntdCascader/component/getIcons.js +1 -1
- package/lib/tntd-cascader/AntdCascader/component/useCompactItemContext.js +2 -2
- package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
- package/lib/tntd-cascader/AntdCascader/config/utils.js +2 -2
- package/lib/tntd-cascader/AntdCascader/index.js +7 -7
- package/lib/tntd-cascader/AntdCascader/index.less +29 -35
- package/lib/tntd-cascader/index.js +1 -1
- package/lib/tntd-cascader/rc-cascader/Cascader.js +8 -8
- package/lib/tntd-cascader/rc-cascader/OptionList/Checkbox.js +2 -2
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js +8 -8
- package/lib/tntd-cascader/rc-cascader/OptionList/Column.js.map +1 -1
- package/lib/tntd-cascader/rc-cascader/OptionList/index.js +9 -9
- package/lib/tntd-cascader/rc-cascader/OptionList/useActive.js +5 -5
- package/lib/tntd-cascader/rc-cascader/OptionList/useKeyboard.js +8 -8
- package/lib/tntd-cascader/rc-cascader/hooks/useDisplayValues.js +5 -5
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchConfig.js +1 -1
- package/lib/tntd-cascader/rc-cascader/hooks/useSearchOptions.js +6 -6
- package/lib/tntd-cascader/rc-cascader/index.js +1 -1
- package/lib/tntd-cascader/rc-cascader/utils/warningPropsUtil.js +4 -4
- package/lib/tntd-form/ErrorList.js +7 -7
- package/lib/tntd-form/Form.js +6 -6
- package/lib/tntd-form/FormItem/ItemHolder.js +6 -6
- package/lib/tntd-form/FormItem/index.js +8 -8
- package/lib/tntd-form/FormItemInput.js +1 -1
- package/lib/tntd-form/FormItemLabel.js +2 -2
- package/lib/tntd-form/FormList.js +1 -1
- package/lib/tntd-form/context.js +1 -1
- package/lib/tntd-form/hooks/useDebounce.js +4 -4
- package/lib/tntd-form/hooks/useForm.js +5 -5
- package/lib/tntd-form/hooks/useFormItemStatus.js +1 -1
- package/lib/tntd-form/hooks/useFrameState.js +5 -5
- package/lib/tntd-form/index.js +1 -1
- package/lib/tntd-icon/index.js +1 -1
- package/lib/tntd-layout/AppList.js +6 -6
- package/lib/tntd-layout/Application.js +6 -6
- package/lib/tntd-layout/Avatar.js +2 -2
- package/lib/tntd-layout/CompatibleLanguage.js +6 -6
- package/lib/tntd-layout/EnterpriseLayout/Avatar.js +2 -2
- package/lib/tntd-layout/EnterpriseLayout/Language.js +6 -6
- package/lib/tntd-layout/EnterpriseLayout/Theme.js +6 -6
- package/lib/tntd-layout/EnterpriseLayout/index.js +1 -1
- package/lib/tntd-layout/GlobalNavigation/NavigationPopup.js +6 -6
- package/lib/tntd-layout/GlobalNavigation/index.js +9 -9
- package/lib/tntd-layout/Header.js +2 -2
- package/lib/tntd-layout/HeaderActions.js +2 -2
- package/lib/tntd-layout/HeaderNavs.js +6 -6
- package/lib/tntd-layout/HeaderTabs.js +7 -7
- package/lib/tntd-layout/Iconfont.js +1 -1
- package/lib/tntd-layout/Language.js +6 -6
- package/lib/tntd-layout/Layout.js +6 -6
- package/lib/tntd-layout/Logo.js +2 -2
- package/lib/tntd-layout/OrgAppList.js +6 -6
- package/lib/tntd-layout/SideMenu.js +6 -6
- package/lib/tntd-layout/Theme.js +6 -6
- package/lib/tntd-layout/createActions.js +1 -1
- package/lib/tntd-layout/images/index.js +1 -1
- package/lib/tntd-layout/index.js +1 -1
- package/lib/tntd-layout/paaslayout/CompactSideMenu.js +6 -6
- package/lib/tntd-layout/paaslayout/Header.js +2 -2
- package/lib/tntd-layout/paaslayout/Logo.js +2 -2
- package/lib/tntd-layout/paaslayout/SideMenu.js +6 -6
- package/lib/tntd-layout/paaslayout/index.js +6 -6
- package/lib/tntd-layout/storage.js +1 -1
- package/lib/tntd-modal/index.js +6 -6
- package/lib/tntd-rc-select/_util/PurePanel.js +5 -5
- package/lib/tntd-rc-select/_util/context.js +1 -1
- package/lib/tntd-rc-select/_util/defaultRenderEmpty.js +1 -1
- package/lib/tntd-rc-select/_util/getIcons.js +1 -1
- package/lib/tntd-rc-select/_util/useCompactItemContext.js +2 -2
- package/lib/tntd-rc-select/index.js +2 -2
- package/lib/tntd-reference/AHref/index.js +1 -1
- package/lib/tntd-reference/ReferenceBatchCheck/index.js +1 -1
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js +5 -5
- package/lib/tntd-reference/ReferenceCheck/index.js +1 -1
- package/lib/tntd-reference/ReferenceDrawer/index.js +5 -5
- package/lib/tntd-reference/ReferenceInfo/index.js +1 -1
- package/lib/tntd-reference/index.js +1 -1
- package/lib/tntd-second-page/index.js +1 -1
- package/lib/tntd-select/DropDownWrap.js +8 -8
- package/lib/tntd-select/index.d.ts.map +1 -1
- package/lib/tntd-select/index.js +13 -13
- package/lib/tntd-select/index.js.map +1 -1
- package/lib/tntd-virtual-tree/index.js +8 -8
- package/lib/tntd-virtual-tree/index.less +1 -2
- package/lib/tntd-virtual-tree/utils.js +28 -28
- package/lib/tntd-virtual-tree-select/index.js +10 -10
- package/lib/tntd-virtual-tree-select/index.less +14 -1
- package/lib/tntd-virtual-tree-select/utils.js +9 -9
- package/lib/tooltip/index.less +5 -4
- package/lib/tooltip/style/index.d.ts +0 -1
- package/lib/tooltip/style/index.d.ts.map +1 -1
- package/lib/tooltip/style/index.js +1 -2
- package/lib/tooltip/style/index.js.map +1 -1
- package/lib/tooltip/tooltip.js +1 -1
- package/lib/upload/index.d.ts +1 -0
- package/lib/upload/index.d.ts.map +1 -1
- package/lib/upload/index.js +208 -4
- package/lib/upload/index.js.map +1 -1
- package/lib/upload/style/index.less +1 -1
- package/lib/upload/svg/UploadSVG.js +1 -1
- package/lib/utils/checkAuth.js +4 -4
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +9 -9
- package/lib/utils/lang.d.ts.map +1 -1
- package/lib/utils/lang.js +4 -10
- package/lib/utils/lang.js.map +1 -1
- package/lib/water-mark/index.js +5 -5
- package/package.json +1 -1
- package/es/alert/alert.js +0 -71
- package/es/alert/alert.js.map +0 -1
- package/es/alert/alert.less +0 -128
- package/es/cascader/cascader.js +0 -30
- package/es/cascader/cascader.js.map +0 -1
- package/es/cascader/cascader.less +0 -16
- package/es/checkbox/check.png +0 -0
- package/es/checkbox/checkbox.js +0 -48
- package/es/checkbox/checkbox.js.map +0 -1
- package/es/checkbox/checkbox.less +0 -69
- package/es/date-picker/DatePicker.js +0 -101
- package/es/date-picker/DatePicker.js.map +0 -1
- package/es/date-picker/index.less +0 -294
- package/es/input-number/inputNumber.js +0 -34
- package/es/input-number/inputNumber.js.map +0 -1
- package/es/input-number/inputNumber.less +0 -12
- package/es/modal/index.less +0 -36
- package/es/popconfirm/index.less +0 -32
- package/es/popconfirm/popconfirm.js +0 -43
- package/es/popconfirm/popconfirm.js.map +0 -1
- package/es/popover/index.less +0 -57
- package/es/popover/popover.js +0 -34
- package/es/popover/popover.js.map +0 -1
- package/es/progress/progress.js +0 -132
- package/es/progress/progress.js.map +0 -1
- package/es/progress/progress.less +0 -82
- package/es/query-form-backup/Field/Composition/FieldPopover.less +0 -35
- package/es/query-form-backup/Field/Composition/index.less +0 -114
- package/es/query-form-backup/index.less +0 -90
- package/es/radio/radio.js +0 -57
- package/es/radio/radio.js.map +0 -1
- package/es/radio/radio.less +0 -43
- package/es/spin/spin.js +0 -36
- package/es/spin/spin.js.map +0 -1
- package/es/spin/spin.less +0 -9
- package/es/steps/assets/background_left.svg +0 -12
- package/es/steps/assets/background_right.svg +0 -12
- package/es/steps/assets/horizontal_line.svg +0 -3
- package/es/steps/assets/vertical_line.svg +0 -3
- package/es/steps/stepStyle/icon.less +0 -51
- package/es/steps/stepStyle/progress-dot.less +0 -10
- package/es/steps/stepStyle/variables.less +0 -8
- package/es/steps/stepStyle/vertical.less +0 -41
- package/es/switch/index.less +0 -45
- package/es/tabs/tabs.less +0 -125
- package/es/time-picker/TimePicker.js +0 -36
- package/es/time-picker/TimePicker.js.map +0 -1
- package/es/time-picker/index.less +0 -38
- package/es/tntd-action/Action.js +0 -117
- package/es/tntd-action/Action.js.map +0 -1
- package/es/tntd-action/index.less +0 -59
- package/es/tntd-select/index.less +0 -7
- package/lib/alert/alert.d.ts +0 -12
- package/lib/alert/alert.d.ts.map +0 -1
- package/lib/alert/alert.js +0 -93
- package/lib/alert/alert.js.map +0 -1
- package/lib/alert/alert.less +0 -128
- package/lib/cascader/cascader.d.ts +0 -10
- package/lib/cascader/cascader.d.ts.map +0 -1
- package/lib/cascader/cascader.js +0 -49
- package/lib/cascader/cascader.js.map +0 -1
- package/lib/cascader/cascader.less +0 -16
- package/lib/checkbox/check.png +0 -0
- package/lib/checkbox/checkbox.d.ts +0 -16
- package/lib/checkbox/checkbox.d.ts.map +0 -1
- package/lib/checkbox/checkbox.js +0 -65
- package/lib/checkbox/checkbox.js.map +0 -1
- package/lib/checkbox/checkbox.less +0 -69
- package/lib/date-picker/DatePicker.d.ts +0 -21
- package/lib/date-picker/DatePicker.d.ts.map +0 -1
- package/lib/date-picker/DatePicker.js +0 -128
- package/lib/date-picker/DatePicker.js.map +0 -1
- package/lib/date-picker/index.less +0 -294
- package/lib/input-number/inputNumber.d.ts +0 -10
- package/lib/input-number/inputNumber.d.ts.map +0 -1
- package/lib/input-number/inputNumber.js +0 -54
- package/lib/input-number/inputNumber.js.map +0 -1
- package/lib/input-number/inputNumber.less +0 -12
- package/lib/modal/index.less +0 -36
- package/lib/popconfirm/index.less +0 -32
- package/lib/popconfirm/popconfirm.d.ts +0 -8
- package/lib/popconfirm/popconfirm.d.ts.map +0 -1
- package/lib/popconfirm/popconfirm.js +0 -61
- package/lib/popconfirm/popconfirm.js.map +0 -1
- package/lib/popover/index.less +0 -57
- package/lib/popover/popover.d.ts +0 -14
- package/lib/popover/popover.d.ts.map +0 -1
- package/lib/popover/popover.js +0 -55
- package/lib/popover/popover.js.map +0 -1
- package/lib/progress/progress.d.ts +0 -12
- package/lib/progress/progress.d.ts.map +0 -1
- package/lib/progress/progress.js +0 -148
- package/lib/progress/progress.js.map +0 -1
- package/lib/progress/progress.less +0 -82
- package/lib/query-form-backup/Field/Composition/FieldPopover.less +0 -35
- package/lib/query-form-backup/Field/Composition/index.less +0 -114
- package/lib/query-form-backup/index.less +0 -90
- package/lib/radio/radio.d.ts +0 -17
- package/lib/radio/radio.d.ts.map +0 -1
- package/lib/radio/radio.js +0 -75
- package/lib/radio/radio.js.map +0 -1
- package/lib/radio/radio.less +0 -43
- package/lib/spin/spin.d.ts +0 -9
- package/lib/spin/spin.d.ts.map +0 -1
- package/lib/spin/spin.js +0 -44
- package/lib/spin/spin.js.map +0 -1
- package/lib/spin/spin.less +0 -9
- package/lib/steps/assets/background_left.svg +0 -12
- package/lib/steps/assets/background_right.svg +0 -12
- package/lib/steps/assets/horizontal_line.svg +0 -3
- package/lib/steps/assets/vertical_line.svg +0 -3
- package/lib/steps/stepStyle/icon.less +0 -51
- package/lib/steps/stepStyle/progress-dot.less +0 -10
- package/lib/steps/stepStyle/variables.less +0 -8
- package/lib/steps/stepStyle/vertical.less +0 -41
- package/lib/switch/index.less +0 -45
- package/lib/tabs/tabs.less +0 -125
- package/lib/time-picker/TimePicker.d.ts +0 -9
- package/lib/time-picker/TimePicker.d.ts.map +0 -1
- package/lib/time-picker/TimePicker.js +0 -55
- package/lib/time-picker/TimePicker.js.map +0 -1
- package/lib/time-picker/index.less +0 -38
- package/lib/tntd-action/Action.d.ts +0 -6
- package/lib/tntd-action/Action.d.ts.map +0 -1
- package/lib/tntd-action/Action.js +0 -141
- package/lib/tntd-action/Action.js.map +0 -1
- package/lib/tntd-action/index.less +0 -59
- package/lib/tntd-select/index.less +0 -7
package/es/steps/steps.js
CHANGED
|
@@ -8,81 +8,55 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
8
8
|
};
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import Icon from '../icon';
|
|
12
|
-
import Ellipsis from '../ellipsis';
|
|
13
11
|
import { ConfigConsumer } from '../config-provider';
|
|
14
12
|
import { default as AntdSteps } from 'antd/es/steps';
|
|
15
13
|
export * from 'antd/es/steps';
|
|
16
14
|
export function Steps(_a) {
|
|
17
15
|
var {
|
|
18
16
|
className,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
labelPlacement
|
|
17
|
+
type,
|
|
18
|
+
children
|
|
22
19
|
} = _a,
|
|
23
|
-
rest = __rest(_a, ["className", "
|
|
20
|
+
rest = __rest(_a, ["className", "type", "children"]);
|
|
21
|
+
let navContainDesc = false;
|
|
22
|
+
if (children) {
|
|
23
|
+
if (Array.isArray(children)) {
|
|
24
|
+
navContainDesc = children.some(child => {
|
|
25
|
+
if (child && child instanceof Object && child.props && child.props instanceof Object && child.props.hasOwnProperty('description')) {
|
|
26
|
+
return child.props.description;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
24
31
|
return React.createElement(ConfigConsumer, null, ({
|
|
25
32
|
getPrefixCls
|
|
26
33
|
}) => {
|
|
27
34
|
const prefixCls = getPrefixCls('steps');
|
|
28
|
-
const tdSteps = !labelPlacement || labelPlacement === 'horizontal';
|
|
29
|
-
let iconsInfo = {};
|
|
30
|
-
if (tdSteps) {
|
|
31
|
-
iconsInfo = {
|
|
32
|
-
icons: {
|
|
33
|
-
finish: React.createElement(Icon, {
|
|
34
|
-
type: size === 'small' ? 'check-circle' : 'step-check',
|
|
35
|
-
className: `${prefixCls}-finish-icon`
|
|
36
|
-
}),
|
|
37
|
-
error: React.createElement(Icon, {
|
|
38
|
-
type: "close-circle",
|
|
39
|
-
className: `${prefixCls}-error-icon`
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
35
|
return React.createElement(AntdSteps, Object.assign({
|
|
45
|
-
className: classNames(
|
|
46
|
-
[
|
|
47
|
-
[`${prefixCls}-
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
labelPlacement: labelPlacement
|
|
36
|
+
className: classNames(prefixCls, 'tnt-steps', {
|
|
37
|
+
[`${prefixCls}-navigation`]: type === 'navigation',
|
|
38
|
+
[`${prefixCls}-navigation-contain-desc`]: type === 'navigation' && navContainDesc
|
|
39
|
+
}, className),
|
|
40
|
+
type: type,
|
|
41
|
+
children: children
|
|
52
42
|
}, rest));
|
|
53
43
|
});
|
|
54
44
|
}
|
|
55
45
|
Steps.Step = function (_a) {
|
|
56
46
|
var {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
subTitle,
|
|
60
|
-
titleEllipsis = true
|
|
47
|
+
description,
|
|
48
|
+
className
|
|
61
49
|
} = _a,
|
|
62
|
-
rest = __rest(_a, ["
|
|
50
|
+
rest = __rest(_a, ["description", "className"]);
|
|
63
51
|
return React.createElement(ConfigConsumer, null, ({
|
|
64
52
|
getPrefixCls
|
|
65
53
|
}) => {
|
|
66
54
|
const prefixCls = getPrefixCls('step');
|
|
67
|
-
const stepTitle = {
|
|
68
|
-
title,
|
|
69
|
-
subTitle
|
|
70
|
-
};
|
|
71
|
-
if (titleEllipsis) {
|
|
72
|
-
stepTitle.title = React.createElement(Ellipsis, {
|
|
73
|
-
suffix: React.createElement(Ellipsis, {
|
|
74
|
-
widthLimit: "30%",
|
|
75
|
-
title: subTitle,
|
|
76
|
-
className: `${prefixCls}-ellipsis-subtitle`
|
|
77
|
-
}),
|
|
78
|
-
title: title
|
|
79
|
-
});
|
|
80
|
-
stepTitle.subTitle = null;
|
|
81
|
-
}
|
|
82
55
|
return React.createElement(AntdSteps.Step, Object.assign({
|
|
83
|
-
className: classNames('tnt-step',
|
|
84
|
-
[`${prefixCls}-
|
|
85
|
-
})
|
|
86
|
-
|
|
56
|
+
className: classNames(prefixCls, 'tnt-step', {
|
|
57
|
+
[`${prefixCls}-navigation-desc`]: !!description
|
|
58
|
+
}, className),
|
|
59
|
+
description: description
|
|
60
|
+
}, rest));
|
|
87
61
|
});
|
|
88
62
|
};
|
package/es/steps/steps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/steps/steps.tsx"],"names":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/steps/steps.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,UAAU,MAAM,YAA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K,CAAC,IAAI,GAAG,UAAU,EAAkD;QAAlD,EAAE,WAAW,EAAE,SAAS,OAA0B,EAArB,IAAI,cAAjC,4BAAmC,CAAF;IACtD,OAAO,CACL,oBAAC,cAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAA;QACtC,OAAO,CACL,oBAAC,SAAS,CAAC,IAAI,kBACb,SAAS,EAAE,UAAU,CACnB,SAAS,EACT,UAAU,EACV;gBACE,CAAC,GAAG,SAAS,kBAAkB,CAAC,EAAE,CAAC,CAAC,WAAW;aAChD,EACD,SAAS,CACV,EACD,WAAW,EAAE,WAAW,IACpB,IAAI,EACR,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA","sourcesContent":["import type { StepsProps as AntdStepsProps } from 'antd/es/steps'\nimport type { StepProps as AntdStepProps } from 'antd/es/steps'\nimport classNames from 'classnames'\nimport React, { ReactNode } from 'react'\n\nimport { ConfigConsumer } from '../config-provider'\nimport { default as AntdSteps } from 'antd/es/steps'\n\nexport * from 'antd/es/steps'\n\nexport interface StepsProps extends AntdStepsProps {\n children?: Array<React.ReactElement>\n}\n\nexport function Steps({ className, type, children, ...rest }: StepsProps) {\n let navContainDesc: boolean = false\n if (children) {\n if (Array.isArray(children)) {\n navContainDesc = children.some((child) => {\n if (\n child &&\n child instanceof Object &&\n child.props &&\n child.props instanceof Object &&\n child.props.hasOwnProperty('description')\n ) {\n return child.props.description\n }\n })\n }\n }\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('steps')\n return (\n <AntdSteps\n className={classNames(\n prefixCls,\n 'tnt-steps',\n {\n [`${prefixCls}-navigation`]: type === 'navigation',\n [`${prefixCls}-navigation-contain-desc`]: type === 'navigation' && navContainDesc,\n },\n className\n )}\n type={type}\n children={children}\n {...rest}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nSteps.Step = function ({ description, className, ...rest }: AntdStepProps) {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n const prefixCls = getPrefixCls('step')\n return (\n <AntdSteps.Step\n className={classNames(\n prefixCls,\n 'tnt-step',\n {\n [`${prefixCls}-navigation-desc`]: !!description,\n },\n className\n )}\n description={description}\n {...rest}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n"]}
|
package/es/steps/style/index.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 周泽飞 zefei.zhou@tongdun.net
|
|
3
|
-
* @Date: 2024-03-14 13:35:59
|
|
4
|
-
* @LastEditors: 周泽飞 zefei.zhou@tongdun.net
|
|
5
|
-
* @LastEditTime: 2024-03-21 13:57:36
|
|
6
|
-
* @FilePath: /tntd/packages/tntd/src/steps/style/index.tsx
|
|
7
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
-
*/
|
|
9
1
|
import '../../style/index.less';
|
|
10
2
|
import './index.less';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/steps/style/index.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/steps/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA","sourcesContent":["import '../../style/index.less'\nimport './index.less'\n"]}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@processing-color: @blue-6;
|
|
15
15
|
@error-color: @red-6;
|
|
16
16
|
@highlight-color: @red-6;
|
|
17
|
-
@warning-color: @gold-
|
|
17
|
+
@warning-color: @gold-6;
|
|
18
18
|
@normal-color: #d9d9d9;
|
|
19
19
|
@white: #fff;
|
|
20
20
|
@black: #000;
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
@font-size-base: 14px;
|
|
61
61
|
@font-size-lg: calc(@font-size-base + 2px);
|
|
62
62
|
@font-size-sm: 12px;
|
|
63
|
-
@font-size-xl: calc(@font-size-base + 6px);
|
|
64
63
|
@heading-1-size: ceil(@font-size-base * 2.71);
|
|
65
64
|
@heading-2-size: ceil(@font-size-base * 2.14);
|
|
66
65
|
@heading-3-size: ceil(@font-size-base * 1.71);
|
|
@@ -449,7 +448,7 @@
|
|
|
449
448
|
@table-header-color: @heading-color;
|
|
450
449
|
@table-header-sort-bg: @background-color-base;
|
|
451
450
|
@table-body-sort-bg: rgba(0, 0, 0, 0.01);
|
|
452
|
-
@table-row-hover-bg:
|
|
451
|
+
@table-row-hover-bg: @primary-1;
|
|
453
452
|
@table-selected-row-color: inherit;
|
|
454
453
|
@table-selected-row-bg: #fafafa;
|
|
455
454
|
@table-body-selected-sort-bg: @table-selected-row-bg;
|
|
@@ -460,8 +459,8 @@
|
|
|
460
459
|
@table-border-radius-base: @border-radius-base;
|
|
461
460
|
@table-footer-bg: @background-color-light;
|
|
462
461
|
@table-footer-color: @heading-color;
|
|
463
|
-
|
|
464
|
-
|
|
462
|
+
@table-header-bg-sm: transparent;
|
|
463
|
+
|
|
465
464
|
// Tag
|
|
466
465
|
// --
|
|
467
466
|
@tag-default-bg: @background-color-light;
|
|
@@ -657,7 +656,7 @@
|
|
|
657
656
|
@alert-info-border-color: ~`colorPalette('@{info-color}', 3) `;
|
|
658
657
|
@alert-info-bg-color: ~`colorPalette('@{info-color}', 1) `;
|
|
659
658
|
@alert-info-icon-color: @info-color;
|
|
660
|
-
@alert-warning-border-color: ~`colorPalette('@{warning-color}',
|
|
659
|
+
@alert-warning-border-color: ~`colorPalette('@{warning-color}', 3) `;
|
|
661
660
|
@alert-warning-bg-color: ~`colorPalette('@{warning-color}', 1) `;
|
|
662
661
|
@alert-warning-icon-color: @warning-color;
|
|
663
662
|
@alert-error-border-color: ~`colorPalette('@{error-color}', 3) `;
|
package/es/switch/style/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/switch/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/switch/style/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,cAAc,CAAA","sourcesContent":["import '../../style/index.less'\nimport './index.less'\n"]}
|
package/es/switch/switch.js
CHANGED
|
@@ -1,47 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
import React, { forwardRef } from 'react';
|
|
1
|
+
import React from 'react';
|
|
10
2
|
import AntdSwitch from 'antd/es/switch';
|
|
11
3
|
import { connectReadonlyComponent } from '../connect';
|
|
12
|
-
import { ConfigConsumer } from 'antd/es/config-provider';
|
|
13
4
|
import './style';
|
|
14
5
|
export * from 'antd/es/switch';
|
|
15
|
-
export const
|
|
16
|
-
var {
|
|
17
|
-
text,
|
|
18
|
-
subText,
|
|
19
|
-
disabled
|
|
20
|
-
} = _a,
|
|
21
|
-
rest = __rest(_a, ["text", "subText", "disabled"]);
|
|
22
|
-
return React.createElement(ConfigConsumer, null, ({
|
|
23
|
-
getPrefixCls
|
|
24
|
-
}) => {
|
|
25
|
-
const prefixCls = getPrefixCls('switch');
|
|
26
|
-
if (!text && !subText) {
|
|
27
|
-
return React.createElement(AntdSwitch, Object.assign({}, rest, {
|
|
28
|
-
disabled: disabled
|
|
29
|
-
}));
|
|
30
|
-
}
|
|
31
|
-
return React.createElement("div", {
|
|
32
|
-
className: `${prefixCls}-wrap`
|
|
33
|
-
}, React.createElement(AntdSwitch, Object.assign({}, rest, {
|
|
34
|
-
disabled: disabled
|
|
35
|
-
})), React.createElement("div", {
|
|
36
|
-
className: `${prefixCls}-text-wrap`
|
|
37
|
-
}, text ? React.createElement("span", {
|
|
38
|
-
className: disabled ? `${prefixCls}-text ${prefixCls}-text-disabled` : `${prefixCls}-text`
|
|
39
|
-
}, text) : '', subText ? React.createElement("div", {
|
|
40
|
-
className: disabled ? `${prefixCls}-subtext ${prefixCls}-subtext-disabled` : `${prefixCls}-subtext`
|
|
41
|
-
}, subText) : ''));
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
export const Switch = connectReadonlyComponent(TntdSwitch, props => React.createElement(TntdSwitch, Object.assign({}, props, {
|
|
6
|
+
export const Switch = connectReadonlyComponent(AntdSwitch, props => React.createElement(AntdSwitch, Object.assign({}, props, {
|
|
45
7
|
disabled: true
|
|
46
8
|
})));
|
|
47
9
|
Switch.displayName = 'Switch';
|
package/es/switch/switch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../src/switch/switch.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../src/switch/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,UAAU,MAAM,gBAAgB,CAAA;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAErD,OAAO,SAAS,CAAA;AAEhB,cAAc,gBAAgB,CAAA;AAM9B,MAAM,CAAC,MAAM,MAAM,GAAG,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CACpE,oBAAC,UAAU,oBAAK,KAAK,IAAE,QAAQ,UAAG,CACnC,CAAoB,CAAA;AAErB,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,eAAe,MAAM,CAAA","sourcesContent":["import React, { forwardRef } from 'react'\nimport type { FC } from 'react'\nimport AntdSwitch from 'antd/es/switch'\nimport type { SwitchProps as AntdSwitchProps } from 'antd/es/switch'\nimport { connectReadonlyComponent } from '../connect'\n\nimport './style'\n\nexport * from 'antd/es/switch'\n\nexport type SwitchProps = AntdSwitchProps & {\n readonly?: boolean\n}\n\nexport const Switch = connectReadonlyComponent(AntdSwitch, (props) => (\n <AntdSwitch {...props} disabled />\n)) as FC<SwitchProps>\n\nSwitch.displayName = 'Switch'\n\nexport default Switch\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-expand-fixed.js","sourceRoot":"","sources":["../../../src/table/hooks/use-expand-fixed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAUzC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,WAAW,GAAG,MAAM,CAAU,cAAc,EAAE,CAAC,CAAA;IACrD,MAAM,YAAY,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAA;IAChD,MAAM,eAAe,GAAG,MAAM,CAAS;QACrC,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,IAAI;KACX,CAAC,CAAA;IACF,MAAM,SAAS,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAA;IACrD,MAAM,QAAQ,GAAG,MAAM,CAA0B,IAAI,CAAC,CAAA;IAEtD,MAAM,MAAM,GAAG,CAAC,GAAgC,EAAE,EAAE;QAClD,MAAM,IAAI,GACP,QAAQ,CAAC,aAAa,CACrB,IAAI,WAAW,CAAC,OAAO,qCAAqC,GAAG,cAAc,C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AAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,CACjC,IAAI,SAAS,iGAAiG,CAC/G,CAAA;QACD,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,YAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;IACzC,CAAC,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,EAAE,EAAE,CAAA;IACN,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA;IAEzB,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,OAAgC,CAAU,CAAA;AACzE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,MAAW,EACX,MAAyD,EACzD,EAAE;IACF,IAAI,GAAG,GAAoB,EAAE,CAAA;IAC7B,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;QAChC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;KAC9B;SAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QACrC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;KACrB;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import { useEffect, useRef } from 'react'\nimport { makeRandomCode } from '../utils'\n\nexport type keyType = string | number | null\n\ninterface OldDom {\n main: HTMLDivElement | null\n right: HTMLDivElement | null\n left: HTMLDivElement | null\n}\n\nexport const useExpandFixed = () => {\n const curTableKey = useRef<keyType>(makeRandomCode())\n const activeKeyRef = useRef<string | null>(null)\n const oldActiveKeyRef = useRef<OldDom>({\n main: null,\n right: null,\n left: null,\n })\n const container = useRef<HTMLDivElement | null>(null)\n const observer = useRef<MutationObserver | null>(null)\n\n const getDom = (key: string | number | undefined) => {\n const main =\n (document.querySelector(\n `.${curTableKey.current} .ant-table-scroll [data-row-key=\"${key}-extra-row\"]`\n ) as HTMLDivElement) ||\n (document.querySelector(\n `.${curTableKey.current} .ant-table-default [data-row-key=\"${key}-extra-row\"]`\n ) as HTMLDivElement)\n const right = document.querySelector(\n `.${curTableKey.current} .ant-table-fixed-right [data-row-key=\"${key}-extra-row\"]`\n ) as HTMLDivElement\n const left = document.querySelector(\n `.${curTableKey.current} .ant-table-fixed-left [data-row-key=\"${key}-extra-row\"]`\n ) as HTMLDivElement\n return [main, right, left]\n }\n\n const expand = async () => {\n const [main, right, left] = getDom(String(activeKeyRef.current) || '')\n const border = 2\n const height = main?.offsetHeight - border || 0\n if (right) {\n right.setAttribute('style', `display: inline-block; height: ${height}px; overflow: hidden;`)\n }\n\n if (left) {\n left.setAttribute('style', `display: inline-block; height: ${height}px; overflow: hidden;`)\n }\n\n if (main) {\n // 解决 expandIconAsCell为true 且 iconCell的td元素为display: none;时, 展开内容滚动到最右边,会多出一部分iconCell所占据的空间 的问题\n const td = main.childNodes[1] as HTMLDivElement\n\n const colspan = td.getAttribute('colspan') || 0\n const Oldcolspan = td.getAttribute('oldcolspan') || 0\n const newColspan = Oldcolspan ? Oldcolspan : Number(colspan) + 1 + ''\n if (!Oldcolspan) td.setAttribute('oldcolspan', newColspan)\n\n td.setAttribute('colspan', newColspan)\n //\n }\n\n oldActiveKeyRef.current = {\n main,\n right,\n left,\n }\n }\n\n const ob = () => {\n const classname = curTableKey.current\n if (!classname) return\n\n container.current = document.querySelector(\n `.${classname}.ant-table-wrapper.collapse-panel > .ant-spin-nested-loading > .ant-spin-container > .ant-table`\n ) as HTMLDivElement\n\n observer.current = new MutationObserver(expand)\n if (container.current) {\n observer.current.observe(container.current, {\n childList: true, // 子节点的变动\n attributes: true,\n })\n }\n }\n\n const setChangedKey = (key: string) => {\n activeKeyRef.current = key\n }\n\n const trigger = (key: string) => {\n setChangedKey(key)\n const className = curTableKey.current\n if (!className) return\n const dom = document?.querySelector(\n `.${className}.ant-table-wrapper.collapse-panel > .ant-spin-nested-loading > .ant-spin-container > .ant-table`\n )\n dom?.setAttribute('c-data', 'Mutation')\n }\n\n useEffect(() => {\n ob()\n }, [curTableKey.current])\n\n return [curTableKey.current, trigger as (key: string) => void] as const\n}\n\nexport const findRowKey = (\n record: any,\n rowKey: string | ((record: any, index: number) => string)\n) => {\n let res: string | number = ''\n if (typeof rowKey === 'function') {\n res = [record].map(rowKey)[0]\n } else if (typeof rowKey === 'string') {\n res = record[rowKey]\n }\n\n return res\n}\n"]}
|
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
position: relative;
|
|
4
4
|
background-clip: padding-box;
|
|
5
5
|
}
|
|
6
|
+
.ant-table-thead{
|
|
7
|
+
tr:hover{
|
|
8
|
+
th{
|
|
9
|
+
.react-resizable-handle{
|
|
10
|
+
&::before{
|
|
11
|
+
content:'';
|
|
12
|
+
height: 20px;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top:50%;
|
|
15
|
+
margin-top: -10px;
|
|
16
|
+
left:50%;
|
|
17
|
+
width:1px;
|
|
18
|
+
background-color: @grey-split;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
6
24
|
|
|
7
25
|
.react-resizable-handle {
|
|
8
26
|
position: absolute;
|
|
@@ -229,18 +229,28 @@
|
|
|
229
229
|
transition: all 0.3s, border 0s;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
&-thead > tr,
|
|
232
233
|
&-tbody > tr {
|
|
233
234
|
transition: all 0.3s, height 0s;
|
|
234
235
|
&.@{table-prefix-cls}-row-hover,
|
|
235
236
|
&:hover {
|
|
236
|
-
&:not(.@{table-prefix-cls}-expanded-row) {
|
|
237
|
-
|
|
238
|
-
position: relative;
|
|
239
|
-
> td {
|
|
240
|
-
background: @table-row-hover-bg;
|
|
241
|
-
}
|
|
237
|
+
&:not(.@{table-prefix-cls}-expanded-row) > td {
|
|
238
|
+
background: @table-row-hover-bg;
|
|
242
239
|
}
|
|
243
240
|
}
|
|
241
|
+
// &.@{table-prefix-cls}-row-selected > td {
|
|
242
|
+
// &.@{table-prefix-cls}-column-sort {
|
|
243
|
+
// background: @table-body-selected-sort-bg;
|
|
244
|
+
// }
|
|
245
|
+
// }
|
|
246
|
+
// &:hover {
|
|
247
|
+
// &.@{table-prefix-cls}-row-selected > td {
|
|
248
|
+
// background: @table-selected-row-hover-bg;
|
|
249
|
+
// &.@{table-prefix-cls}-column-sort {
|
|
250
|
+
// background: @table-body-selected-sort-bg;
|
|
251
|
+
// }
|
|
252
|
+
// }
|
|
253
|
+
// }
|
|
244
254
|
}
|
|
245
255
|
|
|
246
256
|
&-thead > tr:hover {
|
|
@@ -332,11 +342,7 @@
|
|
|
332
342
|
background: @table-body-sort-bg;
|
|
333
343
|
}
|
|
334
344
|
|
|
335
|
-
&-thead > tr > th
|
|
336
|
-
padding: calc(@table-padding-vertical - 4px) @table-padding-horizontal;
|
|
337
|
-
overflow-wrap: break-word;
|
|
338
|
-
}
|
|
339
|
-
|
|
345
|
+
&-thead > tr > th,
|
|
340
346
|
&-tbody > tr > td {
|
|
341
347
|
padding: @table-padding-vertical @table-padding-horizontal;
|
|
342
348
|
overflow-wrap: break-word;
|
|
@@ -381,9 +387,9 @@
|
|
|
381
387
|
}
|
|
382
388
|
|
|
383
389
|
&-bordered {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
390
|
+
border: @border-width-base @border-style-base @border-color-split;
|
|
391
|
+
border-radius: @border-radius-base;
|
|
392
|
+
overflow: hidden;
|
|
387
393
|
// .@{table-prefix-cls}-header > table,
|
|
388
394
|
// .@{table-prefix-cls}-body > table,
|
|
389
395
|
// .@{table-prefix-cls}-fixed-left table,
|
|
@@ -394,9 +400,6 @@
|
|
|
394
400
|
// }
|
|
395
401
|
|
|
396
402
|
&.@{table-prefix-cls}-empty {
|
|
397
|
-
.@{table-prefix-cls}-body > table {
|
|
398
|
-
border-radius: @border-radius-base @border-radius-base 0 0;
|
|
399
|
-
}
|
|
400
403
|
.@{table-prefix-cls}-placeholder {
|
|
401
404
|
// border-right: @border-width-base @border-style-base @border-color-split;
|
|
402
405
|
// border-left: @border-width-base @border-style-base @border-color-split;
|
|
@@ -650,7 +653,6 @@
|
|
|
650
653
|
&-scroll {
|
|
651
654
|
overflow: auto;
|
|
652
655
|
overflow-x: hidden;
|
|
653
|
-
border-radius: @border-radius-base @border-radius-base 0 0;
|
|
654
656
|
table {
|
|
655
657
|
min-width: 100%;
|
|
656
658
|
|
|
@@ -681,7 +683,7 @@
|
|
|
681
683
|
&-fixed-header &-scroll &-header {
|
|
682
684
|
margin-bottom: -20px;
|
|
683
685
|
padding-bottom: 20px;
|
|
684
|
-
|
|
686
|
+
overflow: scroll;
|
|
685
687
|
// Workaround for additional scroll bar on the table header
|
|
686
688
|
// https://github.com/ant-design/ant-design/issues/6515#issuecomment-419634369
|
|
687
689
|
opacity: 0.9999;
|
package/es/table/style/size.less
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@table-padding-vertical-md: @table-padding-vertical * 3 / 4;
|
|
2
2
|
@table-padding-horizontal-md: @table-padding-horizontal / 2;
|
|
3
|
-
@table-padding-
|
|
3
|
+
@table-padding-horizontal-md: @table-padding-horizontal;
|
|
4
|
+
@table-padding-vertical-sm: @table-padding-vertical / 2;
|
|
4
5
|
@table-padding-horizontal-sm: @table-padding-horizontal / 2;
|
|
5
6
|
|
|
6
7
|
.@{table-prefix-cls}-middle {
|
|
@@ -31,14 +32,14 @@
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
tr.@{table-prefix-cls}-expanded-row td > .@{table-prefix-cls}-wrapper {
|
|
34
|
-
margin: -@table-padding-vertical-md -@table-padding-horizontal / 2
|
|
35
|
-
|
|
35
|
+
margin: -@table-padding-vertical-md -@table-padding-horizontal / 2 calc(-@table-padding-vertical-md -
|
|
36
|
+
1px);
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
.@{table-prefix-cls}-small {
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
border: @border-width-base @border-style-base @border-color-split;
|
|
42
|
+
border-radius: @table-border-radius-base;
|
|
42
43
|
|
|
43
44
|
> .@{table-prefix-cls}-title,
|
|
44
45
|
> .@{table-prefix-cls}-content > .@{table-prefix-cls}-footer {
|
|
@@ -120,7 +121,7 @@
|
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
&.@{table-prefix-cls}-bordered {
|
|
123
|
-
|
|
124
|
+
border-right: 0;
|
|
124
125
|
|
|
125
126
|
.@{table-prefix-cls}-title {
|
|
126
127
|
border: 0;
|
|
@@ -128,9 +129,9 @@
|
|
|
128
129
|
border-bottom: @border-width-base @border-style-base @border-color-split;
|
|
129
130
|
}
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
.@{table-prefix-cls}-content {
|
|
133
|
+
border-right: @border-width-base @border-style-base @border-color-split;
|
|
134
|
+
}
|
|
134
135
|
|
|
135
136
|
.@{table-prefix-cls}-footer {
|
|
136
137
|
border: 0;
|
|
@@ -165,8 +166,8 @@
|
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
tr.@{table-prefix-cls}-expanded-row td > .@{table-prefix-cls}-wrapper {
|
|
168
|
-
margin: -@table-padding-vertical-sm -@table-padding-horizontal / 2
|
|
169
|
-
|
|
169
|
+
margin: -@table-padding-vertical-sm -@table-padding-horizontal / 2 calc(-@table-padding-vertical-sm -
|
|
170
|
+
1px);
|
|
170
171
|
}
|
|
171
172
|
|
|
172
173
|
// https://github.com/ant-design/ant-design/issues/19287#issuecomment-544368967
|
package/es/table/table.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _isString from "lodash/isString";
|
|
2
|
-
import _isFunction from "lodash/isFunction";
|
|
3
1
|
var __rest = this && this.__rest || function (s, e) {
|
|
4
2
|
var t = {};
|
|
5
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -20,14 +18,21 @@ import { TableContext } from './context';
|
|
|
20
18
|
import { useColumnSetting, useExpandFixed } from './hooks';
|
|
21
19
|
import { normalizeColumns } from './utils';
|
|
22
20
|
import { titleCaseUpper } from '../utils/lang';
|
|
21
|
+
import { TotalShower } from './total-shower';
|
|
23
22
|
import { getLanguage } from '../prev-locale';
|
|
24
|
-
import
|
|
23
|
+
import 'rc-resize-observer';
|
|
25
24
|
const sizeWidthMap = {
|
|
26
25
|
default: 40,
|
|
27
26
|
middle: 20,
|
|
28
27
|
small: 20,
|
|
29
28
|
xs: 16 // 8
|
|
30
29
|
};
|
|
30
|
+
const getDefaultPagination = locale => ({
|
|
31
|
+
showTotal: total => React.createElement(TotalShower, {
|
|
32
|
+
total: total,
|
|
33
|
+
locale: locale
|
|
34
|
+
})
|
|
35
|
+
});
|
|
31
36
|
// 判断是否是特殊的tooltip
|
|
32
37
|
// const checkIsPrompt = (dom: any): boolean => {
|
|
33
38
|
// let isPrompt: boolean = false
|
|
@@ -51,19 +56,18 @@ export const Table = _a => {
|
|
|
51
56
|
children,
|
|
52
57
|
sticky = false,
|
|
53
58
|
shadowed,
|
|
54
|
-
striped =
|
|
59
|
+
striped = false,
|
|
55
60
|
showCellBorders = false,
|
|
56
|
-
pagination,
|
|
61
|
+
// pagination,
|
|
57
62
|
enableToolbar = false,
|
|
58
63
|
refresh,
|
|
59
64
|
upperCaseIgnore,
|
|
60
65
|
unUpperConverted,
|
|
61
66
|
// 强制不要转换
|
|
62
67
|
unTooltip,
|
|
63
|
-
smallPadding
|
|
64
|
-
rowClassName
|
|
68
|
+
smallPadding
|
|
65
69
|
} = _a,
|
|
66
|
-
rest = __rest(_a, ["className", "locale", "bordered", "size", "storageKey", "columns", "children", "sticky", "shadowed", "striped", "showCellBorders", "
|
|
70
|
+
rest = __rest(_a, ["className", "locale", "bordered", "size", "storageKey", "columns", "children", "sticky", "shadowed", "striped", "showCellBorders", "enableToolbar", "refresh", "upperCaseIgnore", "unUpperConverted", "unTooltip", "smallPadding"]);
|
|
67
71
|
const tableContainer = useRef(null);
|
|
68
72
|
// const [innerSize, setInnerSize] = useLocalStorage<TableProps<T>['size']>(
|
|
69
73
|
// TABLE_SIZE_STORAGE_KEY,
|
|
@@ -71,32 +75,6 @@ export const Table = _a => {
|
|
|
71
75
|
// )
|
|
72
76
|
const normalizedColumns = useMemo(() => columns || normalizeColumns(children), [children, columns]);
|
|
73
77
|
const [displayColumns, columnSetting, setColumnSetting] = useColumnSetting(normalizedColumns, storageKey);
|
|
74
|
-
const getRowClassName = prefixCls => {
|
|
75
|
-
var _a;
|
|
76
|
-
if (striped || rowClassName || ((_a = rest.rowSelection) === null || _a === void 0 ? void 0 : _a.getCheckboxProps)) {
|
|
77
|
-
return (record, index) => {
|
|
78
|
-
const back = [];
|
|
79
|
-
if (rowClassName) {
|
|
80
|
-
if (_isFunction(rowClassName)) {
|
|
81
|
-
back.push(rowClassName(record, index));
|
|
82
|
-
} else if (_isString(rowClassName)) {
|
|
83
|
-
back.push(rowClassName);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (striped && index % 2 === 1) {
|
|
87
|
-
back.push(`${prefixCls}-row-even`);
|
|
88
|
-
}
|
|
89
|
-
// if (rest.rowSelection?.getCheckboxProps) {
|
|
90
|
-
// const checkboxProps: any = rest.rowSelection.getCheckboxProps(record)
|
|
91
|
-
// if (checkboxProps && checkboxProps.disabled) {
|
|
92
|
-
// back.push(`${prefixCls}-row-disabled`)
|
|
93
|
-
// }
|
|
94
|
-
// }
|
|
95
|
-
return back.join(' ');
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
return rowClassName;
|
|
99
|
-
};
|
|
100
78
|
const [fixedWidth, setFixedWidth] = useState(Number);
|
|
101
79
|
const lang = getLanguage();
|
|
102
80
|
let newColumns = displayColumns;
|
|
@@ -221,37 +199,33 @@ export const Table = _a => {
|
|
|
221
199
|
defaultLocale: locale
|
|
222
200
|
}, localeObject => {
|
|
223
201
|
// const locale = localeObject as Record<string, string>
|
|
224
|
-
const paginationConfig = pagination
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
columns: newColumns,
|
|
252
|
-
rowClassName: getRowClassName(prefixCls),
|
|
253
|
-
pagination: paginationConfig
|
|
254
|
-
}, rest, sticky ? stickyProps : {})));
|
|
202
|
+
// const paginationConfig = pagination ? getDefaultPagination(locale) : pagination
|
|
203
|
+
return (
|
|
204
|
+
// <ResizeObserver
|
|
205
|
+
// onResize={({ width }) => {
|
|
206
|
+
// setFixedWidth(width)
|
|
207
|
+
// }}
|
|
208
|
+
// >
|
|
209
|
+
React.createElement(AntdTable, Object.assign({
|
|
210
|
+
className: classNames(
|
|
211
|
+
// prefixCls,
|
|
212
|
+
'tnt-table-wrapper', `${tableKey} collapse-panel`, {
|
|
213
|
+
[`${prefixCls}-borderless`]: !bordered,
|
|
214
|
+
[`${prefixCls}-hide-cell-borders`]: !showCellBorders,
|
|
215
|
+
[`${prefixCls}-size-small`]: size === 'small',
|
|
216
|
+
[`${prefixCls}-size-middle`]: size === 'middle',
|
|
217
|
+
[`${prefixCls}-striped`]: striped,
|
|
218
|
+
[`${prefixCls}-shadowed`]: shadowed,
|
|
219
|
+
[`${prefixCls}-small-padding`]: smallPadding,
|
|
220
|
+
[`${prefixCls}-sticky`]: sticky
|
|
221
|
+
}, className),
|
|
222
|
+
locale: locale,
|
|
223
|
+
bordered: bordered,
|
|
224
|
+
size: size,
|
|
225
|
+
columns: newColumns
|
|
226
|
+
}, rest, sticky ? stickyProps : {}))
|
|
227
|
+
// </ResizeObserver>
|
|
228
|
+
);
|
|
255
229
|
}));
|
|
256
230
|
}));
|
|
257
231
|
};
|