amis 1.9.0 → 1.9.1-beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. package/lib/RootRenderer.js +10 -2
  2. package/lib/RootRenderer.js.map +2 -2
  3. package/lib/Schema.d.ts +3 -2
  4. package/lib/Schema.js.map +1 -1
  5. package/lib/actions/Action.d.ts +1 -0
  6. package/lib/actions/Action.js +7 -6
  7. package/lib/actions/Action.js.map +2 -2
  8. package/lib/components/Button.d.ts +11 -10
  9. package/lib/components/Button.js +2 -2
  10. package/lib/components/Button.js.map +2 -2
  11. package/lib/components/CalendarMobile.d.ts +40 -40
  12. package/lib/components/Checkbox.js +1 -1
  13. package/lib/components/Checkbox.js.map +2 -2
  14. package/lib/components/ContextMenu.d.ts +4 -0
  15. package/lib/components/ContextMenu.js +23 -7
  16. package/lib/components/ContextMenu.js.map +2 -2
  17. package/lib/components/DatePicker.d.ts +40 -40
  18. package/lib/components/DateRangePicker.d.ts +40 -40
  19. package/lib/components/Form.d.ts +22 -0
  20. package/lib/components/Form.js +44 -0
  21. package/lib/components/Form.js.map +13 -0
  22. package/lib/components/FormField.d.ts +65 -0
  23. package/lib/components/FormField.js +48 -0
  24. package/lib/components/FormField.js.map +13 -0
  25. package/lib/components/InputBox.d.ts +10 -10
  26. package/lib/components/InputBox.js +4 -3
  27. package/lib/components/InputBox.js.map +2 -2
  28. package/lib/components/InputBoxWithSuggestion.d.ts +280 -0
  29. package/lib/components/InputBoxWithSuggestion.js +65 -0
  30. package/lib/components/InputBoxWithSuggestion.js.map +13 -0
  31. package/lib/components/ListGroup.d.ts +10 -10
  32. package/lib/components/PickerContainer.d.ts +4 -2
  33. package/lib/components/PickerContainer.js +28 -5
  34. package/lib/components/PickerContainer.js.map +2 -2
  35. package/lib/components/Radios.d.ts +10 -10
  36. package/lib/components/ResultBox.d.ts +40 -40
  37. package/lib/components/Select.d.ts +195 -202
  38. package/lib/components/Select.js +7 -3
  39. package/lib/components/Select.js.map +2 -2
  40. package/lib/components/Textarea.d.ts +568 -2
  41. package/lib/components/Textarea.js +129 -1
  42. package/lib/components/Textarea.js.map +2 -2
  43. package/lib/components/Toast.js +11 -9
  44. package/lib/components/Toast.js.map +2 -2
  45. package/lib/components/UserSelect.d.ts +500 -0
  46. package/lib/components/UserSelect.js +559 -0
  47. package/lib/components/UserSelect.js.map +13 -0
  48. package/lib/components/UserTabSelect.d.ts +320 -0
  49. package/lib/components/UserTabSelect.js +163 -0
  50. package/lib/components/UserTabSelect.js.map +13 -0
  51. package/lib/components/WithRemoteConfig.d.ts +7 -0
  52. package/lib/components/WithRemoteConfig.js +17 -11
  53. package/lib/components/WithRemoteConfig.js.map +2 -2
  54. package/lib/components/calendar/DaysView.d.ts +26 -1
  55. package/lib/components/calendar/DaysView.js +60 -19
  56. package/lib/components/calendar/DaysView.js.map +2 -2
  57. package/lib/components/calendar/TimeView.d.ts +1 -1
  58. package/lib/components/calendar/TimeView.js +10 -3
  59. package/lib/components/calendar/TimeView.js.map +2 -2
  60. package/lib/components/formula/Picker.js +4 -4
  61. package/lib/components/formula/Picker.js.map +2 -2
  62. package/lib/components/icons.d.ts +7 -1
  63. package/lib/components/icons.js +17 -1
  64. package/lib/components/icons.js.map +2 -2
  65. package/lib/components/index.d.ts +2 -1
  66. package/lib/components/index.js +3 -1
  67. package/lib/components/index.js.map +2 -2
  68. package/lib/components/json-schema/Array.d.ts +3 -0
  69. package/lib/components/json-schema/Array.js +125 -0
  70. package/lib/components/json-schema/Array.js.map +13 -0
  71. package/lib/components/json-schema/Item.d.ts +3 -0
  72. package/lib/components/json-schema/Item.js +34 -0
  73. package/lib/components/json-schema/Item.js.map +13 -0
  74. package/lib/components/json-schema/Object.d.ts +3 -0
  75. package/lib/components/json-schema/Object.js +178 -0
  76. package/lib/components/json-schema/Object.js.map +13 -0
  77. package/lib/components/json-schema/index.d.ts +279 -0
  78. package/lib/components/json-schema/index.js +16 -0
  79. package/lib/components/json-schema/index.js.map +13 -0
  80. package/lib/components/schema-editor/Array.js +2 -2
  81. package/lib/components/schema-editor/Array.js.map +2 -2
  82. package/lib/components/schema-editor/Common.d.ts +2 -0
  83. package/lib/components/schema-editor/Common.js +39 -3
  84. package/lib/components/schema-editor/Common.js.map +2 -2
  85. package/lib/components/schema-editor/Object.js +2 -2
  86. package/lib/components/schema-editor/Object.js.map +2 -2
  87. package/lib/components/schema-editor/index.d.ts +45 -41
  88. package/lib/components/schema-editor/index.js +5 -5
  89. package/lib/components/schema-editor/index.js.map +2 -2
  90. package/lib/helper.css +125 -124
  91. package/lib/helper.css.map +1 -1
  92. package/lib/hooks/use-validation-resolver.d.ts +1 -0
  93. package/lib/hooks/use-validation-resolver.js +49 -0
  94. package/lib/hooks/use-validation-resolver.js.map +13 -0
  95. package/lib/icons/department.js +17 -0
  96. package/lib/icons/menu.js +9 -0
  97. package/lib/icons/post.js +15 -0
  98. package/lib/icons/role.js +14 -0
  99. package/lib/icons/user-remove.js +12 -0
  100. package/lib/index.d.ts +2 -0
  101. package/lib/index.js +3 -1
  102. package/lib/index.js.map +2 -2
  103. package/lib/locale/de-DE.js +11 -1
  104. package/lib/locale/de-DE.js.map +2 -2
  105. package/lib/locale/en-US.js +12 -1
  106. package/lib/locale/en-US.js.map +2 -2
  107. package/lib/locale/zh-CN.js +14 -3
  108. package/lib/locale/zh-CN.js.map +2 -2
  109. package/lib/renderers/Action.js +25 -11
  110. package/lib/renderers/Action.js.map +2 -2
  111. package/lib/renderers/CRUD.js +5 -1
  112. package/lib/renderers/CRUD.js.map +2 -2
  113. package/lib/renderers/Dialog.js +9 -3
  114. package/lib/renderers/Dialog.js.map +2 -2
  115. package/lib/renderers/Drawer.js +5 -1
  116. package/lib/renderers/Drawer.js.map +2 -2
  117. package/lib/renderers/Form/InputDate.d.ts +2 -2
  118. package/lib/renderers/Form/InputDate.js.map +2 -2
  119. package/lib/renderers/Form/InputFile.js +5 -12
  120. package/lib/renderers/Form/InputFile.js.map +2 -2
  121. package/lib/renderers/Form/InputText.d.ts +1 -1
  122. package/lib/renderers/Form/InputText.js.map +1 -1
  123. package/lib/renderers/Form/JSONSchema.d.ts +23 -0
  124. package/lib/renderers/Form/JSONSchema.js +44 -0
  125. package/lib/renderers/Form/JSONSchema.js.map +13 -0
  126. package/lib/renderers/Form/JSONSchemaEditor.d.ts +2 -3
  127. package/lib/renderers/Form/JSONSchemaEditor.js +9 -24
  128. package/lib/renderers/Form/JSONSchemaEditor.js.map +2 -2
  129. package/lib/renderers/Form/Textarea.d.ts +1 -8
  130. package/lib/renderers/Form/Textarea.js +11 -75
  131. package/lib/renderers/Form/Textarea.js.map +2 -2
  132. package/lib/renderers/Form/UserSelect.d.ts +54 -0
  133. package/lib/renderers/Form/UserSelect.js +197 -0
  134. package/lib/renderers/Form/UserSelect.js.map +13 -0
  135. package/lib/renderers/Form/index.d.ts +1 -1
  136. package/lib/renderers/Form/index.js +88 -42
  137. package/lib/renderers/Form/index.js.map +2 -2
  138. package/lib/renderers/Link.d.ts +1 -1
  139. package/lib/renderers/Link.js +15 -29
  140. package/lib/renderers/Link.js.map +2 -2
  141. package/lib/renderers/Log.d.ts +28 -0
  142. package/lib/renderers/Log.js +110 -20
  143. package/lib/renderers/Log.js.map +2 -2
  144. package/lib/renderers/Page.js +5 -1
  145. package/lib/renderers/Page.js.map +2 -2
  146. package/lib/renderers/Service.js +5 -1
  147. package/lib/renderers/Service.js.map +2 -2
  148. package/lib/renderers/Wizard.js +37 -14
  149. package/lib/renderers/Wizard.js.map +2 -2
  150. package/lib/store/form.js +65 -45
  151. package/lib/store/form.js.map +2 -2
  152. package/lib/themes/ang-ie11.css +576 -24
  153. package/lib/themes/ang.css +553 -12
  154. package/lib/themes/ang.css.map +1 -1
  155. package/lib/themes/antd-ie11.css +576 -24
  156. package/lib/themes/antd.css +553 -12
  157. package/lib/themes/antd.css.map +1 -1
  158. package/lib/themes/cxd-ie11.css +576 -24
  159. package/lib/themes/cxd.css +553 -12
  160. package/lib/themes/cxd.css.map +1 -1
  161. package/lib/themes/dark-ie11.css +576 -24
  162. package/lib/themes/dark.css +553 -12
  163. package/lib/themes/dark.css.map +1 -1
  164. package/lib/themes/default-ie11.css +576 -24
  165. package/lib/themes/default.css +553 -12
  166. package/lib/themes/default.css.map +1 -1
  167. package/lib/utils/api.js +1 -1
  168. package/lib/utils/api.js.map +2 -2
  169. package/lib/utils/renderer-event.js.map +2 -2
  170. package/package.json +2 -1
  171. package/schema.json +542 -4
  172. package/scss/_properties.scss +20 -8
  173. package/scss/components/_input-box.scss +22 -1
  174. package/scss/components/_json-schema.scss +124 -0
  175. package/scss/components/_log.scss +37 -5
  176. package/scss/components/form/_date-range.scss +1 -0
  177. package/scss/components/form/_select.scss +9 -0
  178. package/scss/components/form/_transfer.scss +19 -3
  179. package/scss/components/form/_user-select.scss +422 -0
  180. package/scss/helper/background/_background-color.scss +125 -124
  181. package/scss/themes/_common.scss +2 -0
  182. package/sdk/ang-ie11.css +670 -24
  183. package/sdk/ang.css +647 -12
  184. package/sdk/antd-ie11.css +670 -24
  185. package/sdk/antd.css +647 -12
  186. package/sdk/barcode.js +51 -51
  187. package/sdk/charts.js +14 -14
  188. package/sdk/codemirror.js +7 -7
  189. package/sdk/color-picker.js +65 -65
  190. package/sdk/cropperjs.js +2 -2
  191. package/sdk/cxd-ie11.css +670 -24
  192. package/sdk/cxd.css +647 -12
  193. package/sdk/dark-ie11.css +670 -24
  194. package/sdk/dark.css +647 -12
  195. package/sdk/exceljs.js +1 -1
  196. package/sdk/helper.css +125 -124
  197. package/sdk/helper.css.map +1 -1
  198. package/sdk/locale/de-DE.js +11 -1
  199. package/sdk/markdown.js +69 -69
  200. package/sdk/papaparse.js +1 -1
  201. package/sdk/renderers/Form/CityDB.js +1 -1
  202. package/sdk/rest.js +16 -16
  203. package/sdk/rich-text.js +62 -62
  204. package/sdk/sdk-ie11.css +670 -24
  205. package/sdk/sdk.css +647 -12
  206. package/sdk/sdk.js +1651 -1637
  207. package/sdk/thirds/hls.js/hls.js +1 -1
  208. package/sdk/thirds/mpegts.js/mpegts.js +1 -1
  209. package/sdk/tinymce.js +57 -57
  210. package/src/RootRenderer.tsx +27 -15
  211. package/src/Schema.ts +5 -1
  212. package/src/actions/Action.ts +5 -4
  213. package/src/components/Button.tsx +3 -0
  214. package/src/components/Checkbox.tsx +2 -1
  215. package/src/components/ContextMenu.tsx +25 -7
  216. package/src/components/Form.tsx +70 -0
  217. package/src/components/FormField.tsx +127 -0
  218. package/src/components/InputBox.tsx +4 -1
  219. package/src/components/InputBoxWithSuggestion.tsx +113 -0
  220. package/src/components/PickerContainer.tsx +20 -5
  221. package/src/components/Select.tsx +18 -10
  222. package/src/components/Textarea.tsx +234 -2
  223. package/src/components/Toast.tsx +19 -18
  224. package/src/components/UserSelect.tsx +850 -0
  225. package/src/components/UserTabSelect.tsx +261 -0
  226. package/src/components/WithRemoteConfig.tsx +22 -7
  227. package/src/components/calendar/DaysView.tsx +117 -49
  228. package/src/components/calendar/TimeView.tsx +11 -6
  229. package/src/components/formula/Picker.tsx +2 -1
  230. package/src/components/icons.tsx +17 -1
  231. package/src/components/index.tsx +3 -1
  232. package/src/components/json-schema/Array.tsx +216 -0
  233. package/src/components/json-schema/Item.tsx +47 -0
  234. package/src/components/json-schema/Object.tsx +339 -0
  235. package/src/components/json-schema/index.tsx +44 -0
  236. package/src/components/schema-editor/Array.tsx +3 -1
  237. package/src/components/schema-editor/Common.tsx +61 -4
  238. package/src/components/schema-editor/Object.tsx +3 -1
  239. package/src/components/schema-editor/index.tsx +12 -5
  240. package/src/hooks/use-validation-resolver.ts +45 -0
  241. package/src/icons/department.svg +17 -0
  242. package/src/icons/menu.svg +2 -0
  243. package/src/icons/post.svg +15 -0
  244. package/src/icons/role.svg +14 -0
  245. package/src/icons/user-remove.svg +12 -0
  246. package/src/index.tsx +2 -0
  247. package/src/locale/de-DE.ts +11 -1
  248. package/src/locale/en-US.ts +12 -1
  249. package/src/locale/zh-CN.ts +14 -3
  250. package/src/renderers/Action.tsx +10 -9
  251. package/src/renderers/CRUD.tsx +5 -1
  252. package/src/renderers/Dialog.tsx +9 -3
  253. package/src/renderers/Drawer.tsx +5 -1
  254. package/src/renderers/Form/InputDate.tsx +9 -4
  255. package/src/renderers/Form/InputFile.tsx +5 -15
  256. package/src/renderers/Form/InputText.tsx +1 -1
  257. package/src/renderers/Form/JSONSchema.tsx +56 -0
  258. package/src/renderers/Form/JSONSchemaEditor.tsx +8 -27
  259. package/src/renderers/Form/Textarea.tsx +7 -117
  260. package/src/renderers/Form/UserSelect.tsx +263 -0
  261. package/src/renderers/Form/index.tsx +28 -18
  262. package/src/renderers/Link.tsx +5 -17
  263. package/src/renderers/Log.tsx +213 -19
  264. package/src/renderers/Page.tsx +6 -1
  265. package/src/renderers/Service.tsx +5 -1
  266. package/src/renderers/Wizard.tsx +24 -10
  267. package/src/store/form.ts +24 -17
  268. package/src/utils/api.ts +1 -1
  269. package/src/utils/renderer-event.ts +0 -2
