amis-editor 4.1.0-beta.28 → 4.2.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) 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 +2 -1
  10. package/dist/component/base/InputComponentName.d.ts +1 -1
  11. package/dist/component/base/ShortcutKey.d.ts +23 -0
  12. package/dist/env.d.ts +1 -1
  13. package/dist/exports.min.js +1 -1
  14. package/dist/index.d.ts +2 -1
  15. package/dist/index.min.js +1 -1
  16. package/dist/manager.d.ts +3 -2
  17. package/dist/plugin/Alert.d.ts +1 -1
  18. package/dist/plugin/Button.d.ts +1 -1
  19. package/dist/plugin/Dialog.d.ts +1 -1
  20. package/dist/plugin/Drawer.d.ts +1 -1
  21. package/dist/plugin/Form/Formula.d.ts +3 -3
  22. package/dist/plugin/IFrame.d.ts +3 -3
  23. package/dist/plugin/Page.d.ts +1 -1
  24. package/dist/plugin/Table.d.ts +1 -1
  25. package/dist/plugin.d.ts +3 -3
  26. package/dist/store/editor.d.ts +27 -9
  27. package/dist/style.css +1 -1
  28. package/dist/util.d.ts +1 -1
  29. package/package.json +5 -3
  30. package/src/plugin/Alert.tsx +1 -1
  31. package/src/plugin/AnchorNav.tsx +1 -1
  32. package/src/plugin/Audio.tsx +1 -8
  33. package/src/plugin/Button.tsx +2 -4
  34. package/src/plugin/ButtonGroup.tsx +3 -6
  35. package/src/plugin/ButtonToolbar.tsx +4 -6
  36. package/src/plugin/CRUD.tsx +4 -4
  37. package/src/plugin/Card.tsx +1 -1
  38. package/src/plugin/Cards.tsx +1 -1
  39. package/src/plugin/Carousel.tsx +3 -12
  40. package/src/plugin/Chart.tsx +1 -1
  41. package/src/plugin/Collapse.tsx +1 -8
  42. package/src/plugin/Container.tsx +2 -6
  43. package/src/plugin/Date.tsx +1 -8
  44. package/src/plugin/Datetime.tsx +1 -8
  45. package/src/plugin/Dialog.tsx +2 -4
  46. package/src/plugin/Drawer.tsx +3 -6
  47. package/src/plugin/DropDownButton.tsx +2 -4
  48. package/src/plugin/Each.tsx +2 -7
  49. package/src/plugin/Flex.tsx +4 -9
  50. package/src/plugin/Form/ButtonGroupSelect.tsx +2 -13
  51. package/src/plugin/Form/ButtonToolbar.tsx +2 -13
  52. package/src/plugin/Form/CodeEditor.tsx +2 -12
  53. package/src/plugin/Form/Combo.tsx +1 -1
  54. package/src/plugin/Form/ConditionBuilder.tsx +4 -13
  55. package/src/plugin/Form/DiffEditor.tsx +1 -7
  56. package/src/plugin/Form/FieldSet.tsx +3 -15
  57. package/src/plugin/Form/Form.tsx +1 -6
  58. package/src/plugin/Form/Formula.tsx +2 -14
  59. package/src/plugin/Form/Group.tsx +2 -7
  60. package/src/plugin/Form/Hidden.tsx +1 -13
  61. package/src/plugin/Form/InputFile.tsx +1 -8
  62. package/src/plugin/Form/InputGroup.tsx +4 -13
  63. package/src/plugin/Form/InputImage.tsx +2 -13
  64. package/src/plugin/Form/InputNumber.tsx +2 -10
  65. package/src/plugin/Form/InputRepeat.tsx +5 -17
  66. package/src/plugin/Form/InputRichText.tsx +2 -13
  67. package/src/plugin/Form/InputSubForm.tsx +2 -11
  68. package/src/plugin/Form/InputTable.tsx +1 -1
  69. package/src/plugin/Form/InputTag.tsx +2 -13
  70. package/src/plugin/Form/InputTime.tsx +2 -12
  71. package/src/plugin/Form/InputTree.tsx +2 -13
  72. package/src/plugin/Form/ListSelect.tsx +2 -13
  73. package/src/plugin/Form/LocationPicker.tsx +1 -14
  74. package/src/plugin/Form/MatrixCheckboxes.tsx +2 -13
  75. package/src/plugin/Form/NestedSelect.tsx +2 -13
  76. package/src/plugin/Form/Picker.tsx +2 -10
  77. package/src/plugin/Form/Radios.tsx +2 -13
  78. package/src/plugin/Form/Static.tsx +2 -15
  79. package/src/plugin/Form/Switch.tsx +2 -13
  80. package/src/plugin/Form/TabsTransfer.tsx +2 -13
  81. package/src/plugin/Form/Textarea.tsx +2 -13
  82. package/src/plugin/Form/Transfer.tsx +2 -13
  83. package/src/plugin/Grid.tsx +1 -2
  84. package/src/plugin/IFrame.tsx +1 -3
  85. package/src/plugin/Image.tsx +0 -4
  86. package/src/plugin/Images.tsx +1 -8
  87. package/src/plugin/Json.tsx +1 -8
  88. package/src/plugin/Link.tsx +2 -4
  89. package/src/plugin/List.tsx +1 -4
  90. package/src/plugin/ListItem.tsx +0 -4
  91. package/src/plugin/Mapping.tsx +1 -8
  92. package/src/plugin/Nav.tsx +2 -4
  93. package/src/plugin/Operation.tsx +2 -4
  94. package/src/plugin/Others/Action.tsx +2 -4
  95. package/src/plugin/Others/BasicToolbar.tsx +2 -8
  96. package/src/plugin/Others/TableCell.tsx +1 -1
  97. package/src/plugin/Page.tsx +1 -3
  98. package/src/plugin/Panel.tsx +1 -1
  99. package/src/plugin/Plain.tsx +1 -8
  100. package/src/plugin/Progress.tsx +1 -8
  101. package/src/plugin/QRCode.tsx +1 -3
  102. package/src/plugin/Service.tsx +3 -8
  103. package/src/plugin/Status.tsx +1 -3
  104. package/src/plugin/Steps.tsx +2 -14
  105. package/src/plugin/Table.tsx +4 -16
  106. package/src/plugin/TableView.tsx +2 -4
  107. package/src/plugin/Tabs.tsx +0 -2
  108. package/src/plugin/Tasks.tsx +1 -3
  109. package/src/plugin/Time.tsx +1 -8
  110. package/src/plugin/Tpl.tsx +1 -5
  111. package/src/plugin/Video.tsx +2 -4
  112. package/src/plugin/WebComponent.tsx +1 -4
  113. package/src/plugin/Wizard.tsx +1 -4
  114. package/src/plugin/Wrapper.tsx +1 -1
  115. package/src/plugin.ts +5 -4
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class RepeatControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -56,10 +45,9 @@ export class RepeatControlPlugin extends BasePlugin {
56
45
  name: 'options',
57
46
  type: 'select',
58
47
  label: '启用单位',
59
- options:
60
- 'secondly,minutely,hourly,daily,weekdays,weekly,monthly,yearly'.split(
61
- ','
62
- ),
48
+ options: 'secondly,minutely,hourly,daily,weekdays,weekly,monthly,yearly'.split(
49
+ ','
50
+ ),
63
51
  value: 'hourly,daily,weekly,monthly',
64
52
  multiple: true
65
53
  }
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class RichTextControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,21 +1,12 @@
1
- import {Button, relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
1
+ import {Button} from 'amis';
3
2
  import React from 'react';
4
- import {
5
- defaultValue,
6
- getSchemaTpl,
7
- valuePipeOut
8
- } from '../../component/schemaTpl';
9
3
  import {registerEditorPlugin} from '../../manager';
10
4
  import {
11
5
  BaseEventContext,
12
6
  BasePlugin,
13
- BasicSubRenderInfo,
14
7
  BasicToolbarItem,
15
8
  ContextMenuEventContext,
16
- ContextMenuItem,
17
- RendererEventContext,
18
- SubRendererInfo
9
+ ContextMenuItem
19
10
  } from '../../plugin';
20
11
  import {diff, JSONPipeOut} from '../../util';
21
12
 
@@ -14,7 +14,7 @@ import {
14
14
  SubRendererInfo,
15
15
  RegionConfig
16
16
  } from '../../plugin';
17
- import {setVariable} from 'amis/lib/utils/helper';
17
+ import {setVariable} from 'amis-core';
18
18
  import {repeatArray} from '../../util';
19
19
  import {mockValue} from '../../mocker';
20
20
 
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class TagControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,17 +1,7 @@
1
1
  import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
2
+ import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
8
3
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
4
+ import {BasePlugin} from '../../plugin';
15
5
 
16
6
  export class TimeControlPlugin extends BasePlugin {
17
7
  // 关联渲染器名字
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class TreeControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class ListControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,18 +1,5 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import React from 'react';
4
- import {
5
- defaultValue,
6
- getSchemaTpl,
7
- valuePipeOut
8
- } from '../../component/schemaTpl';
9
1
  import {registerEditorPlugin} from '../../manager';
10
- import {
11
- BasePlugin,
12
- BasicSubRenderInfo,
13
- RendererEventContext,
14
- SubRendererInfo
15
- } from '../../plugin';
2
+ import {BasePlugin} from '../../plugin';
16
3
 
17
4
  export class LocationControlPlugin extends BasePlugin {
18
5
  // 关联渲染器名字
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class MatrixControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class NestedSelectControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,22 +1,14 @@
1
1
  import React from 'react';
2
2
  import {Button} from 'amis';
3
3
  import omit = require('lodash/omit');
4
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
5
- import {
6
- defaultValue,
7
- getSchemaTpl,
8
- valuePipeOut
9
- } from '../../component/schemaTpl';
4
+ import {getSchemaTpl} from '../../component/schemaTpl';
10
5
  import {registerEditorPlugin} from '../../manager';
11
6
  import {
12
7
  BaseEventContext,
13
8
  BasePlugin,
14
- BasicSubRenderInfo,
15
9
  BasicToolbarItem,
16
10
  ContextMenuEventContext,
17
- ContextMenuItem,
18
- RendererEventContext,
19
- SubRendererInfo
11
+ ContextMenuItem
20
12
  } from '../../plugin';
21
13
  import {diff} from '../../../src/util';
22
14
 
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
  import flatten = require('lodash/flatten');
16
5
 
17
6
  export class RadiosControlPlugin extends BasePlugin {
@@ -1,21 +1,8 @@
1
1
  import React from 'react';
2
2
  import {Button} from 'amis';
3
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
4
- import {
5
- defaultValue,
6
- getSchemaTpl,
7
- valuePipeOut
8
- } from '../../component/schemaTpl';
3
+ import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
9
4
  import {registerEditorPlugin} from '../../manager';
10
- import {
11
- BaseEventContext,
12
- BasePlugin,
13
- BasicSubRenderInfo,
14
- PluginEvent,
15
- RendererEventContext,
16
- ReplaceEventContext,
17
- SubRendererInfo
18
- } from '../../plugin';
5
+ import {BaseEventContext, BasePlugin} from '../../plugin';
19
6
  import {EditorNodeType} from '../../store/node';
20
7
  import {mockValue} from '../../mocker';
21
8
 
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl, valuePipeOut} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class SwitchControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class TabsTransferPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class TextareaControlPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,17 +1,6 @@
1
- import {relativeValueRe} from 'amis';
2
- import {availableLanguages} from 'amis/lib/renderers/Form/Editor';
3
- import {
4
- defaultValue,
5
- getSchemaTpl,
6
- valuePipeOut
7
- } from '../../component/schemaTpl';
1
+ import {getSchemaTpl} from '../../component/schemaTpl';
8
2
  import {registerEditorPlugin} from '../../manager';
9
- import {
10
- BasePlugin,
11
- BasicSubRenderInfo,
12
- RendererEventContext,
13
- SubRendererInfo
14
- } from '../../plugin';
3
+ import {BasePlugin} from '../../plugin';
15
4
 
16
5
  export class TransferPlugin extends BasePlugin {
17
6
  // 关联渲染器名字
@@ -1,4 +1,4 @@
1
- import {Button, SchemaObject} from 'amis';
1
+ import {Button} from 'amis';
2
2
  import React from 'react';
3
3
  import {registerEditorPlugin} from '../manager';
4
4
  import {
@@ -7,7 +7,6 @@ import {
7
7
  ContextMenuEventContext,
8
8
  ContextMenuItem,
9
9
  PluginEvent,
10
- RegionConfig,
11
10
  ResizeMoveEventContext,
12
11
  RendererJSONSchemaResolveEventContext,
13
12
  VRendererConfig
@@ -1,7 +1,5 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import React from 'react';
3
1
  import {registerEditorPlugin} from '../manager';
4
- import {BasePlugin, RegionConfig, RendererInfo} from '../plugin';
2
+ import {BasePlugin} from '../plugin';
5
3
  import {defaultValue, getSchemaTpl, valuePipeOut} from '../component/schemaTpl';
6
4
 
7
5
  export class IFramePlugin extends BasePlugin {
@@ -1,13 +1,9 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import React from 'react';
3
1
  import {registerEditorPlugin} from '../manager';
4
2
  import {
5
3
  ActiveEventContext,
6
4
  BaseEventContext,
7
5
  BasePlugin,
8
6
  PluginEvent,
9
- RegionConfig,
10
- RendererInfo,
11
7
  ResizeMoveEventContext
12
8
  } from '../plugin';
13
9
  import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
@@ -1,12 +1,5 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import React from 'react';
3
1
  import {registerEditorPlugin} from '../manager';
4
- import {
5
- BaseEventContext,
6
- BasePlugin,
7
- RegionConfig,
8
- RendererInfo
9
- } from '../plugin';
2
+ import {BaseEventContext, BasePlugin} from '../plugin';
10
3
  import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
11
4
  import {mockValue} from '../mocker';
12
5
 
@@ -1,12 +1,5 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import React from 'react';
3
1
  import {registerEditorPlugin} from '../manager';
4
- import {
5
- BaseEventContext,
6
- BasePlugin,
7
- RegionConfig,
8
- RendererInfo
9
- } from '../plugin';
2
+ import {BaseEventContext, BasePlugin} from '../plugin';
10
3
  import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
11
4
  import flatten = require('lodash/flatten');
12
5
  export class JsonPlugin extends BasePlugin {
@@ -1,8 +1,6 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import React from 'react';
3
1
  import {registerEditorPlugin} from '../manager';
4
- import {BasePlugin, RegionConfig, RendererInfo} from '../plugin';
5
- import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
2
+ import {BasePlugin} from '../plugin';
3
+ import {getSchemaTpl} from '../component/schemaTpl';
6
4
 
7
5
  export class LinkPlugin extends BasePlugin {
8
6
  // 关联渲染器名字
@@ -1,17 +1,14 @@
1
- import {Button, resolveVariable, SchemaObject} from 'amis';
1
+ import {Button, resolveVariable} from 'amis';
2
2
  import React from 'react';
3
3
  import {registerEditorPlugin} from '../manager';
4
4
  import {
5
5
  BaseEventContext,
6
6
  BasePlugin,
7
- BasicPanelItem,
8
7
  BasicRendererInfo,
9
8
  BasicToolbarItem,
10
9
  ContextMenuEventContext,
11
10
  ContextMenuItem,
12
11
  PluginInterface,
13
- RegionConfig,
14
- RendererInfo,
15
12
  RendererInfoResolveEventContext
16
13
  } from '../plugin';
17
14
  import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
@@ -1,21 +1,17 @@
1
- import {Button, SchemaObject} from 'amis';
2
1
  import React from 'react';
3
2
  import {registerEditorPlugin} from '../manager';
4
3
  import {
5
4
  BaseEventContext,
6
5
  BasePlugin,
7
- BasicPanelItem,
8
6
  BasicRendererInfo,
9
7
  InsertEventContext,
10
8
  PluginEvent,
11
- PluginInterface,
12
9
  RegionConfig,
13
10
  RendererInfo,
14
11
  RendererInfoResolveEventContext,
15
12
  VRendererConfig
16
13
  } from '../plugin';
17
14
  import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
18
- import {EditorNodeType} from '../store/node';
19
15
  import {VRenderer} from '../component/VRenderer';
20
16
 
21
17
  export class ListItemPlugin extends BasePlugin {
@@ -1,12 +1,5 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import React from 'react';
3
1
  import {registerEditorPlugin} from '../manager';
4
- import {
5
- BaseEventContext,
6
- BasePlugin,
7
- RegionConfig,
8
- RendererInfo
9
- } from '../plugin';
2
+ import {BaseEventContext, BasePlugin} from '../plugin';
10
3
  import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
11
4
  import {isObject} from '../util';
12
5
 
@@ -1,8 +1,6 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import React from 'react';
3
1
  import {registerEditorPlugin} from '../manager';
4
- import {BasePlugin, RegionConfig, RendererInfo} from '../plugin';
5
- import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
2
+ import {BasePlugin} from '../plugin';
3
+ import {getSchemaTpl} from '../component/schemaTpl';
6
4
 
7
5
  export class NavPlugin extends BasePlugin {
8
6
  // 关联渲染器名字
@@ -1,17 +1,15 @@
1
- import {Button, SchemaObject} from 'amis';
1
+ import {Button} from 'amis';
2
2
  import React from 'react';
3
3
  import {registerEditorPlugin} from '../manager';
4
4
  import {
5
5
  BaseEventContext,
6
6
  BasePlugin,
7
7
  BasicSubRenderInfo,
8
- PluginInterface,
9
8
  RegionConfig,
10
9
  RendererEventContext,
11
- RendererInfo,
12
10
  SubRendererInfo
13
11
  } from '../plugin';
14
- import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
12
+ import {getSchemaTpl} from '../component/schemaTpl';
15
13
 
16
14
  export class OperationPlugin extends BasePlugin {
17
15
  // 关联渲染器名字
@@ -1,5 +1,4 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import flatten from 'lodash/flatten';
1
+ import {Button} from 'amis-ui';
3
2
  import React from 'react';
4
3
  import {registerEditorPlugin} from '../../manager';
5
4
  import {
@@ -7,8 +6,7 @@ import {
7
6
  BasePlugin,
8
7
  BasicPanelItem,
9
8
  BasicToolbarItem,
10
- BuildPanelEventContext,
11
- PluginInterface
9
+ BuildPanelEventContext
12
10
  } from '../../plugin';
13
11
  import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
14
12
  import {diff} from '../../util';
@@ -7,15 +7,11 @@ import {
7
7
  BasicPanelItem,
8
8
  BuildPanelEventContext,
9
9
  PluginEvent,
10
- ActiveEventContext,
11
10
  InsertEventContext
12
11
  } from '../../plugin';
13
12
  import {registerEditorPlugin} from '../../manager';
14
- import find from 'lodash/find';
15
- import {EditorStoreType} from '../../store/editor';
16
13
  import {EditorNodeType} from '../../store/node';
17
- import {AddBTNSvg} from '../../component/RegionHLBox';
18
- import {MenuItem} from 'amis/lib/components/ContextMenu';
14
+ import type {MenuItem} from 'amis-ui/lib/components/ContextMenu';
19
15
 
20
16
  /**
21
17
  * 用来给当前选中的元素添加一些基本的工具栏按钮。
@@ -209,9 +205,7 @@ export class BasicToolbarPlugin extends BasePlugin {
209
205
  order: 1000,
210
206
  onClick: e => {
211
207
  if (!e.defaultPrevented) {
212
- const info = (
213
- e.target as HTMLElement
214
- ).parentElement!.getBoundingClientRect();
208
+ const info = (e.target as HTMLElement).parentElement!.getBoundingClientRect();
215
209
  this.manager.openContextMenu(id, '', {
216
210
  x: window.scrollX + info.left + info.width - 155,
217
211
  y: window.scrollY + info.top + info.height + 8
@@ -10,7 +10,7 @@ import {
10
10
  PluginEvent
11
11
  } from '../../plugin';
12
12
  import {defaultValue, getSchemaTpl} from '../../component/schemaTpl';
13
- import {getVariable} from 'amis/lib/utils/helper';
13
+ import {getVariable} from 'amis-core';
14
14
 
15
15
  export class TableCellPlugin extends BasePlugin {
16
16
  panelTitle = '列配置';
@@ -1,10 +1,8 @@
1
- import {Button, SchemaObject} from 'amis';
2
- import {RendererConfig} from 'amis/lib/factory';
3
- import React from 'react';
4
1
  import {ContainerWrapper} from '../component/ContainerWrapper';
5
2
  import {registerEditorPlugin} from '../manager';
6
3
  import {BasePlugin} from '../plugin';
7
4
  import {getSchemaTpl} from '../component/schemaTpl';
5
+ import type {SchemaObject} from 'amis/lib/Schema';
8
6
 
9
7
  export class PagePlugin extends BasePlugin {
10
8
  // 关联渲染器名字
@@ -1,4 +1,4 @@
1
- import {Button, SchemaObject} from 'amis';
1
+ import {Button} from 'amis';
2
2
  import React from 'react';
3
3
  import {registerEditorPlugin} from '../manager';
4
4
  import {
@@ -1,12 +1,5 @@
1
- import {SchemaObject} from 'amis';
2
1
  import {registerEditorPlugin} from '../manager';
3
- import {
4
- BaseEventContext,
5
- BasePlugin,
6
- BasicPanelItem,
7
- RegionConfig,
8
- RendererInfo
9
- } from '../plugin';
2
+ import {BaseEventContext, BasePlugin} from '../plugin';
10
3
  import {defaultValue, getSchemaTpl} from '../component/schemaTpl';
11
4
 
12
5
  export class PlainPlugin extends BasePlugin {