@atlaskit/editor-plugin-extension 0.4.2 → 0.5.1
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/.eslintrc.js +26 -0
- package/CHANGELOG.md +16 -0
- package/dist/cjs/actions.js +236 -0
- package/dist/cjs/commands.js +122 -0
- package/dist/cjs/context-panel.js +269 -0
- package/dist/cjs/extension-api.js +266 -0
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/plugin-factory.js +32 -0
- package/dist/cjs/plugin-key.js +8 -0
- package/dist/cjs/plugin.js +147 -0
- package/dist/cjs/pm-plugins/keymap.js +21 -0
- package/dist/cjs/pm-plugins/macro/actions.js +186 -0
- package/dist/cjs/pm-plugins/macro/index.js +72 -0
- package/dist/cjs/pm-plugins/macro/plugin-key.js +8 -0
- package/dist/cjs/pm-plugins/macro/types.js +5 -0
- package/dist/cjs/pm-plugins/main.js +323 -0
- package/dist/cjs/pm-plugins/unique-id.js +80 -0
- package/dist/cjs/pm-plugins/utils.js +75 -0
- package/dist/cjs/reducer.js +18 -0
- package/dist/cjs/toolbar.js +242 -0
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +475 -0
- package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +122 -0
- package/dist/cjs/ui/ConfigPanel/ConfigPanelLoader.js +23 -0
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +76 -0
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/index.js +33 -0
- package/dist/cjs/ui/ConfigPanel/FieldMessages.js +105 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +150 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +101 -0
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +420 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +192 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Date.js +55 -0
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +160 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Enum.js +41 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +88 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +270 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Number.js +64 -0
- package/dist/cjs/ui/ConfigPanel/Fields/RadioGroup.js +56 -0
- package/dist/cjs/ui/ConfigPanel/Fields/Select.js +60 -0
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +53 -0
- package/dist/cjs/ui/ConfigPanel/Fields/String.js +75 -0
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +73 -0
- package/dist/cjs/ui/ConfigPanel/Fields/UnhandledType.js +19 -0
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +268 -0
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +12 -0
- package/dist/cjs/ui/ConfigPanel/FormContent.js +231 -0
- package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +140 -0
- package/dist/cjs/ui/ConfigPanel/Header.js +148 -0
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +25 -0
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +61 -0
- package/dist/cjs/ui/ConfigPanel/constants.js +13 -0
- package/dist/cjs/ui/ConfigPanel/index.js +9 -0
- package/dist/cjs/ui/ConfigPanel/messages.js +99 -0
- package/dist/cjs/ui/ConfigPanel/transformers.js +631 -0
- package/dist/cjs/ui/ConfigPanel/types.js +15 -0
- package/dist/cjs/ui/ConfigPanel/use-abortable-effect/index.js +56 -0
- package/dist/cjs/ui/ConfigPanel/use-state-from-promise/index.js +41 -0
- package/dist/cjs/ui/ConfigPanel/utils.js +116 -0
- package/dist/cjs/ui/SaveIndicator/SaveIndicator.js +79 -0
- package/dist/cjs/ui/SaveIndicator/messages.js +14 -0
- package/dist/cjs/ui/SaveIndicator/types.js +5 -0
- package/dist/cjs/utils.js +73 -0
- package/dist/es2019/actions.js +203 -0
- package/dist/es2019/commands.js +99 -0
- package/dist/es2019/context-panel.js +181 -0
- package/dist/es2019/extension-api.js +284 -0
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/plugin-factory.js +26 -0
- package/dist/es2019/plugin-key.js +2 -0
- package/dist/es2019/plugin.js +138 -0
- package/dist/es2019/pm-plugins/keymap.js +15 -0
- package/dist/es2019/pm-plugins/macro/actions.js +152 -0
- package/dist/es2019/pm-plugins/macro/index.js +36 -0
- package/dist/es2019/pm-plugins/macro/plugin-key.js +2 -0
- package/dist/es2019/pm-plugins/macro/types.js +1 -0
- package/dist/es2019/pm-plugins/main.js +230 -0
- package/dist/es2019/pm-plugins/unique-id.js +69 -0
- package/dist/es2019/pm-plugins/utils.js +30 -0
- package/dist/es2019/reducer.js +11 -0
- package/dist/es2019/toolbar.js +236 -0
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +415 -0
- package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +100 -0
- package/dist/es2019/ui/ConfigPanel/ConfigPanelLoader.js +7 -0
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +66 -0
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/index.js +25 -0
- package/dist/es2019/ui/ConfigPanel/FieldMessages.js +101 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +138 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +96 -0
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +411 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CustomSelect.js +132 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Date.js +50 -0
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +139 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Enum.js +35 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +73 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +227 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Number.js +61 -0
- package/dist/es2019/ui/ConfigPanel/Fields/RadioGroup.js +40 -0
- package/dist/es2019/ui/ConfigPanel/Fields/Select.js +50 -0
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +47 -0
- package/dist/es2019/ui/ConfigPanel/Fields/String.js +67 -0
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +57 -0
- package/dist/es2019/ui/ConfigPanel/Fields/UnhandledType.js +11 -0
- package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +194 -0
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +5 -0
- package/dist/es2019/ui/ConfigPanel/FormContent.js +225 -0
- package/dist/es2019/ui/ConfigPanel/FormErrorBoundary.js +100 -0
- package/dist/es2019/ui/ConfigPanel/Header.js +140 -0
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +15 -0
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +52 -0
- package/dist/es2019/ui/ConfigPanel/constants.js +7 -0
- package/dist/es2019/ui/ConfigPanel/index.js +2 -0
- package/dist/es2019/ui/ConfigPanel/messages.js +93 -0
- package/dist/es2019/ui/ConfigPanel/transformers.js +367 -0
- package/dist/es2019/ui/ConfigPanel/types.js +9 -0
- package/dist/es2019/ui/ConfigPanel/use-abortable-effect/index.js +46 -0
- package/dist/es2019/ui/ConfigPanel/use-state-from-promise/index.js +30 -0
- package/dist/es2019/ui/ConfigPanel/utils.js +86 -0
- package/dist/es2019/ui/SaveIndicator/SaveIndicator.js +66 -0
- package/dist/es2019/ui/SaveIndicator/messages.js +8 -0
- package/dist/es2019/ui/SaveIndicator/types.js +1 -0
- package/dist/es2019/utils.js +65 -0
- package/dist/esm/actions.js +223 -0
- package/dist/esm/commands.js +113 -0
- package/dist/esm/context-panel.js +261 -0
- package/dist/esm/extension-api.js +259 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/plugin-factory.js +25 -0
- package/dist/esm/plugin-key.js +2 -0
- package/dist/esm/plugin.js +140 -0
- package/dist/esm/pm-plugins/keymap.js +15 -0
- package/dist/esm/pm-plugins/macro/actions.js +179 -0
- package/dist/esm/pm-plugins/macro/index.js +42 -0
- package/dist/esm/pm-plugins/macro/plugin-key.js +2 -0
- package/dist/esm/pm-plugins/macro/types.js +1 -0
- package/dist/esm/pm-plugins/main.js +298 -0
- package/dist/esm/pm-plugins/unique-id.js +74 -0
- package/dist/esm/pm-plugins/utils.js +68 -0
- package/dist/esm/reducer.js +11 -0
- package/dist/esm/toolbar.js +235 -0
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +465 -0
- package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +112 -0
- package/dist/esm/ui/ConfigPanel/ConfigPanelLoader.js +11 -0
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +68 -0
- package/dist/esm/ui/ConfigPanel/ErrorMessage/index.js +26 -0
- package/dist/esm/ui/ConfigPanel/FieldMessages.js +97 -0
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +140 -0
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +95 -0
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +414 -0
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +182 -0
- package/dist/esm/ui/ConfigPanel/Fields/Date.js +48 -0
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +154 -0
- package/dist/esm/ui/ConfigPanel/Fields/Enum.js +34 -0
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +77 -0
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +261 -0
- package/dist/esm/ui/ConfigPanel/Fields/Number.js +57 -0
- package/dist/esm/ui/ConfigPanel/Fields/RadioGroup.js +46 -0
- package/dist/esm/ui/ConfigPanel/Fields/Select.js +50 -0
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +45 -0
- package/dist/esm/ui/ConfigPanel/Fields/String.js +65 -0
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +62 -0
- package/dist/esm/ui/ConfigPanel/Fields/UnhandledType.js +10 -0
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +258 -0
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +5 -0
- package/dist/esm/ui/ConfigPanel/FormContent.js +223 -0
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +133 -0
- package/dist/esm/ui/ConfigPanel/Header.js +140 -0
- package/dist/esm/ui/ConfigPanel/LoadingState.js +17 -0
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +53 -0
- package/dist/esm/ui/ConfigPanel/constants.js +7 -0
- package/dist/esm/ui/ConfigPanel/index.js +2 -0
- package/dist/esm/ui/ConfigPanel/messages.js +93 -0
- package/dist/esm/ui/ConfigPanel/transformers.js +624 -0
- package/dist/esm/ui/ConfigPanel/types.js +9 -0
- package/dist/esm/ui/ConfigPanel/use-abortable-effect/index.js +49 -0
- package/dist/esm/ui/ConfigPanel/use-state-from-promise/index.js +34 -0
- package/dist/esm/ui/ConfigPanel/utils.js +109 -0
- package/dist/esm/ui/SaveIndicator/SaveIndicator.js +72 -0
- package/dist/esm/ui/SaveIndicator/messages.js +8 -0
- package/dist/esm/ui/SaveIndicator/types.js +1 -0
- package/dist/esm/utils.js +67 -0
- package/dist/types/actions.d.ts +20 -0
- package/dist/types/commands.d.ts +15 -0
- package/dist/types/context-panel.d.ts +10 -0
- package/dist/types/extension-api.d.ts +12 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/plugin-factory.d.ts +4 -0
- package/dist/types/plugin-key.d.ts +3 -0
- package/dist/types/plugin.d.ts +2 -0
- package/dist/types/pm-plugins/keymap.d.ts +3 -0
- package/dist/types/pm-plugins/macro/actions.d.ts +9 -0
- package/dist/types/pm-plugins/macro/index.d.ts +8 -0
- package/dist/types/pm-plugins/macro/plugin-key.d.ts +3 -0
- package/dist/types/pm-plugins/macro/types.d.ts +4 -0
- package/dist/types/pm-plugins/main.d.ts +25 -0
- package/dist/types/pm-plugins/unique-id.d.ts +3 -0
- package/dist/types/pm-plugins/utils.d.ts +3 -0
- package/dist/types/reducer.d.ts +2 -0
- package/dist/types/toolbar.d.ts +44 -0
- package/dist/types/types.d.ts +27 -2
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +22 -0
- package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +21 -0
- package/dist/types/ui/ConfigPanel/ConfigPanelLoader.d.ts +5 -0
- package/dist/types/ui/ConfigPanel/ErrorMessage/ErrorImage.d.ts +4 -0
- package/dist/types/ui/ConfigPanel/ErrorMessage/index.d.ts +10 -0
- package/dist/types/ui/ConfigPanel/FieldMessages.d.ts +12 -0
- package/dist/types/ui/ConfigPanel/Fields/Boolean.d.ts +8 -0
- package/dist/types/ui/ConfigPanel/Fields/CheckboxGroup.d.ts +8 -0
- package/dist/types/ui/ConfigPanel/Fields/ColorPicker.d.ts +20 -0
- package/dist/types/ui/ConfigPanel/Fields/CustomSelect.d.ts +24 -0
- package/dist/types/ui/ConfigPanel/Fields/Date.d.ts +20 -0
- package/dist/types/ui/ConfigPanel/Fields/DateRange.d.ts +20 -0
- package/dist/types/ui/ConfigPanel/Fields/Enum.d.ts +10 -0
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +16 -0
- package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +19 -0
- package/dist/types/ui/ConfigPanel/Fields/Number.d.ts +10 -0
- package/dist/types/ui/ConfigPanel/Fields/RadioGroup.d.ts +8 -0
- package/dist/types/ui/ConfigPanel/Fields/Select.d.ts +11 -0
- package/dist/types/ui/ConfigPanel/Fields/SelectItem.d.ts +5 -0
- package/dist/types/ui/ConfigPanel/Fields/String.d.ts +10 -0
- package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +14 -0
- package/dist/types/ui/ConfigPanel/Fields/UnhandledType.d.ts +6 -0
- package/dist/types/ui/ConfigPanel/Fields/UserSelect.d.ts +10 -0
- package/dist/types/ui/ConfigPanel/Fields/common/RequiredIndicator.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/FormContent.d.ts +4 -0
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +16 -0
- package/dist/types/ui/ConfigPanel/Header.d.ts +23 -0
- package/dist/types/ui/ConfigPanel/LoadingState.d.ts +4 -0
- package/dist/types/ui/ConfigPanel/NestedForms/RemovableField.d.ts +19 -0
- package/dist/types/ui/ConfigPanel/constants.d.ts +2 -0
- package/dist/types/ui/ConfigPanel/index.d.ts +2 -0
- package/dist/types/ui/ConfigPanel/messages.d.ts +92 -0
- package/dist/types/ui/ConfigPanel/transformers.d.ts +9 -0
- package/dist/types/ui/ConfigPanel/types.d.ts +36 -0
- package/dist/types/ui/ConfigPanel/use-abortable-effect/index.d.ts +16 -0
- package/dist/types/ui/ConfigPanel/use-state-from-promise/index.d.ts +15 -0
- package/dist/types/ui/ConfigPanel/utils.d.ts +16 -0
- package/dist/types/ui/SaveIndicator/SaveIndicator.d.ts +4 -0
- package/dist/types/ui/SaveIndicator/messages.d.ts +7 -0
- package/dist/types/ui/SaveIndicator/types.d.ts +11 -0
- package/dist/types/utils.d.ts +15 -0
- package/dist/types-ts4.5/actions.d.ts +20 -0
- package/dist/types-ts4.5/commands.d.ts +15 -0
- package/dist/types-ts4.5/context-panel.d.ts +10 -0
- package/dist/types-ts4.5/extension-api.d.ts +12 -0
- package/dist/types-ts4.5/index.d.ts +2 -1
- package/dist/types-ts4.5/plugin-factory.d.ts +4 -0
- package/dist/types-ts4.5/plugin-key.d.ts +3 -0
- package/dist/types-ts4.5/plugin.d.ts +2 -0
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/macro/actions.d.ts +9 -0
- package/dist/types-ts4.5/pm-plugins/macro/index.d.ts +8 -0
- package/dist/types-ts4.5/pm-plugins/macro/plugin-key.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/macro/types.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +25 -0
- package/dist/types-ts4.5/pm-plugins/unique-id.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +3 -0
- package/dist/types-ts4.5/reducer.d.ts +2 -0
- package/dist/types-ts4.5/toolbar.d.ts +44 -0
- package/dist/types-ts4.5/types.d.ts +27 -2
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanel.d.ts +22 -0
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +21 -0
- package/dist/types-ts4.5/ui/ConfigPanel/ConfigPanelLoader.d.ts +5 -0
- package/dist/types-ts4.5/ui/ConfigPanel/ErrorMessage/ErrorImage.d.ts +4 -0
- package/dist/types-ts4.5/ui/ConfigPanel/ErrorMessage/index.d.ts +10 -0
- package/dist/types-ts4.5/ui/ConfigPanel/FieldMessages.d.ts +12 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Boolean.d.ts +8 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/CheckboxGroup.d.ts +8 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/ColorPicker.d.ts +20 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/CustomSelect.d.ts +24 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Date.d.ts +20 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/DateRange.d.ts +20 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Enum.d.ts +10 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Expand.d.ts +16 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Fieldset.d.ts +19 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Number.d.ts +10 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/RadioGroup.d.ts +8 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Select.d.ts +11 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/SelectItem.d.ts +5 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/String.d.ts +10 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/TabGroup.d.ts +14 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/UnhandledType.d.ts +6 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/UserSelect.d.ts +10 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/common/RequiredIndicator.d.ts +1 -0
- package/dist/types-ts4.5/ui/ConfigPanel/FormContent.d.ts +4 -0
- package/dist/types-ts4.5/ui/ConfigPanel/FormErrorBoundary.d.ts +16 -0
- package/dist/types-ts4.5/ui/ConfigPanel/Header.d.ts +23 -0
- package/dist/types-ts4.5/ui/ConfigPanel/LoadingState.d.ts +4 -0
- package/dist/types-ts4.5/ui/ConfigPanel/NestedForms/RemovableField.d.ts +19 -0
- package/dist/types-ts4.5/ui/ConfigPanel/constants.d.ts +2 -0
- package/dist/types-ts4.5/ui/ConfigPanel/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/ConfigPanel/messages.d.ts +92 -0
- package/dist/types-ts4.5/ui/ConfigPanel/transformers.d.ts +9 -0
- package/dist/types-ts4.5/ui/ConfigPanel/types.d.ts +39 -0
- package/dist/types-ts4.5/ui/ConfigPanel/use-abortable-effect/index.d.ts +16 -0
- package/dist/types-ts4.5/ui/ConfigPanel/use-state-from-promise/index.d.ts +18 -0
- package/dist/types-ts4.5/ui/ConfigPanel/utils.d.ts +16 -0
- package/dist/types-ts4.5/ui/SaveIndicator/SaveIndicator.d.ts +4 -0
- package/dist/types-ts4.5/ui/SaveIndicator/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/SaveIndicator/types.d.ts +11 -0
- package/dist/types-ts4.5/utils.d.ts +15 -0
- package/example-utils/config-panel/ConfigPanelWithExtensionPicker.tsx +217 -0
- package/example-utils/config-panel/ConfigPanelWithProviders.tsx +51 -0
- package/example-utils/config-panel/ExtensionNodePicker.tsx +141 -0
- package/example-utils/config-panel/FieldTypePicker.tsx +63 -0
- package/example-utils/config-panel/example-manifest-all-fields.ts +86 -0
- package/example-utils/config-panel/example-manifest-individual-fields.ts +85 -0
- package/example-utils/config-panel/fields.ts +611 -0
- package/package.json +49 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
4
|
+
error?: string | undefined;
|
|
5
|
+
description?: string | undefined;
|
|
6
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
7
|
+
WrappedComponent: React.ComponentType<{
|
|
8
|
+
error?: string | undefined;
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
} & WrappedComponentProps<"intl">>;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { BooleanField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { OnFieldChange } from '../types';
|
|
4
|
+
export default function Boolean({ name, field, onFieldChange, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
field: BooleanField;
|
|
7
|
+
onFieldChange: OnFieldChange;
|
|
8
|
+
}): jsx.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { EnumCheckboxField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { OnFieldChange } from '../types';
|
|
4
|
+
export default function CheckboxGroup({ name, field, onFieldChange, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
field: EnumCheckboxField;
|
|
7
|
+
onFieldChange: OnFieldChange;
|
|
8
|
+
}): jsx.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { ColorField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
|
|
5
|
+
import type { OnFieldChange } from '../types';
|
|
6
|
+
export declare const colorPalette: PaletteColor[];
|
|
7
|
+
/**
|
|
8
|
+
* Extended chart colors.
|
|
9
|
+
* Decided here https://product-fabric.atlassian.net/wiki/spaces/EUXQ/pages/3477245015/Tokenising+table+charts+color
|
|
10
|
+
*/
|
|
11
|
+
export declare const extendedColorPalette: PaletteColor[];
|
|
12
|
+
export declare const EXPANDED_COLOR_PICKER_COLUMNS = 9;
|
|
13
|
+
export declare const ORIGINAL_COLOR_PICKER_COLUMNS = 5;
|
|
14
|
+
declare const ColorPickerField: ({ name, field, onFieldChange, featureFlags, }: {
|
|
15
|
+
name: string;
|
|
16
|
+
field: ColorField;
|
|
17
|
+
onFieldChange: OnFieldChange;
|
|
18
|
+
featureFlags?: FeatureFlags | undefined;
|
|
19
|
+
}) => jsx.JSX.Element;
|
|
20
|
+
export default ColorPickerField;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { CustomField, ExtensionManifest, Parameters } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import type { OnFieldChange } from '../types';
|
|
5
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
6
|
+
name: string;
|
|
7
|
+
field: CustomField;
|
|
8
|
+
extensionManifest: ExtensionManifest<Parameters>;
|
|
9
|
+
onFieldChange: OnFieldChange;
|
|
10
|
+
autoFocus?: boolean | undefined;
|
|
11
|
+
placeholder?: string | undefined;
|
|
12
|
+
parameters?: Parameters | undefined;
|
|
13
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
14
|
+
WrappedComponent: React.ComponentType<{
|
|
15
|
+
name: string;
|
|
16
|
+
field: CustomField;
|
|
17
|
+
extensionManifest: ExtensionManifest<Parameters>;
|
|
18
|
+
onFieldChange: OnFieldChange;
|
|
19
|
+
autoFocus?: boolean | undefined;
|
|
20
|
+
placeholder?: string | undefined;
|
|
21
|
+
parameters?: Parameters | undefined;
|
|
22
|
+
} & WrappedComponentProps<"intl">>;
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { DateField } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import type { OnFieldChange } from '../types';
|
|
5
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
6
|
+
name: string;
|
|
7
|
+
field: DateField;
|
|
8
|
+
autoFocus?: boolean | undefined;
|
|
9
|
+
onFieldChange: OnFieldChange;
|
|
10
|
+
placeholder?: string | undefined;
|
|
11
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
12
|
+
WrappedComponent: React.ComponentType<{
|
|
13
|
+
name: string;
|
|
14
|
+
field: DateField;
|
|
15
|
+
autoFocus?: boolean | undefined;
|
|
16
|
+
onFieldChange: OnFieldChange;
|
|
17
|
+
placeholder?: string | undefined;
|
|
18
|
+
} & WrappedComponentProps<"intl">>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { DateRangeField } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import type { OnFieldChange } from '../types';
|
|
5
|
+
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<{
|
|
6
|
+
name: string;
|
|
7
|
+
field: DateRangeField;
|
|
8
|
+
onFieldChange: OnFieldChange;
|
|
9
|
+
autoFocus?: boolean | undefined;
|
|
10
|
+
placeholder?: string | undefined;
|
|
11
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
12
|
+
WrappedComponent: import("react").ComponentType<{
|
|
13
|
+
name: string;
|
|
14
|
+
field: DateRangeField;
|
|
15
|
+
onFieldChange: OnFieldChange;
|
|
16
|
+
autoFocus?: boolean | undefined;
|
|
17
|
+
placeholder?: string | undefined;
|
|
18
|
+
} & WrappedComponentProps<"intl">>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { EnumField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { OnFieldChange } from '../types';
|
|
4
|
+
export default function Enum({ name, field, autoFocus, onFieldChange, fieldDefaultValue, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
field: EnumField;
|
|
7
|
+
autoFocus: boolean;
|
|
8
|
+
onFieldChange: OnFieldChange;
|
|
9
|
+
fieldDefaultValue?: string | string[];
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import type { FieldDefinition } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
6
|
+
field: FieldDefinition;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
isExpanded?: boolean | undefined;
|
|
9
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
10
|
+
WrappedComponent: React.ComponentType<{
|
|
11
|
+
field: FieldDefinition;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
isExpanded?: boolean | undefined;
|
|
14
|
+
} & WrappedComponentProps<"intl">>;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import type { ExtensionManifest, Fieldset, Parameters } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import type { FormContentProps, OnFieldChange } from '../types';
|
|
6
|
+
type Props = {
|
|
7
|
+
name: string;
|
|
8
|
+
extensionManifest: ExtensionManifest;
|
|
9
|
+
field: Fieldset;
|
|
10
|
+
parameters?: Parameters;
|
|
11
|
+
onFieldChange: OnFieldChange;
|
|
12
|
+
firstVisibleFieldName?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
formComponent: (props: FormContentProps) => JSX.Element;
|
|
15
|
+
} & WrappedComponentProps;
|
|
16
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props>> & {
|
|
17
|
+
WrappedComponent: React.ComponentType<Props>;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { NumberField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { OnFieldChange } from '../types';
|
|
4
|
+
export default function Number({ name, field, autoFocus, onFieldChange, placeholder, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
field: NumberField;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
onFieldChange: OnFieldChange;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { EnumRadioField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { OnFieldChange } from '../types';
|
|
4
|
+
export default function RadioField({ name, field, onFieldChange, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
field: EnumRadioField;
|
|
7
|
+
onFieldChange: OnFieldChange;
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { EnumSelectField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { OnFieldChange } from '../types';
|
|
4
|
+
export default function SelectField({ name, field, onFieldChange, autoFocus, placeholder, fieldDefaultValue, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
field: EnumSelectField;
|
|
7
|
+
onFieldChange: OnFieldChange;
|
|
8
|
+
autoFocus?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
fieldDefaultValue?: string | string[];
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { Option } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import type { FormatOptionLabelMeta } from '@atlaskit/select';
|
|
5
|
+
export declare const formatOptionLabel: ({ label, icon, description }: Option, { context }: FormatOptionLabelMeta<Option>) => jsx.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StringField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { OnFieldChange } from '../types';
|
|
4
|
+
export default function String({ name, field, autoFocus, onFieldChange, placeholder, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
field: StringField;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
onFieldChange: OnFieldChange;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import type { TabField, TabGroupField } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
declare const TabGroup: React.FC<import("react-intl-next").WithIntlProps<{
|
|
6
|
+
field: TabGroupField;
|
|
7
|
+
renderPanel: (tabField: TabField) => JSX.Element;
|
|
8
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
9
|
+
WrappedComponent: React.ComponentType<{
|
|
10
|
+
field: TabGroupField;
|
|
11
|
+
renderPanel: (tabField: TabField) => JSX.Element;
|
|
12
|
+
} & WrappedComponentProps<"intl">>;
|
|
13
|
+
};
|
|
14
|
+
export default TabGroup;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ExtensionManifest, UserField } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { OnFieldChange } from '../types';
|
|
4
|
+
export default function UserSelect({ name, autoFocus, extensionManifest, field, onFieldChange, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
field: UserField;
|
|
7
|
+
extensionManifest: ExtensionManifest;
|
|
8
|
+
onFieldChange: OnFieldChange;
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const requiredIndicator: import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FieldComponentProps, FormContentProps } from './types';
|
|
3
|
+
export declare function FieldComponent({ field, parameters, parentName, extensionManifest, firstVisibleFieldName, onFieldChange, featureFlags, }: FieldComponentProps): JSX.Element;
|
|
4
|
+
export default function FormContent({ fields, parentName, parameters, extensionManifest, canRemoveFields, onClickRemove, onFieldChange, firstVisibleFieldName, contextIdentifierProvider, featureFlags, }: FormContentProps): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { FieldDefinition } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
+
interface Props {
|
|
7
|
+
fields: FieldDefinition[];
|
|
8
|
+
extensionKey: string;
|
|
9
|
+
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const FormErrorBoundaryImpl: React.FC<import("react-intl-next").WithIntlProps<Props & WithAnalyticsEventsProps & WrappedComponentProps<"intl">>> & {
|
|
13
|
+
WrappedComponent: React.ComponentType<Props & WithAnalyticsEventsProps & WrappedComponentProps<"intl">>;
|
|
14
|
+
};
|
|
15
|
+
export declare const FormErrorBoundary: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<Props & WithAnalyticsEventsProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "analyticsContext" | "forwardedRef" | keyof Props> & React.RefAttributes<any>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { Icon } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<{
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
summary?: string | undefined;
|
|
8
|
+
documentationUrl?: string | undefined;
|
|
9
|
+
enableHelpCTA?: boolean | undefined;
|
|
10
|
+
icon: Icon;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
13
|
+
WrappedComponent: import("react").ComponentType<{
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
summary?: string | undefined;
|
|
17
|
+
documentationUrl?: string | undefined;
|
|
18
|
+
enableHelpCTA?: boolean | undefined;
|
|
19
|
+
icon: Icon;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
} & WrappedComponentProps<"intl">>;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
5
|
+
name: string;
|
|
6
|
+
onClickRemove?: ((fieldName: string) => void) | undefined;
|
|
7
|
+
canRemoveField?: boolean | undefined;
|
|
8
|
+
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
9
|
+
className?: string | undefined;
|
|
10
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
11
|
+
WrappedComponent: React.ComponentType<{
|
|
12
|
+
name: string;
|
|
13
|
+
onClickRemove?: ((fieldName: string) => void) | undefined;
|
|
14
|
+
canRemoveField?: boolean | undefined;
|
|
15
|
+
children: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
className?: string | undefined;
|
|
17
|
+
} & WrappedComponentProps<"intl">>;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare const messages: {
|
|
2
|
+
submit: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
cancel: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
close: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
required: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
invalid: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
isMultipleAndRadio: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
addField: {
|
|
33
|
+
id: string;
|
|
34
|
+
defaultMessage: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
removeField: {
|
|
38
|
+
id: string;
|
|
39
|
+
defaultMessage: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
createOption: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
documentation: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
help: {
|
|
53
|
+
id: string;
|
|
54
|
+
defaultMessage: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
custom: {
|
|
58
|
+
id: string;
|
|
59
|
+
defaultMessage: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
from: {
|
|
63
|
+
id: string;
|
|
64
|
+
defaultMessage: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
to: {
|
|
68
|
+
id: string;
|
|
69
|
+
defaultMessage: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
expand: {
|
|
73
|
+
id: string;
|
|
74
|
+
defaultMessage: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
collapse: {
|
|
78
|
+
id: string;
|
|
79
|
+
defaultMessage: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
errorBoundaryTitle: {
|
|
83
|
+
id: string;
|
|
84
|
+
defaultMessage: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
errorBoundaryNote: {
|
|
88
|
+
id: string;
|
|
89
|
+
defaultMessage: string;
|
|
90
|
+
description: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExtensionManifest, FieldDefinition, Parameters, ParametersWithDuplicateFields } from '@atlaskit/editor-common/extensions';
|
|
2
|
+
interface SerializeOptions {
|
|
3
|
+
depth?: number;
|
|
4
|
+
parentType?: 'fieldset' | 'tab' | 'expand';
|
|
5
|
+
}
|
|
6
|
+
export declare const findDuplicateFields: (fields: FieldDefinition[]) => FieldDefinition | undefined;
|
|
7
|
+
export declare const serialize: (manifest: ExtensionManifest, data: Parameters, fields: FieldDefinition[], options?: SerializeOptions) => Promise<Parameters>;
|
|
8
|
+
export declare const deserialize: (manifest: ExtensionManifest, data: Parameters | ParametersWithDuplicateFields, fields: FieldDefinition[], depth?: number) => Promise<Parameters>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ExtensionManifest, FieldDefinition, Parameters } from '@atlaskit/editor-common/extensions';
|
|
2
|
+
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
+
export declare enum ValidationError {
|
|
5
|
+
Required = "required",
|
|
6
|
+
Invalid = "invalid"
|
|
7
|
+
}
|
|
8
|
+
export declare enum FieldTypeError {
|
|
9
|
+
isMultipleAndRadio = "isMultipleAndRadio"
|
|
10
|
+
}
|
|
11
|
+
export type Entry<T> = [string, T];
|
|
12
|
+
export type OnFieldChange = (name: string, isDirty: boolean) => void;
|
|
13
|
+
export interface ValidationErrors {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
export interface FieldComponentProps {
|
|
17
|
+
field: FieldDefinition;
|
|
18
|
+
parameters: Parameters;
|
|
19
|
+
parentName?: string;
|
|
20
|
+
extensionManifest: ExtensionManifest;
|
|
21
|
+
firstVisibleFieldName?: string;
|
|
22
|
+
onFieldChange: OnFieldChange;
|
|
23
|
+
featureFlags?: FeatureFlags;
|
|
24
|
+
}
|
|
25
|
+
export interface FormContentProps {
|
|
26
|
+
fields: FieldDefinition[];
|
|
27
|
+
parentName?: string;
|
|
28
|
+
parameters?: Parameters;
|
|
29
|
+
extensionManifest: ExtensionManifest;
|
|
30
|
+
canRemoveFields?: boolean;
|
|
31
|
+
onClickRemove?: (fieldName: string) => void;
|
|
32
|
+
onFieldChange: OnFieldChange;
|
|
33
|
+
firstVisibleFieldName?: string;
|
|
34
|
+
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
35
|
+
featureFlags?: FeatureFlags;
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
type AbortableEffectWithCancel = (signal: AbortSignal) => () => void;
|
|
3
|
+
type AbortableEffect = (signal: AbortSignal) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Similar to useEffect but integrated with the AbortController to make it useful for async operations.
|
|
6
|
+
* On unmount, the abort function will be called and the signal will be passed down to the function so
|
|
7
|
+
* we get the chance to cancel any operation we want.
|
|
8
|
+
*
|
|
9
|
+
* Note: This hook follows the signature of useEffect so it can be linted if enabled through the
|
|
10
|
+
* `additionalHooks` config.
|
|
11
|
+
*
|
|
12
|
+
* @param callback
|
|
13
|
+
* @param deps
|
|
14
|
+
*/
|
|
15
|
+
export declare function useAbortableEffect(callback: AbortableEffectWithCancel | AbortableEffect, deps: React.DependencyList): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
type AbortableEffect<T> = () => Promise<T> | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Similar to useState but deals with async values.
|
|
5
|
+
* Simply pass a promise and it will set the state when it resolves. It won't try to set if
|
|
6
|
+
* the component unmounts
|
|
7
|
+
*
|
|
8
|
+
* Note: This hook follows the signature of useEffect so it can be linted if enabled through the
|
|
9
|
+
* `additionalHooks` config.
|
|
10
|
+
*
|
|
11
|
+
* @param callback
|
|
12
|
+
* @param deps
|
|
13
|
+
*/
|
|
14
|
+
export declare function useStateFromPromise<S>(callback: AbortableEffect<S>, deps: React.DependencyList, initialValue?: S): [S | undefined, React.Dispatch<React.SetStateAction<S | undefined>>];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GroupBase } from 'react-select';
|
|
2
|
+
import type { FieldDefinition, Option, Parameters } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import { ValidationError } from './types';
|
|
4
|
+
export declare const validate: <T>(field: Partial<FieldDefinition>, value: T) => ValidationError | undefined;
|
|
5
|
+
type ValidationProps = {
|
|
6
|
+
isRequired?: boolean;
|
|
7
|
+
isMultiple?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const validateRequired: <T>({ isRequired, isMultiple }: ValidationProps, value: T) => ValidationError | undefined;
|
|
10
|
+
export declare const getOptionFromValue: (options: Option[] | GroupBase<Option>[], value: string | string[] | undefined) => Option | Option[] | undefined;
|
|
11
|
+
export declare const getSafeParentedName: (name: string, parentName?: string) => string;
|
|
12
|
+
export declare const isDuplicateField: (key: string) => boolean;
|
|
13
|
+
export declare const getNameFromDuplicateField: (key: string) => string;
|
|
14
|
+
export declare const parseParamType: (paramValue: Parameters[string], paramField?: FieldDefinition) => any;
|
|
15
|
+
export declare const getLoggedParameters: (macroKey: string, currentParams: Parameters, macroFields?: FieldDefinition[]) => {};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface SaveIndicatorRenderOptions {
|
|
3
|
+
onSaveStarted: () => void;
|
|
4
|
+
onSaveEnded: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface SaveIndicatorProps {
|
|
7
|
+
children: (options: SaveIndicatorRenderOptions) => ReactNode;
|
|
8
|
+
duration: number;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Mark, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { DomAtPos, NodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
|
+
export declare const getSelectedExtension: (state: EditorState, searchParent?: boolean) => import("prosemirror-utils/dist/types").ContentNodeWithPos | undefined;
|
|
5
|
+
export declare const findExtensionWithLocalId: (state: EditorState, localId?: string) => NodeWithPos | undefined;
|
|
6
|
+
export declare const getSelectedDomElement: (schema: Schema, domAtPos: DomAtPos, selectedExtensionNode: NodeWithPos) => HTMLElement;
|
|
7
|
+
export declare const getDataConsumerMark: (newNode: PMNode) => Mark | undefined;
|
|
8
|
+
export declare const getNodeTypesReferenced: (ids: string[], state: EditorState) => string[];
|
|
9
|
+
export declare const findNodePosWithLocalId: (state: EditorState, localId: string) => NodeWithPos | undefined;
|
|
10
|
+
export interface Position {
|
|
11
|
+
top?: number;
|
|
12
|
+
right?: number;
|
|
13
|
+
bottom?: number;
|
|
14
|
+
left?: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { transformSliceToRemoveOpenBodiedExtension } from '@atlaskit/editor-common/transforms';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
7
|
+
import type { Fragment, Mark, Node as PmNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
+
export declare const buildExtensionNode: <S extends Schema<any, any>>(type: 'inlineExtension' | 'extension' | 'bodiedExtension', schema: S, attrs: object, content?: Fragment, marks?: readonly Mark[]) => PmNode;
|
|
10
|
+
export declare const performNodeUpdate: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (type: 'inlineExtension' | 'extension' | 'bodiedExtension', newAttrs: object, content: Fragment, marks: readonly Mark[], shouldScrollIntoView: boolean) => Command;
|
|
11
|
+
interface EditorActions {
|
|
12
|
+
_privateGetEditorView: () => EditorView | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare const editSelectedExtension: (editorActions: EditorActions) => boolean;
|
|
15
|
+
export declare const editExtension: (macroProvider: MacroProvider | null | undefined, applyChangeToContextPanel: ApplyChangeHandler | undefined, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, updateExtension?: Promise<UpdateExtension<object> | void>) => Command;
|
|
16
|
+
type Props = {
|
|
17
|
+
editorViewRef: Record<'current', EditorView | null>;
|
|
18
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare const createEditSelectedExtensionAction: ({ editorViewRef, editorAnalyticsAPI }: Props) => () => boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { Parameters, TransformAfter, TransformBefore } from '@atlaskit/editor-common/extensions';
|
|
4
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
5
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
+
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
+
import type { ExtensionState, RejectSave } from './types';
|
|
8
|
+
export declare function updateState(state: Partial<ExtensionState>): import("@atlaskit/editor-common/types").Command;
|
|
9
|
+
export declare function setEditingContextToContextPanel<T extends Parameters = Parameters>(processParametersBefore: TransformBefore<T>, processParametersAfter: TransformAfter<T>, applyChangeToContextPanel: ApplyChangeHandler | undefined): import("@atlaskit/editor-common/types").Command;
|
|
10
|
+
export declare const clearEditingContext: (applyChangeToContextPanel: ApplyChangeHandler | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
11
|
+
export declare const forceAutoSave: (applyChangeToContextPanel: ApplyChangeHandler | undefined) => (resolve: () => void, reject?: RejectSave) => import("@atlaskit/editor-common/types").Command;
|
|
12
|
+
export declare const updateExtensionLayout: (layout: ExtensionLayout) => import("@atlaskit/editor-common/types").Command;
|
|
13
|
+
export declare const removeExtension: (editorAnalyticsAPI?: EditorAnalyticsAPI) => import("@atlaskit/editor-common/types").Command;
|
|
14
|
+
export declare const removeDescendantNodes: (sourceNode?: PMNode) => import("@atlaskit/editor-common/types").Command;
|
|
15
|
+
export declare const checkAndRemoveExtensionNode: (state: EditorState, tr: Transaction, analyticsApi?: EditorAnalyticsAPI) => Transaction;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
4
|
+
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
+
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
export declare const duplicateSelection: (selectionToDuplicate: Selection, doc: Node) => Selection | undefined;
|
|
9
|
+
export declare const getContextPanel: (getEditorView?: () => EditorView | undefined) => (allowAutoSave?: boolean, featureFlags?: FeatureFlags, applyChange?: ApplyChangeHandler) => (state: EditorState) => JSX.Element | undefined;
|
|
10
|
+
export declare function onChangeAction(editorView: EditorView, updatedParameters: object | undefined, oldParameters: object | undefined, nodeWithPos: ContentNodeWithPos, onSaving?: () => void): Promise<void>;
|