@@ -20,7 +20,7 @@ export interface SchemaEditorProps extends LocaleProps, ThemeProps {
20
20
  */
21
21
  definitions?: {
22
22
  [propName: string]: {
23
- type: 'string' | 'number' | 'interger' | 'object' | 'array' | 'boolean' | 'null';
23
+ type: 'string' | 'number' | 'integer' | 'object' | 'array' | 'boolean' | 'null';
24
24
  title: string;
25
25
  [propName: string]: any;
26
26
  };
@@ -33,6 +33,10 @@ export interface SchemaEditorProps extends LocaleProps, ThemeProps {
33
33
  * 顶层类型信息是否隐藏
34
34
  */
35
35
  showRootInfo: boolean;
36
+ /**
37
+ * 是否开启高级配置
38
+ */
39
+ enableAdvancedSetting?: boolean;
36
40
  }
37
41
  export declare class SchemaEditor extends React.Component<SchemaEditorProps> {
38
42
  static defaultProps: Pick<SchemaEditorProps, 'defaultType' | 'rootTypeMutable' | 'showRootInfo' | 'disabledTypes'>;
@@ -42,7 +46,7 @@ export declare class SchemaEditor extends React.Component<SchemaEditorProps> {
42
46
  render(): JSX.Element;
43
47
  }
44
48
  declare const _default: {
45
- new (props: Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
49
+ new (props: Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
46
50
  locale?: string | undefined;
47
51
  translate?: ((str: string, ...args: any[]) => string) | undefined;
48
52
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps): {
@@ -51,12 +55,12 @@ declare const _default: {
51
55
  getWrappedInstance(): any;
52
56
  render(): JSX.Element;
53
57
  context: any;
54
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
58
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
55
59
  locale?: string | undefined;
56
60
  translate?: ((str: string, ...args: any[]) => string) | undefined;
57
61
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
58
62
  forceUpdate(callback?: (() => void) | undefined): void;
59
- readonly props: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
63
+ readonly props: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
60
64
  locale?: string | undefined;
61
65
  translate?: ((str: string, ...args: any[]) => string) | undefined;
62
66
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps> & Readonly<{
@@ -67,35 +71,35 @@ declare const _default: {
67
71
  [key: string]: React.ReactInstance;
68
72
  };
69
73
  componentDidMount?(): void;
70
- shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
74
+ shouldComponentUpdate?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
71
75
  locale?: string | undefined;
72
76
  translate?: ((str: string, ...args: any[]) => string) | undefined;
73
77
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
74
78
  componentWillUnmount?(): void;
75
79
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
76
- getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
80
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
77
81
  locale?: string | undefined;
78
82
  translate?: ((str: string, ...args: any[]) => string) | undefined;
79
83
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>): any;
80
- componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
84
+ componentDidUpdate?(prevProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
81
85
  locale?: string | undefined;
82
86
  translate?: ((str: string, ...args: any[]) => string) | undefined;
83
87
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, prevState: Readonly<{}>, snapshot?: any): void;
84
88
  componentWillMount?(): void;
85
89
  UNSAFE_componentWillMount?(): void;
86
- componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
90
+ componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
87
91
  locale?: string | undefined;
88
92
  translate?: ((str: string, ...args: any[]) => string) | undefined;
89
93
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
90
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
94
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
91
95
  locale?: string | undefined;
92
96
  translate?: ((str: string, ...args: any[]) => string) | undefined;
93
97
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextContext: any): void;
94
- componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
98
+ componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
95
99
  locale?: string | undefined;
96
100
  translate?: ((str: string, ...args: any[]) => string) | undefined;
97
101
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
98
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
102
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
99
103
  locale?: string | undefined;
100
104
  translate?: ((str: string, ...args: any[]) => string) | undefined;
101
105
  }, keyof ThemeProps> & import("../../theme").ThemeOutterProps>, nextState: Readonly<{}>, nextContext: any): void;
@@ -103,7 +107,7 @@ declare const _default: {
103
107
  displayName: string;
104
108
  contextType: React.Context<string>;
105
109
  ComposedComponent: React.ComponentType<{
106
- new (props: Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
110
+ new (props: Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
107
111
  locale?: string | undefined;
108
112
  translate?: ((str: string, ...args: any[]) => string) | undefined;
109
113
  }): {
@@ -112,12 +116,12 @@ declare const _default: {
112
116
  getWrappedInstance(): any;
113
117
  render(): JSX.Element;
114
118
  context: any;
115
- setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
119
+ setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
116
120
  locale?: string | undefined;
117
121
  translate?: ((str: string, ...args: any[]) => string) | undefined;
118
122
  }>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
119
123
  forceUpdate(callback?: (() => void) | undefined): void;
120
- readonly props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
124
+ readonly props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
121
125
  locale?: string | undefined;
122
126
  translate?: ((str: string, ...args: any[]) => string) | undefined;
123
127
  }> & Readonly<{
@@ -128,35 +132,35 @@ declare const _default: {
128
132
  [key: string]: React.ReactInstance;
129
133
  };
130
134
  componentDidMount?(): void;
131
- shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
135
+ shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
132
136
  locale?: string | undefined;
133
137
  translate?: ((str: string, ...args: any[]) => string) | undefined;
134
138
  }>, nextState: Readonly<{}>, nextContext: any): boolean;
135
139
  componentWillUnmount?(): void;
136
140
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
137
- getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
141
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
138
142
  locale?: string | undefined;
139
143
  translate?: ((str: string, ...args: any[]) => string) | undefined;
140
144
  }>, prevState: Readonly<{}>): any;
141
- componentDidUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
145
+ componentDidUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
142
146
  locale?: string | undefined;
143
147
  translate?: ((str: string, ...args: any[]) => string) | undefined;
144
148
  }>, prevState: Readonly<{}>, snapshot?: any): void;
145
149
  componentWillMount?(): void;
146
150
  UNSAFE_componentWillMount?(): void;
147
- componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
151
+ componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
148
152
  locale?: string | undefined;
149
153
  translate?: ((str: string, ...args: any[]) => string) | undefined;
150
154
  }>, nextContext: any): void;
