@atlaskit/editor-plugin-extension 6.1.11 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/types/editor-actions/actions.d.ts +2 -2
- package/dist/types/extensionPluginType.d.ts +21 -21
- package/dist/types/pm-plugins/extension-api.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +3 -3
- package/dist/types/pm-plugins/utils.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +10 -10
- package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +9 -9
- package/dist/types/ui/ConfigPanel/FieldMessages.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/Boolean.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/CheckboxGroup.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/ColorPicker.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/CustomSelect.d.ts +8 -8
- package/dist/types/ui/ConfigPanel/Fields/Date.d.ts +4 -4
- package/dist/types/ui/ConfigPanel/Fields/DateRange.d.ts +4 -4
- package/dist/types/ui/ConfigPanel/Fields/Enum.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +4 -4
- package/dist/types/ui/ConfigPanel/Fields/Number.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/RadioGroup.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Select.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/String.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/UnhandledType.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/UserSelect.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Header/HeaderAfterIconElement.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Header/HeaderIcon.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Header.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/NestedForms/RemovableField.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/types.d.ts +11 -11
- package/dist/types/ui/ConfigPanel/utils.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/withExtensionManifest.d.ts +1 -1
- package/dist/types/ui/SaveIndicator/types.d.ts +1 -1
- package/dist/types/ui/useConfigPanelPluginHook.d.ts +2 -2
- package/dist/types-ts4.5/editor-actions/actions.d.ts +2 -2
- package/dist/types-ts4.5/extensionPluginType.d.ts +21 -21
- package/dist/types-ts4.5/pm-plugins/extension-api.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +10 -10
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +9 -9
- package/dist/types-ts4.5/ui/ConfigPanel/FieldMessages.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Boolean.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/CheckboxGroup.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/ColorPicker.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/CustomSelect.d.ts +8 -8
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Date.d.ts +4 -4
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/DateRange.d.ts +4 -4
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Enum.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Expand.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Fieldset.d.ts +4 -4
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Number.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/RadioGroup.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Select.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/String.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/UnhandledType.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/UserSelect.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/FormErrorBoundary.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/Header/HeaderAfterIconElement.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Header/HeaderIcon.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/Header.d.ts +3 -3
- package/dist/types-ts4.5/ui/ConfigPanel/NestedForms/RemovableField.d.ts +2 -2
- package/dist/types-ts4.5/ui/ConfigPanel/types.d.ts +11 -11
- package/dist/types-ts4.5/ui/ConfigPanel/utils.d.ts +1 -1
- package/dist/types-ts4.5/ui/ConfigPanel/withExtensionManifest.d.ts +1 -1
- package/dist/types-ts4.5/ui/SaveIndicator/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/useConfigPanelPluginHook.d.ts +2 -2
- package/example-utils/config-panel/ConfigPanelWithProviders.tsx +3 -3
- package/example-utils/config-panel/ExtensionNodePicker.tsx +3 -3
- package/example-utils/config-panel/FieldTypePicker.tsx +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 6.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`cfbb4876358a1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cfbb4876358a1) -
|
|
8
|
+
Debounced bodied extension rendering
|
|
9
|
+
|
|
10
|
+
## 6.1.12
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
15
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 6.1.11
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -11,9 +11,9 @@ export declare const buildExtensionNode: <S extends Schema>(type: "inlineExtensi
|
|
|
11
11
|
export declare const performNodeUpdate: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (type: "inlineExtension" | "extension" | "bodiedExtension" | "multiBodiedExtension", newAttrs: object, content: Fragment, marks: readonly Mark[], shouldScrollIntoView: boolean) => Command;
|
|
12
12
|
export declare const editExtension: (macroProvider: MacroProvider | null | undefined, applyChangeToContextPanel: ApplyChangeHandler | undefined, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, updateExtension?: Promise<UpdateExtension<object> | void>) => Command;
|
|
13
13
|
type Props = {
|
|
14
|
-
editorViewRef: Record<'current', EditorView | null>;
|
|
15
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
16
14
|
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
15
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
16
|
+
editorViewRef: Record<'current', EditorView | null>;
|
|
17
17
|
};
|
|
18
18
|
export declare const createEditSelectedExtensionAction: ({ editorViewRef, editorAnalyticsAPI, applyChangeToContextPanel }: Props) => () => boolean;
|
|
19
19
|
export declare const insertOrReplaceExtension: ({ editorView, action, attrs, content, position, size, tr, }: InsertOrReplaceExtensionType) => Transaction;
|
|
@@ -17,38 +17,38 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
17
17
|
import type { forceAutoSave } from './editor-commands/commands';
|
|
18
18
|
export type RejectSave = (reason?: any) => void;
|
|
19
19
|
export type ExtensionState<T extends Parameters = Parameters> = {
|
|
20
|
-
localId?: string;
|
|
21
|
-
autoSaveResolve?: () => void;
|
|
22
20
|
autoSaveReject?: RejectSave;
|
|
23
|
-
|
|
24
|
-
showContextPanel: boolean;
|
|
25
|
-
updateExtension?: Promise<UpdateExtension<T> | void>;
|
|
21
|
+
autoSaveResolve?: () => void;
|
|
26
22
|
element?: HTMLElement;
|
|
27
23
|
extensionProvider?: ExtensionProvider<T>;
|
|
28
|
-
|
|
29
|
-
processParametersAfter?: TransformAfter<T>;
|
|
24
|
+
localId?: string;
|
|
30
25
|
positions?: Record<number, number>;
|
|
26
|
+
processParametersAfter?: TransformAfter<T>;
|
|
27
|
+
processParametersBefore?: TransformBefore<T>;
|
|
28
|
+
showContextPanel: boolean;
|
|
29
|
+
showEditButton: boolean;
|
|
30
|
+
updateExtension?: Promise<UpdateExtension<T> | void>;
|
|
31
31
|
};
|
|
32
32
|
export type ExtensionAction<T extends Parameters = Parameters> = {
|
|
33
|
-
type: 'UPDATE_STATE';
|
|
34
33
|
data: Partial<ExtensionState<T>>;
|
|
34
|
+
type: 'UPDATE_STATE';
|
|
35
35
|
};
|
|
36
36
|
interface CreateExtensionAPIOptions {
|
|
37
|
-
editorView: EditorView;
|
|
38
37
|
applyChange: ApplyChangeHandler | undefined;
|
|
39
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
40
38
|
editInLegacyMacroBrowser?: () => void;
|
|
39
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
40
|
+
editorView: EditorView;
|
|
41
41
|
}
|
|
42
42
|
export type CreateExtensionAPI = (options: CreateExtensionAPIOptions) => ExtensionAPI;
|
|
43
43
|
export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
44
|
-
breakoutEnabled?: boolean;
|
|
45
|
-
extensionHandlers?: ExtensionHandlers;
|
|
46
|
-
appearance?: EditorAppearance;
|
|
47
44
|
__rendererExtensionOptions?: {
|
|
48
|
-
rendererExtensionHandlers?: ExtensionHandlers;
|
|
49
45
|
isAllowedToUseRendererView: (node: ADFEntity) => boolean;
|
|
46
|
+
rendererExtensionHandlers?: ExtensionHandlers;
|
|
50
47
|
showUpdated1PBodiedExtensionUI: (node: ADFEntity) => boolean;
|
|
51
48
|
};
|
|
49
|
+
appearance?: EditorAppearance;
|
|
50
|
+
breakoutEnabled?: boolean;
|
|
51
|
+
extensionHandlers?: ExtensionHandlers;
|
|
52
52
|
/**
|
|
53
53
|
* Helps optimize layout shift while rendering by setting minimum heights before the extension content loads.
|
|
54
54
|
*/
|
|
@@ -57,10 +57,10 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
57
57
|
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
58
58
|
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
|
59
59
|
export type InsertOrReplaceExtensionType = {
|
|
60
|
-
editorView: EditorView;
|
|
61
60
|
action: 'insert' | 'replace';
|
|
62
61
|
attrs: object;
|
|
63
62
|
content: Fragment;
|
|
63
|
+
editorView: EditorView;
|
|
64
64
|
position: number;
|
|
65
65
|
size: number;
|
|
66
66
|
tr: Transaction;
|
|
@@ -76,22 +76,22 @@ export type ExtensionPluginDependencies = [
|
|
|
76
76
|
OptionalPlugin<ConnectivityPlugin>
|
|
77
77
|
];
|
|
78
78
|
export type ExtensionPluginActions = {
|
|
79
|
-
editSelectedExtension: () => boolean;
|
|
80
79
|
api: () => ExtensionAPI;
|
|
80
|
+
editSelectedExtension: () => boolean;
|
|
81
|
+
forceAutoSave: typeof forceAutoSave;
|
|
81
82
|
insertMacroFromMacroBrowser: InsertMacroFromMacroBrowser;
|
|
82
|
-
insertOrReplaceExtension: InsertOrReplaceExtensionAction;
|
|
83
83
|
insertOrReplaceBodiedExtension: InsertOrReplaceExtensionAction;
|
|
84
|
+
insertOrReplaceExtension: InsertOrReplaceExtensionAction;
|
|
84
85
|
runMacroAutoConvert: RunMacroAutoConvert;
|
|
85
|
-
forceAutoSave: typeof forceAutoSave;
|
|
86
86
|
};
|
|
87
87
|
export type ExtensionPlugin = NextEditorPlugin<'extension', {
|
|
88
|
-
|
|
88
|
+
actions: ExtensionPluginActions;
|
|
89
89
|
dependencies: ExtensionPluginDependencies;
|
|
90
|
+
pluginConfiguration: ExtensionPluginOptions | undefined;
|
|
90
91
|
sharedState: {
|
|
91
|
-
showContextPanel: boolean | undefined;
|
|
92
92
|
extensionProvider?: ExtensionState['extensionProvider'];
|
|
93
93
|
processParametersAfter?: ExtensionState['processParametersAfter'];
|
|
94
|
+
showContextPanel: boolean | undefined;
|
|
94
95
|
} | undefined;
|
|
95
|
-
actions: ExtensionPluginActions;
|
|
96
96
|
}>;
|
|
97
97
|
export {};
|
|
@@ -3,9 +3,9 @@ import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { CreateExtensionAPI } from '../extensionPluginType';
|
|
5
5
|
interface EditInLegacyMacroBrowserArgs {
|
|
6
|
-
view: EditorView;
|
|
7
6
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
8
7
|
macroProvider?: MacroProvider;
|
|
8
|
+
view: EditorView;
|
|
9
9
|
}
|
|
10
10
|
export declare const getEditInLegacyMacroBrowser: ({ view, macroProvider, editorAnalyticsAPI, }: EditInLegacyMacroBrowserArgs) => () => void;
|
|
11
11
|
export declare const createExtensionAPI: CreateExtensionAPI;
|
|
@@ -11,11 +11,11 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
11
11
|
import type { ExtensionPlugin, ExtensionPluginOptions } from '../extensionPluginType';
|
|
12
12
|
export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
|
|
13
13
|
export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: {
|
|
14
|
-
|
|
15
|
-
prevState: EditorState;
|
|
14
|
+
applyChange: ApplyChangeHandler | undefined;
|
|
16
15
|
domAtPos: EditorView["domAtPos"];
|
|
17
16
|
extensionHandlers: ExtensionHandlers;
|
|
18
|
-
|
|
17
|
+
prevState: EditorState;
|
|
18
|
+
view: EditorView;
|
|
19
19
|
}) => true | undefined;
|
|
20
20
|
export declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
21
21
|
appearance?: EditorAppearance;
|
|
@@ -8,8 +8,8 @@ export declare const getDataConsumerMark: (newNode: PMNode) => Mark | undefined;
|
|
|
8
8
|
export declare const getNodeTypesReferenced: (ids: string[], state: EditorState) => string[];
|
|
9
9
|
export declare const findNodePosWithLocalId: (state: EditorState, localId: string) => NodeWithPos | undefined;
|
|
10
10
|
export interface Position {
|
|
11
|
-
top?: number;
|
|
12
|
-
right?: number;
|
|
13
11
|
bottom?: number;
|
|
14
12
|
left?: number;
|
|
13
|
+
right?: number;
|
|
14
|
+
top?: number;
|
|
15
15
|
}
|
|
@@ -4,20 +4,20 @@ import type { ExtensionManifest, FieldDefinition, OnSaveCallback, OnSaveCallback
|
|
|
4
4
|
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { ExtensionPlugin, RejectSave } from '../../extensionPluginType';
|
|
6
6
|
declare const result: React.ForwardRefExoticComponent<Omit<Omit<{
|
|
7
|
-
|
|
8
|
-
fields?: FieldDefinition[];
|
|
9
|
-
parameters?: Parameters;
|
|
10
|
-
autoSaveTrigger?: () => void;
|
|
7
|
+
api: ExtractInjectionAPI<ExtensionPlugin> | undefined;
|
|
11
8
|
autoSaveReject?: RejectSave;
|
|
12
|
-
|
|
9
|
+
autoSaveTrigger?: () => void;
|
|
13
10
|
closeOnEsc?: boolean;
|
|
14
|
-
|
|
15
|
-
onCancel: () => void | Promise<void>;
|
|
11
|
+
disableFields?: boolean;
|
|
16
12
|
errorMessage: string | null;
|
|
17
|
-
|
|
13
|
+
extensionManifest?: ExtensionManifest;
|
|
18
14
|
featureFlags?: FeatureFlags;
|
|
19
|
-
|
|
15
|
+
fields?: FieldDefinition[];
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
onCancel: () => void | Promise<void>;
|
|
18
|
+
onChange: OnSaveCallback | OnSaveCallbackAsync;
|
|
19
|
+
parameters?: Parameters;
|
|
20
|
+
showHeader?: boolean;
|
|
20
21
|
usingObjectSidebarPanel?: boolean;
|
|
21
|
-
disableFields?: boolean;
|
|
22
22
|
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "ref"> & React.RefAttributes<any>>;
|
|
23
23
|
export default result;
|
|
@@ -3,20 +3,20 @@ import type { ExtensionKey, ExtensionProvider, ExtensionType, Parameters } from
|
|
|
3
3
|
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { ExtensionPlugin, RejectSave } from '../../extensionPluginType';
|
|
5
5
|
export type PublicProps = {
|
|
6
|
+
api: ExtractInjectionAPI<ExtensionPlugin> | undefined;
|
|
7
|
+
autoSaveReject?: RejectSave;
|
|
8
|
+
autoSaveTrigger?: () => void;
|
|
9
|
+
closeOnEsc?: boolean;
|
|
10
|
+
extensionKey: ExtensionKey;
|
|
11
|
+
extensionParameters?: Parameters;
|
|
6
12
|
extensionProvider: ExtensionProvider;
|
|
7
13
|
extensionType: ExtensionType;
|
|
8
|
-
|
|
14
|
+
featureFlags?: FeatureFlags;
|
|
9
15
|
nodeKey: string;
|
|
10
|
-
|
|
16
|
+
onCancel: () => void | Promise<void>;
|
|
17
|
+
onChange: (data: Parameters) => void | Promise<void>;
|
|
11
18
|
parameters?: Parameters;
|
|
12
|
-
autoSaveTrigger?: () => void;
|
|
13
|
-
autoSaveReject?: RejectSave;
|
|
14
|
-
closeOnEsc?: boolean;
|
|
15
19
|
showHeader?: boolean;
|
|
16
|
-
featureFlags?: FeatureFlags;
|
|
17
|
-
onChange: (data: Parameters) => void | Promise<void>;
|
|
18
|
-
onCancel: () => void | Promise<void>;
|
|
19
|
-
api: ExtractInjectionAPI<ExtensionPlugin> | undefined;
|
|
20
20
|
usingObjectSidebarPanel?: boolean;
|
|
21
21
|
};
|
|
22
22
|
export default function FieldsLoader({ extensionType, extensionKey, nodeKey, extensionProvider, extensionParameters, parameters, autoSaveTrigger, autoSaveReject, closeOnEsc, showHeader, featureFlags, onChange, onCancel, api, usingObjectSidebarPanel, }: PublicProps): React.JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
4
|
-
error?: string;
|
|
5
4
|
description?: string;
|
|
5
|
+
error?: string;
|
|
6
6
|
} & WrappedComponentProps>> & {
|
|
7
7
|
WrappedComponent: React.ComponentType<{
|
|
8
|
-
error?: string;
|
|
9
8
|
description?: string;
|
|
9
|
+
error?: string;
|
|
10
10
|
} & WrappedComponentProps>;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { BooleanField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
export default function Boolean({ name, field, onFieldChange, }: {
|
|
5
|
-
name: string;
|
|
6
5
|
field: BooleanField;
|
|
6
|
+
name: string;
|
|
7
7
|
onFieldChange: OnFieldChange;
|
|
8
8
|
}): jsx.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { EnumCheckboxField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
export default function CheckboxGroup({ name, field, onFieldChange, }: {
|
|
5
|
-
name: string;
|
|
6
5
|
field: EnumCheckboxField;
|
|
6
|
+
name: string;
|
|
7
7
|
onFieldChange: OnFieldChange;
|
|
8
8
|
}): jsx.JSX.Element;
|
|
@@ -12,9 +12,9 @@ export declare const extendedColorPalette: PaletteColor[];
|
|
|
12
12
|
export declare const EXPANDED_COLOR_PICKER_COLUMNS = 9;
|
|
13
13
|
export declare const ORIGINAL_COLOR_PICKER_COLUMNS = 5;
|
|
14
14
|
declare const ColorPickerField: ({ name, field, onFieldChange, featureFlags, }: {
|
|
15
|
-
|
|
15
|
+
featureFlags?: FeatureFlags;
|
|
16
16
|
field: ColorField;
|
|
17
|
+
name: string;
|
|
17
18
|
onFieldChange: OnFieldChange;
|
|
18
|
-
featureFlags?: FeatureFlags;
|
|
19
19
|
}) => jsx.JSX.Element;
|
|
20
20
|
export default ColorPickerField;
|
|
@@ -3,22 +3,22 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
3
3
|
import type { CustomField, ExtensionManifest, Parameters } from '@atlaskit/editor-common/extensions';
|
|
4
4
|
import type { OnFieldChange } from '../types';
|
|
5
5
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
6
|
-
|
|
7
|
-
field: CustomField;
|
|
6
|
+
autoFocus?: boolean;
|
|
8
7
|
extensionManifest: ExtensionManifest;
|
|
8
|
+
field: CustomField;
|
|
9
|
+
name: string;
|
|
9
10
|
onFieldChange: OnFieldChange;
|
|
10
|
-
autoFocus?: boolean;
|
|
11
|
-
placeholder?: string;
|
|
12
11
|
parameters?: Parameters;
|
|
12
|
+
placeholder?: string;
|
|
13
13
|
} & WrappedComponentProps>> & {
|
|
14
14
|
WrappedComponent: React.ComponentType<{
|
|
15
|
-
|
|
16
|
-
field: CustomField;
|
|
15
|
+
autoFocus?: boolean;
|
|
17
16
|
extensionManifest: ExtensionManifest;
|
|
17
|
+
field: CustomField;
|
|
18
|
+
name: string;
|
|
18
19
|
onFieldChange: OnFieldChange;
|
|
19
|
-
autoFocus?: boolean;
|
|
20
|
-
placeholder?: string;
|
|
21
20
|
parameters?: Parameters;
|
|
21
|
+
placeholder?: string;
|
|
22
22
|
} & WrappedComponentProps>;
|
|
23
23
|
};
|
|
24
24
|
export default _default;
|
|
@@ -3,16 +3,16 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
3
3
|
import type { DateField } from '@atlaskit/editor-common/extensions';
|
|
4
4
|
import type { OnFieldChange } from '../types';
|
|
5
5
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
6
|
-
name: string;
|
|
7
|
-
field: DateField;
|
|
8
6
|
autoFocus?: boolean;
|
|
7
|
+
field: DateField;
|
|
8
|
+
name: string;
|
|
9
9
|
onFieldChange: OnFieldChange;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
} & WrappedComponentProps>> & {
|
|
12
12
|
WrappedComponent: React.ComponentType<{
|
|
13
|
-
name: string;
|
|
14
|
-
field: DateField;
|
|
15
13
|
autoFocus?: boolean;
|
|
14
|
+
field: DateField;
|
|
15
|
+
name: string;
|
|
16
16
|
onFieldChange: OnFieldChange;
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
} & WrappedComponentProps>;
|
|
@@ -2,17 +2,17 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
2
2
|
import type { DateRangeField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<{
|
|
5
|
-
|
|
5
|
+
autoFocus?: boolean;
|
|
6
6
|
field: DateRangeField;
|
|
7
|
+
name: string;
|
|
7
8
|
onFieldChange: OnFieldChange;
|
|
8
|
-
autoFocus?: boolean;
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
} & WrappedComponentProps>> & {
|
|
11
11
|
WrappedComponent: import("react").ComponentType<{
|
|
12
|
-
|
|
12
|
+
autoFocus?: boolean;
|
|
13
13
|
field: DateRangeField;
|
|
14
|
+
name: string;
|
|
14
15
|
onFieldChange: OnFieldChange;
|
|
15
|
-
autoFocus?: boolean;
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
} & WrappedComponentProps>;
|
|
18
18
|
};
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { EnumField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
export default function Enum({ name, field, autoFocus, onFieldChange, fieldDefaultValue, }: {
|
|
5
|
-
name: string;
|
|
6
|
-
field: EnumField;
|
|
7
5
|
autoFocus: boolean;
|
|
8
|
-
|
|
6
|
+
field: EnumField;
|
|
9
7
|
fieldDefaultValue?: string | string[];
|
|
8
|
+
name: string;
|
|
9
|
+
onFieldChange: OnFieldChange;
|
|
10
10
|
}): React.JSX.Element;
|
|
@@ -6,8 +6,8 @@ import React from 'react';
|
|
|
6
6
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
import type { FieldDefinition } from '@atlaskit/editor-common/extensions';
|
|
8
8
|
type Props = {
|
|
9
|
-
field: FieldDefinition;
|
|
10
9
|
children: React.ReactNode;
|
|
10
|
+
field: FieldDefinition;
|
|
11
11
|
isExpanded?: boolean;
|
|
12
12
|
} & WrappedComponentProps;
|
|
13
13
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props>> & {
|
|
@@ -7,14 +7,14 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
7
7
|
import type { ExtensionManifest, Fieldset, Parameters } from '@atlaskit/editor-common/extensions';
|
|
8
8
|
import type { FormContentProps, OnFieldChange } from '../types';
|
|
9
9
|
type Props = {
|
|
10
|
-
|
|
10
|
+
error?: string;
|
|
11
11
|
extensionManifest: ExtensionManifest;
|
|
12
12
|
field: Fieldset;
|
|
13
|
-
parameters?: Parameters;
|
|
14
|
-
onFieldChange: OnFieldChange;
|
|
15
13
|
firstVisibleFieldName?: string;
|
|
16
|
-
error?: string;
|
|
17
14
|
formComponent: (props: FormContentProps) => JSX.Element;
|
|
15
|
+
name: string;
|
|
16
|
+
onFieldChange: OnFieldChange;
|
|
17
|
+
parameters?: Parameters;
|
|
18
18
|
} & WrappedComponentProps;
|
|
19
19
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props>> & {
|
|
20
20
|
WrappedComponent: React.ComponentType<Props>;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { NumberField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
export default function Number({ name, field, autoFocus, onFieldChange, placeholder, }: {
|
|
5
|
-
name: string;
|
|
6
|
-
field: NumberField;
|
|
7
5
|
autoFocus?: boolean;
|
|
6
|
+
field: NumberField;
|
|
7
|
+
name: string;
|
|
8
8
|
onFieldChange: OnFieldChange;
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
}): React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { EnumRadioField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
export default function RadioField({ name, field, onFieldChange, }: {
|
|
5
|
-
name: string;
|
|
6
5
|
field: EnumRadioField;
|
|
6
|
+
name: string;
|
|
7
7
|
onFieldChange: OnFieldChange;
|
|
8
8
|
}): React.JSX.Element;
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import type { EnumSelectField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
export default function SelectField({ name, field, onFieldChange, autoFocus, placeholder, fieldDefaultValue, }: {
|
|
5
|
-
|
|
5
|
+
autoFocus?: boolean;
|
|
6
6
|
field: EnumSelectField;
|
|
7
|
+
fieldDefaultValue?: string | string[];
|
|
8
|
+
name: string;
|
|
7
9
|
onFieldChange: OnFieldChange;
|
|
8
|
-
autoFocus?: boolean;
|
|
9
10
|
placeholder?: string;
|
|
10
|
-
fieldDefaultValue?: string | string[];
|
|
11
11
|
}): React.JSX.Element;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { StringField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
export default function String({ name, field, autoFocus, onFieldChange, placeholder, }: {
|
|
5
|
-
name: string;
|
|
6
|
-
field: StringField;
|
|
7
5
|
autoFocus?: boolean;
|
|
6
|
+
field: StringField;
|
|
7
|
+
name: string;
|
|
8
8
|
onFieldChange: OnFieldChange;
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
}): React.JSX.Element;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import type { ExtensionManifest, UserField } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import type { OnFieldChange } from '../types';
|
|
4
4
|
export default function UserSelect({ name, autoFocus, extensionManifest, field, onFieldChange, }: {
|
|
5
|
-
|
|
6
|
-
field: UserField;
|
|
5
|
+
autoFocus?: boolean;
|
|
7
6
|
extensionManifest: ExtensionManifest;
|
|
7
|
+
field: UserField;
|
|
8
|
+
name: string;
|
|
8
9
|
onFieldChange: OnFieldChange;
|
|
9
|
-
autoFocus?: boolean;
|
|
10
10
|
}): React.JSX.Element;
|
|
@@ -4,10 +4,10 @@ import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
|
4
4
|
import type { FieldDefinition } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
interface Props {
|
|
7
|
-
fields: FieldDefinition[];
|
|
8
|
-
extensionKey: string;
|
|
9
|
-
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
10
7
|
children: React.ReactNode;
|
|
8
|
+
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
9
|
+
extensionKey: string;
|
|
10
|
+
fields: FieldDefinition[];
|
|
11
11
|
}
|
|
12
12
|
export declare const FormErrorBoundaryImpl: React.FC<import("react-intl-next").WithIntlProps<Props & WithAnalyticsEventsProps & WrappedComponentProps>> & {
|
|
13
13
|
WrappedComponent: React.ComponentType<Props & WithAnalyticsEventsProps & WrappedComponentProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: (props: {
|
|
3
|
+
extensionKey: import("@atlaskit/editor-common/extensions").ExtensionKey;
|
|
3
4
|
extensionProvider: import("@atlaskit/editor-common/extensions").ExtensionProvider;
|
|
4
5
|
extensionType: import("@atlaskit/editor-common/extensions").ExtensionType;
|
|
5
|
-
extensionKey: import("@atlaskit/editor-common/extensions").ExtensionKey;
|
|
6
6
|
}) => React.JSX.Element | null;
|
|
7
7
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: (props: {
|
|
3
|
+
extensionKey: import("@atlaskit/editor-common/extensions").ExtensionKey;
|
|
3
4
|
extensionProvider: import("@atlaskit/editor-common/extensions").ExtensionProvider;
|
|
4
5
|
extensionType: import("@atlaskit/editor-common/extensions").ExtensionType;
|
|
5
|
-
extensionKey: import("@atlaskit/editor-common/extensions").ExtensionKey;
|
|
6
6
|
}) => React.JSX.Element | null;
|
|
7
7
|
export default _default;
|
|
@@ -2,14 +2,14 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
2
2
|
import type { Icon } from '@atlaskit/editor-common/extensions';
|
|
3
3
|
import { type ExtensionDeprecationStatus } from '@atlaskit/editor-common/extensions';
|
|
4
4
|
type Props = {
|
|
5
|
-
title: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
summary?: string;
|
|
8
5
|
deprecation?: ExtensionDeprecationStatus;
|
|
6
|
+
description?: string;
|
|
9
7
|
documentationUrl?: string;
|
|
10
8
|
enableHelpCTA?: boolean;
|
|
11
9
|
icon: Icon;
|
|
12
10
|
onClose: () => void;
|
|
11
|
+
summary?: string;
|
|
12
|
+
title: string;
|
|
13
13
|
} & WrappedComponentProps;
|
|
14
14
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props>> & {
|
|
15
15
|
WrappedComponent: import("react").ComponentType<Props>;
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
7
7
|
type Props = {
|
|
8
|
-
name: string;
|
|
9
|
-
onClickRemove?: (fieldName: string) => void;
|
|
10
8
|
canRemoveField?: boolean;
|
|
11
9
|
children: React.ReactElement;
|
|
12
10
|
className?: string;
|
|
11
|
+
name: string;
|
|
12
|
+
onClickRemove?: (fieldName: string) => void;
|
|
13
13
|
} & WrappedComponentProps;
|
|
14
14
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props>> & {
|
|
15
15
|
WrappedComponent: React.ComponentType<Props>;
|
|
@@ -14,24 +14,24 @@ export interface ValidationErrors {
|
|
|
14
14
|
[key: string]: any;
|
|
15
15
|
}
|
|
16
16
|
export interface FieldComponentProps {
|
|
17
|
-
field: FieldDefinition;
|
|
18
|
-
parameters: Parameters;
|
|
19
|
-
parentName?: string;
|
|
20
17
|
extensionManifest: ExtensionManifest;
|
|
18
|
+
featureFlags?: FeatureFlags;
|
|
19
|
+
field: FieldDefinition;
|
|
21
20
|
firstVisibleFieldName?: string;
|
|
22
21
|
onFieldChange: OnFieldChange;
|
|
23
|
-
|
|
22
|
+
parameters: Parameters;
|
|
23
|
+
parentName?: string;
|
|
24
24
|
}
|
|
25
25
|
export interface FormContentProps {
|
|
26
|
-
fields: FieldDefinition[];
|
|
27
|
-
parentName?: string;
|
|
28
|
-
parameters?: Parameters;
|
|
29
|
-
extensionManifest: ExtensionManifest;
|
|
30
26
|
canRemoveFields?: boolean;
|
|
31
|
-
onClickRemove?: (fieldName: string) => void;
|
|
32
|
-
onFieldChange: OnFieldChange;
|
|
33
|
-
firstVisibleFieldName?: string;
|
|
34
27
|
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
28
|
+
extensionManifest: ExtensionManifest;
|
|
35
29
|
featureFlags?: FeatureFlags;
|
|
30
|
+
fields: FieldDefinition[];
|
|
31
|
+
firstVisibleFieldName?: string;
|
|
36
32
|
isDisabled?: boolean;
|
|
33
|
+
onClickRemove?: (fieldName: string) => void;
|
|
34
|
+
onFieldChange: OnFieldChange;
|
|
35
|
+
parameters?: Parameters;
|
|
36
|
+
parentName?: string;
|
|
37
37
|
}
|
|
@@ -3,8 +3,8 @@ import type { GroupBase } from '@atlaskit/react-select';
|
|
|
3
3
|
import { ValidationError } from './types';
|
|
4
4
|
export declare const validate: <T>(field: Partial<FieldDefinition>, value: T) => ValidationError | undefined;
|
|
5
5
|
type ValidationProps = {
|
|
6
|
-
isRequired?: boolean;
|
|
7
6
|
isMultiple?: boolean;
|
|
7
|
+
isRequired?: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare const validateRequired: <T>({ isRequired, isMultiple }: ValidationProps, value: T) => ValidationError | undefined;
|
|
10
10
|
export declare const getOptionFromValue: (options: Option[] | GroupBase<Option>[], value: string | string[] | undefined) => Option | Option[] | undefined;
|
|
@@ -3,7 +3,7 @@ import type { ExtensionKey, ExtensionManifest, ExtensionProvider, ExtensionType
|
|
|
3
3
|
export declare function withExtensionManifest(WrappedComponent: React.ComponentType<{
|
|
4
4
|
extensionManifest: ExtensionManifest;
|
|
5
5
|
}>): (props: {
|
|
6
|
+
extensionKey: ExtensionKey;
|
|
6
7
|
extensionProvider: ExtensionProvider;
|
|
7
8
|
extensionType: ExtensionType;
|
|
8
|
-
extensionKey: ExtensionKey;
|
|
9
9
|
}) => React.JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
interface SaveIndicatorRenderOptions {
|
|
3
|
-
onSaveStarted: () => void;
|
|
4
3
|
onSaveEnded: () => void;
|
|
4
|
+
onSaveStarted: () => void;
|
|
5
5
|
}
|
|
6
6
|
export interface SaveIndicatorProps {
|
|
7
7
|
children: (options: SaveIndicatorRenderOptions) => ReactNode;
|
|
@@ -5,9 +5,9 @@ import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
|
5
5
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { type ExtensionPlugin } from '../extensionPluginType';
|
|
7
7
|
export declare function useConfigPanelPluginHook({ editorView, configPanelId, api, }: {
|
|
8
|
-
editorView: EditorView;
|
|
9
|
-
configPanelId: string;
|
|
10
8
|
api?: ExtractInjectionAPI<ExtensionPlugin>;
|
|
9
|
+
configPanelId: string;
|
|
10
|
+
editorView: EditorView;
|
|
11
11
|
}): void;
|
|
12
12
|
export declare function hideConfigPanel(configPanelId: string, api: ExtractInjectionAPI<ExtensionPlugin> | undefined): void;
|
|
13
13
|
export declare function showConfigPanel({ api, configPanelId, editorView, extensionProvider, nodeWithPos, }: {
|
|
@@ -11,9 +11,9 @@ export declare const buildExtensionNode: <S extends Schema>(type: "inlineExtensi
|
|
|
11
11
|
export declare const performNodeUpdate: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (type: "inlineExtension" | "extension" | "bodiedExtension" | "multiBodiedExtension", newAttrs: object, content: Fragment, marks: readonly Mark[], shouldScrollIntoView: boolean) => Command;
|
|
12
12
|
export declare const editExtension: (macroProvider: MacroProvider | null | undefined, applyChangeToContextPanel: ApplyChangeHandler | undefined, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, updateExtension?: Promise<UpdateExtension<object> | void>) => Command;
|
|
13
13
|
type Props = {
|
|
14
|
-
editorViewRef: Record<'current', EditorView | null>;
|
|
15
|
-
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
16
14
|
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
15
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
16
|
+
editorViewRef: Record<'current', EditorView | null>;
|
|
17
17
|
};
|
|
18
18
|
export declare const createEditSelectedExtensionAction: ({ editorViewRef, editorAnalyticsAPI, applyChangeToContextPanel }: Props) => () => boolean;
|
|
19
19
|
export declare const insertOrReplaceExtension: ({ editorView, action, attrs, content, position, size, tr, }: InsertOrReplaceExtensionType) => Transaction;
|