dcp-design-react 1.7.42
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/LICENSE +21 -0
- package/README.md +4 -0
- package/lib/_utils/cloneElement.d.ts +2 -0
- package/lib/_utils/dom.d.ts +75 -0
- package/lib/_utils/download.d.ts +7 -0
- package/lib/_utils/error.d.ts +2 -0
- package/lib/_utils/isDev.d.ts +1 -0
- package/lib/_utils/isMobile.d.ts +1 -0
- package/lib/_utils/isServer.d.ts +2 -0
- package/lib/_utils/prefix.d.ts +1 -0
- package/lib/_utils/resize-event.d.ts +10 -0
- package/lib/_utils/scrollbar-width.d.ts +1 -0
- package/lib/_utils/types.d.ts +39 -0
- package/lib/_utils/util.d.ts +27 -0
- package/lib/_utils/validators.d.ts +2 -0
- package/lib/anchor/index.d.ts +4 -0
- package/lib/anchor/src/anchor-item.d.ts +15 -0
- package/lib/anchor/src/anchor-nav.d.ts +12 -0
- package/lib/anchor/src/anchor.d.ts +61 -0
- package/lib/anchor/style/index.less +101 -0
- package/lib/antd/Calendar.d.ts +4 -0
- package/lib/antd/DatePicker.d.ts +50 -0
- package/lib/antd/TimePicker.d.ts +16 -0
- package/lib/antd/compact.less +11 -0
- package/lib/antd/dayjs.d.ts +1 -0
- package/lib/antd/index.d.ts +124 -0
- package/lib/antd/index.less +19 -0
- package/lib/button/index.d.ts +3 -0
- package/lib/button/src/button.d.ts +32 -0
- package/lib/button/style/index.less +12 -0
- package/lib/collapse/index.d.ts +3 -0
- package/lib/collapse/src/Content.d.ts +3 -0
- package/lib/collapse/src/_util/motion.less +13 -0
- package/lib/collapse/src/_util/motionUtil.d.ts +3 -0
- package/lib/collapse/src/collapse.d.ts +18 -0
- package/lib/collapse/style/index.less +24 -0
- package/lib/config-provider/context.d.ts +10 -0
- package/lib/config-provider/index.d.ts +3 -0
- package/lib/config-provider/src/config-provider.d.ts +36 -0
- package/lib/copy-to-clipboard/index.d.ts +3 -0
- package/lib/copy-to-clipboard/src/copy-to-clipboard.d.ts +15 -0
- package/lib/copy-to-clipboard/style/index.less +12 -0
- package/lib/countup/index.d.ts +3 -0
- package/lib/countup/src/countup.d.ts +17 -0
- package/lib/countup/style/index.less +22 -0
- package/lib/cropper/index.d.ts +3 -0
- package/lib/cropper/src/cropper.d.ts +213 -0
- package/lib/cropper/style/index.less +13 -0
- package/lib/divider/index.d.ts +3 -0
- package/lib/divider/src/divider.d.ts +27 -0
- package/lib/divider/style/index.less +54 -0
- package/lib/download/index.d.ts +3 -0
- package/lib/download/src/download.d.ts +54 -0
- package/lib/download/style/index.less +12 -0
- package/lib/drawer/index.d.ts +3 -0
- package/lib/drawer/src/drawer.d.ts +46 -0
- package/lib/drawer/style/index.less +82 -0
- package/lib/empty/index.d.ts +3 -0
- package/lib/empty/src/empty.d.ts +15 -0
- package/lib/empty/style/index.less +35 -0
- package/lib/form/index.d.ts +4 -0
- package/lib/form/src/context.d.ts +9 -0
- package/lib/form/src/fields-filter.d.ts +26 -0
- package/lib/form/src/form-cascader.d.ts +21 -0
- package/lib/form/src/form-checkbox-group.d.ts +19 -0
- package/lib/form/src/form-checkbox.d.ts +16 -0
- package/lib/form/src/form-city-select.d.ts +10 -0
- package/lib/form/src/form-date.d.ts +10 -0
- package/lib/form/src/form-divider.d.ts +10 -0
- package/lib/form/src/form-immediate.d.ts +20 -0
- package/lib/form/src/form-input-number.d.ts +11 -0
- package/lib/form/src/form-input.d.ts +11 -0
- package/lib/form/src/form-item-view.d.ts +7 -0
- package/lib/form/src/form-multiple-search-helper.d.ts +20 -0
- package/lib/form/src/form-multiple-tree-table-helper.d.ts +20 -0
- package/lib/form/src/form-radio.d.ts +19 -0
- package/lib/form/src/form-range-date.d.ts +10 -0
- package/lib/form/src/form-range-input-number.d.ts +10 -0
- package/lib/form/src/form-range-input.d.ts +10 -0
- package/lib/form/src/form-range-search-helper.d.ts +20 -0
- package/lib/form/src/form-range-time.d.ts +10 -0
- package/lib/form/src/form-rate.d.ts +10 -0
- package/lib/form/src/form-region-select.d.ts +10 -0
- package/lib/form/src/form-search-helper.d.ts +21 -0
- package/lib/form/src/form-select.d.ts +21 -0
- package/lib/form/src/form-switch.d.ts +10 -0
- package/lib/form/src/form-text-area.d.ts +10 -0
- package/lib/form/src/form-time.d.ts +10 -0
- package/lib/form/src/form-tinymce.d.ts +10 -0
- package/lib/form/src/form-tree-select.d.ts +21 -0
- package/lib/form/src/form-tree-table-helper.d.ts +20 -0
- package/lib/form/src/form-upload-file.d.ts +10 -0
- package/lib/form/src/form-upload-img.d.ts +10 -0
- package/lib/form/src/form.d.ts +197 -0
- package/lib/form/src/types.d.ts +356 -0
- package/lib/form/src/utils.d.ts +57 -0
- package/lib/form/style/index.less +352 -0
- package/lib/guide-tracker/index.d.ts +3 -0
- package/lib/guide-tracker/src/Panel.d.ts +9 -0
- package/lib/guide-tracker/src/guideTracker.d.ts +37 -0
- package/lib/guide-tracker/src/lib/Highlighter.d.ts +2 -0
- package/lib/guide-tracker/src/lib/Overlay.d.ts +36 -0
- package/lib/guide-tracker/src/lib/index.d.ts +29 -0
- package/lib/guide-tracker/src/lib/utils.d.ts +27 -0
- package/lib/guide-tracker/style/index.less +189 -0
- package/lib/hoc/outsideClick.d.ts +1 -0
- package/lib/hooks/useDebounce.d.ts +3 -0
- package/lib/hooks/useEvent.d.ts +2 -0
- package/lib/hooks/useForceUpdate.d.ts +1 -0
- package/lib/hooks/useLayoutUpdateEffect.d.ts +2 -0
- package/lib/hooks/useLocale.d.ts +4 -0
- package/lib/hooks/useMergedState.d.ts +8 -0
- package/lib/hooks/useOutsideClick.d.ts +2 -0
- package/lib/hooks/useResizeObserve.d.ts +5 -0
- package/lib/hooks/useSafeState.d.ts +4 -0
- package/lib/hooks/useSize.d.ts +9 -0
- package/lib/hooks/useUpdateEffect.d.ts +2 -0
- package/lib/index.d.ts +127 -0
- package/lib/index.esm.js +1 -0
- package/lib/index.full.js +1 -0
- package/lib/index.js +1 -0
- package/lib/locale/index.d.ts +11 -0
- package/lib/locale/index.js +44 -0
- package/lib/locale/lang/en.d.ts +320 -0
- package/lib/locale/lang/en.js +325 -0
- package/lib/locale/lang/zh-cn.d.ts +320 -0
- package/lib/locale/lang/zh-cn.js +325 -0
- package/lib/modal/index.d.ts +3 -0
- package/lib/modal/src/modal.d.ts +68 -0
- package/lib/modal/style/index.less +95 -0
- package/lib/pinyin/core.d.ts +12 -0
- package/lib/pinyin/dict.d.ts +31 -0
- package/lib/pinyin/index.d.ts +2 -0
- package/lib/pinyin/patchers/56l.d.ts +7 -0
- package/lib/print/index.d.ts +3 -0
- package/lib/print/src/LodopFuncs.d.ts +1 -0
- package/lib/print/src/config.d.ts +6 -0
- package/lib/print/src/container.d.ts +14 -0
- package/lib/print/src/context.d.ts +6 -0
- package/lib/print/src/preview.d.ts +61 -0
- package/lib/print/src/print.d.ts +37 -0
- package/lib/print/src/setting.d.ts +49 -0
- package/lib/print/src/utils.d.ts +5 -0
- package/lib/print/style/index.less +175 -0
- package/lib/qm-design.d.ts +28 -0
- package/lib/range-table-helper/index.d.ts +3 -0
- package/lib/range-table-helper/src/range-table-helper.d.ts +22 -0
- package/lib/range-table-helper/style/index.less +18 -0
- package/lib/scrollbar/index.d.ts +3 -0
- package/lib/scrollbar/src/context.d.ts +7 -0
- package/lib/scrollbar/src/scrollbar.d.ts +28 -0
- package/lib/scrollbar/src/thumb.d.ts +15 -0
- package/lib/scrollbar/style/index.less +72 -0
- package/lib/search-helper/index.d.ts +3 -0
- package/lib/search-helper/src/search-helper.d.ts +24 -0
- package/lib/search-helper/style/index.less +14 -0
- package/lib/search-tree/index.d.ts +3 -0
- package/lib/search-tree/src/search-tree.d.ts +57 -0
- package/lib/search-tree/style/index.less +34 -0
- package/lib/space/index.d.ts +3 -0
- package/lib/space/src/space.d.ts +12 -0
- package/lib/space/style/index.less +12 -0
- package/lib/spin/index.d.ts +3 -0
- package/lib/spin/src/spin.d.ts +14 -0
- package/lib/spin/style/index.less +16 -0
- package/lib/split/index.d.ts +4 -0
- package/lib/split/src/context.d.ts +8 -0
- package/lib/split/src/resize-bar.d.ts +8 -0
- package/lib/split/src/split-pane.d.ts +11 -0
- package/lib/split/src/split.d.ts +18 -0
- package/lib/split/style/index.less +83 -0
- package/lib/style/common.less +8 -0
- package/lib/style/compact.css +26706 -0
- package/lib/style/compact.less +10 -0
- package/lib/style/compact.min.css +1 -0
- package/lib/style/index.css +30459 -0
- package/lib/style/index.less +39 -0
- package/lib/style/index.min.css +1 -0
- package/lib/style/mixins/box.less +13 -0
- package/lib/style/mixins/clearfix.less +21 -0
- package/lib/style/mixins/index.less +11 -0
- package/lib/style/mixins/operation-unit.less +24 -0
- package/lib/style/mixins/reset.less +34 -0
- package/lib/style/mixins/size.less +15 -0
- package/lib/style/reset.less +132 -0
- package/lib/style/themes/compact.less +19 -0
- package/lib/style/themes/default.less +117 -0
- package/lib/style/themes/index.less +7 -0
- package/lib/style/var.less +9 -0
- package/lib/table/index.d.ts +4 -0
- package/lib/table/src/alert/index.d.ts +6 -0
- package/lib/table/src/body/index.d.ts +8 -0
- package/lib/table/src/body/useMergeCell.d.ts +7 -0
- package/lib/table/src/body/useValueFormat.d.ts +12 -0
- package/lib/table/src/clipboard/index.d.ts +8 -0
- package/lib/table/src/clipboard/setting.d.ts +8 -0
- package/lib/table/src/column-filter/index.d.ts +7 -0
- package/lib/table/src/config/index.d.ts +47 -0
- package/lib/table/src/context/index.d.ts +85 -0
- package/lib/table/src/edit/InputNumber.d.ts +26 -0
- package/lib/table/src/edit/index.d.ts +15 -0
- package/lib/table/src/empty/index.d.ts +3 -0
- package/lib/table/src/expandable/all.d.ts +6 -0
- package/lib/table/src/expandable/index.d.ts +9 -0
- package/lib/table/src/export/define.d.ts +8 -0
- package/lib/table/src/export/index.d.ts +19 -0
- package/lib/table/src/export/setting.d.ts +14 -0
- package/lib/table/src/export/useExport.d.ts +13 -0
- package/lib/table/src/fast-search/index.d.ts +7 -0
- package/lib/table/src/fast-search/setting.d.ts +6 -0
- package/lib/table/src/filter/index.d.ts +8 -0
- package/lib/table/src/filter-sql/index.d.ts +5 -0
- package/lib/table/src/filter-sql/lib/filter_string.d.ts +11 -0
- package/lib/table/src/filter-sql/lib/operations.d.ts +8 -0
- package/lib/table/src/filter-sql/lib/variables_replacement.d.ts +5 -0
- package/lib/table/src/footer/index.d.ts +8 -0
- package/lib/table/src/full-screen/index.d.ts +8 -0
- package/lib/table/src/group-summary/index.d.ts +7 -0
- package/lib/table/src/group-summary/result.d.ts +9 -0
- package/lib/table/src/group-summary/setting.d.ts +6 -0
- package/lib/table/src/header/index.d.ts +10 -0
- package/lib/table/src/hooks/useImperativeMethod.d.ts +49 -0
- package/lib/table/src/hooks/useTableCore.d.ts +93 -0
- package/lib/table/src/hooks/useTableEffect.d.ts +45 -0
- package/lib/table/src/hooks/useTableLayout.d.ts +44 -0
- package/lib/table/src/hooks/useTableMemo.d.ts +48 -0
- package/lib/table/src/hooks/useTableRef.d.ts +111 -0
- package/lib/table/src/hooks/useTableState.d.ts +98 -0
- package/lib/table/src/icon/caretdown.d.ts +3 -0
- package/lib/table/src/icon/caretup.d.ts +3 -0
- package/lib/table/src/icon/filter.d.ts +3 -0
- package/lib/table/src/import/SelectFile.d.ts +8 -0
- package/lib/table/src/import/index.d.ts +8 -0
- package/lib/table/src/import/setting.d.ts +8 -0
- package/lib/table/src/manager/index.d.ts +15 -0
- package/lib/table/src/pager/index.d.ts +9 -0
- package/lib/table/src/print/index.d.ts +8 -0
- package/lib/table/src/reload/index.d.ts +7 -0
- package/lib/table/src/resizable/index.d.ts +7 -0
- package/lib/table/src/select-collection/index.d.ts +8 -0
- package/lib/table/src/select-collection/result.d.ts +8 -0
- package/lib/table/src/selection/all.d.ts +7 -0
- package/lib/table/src/selection/index.d.ts +12 -0
- package/lib/table/src/store/index.d.ts +33 -0
- package/lib/table/src/super-search/index.d.ts +7 -0
- package/lib/table/src/super-search/result.d.ts +6 -0
- package/lib/table/src/table/index.d.ts +5 -0
- package/lib/table/src/table/props.d.ts +299 -0
- package/lib/table/src/table/types.d.ts +444 -0
- package/lib/table/src/toolbox/index.d.ts +18 -0
- package/lib/table/src/utils/index.d.ts +43 -0
- package/lib/table/style/alert.less +34 -0
- package/lib/table/style/body.less +77 -0
- package/lib/table/style/clipboard.less +29 -0
- package/lib/table/style/column-filter.less +94 -0
- package/lib/table/style/empty.less +19 -0
- package/lib/table/style/expandable.less +64 -0
- package/lib/table/style/export.less +26 -0
- package/lib/table/style/fast-search.less +110 -0
- package/lib/table/style/footer.less +33 -0
- package/lib/table/style/full-screen.less +21 -0
- package/lib/table/style/group-summary.less +93 -0
- package/lib/table/style/header.less +207 -0
- package/lib/table/style/import.less +25 -0
- package/lib/table/style/index.less +29 -0
- package/lib/table/style/pager.less +29 -0
- package/lib/table/style/print.less +21 -0
- package/lib/table/style/reload.less +21 -0
- package/lib/table/style/select-collection.less +21 -0
- package/lib/table/style/size.less +88 -0
- package/lib/table/style/super-search.less +102 -0
- package/lib/table/style/table.less +372 -0
- package/lib/table/style/tollbox.less +39 -0
- package/lib/table/style/toper.less +31 -0
- package/lib/table/style/variable.less +48 -0
- package/lib/tabs/index.d.ts +4 -0
- package/lib/tabs/src/tab-pane.d.ts +9 -0
- package/lib/tabs/src/tabs.d.ts +19 -0
- package/lib/tabs/style/index.less +32 -0
- package/lib/tinymce/index.d.ts +3 -0
- package/lib/tinymce/src/Events.d.ts +85 -0
- package/lib/tinymce/src/ScriptLoader.d.ts +13 -0
- package/lib/tinymce/src/TinyMCE.d.ts +9 -0
- package/lib/tinymce/src/Utils.d.ts +20 -0
- package/lib/tinymce/src/components/Editor.d.ts +73 -0
- package/lib/tinymce/src/components/EditorPropTypes.d.ts +18 -0
- package/lib/tinymce/src/index.d.ts +35 -0
- package/lib/tinymce/style/index.less +18 -0
- package/lib/tour/index.d.ts +4 -0
- package/lib/tour/src/Mask.d.ts +17 -0
- package/lib/tour/src/Pause.d.ts +10 -0
- package/lib/tour/src/Tour.d.ts +41 -0
- package/lib/tour/src/TourStep/DefaultPanel.d.ts +4 -0
- package/lib/tour/src/TourStep/index.d.ts +34 -0
- package/lib/tour/src/hooks/useTarget.d.ts +14 -0
- package/lib/tour/src/placements.d.ts +29 -0
- package/lib/tour/src/util.d.ts +5 -0
- package/lib/tour/style/index.less +157 -0
- package/lib/transition/index.d.ts +3 -0
- package/lib/transition/src/tools.d.ts +13 -0
- package/lib/transition/src/transition.d.ts +12 -0
- package/lib/transition/src/types.d.ts +25 -0
- package/lib/transition/src/useTransition.d.ts +2 -0
- package/lib/tree-helper/index.d.ts +3 -0
- package/lib/tree-helper/src/tree-helper.d.ts +22 -0
- package/lib/tree-helper/style/index.less +21 -0
- package/lib/tree-table-helper/index.d.ts +3 -0
- package/lib/tree-table-helper/src/tree-table-helper.d.ts +31 -0
- package/lib/tree-table-helper/style/index.less +24 -0
- package/lib/upload-file/index.d.ts +3 -0
- package/lib/upload-file/src/upload-file.d.ts +35 -0
- package/lib/upload-file/style/index.less +18 -0
- package/lib/upload-img/index.d.ts +3 -0
- package/lib/upload-img/src/cropper-preview.d.ts +32 -0
- package/lib/upload-img/src/upload-img.d.ts +39 -0
- package/lib/upload-img/style/index.less +41 -0
- package/lib/version/index.d.ts +2 -0
- package/package.json +138 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import type { IAuth } from '../../_utils/types';
|
|
4
|
+
import type { ButtonProps as AntButtonProps } from '../../antd';
|
|
5
|
+
type IProps = AntButtonProps & {
|
|
6
|
+
click?: (ev: React.MouseEventHandler<HTMLElement>) => Promise<void> | void;
|
|
7
|
+
authConfig?: IAuth;
|
|
8
|
+
confirm?: {
|
|
9
|
+
title?: string | React.ReactNode;
|
|
10
|
+
onConfirm?: () => void;
|
|
11
|
+
onCancel?: (ev: any) => void;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type IState = {
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type ButtonProps = IProps;
|
|
18
|
+
declare class QmButton extends Component<IProps, IState> {
|
|
19
|
+
static propTypes: {
|
|
20
|
+
click: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
confirm: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
|
+
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
23
|
+
onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
+
onCancel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
}>>;
|
|
26
|
+
};
|
|
27
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
28
|
+
state: IState;
|
|
29
|
+
clickHandle: (ev: any) => Promise<void>;
|
|
30
|
+
render(): React.JSX.Element | null;
|
|
31
|
+
}
|
|
32
|
+
export default QmButton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { JSXElement } from '../../_utils/types';
|
|
3
|
+
type IProps = {
|
|
4
|
+
defaultActive?: boolean;
|
|
5
|
+
label: string;
|
|
6
|
+
extra?: JSXElement | string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
forceRender?: boolean;
|
|
9
|
+
destroyOnClose?: boolean;
|
|
10
|
+
onChange?: (value: boolean) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
containerStyle?: React.CSSProperties;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export type CollapseProps = IProps;
|
|
17
|
+
declare const Collapse: React.FC<IProps>;
|
|
18
|
+
export default Collapse;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-06-01 20:04:55
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
@import '../src/_util/motion.less';
|
|
9
|
+
|
|
10
|
+
@prefix-collapse: ~'@{qm-prefix}-collapse';
|
|
11
|
+
|
|
12
|
+
.@{prefix-collapse} {
|
|
13
|
+
&-content {
|
|
14
|
+
padding: 0 2px;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
background-color: #fff;
|
|
17
|
+
& > &-box {
|
|
18
|
+
margin-top: 8px;
|
|
19
|
+
}
|
|
20
|
+
&-hidden {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Locale, ComponentSize } from '../_utils/types';
|
|
3
|
+
export type IConfig = {
|
|
4
|
+
locale: Locale;
|
|
5
|
+
size: ComponentSize;
|
|
6
|
+
theme?: string;
|
|
7
|
+
global?: Record<string, any>;
|
|
8
|
+
};
|
|
9
|
+
declare const ConfigContext: import("react").Context<IConfig>;
|
|
10
|
+
export default ConfigContext;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import type { IConfig } from '../context';
|
|
4
|
+
type IProps = {
|
|
5
|
+
locale: IConfig['locale'];
|
|
6
|
+
size: IConfig['size'];
|
|
7
|
+
theme?: string;
|
|
8
|
+
global?: IConfig['global'];
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
type IState = {
|
|
12
|
+
value: IConfig;
|
|
13
|
+
};
|
|
14
|
+
export type ConfigProviderProps = IProps;
|
|
15
|
+
declare class QmConfigProvider extends Component<IProps, IState> {
|
|
16
|
+
static propTypes: {
|
|
17
|
+
locale: PropTypes.Requireable<string>;
|
|
18
|
+
size: (props: any, propName: any, componentName: any) => void;
|
|
19
|
+
theme: PropTypes.Requireable<string>;
|
|
20
|
+
global: PropTypes.Requireable<object>;
|
|
21
|
+
};
|
|
22
|
+
static defaultProps: {
|
|
23
|
+
locale: string;
|
|
24
|
+
size: string;
|
|
25
|
+
global: {};
|
|
26
|
+
};
|
|
27
|
+
constructor(props: IProps);
|
|
28
|
+
static getDerivedStateFromProps(nextProps: IProps, prevState: IState): {
|
|
29
|
+
value: IConfig & {
|
|
30
|
+
locale: import("../../_utils/types").Locale;
|
|
31
|
+
size: import("../../_utils/types").ComponentSize;
|
|
32
|
+
};
|
|
33
|
+
} | null;
|
|
34
|
+
render(): React.JSX.Element;
|
|
35
|
+
}
|
|
36
|
+
export default QmConfigProvider;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type IProps = {
|
|
3
|
+
text: string;
|
|
4
|
+
showMessage?: boolean;
|
|
5
|
+
options?: {
|
|
6
|
+
debug?: boolean;
|
|
7
|
+
message?: string;
|
|
8
|
+
format?: string;
|
|
9
|
+
};
|
|
10
|
+
onCopy?: (text: string, result: boolean) => void;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export type CopyToClipboardProps = IProps;
|
|
14
|
+
declare const CopyToClipboard: React.FC<IProps>;
|
|
15
|
+
export default CopyToClipboard;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { CountUpProps } from 'react-countup/build/CountUp';
|
|
3
|
+
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
4
|
+
type IProps = CountUpProps & {
|
|
5
|
+
size?: ComponentSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
export type CountupProps = IProps;
|
|
10
|
+
declare class QmCountup extends Component<IProps> {
|
|
11
|
+
static defaultProps: {
|
|
12
|
+
duration: number;
|
|
13
|
+
};
|
|
14
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export default QmCountup;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-08-01 21:58:46
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-countup: ~'@{qm-prefix}-countup';
|
|
10
|
+
|
|
11
|
+
.@{prefix-countup} {
|
|
12
|
+
.reset-container;
|
|
13
|
+
font-size: @--font-size-base;
|
|
14
|
+
// ------ size ------
|
|
15
|
+
// 40 32 24
|
|
16
|
+
&--lg {
|
|
17
|
+
font-size: @--font-size-base;
|
|
18
|
+
}
|
|
19
|
+
&--sm {
|
|
20
|
+
font-size: @--font-size-sm;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { CSSProperties, AnyObject, AnyFunction } from '../../_utils/types';
|
|
3
|
+
type IProps = {
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
imgStyle?: CSSProperties;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
className?: string;
|
|
9
|
+
viewMode?: number;
|
|
10
|
+
dragMode?: string;
|
|
11
|
+
initialAspectRatio?: number;
|
|
12
|
+
aspectRatio?: number;
|
|
13
|
+
data?: AnyObject<any>;
|
|
14
|
+
preview?: string;
|
|
15
|
+
responsive?: boolean;
|
|
16
|
+
restore?: boolean;
|
|
17
|
+
checkCrossOrigin?: boolean;
|
|
18
|
+
checkOrientation?: boolean;
|
|
19
|
+
crossorigin?: string;
|
|
20
|
+
guides?: boolean;
|
|
21
|
+
center?: boolean;
|
|
22
|
+
highlight?: boolean;
|
|
23
|
+
background?: boolean;
|
|
24
|
+
autoCrop?: boolean;
|
|
25
|
+
autoCropArea?: number;
|
|
26
|
+
movable?: boolean;
|
|
27
|
+
rotatable?: boolean;
|
|
28
|
+
scalable?: boolean;
|
|
29
|
+
zoomable?: boolean;
|
|
30
|
+
zoomOnTouch?: boolean;
|
|
31
|
+
zoomOnWheel?: boolean;
|
|
32
|
+
wheelZoomRatio?: number;
|
|
33
|
+
cropBoxMovable?: boolean;
|
|
34
|
+
cropBoxResizable?: boolean;
|
|
35
|
+
toggleDragModeOnDblclick?: boolean;
|
|
36
|
+
minCanvasWidth?: number;
|
|
37
|
+
minCanvasHeight?: number;
|
|
38
|
+
minCropBoxWidth?: number;
|
|
39
|
+
minCropBoxHeight?: number;
|
|
40
|
+
minContainerWidth?: number;
|
|
41
|
+
minContainerHeight?: number;
|
|
42
|
+
ready?: AnyFunction<void>;
|
|
43
|
+
cropstart?: AnyFunction<void>;
|
|
44
|
+
cropmove?: AnyFunction<void>;
|
|
45
|
+
cropend?: AnyFunction<void>;
|
|
46
|
+
crop?: AnyFunction<void>;
|
|
47
|
+
zoom?: AnyFunction<void>;
|
|
48
|
+
};
|
|
49
|
+
export type CropperProps = IProps;
|
|
50
|
+
declare class QmCropper extends Component<IProps> {
|
|
51
|
+
static defaultProps: {
|
|
52
|
+
src: string;
|
|
53
|
+
responsive: boolean;
|
|
54
|
+
restore: boolean;
|
|
55
|
+
checkCrossOrigin: boolean;
|
|
56
|
+
checkOrientation: boolean;
|
|
57
|
+
modal: boolean;
|
|
58
|
+
guides: boolean;
|
|
59
|
+
center: boolean;
|
|
60
|
+
highlight: boolean;
|
|
61
|
+
background: boolean;
|
|
62
|
+
autoCrop: boolean;
|
|
63
|
+
movable: boolean;
|
|
64
|
+
rotatable: boolean;
|
|
65
|
+
scalable: boolean;
|
|
66
|
+
zoomable: boolean;
|
|
67
|
+
zoomOnTouch: boolean;
|
|
68
|
+
zoomOnWheel: boolean;
|
|
69
|
+
cropBoxMovable: boolean;
|
|
70
|
+
cropBoxResizable: boolean;
|
|
71
|
+
toggleDragModeOnDblclick: boolean;
|
|
72
|
+
};
|
|
73
|
+
private imgRef;
|
|
74
|
+
private cropper;
|
|
75
|
+
componentDidMount(): void;
|
|
76
|
+
componentWillUnmount(): void;
|
|
77
|
+
reset(): any;
|
|
78
|
+
clear(): any;
|
|
79
|
+
initCrop(): any;
|
|
80
|
+
/**
|
|
81
|
+
* Replace the image's src and rebuild the cropper
|
|
82
|
+
* @param {string} url - The new URL.
|
|
83
|
+
* @param {boolean} [onlyColorChanged] - Indicate if the new image only changed color.
|
|
84
|
+
* @returns {Object} this
|
|
85
|
+
*/
|
|
86
|
+
replace(url: any, onlyColorChanged?: boolean): any;
|
|
87
|
+
enable(): any;
|
|
88
|
+
disable(): any;
|
|
89
|
+
destroy(): any;
|
|
90
|
+
/**
|
|
91
|
+
* Move the canvas with relative offsets
|
|
92
|
+
* @param {number} offsetX - The relative offset distance on the x-axis.
|
|
93
|
+
* @param {number} offsetY - The relative offset distance on the y-axis.
|
|
94
|
+
* @returns {Object} this
|
|
95
|
+
*/
|
|
96
|
+
move(offsetX: any, offsetY: any): any;
|
|
97
|
+
/**
|
|
98
|
+
* Move the canvas to an absolute point
|
|
99
|
+
* @param {number} x - The x-axis coordinate.
|
|
100
|
+
* @param {number} [y=x] - The y-axis coordinate.
|
|
101
|
+
* @returns {Object} this
|
|
102
|
+
*/
|
|
103
|
+
moveTo(x: any, y?: any): any;
|
|
104
|
+
/**
|
|
105
|
+
* Zoom the canvas with a relative ratio
|
|
106
|
+
* @param {number} ratio - The target ratio.
|
|
107
|
+
* @param {Event} _originalEvent - The original event if any.
|
|
108
|
+
* @returns {Object} this
|
|
109
|
+
*/
|
|
110
|
+
relativeZoom(ratio: any, _originalEvent: any): any;
|
|
111
|
+
/**
|
|
112
|
+
* Zoom the canvas to an absolute ratio
|
|
113
|
+
* @param {number} ratio - The target ratio.
|
|
114
|
+
* @param {Event} _originalEvent - The original event if any.
|
|
115
|
+
* @returns {Object} this
|
|
116
|
+
*/
|
|
117
|
+
zoomTo(ratio: any, _originalEvent: any): any;
|
|
118
|
+
/**
|
|
119
|
+
* Rotate the canvas with a relative degree
|
|
120
|
+
* @param {number} degree - The rotate degree.
|
|
121
|
+
* @returns {Object} this
|
|
122
|
+
*/
|
|
123
|
+
rotate(degree: any): any;
|
|
124
|
+
/**
|
|
125
|
+
* Rotate the canvas to an absolute degree
|
|
126
|
+
* @param {number} degree - The rotate degree.
|
|
127
|
+
* @returns {Object} this
|
|
128
|
+
*/
|
|
129
|
+
rotateTo(degree: any): any;
|
|
130
|
+
/**
|
|
131
|
+
* Scale the image on the x-axis.
|
|
132
|
+
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
133
|
+
* @returns {Object} this
|
|
134
|
+
*/
|
|
135
|
+
scaleX(scaleX: any): any;
|
|
136
|
+
/**
|
|
137
|
+
* Scale the image on the y-axis.
|
|
138
|
+
* @param {number} scaleY - The scale ratio on the y-axis.
|
|
139
|
+
* @returns {Object} this
|
|
140
|
+
*/
|
|
141
|
+
scaleY(scaleY: any): any;
|
|
142
|
+
/**
|
|
143
|
+
* Scale the image
|
|
144
|
+
* @param {number} scaleX - The scale ratio on the x-axis.
|
|
145
|
+
* @param {number} [scaleY=scaleX] - The scale ratio on the y-axis.
|
|
146
|
+
* @returns {Object} this
|
|
147
|
+
*/
|
|
148
|
+
scale(scaleX: any, scaleY?: any): any;
|
|
149
|
+
/**
|
|
150
|
+
* Get the cropped area position and size data (base on the original image)
|
|
151
|
+
* @param {boolean} [rounded=false] - Indicate if round the data values or not.
|
|
152
|
+
* @returns {Object} The result cropped data.
|
|
153
|
+
*/
|
|
154
|
+
getData(rounded?: boolean): any;
|
|
155
|
+
/**
|
|
156
|
+
* Set the cropped area position and size with new data
|
|
157
|
+
* @param {Object} data - The new data.
|
|
158
|
+
* @returns {Object} this
|
|
159
|
+
*/
|
|
160
|
+
setData(data: any): any;
|
|
161
|
+
/**
|
|
162
|
+
* Get the container size data.
|
|
163
|
+
* @returns {Object} The result container data.
|
|
164
|
+
*/
|
|
165
|
+
getContainerData(): any;
|
|
166
|
+
/**
|
|
167
|
+
* Get the image position and size data.
|
|
168
|
+
* @returns {Object} The result image data.
|
|
169
|
+
*/
|
|
170
|
+
getImageData(): any;
|
|
171
|
+
/**
|
|
172
|
+
* Get the canvas position and size data.
|
|
173
|
+
* @returns {Object} The result canvas data.
|
|
174
|
+
*/
|
|
175
|
+
getCanvasData(): any;
|
|
176
|
+
/**
|
|
177
|
+
* Set the canvas position and size with new data.
|
|
178
|
+
* @param {Object} data - The new canvas data.
|
|
179
|
+
* @returns {Object} this
|
|
180
|
+
*/
|
|
181
|
+
setCanvasData(data: any): any;
|
|
182
|
+
/**
|
|
183
|
+
* Get the crop box position and size data.
|
|
184
|
+
* @returns {Object} The result crop box data.
|
|
185
|
+
*/
|
|
186
|
+
getCropBoxData(): any;
|
|
187
|
+
/**
|
|
188
|
+
* Set the crop box position and size with new data.
|
|
189
|
+
* @param {Object} data - The new crop box data.
|
|
190
|
+
* @returns {Object} this
|
|
191
|
+
*/
|
|
192
|
+
setCropBoxData(data: any): any;
|
|
193
|
+
/**
|
|
194
|
+
* Get a canvas drawn the cropped image.
|
|
195
|
+
* @param {Object} [options={}] - The config options.
|
|
196
|
+
* @returns {HTMLCanvasElement} - The result canvas.
|
|
197
|
+
*/
|
|
198
|
+
getCroppedCanvas(options?: {}): any;
|
|
199
|
+
/**
|
|
200
|
+
* Change the aspect ratio of the crop box.
|
|
201
|
+
* @param {number} aspectRatio - The new aspect ratio.
|
|
202
|
+
* @returns {Object} this
|
|
203
|
+
*/
|
|
204
|
+
setAspectRatio(aspectRatio: any): any;
|
|
205
|
+
/**
|
|
206
|
+
* Change the drag mode.
|
|
207
|
+
* @param {string} mode - The new drag mode.
|
|
208
|
+
* @returns {Object} this
|
|
209
|
+
*/
|
|
210
|
+
setDragMode(mode: any): any;
|
|
211
|
+
render(): React.JSX.Element;
|
|
212
|
+
}
|
|
213
|
+
export default QmCropper;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-04-16 09:25:12
|
|
6
|
+
*/
|
|
7
|
+
@import (less) 'cropperjs/dist/cropper.css';
|
|
8
|
+
@import '../../style/common';
|
|
9
|
+
|
|
10
|
+
@prefix-cropper: ~'@{qm-prefix}-cropper';
|
|
11
|
+
|
|
12
|
+
.@{prefix-cropper} {
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import type { ComponentSize, CSSProperties, JSXElement } from '../../_utils/types';
|
|
4
|
+
type IProps = {
|
|
5
|
+
label: string;
|
|
6
|
+
size?: ComponentSize;
|
|
7
|
+
extra?: JSXElement | string;
|
|
8
|
+
collapse?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
onCollapseChange?: (collapse: boolean) => void;
|
|
14
|
+
};
|
|
15
|
+
export type DividerProps = IProps;
|
|
16
|
+
declare class QmDivider extends Component<IProps> {
|
|
17
|
+
static propTypes: {
|
|
18
|
+
label: PropTypes.Requireable<string>;
|
|
19
|
+
size: (props: any, propName: any, componentName: any) => void;
|
|
20
|
+
extra: PropTypes.Requireable<NonNullable<string | PropTypes.ReactElementLike | null | undefined>>;
|
|
21
|
+
collapse: PropTypes.Requireable<boolean>;
|
|
22
|
+
};
|
|
23
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
24
|
+
clickHandle: () => void;
|
|
25
|
+
render(): React.JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
export default QmDivider;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-08-21 20:34:44
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-divider: ~'@{qm-prefix}-divider';
|
|
10
|
+
|
|
11
|
+
.@{prefix-divider} {
|
|
12
|
+
.reset-container;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
padding: 0 @--padding-md;
|
|
16
|
+
height: @--height-md;
|
|
17
|
+
border: 1px solid @--border-color-base;
|
|
18
|
+
border-radius: @--border-radius-base;
|
|
19
|
+
background-color: @--background-color-cecondary;
|
|
20
|
+
position: relative;
|
|
21
|
+
&::before {
|
|
22
|
+
content: ' ';
|
|
23
|
+
position: absolute;
|
|
24
|
+
width: 6px;
|
|
25
|
+
left: -1px;
|
|
26
|
+
top: -1px;
|
|
27
|
+
bottom: -1px;
|
|
28
|
+
background-color: @--primary-color;
|
|
29
|
+
}
|
|
30
|
+
&__title {
|
|
31
|
+
margin-left: 5px;
|
|
32
|
+
}
|
|
33
|
+
&__extra {
|
|
34
|
+
.text-overflow-cut();
|
|
35
|
+
flex: 1;
|
|
36
|
+
margin-left: @--margin-md;
|
|
37
|
+
}
|
|
38
|
+
&__collapse {
|
|
39
|
+
margin-left: @--margin-md;
|
|
40
|
+
padding-left: 0;
|
|
41
|
+
padding-right: 0;
|
|
42
|
+
.anticon {
|
|
43
|
+
margin-left: 4px !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// ------ size ------
|
|
47
|
+
// 40 32 24
|
|
48
|
+
&--lg {
|
|
49
|
+
height: @--height-lg;
|
|
50
|
+
}
|
|
51
|
+
&--sm {
|
|
52
|
+
height: @--height-sm;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import type { AnyObject, AjaxResponse, ComponentSize } from '../../_utils/types';
|
|
4
|
+
import type { ButtonProps } from '../../antd';
|
|
5
|
+
type HttpRequestHeader = {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
type ActionConfig = {
|
|
9
|
+
api: (params?: Record<string, unknown>) => Promise<AjaxResponse>;
|
|
10
|
+
params?: AnyObject<unknown>;
|
|
11
|
+
};
|
|
12
|
+
type IProps = Omit<ButtonProps, 'prefixCls' | 'ghost' | 'danger' | 'block'> & {
|
|
13
|
+
action: string | ActionConfig;
|
|
14
|
+
fileName?: string;
|
|
15
|
+
size?: ComponentSize;
|
|
16
|
+
headers?: HttpRequestHeader;
|
|
17
|
+
withCredentials?: boolean;
|
|
18
|
+
params?: AnyObject<unknown>;
|
|
19
|
+
beforeDownload?: (action: string) => boolean;
|
|
20
|
+
onSuccess?: () => void;
|
|
21
|
+
onError?: (error: AnyObject<unknown>) => void;
|
|
22
|
+
};
|
|
23
|
+
type IState = {
|
|
24
|
+
loading: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type DownloadProps = IProps;
|
|
27
|
+
declare class QmDownload extends Component<IProps, IState> {
|
|
28
|
+
static propTypes: {
|
|
29
|
+
action: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
|
|
30
|
+
api: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
+
params: PropTypes.Requireable<object>;
|
|
32
|
+
}> | null | undefined>>;
|
|
33
|
+
size: (props: any, propName: any, componentName: any) => void;
|
|
34
|
+
fileName: PropTypes.Requireable<string>;
|
|
35
|
+
headers: PropTypes.Requireable<object>;
|
|
36
|
+
withCredentials: PropTypes.Requireable<boolean>;
|
|
37
|
+
params: PropTypes.Requireable<object>;
|
|
38
|
+
beforeDownload: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
+
onSuccess: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
+
};
|
|
42
|
+
static defaultProps: {
|
|
43
|
+
icon: React.JSX.Element;
|
|
44
|
+
children: string;
|
|
45
|
+
withCredentials: boolean;
|
|
46
|
+
};
|
|
47
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
48
|
+
state: IState;
|
|
49
|
+
getActionUrl(): Promise<string>;
|
|
50
|
+
downloadFile(url: string): Promise<void>;
|
|
51
|
+
downloadHandle: () => Promise<void>;
|
|
52
|
+
render(): React.JSX.Element;
|
|
53
|
+
}
|
|
54
|
+
export default QmDownload;
|