amis-editor 4.1.0-beta.27 → 4.2.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/dist/component/ClassNameControl.d.ts +1 -1
  2. package/dist/component/Control/APIControl.d.ts +2 -2
  3. package/dist/component/Control/OptionControl.d.ts +3 -3
  4. package/dist/component/Control/PopoverEdit.d.ts +4 -4
  5. package/dist/component/Control/ValidationControl.d.ts +1 -1
  6. package/dist/component/Editor.d.ts +1 -1
  7. package/dist/component/IFramePreview.d.ts +2 -1
  8. package/dist/component/NodeWrapper.d.ts +1 -1
  9. package/dist/component/Preview.d.ts +3 -1
  10. package/dist/component/ScaffoldModal.d.ts +1 -1
  11. package/dist/component/base/InputComponentName.d.ts +1 -1
  12. package/dist/env.d.ts +1 -1
  13. package/dist/exports.min.js +1 -1
  14. package/dist/index.min.js +1 -1
  15. package/dist/manager.d.ts +6 -24
  16. package/dist/plugin/Alert.d.ts +1 -1
  17. package/dist/plugin/Button.d.ts +1 -1
  18. package/dist/plugin/Dialog.d.ts +1 -1
  19. package/dist/plugin/Drawer.d.ts +1 -1
  20. package/dist/plugin/Form/Formula.d.ts +3 -3
  21. package/dist/plugin/IFrame.d.ts +3 -3
  22. package/dist/plugin/Page.d.ts +1 -1
  23. package/dist/plugin/Table.d.ts +1 -1
  24. package/dist/plugin.d.ts +3 -3
  25. package/dist/store/editor.d.ts +38 -20
  26. package/dist/util.d.ts +1 -1
  27. package/package.json +5 -2
  28. package/src/plugin/Alert.tsx +1 -1
  29. package/src/plugin/AnchorNav.tsx +1 -1
  30. package/src/plugin/Audio.tsx +1 -8
  31. package/src/plugin/Button.tsx +2 -4
  32. package/src/plugin/ButtonGroup.tsx +3 -6
  33. package/src/plugin/ButtonToolbar.tsx +4 -6
  34. package/src/plugin/CRUD.tsx +4 -4
  35. package/src/plugin/Card.tsx +1 -1
  36. package/src/plugin/Cards.tsx +1 -1
  37. package/src/plugin/Carousel.tsx +3 -12
  38. package/src/plugin/Chart.tsx +1 -1
  39. package/src/plugin/Collapse.tsx +1 -8
  40. package/src/plugin/Container.tsx +2 -6
  41. package/src/plugin/Date.tsx +1 -8
  42. package/src/plugin/Datetime.tsx +1 -8
  43. package/src/plugin/Dialog.tsx +2 -4
  44. package/src/plugin/Drawer.tsx +3 -6
  45. package/src/plugin/DropDownButton.tsx +2 -4
  46. package/src/plugin/Each.tsx +2 -7
  47. package/src/plugin/Flex.tsx +4 -9
  48. package/src/plugin/Form/ButtonGroupSelect.tsx +2 -13
  49. package/src/plugin/Form/ButtonToolbar.tsx +2 -13
  50. package/src/plugin/Form/CodeEditor.tsx +2 -12
  51. package/src/plugin/Form/Combo.tsx +1 -1
  52. package/src/plugin/Form/ConditionBuilder.tsx +4 -13
  53. package/src/plugin/Form/DiffEditor.tsx +1 -7
  54. package/src/plugin/Form/FieldSet.tsx +3 -15
  55. package/src/plugin/Form/Form.tsx +1 -6
  56. package/src/plugin/Form/Formula.tsx +2 -14
  57. package/src/plugin/Form/Group.tsx +2 -7
  58. package/src/plugin/Form/Hidden.tsx +1 -13
  59. package/src/plugin/Form/InputFile.tsx +1 -8
  60. package/src/plugin/Form/InputGroup.tsx +4 -13
  61. package/src/plugin/Form/InputImage.tsx +2 -13
  62. package/src/plugin/Form/InputNumber.tsx +2 -10
  63. package/src/plugin/Form/InputRepeat.tsx +5 -17
  64. package/src/plugin/Form/InputRichText.tsx +2 -13
  65. package/src/plugin/Form/InputSubForm.tsx +2 -11
  66. package/src/plugin/Form/InputTable.tsx +1 -1
  67. package/src/plugin/Form/InputTag.tsx +2 -13
  68. package/src/plugin/Form/InputTime.tsx +2 -12
  69. package/src/plugin/Form/InputTree.tsx +2 -13
  70. package/src/plugin/Form/ListSelect.tsx +2 -13
  71. package/src/plugin/Form/LocationPicker.tsx +1 -14
  72. package/src/plugin/Form/MatrixCheckboxes.tsx +2 -13
  73. package/src/plugin/Form/NestedSelect.tsx +2 -13
  74. package/src/plugin/Form/Picker.tsx +2 -10
  75. package/src/plugin/Form/Radios.tsx +2 -13
  76. package/src/plugin/Form/Static.tsx +2 -15
  77. package/src/plugin/Form/Switch.tsx +2 -13
  78. package/src/plugin/Form/TabsTransfer.tsx +2 -13
  79. package/src/plugin/Form/Textarea.tsx +2 -13
  80. package/src/plugin/Form/Transfer.tsx +2 -13
  81. package/src/plugin/Grid.tsx +1 -2
  82. package/src/plugin/IFrame.tsx +1 -3
  83. package/src/plugin/Image.tsx +0 -4
  84. package/src/plugin/Images.tsx +1 -8
  85. package/src/plugin/Json.tsx +1 -8
  86. package/src/plugin/Link.tsx +2 -4
  87. package/src/plugin/List.tsx +1 -4
  88. package/src/plugin/ListItem.tsx +0 -4
  89. package/src/plugin/Mapping.tsx +1 -8
  90. package/src/plugin/Nav.tsx +2 -4
  91. package/src/plugin/Operation.tsx +2 -4
  92. package/src/plugin/Others/Action.tsx +2 -4
  93. package/src/plugin/Others/BasicToolbar.tsx +2 -8
  94. package/src/plugin/Others/TableCell.tsx +1 -1
  95. package/src/plugin/Page.tsx +1 -3
  96. package/src/plugin/Panel.tsx +1 -1
  97. package/src/plugin/Plain.tsx +1 -8
  98. package/src/plugin/Progress.tsx +1 -8
  99. package/src/plugin/QRCode.tsx +1 -3
  100. package/src/plugin/Service.tsx +3 -8
  101. package/src/plugin/Status.tsx +1 -3
  102. package/src/plugin/Steps.tsx +2 -14
  103. package/src/plugin/Table.tsx +4 -16
  104. package/src/plugin/TableView.tsx +2 -4
  105. package/src/plugin/Tabs.tsx +0 -2
  106. package/src/plugin/Tasks.tsx +1 -3
  107. package/src/plugin/Time.tsx +1 -8
  108. package/src/plugin/Tpl.tsx +1 -5
  109. package/src/plugin/Video.tsx +2 -4
  110. package/src/plugin/WebComponent.tsx +1 -4
  111. package/src/plugin/Wizard.tsx +1 -4
  112. package/src/plugin/Wrapper.tsx +1 -1
  113. package/src/plugin.ts +5 -4