151
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
155
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
152
156
  locale?: string | undefined;
153
157
  translate?: ((str: string, ...args: any[]) => string) | undefined;
154
158
  }>, nextContext: any): void;
155
- componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
159
+ componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
156
160
  locale?: string | undefined;
157
161
  translate?: ((str: string, ...args: any[]) => string) | undefined;
158
162
  }>, nextState: Readonly<{}>, nextContext: any): void;
159
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
163
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
160
164
  locale?: string | undefined;
161
165
  translate?: ((str: string, ...args: any[]) => string) | undefined;
162
166
  }>, nextState: Readonly<{}>, nextContext: any): void;
@@ -168,7 +172,7 @@ declare const _default: {
168
172
  ComposedComponent: typeof SchemaEditor;
169
173
  }>;
170
174
  } & import("hoist-non-react-statics").NonReactStatics<{
171
- new (props: Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
175
+ new (props: Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
172
176
  locale?: string | undefined;
173
177
  translate?: ((str: string, ...args: any[]) => string) | undefined;
174
178
  }): {
@@ -177,12 +181,12 @@ declare const _default: {
177
181
  getWrappedInstance(): any;
178
182
  render(): JSX.Element;
179
183
  context: any;
180
- setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
184
+ setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
181
185
  locale?: string | undefined;
182
186
  translate?: ((str: string, ...args: any[]) => string) | undefined;
183
187
  }>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
184
188
  forceUpdate(callback?: (() => void) | undefined): void;
185
- readonly props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
189
+ readonly props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
186
190
  locale?: string | undefined;
187
191
  translate?: ((str: string, ...args: any[]) => string) | undefined;
188
192
  }> & Readonly<{
@@ -193,35 +197,35 @@ declare const _default: {
193
197
  [key: string]: React.ReactInstance;
194
198
  };
195
199
  componentDidMount?(): void;
196
- shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
200
+ shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
197
201
  locale?: string | undefined;
198
202
  translate?: ((str: string, ...args: any[]) => string) | undefined;
199
203
  }>, nextState: Readonly<{}>, nextContext: any): boolean;
