@atlaskit/editor-common 111.18.0 → 111.19.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 +21 -0
- package/dist/cjs/annotation/manager.js +9 -9
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-anchor/node-anchor-provider.js +0 -6
- package/dist/cjs/preset/core-plugin/index.js +17 -37
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/compareNodes.js +3 -3
- package/dist/es2019/annotation/manager.js +9 -9
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-anchor/node-anchor-provider.js +0 -6
- package/dist/es2019/preset/core-plugin/index.js +17 -37
- package/dist/es2019/styles/shared/table.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/annotation/manager.js +9 -9
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-anchor/node-anchor-provider.js +0 -6
- package/dist/esm/preset/core-plugin/index.js +17 -37
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/compareNodes.js +3 -3
- package/dist/types/annotation/index.d.ts +12 -10
- package/dist/types/collab/index.d.ts +11 -11
- package/dist/types/extensions/types/extension-handler.d.ts +2 -2
- package/dist/types/extensions/types/extension-provider.d.ts +6 -6
- package/dist/types/link/LinkSearch/types.d.ts +8 -8
- package/dist/types/provider-factory/autoformatting-provider.d.ts +1 -1
- package/dist/types/provider-factory/card-provider.d.ts +2 -2
- package/dist/types/provider-factory/macro-provider.d.ts +2 -2
- package/dist/types/provider-factory/search-provider.d.ts +1 -1
- package/dist/types/types/editor-actions.d.ts +12 -12
- package/dist/types/types/next-editor-plugin.d.ts +5 -5
- package/dist/types/types/user-preferences.d.ts +3 -3
- package/dist/types/utils/compareNodes.d.ts +1 -1
- package/dist/types/utils/get-performance-options.d.ts +1 -1
- package/dist/types-ts4.5/annotation/index.d.ts +12 -10
- package/dist/types-ts4.5/collab/index.d.ts +11 -11
- package/dist/types-ts4.5/extensions/types/extension-handler.d.ts +2 -2
- package/dist/types-ts4.5/extensions/types/extension-provider.d.ts +6 -6
- package/dist/types-ts4.5/link/LinkSearch/types.d.ts +8 -8
- package/dist/types-ts4.5/provider-factory/autoformatting-provider.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/card-provider.d.ts +2 -2
- package/dist/types-ts4.5/provider-factory/macro-provider.d.ts +2 -2
- package/dist/types-ts4.5/provider-factory/search-provider.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-actions.d.ts +12 -12
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +5 -5
- package/dist/types-ts4.5/types/user-preferences.d.ts +3 -3
- package/dist/types-ts4.5/utils/compareNodes.d.ts +1 -1
- package/dist/types-ts4.5/utils/get-performance-options.d.ts +1 -1
- package/package.json +2 -8
|
@@ -58,7 +58,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
58
58
|
var tableSharedStyle = function tableSharedStyle() {
|
|
59
59
|
var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
60
60
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
61
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\t\t/* display right border to avoid visual layout shift when table-right-border is not ready since it's waiting for table to render */\n\t\t", "\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid\n\t\t\t\t", ";\n\t\t\tborder-left-color: transparent;\n\t\t\tborder-right-color: transparent;\n\t\t\ttable-layout: fixed;\n\t\t\tfont-size: 1em;\n\t\t\twidth: 100%;\n\n\t\t\t&[data-autosize='true'] {\n\t\t\t\ttable-layout: auto;\n\t\t\t}\n\n\t\t\t& {\n\t\t\t\t* {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\t\t\t\thr {\n\t\t\t\t\tbox-sizing: content-box;\n\t\t\t\t}\n\n\t\t\t\ttbody {\n\t\t\t\t\tborder-bottom: none;\n\t\t\t\t}\n\t\t\t\tth td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\t> tbody > tr > th,\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tmin-width: ", "px;\n\t\t\t\t\tfont-weight: ", ";\n\t\t\t\t\tvertical-align: top;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tborder-right-width: 0;\n\t\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\t\tpadding: ", ";\n\t\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t\t", "\n\n\t\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\tth {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\ttext-align: left;\n\n\t\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t\t", " {\n\t\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, "var(--ds-space-300, 24px)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", fg('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #d9dbea)", ";\n\t\t}") : '', expValEquals('
|
|
61
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\t\t/* display right border to avoid visual layout shift when table-right-border is not ready since it's waiting for table to render */\n\t\t", "\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid\n\t\t\t\t", ";\n\t\t\tborder-left-color: transparent;\n\t\t\tborder-right-color: transparent;\n\t\t\ttable-layout: fixed;\n\t\t\tfont-size: 1em;\n\t\t\twidth: 100%;\n\n\t\t\t&[data-autosize='true'] {\n\t\t\t\ttable-layout: auto;\n\t\t\t}\n\n\t\t\t& {\n\t\t\t\t* {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\t\t\t\thr {\n\t\t\t\t\tbox-sizing: content-box;\n\t\t\t\t}\n\n\t\t\t\ttbody {\n\t\t\t\t\tborder-bottom: none;\n\t\t\t\t}\n\t\t\t\tth td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\t> tbody > tr > th,\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tmin-width: ", "px;\n\t\t\t\t\tfont-weight: ", ";\n\t\t\t\t\tvertical-align: top;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tborder-right-width: 0;\n\t\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\t\tpadding: ", ";\n\t\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t\t", "\n\n\t\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\tth {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\ttext-align: left;\n\n\t\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t\t", " {\n\t\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, "var(--ds-space-300, 24px)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", fg('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #d9dbea)", ";\n\t\t}") : '', expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true) ? ".".concat(TableSharedCssClassName.TABLE_CONTAINER, ":not([data-borders-ready='true']) table {\n\t\t\t\tborder-right-color: ", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), ";\n\t\t\t}") : '', TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? '&:not(.danger)' : '&:not([style]):not(.danger)', CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
|
|
62
62
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
63
63
|
}), "var(--ds-background-neutral, rgb(235, 237, 240))", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", overflowShadow({
|
|
64
64
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "111.
|
|
24
|
+
var packageVersion = "111.18.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -126,15 +126,15 @@ function getMetaFromNode(node, options, normalizeTextParser) {
|
|
|
126
126
|
}
|
|
127
127
|
case 'inlineCard':
|
|
128
128
|
{
|
|
129
|
-
var
|
|
130
|
-
var maybeTitle = options.getInlineCardTextFromStore(
|
|
129
|
+
var attrs = firstChild.attrs;
|
|
130
|
+
var maybeTitle = options.getInlineCardTextFromStore(attrs);
|
|
131
131
|
if (maybeTitle) {
|
|
132
132
|
return {
|
|
133
133
|
type: ContentType.LINK,
|
|
134
134
|
value: maybeTitle
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
var url =
|
|
137
|
+
var url = attrs.url;
|
|
138
138
|
return {
|
|
139
139
|
type: ContentType.LINK,
|
|
140
140
|
value: url ? url : ''
|
|
@@ -50,6 +50,8 @@ export type AnnotationSelectedChangeData = {
|
|
|
50
50
|
export type AnnotationManagerEvents = {
|
|
51
51
|
data: AnnotationDraftStartedData;
|
|
52
52
|
name: 'draftAnnotationStarted';
|
|
53
|
+
} | {
|
|
54
|
+
name: 'draftAnnotationCleared';
|
|
53
55
|
} | {
|
|
54
56
|
data: AnnotationSelectedChangeData;
|
|
55
57
|
name: 'annotationSelectionChanged';
|
|
@@ -139,13 +141,13 @@ export type AnnotationManager = AnnotationManagerMethods & {
|
|
|
139
141
|
* @private
|
|
140
142
|
* @internal
|
|
141
143
|
*/
|
|
142
|
-
checkPreemptiveGate()
|
|
144
|
+
checkPreemptiveGate: () => Promise<boolean>;
|
|
143
145
|
/**
|
|
144
146
|
* @private
|
|
145
147
|
* @internal
|
|
146
148
|
* This method is intended for internal Platform use only. It is not intended for use by Product code.
|
|
147
149
|
*/
|
|
148
|
-
emit(event: {
|
|
150
|
+
emit: (event: {
|
|
149
151
|
data: AnnotationDraftStartedData;
|
|
150
152
|
name: 'draftAnnotationStarted';
|
|
151
153
|
} | {
|
|
@@ -153,28 +155,28 @@ export type AnnotationManager = AnnotationManagerMethods & {
|
|
|
153
155
|
} | {
|
|
154
156
|
data: AnnotationSelectedChangeData;
|
|
155
157
|
name: 'annotationSelectionChanged';
|
|
156
|
-
})
|
|
158
|
+
}) => AnnotationManager;
|
|
157
159
|
/**
|
|
158
160
|
* @private
|
|
159
161
|
* @internal
|
|
160
162
|
* This method is intended for internal Platform use only. It is not intended for use by Product code.
|
|
161
163
|
*/
|
|
162
|
-
hook<H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H])
|
|
163
|
-
offAnnotationSelectionChange(handler: (data: AnnotationSelectedChangeData) => void)
|
|
164
|
-
offDraftAnnotationStarted(handler: (data: AnnotationDraftStartedData) => void)
|
|
165
|
-
onAnnotationSelectionChange(handler: (data: AnnotationSelectedChangeData) => void)
|
|
166
|
-
onDraftAnnotationStarted(handler: (data: AnnotationDraftStartedData) => void)
|
|
164
|
+
hook: <H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H]) => AnnotationManager;
|
|
165
|
+
offAnnotationSelectionChange: (handler: (data: AnnotationSelectedChangeData) => void) => AnnotationManager;
|
|
166
|
+
offDraftAnnotationStarted: (handler: (data: AnnotationDraftStartedData) => void) => AnnotationManager;
|
|
167
|
+
onAnnotationSelectionChange: (handler: (data: AnnotationSelectedChangeData) => void) => AnnotationManager;
|
|
168
|
+
onDraftAnnotationStarted: (handler: (data: AnnotationDraftStartedData) => void) => AnnotationManager;
|
|
167
169
|
/**
|
|
168
170
|
* This method is used to set a preemptive gate. A preemptive gate is a function that will be called
|
|
169
171
|
* before the manager performs an action. If the function returns false, the action will not be performed.
|
|
170
172
|
*/
|
|
171
|
-
setPreemptiveGate(handler: () => Promise<boolean>)
|
|
173
|
+
setPreemptiveGate: (handler: () => Promise<boolean>) => AnnotationManager;
|
|
172
174
|
/**
|
|
173
175
|
*
|
|
174
176
|
* @internal
|
|
175
177
|
* This method is intended for internal Platform use only. It is not intended for use by Product code.
|
|
176
178
|
*/
|
|
177
|
-
unhook<H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H])
|
|
179
|
+
unhook: <H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H]) => AnnotationManager;
|
|
178
180
|
};
|
|
179
181
|
/**
|
|
180
182
|
* This is a factory method which creates a new instance of the AnnotationManager.
|
|
@@ -447,21 +447,21 @@ export interface CollabEvents {
|
|
|
447
447
|
}
|
|
448
448
|
export type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
|
|
449
449
|
export interface CollabEditProvider<Events extends CollabEvents = CollabEvents> {
|
|
450
|
-
getFinalAcknowledgedState(reason: GetResolvedEditorStateReason)
|
|
451
|
-
getIsNamespaceLocked()
|
|
452
|
-
initialize(getState: () => any, createStep: (json: object) => Step)
|
|
453
|
-
off(evt: keyof Events, handler: (...args: any) => void)
|
|
454
|
-
on(evt: keyof Events, handler: (...args: any) => void)
|
|
455
|
-
send(tr: Transaction, oldState: EditorState, newState: EditorState)
|
|
456
|
-
sendMessage<K extends keyof Events>(data: {
|
|
450
|
+
getFinalAcknowledgedState: (reason: GetResolvedEditorStateReason) => Promise<ResolvedEditorState>;
|
|
451
|
+
getIsNamespaceLocked: () => boolean;
|
|
452
|
+
initialize: (getState: () => any, createStep: (json: object) => Step) => this;
|
|
453
|
+
off: (evt: keyof Events, handler: (...args: any) => void) => this;
|
|
454
|
+
on: (evt: keyof Events, handler: (...args: any) => void) => this;
|
|
455
|
+
send: (tr: Transaction, oldState: EditorState, newState: EditorState) => void;
|
|
456
|
+
sendMessage: <K extends keyof Events>(data: {
|
|
457
457
|
type: K;
|
|
458
|
-
} & Events[K])
|
|
459
|
-
setup(props: {
|
|
458
|
+
} & Events[K]) => void;
|
|
459
|
+
setup: (props: {
|
|
460
460
|
editorApi?: any;
|
|
461
461
|
getState?: () => EditorState;
|
|
462
462
|
onSyncUpError?: SyncUpErrorFunction;
|
|
463
|
-
})
|
|
464
|
-
unsubscribeAll(evt: keyof Events)
|
|
463
|
+
}) => this;
|
|
464
|
+
unsubscribeAll: (evt: keyof Events) => this;
|
|
465
465
|
}
|
|
466
466
|
export type CollabEditOptions = {
|
|
467
467
|
provider?: Providers['collabEditProvider'];
|
|
@@ -46,8 +46,8 @@ export type ReferenceEntity = {
|
|
|
46
46
|
export type MultiBodiedExtensionActions = {
|
|
47
47
|
addChild: () => boolean;
|
|
48
48
|
changeActive: (index: number) => boolean;
|
|
49
|
-
getChildren()
|
|
50
|
-
getChildrenContainer()
|
|
49
|
+
getChildren: () => Array<ADFEntity>;
|
|
50
|
+
getChildrenContainer: () => React.ReactNode;
|
|
51
51
|
getChildrenCount: () => number;
|
|
52
52
|
removeChild: (index: number) => boolean;
|
|
53
53
|
updateParameters: (parameters: Parameters) => boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type ExtensionAutoConvertHandler, type ExtensionKey, type ExtensionManifest, type ExtensionType } from './extension-manifest';
|
|
2
2
|
import { type Parameters } from './extension-parameters';
|
|
3
3
|
export interface ExtensionProvider<T extends Parameters = any> {
|
|
4
|
-
getAutoConverter()
|
|
5
|
-
getExtension(type: ExtensionType, key: ExtensionKey)
|
|
6
|
-
getExtensions()
|
|
7
|
-
getPreloadedExtension
|
|
8
|
-
preload
|
|
9
|
-
search(keyword: string)
|
|
4
|
+
getAutoConverter: () => Promise<ExtensionAutoConvertHandler[]>;
|
|
5
|
+
getExtension: (type: ExtensionType, key: ExtensionKey) => Promise<ExtensionManifest<T> | undefined>;
|
|
6
|
+
getExtensions: () => Promise<ExtensionManifest<T>[]>;
|
|
7
|
+
getPreloadedExtension?: (type: ExtensionType, key: ExtensionKey) => ExtensionManifest<T> | undefined;
|
|
8
|
+
preload?: () => Promise<void>;
|
|
9
|
+
search: (keyword: string) => Promise<ExtensionManifest<T>[]>;
|
|
10
10
|
}
|
|
@@ -4,15 +4,15 @@ import { type INPUT_METHOD } from '../../analytics';
|
|
|
4
4
|
export type RecentSearchInputTypes = INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL;
|
|
5
5
|
export interface ChildProps {
|
|
6
6
|
activityProvider: ActivityProvider | null;
|
|
7
|
-
clearValue()
|
|
7
|
+
clearValue: () => void;
|
|
8
8
|
currentInputMethod?: RecentSearchInputTypes;
|
|
9
9
|
inputProps: {
|
|
10
|
-
onChange(input: string)
|
|
11
|
-
onKeyDown(event: KeyboardEvent<any>)
|
|
12
|
-
onSubmit()
|
|
10
|
+
onChange: (input: string) => void;
|
|
11
|
+
onKeyDown: (event: KeyboardEvent<any>) => void;
|
|
12
|
+
onSubmit: () => void;
|
|
13
13
|
value: string;
|
|
14
14
|
};
|
|
15
|
-
renderRecentList()
|
|
15
|
+
renderRecentList: () => React.ReactNode;
|
|
16
16
|
}
|
|
17
17
|
export interface RecentSearchSubmitOptions {
|
|
18
18
|
inputMethod: RecentSearchInputTypes;
|
|
@@ -22,9 +22,9 @@ export interface RecentSearchSubmitOptions {
|
|
|
22
22
|
export interface RecentSearchProps {
|
|
23
23
|
defaultUrl?: string;
|
|
24
24
|
limit?: number;
|
|
25
|
-
onBlur(options: RecentSearchSubmitOptions)
|
|
26
|
-
onSubmit(options: RecentSearchSubmitOptions)
|
|
27
|
-
render(state: ChildProps)
|
|
25
|
+
onBlur: (options: RecentSearchSubmitOptions) => void;
|
|
26
|
+
onSubmit: (options: RecentSearchSubmitOptions) => void;
|
|
27
|
+
render: (state: ChildProps) => React.ReactNode;
|
|
28
28
|
}
|
|
29
29
|
export interface RecentSearchState {
|
|
30
30
|
isLoading: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CardAdf, DatasourceAdf } from '@atlaskit/linking-common';
|
|
2
2
|
export type CardAppearance = 'inline' | 'block' | 'embed';
|
|
3
3
|
export interface CardProvider {
|
|
4
|
-
findPattern(url: string)
|
|
5
|
-
resolve(url: string, appearance: CardAppearance, shouldForceAppearance?: boolean, isEmbedFriendlyLocation?: boolean)
|
|
4
|
+
findPattern: (url: string) => Promise<boolean>;
|
|
5
|
+
resolve: (url: string, appearance: CardAppearance, shouldForceAppearance?: boolean, isEmbedFriendlyLocation?: boolean) => Promise<CardAdf | DatasourceAdf>;
|
|
6
6
|
}
|
|
@@ -16,10 +16,10 @@ export interface MacroAttributes {
|
|
|
16
16
|
type: ExtensionType;
|
|
17
17
|
}
|
|
18
18
|
export interface MacroProvider {
|
|
19
|
-
autoConvert(link: string)
|
|
19
|
+
autoConvert: (link: string) => MacroAttributes | null;
|
|
20
20
|
config: Object;
|
|
21
21
|
/**
|
|
22
22
|
* If "macro" param is passed in, it will open macro browser for editing the macro
|
|
23
23
|
*/
|
|
24
|
-
openMacroBrowser(macroNode?: PmNode)
|
|
24
|
+
openMacroBrowser: (macroNode?: PmNode) => Promise<MacroAttributes>;
|
|
25
25
|
}
|
|
@@ -8,5 +8,5 @@ export interface QuickSearchResult {
|
|
|
8
8
|
}
|
|
9
9
|
export type LinkContentType = 'jira.issue' | 'jira.issue.bug' | 'jira.issue.story' | 'jira.issue.task' | 'confluence.page' | 'confluence.blogpost' | 'default';
|
|
10
10
|
export interface SearchProvider {
|
|
11
|
-
quickSearch(query: string, limit: number)
|
|
11
|
+
quickSearch: (query: string, limit: number) => Promise<QuickSearchResult[]>;
|
|
12
12
|
}
|
|
@@ -7,16 +7,16 @@ export type ContextUpdateHandler = (editorView: EditorView, eventDispatcher: Eve
|
|
|
7
7
|
export type ReplaceRawValue = Node | object | string;
|
|
8
8
|
export type GetResolvedEditorStateReason = 'publish' | 'draft-sync' | 'get-content';
|
|
9
9
|
export interface EditorActionsOptions<T = any> {
|
|
10
|
-
appendText(text: string)
|
|
11
|
-
blur()
|
|
12
|
-
clear()
|
|
13
|
-
focus()
|
|
14
|
-
getNodeByFragmentLocalId(id: string)
|
|
15
|
-
getNodeByLocalId(id: string)
|
|
16
|
-
getResolvedEditorState(reason: GetResolvedEditorStateReason)
|
|
17
|
-
getSelectedNode()
|
|
18
|
-
getValue()
|
|
19
|
-
isDocumentEmpty()
|
|
20
|
-
replaceDocument(rawValue: any)
|
|
21
|
-
replaceSelection(rawValue: ReplaceRawValue | Array<ReplaceRawValue>)
|
|
10
|
+
appendText: (text: string) => boolean;
|
|
11
|
+
blur: () => boolean;
|
|
12
|
+
clear: () => boolean;
|
|
13
|
+
focus: () => boolean;
|
|
14
|
+
getNodeByFragmentLocalId: (id: string) => Node | undefined;
|
|
15
|
+
getNodeByLocalId: (id: string) => Node | undefined;
|
|
16
|
+
getResolvedEditorState: (reason: GetResolvedEditorStateReason) => Promise<ResolvedEditorState | undefined>;
|
|
17
|
+
getSelectedNode: () => Node | undefined;
|
|
18
|
+
getValue: () => Promise<T | JSONDocNode | undefined>;
|
|
19
|
+
isDocumentEmpty: () => boolean;
|
|
20
|
+
replaceDocument: (rawValue: any) => boolean;
|
|
21
|
+
replaceSelection: (rawValue: ReplaceRawValue | Array<ReplaceRawValue>) => boolean;
|
|
22
22
|
}
|
|
@@ -12,8 +12,8 @@ import type { FireAnalyticsCallback } from '../analytics';
|
|
|
12
12
|
import type { EditorCommand, EditorCommandWithMetadata } from './editor-command';
|
|
13
13
|
import type { EditorPlugin } from './editor-plugin';
|
|
14
14
|
export interface Transformer<T> {
|
|
15
|
-
encode(node: Node)
|
|
16
|
-
parse(content: T)
|
|
15
|
+
encode: (node: Node) => T;
|
|
16
|
+
parse: (content: T) => Node;
|
|
17
17
|
}
|
|
18
18
|
export type CorePlugin = NextEditorPlugin<'core', {
|
|
19
19
|
actions: {
|
|
@@ -31,7 +31,7 @@ export type CorePlugin = NextEditorPlugin<'core', {
|
|
|
31
31
|
* @param schema Schema of the document
|
|
32
32
|
* @returns Transformer which can be used to request a document
|
|
33
33
|
*/
|
|
34
|
-
createTransformer<Format>(cb: (schema: Schema) => Transformer<Format>)
|
|
34
|
+
createTransformer: <Format>(cb: (schema: Schema) => Transformer<Format>) => Transformer<Format> | undefined;
|
|
35
35
|
/**
|
|
36
36
|
* Dispatches an EditorCommand to ProseMirror
|
|
37
37
|
*
|
|
@@ -90,10 +90,10 @@ export type CorePlugin = NextEditorPlugin<'core', {
|
|
|
90
90
|
* @param options.transformer Pass a transformer for the document to be transformed into a different format.
|
|
91
91
|
* @param options.alwaysFire If true, always return a value in `onReceive` handler rather than skipping throttled calls
|
|
92
92
|
*/
|
|
93
|
-
requestDocument<GenericTransformer extends Transformer<any> = Transformer<JSONDocNode>>(onReceive: (document: TransformerResult<GenericTransformer> | undefined) => void, options?: {
|
|
93
|
+
requestDocument: <GenericTransformer extends Transformer<any> = Transformer<JSONDocNode>>(onReceive: (document: TransformerResult<GenericTransformer> | undefined) => void, options?: {
|
|
94
94
|
alwaysFire?: boolean;
|
|
95
95
|
transformer?: GenericTransformer;
|
|
96
|
-
})
|
|
96
|
+
}) => void;
|
|
97
97
|
/**
|
|
98
98
|
* Request the editor document asynchronously.
|
|
99
99
|
*
|
|
@@ -7,17 +7,17 @@ export interface UserPreferencesProvider {
|
|
|
7
7
|
* meaning that consumers should prefetch the user preference and make it available initially
|
|
8
8
|
* @param key
|
|
9
9
|
*/
|
|
10
|
-
getPreference<K extends keyof UserPreferences>(key: K)
|
|
10
|
+
getPreference: <K extends keyof UserPreferences>(key: K) => UserPreferences[K] | undefined | null;
|
|
11
11
|
/**
|
|
12
12
|
* This method fetches the latest user preferences
|
|
13
13
|
* @returns a promise that resolves with the user preferences, or rejects if error occurs
|
|
14
14
|
*/
|
|
15
|
-
loadPreferences()
|
|
15
|
+
loadPreferences: () => Promise<UserPreferences>;
|
|
16
16
|
/**
|
|
17
17
|
* This method updates a user preference
|
|
18
18
|
* @param key
|
|
19
19
|
* @param value
|
|
20
20
|
* @returns a promise that resolves when the preference is updated, or rejects if the update fails
|
|
21
21
|
*/
|
|
22
|
-
updatePreference<K extends keyof UserPreferences>(key: K, value: UserPreferences[K])
|
|
22
|
+
updatePreference: <K extends keyof UserPreferences>(key: K, value: UserPreferences[K]) => Promise<void>;
|
|
23
23
|
}
|
|
@@ -10,7 +10,7 @@ export declare enum ContentType {
|
|
|
10
10
|
LINK = 25
|
|
11
11
|
}
|
|
12
12
|
interface CompareOptions {
|
|
13
|
-
getInlineCardTextFromStore(attrs: CardAttributes)
|
|
13
|
+
getInlineCardTextFromStore: (attrs: CardAttributes) => string | null;
|
|
14
14
|
}
|
|
15
15
|
interface NodeMetaGenerator<Type, Value> {
|
|
16
16
|
type: Type;
|
|
@@ -9,7 +9,7 @@ export declare function startMeasureReactNodeViewRendered({ nodeTypeName, }: {
|
|
|
9
9
|
nodeTypeName: string;
|
|
10
10
|
}): void;
|
|
11
11
|
export declare function stopMeasureReactNodeViewRendered({ nodeTypeName, dispatchAnalyticsEvent, samplingRate, slowThreshold, }: {
|
|
12
|
-
dispatchAnalyticsEvent(payload: AnalyticsEventPayload)
|
|
12
|
+
dispatchAnalyticsEvent: (payload: AnalyticsEventPayload) => void;
|
|
13
13
|
nodeTypeName: string;
|
|
14
14
|
samplingRate: number;
|
|
15
15
|
slowThreshold: number;
|
|
@@ -50,6 +50,8 @@ export type AnnotationSelectedChangeData = {
|
|
|
50
50
|
export type AnnotationManagerEvents = {
|
|
51
51
|
data: AnnotationDraftStartedData;
|
|
52
52
|
name: 'draftAnnotationStarted';
|
|
53
|
+
} | {
|
|
54
|
+
name: 'draftAnnotationCleared';
|
|
53
55
|
} | {
|
|
54
56
|
data: AnnotationSelectedChangeData;
|
|
55
57
|
name: 'annotationSelectionChanged';
|
|
@@ -139,13 +141,13 @@ export type AnnotationManager = AnnotationManagerMethods & {
|
|
|
139
141
|
* @private
|
|
140
142
|
* @internal
|
|
141
143
|
*/
|
|
142
|
-
checkPreemptiveGate()
|
|
144
|
+
checkPreemptiveGate: () => Promise<boolean>;
|
|
143
145
|
/**
|
|
144
146
|
* @private
|
|
145
147
|
* @internal
|
|
146
148
|
* This method is intended for internal Platform use only. It is not intended for use by Product code.
|
|
147
149
|
*/
|
|
148
|
-
emit(event: {
|
|
150
|
+
emit: (event: {
|
|
149
151
|
data: AnnotationDraftStartedData;
|
|
150
152
|
name: 'draftAnnotationStarted';
|
|
151
153
|
} | {
|
|
@@ -153,28 +155,28 @@ export type AnnotationManager = AnnotationManagerMethods & {
|
|
|
153
155
|
} | {
|
|
154
156
|
data: AnnotationSelectedChangeData;
|
|
155
157
|
name: 'annotationSelectionChanged';
|
|
156
|
-
})
|
|
158
|
+
}) => AnnotationManager;
|
|
157
159
|
/**
|
|
158
160
|
* @private
|
|
159
161
|
* @internal
|
|
160
162
|
* This method is intended for internal Platform use only. It is not intended for use by Product code.
|
|
161
163
|
*/
|
|
162
|
-
hook<H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H])
|
|
163
|
-
offAnnotationSelectionChange(handler: (data: AnnotationSelectedChangeData) => void)
|
|
164
|
-
offDraftAnnotationStarted(handler: (data: AnnotationDraftStartedData) => void)
|
|
165
|
-
onAnnotationSelectionChange(handler: (data: AnnotationSelectedChangeData) => void)
|
|
166
|
-
onDraftAnnotationStarted(handler: (data: AnnotationDraftStartedData) => void)
|
|
164
|
+
hook: <H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H]) => AnnotationManager;
|
|
165
|
+
offAnnotationSelectionChange: (handler: (data: AnnotationSelectedChangeData) => void) => AnnotationManager;
|
|
166
|
+
offDraftAnnotationStarted: (handler: (data: AnnotationDraftStartedData) => void) => AnnotationManager;
|
|
167
|
+
onAnnotationSelectionChange: (handler: (data: AnnotationSelectedChangeData) => void) => AnnotationManager;
|
|
168
|
+
onDraftAnnotationStarted: (handler: (data: AnnotationDraftStartedData) => void) => AnnotationManager;
|
|
167
169
|
/**
|
|
168
170
|
* This method is used to set a preemptive gate. A preemptive gate is a function that will be called
|
|
169
171
|
* before the manager performs an action. If the function returns false, the action will not be performed.
|
|
170
172
|
*/
|
|
171
|
-
setPreemptiveGate(handler: () => Promise<boolean>)
|
|
173
|
+
setPreemptiveGate: (handler: () => Promise<boolean>) => AnnotationManager;
|
|
172
174
|
/**
|
|
173
175
|
*
|
|
174
176
|
* @internal
|
|
175
177
|
* This method is intended for internal Platform use only. It is not intended for use by Product code.
|
|
176
178
|
*/
|
|
177
|
-
unhook<H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H])
|
|
179
|
+
unhook: <H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H]) => AnnotationManager;
|
|
178
180
|
};
|
|
179
181
|
/**
|
|
180
182
|
* This is a factory method which creates a new instance of the AnnotationManager.
|
|
@@ -447,21 +447,21 @@ export interface CollabEvents {
|
|
|
447
447
|
}
|
|
448
448
|
export type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
|
|
449
449
|
export interface CollabEditProvider<Events extends CollabEvents = CollabEvents> {
|
|
450
|
-
getFinalAcknowledgedState(reason: GetResolvedEditorStateReason)
|
|
451
|
-
getIsNamespaceLocked()
|
|
452
|
-
initialize(getState: () => any, createStep: (json: object) => Step)
|
|
453
|
-
off(evt: keyof Events, handler: (...args: any) => void)
|
|
454
|
-
on(evt: keyof Events, handler: (...args: any) => void)
|
|
455
|
-
send(tr: Transaction, oldState: EditorState, newState: EditorState)
|
|
456
|
-
sendMessage<K extends keyof Events>(data: {
|
|
450
|
+
getFinalAcknowledgedState: (reason: GetResolvedEditorStateReason) => Promise<ResolvedEditorState>;
|
|
451
|
+
getIsNamespaceLocked: () => boolean;
|
|
452
|
+
initialize: (getState: () => any, createStep: (json: object) => Step) => this;
|
|
453
|
+
off: (evt: keyof Events, handler: (...args: any) => void) => this;
|
|
454
|
+
on: (evt: keyof Events, handler: (...args: any) => void) => this;
|
|
455
|
+
send: (tr: Transaction, oldState: EditorState, newState: EditorState) => void;
|
|
456
|
+
sendMessage: <K extends keyof Events>(data: {
|
|
457
457
|
type: K;
|
|
458
|
-
} & Events[K])
|
|
459
|
-
setup(props: {
|
|
458
|
+
} & Events[K]) => void;
|
|
459
|
+
setup: (props: {
|
|
460
460
|
editorApi?: any;
|
|
461
461
|
getState?: () => EditorState;
|
|
462
462
|
onSyncUpError?: SyncUpErrorFunction;
|
|
463
|
-
})
|
|
464
|
-
unsubscribeAll(evt: keyof Events)
|
|
463
|
+
}) => this;
|
|
464
|
+
unsubscribeAll: (evt: keyof Events) => this;
|
|
465
465
|
}
|
|
466
466
|
export type CollabEditOptions = {
|
|
467
467
|
provider?: Providers['collabEditProvider'];
|
|
@@ -46,8 +46,8 @@ export type ReferenceEntity = {
|
|
|
46
46
|
export type MultiBodiedExtensionActions = {
|
|
47
47
|
addChild: () => boolean;
|
|
48
48
|
changeActive: (index: number) => boolean;
|
|
49
|
-
getChildren()
|
|
50
|
-
getChildrenContainer()
|
|
49
|
+
getChildren: () => Array<ADFEntity>;
|
|
50
|
+
getChildrenContainer: () => React.ReactNode;
|
|
51
51
|
getChildrenCount: () => number;
|
|
52
52
|
removeChild: (index: number) => boolean;
|
|
53
53
|
updateParameters: (parameters: Parameters) => boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type ExtensionAutoConvertHandler, type ExtensionKey, type ExtensionManifest, type ExtensionType } from './extension-manifest';
|
|
2
2
|
import { type Parameters } from './extension-parameters';
|
|
3
3
|
export interface ExtensionProvider<T extends Parameters = any> {
|
|
4
|
-
getAutoConverter()
|
|
5
|
-
getExtension(type: ExtensionType, key: ExtensionKey)
|
|
6
|
-
getExtensions()
|
|
7
|
-
getPreloadedExtension
|
|
8
|
-
preload
|
|
9
|
-
search(keyword: string)
|
|
4
|
+
getAutoConverter: () => Promise<ExtensionAutoConvertHandler[]>;
|
|
5
|
+
getExtension: (type: ExtensionType, key: ExtensionKey) => Promise<ExtensionManifest<T> | undefined>;
|
|
6
|
+
getExtensions: () => Promise<ExtensionManifest<T>[]>;
|
|
7
|
+
getPreloadedExtension?: (type: ExtensionType, key: ExtensionKey) => ExtensionManifest<T> | undefined;
|
|
8
|
+
preload?: () => Promise<void>;
|
|
9
|
+
search: (keyword: string) => Promise<ExtensionManifest<T>[]>;
|
|
10
10
|
}
|
|
@@ -4,15 +4,15 @@ import { type INPUT_METHOD } from '../../analytics';
|
|
|
4
4
|
export type RecentSearchInputTypes = INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL;
|
|
5
5
|
export interface ChildProps {
|
|
6
6
|
activityProvider: ActivityProvider | null;
|
|
7
|
-
clearValue()
|
|
7
|
+
clearValue: () => void;
|
|
8
8
|
currentInputMethod?: RecentSearchInputTypes;
|
|
9
9
|
inputProps: {
|
|
10
|
-
onChange(input: string)
|
|
11
|
-
onKeyDown(event: KeyboardEvent<any>)
|
|
12
|
-
onSubmit()
|
|
10
|
+
onChange: (input: string) => void;
|
|
11
|
+
onKeyDown: (event: KeyboardEvent<any>) => void;
|
|
12
|
+
onSubmit: () => void;
|
|
13
13
|
value: string;
|
|
14
14
|
};
|
|
15
|
-
renderRecentList()
|
|
15
|
+
renderRecentList: () => React.ReactNode;
|
|
16
16
|
}
|
|
17
17
|
export interface RecentSearchSubmitOptions {
|
|
18
18
|
inputMethod: RecentSearchInputTypes;
|
|
@@ -22,9 +22,9 @@ export interface RecentSearchSubmitOptions {
|
|
|
22
22
|
export interface RecentSearchProps {
|
|
23
23
|
defaultUrl?: string;
|
|
24
24
|
limit?: number;
|
|
25
|
-
onBlur(options: RecentSearchSubmitOptions)
|
|
26
|
-
onSubmit(options: RecentSearchSubmitOptions)
|
|
27
|
-
render(state: ChildProps)
|
|
25
|
+
onBlur: (options: RecentSearchSubmitOptions) => void;
|
|
26
|
+
onSubmit: (options: RecentSearchSubmitOptions) => void;
|
|
27
|
+
render: (state: ChildProps) => React.ReactNode;
|
|
28
28
|
}
|
|
29
29
|
export interface RecentSearchState {
|
|
30
30
|
isLoading: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CardAdf, DatasourceAdf } from '@atlaskit/linking-common';
|
|
2
2
|
export type CardAppearance = 'inline' | 'block' | 'embed';
|
|
3
3
|
export interface CardProvider {
|
|
4
|
-
findPattern(url: string)
|
|
5
|
-
resolve(url: string, appearance: CardAppearance, shouldForceAppearance?: boolean, isEmbedFriendlyLocation?: boolean)
|
|
4
|
+
findPattern: (url: string) => Promise<boolean>;
|
|
5
|
+
resolve: (url: string, appearance: CardAppearance, shouldForceAppearance?: boolean, isEmbedFriendlyLocation?: boolean) => Promise<CardAdf | DatasourceAdf>;
|
|
6
6
|
}
|
|
@@ -16,10 +16,10 @@ export interface MacroAttributes {
|
|
|
16
16
|
type: ExtensionType;
|
|
17
17
|
}
|
|
18
18
|
export interface MacroProvider {
|
|
19
|
-
autoConvert(link: string)
|
|
19
|
+
autoConvert: (link: string) => MacroAttributes | null;
|
|
20
20
|
config: Object;
|
|
21
21
|
/**
|
|
22
22
|
* If "macro" param is passed in, it will open macro browser for editing the macro
|
|
23
23
|
*/
|
|
24
|
-
openMacroBrowser(macroNode?: PmNode)
|
|
24
|
+
openMacroBrowser: (macroNode?: PmNode) => Promise<MacroAttributes>;
|
|
25
25
|
}
|
|
@@ -8,5 +8,5 @@ export interface QuickSearchResult {
|
|
|
8
8
|
}
|
|
9
9
|
export type LinkContentType = 'jira.issue' | 'jira.issue.bug' | 'jira.issue.story' | 'jira.issue.task' | 'confluence.page' | 'confluence.blogpost' | 'default';
|
|
10
10
|
export interface SearchProvider {
|
|
11
|
-
quickSearch(query: string, limit: number)
|
|
11
|
+
quickSearch: (query: string, limit: number) => Promise<QuickSearchResult[]>;
|
|
12
12
|
}
|
|
@@ -7,16 +7,16 @@ export type ContextUpdateHandler = (editorView: EditorView, eventDispatcher: Eve
|
|
|
7
7
|
export type ReplaceRawValue = Node | object | string;
|
|
8
8
|
export type GetResolvedEditorStateReason = 'publish' | 'draft-sync' | 'get-content';
|
|
9
9
|
export interface EditorActionsOptions<T = any> {
|
|
10
|
-
appendText(text: string)
|
|
11
|
-
blur()
|
|
12
|
-
clear()
|
|
13
|
-
focus()
|
|
14
|
-
getNodeByFragmentLocalId(id: string)
|
|
15
|
-
getNodeByLocalId(id: string)
|
|
16
|
-
getResolvedEditorState(reason: GetResolvedEditorStateReason)
|
|
17
|
-
getSelectedNode()
|
|
18
|
-
getValue()
|
|
19
|
-
isDocumentEmpty()
|
|
20
|
-
replaceDocument(rawValue: any)
|
|
21
|
-
replaceSelection(rawValue: ReplaceRawValue | Array<ReplaceRawValue>)
|
|
10
|
+
appendText: (text: string) => boolean;
|
|
11
|
+
blur: () => boolean;
|
|
12
|
+
clear: () => boolean;
|
|
13
|
+
focus: () => boolean;
|
|
14
|
+
getNodeByFragmentLocalId: (id: string) => Node | undefined;
|
|
15
|
+
getNodeByLocalId: (id: string) => Node | undefined;
|
|
16
|
+
getResolvedEditorState: (reason: GetResolvedEditorStateReason) => Promise<ResolvedEditorState | undefined>;
|
|
17
|
+
getSelectedNode: () => Node | undefined;
|
|
18
|
+
getValue: () => Promise<T | JSONDocNode | undefined>;
|
|
19
|
+
isDocumentEmpty: () => boolean;
|
|
20
|
+
replaceDocument: (rawValue: any) => boolean;
|
|
21
|
+
replaceSelection: (rawValue: ReplaceRawValue | Array<ReplaceRawValue>) => boolean;
|
|
22
22
|
}
|