@dt-frames/ui 2.0.14 → 2.0.16

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.
Files changed (99) hide show
  1. package/es/assets/imgs/tree/forder-open.svg +1 -0
  2. package/es/assets/imgs/tree/forder.svg +1 -0
  3. package/es/assets/locales/zh.ts +1 -1
  4. package/es/components/curd/index.js +28 -8
  5. package/es/components/curd/src/components/Curd.d.ts +10 -0
  6. package/es/components/curd/src/hooks/useCurd.d.ts +2 -4
  7. package/es/components/curd/src/props.d.ts +5 -1
  8. package/es/components/drawer/index.js +25 -24
  9. package/es/components/form/index.js +56 -40
  10. package/es/components/form/index.less +44 -3
  11. package/es/components/form/src/props.d.ts +3 -3
  12. package/es/components/modal/index.js +8 -143
  13. package/es/components/modal/index.less +23 -0
  14. package/es/components/modal/src/index.d.ts +2 -84
  15. package/es/components/table/index.js +72 -88
  16. package/es/components/table/src/components/TableAction.d.ts +6 -0
  17. package/es/components/table/src/index.d.ts +4 -4
  18. package/es/components/table/src/props.d.ts +1 -1
  19. package/es/components/tree/index.js +197 -93
  20. package/es/components/tree/index.less +75 -13
  21. package/es/components/tree/src/basicProps.d.ts +46 -7
  22. package/es/components/tree/src/components/TreeHeader.d.ts +2 -2
  23. package/es/components/tree/src/hooks/useTree.d.ts +3 -2
  24. package/es/components/tree/src/index.d.ts +120 -29
  25. package/es/components/upload/index.js +79 -75
  26. package/es/components/upload/index.less +19 -5
  27. package/es/components/upload/src/basicProps.d.ts +1 -1
  28. package/es/components/upload/src/index.d.ts +6 -6
  29. package/es/components/upload/src/utils/upload.d.ts +1 -1
  30. package/es/theme/index.js +387 -431
  31. package/es/theme/index.less +24 -0
  32. package/es/theme/src/components/header/components/lock/Lockscreen.d.ts +34 -3
  33. package/es/theme/src/components/header/components/lock/index.d.ts +1 -2
  34. package/es/theme/src/components/header/components/lock/useTime.d.ts +7 -0
  35. package/es/theme/src/components/header/components/size.d.ts +5 -5
  36. package/es/theme/src/components/header/components/user-info.d.ts +7 -0
  37. package/es/theme/src/components/header/index.d.ts +12 -5
  38. package/es/theme/src/components/header/multiple-header.d.ts +12 -5
  39. package/es/theme/src/index.d.ts +63 -13
  40. package/es/theme/src/stores/lockscreen.store.d.ts +7 -0
  41. package/manualContentPath.js +10 -0
  42. package/package.json +1 -1
  43. package/tsconfig.json +1 -1
  44. package/es/packages/ui/src/assets/locales/en.d.ts +0 -103
  45. package/es/packages/ui/src/assets/locales/index.d.ts +0 -2
  46. package/es/packages/ui/src/assets/locales/zh.d.ts +0 -104
  47. package/es/packages/ui/src/components/form/index.d.ts +0 -7
  48. package/es/packages/ui/src/components/form/src/components/FormButtons.d.ts +0 -105
  49. package/es/packages/ui/src/components/form/src/components/FormItem.d.ts +0 -159
  50. package/es/packages/ui/src/components/form/src/components/componentMap.d.ts +0 -4
  51. package/es/packages/ui/src/components/form/src/components/formIcon.d.ts +0 -1223
  52. package/es/packages/ui/src/components/form/src/components/formInputUseDialog.d.ts +0 -911
  53. package/es/packages/ui/src/components/form/src/components/index.d.ts +0 -4
  54. package/es/packages/ui/src/components/form/src/components/radioButton.d.ts +0 -34
  55. package/es/packages/ui/src/components/form/src/enums/index.d.ts +0 -7
  56. package/es/packages/ui/src/components/form/src/hooks/helper.d.ts +0 -14
  57. package/es/packages/ui/src/components/form/src/hooks/useForm.d.ts +0 -6
  58. package/es/packages/ui/src/components/form/src/hooks/useFormActions.d.ts +0 -12
  59. package/es/packages/ui/src/components/form/src/hooks/useFormEvent.d.ts +0 -25
  60. package/es/packages/ui/src/components/form/src/hooks/useFormValue.d.ts +0 -3
  61. package/es/packages/ui/src/components/form/src/hooks/useFormValues.d.ts +0 -11
  62. package/es/packages/ui/src/components/form/src/hooks/useLabelWidth.d.ts +0 -6
  63. package/es/packages/ui/src/components/form/src/props.d.ts +0 -127
  64. package/es/packages/ui/src/components/form/src/types/actions.type.d.ts +0 -15
  65. package/es/packages/ui/src/components/form/src/types/form.type.d.ts +0 -79
  66. package/es/packages/ui/src/components/form/src/types/items.type.d.ts +0 -409
  67. package/es/packages/ui/src/components/iframe/index.d.ts +0 -2
  68. package/es/packages/ui/src/components/modal/index.d.ts +0 -4
  69. package/es/packages/ui/src/components/modal/src/hooks/useModal.d.ts +0 -5
  70. package/es/packages/ui/src/components/modal/src/props.d.ts +0 -101
  71. package/es/packages/ui/src/components/modal/src/types/modal.type.d.ts +0 -17
  72. package/es/packages/ui/src/components/upload/index.d.ts +0 -4
  73. package/es/packages/ui/src/components/upload/src/basicProps.d.ts +0 -87
  74. package/es/packages/ui/src/components/upload/src/components/PdfView.d.ts +0 -9
  75. package/es/packages/ui/src/components/upload/src/components/WordView.d.ts +0 -6
  76. package/es/packages/ui/src/components/upload/src/hooks/useFile.d.ts +0 -16
  77. package/es/packages/ui/src/components/upload/src/index.d.ts +0 -242
  78. package/es/packages/ui/src/components/upload/src/type/file.d.ts +0 -10
  79. package/es/packages/ui/src/components/upload/src/utils/upload.d.ts +0 -2
  80. package/es/packages/ui/src/global.d.ts +0 -7
  81. package/es/packages/ui/src/theme/index.d.ts +0 -12
  82. package/es/packages/ui/src/theme/src/components/header/helper/menu-tree.d.ts +0 -4
  83. package/es/packages/ui/src/theme/src/enums/index.d.ts +0 -1
  84. package/es/packages/ui/src/theme/src/enums/theme.enum.d.ts +0 -34
  85. package/es/packages/ui/src/theme/src/hooks/index.d.ts +0 -6
  86. package/es/packages/ui/src/theme/src/hooks/useDragLine.d.ts +0 -2
  87. package/es/packages/ui/src/theme/src/hooks/useHeader.d.ts +0 -25
  88. package/es/packages/ui/src/theme/src/hooks/useMenu.d.ts +0 -29
  89. package/es/packages/ui/src/theme/src/hooks/useMultifyTab.d.ts +0 -8
  90. package/es/packages/ui/src/theme/src/hooks/useOpenKeys.d.ts +0 -7
  91. package/es/packages/ui/src/theme/src/hooks/useTheme.d.ts +0 -9
  92. package/es/packages/ui/src/theme/src/setting/theme.setting.d.ts +0 -2
  93. package/es/packages/ui/src/theme/src/stores/index.d.ts +0 -3
  94. package/es/packages/ui/src/theme/src/stores/routeReuse.store.d.ts +0 -25
  95. package/es/packages/ui/src/theme/src/stores/theme.store.d.ts +0 -19
  96. package/es/packages/ui/src/theme/src/types/index.d.ts +0 -3
  97. package/es/packages/ui/src/theme/src/types/menu.type.d.ts +0 -15
  98. package/es/packages/ui/src/theme/src/types/theme.type.d.ts +0 -62
  99. package/es/packages/ui/src/utils/withInstall.d.ts +0 -4