200
204
  componentWillUnmount?(): void;
201
205
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
202
- getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
206
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
203
207
  locale?: string | undefined;
204
208
  translate?: ((str: string, ...args: any[]) => string) | undefined;
205
209
  }>, prevState: Readonly<{}>): any;
206
- componentDidUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
210
+ componentDidUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
207
211
  locale?: string | undefined;
208
212
  translate?: ((str: string, ...args: any[]) => string) | undefined;
209
213
  }>, prevState: Readonly<{}>, snapshot?: any): void;
210
214
  componentWillMount?(): void;
211
215
  UNSAFE_componentWillMount?(): void;
212
- componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
216
+ componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
213
217
  locale?: string | undefined;
214
218
  translate?: ((str: string, ...args: any[]) => string) | undefined;
215
219
  }>, nextContext: any): void;
216
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
220
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
217
221
  locale?: string | undefined;
218
222
  translate?: ((str: string, ...args: any[]) => string) | undefined;
219
223
  }>, nextContext: any): void;
220
- componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
224
+ componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
221
225
  locale?: string | undefined;
222
226
  translate?: ((str: string, ...args: any[]) => string) | undefined;
223
227
  }>, nextState: Readonly<{}>, nextContext: any): void;
224
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
228
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
225
229
  locale?: string | undefined;
