vap1 0.4.7 → 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 +0 -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 +42 -6
- package/components/Box/Box.js +66 -16
- 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/SearchTool/SearchBar/ActionButtons.js +17 -7
- package/components/SearchTool/SearchBar/ByField.d.ts +1 -1
- package/components/SearchTool/SearchBar/ByField.js +17 -7
- package/components/SearchTool/SearchBar/ByKeyword.d.ts +1 -1
- package/components/SearchTool/SearchBar/ByKeyword.js +17 -7
- package/components/SearchTool/SearchBar/SearchField.d.ts +1 -1
- package/components/SearchTool/SearchBar/_register.d.ts +1 -1
- package/components/SearchTool/SearchBar/index.d.ts +1 -65
- package/components/SearchTool/SearchBar/type.d.ts +133 -0
- package/components/SearchTool/SearchBar/type.js +35 -0
- package/components/SearchTool/index.d.ts +5 -63
- package/components/SearchTool/index.js +5 -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 +7 -10
- package/components/Tables/Components/ActionBar.js +73 -40
- 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 -11
- 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/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/_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/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.js +17 -7
- 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.js +4 -0
- package/deps/JsonView.js +17 -7
- package/deps/app-audit/LookUp.js +19 -9
- package/deps/app-data/useSource.js +19 -9
- 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/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 +10 -7
- package/utils/CacheUtil.d.ts +1 -1
- package/utils/Const.js +17 -7
- package/utils/Format.d.ts +138 -14
- package/utils/Format.js +127 -13
- package/utils/Global.d.ts +12 -0
- package/utils/Global.js +7 -1
- package/utils/PageUtil.d.ts +111 -23
- package/utils/PageUtil.js +163 -28
- package/utils/Renders/ApiGetRender.js +20 -10
- 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 -10
- package/utils/VAP.d.ts +26 -1
- package/utils/VAP.js +57 -0
- 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/crontabRender.js +0 -1
- 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/components/SearchTool/_FieldType.d.ts +0 -8
- package/components/SearchTool/_FieldType.js +0 -51
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef } from "./types";
|
|
2
|
+
import type { CSSProperties, ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
import type { PlainObject } from "../../basetype";
|
|
4
|
+
export type DRadioProps = Omit<DBaseProps, 'required' | 'height'> & {
|
|
5
|
+
/**
|
|
6
|
+
* 选项
|
|
7
|
+
*/
|
|
8
|
+
options?: PlainObject;
|
|
9
|
+
/**
|
|
10
|
+
* 默认值
|
|
11
|
+
*/
|
|
12
|
+
dValue?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 垂直显示 0否 1是
|
|
15
|
+
*/
|
|
16
|
+
vertical?: '0' | '1';
|
|
17
|
+
/**
|
|
18
|
+
* 垂直样式
|
|
19
|
+
*/
|
|
20
|
+
vStyle?: CSSProperties;
|
|
21
|
+
/**
|
|
22
|
+
* 大小 large middle small
|
|
23
|
+
*/
|
|
24
|
+
size?: 'large' | 'middle' | 'small';
|
|
25
|
+
/**
|
|
26
|
+
* 显示类型 default button
|
|
27
|
+
*/
|
|
28
|
+
optionType?: 'default' | 'button';
|
|
29
|
+
/**
|
|
30
|
+
* 关联显示
|
|
31
|
+
*/
|
|
32
|
+
display?: string;
|
|
33
|
+
};
|
|
34
|
+
export type DRadioComponent = ForwardRefExoticComponent<DRadioProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef, RegExpType } from "./types";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
export type DSCTableProps = Omit<DBaseProps, 'onChange'> & {
|
|
4
|
+
/**
|
|
5
|
+
* 列显示名
|
|
6
|
+
*/
|
|
7
|
+
columnTitle?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 列名
|
|
10
|
+
*/
|
|
11
|
+
column?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 分隔符
|
|
14
|
+
*/
|
|
15
|
+
dataSplit?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 最大行数
|
|
18
|
+
*/
|
|
19
|
+
maxRow?: number;
|
|
20
|
+
/**
|
|
21
|
+
* 验证规则
|
|
22
|
+
*/
|
|
23
|
+
rules?: RegExpType;
|
|
24
|
+
/**
|
|
25
|
+
* 去前后空格 0否 1是
|
|
26
|
+
*/
|
|
27
|
+
trim?: '0' | '1';
|
|
28
|
+
/**
|
|
29
|
+
* id别名
|
|
30
|
+
*/
|
|
31
|
+
idAlias?: string;
|
|
32
|
+
};
|
|
33
|
+
export type DSCTableComponent = ForwardRefExoticComponent<DSCTableProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef } from "./types";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
import type { PlainObject } from "../../basetype";
|
|
4
|
+
export type DSelectProps = Omit<DBaseProps, 'height'> & {
|
|
5
|
+
/**
|
|
6
|
+
* 选项
|
|
7
|
+
*/
|
|
8
|
+
options?: PlainObject;
|
|
9
|
+
/**
|
|
10
|
+
* 默认值
|
|
11
|
+
*/
|
|
12
|
+
dValue?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 多选 0否 1是
|
|
15
|
+
*/
|
|
16
|
+
mode?: '0' | '1';
|
|
17
|
+
/**
|
|
18
|
+
* 多选拼接 默认是逗号
|
|
19
|
+
*/
|
|
20
|
+
join?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 允许清空 0否 1是
|
|
23
|
+
*/
|
|
24
|
+
allowClear?: '0' | '1';
|
|
25
|
+
/**
|
|
26
|
+
* 缺省显示值
|
|
27
|
+
*/
|
|
28
|
+
sValue?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 提示文字
|
|
31
|
+
*/
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 关联显示
|
|
35
|
+
*/
|
|
36
|
+
display?: string;
|
|
37
|
+
/**
|
|
38
|
+
* 大小 large middle small
|
|
39
|
+
*/
|
|
40
|
+
size?: 'large' | 'middle' | 'small';
|
|
41
|
+
};
|
|
42
|
+
export type DSelectComponent = ForwardRefExoticComponent<DSelectProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef } from "./types";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
export type DSliderProps = Omit<DBaseProps, 'disabled' | 'required' | 'height'> & {
|
|
4
|
+
/**
|
|
5
|
+
* 显示提示气泡 0否 1是
|
|
6
|
+
*/
|
|
7
|
+
tooltipVisible?: '0' | '1';
|
|
8
|
+
/**
|
|
9
|
+
* 最大值
|
|
10
|
+
*/
|
|
11
|
+
max?: number;
|
|
12
|
+
/**
|
|
13
|
+
* 最小值
|
|
14
|
+
*/
|
|
15
|
+
min?: number;
|
|
16
|
+
/**
|
|
17
|
+
* 步长
|
|
18
|
+
*/
|
|
19
|
+
step?: number;
|
|
20
|
+
};
|
|
21
|
+
export type DSliderComponent = ForwardRefExoticComponent<DSliderProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef } from "./types";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
export type DSwitchProps = Omit<DBaseProps, 'required' | 'width' | 'height'> & {
|
|
4
|
+
/**
|
|
5
|
+
* 开值
|
|
6
|
+
*/
|
|
7
|
+
yVal?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 关值
|
|
10
|
+
*/
|
|
11
|
+
nVal?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 默认开值 0否 1是
|
|
14
|
+
*/
|
|
15
|
+
defaultChecked?: '0' | '1';
|
|
16
|
+
/**
|
|
17
|
+
* 大小 default small
|
|
18
|
+
*/
|
|
19
|
+
size?: 'default' | 'small';
|
|
20
|
+
};
|
|
21
|
+
export type DSwitchComponent = ForwardRefExoticComponent<DSwitchProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef } from "./types";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
import type { PlainObject } from "../../basetype";
|
|
4
|
+
export type DTabProps = Omit<DBaseProps, 'required' | 'br' | 'height' | 'disabled'> & {
|
|
5
|
+
/**
|
|
6
|
+
* 选项
|
|
7
|
+
*/
|
|
8
|
+
options?: PlainObject;
|
|
9
|
+
/**
|
|
10
|
+
* 默认值
|
|
11
|
+
*/
|
|
12
|
+
dVal?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 页签样式 card 选项卡
|
|
15
|
+
*/
|
|
16
|
+
showType?: 'card';
|
|
17
|
+
/**
|
|
18
|
+
* 显示大小 large大 default中 small小
|
|
19
|
+
*/
|
|
20
|
+
showSize?: 'large' | 'default' | 'small';
|
|
21
|
+
/**
|
|
22
|
+
* 页签位置 top顶 right右 bottom底 left左
|
|
23
|
+
*/
|
|
24
|
+
position?: 'top' | 'right' | 'bottom' | 'left左';
|
|
25
|
+
/**
|
|
26
|
+
* 关联显示
|
|
27
|
+
*/
|
|
28
|
+
display?: string;
|
|
29
|
+
};
|
|
30
|
+
export type DTabComponent = ForwardRefExoticComponent<DTabProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef } from "./types";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
export type DTimePickerProps = Omit<DBaseProps, 'height'> & {
|
|
4
|
+
/**
|
|
5
|
+
* 绑定Key2
|
|
6
|
+
*/
|
|
7
|
+
dataKey2?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 必填2 0否 1是
|
|
10
|
+
*/
|
|
11
|
+
required2?: '0' | '1';
|
|
12
|
+
/**
|
|
13
|
+
* 时间连接符
|
|
14
|
+
*/
|
|
15
|
+
dateSplit?: string;
|
|
16
|
+
/**
|
|
17
|
+
* 格式化
|
|
18
|
+
*/
|
|
19
|
+
showFormat?: string;
|
|
20
|
+
/**
|
|
21
|
+
* 显示秒 0否 1是
|
|
22
|
+
*/
|
|
23
|
+
showSecond?: '0' | '1';
|
|
24
|
+
/**
|
|
25
|
+
* 允许清空 0否 1是
|
|
26
|
+
*/
|
|
27
|
+
allowClear?: '0' | '1';
|
|
28
|
+
/**
|
|
29
|
+
* 开始值必须在前
|
|
30
|
+
*/
|
|
31
|
+
before?: '0' | '1';
|
|
32
|
+
/**
|
|
33
|
+
* 大小 large middle small
|
|
34
|
+
*/
|
|
35
|
+
size?: 'large' | 'middle' | 'small';
|
|
36
|
+
};
|
|
37
|
+
export type DTimePickerComponent = ForwardRefExoticComponent<DTimePickerProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef } from "./types";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
import type { PlainObject } from "../../basetype";
|
|
4
|
+
export type DTreeProps = Omit<DBaseProps, 'height'> & {
|
|
5
|
+
/**
|
|
6
|
+
* 静态数据
|
|
7
|
+
*/
|
|
8
|
+
sData?: [];
|
|
9
|
+
/**
|
|
10
|
+
* 根接口
|
|
11
|
+
*/
|
|
12
|
+
rootApi?: string;
|
|
13
|
+
/**
|
|
14
|
+
* 选择类型 1:三状态 0:两状态(默认) 三状态是 0-全部选中,1-部分选中不包含自己,2-部分选中包含自己
|
|
15
|
+
*/
|
|
16
|
+
checkType?: '0' | '1';
|
|
17
|
+
/**
|
|
18
|
+
* 值字段 默认 id
|
|
19
|
+
*/
|
|
20
|
+
valueKey?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 显示字段 默认 name
|
|
23
|
+
*/
|
|
24
|
+
labelKey?: string;
|
|
25
|
+
/**
|
|
26
|
+
* 下级接口
|
|
27
|
+
*/
|
|
28
|
+
childApi?: string;
|
|
29
|
+
/**
|
|
30
|
+
* 上级字段
|
|
31
|
+
*/
|
|
32
|
+
parentKey?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 根值
|
|
35
|
+
*/
|
|
36
|
+
rootId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* 请求转换
|
|
39
|
+
*/
|
|
40
|
+
afterFunc?: (value: any) => any;
|
|
41
|
+
/**
|
|
42
|
+
* 值拼接 默认是逗号
|
|
43
|
+
*/
|
|
44
|
+
join?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 父子联动 1:是 0:否
|
|
47
|
+
*/
|
|
48
|
+
checkStrictly?: '0' | '1';
|
|
49
|
+
/**
|
|
50
|
+
* 所有ID接口 三状态时使用
|
|
51
|
+
*/
|
|
52
|
+
allApi?: string;
|
|
53
|
+
/**
|
|
54
|
+
* 重新数据
|
|
55
|
+
*/
|
|
56
|
+
reloadInit?: number;
|
|
57
|
+
/**
|
|
58
|
+
* 是否启用根节点缓存
|
|
59
|
+
*/
|
|
60
|
+
rootCache?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* 延期加载,当同时有多个组件时,第二个不请请求api,等待用缓存
|
|
63
|
+
*/
|
|
64
|
+
delayApi?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* 根接口参数
|
|
67
|
+
*/
|
|
68
|
+
rootApiParam?: PlainObject;
|
|
69
|
+
/**
|
|
70
|
+
* 下级接口参数
|
|
71
|
+
*/
|
|
72
|
+
childApiParam?: PlainObject;
|
|
73
|
+
/**
|
|
74
|
+
* 所有ID接口参数
|
|
75
|
+
*/
|
|
76
|
+
allApiParam?: PlainObject;
|
|
77
|
+
/**
|
|
78
|
+
* 当前管理员
|
|
79
|
+
*/
|
|
80
|
+
managerId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* 显示区域 1:是 0:否
|
|
83
|
+
*/
|
|
84
|
+
showRegion?: '0' | '1';
|
|
85
|
+
/**
|
|
86
|
+
* 显示checkbox框 默认显示(只支持2种状态)
|
|
87
|
+
*/
|
|
88
|
+
checkable?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* 自动加载 0否 1是(只支持2种状态)
|
|
91
|
+
*/
|
|
92
|
+
initTree?: '0' | '1';
|
|
93
|
+
/**
|
|
94
|
+
* 是否展示所有 默认0
|
|
95
|
+
*/
|
|
96
|
+
ExpandedAll?: '0' | '1';
|
|
97
|
+
};
|
|
98
|
+
export type DTreeComponent = ForwardRefExoticComponent<DTreeProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DBaseProps, DMethodRef } from "./types";
|
|
2
|
+
import type { ForwardRefExoticComponent, RefAttributes } from "react";
|
|
3
|
+
export type DUploadProps = Omit<DBaseProps, 'required' | 'height'> & {
|
|
4
|
+
/**
|
|
5
|
+
* 模式 drawer按钮抽屉模式 modal按钮弹窗模式 other图标模式
|
|
6
|
+
*/
|
|
7
|
+
model?: 'drawer' | 'modal' | '图标模式';
|
|
8
|
+
/**
|
|
9
|
+
* fromId
|
|
10
|
+
*/
|
|
11
|
+
fromId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* 上传前事件
|
|
14
|
+
*/
|
|
15
|
+
beforeChange?: (cArgs: any) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 后缀名
|
|
18
|
+
*/
|
|
19
|
+
suffix?: string;
|
|
20
|
+
/**
|
|
21
|
+
* 类型 import文件导入 upload文件上传
|
|
22
|
+
*/
|
|
23
|
+
type?: 'import' | 'upload';
|
|
24
|
+
/**
|
|
25
|
+
* 大小
|
|
26
|
+
*/
|
|
27
|
+
size?: 'large' | 'middle' | 'small';
|
|
28
|
+
/**
|
|
29
|
+
* 按钮类型 primary dashed text link
|
|
30
|
+
*/
|
|
31
|
+
btnType?: 'primary' | 'dashed' | 'text' | 'link';
|
|
32
|
+
};
|
|
33
|
+
export type DUploadComponent = ForwardRefExoticComponent<DUploadProps & RefAttributes<DMethodRef>>;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import type { PlainObject } from "../../basetype";
|
|
2
|
+
import type { CSSProperties } from "react";
|
|
3
|
+
export type RegExpType = {
|
|
4
|
+
/**
|
|
5
|
+
* 类型 0预置正则 1自定义正则
|
|
6
|
+
*/
|
|
7
|
+
type?: '0' | '1';
|
|
8
|
+
/**
|
|
9
|
+
* 正则表达式或者预置的正则 app-portal/src/_define/_cems/validator/reg | common/validatorCustom
|
|
10
|
+
*/
|
|
11
|
+
pattern: string | RegExp;
|
|
12
|
+
/**
|
|
13
|
+
* 不符合正则表达式时,进行内容提示 结果是否反转,默认不反转
|
|
14
|
+
*/
|
|
15
|
+
reverse?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 提示内容
|
|
18
|
+
*/
|
|
19
|
+
msg: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 组件的定义
|
|
23
|
+
*/
|
|
24
|
+
export type ComponentType = {
|
|
25
|
+
/**
|
|
26
|
+
* 组件类型名称,唯一
|
|
27
|
+
*/
|
|
28
|
+
type: string;
|
|
29
|
+
/**
|
|
30
|
+
* 组件
|
|
31
|
+
*/
|
|
32
|
+
component: any;
|
|
33
|
+
/**
|
|
34
|
+
* 组件是否显示在组件栏里
|
|
35
|
+
*/
|
|
36
|
+
hide?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 组件在组件栏里显示的图标
|
|
39
|
+
*/
|
|
40
|
+
icon?: string;
|
|
41
|
+
/**
|
|
42
|
+
* 组件的名称
|
|
43
|
+
*/
|
|
44
|
+
title?: string;
|
|
45
|
+
/**
|
|
46
|
+
* 组件分组
|
|
47
|
+
*/
|
|
48
|
+
groupName?: string;
|
|
49
|
+
/**
|
|
50
|
+
* 组件是否有下级
|
|
51
|
+
*/
|
|
52
|
+
children?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* 组件是否只能在添加到根节点
|
|
55
|
+
*/
|
|
56
|
+
root?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* 子表单
|
|
59
|
+
*/
|
|
60
|
+
subForm?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* 组件属性的选项
|
|
63
|
+
*/
|
|
64
|
+
AttrOption?: PlainObject;
|
|
65
|
+
/**
|
|
66
|
+
* 是否需要转换集合转对象集合
|
|
67
|
+
*/
|
|
68
|
+
ArrayObject?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* 显示顺序
|
|
71
|
+
*/
|
|
72
|
+
index?: number;
|
|
73
|
+
/**
|
|
74
|
+
* 组件属性的默认值
|
|
75
|
+
*/
|
|
76
|
+
AttrDef?: PlainObject;
|
|
77
|
+
/**
|
|
78
|
+
* 绑定key的属性名称
|
|
79
|
+
*/
|
|
80
|
+
DataKey?: string;
|
|
81
|
+
/**
|
|
82
|
+
* 保留位,用于紧急/临时扩展
|
|
83
|
+
*/
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* 表单组件定义
|
|
88
|
+
*/
|
|
89
|
+
export type SchemaType = Omit<ComponentType, 'component' | 'hide' | 'icon' | 'groupName' | 'children' | 'root' | 'AttrOption'> & {
|
|
90
|
+
/**
|
|
91
|
+
* 组件id
|
|
92
|
+
*/
|
|
93
|
+
id: string;
|
|
94
|
+
/**
|
|
95
|
+
* 显示顺序
|
|
96
|
+
*/
|
|
97
|
+
index: number;
|
|
98
|
+
/**
|
|
99
|
+
* 组件的上级
|
|
100
|
+
*/
|
|
101
|
+
parentId: string;
|
|
102
|
+
/**
|
|
103
|
+
* 组件的属性
|
|
104
|
+
*/
|
|
105
|
+
Attr?: PlainObject;
|
|
106
|
+
/**
|
|
107
|
+
* 保留位,用于紧急/临时扩展
|
|
108
|
+
*/
|
|
109
|
+
[key: string]: any;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* 表单组件参数定义
|
|
113
|
+
*/
|
|
114
|
+
export type FormSchemaType = {
|
|
115
|
+
[typeName: string]: SchemaType;
|
|
116
|
+
};
|
|
117
|
+
export interface DBaseProps {
|
|
118
|
+
/**
|
|
119
|
+
* 组件实例id
|
|
120
|
+
*/
|
|
121
|
+
cId?: string;
|
|
122
|
+
/**
|
|
123
|
+
* 名称
|
|
124
|
+
*/
|
|
125
|
+
title?: string;
|
|
126
|
+
/**
|
|
127
|
+
* 样式
|
|
128
|
+
*/
|
|
129
|
+
style?: CSSProperties;
|
|
130
|
+
/**
|
|
131
|
+
* 样式名
|
|
132
|
+
*/
|
|
133
|
+
className?: string;
|
|
134
|
+
/**
|
|
135
|
+
* 组件值
|
|
136
|
+
*/
|
|
137
|
+
value?: any;
|
|
138
|
+
/**
|
|
139
|
+
* 绑定Key
|
|
140
|
+
*/
|
|
141
|
+
dataKey?: string;
|
|
142
|
+
/**
|
|
143
|
+
* 之后换行 1:是 0:否
|
|
144
|
+
*/
|
|
145
|
+
br?: '0' | '1';
|
|
146
|
+
/**
|
|
147
|
+
* 失效 1:是 0:否
|
|
148
|
+
*/
|
|
149
|
+
disabled?: '0' | '1';
|
|
150
|
+
/**
|
|
151
|
+
* 是否必填 1必填 0不必填
|
|
152
|
+
*/
|
|
153
|
+
required?: '0' | '1';
|
|
154
|
+
/**
|
|
155
|
+
* 宽度
|
|
156
|
+
*/
|
|
157
|
+
width?: number | string;
|
|
158
|
+
/**
|
|
159
|
+
* 高度
|
|
160
|
+
*/
|
|
161
|
+
height?: number | string;
|
|
162
|
+
/**
|
|
163
|
+
* 改变事件
|
|
164
|
+
*/
|
|
165
|
+
onChange?: (value?: any, init?: any) => void;
|
|
166
|
+
/**
|
|
167
|
+
* 保留位,用于紧急/临时扩展
|
|
168
|
+
*/
|
|
169
|
+
[key: string]: any;
|
|
170
|
+
}
|
|
171
|
+
export type DMethodRef = {
|
|
172
|
+
/**
|
|
173
|
+
* 设置值
|
|
174
|
+
* @param sVale 值
|
|
175
|
+
* @returns
|
|
176
|
+
*/
|
|
177
|
+
setValue: (sValue: any) => void;
|
|
178
|
+
/**
|
|
179
|
+
* 设置值2
|
|
180
|
+
* @param sVale 值
|
|
181
|
+
* @returns
|
|
182
|
+
*/
|
|
183
|
+
setValue2: (sValue: any) => void;
|
|
184
|
+
/**
|
|
185
|
+
* 添加
|
|
186
|
+
* @param sVale 值
|
|
187
|
+
* @returns
|
|
188
|
+
*/
|
|
189
|
+
addValue: (sValue: any) => any;
|
|
190
|
+
/**
|
|
191
|
+
* 编辑
|
|
192
|
+
* @param sVale 值
|
|
193
|
+
* @returns
|
|
194
|
+
*/
|
|
195
|
+
editValue: (sValue: any) => any;
|
|
196
|
+
/**
|
|
197
|
+
* 用于扩展
|
|
198
|
+
*/
|
|
199
|
+
[key: string]: any;
|
|
200
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentType } from './types';
|
|
2
|
+
import type { DFormContext, DFormContextProps } from './DForm';
|
|
3
|
+
import type { PlainObject } from '../../basetype';
|
|
4
|
+
export type ComponentLibraryType = Record<string, ComponentType>;
|
|
5
|
+
export type RegisterComponent = (component: ComponentType) => void;
|
|
6
|
+
export type CheckIPRangeIntersect = (start: string, end: string, start1?: string, end1?: string) => boolean;
|
|
7
|
+
export type CheckIpRange = (value: string, split?: string, isOr?: boolean) => string;
|
|
8
|
+
export type CheckIpPort = (value: string, split?: string, isOr?: boolean) => string;
|
|
9
|
+
export type Uuid = () => string;
|
|
10
|
+
export type CompareVersion = (policyUseVersion: string, newVersion: string) => boolean;
|
|
11
|
+
export type ConvertObjectToArray = (oJson: any, idAlias?: string) => Array<any>;
|
|
12
|
+
export type ConvertArrayToObject = (aJson: any, idAlias?: string, reIndex?: boolean) => PlainObject;
|
|
13
|
+
export type UseDForm = (props?: DFormContextProps) => DFormContext;
|