@cfmm/umi-plugins-ui-v2 0.0.33 → 0.0.35
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/dist/cjs/components/CrudTable.tpl +30 -5
- package/dist/cjs/components/HelpDocButton.tpl +78 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/locales/en-US.d.ts +2 -0
- package/dist/cjs/locales/enUS/HelpDocButton.d.ts +5 -0
- package/dist/cjs/locales/enUS/HelpDocButton.js +10 -0
- package/dist/cjs/locales/enUS/index.d.ts +2 -0
- package/dist/cjs/locales/enUS/index.js +2 -1
- package/dist/cjs/locales/th-TH.d.ts +2 -0
- package/dist/cjs/locales/zh-CN.d.ts +2 -0
- package/dist/cjs/locales/zh-TW.d.ts +2 -0
- package/dist/cjs/locales/zhCN/HelpDocButton.d.ts +5 -0
- package/dist/cjs/locales/zhCN/HelpDocButton.js +10 -0
- package/dist/cjs/locales/zhCN/index.d.ts +2 -0
- package/dist/cjs/locales/zhCN/index.js +2 -1
- package/dist/cjs/locales/zhTW/HelpDocButton.d.ts +5 -0
- package/dist/cjs/locales/zhTW/HelpDocButton.js +10 -0
- package/dist/cjs/locales/zhTW/index.d.ts +2 -0
- package/dist/cjs/locales/zhTW/index.js +2 -1
- package/dist/cjs/types/CrudTableTypes.d.ts +1 -1
- package/dist/cjs/types/CrudTableTypes.js +1 -1
- package/dist/cjs/types/HelpDocButtonTypes.d.ts +1 -0
- package/dist/cjs/types/HelpDocButtonTypes.js +7 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.js +8 -1
- package/dist/cjs/writeTmpFile/writeIndex.js +1 -1
- package/dist/cjs/writeTmpFile/writeStatusConfig.js +12 -1
- package/dist/cjs/writeTmpFile/writeTypes.js +1 -1
- package/dist/esm/components/CrudTable.tpl +30 -5
- package/dist/esm/components/HelpDocButton.tpl +78 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/locales/en-US.d.ts +2 -0
- package/dist/esm/locales/enUS/HelpDocButton.d.ts +5 -0
- package/dist/esm/locales/enUS/HelpDocButton.js +4 -0
- package/dist/esm/locales/enUS/index.d.ts +2 -0
- package/dist/esm/locales/enUS/index.js +2 -1
- package/dist/esm/locales/th-TH.d.ts +2 -0
- package/dist/esm/locales/zh-CN.d.ts +2 -0
- package/dist/esm/locales/zh-TW.d.ts +2 -0
- package/dist/esm/locales/zhCN/HelpDocButton.d.ts +5 -0
- package/dist/esm/locales/zhCN/HelpDocButton.js +4 -0
- package/dist/esm/locales/zhCN/index.d.ts +2 -0
- package/dist/esm/locales/zhCN/index.js +2 -1
- package/dist/esm/locales/zhTW/HelpDocButton.d.ts +5 -0
- package/dist/esm/locales/zhTW/HelpDocButton.js +4 -0
- package/dist/esm/locales/zhTW/index.d.ts +2 -0
- package/dist/esm/locales/zhTW/index.js +2 -1
- package/dist/esm/types/CrudTableTypes.d.ts +1 -1
- package/dist/esm/types/CrudTableTypes.js +1 -1
- package/dist/esm/types/HelpDocButtonTypes.d.ts +1 -0
- package/dist/esm/types/HelpDocButtonTypes.js +1 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.js +2 -1
- package/dist/esm/writeTmpFile/writeIndex.js +1 -1
- package/dist/esm/writeTmpFile/writeStatusConfig.js +12 -1
- package/dist/esm/writeTmpFile/writeTypes.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var DEFAULT_STATUS_ENABLED_VALUES = ['1', 'Y'];
|
|
3
|
+
var DEFAULT_SHOW_HELP_DOC_BUTTON_IN_TABLE = false;
|
|
3
4
|
var getStatusEnabledValues = function getStatusEnabledValues(cfmmUIConfig) {
|
|
4
5
|
// 没有配置使用默认值
|
|
5
6
|
if (!cfmmUIConfig || _typeof(cfmmUIConfig) !== 'object' || Array.isArray(cfmmUIConfig)) {
|
|
@@ -21,10 +22,20 @@ var getStatusEnabledValues = function getStatusEnabledValues(cfmmUIConfig) {
|
|
|
21
22
|
});
|
|
22
23
|
return normalizedValues.length > 0 ? normalizedValues : DEFAULT_STATUS_ENABLED_VALUES;
|
|
23
24
|
};
|
|
25
|
+
|
|
26
|
+
/** 读取插件级「表格标题是否显示帮助文档按钮」配置,未配置时默认显示 */
|
|
27
|
+
var getShowHelpDocButtonInTable = function getShowHelpDocButtonInTable(cfmmUIConfig) {
|
|
28
|
+
if (!cfmmUIConfig || _typeof(cfmmUIConfig) !== 'object' || Array.isArray(cfmmUIConfig)) {
|
|
29
|
+
return DEFAULT_SHOW_HELP_DOC_BUTTON_IN_TABLE;
|
|
30
|
+
}
|
|
31
|
+
var showHelpDocButtonInTable = cfmmUIConfig.showHelpDocButtonInTable;
|
|
32
|
+
return typeof showHelpDocButtonInTable === 'boolean' ? showHelpDocButtonInTable : DEFAULT_SHOW_HELP_DOC_BUTTON_IN_TABLE;
|
|
33
|
+
};
|
|
24
34
|
export default (function (api) {
|
|
25
35
|
var statusEnabledValues = getStatusEnabledValues(api.userConfig.cfmmUI);
|
|
36
|
+
var showHelpDocButtonInTable = getShowHelpDocButtonInTable(api.userConfig.cfmmUI);
|
|
26
37
|
return {
|
|
27
38
|
path: 'constants/statusConfig.ts',
|
|
28
|
-
content: "\n export const STATUS_ENABLED_VALUES = ".concat(JSON.stringify(statusEnabledValues), ";\n ")
|
|
39
|
+
content: "\n export const STATUS_ENABLED_VALUES = ".concat(JSON.stringify(statusEnabledValues), ";\n export const SHOW_HELP_DOC_BUTTON_IN_TABLE = ").concat(showHelpDocButtonInTable, ";\n ")
|
|
29
40
|
};
|
|
30
41
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DropdownButtonTypes, DynamicIconTypes, HighlightStrTypes, MyFooterToolbarTypes, QrCodeModalTypes, MenuFooterTypes, EditMultiLangFormTypes, MySelectTypes, MySelectLangTypes, PermissionSelectTypes, DataPermissionSelectTypes, DatePickerTypes, RandomAvatarTypes, RefDrawerFormTypes, ViewTableItemDrawerTypes, WangEditorTypes, servicesTypes, MyPageContainerTypes, MyTagListTypes, VolumeFormItemTypes, ImportExeclTypes, MyUploadTypes, ReportTableTypes, DicDropDownListTypes, ActionLogDrawerTypes, DndTabsTypes, ImportDataUploadTypes, AvatarDropdownTypes, HeaderSearchTypes, ThemeSwitchTypes, GlobalHeaderTypes, KeepAliveTabsTypes, ExportPageWrapperTypes, MySetpsTypes, CrudTableTypes, DndTagTypes, UseFetchListTypes, ProFormSearchSelectTypes } from "../types";
|
|
1
|
+
import { DropdownButtonTypes, DynamicIconTypes, HighlightStrTypes, MyFooterToolbarTypes, QrCodeModalTypes, MenuFooterTypes, EditMultiLangFormTypes, MySelectTypes, MySelectLangTypes, PermissionSelectTypes, DataPermissionSelectTypes, DatePickerTypes, RandomAvatarTypes, RefDrawerFormTypes, ViewTableItemDrawerTypes, WangEditorTypes, servicesTypes, MyPageContainerTypes, MyTagListTypes, VolumeFormItemTypes, ImportExeclTypes, MyUploadTypes, ReportTableTypes, DicDropDownListTypes, ActionLogDrawerTypes, DndTabsTypes, ImportDataUploadTypes, AvatarDropdownTypes, HeaderSearchTypes, ThemeSwitchTypes, GlobalHeaderTypes, KeepAliveTabsTypes, ExportPageWrapperTypes, MySetpsTypes, CrudTableTypes, DndTagTypes, UseFetchListTypes, ProFormSearchSelectTypes, HelpDocButtonTypes } from "../types";
|
|
2
2
|
|
|
3
3
|
// 修改方法,不再尝试读取外部文件
|
|
4
4
|
export default {
|
|
5
5
|
path: 'types.d.ts',
|
|
6
|
-
content: "\n import React from 'react';\n import { ModalProps, DrawerProps, SelectProps, DatePickerProps, UploadProps, UploadFile, TooltipProps, ButtonProps, TabsProps, SwitchProps, FloatButtonProps, StepsProps, FlexProps, TagProps } from 'antd';\n import { PresetColorType, PresetStatusColorType } from \"antd/lib/_util/colors\";\n import { AutoCompleteProps } from 'antd/es/auto-complete';\n import { RangePickerProps } from 'antd/lib/date-picker';\n import { LiteralUnion } from \"antd/lib/_util/type\";\n import { IconComponentProps } from '@ant-design/icons/lib/components/Icon';\n import { ActionType, ProFormItemProps, ProFormSelectProps, ProColumns, ProTableProps, DrawerFormProps, ModalFormProps, PageContainerProps, ProFormInstance, RequestOptionsType } from '@ant-design/pro-components';\n import dayjs, { OpUnitType } from 'dayjs';\n import { IEditorConfig, IToolbarConfig } from '@wangeditor/editor';\n import type { DragEndEvent } from '@dnd-kit/core';\n import { fileTypeMap } from './components'; \n import { ExcelExportOptions } from './utils/excelHelper';\n import { HandleImportListOptions } from './utils/importHelper';\n\n /** \u7EC4\u4EF6\u6620\u5C04\u5B57\u6BB5 */\n export type KeyNamesType<T> = {\n /** \u4E3B\u952E */\n id: keyof T;\n /** \u7F16\u7801 */\n code?: keyof T;\n /** \u540D\u79F0 */\n name: keyof T;\n };\n\n ".concat(servicesTypes, "\n\n ").concat(HighlightStrTypes, "\n\n ").concat(DropdownButtonTypes, "\n\n ").concat(DynamicIconTypes, "\n\n ").concat(MyFooterToolbarTypes, "\n\n ").concat(QrCodeModalTypes, "\n\n ").concat(MenuFooterTypes, "\n\n ").concat(EditMultiLangFormTypes, "\n\n ").concat(MySelectTypes, "\n\n ").concat(MySelectLangTypes, "\n\n ").concat(PermissionSelectTypes, "\n\n ").concat(DataPermissionSelectTypes, "\n\n ").concat(DatePickerTypes, "\n\n ").concat(RandomAvatarTypes, "\n\n ").concat(RefDrawerFormTypes, "\n\n ").concat(ViewTableItemDrawerTypes, "\n\n ").concat(WangEditorTypes, "\n\n ").concat(MyPageContainerTypes, "\n\n ").concat(MyTagListTypes, "\n\n ").concat(VolumeFormItemTypes, "\n\n ").concat(ImportExeclTypes, "\n\n ").concat(MyUploadTypes, "\n\n ").concat(ReportTableTypes, "\n\n ").concat(DicDropDownListTypes, "\n\n ").concat(ActionLogDrawerTypes, "\n\n ").concat(DndTabsTypes, "\n\n ").concat(ImportDataUploadTypes, "\n\n ").concat(AvatarDropdownTypes, "\n\n ").concat(HeaderSearchTypes, "\n\n ").concat(ThemeSwitchTypes, "\n\n ").concat(GlobalHeaderTypes, "\n\n ").concat(KeepAliveTabsTypes, "\n\n ").concat(ExportPageWrapperTypes, "\n\n ").concat(MySetpsTypes, "\n\n ").concat(CrudTableTypes, "\n\n ").concat(DndTagTypes, "\n\n ").concat(UseFetchListTypes, "\n\n ").concat(ProFormSearchSelectTypes, "\n ")
|
|
6
|
+
content: "\n import React from 'react';\n import { ModalProps, DrawerProps, SelectProps, DatePickerProps, UploadProps, UploadFile, TooltipProps, ButtonProps, TabsProps, SwitchProps, FloatButtonProps, StepsProps, FlexProps, TagProps } from 'antd';\n import { PresetColorType, PresetStatusColorType } from \"antd/lib/_util/colors\";\n import { AutoCompleteProps } from 'antd/es/auto-complete';\n import { RangePickerProps } from 'antd/lib/date-picker';\n import { LiteralUnion } from \"antd/lib/_util/type\";\n import { IconComponentProps } from '@ant-design/icons/lib/components/Icon';\n import { ActionType, ProFormItemProps, ProFormSelectProps, ProColumns, ProTableProps, DrawerFormProps, ModalFormProps, PageContainerProps, ProFormInstance, RequestOptionsType } from '@ant-design/pro-components';\n import dayjs, { OpUnitType } from 'dayjs';\n import { IEditorConfig, IToolbarConfig } from '@wangeditor/editor';\n import type { DragEndEvent } from '@dnd-kit/core';\n import { fileTypeMap } from './components'; \n import { ExcelExportOptions } from './utils/excelHelper';\n import { HandleImportListOptions } from './utils/importHelper';\n\n /** \u7EC4\u4EF6\u6620\u5C04\u5B57\u6BB5 */\n export type KeyNamesType<T> = {\n /** \u4E3B\u952E */\n id: keyof T;\n /** \u7F16\u7801 */\n code?: keyof T;\n /** \u540D\u79F0 */\n name: keyof T;\n };\n\n ".concat(servicesTypes, "\n\n ").concat(HighlightStrTypes, "\n\n ").concat(DropdownButtonTypes, "\n\n ").concat(DynamicIconTypes, "\n\n ").concat(MyFooterToolbarTypes, "\n\n ").concat(QrCodeModalTypes, "\n\n ").concat(MenuFooterTypes, "\n\n ").concat(EditMultiLangFormTypes, "\n\n ").concat(MySelectTypes, "\n\n ").concat(MySelectLangTypes, "\n\n ").concat(PermissionSelectTypes, "\n\n ").concat(DataPermissionSelectTypes, "\n\n ").concat(DatePickerTypes, "\n\n ").concat(RandomAvatarTypes, "\n\n ").concat(RefDrawerFormTypes, "\n\n ").concat(ViewTableItemDrawerTypes, "\n\n ").concat(WangEditorTypes, "\n\n ").concat(MyPageContainerTypes, "\n\n ").concat(MyTagListTypes, "\n\n ").concat(VolumeFormItemTypes, "\n\n ").concat(ImportExeclTypes, "\n\n ").concat(MyUploadTypes, "\n\n ").concat(ReportTableTypes, "\n\n ").concat(DicDropDownListTypes, "\n\n ").concat(ActionLogDrawerTypes, "\n\n ").concat(DndTabsTypes, "\n\n ").concat(ImportDataUploadTypes, "\n\n ").concat(AvatarDropdownTypes, "\n\n ").concat(HeaderSearchTypes, "\n\n ").concat(ThemeSwitchTypes, "\n\n ").concat(GlobalHeaderTypes, "\n\n ").concat(KeepAliveTabsTypes, "\n\n ").concat(ExportPageWrapperTypes, "\n\n ").concat(MySetpsTypes, "\n\n ").concat(CrudTableTypes, "\n\n ").concat(DndTagTypes, "\n\n ").concat(UseFetchListTypes, "\n\n ").concat(ProFormSearchSelectTypes, "\n\n ").concat(HelpDocButtonTypes, "\n ")
|
|
7
7
|
};
|