226
230
  translate?: ((str: string, ...args: any[]) => string) | undefined;
227
231
  }>, nextState: Readonly<{}>, nextContext: any): void;
@@ -233,7 +237,7 @@ declare const _default: {
233
237
  ComposedComponent: typeof SchemaEditor;
234
238
  }, {}> & {
235
239
  ComposedComponent: {
236
- new (props: Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
240
+ new (props: Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
237
241
  locale?: string | undefined;
238
242
  translate?: ((str: string, ...args: any[]) => string) | undefined;
239
243
  }): {
@@ -242,12 +246,12 @@ declare const _default: {
242
246
  getWrappedInstance(): any;
243
247
  render(): JSX.Element;
244
248
  context: any;
245
- setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
249
+ setState<K_1 extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
246
250
  locale?: string | undefined;
247
251
  translate?: ((str: string, ...args: any[]) => string) | undefined;
248
252
  }>) => {} | Pick<{}, K_1> | null) | Pick<{}, K_1> | null, callback?: (() => void) | undefined): void;
249
253
  forceUpdate(callback?: (() => void) | undefined): void;
250
- readonly props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
254
+ readonly props: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
251
255
  locale?: string | undefined;
252
256
  translate?: ((str: string, ...args: any[]) => string) | undefined;
253
257
  }> & Readonly<{
@@ -258,35 +262,35 @@ declare const _default: {
258
262
  [key: string]: React.ReactInstance;
259
263
  };
260
264
  componentDidMount?(): void;
261
- shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
265
+ shouldComponentUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
262
266
  locale?: string | undefined;
263
267
  translate?: ((str: string, ...args: any[]) => string) | undefined;
264
268
  }>, nextState: Readonly<{}>, nextContext: any): boolean;
265
269
  componentWillUnmount?(): void;
266
270
  componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
267
- getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
271
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
268
272
  locale?: string | undefined;
269
273
  translate?: ((str: string, ...args: any[]) => string) | undefined;
270
274
  }>, prevState: Readonly<{}>): any;
271
- componentDidUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
275
+ componentDidUpdate?(prevProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
272
276
  locale?: string | undefined;
273
277
  translate?: ((str: string, ...args: any[]) => string) | undefined;
274
278
  }>, prevState: Readonly<{}>, snapshot?: any): void;
275
279
  componentWillMount?(): void;
276
280
  UNSAFE_componentWillMount?(): void;
277
- componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
281
+ componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
278
282
  locale?: string | undefined;
279
283
  translate?: ((str: string, ...args: any[]) => string) | undefined;
280
284
  }>, nextContext: any): void;
281
- UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
285
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
282
286
  locale?: string | undefined;
283
287
  translate?: ((str: string, ...args: any[]) => string) | undefined;
284
288
  }>, nextContext: any): void;
285
- componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
289
+ componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
286
290
  locale?: string | undefined;
287
291
  translate?: ((str: string, ...args: any[]) => string) | undefined;
288
292
  }>, nextState: Readonly<{}>, nextContext: any): void;
289
- UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
293
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "classPrefix" | "classnames" | "className" | "theme" | "value" | "disabled" | "onChange" | "definitions" | "enableAdvancedSetting" | "renderExtraProps" | "renderModalProps"> & Partial<Pick<Omit<SchemaEditorProps, keyof LocaleProps>, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">> & Partial<Pick<Pick<SchemaEditorProps, "rootTypeMutable" | "showRootInfo" | "disabledTypes" | "defaultType">, never>> & {
290
294
  locale?: string | undefined;
291
295
  translate?: ((str: string, ...args: any[]) => string) | undefined;
292
296
  }>, nextState: Readonly<{}>, nextContext: any): void;
