tntd 3.0.10 → 3.0.11-beta.1
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/array-input/index.js +10 -3
- package/es/array-input/index.js.map +1 -1
- package/es/index.js +2 -1
- package/es/index.js.map +1 -1
- package/es/locale/en_US.js +16 -0
- package/es/locale/en_US.js.map +1 -1
- package/es/locale/zh_CN.js +16 -0
- package/es/locale/zh_CN.js.map +1 -1
- package/es/prev-locale.js +32 -2
- package/es/prev-locale.js.map +1 -1
- package/es/query-list-scene/QueryForm.js +6 -3
- package/es/query-list-scene/QueryForm.js.map +1 -1
- package/es/query-list-scene/index.less +4 -0
- package/es/table/index.js +2 -2
- package/es/table/index.js.map +1 -1
- package/es/table/resizableTable/index.js +87 -0
- package/es/table/resizableTable/index.js.map +1 -0
- package/es/table/resizableTable/index.less +36 -0
- package/es/table/table-hoc.js +26 -0
- package/es/table/table-hoc.js.map +1 -0
- package/es/tabs/tabs.less +23 -0
- package/es/title/index.less +4 -1
- package/es/tntd-reference/AHref/index.js +39 -0
- package/es/tntd-reference/AHref/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.js +153 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchCheck/index.less +21 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.js +102 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.js.map +1 -0
- package/es/tntd-reference/ReferenceBatchDrawer/index.less +0 -0
- package/es/tntd-reference/ReferenceCheck/index.js +117 -0
- package/es/tntd-reference/ReferenceCheck/index.js.map +1 -0
- package/es/tntd-reference/ReferenceCheck/index.less +10 -0
- package/es/tntd-reference/ReferenceDrawer/index.js +69 -0
- package/es/tntd-reference/ReferenceDrawer/index.js.map +1 -0
- package/es/tntd-reference/ReferenceDrawer/index.less +0 -0
- package/es/tntd-reference/ReferenceInfo/index.js +150 -0
- package/es/tntd-reference/ReferenceInfo/index.js.map +1 -0
- package/es/tntd-reference/ReferenceInfo/index.less +31 -0
- package/es/tntd-reference/index.js +13 -0
- package/es/tntd-reference/index.js.map +1 -0
- package/es/tntd-virtual-tree/index.js +14 -3
- package/es/tntd-virtual-tree/index.js.map +1 -1
- package/es/tntd-virtual-tree/index.less +2 -42
- package/es/tntd-virtual-tree-select/index.js +95 -21
- package/es/tntd-virtual-tree-select/index.js.map +1 -1
- package/es/tntd-virtual-tree-select/utils.js +20 -124
- package/es/tntd-virtual-tree-select/utils.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/alert.js +2 -2
- package/lib/alert/index.js +1 -1
- package/lib/array-input/index.d.ts.map +1 -1
- package/lib/array-input/index.js +22 -13
- package/lib/array-input/index.js.map +1 -1
- package/lib/button/button.js +2 -2
- package/lib/cascader/cascader.js +1 -1
- package/lib/check-card/group.js +8 -8
- package/lib/check-card/index.js +6 -6
- package/lib/checkbox/checkbox.js +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/DatePicker.js +1 -1
- package/lib/descriptions/descriptions.js +5 -5
- package/lib/development-login/LoginModal.js +6 -6
- package/lib/development-login/index.js +4 -4
- package/lib/drawer/drawer.js +2 -2
- 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/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.js +1 -1
- 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.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -3
- package/lib/index.js.map +1 -1
- package/lib/input/input.js +2 -2
- package/lib/input-number/inputNumber.js +1 -1
- package/lib/label/index.js +2 -2
- package/lib/loading-button/index.js +5 -5
- package/lib/locale/default.d.ts +16 -0
- package/lib/locale/default.d.ts.map +1 -1
- package/lib/locale/default.js +1 -1
- package/lib/locale/en_US.d.ts +16 -0
- package/lib/locale/en_US.d.ts.map +1 -1
- package/lib/locale/en_US.js +17 -1
- package/lib/locale/en_US.js.map +1 -1
- package/lib/locale/zh_CN.d.ts +16 -0
- package/lib/locale/zh_CN.d.ts.map +1 -1
- package/lib/locale/zh_CN.js +17 -1
- package/lib/locale/zh_CN.js.map +1 -1
- package/lib/modal/modal.js +1 -1
- package/lib/notification/assets/index.js +1 -1
- package/lib/notification/index.js +1 -1
- package/lib/notification/notification.js +1 -1
- package/lib/page/Box.js +1 -1
- package/lib/page/index.js +7 -7
- package/lib/page-container/index.js +1 -1
- package/lib/page-loading/index.js +1 -1
- package/lib/popconfirm/popconfirm.js +1 -1
- package/lib/popover/popover.js +1 -1
- package/lib/prev-locale.d.ts +42 -0
- package/lib/prev-locale.d.ts.map +1 -1
- package/lib/prev-locale.js +32 -2
- package/lib/prev-locale.js.map +1 -1
- package/lib/preview-text/index.js +7 -7
- package/lib/progress/progress.js +2 -2
- 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-form-v3/Field/Checkbox.js +1 -1
- package/lib/query-form-v3/Field/Composition/FieldPopover.js +5 -5
- package/lib/query-form-v3/Field/Composition/Select.js +6 -6
- package/lib/query-form-v3/Field/Composition/index.js +9 -9
- package/lib/query-form-v3/Field/Composition/utils.js +1 -1
- package/lib/query-form-v3/Field/Select.js +6 -6
- package/lib/query-form-v3/Field/SelectInput.js +6 -6
- package/lib/query-form-v3/Field/fieldsMap.js +1 -1
- package/lib/query-form-v3/Field/index.js +10 -10
- package/lib/query-form-v3/createActions.js +1 -1
- package/lib/query-form-v3/index.js +6 -6
- package/lib/query-form-v3/useForm.js +1 -1
- package/lib/query-list-scene/List.js +13 -13
- package/lib/query-list-scene/QueryForm.d.ts +2 -2
- package/lib/query-list-scene/QueryForm.d.ts.map +1 -1
- package/lib/query-list-scene/QueryForm.js +19 -17
- 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 +4 -0
- package/lib/query-list-scene/useActions.js +1 -1
- package/lib/radio/radio.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/select/select.js +2 -2
- package/lib/spin/spin.js +1 -1
- package/lib/steps/steps.js +2 -2
- package/lib/svg-components/index.js +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/index.d.ts +2 -2
- package/lib/table/index.d.ts.map +1 -1
- package/lib/table/index.js +7 -7
- package/lib/table/index.js.map +1 -1
- package/lib/table/resizableTable/index.d.ts +12 -0
- package/lib/table/resizableTable/index.d.ts.map +1 -0
- package/lib/table/resizableTable/index.js +110 -0
- package/lib/table/resizableTable/index.js.map +1 -0
- package/lib/table/resizableTable/index.less +36 -0
- package/lib/table/table-hoc.d.ts +7 -0
- package/lib/table/table-hoc.d.ts.map +1 -0
- package/lib/table/table-hoc.js +34 -0
- package/lib/table/table-hoc.js.map +1 -0
- package/lib/table/table.js +9 -9
- package/lib/table/table.stories.d.ts +1 -1
- package/lib/table/table.stories.js +2 -2
- package/lib/table/total-shower.js +1 -1
- package/lib/table/utils.js +1 -1
- package/lib/table-container/index.js +1 -1
- package/lib/tabs/tabs.js +2 -2
- package/lib/tabs/tabs.less +23 -0
- package/lib/tabs-container/index.js +1 -1
- package/lib/tag/tag.js +2 -2
- package/lib/time-picker/TimePicker.js +1 -1
- package/lib/time-picker/index.js +1 -1
- package/lib/title/index.js +1 -1
- package/lib/title/index.less +4 -1
- package/lib/tntd-action/Action.js +9 -9
- package/lib/tntd-action/index.js +8 -8
- 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.js +2 -2
- package/lib/tntd-cascader/AntdCascader/index.js +7 -7
- 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 +7 -7
- 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.d.ts +4 -0
- package/lib/tntd-reference/AHref/index.d.ts.map +1 -0
- package/lib/tntd-reference/AHref/index.js +44 -0
- package/lib/tntd-reference/AHref/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.d.ts +3 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.js +165 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchCheck/index.less +21 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js +126 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceBatchDrawer/index.less +0 -0
- package/lib/tntd-reference/ReferenceCheck/index.d.ts +3 -0
- package/lib/tntd-reference/ReferenceCheck/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceCheck/index.js +126 -0
- package/lib/tntd-reference/ReferenceCheck/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceCheck/index.less +10 -0
- package/lib/tntd-reference/ReferenceDrawer/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceDrawer/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceDrawer/index.js +93 -0
- package/lib/tntd-reference/ReferenceDrawer/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceDrawer/index.less +0 -0
- package/lib/tntd-reference/ReferenceInfo/index.d.ts +4 -0
- package/lib/tntd-reference/ReferenceInfo/index.d.ts.map +1 -0
- package/lib/tntd-reference/ReferenceInfo/index.js +164 -0
- package/lib/tntd-reference/ReferenceInfo/index.js.map +1 -0
- package/lib/tntd-reference/ReferenceInfo/index.less +31 -0
- package/lib/tntd-reference/index.d.ts +15 -0
- package/lib/tntd-reference/index.d.ts.map +1 -0
- package/lib/tntd-reference/index.js +20 -0
- package/lib/tntd-reference/index.js.map +1 -0
- package/lib/tntd-second-page/index.js +1 -1
- package/lib/tntd-select/DropDownWrap.js +8 -8
- package/lib/tntd-select/index.js +10 -9
- package/lib/tntd-virtual-tree/index.d.ts +3 -1
- package/lib/tntd-virtual-tree/index.d.ts.map +1 -1
- package/lib/tntd-virtual-tree/index.js +23 -12
- package/lib/tntd-virtual-tree/index.js.map +1 -1
- package/lib/tntd-virtual-tree/index.less +2 -42
- package/lib/tntd-virtual-tree/utils.js +28 -28
- package/lib/tntd-virtual-tree-select/index.d.ts +12 -4
- package/lib/tntd-virtual-tree-select/index.d.ts.map +1 -1
- package/lib/tntd-virtual-tree-select/index.js +99 -20
- package/lib/tntd-virtual-tree-select/index.js.map +1 -1
- package/lib/tntd-virtual-tree-select/utils.d.ts +2 -9
- package/lib/tntd-virtual-tree-select/utils.d.ts.map +1 -1
- package/lib/tntd-virtual-tree-select/utils.js +28 -147
- package/lib/tntd-virtual-tree-select/utils.js.map +1 -1
- package/lib/tooltip/tooltip.js +1 -1
- package/lib/upload/index.js +1 -1
- package/lib/utils/checkAuth.js +4 -4
- package/lib/utils/index.js +9 -9
- package/lib/utils/lang.js +3 -3
- package/lib/water-mark/index.js +5 -5
- package/package.json +4 -2
- package/es/tntd-virtual-tree-select/VirtualTree.js +0 -125
- package/es/tntd-virtual-tree-select/VirtualTree.js.map +0 -1
- package/es/tntd-virtual-tree-select/tree.less +0 -29
- package/lib/tntd-virtual-tree-select/VirtualTree.d.ts +0 -13
- package/lib/tntd-virtual-tree-select/VirtualTree.d.ts.map +0 -1
- package/lib/tntd-virtual-tree-select/VirtualTree.js +0 -155
- package/lib/tntd-virtual-tree-select/VirtualTree.js.map +0 -1
- package/lib/tntd-virtual-tree-select/tree.less +0 -29
package/lib/segmented/index.d.ts
CHANGED
|
@@ -18,6 +18,6 @@ export interface SegmentedProps extends Omit<RCSegmentedProps, 'size' | 'options
|
|
|
18
18
|
block?: boolean;
|
|
19
19
|
size?: SizeType;
|
|
20
20
|
}
|
|
21
|
-
declare const Segmented: React.ForwardRefExoticComponent<Pick<SegmentedProps, "action" | "type" | "style" | "prefixCls" | "className" | "children" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "summary" | "title" | "pattern" | "target" | "lang" | "about" | "as" | "onClick" | "download" | "href" | "hrefLang" | "media" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "list" | "step" | "size" | "shape" | "block" | "key" | "width" | "height" | "src" | "max" | "method" | "min" | "crossOrigin" | "direction" | "checked" | "options" | "open" | "multiple" | "wrap" | "start" | "acceptCharset" | "autoComplete" | "encType" | "noValidate" | "motionName" | "htmlFor" | "required" | "accept" | "alt" | "capture" | "maxLength" | "minLength" | "readOnly" | "cols" | "rows" | "headers" | "allowFullScreen" | "allowTransparency" | "async" | "autoPlay" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "
|
|
21
|
+
declare const Segmented: React.ForwardRefExoticComponent<Pick<SegmentedProps, "action" | "type" | "style" | "prefixCls" | "className" | "children" | "default" | "cite" | "data" | "form" | "label" | "slot" | "span" | "summary" | "title" | "pattern" | "target" | "lang" | "about" | "as" | "onClick" | "download" | "href" | "hrefLang" | "media" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "list" | "step" | "size" | "shape" | "block" | "key" | "width" | "height" | "src" | "max" | "method" | "min" | "crossOrigin" | "direction" | "checked" | "options" | "open" | "multiple" | "wrap" | "start" | "acceptCharset" | "autoComplete" | "encType" | "noValidate" | "motionName" | "htmlFor" | "required" | "accept" | "alt" | "capture" | "maxLength" | "minLength" | "readOnly" | "cols" | "rows" | "colSpan" | "headers" | "allowFullScreen" | "allowTransparency" | "async" | "autoPlay" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "classID" | "controls" | "coords" | "dateTime" | "defer" | "frameBorder" | "high" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "mediaGroup" | "muted" | "optimum" | "playsInline" | "poster" | "preload" | "reversed" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "sizes" | "srcDoc" | "srcLang" | "srcSet" | "useMap" | "wmode" | "rootClassName"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
22
|
export default Segmented;
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/segmented/index.js
CHANGED
|
@@ -10,8 +10,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
require("./index.less");
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function _defineProperty(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
17
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
package/lib/select/select.js
CHANGED
|
@@ -15,9 +15,9 @@ var _prevLocale = require("../prev-locale");
|
|
|
15
15
|
var _utils = require("../utils");
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
18
|
-
function _interopRequireDefault(
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
19
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
20
|
-
function _defineProperty(
|
|
20
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
21
21
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
22
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
23
23
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
package/lib/spin/spin.js
CHANGED
|
@@ -10,7 +10,7 @@ var _configProvider = require("antd/lib/config-provider");
|
|
|
10
10
|
var _spin = _interopRequireDefault(require("antd/lib/spin"));
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
12
|
require("./spin.less");
|
|
13
|
-
function _interopRequireDefault(
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
16
|
/*
|
package/lib/steps/steps.js
CHANGED
|
@@ -26,9 +26,9 @@ Object.keys(_steps).forEach(function (key) {
|
|
|
26
26
|
});
|
|
27
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
28
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
29
|
-
function _interopRequireDefault(
|
|
29
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
30
30
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
31
|
-
function _defineProperty(
|
|
31
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
32
32
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
33
33
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
34
34
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
@@ -73,4 +73,4 @@ var _illustrationNoChart = _interopRequireDefault(require("./illustration-no-cha
|
|
|
73
73
|
var _illustrationNoResult = _interopRequireDefault(require("./illustration-no-result"));
|
|
74
74
|
var _illustrationOffline = _interopRequireDefault(require("./illustration-offline"));
|
|
75
75
|
var _illustrationSuccess = _interopRequireDefault(require("./illustration-success"));
|
|
76
|
-
function _interopRequireDefault(
|
|
76
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useColumnSetting = void 0;
|
|
7
7
|
var _hooks = require("@stellaris/hooks");
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
function _slicedToArray(
|
|
9
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
10
10
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
-
function _unsupportedIterableToArray(
|
|
12
|
-
function _arrayLikeToArray(
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
14
|
-
function _arrayWithHoles(
|
|
14
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
15
15
|
var useColumnSetting = exports.useColumnSetting = function useColumnSetting(columns, storageKey) {
|
|
16
16
|
var _useLocalStorageMayEm = (0, _hooks.useLocalStorageMayEmpty)(storageKey, []),
|
|
17
17
|
_useLocalStorageMayEm2 = _slicedToArray(_useLocalStorageMayEm, 2),
|
|
@@ -8,14 +8,14 @@ exports.useExpandFixed = exports.findRowKey = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _utils = require("../utils");
|
|
10
10
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
11
|
-
function _slicedToArray(
|
|
11
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
12
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(
|
|
14
|
-
function _arrayLikeToArray(
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
15
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
|
-
function _arrayWithHoles(
|
|
17
|
-
function asyncGeneratorStep(
|
|
18
|
-
function _asyncToGenerator(
|
|
16
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
17
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
18
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
19
19
|
var useExpandFixed = exports.useExpandFixed = function useExpandFixed() {
|
|
20
20
|
var curTableKey = (0, _react.useRef)((0, _utils.makeRandomCode)());
|
|
21
21
|
var activeKeyRef = (0, _react.useRef)(null);
|
package/lib/table/index.d.ts
CHANGED
package/lib/table/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,cAAc,CAAA;AACrB,OAAO,eAAe,CAAA;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,cAAc,aAAa,CAAA;AAE3B,eAAe,KAAK,CAAA"}
|
package/lib/table/index.js
CHANGED
|
@@ -6,18 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _exportNames = {};
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
require("./style");
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
require("./table.less");
|
|
10
|
+
require("./expand.less");
|
|
11
|
+
var _tableHoc = require("./table-hoc");
|
|
12
|
+
Object.keys(_tableHoc).forEach(function (key) {
|
|
11
13
|
if (key === "default" || key === "__esModule") return;
|
|
12
14
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
13
|
-
if (key in exports && exports[key] ===
|
|
15
|
+
if (key in exports && exports[key] === _tableHoc[key]) return;
|
|
14
16
|
Object.defineProperty(exports, key, {
|
|
15
17
|
enumerable: true,
|
|
16
18
|
get: function get() {
|
|
17
|
-
return
|
|
19
|
+
return _tableHoc[key];
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
22
|
});
|
|
21
|
-
|
|
22
|
-
require("./expand.less");
|
|
23
|
-
var _default = exports["default"] = _table.Table;
|
|
23
|
+
var _default = exports["default"] = _tableHoc.Table;
|
package/lib/table/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/table/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,wBAAqB;AACrB,yBAAsB;AACtB,2CAAmC;AAEnC,8CAA2B;AAE3B,kBAAe,iBAAK,CAAA","sourcesContent":["import './style'\nimport './table.less'\nimport './expand.less'\nimport { Table } from './table-hoc'\n\nexport * from './table-hoc'\n\nexport default Table\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ColumnType {
|
|
4
|
+
width?: any;
|
|
5
|
+
}
|
|
6
|
+
interface MyComponentProps {
|
|
7
|
+
columns: ColumnType[];
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.ForwardRefExoticComponent<MyComponentProps & React.RefAttributes<any>>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/table/resizableTable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAA;AAKtE,OAAO,cAAc,CAAA;AAkCrB,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,GAAG,CAAA;CACZ;AAED,UAAU,gBAAgB;IACxB,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;;AAoDD,wBAAsC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _throttle2 = _interopRequireDefault(require("lodash/throttle"));
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _reactResizable = require("react-resizable");
|
|
12
|
+
var _table = require("../table");
|
|
13
|
+
require("./index.less");
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
21
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
22
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
23
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
24
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
25
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
26
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
27
|
+
var t = {};
|
|
28
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
29
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
30
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
31
|
+
}
|
|
32
|
+
return t;
|
|
33
|
+
};
|
|
34
|
+
var ResizableTitle = function ResizableTitle(props) {
|
|
35
|
+
var onResize = props.onResize,
|
|
36
|
+
width = props.width,
|
|
37
|
+
restProps = __rest(props, ["onResize", "width"]);
|
|
38
|
+
if (!width) {
|
|
39
|
+
return _react["default"].createElement("th", Object.assign({}, restProps));
|
|
40
|
+
}
|
|
41
|
+
return _react["default"].createElement(_reactResizable.Resizable, {
|
|
42
|
+
width: width,
|
|
43
|
+
height: 0,
|
|
44
|
+
handle: _react["default"].createElement("span", {
|
|
45
|
+
className: "react-resizable-handle",
|
|
46
|
+
onClick: function onClick(e) {
|
|
47
|
+
e.stopPropagation();
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
onResize: onResize,
|
|
51
|
+
draggableOpts: {
|
|
52
|
+
enableUserSelectHack: false
|
|
53
|
+
}
|
|
54
|
+
}, _react["default"].createElement("th", Object.assign({}, restProps)));
|
|
55
|
+
};
|
|
56
|
+
var MyComponent = function MyComponent(props, ref) {
|
|
57
|
+
var _useState = (0, _react.useState)([]),
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
columns = _useState2[0],
|
|
60
|
+
setColumns = _useState2[1];
|
|
61
|
+
var dataRef = (0, _react.useRef)([]);
|
|
62
|
+
var handleResize = function handleResize(index) {
|
|
63
|
+
return (0, _throttle2["default"])(function (e, _ref) {
|
|
64
|
+
var size = _ref.size;
|
|
65
|
+
var updatedColumns = dataRef.current || [];
|
|
66
|
+
setColumns(updatedColumns.map(function (column, idx) {
|
|
67
|
+
return idx === index ? Object.assign(Object.assign({}, column), {
|
|
68
|
+
width: size.width
|
|
69
|
+
}) : column;
|
|
70
|
+
}));
|
|
71
|
+
}, 25);
|
|
72
|
+
};
|
|
73
|
+
var buildColumns = function buildColumns(columns) {
|
|
74
|
+
return columns === null || columns === void 0 ? void 0 : columns.map(function (column, index) {
|
|
75
|
+
var _a;
|
|
76
|
+
if (typeof (column === null || column === void 0 ? void 0 : column.width) === 'string' && ((_a = column === null || column === void 0 ? void 0 : column.width) === null || _a === void 0 ? void 0 : _a.includes('%'))) {
|
|
77
|
+
return column;
|
|
78
|
+
}
|
|
79
|
+
return Object.assign(Object.assign({}, column), {
|
|
80
|
+
onHeaderCell: function onHeaderCell(column) {
|
|
81
|
+
var width = column.width;
|
|
82
|
+
if (typeof width === 'string' && !width.includes('%')) {
|
|
83
|
+
width = Number(width.replace(/[^\d]/g, ''));
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
width: width,
|
|
87
|
+
onResize: handleResize(index)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
(0, _react.useEffect)(function () {
|
|
94
|
+
var curColumns = buildColumns(props.columns);
|
|
95
|
+
setColumns(curColumns || []);
|
|
96
|
+
}, [props === null || props === void 0 ? void 0 : props.columns]);
|
|
97
|
+
(0, _react.useEffect)(function () {
|
|
98
|
+
dataRef.current = columns;
|
|
99
|
+
}, [columns]);
|
|
100
|
+
return _react["default"].createElement(_table.Table, Object.assign({}, props, {
|
|
101
|
+
className: (0, _classnames["default"])('tnt-resizable-table', _defineProperty({}, props.className, props.className)),
|
|
102
|
+
components: {
|
|
103
|
+
header: {
|
|
104
|
+
cell: ResizableTitle
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
columns: columns
|
|
108
|
+
}));
|
|
109
|
+
};
|
|
110
|
+
var _default = exports["default"] = (0, _react.forwardRef)(MyComponent);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/resizableTable/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAsE;AACtE,4DAA2B;AAC3B,mCAAiC;AACjC,qDAA2C;AAC3C,oCAAgC;AAChC,wBAAqB;AAErB,MAAM,cAAc,GAAG,CACrB,KAGC,EACD,EAAE;IACF,MAAM,EAAE,QAAQ,EAAE,KAAK,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAAzC,qBAAiC,CAAQ,CAAA;IAE/C,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,sDAAQ,SAAS,EAAI,CAAA;KAC7B;IAED,OAAO,CACL,8BAAC,2BAAS,IACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,CAAC,EACT,MAAM,EACJ,wCACE,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gBACb,CAAC,CAAC,eAAe,EAAE,CAAA;YACrB,CAAC,GACD,EAEJ,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE;QAE9C,sDAAQ,SAAS,EAAI,CACX,CACb,CAAA;AACH,CAAC,CAAA;AAWD,MAAM,WAAW,GAA0D,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACxF,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAe,EAAE,CAAC,CAAA;IACxD,MAAM,OAAO,GAAG,IAAA,cAAM,EAAe,EAAE,CAAC,CAAA;IAExC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE,CACrC,IAAA,iBAAQ,EAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACvB,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAA;QAC5C,UAAU,CACR,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,CACjC,GAAG,KAAK,KAAK,CAAC,CAAC,iCAAM,MAAM,KAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAG,CAAC,CAAC,MAAM,CAC1D,CACF,CAAA;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAER,MAAM,YAAY,GAAG,CAAC,OAAqB,EAAE,EAAE,CAC7C,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;;QAC7B,IAAI,OAAO,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAA,KAAK,QAAQ,KAAI,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,QAAQ,CAAC,GAAG,CAAC,CAAA,EAAE;YACrE,OAAO,MAAM,CAAA;SACd;QACD,uCACK,MAAM,KACT,YAAY,EAAE,CAAC,MAAkB,EAAE,EAAE;gBACnC,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA;gBACxB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;oBACrD,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAA;iBAC5C;gBACD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,CAAA;YACjD,CAAC,IACF;IACH,CAAC,CAAC,CAAA;IAEJ,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC9C,UAAU,CAAC,UAAU,IAAI,EAAE,CAAC,CAAA;IAC9B,CAAC,EAAE,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAC,CAAC,CAAA;IAEpB,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,CAAC,OAAO,GAAG,OAAO,CAAA;IAC3B,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,CACL,8BAAC,aAAK,oBACA,KAAK,IACT,SAAS,EAAE,IAAA,oBAAE,EAAC,qBAAqB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAU,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,EAC7E,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAChD,OAAO,EAAE,OAAO,IAChB,CACH,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,IAAA,kBAAU,EAAC,WAAW,CAAC,CAAA","sourcesContent":["import React, { useState, forwardRef, useRef, useEffect } from 'react'\nimport cn from 'classnames'\nimport { throttle } from 'lodash'\nimport { Resizable } from 'react-resizable'\nimport { Table } from '../table'\nimport './index.less'\n\nconst ResizableTitle = (\n props: React.HTMLAttributes<any> & {\n onResize: (e: React.SyntheticEvent<Element>, data: any) => void\n width: number\n }\n) => {\n const { onResize, width, ...restProps } = props\n\n if (!width) {\n return <th {...restProps} />\n }\n\n return (\n <Resizable\n width={width}\n height={0}\n handle={\n <span\n className=\"react-resizable-handle\"\n onClick={(e) => {\n e.stopPropagation()\n }}\n />\n }\n onResize={onResize}\n draggableOpts={{ enableUserSelectHack: false }}\n >\n <th {...restProps} />\n </Resizable>\n )\n}\n\ninterface ColumnType {\n width?: any\n}\n\ninterface MyComponentProps {\n columns: ColumnType[]\n className?: string\n}\n\nconst MyComponent: React.ForwardRefRenderFunction<any, MyComponentProps> = (props, ref) => {\n const [columns, setColumns] = useState<ColumnType[]>([])\n const dataRef = useRef<ColumnType[]>([])\n\n const handleResize = (index: number) =>\n throttle((e, { size }) => {\n const updatedColumns = dataRef.current || []\n setColumns(\n updatedColumns.map((column, idx) =>\n idx === index ? { ...column, width: size.width } : column\n )\n )\n }, 25)\n\n const buildColumns = (columns: ColumnType[]) =>\n columns?.map((column, index) => {\n if (typeof column?.width === 'string' && column?.width?.includes('%')) {\n return column\n }\n return {\n ...column,\n onHeaderCell: (column: ColumnType) => {\n let width = column.width\n if (typeof width === 'string' && !width.includes('%')) {\n width = Number(width.replace(/[^\\d]/g, ''))\n }\n return { width, onResize: handleResize(index) }\n },\n }\n })\n\n useEffect(() => {\n const curColumns = buildColumns(props.columns)\n setColumns(curColumns || [])\n }, [props?.columns])\n\n useEffect(() => {\n dataRef.current = columns\n }, [columns])\n\n return (\n <Table\n {...props}\n className={cn('tnt-resizable-table', { [props.className!]: props.className })}\n components={{ header: { cell: ResizableTitle } }}\n columns={columns}\n />\n )\n}\n\nexport default forwardRef(MyComponent)\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.tnt-resizable-table {
|
|
2
|
+
.react-resizable {
|
|
3
|
+
position: relative;
|
|
4
|
+
background-clip: padding-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
&-handle {
|
|
8
|
+
position: absolute;
|
|
9
|
+
width: 10px;
|
|
10
|
+
height: 100%;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
right: -5px;
|
|
13
|
+
cursor: col-resize;
|
|
14
|
+
z-index: 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
th:last-of-type{
|
|
18
|
+
.react-resizable-handle {
|
|
19
|
+
right: 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// tbody > tr > td > *,
|
|
23
|
+
.ant-table-column-title{
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
}
|
|
28
|
+
.ant-table-column-sorters {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TableProps as AntdTableProps } from 'antd/lib/table';
|
|
3
|
+
declare const Table: React.ForwardRefExoticComponent<Omit<AntdTableProps<any>, "locale"> & {
|
|
4
|
+
resizable?: boolean | undefined;
|
|
5
|
+
} & React.RefAttributes<unknown>>;
|
|
6
|
+
export { Table };
|
|
7
|
+
//# sourceMappingURL=table-hoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-hoc.d.ts","sourceRoot":"","sources":["../../src/table/table-hoc.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,eAAe,CAAA;AAQjE,QAAA,MAAM,KAAK;;iCAQT,CAAA;AAEF,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.Table = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _table = require("./table");
|
|
10
|
+
var _index = _interopRequireDefault(require("./resizableTable/index"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
14
|
+
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
15
|
+
var t = {};
|
|
16
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
var Table = exports.Table = (0, _react.forwardRef)(function (props, ref) {
|
|
23
|
+
var _props$resizable = props.resizable,
|
|
24
|
+
resizable = _props$resizable === void 0 ? false : _props$resizable,
|
|
25
|
+
restProps = __rest(props, ["resizable"]);
|
|
26
|
+
if (resizable) {
|
|
27
|
+
return _react["default"].createElement(_index["default"], Object.assign({
|
|
28
|
+
columns: []
|
|
29
|
+
}, restProps, {
|
|
30
|
+
ref: ref
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
return _react["default"].createElement(_table.Table, Object.assign({}, restProps));
|
|
34
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-hoc.js","sourceRoot":"","sources":["../../src/table/table-hoc.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AAEzC,mCAA4C;AAC5C,mEAAmD;AAMnD,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,CAAC,KAA4B,EAAE,GAAQ,EAAE,EAAE;IAClE,MAAM,EAAE,SAAS,GAAG,KAAK,KAAmB,KAAK,EAAnB,SAAS,UAAK,KAAK,EAA3C,aAAmC,CAAQ,CAAA;IAEjD,IAAI,SAAS,EAAE;QACb,OAAO,8BAAC,eAAc,kBAAC,OAAO,EAAE,EAAE,IAAM,SAAS,IAAE,GAAG,EAAE,GAAG,IAAI,CAAA;KAChE;IAED,OAAO,8BAAC,aAAS,oBAAK,SAAS,EAAI,CAAA;AACrC,CAAC,CAAC,CAAA;AAEO,sBAAK","sourcesContent":["import React, { forwardRef } from 'react'\nimport type { TableProps as AntdTableProps } from 'antd/lib/table'\nimport { Table as AntdTable } from './table'\nimport ResizableTable from './resizableTable/index'\n\ntype CustomTableProps<T> = Omit<AntdTableProps<T>, 'locale'> & {\n resizable?: boolean\n}\n\nconst Table = forwardRef((props: CustomTableProps<any>, ref: any) => {\n const { resizable = false, ...restProps } = props\n\n if (resizable) {\n return <ResizableTable columns={[]} {...restProps} ref={ref} />\n }\n\n return <AntdTable {...restProps} />\n})\n\nexport { Table }\n"]}
|
package/lib/table/table.js
CHANGED
|
@@ -24,16 +24,16 @@ var _prevLocale = require("../prev-locale");
|
|
|
24
24
|
var _rcResizeObserver = _interopRequireDefault(require("rc-resize-observer"));
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
|
-
function _interopRequireDefault(
|
|
28
|
-
function _defineProperty(
|
|
27
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
28
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
29
29
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
30
30
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
31
|
-
function _slicedToArray(
|
|
31
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
32
32
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
-
function _unsupportedIterableToArray(
|
|
34
|
-
function _arrayLikeToArray(
|
|
33
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
34
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
35
35
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
36
|
-
function _arrayWithHoles(
|
|
36
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
37
37
|
var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
38
38
|
var t = {};
|
|
39
39
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -150,7 +150,7 @@ var Table = exports.Table = function Table(_a) {
|
|
|
150
150
|
title = title(options);
|
|
151
151
|
}
|
|
152
152
|
if (_react["default"].isValidElement(title)) {
|
|
153
|
-
var
|
|
153
|
+
var _renderChildren = function renderChildren(children) {
|
|
154
154
|
var _a;
|
|
155
155
|
if (_react["default"].isValidElement(children) || Array.isArray(children)) {
|
|
156
156
|
return (_a = _react["default"] === null || _react["default"] === void 0 ? void 0 : _react["default"].Children) === null || _a === void 0 ? void 0 : _a.map(children, function (child) {
|
|
@@ -158,7 +158,7 @@ var Table = exports.Table = function Table(_a) {
|
|
|
158
158
|
if (_react["default"].isValidElement(child)) {
|
|
159
159
|
var childProps = child.props || {};
|
|
160
160
|
return _react["default"].cloneElement(child, Object.assign(Object.assign({}, childProps), {
|
|
161
|
-
children: ((_a = childProps.children) === null || _a === void 0 ? void 0 : _a.length) ?
|
|
161
|
+
children: ((_a = childProps.children) === null || _a === void 0 ? void 0 : _a.length) ? _renderChildren(childProps.children) : childProps.children,
|
|
162
162
|
title: (0, _lang.titleCaseUpper)(childProps === null || childProps === void 0 ? void 0 : childProps.title, upperCaseIgnore)
|
|
163
163
|
}));
|
|
164
164
|
} else {
|
|
@@ -168,7 +168,7 @@ var Table = exports.Table = function Table(_a) {
|
|
|
168
168
|
}
|
|
169
169
|
return (0, _lang.titleCaseUpper)(children, upperCaseIgnore);
|
|
170
170
|
};
|
|
171
|
-
return
|
|
171
|
+
return _renderChildren(title.props.children);
|
|
172
172
|
}
|
|
173
173
|
if (typeof title === 'string') {
|
|
174
174
|
return (0, _lang.titleCaseUpper)(title, upperCaseIgnore);
|
|
@@ -7,9 +7,9 @@ exports["default"] = exports.Loading = exports.Empty = exports.Default = exports
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _tag = _interopRequireDefault(require("../tag"));
|
|
9
9
|
var _2 = require(".");
|
|
10
|
-
function _interopRequireDefault(
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
11
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
-
function _defineProperty(
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
var Column = _2.Table.Column,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.TotalShower = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _utils = require("../utils");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
var TotalShower = exports.TotalShower = function TotalShower(_ref) {
|
|
11
11
|
var total = _ref.total,
|
|
12
12
|
locale = _ref.locale;
|
package/lib/table/utils.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.makeRandomCode = makeRandomCode;
|
|
7
7
|
exports.normalizeColumns = normalizeColumns;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
function normalizeColumns(elements) {
|
|
11
11
|
var columns = [];
|
|
12
12
|
_react["default"].Children.forEach(elements, function (element) {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
8
8
|
require("./index.less");
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
var _default = exports["default"] = function _default(WrappedComponent) {
|
|
11
11
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12
12
|
var version = options.version,
|