@@ -1,4 +0,0 @@
1
- import { default as DtFormItem } from "./FormItem";
2
- import { default as DtFormButtons } from "./FormButtons";
3
- import { default as DtFormIcon } from "./formIcon";
4
- export { DtFormItem, DtFormButtons, DtFormIcon };
@@ -1,34 +0,0 @@
1
- import { PropType } from "vue";
2
- declare type OptionsItem = {
3
- label: string;
4
- value: string | number | boolean;
5
- disabled?: boolean;
6
- };
7
- declare type RadioItem = string | OptionsItem;
8
- declare const _sfc_main: import("vue").DefineComponent<{
9
- value: {
10
- type: PropType<string | number | boolean>;
11
- };
12
- options: {
13
- type: PropType<RadioItem[]>;
14
- default: () => any[];
15
- };
16
- }, {
17
- props: any;
18
- attrs: {
19
- [x: string]: unknown;
20
- };
21
- state: any;
22
- getOptions: import("vue").ComputedRef<OptionsItem[]>;
23
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
- value: {
25
- type: PropType<string | number | boolean>;
26
- };
27
- options: {
28
- type: PropType<RadioItem[]>;
29
- default: () => any[];
30
- };
31
- }>>, {
32
- options: RadioItem[];
33
- }>;
34
- export default _sfc_main;
@@ -1,7 +0,0 @@
1
- export declare const SEARCH_BTN_NAME = "UI.SEARCH";
2
- export declare const RESET_BTN_NAME = "UI.RESET";
3
- export declare const SEARCH_BTNS: {
4
- label: string;
5
- preIcon: string;
6
- type: string;
7
- }[];
@@ -1,14 +0,0 @@
1
- import { Rule } from 'ant-design-vue/lib/form/interface';
2
- import { ComponentType } from "../types/form.type";
3
- export declare const SINGLE_DATA_TYPE: string[];
4
- export declare const MULTIFY_DATA_TYPE: string[];
5
- export declare const DATE_PICKER_TYPES: string[];
6
- export declare const DATE_MODE_TYPE: {
7
- time: string;
8
- date: string;
9
- month: string;
10
- year: string;
11
- };
12
- export declare function createPlaceholder(component: ComponentType): string;
13
- export declare function setComponentRuleType(rule: Rule, component: ComponentType, valueFormat: string): void;
14
- export declare function handleInputNumberValue(component?: ComponentType, val?: any): any;
@@ -1,6 +0,0 @@
1
- import { FormActionType } from '../types/actions.type';
2
- import { FormProps } from "../types/form.type";
3
- declare type RegisterFn = (formInstance: FormActionType) => void;
4
- declare type UseFormReturnType = [RegisterFn, FormActionType];
5
- export declare function useForm(props: FormProps): UseFormReturnType;
6
- export {};
@@ -1,12 +0,0 @@
1
- import { Recordable } from "@dt-frames/core";
2
- import { ComputedRef, Ref } from "vue";
3
- import { ButtonProps, FormProps, FormSchema } from "../types/form.type";
4
- declare type FormOpt = {
5
- updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => void;
6
- getProps: ComputedRef<FormProps>;
7
- defaultValue: Ref<Recordable>;
8
- getFormValues: () => Recordable;
9
- setFormValues: (values: Recordable) => Promise<void>;
10
- };
11
- export declare function useFormActions(opt: FormOpt): ((params: boolean | ButtonProps) => void)[];
12
- export {};
@@ -1,25 +0,0 @@
1
- import { Recordable } from "@dt-frames/core";
2
- import { ComputedRef, Ref } from "vue";
3
- import { FormActionType } from "../types/actions.type";
4
- import { FormProps, FormSchema } from "../types/form.type";
5
- export declare function useFormEvents({ emits, getSchema, formModel, defaultValue, formElRef, schemaRef, getProps, handleFormValues }: {
6
- emits: (event: string, ...args: any[]) => void;
7
- getSchema: ComputedRef<FormSchema[]>;
8
- formModel: Recordable;
9
- defaultValue: Ref<Recordable>;
10
- formElRef: Ref<FormActionType>;
11
- schemaRef: Ref<FormSchema[]>;
12
- getProps: ComputedRef<FormProps>;
13
- handleFormValues: (model: Recordable) => Recordable;
14
- }): {
15
- getFormValues: () => Recordable<any>;
16
- updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => void;
17
- resetSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => void;
18
- clearValidate: (name?: string | string[]) => Promise<void>;
19
- resetForms: () => void;
20
- removeFormByName: (names: string | string[]) => void;
21
- validateFields: (nameList: (string | number)[]) => Promise<any>;
22
- setFormValues: (values: Recordable | null) => Promise<void>;
23
- validate: (nameList: (string | number)[]) => Promise<any>;
24
- appendFormItems: (schema: FormSchema[], prefixName?: string, first?: boolean) => void;
25
- };
@@ -1,3 +0,0 @@
1
- import { Recordable } from "@dt-frames/core";
2
- import { Ref } from "vue";
3
- export declare function useFormValue<T extends Recordable>(props: T, key?: keyof T, changeEvent?: string, emitData?: Ref<any[]>): any[];
@@ -1,11 +0,0 @@
1
- import { Recordable } from "@dt-frames/core";
2
- import { ComputedRef, Ref } from "vue";
3
- import { FormSchema } from '../types/form.type';
4
- export declare function useFormValues({ defaultValue, getSchema, formModel }: {
5
- defaultValue: Ref<any>;
6
- getSchema: ComputedRef<FormSchema[]>;
7
- formModel: Recordable;
8
- }): {
9
- initDefault: () => void;
10
- handleFormValues: (model: Recordable) => Recordable<any>;
11
- };
@@ -1,6 +0,0 @@
1
- import { Ref } from "vue";
2
- import { FormProps, FormSchema } from "../types/form.type";
3
- export declare function useLabelWidth(schemaItemRef: Ref<FormSchema>, propsRef: Ref<FormProps>): import("vue").ComputedRef<{
4
- labelCol: any;
5
- wrapperCol: any;
6
- }>;
@@ -1,127 +0,0 @@
1
- import { Recordable } from "@dt-frames/core";
2
- import { PropType, Ref } from "vue";
3
- import { ButtonProps, ColEx, FormSchema } from "./types/form.type";
4
- import { FormActionType } from "./types/actions.type";
5
- export declare const BasicProps: {
6
- mode: {
7
- type: PropType<"search" | "dialog">;
8
- default: string;
9
- };
10
- autoFetch: {
11
- type: BooleanConstructor;
12
- default: boolean;
13
- };
14
- model: {
15
- type: PropType<Recordable<any>>;
16
- default: () => {};
17
- };
18
- layout: {
19
- type: PropType<"vertical" | "inline" | "horizontal">;
20
- default: string;
21
- };
22
- labelWidth: {
23
- type: PropType<string | number>;
24
- default: number;
25
- };
26
- enLabelWidth: {
27
- type: PropType<string | number>;
28
- default: number;
29
- };
30
- labelAlign: {
31
- type: PropType<"left" | "right">;
32
- default: string;
33
- };
34
- labelCol: {
35
- type: PropType<Partial<ColEx>>;
36
- default: () => {};
37
- };
38
- wrapperCol: {
39
- type: PropType<Partial<ColEx>>;
40
- default: () => {};
41
- };
42
- rowProps: {
43
- type: PropType<Partial<import("vue").ExtractPropTypes<{
44
- align: PropType<"stretch" | "bottom" | "top" | "middle">;
45
- justify: PropType<"space-around" | "space-between" | "center" | "end" | "start">;
46
- prefixCls: StringConstructor;
47
- gutter: {
48
- type: PropType<import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter]>;
49
- default: import("ant-design-vue/lib/grid/Row").Gutter | [import("ant-design-vue/lib/grid/Row").Gutter, import("ant-design-vue/lib/grid/Row").Gutter];
50
- };
51
- wrap: {
52
- type: BooleanConstructor;
53
- default: any;
54
- };
55
- }>>>;
56
- default: () => {};
57
- };
58
- colProps: {
59
- type: PropType<Partial<ColEx>>;
60
- };
61
- span: {
62
- type: NumberConstructor;
63
- };
64
- size: {
65
- type: PropType<"middle" | "small" | "large">;
66
- };
67
- disabled: {
68
- type: BooleanConstructor;
69
- default: boolean;
70
- };
71
- compact: {
72
- type: BooleanConstructor;
73
- default: any;
74
- };
75
- schemas: {
76
- type: PropType<FormSchema[]>;
77
- default: () => any[];
78
- };
79
- autoSearchOnEnter: {
80
- type: BooleanConstructor;
81
- default: boolean;
82
- };
83
- minShowColumn: {
84
- type: NumberConstructor;
85
- default: number;
86
- };
87
- showAdvancedButton: {
88
- type: BooleanConstructor;
89
- default: boolean;
90
- };
91
- allowClear: {
92
- type: BooleanConstructor;
93
- default: boolean;
94
- };
95
- scrollToFirstError: {
96
- type: BooleanConstructor;
97
- default: boolean;
98
- };
99
- colon: {
100
- type: BooleanConstructor;
101
- default: boolean;
102
- };
103
- loading: {
104
- type: PropType<{
105
- [key: string]: Ref<boolean>;
106
- }>;
107
- default: () => {};
108
- };
109
- onSearch: {
110
- type: PropType<(params: Recordable) => void>;
111
- default: (params: Recordable) => void;
112
- };
113
- onReset: {
114
- type: PropType<(params: Recordable) => void>;
115
- default: (params: Recordable) => void;
116
- };
117
- buttons: {
118
- type: PropType<boolean | ButtonProps[]>;
119
- default: boolean;
120
- };
121
- resetFunc: {
122
- type: PropType<() => void>;
123
- };
124
- registerInstance: {
125
- type: PropType<(instance: FormActionType) => void>;
126
- };
127
- };
@@ -1,15 +0,0 @@
1
- import { Recordable } from '@dt-frames/core';
2
- import { FormProps, FormSchema } from './form.type';
3
- export declare type FormActionType = {
4
- setProps: (props: FormProps) => void;
5
- updateSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => void;
6
- resetSchema: (data: Partial<FormSchema> | Partial<FormSchema>[]) => void;
7
- clearValidate: (name?: string | string[]) => Promise<void>;
8
- resetForms: () => void;
9
- removeFormByName: (name: string | string[]) => void;
10
- setFormValues: (values: Recordable) => Promise<void>;
11
- appendFormItems: (schema: FormSchema[], prefixField: string | undefined, first?: boolean | undefined) => void;
12
- validate: (nameList?: (string | number)[]) => Promise<any>;
13
- validateFields: (nameList?: (string | number)[]) => Promise<any>;
14
- getFormValues: () => Recordable;
15
- };
@@ -1,79 +0,0 @@
1
- import { Recordable } from "@dt-frames/core";
2
- import { ComputedRef, ExtractPropTypes, Ref, VNode } from "vue";
3
- import { RuleObject } from 'ant-design-vue/es/form/interface';
4
- import { TooltipProps } from "ant-design-vue/es/tooltip/Tooltip";
5
- import { BasicProps } from "../props";
6
- import type { Cascader, Checkbox, CheckboxGroup, DatePicker, Divider, Input, InputGroup, InputNumber, InputPassword, InputSearch, InputTextArea, InputWithDialog, Radio, RadioGroup, RangePicker, Rate, Select, Switch, TimePicker, TreeSelect, Upload } from "./items.type";
7
- export declare type ButtonFlag = 'OK' | 'CANCEL';
8
- export declare type Rule = RuleObject & {
9
- trigger?: 'blur' | 'change' | ['change', 'blur'];
10
- };
11
- export declare type FormProps = Partial<ExtractPropTypes<typeof BasicProps>>;
12
- export declare type ComponentType = 'Input' | 'InputWithDialog' | 'InputGroup' | 'InputPassword' | 'InputSearch' | 'InputTextArea' | 'InputNumber' | 'Select' | 'TreeSelect' | 'Radio' | 'RadioButtonGroup' | 'RadioGroup' | 'Checkbox' | 'CheckboxGroup' | 'AutoComplete' | 'Cascader' | 'DatePicker' | 'MonthPicker' | 'RangePicker' | 'WeekPicker' | 'TimePicker' | 'Switch' | 'Upload' | 'Slider' | 'Rate' | 'Divider' | 'Upload';
13
- export declare type ColEx = {
14
- style?: any;
15
- span?: number | string;
16
- pull?: number;
17
- push?: number;
18
- order?: number | string;
19
- offset?: number | string;
20
- md?: number | string;
21
- xl?: number | string;
22
- xxl?: number | string;
23
- };
24
- declare type Schema<ComponentType, T> = {
25
- t?: string;
26
- name?: string | string[];
27
- changeEvent?: string;
28
- valueField?: string;
29
- label?: string;
30
- subLabel?: string;
31
- labelWidth?: string | number;
32
- enLabelWidth?: string | number;
33
- toolTip?: boolean | ((model: Recordable) => boolean);
34
- toolTipProps?: TooltipProps;
35
- component?: ComponentType;
36
- props?: ((model: Recordable) => T) | T;
37
- required?: boolean | ((model: Recordable) => boolean) | Ref<boolean> | ComputedRef<boolean>;
38
- suffix?: string | number | VNode | ((model: Recordable) => VNode | VNode[] | string);
39
- prefix?: string | number | VNode | ((model: Recordable) => VNode | VNode[] | string);
40
- rules?: Rule[];
41
- rulesMessageJoinLabel?: boolean;
42
- validateTrigger?: string | string[] | false;
43
- defaultValue?: any;
44
- show?: boolean | ((model: Recordable) => boolean);
45
- render?: (model: Recordable) => VNode | VNode[] | string;
46
- renderCol?: (model: Recordable) => VNode | VNode[] | string;
47
- colProps?: Partial<ColEx>;
48
- span?: number;
49
- renderComponent?: ((model: Recordable) => Recordable) | VNode | VNode[] | string;
50
- slot?: string;
51
- colSlot?: string;
52
- disabled?: boolean | ((model: Recordable) => boolean);
53
- dynamicRules?: (model: Recordable) => Rule[];
54
- colon?: boolean;
55
- labelCol?: Partial<ColEx>;
56
- wrapperCol?: Partial<ColEx>;
57
- isAdvanced?: boolean;
58
- extraName?: string[];
59
- };
60
- export declare type FormSchema = Schema<'Input', Input> | Schema<'InputWithDialog', InputWithDialog> | Schema<'InputGroup', InputGroup> | Schema<'InputPassword', InputPassword> | Schema<'InputSearch', InputSearch> | Schema<'InputTextArea', InputTextArea> | Schema<'InputNumber', InputNumber> | Schema<'Select', Select> | Schema<'TreeSelect', TreeSelect> | Schema<'Radio', Radio> | Schema<'RadioButtonGroup', Radio> | Schema<'RadioGroup', RadioGroup> | Schema<'Checkbox', Checkbox> | Schema<'CheckboxGroup', CheckboxGroup> | Schema<'AutoComplete', Recordable> | Schema<'Cascader', Cascader> | Schema<'DatePicker', DatePicker> | Schema<'MonthPicker', DatePicker> | Schema<'RangePicker', RangePicker> | Schema<'WeekPicker', DatePicker> | Schema<'TimePicker', TimePicker> | Schema<'Switch', Switch> | Schema<'Slider', {
61
- disabled?: boolean;
62
- [key: string]: any;
63
- }> | Schema<'Rate', Rate> | Schema<'Divider', Divider> | Schema<'Upload', Upload>;
64
- export declare type ButtonProps = {
65
- t?: string;
66
- label: string;
67
- color?: 'error' | 'warning' | 'success' | '';
68
- type?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default' | undefined;
69
- class?: string;
70
- disabled?: boolean;
71
- show?: boolean | Ref<boolean> | ComputedRef<boolean>;
72
- preIcon?: string;
73
- postIcon?: string;
74
- auth?: string;
75
- flag?: ButtonFlag;
76
- loading?: Ref<boolean>;
77
- onClick?: (args?: any) => any;
78
- };
79
- export {};