@@ -1,5 +1,5 @@
1
+ import { RendererProps } from 'amis';
1
2
  import React from 'react';
2
- import { RendererProps } from 'amis/lib/factory';
3
3
  import { Schema } from 'amis/lib/types';
4
4
  interface ClassNameControlProps extends RendererProps {
5
5
  schema: Schema;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { SchemaApi } from 'amis';
3
- import type { FormControlProps } from 'amis/lib/renderers/Form/Item';
2
+ import type { FormControlProps } from 'amis-core';
3
+ import type { SchemaApi } from 'amis/lib/Schema';
4
4
  export interface APIControlProps extends FormControlProps {
5
5
  name?: string;
6
6
  label?: string;
@@ -4,8 +4,8 @@
4
4
  import React from 'react';
5
5
  import Sortable from 'sortablejs';
6
6
  import type { Option } from 'amis';
7
- import type { FormControlProps } from 'amis/lib/renderers/Form/Item';
8
- import type { OptionValue } from 'amis/lib/components/Select';
7
+ import type { FormControlProps } from 'amis-core';
8
+ import type { OptionValue } from 'amis-core';
9
9
  export declare type valueType = 'text' | 'boolean' | 'number';
10
10
  export interface PopoverForm {
11
11
  optionLabel: string;
@@ -58,7 +58,7 @@ export declare class OptionControl extends React.Component<OptionControlProps, O
58
58
  hidden?: boolean | undefined;
59
59
  description?: string | undefined;
60
60
  defer?: boolean | undefined;
61
- deferApi?: import("amis").SchemaApi | undefined;
61
+ deferApi?: string | import("amis").BaseApiObject | undefined;
62
62
  loading?: boolean | undefined;
63
63
  loaded?: boolean | undefined;
64
64
  }[];
@@ -3,10 +3,10 @@
3
3
  */
4
4
  import React from 'react';
5
5
  import type { Action } from 'amis/lib/types';
6
- import type { IScopedContext } from 'amis/lib/Scoped';
7
- import type { FormSchema } from 'amis/lib/renderers/Form';
8
- import type { FormControlProps } from 'amis/lib/renderers/Form/Item';
9
- import type { Offset } from 'amis/lib/components/PopOver';
6
+ import type { IScopedContext } from 'amis-core';
7
+ import type { FormControlProps } from 'amis-core';
8
+ import type { FormSchema } from 'amis/lib/Schema';
9
+ import type { Offset } from 'amis-ui/lib/components/PopOver';
10
10
  export interface PopoverEditProps extends FormControlProps {
11
11
  className?: string;
12
12
  popOverclassName?: string;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  /// <reference types="lodash" />
5
5
  import React from 'react';
6
- import type { FormControlProps } from 'amis/lib/renderers/Form/Item';
6
+ import type { FormControlProps } from 'amis-core';
7
7
  export interface ValidationControlProps extends FormControlProps {
8
8
  }
9
9
  interface Rule {
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
2
2
  import { EditorStoreType } from '../store/editor';
3
3
  import { SchemaObject } from 'amis/lib/Schema';
4
4
  import { EditorManager, PluginClass } from '../manager';
5
- import { RenderOptions } from 'amis/lib/factory';
5
+ import { RenderOptions } from 'amis';
6
6
  import { PluginEventListener } from '../plugin';
7
7
  export interface EditorProps extends PluginEventListener {
8
8
  value: SchemaObject;
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { EditorManager } from '../manager';
3
3
  import { EditorStoreType } from '../store/editor';
4
- import { RendererConfig, RenderOptions } from 'amis/lib/factory';
4
+ import { RenderOptions } from 'amis-core';
5
5
  import { Schema } from 'amis/lib/types';
6
+ import { RendererConfig } from 'amis-core/lib/factory';
6
7
  export interface IFramePreviewProps {
7
8
  className: string;
8
9
  editable?: boolean;
@@ -1,4 +1,4 @@
1
- import { RendererProps } from 'amis/lib/factory';
1
+ import { RendererProps } from 'amis-core';
2
2
  import React from 'react';
3
3
  import { RendererInfo } from '../plugin';
4
4
  import { EditorNodeType } from '../store/node';
@@ -1,8 +1,9 @@
1
1
  import React, { Component } from 'react';
2
- import { RendererConfig, RenderOptions } from 'amis/lib/factory';
2
+ import { RenderOptions } from 'amis-core';
3
3
  import { Schema } from 'amis/lib/types';
4
4
  import { EditorStoreType } from '../store/editor';
5
5
  import { EditorManager } from '../manager';
6
+ import { RendererConfig } from 'amis-core/lib/factory';
6
7
  export interface PreviewProps {
7
8
  theme?: string;
8
9
  amisEnv?: any;
@@ -62,4 +63,5 @@ export interface SmartPreviewProps {
62
63
  store: EditorStoreType;
63
64
  env: any;
64
65
  data?: any;
66
+ manager: EditorManager;
65
67
  }
@@ -14,7 +14,7 @@ export declare class ScaffoldModal extends React.Component<SubEditorProps> {
14
14
  wrapWithPanel: boolean;
15
15
  initApi: any;
16
16
  api: any;
17
- mode: "horizontal" | "inline" | "normal";
17
+ mode: "normal" | "horizontal" | "inline";
18
18
  wrapperComponent: string;
19
19
  };
20
20
  amisScope: any;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { RendererProps } from 'amis/lib/factory';
2
+ import { RendererProps } from 'amis-core';
3
3
  interface InputComponentNameProps extends RendererProps {
4
4
  value: any;
5
5
  onChange: (value: any) => void;
package/dist/env.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * 传给 amis 渲染器的默认 env
3
3
  */
4
- import { RenderOptions } from 'amis/lib/factory';
4
+ import { RenderOptions } from 'amis-core';
5
5
  export declare const env: RenderOptions;