@flatbiz/antd 4.4.2 → 4.4.4

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 (66) hide show
  1. package/esm/ace-editor-groovy/index.css +0 -0
  2. package/esm/ace-editor-groovy/index.js +7 -0
  3. package/esm/ace-editor-groovy/index.js.map +1 -0
  4. package/esm/ace-editor-java/index.css +0 -0
  5. package/esm/ace-editor-java/index.js +7 -0
  6. package/esm/ace-editor-java/index.js.map +1 -0
  7. package/esm/ace-editor-json/index.css +0 -0
  8. package/esm/ace-editor-json/index.js +12 -0
  9. package/esm/ace-editor-json/index.js.map +1 -0
  10. package/esm/ace-editor-mysql/index.css +0 -0
  11. package/esm/ace-editor-mysql/index.js +12 -0
  12. package/esm/ace-editor-mysql/index.js.map +1 -0
  13. package/esm/ace-editor-xml/index.css +0 -0
  14. package/esm/ace-editor-xml/index.js +12 -0
  15. package/esm/ace-editor-xml/index.js.map +1 -0
  16. package/esm/card-layout/index.css +1 -1
  17. package/esm/color-picker-wrapper/index.js +1 -1
  18. package/esm/color-picker-wrapper/index.js.map +1 -1
  19. package/esm/date-range-picker-wrapper-form-item/index.js +1 -1
  20. package/esm/drag-editable-table/index.js +1 -1
  21. package/esm/drag-form-list/index.js +1 -1
  22. package/esm/drag-table/index.js +1 -1
  23. package/esm/drag-table/index.js.map +1 -1
  24. package/esm/editable-field/index.js +1 -1
  25. package/esm/editable-field/index.js.map +1 -1
  26. package/esm/editable-field-provider/index.js +1 -1
  27. package/esm/editable-table/index.css +1 -1
  28. package/esm/editable-table/index.js +1 -1
  29. package/esm/editable-table/index.js.map +1 -1
  30. package/esm/ext-language_tools-0c27f877.js +3 -0
  31. package/esm/ext-language_tools-0c27f877.js.map +1 -0
  32. package/esm/fba-app/index.js +1 -1
  33. package/esm/fba-app/index.js.map +1 -1
  34. package/esm/fba-hooks/index.js +1 -1
  35. package/esm/form-item-text/index.js +1 -1
  36. package/esm/icon-wrapper/index.css +1 -1
  37. package/esm/icon-wrapper/index.js +1 -1
  38. package/esm/icon-wrapper/index.js.map +1 -1
  39. package/esm/index.js +14 -8
  40. package/esm/input-search-wrapper/index.js +1 -1
  41. package/esm/json-editor/index.js +1 -1
  42. package/esm/json-editor/index.js.map +1 -1
  43. package/esm/mentions-wrapper/index.css +0 -0
  44. package/esm/mentions-wrapper/index.js +5 -0
  45. package/esm/mentions-wrapper/index.js.map +1 -0
  46. package/esm/mode-json-062fdb24.js +3 -0
  47. package/esm/mode-json-062fdb24.js.map +1 -0
  48. package/esm/rich-text-viewer/index.js +1 -1
  49. package/esm/rich-text-viewer/index.js.map +1 -1
  50. package/esm/search-form/index.js +1 -1
  51. package/esm/search-menu/index.css +1 -1
  52. package/esm/search-menu/index.js +1 -1
  53. package/esm/search-menu/index.js.map +1 -1
  54. package/esm/selector-wrapper/index.js +1 -1
  55. package/esm/selector-wrapper-search/index.js +1 -1
  56. package/esm/selector-wrapper-simple/index.js +1 -1
  57. package/esm/switch-confirm-wrapper/index.js +1 -1
  58. package/esm/table-cell-render/index.js +1 -1
  59. package/esm/table-scrollbar/index.js +1 -1
  60. package/esm/tag-wrapper/index.js +1 -1
  61. package/esm/text-symbol-wrapper/index.css +1 -1
  62. package/esm/text-symbol-wrapper/index.js +1 -1
  63. package/esm/text-symbol-wrapper/index.js.map +1 -1
  64. package/esm/upload-wrapper/index.js +1 -1
  65. package/index.d.ts +213 -4
  66. package/package.json +8 -3
