@atlaskit/editor-common 74.19.2 → 74.20.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 +6 -0
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/index.js +86 -0
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +32 -0
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +939 -0
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/index.js +79 -0
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/messages.js +40 -0
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/utils.js +84 -0
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +83 -0
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +146 -0
- package/dist/cjs/link/LinkSearch/ToolbarComponents.js +17 -0
- package/dist/cjs/link/LinkSearch/index.js +328 -0
- package/dist/cjs/link/LinkSearch/listItemAlts.js +70 -0
- package/dist/cjs/link/LinkSearch/transformTimeStamp.js +42 -0
- package/dist/cjs/link/LinkSearch/types.js +5 -0
- package/dist/cjs/link/LinkSearch/withActivityProvider.js +59 -0
- package/dist/cjs/link/index.js +122 -0
- package/dist/cjs/link/types.js +22 -0
- package/dist/cjs/link/utils.js +19 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/assets/action.js +43 -0
- package/dist/cjs/quick-insert/assets/code.js +115 -0
- package/dist/cjs/quick-insert/assets/custom-panel.js +55 -0
- package/dist/cjs/quick-insert/assets/date.js +93 -0
- package/dist/cjs/quick-insert/assets/decision.js +34 -0
- package/dist/cjs/quick-insert/assets/divider.js +74 -0
- package/dist/cjs/quick-insert/assets/emoji.js +37 -0
- package/dist/cjs/quick-insert/assets/expand.js +47 -0
- package/dist/cjs/quick-insert/assets/fallback.js +55 -0
- package/dist/cjs/quick-insert/assets/feedback.js +70 -0
- package/dist/cjs/quick-insert/assets/heading1.js +50 -0
- package/dist/cjs/quick-insert/assets/heading2.js +50 -0
- package/dist/cjs/quick-insert/assets/heading3.js +50 -0
- package/dist/cjs/quick-insert/assets/heading4.js +50 -0
- package/dist/cjs/quick-insert/assets/heading5.js +50 -0
- package/dist/cjs/quick-insert/assets/heading6.js +50 -0
- package/dist/cjs/quick-insert/assets/images.js +92 -0
- package/dist/cjs/quick-insert/assets/index.js +372 -0
- package/dist/cjs/quick-insert/assets/layout.js +71 -0
- package/dist/cjs/quick-insert/assets/link.js +35 -0
- package/dist/cjs/quick-insert/assets/list-number.js +51 -0
- package/dist/cjs/quick-insert/assets/list.js +65 -0
- package/dist/cjs/quick-insert/assets/mention.js +56 -0
- package/dist/cjs/quick-insert/assets/panel-error.js +35 -0
- package/dist/cjs/quick-insert/assets/panel-note.js +35 -0
- package/dist/cjs/quick-insert/assets/panel-success.js +35 -0
- package/dist/cjs/quick-insert/assets/panel-warning.js +35 -0
- package/dist/cjs/quick-insert/assets/panel.js +50 -0
- package/dist/cjs/quick-insert/assets/quote.js +35 -0
- package/dist/cjs/quick-insert/assets/status.js +109 -0
- package/dist/cjs/quick-insert/index.js +150 -0
- package/dist/cjs/types/block-type.js +5 -0
- package/dist/cjs/ui/Announcer/announcer.js +62 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/PanelTextInput/index.js +174 -0
- package/dist/cjs/ui/PanelTextInput/styles.js +19 -0
- package/dist/cjs/ui/index.js +21 -0
- package/dist/cjs/utils/commands.js +20 -0
- package/dist/cjs/utils/hyperlink.js +25 -2
- package/dist/cjs/utils/index.js +24 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/link/LinkPicker/EditorLinkPicker/index.js +74 -0
- package/dist/es2019/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +25 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +789 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/index.js +74 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/messages.js +33 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/utils.js +83 -0
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +63 -0
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +141 -0
- package/dist/es2019/link/LinkSearch/ToolbarComponents.js +20 -0
- package/dist/es2019/link/LinkSearch/index.js +213 -0
- package/dist/es2019/link/LinkSearch/listItemAlts.js +63 -0
- package/dist/es2019/link/LinkSearch/transformTimeStamp.js +34 -0
- package/dist/es2019/link/LinkSearch/types.js +1 -0
- package/dist/es2019/link/LinkSearch/withActivityProvider.js +35 -0
- package/dist/es2019/link/index.js +11 -0
- package/dist/es2019/link/types.js +14 -0
- package/dist/es2019/link/utils.js +12 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/assets/action.js +35 -0
- package/dist/es2019/quick-insert/assets/code.js +107 -0
- package/dist/es2019/quick-insert/assets/custom-panel.js +47 -0
- package/dist/es2019/quick-insert/assets/date.js +85 -0
- package/dist/es2019/quick-insert/assets/decision.js +26 -0
- package/dist/es2019/quick-insert/assets/divider.js +66 -0
- package/dist/es2019/quick-insert/assets/emoji.js +29 -0
- package/dist/es2019/quick-insert/assets/expand.js +39 -0
- package/dist/es2019/quick-insert/assets/fallback.js +47 -0
- package/dist/es2019/quick-insert/assets/feedback.js +62 -0
- package/dist/es2019/quick-insert/assets/heading1.js +42 -0
- package/dist/es2019/quick-insert/assets/heading2.js +42 -0
- package/dist/es2019/quick-insert/assets/heading3.js +42 -0
- package/dist/es2019/quick-insert/assets/heading4.js +42 -0
- package/dist/es2019/quick-insert/assets/heading5.js +42 -0
- package/dist/es2019/quick-insert/assets/heading6.js +42 -0
- package/dist/es2019/quick-insert/assets/images.js +84 -0
- package/dist/es2019/quick-insert/assets/index.js +115 -0
- package/dist/es2019/quick-insert/assets/layout.js +63 -0
- package/dist/es2019/quick-insert/assets/link.js +27 -0
- package/dist/es2019/quick-insert/assets/list-number.js +43 -0
- package/dist/es2019/quick-insert/assets/list.js +57 -0
- package/dist/es2019/quick-insert/assets/mention.js +48 -0
- package/dist/es2019/quick-insert/assets/panel-error.js +27 -0
- package/dist/es2019/quick-insert/assets/panel-note.js +27 -0
- package/dist/es2019/quick-insert/assets/panel-success.js +27 -0
- package/dist/es2019/quick-insert/assets/panel-warning.js +27 -0
- package/dist/es2019/quick-insert/assets/panel.js +42 -0
- package/dist/es2019/quick-insert/assets/quote.js +27 -0
- package/dist/es2019/quick-insert/assets/status.js +101 -0
- package/dist/es2019/quick-insert/index.js +1 -0
- package/dist/es2019/types/block-type.js +1 -0
- package/dist/es2019/ui/Announcer/announcer.js +41 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/PanelTextInput/index.js +149 -0
- package/dist/es2019/ui/PanelTextInput/styles.js +36 -0
- package/dist/es2019/ui/index.js +4 -1
- package/dist/es2019/utils/commands.js +11 -0
- package/dist/es2019/utils/hyperlink.js +19 -1
- package/dist/es2019/utils/index.js +8 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/link/LinkPicker/EditorLinkPicker/index.js +76 -0
- package/dist/esm/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +25 -0
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +924 -0
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/index.js +72 -0
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/messages.js +33 -0
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/utils.js +73 -0
- package/dist/esm/link/LinkSearch/LinkSearchList.js +75 -0
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +131 -0
- package/dist/esm/link/LinkSearch/ToolbarComponents.js +7 -0
- package/dist/esm/link/LinkSearch/index.js +320 -0
- package/dist/esm/link/LinkSearch/listItemAlts.js +63 -0
- package/dist/esm/link/LinkSearch/transformTimeStamp.js +34 -0
- package/dist/esm/link/LinkSearch/types.js +1 -0
- package/dist/esm/link/LinkSearch/withActivityProvider.js +52 -0
- package/dist/esm/link/index.js +11 -0
- package/dist/esm/link/types.js +14 -0
- package/dist/esm/link/utils.js +12 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/assets/action.js +35 -0
- package/dist/esm/quick-insert/assets/code.js +107 -0
- package/dist/esm/quick-insert/assets/custom-panel.js +47 -0
- package/dist/esm/quick-insert/assets/date.js +85 -0
- package/dist/esm/quick-insert/assets/decision.js +26 -0
- package/dist/esm/quick-insert/assets/divider.js +66 -0
- package/dist/esm/quick-insert/assets/emoji.js +29 -0
- package/dist/esm/quick-insert/assets/expand.js +39 -0
- package/dist/esm/quick-insert/assets/fallback.js +47 -0
- package/dist/esm/quick-insert/assets/feedback.js +62 -0
- package/dist/esm/quick-insert/assets/heading1.js +42 -0
- package/dist/esm/quick-insert/assets/heading2.js +42 -0
- package/dist/esm/quick-insert/assets/heading3.js +42 -0
- package/dist/esm/quick-insert/assets/heading4.js +42 -0
- package/dist/esm/quick-insert/assets/heading5.js +42 -0
- package/dist/esm/quick-insert/assets/heading6.js +42 -0
- package/dist/esm/quick-insert/assets/images.js +84 -0
- package/dist/esm/quick-insert/assets/index.js +248 -0
- package/dist/esm/quick-insert/assets/layout.js +63 -0
- package/dist/esm/quick-insert/assets/link.js +27 -0
- package/dist/esm/quick-insert/assets/list-number.js +43 -0
- package/dist/esm/quick-insert/assets/list.js +57 -0
- package/dist/esm/quick-insert/assets/mention.js +48 -0
- package/dist/esm/quick-insert/assets/panel-error.js +27 -0
- package/dist/esm/quick-insert/assets/panel-note.js +27 -0
- package/dist/esm/quick-insert/assets/panel-success.js +27 -0
- package/dist/esm/quick-insert/assets/panel-warning.js +27 -0
- package/dist/esm/quick-insert/assets/panel.js +42 -0
- package/dist/esm/quick-insert/assets/quote.js +27 -0
- package/dist/esm/quick-insert/assets/status.js +101 -0
- package/dist/esm/quick-insert/index.js +1 -0
- package/dist/esm/types/block-type.js +1 -0
- package/dist/esm/ui/Announcer/announcer.js +52 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/PanelTextInput/index.js +168 -0
- package/dist/esm/ui/PanelTextInput/styles.js +10 -0
- package/dist/esm/ui/index.js +4 -1
- package/dist/esm/utils/commands.js +13 -0
- package/dist/esm/utils/hyperlink.js +23 -1
- package/dist/esm/utils/index.js +12 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/link/LinkPicker/EditorLinkPicker/index.d.ts +23 -0
- package/dist/types/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.d.ts +2 -0
- package/dist/types/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +115 -0
- package/dist/types/link/LinkPicker/HyperlinkAddToolbar/index.d.ts +21 -0
- package/dist/types/link/LinkPicker/HyperlinkAddToolbar/messages.d.ts +32 -0
- package/dist/types/link/LinkPicker/HyperlinkAddToolbar/utils.d.ts +8 -0
- package/dist/types/link/LinkSearch/LinkSearchList.d.ts +20 -0
- package/dist/types/link/LinkSearch/LinkSearchListItem.d.ts +22 -0
- package/dist/types/link/LinkSearch/ToolbarComponents.d.ts +3 -0
- package/dist/types/link/LinkSearch/index.d.ts +59 -0
- package/dist/types/link/LinkSearch/listItemAlts.d.ts +2 -0
- package/dist/types/link/LinkSearch/transformTimeStamp.d.ts +10 -0
- package/dist/types/link/LinkSearch/types.d.ts +49 -0
- package/dist/types/link/LinkSearch/withActivityProvider.d.ts +66 -0
- package/dist/types/link/index.d.ts +16 -0
- package/dist/types/link/types.d.ts +40 -0
- package/dist/types/link/utils.d.ts +3 -0
- package/dist/types/quick-insert/assets/action.d.ts +2 -0
- package/dist/types/quick-insert/assets/code.d.ts +2 -0
- package/dist/types/quick-insert/assets/custom-panel.d.ts +2 -0
- package/dist/types/quick-insert/assets/date.d.ts +2 -0
- package/dist/types/quick-insert/assets/decision.d.ts +2 -0
- package/dist/types/quick-insert/assets/divider.d.ts +2 -0
- package/dist/types/quick-insert/assets/emoji.d.ts +2 -0
- package/dist/types/quick-insert/assets/expand.d.ts +2 -0
- package/dist/types/quick-insert/assets/fallback.d.ts +2 -0
- package/dist/types/quick-insert/assets/feedback.d.ts +2 -0
- package/dist/types/quick-insert/assets/heading1.d.ts +2 -0
- package/dist/types/quick-insert/assets/heading2.d.ts +2 -0
- package/dist/types/quick-insert/assets/heading3.d.ts +2 -0
- package/dist/types/quick-insert/assets/heading4.d.ts +2 -0
- package/dist/types/quick-insert/assets/heading5.d.ts +2 -0
- package/dist/types/quick-insert/assets/heading6.d.ts +2 -0
- package/dist/types/quick-insert/assets/images.d.ts +2 -0
- package/dist/types/quick-insert/assets/index.d.ts +30 -0
- package/dist/types/quick-insert/assets/layout.d.ts +2 -0
- package/dist/types/quick-insert/assets/link.d.ts +2 -0
- package/dist/types/quick-insert/assets/list-number.d.ts +2 -0
- package/dist/types/quick-insert/assets/list.d.ts +2 -0
- package/dist/types/quick-insert/assets/mention.d.ts +2 -0
- package/dist/types/quick-insert/assets/panel-error.d.ts +2 -0
- package/dist/types/quick-insert/assets/panel-note.d.ts +2 -0
- package/dist/types/quick-insert/assets/panel-success.d.ts +2 -0
- package/dist/types/quick-insert/assets/panel-warning.d.ts +2 -0
- package/dist/types/quick-insert/assets/panel.d.ts +2 -0
- package/dist/types/quick-insert/assets/quote.d.ts +2 -0
- package/dist/types/quick-insert/assets/status.d.ts +2 -0
- package/dist/types/quick-insert/index.d.ts +1 -0
- package/dist/types/types/block-type.d.ts +3 -0
- package/dist/types/types/command.d.ts +1 -0
- package/dist/types/types/index.d.ts +2 -1
- package/dist/types/ui/Announcer/announcer.d.ts +22 -0
- package/dist/types/ui/PanelTextInput/index.d.ts +45 -0
- package/dist/types/ui/PanelTextInput/styles.d.ts +2 -0
- package/dist/types/ui/index.d.ts +3 -0
- package/dist/types/utils/commands.d.ts +2 -0
- package/dist/types/utils/hyperlink.d.ts +2 -0
- package/dist/types/utils/index.d.ts +3 -1
- package/dist/types-ts4.5/link/LinkPicker/EditorLinkPicker/index.d.ts +23 -0
- package/dist/types-ts4.5/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.d.ts +2 -0
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +115 -0
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/index.d.ts +21 -0
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/messages.d.ts +32 -0
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/utils.d.ts +8 -0
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchList.d.ts +20 -0
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchListItem.d.ts +22 -0
- package/dist/types-ts4.5/link/LinkSearch/ToolbarComponents.d.ts +3 -0
- package/dist/types-ts4.5/link/LinkSearch/index.d.ts +59 -0
- package/dist/types-ts4.5/link/LinkSearch/listItemAlts.d.ts +2 -0
- package/dist/types-ts4.5/link/LinkSearch/transformTimeStamp.d.ts +10 -0
- package/dist/types-ts4.5/link/LinkSearch/types.d.ts +49 -0
- package/dist/types-ts4.5/link/LinkSearch/withActivityProvider.d.ts +66 -0
- package/dist/types-ts4.5/link/index.d.ts +16 -0
- package/dist/types-ts4.5/link/types.d.ts +40 -0
- package/dist/types-ts4.5/link/utils.d.ts +3 -0
- package/dist/types-ts4.5/quick-insert/assets/action.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/code.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/custom-panel.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/date.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/decision.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/divider.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/emoji.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/expand.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/fallback.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/feedback.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading1.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading2.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading3.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading4.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading5.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading6.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/images.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/index.d.ts +30 -0
- package/dist/types-ts4.5/quick-insert/assets/layout.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/link.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/list-number.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/list.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/mention.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel-error.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel-note.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel-success.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel-warning.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/quote.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/status.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/index.d.ts +1 -0
- package/dist/types-ts4.5/types/block-type.d.ts +3 -0
- package/dist/types-ts4.5/types/command.d.ts +1 -0
- package/dist/types-ts4.5/types/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/Announcer/announcer.d.ts +22 -0
- package/dist/types-ts4.5/ui/PanelTextInput/index.d.ts +45 -0
- package/dist/types-ts4.5/ui/PanelTextInput/styles.d.ts +2 -0
- package/dist/types-ts4.5/ui/index.d.ts +3 -0
- package/dist/types-ts4.5/utils/commands.d.ts +2 -0
- package/dist/types-ts4.5/utils/hyperlink.d.ts +2 -0
- package/dist/types-ts4.5/utils/index.d.ts +3 -1
- package/link/package.json +15 -0
- package/package.json +11 -3
- package/quick-insert/package.json +15 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EditorView } from 'prosemirror-view';
|
|
3
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { HyperlinkState } from '../../../link';
|
|
5
|
+
import { ProviderFactory } from '../../../provider-factory';
|
|
6
|
+
import type { Command, FeatureFlags, LinkInputType, LinkPickerOptions } from '../../../types';
|
|
7
|
+
import { EditorLinkPickerProps } from '../EditorLinkPicker';
|
|
8
|
+
export interface HyperlinkAddToolbarProps extends Pick<EditorLinkPickerProps, 'onCancel' | 'invokeMethod' | 'onClose'> {
|
|
9
|
+
view: EditorView;
|
|
10
|
+
providerFactory: ProviderFactory;
|
|
11
|
+
onSubmit: (href: string, title: string | undefined, displayText: string | undefined, inputMethod: LinkInputType, analytic?: UIAnalyticsEvent | null | undefined) => void;
|
|
12
|
+
featureFlags: FeatureFlags;
|
|
13
|
+
linkPickerOptions?: LinkPickerOptions;
|
|
14
|
+
displayText?: string;
|
|
15
|
+
displayUrl?: string;
|
|
16
|
+
onEscapeCallback?: Command;
|
|
17
|
+
onClickAwayCallback?: Command;
|
|
18
|
+
}
|
|
19
|
+
export declare function HyperlinkAddToolbar({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, featureFlags, onClose, onEscapeCallback, onClickAwayCallback, hyperlinkPluginState, }: HyperlinkAddToolbarProps & {
|
|
20
|
+
hyperlinkPluginState: HyperlinkState;
|
|
21
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const utilMessages: {
|
|
2
|
+
hyperlinkIconIssueLabel: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
hyperlinkIconBugLabel: {
|
|
8
|
+
id: string;
|
|
9
|
+
defaultMessage: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
hyperlinkIconStoryLabel: {
|
|
13
|
+
id: string;
|
|
14
|
+
defaultMessage: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
hyperlinkIconTaskLabel: {
|
|
18
|
+
id: string;
|
|
19
|
+
defaultMessage: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
hyperlinkIconPageLabel: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
hyperlinkIconBlogLabel: {
|
|
28
|
+
id: string;
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LinkContentType } from '../../../provider-factory';
|
|
3
|
+
export declare function filterUniqueItems<T>(arr: Array<T>, comparator?: (firstItem: T, secondItem: T) => boolean): Array<T>;
|
|
4
|
+
export declare const mapContentTypeToIcon: {
|
|
5
|
+
[key in LinkContentType]?: React.ReactElement;
|
|
6
|
+
};
|
|
7
|
+
export declare const sha1: (input: string) => string;
|
|
8
|
+
export declare const wordCount: (input: string) => number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { LinkSearchListItemData } from './types';
|
|
5
|
+
export declare const linkSearchList: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export interface Props {
|
|
7
|
+
items?: LinkSearchListItemData[];
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
selectedIndex: number;
|
|
10
|
+
onSelect: (href: string, text: string) => void;
|
|
11
|
+
onMouseMove?: (objectId: string) => void;
|
|
12
|
+
onMouseEnter?: (objectId: string) => void;
|
|
13
|
+
onMouseLeave?: (objectId: string) => void;
|
|
14
|
+
ariaControls?: string;
|
|
15
|
+
role?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
}
|
|
18
|
+
export default class LinkSearchList extends PureComponent<Props, {}> {
|
|
19
|
+
render(): jsx.JSX.Element;
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import { LinkSearchListItemData } from './types';
|
|
5
|
+
export declare const container: import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const containerSelected: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const nameStyle: import("@emotion/react").SerializedStyles;
|
|
8
|
+
export declare const containerName: import("@emotion/react").SerializedStyles;
|
|
9
|
+
export interface Props {
|
|
10
|
+
item: LinkSearchListItemData;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
onSelect: (href: string, text: string) => void;
|
|
13
|
+
onMouseMove?: (objectId: string) => void;
|
|
14
|
+
onMouseEnter?: (objectId: string) => void;
|
|
15
|
+
onMouseLeave?: (objectId: string) => void;
|
|
16
|
+
id?: string;
|
|
17
|
+
role?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
20
|
+
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RecentSearchProps } from './types';
|
|
3
|
+
import { WithActivityProviderProps } from './withActivityProvider';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
new (props: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>): {
|
|
6
|
+
renderNode: (providers: import("../../provider-factory").Providers) => JSX.Element;
|
|
7
|
+
render(): JSX.Element;
|
|
8
|
+
context: any;
|
|
9
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
10
|
+
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
11
|
+
readonly props: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps> & Readonly<{
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}>;
|
|
14
|
+
state: Readonly<{}>;
|
|
15
|
+
refs: {
|
|
16
|
+
[key: string]: React.ReactInstance;
|
|
17
|
+
};
|
|
18
|
+
componentDidMount?(): void;
|
|
19
|
+
shouldComponentUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
20
|
+
componentWillUnmount?(): void;
|
|
21
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
22
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, prevState: Readonly<{}>): any;
|
|
23
|
+
componentDidUpdate?(prevProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
24
|
+
componentWillMount?(): void;
|
|
25
|
+
UNSAFE_componentWillMount?(): void;
|
|
26
|
+
componentWillReceiveProps?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextContext: any): void;
|
|
27
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextContext: any): void;
|
|
28
|
+
componentWillUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
29
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
30
|
+
};
|
|
31
|
+
new (props: import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps, context?: any): {
|
|
32
|
+
renderNode: (providers: import("../../provider-factory").Providers) => JSX.Element;
|
|
33
|
+
render(): JSX.Element;
|
|
34
|
+
context: any;
|
|
35
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
36
|
+
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
37
|
+
readonly props: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps> & Readonly<{
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
}>;
|
|
40
|
+
state: Readonly<{}>;
|
|
41
|
+
refs: {
|
|
42
|
+
[key: string]: React.ReactInstance;
|
|
43
|
+
};
|
|
44
|
+
componentDidMount?(): void;
|
|
45
|
+
shouldComponentUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
46
|
+
componentWillUnmount?(): void;
|
|
47
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
48
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, prevState: Readonly<{}>): any;
|
|
49
|
+
componentDidUpdate?(prevProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
50
|
+
componentWillMount?(): void;
|
|
51
|
+
UNSAFE_componentWillMount?(): void;
|
|
52
|
+
componentWillReceiveProps?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextContext: any): void;
|
|
53
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextContext: any): void;
|
|
54
|
+
componentWillUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
55
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("../../utils").Diff<RecentSearchProps & WithActivityProviderProps, WithActivityProviderProps> & import("./withActivityProvider").ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
56
|
+
};
|
|
57
|
+
contextType?: React.Context<any> | undefined;
|
|
58
|
+
};
|
|
59
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IntlShape } from 'react-intl-next';
|
|
2
|
+
export declare const transformTimeStamp: (intl: IntlShape, lastViewedDate?: Date, lastUpdatedDate?: Date) => {
|
|
3
|
+
pageAction: string;
|
|
4
|
+
dateString: string;
|
|
5
|
+
timeSince?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
pageAction: string;
|
|
8
|
+
dateString: string;
|
|
9
|
+
timeSince: string;
|
|
10
|
+
} | undefined;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { KeyboardEvent } from 'react';
|
|
2
|
+
import { ActivityItem, ActivityProvider } from '@atlaskit/activity-provider';
|
|
3
|
+
import { INPUT_METHOD } from '../../analytics';
|
|
4
|
+
export type RecentSearchInputTypes = INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL;
|
|
5
|
+
export interface ChildProps {
|
|
6
|
+
activityProvider: ActivityProvider | null;
|
|
7
|
+
inputProps: {
|
|
8
|
+
onChange(input: string): void;
|
|
9
|
+
onKeyDown(event: KeyboardEvent<any>): void;
|
|
10
|
+
onSubmit(): void;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
currentInputMethod?: RecentSearchInputTypes;
|
|
14
|
+
clearValue(): void;
|
|
15
|
+
renderRecentList(): React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface RecentSearchSubmitOptions {
|
|
18
|
+
text: string;
|
|
19
|
+
url: string;
|
|
20
|
+
inputMethod: RecentSearchInputTypes;
|
|
21
|
+
}
|
|
22
|
+
export interface RecentSearchProps {
|
|
23
|
+
defaultUrl?: string;
|
|
24
|
+
onSubmit(options: RecentSearchSubmitOptions): void;
|
|
25
|
+
onBlur(options: RecentSearchSubmitOptions): void;
|
|
26
|
+
render(state: ChildProps): React.ReactNode;
|
|
27
|
+
limit?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface RecentSearchState {
|
|
30
|
+
items: Array<ActivityItem>;
|
|
31
|
+
selectedIndex: number;
|
|
32
|
+
isLoading: boolean;
|
|
33
|
+
url: string;
|
|
34
|
+
}
|
|
35
|
+
export type LinkSearchListItemData = {
|
|
36
|
+
objectId: string;
|
|
37
|
+
name: string;
|
|
38
|
+
container: string;
|
|
39
|
+
url: string;
|
|
40
|
+
iconUrl?: string | never;
|
|
41
|
+
icon?: React.ReactChild | never;
|
|
42
|
+
lastViewedDate?: Date;
|
|
43
|
+
lastUpdatedDate?: Date;
|
|
44
|
+
prefetch?: boolean;
|
|
45
|
+
} & ({
|
|
46
|
+
iconUrl: string;
|
|
47
|
+
} | {
|
|
48
|
+
icon: React.ReactChild;
|
|
49
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActivityProvider } from '@atlaskit/activity-provider';
|
|
3
|
+
import { ProviderFactory } from '../../provider-factory';
|
|
4
|
+
import type { Providers } from '../../provider-factory';
|
|
5
|
+
import type { Diff } from '../../utils';
|
|
6
|
+
export interface ExpandedActivityProviderProps {
|
|
7
|
+
providerFactory: ProviderFactory;
|
|
8
|
+
}
|
|
9
|
+
export interface WithActivityProviderProps {
|
|
10
|
+
activityProvider: ActivityProvider;
|
|
11
|
+
}
|
|
12
|
+
export default function withActivityProvider<Props>(WrappedComponent: React.ComponentType<Props & WithActivityProviderProps>): {
|
|
13
|
+
new (props: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>): {
|
|
14
|
+
renderNode: (providers: Providers) => JSX.Element;
|
|
15
|
+
render(): JSX.Element;
|
|
16
|
+
context: any;
|
|
17
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
18
|
+
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
19
|
+
readonly props: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps> & Readonly<{
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}>;
|
|
22
|
+
state: Readonly<{}>;
|
|
23
|
+
refs: {
|
|
24
|
+
[key: string]: React.ReactInstance;
|
|
25
|
+
};
|
|
26
|
+
componentDidMount?(): void;
|
|
27
|
+
shouldComponentUpdate?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
28
|
+
componentWillUnmount?(): void;
|
|
29
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
30
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, prevState: Readonly<{}>): any;
|
|
31
|
+
componentDidUpdate?(prevProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
32
|
+
componentWillMount?(): void;
|
|
33
|
+
UNSAFE_componentWillMount?(): void;
|
|
34
|
+
componentWillReceiveProps?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextContext: any): void;
|
|
35
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextContext: any): void;
|
|
36
|
+
componentWillUpdate?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
37
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
38
|
+
};
|
|
39
|
+
new (props: Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps, context?: any): {
|
|
40
|
+
renderNode: (providers: Providers) => JSX.Element;
|
|
41
|
+
render(): JSX.Element;
|
|
42
|
+
context: any;
|
|
43
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
44
|
+
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
45
|
+
readonly props: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps> & Readonly<{
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
}>;
|
|
48
|
+
state: Readonly<{}>;
|
|
49
|
+
refs: {
|
|
50
|
+
[key: string]: React.ReactInstance;
|
|
51
|
+
};
|
|
52
|
+
componentDidMount?(): void;
|
|
53
|
+
shouldComponentUpdate?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
54
|
+
componentWillUnmount?(): void;
|
|
55
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
56
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, prevState: Readonly<{}>): any;
|
|
57
|
+
componentDidUpdate?(prevProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
58
|
+
componentWillMount?(): void;
|
|
59
|
+
UNSAFE_componentWillMount?(): void;
|
|
60
|
+
componentWillReceiveProps?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextContext: any): void;
|
|
61
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextContext: any): void;
|
|
62
|
+
componentWillUpdate?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
63
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Diff<Props, WithActivityProviderProps> & ExpandedActivityProviderProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
64
|
+
};
|
|
65
|
+
contextType?: React.Context<any> | undefined;
|
|
66
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { transformTimeStamp } from './LinkSearch/transformTimeStamp';
|
|
2
|
+
export type { LinkSearchListItemData, ChildProps, RecentSearchInputTypes, RecentSearchSubmitOptions, } from './LinkSearch/types';
|
|
3
|
+
export { container, containerWithProvider, inputWrapper, } from './LinkSearch/ToolbarComponents';
|
|
4
|
+
export { default as LinkSearchListItem } from './LinkSearch/LinkSearchListItem';
|
|
5
|
+
export { default as LinkSearchList } from './LinkSearch/LinkSearchList';
|
|
6
|
+
export { default as RecentSearch } from './LinkSearch';
|
|
7
|
+
export type { InsertState, EditInsertedState, EditState, LinkToolbarState, HyperlinkState, } from './types';
|
|
8
|
+
export { InsertStatus, LinkAction } from './types';
|
|
9
|
+
export { EditorLinkPicker } from './LinkPicker/EditorLinkPicker';
|
|
10
|
+
export type { EditorLinkPickerProps } from './LinkPicker/EditorLinkPicker';
|
|
11
|
+
export { HyperlinkAddToolbar } from './LinkPicker/HyperlinkAddToolbar';
|
|
12
|
+
export { default as HyperlinkLinkAddToolbar, HyperlinkLinkAddToolbarWithIntl, RECENT_SEARCH_LIST_SIZE, } from './LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar';
|
|
13
|
+
export type { Props as HyperlinkLinkAddToolbarProps } from './LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar';
|
|
14
|
+
export type { HyperlinkAddToolbarProps } from './LinkPicker/HyperlinkAddToolbar';
|
|
15
|
+
export { sha1 } from './LinkPicker/HyperlinkAddToolbar/utils';
|
|
16
|
+
export { isLinkAtPos, isTextAtPos } from './utils';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Node } from 'prosemirror-model';
|
|
2
|
+
import { INPUT_METHOD } from '../analytics';
|
|
3
|
+
import type { EditorAppearance } from '../types';
|
|
4
|
+
export declare enum LinkAction {
|
|
5
|
+
SHOW_INSERT_TOOLBAR = "SHOW_INSERT_TOOLBAR",
|
|
6
|
+
HIDE_TOOLBAR = "HIDE_TOOLBAR",
|
|
7
|
+
SELECTION_CHANGE = "SELECTION_CHANGE",
|
|
8
|
+
INSERT_LINK_TOOLBAR = "INSERT",
|
|
9
|
+
EDIT_INSERTED_TOOLBAR = "EDIT_INSERTED_TOOLBAR"
|
|
10
|
+
}
|
|
11
|
+
export declare enum InsertStatus {
|
|
12
|
+
EDIT_LINK_TOOLBAR = "EDIT",
|
|
13
|
+
INSERT_LINK_TOOLBAR = "INSERT",
|
|
14
|
+
EDIT_INSERTED_TOOLBAR = "EDIT_INSERTED"
|
|
15
|
+
}
|
|
16
|
+
export type InsertState = {
|
|
17
|
+
type: InsertStatus.INSERT_LINK_TOOLBAR;
|
|
18
|
+
from: number;
|
|
19
|
+
to: number;
|
|
20
|
+
};
|
|
21
|
+
export type EditInsertedState = {
|
|
22
|
+
type: InsertStatus.EDIT_INSERTED_TOOLBAR;
|
|
23
|
+
node: Node;
|
|
24
|
+
pos: number;
|
|
25
|
+
};
|
|
26
|
+
export type EditState = {
|
|
27
|
+
type: InsertStatus.EDIT_LINK_TOOLBAR;
|
|
28
|
+
node: Node;
|
|
29
|
+
pos: number;
|
|
30
|
+
};
|
|
31
|
+
export type LinkToolbarState = EditState | EditInsertedState | InsertState | undefined;
|
|
32
|
+
export interface HyperlinkState {
|
|
33
|
+
activeText?: string;
|
|
34
|
+
activeLinkMark?: LinkToolbarState;
|
|
35
|
+
timesViewed: number;
|
|
36
|
+
canInsertLink: boolean;
|
|
37
|
+
searchSessionId?: string;
|
|
38
|
+
inputMethod?: INPUT_METHOD;
|
|
39
|
+
editorAppearance?: EditorAppearance;
|
|
40
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Loadable from 'react-loadable';
|
|
3
|
+
import { HeadingLevels, IconProps } from '../../types';
|
|
4
|
+
export { default as IconCustomPanel } from './custom-panel';
|
|
5
|
+
export { default as IconFallback } from './fallback';
|
|
6
|
+
export declare const IconAction: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
7
|
+
export declare const IconCode: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
8
|
+
export declare const IconDate: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
9
|
+
export declare const IconDecision: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
10
|
+
export declare const IconDivider: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
11
|
+
export declare const IconEmoji: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
12
|
+
export declare const IconImages: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
13
|
+
export declare const IconLayout: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
14
|
+
export declare const IconLink: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
15
|
+
export declare const IconListNumber: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
16
|
+
export declare const IconList: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
17
|
+
export declare const IconMention: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
18
|
+
export declare const IconPanelError: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
19
|
+
export declare const IconPanelNote: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
20
|
+
export declare const IconPanelSuccess: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
21
|
+
export declare const IconPanelWarning: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
22
|
+
export declare const IconPanel: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
23
|
+
export declare const IconQuote: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
24
|
+
export declare const IconStatus: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
25
|
+
type HeadingProps = IconProps & {
|
|
26
|
+
level: HeadingLevels;
|
|
27
|
+
};
|
|
28
|
+
export declare const IconHeading: ({ level, ...props }: HeadingProps) => JSX.Element;
|
|
29
|
+
export declare const IconFeedback: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
30
|
+
export declare const IconExpand: React.ComponentType<IconProps> & Loadable.LoadableComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IconAction, IconCode, IconDate, IconDecision, IconDivider, IconEmoji, IconImages, IconLayout, IconLink, IconListNumber, IconList, IconMention, IconPanelError, IconPanelNote, IconPanelSuccess, IconPanelWarning, IconPanel, IconQuote, IconStatus, IconHeading, IconFeedback, IconExpand, IconCustomPanel, IconFallback, } from './assets';
|
|
@@ -3,3 +3,4 @@ import type { EditorView } from 'prosemirror-view';
|
|
|
3
3
|
export type CommandDispatch = (tr: Transaction) => void;
|
|
4
4
|
export type Command = (state: EditorState, dispatch?: CommandDispatch, view?: EditorView) => boolean;
|
|
5
5
|
export type HigherOrderCommand = (command: Command) => Command;
|
|
6
|
+
export type Predicate = (state: EditorState, view?: EditorView) => boolean;
|
|
@@ -12,7 +12,7 @@ export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation';
|
|
|
12
12
|
export type { AnnotationState, AnnotationProviders, AnnotationUpdateEventPayloads, InlineCommentSelectionComponentProps, InlineCommentViewComponentProps, InlineCommentAnnotationProvider, OnAnnotationClickPayload, AnnotationByMatches, AnnotationActionResult, } from './annotation';
|
|
13
13
|
export type { ContextUpdateHandler, EditorActionsOptions, ReplaceRawValue, } from './editor-actions';
|
|
14
14
|
export type { TypeAheadStats, TypeAheadItemRenderProps, TypeAheadInsert, TypeAheadSelectItem, TypeAheadItem, TypeAheadForceSelect, TypeAheadHandler, } from './type-ahead';
|
|
15
|
-
export type { CommandDispatch, Command, HigherOrderCommand } from './command';
|
|
15
|
+
export type { CommandDispatch, Command, HigherOrderCommand, Predicate, } from './command';
|
|
16
16
|
export type { FeatureFlags, FeatureFlagKey, GetEditorFeatureFlags, } from './feature-flags';
|
|
17
17
|
export type { Browsers, Range, DisableSpellcheckByBrowser, } from './supported-browsers';
|
|
18
18
|
export type { EditorContainerWidth, GetEditorContainerWidth, } from './editor-container-width';
|
|
@@ -38,3 +38,4 @@ export type { LinkInputType, LinkPickerOptions, LinkingOptions, HyperlinkPluginO
|
|
|
38
38
|
export type { SnapPointsProps } from './resizable-media-single';
|
|
39
39
|
export type { BreakoutMode } from './breakout';
|
|
40
40
|
export type { ImageUploadPluginReferenceEventBase, ImageUploadPluginReferenceEventDragEvent, ImageUploadPluginReferenceEventClipboardEvent, ImageUploadPluginReferenceEvent, } from './image-upload-reference-event';
|
|
41
|
+
export type { HeadingLevels, NormalTextLevel, HeadingLevelsAndNormalText, } from './block-type';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { AriaAttributes, Ref } from 'react';
|
|
2
|
+
type AnnouncerProps = {
|
|
3
|
+
ref?: Ref<HTMLDivElement>;
|
|
4
|
+
/** Set 'false' for announcing only changed text
|
|
5
|
+
* (not announce duplicate part of string after second render),
|
|
6
|
+
* and 'true' for announcing all the string after each render */
|
|
7
|
+
ariaAtomic?: AriaAttributes['aria-atomic'];
|
|
8
|
+
/** Set politeness settings */
|
|
9
|
+
ariaLive?: AriaAttributes['aria-live'];
|
|
10
|
+
/** Used to describe what types of changes have occurred to an aria-live region */
|
|
11
|
+
ariaRelevant?: AriaAttributes['aria-relevant'];
|
|
12
|
+
/** Role used to set attribute role. See more details https://dequeuniversity.com/library/aria/liveregion-playground#configOptions */
|
|
13
|
+
role?: 'status' | 'log' | 'alert' | 'timer' | 'marquee';
|
|
14
|
+
/** Text message that will be announced */
|
|
15
|
+
text: string;
|
|
16
|
+
/** Debounce delay.
|
|
17
|
+
* Set delay (ms) to prevent announce the same string multiple times.
|
|
18
|
+
* It can be useful for cases when the parent component re-renders with the same announcer's text. */
|
|
19
|
+
delay?: number;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: React.NamedExoticComponent<AnnouncerProps>;
|
|
22
|
+
export default _default;
|