vap1 0.4.5 → 0.5.0
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/base.json +30 -0
- package/basetype.d.ts +4 -1
- package/cems/admin/AsyncSelect.d.ts +45 -0
- package/cems/admin/AsyncSelect.js +2 -0
- package/cems/admin/CardTable.d.ts +207 -0
- package/cems/admin/CardTable.js +2 -0
- package/cems/admin/EasyuiTree.d.ts +131 -0
- package/cems/admin/EasyuiTree.js +2 -0
- package/cems/admin/utils.d.ts +5 -0
- package/cems/admin/utils.js +3 -0
- package/cems/admin/validator.d.ts +137 -0
- package/cems/admin/validator.js +2 -0
- package/cems/assets/CUpload.d.ts +23 -0
- package/cems/assets/CUpload.js +2 -0
- package/cems/assets/Charts.d.ts +37 -0
- package/cems/assets/Charts.js +2 -0
- package/cems/assets/DInfo.d.ts +38 -0
- package/cems/assets/DInfo.js +2 -0
- package/cems/assets/DModal.d.ts +84 -0
- package/cems/assets/DModal.js +2 -0
- package/cems/assets/DTable.d.ts +128 -0
- package/cems/assets/DTable.js +2 -0
- package/cems/assets/DivWidth.d.ts +14 -0
- package/cems/assets/DivWidth.js +2 -0
- package/cems/assets/Patch.d.ts +9 -0
- package/cems/assets/Patch.js +2 -0
- package/cems/assets/Sensitive.d.ts +33 -0
- package/cems/assets/Sensitive.js +2 -0
- package/cems/assets/types.d.ts +200 -0
- package/cems/assets/types.js +2 -0
- package/cems/assets/utils.d.ts +61 -0
- package/cems/assets/utils.js +2 -0
- package/cems/define.d.ts +9 -0
- package/cems/define.js +18 -0
- package/cems/index.d.ts +228 -0
- package/cems/index.js +81 -0
- package/cems/policy/CForm.d.ts +133 -0
- package/cems/policy/CForm.js +2 -0
- package/cems/policy/DApiTable.d.ts +78 -0
- package/cems/policy/DApiTable.js +2 -0
- package/cems/policy/DButton.d.ts +17 -0
- package/cems/policy/DButton.js +2 -0
- package/cems/policy/DCheckbox.d.ts +50 -0
- package/cems/policy/DCheckbox.js +2 -0
- package/cems/policy/DCheckboxGroup.d.ts +34 -0
- package/cems/policy/DCheckboxGroup.js +2 -0
- package/cems/policy/DCol.d.ts +33 -0
- package/cems/policy/DCol.js +2 -0
- package/cems/policy/DColorPicker.d.ts +9 -0
- package/cems/policy/DColorPicker.js +2 -0
- package/cems/policy/DDatePicker.d.ts +41 -0
- package/cems/policy/DDatePicker.js +2 -0
- package/cems/policy/DDiv.d.ts +65 -0
- package/cems/policy/DDiv.js +2 -0
- package/cems/policy/DDrawer.d.ts +6 -0
- package/cems/policy/DDrawer.js +2 -0
- package/cems/policy/DDynamicSelect.d.ts +50 -0
- package/cems/policy/DDynamicSelect.js +2 -0
- package/cems/policy/DDynamicTreeSelect.d.ts +45 -0
- package/cems/policy/DDynamicTreeSelect.js +2 -0
- package/cems/policy/DForm.d.ts +248 -0
- package/cems/policy/DForm.js +2 -0
- package/cems/policy/DIcon.d.ts +33 -0
- package/cems/policy/DIcon.js +2 -0
- package/cems/policy/DInput.d.ts +41 -0
- package/cems/policy/DInput.js +2 -0
- package/cems/policy/DLabel.d.ts +17 -0
- package/cems/policy/DLabel.js +2 -0
- package/cems/policy/DPTable.d.ts +86 -0
- package/cems/policy/DPTable.js +2 -0
- package/cems/policy/DRadio.d.ts +34 -0
- package/cems/policy/DRadio.js +2 -0
- package/cems/policy/DSCTable.d.ts +33 -0
- package/cems/policy/DSCTable.js +2 -0
- package/cems/policy/DSelect.d.ts +42 -0
- package/cems/policy/DSelect.js +2 -0
- package/cems/policy/DSlider.d.ts +21 -0
- package/cems/policy/DSlider.js +2 -0
- package/cems/policy/DSwitch.d.ts +21 -0
- package/cems/policy/DSwitch.js +2 -0
- package/cems/policy/DTab.d.ts +30 -0
- package/cems/policy/DTab.js +2 -0
- package/cems/policy/DTimePicker.d.ts +37 -0
- package/cems/policy/DTimePicker.js +2 -0
- package/cems/policy/DTree.d.ts +98 -0
- package/cems/policy/DTree.js +2 -0
- package/cems/policy/DUpload.d.ts +33 -0
- package/cems/policy/DUpload.js +2 -0
- package/cems/policy/types.d.ts +200 -0
- package/cems/policy/types.js +2 -0
- package/cems/policy/utils.d.ts +13 -0
- package/cems/policy/utils.js +2 -0
- package/components/Box/Box.d.ts +43 -7
- package/components/Box/Box.js +67 -17
- package/components/Box/SelectBar.d.ts +1 -1
- package/components/Box/SelectBar.js +19 -9
- package/components/Lists/BaseList.d.ts +5 -0
- package/components/Lists/BaseList.js +111 -0
- package/components/Lists/Fields/IconRender.d.ts +53 -0
- package/components/Lists/Fields/IconRender.js +174 -0
- package/components/Lists/Fields/ItemRender.d.ts +2 -0
- package/components/Lists/Fields/ItemRender.js +127 -0
- package/components/Lists/Fields/_utils.d.ts +3 -0
- package/components/Lists/Fields/_utils.js +80 -0
- package/components/Lists/Fields/index.d.ts +3 -0
- package/components/Lists/Fields/index.js +47 -0
- package/components/Lists/Grid/grid.d.ts +7 -0
- package/components/Lists/Grid/grid.js +18 -0
- package/components/Lists/Grid/index.d.ts +3 -0
- package/components/Lists/Grid/index.js +50 -0
- package/components/Lists/Row/index.d.ts +3 -0
- package/components/Lists/Row/index.js +14 -0
- package/components/Lists/SList.js +17 -7
- package/components/Lists/Timeline/index.d.ts +3 -0
- package/components/Lists/Timeline/index.js +117 -0
- package/components/Lists/VList.d.ts +3 -0
- package/components/Lists/VList.js +92 -0
- package/components/Lists/components/LayoutSwitcher.d.ts +13 -0
- package/components/Lists/components/LayoutSwitcher.js +121 -0
- package/components/Lists/components/SearchTool.d.ts +13 -0
- package/components/Lists/components/SearchTool.js +34 -0
- package/components/Lists/index.d.ts +129 -0
- package/components/Lists/index.js +2 -0
- package/components/SearchTool/SearchBand/BandInput.d.ts +3 -0
- package/components/SearchTool/SearchBand/BandInput.js +54 -0
- package/components/SearchTool/SearchBand/BandTag.d.ts +7 -0
- package/components/SearchTool/SearchBand/BandTag.js +82 -0
- package/components/SearchTool/SearchBand/_SearchBandAction.d.ts +3 -0
- package/components/SearchTool/SearchBand/_SearchBandAction.js +23 -0
- package/components/SearchTool/SearchBand/_SearchBandFix.d.ts +3 -0
- package/components/SearchTool/SearchBand/_SearchBandFix.js +72 -0
- package/components/SearchTool/SearchBand/_SearchBandTag.d.ts +3 -0
- package/components/SearchTool/SearchBand/_SearchBandTag.js +75 -0
- package/components/SearchTool/SearchBand/_register.d.ts +47 -0
- package/components/SearchTool/SearchBand/_register.js +15 -0
- package/components/SearchTool/SearchBand/hooks.d.ts +12 -0
- package/components/SearchTool/SearchBand/hooks.js +181 -0
- package/components/SearchTool/SearchBand/index.d.ts +3 -0
- package/components/SearchTool/SearchBand/index.js +66 -0
- package/components/SearchTool/SearchBand/type.d.ts +71 -0
- package/components/SearchTool/SearchBand/type.js +3 -0
- package/components/{SearchBar → SearchTool/SearchBar}/ActionButtons.d.ts +2 -2
- package/components/{SearchBar → SearchTool/SearchBar}/ActionButtons.js +22 -12
- package/components/{SearchBar → SearchTool/SearchBar}/ByField.d.ts +1 -1
- package/components/{SearchBar → SearchTool/SearchBar}/ByField.js +21 -11
- package/components/{SearchBar → SearchTool/SearchBar}/ByKeyword.d.ts +1 -1
- package/components/{SearchBar → SearchTool/SearchBar}/ByKeyword.js +20 -10
- package/components/{SearchBar → SearchTool/SearchBar}/SearchField.d.ts +1 -1
- package/components/{SearchBar → SearchTool/SearchBar}/SearchTags.js +1 -1
- package/components/{SearchBar → SearchTool/SearchBar}/_register.d.ts +1 -1
- package/components/{SearchBar → SearchTool/SearchBar}/_register.js +3 -3
- package/components/SearchTool/SearchBar/index.d.ts +7 -0
- package/components/{SearchBar → SearchTool/SearchBar}/index.js +1 -1
- package/components/{SearchBar/index.d.ts → SearchTool/SearchBar/type.d.ts} +68 -67
- package/components/SearchTool/SearchBar/type.js +35 -0
- package/components/SearchTool/index.d.ts +5 -0
- package/components/SearchTool/index.js +7 -0
- package/components/Tables/ApiTable.d.ts +5 -7
- package/components/Tables/ApiTable.js +17 -7
- package/components/Tables/ApiTableModal.d.ts +5 -7
- package/components/Tables/ApiTableModal.js +17 -7
- package/components/Tables/Components/ActionBar.d.ts +8 -11
- package/components/Tables/Components/ActionBar.js +74 -41
- package/components/Tables/Components/Actions.d.ts +3 -1
- package/components/Tables/Components/Actions.js +40 -3
- package/components/Tables/Components/index.d.ts +3 -1
- package/components/Tables/Components/useTableContext.d.ts +16 -0
- package/components/Tables/Components/useTableContext.js +116 -0
- package/components/Tables/STable.js +17 -7
- package/components/Tables/TopTable.js +17 -7
- package/components/Tables/Util.d.ts +2 -2
- package/components/Tables/Util.js +0 -1
- package/components/Tables/VTable.d.ts +9 -9
- package/components/Tables/VTable.js +119 -172
- package/components/Tables/VTableBack.d.ts +0 -0
- package/components/Tables/VTableBack.js +269 -0
- package/components/Tables/index.d.ts +11 -22
- package/components/TreeSelect/BaseTreeSelect.js +17 -7
- package/components/TreeSelect/DTreeSelect.js +19 -9
- package/components/TreeSelect/FTreeSelect.js +2 -2
- package/components/TreeSelect/STreeSelect.js +1 -1
- package/components/Trees/ActionTree.d.ts +3 -5
- package/components/Trees/ActionTree.js +19 -9
- package/components/Trees/BaseTree.js +17 -7
- package/components/Trees/COTree/COButton.js +17 -7
- package/components/Trees/COTree/COSelect.js +17 -7
- package/components/Trees/COTree/COTree.js +19 -9
- package/components/Trees/DTree.d.ts +0 -7
- package/components/Trees/DTree.js +19 -9
- package/components/Trees/FTree.js +19 -9
- package/components/Trees/STree.js +17 -7
- package/components/UForm/FormWrapper.js +17 -7
- package/components/UForm/UDescriptions.d.ts +2 -3
- package/components/UForm/UDescriptions.js +17 -7
- package/components/UForm/UForm.d.ts +1 -1
- package/components/UForm/UForm.js +24 -11
- package/components/UForm/UFormModal.js +19 -9
- package/components/UForm/_FieldType.d.ts +1 -1
- package/components/UForm/_FieldType.js +4 -0
- package/components/UForm/_input.d.ts +5 -1
- package/components/UForm/_input.js +25 -8
- package/components/Upload/UploadImage.js +17 -7
- package/components/Upload/UploadModal.js +19 -9
- package/components/Upload/useUpload.js +2 -2
- package/components/_adapt/Alert.js +17 -7
- package/components/_adapt/Col.d.ts +1 -1
- package/components/_adapt/ColorPicker.js +17 -7
- package/components/_adapt/Drawer.js +17 -7
- package/components/_adapt/Dropdown.js +17 -7
- package/components/_adapt/FloatButton.js +17 -7
- package/components/_adapt/Input.js +17 -7
- package/components/_adapt/InputNumber.js +17 -7
- package/components/_adapt/Layout.js +17 -7
- package/components/_adapt/Menu.js +17 -7
- package/components/_adapt/Modal.js +17 -7
- package/components/_adapt/Popconfirm.js +17 -7
- package/components/_adapt/Popover.js +17 -7
- package/components/_adapt/Progress.js +17 -7
- package/components/_adapt/Select.js +17 -7
- package/components/_adapt/Table.js +17 -7
- package/components/_adapt/Tabs.js +17 -7
- package/components/_adapt/Tag.js +17 -7
- package/components/_adapt/TreeSelect.js +17 -7
- package/components/_adapt/todo/Image.d.ts +0 -1
- package/components/_adapt/todo/Segmented.d.ts +0 -1
- package/components/_common/AutoComplete.js +35 -12
- package/components/_common/CountUp.js +17 -7
- package/components/_common/DateRange.d.ts +5 -2
- package/components/_common/DateRange.js +43 -40
- package/components/_common/HighLight.d.ts +1 -1
- package/components/_common/HighLight.js +26 -24
- package/components/_common/Loading.js +17 -7
- package/components/_common/MonthRange.js +17 -7
- package/components/_common/PromiseLabel.js +2 -2
- package/components/_common/UTitle.d.ts +1 -1
- package/components/_common/UTitle.js +18 -8
- package/components/_common/Upagination.d.ts +1 -0
- package/components/_common/Upagination.js +5 -1
- package/components/_i18n.d.ts +1 -102
- package/components/index.d.ts +2 -2
- package/components/index.js +5 -1
- package/deps/JsonView.js +17 -7
- package/deps/app-audit/LookUp.js +19 -9
- package/deps/app-data/Const.d.ts +68 -3
- package/deps/app-data/Const.js +47 -3
- package/deps/app-data/TimeConst.d.ts +0 -0
- package/deps/app-data/TimeConst.js +58 -0
- package/deps/app-data/useSource.d.ts +22 -0
- package/deps/app-data/useSource.js +253 -162
- package/deps/echarts.d.ts +3 -0
- package/deps/echarts.js +20 -10
- package/deps/editor/Article.js +17 -7
- package/deps/editor/Editor.js +17 -7
- package/deps/editor/EditorModal.js +17 -7
- package/deps/editor/support/buttons/ImageButton.js +17 -7
- package/deps/editor/tools/Button.js +0 -2
- package/deps/editor/tools/_TxtButton.js +17 -7
- package/deps/vapc/_basic.d.ts +1 -0
- package/deps/vapc/_basic.js +15 -0
- package/deps/vapc/index.d.ts +10 -0
- package/deps/vapc/index.js +70 -0
- package/hooks/useAjaxAction.js +2 -2
- package/hooks/useAjaxQuery.js +2 -2
- package/hooks/useApiBase.js +2 -2
- package/hooks/useApiGlobal.js +1 -1
- package/hooks/useArray.js +2 -2
- package/hooks/useDefault.d.ts +0 -1
- package/hooks/useDoLoad.d.ts +1 -1
- package/hooks/useError.d.ts +1 -1
- package/hooks/useMemoPromise.js +2 -2
- package/index.d.ts +2 -1
- package/index.js +1 -1
- package/login/Base65.d.ts +7 -1
- package/login/Base65.js +49 -22
- package/login/Password.d.ts +8 -5
- package/login/Password.js +68 -102
- package/package.json +1 -1
- package/screen/Page.js +17 -7
- package/screen/vapc-schema/dark.d.ts +1 -0
- package/screen/vapc-schema/dark.js +50 -0
- package/screen/vapc-schema/insight.d.ts +1 -0
- package/screen/vapc-schema/insight.js +49 -0
- package/uform/FormEditor.js +17 -7
- package/uform/FormViewer.js +17 -7
- package/uform/hooks/useEditor.d.ts +0 -1
- package/uform/hooks/useForm.d.ts +0 -1
- package/uform/inputs/index.d.ts +0 -1
- package/uform/panel/Editor/_GroupDefault.js +17 -7
- package/uform/panel/Editor/_GroupStep.js +17 -7
- package/uform/panel/Editor/_GroupTab.js +17 -7
- package/uform/panel/Editor/index.js +17 -7
- package/uform/panel/Items/Fields.js +17 -7
- package/uform/panel/Items/InputSelector.js +17 -7
- package/uform/panel/Items/Inputs.js +17 -7
- package/uform/panel/Items/index.d.ts +1 -1
- package/uform/panel/Propreties/CanvasProperties.js +17 -7
- package/uform/panel/Propreties/Component/FieldPlugin.js +17 -7
- package/uform/panel/Propreties/Component/LinkAsyncFunction.js +17 -7
- package/uform/panel/Propreties/Component/LinkSyncFunction.js +17 -7
- package/uform/panel/Propreties/Component/Links.js +17 -7
- package/uform/panel/Propreties/Component/OptionTable.js +17 -7
- package/uform/panel/Propreties/Component/RegexpModal.js +17 -7
- package/uform/panel/Propreties/Component/Validate.js +17 -7
- package/uform/panel/Propreties/Component/ValidateAsyncFunction.js +17 -7
- package/uform/panel/Propreties/Component/ValidateSyncFunction.js +17 -7
- package/uform/panel/Propreties/FieldOptions.js +17 -7
- package/uform/panel/Propreties/FieldProperties.js +17 -7
- package/uform/panel/Propreties/_ItemAdvance.js +17 -7
- package/uform/panel/Propreties/_ItemBase.js +17 -7
- package/uform/panel/Propreties/_ItemLink.js +17 -7
- package/uform/panel/Propreties/_ItemValidate.js +17 -7
- package/uform/schema.d.ts +1 -1
- package/uform/utils/Convert.js +2 -2
- package/utils/Ajax.d.ts +3 -0
- package/utils/Ajax.js +22 -16
- package/utils/CacheUtil.d.ts +1 -1
- package/utils/Const.js +17 -7
- package/utils/Format.d.ts +138 -14
- package/utils/Format.js +132 -23
- package/utils/Global.d.ts +46 -2
- package/utils/Global.js +24 -2
- package/utils/PageUtil.d.ts +111 -23
- package/utils/PageUtil.js +163 -28
- package/utils/Renders/ApiGetRender.js +25 -12
- package/utils/Renders/ApiPostRender.js +3 -3
- package/utils/Renders/CondictionRender.js +17 -7
- package/utils/Renders/DateRender.js +20 -2
- package/utils/Renders/ListRender.js +1 -1
- package/utils/Renders/NumberRender.js +24 -5
- package/utils/Renders/StringRender.js +81 -11
- package/utils/Renders/_define.d.ts +8 -7
- package/utils/Renders/_define.js +76 -17
- package/utils/StringUtil.d.ts +292 -62
- package/utils/StringUtil.js +310 -63
- package/utils/TreeUtil.js +14 -12
- package/utils/VAP.d.ts +26 -1
- package/utils/VAP.js +57 -1
- package/utils/_AjaxUtil.d.ts +1 -0
- package/utils/_AjaxUtil.js +70 -3
- package/utils/_Support.d.ts +2 -2
- package/utils/_Support.js +4 -2
- package/utils/crontab/_en.d.ts +2 -0
- package/utils/crontab/_en.js +178 -0
- package/utils/crontab/_global.d.ts +11 -0
- package/utils/crontab/_global.js +23 -0
- package/utils/crontab/_zh_CN.d.ts +2 -0
- package/utils/crontab/_zh_CN.js +180 -0
- package/utils/crontab/_zh_TW.d.ts +2 -0
- package/utils/crontab/_zh_TW.js +170 -0
- package/utils/crontab/crontabParser.d.ts +1 -0
- package/utils/crontab/crontabParser.js +251 -0
- package/utils/crontab/crontabRender.d.ts +23 -0
- package/utils/crontab/crontabRender.js +502 -0
- package/utils/crontab/index.d.ts +3 -0
- package/utils/crontab/index.js +9 -0
- package/utils/crontab/type.d.ts +79 -0
- package/utils/crontab/type.js +2 -0
- package/utils/crontab/utils.d.ts +20 -0
- package/utils/crontab/utils.js +122 -0
- package/utils/i18n.d.ts +13 -2
- package/utils/i18n.js +13 -2
- package/utils/index.d.ts +4 -0
- package/utils/index.js +19 -9
- package/utils/py.js +2 -0
- package/components/SearchBar/_FieldType.d.ts +0 -8
- package/components/SearchBar/_FieldType.js +0 -51
- /package/components/{SearchBar → SearchTool/SearchBar}/SearchField.js +0 -0
- /package/components/{SearchBar → SearchTool/SearchBar}/SearchTags.d.ts +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import type { PlainObject } from "../../basetype";
|
|
3
|
+
import type { BaseOptions } from "./types";
|
|
4
|
+
export interface DInfoProps extends BaseOptions {
|
|
5
|
+
/**
|
|
6
|
+
* 数据详情
|
|
7
|
+
*/
|
|
8
|
+
info?: PlainObject;
|
|
9
|
+
/**
|
|
10
|
+
* 显示详情 {dataIndex:'',name:''}
|
|
11
|
+
*/
|
|
12
|
+
cols?: PlainObject[];
|
|
13
|
+
/**
|
|
14
|
+
* 标题的宽度
|
|
15
|
+
*/
|
|
16
|
+
titleWidth?: number;
|
|
17
|
+
/**
|
|
18
|
+
* 显示列数量
|
|
19
|
+
*/
|
|
20
|
+
colNum?: number;
|
|
21
|
+
/**
|
|
22
|
+
* 分组名称
|
|
23
|
+
*/
|
|
24
|
+
groupName?: string[] | string;
|
|
25
|
+
/**
|
|
26
|
+
* 显示分组名称
|
|
27
|
+
*/
|
|
28
|
+
showGroupName?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 显示名称
|
|
31
|
+
*/
|
|
32
|
+
showName?: string[] | string;
|
|
33
|
+
/**
|
|
34
|
+
* 内容格式化
|
|
35
|
+
*/
|
|
36
|
+
colRender?: (sCol: any, info: any, cValue: any) => any;
|
|
37
|
+
}
|
|
38
|
+
export type DInfoComponent = FC<DInfoProps>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { PlainObject } from '../../basetype';
|
|
2
|
+
import type { FC, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
+
import type { DrawerProps } from '../../components/_adapt/Drawer';
|
|
4
|
+
import type { DApiProp, BaseOptions } from './types';
|
|
5
|
+
import type { DTableProps } from './DTable';
|
|
6
|
+
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
7
|
+
import type { VTableRef } from '../../components/Tables/VTable';
|
|
8
|
+
export interface DModalInfoProps extends BaseOptions {
|
|
9
|
+
/**
|
|
10
|
+
* modal的参数
|
|
11
|
+
*/
|
|
12
|
+
modalProps: any;
|
|
13
|
+
/**
|
|
14
|
+
* 弹窗的宽度
|
|
15
|
+
*/
|
|
16
|
+
width?: any;
|
|
17
|
+
/**
|
|
18
|
+
* 接口参数
|
|
19
|
+
*/
|
|
20
|
+
api?: DApiProp;
|
|
21
|
+
/**
|
|
22
|
+
* 数据详情
|
|
23
|
+
*/
|
|
24
|
+
info?: PlainObject;
|
|
25
|
+
/**
|
|
26
|
+
* 显示详情
|
|
27
|
+
*/
|
|
28
|
+
cols?: PlainObject[];
|
|
29
|
+
/**
|
|
30
|
+
* 抽屉右上角的操作区域
|
|
31
|
+
*/
|
|
32
|
+
extra?: ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* 抽屉的页脚
|
|
35
|
+
*/
|
|
36
|
+
footer?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* 自定义渲染info
|
|
39
|
+
*/
|
|
40
|
+
modalRender?: () => ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* 标题的宽度
|
|
43
|
+
*/
|
|
44
|
+
titleWidth?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Drawer的参数
|
|
47
|
+
*/
|
|
48
|
+
drawerProps?: DrawerProps;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 动态接口公共单行的详情页面
|
|
52
|
+
*/
|
|
53
|
+
export type DModalInfoComponent = FC<PropsWithChildren<DModalInfoProps>>;
|
|
54
|
+
export interface DModalTableProps extends BaseOptions {
|
|
55
|
+
/**
|
|
56
|
+
* modal的参数
|
|
57
|
+
*/
|
|
58
|
+
modalProps: any;
|
|
59
|
+
/**
|
|
60
|
+
* 弹窗的宽度
|
|
61
|
+
*/
|
|
62
|
+
width?: any;
|
|
63
|
+
/**
|
|
64
|
+
* 接口参数
|
|
65
|
+
*/
|
|
66
|
+
api: DApiProp;
|
|
67
|
+
/**
|
|
68
|
+
* 抽屉右上角的操作区域
|
|
69
|
+
*/
|
|
70
|
+
extra?: ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* 抽屉的页脚
|
|
73
|
+
*/
|
|
74
|
+
footer?: ReactNode;
|
|
75
|
+
/**
|
|
76
|
+
* DTable的显示参数
|
|
77
|
+
*/
|
|
78
|
+
tableProps?: DTableProps;
|
|
79
|
+
/**
|
|
80
|
+
* Drawer的参数
|
|
81
|
+
*/
|
|
82
|
+
drawerProps?: DrawerProps;
|
|
83
|
+
}
|
|
84
|
+
export type DModalTableComponent = ForwardRefExoticComponent<DModalTableProps & RefAttributes<VTableRef>>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { Key, PlainObject } from "../../basetype";
|
|
2
|
+
import type { SearchBarProps } from "../../components/SearchTool";
|
|
3
|
+
import type { TableColumn } from "../../components/Tables";
|
|
4
|
+
import type { BoxMode } from '../../components/Box/Box';
|
|
5
|
+
import type { VTableProps, VTableRef } from '../../components/Tables/VTable';
|
|
6
|
+
import type { TableActionButton } from '../../components/Tables/Components/ActionBar';
|
|
7
|
+
import type { DApiListState, BaseOptions, DApiProp } from './types';
|
|
8
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
9
|
+
export type DTableAction = (ids?: Key[], objs?: PlainObject[], param?: PlainObject, model?: DApiListState, config?: any) => void;
|
|
10
|
+
export type DTableActionButton = Omit<TableActionButton, 'onClick' | 'children'> & {
|
|
11
|
+
/**
|
|
12
|
+
* 点击事件
|
|
13
|
+
*/
|
|
14
|
+
onClick?: DTableAction;
|
|
15
|
+
/**
|
|
16
|
+
* 二级按钮
|
|
17
|
+
* 说明 : 最多支持2级子菜单,不能递归
|
|
18
|
+
*/
|
|
19
|
+
children?: DTableActionButton[];
|
|
20
|
+
/**
|
|
21
|
+
* 导出类型 excel、xml、txt 带上表示是导出按钮,可不写onClick
|
|
22
|
+
*/
|
|
23
|
+
exportType?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 导出类型 excel、xml、txt 带上表示是导出按钮,可不写onClick
|
|
26
|
+
*/
|
|
27
|
+
config?: any;
|
|
28
|
+
/**
|
|
29
|
+
* 是否显示
|
|
30
|
+
*/
|
|
31
|
+
show?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export interface DTableProps extends BaseOptions {
|
|
34
|
+
/**
|
|
35
|
+
* 自定义格式化显示列
|
|
36
|
+
* @param cols 显示列
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
fmt?: (cols: any) => any;
|
|
40
|
+
/**
|
|
41
|
+
* 自定义格式化显示搜索项
|
|
42
|
+
* @param fields 显示搜索项
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
fmtfields?: (fields: any) => any;
|
|
46
|
+
/**
|
|
47
|
+
* 自定义格式化快速搜索项
|
|
48
|
+
* @param keyword 快速搜索项
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
fmtKeyword?: (keyword: any) => any;
|
|
52
|
+
/**
|
|
53
|
+
* 操作按钮
|
|
54
|
+
*/
|
|
55
|
+
actionBar?: (DTableActionButton[]) | React.ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* 高级搜索的标题宽和内容宽 默认[150,200]
|
|
58
|
+
*/
|
|
59
|
+
fieldWidth?: number | [number, number];
|
|
60
|
+
/**
|
|
61
|
+
* 高级搜索的显示几列
|
|
62
|
+
*/
|
|
63
|
+
fieldCols?: 1 | 2 | 3 | 4;
|
|
64
|
+
/**
|
|
65
|
+
* 是否显示导出按钮
|
|
66
|
+
*/
|
|
67
|
+
showExportButton?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 是否显示刷新按钮
|
|
70
|
+
*/
|
|
71
|
+
showRefreshButton?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 是否隐藏查询(模糊+高级查询)
|
|
74
|
+
*/
|
|
75
|
+
hideSearch?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* 是否隐藏高级查询
|
|
78
|
+
*/
|
|
79
|
+
hideAdvSearch?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* 是否隐藏操作按钮
|
|
82
|
+
*/
|
|
83
|
+
hideActionBar?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 是否隐藏分页
|
|
86
|
+
*/
|
|
87
|
+
hidePage?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* 展示模式
|
|
90
|
+
* common : 默认,无固定高度
|
|
91
|
+
* inner : 当 Table 在一个高度固定的容器内时,使用 inner 模式
|
|
92
|
+
* fixed : 页面可见区域只有一个 Table 时, 使用 fixed 模式
|
|
93
|
+
*/
|
|
94
|
+
mode?: BoxMode;
|
|
95
|
+
/**
|
|
96
|
+
* 是否显示复选框
|
|
97
|
+
*/
|
|
98
|
+
select?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* 表格搜索区域
|
|
101
|
+
*/
|
|
102
|
+
searchBar?: Omit<SearchBarProps, 'onChange' | 'onSearch'>;
|
|
103
|
+
/**
|
|
104
|
+
* 列
|
|
105
|
+
*/
|
|
106
|
+
columns?: TableColumn[];
|
|
107
|
+
/**
|
|
108
|
+
* 显示数据
|
|
109
|
+
*/
|
|
110
|
+
rows?: any[];
|
|
111
|
+
/**
|
|
112
|
+
* VTable的其他属性
|
|
113
|
+
*/
|
|
114
|
+
vtableProps?: Omit<VTableProps, 'columns' | 'model'>;
|
|
115
|
+
/**
|
|
116
|
+
* state 使用useGlobal共享状态 默认false
|
|
117
|
+
*/
|
|
118
|
+
globalState?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* 主键
|
|
121
|
+
*/
|
|
122
|
+
rowKey?: string;
|
|
123
|
+
/**
|
|
124
|
+
* 默认选择行 子表时VTable不支持
|
|
125
|
+
*/
|
|
126
|
+
SelectedKeys?: (string | number)[];
|
|
127
|
+
}
|
|
128
|
+
export type DTableComponent = ForwardRefExoticComponent<DApiProp & DTableProps & RefAttributes<VTableRef>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import type { BaseOptions } from "./types";
|
|
3
|
+
export interface DivWidthProps extends BaseOptions {
|
|
4
|
+
/**
|
|
5
|
+
* 内容
|
|
6
|
+
*/
|
|
7
|
+
text?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 宽度
|
|
10
|
+
*/
|
|
11
|
+
width: number;
|
|
12
|
+
textKey?: string;
|
|
13
|
+
}
|
|
14
|
+
export type DivWidthComponent = FC<PropsWithChildren<DivWidthProps>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import type { BaseOptions } from "./types";
|
|
3
|
+
export interface SensitiveProps extends BaseOptions {
|
|
4
|
+
/**
|
|
5
|
+
* key名
|
|
6
|
+
*/
|
|
7
|
+
keyId: string;
|
|
8
|
+
/**
|
|
9
|
+
* key值
|
|
10
|
+
*/
|
|
11
|
+
keyValue: string;
|
|
12
|
+
/**
|
|
13
|
+
* 显示名
|
|
14
|
+
*/
|
|
15
|
+
field: string;
|
|
16
|
+
/**
|
|
17
|
+
* 显示内容
|
|
18
|
+
*/
|
|
19
|
+
desc: string;
|
|
20
|
+
/**
|
|
21
|
+
* 请求接口 默认值 '/api/d/assets/device/g'
|
|
22
|
+
*/
|
|
23
|
+
url?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 内容在左边还是在右边,有值在左边,默认在右边
|
|
26
|
+
*/
|
|
27
|
+
left?: string;
|
|
28
|
+
/**
|
|
29
|
+
* 宽度
|
|
30
|
+
*/
|
|
31
|
+
width?: number;
|
|
32
|
+
}
|
|
33
|
+
export type SensitiveComponent = FC<SensitiveProps>;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
import type { PlainObject } from '../../basetype';
|
|
3
|
+
import type { Field } from '../../components/SearchTool/SearchBar/type';
|
|
4
|
+
import type { ApiListState } from '../../hooks/_list';
|
|
5
|
+
import type { AOP, ApiOption } from '../../hooks/useApiBase';
|
|
6
|
+
import type { VTableRef } from '../../components/Tables/VTable';
|
|
7
|
+
/**
|
|
8
|
+
* 自行扩展/容错
|
|
9
|
+
*/
|
|
10
|
+
export interface BaseOptions {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
export type DApiAOP = AOP & {
|
|
14
|
+
afterInit?: (config: PlainObject, resp?: PlainObject) => void;
|
|
15
|
+
};
|
|
16
|
+
export type DApiProp = {
|
|
17
|
+
/**
|
|
18
|
+
* 动态接口地址 /api/d/ 开头的接口地址
|
|
19
|
+
*/
|
|
20
|
+
api?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 接口默认参数
|
|
23
|
+
*/
|
|
24
|
+
params?: PlainObject;
|
|
25
|
+
/**
|
|
26
|
+
* 当api改变后,
|
|
27
|
+
* 赋值大于0的值 即可重新加载数据和显示列
|
|
28
|
+
*/
|
|
29
|
+
reloadInit?: number;
|
|
30
|
+
/**
|
|
31
|
+
* 是否初始化数据
|
|
32
|
+
*/
|
|
33
|
+
initRow?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 说明:AOP 方法
|
|
36
|
+
* before/after Action 是 add/update/delete/init 的集成方式,
|
|
37
|
+
*/
|
|
38
|
+
aop?: DApiAOP;
|
|
39
|
+
/**
|
|
40
|
+
* 当params改变后
|
|
41
|
+
* 赋值大于0的值 即可重新加载数据
|
|
42
|
+
*/
|
|
43
|
+
reloadRow?: number;
|
|
44
|
+
/**
|
|
45
|
+
* devInfo 设备详情接口的隐秘显示接口地址(专用)
|
|
46
|
+
*/
|
|
47
|
+
sUrl?: string;
|
|
48
|
+
/**
|
|
49
|
+
* 功能开关
|
|
50
|
+
*/
|
|
51
|
+
config?: PlainObject;
|
|
52
|
+
/**
|
|
53
|
+
* 加载数据
|
|
54
|
+
*/
|
|
55
|
+
initData?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* 改变数据
|
|
58
|
+
*/
|
|
59
|
+
changeData?: any;
|
|
60
|
+
/**
|
|
61
|
+
* 改成类型 |'del'|'update'|'add'
|
|
62
|
+
*/
|
|
63
|
+
changeType?: string;
|
|
64
|
+
/**
|
|
65
|
+
* 全部更新或局部更新
|
|
66
|
+
*/
|
|
67
|
+
changeDiffUpdate?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 清理引号空值的参数
|
|
70
|
+
*/
|
|
71
|
+
cheanEmpty?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 改变应用 >0
|
|
74
|
+
*/
|
|
75
|
+
changeReload?: number;
|
|
76
|
+
/**
|
|
77
|
+
* 是否转换上下级模式的数据
|
|
78
|
+
*/
|
|
79
|
+
parentId?: string;
|
|
80
|
+
/**
|
|
81
|
+
* 上下级模式的数据的根标记
|
|
82
|
+
*/
|
|
83
|
+
rootId?: string;
|
|
84
|
+
/**
|
|
85
|
+
* 前端本地数据 快速搜索的列名
|
|
86
|
+
*/
|
|
87
|
+
keyword?: string[];
|
|
88
|
+
};
|
|
89
|
+
export type DApiOption = Omit<ApiOption, 'aop'> & {
|
|
90
|
+
/**
|
|
91
|
+
* 区分api接口地址的后缀
|
|
92
|
+
*/
|
|
93
|
+
pSuffix?: string;
|
|
94
|
+
/**
|
|
95
|
+
* true 加载数据+加载显示列
|
|
96
|
+
* false 仅仅加载显示列
|
|
97
|
+
* 默认true
|
|
98
|
+
*/
|
|
99
|
+
initRow?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* 是否前端分页
|
|
102
|
+
*/
|
|
103
|
+
localPage?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* devInfo 设备详情接口的隐秘显示接口地址(专用)
|
|
106
|
+
*/
|
|
107
|
+
sUrl?: string;
|
|
108
|
+
/**
|
|
109
|
+
* 功能开关
|
|
110
|
+
*/
|
|
111
|
+
config?: PlainObject;
|
|
112
|
+
/**
|
|
113
|
+
* 是否初始数据
|
|
114
|
+
*/
|
|
115
|
+
initData?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* 当api改变后,
|
|
118
|
+
* 赋值大于0的值 即可重新加载数据和显示列
|
|
119
|
+
*/
|
|
120
|
+
reloadInit?: number;
|
|
121
|
+
/**
|
|
122
|
+
* 当params改变后
|
|
123
|
+
* 赋值大于0的值 即可重新加载数据
|
|
124
|
+
*/
|
|
125
|
+
reloadRow?: number;
|
|
126
|
+
/**
|
|
127
|
+
* 说明:AOP 方法
|
|
128
|
+
* before/after Action 是 add/update/delete/init 的集成方式,
|
|
129
|
+
*/
|
|
130
|
+
aop?: DApiAOP;
|
|
131
|
+
/**
|
|
132
|
+
* VTable的选择行和参数
|
|
133
|
+
*/
|
|
134
|
+
selectRef?: MutableRefObject<VTableRef>;
|
|
135
|
+
/**
|
|
136
|
+
* 清理引号空值的参数
|
|
137
|
+
*/
|
|
138
|
+
cheanEmpty?: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* 静态数据
|
|
141
|
+
*/
|
|
142
|
+
rows?: any;
|
|
143
|
+
/**
|
|
144
|
+
* 是否转换上下级模式的数据
|
|
145
|
+
*/
|
|
146
|
+
parentId?: string;
|
|
147
|
+
/**
|
|
148
|
+
* 上下级模式的数据的根标记
|
|
149
|
+
*/
|
|
150
|
+
rootId?: string;
|
|
151
|
+
/**
|
|
152
|
+
* 前端本地数据 快速搜索的列名
|
|
153
|
+
*/
|
|
154
|
+
keyword?: string[];
|
|
155
|
+
/**
|
|
156
|
+
* 前端分页,默认分页
|
|
157
|
+
*/
|
|
158
|
+
page?: boolean;
|
|
159
|
+
};
|
|
160
|
+
export type DApiListState = Omit<ApiListState, 'mode'> & {
|
|
161
|
+
mode: 'dapi';
|
|
162
|
+
/**
|
|
163
|
+
* 导出下载
|
|
164
|
+
*/
|
|
165
|
+
download: (param: PlainObject) => void;
|
|
166
|
+
/**
|
|
167
|
+
* 初始化显示列和显示数据
|
|
168
|
+
*/
|
|
169
|
+
initRefresh: (param: PlainObject) => void;
|
|
170
|
+
/**
|
|
171
|
+
* 显示列
|
|
172
|
+
*/
|
|
173
|
+
columns?: PlainObject[];
|
|
174
|
+
/**
|
|
175
|
+
* 快速搜索
|
|
176
|
+
*/
|
|
177
|
+
keyword_?: string;
|
|
178
|
+
/**
|
|
179
|
+
* 高级搜索项
|
|
180
|
+
*/
|
|
181
|
+
fields: Field[];
|
|
182
|
+
/**
|
|
183
|
+
* 功能开工
|
|
184
|
+
*/
|
|
185
|
+
config: PlainObject;
|
|
186
|
+
/**
|
|
187
|
+
* 请求参数
|
|
188
|
+
*/
|
|
189
|
+
param: PlainObject;
|
|
190
|
+
/**
|
|
191
|
+
* data的数据
|
|
192
|
+
*/
|
|
193
|
+
info: any;
|
|
194
|
+
/**
|
|
195
|
+
* 局部更新
|
|
196
|
+
* @param data
|
|
197
|
+
* @returns
|
|
198
|
+
*/
|
|
199
|
+
doDiffUpdate: (data: PlainObject | PlainObject[]) => void;
|
|
200
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { PlainObject } from "../../basetype";
|
|
2
|
+
import type { DApiProp, DApiOption, DApiListState } from "./types";
|
|
3
|
+
export type AjaxPostDataFN = (pUrl: string, pdata: PlainObject, defMsg: string, successAfter?: (json: any) => Promise<boolean>, failAfter?: (errMsg: any) => Promise<boolean>) => Promise<void>;
|
|
4
|
+
export type GetReload = (clear?: boolean) => number;
|
|
5
|
+
export type DModalsState = {
|
|
6
|
+
/**
|
|
7
|
+
* 弹窗的参数
|
|
8
|
+
*/
|
|
9
|
+
modalProps: {
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
open: boolean;
|
|
12
|
+
title: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 弹窗打开状态
|
|
16
|
+
*/
|
|
17
|
+
open: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* api接口参数
|
|
20
|
+
*/
|
|
21
|
+
api: DApiProp;
|
|
22
|
+
/**
|
|
23
|
+
* 数据详情
|
|
24
|
+
*/
|
|
25
|
+
info?: any;
|
|
26
|
+
/**
|
|
27
|
+
* 显示详情
|
|
28
|
+
*/
|
|
29
|
+
cols?: PlainObject[];
|
|
30
|
+
};
|
|
31
|
+
export type UseDModals = (apiUrl?: string) => {
|
|
32
|
+
modalState: DModalsState;
|
|
33
|
+
hide: () => void;
|
|
34
|
+
show: (title: string, params?: PlainObject, reloadInit?: boolean, cheanEmpty?: boolean) => void;
|
|
35
|
+
showApi: (title: string, apiUrl: string, params?: PlainObject, cheanEmpty?: boolean) => void;
|
|
36
|
+
showInfo: (title: string, info?: any, cols?: PlainObject[]) => void;
|
|
37
|
+
};
|
|
38
|
+
export type DApiGlobalOption = DApiOption & {
|
|
39
|
+
/**
|
|
40
|
+
* 指定存储空间,
|
|
41
|
+
* 不指定时会以当前页面的URL做为存储空间。
|
|
42
|
+
* 当同一个页面使用两个 不同的 useApiGlobal ,必须为两个 hook 分别指定,应用内唯一NAMESPACE
|
|
43
|
+
*/
|
|
44
|
+
namespace?: string;
|
|
45
|
+
};
|
|
46
|
+
export type UseDApi = (options: string | DApiOption) => DApiListState;
|
|
47
|
+
export type UseDApiGlobal = (options: string | DApiGlobalOption) => DApiListState;
|
|
48
|
+
/**
|
|
49
|
+
* 格式化显示列
|
|
50
|
+
* @param resp 接口返回内容
|
|
51
|
+
* @param cConfig 配置参数
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
export type FormatColumns = (resp: any, cConfig: any) => any;
|
|
55
|
+
/**
|
|
56
|
+
* 格式化显示列
|
|
57
|
+
* @param cols 接口返回内容
|
|
58
|
+
* @param cConfig 配置参数
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
export type FormatCols = (cols: PlainObject[], sUrl: any) => any;
|
package/cems/define.d.ts
ADDED
package/cems/define.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineMethod = exports.defineComponent = void 0;
|
|
4
|
+
var index_1 = require("./index");
|
|
5
|
+
/**
|
|
6
|
+
* 定义一个组件
|
|
7
|
+
*/
|
|
8
|
+
var defineComponent = function (type, Component) {
|
|
9
|
+
index_1.COMPONENTS[type] = Component;
|
|
10
|
+
};
|
|
11
|
+
exports.defineComponent = defineComponent;
|
|
12
|
+
/**
|
|
13
|
+
* 定义一个工具/方法
|
|
14
|
+
*/
|
|
15
|
+
var defineMethod = function (type, Method) {
|
|
16
|
+
index_1.UTILS[type] = Method;
|
|
17
|
+
};
|
|
18
|
+
exports.defineMethod = defineMethod;
|