package/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  import { API, ModelType } from '@dimjs/model';
6
6
  import { DateFormatType, TAny, TNoopDefine, TPlainObject } from '@flatbiz/utils';
7
7
  import { IAllProps } from '@tinymce/tinymce-react';
8
- import { AlertProps, ButtonProps, CardProps, CascaderProps, CheckboxProps, CollapseProps, ColorPickerProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, InputNumberProps, InputProps, ModalProps, PaginationProps, PopconfirmProps, PopoverProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TabsProps, TagProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
8
+ import { AlertProps, ButtonProps, CardProps, CascaderProps, CheckboxProps, CollapseProps, ColorPickerProps, DrawerProps, DropdownProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, InputNumberProps, InputProps, MentionProps, ModalProps, PaginationProps, PopconfirmProps, PopoverProps, RadioGroupProps, RowProps, SelectProps, SpaceProps, SwitchProps, TableProps, TabsProps, TagProps, TimePickerProps, TimeRangePickerProps, TooltipProps, TreeProps, TreeSelectProps, UploadProps } from 'antd';
9
9
  import { ConfigProviderProps } from 'antd/es/config-provider';
10
10
  import { PickerDateProps, RangePickerDateProps } from 'antd/es/date-picker/generatePicker';
11
11
  import { FormListProps } from 'antd/es/form';
@@ -21,6 +21,162 @@ import { IAceEditorProps } from 'react-ace';
21
21
  import { SplitProps } from 'react-split';
22
22
  import { Editor as TinyMCEEditor } from 'tinymce';
23
23
 
24
+ export type AceEditorGroovyProps = Omit<IAceEditorProps, "onLoad" | "mode" | "value" | "onChange" | "theme"> & {
25
+ /** 编辑器高度,默认值:100%,可输入值例如 300px、100% */
26
+ height?: string;
27
+ value?: string | TPlainObject | TPlainObject[];
28
+ onChange?: (value?: string | TPlainObject | TPlainObject[]) => void;
29
+ /** 配置输入自动提示关键字 */
30
+ autoCompleterList?: {
31
+ name: string;
32
+ desc?: string;
33
+ }[];
34
+ /**
35
+ * 编辑器主题配置,例如:github、terminal、xcode
36
+ * ```
37
+ * 1. 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
38
+ * 2. 配置 theme = xxxx
39
+ * ```
40
+ */
41
+ theme?: string;
42
+ };
43
+ /**
44
+ * groovy编辑器
45
+ * ```
46
+ * 1. 受控组件,需要使用value、onChange配合显示数据
47
+ * 2. heigth 默认为100%,如果外层无高度,需要自定义设置height属性
48
+ * 3. 通过 autoCompleterList 配置自动提示关键字
49
+ * 4. 通过 hiddenVerifyBtn、hiddenFormatterBtn可隐藏底部操作按钮
50
+ * 5. 通过 theme 配置编辑器主题,例如:
51
+ * 5.1 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
52
+ * 5.2 配置 theme = xxxx
53
+ * ```
54
+ */
55
+ export declare const AceEditorGroovy: (props: AceEditorGroovyProps) => import("react/jsx-runtime").JSX.Element;
56
+ export type AceEditorJavaProps = Omit<IAceEditorProps, "onLoad" | "mode" | "value" | "onChange" | "theme"> & {
57
+ /** 编辑器高度,默认值:100%,可输入值例如 300px、100% */
58
+ height?: string;
59
+ value?: string | TPlainObject | TPlainObject[];
60
+ onChange?: (value?: string | TPlainObject | TPlainObject[]) => void;
61
+ /** 配置输入自动提示关键字 */
62
+ autoCompleterList?: {
63
+ name: string;
64
+ desc?: string;
65
+ }[];
66
+ /**
67
+ * 编辑器主题配置,例如:github、terminal、xcode
68
+ * ```
69
+ * 1. 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
70
+ * 2. 配置 theme = xxxx
71
+ * ```
72
+ */
73
+ theme?: string;
74
+ };
75
+ /**
76
+ * java编辑器
77
+ * ```
78
+ * 1. 受控组件,需要使用value、onChange配合显示数据
79
+ * 2. heigth 默认为100%,如果外层无高度,需要自定义设置height属性
80
+ * 3. 通过 autoCompleterList 配置自动提示关键字
81
+ * 4. 通过 hiddenVerifyBtn、hiddenFormatterBtn可隐藏底部操作按钮
82
+ * 5. 通过 theme 配置编辑器主题,例如:
83
+ * 5.1 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
84
+ * 5.2 配置 theme = xxxx
85
+ * ```
86
+ */
87
+ export declare const AceEditorJava: (props: AceEditorJavaProps) => import("react/jsx-runtime").JSX.Element;
88
+ export type AceEditorJsonProps = Omit<IAceEditorProps, "onLoad" | "mode" | "value" | "onChange" | "theme"> & {
89
+ /** 编辑器高度,默认值:100%,可输入值例如 300px、100% */
90
+ height?: string;
91
+ value?: string | TPlainObject | TPlainObject[];
92
+ onChange?: (value?: string | TPlainObject | TPlainObject[]) => void;
93
+ /** 配置输入自动提示关键字 */
94
+ autoCompleterList?: {
95
+ name: string;
96
+ desc?: string;
97
+ }[];
98
+ /** 是否隐藏【验证数据】按钮 */
99
+ hiddenVerifyBtn?: boolean;
100
+ /**
101
+ * 编辑器主题配置,例如:github、terminal、xcode
102
+ * ```
103
+ * 1. 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
104
+ * 2. 配置 theme = xxxx
105
+ * ```
106
+ */
107
+ theme?: string;
108
+ };
109
+ /**
110
+ * Json编辑器
111
+ * ```
112
+ * 1. 受控组件,需要使用value、onChange配合显示数据
113
+ * 2. heigth 默认为100%,如果外层无高度,需要自定义设置height属性
114
+ * 3. 通过 autoCompleterList 配置自动提示关键字
115
+ * 4. 通过 hiddenVerifyBtn 配置隐藏底部操作按钮
116
+ * 5. 通过 theme 配置编辑器主题,例如:
117
+ * 5.1 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
118
+ * 5.2 配置 theme = xxxx
119
+ * ```
120
+ */
121
+ export declare const AceEditorJson: (props: AceEditorJsonProps) => import("react/jsx-runtime").JSX.Element;
122
+ export type AceEditorMysqlProps = Omit<IAceEditorProps, "onLoad" | "theme" | "mode" | "value" | "onChange"> & {
123
+ /** 编辑器高度,默认值:100%,可输入值例如 300px、100% */
124
+ height?: string;
125
+ value?: string;
126
+ onChange?: (value?: string) => void;
127
+ /** 配置输入自动提示关键字 */
128
+ autoCompleterList?: {
129
+ name: string;
130
+ desc?: string;
131
+ }[];
132
+ /** 隐藏【美化】按钮 */
133
+ hiddenFormatterBtn?: boolean;
134
+ /**
135
+ * 编辑器主题配置,例如:github、terminal、xcode
136
+ * ```
137
+ * 1. 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
138
+ * 2. 配置 theme = xxxx
139
+ * ```
140
+ */
141
+ theme?: string;
142
+ };
143
+ export declare const AceEditorMysql: (props: AceEditorMysqlProps) => import("react/jsx-runtime").JSX.Element;
144
+ export type AceEditorXmlProps = Omit<IAceEditorProps, "onLoad" | "mode" | "value" | "onChange" | "theme"> & {
145
+ /** 编辑器高度,默认值:100%,可输入值例如 300px、100% */
146
+ height?: string;
147
+ value?: string | TPlainObject | TPlainObject[];
148
+ onChange?: (value?: string | TPlainObject | TPlainObject[]) => void;
149
+ /** 配置输入自动提示关键字 */
150
+ autoCompleterList?: {
151
+ name: string;
152
+ desc?: string;
153
+ }[];
154
+ /** 隐藏【验证数据】按钮 */
155
+ hiddenVerifyBtn?: boolean;
156
+ /** 隐藏【美化】按钮 */
157
+ hiddenFormatterBtn?: boolean;
158
+ /**
159
+ * 编辑器主题配置,例如:github、terminal、xcode
160
+ * ```
161
+ * 1. 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
162
+ * 2. 配置 theme = xxxx
163
+ * ```
164
+ */
165
+ theme?: string;
166
+ };
167
+ /**
168
+ * xml编辑器
169
+ * ```
170
+ * 1. 受控组件,需要使用value、onChange配合显示数据
171
+ * 2. heigth 默认为100%,如果外层无高度,需要自定义设置height属性
172
+ * 3. 通过 autoCompleterList 配置自动提示关键字
173
+ * 4. 通过 hiddenVerifyBtn、hiddenFormatterBtn可隐藏底部操作按钮
174
+ * 5. 通过 theme 配置编辑器主题,例如:
175
+ * 5.1 顶部引入 import 'ace-builds/src-noconflict/theme-xxxx';
176
+ * 5.2 配置 theme = xxxx
177
+ * ```
178
+ */
179
+ export declare const AceEditorXml: (props: AceEditorXmlProps) => import("react/jsx-runtime").JSX.Element;
24
180
  export type AlertWrapperProps = AlertProps & {
25
181
  size?: "small" | "default" | "large";
26
182
  };
@@ -1353,6 +1509,8 @@ export type EditableTableProps = {
1353
1509
  hiddenFooterBtn?: boolean;
1354
1510
  /** 新增行默认值,自定义onTableAfterRender后失效 */
1355
1511
  getAddRowDefaultValues?: () => TPlainObject;
1512
+ /** 空效果显示尺寸,默认值:small */
1513
+ emptyShowSize?: "small" | "large";
1356
1514
  };
1357
1515
  export type EditableTableRefApi = {
1358
1516
  /** 可用于表格行选择操作时,获取操作列数据 */
@@ -2512,6 +2670,10 @@ export type IconWrapperProps = {
2512
2670
  onClick?: (event: any) => void;
2513
2671
  hideHoverBgColor?: boolean;
2514
2672
  hidden?: boolean;
2673
+ /** 图标对比文字的位置,默认:brefore */
2674
+ position?: "before" | "after";
2675
+ /** 图标与文字之间的间距 */
2676
+ gap?: number;
2515
2677
  };
2516
2678
  export declare const IconWrapper: (props: IconWrapperProps) => import("react/jsx-runtime").JSX.Element | null;
2517
2679
  export type InputSearchWrapperProps = Omit<SearchProps, "defaultValue">;
@@ -2580,6 +2742,7 @@ export type JsonEditorProps = Omit<IAceEditorProps, "onLoad" | "mode" | "value"
2580
2742
  };
2581
2743
  /**
2582
2744
  * Json编辑器
2745
+ * @deprecated 已过期,请使用 AceEditorJson 组件
2583
2746
  * ```
2584
2747
  * 1. 受控组件,需要使用value、onChange配合显示数据
2585
2748
  * 2. heigth 默认为100%,如果外层无高度,需要自定义设置height属性
@@ -2657,6 +2820,47 @@ export declare const LocalLoading: import("react").ForwardRefExoticComponent<Loc
2657
2820
  onRequest: (params?: TPlainObject) => void;
2658
2821
  };
2659
2822
  };
2823
+ export type MentionsWrapperProps = Omit<MentionProps, "value" | "onChange" | "onClick" | "onCursorChange" | "options" | "id" | "split" | "validateSearch" | "ref" | "prefix"> & {
2824
+ value?: string;
2825
+ onChange?: (value?: string) => void;
2826
+ /** 设置列表提示关键字,例如:@、$等 */
2827
+ prefix?: string | string[];
2828
+ onClick?: (value?: string) => void;
2829
+ /** 光标移动回调 */
2830
+ onCursorChange?: (position: number) => void;
2831
+ /**
2832
+ * 输入框内整体关键词列表
2833
+ * ```
2834
+ * 整体关键词交互
2835
+ * 1. 光标可整体移动
2836
+ * 2. 光标不会存在关键词内部
2837
+ * 3. 删除时,整体删除
2838
+ * ```
2839
+ */
2840
+ options?: string[];
2841
+ };
2842
+ /**
2843
+ * 基于Antd Mentions进行二次封装,可实现输入内关键字整体控制,包括光标移动、关键词删除等
2844
+ * ```
2845
+ * 可实现
2846
+ * 1. 控制光标输入
2847
+ * 2. 可设置关键词,光标不会出现在关键词内部
2848
+ * 3. 可整体删除关键词
2849
+ *
2850
+ * 应用场景例如:
2851
+ * 1. 公式输入
2852
+ * (【xx金额1】+【xx金额2】)*2
2853
+ * <MentionsWrapper prefix="$" options={['【xx金额1】', '【xx金额2】']}/>
2854
+ *
2855
+ * 2. 短信模板设置
2856
+ * 您的订单号为${订单号},订单交易时间为${订单时间}
2857
+ * <MentionsWrapper prefix="$" options={['${订单号}', '${订单时间}']}/>
2858
+ *
2859
+ * demo:https://fex.qa.tcshuke.com/docs/admin/main/other/widget
2860
+ * ```
2861
+ *
2862
+ */
2863
+ export declare const MentionsWrapper: (props: MentionsWrapperProps) => import("react/jsx-runtime").JSX.Element;
2660
2864
  export type onClick = (e?: React.MouseEvent<HTMLElement>) => void;
