@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,45 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { FocusEvent, KeyboardEvent, PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
export interface Props {
|
|
5
|
+
autoFocus?: boolean | FocusOptions;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
onSubmit?: (value: string) => void;
|
|
9
|
+
onCancel?: (e: KeyboardEvent) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
onMouseDown?: Function;
|
|
12
|
+
onKeyDown?: (e: KeyboardEvent<any>) => void;
|
|
13
|
+
onUndo?: Function;
|
|
14
|
+
onRedo?: Function;
|
|
15
|
+
onBlur?: Function;
|
|
16
|
+
width?: number;
|
|
17
|
+
maxLength?: number;
|
|
18
|
+
testId?: string;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
describedById?: string;
|
|
21
|
+
ariaExpanded?: boolean;
|
|
22
|
+
ariaActiveDescendant?: string;
|
|
23
|
+
ariaControls?: string;
|
|
24
|
+
role?: string;
|
|
25
|
+
ariaAutoComplete?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface State {
|
|
28
|
+
value?: string;
|
|
29
|
+
}
|
|
30
|
+
export default class PanelTextInput extends PureComponent<Props, State> {
|
|
31
|
+
private input?;
|
|
32
|
+
private focusTimeoutId;
|
|
33
|
+
constructor(props: Props);
|
|
34
|
+
componentDidUpdate(prevProps: Props): void;
|
|
35
|
+
componentWillUnmount(): void;
|
|
36
|
+
onMouseDown: () => void;
|
|
37
|
+
onBlur: (e: FocusEvent<any>) => void;
|
|
38
|
+
render(): jsx.JSX.Element;
|
|
39
|
+
focus(): void;
|
|
40
|
+
private handleChange;
|
|
41
|
+
private handleKeydown;
|
|
42
|
+
private isUndoEvent;
|
|
43
|
+
private isRedoEvent;
|
|
44
|
+
private handleRef;
|
|
45
|
+
}
|
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -33,3 +33,6 @@ export type { ResizerState } from './ResizerLegacy';
|
|
|
33
33
|
export type { EnabledHandles, Props as ResizerProps, } from './ResizerLegacy/types';
|
|
34
34
|
export { snapTo, handleSides, imageAlignmentMap } from './ResizerLegacy/utils';
|
|
35
35
|
export { wrapperStyle } from './ResizerLegacy/styled';
|
|
36
|
+
export { panelTextInput } from './PanelTextInput/styles';
|
|
37
|
+
export { default as PanelTextInput } from './PanelTextInput';
|
|
38
|
+
export { default as Announcer } from './Announcer/announcer';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Schema, Slice } from 'prosemirror-model';
|
|
2
|
+
import { EditorState } from 'prosemirror-state';
|
|
2
3
|
import { AnalyticsEventPayload, InputMethodInsertLink } from '../analytics/types';
|
|
3
4
|
export declare const FILEPATH_REGEXP: RegExp;
|
|
4
5
|
export declare const DONTLINKIFY_REGEXP: RegExp;
|
|
@@ -24,4 +25,5 @@ interface filepathMatch {
|
|
|
24
25
|
export declare const findFilepaths: (text: string, offset?: number) => Array<filepathMatch>;
|
|
25
26
|
export declare const isLinkInMatches: (linkStart: number, matchesList: Array<filepathMatch>) => boolean;
|
|
26
27
|
export declare function getLinkCreationAnalyticsEvent(inputMethod: InputMethodInsertLink, url: string): AnalyticsEventPayload;
|
|
28
|
+
export declare const canLinkBeCreatedInRange: (from: number, to: number) => (state: EditorState) => boolean;
|
|
27
29
|
export {};
|
|
@@ -47,10 +47,12 @@ export type { UseComponentRenderTrackingArgs } from './performance/hooks/use-com
|
|
|
47
47
|
export { isOutdatedBrowser } from './outdated-browsers';
|
|
48
48
|
export { isReferencedSource, removeConnectedNodes, getChildrenInfo, getNodeName, } from './referentiality';
|
|
49
49
|
export { getItemCounterDigitsSize, getOrderFromOrderedListNode, resolveOrder, isListNode, isParagraphNode, isListItemNode, isBulletList, } from './list';
|
|
50
|
-
export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLinkDomain, findFilepaths, isLinkInMatches, FILEPATH_REGEXP, DONTLINKIFY_REGEXP, getLinkCreationAnalyticsEvent, } from './hyperlink';
|
|
50
|
+
export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLinkDomain, findFilepaths, isLinkInMatches, FILEPATH_REGEXP, DONTLINKIFY_REGEXP, getLinkCreationAnalyticsEvent, canLinkBeCreatedInRange, } from './hyperlink';
|
|
51
51
|
export declare const pmHistoryPluginKey = "history$";
|
|
52
52
|
export { gridTypeForLayout } from './grid';
|
|
53
53
|
export { nodesBetweenChanged, getStepRange, isEmptyDocument, processRawValue, hasDocAsParent, bracketTyped, } from './document';
|
|
54
54
|
export { floatingLayouts, isRichMediaInsideOfBlockNode, calculateSnapPoints, alignAttributes, } from './rich-media-utils';
|
|
55
55
|
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
56
56
|
export { canRenderDatasource } from './datasource';
|
|
57
|
+
export { filter as filterCommands } from './commands';
|
|
58
|
+
export declare function shallowEqual(obj1?: any, obj2?: any): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EditorView } from 'prosemirror-view';
|
|
3
|
+
import { LinkPickerProps } from '@atlaskit/link-picker';
|
|
4
|
+
import type { Command, EditorAppearance } from '../../../types';
|
|
5
|
+
/**
|
|
6
|
+
* Returns a type that matches T but where keys (K) are now optional
|
|
7
|
+
*/
|
|
8
|
+
type OptionalKeys<T extends {}, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
9
|
+
export interface EditorLinkPickerProps extends OptionalKeys<LinkPickerProps, 'onCancel'> {
|
|
10
|
+
view: EditorView;
|
|
11
|
+
/**
|
|
12
|
+
* Used for analytics purposes to describe how the link picker was invoked
|
|
13
|
+
* Should be roughly equivalent to the `inputMethod` analytics value
|
|
14
|
+
*/
|
|
15
|
+
invokeMethod?: string;
|
|
16
|
+
editorAppearance?: EditorAppearance;
|
|
17
|
+
/** Callback to execute on unmount */
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
onEscapeCallback?: Command;
|
|
20
|
+
onClickAwayCallback?: Command;
|
|
21
|
+
}
|
|
22
|
+
export declare const EditorLinkPicker: ({ view, onCancel, invokeMethod, editorAppearance, onClose, onEscapeCallback, onClickAwayCallback, ...restProps }: EditorLinkPickerProps) => JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React, { PureComponent } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { EditorView } from 'prosemirror-view';
|
|
5
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
+
import { ActivityProvider } from '@atlaskit/activity-provider';
|
|
7
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
8
|
+
import type { HyperlinkState } from '../../../link';
|
|
9
|
+
import type { SearchProvider } from '../../../provider-factory';
|
|
10
|
+
import type { Command, LinkInputType } from '../../../types';
|
|
11
|
+
import { LinkSearchListItemData } from '../../LinkSearch/types';
|
|
12
|
+
/**
|
|
13
|
+
* Visible only to screenreaders. Use when there is a need
|
|
14
|
+
* to provide more context to a non-sighted user.
|
|
15
|
+
*/
|
|
16
|
+
export declare const visuallyHiddenStyles: import("@emotion/react").SerializedStyles;
|
|
17
|
+
export declare const RECENT_SEARCH_LIST_SIZE = 5;
|
|
18
|
+
export declare const messages: {
|
|
19
|
+
displayText: {
|
|
20
|
+
id: string;
|
|
21
|
+
defaultMessage: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
clearText: {
|
|
25
|
+
id: string;
|
|
26
|
+
defaultMessage: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
clearLink: {
|
|
30
|
+
id: string;
|
|
31
|
+
defaultMessage: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
searchLinkAriaDescription: {
|
|
35
|
+
id: string;
|
|
36
|
+
defaultMessage: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
searchLinkResults: {
|
|
40
|
+
id: string;
|
|
41
|
+
defaultMessage: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
linkAriaLabel: {
|
|
45
|
+
id: string;
|
|
46
|
+
defaultMessage: string;
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
interface BaseProps {
|
|
51
|
+
onSubmit?: (href: string, title: string | undefined, displayText: string | undefined, inputMethod: LinkInputType) => void;
|
|
52
|
+
popupsMountPoint?: HTMLElement;
|
|
53
|
+
popupsBoundariesElement?: HTMLElement;
|
|
54
|
+
autoFocus?: boolean;
|
|
55
|
+
activityProvider?: Promise<ActivityProvider>;
|
|
56
|
+
searchProvider?: Promise<SearchProvider>;
|
|
57
|
+
displayUrl?: string;
|
|
58
|
+
pluginState: HyperlinkState;
|
|
59
|
+
view: EditorView;
|
|
60
|
+
onEscapeCallback?: Command;
|
|
61
|
+
onClickAwayCallback?: Command;
|
|
62
|
+
}
|
|
63
|
+
interface DefaultProps {
|
|
64
|
+
displayText: string;
|
|
65
|
+
}
|
|
66
|
+
export type Props = WrappedComponentProps & BaseProps & DefaultProps & WithAnalyticsEventsProps;
|
|
67
|
+
type HyperlinkLinkAddToolbarProps = WrappedComponentProps & BaseProps & Partial<DefaultProps> & WithAnalyticsEventsProps;
|
|
68
|
+
export interface State {
|
|
69
|
+
activityProvider?: ActivityProvider;
|
|
70
|
+
searchProvider?: SearchProvider;
|
|
71
|
+
items: LinkSearchListItemData[];
|
|
72
|
+
selectedIndex: number;
|
|
73
|
+
displayUrl: string;
|
|
74
|
+
isLoading: boolean;
|
|
75
|
+
displayText: string;
|
|
76
|
+
}
|
|
77
|
+
export declare class HyperlinkLinkAddToolbar extends PureComponent<Props, State> {
|
|
78
|
+
private submitted;
|
|
79
|
+
private urlInputContainer;
|
|
80
|
+
private displayTextInputContainer;
|
|
81
|
+
private wrapperRef;
|
|
82
|
+
private handleClearText;
|
|
83
|
+
private handleClearDisplayText;
|
|
84
|
+
private debouncedQuickSearch;
|
|
85
|
+
private fireCustomAnalytics?;
|
|
86
|
+
private quickSearchQueryVersion;
|
|
87
|
+
private analyticSource;
|
|
88
|
+
constructor(props: Props);
|
|
89
|
+
componentDidMount(): Promise<void>;
|
|
90
|
+
componentWillUnmount(): void;
|
|
91
|
+
private getRecentItems;
|
|
92
|
+
private fireAnalytics;
|
|
93
|
+
private loadInitialLinkSearchResult;
|
|
94
|
+
private quickSearch;
|
|
95
|
+
private updateInput;
|
|
96
|
+
private createClearHandler;
|
|
97
|
+
private handleClickOutside;
|
|
98
|
+
private getScreenReaderText;
|
|
99
|
+
render(): jsx.JSX.Element;
|
|
100
|
+
private isUrlPopulatedWithSelectedItem;
|
|
101
|
+
private handleSelected;
|
|
102
|
+
private handleInsert;
|
|
103
|
+
private handleMouseEnterResultItem;
|
|
104
|
+
private handleMouseLeaveResultItem;
|
|
105
|
+
private handleSubmit;
|
|
106
|
+
private handleClearTextKeyDown;
|
|
107
|
+
private handleKeyDown;
|
|
108
|
+
private updateTextInput;
|
|
109
|
+
private handleCancel;
|
|
110
|
+
}
|
|
111
|
+
export declare const HyperlinkLinkAddToolbarWithIntl: React.FC<import("react-intl-next").WithIntlProps<HyperlinkLinkAddToolbarProps>> & {
|
|
112
|
+
WrappedComponent: React.ComponentType<HyperlinkLinkAddToolbarProps>;
|
|
113
|
+
};
|
|
114
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<HyperlinkLinkAddToolbarProps>>, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
115
|
+
export default _default;
|
|
@@ -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
|
+
}
|