@jiaozhiye/qm-design-react 1.0.0-beta.1

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 (222) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -0
  3. package/lib/_utils/cloneElement.d.ts +2 -0
  4. package/lib/_utils/dom.d.ts +68 -0
  5. package/lib/_utils/download.d.ts +7 -0
  6. package/lib/_utils/error.d.ts +2 -0
  7. package/lib/_utils/isServer.d.ts +2 -0
  8. package/lib/_utils/prefix.d.ts +1 -0
  9. package/lib/_utils/resize-event.d.ts +10 -0
  10. package/lib/_utils/scrollbar-width.d.ts +1 -0
  11. package/lib/_utils/types.d.ts +33 -0
  12. package/lib/_utils/util.d.ts +23 -0
  13. package/lib/_utils/validators.d.ts +2 -0
  14. package/lib/anchor/index.d.ts +4 -0
  15. package/lib/anchor/src/anchor-item.d.ts +13 -0
  16. package/lib/anchor/src/anchor-nav.d.ts +12 -0
  17. package/lib/anchor/src/anchor.d.ts +52 -0
  18. package/lib/anchor/style/index.less +60 -0
  19. package/lib/antd/Calendar.d.ts +4 -0
  20. package/lib/antd/DatePicker.d.ts +11 -0
  21. package/lib/antd/TimePicker.d.ts +14 -0
  22. package/lib/antd/index.d.ts +123 -0
  23. package/lib/antd/index.less +7 -0
  24. package/lib/button/index.d.ts +3 -0
  25. package/lib/button/src/button.d.ts +30 -0
  26. package/lib/button/style/index.less +12 -0
  27. package/lib/config-provider/context.d.ts +9 -0
  28. package/lib/config-provider/index.d.ts +3 -0
  29. package/lib/config-provider/src/config-provider.d.ts +34 -0
  30. package/lib/countup/index.d.ts +3 -0
  31. package/lib/countup/src/countup.d.ts +17 -0
  32. package/lib/countup/style/index.less +22 -0
  33. package/lib/cropper/index.d.ts +3 -0
  34. package/lib/cropper/src/cropper.d.ts +213 -0
  35. package/lib/cropper/style/index.less +13 -0
  36. package/lib/divider/index.d.ts +3 -0
  37. package/lib/divider/src/divider.d.ts +25 -0
  38. package/lib/divider/style/index.less +54 -0
  39. package/lib/download/index.d.ts +3 -0
  40. package/lib/download/src/download.d.ts +51 -0
  41. package/lib/download/style/index.less +12 -0
  42. package/lib/drawer/index.d.ts +3 -0
  43. package/lib/drawer/src/drawer.d.ts +33 -0
  44. package/lib/drawer/style/index.less +77 -0
  45. package/lib/empty/index.d.ts +3 -0
  46. package/lib/empty/src/empty.d.ts +15 -0
  47. package/lib/empty/style/index.less +35 -0
  48. package/lib/form/index.d.ts +4 -0
  49. package/lib/form/src/china-data.d.ts +4577 -0
  50. package/lib/form/src/context.d.ts +6 -0
  51. package/lib/form/src/fields-filter.d.ts +26 -0
  52. package/lib/form/src/form-cascader.d.ts +21 -0
  53. package/lib/form/src/form-checkbox-group.d.ts +18 -0
  54. package/lib/form/src/form-checkbox.d.ts +10 -0
  55. package/lib/form/src/form-city-select.d.ts +10 -0
  56. package/lib/form/src/form-date.d.ts +10 -0
  57. package/lib/form/src/form-divider.d.ts +10 -0
  58. package/lib/form/src/form-immediate.d.ts +10 -0
  59. package/lib/form/src/form-input-number.d.ts +10 -0
  60. package/lib/form/src/form-input.d.ts +10 -0
  61. package/lib/form/src/form-radio.d.ts +18 -0
  62. package/lib/form/src/form-range-date.d.ts +10 -0
  63. package/lib/form/src/form-range-input-number.d.ts +10 -0
  64. package/lib/form/src/form-range-input.d.ts +10 -0
  65. package/lib/form/src/form-range-time.d.ts +10 -0
  66. package/lib/form/src/form-region-select.d.ts +10 -0
  67. package/lib/form/src/form-search-helper.d.ts +10 -0
  68. package/lib/form/src/form-select.d.ts +21 -0
  69. package/lib/form/src/form-switch.d.ts +10 -0
  70. package/lib/form/src/form-text-area.d.ts +10 -0
  71. package/lib/form/src/form-time.d.ts +10 -0
  72. package/lib/form/src/form-tinymce.d.ts +10 -0
  73. package/lib/form/src/form-tree-select.d.ts +23 -0
  74. package/lib/form/src/form-upload-file.d.ts +18 -0
  75. package/lib/form/src/form-upload-img.d.ts +18 -0
  76. package/lib/form/src/form.d.ts +169 -0
  77. package/lib/form/src/types.d.ts +251 -0
  78. package/lib/form/src/utils.d.ts +7 -0
  79. package/lib/form/style/index.less +243 -0
  80. package/lib/hooks/useForceUpdate.d.ts +1 -0
  81. package/lib/hooks/useOutsideClick.d.ts +2 -0
  82. package/lib/hooks/useResizeObserve.d.ts +5 -0
  83. package/lib/hooks/useUpdateEffect.d.ts +2 -0
  84. package/lib/index.d.ts +42 -0
  85. package/lib/index.esm.js +16 -0
  86. package/lib/index.full.js +1 -0
  87. package/lib/index.js +16 -0
  88. package/lib/locale/index.d.ts +11 -0
  89. package/lib/locale/index.js +51 -0
  90. package/lib/locale/lang/en.d.ts +243 -0
  91. package/lib/locale/lang/en.js +248 -0
  92. package/lib/locale/lang/zh-cn.d.ts +243 -0
  93. package/lib/locale/lang/zh-cn.js +248 -0
  94. package/lib/modal/index.d.ts +3 -0
  95. package/lib/modal/src/modal.d.ts +38 -0
  96. package/lib/modal/style/index.less +89 -0
  97. package/lib/pinyin/core.d.ts +12 -0
  98. package/lib/pinyin/dict.d.ts +31 -0
  99. package/lib/pinyin/index.d.ts +2 -0
  100. package/lib/pinyin/patchers/56l.d.ts +7 -0
  101. package/lib/qm-design.d.ts +28 -0
  102. package/lib/search-helper/index.d.ts +3 -0
  103. package/lib/search-helper/src/search-helper.d.ts +20 -0
  104. package/lib/search-helper/style/index.less +13 -0
  105. package/lib/space/index.d.ts +3 -0
  106. package/lib/space/src/space.d.ts +12 -0
  107. package/lib/space/style/index.less +12 -0
  108. package/lib/spin/index.d.ts +3 -0
  109. package/lib/spin/src/spin.d.ts +11 -0
  110. package/lib/spin/style/index.less +12 -0
  111. package/lib/split/index.d.ts +4 -0
  112. package/lib/split/src/context.d.ts +8 -0
  113. package/lib/split/src/resize-bar.d.ts +8 -0
  114. package/lib/split/src/split-pane.d.ts +9 -0
  115. package/lib/split/src/split.d.ts +14 -0
  116. package/lib/split/style/index.less +86 -0
  117. package/lib/style/common.less +8 -0
  118. package/lib/style/index.css +1 -0
  119. package/lib/style/index.less +32 -0
  120. package/lib/style/mixins/box.less +13 -0
  121. package/lib/style/mixins/clearfix.less +21 -0
  122. package/lib/style/mixins/index.less +11 -0
  123. package/lib/style/mixins/operation-unit.less +24 -0
  124. package/lib/style/mixins/reset.less +35 -0
  125. package/lib/style/mixins/size.less +15 -0
  126. package/lib/style/reset.less +134 -0
  127. package/lib/style/themes/default.less +113 -0
  128. package/lib/style/themes/index.less +7 -0
  129. package/lib/table/index.d.ts +4 -0
  130. package/lib/table/src/alert/index.d.ts +6 -0
  131. package/lib/table/src/body/index.d.ts +8 -0
  132. package/lib/table/src/body/useValueFormat.d.ts +12 -0
  133. package/lib/table/src/column-filter/index.d.ts +7 -0
  134. package/lib/table/src/config/index.d.ts +47 -0
  135. package/lib/table/src/context/index.d.ts +74 -0
  136. package/lib/table/src/edit/InputNumber.d.ts +17 -0
  137. package/lib/table/src/edit/index.d.ts +12 -0
  138. package/lib/table/src/empty/index.d.ts +3 -0
  139. package/lib/table/src/expandable/index.d.ts +8 -0
  140. package/lib/table/src/export/define.d.ts +8 -0
  141. package/lib/table/src/export/index.d.ts +18 -0
  142. package/lib/table/src/export/setting.d.ts +8 -0
  143. package/lib/table/src/export/useExport.d.ts +9 -0
  144. package/lib/table/src/filter/index.d.ts +8 -0
  145. package/lib/table/src/filter-sql/index.d.ts +5 -0
  146. package/lib/table/src/filter-sql/lib/filter_string.d.ts +11 -0
  147. package/lib/table/src/filter-sql/lib/operations.d.ts +8 -0
  148. package/lib/table/src/filter-sql/lib/variables_replacement.d.ts +5 -0
  149. package/lib/table/src/footer/index.d.ts +8 -0
  150. package/lib/table/src/full-screen/index.d.ts +6 -0
  151. package/lib/table/src/group-summary/index.d.ts +3 -0
  152. package/lib/table/src/group-summary/result.d.ts +9 -0
  153. package/lib/table/src/group-summary/setting.d.ts +6 -0
  154. package/lib/table/src/header/index.d.ts +10 -0
  155. package/lib/table/src/hooks/useImperativeMethod.d.ts +36 -0
  156. package/lib/table/src/hooks/useTableCore.d.ts +86 -0
  157. package/lib/table/src/hooks/useTableEffect.d.ts +35 -0
  158. package/lib/table/src/hooks/useTableLayout.d.ts +39 -0
  159. package/lib/table/src/hooks/useTableMemo.d.ts +43 -0
  160. package/lib/table/src/hooks/useTableRef.d.ts +89 -0
  161. package/lib/table/src/hooks/useTableState.d.ts +94 -0
  162. package/lib/table/src/icon/caretdown.d.ts +3 -0
  163. package/lib/table/src/icon/caretup.d.ts +3 -0
  164. package/lib/table/src/icon/filter.d.ts +3 -0
  165. package/lib/table/src/manager/index.d.ts +15 -0
  166. package/lib/table/src/pager/index.d.ts +11 -0
  167. package/lib/table/src/print/index.d.ts +7 -0
  168. package/lib/table/src/reload/index.d.ts +3 -0
  169. package/lib/table/src/resizable/index.d.ts +7 -0
  170. package/lib/table/src/select-collection/index.d.ts +7 -0
  171. package/lib/table/src/select-collection/result.d.ts +8 -0
  172. package/lib/table/src/selection/all.d.ts +7 -0
  173. package/lib/table/src/selection/index.d.ts +12 -0
  174. package/lib/table/src/store/index.d.ts +29 -0
  175. package/lib/table/src/super-search/index.d.ts +3 -0
  176. package/lib/table/src/super-search/result.d.ts +6 -0
  177. package/lib/table/src/table/index.d.ts +5 -0
  178. package/lib/table/src/table/props.d.ts +243 -0
  179. package/lib/table/src/table/types.d.ts +335 -0
  180. package/lib/table/src/utils/index.d.ts +37 -0
  181. package/lib/table/style/alert.less +34 -0
  182. package/lib/table/style/body.less +42 -0
  183. package/lib/table/style/column-filter.less +88 -0
  184. package/lib/table/style/empty.less +16 -0
  185. package/lib/table/style/expandable.less +55 -0
  186. package/lib/table/style/export.less +30 -0
  187. package/lib/table/style/footer.less +28 -0
  188. package/lib/table/style/full-screen.less +21 -0
  189. package/lib/table/style/group-summary.less +93 -0
  190. package/lib/table/style/header.less +178 -0
  191. package/lib/table/style/index.less +25 -0
  192. package/lib/table/style/pager.less +12 -0
  193. package/lib/table/style/print.less +21 -0
  194. package/lib/table/style/reload.less +21 -0
  195. package/lib/table/style/select-collection.less +21 -0
  196. package/lib/table/style/size.less +69 -0
  197. package/lib/table/style/super-search.less +102 -0
  198. package/lib/table/style/table.less +328 -0
  199. package/lib/table/style/toper.less +28 -0
  200. package/lib/table/style/variable.less +48 -0
  201. package/lib/tabs/index.d.ts +4 -0
  202. package/lib/tabs/src/tab-pane.d.ts +8 -0
  203. package/lib/tabs/src/tabs.d.ts +16 -0
  204. package/lib/tabs/style/index.less +22 -0
  205. package/lib/tinymce/index.d.ts +3 -0
  206. package/lib/tinymce/src/Events.d.ts +78 -0
  207. package/lib/tinymce/src/ScriptLoader.d.ts +13 -0
  208. package/lib/tinymce/src/TinyMCE.d.ts +2 -0
  209. package/lib/tinymce/src/Utils.d.ts +19 -0
  210. package/lib/tinymce/src/components/Editor.d.ts +66 -0
  211. package/lib/tinymce/src/components/EditorPropTypes.d.ts +18 -0
  212. package/lib/tinymce/src/index.d.ts +29 -0
  213. package/lib/tinymce/style/index.less +18 -0
  214. package/lib/upload-file/index.d.ts +3 -0
  215. package/lib/upload-file/src/upload-file.d.ts +16 -0
  216. package/lib/upload-file/style/index.less +12 -0
  217. package/lib/upload-img/index.d.ts +3 -0
  218. package/lib/upload-img/src/cropper-preview.d.ts +30 -0
  219. package/lib/upload-img/src/upload-img.d.ts +27 -0
  220. package/lib/upload-img/style/index.less +36 -0
  221. package/lib/version/index.d.ts +2 -0
  222. package/package.json +136 -0
