@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,42 @@
|
|
|
1
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4138
|
|
2
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export default function IconPanel() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
focusable: "false",
|
|
7
|
+
"aria-hidden": true,
|
|
8
|
+
width: 40,
|
|
9
|
+
height: 40
|
|
10
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
11
|
+
fill: "none",
|
|
12
|
+
fillRule: "evenodd"
|
|
13
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
fill: "#FFF",
|
|
15
|
+
d: "M0 0h40v40H0z"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
17
|
+
fill: "#DEEBFF",
|
|
18
|
+
x: 8,
|
|
19
|
+
y: 12,
|
|
20
|
+
width: 32,
|
|
21
|
+
height: 16,
|
|
22
|
+
rx: 1
|
|
23
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24
|
+
d: "M12 20a4 4 0 108 0 4 4 0 00-8 0z",
|
|
25
|
+
fill: "#0052CC",
|
|
26
|
+
fillRule: "nonzero"
|
|
27
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
28
|
+
fill: "#FFF",
|
|
29
|
+
fillRule: "nonzero",
|
|
30
|
+
x: 15.556,
|
|
31
|
+
y: 19.722,
|
|
32
|
+
width: 1,
|
|
33
|
+
height: 2.2,
|
|
34
|
+
rx: 0.5
|
|
35
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
36
|
+
fill: "#FFF",
|
|
37
|
+
fillRule: "nonzero",
|
|
38
|
+
cx: 16,
|
|
39
|
+
cy: 18.444,
|
|
40
|
+
r: 1
|
|
41
|
+
})));
|
|
42
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4138
|
|
2
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export default function IconQuote() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
focusable: "false",
|
|
7
|
+
"aria-hidden": true,
|
|
8
|
+
width: 40,
|
|
9
|
+
height: 40
|
|
10
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
11
|
+
fill: "none",
|
|
12
|
+
fillRule: "evenodd"
|
|
13
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
fill: "#FFF",
|
|
15
|
+
d: "M0 0h40v40H0z"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
17
|
+
fill: "#C1C7D0",
|
|
18
|
+
x: 6,
|
|
19
|
+
y: 8,
|
|
20
|
+
width: 2,
|
|
21
|
+
height: 24,
|
|
22
|
+
rx: 1
|
|
23
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24
|
+
d: "M27.284 12c-1.888 0-3.422 1.577-3.422 3.522 0 1.944 1.534 3.521 3.422 3.521 3.245 0 1.365 6.118-2.727 6.755a.818.818 0 00-.695.806c0 .5.447.896.942.82C32.242 26.296 34.886 12 27.284 12m-9.86 0C15.533 12 14 13.577 14 15.522c0 1.944 1.533 3.521 3.424 3.521 3.243 0 1.363 6.118-2.73 6.755a.818.818 0 00-.694.806c0 .5.447.896.941.82C22.381 26.296 25.026 12 17.424 12",
|
|
25
|
+
fill: "#6C798F"
|
|
26
|
+
})));
|
|
27
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4138
|
|
2
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export default function IconStatus() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
focusable: "false",
|
|
7
|
+
"aria-hidden": true,
|
|
8
|
+
width: 40,
|
|
9
|
+
height: 40
|
|
10
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
11
|
+
fill: "none",
|
|
12
|
+
fillRule: "evenodd"
|
|
13
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
fill: "#FFF",
|
|
15
|
+
d: "M0 0h40v40H0z"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("g", {
|
|
17
|
+
transform: "translate(5 11)"
|
|
18
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
19
|
+
fill: "#B3D4FF",
|
|
20
|
+
width: 14,
|
|
21
|
+
height: 5,
|
|
22
|
+
rx: 1
|
|
23
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
24
|
+
fill: "#0065FF",
|
|
25
|
+
x: 2,
|
|
26
|
+
y: 2,
|
|
27
|
+
width: 10,
|
|
28
|
+
height: 1,
|
|
29
|
+
rx: 0.5
|
|
30
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
31
|
+
transform: "translate(5 18)"
|
|
32
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
33
|
+
fill: "#C3F8DF",
|
|
34
|
+
width: 14,
|
|
35
|
+
height: 5,
|
|
36
|
+
rx: 1
|
|
37
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
38
|
+
fill: "#36B37E",
|
|
39
|
+
x: 2,
|
|
40
|
+
y: 2,
|
|
41
|
+
width: 10,
|
|
42
|
+
height: 1,
|
|
43
|
+
rx: 0.5
|
|
44
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
45
|
+
transform: "translate(5 25)"
|
|
46
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
47
|
+
fill: "#DFE1E6",
|
|
48
|
+
width: 14,
|
|
49
|
+
height: 5,
|
|
50
|
+
rx: 1
|
|
51
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
52
|
+
fill: "#8993A4",
|
|
53
|
+
x: 2,
|
|
54
|
+
y: 2,
|
|
55
|
+
width: 10,
|
|
56
|
+
height: 1,
|
|
57
|
+
rx: 0.5
|
|
58
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
59
|
+
transform: "translate(21 25)"
|
|
60
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
61
|
+
fill: "#FFD3C8",
|
|
62
|
+
width: 14,
|
|
63
|
+
height: 5,
|
|
64
|
+
rx: 1
|
|
65
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
66
|
+
fill: "#FF5230",
|
|
67
|
+
x: 2,
|
|
68
|
+
y: 2,
|
|
69
|
+
width: 10,
|
|
70
|
+
height: 1,
|
|
71
|
+
rx: 0.5
|
|
72
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
73
|
+
transform: "translate(21 11)"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
75
|
+
fill: "#EAE6FF",
|
|
76
|
+
width: 14,
|
|
77
|
+
height: 5,
|
|
78
|
+
rx: 1
|
|
79
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
80
|
+
fill: "#8777D9",
|
|
81
|
+
x: 2,
|
|
82
|
+
y: 2,
|
|
83
|
+
width: 10,
|
|
84
|
+
height: 1,
|
|
85
|
+
rx: 0.5
|
|
86
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
87
|
+
transform: "translate(21 18)"
|
|
88
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
89
|
+
fill: "#FFF0B3",
|
|
90
|
+
width: 14,
|
|
91
|
+
height: 5,
|
|
92
|
+
rx: 1
|
|
93
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
94
|
+
fill: "#FF991F",
|
|
95
|
+
x: 2,
|
|
96
|
+
y: 2,
|
|
97
|
+
width: 10,
|
|
98
|
+
height: 1,
|
|
99
|
+
rx: 0.5
|
|
100
|
+
}))));
|
|
101
|
+
}
|
|
@@ -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';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { forwardRef, memo, useEffect, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
// How to use:
|
|
5
|
+
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#Preferring_specialized_live_region_roles
|
|
6
|
+
// Demo: https://dequeuniversity.com/library/aria/liveregion-playground
|
|
7
|
+
|
|
8
|
+
// Important: Strongly recommend test your solution in all supported screen readers
|
|
9
|
+
// if you use non default value of properties: ariaAtomic, ariaLive, ariaRelevant, role
|
|
10
|
+
|
|
11
|
+
// Note: Text won't be announced if the text message doesn't change after the render.
|
|
12
|
+
// For using a forced announcement in this case, set the 'key' attribute - key={Date.now()}
|
|
13
|
+
// Note: Flag 'contentRendered' resolves bug with duplicates messages (NVDA + Firefox)
|
|
14
|
+
// https://github.com/nvaccess/nvda/labels/bug%2Fdouble-speaking
|
|
15
|
+
var timer;
|
|
16
|
+
var Announcer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
17
|
+
var _ref$ariaAtomic = _ref.ariaAtomic,
|
|
18
|
+
ariaAtomic = _ref$ariaAtomic === void 0 ? 'true' : _ref$ariaAtomic,
|
|
19
|
+
_ref$ariaLive = _ref.ariaLive,
|
|
20
|
+
ariaLive = _ref$ariaLive === void 0 ? 'polite' : _ref$ariaLive,
|
|
21
|
+
_ref$ariaRelevant = _ref.ariaRelevant,
|
|
22
|
+
ariaRelevant = _ref$ariaRelevant === void 0 ? 'all' : _ref$ariaRelevant,
|
|
23
|
+
_ref$role = _ref.role,
|
|
24
|
+
role = _ref$role === void 0 ? 'status' : _ref$role,
|
|
25
|
+
_ref$text = _ref.text,
|
|
26
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
27
|
+
_ref$delay = _ref.delay,
|
|
28
|
+
delay = _ref$delay === void 0 ? 0 : _ref$delay;
|
|
29
|
+
var _useState = useState(false),
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
contentRendered = _useState2[0],
|
|
32
|
+
setContentRendered = _useState2[1];
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
clearTimeout(timer);
|
|
35
|
+
setContentRendered(false);
|
|
36
|
+
timer = setTimeout(function () {
|
|
37
|
+
setContentRendered(true);
|
|
38
|
+
}, delay);
|
|
39
|
+
return function () {
|
|
40
|
+
return clearTimeout(timer);
|
|
41
|
+
};
|
|
42
|
+
}, [text, delay]);
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "assistive",
|
|
45
|
+
ref: ref,
|
|
46
|
+
role: role,
|
|
47
|
+
"aria-atomic": ariaAtomic,
|
|
48
|
+
"aria-relevant": ariaRelevant,
|
|
49
|
+
"aria-live": ariaLive
|
|
50
|
+
}, contentRendered && /*#__PURE__*/React.createElement("span", null, text));
|
|
51
|
+
});
|
|
52
|
+
export default /*#__PURE__*/memo(Announcer);
|
|
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
18
18
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
19
19
|
import Layer from '../Layer';
|
|
20
20
|
var packageName = "@atlaskit/editor-common";
|
|
21
|
-
var packageVersion = "74.
|
|
21
|
+
var packageVersion = "74.20.0";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
|
+
/** @jsx jsx */
|
|
12
|
+
import { PureComponent } from 'react';
|
|
13
|
+
import { jsx } from '@emotion/react';
|
|
14
|
+
import { browser } from '../../utils';
|
|
15
|
+
import { panelTextInput, panelTextInputWithCustomWidth } from './styles';
|
|
16
|
+
var KeyZCode = 90;
|
|
17
|
+
var KeyYCode = 89;
|
|
18
|
+
var PanelTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
19
|
+
_inherits(PanelTextInput, _PureComponent);
|
|
20
|
+
var _super = _createSuper(PanelTextInput);
|
|
21
|
+
function PanelTextInput(props) {
|
|
22
|
+
var _this;
|
|
23
|
+
_classCallCheck(this, PanelTextInput);
|
|
24
|
+
_this = _super.call(this, props);
|
|
25
|
+
_defineProperty(_assertThisInitialized(_this), "onMouseDown", function () {
|
|
26
|
+
var onMouseDown = _this.props.onMouseDown;
|
|
27
|
+
if (onMouseDown) {
|
|
28
|
+
onMouseDown();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
_defineProperty(_assertThisInitialized(_this), "onBlur", function (e) {
|
|
32
|
+
var onBlur = _this.props.onBlur;
|
|
33
|
+
if (onBlur) {
|
|
34
|
+
onBlur(e);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "handleChange", function () {
|
|
38
|
+
var onChange = _this.props.onChange;
|
|
39
|
+
if (_this.input) {
|
|
40
|
+
_this.setState({
|
|
41
|
+
value: _this.input.value
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (onChange && _this.input) {
|
|
45
|
+
onChange(_this.input.value);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(_assertThisInitialized(_this), "handleKeydown", function (e) {
|
|
49
|
+
var _this$props = _this.props,
|
|
50
|
+
onUndo = _this$props.onUndo,
|
|
51
|
+
onRedo = _this$props.onRedo,
|
|
52
|
+
onSubmit = _this$props.onSubmit,
|
|
53
|
+
onCancel = _this$props.onCancel;
|
|
54
|
+
if (e.keyCode === 13 && onSubmit) {
|
|
55
|
+
e.preventDefault(); // Prevent from submitting if an editor is inside a form.
|
|
56
|
+
onSubmit(_this.input.value);
|
|
57
|
+
} else if (e.keyCode === 27 && onCancel) {
|
|
58
|
+
onCancel(e);
|
|
59
|
+
} else if (typeof onUndo === 'function' && _this.isUndoEvent(e)) {
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
onUndo();
|
|
62
|
+
} else if (typeof onRedo === 'function' && _this.isRedoEvent(e)) {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
onRedo();
|
|
65
|
+
}
|
|
66
|
+
if (_this.props.onKeyDown) {
|
|
67
|
+
_this.props.onKeyDown(e);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
_defineProperty(_assertThisInitialized(_this), "handleRef", function (input) {
|
|
71
|
+
if (input instanceof HTMLInputElement) {
|
|
72
|
+
_this.input = input;
|
|
73
|
+
if (_this.props.autoFocus) {
|
|
74
|
+
// Need this to prevent jumping when we render TextInput inside Portal @see ED-2992
|
|
75
|
+
_this.focusTimeoutId = window.setTimeout(function () {
|
|
76
|
+
return _this.focus();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
} else {
|
|
80
|
+
_this.input = undefined;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
_this.state = {
|
|
84
|
+
value: props.defaultValue || ''
|
|
85
|
+
};
|
|
86
|
+
return _this;
|
|
87
|
+
}
|
|
88
|
+
_createClass(PanelTextInput, [{
|
|
89
|
+
key: "componentDidUpdate",
|
|
90
|
+
value: function componentDidUpdate(prevProps) {
|
|
91
|
+
if (prevProps.defaultValue !== this.props.defaultValue) {
|
|
92
|
+
this.setState({
|
|
93
|
+
value: this.props.defaultValue
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: "componentWillUnmount",
|
|
99
|
+
value: function componentWillUnmount() {
|
|
100
|
+
window.clearTimeout(this.focusTimeoutId);
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "render",
|
|
104
|
+
value: function render() {
|
|
105
|
+
var _this$props2 = this.props,
|
|
106
|
+
placeholder = _this$props2.placeholder,
|
|
107
|
+
width = _this$props2.width,
|
|
108
|
+
maxLength = _this$props2.maxLength,
|
|
109
|
+
testId = _this$props2.testId,
|
|
110
|
+
ariaLabel = _this$props2.ariaLabel,
|
|
111
|
+
describedById = _this$props2.describedById,
|
|
112
|
+
ariaActiveDescendant = _this$props2.ariaActiveDescendant,
|
|
113
|
+
ariaControls = _this$props2.ariaControls,
|
|
114
|
+
ariaExpanded = _this$props2.ariaExpanded,
|
|
115
|
+
ariaAutoComplete = _this$props2.ariaAutoComplete,
|
|
116
|
+
role = _this$props2.role;
|
|
117
|
+
var value = this.state.value;
|
|
118
|
+
return jsx("input", {
|
|
119
|
+
css: [panelTextInput, width !== undefined && panelTextInputWithCustomWidth(width)],
|
|
120
|
+
role: role,
|
|
121
|
+
"aria-autocomplete": ariaAutoComplete ? 'list' : undefined,
|
|
122
|
+
"aria-expanded": ariaExpanded,
|
|
123
|
+
"aria-controls": ariaControls,
|
|
124
|
+
"aria-activedescendant": ariaActiveDescendant,
|
|
125
|
+
"aria-describedby": describedById,
|
|
126
|
+
"data-testid": testId || '',
|
|
127
|
+
type: "text",
|
|
128
|
+
placeholder: placeholder,
|
|
129
|
+
value: value,
|
|
130
|
+
onChange: this.handleChange,
|
|
131
|
+
onKeyDown: this.handleKeydown,
|
|
132
|
+
onMouseDown: this.onMouseDown,
|
|
133
|
+
onBlur: this.onBlur,
|
|
134
|
+
ref: this.handleRef,
|
|
135
|
+
maxLength: maxLength,
|
|
136
|
+
"aria-label": ariaLabel
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
key: "focus",
|
|
141
|
+
value: function focus() {
|
|
142
|
+
var input = this.input;
|
|
143
|
+
if (input) {
|
|
144
|
+
var focusOpts = _typeof(this.props.autoFocus) === 'object' ? this.props.autoFocus : {};
|
|
145
|
+
input.focus(focusOpts);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}, {
|
|
149
|
+
key: "isUndoEvent",
|
|
150
|
+
value: function isUndoEvent(event) {
|
|
151
|
+
return event.keyCode === KeyZCode && (
|
|
152
|
+
// cmd + z for mac
|
|
153
|
+
browser.mac && event.metaKey && !event.shiftKey ||
|
|
154
|
+
// ctrl + z for non-mac
|
|
155
|
+
!browser.mac && event.ctrlKey);
|
|
156
|
+
}
|
|
157
|
+
}, {
|
|
158
|
+
key: "isRedoEvent",
|
|
159
|
+
value: function isRedoEvent(event) {
|
|
160
|
+
return (
|
|
161
|
+
// ctrl + y for non-mac
|
|
162
|
+
!browser.mac && event.ctrlKey && event.keyCode === KeyYCode || browser.mac && event.metaKey && event.shiftKey && event.keyCode === KeyZCode || event.ctrlKey && event.shiftKey && event.keyCode === KeyZCode
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
}]);
|
|
166
|
+
return PanelTextInput;
|
|
167
|
+
}(PureComponent);
|
|
168
|
+
export { PanelTextInput as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2;
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { N100, N400 } from '@atlaskit/theme/colors';
|
|
6
|
+
// Normal .className gets overridden by input[type=text] hence this hack to produce input.className
|
|
7
|
+
export var panelTextInput = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n input& {\n background: transparent;\n border: 0;\n border-radius: 0;\n box-sizing: content-box;\n color: ", ";\n flex-grow: 1;\n font-size: ", ";\n line-height: 20px;\n padding: 0;\n min-width: 145px;\n\n /* Hides IE10+ built-in [x] clear input button */\n &::-ms-clear {\n display: none;\n }\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n color: ", ";\n }\n }\n"])), "var(--ds-text-subtle, ".concat(N400, ")"), relativeFontSizeToBase16(13), "var(--ds-text-subtlest, ".concat(N100, ")"));
|
|
8
|
+
export var panelTextInputWithCustomWidth = function panelTextInputWithCustomWidth(width) {
|
|
9
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n input& {\n width: ", "px;\n }\n"])), width);
|
|
10
|
+
};
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -22,4 +22,7 @@ export { RECENT_SEARCH_WIDTH_IN_PX, RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX, REC
|
|
|
22
22
|
export { ContextPanelProvider, ContextPanelWidthProvider, ContextPanelConsumer, ContextPanel } from './ContextPanel/context';
|
|
23
23
|
export { default as Resizer } from './ResizerLegacy';
|
|
24
24
|
export { snapTo, handleSides, imageAlignmentMap } from './ResizerLegacy/utils';
|
|
25
|
-
export { wrapperStyle } from './ResizerLegacy/styled';
|
|
25
|
+
export { wrapperStyle } from './ResizerLegacy/styled';
|
|
26
|
+
export { panelTextInput } from './PanelTextInput/styles';
|
|
27
|
+
export { default as PanelTextInput } from './PanelTextInput';
|
|
28
|
+
export { default as Announcer } from './Announcer/announcer';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export var filter = function filter(predicates, cmd) {
|
|
2
|
+
return function (state, dispatch, view) {
|
|
3
|
+
if (!Array.isArray(predicates)) {
|
|
4
|
+
predicates = [predicates];
|
|
5
|
+
}
|
|
6
|
+
if (predicates.some(function (pred) {
|
|
7
|
+
return !pred(state, view);
|
|
8
|
+
})) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return cmd(state, dispatch, view) || false;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -181,4 +181,26 @@ export function getLinkCreationAnalyticsEvent(inputMethod, url) {
|
|
|
181
181
|
linkDomain: getLinkDomain(url)
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
|
-
}
|
|
184
|
+
}
|
|
185
|
+
export var canLinkBeCreatedInRange = function canLinkBeCreatedInRange(from, to) {
|
|
186
|
+
return function (state) {
|
|
187
|
+
if (!state.doc.rangeHasMark(from, to, state.schema.marks.link)) {
|
|
188
|
+
var $from = state.doc.resolve(from);
|
|
189
|
+
var $to = state.doc.resolve(to);
|
|
190
|
+
var link = state.schema.marks.link;
|
|
191
|
+
if ($from.parent === $to.parent && $from.parent.isTextblock) {
|
|
192
|
+
if ($from.parent.type.allowsMarkType(link)) {
|
|
193
|
+
var allowed = true;
|
|
194
|
+
state.doc.nodesBetween(from, to, function (node) {
|
|
195
|
+
allowed = allowed && !node.marks.some(function (m) {
|
|
196
|
+
return m.type.excludes(link);
|
|
197
|
+
});
|
|
198
|
+
return allowed;
|
|
199
|
+
});
|
|
200
|
+
return allowed;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return false;
|
|
205
|
+
};
|
|
206
|
+
};
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -35,7 +35,7 @@ export { useComponentRenderTracking } from './performance/hooks/use-component-re
|
|
|
35
35
|
export { isOutdatedBrowser } from './outdated-browsers';
|
|
36
36
|
export { isReferencedSource, removeConnectedNodes, getChildrenInfo, getNodeName } from './referentiality';
|
|
37
37
|
export { getItemCounterDigitsSize, getOrderFromOrderedListNode, resolveOrder, isListNode, isParagraphNode, isListItemNode, isBulletList } from './list';
|
|
38
|
-
export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLinkDomain, findFilepaths, isLinkInMatches, FILEPATH_REGEXP, DONTLINKIFY_REGEXP, getLinkCreationAnalyticsEvent } from './hyperlink';
|
|
38
|
+
export { isFromCurrentDomain, LinkMatcher, normalizeUrl, linkifyContent, getLinkDomain, findFilepaths, isLinkInMatches, FILEPATH_REGEXP, DONTLINKIFY_REGEXP, getLinkCreationAnalyticsEvent, canLinkBeCreatedInRange } from './hyperlink';
|
|
39
39
|
|
|
40
40
|
// prosemirror-history does not export its plugin key
|
|
41
41
|
export var pmHistoryPluginKey = 'history$';
|
|
@@ -43,4 +43,14 @@ export { gridTypeForLayout } from './grid';
|
|
|
43
43
|
export { nodesBetweenChanged, getStepRange, isEmptyDocument, processRawValue, hasDocAsParent, bracketTyped } from './document';
|
|
44
44
|
export { floatingLayouts, isRichMediaInsideOfBlockNode, calculateSnapPoints, alignAttributes } from './rich-media-utils';
|
|
45
45
|
export { sanitizeNodeForPrivacy } from './filter/privacy-filter';
|
|
46
|
-
export { canRenderDatasource } from './datasource';
|
|
46
|
+
export { canRenderDatasource } from './datasource';
|
|
47
|
+
export { filter as filterCommands } from './commands';
|
|
48
|
+
export function shallowEqual() {
|
|
49
|
+
var obj1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
50
|
+
var obj2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
51
|
+
var keys1 = Object.keys(obj1);
|
|
52
|
+
var keys2 = Object.keys(obj2);
|
|
53
|
+
return keys1.length === keys2.length && keys1.reduce(function (acc, key) {
|
|
54
|
+
return acc && obj1[key] === obj2[key];
|
|
55
|
+
}, true);
|
|
56
|
+
}
|
package/dist/esm/version.json
CHANGED
|
@@ -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;
|