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,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-core/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;
@@ -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;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ export interface ShortcutKeyProps {
3
+ title?: string;
4
+ size?: string;
5
+ closeOnEsc?: boolean;
6
+ closeOnOutside?: boolean;
7
+ ShortcutKeyList?: Array<ShortcutKeyItem>;
8
+ }
9
+ interface ShortcutKeyItem {
10
+ title: string;
11
+ letters: Array<string>;
12
+ tooltip?: string;
13
+ }
14
+ export interface ShortcutKeyStates {
15
+ visible: boolean;
16
+ }
17
+ export default class ShortcutKey extends React.Component<ShortcutKeyProps, ShortcutKeyStates> {
18
+ constructor(props: any);
19
+ closeShortcutKeyModal(): void;
20
+ showShortcutKeyModal(): void;
21
+ render(): JSX.Element;
22
+ }
23
+ export {};
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;