@@ -0,0 +1,251 @@
1
+ /// <reference types="react" />
2
+ import PropTypes from 'prop-types';
3
+ import type { BuildInPlacements } from 'rc-trigger';
4
+ import type { IFetch, IColumn, IRecord, IRowKey } from '../../table/src/table/types';
5
+ import type { Nullable, CSSProperties, ComponentSize, JSXElement, ValueOf, AjaxResponse, IDict } from '../../_utils/types';
6
+ export declare const DEFAULT_COL = 4;
7
+ export declare const DEFAULT_ROWS = 1;
8
+ export declare const DEFAULT_LABEL_WIDTH = 80;
9
+ export declare const DEFAULT_COL_WIDTH = 300;
10
+ export declare const DEFAULT_TRUE_VALUE = "1";
11
+ export declare const DEFAULT_FALSE_VALUE = "0";
12
+ export declare type ILabelAlign = 'left' | 'right';
13
+ export declare type IFormType = 'default' | 'search' | 'onlyShow';
14
+ export declare type IFormItemType = 'DIVIDER' | 'INPUT' | 'TEXT_AREA' | 'RANGE_INPUT' | 'INPUT_NUMBER' | 'RANGE_INPUT_NUMBER' | 'CHECKBOX' | 'MULTIPLE_CHECKBOX' | 'RADIO' | 'SWITCH' | 'DATE' | 'RANGE_DATE' | 'TIME' | 'RANGE_TIME' | 'SELECT' | 'MULTIPLE_SELECT' | 'IMMEDIATE' | 'SEARCH_HELPER' | 'TREE_SELECT' | 'MULTIPLE_TREE_SELECT' | 'CASCADER' | 'CITY_SELECT' | 'REGION_SELECT' | 'UPLOAD_FILE' | 'UPLOAD_IMG' | 'TINYMCE';
15
+ export declare const ARRAY_TYPE: IFormItemType[];
16
+ export declare const BUILT_IN_PLACEMENTS: BuildInPlacements;
17
+ export declare type IDateType = 'date' | 'datetime' | 'exactdate' | 'week' | 'month' | 'quarter' | 'year';
18
+ export declare enum EDateType {
19
+ 'date' = "date",
20
+ 'datetime' = "date",
21
+ 'exactdate' = "date",
22
+ 'week' = "week",
23
+ 'month' = "month",
24
+ 'quarter' = "quarter",
25
+ 'year' = "year"
26
+ }
27
+ export declare enum EDateFormat {
28
+ 'date' = "YYYY-MM-DD HH:mm:ss",
29
+ 'datetime' = "YYYY-MM-DD HH:mm:ss",
30
+ 'exactdate' = "YYYY-MM-DD",
31
+ 'week' = "YYYY-wo",
32
+ 'month' = "YYYY-MM",
33
+ 'quarter' = "YYYY-[Q]Q",
34
+ 'year' = "YYYY"
35
+ }
36
+ export declare enum ETimeType {
37
+ 'hour' = "hour",
38
+ 'hour-minute' = "hour-minute",
39
+ 'hour-minute-second' = "hour-minute-second"
40
+ }
41
+ export declare enum ETimeFormat {
42
+ 'hour' = "HH",
43
+ 'hour-minute' = "HH:mm",
44
+ 'hour-minute-second' = "HH:mm:ss"
45
+ }
46
+ export declare type IFormData = Record<string, string | number | any[] | undefined>;
47
+ export declare type IFetchHeader = Record<string, string>;
48
+ export declare type IFetchParams = Record<string, any>;
49
+ export declare type IFieldData = {
50
+ name: string[];
51
+ errors?: string[];
52
+ touched?: boolean;
53
+ validating?: boolean;
54
+ value?: ValueOf<IFormData>;
55
+ };
56
+ export declare type IExtraData = Record<string, string>;
57
+ export declare type IViewData = Record<string, string>;
58
+ export declare type IExpandData = Record<string, boolean>;
59
+ export declare type IFetchFn = (params?: Record<string, unknown>) => Promise<AjaxResponse>;
60
+ export declare type IAuthConfig = {
61
+ fetch: {
62
+ api: IFetchFn;
63
+ params?: IFetchParams;
64
+ columnDataKey?: string;
65
+ exportDataKey?: string;
66
+ printDataKey?: string;
67
+ };
68
+ };
69
+ export declare type IFormItem = {
70
+ type: IFormItemType;
71
+ fieldName: string;
72
+ label?: string | IFormItem;
73
+ tooltip?: string;
74
+ labelWidth?: number | string;
75
+ hidden?: boolean;
76
+ noAuth?: boolean;
77
+ invisible?: boolean;
78
+ rules?: Record<string, any>[];
79
+ selfCol?: number;
80
+ offsetLeft?: number;
81
+ offsetRight?: number;
82
+ style?: CSSProperties;
83
+ className?: string;
84
+ placeholder?: string;
85
+ bordered?: boolean;
86
+ disabled?: boolean;
87
+ allowClear?: boolean;
88
+ readOnly?: boolean;
89
+ options?: {
90
+ itemList?: IDict[];
91
+ prefix?: React.ReactNode;
92
+ suffix?: React.ReactNode;
93
+ maxLength?: number;
94
+ step?: number;
95
+ min?: number;
96
+ max?: number;
97
+ precision?: number;
98
+ formatter?: (value: number | string) => string;
99
+ parser?: (value: string) => string | number;
100
+ falseValue?: string | number;
101
+ trueValue?: string | number;
102
+ showCount?: boolean;
103
+ autoSize?: {
104
+ minRows?: number;
105
+ maxRows?: number;
106
+ };
107
+ dateType?: IDateType;
108
+ minDateTime?: string;
109
+ maxDateTime?: string;
110
+ disableds?: [boolean, boolean];
111
+ timeType?: ETimeType;
112
+ hourStep?: number;
113
+ minuteStep?: number;
114
+ secondStep?: number;
115
+ filterable?: boolean;
116
+ collapseTags?: boolean;
117
+ openPyt?: boolean;
118
+ onlySelect?: boolean;
119
+ columns?: IColumn[];
120
+ fieldAliasMap?: (() => Record<string, string>) | Record<string, string>;
121
+ extraAliasMap?: (() => Record<string, string>) | Record<string, string>;
122
+ multiple?: boolean;
123
+ maxCount?: number;
124
+ onRemove?: (file: any) => void;
125
+ fixedSize?: [number, number] | undefined;
126
+ quality?: number;
127
+ height?: number | string;
128
+ };
129
+ searchHelper?: {
130
+ filters?: IFormItem[];
131
+ table?: {
132
+ fetch?: IFetch;
133
+ columns?: IColumn[];
134
+ rowKey?: ((row: IRecord, index: number) => IRowKey) | IRowKey;
135
+ webPagination?: boolean;
136
+ };
137
+ initialValue?: IFormData;
138
+ closeRemoteMatch?: boolean;
139
+ fieldAliasMap?: (() => Record<string, string>) | Record<string, string>;
140
+ extraAliasMap?: (() => Record<string, string>) | Record<string, string>;
141
+ filterAliasMap?: (() => string[]) | string[];
142
+ beforeOpen?: (formData: IFormData) => void | Promise<void> | boolean;
143
+ closed?: (rowData: Record<string, any>) => void;
144
+ };
145
+ request?: {
146
+ fetchApi?: IFetchFn;
147
+ params?: IFetchParams;
148
+ dataKey?: string;
149
+ valueKey?: string;
150
+ textKey?: string;
151
+ };
152
+ upload?: {
153
+ action?: string;
154
+ headers?: IFetchHeader;
155
+ withCredentials?: boolean;
156
+ params?: IFetchParams;
157
+ dataKey?: string;
158
+ };
159
+ extra?: {
160
+ style?: CSSProperties;
161
+ labelWidth?: number | string;
162
+ isTooltip?: boolean;
163
+ };
164
+ collapse?: {
165
+ defaultExpand?: boolean;
166
+ showLimit?: number;
167
+ remarkItems?: Array<{
168
+ fieldName: string;
169
+ showLabel?: boolean;
170
+ }>;
171
+ };
172
+ render?: (options: IFormItem, instance: any) => JSXElement;
173
+ onChange?: (value: ValueOf<IFormData> | boolean, others?: string | Nullable<IFormData>) => void;
174
+ onBlur?: (value: ValueOf<IFormData>) => void;
175
+ onEnter?: (value: ValueOf<IFormData>) => void;
176
+ };
177
+ export declare type IFormProps = {
178
+ items: IFormItem[];
179
+ initialValues?: IFormData;
180
+ initialExtras?: IExtraData;
181
+ size?: ComponentSize;
182
+ cols?: number;
183
+ labelWidth?: number | string;
184
+ labelAlign?: ILabelAlign;
185
+ formType?: IFormType;
186
+ uniqueKey?: string;
187
+ defaultRows?: number;
188
+ authConfig?: IAuthConfig;
189
+ isAutoFocus?: boolean;
190
+ isCollapse?: boolean;
191
+ isFieldsDefine?: boolean;
192
+ isSearchBtn?: boolean;
193
+ isSubmitBtn?: boolean;
194
+ fieldsChange?: (items: IFormItem[]) => void;
195
+ onValuesChange?: (changedValues: IFormData, initialValues: IFormData) => void;
196
+ onFieldsChange?: (changedFields: IFieldData[], allFields: IFieldData[]) => void;
197
+ onFinish?: (values: IFormData) => void;
198
+ onFinishFailed?: (errorFields: any) => void;
199
+ onCollapse?: (collapse: boolean) => void;
200
+ };
201
+ export declare const propTypes: {
202
+ items: PropTypes.Requireable<(PropTypes.InferProps<{
203
+ type: PropTypes.Validator<string>;
204
+ fieldName: PropTypes.Validator<string>;
205
+ }> | null | undefined)[]>;
206
+ initialValues: PropTypes.Requireable<object>;
207
+ initialExtras: PropTypes.Requireable<object>;
208
+ size: (props: any, propName: any, componentName: any) => void;
209
+ cols: PropTypes.Requireable<number>;
210
+ labelWidth: PropTypes.Requireable<string | number>;
211
+ labelAlign: PropTypes.Requireable<string>;
212
+ formType: PropTypes.Requireable<string>;
213
+ uniqueKey: PropTypes.Requireable<string>;
214
+ defaultRows: PropTypes.Requireable<number>;
215
+ authConfig: PropTypes.Requireable<PropTypes.InferProps<{
216
+ fetch: PropTypes.Requireable<PropTypes.InferProps<{
217
+ api: PropTypes.Validator<(...args: any[]) => any>;
218
+ params: PropTypes.Requireable<object>;
219
+ dataKey: PropTypes.Requireable<string>;
220
+ }>>;
221
+ }>>;
222
+ isAutoFocus: PropTypes.Requireable<boolean>;
223
+ isCollapse: PropTypes.Requireable<boolean>;
224
+ isFieldsDefine: PropTypes.Requireable<boolean>;
225
+ isSearchBtn: PropTypes.Requireable<boolean>;
226
+ isSubmitBtn: PropTypes.Requireable<boolean>;
227
+ fieldsChange: PropTypes.Requireable<(...args: any[]) => any>;
228
+ onValuesChange: PropTypes.Requireable<(...args: any[]) => any>;
229
+ onFieldsChange: PropTypes.Requireable<(...args: any[]) => any>;
230
+ onFinish: PropTypes.Requireable<(...args: any[]) => any>;
231
+ onFinishFailed: PropTypes.Requireable<(...args: any[]) => any>;
232
+ onCollapse: PropTypes.Requireable<(...args: any[]) => any>;
233
+ };
234
+ export declare const defaultProps: {
235
+ labelWidth: number;
236
+ labelAlign: string;
237
+ formType: string;
238
+ initialValues: {};
239
+ initialExtras: {};
240
+ defaultRows: number;
241
+ isAutoFocus: boolean;
242
+ isCollapse: boolean;
243
+ isFieldsDefine: boolean;
244
+ isSearchBtn: boolean;
245
+ onValuesChange: () => void;
246
+ onFieldsChange: () => void;
247
+ onFinish: () => void;
248
+ onFinishFailed: () => void;
249
+ onCollapse: () => void;
250
+ onFormItemsChange: () => void;
251
+ };
@@ -0,0 +1,7 @@
1
+ import dayjs, { Dayjs } from 'dayjs';
2
+ export declare const getDate: (dateString: string | undefined, format: string) => dayjs.Dayjs | null;
3
+ export declare const formatDate: (date: Dayjs | null, format: string) => string;
4
+ export declare const deepMapList: (list: any[], valueKey: string, textKey: string) => any[];
5
+ export declare const deepFind: (arr: any[], mark: string) => any;
6
+ export declare const deepFindValues: <T>(arr: T[], str: string, depth?: number) => T[];
7
+ export declare const deepGetPath: (arr: any[], value: string) => string[] | undefined;
@@ -0,0 +1,243 @@
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2021-07-23 19:05:57
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-01-10 10:05:49
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-form: ~'@{qm-prefix}-form';
10
+
11
+ .@{prefix-form} {
12
+ .ant-form-item {
13
+ margin-bottom: 12px;
14
+ &.ant-form-item-with-help {
15
+ margin-bottom: 0;
16
+ }
17
+ // label
18
+ .ant-form-item-label {
19
+ label[title=''] {
20
+ width: 100%;
21
+ }
22
+ }
23
+ // valigator
24
+ .ant-form-item-explain {
25
+ .text-overflow-cut();
26
+ display: flex;
27
+ gap: @--margin-md;
28
+ min-height: auto;
29
+ height: @--font-size-sm;
30
+ font-size: @--font-size-sm;
31
+ line-height: 1;
32
+ }
33
+ // textarea
34
+ .ant-input-textarea-show-count {
35
+ position: relative;
36
+ &::after {
37
+ position: absolute;
38
+ right: 3px;
39
+ bottom: 0;
40
+ margin: 0;
41
+ }
42
+ }
43
+ // input extra
44
+ .extra-tooltip {
45
+ color: @--text-color-secondary-dark;
46
+ vertical-align: -0.4em;
47
+ transform: scale(1.2);
48
+ }
49
+ .extra-text {
50
+ vertical-align: -0.3em;
51
+ }
52
+ .extra-overflow-cut {
53
+ .text-overflow-cut();
54
+ }
55
+ // range input
56
+ .site-input-split {
57
+ // background-color: @--body-background;
58
+ }
59
+ .site-input-left {
60
+ border-right-width: 0;
61
+ z-index: 1;
62
+ }
63
+ .site-input-left:hover,
64
+ .site-input-left:focus {
65
+ border-right-width: 1px;
66
+ }
67
+ .site-input-right {
68
+ border-left-width: 0;
69
+ }
70
+ .site-input-right:hover,
71
+ .site-input-right:focus {
72
+ border-left-width: 1px;
73
+ }
74
+ }
75
+ // ------ size ------
76
+ // 40 32 24
77
+ &--lg {
78
+ }
79
+ &--sm {
80
+ }
81
+ }
82
+
83
+ .ant-picker-footer-extra {
84
+ .ant-tag {
85
+ cursor: pointer;
86
+ }
87
+ }
88
+
89
+ // immediate
90
+ .@{prefix-form}-immediate {
91
+ padding: 5px 15px;
92
+ .table {
93
+ width: 100%;
94
+ th,
95
+ td {
96
+ height: 32px;
97
+ text-align: left;
98
+ border-bottom: 1px solid @--border-color-secondary;
99
+ }
100
+ tbody {
101
+ tr td {
102
+ cursor: pointer;
103
+ }
104
+ tr:hover,
105
+ tr.active {
106
+ background-color: @--primary-1;
107
+ }
108
+ }
109
+ }
110
+ // 40 32 24
111
+ &--lg {
112
+ .table {
113
+ th,
114
+ td {
115
+ height: 40px;
116
+ }
117
+ }
118
+ }
119
+ &--sm {
120
+ .table {
121
+ th,
122
+ td {
123
+ height: 24px;
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ // city-select
130
+ .@{prefix-form}-city-select {
131
+ padding: 15px 15px 10px;
132
+ max-width: 420px;
133
+ .container {
134
+ .city-drop {
135
+ &-toper {
136
+ margin-bottom: 10px;
137
+ display: flex;
138
+ &__type {
139
+ display: inline-block;
140
+ }
141
+ &__search {
142
+ margin-left: 10px;
143
+ }
144
+ }
145
+ &-letter {
146
+ display: flex;
147
+ flex-wrap: wrap;
148
+ margin-bottom: 4px;
149
+ .tag {
150
+ list-style: none;
151
+ line-height: 1.75;
152
+ font-size: @--font-size-sm;
153
+ padding: 0 8px;
154
+ margin: 0 4px 4px 0;
155
+ border: 1px solid @--border-color-secondary;
156
+ border-radius: @--border-radius-base;
157
+ cursor: pointer;
158
+ &.actived {
159
+ color: @--white;
160
+ background-color: @--primary-color;
161
+ border-color: @--primary-color;
162
+ }
163
+ }
164
+ }
165
+ &-list {
166
+ margin-right: -2px;
167
+ max-height: 350px;
168
+ overflow-y: auto;
169
+ dl {
170
+ margin: 0;
171
+ dt {
172
+ float: left;
173
+ font-size: 13px;
174
+ font-weight: 700;
175
+ line-height: 20px;
176
+ }
177
+ dd {
178
+ white-space: normal;
179
+ margin-inline-start: 50px;
180
+ margin-bottom: 8px;
181
+ line-height: 20px;
182
+ li {
183
+ display: inline-block;
184
+ margin-right: 8px;
185
+ font-size: 13px;
186
+ cursor: pointer;
187
+ &:hover {
188
+ color: @--primary-color;
189
+ }
190
+ &.actived {
191
+ color: @--primary-color;
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+
201
+ // region-select
202
+ .@{prefix-form}-region-select {
203
+ padding: 10px 15px;
204
+ .container {
205
+ margin-top: -10px;
206
+ .region-box {
207
+ display: flex;
208
+ flex-wrap: wrap;
209
+ width: 440px;
210
+ line-height: @--line-height-base;
211
+ &__item {
212
+ margin: 0 5px;
213
+ width: 100px;
214
+ cursor: pointer;
215
+ .text-overflow-cut();
216
+ &:hover {
217
+ color: @--primary-color;
218
+ }
219
+ &.actived {
220
+ color: @--primary-color;
221
+ }
222
+ }
223
+ }
224
+ }
225
+ }
226
+
227
+ // fields-filter
228
+ .@{prefix-form}-fields-filter {
229
+ .fields-list {
230
+ padding: 4px @--padding-md;
231
+ ul {
232
+ margin: 0;
233
+ li.item {
234
+ line-height: 1.75;
235
+ .text-overflow-cut();
236
+ .handle {
237
+ margin: 0 5px;
238
+ cursor: s-resize;
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
@@ -0,0 +1 @@
1
+ export default function useForceUpdate(): () => void;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export default function useOutsideClick(ref: React.RefObject<HTMLElement>, omitClassNames?: string[]): boolean;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export default function useResizeObserve(ref: React.RefObject<HTMLElement>): {
3
+ width: number;
4
+ height: number;
5
+ };
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export default function useUpdateEffect(effect: React.EffectCallback, deps?: React.DependencyList): void;
package/lib/index.d.ts ADDED
@@ -0,0 +1,42 @@
1
+ export type { QmConfigProviderProps } from './config-provider';
2
+ export { default as QmConfigProvider } from './config-provider';
3
+ export type { QmButtonProps } from './button';
4
+ export { default as QmButton } from './button';
5
+ export type { QmSpaceProps } from './space';
6
+ export { default as QmSpace } from './space';
7
+ export type { QmDividerProps } from './divider';
8
+ export { default as QmDivider } from './divider';
9
+ export type { QmSplitProps, QmSplitPaneProps } from './split';
10
+ export { default as QmSplit } from './split';
11
+ export type { QmCountupProps } from './countup';
12
+ export { default as QmCountup } from './countup';
13
+ export type { QmEmptyProps } from './empty';
14
+ export { default as QmEmpty } from './empty';
15
+ export type { QmSpinProps } from './spin';
16
+ export { default as QmSpin } from './spin';
17
+ export type { QmDownloadProps } from './download';
18
+ export { default as QmDownload } from './download';
19
+ export type { QmAnchorProps, QmAnchorItemProps } from './anchor';
20
+ export { default as QmAnchor } from './anchor';
21
+ export type { QmTabsProps, QmTabPaneProps } from './tabs';
22
+ export { default as QmTabs } from './tabs';
23
+ export type { QmDrawerProps } from './drawer';
24
+ export { default as QmDrawer } from './drawer';
25
+ export type { QmModalProps } from './modal';
26
+ export { default as QmModal } from './modal';
27
+ export type { QmFormProps, QmFormItem, QmFormItemType } from './form';
28
+ export { default as QmForm } from './form';
29
+ export type { QmTinymceProps } from './tinymce';
30
+ export { default as QmTinymce } from './tinymce';
31
+ export type { QmCropperProps } from './cropper';
32
+ export { default as QmCropper } from './cropper';
33
+ export type { QmUploadFileProps } from './upload-file';
34
+ export { default as QmUploadFile } from './upload-file';
35
+ export type { QmUploadImgProps } from './upload-img';
36
+ export { default as QmUploadImg } from './upload-img';
37
+ export type { QmTableProps, QmTableColumn } from './table';
38
+ export { default as QmTable } from './table';
39
+ export type { QmSearchHelperProps } from './search-helper';
40
+ export { default as QmSearchHelper } from './search-helper';
41
+ export { default as version } from './version';
42
+ export * from './antd';