2661
2865
  export interface ModalActionProps {
2662
2866
  children: ReactElement | ((data: {
@@ -3079,6 +3283,7 @@ export type SearchFormRefApi = {
3079
3283
  */
3080
3284
  export declare const SearchForm: import("react").ForwardRefExoticComponent<SearchFormProps & import("react").RefAttributes<SearchFormRefApi>>;
3081
3285
  export interface ISearchMenuProps {
3286
+ size?: "small" | "default";
3082
3287
  /**
3083
3288
  * 如果传了value,就变成受控组件
3084
3289
  * 目前只支持单选
@@ -3798,18 +4003,22 @@ export type TextOverflowRenderProps = {
3798
4003
  */
3799
4004
  export declare const TextOverflowRender: (props: TextOverflowRenderProps) => import("react/jsx-runtime").JSX.Element;
3800
4005
  export type TextSymbolWrapperProps = {
4006
+ className?: string;
4007
+ style?: CSSProperties;
4008
+ /** 内置图标类型 */
3801
4009
  symbolType?: "required";
3802
4010
  /** 自定义标记符号,优先级大于 symbolType */
3803
- symbol?: string;
4011
+ symbol?: ReactNode;
3804
4012
  /** 标记位置,默认:brefore */
3805
4013
  position?: "before" | "after";
4014
+ /** 显示文本 */
3806
4015
  text?: string | ReactElement;
3807
4016
  symbolStyle?: CSSProperties;
3808
4017
  onSymbolClick?: (event: any) => void;
3809
- className?: string;
3810
- style?: CSSProperties;
3811
4018
  /** 只隐藏符号,不隐藏文案 */
3812
4019
  hiddenSymbol?: boolean;
4020
+ /** 图标与文字之间的间距 */
4021
+ gap?: number;
3813
4022
  };
3814
4023
  /**
3815
4024
  * 为文字添加符号,例如:必填符号
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatbiz/antd",
3
- "version": "4.4.2",
3
+ "version": "4.4.4",
4
4
  "description": "flat-biz ui components",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -53,7 +53,10 @@
53
53
  "react": "18.2.0",
54
54
  "react-dom": "18.2.0",
55
55
  "ahooks": "^3.7.5",
56
- "react-is": "^18.2.0"
56
+ "react-is": "^18.2.0",
57
+ "react-ace": "^10.1.0",
58
+ "sql-formatter": "^15.0.2",
59
+ "xml-formatter": "^3.6.2"
57
60
  },
58
61
  "dependencies": {
59
62
  "dequal": "2.0.3",
@@ -66,7 +69,9 @@
66
69
  "use-intl": "3.0.0-rc.6",
67
70
  "react-split": "2.0.14",
68
71
  "react-is": "^18.2.0",
69
- "react-ace": "^10.1.0"
72
+ "react-ace": "^10.1.0",
73
+ "sql-formatter": "^15.0.2",
74
+ "xml-formatter": "^3.6.2"
70
75
  },
71
76
  "gitHead": "4378d433b73ee28fd7cb4c64bed8571f993eb5a9"
72
77
  }