@@ -26,8 +26,8 @@ var SchemaEditor = /** @class */ (function (_super) {
26
26
  value: 'number'
27
27
  },
28
28
  {
29
- label: __('SchemaType.interger'),
30
- value: 'interger'
29
+ label: __('SchemaType.integer'),
30
+ value: 'integer'
31
31
  },
32
32
  {
33
33
  label: __('SchemaType.boolean'),
@@ -61,7 +61,7 @@ var SchemaEditor = /** @class */ (function (_super) {
61
61
  return value;
62
62
  };
63
63
  SchemaEditor.prototype.render = function () {
64
- var _a = this.props, defaultType = _a.defaultType, cx = _a.classnames, onChange = _a.onChange, renderExtraProps = _a.renderExtraProps, renderModalProps = _a.renderModalProps, translate = _a.translate, locale = _a.locale, classPrefix = _a.classPrefix, rootTypeMutable = _a.rootTypeMutable, showRootInfo = _a.showRootInfo, disabled = _a.disabled, definitions = _a.definitions;
64
+ var _a = this.props, defaultType = _a.defaultType, cx = _a.classnames, onChange = _a.onChange, renderExtraProps = _a.renderExtraProps, renderModalProps = _a.renderModalProps, translate = _a.translate, locale = _a.locale, classPrefix = _a.classPrefix, rootTypeMutable = _a.rootTypeMutable, showRootInfo = _a.showRootInfo, disabled = _a.disabled, definitions = _a.definitions, enableAdvancedSetting = _a.enableAdvancedSetting;
65
65
  var value = this.props.value || {
66
66
  type: defaultType || 'object'
67
67
  };
@@ -78,7 +78,7 @@ var SchemaEditor = /** @class */ (function (_super) {
78
78
  [
79
79
  'string',
80
80
  'number',
81
- 'interger',
81
+ 'integer',
82
82
  'object',
83
83
  'array',
84
84
  'boolean',
@@ -95,7 +95,7 @@ var SchemaEditor = /** @class */ (function (_super) {
95
95
  types = types.filter(function (item) { return !~disabledTypes.indexOf(item.value); });
96
96
  }
97
97
  return (react_1.default.createElement("div", { className: cx('SchemaEditor') },
98
- react_1.default.createElement(Item_1.SchemaEditorItem, { types: types, typeMutable: rootTypeMutable, showInfo: showRootInfo, value: value, onChange: onChange, renderExtraProps: renderExtraProps, renderModalProps: renderModalProps, locale: locale, translate: translate, classnames: cx, classPrefix: classPrefix, disabled: disabled, onTypeChange: this.handleTypeChange })));
98
+ react_1.default.createElement(Item_1.SchemaEditorItem, { types: types, typeMutable: rootTypeMutable, showInfo: showRootInfo, value: value, onChange: onChange, renderExtraProps: renderExtraProps, renderModalProps: renderModalProps, locale: locale, translate: translate, classnames: cx, classPrefix: classPrefix, disabled: disabled, onTypeChange: this.handleTypeChange, enableAdvancedSetting: enableAdvancedSetting })));
99
99
  };
100
100
  SchemaEditor.defaultProps = {
101
101
  defaultType: 'object',
@@ -6,8 +6,8 @@
6
6
  "/src/components/schema-editor/index.tsx"
7
7
  ],
8
8
  "names": [],
9
- "mappings": "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",
9
+ "mappings": ";AAAA;;GAEG;;;;AAEH,6DAA0B;AAC1B,uCAAqD;AACrD,qCAAkD;AAElD,iDAA8C;AAC9C,+BAAwC;AAExC,6CAA4C;AAoD5C;IAAkC,6CAAkC;IAalE,sBAAY,KAAwB;QAApC,YACE,kBAAM,KAAK,CAAC,SAuCb;QArCC,IAAM,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,KAAI,CAAC,YAAY,GAAG;YAClB;gBACE,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC;gBAC9B,KAAK,EAAE,QAAQ;aAChB;YAED;gBACE,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC;gBAC9B,KAAK,EAAE,QAAQ;aAChB;YAED;gBACE,KAAK,EAAE,EAAE,CAAC,oBAAoB,CAAC;gBAC/B,KAAK,EAAE,SAAS;aACjB;YAED;gBACE,KAAK,EAAE,EAAE,CAAC,oBAAoB,CAAC;gBAC/B,KAAK,EAAE,SAAS;aACjB;YAED;gBACE,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC;gBAC5B,KAAK,EAAE,MAAM;aACd;YAED;gBACE,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC;gBAC9B,KAAK,EAAE,QAAQ;aAChB;YAED;gBACE,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC;gBAC7B,KAAK,EAAE,OAAO;aACf;SACF,CAAC;;IACJ,CAAC;IAGD,uCAAgB,GAAhB,UAAiB,IAAY,EAAE,KAAU,EAAE,MAAW;QAC7C,IAAA,WAAW,GAAI,IAAI,CAAC,KAAK,YAAd,CAAe;QAEjC,IAAI,IAAI,KAAK,OAAO,EAAE;YACpB,KAAK,CAAC,KAAK,GAAG;gBACZ,IAAI,EAAE,QAAQ;aACf,CAAC;SACH;QAED,IAAI,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,IAAI,CAAC,EAAE;YACvB,KAAK,yEACA,KAAK,GACL,WAAW,CAAC,IAAI,CAAC,KACpB,IAAI,EAAE,IAAI,GACX,CAAC;SACH;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED,6BAAM,GAAN;QACQ,IAAA,KAcF,IAAI,CAAC,KAAK,EAbZ,WAAW,iBAAA,EACC,EAAE,gBAAA,EACd,QAAQ,cAAA,EACR,gBAAgB,sBAAA,EAChB,gBAAgB,sBAAA,EAChB,SAAS,eAAA,EACT,MAAM,YAAA,EACN,WAAW,iBAAA,EACX,eAAe,qBAAA,EACf,YAAY,kBAAA,EACZ,QAAQ,cAAA,EACR,WAAW,iBAAA,EACX,qBAAqB,2BACT,CAAC;QACf,IAAM,KAAK,GAAe,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI;YAC5C,IAAI,EAAE,WAAW,IAAI,QAAQ;SAC9B,CAAC;QAEF,IAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;YAC3D,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa;YAC1B,CAAC,CAAC,EAAE,CAAC;QACP,IAAI,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAEvC,IAAI,WAAW,EAAE;YACf,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACtC,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;gBACd,IAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;gBAEpC,IACE,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI;oBAChB,UAAU,CAAC,KAAK;oBAChB;wBACE,QAAQ;wBACR,QAAQ;wBACR,SAAS;wBACT,QAAQ;wBACR,OAAO;wBACP,SAAS;wBACT,MAAM;qBACP,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAC3B;oBACA,KAAK,CAAC,IAAI,CAAC;wBACT,KAAK,EAAE,GAAG;wBACV,KAAK,EAAE,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC;qBACnC,CAAC,CAAC;iBACJ;YACH,CAAC,CAAC,CAAC;SACJ;QAED,IAAI,aAAa,CAAC,MAAM,EAAE;YACxB,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAnC,CAAmC,CAAC,CAAC;SACnE;QAED,OAAO,CACL,uCAAK,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC;YAChC,8BAAC,uBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,eAAe,EAC5B,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,EAAE,EACd,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,qBAAqB,EAAE,qBAAqB,GAC5C,CACE,CACP,CAAC;IACJ,CAAC;IAtJM,yBAAY,GAGf;QACF,WAAW,EAAE,QAAQ;QACrB,eAAe,EAAE,KAAK;QACtB,YAAY,EAAE,KAAK;QACnB,aAAa,EAAE,CAAC,MAAM,CAAC;KACxB,CAAC;IA+CF;QADC,iBAAQ;;;;wDAmBR;IA8EH,mBAAC;CAAA,AAxJD,CAAkC,eAAK,CAAC,SAAS,GAwJhD;AAxJY,oCAAY;AA0JzB,kBAAe,IAAA,iBAAS,EACtB,IAAA,mBAAU,EACR,IAAA,+BAAc,EAAC,YAAY,EAAE;IAC3B,KAAK,EAAE,UAAU;CAClB,CAAC,CACH,CACF,CAAC",
10
10
  "sourcesContent": [
11
- "/**\n * 用来定义数据结构的编辑器\n */\n\nimport React from 'react';\nimport {localeable, LocaleProps} from '../../locale';\nimport {themeable, ThemeProps} from '../../theme';\nimport type {JSONSchema} from '../../utils/DataScope';\nimport {uncontrollable} from 'uncontrollable';\nimport {SchemaEditorItem} from './Item';\nimport type {JSONSchema7TypeName} from 'json-schema';\nimport {autobind} from '../../utils/helper';\n\nexport interface SchemaEditorProps extends LocaleProps, ThemeProps {\n value?: JSONSchema;\n onChange: (value: JSONSchema) => void;\n disabled?: boolean;\n defaultType: JSONSchema7TypeName;\n renderExtraProps?: (\n value: JSONSchema,\n onChange: (value: JSONSchema) => void\n ) => JSX.Element;\n renderModalProps?: (\n value: JSONSchema,\n onChange: (value: JSONSchema) => void\n ) => JSX.Element;\n\n disabledTypes?: Array<string>;\n\n /**\n * 预设模板\n */\n definitions?: {\n [propName: string]: {\n type:\n | 'string'\n | 'number'\n | 'interger'\n | 'object'\n | 'array'\n | 'boolean'\n | 'null';\n title: string;\n [propName: string]: any;\n };\n };\n\n /**\n * 顶层是否允许修改类型\n */\n rootTypeMutable: boolean;\n\n /**\n * 顶层类型信息是否隐藏\n */\n showRootInfo: boolean;\n}\n\nexport class SchemaEditor extends React.Component<SchemaEditorProps> {\n static defaultProps: Pick<\n SchemaEditorProps,\n 'defaultType' | 'rootTypeMutable' | 'showRootInfo' | 'disabledTypes'\n > = {\n defaultType: 'object',\n rootTypeMutable: false,\n showRootInfo: false,\n disabledTypes: ['null']\n };\n\n defaultTypes: Array<any>;\n\n constructor(props: SchemaEditorProps) {\n super(props);\n\n const __ = props.translate;\n this.defaultTypes = [\n {\n label: __('SchemaType.string'),\n value: 'string'\n },\n\n {\n label: __('SchemaType.number'),\n value: 'number'\n },\n\n {\n label: __('SchemaType.interger'),\n value: 'interger'\n },\n\n {\n label: __('SchemaType.boolean'),\n value: 'boolean'\n },\n\n {\n label: __('SchemaType.null'),\n value: 'null'\n },\n\n {\n label: __('SchemaType.object'),\n value: 'object'\n },\n\n {\n label: __('SchemaType.array'),\n value: 'array'\n }\n ];\n }\n\n @autobind\n handleTypeChange(type: string, value: any, origin: any) {\n const {definitions} = this.props;\n\n if (type === 'array') {\n value.items = {\n type: 'string'\n };\n }\n\n if (definitions?.[type]) {\n value = {\n ...value,\n ...definitions[type],\n $ref: type\n };\n }\n\n return value;\n }\n\n render() {\n const {\n defaultType,\n classnames: cx,\n onChange,\n renderExtraProps,\n renderModalProps,\n translate,\n locale,\n classPrefix,\n rootTypeMutable,\n showRootInfo,\n disabled,\n definitions\n } = this.props;\n const value: JSONSchema = this.props.value || {\n type: defaultType || 'object'\n };\n\n const disabledTypes = Array.isArray(this.props.disabledTypes)\n ? this.props.disabledTypes\n : [];\n let types = this.defaultTypes.concat();\n\n if (definitions) {\n const keys = Object.keys(definitions);\n keys.forEach(key => {\n const definition = definitions[key];\n\n if (\n definition?.type &&\n definition.title &&\n [\n 'string',\n 'number',\n 'interger',\n 'object',\n 'array',\n 'boolean',\n 'null'\n ].includes(definition.type)\n ) {\n types.push({\n value: key,\n label: translate(definition.title)\n });\n }\n });\n }\n\n if (disabledTypes.length) {\n types = types.filter(item => !~disabledTypes.indexOf(item.value));\n }\n\n return (\n <div className={cx('SchemaEditor')}>\n <SchemaEditorItem\n types={types}\n typeMutable={rootTypeMutable}\n showInfo={showRootInfo}\n value={value}\n onChange={onChange}\n renderExtraProps={renderExtraProps}\n renderModalProps={renderModalProps}\n locale={locale}\n translate={translate}\n classnames={cx}\n classPrefix={classPrefix}\n disabled={disabled}\n onTypeChange={this.handleTypeChange}\n />\n </div>\n );\n }\n}\n\nexport default themeable(\n localeable(\n uncontrollable(SchemaEditor, {\n value: 'onChange'\n })\n )\n);\n"
11
+ "/**\n * 用来定义数据结构的编辑器\n */\n\nimport React from 'react';\nimport {localeable, LocaleProps} from '../../locale';\nimport {themeable, ThemeProps} from '../../theme';\nimport type {JSONSchema} from '../../utils/DataScope';\nimport {uncontrollable} from 'uncontrollable';\nimport {SchemaEditorItem} from './Item';\nimport type {JSONSchema7TypeName} from 'json-schema';\nimport {autobind} from '../../utils/helper';\n\nexport interface SchemaEditorProps extends LocaleProps, ThemeProps {\n value?: JSONSchema;\n onChange: (value: JSONSchema) => void;\n disabled?: boolean;\n defaultType: JSONSchema7TypeName;\n renderExtraProps?: (\n value: JSONSchema,\n onChange: (value: JSONSchema) => void\n ) => JSX.Element;\n renderModalProps?: (\n value: JSONSchema,\n onChange: (value: JSONSchema) => void\n ) => JSX.Element;\n\n disabledTypes?: Array<string>;\n\n /**\n * 预设模板\n */\n definitions?: {\n [propName: string]: {\n type:\n | 'string'\n | 'number'\n | 'integer'\n | 'object'\n | 'array'\n | 'boolean'\n | 'null';\n title: string;\n [propName: string]: any;\n };\n };\n\n /**\n * 顶层是否允许修改类型\n */\n rootTypeMutable: boolean;\n\n /**\n * 顶层类型信息是否隐藏\n */\n showRootInfo: boolean;\n\n /**\n * 是否开启高级配置\n */\n enableAdvancedSetting?: boolean;\n}\n\nexport class SchemaEditor extends React.Component<SchemaEditorProps> {\n static defaultProps: Pick<\n SchemaEditorProps,\n 'defaultType' | 'rootTypeMutable' | 'showRootInfo' | 'disabledTypes'\n > = {\n defaultType: 'object',\n rootTypeMutable: false,\n showRootInfo: false,\n disabledTypes: ['null']\n };\n\n defaultTypes: Array<any>;\n\n constructor(props: SchemaEditorProps) {\n super(props);\n\n const __ = props.translate;\n this.defaultTypes = [\n {\n label: __('SchemaType.string'),\n value: 'string'\n },\n\n {\n label: __('SchemaType.number'),\n value: 'number'\n },\n\n {\n label: __('SchemaType.integer'),\n value: 'integer'\n },\n\n {\n label: __('SchemaType.boolean'),\n value: 'boolean'\n },\n\n {\n label: __('SchemaType.null'),\n value: 'null'\n },\n\n {\n label: __('SchemaType.object'),\n value: 'object'\n },\n\n {\n label: __('SchemaType.array'),\n value: 'array'\n }\n ];\n }\n\n @autobind\n handleTypeChange(type: string, value: any, origin: any) {\n const {definitions} = this.props;\n\n if (type === 'array') {\n value.items = {\n type: 'string'\n };\n }\n\n if (definitions?.[type]) {\n value = {\n ...value,\n ...definitions[type],\n $ref: type\n };\n }\n\n return value;\n }\n\n render() {\n const {\n defaultType,\n classnames: cx,\n onChange,\n renderExtraProps,\n renderModalProps,\n translate,\n locale,\n classPrefix,\n rootTypeMutable,\n showRootInfo,\n disabled,\n definitions,\n enableAdvancedSetting\n } = this.props;\n const value: JSONSchema = this.props.value || {\n type: defaultType || 'object'\n };\n\n const disabledTypes = Array.isArray(this.props.disabledTypes)\n ? this.props.disabledTypes\n : [];\n let types = this.defaultTypes.concat();\n\n if (definitions) {\n const keys = Object.keys(definitions);\n keys.forEach(key => {\n const definition = definitions[key];\n\n if (\n definition?.type &&\n definition.title &&\n [\n 'string',\n 'number',\n 'integer',\n 'object',\n 'array',\n 'boolean',\n 'null'\n ].includes(definition.type)\n ) {\n types.push({\n value: key,\n label: translate(definition.title)\n });\n }\n });\n }\n\n if (disabledTypes.length) {\n types = types.filter(item => !~disabledTypes.indexOf(item.value));\n }\n\n return (\n <div className={cx('SchemaEditor')}>\n <SchemaEditorItem\n types={types}\n typeMutable={rootTypeMutable}\n showInfo={showRootInfo}\n value={value}\n onChange={onChange}\n renderExtraProps={renderExtraProps}\n renderModalProps={renderModalProps}\n locale={locale}\n translate={translate}\n classnames={cx}\n classPrefix={classPrefix}\n disabled={disabled}\n onTypeChange={this.handleTypeChange}\n enableAdvancedSetting={enableAdvancedSetting}\n />\n </div>\n );\n }\n}\n\nexport default themeable(\n localeable(\n uncontrollable(SchemaEditor, {\n value: 'onChange'\n })\n )\n);\n"
12
12
  ]
13
13
  }