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,68 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import type { ComponentSize } from '../../_utils/types';
|
|
4
|
+
import type { ModalProps as AntModalProps } from '../../antd';
|
|
5
|
+
type EventType = React.MouseEvent<HTMLElement>;
|
|
6
|
+
type IProps = AntModalProps & {
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
size?: ComponentSize;
|
|
9
|
+
height?: number | string;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
draggable?: boolean;
|
|
12
|
+
showFullScreen?: boolean;
|
|
13
|
+
stopMouseDownEvent?: boolean;
|
|
14
|
+
onClose?: (e: EventType) => void;
|
|
15
|
+
onClosed?: () => void;
|
|
16
|
+
onFullChange?: (value: boolean) => void;
|
|
17
|
+
};
|
|
18
|
+
type IState = {
|
|
19
|
+
fullscreen: boolean;
|
|
20
|
+
spinning: boolean;
|
|
21
|
+
sloading: boolean;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
bounds: {
|
|
24
|
+
left: number;
|
|
25
|
+
top: number;
|
|
26
|
+
bottom: number;
|
|
27
|
+
right: number;
|
|
28
|
+
};
|
|
29
|
+
position?: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type ModalProps = IProps;
|
|
35
|
+
declare class QmModal extends Component<IProps, IState> {
|
|
36
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
37
|
+
static propTypes: {
|
|
38
|
+
size: (props: any, propName: any, componentName: any) => void;
|
|
39
|
+
spinning: PropTypes.Requireable<boolean>;
|
|
40
|
+
};
|
|
41
|
+
private $event;
|
|
42
|
+
static defaultProps: {
|
|
43
|
+
width: string;
|
|
44
|
+
showFullScreen: boolean;
|
|
45
|
+
destroyOnClose: boolean;
|
|
46
|
+
draggable: boolean;
|
|
47
|
+
footer: null;
|
|
48
|
+
style: {
|
|
49
|
+
top: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
draggleRef: React.RefObject<HTMLDivElement>;
|
|
53
|
+
private opened;
|
|
54
|
+
get $size(): any;
|
|
55
|
+
get defaultHeight(): string;
|
|
56
|
+
state: IState;
|
|
57
|
+
componentDidUpdate(prevProps: IProps, prevState: IState): void;
|
|
58
|
+
addMouseDownEvent: () => void;
|
|
59
|
+
removeMouseDownEvent: () => void;
|
|
60
|
+
onStart: (ev: any, uiData: any) => void;
|
|
61
|
+
toggleHandle: (ev: any) => void;
|
|
62
|
+
afterVisibleChange: () => void;
|
|
63
|
+
renderTitle(): React.JSX.Element;
|
|
64
|
+
START_LOADING: () => void;
|
|
65
|
+
STOP_LOADING: () => void;
|
|
66
|
+
render(): React.JSX.Element;
|
|
67
|
+
}
|
|
68
|
+
export default QmModal;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-11-26 20:25:21
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-modal: ~'@{qm-prefix}-modal';
|
|
10
|
+
|
|
11
|
+
.@{prefix-modal} {
|
|
12
|
+
.ant-modal-header {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
height: 44px;
|
|
17
|
+
padding: 0 15px;
|
|
18
|
+
border-bottom: 1px solid @--border-color-secondary;
|
|
19
|
+
.ant-modal-title {
|
|
20
|
+
width: 100%;
|
|
21
|
+
> div {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
padding-right: 20px;
|
|
26
|
+
cursor: move;
|
|
27
|
+
.full-screen {
|
|
28
|
+
padding: @--padding-md 5px @--padding-md @--padding-md;
|
|
29
|
+
color: @--text-color-secondary;
|
|
30
|
+
line-height: 1;
|
|
31
|
+
font-size: @--font-size-lg;
|
|
32
|
+
transition: all 0.3s ease;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
&:hover {
|
|
35
|
+
color: @--text-color;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.ant-modal-close {
|
|
42
|
+
top: 3px;
|
|
43
|
+
font-size: 17px;
|
|
44
|
+
padding: @--padding-md 15px @--padding-md 5px;
|
|
45
|
+
.ant-modal-close-x {
|
|
46
|
+
width: 1em;
|
|
47
|
+
height: 1em;
|
|
48
|
+
font-size: inherit;
|
|
49
|
+
line-height: 1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
.ant-modal-body {
|
|
53
|
+
padding: @--padding-md;
|
|
54
|
+
}
|
|
55
|
+
.spinning {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 44px;
|
|
58
|
+
left: 0;
|
|
59
|
+
right: 0;
|
|
60
|
+
bottom: 0;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
align-items: center;
|
|
65
|
+
background-color: rgba(255, 255, 255, 0.65);
|
|
66
|
+
z-index: 9999;
|
|
67
|
+
.ant-spin-text {
|
|
68
|
+
margin-top: 4px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// ------ size ------
|
|
72
|
+
// 52 48 44
|
|
73
|
+
&--lg {
|
|
74
|
+
.ant-modal-header {
|
|
75
|
+
height: 48px;
|
|
76
|
+
}
|
|
77
|
+
.ant-modal-close {
|
|
78
|
+
top: 5px;
|
|
79
|
+
}
|
|
80
|
+
.spinning {
|
|
81
|
+
top: 48px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
&--sm {
|
|
85
|
+
.ant-modal-header {
|
|
86
|
+
height: 40px;
|
|
87
|
+
}
|
|
88
|
+
.ant-modal-close {
|
|
89
|
+
top: 1px;
|
|
90
|
+
}
|
|
91
|
+
.spinning {
|
|
92
|
+
top: 40px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare function patchDict(patchers: any): void;
|
|
2
|
+
declare function isSupported(force?: boolean): boolean;
|
|
3
|
+
declare function genToken(ch: any): any;
|
|
4
|
+
declare function parse(str: any): any;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
isSupported: typeof isSupported;
|
|
7
|
+
parse: typeof parse;
|
|
8
|
+
patchDict: typeof patchDict;
|
|
9
|
+
genToken: typeof genToken;
|
|
10
|
+
convertToPinyin(str: string, lowerCase: boolean, separator: string): any;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
PINYINS: string[];
|
|
3
|
+
UNIHANS: string[];
|
|
4
|
+
EXCEPTIONS: {
|
|
5
|
+
曾: string;
|
|
6
|
+
沈: string;
|
|
7
|
+
嗲: string;
|
|
8
|
+
碡: string;
|
|
9
|
+
聒: string;
|
|
10
|
+
炔: string;
|
|
11
|
+
蚵: string;
|
|
12
|
+
砉: string;
|
|
13
|
+
嬤: string;
|
|
14
|
+
嬷: string;
|
|
15
|
+
蹒: string;
|
|
16
|
+
蹊: string;
|
|
17
|
+
丬: string;
|
|
18
|
+
霰: string;
|
|
19
|
+
莘: string;
|
|
20
|
+
豉: string;
|
|
21
|
+
饧: string;
|
|
22
|
+
筠: string;
|
|
23
|
+
长: string;
|
|
24
|
+
帧: string;
|
|
25
|
+
峙: string;
|
|
26
|
+
郍: string;
|
|
27
|
+
芎: string;
|
|
28
|
+
谁: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getLodop(oOBJECT: any, oEMBED: any): any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type IProps = {
|
|
3
|
+
templateRender?: () => React.Component;
|
|
4
|
+
directPrint?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type ContainerRef = {
|
|
7
|
+
createPreviewDom: () => void;
|
|
8
|
+
createExportHtml: () => void;
|
|
9
|
+
createPrintHtml: (pageNumber?: number) => void;
|
|
10
|
+
SHOW_PREVIEW: () => void;
|
|
11
|
+
DIRECT_PRINT: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare const Container: React.ForwardRefExoticComponent<IProps & React.RefAttributes<ContainerRef>>;
|
|
14
|
+
export default Container;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { IDict } from '../../_utils/types';
|
|
3
|
+
type IProps = {
|
|
4
|
+
templateRender?: () => React.Component;
|
|
5
|
+
uniqueKey?: string;
|
|
6
|
+
defaultConfig?: Record<string, any>;
|
|
7
|
+
preview?: boolean;
|
|
8
|
+
closeAfterPrint?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
};
|
|
11
|
+
type IState = {
|
|
12
|
+
visible: boolean;
|
|
13
|
+
form: {
|
|
14
|
+
printerName: number;
|
|
15
|
+
printerType: 'laser' | 'stylus';
|
|
16
|
+
copies: number;
|
|
17
|
+
scale: number;
|
|
18
|
+
setting: {
|
|
19
|
+
distance: {
|
|
20
|
+
left: number;
|
|
21
|
+
right: number;
|
|
22
|
+
top: number;
|
|
23
|
+
bottom: number;
|
|
24
|
+
};
|
|
25
|
+
pageSize: string;
|
|
26
|
+
direction: 'vertical' | 'horizontal';
|
|
27
|
+
doubleSide: number;
|
|
28
|
+
doubleSideType: 'auto' | 'manual';
|
|
29
|
+
fixedLogo: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
printPage: number | undefined;
|
|
33
|
+
currentPage: number;
|
|
34
|
+
totalPage: number;
|
|
35
|
+
};
|
|
36
|
+
declare class Preview extends Component<IProps, IState> {
|
|
37
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
38
|
+
private provide;
|
|
39
|
+
containRef: React.RefObject<any>;
|
|
40
|
+
state: IState;
|
|
41
|
+
get printerTypeItems(): IDict[];
|
|
42
|
+
get printerItems(): {
|
|
43
|
+
text: string;
|
|
44
|
+
value: number;
|
|
45
|
+
}[];
|
|
46
|
+
get isWindowsPrinter(): boolean;
|
|
47
|
+
get pageSize(): number[];
|
|
48
|
+
get printerKey(): string;
|
|
49
|
+
componentDidMount(): Promise<void>;
|
|
50
|
+
pageChangeHandle: (val: number) => void;
|
|
51
|
+
exportClickHandle: () => void;
|
|
52
|
+
printClickHandle: () => Promise<void>;
|
|
53
|
+
doClose: () => void;
|
|
54
|
+
getPrintConfig: (key: string) => Promise<any>;
|
|
55
|
+
savePrintConfig: (key: string, value: any) => Promise<void>;
|
|
56
|
+
createStyle: () => string;
|
|
57
|
+
doPrint: (__html__: any) => void;
|
|
58
|
+
doExport: (__html__: any) => void;
|
|
59
|
+
render(): React.JSX.Element;
|
|
60
|
+
}
|
|
61
|
+
export default Preview;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import type { ComponentSize } from '../../_utils/types';
|
|
4
|
+
import type { ButtonProps } from '../../antd';
|
|
5
|
+
type IProps = ButtonProps & {
|
|
6
|
+
size?: ComponentSize;
|
|
7
|
+
templateRender?: () => React.Component;
|
|
8
|
+
uniqueKey?: string;
|
|
9
|
+
defaultConfig?: Record<string, any>;
|
|
10
|
+
preview?: boolean;
|
|
11
|
+
closeAfterPrint?: boolean;
|
|
12
|
+
click?: () => void;
|
|
13
|
+
};
|
|
14
|
+
type IState = {
|
|
15
|
+
visible: boolean;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type PrintProps = IProps;
|
|
19
|
+
declare class QmPrint extends Component<IProps, IState> {
|
|
20
|
+
static propTypes: {
|
|
21
|
+
size: (props: any, propName: any, componentName: any) => void;
|
|
22
|
+
templateRender: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
23
|
+
};
|
|
24
|
+
static defaultProps: {
|
|
25
|
+
preview: boolean;
|
|
26
|
+
type: string;
|
|
27
|
+
icon: React.JSX.Element;
|
|
28
|
+
};
|
|
29
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
30
|
+
previewRef: React.RefObject<any>;
|
|
31
|
+
state: IState;
|
|
32
|
+
clickHandle: () => Promise<void>;
|
|
33
|
+
createRender: () => React.JSX.Element | null;
|
|
34
|
+
DO_PRINT: () => Promise<void>;
|
|
35
|
+
render(): React.JSX.Element;
|
|
36
|
+
}
|
|
37
|
+
export default QmPrint;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { QmForm, QmFormItem } from '../../index';
|
|
3
|
+
type IProps = {
|
|
4
|
+
setting: {
|
|
5
|
+
distance: {
|
|
6
|
+
left: number;
|
|
7
|
+
right: number;
|
|
8
|
+
top: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
};
|
|
11
|
+
pageSize: string;
|
|
12
|
+
direction: 'vertical' | 'horizontal';
|
|
13
|
+
doubleSide: number;
|
|
14
|
+
doubleSideType: 'auto' | 'manual';
|
|
15
|
+
fixedLogo: number;
|
|
16
|
+
};
|
|
17
|
+
onChange: (data: IProps['setting']) => void;
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
};
|
|
20
|
+
type IState = {
|
|
21
|
+
formList: QmFormItem[];
|
|
22
|
+
};
|
|
23
|
+
declare class Setting extends Component<IProps, IState> {
|
|
24
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
25
|
+
formRef: React.RefObject<QmForm>;
|
|
26
|
+
createFormList: () => QmFormItem[];
|
|
27
|
+
getInitialvalue: () => {
|
|
28
|
+
disleft: number;
|
|
29
|
+
disright: number;
|
|
30
|
+
distop: number;
|
|
31
|
+
disbottom: number;
|
|
32
|
+
pageSize: string;
|
|
33
|
+
direction: "vertical" | "horizontal";
|
|
34
|
+
doubleSide: number;
|
|
35
|
+
doubleSideType: "auto" | "manual";
|
|
36
|
+
fixedLogo: number;
|
|
37
|
+
};
|
|
38
|
+
getInitialExtra: () => {
|
|
39
|
+
disleft: string;
|
|
40
|
+
disright: string;
|
|
41
|
+
distop: string;
|
|
42
|
+
disbottom: string;
|
|
43
|
+
};
|
|
44
|
+
state: IState;
|
|
45
|
+
confirmHandle: () => Promise<void>;
|
|
46
|
+
cancelHandle: () => void;
|
|
47
|
+
render(): React.JSX.Element;
|
|
48
|
+
}
|
|
49
|
+
export default Setting;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const getDPI: () => number[];
|
|
2
|
+
export declare const mmToPx: (value: number) => number;
|
|
3
|
+
export declare const pxToMm: (value: number) => number;
|
|
4
|
+
export declare const insertBefore: (el: HTMLElement, parent: HTMLElement) => void;
|
|
5
|
+
export declare const isPageBreak: (str: string) => boolean;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-03-01 14:06:41
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-print-preview: ~'@{qm-prefix}-print-preview';
|
|
10
|
+
@prefix-print-container: ~'@{qm-prefix}-print-container';
|
|
11
|
+
|
|
12
|
+
.@{prefix-print-preview} {
|
|
13
|
+
.reset-container();
|
|
14
|
+
margin: -@--padding-md;
|
|
15
|
+
height: calc(100% + 20px);
|
|
16
|
+
min-height: calc(80vh - 48px);
|
|
17
|
+
.outer {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
height: 100%;
|
|
21
|
+
min-height: inherit;
|
|
22
|
+
.header,
|
|
23
|
+
.footer {
|
|
24
|
+
padding: 2px 10px;
|
|
25
|
+
background-color: @--background-color;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
& > span {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
& > span + span {
|
|
33
|
+
margin-left: 10px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
.main {
|
|
37
|
+
flex: 1;
|
|
38
|
+
position: relative;
|
|
39
|
+
}
|
|
40
|
+
.header {
|
|
41
|
+
border-bottom: 1px solid @--border-color-base;
|
|
42
|
+
.text-btn {
|
|
43
|
+
padding-left: 0;
|
|
44
|
+
padding-right: 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.footer {
|
|
48
|
+
border-top: 1px solid @--border-color-base;
|
|
49
|
+
.ant-slider {
|
|
50
|
+
width: 150px;
|
|
51
|
+
}
|
|
52
|
+
.scale-text {
|
|
53
|
+
width: 40px;
|
|
54
|
+
font-style: normal;
|
|
55
|
+
margin-left: 10px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// size
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.@{prefix-print-container} {
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: 0;
|
|
65
|
+
top: 0;
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 100%;
|
|
68
|
+
background-color: #dadce0;
|
|
69
|
+
&.no-visible {
|
|
70
|
+
opacity: 0;
|
|
71
|
+
height: 0 !important;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
z-index: -1;
|
|
74
|
+
}
|
|
75
|
+
.spin {
|
|
76
|
+
height: 100%;
|
|
77
|
+
.ant-spin-container {
|
|
78
|
+
height: 100%;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.preview {
|
|
82
|
+
position: relative;
|
|
83
|
+
height: 100%;
|
|
84
|
+
overflow-x: auto;
|
|
85
|
+
overflow-y: auto;
|
|
86
|
+
.origin-template {
|
|
87
|
+
position: absolute;
|
|
88
|
+
left: 50%;
|
|
89
|
+
top: 0;
|
|
90
|
+
height: 0;
|
|
91
|
+
z-index: -1;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
visibility: hidden;
|
|
94
|
+
}
|
|
95
|
+
.workspace {
|
|
96
|
+
margin: 0 auto;
|
|
97
|
+
background-color: #fff;
|
|
98
|
+
transform-origin: left top;
|
|
99
|
+
box-sizing: content-box;
|
|
100
|
+
}
|
|
101
|
+
/* 打印模板公共样式 */
|
|
102
|
+
table {
|
|
103
|
+
width: 100%;
|
|
104
|
+
border-spacing: 0;
|
|
105
|
+
border-collapse: collapse;
|
|
106
|
+
table-layout: fixed;
|
|
107
|
+
}
|
|
108
|
+
table tr td {
|
|
109
|
+
padding: 2px;
|
|
110
|
+
word-wrap: break-word;
|
|
111
|
+
}
|
|
112
|
+
.fs12 {
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
}
|
|
115
|
+
.fs13 {
|
|
116
|
+
font-size: 13px;
|
|
117
|
+
}
|
|
118
|
+
.fs14 {
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
}
|
|
121
|
+
.fw500 {
|
|
122
|
+
font-weight: 500;
|
|
123
|
+
}
|
|
124
|
+
.fw700 {
|
|
125
|
+
font-weight: 700;
|
|
126
|
+
}
|
|
127
|
+
.fl {
|
|
128
|
+
float: left;
|
|
129
|
+
}
|
|
130
|
+
.fr {
|
|
131
|
+
float: right;
|
|
132
|
+
}
|
|
133
|
+
.tc {
|
|
134
|
+
text-align: center;
|
|
135
|
+
}
|
|
136
|
+
.tr {
|
|
137
|
+
text-align: right;
|
|
138
|
+
}
|
|
139
|
+
.bor {
|
|
140
|
+
border: 1px solid #000;
|
|
141
|
+
}
|
|
142
|
+
.bor-t {
|
|
143
|
+
border-top: 1px solid #000;
|
|
144
|
+
}
|
|
145
|
+
.bor-b {
|
|
146
|
+
border-bottom: 1px solid #000;
|
|
147
|
+
}
|
|
148
|
+
.bor-l {
|
|
149
|
+
border-left: 1px solid #000;
|
|
150
|
+
}
|
|
151
|
+
.bor-r {
|
|
152
|
+
border-right: 1px solid #000;
|
|
153
|
+
}
|
|
154
|
+
.no-bor {
|
|
155
|
+
border: none !important;
|
|
156
|
+
}
|
|
157
|
+
/* 打印模板公共样式 END */
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* IE11 hack */
|
|
162
|
+
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
163
|
+
.@{prefix-print-preview} {
|
|
164
|
+
.outer {
|
|
165
|
+
height: 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
.is-fullscreen {
|
|
169
|
+
.@{prefix-print-preview} {
|
|
170
|
+
.outer {
|
|
171
|
+
height: 100%;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-02-09 11:26:35
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-10-15 09:36:56
|
|
6
|
+
*/
|
|
7
|
+
declare module '*.svg' {
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
10
|
+
const src: string;
|
|
11
|
+
export default src;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.css' {
|
|
15
|
+
const resource: { [key: string]: string };
|
|
16
|
+
export default resource;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const resource: { [key: string]: string };
|
|
21
|
+
export default resource;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.json' {
|
|
25
|
+
const value: any;
|
|
26
|
+
export const version: string;
|
|
27
|
+
export default value;
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
multiple?: boolean;
|
|
16
|
+
filters?: IFormItem[];
|
|
17
|
+
table?: ITableConfig;
|
|
18
|
+
onClose: (data: IRecord[] | null) => void;
|
|
19
|
+
};
|
|
20
|
+
export type RangeTableHelperProps = IProps;
|
|
21
|
+
declare const RangeTableHelper: React.FC<IProps>;
|
|
22
|
+
export default RangeTableHelper;
|
|
@@ -0,0 +1,18 @@
|
|
|
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-range-helper: ~'@{qm-prefix}-range-helper';
|
|
10
|
+
|
|
11
|
+
.@{prefix-range-helper}--wrapper {
|
|
12
|
+
.reset-container();
|
|
13
|
+
height: 100%;
|
|
14
|
+
.icon-sign {
|
|
15
|
+
font-size: 18px;
|
|
16
|
+
line-height: 1;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type IScrollbarContext = {
|
|
3
|
+
dragging: boolean;
|
|
4
|
+
scrollbarElement: React.RefObject<HTMLElement>;
|
|
5
|
+
wrapElement: React.RefObject<HTMLElement>;
|
|
6
|
+
};
|
|
7
|
+
export declare const ScrollbarContext: React.Context<IScrollbarContext | undefined>;
|