@atlaskit/editor-common 80.5.2 → 81.0.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 +15 -0
- package/afm-cc/tsconfig.json +0 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/avatar.d.ts +2 -2
- package/dist/types/analytics/types/config-panel-events.d.ts +2 -2
- package/dist/types/analytics/types/date-events.d.ts +2 -2
- package/dist/types/analytics/types/dispatch-analytics-event.d.ts +1 -1
- package/dist/types/analytics/types/experimental-events.d.ts +2 -2
- package/dist/types/card/link-toolbar-button-group-options.d.ts +1 -1
- package/dist/types/extensions/extension-fields-helpers.d.ts +2 -2
- package/dist/types/extensions/types/extension-manifest-common.d.ts +1 -1
- package/dist/types/extensions/types/extension-provider.d.ts +2 -2
- package/dist/types/link/LinkPicker/EditorLinkPicker/index.d.ts +2 -2
- package/dist/types/link/LinkSearch/index.d.ts +2 -2
- package/dist/types/link/LinkSearch/transformTimeStamp.d.ts +1 -1
- package/dist/types/link/LinkSearch/types.d.ts +3 -3
- package/dist/types/link/LinkSearch/withActivityProvider.d.ts +2 -2
- package/dist/types/link/types.d.ts +2 -2
- package/dist/types/provider-factory/context.d.ts +1 -1
- package/dist/types/provider-factory/profile-card-provider.d.ts +1 -1
- package/dist/types/provider-factory/provider-factory.d.ts +1 -1
- package/dist/types/provider-factory/with-providers.d.ts +3 -3
- package/dist/types/transforms/layout.d.ts +1 -1
- package/dist/types/types/copy-button.d.ts +1 -1
- package/dist/types/types/resizable-media-single.d.ts +1 -1
- package/dist/types/types/type-ahead.d.ts +1 -1
- package/dist/types/ufo/experience-store.d.ts +1 -1
- package/dist/types/ui/EventHandlers/index.d.ts +1 -1
- package/dist/types/ui/Layer/index.d.ts +2 -2
- package/dist/types/ui/Mention/index.d.ts +2 -2
- package/dist/types/ui/Mention/types.d.ts +1 -1
- package/dist/types/ui/ResizerLegacy/styled.d.ts +1 -1
- package/dist/types/ui/ResizerLegacy/types.d.ts +3 -3
- package/dist/types/ui/WithCreateAnalyticsEvent/index.d.ts +1 -1
- package/dist/types/ui/unsupported-content-helper.d.ts +2 -2
- package/dist/types/ui-color/ColorPalette/Palettes/borderColorPalette.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/getColorMessage.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/panelBackgroundPalette.d.ts +1 -1
- package/dist/types/ui-color/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types/ui-menu/ToolbarButton/styles.d.ts +1 -1
- package/dist/types/ui-react/ReactEditorViewContext.d.ts +1 -1
- package/dist/types/utils/analytics.d.ts +1 -1
- package/dist/types/utils/commands.d.ts +3 -3
- package/dist/types/utils/compareNodes.d.ts +2 -2
- package/dist/types/utils/get-performance-options.d.ts +1 -1
- package/dist/types/utils/imageLoader.d.ts +1 -1
- package/dist/types/utils/macro.d.ts +1 -1
- package/dist/types/utils/performance/hooks/use-component-render-tracking/index.d.ts +1 -1
- package/dist/types/utils/plugin-state-factory.d.ts +2 -2
- package/dist/types/utils/slice.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/avatar.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/config-panel-events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/date-events.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/dispatch-analytics-event.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/experimental-events.d.ts +2 -2
- package/dist/types-ts4.5/card/link-toolbar-button-group-options.d.ts +1 -1
- package/dist/types-ts4.5/extensions/extension-fields-helpers.d.ts +2 -2
- package/dist/types-ts4.5/extensions/types/extension-manifest-common.d.ts +1 -1
- package/dist/types-ts4.5/extensions/types/extension-provider.d.ts +2 -2
- package/dist/types-ts4.5/link/LinkPicker/EditorLinkPicker/index.d.ts +2 -2
- package/dist/types-ts4.5/link/LinkSearch/index.d.ts +2 -2
- package/dist/types-ts4.5/link/LinkSearch/transformTimeStamp.d.ts +1 -1
- package/dist/types-ts4.5/link/LinkSearch/types.d.ts +3 -3
- package/dist/types-ts4.5/link/LinkSearch/withActivityProvider.d.ts +2 -2
- package/dist/types-ts4.5/link/types.d.ts +2 -2
- package/dist/types-ts4.5/provider-factory/context.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/profile-card-provider.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/provider-factory.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/with-providers.d.ts +3 -3
- package/dist/types-ts4.5/transforms/layout.d.ts +1 -1
- package/dist/types-ts4.5/types/copy-button.d.ts +1 -1
- package/dist/types-ts4.5/types/resizable-media-single.d.ts +1 -1
- package/dist/types-ts4.5/types/type-ahead.d.ts +1 -1
- package/dist/types-ts4.5/ufo/experience-store.d.ts +1 -1
- package/dist/types-ts4.5/ui/EventHandlers/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Layer/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/Mention/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/Mention/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/ResizerLegacy/styled.d.ts +1 -1
- package/dist/types-ts4.5/ui/ResizerLegacy/types.d.ts +3 -3
- package/dist/types-ts4.5/ui/WithCreateAnalyticsEvent/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/unsupported-content-helper.d.ts +2 -2
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/borderColorPalette.d.ts +1 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +1 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/getColorMessage.d.ts +1 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/panelBackgroundPalette.d.ts +1 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types-ts4.5/ui-menu/ToolbarButton/styles.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/ReactEditorViewContext.d.ts +1 -1
- package/dist/types-ts4.5/utils/analytics.d.ts +1 -1
- package/dist/types-ts4.5/utils/commands.d.ts +3 -3
- package/dist/types-ts4.5/utils/compareNodes.d.ts +2 -2
- package/dist/types-ts4.5/utils/get-performance-options.d.ts +1 -1
- package/dist/types-ts4.5/utils/imageLoader.d.ts +1 -1
- package/dist/types-ts4.5/utils/macro.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/hooks/use-component-render-tracking/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/plugin-state-factory.d.ts +2 -2
- package/dist/types-ts4.5/utils/slice.d.ts +1 -1
- package/package.json +3 -5
- package/tsconfig.json +0 -1
- package/dist/cjs/__tests_external__/cases/fundamentals/collection.js +0 -15
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -20
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -28
- package/dist/cjs/__tests_external__/cases/smart-links/index.js +0 -33
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -35
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -65
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -16
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -34
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -35
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -65
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -16
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -34
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -34
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -63
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -17
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -33
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -36
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/types.js +0 -5
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -14
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -31
- package/dist/cjs/__tests_external__/cases/types.js +0 -5
- package/dist/cjs/__tests_external__/index.js +0 -44
- package/dist/cjs/__tests_external__/page-objects/Editor.js +0 -47
- package/dist/cjs/__tests_external__/page-objects/EditorSmartLink.js +0 -208
- package/dist/cjs/__tests_external__/page-objects/Renderer.js +0 -35
- package/dist/cjs/in-product.js +0 -42
- package/dist/es2019/__tests_external__/cases/fundamentals/collection.js +0 -7
- package/dist/es2019/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -12
- package/dist/es2019/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -22
- package/dist/es2019/__tests_external__/cases/smart-links/index.js +0 -4
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -28
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -57
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -8
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -27
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -28
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -57
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -8
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -27
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -27
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -55
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -9
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -26
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -29
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/types.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -6
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -24
- package/dist/es2019/__tests_external__/cases/types.js +0 -1
- package/dist/es2019/__tests_external__/index.js +0 -3
- package/dist/es2019/__tests_external__/page-objects/Editor.js +0 -19
- package/dist/es2019/__tests_external__/page-objects/EditorSmartLink.js +0 -143
- package/dist/es2019/__tests_external__/page-objects/Renderer.js +0 -9
- package/dist/es2019/in-product.js +0 -1
- package/dist/esm/__tests_external__/cases/fundamentals/collection.js +0 -9
- package/dist/esm/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -14
- package/dist/esm/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -22
- package/dist/esm/__tests_external__/cases/smart-links/index.js +0 -4
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -29
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -59
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -10
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -28
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -29
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -59
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -10
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -28
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -28
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -57
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -11
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -27
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -30
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/types.js +0 -1
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -8
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -25
- package/dist/esm/__tests_external__/cases/types.js +0 -1
- package/dist/esm/__tests_external__/index.js +0 -3
- package/dist/esm/__tests_external__/page-objects/Editor.js +0 -40
- package/dist/esm/__tests_external__/page-objects/EditorSmartLink.js +0 -201
- package/dist/esm/__tests_external__/page-objects/Renderer.js +0 -28
- package/dist/esm/in-product.js +0 -1
- package/dist/types/__tests_external__/cases/fundamentals/collection.d.ts +0 -3
- package/dist/types/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +0 -3
- package/dist/types/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/index.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/block/delete.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/block/edit.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/block/index.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/block/insert.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/embed/delete.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/embed/edit.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/embed/index.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/embed/insert.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/delete.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/edit.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/index.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/insert.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/inline/unlink.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/types.d.ts +0 -4
- package/dist/types/__tests_external__/cases/smart-links/test-cases/url/index.d.ts +0 -3
- package/dist/types/__tests_external__/cases/smart-links/test-cases/url/insert.d.ts +0 -3
- package/dist/types/__tests_external__/cases/types.d.ts +0 -7
- package/dist/types/__tests_external__/index.d.ts +0 -3
- package/dist/types/__tests_external__/page-objects/Editor.d.ts +0 -11
- package/dist/types/__tests_external__/page-objects/EditorSmartLink.d.ts +0 -43
- package/dist/types/__tests_external__/page-objects/Renderer.d.ts +0 -8
- package/dist/types/in-product.d.ts +0 -1
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/collection.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/index.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/delete.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/edit.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/insert.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/delete.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/edit.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/insert.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/delete.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/edit.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/insert.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/unlink.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/types.d.ts +0 -4
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/url/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/url/insert.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/cases/types.d.ts +0 -7
- package/dist/types-ts4.5/__tests_external__/index.d.ts +0 -3
- package/dist/types-ts4.5/__tests_external__/page-objects/Editor.d.ts +0 -9
- package/dist/types-ts4.5/__tests_external__/page-objects/EditorSmartLink.d.ts +0 -41
- package/dist/types-ts4.5/__tests_external__/page-objects/Renderer.d.ts +0 -6
- package/dist/types-ts4.5/in-product.d.ts +0 -1
- package/in-product/package.json +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { KeyboardEvent } from 'react';
|
|
2
|
-
import { ActivityItem, ActivityProvider } from '@atlaskit/activity-provider';
|
|
3
|
-
import { INPUT_METHOD } from '../../analytics';
|
|
1
|
+
import { type KeyboardEvent } from 'react';
|
|
2
|
+
import { type ActivityItem, type ActivityProvider } from '@atlaskit/activity-provider';
|
|
3
|
+
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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ActivityProvider } from '@atlaskit/activity-provider';
|
|
3
|
-
import { ProviderFactory } from '../../provider-factory';
|
|
2
|
+
import { type ActivityProvider } from '@atlaskit/activity-provider';
|
|
3
|
+
import { type ProviderFactory } from '../../provider-factory';
|
|
4
4
|
import type { Providers } from '../../provider-factory';
|
|
5
5
|
import type { Diff } from '../../utils';
|
|
6
6
|
export interface ExpandedActivityProviderProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { INPUT_METHOD } from '../analytics';
|
|
1
|
+
import { type Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { type INPUT_METHOD } from '../analytics';
|
|
3
3
|
import type { EditorAppearance } from '../types';
|
|
4
4
|
export declare enum LinkAction {
|
|
5
5
|
SHOW_INSERT_TOOLBAR = "SHOW_INSERT_TOOLBAR",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ProviderFactory from './provider-factory';
|
|
3
|
-
import { ProviderType } from './types';
|
|
3
|
+
import { type ProviderType } from './types';
|
|
4
4
|
export declare const ProviderFactoryProvider: React.Provider<ProviderFactory>;
|
|
5
5
|
export declare const useProviderFactory: () => ProviderFactory;
|
|
6
6
|
export declare const useProvider: <T extends string>(name: T) => ProviderType<T> | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PureComponent, ReactNode } from 'react';
|
|
2
|
-
import ProviderFactory from './provider-factory';
|
|
3
|
-
import { ProviderName, Providers } from './types';
|
|
1
|
+
import { PureComponent, type ReactNode } from 'react';
|
|
2
|
+
import type ProviderFactory from './provider-factory';
|
|
3
|
+
import { type ProviderName, type Providers } from './types';
|
|
4
4
|
export interface Props {
|
|
5
5
|
providerFactory: ProviderFactory;
|
|
6
6
|
providers: ProviderName[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, Node, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import { Fragment, type Node, type Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare function unwrapContentFromLayout(maybeLayoutSection: Node): Node | Node[];
|
|
3
3
|
export declare function removeLayoutFromFirstChild(node: Node, i: number): Node | Node[];
|
|
4
4
|
export declare function removeLayoutFromLastChild(node: Node, i: number, fragment: Fragment): Node | Node[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { MarkType, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { Command } from './command';
|
|
4
|
+
import { type Command } from './command';
|
|
5
5
|
export type MarkOptions = {
|
|
6
6
|
state: EditorState;
|
|
7
7
|
formatMessage: IntlShape['formatMessage'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { type Fragment, type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { TypeAheadPayload } from '../analytics/types/type-ahead';
|
|
5
5
|
import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
1
|
+
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import { UFOExperience } from '@atlaskit/ufo';
|
|
3
3
|
import type { CustomData, ExperienceConfig } from '@atlaskit/ufo/types';
|
|
4
4
|
export declare const experienceConfig: ExperienceConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import { ProviderFactory } from '../../provider-factory';
|
|
3
|
-
import { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
|
|
4
|
-
import { MentionEventHandlers } from '../EventHandlers';
|
|
3
|
+
import { type ProfilecardProvider } from '../../provider-factory/profile-card-provider';
|
|
4
|
+
import { type MentionEventHandlers } from '../EventHandlers';
|
|
5
5
|
export interface MentionProps {
|
|
6
6
|
id: string;
|
|
7
7
|
providers?: ProviderFactory;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ProfileCardAction } from '@atlaskit/profilecard';
|
|
1
|
+
import { type ProfileCardAction } from '@atlaskit/profilecard';
|
|
2
2
|
export type { ProfileCardAction };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MediaSingleWrapperProps as MediaSingleDimensionHelperProps } from '../MediaSingle/styled';
|
|
1
|
+
import { type MediaSingleWrapperProps as MediaSingleDimensionHelperProps } from '../MediaSingle/styled';
|
|
2
2
|
export declare const wrapperStyle: (props: MediaSingleDimensionHelperProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
1
|
+
import { type RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import { type MediaClientConfig } from '@atlaskit/media-core';
|
|
4
4
|
import type { DispatchAnalyticsEvent } from '../../analytics';
|
|
5
5
|
import type { getPosHandler } from '../../react-node-view';
|
|
6
6
|
import type { GridType } from '../../types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
+
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
export type Props = {
|
|
4
4
|
render: (createAnalyticsEvent?: CreateUIAnalyticsEvent) => React.ReactNode;
|
|
5
5
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IntlShape } from 'react-intl-next';
|
|
2
|
-
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
export declare function getUnsupportedContent(message: any, prefix: string, node?: PMNode, intl?: IntlShape): any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MessageDescriptor } from 'react-intl-next';
|
|
1
|
+
import { type MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export default function getColorMessage(messages: Record<string | number, MessageDescriptor>, color: string): MessageDescriptor | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PaletteColor } from './type';
|
|
1
|
+
import { type PaletteColor } from './type';
|
|
2
2
|
/** this is not new usage - old code extracted from editor-core */
|
|
3
3
|
export declare const panelBackgroundPalette: PaletteColor[];
|
|
4
4
|
export declare const panelDarkModeBackgroundPalette: PaletteColor[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ButtonProps } from '@atlaskit/button/standard-button';
|
|
2
|
+
import { type ButtonProps } from '@atlaskit/button/standard-button';
|
|
3
3
|
declare const _default: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
+
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
type ReactEditorViewContextProps = {
|
|
4
4
|
editorView?: EditorView;
|
|
5
5
|
editorRef?: React.RefObject<HTMLDivElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EDITOR_APPEARANCE_CONTEXT } from '@atlaskit/analytics-namespaced-context';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics';
|
|
2
|
+
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID, type EVENT_TYPE } from '../analytics';
|
|
3
3
|
export declare const getAnalyticsAppearance: (appearance?: string) => EDITOR_APPEARANCE_CONTEXT | undefined;
|
|
4
4
|
export declare const getAnalyticsEditorAppearance: (editorAppearance?: string) => string;
|
|
5
5
|
export declare const getAnalyticsEventSeverity: (duration: number, normalThreshold: number, degradedThreshold: number) => SEVERITY;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Fragment, Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { EditorAnalyticsAPI } from '../analytics';
|
|
1
|
+
import { Fragment, type Node as PMNode, type ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { type EditorState, type Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import { type EditorAnalyticsAPI } from '../analytics';
|
|
4
4
|
import type { Command, Predicate } from '../types';
|
|
5
5
|
export type WalkNode = {
|
|
6
6
|
$pos: ResolvedPos;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CardAttributes } from '@atlaskit/adf-schema';
|
|
2
|
-
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import { type CardAttributes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { SortOrder } from '../types';
|
|
4
4
|
export declare enum ContentType {
|
|
5
5
|
NUMBER = 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
import { AnalyticsEventPayload } from '../analytics';
|
|
2
|
+
import { type AnalyticsEventPayload } from '../analytics';
|
|
3
3
|
export declare function getPerformanceOptions(view: EditorView): {
|
|
4
4
|
trackingEnabled: boolean;
|
|
5
5
|
samplingRate: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsDifference, ShallowPropsDifference } from '../../../compare-props';
|
|
1
|
+
import { type PropsDifference, type ShallowPropsDifference } from '../../../compare-props';
|
|
2
2
|
type PropsDiff<Props> = ShallowPropsDifference<Props> | PropsDifference<Props>;
|
|
3
3
|
type OnRenderCb<Props = undefined> = ({ renderCount, propsDifference, }: {
|
|
4
4
|
renderCount: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EditorState, PluginKey, ReadonlyTransaction, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { Dispatch } from '../event-dispatcher';
|
|
3
|
-
import { Command } from '../types';
|
|
2
|
+
import { type Dispatch } from '../event-dispatcher';
|
|
3
|
+
import { type Command } from '../types';
|
|
4
4
|
export type Reducer<PluginState, Action> = (state: PluginState, action: Action) => PluginState;
|
|
5
5
|
type MapState<PluginState> = (tr: ReadonlyTransaction, pluginState: PluginState, editorState: EditorState) => PluginState;
|
|
6
6
|
type SafePlugin<PluginState, Action, InitialState extends PluginState> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "81.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,7 +38,6 @@
|
|
|
38
38
|
"./provider-factory": "./src/provider-factory.ts",
|
|
39
39
|
"./styles": "./src/styles/index.ts",
|
|
40
40
|
"./validator": "./src/validator.ts",
|
|
41
|
-
"./in-product": "./src/in-product.ts",
|
|
42
41
|
"./type-ahead": "./src/type-ahead/index.ts",
|
|
43
42
|
"./ufo": "./src/ufo/index.ts",
|
|
44
43
|
"./insert": "./src/insert/index.ts",
|
|
@@ -97,7 +96,7 @@
|
|
|
97
96
|
},
|
|
98
97
|
"dependencies": {
|
|
99
98
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
100
|
-
"@atlaskit/adf-schema": "^36.
|
|
99
|
+
"@atlaskit/adf-schema": "^36.10.7",
|
|
101
100
|
"@atlaskit/adf-utils": "^19.2.0",
|
|
102
101
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
103
102
|
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
@@ -115,7 +114,6 @@
|
|
|
115
114
|
"@atlaskit/emoji": "^67.6.0",
|
|
116
115
|
"@atlaskit/icon": "^22.3.0",
|
|
117
116
|
"@atlaskit/icon-object": "^6.4.0",
|
|
118
|
-
"@atlaskit/in-product-testing": "^0.2.0",
|
|
119
117
|
"@atlaskit/link-datasource": "^2.3.0",
|
|
120
118
|
"@atlaskit/link-picker": "^1.36.0",
|
|
121
119
|
"@atlaskit/media-card": "^77.11.0",
|
|
@@ -132,7 +130,7 @@
|
|
|
132
130
|
"@atlaskit/primitives": "^6.3.0",
|
|
133
131
|
"@atlaskit/profilecard": "^19.13.0",
|
|
134
132
|
"@atlaskit/section-message": "^6.5.0",
|
|
135
|
-
"@atlaskit/smart-card": "^
|
|
133
|
+
"@atlaskit/smart-card": "^27.0.0",
|
|
136
134
|
"@atlaskit/smart-user-picker": "^6.9.0",
|
|
137
135
|
"@atlaskit/spinner": "^16.1.0",
|
|
138
136
|
"@atlaskit/task-decision": "^17.10.0",
|
package/tsconfig.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.fundamentalsTestCollection = void 0;
|
|
7
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
8
|
-
var _editorIsPresent = require("./test-cases/editor-is-present");
|
|
9
|
-
var _editorTyping = require("./test-cases/editor-typing");
|
|
10
|
-
var fundamentalsTestCollection = exports.fundamentalsTestCollection = function fundamentalsTestCollection(opts) {
|
|
11
|
-
return new _inProductTesting.InProductTestCollection({
|
|
12
|
-
title: '@atlaskit/editor-core -> Editor fundamentals happy path tests',
|
|
13
|
-
testCases: [(0, _editorIsPresent.editorIsPresentTestCase)(opts), (0, _editorTyping.editorTypingTestCase)(opts)]
|
|
14
|
-
});
|
|
15
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.editorIsPresentTestCase = void 0;
|
|
7
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
8
|
-
var _Editor = require("../../../page-objects/Editor");
|
|
9
|
-
var editorIsPresentTestCase = exports.editorIsPresentTestCase = function editorIsPresentTestCase(testOptions) {
|
|
10
|
-
return new _inProductTesting.InProductTestCase({
|
|
11
|
-
testOptions: testOptions,
|
|
12
|
-
title: 'content-area, title of Editor are visible',
|
|
13
|
-
id: 'editor-is-present',
|
|
14
|
-
assertions: function assertions(cy) {
|
|
15
|
-
var editor = new _Editor.EditorPageObject(cy);
|
|
16
|
-
editor.getTitleArea().should('be.visible');
|
|
17
|
-
editor.getEditorArea().should('be.visible');
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.editorTypingTestCase = void 0;
|
|
7
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
8
|
-
var _Editor = require("../../../page-objects/Editor");
|
|
9
|
-
var _Renderer = require("../../../page-objects/Renderer");
|
|
10
|
-
var editorTypingTestCase = exports.editorTypingTestCase = function editorTypingTestCase(opts) {
|
|
11
|
-
return new _inProductTesting.InProductTestCase({
|
|
12
|
-
title: 'typing in Editor works',
|
|
13
|
-
id: 'editor-typing',
|
|
14
|
-
assertions: function assertions(cy) {
|
|
15
|
-
var _opts$ui;
|
|
16
|
-
var editor = new _Editor.EditorPageObject(cy);
|
|
17
|
-
editor.getEditorArea().type('abcdef');
|
|
18
|
-
editor.getEditorArea().contains('abcdef');
|
|
19
|
-
if (!opts || !((_opts$ui = opts.ui) !== null && _opts$ui !== void 0 && _opts$ui.publishButton)) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
var publishButton = opts.ui.publishButton;
|
|
23
|
-
var renderer = new _Renderer.RendererPageObject(cy);
|
|
24
|
-
cy.get(publishButton).click();
|
|
25
|
-
renderer.getContent().contains('abcdef');
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "blockSmartLinksTestCollection", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _block.blockSmartLinksTestCollection;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "blueLinksTestCollection", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _url.blueLinksTestCollection;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "embedSmartLinksTestCollection", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _embed.embedSmartLinksTestCollection;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "inlineSmartLinksTestCollection", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _inline.inlineSmartLinksTestCollection;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
var _inline = require("./test-cases/inline");
|
|
31
|
-
var _block = require("./test-cases/block");
|
|
32
|
-
var _embed = require("./test-cases/embed");
|
|
33
|
-
var _url = require("./test-cases/url");
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.deleteBlockSmartLinkTestCase = void 0;
|
|
7
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
8
|
-
var _inProduct = require("@atlaskit/smart-card/in-product");
|
|
9
|
-
var _Editor = require("../../../../page-objects/Editor");
|
|
10
|
-
var _EditorSmartLink = require("../../../../page-objects/EditorSmartLink");
|
|
11
|
-
var deleteBlockSmartLinkTestCase = exports.deleteBlockSmartLinkTestCase = function deleteBlockSmartLinkTestCase(_ref) {
|
|
12
|
-
var ui = _ref.ui,
|
|
13
|
-
url = _ref.url;
|
|
14
|
-
return new _inProductTesting.InProductTestCase({
|
|
15
|
-
title: 'able to delete a Block Smart Link using floating toolbar',
|
|
16
|
-
id: 'delete-block-smart-link',
|
|
17
|
-
assertions: function assertions(cy) {
|
|
18
|
-
var editor = new _Editor.EditorPageObject(cy);
|
|
19
|
-
var editorWithSmartLinks = new _EditorSmartLink.EditorSmartLinkPageObject(cy, editor);
|
|
20
|
-
var blockCard = new _inProduct.BlockCardPageObject(cy);
|
|
21
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
22
|
-
editorWithSmartLinks.switchAfterInsert('block');
|
|
23
|
-
(0, _inProduct.blockSmartLinkRendersTestCase)({
|
|
24
|
-
url: url
|
|
25
|
-
}).assertions(cy);
|
|
26
|
-
editorWithSmartLinks.deleteSmartLink('block');
|
|
27
|
-
blockCard.expectCardNotExists();
|
|
28
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
29
|
-
var renderer = editor.publish(ui);
|
|
30
|
-
renderer.expectContentReady();
|
|
31
|
-
blockCard.expectCardNotExists();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.editBlockSmartLinkUrlTestCase = exports.editBlockSmartLinkTitleTestCase = void 0;
|
|
7
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
8
|
-
var _inProduct = require("@atlaskit/smart-card/in-product");
|
|
9
|
-
var _Editor = require("../../../../page-objects/Editor");
|
|
10
|
-
var _EditorSmartLink = require("../../../../page-objects/EditorSmartLink");
|
|
11
|
-
var editBlockSmartLinkTitleTestCase = exports.editBlockSmartLinkTitleTestCase = function editBlockSmartLinkTitleTestCase(_ref) {
|
|
12
|
-
var ui = _ref.ui,
|
|
13
|
-
url = _ref.url;
|
|
14
|
-
return new _inProductTesting.InProductTestCase({
|
|
15
|
-
title: 'editing a Block Smart Link renders as Blue Link (title)',
|
|
16
|
-
id: 'block-smart-link-edit-title',
|
|
17
|
-
assertions: function assertions(cy) {
|
|
18
|
-
var editor = new _Editor.EditorPageObject(cy);
|
|
19
|
-
var editorWithSmartLinks = new _EditorSmartLink.EditorSmartLinkPageObject(cy, editor);
|
|
20
|
-
var blockCard = new _inProduct.BlockCardPageObject(cy);
|
|
21
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
22
|
-
editorWithSmartLinks.switchAfterInsert('block');
|
|
23
|
-
(0, _inProduct.blockSmartLinkRendersTestCase)({
|
|
24
|
-
url: url
|
|
25
|
-
}).assertions(cy);
|
|
26
|
-
editorWithSmartLinks.changeLinkLabel('Avocorne is watching you 🥑', 'block');
|
|
27
|
-
blockCard.assertHrefRendered(url);
|
|
28
|
-
blockCard.expectCardNotExists();
|
|
29
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
30
|
-
var renderer = editor.publish(ui);
|
|
31
|
-
renderer.expectContentReady();
|
|
32
|
-
blockCard.assertHrefRendered(url);
|
|
33
|
-
blockCard.expectCardNotExists();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
var editBlockSmartLinkUrlTestCase = exports.editBlockSmartLinkUrlTestCase = function editBlockSmartLinkUrlTestCase(_ref2) {
|
|
39
|
-
var ui = _ref2.ui,
|
|
40
|
-
url = _ref2.url;
|
|
41
|
-
return new _inProductTesting.InProductTestCase({
|
|
42
|
-
title: 'editing a Block Smart Link renders as Blue Link (URL)',
|
|
43
|
-
id: 'block-smart-link-edit',
|
|
44
|
-
assertions: function assertions(cy) {
|
|
45
|
-
var editor = new _Editor.EditorPageObject(cy);
|
|
46
|
-
var editorWithSmartLinks = new _EditorSmartLink.EditorSmartLinkPageObject(cy, editor);
|
|
47
|
-
var blockCard = new _inProduct.BlockCardPageObject(cy);
|
|
48
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
49
|
-
editorWithSmartLinks.switchAfterInsert('block');
|
|
50
|
-
(0, _inProduct.blockSmartLinkRendersTestCase)({
|
|
51
|
-
url: url
|
|
52
|
-
}).assertions(cy);
|
|
53
|
-
var newUrl = 'https://avo.corne.com';
|
|
54
|
-
editorWithSmartLinks.changeLinkUrl(newUrl, 'block');
|
|
55
|
-
blockCard.expectCardNotExists();
|
|
56
|
-
blockCard.assertHrefRendered(newUrl);
|
|
57
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
58
|
-
var renderer = editor.publish(ui);
|
|
59
|
-
renderer.expectContentReady();
|
|
60
|
-
blockCard.assertHrefRendered(newUrl);
|
|
61
|
-
blockCard.expectCardNotExists();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.blockSmartLinksTestCollection = void 0;
|
|
7
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
8
|
-
var _delete = require("./delete");
|
|
9
|
-
var _edit = require("./edit");
|
|
10
|
-
var _insert = require("./insert");
|
|
11
|
-
var blockSmartLinksTestCollection = exports.blockSmartLinksTestCollection = function blockSmartLinksTestCollection(opts) {
|
|
12
|
-
return new _inProductTesting.InProductTestCollection({
|
|
13
|
-
title: '@atlaskit/editor-core -> Block Smart Links, happy paths',
|
|
14
|
-
testCases: [(0, _insert.switchToBlockSmartLinkTestCase)(opts), (0, _edit.editBlockSmartLinkTitleTestCase)(opts), (0, _edit.editBlockSmartLinkUrlTestCase)(opts), (0, _delete.deleteBlockSmartLinkTestCase)(opts)]
|
|
15
|
-
});
|
|
16
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.switchToBlockSmartLinkTestCase = void 0;
|
|
7
|
-
var _inProductTesting = require("@atlaskit/in-product-testing");
|
|
8
|
-
var _inProduct = require("@atlaskit/smart-card/in-product");
|
|
9
|
-
var _Editor = require("../../../../page-objects/Editor");
|
|
10
|
-
var _EditorSmartLink = require("../../../../page-objects/EditorSmartLink");
|
|
11
|
-
var switchToBlockSmartLinkTestCase = exports.switchToBlockSmartLinkTestCase = function switchToBlockSmartLinkTestCase(_ref) {
|
|
12
|
-
var ui = _ref.ui,
|
|
13
|
-
url = _ref.url;
|
|
14
|
-
return new _inProductTesting.InProductTestCase({
|
|
15
|
-
title: 'switching to a Block Smart Link works',
|
|
16
|
-
id: 'switch-to-block',
|
|
17
|
-
assertions: function assertions(cy) {
|
|
18
|
-
var editor = new _Editor.EditorPageObject(cy);
|
|
19
|
-
var editorWithSmartLinks = new _EditorSmartLink.EditorSmartLinkPageObject(cy, editor);
|
|
20
|
-
editorWithSmartLinks.insertSmartLinkByTyping(url);
|
|
21
|
-
editorWithSmartLinks.switchAfterInsert('block');
|
|
22
|
-
(0, _inProduct.blockSmartLinkRendersTestCase)({
|
|
23
|
-
url: url
|
|
24
|
-
}).assertions(cy);
|
|
25
|
-
if (ui !== null && ui !== void 0 && ui.publishButton) {
|
|
26
|
-
var renderer = editor.publish(ui);
|
|
27
|
-
renderer.expectContentReady();
|
|
28
|
-
(0, _inProduct.blockSmartLinkRendersTestCase)({
|
|
29
|
-
url: url
|
|
30
|
-
}).assertions(cy);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
};
|