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,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2020-03-18 10:26:46
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-11-26 21:03:04
|
|
6
|
+
*/
|
|
7
|
+
@prefix-table: ~'@{qm-prefix}-table';
|
|
8
|
+
|
|
9
|
+
.@{prefix-table}-toolbox {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
padding: 5px 3px;
|
|
12
|
+
line-height: 1;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
transition: all 0.3s ease;
|
|
15
|
+
.icon {
|
|
16
|
+
font-size: 1.05em;
|
|
17
|
+
}
|
|
18
|
+
&:hover {
|
|
19
|
+
color: @v-primary-color;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.top-toolbox__popper {
|
|
24
|
+
.ant-dropdown-menu {
|
|
25
|
+
&-title-content {
|
|
26
|
+
display: flex;
|
|
27
|
+
& > span {
|
|
28
|
+
flex: 1 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
&[class*='--sm'] {
|
|
33
|
+
.ant-dropdown-menu {
|
|
34
|
+
&-item {
|
|
35
|
+
padding: 2px 8px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-10-28 12:20:04
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2022-02-27 21:52:42
|
|
6
|
+
*/
|
|
7
|
+
@prefix-table: ~'@{qm-prefix}-table';
|
|
8
|
+
|
|
9
|
+
.@{prefix-table}-top {
|
|
10
|
+
display: flex;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
margin-bottom: @v-module-distance;
|
|
13
|
+
&__space {
|
|
14
|
+
flex: 1;
|
|
15
|
+
display: inherit;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
&-slot {
|
|
18
|
+
flex: 1;
|
|
19
|
+
align-items: center;
|
|
20
|
+
height: 100%;
|
|
21
|
+
display: inherit;
|
|
22
|
+
.ant-btn {
|
|
23
|
+
margin-right: @v-module-distance - 2px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
&__actions {
|
|
28
|
+
display: inherit;
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2020-02-28 21:58:58
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-09-04 16:24:06
|
|
6
|
+
*/
|
|
7
|
+
/* font-size */
|
|
8
|
+
@v-font-size: @--font-size-base;
|
|
9
|
+
@v-font-size-large: @--font-size-base;
|
|
10
|
+
@v-font-size-small: @--font-size-sm;
|
|
11
|
+
|
|
12
|
+
@v-font-color: @--text-color;
|
|
13
|
+
@v-font-secondary-dark-color: @--text-color-secondary-dark;
|
|
14
|
+
@v-font-secondary-color: @--text-color-secondary;
|
|
15
|
+
@v-font-disabled-color: @--disabled-color;
|
|
16
|
+
|
|
17
|
+
/* primary color */
|
|
18
|
+
@v-primary-color: @--primary-color;
|
|
19
|
+
@v-danger-color: @--error-color;
|
|
20
|
+
|
|
21
|
+
// module distance
|
|
22
|
+
@v-module-distance: @--padding-md;
|
|
23
|
+
|
|
24
|
+
/* border radius */
|
|
25
|
+
@v-border-radius: @--border-radius-base;
|
|
26
|
+
|
|
27
|
+
/* icon */
|
|
28
|
+
@v-icon-color: #bfbfbf;
|
|
29
|
+
|
|
30
|
+
/* table color */
|
|
31
|
+
@v-table-header-background-color: #fafafa;
|
|
32
|
+
@v-table-border-color: #e8e8e8;
|
|
33
|
+
@v-table-resizable-color: #d9d9d9;
|
|
34
|
+
@v-table-background-color: #ffffff;
|
|
35
|
+
@v-table-footer-background-color: #fafafa;
|
|
36
|
+
@v-table-column-sort-hover-color: #f2f2f2;
|
|
37
|
+
@v-table-column-sorted-color: #f5f5f5;
|
|
38
|
+
@v-table-column-filter-hover-color: #e5e5e5;
|
|
39
|
+
|
|
40
|
+
/* table row */
|
|
41
|
+
@v-table-row-height: 34px;
|
|
42
|
+
@v-table-row-height-large: 42px;
|
|
43
|
+
@v-table-row-height-small: 26px;
|
|
44
|
+
@v-table-row-line-height: 24px;
|
|
45
|
+
@v-table-row-hover-background-color: #f5f5f5;
|
|
46
|
+
@v-table-row-selected-background-color: @--primary-2;
|
|
47
|
+
@v-table-row-current-background-color: @--primary-4;
|
|
48
|
+
@v-table-row-expanded-background-color: #fafafa;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { TabPaneProps as AntTabPaneProps } from '../../antd';
|
|
3
|
+
type IProps = AntTabPaneProps;
|
|
4
|
+
export type TabPaneProps = IProps;
|
|
5
|
+
declare class QmTabPane extends Component<IProps> {
|
|
6
|
+
static displayName: string;
|
|
7
|
+
render(): React.JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
export default QmTabPane;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { IAuth } from '../../_utils/types';
|
|
3
|
+
import type { TabsProps as AntTabsProps } from '../../antd';
|
|
4
|
+
type IProps = AntTabsProps & {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
authConfig?: {
|
|
7
|
+
fieldList?: IAuth[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type TabsProps = IProps;
|
|
11
|
+
declare class QmTabs extends Component<IProps> {
|
|
12
|
+
static TabPane: React.ClassicComponentClass<import("rc-tabs/lib/TabPanelList/TabPane").TabPaneProps>;
|
|
13
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
14
|
+
static defaultProps: {
|
|
15
|
+
tabPosition: string;
|
|
16
|
+
};
|
|
17
|
+
render(): React.JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
export default QmTabs;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 19:05:57
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2023-06-04 10:46:23
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
@prefix-tabs: ~'@{qm-prefix}-tabs';
|
|
10
|
+
|
|
11
|
+
.@{prefix-tabs} {
|
|
12
|
+
.ant-tabs-nav {
|
|
13
|
+
margin-bottom: @--margin-md;
|
|
14
|
+
}
|
|
15
|
+
// &.ant-tabs-top .ant-tabs-tab {
|
|
16
|
+
// padding-left: @--padding-md;
|
|
17
|
+
// padding-right: @--padding-md;
|
|
18
|
+
// }
|
|
19
|
+
// ------ size ------
|
|
20
|
+
// 40 32 24
|
|
21
|
+
&--lg {
|
|
22
|
+
}
|
|
23
|
+
&--sm {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 重置 antd Tabs 样式
|
|
28
|
+
.ant-tabs {
|
|
29
|
+
&-content:not(&-content-animated) {
|
|
30
|
+
position: static;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export type EventHandler<A> = (a: unknown, editor: any) => unknown;
|
|
9
|
+
type EEventHandler<K> = EventHandler<K>;
|
|
10
|
+
export interface INativeEvents {
|
|
11
|
+
onBeforePaste: EEventHandler<'beforepaste'>;
|
|
12
|
+
onBlur: EEventHandler<'blur'>;
|
|
13
|
+
onClick: EEventHandler<'click'>;
|
|
14
|
+
onContextMenu: EEventHandler<'contextmenu'>;
|
|
15
|
+
onCopy: EEventHandler<'copy'>;
|
|
16
|
+
onCut: EEventHandler<'cut'>;
|
|
17
|
+
onDblclick: EEventHandler<'dblclick'>;
|
|
18
|
+
onDrag: EEventHandler<'drag'>;
|
|
19
|
+
onDragDrop: EEventHandler<'dragdrop'>;
|
|
20
|
+
onDragEnd: EEventHandler<'dragend'>;
|
|
21
|
+
onDragGesture: EEventHandler<'draggesture'>;
|
|
22
|
+
onDragOver: EEventHandler<'dragover'>;
|
|
23
|
+
onDrop: EEventHandler<'drop'>;
|
|
24
|
+
onFocus: EEventHandler<'focus'>;
|
|
25
|
+
onFocusIn: EEventHandler<'focusin'>;
|
|
26
|
+
onFocusOut: EEventHandler<'focusout'>;
|
|
27
|
+
onKeyDown: EEventHandler<'keydown'>;
|
|
28
|
+
onKeyPress: EEventHandler<'keypress'>;
|
|
29
|
+
onKeyUp: EEventHandler<'keyup'>;
|
|
30
|
+
onMouseDown: EEventHandler<'mousedown'>;
|
|
31
|
+
onMouseEnter: EEventHandler<'mouseenter'>;
|
|
32
|
+
onMouseLeave: EEventHandler<'mouseleave'>;
|
|
33
|
+
onMouseMove: EEventHandler<'mousemove'>;
|
|
34
|
+
onMouseOut: EEventHandler<'mouseout'>;
|
|
35
|
+
onMouseOver: EEventHandler<'mouseover'>;
|
|
36
|
+
onMouseUp: EEventHandler<'mouseup'>;
|
|
37
|
+
onPaste: EEventHandler<'paste'>;
|
|
38
|
+
onSelectionChange: EEventHandler<'selectionchange'>;
|
|
39
|
+
}
|
|
40
|
+
export interface ITinyEvents {
|
|
41
|
+
onActivate: EEventHandler<'activate'>;
|
|
42
|
+
onAddUndo: EEventHandler<'AddUndo'>;
|
|
43
|
+
onBeforeAddUndo: EEventHandler<'BeforeAddUndo'>;
|
|
44
|
+
onBeforeExecCommand: EEventHandler<'BeforeExecCommand'>;
|
|
45
|
+
onBeforeGetContent: EEventHandler<'BeforeGetContent'>;
|
|
46
|
+
onBeforeRenderUI: EventHandler<unknown>;
|
|
47
|
+
onBeforeSetContent: EEventHandler<'BeforeSetContent'>;
|
|
48
|
+
onChange: EventHandler<unknown>;
|
|
49
|
+
onClearUndos: EEventHandler<'ClearUndos'>;
|
|
50
|
+
onCommentChange: EventHandler<unknown>;
|
|
51
|
+
onDeactivate: EEventHandler<'deactivate'>;
|
|
52
|
+
onDirty: EventHandler<unknown>;
|
|
53
|
+
onExecCommand: EEventHandler<'ExecCommand'>;
|
|
54
|
+
onGetContent: EEventHandler<'GetContent'>;
|
|
55
|
+
onHide: EventHandler<unknown>;
|
|
56
|
+
onInit: EEventHandler<'init'>;
|
|
57
|
+
onLoadContent: EEventHandler<'LoadContent'>;
|
|
58
|
+
onNodeChange: EEventHandler<'NodeChange'>;
|
|
59
|
+
onPostProcess: EventHandler<unknown>;
|
|
60
|
+
onPostRender: EEventHandler<'PostRender'>;
|
|
61
|
+
onPreProcess: EventHandler<unknown>;
|
|
62
|
+
onProgressState: EEventHandler<'ProgressState'>;
|
|
63
|
+
onRedo: EEventHandler<'Redo'>;
|
|
64
|
+
onRemove: EEventHandler<'remove'>;
|
|
65
|
+
onReset: EventHandler<unknown>;
|
|
66
|
+
onSaveContent: EventHandler<unknown>;
|
|
67
|
+
onSetAttrib: EventHandler<unknown>;
|
|
68
|
+
onObjectResizeStart: EEventHandler<'ObjectResizeStart'>;
|
|
69
|
+
onObjectResized: EEventHandler<'ObjectResized'>;
|
|
70
|
+
onObjectSelected: EEventHandler<'ObjectSelected'>;
|
|
71
|
+
onSetContent: EEventHandler<'SetContent'>;
|
|
72
|
+
onShow: EventHandler<unknown>;
|
|
73
|
+
onSubmit: EventHandler<unknown>;
|
|
74
|
+
onUndo: EEventHandler<'Undo'>;
|
|
75
|
+
onVisualAid: EventHandler<unknown>;
|
|
76
|
+
onSkinLoadError: EEventHandler<'SkinLoadError'>;
|
|
77
|
+
onThemeLoadError: EEventHandler<'ThemeLoadError'>;
|
|
78
|
+
onModelLoadError: EEventHandler<'ModelLoadError'>;
|
|
79
|
+
onPluginLoadError: EEventHandler<'PluginLoadError'>;
|
|
80
|
+
onIconsLoadError: EEventHandler<'IconsLoadError'>;
|
|
81
|
+
onLanguageLoadError: EEventHandler<'LanguageLoadError'>;
|
|
82
|
+
}
|
|
83
|
+
export interface IEvents extends INativeEvents, ITinyEvents {
|
|
84
|
+
}
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type callbackFn = () => void;
|
|
2
|
+
export interface IStateObj {
|
|
3
|
+
listeners: callbackFn[];
|
|
4
|
+
scriptId: string;
|
|
5
|
+
scriptLoading: boolean;
|
|
6
|
+
scriptLoaded: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ScriptLoader {
|
|
9
|
+
load: (doc: Document, url: string, async: boolean, defer: boolean, delay: number, callback: callbackFn) => void;
|
|
10
|
+
reinitialize: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const ScriptLoader: ScriptLoader;
|
|
13
|
+
export { ScriptLoader };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
declare const getTinymce: (view: Window) => any | null;
|
|
9
|
+
export { getTinymce };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import { IEventPropTypes } from './components/EditorPropTypes';
|
|
9
|
+
import { IAllProps } from './components/Editor';
|
|
10
|
+
export declare const isFunction: (x: unknown) => boolean;
|
|
11
|
+
type PropLookup = <K extends keyof IAllProps>(key: K) => IAllProps[K] | undefined;
|
|
12
|
+
export declare const configHandlers2: <H>(handlerLookup: PropLookup, on: (name: string, handler: H) => void, off: (name: string, handler: H) => void, adapter: <K extends keyof import("./Events").IEvents>(lookup: PropLookup, key: K) => H, prevProps: Partial<IAllProps>, props: Partial<IAllProps>, boundHandlers: Record<string, H>) => void;
|
|
13
|
+
export declare const configHandlers: (editor: any, prevProps: Partial<IAllProps>, props: Partial<IAllProps>, boundHandlers: Record<string, (event: any) => unknown>, lookup: PropLookup) => void;
|
|
14
|
+
export declare const uuid: (prefix: string) => string;
|
|
15
|
+
export declare const isTextareaOrInput: (element: Element | null) => element is HTMLInputElement | HTMLTextAreaElement;
|
|
16
|
+
export declare const mergePlugins: (initPlugins: string | string[] | undefined, inputPlugins: string | string[] | undefined) => string[];
|
|
17
|
+
export declare const isBeforeInputEventAvailable: () => boolean;
|
|
18
|
+
export declare const isInDoc: (elem: Node) => boolean;
|
|
19
|
+
export declare const setMode: (editor: any | undefined, mode: 'readonly' | 'design') => void;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { IEvents } from '../Events';
|
|
10
|
+
import { IEditorPropTypes } from './EditorPropTypes';
|
|
11
|
+
type EditorOptions = Record<string, any>;
|
|
12
|
+
export interface IProps {
|
|
13
|
+
apiKey: string;
|
|
14
|
+
id: string;
|
|
15
|
+
inline: boolean;
|
|
16
|
+
initialValue: string;
|
|
17
|
+
onEditorChange: (a: string, editor: any) => void;
|
|
18
|
+
value: string;
|
|
19
|
+
init: EditorOptions & {
|
|
20
|
+
selector?: undefined;
|
|
21
|
+
target?: undefined;
|
|
22
|
+
};
|
|
23
|
+
tagName: string;
|
|
24
|
+
cloudChannel: string;
|
|
25
|
+
plugins: NonNullable<EditorOptions['plugins']>;
|
|
26
|
+
toolbar: NonNullable<EditorOptions['toolbar']>;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
textareaName: string;
|
|
29
|
+
tinymceScriptSrc: string;
|
|
30
|
+
rollback: number | false;
|
|
31
|
+
scriptLoading: {
|
|
32
|
+
async?: boolean;
|
|
33
|
+
defer?: boolean;
|
|
34
|
+
delay?: number;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface IAllProps extends Partial<IProps>, Partial<IEvents> {
|
|
38
|
+
}
|
|
39
|
+
export declare class Editor extends React.Component<IAllProps> {
|
|
40
|
+
static propTypes: IEditorPropTypes;
|
|
41
|
+
static defaultProps: Partial<IAllProps>;
|
|
42
|
+
editor?: any;
|
|
43
|
+
private id;
|
|
44
|
+
private elementRef;
|
|
45
|
+
private inline;
|
|
46
|
+
private currentContent?;
|
|
47
|
+
private boundHandlers;
|
|
48
|
+
private rollbackTimer;
|
|
49
|
+
private valueCursor;
|
|
50
|
+
constructor(props: Partial<IAllProps>);
|
|
51
|
+
private get view();
|
|
52
|
+
componentDidUpdate(prevProps: Partial<IAllProps>): void;
|
|
53
|
+
componentDidMount(): void;
|
|
54
|
+
componentWillUnmount(): void;
|
|
55
|
+
render(): React.ReactElement<{
|
|
56
|
+
ref: React.RefObject<HTMLElement>;
|
|
57
|
+
id: string;
|
|
58
|
+
}, string | React.JSXElementConstructor<any>>;
|
|
59
|
+
private changeEvents;
|
|
60
|
+
private beforeInputEvent;
|
|
61
|
+
private renderInline;
|
|
62
|
+
private renderIframe;
|
|
63
|
+
private getScriptSrc;
|
|
64
|
+
private getInitialValue;
|
|
65
|
+
private bindHandlers;
|
|
66
|
+
private rollbackChange;
|
|
67
|
+
private handleBeforeInput;
|
|
68
|
+
private handleBeforeInputSpecial;
|
|
69
|
+
private handleEditorChange;
|
|
70
|
+
private handleEditorChangeSpecial;
|
|
71
|
+
private initialise;
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import * as PropTypes from 'prop-types';
|
|
9
|
+
import { IEvents } from '../Events';
|
|
10
|
+
import { IProps } from './Editor';
|
|
11
|
+
export type CopyProps<T> = {
|
|
12
|
+
[P in keyof T]: PropTypes.Requireable<unknown>;
|
|
13
|
+
};
|
|
14
|
+
export type IEventPropTypes = CopyProps<IEvents>;
|
|
15
|
+
export interface IEditorPropTypes extends IEventPropTypes, CopyProps<IProps> {
|
|
16
|
+
}
|
|
17
|
+
export declare const eventPropTypes: IEventPropTypes;
|
|
18
|
+
export declare const EditorPropTypes: IEditorPropTypes;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
3
|
+
import type { IFetchHeader } from '../../form/src/types';
|
|
4
|
+
type IProps = {
|
|
5
|
+
value?: string;
|
|
6
|
+
size?: ComponentSize;
|
|
7
|
+
tinymce?: any;
|
|
8
|
+
upload?: {
|
|
9
|
+
action?: string;
|
|
10
|
+
headers?: IFetchHeader;
|
|
11
|
+
withCredentials?: boolean;
|
|
12
|
+
dataKey?: string;
|
|
13
|
+
};
|
|
14
|
+
thresholdSize?: number;
|
|
15
|
+
tinymceScriptSrc?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
onChange?: (value: string) => void;
|
|
20
|
+
};
|
|
21
|
+
export type TinymceProps = IProps;
|
|
22
|
+
declare class QmTinymce extends Component<IProps> {
|
|
23
|
+
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
24
|
+
static propTypes: {
|
|
25
|
+
size: (props: any, propName: any, componentName: any) => void;
|
|
26
|
+
};
|
|
27
|
+
defaultOption: {
|
|
28
|
+
height: number;
|
|
29
|
+
plugins: string;
|
|
30
|
+
menubar: string;
|
|
31
|
+
toolbar: string;
|
|
32
|
+
};
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
export default QmTinymce;
|
|
@@ -0,0 +1,18 @@
|
|
|
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-tinymce: ~'@{qm-prefix}-tinymce';
|
|
10
|
+
|
|
11
|
+
.@{prefix-tinymce} {
|
|
12
|
+
.tox-fullscreen {
|
|
13
|
+
width: 100% !important;
|
|
14
|
+
}
|
|
15
|
+
.tox-statusbar__branding {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PosInfo } from './hooks/useTarget';
|
|
3
|
+
export type MaskProps = {
|
|
4
|
+
prefixCls?: string;
|
|
5
|
+
pos: PosInfo | null;
|
|
6
|
+
rootClassName?: string;
|
|
7
|
+
showMask?: boolean;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
fill?: string;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
animated?: boolean | {
|
|
12
|
+
placeholder: boolean;
|
|
13
|
+
};
|
|
14
|
+
zIndex?: number;
|
|
15
|
+
};
|
|
16
|
+
declare const Mask: React.FC<MaskProps>;
|
|
17
|
+
export default Mask;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Gap } from './hooks/useTarget';
|
|
3
|
+
import type { PlacementType } from './placements';
|
|
4
|
+
import type { TourStepInfo, TourStepProps } from './TourStep';
|
|
5
|
+
import type { TriggerProps } from '@rc-component/trigger';
|
|
6
|
+
export interface TourProps extends Pick<TriggerProps, 'onPopupAlign' | 'builtinPlacements'> {
|
|
7
|
+
steps?: TourStepInfo[];
|
|
8
|
+
open?: boolean;
|
|
9
|
+
type?: 'default' | 'primary';
|
|
10
|
+
defaultCurrent?: number;
|
|
11
|
+
current?: number;
|
|
12
|
+
onChange?: (current: number) => void;
|
|
13
|
+
onClose?: (current: number) => void;
|
|
14
|
+
onFinish?: () => void;
|
|
15
|
+
mask?: boolean | {
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
color?: string;
|
|
18
|
+
};
|
|
19
|
+
arrow?: boolean | {
|
|
20
|
+
pointAtCenter: boolean;
|
|
21
|
+
};
|
|
22
|
+
control?: boolean;
|
|
23
|
+
overlayClassName?: string;
|
|
24
|
+
overlayStyle?: React.CSSProperties;
|
|
25
|
+
placement?: PlacementType;
|
|
26
|
+
renderPanel?: (props: TourStepProps, current: number) => React.ReactNode;
|
|
27
|
+
indicatorsRender?: (current: number, total: number) => React.ReactNode;
|
|
28
|
+
gap?: Gap;
|
|
29
|
+
animated?: boolean | {
|
|
30
|
+
placeholder: boolean;
|
|
31
|
+
};
|
|
32
|
+
scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
|
|
33
|
+
zIndex?: number;
|
|
34
|
+
}
|
|
35
|
+
type TourRef = {
|
|
36
|
+
OPEN: () => void;
|
|
37
|
+
CLOSE: () => void;
|
|
38
|
+
SET_ZINDEX: (value: number) => void;
|
|
39
|
+
};
|
|
40
|
+
declare const QmTour: React.ForwardRefExoticComponent<TourProps & React.RefAttributes<TourRef>>;
|
|
41
|
+
export default QmTour;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PlacementType } from '../placements';
|
|
3
|
+
export interface TourStepInfo {
|
|
4
|
+
arrow?: boolean | {
|
|
5
|
+
pointAtCenter: boolean;
|
|
6
|
+
};
|
|
7
|
+
target?: HTMLElement | (() => HTMLElement | null) | null;
|
|
8
|
+
cover?: React.ReactNode;
|
|
9
|
+
title: React.ReactNode;
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
placement?: PlacementType;
|
|
12
|
+
mask?: boolean | {
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
color?: string;
|
|
15
|
+
};
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
scrollIntoViewOptions?: boolean | ScrollIntoViewOptions;
|
|
19
|
+
indicatorsRender?: (current: number, total: number) => React.ReactNode;
|
|
20
|
+
zIndex?: number;
|
|
21
|
+
action?: (node: HTMLElement, current: number) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface TourStepProps extends TourStepInfo {
|
|
24
|
+
prefixCls?: string;
|
|
25
|
+
total?: number;
|
|
26
|
+
current?: number;
|
|
27
|
+
onClose?: () => void;
|
|
28
|
+
onFinish?: () => void;
|
|
29
|
+
renderPanel?: (step: TourStepProps, current: number) => React.ReactNode;
|
|
30
|
+
onPrev?: () => void;
|
|
31
|
+
onNext?: () => void;
|
|
32
|
+
}
|
|
33
|
+
declare const TourStep: (props: TourStepProps) => React.JSX.Element;
|
|
34
|
+
export default TourStep;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TourStepInfo } from '../TourStep';
|
|
2
|
+
import type { Nullable } from '../../../_utils/types';
|
|
3
|
+
export interface Gap {
|
|
4
|
+
offset?: number;
|
|
5
|
+
radius?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PosInfo {
|
|
8
|
+
left: number;
|
|
9
|
+
top: number;
|
|
10
|
+
height: number;
|
|
11
|
+
width: number;
|
|
12
|
+
radius: number;
|
|
13
|
+
}
|
|
14
|
+
export default function useTarget(target: TourStepInfo['target'], open: boolean, gap?: Gap, scrollIntoViewOptions?: boolean | ScrollIntoViewOptions): [Nullable<PosInfo>, HTMLElement | null | undefined];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { BuildInPlacements } from '@rc-component/trigger';
|
|
2
|
+
export interface AdjustOverflow {
|
|
3
|
+
adjustX?: 0 | 1;
|
|
4
|
+
adjustY?: 0 | 1;
|
|
5
|
+
}
|
|
6
|
+
export interface PlacementsConfig {
|
|
7
|
+
arrowWidth: number;
|
|
8
|
+
arrowPointAtCenter?: boolean;
|
|
9
|
+
autoAdjustOverflow?: boolean | AdjustOverflow;
|
|
10
|
+
offset: number;
|
|
11
|
+
borderRadius: number;
|
|
12
|
+
visibleFirst?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const MAX_VERTICAL_CONTENT_RADIUS = 8;
|
|
15
|
+
export declare function getArrowOffset(options: {
|
|
16
|
+
contentRadius: number;
|
|
17
|
+
limitVerticalRadius?: boolean;
|
|
18
|
+
}): {
|
|
19
|
+
dropdownArrowOffset: number;
|
|
20
|
+
dropdownArrowOffsetVertical: number;
|
|
21
|
+
};
|
|
22
|
+
export declare function getOverflowOptions(placement: string, arrowOffset: ReturnType<typeof getArrowOffset>, arrowWidth: number, autoAdjustOverflow?: boolean | AdjustOverflow): {
|
|
23
|
+
adjustX?: number | boolean | undefined;
|
|
24
|
+
adjustY?: number | boolean | undefined;
|
|
25
|
+
shiftX?: number | boolean | undefined;
|
|
26
|
+
shiftY?: number | boolean | undefined;
|
|
27
|
+
};
|
|
28
|
+
export type PlacementType = keyof BuildInPlacements;
|
|
29
|
+
export default function getPlacements(config: PlacementsConfig): BuildInPlacements;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PlacementType } from './placements';
|
|
3
|
+
export declare const isInViewPort: (element: HTMLElement) => boolean;
|
|
4
|
+
export declare const getPlacement: (targetElement?: HTMLElement | null, placement?: PlacementType, stepPlacement?: PlacementType) => string;
|
|
5
|
+
export declare const isValidNode: (node: React.ReactNode) => boolean;
|