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,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CSSProperties } from '../../_utils/types';
|
|
3
|
+
type IEvent = {
|
|
4
|
+
scrollTop: number;
|
|
5
|
+
scrollLeft: number;
|
|
6
|
+
};
|
|
7
|
+
type IProps = {
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
wrapClassName?: string;
|
|
11
|
+
wrapStyle?: CSSProperties;
|
|
12
|
+
barWidth?: number;
|
|
13
|
+
always?: boolean;
|
|
14
|
+
minSize?: number;
|
|
15
|
+
native?: boolean;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
onScroll?: (event: IEvent) => void;
|
|
18
|
+
};
|
|
19
|
+
export type ScrollbarRef = {
|
|
20
|
+
container: HTMLDivElement;
|
|
21
|
+
scrollTop: number;
|
|
22
|
+
scrollLeft: number;
|
|
23
|
+
SET_SCROLL_TOP: (value: number) => void;
|
|
24
|
+
SET_SCROLL_LEFT: (value: number) => void;
|
|
25
|
+
};
|
|
26
|
+
export type ScrollbarProps = IProps;
|
|
27
|
+
declare const QmScrollbar: React.ForwardRefExoticComponent<IProps & React.RefAttributes<ScrollbarRef>>;
|
|
28
|
+
export default QmScrollbar;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type IThumbOption = {
|
|
3
|
+
size: number;
|
|
4
|
+
offset: number;
|
|
5
|
+
ratio: number;
|
|
6
|
+
};
|
|
7
|
+
type IProps = {
|
|
8
|
+
thumb: IThumbOption;
|
|
9
|
+
direction?: 'horizontal' | 'vertical';
|
|
10
|
+
barSize?: number;
|
|
11
|
+
always?: boolean;
|
|
12
|
+
onDrag?: (value: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
declare const Thumb: React.FC<IProps>;
|
|
15
|
+
export default Thumb;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2023-06-04 09:42:40
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2023-06-05 16:47:52
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-scrollbar: ~'@{qm-prefix}-scrollbar';
|
|
10
|
+
|
|
11
|
+
.@{prefix-scrollbar} {
|
|
12
|
+
position: relative;
|
|
13
|
+
&__wrap {
|
|
14
|
+
display: grid;
|
|
15
|
+
height: 100%;
|
|
16
|
+
overflow: auto;
|
|
17
|
+
&--hidden {
|
|
18
|
+
scrollbar-width: none;
|
|
19
|
+
&::-webkit-scrollbar {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
&__view {
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
&__bar {
|
|
28
|
+
position: absolute;
|
|
29
|
+
right: 2px;
|
|
30
|
+
bottom: 2px;
|
|
31
|
+
z-index: 2;
|
|
32
|
+
border-radius: 4px;
|
|
33
|
+
&.is-vertical {
|
|
34
|
+
width: 6px;
|
|
35
|
+
top: 2px;
|
|
36
|
+
& > div {
|
|
37
|
+
width: 100%;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
&.is-horizontal {
|
|
41
|
+
height: 6px;
|
|
42
|
+
left: 2px;
|
|
43
|
+
& > div {
|
|
44
|
+
height: 100%;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// fade-transition
|
|
48
|
+
&.fade {
|
|
49
|
+
transition: all 0.3s ease;
|
|
50
|
+
}
|
|
51
|
+
&.fade.preEnter,
|
|
52
|
+
&.fade.exiting {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
}
|
|
55
|
+
&.fade.exited {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
&__thumb {
|
|
60
|
+
position: relative;
|
|
61
|
+
display: block;
|
|
62
|
+
width: 0;
|
|
63
|
+
height: 0;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
border-radius: inherit;
|
|
66
|
+
background-color: #909090;
|
|
67
|
+
opacity: 0.3;
|
|
68
|
+
&:hover {
|
|
69
|
+
opacity: 0.5;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IFormItem, IFormData } from '../../form/src/types';
|
|
3
|
+
import type { IFetch, IColumn, IRowKey, IRecord } from '../../table/src/table/types';
|
|
4
|
+
import type { ComponentSize } from '../../_utils/types';
|
|
5
|
+
type ITableConfig = {
|
|
6
|
+
fetch?: IFetch;
|
|
7
|
+
columns?: IColumn[];
|
|
8
|
+
rowKey?: ((row: IRecord, index: number) => IRowKey) | IRowKey;
|
|
9
|
+
webPagination?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type IProps = {
|
|
12
|
+
size?: ComponentSize;
|
|
13
|
+
uniqueKey?: string;
|
|
14
|
+
initialValue?: IFormData;
|
|
15
|
+
defaultSelectedKeys?: IRowKey[];
|
|
16
|
+
selectionRows?: IRecord[];
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
filters?: IFormItem[];
|
|
19
|
+
table?: ITableConfig;
|
|
20
|
+
onClose: (data: IRecord | null, keys?: IRowKey[]) => void;
|
|
21
|
+
};
|
|
22
|
+
export type SearchHelperProps = IProps;
|
|
23
|
+
declare const SearchHelper: React.FC<IProps>;
|
|
24
|
+
export default SearchHelper;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2022-01-11 18:01:20
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-01-11 18:43:06
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-search-helper: ~'@{qm-prefix}-search-helper';
|
|
10
|
+
|
|
11
|
+
.@{prefix-search-helper}--wrapper {
|
|
12
|
+
.reset-container();
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentSize } from '../../_utils/types';
|
|
3
|
+
import type { IFetch, IRecord, ICheckStrategy } from '../../table/src/table/types';
|
|
4
|
+
import type { TreeProps } from '../../antd';
|
|
5
|
+
type IProps = TreeProps & {
|
|
6
|
+
size?: ComponentSize;
|
|
7
|
+
filterable?: boolean;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
draggable?: boolean;
|
|
10
|
+
dataSource?: IRecord[];
|
|
11
|
+
fetch?: IFetch;
|
|
12
|
+
fieldsDefine?: {
|
|
13
|
+
textKey?: string;
|
|
14
|
+
valueKey?: string;
|
|
15
|
+
children?: string;
|
|
16
|
+
};
|
|
17
|
+
value?: React.Key[];
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
asyncLoad?: boolean;
|
|
20
|
+
checkStrictly?: boolean;
|
|
21
|
+
checkStrategy?: ICheckStrategy;
|
|
22
|
+
showSearchBar?: boolean;
|
|
23
|
+
showCollapse?: boolean;
|
|
24
|
+
onSelectChange?: (records: IRecord[] | IRecord) => void;
|
|
25
|
+
onCheckChange?: (records: IRecord[] | IRecord) => void;
|
|
26
|
+
onDragChange?: (info: any, data: IRecord) => void;
|
|
27
|
+
};
|
|
28
|
+
type SearchTreeRef = {
|
|
29
|
+
INSERT_RECORD: (parentKey: React.Key, record: IRecord | IRecord[]) => void;
|
|
30
|
+
REMOVE_RECORD: (key: React.Key) => void;
|
|
31
|
+
UPDATE_RECORD: (key: React.Key, record: IRecord) => void;
|
|
32
|
+
};
|
|
33
|
+
export type SearchTreeProps = IProps;
|
|
34
|
+
declare const SearchTree: React.ForwardRefExoticComponent<TreeProps<import("rc-tree/lib/interface").DataNode> & {
|
|
35
|
+
size?: ComponentSize | undefined;
|
|
36
|
+
filterable?: boolean | undefined;
|
|
37
|
+
multiple?: boolean | undefined;
|
|
38
|
+
draggable?: boolean | undefined;
|
|
39
|
+
dataSource?: IRecord<any>[] | undefined;
|
|
40
|
+
fetch?: IFetch | undefined;
|
|
41
|
+
fieldsDefine?: {
|
|
42
|
+
textKey?: string | undefined;
|
|
43
|
+
valueKey?: string | undefined;
|
|
44
|
+
children?: string | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
value?: React.Key[] | undefined;
|
|
47
|
+
placeholder?: string | undefined;
|
|
48
|
+
asyncLoad?: boolean | undefined;
|
|
49
|
+
checkStrictly?: boolean | undefined;
|
|
50
|
+
checkStrategy?: ICheckStrategy | undefined;
|
|
51
|
+
showSearchBar?: boolean | undefined;
|
|
52
|
+
showCollapse?: boolean | undefined;
|
|
53
|
+
onSelectChange?: ((records: IRecord[] | IRecord) => void) | undefined;
|
|
54
|
+
onCheckChange?: ((records: IRecord[] | IRecord) => void) | undefined;
|
|
55
|
+
onDragChange?: ((info: any, data: IRecord) => void) | undefined;
|
|
56
|
+
} & React.RefAttributes<SearchTreeRef>>;
|
|
57
|
+
export default SearchTree;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2022-01-11 18:01:20
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-09-04 16:40:18
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-search-tree: ~'@{qm-prefix}-search-tree';
|
|
10
|
+
|
|
11
|
+
.@{prefix-search-tree} {
|
|
12
|
+
.reset-container();
|
|
13
|
+
height: 100%;
|
|
14
|
+
.topper {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
|
+
.ant-input-search {
|
|
19
|
+
flex: 1 0;
|
|
20
|
+
margin-bottom: 8px;
|
|
21
|
+
}
|
|
22
|
+
.trigger {
|
|
23
|
+
margin-left: 8px;
|
|
24
|
+
margin-bottom: 8px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
.ant-tree {
|
|
28
|
+
.filter-node {
|
|
29
|
+
& > span:last-of-type {
|
|
30
|
+
color: @--primary-color;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { ComponentSize } from '../../_utils/types';
|
|
3
|
+
import type { SpaceProps as AntSpaceProps } from '../../antd';
|
|
4
|
+
type IProps = Omit<AntSpaceProps, 'size'> & {
|
|
5
|
+
size?: ComponentSize | number;
|
|
6
|
+
};
|
|
7
|
+
export type SpaceProps = IProps;
|
|
8
|
+
declare class QmSpace extends Component<IProps> {
|
|
9
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
10
|
+
render(): React.JSX.Element;
|
|
11
|
+
}
|
|
12
|
+
export default QmSpace;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { SpinProps as AntSpinProps } from '../../antd';
|
|
3
|
+
type IProps = AntSpinProps & {
|
|
4
|
+
fullHeight?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type SpinProps = IProps;
|
|
7
|
+
declare class QmSpin extends Component<IProps> {
|
|
8
|
+
static defaultProps: {
|
|
9
|
+
tip: string;
|
|
10
|
+
fullHeight: boolean;
|
|
11
|
+
};
|
|
12
|
+
render(): React.JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export default QmSpin;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-07-31 22:38:07
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-spin: ~'@{qm-prefix}-spin';
|
|
10
|
+
|
|
11
|
+
.@{prefix-spin}-full-height {
|
|
12
|
+
height: 100%;
|
|
13
|
+
.ant-spin-container {
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ISplitContext = {
|
|
3
|
+
splitRef: React.RefObject<HTMLDivElement>;
|
|
4
|
+
direction: 'horizontal' | 'vertical';
|
|
5
|
+
dragging: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const SplitContext: React.Context<ISplitContext | undefined>;
|
|
8
|
+
export default SplitContext;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type IProps = {
|
|
3
|
+
min?: number | string;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
};
|
|
7
|
+
export type SplitPaneProps = IProps;
|
|
8
|
+
declare const QmSplitPane: React.ForwardRefExoticComponent<IProps & {
|
|
9
|
+
offset?: string | undefined;
|
|
10
|
+
} & React.RefAttributes<any>>;
|
|
11
|
+
export default QmSplitPane;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SplitPaneProps } from './split-pane';
|
|
3
|
+
type IProps = {
|
|
4
|
+
direction?: 'horizontal' | 'vertical';
|
|
5
|
+
defaultValue?: number | string;
|
|
6
|
+
uniqueKey?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
onDragStart?: (offset: number) => void;
|
|
10
|
+
onDrag?: (offset: number) => void;
|
|
11
|
+
onDragEnd?: (offset: number) => void;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export type SplitProps = IProps;
|
|
15
|
+
declare const QmSplit: React.FC<IProps> & {
|
|
16
|
+
Pane: React.FunctionComponent<SplitPaneProps>;
|
|
17
|
+
};
|
|
18
|
+
export default QmSplit;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-02-09 09:27:46
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-11-05 13:33:02
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-split: ~'@{qm-prefix}-split';
|
|
10
|
+
@prefix-split-pane: ~'@{qm-prefix}-split-pane';
|
|
11
|
+
|
|
12
|
+
.@{prefix-split} {
|
|
13
|
+
.reset-container();
|
|
14
|
+
display: flex;
|
|
15
|
+
&.vertical {
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
}
|
|
18
|
+
&__resize-bar {
|
|
19
|
+
position: relative;
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
border-radius: @--border-radius-base - 1px;
|
|
22
|
+
transition: background-color 0.4s ease;
|
|
23
|
+
user-select: none;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
z-index: 1;
|
|
26
|
+
&.horizontal {
|
|
27
|
+
width: 11px;
|
|
28
|
+
margin: 0 -5px;
|
|
29
|
+
cursor: col-resize;
|
|
30
|
+
&::after {
|
|
31
|
+
content: ' ';
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
left: 50%;
|
|
36
|
+
width: 0;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
border-left: 1px solid @--border-color-base;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
&.vertical {
|
|
42
|
+
height: 11px;
|
|
43
|
+
margin: -5px 0;
|
|
44
|
+
cursor: row-resize;
|
|
45
|
+
&::after {
|
|
46
|
+
content: ' ';
|
|
47
|
+
position: absolute;
|
|
48
|
+
left: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
top: 50%;
|
|
51
|
+
height: 0;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
border-top: 1px solid @--border-color-base;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
&:hover,
|
|
57
|
+
&:active {
|
|
58
|
+
background-color: @--background-color;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
.@{prefix-split-pane} {
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
&.horizontal {
|
|
64
|
+
&:nth-child(1) {
|
|
65
|
+
padding-right: 5px;
|
|
66
|
+
}
|
|
67
|
+
&:nth-child(3) {
|
|
68
|
+
padding-left: 5px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
&.vertical {
|
|
72
|
+
&:nth-of-type(1) {
|
|
73
|
+
padding-bottom: 5px;
|
|
74
|
+
}
|
|
75
|
+
&:nth-of-type(3) {
|
|
76
|
+
padding-top: 5px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
&.isLocked {
|
|
80
|
+
pointer-events: none;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|