@atlaskit/editor-plugin-card 4.5.1 → 4.5.2
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 +9 -0
- package/dist/cjs/{plugin.js → cardPlugin.js} +6 -10
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/nodeviews/blockCard.js +1 -1
- package/dist/cjs/nodeviews/datasource.js +1 -1
- package/dist/cjs/nodeviews/genericCard.js +1 -1
- package/dist/cjs/nodeviews/inlineCard.js +1 -1
- package/dist/cjs/pm-plugins/doc.js +1 -1
- package/dist/cjs/pm-plugins/main.js +3 -3
- package/dist/cjs/{utils.js → pm-plugins/utils.js} +1 -1
- package/dist/cjs/types/index.js +5 -0
- package/dist/cjs/ui/AwarenessWrapper/index.js +3 -3
- package/dist/cjs/ui/DatasourceModal/ModalWithState.js +1 -1
- package/dist/cjs/ui/EditLinkToolbar.js +1 -1
- package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
- package/dist/cjs/ui/EditToolbarButton/index.js +1 -1
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/DatasourceEvents.js +1 -1
- package/dist/cjs/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +2 -2
- package/dist/cjs/ui/LayoutButton/index.js +1 -1
- package/dist/cjs/ui/LayoutButton/utils.js +1 -1
- package/dist/cjs/ui/LinkToolbarAppearance.js +3 -3
- package/dist/cjs/ui/Pulse/index.js +1 -1
- package/dist/cjs/ui/ToolbarViewedEvent.js +1 -1
- package/dist/cjs/{analytics → ui/analytics}/events-from-tr.js +2 -2
- package/dist/cjs/{analytics → ui/analytics}/utils.js +1 -1
- package/dist/cjs/{datasourceErrorBoundary.js → ui/datasourceErrorBoundary.js} +1 -1
- package/dist/cjs/{toolbar.js → ui/toolbar.js} +9 -9
- package/dist/es2019/{plugin.js → cardPlugin.js} +6 -11
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/nodeviews/blockCard.js +1 -1
- package/dist/es2019/nodeviews/datasource.js +1 -1
- package/dist/es2019/nodeviews/genericCard.js +1 -1
- package/dist/es2019/nodeviews/inlineCard.js +1 -1
- package/dist/es2019/pm-plugins/doc.js +1 -1
- package/dist/es2019/pm-plugins/main.js +3 -3
- package/dist/es2019/{utils.js → pm-plugins/utils.js} +1 -1
- package/dist/es2019/ui/AwarenessWrapper/index.js +3 -3
- package/dist/es2019/ui/DatasourceModal/ModalWithState.js +1 -1
- package/dist/es2019/ui/EditLinkToolbar.js +1 -1
- package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
- package/dist/es2019/ui/EditToolbarButton/index.js +1 -1
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/DatasourceEvents.js +1 -1
- package/dist/es2019/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +2 -2
- package/dist/es2019/ui/LayoutButton/index.js +1 -1
- package/dist/es2019/ui/LayoutButton/utils.js +1 -1
- package/dist/es2019/ui/LinkToolbarAppearance.js +3 -3
- package/dist/es2019/ui/Pulse/index.js +1 -1
- package/dist/es2019/ui/ToolbarViewedEvent.js +1 -1
- package/dist/es2019/{analytics → ui/analytics}/events-from-tr.js +2 -2
- package/dist/es2019/{analytics → ui/analytics}/utils.js +1 -1
- package/dist/es2019/{datasourceErrorBoundary.js → ui/datasourceErrorBoundary.js} +1 -1
- package/dist/es2019/{toolbar.js → ui/toolbar.js} +9 -9
- package/dist/esm/{plugin.js → cardPlugin.js} +6 -11
- package/dist/esm/cardPluginType.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/nodeviews/blockCard.js +1 -1
- package/dist/esm/nodeviews/datasource.js +1 -1
- package/dist/esm/nodeviews/genericCard.js +1 -1
- package/dist/esm/nodeviews/inlineCard.js +1 -1
- package/dist/esm/pm-plugins/doc.js +1 -1
- package/dist/esm/pm-plugins/main.js +3 -3
- package/dist/esm/{utils.js → pm-plugins/utils.js} +1 -1
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/ui/AwarenessWrapper/index.js +3 -3
- package/dist/esm/ui/DatasourceModal/ModalWithState.js +1 -1
- package/dist/esm/ui/EditLinkToolbar.js +1 -1
- package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
- package/dist/esm/ui/EditToolbarButton/index.js +1 -1
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/DatasourceEvents.js +1 -1
- package/dist/esm/ui/EditorLinkingPlatformAnalytics/LinkEvents.js +2 -2
- package/dist/esm/ui/LayoutButton/index.js +1 -1
- package/dist/esm/ui/LayoutButton/utils.js +1 -1
- package/dist/esm/ui/LinkToolbarAppearance.js +3 -3
- package/dist/esm/ui/Pulse/index.js +1 -1
- package/dist/esm/ui/ToolbarViewedEvent.js +1 -1
- package/dist/esm/{analytics → ui/analytics}/events-from-tr.js +2 -2
- package/dist/esm/{analytics → ui/analytics}/utils.js +1 -1
- package/dist/esm/{datasourceErrorBoundary.js → ui/datasourceErrorBoundary.js} +1 -1
- package/dist/esm/{toolbar.js → ui/toolbar.js} +9 -9
- package/dist/types/cardPlugin.d.ts +2 -0
- package/dist/{types-ts4.5/plugin.d.ts → types/cardPluginType.d.ts} +0 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/pm-plugins/util/state.d.ts +1 -1
- package/dist/types/{utils.d.ts → pm-plugins/utils.d.ts} +1 -1
- package/dist/types/{types.d.ts → types/index.d.ts} +3 -3
- package/dist/types/ui/DatasourceModal/ModalWithState.d.ts +1 -1
- package/dist/types/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/ui/EditorLinkingPlatformAnalytics/common.d.ts +2 -2
- package/dist/types/ui/HyperlinkToolbarAppearance.d.ts +1 -1
- package/dist/types/ui/LayoutButton/utils.d.ts +1 -1
- package/dist/types/{datasourceErrorBoundary.d.ts → ui/datasourceErrorBoundary.d.ts} +1 -1
- package/dist/types/{common → ui}/hooks/useLinkUpgradeDiscoverability.d.ts +1 -1
- package/dist/types/{toolbar.d.ts → ui/toolbar.d.ts} +2 -2
- package/dist/types-ts4.5/cardPlugin.d.ts +2 -0
- package/dist/{types/plugin.d.ts → types-ts4.5/cardPluginType.d.ts} +0 -1
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/util/state.d.ts +1 -1
- package/dist/types-ts4.5/{utils.d.ts → pm-plugins/utils.d.ts} +1 -1
- package/dist/types-ts4.5/{types.d.ts → types/index.d.ts} +3 -3
- package/dist/types-ts4.5/ui/DatasourceModal/ModalWithState.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorLinkingPlatformAnalytics/common.d.ts +2 -2
- package/dist/types-ts4.5/ui/HyperlinkToolbarAppearance.d.ts +1 -1
- package/dist/types-ts4.5/ui/LayoutButton/utils.d.ts +1 -1
- package/dist/types-ts4.5/{datasourceErrorBoundary.d.ts → ui/datasourceErrorBoundary.d.ts} +1 -1
- package/dist/types-ts4.5/{common → ui}/hooks/useLinkUpgradeDiscoverability.d.ts +1 -1
- package/dist/types-ts4.5/{toolbar.d.ts → ui/toolbar.d.ts} +2 -2
- package/package.json +7 -4
- /package/dist/cjs/{types.js → cardPluginType.js} +0 -0
- /package/dist/cjs/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.js +0 -0
- /package/dist/cjs/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.js +0 -0
- /package/dist/cjs/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.js +0 -0
- /package/dist/cjs/{analytics → ui/analytics}/create-events-queue.js +0 -0
- /package/dist/cjs/{analytics → ui/analytics}/index.js +0 -0
- /package/dist/cjs/{analytics → ui/analytics}/types.js +0 -0
- /package/dist/cjs/{common → ui}/hooks/useLinkUpgradeDiscoverability.js +0 -0
- /package/dist/cjs/{common → ui}/local-storage.js +0 -0
- /package/dist/es2019/{types.js → cardPluginType.js} +0 -0
- /package/dist/es2019/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.js +0 -0
- /package/dist/es2019/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.js +0 -0
- /package/dist/es2019/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.js +0 -0
- /package/dist/{esm/types.js → es2019/types/index.js} +0 -0
- /package/dist/es2019/{analytics → ui/analytics}/create-events-queue.js +0 -0
- /package/dist/es2019/{analytics → ui/analytics}/index.js +0 -0
- /package/dist/es2019/{analytics → ui/analytics}/types.js +0 -0
- /package/dist/es2019/{common → ui}/hooks/useLinkUpgradeDiscoverability.js +0 -0
- /package/dist/es2019/{common → ui}/local-storage.js +0 -0
- /package/dist/esm/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.js +0 -0
- /package/dist/esm/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.js +0 -0
- /package/dist/esm/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.js +0 -0
- /package/dist/esm/{analytics → ui/analytics}/create-events-queue.js +0 -0
- /package/dist/esm/{analytics → ui/analytics}/index.js +0 -0
- /package/dist/esm/{analytics → ui/analytics}/types.js +0 -0
- /package/dist/esm/{common → ui}/hooks/useLinkUpgradeDiscoverability.js +0 -0
- /package/dist/esm/{common → ui}/local-storage.js +0 -0
- /package/dist/types/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.d.ts +0 -0
- /package/dist/types/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.d.ts +0 -0
- /package/dist/types/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/create-events-queue.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/events-from-tr.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/index.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/types.d.ts +0 -0
- /package/dist/types/{analytics → ui/analytics}/utils.d.ts +0 -0
- /package/dist/types/{common → ui}/local-storage.d.ts +0 -0
- /package/dist/types-ts4.5/{toDOM-fixes → nodeviews/toDOM-fixes}/blockCard.d.ts +0 -0
- /package/dist/types-ts4.5/{toDOM-fixes → nodeviews/toDOM-fixes}/embedCard.d.ts +0 -0
- /package/dist/types-ts4.5/{toDOM-fixes → nodeviews/toDOM-fixes}/inlineCard.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/create-events-queue.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/events-from-tr.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/index.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/types.d.ts +0 -0
- /package/dist/types-ts4.5/{analytics → ui/analytics}/utils.d.ts +0 -0
- /package/dist/types-ts4.5/{common → ui}/local-storage.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
2
|
-
import { isDatasourceNode } from '../../utils';
|
|
2
|
+
import { isDatasourceNode } from '../../pm-plugins/utils';
|
|
3
3
|
import { DATASOURCE_TABLE_LAYOUTS } from './types';
|
|
4
4
|
export const getDatasource = editorView => {
|
|
5
5
|
const {
|
|
@@ -6,11 +6,11 @@ import { commandWithMetadata, getButtonGroupOption, LinkToolbarButtonGroup } fro
|
|
|
6
6
|
import nodeNames, { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
7
7
|
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
-
import { LOCAL_STORAGE_DISCOVERY_KEY_TOOLBAR } from '../common/local-storage';
|
|
10
9
|
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { getResolvedAttributesFromStore } from '../pm-plugins/utils';
|
|
11
|
+
import { LOCAL_STORAGE_DISCOVERY_KEY_TOOLBAR } from './local-storage';
|
|
13
12
|
import { DiscoveryPulse } from './Pulse';
|
|
13
|
+
import { shouldRenderToolbarPulse } from './toolbar';
|
|
14
14
|
import { WithCardContext } from './WithCardContext';
|
|
15
15
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect } from 'react';
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { Pulse } from '@atlaskit/linking-common';
|
|
4
|
-
import { isLocalStorageKeyDiscovered, markLocalStorageKeyDiscovered } from '
|
|
4
|
+
import { isLocalStorageKeyDiscovered, markLocalStorageKeyDiscovered } from '../local-storage';
|
|
5
5
|
export const DiscoveryPulse = ({
|
|
6
6
|
children,
|
|
7
7
|
localStorageKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
4
|
-
import { getResolvedAttributesFromStore } from '../utils';
|
|
4
|
+
import { getResolvedAttributesFromStore } from '../pm-plugins/utils';
|
|
5
5
|
import { EditorAnalyticsContext } from './EditorAnalyticsContext';
|
|
6
6
|
/**
|
|
7
7
|
* Handles firing the toolbar viewed event
|
|
@@ -4,8 +4,8 @@ import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
|
4
4
|
import { getLinkMetadataFromTransaction } from '@atlaskit/editor-common/card';
|
|
5
5
|
import { isLinkMark, pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { AddMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
7
|
-
import { pluginKey } from '
|
|
8
|
-
import { getPluginState } from '
|
|
7
|
+
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
8
|
+
import { getPluginState } from '../../pm-plugins/util/state';
|
|
9
9
|
import { EVENT, EVENT_SUBJECT } from './types';
|
|
10
10
|
import { appearanceForLink, areSameNodes, findAtPositions, findInNodeRange, getNodeContext, getNodeSubject } from './utils';
|
|
11
11
|
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
5
5
|
import { LazyLoadedDatasourceRenderFailedAnalyticsWrapper } from '@atlaskit/link-datasource';
|
|
6
|
-
import { setSelectedCardAppearance } from '
|
|
6
|
+
import { setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
7
7
|
export class DatasourceErrorBoundary extends React.Component {
|
|
8
8
|
constructor(...args) {
|
|
9
9
|
super(...args);
|
|
@@ -19,15 +19,15 @@ import CogIcon from '@atlaskit/icon/glyph/editor/settings';
|
|
|
19
19
|
import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
20
20
|
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
|
-
import { changeSelectedCardToText } from '
|
|
23
|
-
import { pluginKey } from '
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
22
|
+
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
23
|
+
import { pluginKey } from '../pm-plugins/main';
|
|
24
|
+
import { appearanceForNodeType, displayInfoForCard, findCardInfo, isDatasourceNode, titleUrlPairFromNode } from '../pm-plugins/utils';
|
|
25
|
+
import { DatasourceAppearanceButton } from './DatasourceAppearanceButton';
|
|
26
|
+
import { buildEditLinkToolbar, editLinkToolbarConfig, getEditLinkCallback } from './EditLinkToolbar';
|
|
27
|
+
import { EditToolbarButton } from './EditToolbarButton';
|
|
28
|
+
import { HyperlinkToolbarAppearance } from './HyperlinkToolbarAppearance';
|
|
29
|
+
import { LinkToolbarAppearance } from './LinkToolbarAppearance';
|
|
30
|
+
import { ToolbarViewedEvent } from './ToolbarViewedEvent';
|
|
31
31
|
export const removeCard = editorAnalyticsApi => commandWithMetadata((state, dispatch) => {
|
|
32
32
|
if (!(state.selection instanceof NodeSelection)) {
|
|
33
33
|
return false;
|
|
@@ -8,26 +8,21 @@ import { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
8
8
|
import { IconDatasourceAssetsObjects, IconDatasourceConfluenceSearch, IconDatasourceJiraIssue } from '@atlaskit/editor-common/quick-insert';
|
|
9
9
|
import { canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
10
10
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID, CONFLUENCE_SEARCH_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
11
|
-
import {
|
|
11
|
+
import { blockCardSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/blockCard';
|
|
12
|
+
import { embedCardSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/embedCard';
|
|
13
|
+
import { inlineCardSpecWithFixedToDOM } from './nodeviews/toDOM-fixes/inlineCard';
|
|
12
14
|
import { hideLinkToolbar, setProvider as _setProvider, showDatasourceModal } from './pm-plugins/actions';
|
|
13
15
|
import { queueCardsFromChangedTr } from './pm-plugins/doc';
|
|
14
16
|
import { cardKeymap } from './pm-plugins/keymap';
|
|
15
17
|
import { createPlugin } from './pm-plugins/main';
|
|
16
18
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { inlineCardSpecWithFixedToDOM } from './toDOM-fixes/inlineCard';
|
|
20
|
-
import { floatingToolbar, getEndingToolbarItems, getStartingToolbarItems } from './toolbar';
|
|
19
|
+
import { isDatasourceConfigEditable } from './pm-plugins/utils';
|
|
20
|
+
import { createEventsQueue } from './ui/analytics/create-events-queue';
|
|
21
21
|
import DatasourceModalWithState from './ui/DatasourceModal/ModalWithState';
|
|
22
22
|
import { EditorLinkingPlatformAnalytics } from './ui/EditorLinkingPlatformAnalytics';
|
|
23
23
|
import { EditorSmartCardEvents } from './ui/EditorSmartCardEvents';
|
|
24
24
|
import LayoutButton from './ui/LayoutButton';
|
|
25
|
-
import {
|
|
26
|
-
|
|
27
|
-
// Dummpy type of AnnotationPlugin
|
|
28
|
-
// This is used to avoid editor universal preset's inferred type maximum length error
|
|
29
|
-
// TODO: Remove this when the issue is fixed
|
|
30
|
-
|
|
25
|
+
import { floatingToolbar, getEndingToolbarItems, getStartingToolbarItems } from './ui/toolbar';
|
|
31
26
|
export var cardPlugin = function cardPlugin(_ref) {
|
|
32
27
|
var _options$lpLinkPicker;
|
|
33
28
|
var _ref$config = _ref.config,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { cardPlugin } from './
|
|
1
|
+
export { cardPlugin } from './cardPlugin';
|
|
@@ -17,7 +17,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
17
17
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
18
18
|
import { Datasource } from '../nodeviews/datasource';
|
|
19
19
|
import { registerCard } from '../pm-plugins/actions';
|
|
20
|
-
import { isDatasourceNode } from '../utils';
|
|
20
|
+
import { isDatasourceNode } from '../pm-plugins/utils';
|
|
21
21
|
import { Card } from './genericCard';
|
|
22
22
|
|
|
23
23
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
@@ -27,7 +27,7 @@ import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
|
27
27
|
import { EditorSmartCardProvider, EditorSmartCardProviderValueGuard } from '@atlaskit/link-provider';
|
|
28
28
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
29
29
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
30
|
-
import { DatasourceErrorBoundary } from '../datasourceErrorBoundary';
|
|
30
|
+
import { DatasourceErrorBoundary } from '../ui/datasourceErrorBoundary';
|
|
31
31
|
import { EditorAnalyticsContext } from '../ui/EditorAnalyticsContext';
|
|
32
32
|
var getPosSafely = function getPosSafely(pos) {
|
|
33
33
|
if (!pos || typeof pos === 'boolean') {
|
|
@@ -16,8 +16,8 @@ import { getAnalyticsEditorAppearance } from '@atlaskit/editor-common/utils';
|
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
17
|
import { changeSelectedCardToLinkFallback } from '../pm-plugins/doc';
|
|
18
18
|
import { getPluginState } from '../pm-plugins/util/state';
|
|
19
|
+
import { titleUrlPairFromNode } from '../pm-plugins/utils';
|
|
19
20
|
import { WithCardContext } from '../ui/WithCardContext';
|
|
20
|
-
import { titleUrlPairFromNode } from '../utils';
|
|
21
21
|
var WithClickHandler = function WithClickHandler(_ref) {
|
|
22
22
|
var pluginInjectionApi = _ref.pluginInjectionApi,
|
|
23
23
|
url = _ref.url,
|
|
@@ -9,8 +9,8 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import { Card as SmartCard } from '@atlaskit/smart-card';
|
|
11
11
|
import { registerCard } from '../pm-plugins/actions';
|
|
12
|
+
import { getAwarenessProps } from '../pm-plugins/utils';
|
|
12
13
|
import OverlayWrapper from '../ui/ConfigureOverlay';
|
|
13
|
-
import { getAwarenessProps } from '../utils';
|
|
14
14
|
import { Card } from './genericCard';
|
|
15
15
|
import { InlineCardWithAwareness } from './inlineCardWithAwareness';
|
|
16
16
|
export var InlineCard = /*#__PURE__*/memo(function (_ref) {
|
|
@@ -10,10 +10,10 @@ import { getAnnotationMarksForPos, getLinkCreationAnalyticsEvent, isFromCurrentD
|
|
|
10
10
|
import { closeHistory } from '@atlaskit/editor-prosemirror/history';
|
|
11
11
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
-
import { appearanceForNodeType, isDatasourceConfigEditable, isDatasourceNode, selectedCardAppearance } from '../utils';
|
|
14
13
|
import { hideDatasourceModal, queueCards, removeDatasourceStash, resolveCard, setDatasourceStash } from './actions';
|
|
15
14
|
import { pluginKey } from './plugin-key';
|
|
16
15
|
import { shouldReplaceLink } from './shouldReplaceLink';
|
|
16
|
+
import { appearanceForNodeType, isDatasourceConfigEditable, isDatasourceNode, selectedCardAppearance } from './utils';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Attempt to replace the link into the respective card.
|
|
@@ -10,19 +10,19 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
10
10
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
11
11
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
-
import { eventsFromTransaction } from '../analytics/events-from-tr';
|
|
14
|
-
import { isLocalStorageKeyDiscovered } from '../common/local-storage';
|
|
15
13
|
import { InlineCardNodeView } from '../nodeviews/inlineCard';
|
|
16
14
|
import { lazyBlockCardView } from '../nodeviews/lazy-block-card';
|
|
17
15
|
import { lazyEmbedCardView } from '../nodeviews/lazy-embed-card';
|
|
18
16
|
import { lazyInlineCardView } from '../nodeviews/lazy-inline-card';
|
|
17
|
+
import { eventsFromTransaction } from '../ui/analytics/events-from-tr';
|
|
19
18
|
import { isDatasourceTableLayout } from '../ui/LayoutButton/utils';
|
|
20
|
-
import {
|
|
19
|
+
import { isLocalStorageKeyDiscovered } from '../ui/local-storage';
|
|
21
20
|
import { clearOverlayCandidate, setCardLayoutAndDatasourceTableRef, setDatasourceTableRef } from './actions';
|
|
22
21
|
import { pluginKey } from './plugin-key';
|
|
23
22
|
import reducer from './reducers';
|
|
24
23
|
import { handleProvider, resolveWithProvider } from './util/resolve';
|
|
25
24
|
import { getNewRequests, getPluginState, getPluginStateWithUpdatedPos } from './util/state';
|
|
25
|
+
import { isBlockSupportedAtPosition, isEmbedSupportedAtPosition } from './utils';
|
|
26
26
|
export { pluginKey } from './plugin-key';
|
|
27
27
|
var LOCAL_STORAGE_DISCOVERY_KEY_SMART_LINK = 'smart-link-upgrade-pulse';
|
|
28
28
|
export var ALLOW_EVENTS_CLASSNAME = 'card-plugin-element-allow-events';
|
|
@@ -3,7 +3,7 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import { getResolvedAttributes } from '@atlaskit/link-analytics/resolved-attributes';
|
|
5
5
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID, CONFLUENCE_SEARCH_DATASOURCE_ID, JIRA_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource';
|
|
6
|
-
import { pluginKey } from './
|
|
6
|
+
import { pluginKey } from './plugin-key';
|
|
7
7
|
export var appearanceForNodeType = function appearanceForNodeType(spec) {
|
|
8
8
|
if (spec.name === 'inlineCard') {
|
|
9
9
|
return 'inline';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,10 +8,10 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { getResolvedAttributesFromStore } from '../../utils';
|
|
11
|
+
import { getResolvedAttributesFromStore } from '../../pm-plugins/utils';
|
|
12
|
+
import useLinkUpgradeDiscoverability from '../hooks/useLinkUpgradeDiscoverability';
|
|
14
13
|
import InlineCardOverlay from '../InlineCardOverlay';
|
|
14
|
+
import { isLocalStorageKeyDiscovered, LOCAL_STORAGE_DISCOVERY_KEY_SMART_LINK, LOCAL_STORAGE_DISCOVERY_KEY_TOOLBAR, markLocalStorageKeyDiscovered, ONE_DAY_IN_MILLISECONDS } from '../local-storage';
|
|
15
15
|
import { DiscoveryPulse } from '../Pulse';
|
|
16
16
|
// editor adds a standard line-height that is bigger than an inline smart link
|
|
17
17
|
// due to that the link has a bit of white space around it, which doesn't look right when there is pulse around it
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
3
3
|
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID, AssetsConfigModal, CONFLUENCE_SEARCH_DATASOURCE_ID, ConfluenceSearchConfigModal, JIRA_LIST_OF_LINKS_DATASOURCE_ID, JiraIssuesConfigModal } from '@atlaskit/link-datasource';
|
|
4
4
|
import { EditorSmartCardProviderValueGuard, useSmartLinkContext } from '@atlaskit/link-provider';
|
|
5
|
-
import { DatasourceErrorBoundary } from '
|
|
5
|
+
import { DatasourceErrorBoundary } from '../datasourceErrorBoundary';
|
|
6
6
|
import { DatasourceModal } from './index';
|
|
7
7
|
var ModalWithState = function ModalWithState(_ref) {
|
|
8
8
|
var api = _ref.api,
|
|
@@ -14,7 +14,7 @@ import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDT
|
|
|
14
14
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
15
15
|
import { hideLinkToolbar as _hideLinkToolbar, showLinkToolbar } from '../pm-plugins/actions';
|
|
16
16
|
import { changeSelectedCardToLink, updateCard } from '../pm-plugins/doc';
|
|
17
|
-
import { displayInfoForCard, findCardInfo } from '../utils';
|
|
17
|
+
import { displayInfoForCard, findCardInfo } from '../pm-plugins/utils';
|
|
18
18
|
export function HyperlinkAddToolbarWithState(_ref) {
|
|
19
19
|
var _ref$linkPickerOption = _ref.linkPickerOptions,
|
|
20
20
|
linkPickerOptions = _ref$linkPickerOption === void 0 ? {} : _ref$linkPickerOption,
|
|
@@ -14,7 +14,7 @@ import { ArrowKeyNavigationType, DropdownContainer as UiDropdown } from '@atlask
|
|
|
14
14
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
15
15
|
import { ButtonItem } from '@atlaskit/menu';
|
|
16
16
|
import { Flex } from '@atlaskit/primitives';
|
|
17
|
-
import { focusEditorView } from '../../utils';
|
|
17
|
+
import { focusEditorView } from '../../pm-plugins/utils';
|
|
18
18
|
import { editDatasource } from '../editDatasourceAction';
|
|
19
19
|
var dropdownExpandContainer = css({
|
|
20
20
|
margin: "0px ".concat("var(--ds-space-negative-050, -4px)")
|
|
@@ -17,7 +17,7 @@ import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
|
17
17
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
18
18
|
import { ButtonItem } from '@atlaskit/menu';
|
|
19
19
|
import { Flex } from '@atlaskit/primitives';
|
|
20
|
-
import { focusEditorView, isDatasourceConfigEditable } from '../../utils';
|
|
20
|
+
import { focusEditorView, isDatasourceConfigEditable } from '../../pm-plugins/utils';
|
|
21
21
|
import { editDatasource } from '../editDatasourceAction';
|
|
22
22
|
import { useFetchDatasourceDataInfo } from '../useFetchDatasourceDataInfo';
|
|
23
23
|
import { useFetchDatasourceInfo } from '../useFetchDatasourceInfo';
|
|
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { useEffect, useMemo } from 'react';
|
|
9
9
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
10
10
|
import { useDatasourceLifecycleAnalytics } from '@atlaskit/link-analytics';
|
|
11
|
-
import { EVENT, EVENT_SUBJECT } from '
|
|
11
|
+
import { EVENT, EVENT_SUBJECT } from '../analytics/types';
|
|
12
12
|
import { getMethod } from './common';
|
|
13
13
|
function getDatasourceDisplay(datasourceAttrs) {
|
|
14
14
|
var _datasourceAttrs$data;
|
|
@@ -5,8 +5,8 @@ var _excluded = ["node", "nodeContext"],
|
|
|
5
5
|
_excluded3 = ["node", "nodeContext"];
|
|
6
6
|
import { useEffect, useMemo } from 'react';
|
|
7
7
|
import { useSmartLinkLifecycleAnalytics } from '@atlaskit/link-analytics';
|
|
8
|
-
import { EVENT, EVENT_SUBJECT } from '
|
|
9
|
-
import { appearanceForLink, getUrl } from '
|
|
8
|
+
import { EVENT, EVENT_SUBJECT } from '../analytics/types';
|
|
9
|
+
import { appearanceForLink, getUrl } from '../analytics/utils';
|
|
10
10
|
import { getDeleteType, getMethod, getSourceEventFromMetadata, getUpdateType } from './common';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -19,7 +19,7 @@ import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
|
19
19
|
import { DATASOURCE_DEFAULT_LAYOUT } from '@atlaskit/linking-common';
|
|
20
20
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
21
21
|
import { setCardLayout } from '../../pm-plugins/actions';
|
|
22
|
-
import { isDatasourceNode } from '../../utils';
|
|
22
|
+
import { isDatasourceNode } from '../../pm-plugins/utils';
|
|
23
23
|
import { getDatasource, isDatasourceTableLayout } from './utils';
|
|
24
24
|
var toolbarButtonWrapperStyles = css({
|
|
25
25
|
background: "".concat("var(--ds-background-neutral, ".concat(N20A, ")")),
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import { isDatasourceNode } from '../../utils';
|
|
5
|
+
import { isDatasourceNode } from '../../pm-plugins/utils';
|
|
6
6
|
import { DATASOURCE_TABLE_LAYOUTS } from './types';
|
|
7
7
|
export var getDatasource = function getDatasource(editorView) {
|
|
8
8
|
var _editorView$state = editorView.state,
|
|
@@ -16,11 +16,11 @@ import { commandWithMetadata, getButtonGroupOption, LinkToolbarButtonGroup } fro
|
|
|
16
16
|
import nodeNames, { cardMessages as messages } from '@atlaskit/editor-common/messages';
|
|
17
17
|
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
18
18
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
19
|
-
import { LOCAL_STORAGE_DISCOVERY_KEY_TOOLBAR } from '../common/local-storage';
|
|
20
19
|
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
20
|
+
import { getResolvedAttributesFromStore } from '../pm-plugins/utils';
|
|
21
|
+
import { LOCAL_STORAGE_DISCOVERY_KEY_TOOLBAR } from './local-storage';
|
|
23
22
|
import { DiscoveryPulse } from './Pulse';
|
|
23
|
+
import { shouldRenderToolbarPulse } from './toolbar';
|
|
24
24
|
import { WithCardContext } from './WithCardContext';
|
|
25
25
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
26
26
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect } from 'react';
|
|
2
2
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
3
|
import { Pulse } from '@atlaskit/linking-common';
|
|
4
|
-
import { isLocalStorageKeyDiscovered, markLocalStorageKeyDiscovered } from '
|
|
4
|
+
import { isLocalStorageKeyDiscovered, markLocalStorageKeyDiscovered } from '../local-storage';
|
|
5
5
|
export var DiscoveryPulse = function DiscoveryPulse(_ref) {
|
|
6
6
|
var children = _ref.children,
|
|
7
7
|
localStorageKey = _ref.localStorageKey,
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import React, { useEffect } from 'react';
|
|
5
5
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
6
6
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
7
|
-
import { getResolvedAttributesFromStore } from '../utils';
|
|
7
|
+
import { getResolvedAttributesFromStore } from '../pm-plugins/utils';
|
|
8
8
|
import { EditorAnalyticsContext } from './EditorAnalyticsContext';
|
|
9
9
|
/**
|
|
10
10
|
* Handles firing the toolbar viewed event
|
|
@@ -6,8 +6,8 @@ import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
|
6
6
|
import { getLinkMetadataFromTransaction } from '@atlaskit/editor-common/card';
|
|
7
7
|
import { isLinkMark, pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { AddMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
|
|
9
|
-
import { pluginKey } from '
|
|
10
|
-
import { getPluginState } from '
|
|
9
|
+
import { pluginKey } from '../../pm-plugins/plugin-key';
|
|
10
|
+
import { getPluginState } from '../../pm-plugins/util/state';
|
|
11
11
|
import { EVENT, EVENT_SUBJECT } from './types';
|
|
12
12
|
import { appearanceForLink, areSameNodes, findAtPositions, findInNodeRange, getNodeContext, getNodeSubject } from './utils';
|
|
13
13
|
|
|
@@ -11,7 +11,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
13
13
|
import { LazyLoadedDatasourceRenderFailedAnalyticsWrapper } from '@atlaskit/link-datasource';
|
|
14
|
-
import { setSelectedCardAppearance } from '
|
|
14
|
+
import { setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
15
15
|
export var DatasourceErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
16
16
|
_inherits(DatasourceErrorBoundary, _React$Component);
|
|
17
17
|
var _super = _createSuper(DatasourceErrorBoundary);
|
|
@@ -23,15 +23,15 @@ import CogIcon from '@atlaskit/icon/glyph/editor/settings';
|
|
|
23
23
|
import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
24
24
|
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
25
25
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
|
-
import { changeSelectedCardToText } from '
|
|
27
|
-
import { pluginKey } from '
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
26
|
+
import { changeSelectedCardToText } from '../pm-plugins/doc';
|
|
27
|
+
import { pluginKey } from '../pm-plugins/main';
|
|
28
|
+
import { appearanceForNodeType, displayInfoForCard, findCardInfo, isDatasourceNode, titleUrlPairFromNode } from '../pm-plugins/utils';
|
|
29
|
+
import { DatasourceAppearanceButton } from './DatasourceAppearanceButton';
|
|
30
|
+
import { buildEditLinkToolbar, editLinkToolbarConfig, getEditLinkCallback } from './EditLinkToolbar';
|
|
31
|
+
import { EditToolbarButton } from './EditToolbarButton';
|
|
32
|
+
import { HyperlinkToolbarAppearance } from './HyperlinkToolbarAppearance';
|
|
33
|
+
import { LinkToolbarAppearance } from './LinkToolbarAppearance';
|
|
34
|
+
import { ToolbarViewedEvent } from './ToolbarViewedEvent';
|
|
35
35
|
export var removeCard = function removeCard(editorAnalyticsApi) {
|
|
36
36
|
return commandWithMetadata(function (state, dispatch) {
|
|
37
37
|
if (!(state.selection instanceof NodeSelection)) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { cardPlugin } from './
|
|
2
|
-
export type { CardPlugin } from './
|
|
1
|
+
export { cardPlugin } from './cardPlugin';
|
|
2
|
+
export type { CardPlugin } from './cardPluginType';
|
|
3
3
|
export type { Request, CardPluginOptions, CardPluginState } from './types';
|
|
@@ -30,7 +30,7 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
30
30
|
showDatasourceModal: boolean;
|
|
31
31
|
datasourceModalType?: import("@atlaskit/editor-common/types").DatasourceModalType | undefined;
|
|
32
32
|
datasourceTableRef?: HTMLElement | undefined;
|
|
33
|
-
layout?: "
|
|
33
|
+
layout?: "center" | "wide" | "full-width" | undefined;
|
|
34
34
|
inlineCardAwarenessCandidatePosition?: number | undefined;
|
|
35
35
|
overlayCandidatePosition?: number | undefined;
|
|
36
36
|
removeOverlay?: (() => void) | undefined;
|
|
@@ -4,7 +4,7 @@ import type { Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
7
|
-
import type { CardInfo, DatasourceNode } from '
|
|
7
|
+
import type { CardInfo, DatasourceNode } from '../types';
|
|
8
8
|
export declare const appearanceForNodeType: (spec: NodeType) => CardAppearance | undefined;
|
|
9
9
|
export declare const selectedCardAppearance: (state: EditorState) => CardAppearance | undefined;
|
|
10
10
|
export type TitleUrlPair = {
|
|
@@ -7,9 +7,9 @@ import type { DatasourceModalType, EditorAppearance, LinkPickerOptions } from '@
|
|
|
7
7
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { DatasourceAdf, DatasourceAdfView } from '@atlaskit/linking-common';
|
|
9
9
|
import type { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
10
|
-
import type { EditorCardPluginEvents } from '
|
|
11
|
-
import type { CardPluginEvent } from '
|
|
12
|
-
import type { DatasourceTableLayout } from '
|
|
10
|
+
import type { EditorCardPluginEvents } from '../ui/analytics/create-events-queue';
|
|
11
|
+
import type { CardPluginEvent } from '../ui/analytics/types';
|
|
12
|
+
import type { DatasourceTableLayout } from '../ui/LayoutButton/types';
|
|
13
13
|
export type CardType = CardAppearance | 'url' | 'datasource';
|
|
14
14
|
export type DatasourceNode = Omit<Node, 'attrs'> & {
|
|
15
15
|
readonly attrs: DatasourceAdf['attrs'] & Partial<RichMediaAttributes>;
|
|
@@ -4,7 +4,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { ConfigModalProps } from '@atlaskit/link-datasource';
|
|
5
5
|
import type { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common';
|
|
6
6
|
import type { DatasourceParameters } from '@atlaskit/linking-types';
|
|
7
|
-
import type { cardPlugin } from '../../
|
|
7
|
+
import type { cardPlugin } from '../../cardPlugin';
|
|
8
8
|
type ModalWithStateProps = {
|
|
9
9
|
api: ExtractInjectionAPI<typeof cardPlugin> | undefined;
|
|
10
10
|
editorView: EditorView;
|
|
@@ -7,7 +7,7 @@ import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolb
|
|
|
7
7
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
8
8
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
-
import type { cardPlugin } from '../
|
|
10
|
+
import type { cardPlugin } from '../cardPlugin';
|
|
11
11
|
export type EditLinkToolbarProps = {
|
|
12
12
|
view: EditorView;
|
|
13
13
|
providerFactory: ProviderFactory;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { EditorCardPluginEvents } from '
|
|
4
|
-
import type { CardPluginEvent } from '
|
|
3
|
+
import type { EditorCardPluginEvents } from '../analytics/create-events-queue';
|
|
4
|
+
import type { CardPluginEvent } from '../analytics/types';
|
|
5
5
|
export type AnalyticsBindingsProps = {
|
|
6
6
|
editorView: EditorView;
|
|
7
7
|
cardPluginEvents: EditorCardPluginEvents<CardPluginEvent>;
|
|
@@ -5,7 +5,7 @@ import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import { type CardPlugin } from '../
|
|
8
|
+
import { type CardPlugin } from '../cardPluginType';
|
|
9
9
|
export interface HyperlinkToolbarAppearanceProps {
|
|
10
10
|
intl: IntlShape;
|
|
11
11
|
editorState: EditorState;
|
|
@@ -8,4 +8,4 @@ export declare const getDatasource: (editorView: EditorView) => {
|
|
|
8
8
|
node: undefined;
|
|
9
9
|
pos: undefined;
|
|
10
10
|
};
|
|
11
|
-
export declare const isDatasourceTableLayout: (layout: unknown) => layout is "
|
|
11
|
+
export declare const isDatasourceTableLayout: (layout: unknown) => layout is "center" | "wide" | "full-width";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { APIError } from '@atlaskit/smart-card';
|
|
4
|
-
import type { DatasourceProps } from '
|
|
4
|
+
import type { DatasourceProps } from '../nodeviews/datasource';
|
|
5
5
|
export type DatasourceErrorBoundaryProps = React.PropsWithChildren<{
|
|
6
6
|
url?: string;
|
|
7
7
|
unsupportedComponent?: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { CardContext } from '@atlaskit/link-provider';
|
|
3
|
-
import type { cardPlugin } from '../../
|
|
3
|
+
import type { cardPlugin } from '../../cardPlugin';
|
|
4
4
|
export type LinkUpgradeDiscoverabilityProps = {
|
|
5
5
|
url: string;
|
|
6
6
|
linkPosition: number;
|
|
@@ -2,8 +2,8 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
4
|
import type { Command, ExtractInjectionAPI, FloatingToolbarHandler, FloatingToolbarItem, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { cardPlugin } from '../index';
|
|
6
|
+
import type { CardPluginOptions } from '../types';
|
|
7
7
|
export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
8
8
|
export declare const visitCardLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
9
9
|
export declare const openLinkSettings: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { cardPlugin } from './
|
|
2
|
-
export type { CardPlugin } from './
|
|
1
|
+
export { cardPlugin } from './cardPlugin';
|
|
2
|
+
export type { CardPlugin } from './cardPluginType';
|
|
3
3
|
export type { Request, CardPluginOptions, CardPluginState } from './types';
|