Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@kalamazoo/editor-test-helpers

atlassian6Apache-2.01.0.0TypeScript support: included

Test Helpers for Atlassian Editor components

readme

changelog

@kalamazoo/editor-test-helpers

10.3.2

Patch Changes

10.3.1

Patch Changes

10.3.0

Minor Changes

  • [minor]10425b84b4:

    Add support to extensions v2 (using manifests and extension providers)

  • [minor]926798632e:

    ED-7962: Build ADF node from actions - remove "insert" from node

Patch Changes

10.2.0

Minor Changes

  • [minor]f1a06fc2fd:

    ED-7876 Implement expand and nestedExpand in Editor and Renderer

    A work in progress implementation of the new expand and nestedExpand nodes. These are currently disabled by default, but can be tested by enabling an editor prop.

    UNSAFE_allowExpand={true}

    Note, expand and nestedExpand are only in the stage-0 ADF schema (as of this changeset).

  • [minor]1377a45225:

    ED-7492 add support to indent actions

    This version adds support for indenting actions using the keyboard shortcuts Tab and Shift-Tab. You can also unindent items by backspacing them at the start, or deleting forwards within the task.

    There is no new behaviour if the feature flag (allowNestedTasks) is turned off.

  • Updated dependencies 70e1055b8f:

10.1.3

10.1.2

Patch Changes

  • [patch]cc28419139:

    Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.- [patch]ae4f336a3a:

FABDODGEM-13 Editor Damask Release - Internal post

BREAKING CHANGES


Affected Editor Components:

tables, media, mobile, emoji, tasks & decisions, analytics

Editor

Mobile

Media

i18n-tools

Bumped dependencies.

10.1.1

Patch Changes

  • [patch]a2d0043716:

    Updated version of analytics-next to fix potential incompatibilities with TS 3.6

10.1.0

Minor Changes

  • [minor]79c69ed5cd:

    ED-7449 Implement sorting inline cards inside tables base on resolved title

10.0.0

Major Changes

  • [major]80adfefba2:

    Remove applicationCard node and action mark

Minor Changes

  • [minor]5276c19a41:

    ED-5996: support viewing inline comments within editor

    You can do this with the annotationProvider prop. Passing a truthy value to this (e.g. the empty object {}) will:

    • enable support for working with the annotation ADF mark
    • will render highlights around any annotations, and
    • allow copying and pasting of annotations within the same document, or between documents

    You can also optionally pass a React component to the component, so you can render custom components on top of or around the editor when the user's text cursor is inside an annotation.

    Please see the package documentation for more information.

    There is an example component called ExampleInlineCommentComponent within the @kalamazoo/editor-test-helpers package. It is currently featured in the full page examples on the Atlaskit website.

    Annotations are styled within the editor using the fabric-editor-annotation CSS class.

    Other changes:

    • Popup now supports an optional rect parameter to direct placement, rather than calculating the bounding client rect around a DOM node.

Patch Changes

9.11.14

Patch Changes

  • [patch]2b158873d1:

    Add linting rule to prevent unsafe usage of setTimeout within React components.

9.11.13

9.11.12

Patch Changes

  • [patch]a05133283c:

    Add missing dependency in package.json

9.11.11

Patch Changes

  • [patch]097b696613:

    Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports

9.11.10

Patch Changes

  • [patch]0d7d459f1a:

    Fixes type errors which were incompatible with TS 3.6

9.11.9

Patch Changes

9.11.8

Patch Changes

  • [patch]a82d6088e2:

    ED-4807 Use right cell type when spliting merged header cells

9.11.7

Patch Changes

  • [patch]926b43142b:

    Analytics-next has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No behavioural changes.

    Breaking changes

    • withAnalyticsForSumTypeProps alias has been removed, please use withAnalyticsEvents
    • AnalyticsContextWrappedComp alias has been removed, please use withAnalyticsContext

    Breaking changes to TypeScript annotations

    • withAnalyticsEvents now infers proptypes automatically, consumers no longer need to provide props as a generic type.
    • withAnalyticsContext now infers proptypes automatically, consumers no longer need to provide props as a generic type.
    • Type WithAnalyticsEventProps has been renamed to WithAnalyticsEventsProps to match source code
    • Type CreateUIAnalyticsEventSignature has been renamed to CreateUIAnalyticsEvent to match source code
    • Type UIAnalyticsEventHandlerSignature has been renamed to UIAnalyticsEventHandler to match source code
    • Type AnalyticsEventsPayload has been renamed to AnalyticsEventPayload
    • Type ObjectType has been removed, please use Record<string, any> or [key: string]: any
    • Type UIAnalyticsEventInterface has been removed, please use UIAnalyticsEvent
    • Type AnalyticsEventInterface has been removed, please use AnalyticsEvent
    • Type CreateAndFireEventFunction removed and should now be inferred by TypeScript
    • Type AnalyticsEventUpdater removed and should now be inferred by TypeScript

9.11.6

9.11.5

Patch Changes

  • [patch]688f2957ca:

    Fixes various TypeScript errors which were previously failing silently

9.11.4

Patch Changes

  • [patch]6874801bc0:

    ED-7314 Added test helpers for comparing selections. Includes new builders for gap cursors.

9.11.3

9.11.2

Patch Changes

  • [patch]0bb88234e6:

    Upgrade prosemirror-view to 1.9.12

9.11.1

Patch Changes

  • [patch]ec8066a555:

    Upgrade @types/prosemirror-view Typescript definitions to latest 1.9.x API

9.11.0

Minor Changes

9.10.1

Patch Changes

  • [patch]9f8ab1084b:

    Consume analytics-next ts type definitions as an ambient declaration.

9.10.0

Minor Changes

  • [minor]c0ba9ee289:

    set viewMediaClientConfig when properties change in MediaSingle node

    This fixes [ED-7269] + [FEF-8938]: issue with images not loading when the page transition from view to edit mode

9.9.4

Patch Changes

  • [patch]bbff8a7d87:

    Fixes bug, missing version.json file

9.9.3

Patch Changes

  • [patch]18dfac7332:

    In this PR, we are:

    • Re-introducing dist build folders
    • Adding back cjs
    • Replacing es5 by cjs and es2015 by esm
    • Creating folders at the root for entry-points
    • Removing the generation of the entry-points at the root Please see this ticket or this page for further details

9.9.2

Patch Changes

9.9.1

Patch Changes

  • [patch]13ca42c394:

    use getAuthFromContext from media when a file if pasted from a different collection

    Now products can provide auth using getAuthFromContext on MediaClientConfig:

    import {MediaClientConfig} from '@kalamazoo/media-core'
    import Editor from '@kalamazoo/editor-core'
    
    const viewMediaClientConfig: MediaClientConfig = {
      authProvider // already exists
      getAuthFromContext(contextId: string) {
        // here products can return auth for external pages.
        // in case of copy & paste on Confluence, they can provide read token for
        // files on the source collection
      }
    }
    const mediaProvider: = {
      viewMediaClientConfig
    }
    
    <Editor {...otherNonRelatedProps} media={{provider: mediaProvider}} />

9.9.0

Minor Changes

  • [minor]f60618b0f0:

    ED-5844 Adding media link UI to editor

9.8.0

Minor Changes

  • [minor]4a22a774a6:

    AUX-36 Add update support for extension handler

9.7.0

Minor Changes

  • [minor]d217a12e31:

    ED-7056: Update prosemirror-utils, this enables us to replace selected nodes while inserting ED-6668: Adds a selected ring to all extensions

9.6.0

Minor Changes

  • [minor]143dcb8704:

    ED-2362 Add keyboard shortcuts for headings and normal text

9.5.2

9.5.1

Patch Changes

  • [patch]4c0fcec857:

    ED-7059: fix trailing slashes for hyperlinks being removed, and smart links resolving

9.5.0

Minor Changes

  • [minor]d6c31deacf:

    ED-6701 Upgrade prosemirror-view to 1.9.10 and prosemirror-inputrules to 1.0.4 for composition input improvements

9.4.2

Patch Changes

  • [patch]bb64fcedcb:

    uploadContext and viewContext fields of MediaProvider (part of Editor and Renderer props) are deprecated. New fields uploadMediaClientConfig and viewMediaClientConfig should be used from now on.

9.4.1

9.4.0

Minor Changes

  • [minor]11a8112851:

    ED-6991 Fire analytics event for renderer started

    Set up analytics v3 in renderer

9.3.9

9.3.8

Patch Changes

  • [patch]9503b9d220:

    Bump prosemirror table to latest version where performance improvement applies, related to celsInRect helper

9.3.7

  • [patch]c59bd5d01e:

    ED-6349: fix external images (often via copy paste) not having correct dimensions

9.3.6

  • [patch]b567c44b93:

    ED-6986: put cursor after smart link insertion if skipping macro

9.3.5

  • [patch]b0ef06c685:

    • This is just a safety release in case anything strange happened in in the previous one. See Pull Request #5942 for details

9.3.4

  • [patch]9cbd059bfa:

    • Put media-editor into separate editor plugin, update @kalamazoo/media-editor API

    Breaking change for @kalamazoo/media-editor

    • Make onUploadStart, onFinish optional
    • Add new onClose callback for when the user closes the dialog (escape, cancel, error)
    • onFinish now only called when the upload itself finishes, not overloaded for other purposes

      • now also passes the FileIdentifier of the completed upload

    Editor changes

    Adds a new media-editor plugin that is enabled if the media plugin is enabled and allowAnnotation is enabled on the media prop.

    This replaces the implementation inside the existing media plugin. The new media-editor plugin is not dependent on the media plugin.

  • Updated dependencies 9ecfef12ac:

9.3.3

  • [patch]7eca61edf0:

    • ED-6965: bump prosemirror-utils to allow safeInsert replacing selected nodes when it conforms to schema

9.3.2

  • [patch]7ce86bae14:

    • Shift selection for rows and columns

9.3.1

  • [patch]ed02efdb94:

    • [ED-6817] Extract the current toggleHeader logic to prosemirror-table 0.8.0

9.3.0

  • [minor]79f0ef0601:

    • Use strict tsconfig to compile editor packages

9.2.0

  • [minor]dfc7aaa563:

    • ED-6863: Fix the rendering of extensions in the renderer when they have breakout layouts.

9.1.5

  • [patch]5ad66b6d1a:

    • [ED-6860] Revert prosemirror-view 1.8.9 bumps, this version was making the cursor typing slowly. this version is recreating all plugins when we use EditorView.setProps

9.1.4

9.1.3

9.1.2

9.1.1

  • [patch]652ef1e6be:

    • ED-6774: Adds a FF to priortize smart links resolution over Jira Issue Macro

9.1.0

  • [minor]5a49043dac:

    • Enable strictPropertyInitialization in tsconfig.base

9.0.1

  • [patch]80cf1c1e82:

    • [ED-6654] Update prosemirror-view to 1.8.9 that fixes a few issues with mouse selections on prosemirror like click on table and the controls doesn't show up

9.0.0

  • [major]7c17b35107:

    • Updates react and react-dom peer dependencies to react@^16.8.0 and react-dom@^16.8.0. To use this package, please ensure you use at least this version of react and react-dom.

8.0.8

8.0.7

8.0.6

  • [patch]5d9455978b:

    • ED-5292: add support for custom autoformatting

    You can now use the customAutoformatting prop to provide a custom autoformatting handler that replaces on particular regex strings.

    See (Editor RFC 131: Injectable auto-formatting rules, AutoformattingProvider)[https://product-fabric.atlassian.net/wiki/spaces/E/pages/881141566/Editor+RFC+131+Injectable+auto-formatting+rules+AutoformattingProvider] for more details on how this works.

    An example provider autoformattingProvider that is used in the storybook example is exported from the @kalamazoo/editor-test-helpers package. Try typing ED-123.

    A simplified provider might look like:

    export const autoformattingProvider: AutoformattingProvider = {
      getRules: () =>
        Promise.resolve({
          '[Ee][Dd]-(\\d+)': (match: string[]): Promise<ADFEntity> => {
            const ticketNumber = match[1];
            return new Promise.resolve({
              type: 'inlineCard',
              attrs: {
                url: 'https://www.atlassian.com/',
              },
            });
          },
        }),
    };

    At the moment, only text or inlineCard nodes are permitted to be replaced.

8.0.5

  • [patch]3f28e6443c:

    • @kalamazoo/analytics-next-types is deprecated. Now you can use types for @kalamazoo/analytics-next supplied from itself.

8.0.4

  • [patch]b425ea772b:

    • Revert "ED-5505 add strong as default mark to table header (pull request #5291)"

8.0.3

8.0.2

  • [patch]1bcaa1b991:

    • Add npmignore for index.ts to prevent some jest tests from resolving that instead of index.js

8.0.1

  • [patch]205b101e2b:

    • ED-6230: bump prosemirror-view to 1.8.3; workaround Chrome bug with copy paste multiple images

8.0.0

  • [major]9d5cc39394:

    • Dropped ES5 distributables from the typescript packages

7.0.6

7.0.5

7.0.4

  • [patch]60f0ad9a7e:

    • ED-6286: remove StateManager from media plugin and provider

7.0.3

  • [patch]7a8d8ba656:

    • ED-6452: Validate documents on init through collab-editing

    • Add unsupportedInline and unsupportedBlock to test-helpers.

7.0.2

7.0.1

7.0.0

  • [major]4af5bd2a58:

    • Remove linkCreateContext from MediaProvider

6.3.22

6.3.21

  • [patch]fa435d11f7:

    • ED-6155 Fire analytics v3 events for general editor UI events

6.3.20

  • [patch]09696170ec:

    • Bumps prosemirror-utils to 0.7.6

6.3.19

  • [patch]557a2b5734:

    • ED-5788: bump prosemirror-view and prosemirror-model

6.3.18

  • [patch]e5a98ed46b:

    • ED-6104: refactor createEditor to correctly call editorView.destroy() afterEach test

6.3.17

6.3.16

  • [patch]4552e804d3:

    • dismiss StatusPicker if status node is not selected

6.3.15

  • [patch]ccc39ca887:

    • ED-6094: add table CellSelection test helpers

6.3.14

6.3.13

6.3.12

6.3.11

6.3.10

  • [patch]8158fe0:

    • ED-6059: Extension and inlineExtension should read their content from attrs not the PMNode.

6.3.9

  • [patch]060f2da:

    • ED-5991: bumped prosemirror-view to 1.6.8

6.3.8

6.3.7

6.3.6

6.3.5

6.3.4

6.3.3

  • [patch]1205725:

    • Move schema to its own package

6.3.2

6.3.1

  • [patch]0a297ba:

    • Packages should not be shown in the navigation, search and overview

6.3.0

  • [minor]a1b03d0:

    • ED-3890 Adds Indentation support on paragraphs and headings

6.2.24

  • [patch]94094fe:

    • Adds support for links around images

6.2.23

6.2.22

6.2.21

6.2.20

  • [patch]a2cae0c:

    • Fix conversion of pasted urls via macroPlugin with html in clipboard (ED-5786)

6.2.19

6.2.18

  • [patch]16ff8d2:

    • Add jira card editor example.

6.2.17

  • [patch]14477fa:

    • Adding text alignment to editor and renderer

6.2.16

6.2.15

  • [patch]a9eb99f:

    • ED-5510: fix deleting last character in a cell in Safari

6.2.14

  • [patch]798cff1:

    • Adds an Import option in full-page example

6.2.13

6.2.12

6.2.11

6.2.10

  • [patch] ED-5439: add block smart cards, toolbar switcher 5f8bdfe

6.2.9

  • [patch] Wrap invalid node with unsupported node fb60e39

6.2.8

6.2.7

6.2.6

6.2.5

6.2.4

6.2.3

  • [patch] change grey to gray to keep consistent across editor pkgs 1b2a0b3

6.2.2

  • [patch] ED-5424: fix telepointers in collab editing 643a860

6.2.1

  • [patch] ED-5151 Editor i18n: Floating toolbars 403b547

6.2.0

  • [minor] FS-2893 - Creation use cases for full page actions and decisions c8aa5f5

6.1.3

  • [patch] ED-5150 Editor i18n: Main toolbar ef76f1f

6.1.2

6.1.1

  • [patch] ED-5346: prosemirror upgrade 5bd4432

6.1.0

  • [minor] FS-2961 Introduce status component and status node in editor 7fe2b0a

6.0.9

6.0.8

6.0.7

  • [patch] ED-4680 add smart card plugin, enable for inline smart cards b9529e6

6.0.6

6.0.5

6.0.4

  • [patch] Check current selected nodes before change node selection when interacting with extensions. ED-5199 bb15908

6.0.3

6.0.2

6.0.1

6.0.0

5.1.2

5.1.1

5.1.0

5.0.3

5.0.2

5.0.1

5.0.0

4.2.4

4.2.3

4.2.2

4.2.1

4.2.0

4.1.9

4.1.8

4.1.7

4.1.6

  • [patch] Introduce regression tests for pasting content from 3rd-party vendors into the editor. dispatchPasteEvent now returns the event that was fired when successful, to allow consumers to tell whether it was modified by ProseMirror. (ED-3726) e358e9f
  • [none] Updated dependencies e358e9f

4.1.5

4.1.4

4.1.3

4.1.2

4.1.1

4.1.0

4.0.7

4.0.6

4.0.5

4.0.4

4.0.3

4.0.2

4.0.1

4.0.0

3.1.9

  • [patch] Allow disabling smart-autocompletion (capitalising of Atlassian products, em-dash insert, smart-quotes) via prop textFormatting={{ disableSmartAutoCompletion: true }} cee7a4a
  • [none] Updated dependencies cee7a4a

3.1.8

3.1.7

  • [patch] Extensions should have text 64e32a2

3.1.6

  • [patch] Adding support for external images 9935105

3.1.5

  • [patch] ED-4431, selecting block extension creates a wrng selection. c078cf2

3.1.4

3.1.2

  • [patch] Handle pasting of page-layouts to prevent unpredictable node-splitting behaviour. Will now 'unwrap' the contents of a layout if the slice is a partial range across page layouts, or if we are attempting to paste a layout inside a layout. We now always handle dispatching the transaction to handle paste ourselves (instead of falling back to PM). f4ca7ac

3.1.0

  • [minor] Add a generic type ahead plugin 445c66b

3.0.8

  • [patch] ED-4294: fix editing bodiedExtension nodes 35d2648

3.0.7

  • [patch] fix deletion of lists and other elements placed after tables; bump prosemirror-commands to 1.0.7 162960f

3.0.4

  • [patch] Remove old chai reference which does not allow using editor-test-helpers in non-atlaskit TS packages ea627e4

3.0.3

  • [patch] Added missing dependencies and added lint rule to catch them all 0672503

3.0.1

  • [patch] change table node builder constructor for tests, remove tableWithAttrs cf43535

3.0.0

  • [major] CFE-1004: Rename anything "macro" to "extension" (i.e: MacroProvider to ExtensionProvider) 453aa52

2.1.1

  • [patch] ED-3476 add table breakout mode 7cd4dfa

2.0.14

  • [patch] Show upload button during recents load in media picker. + Inprove caching for auth provider used in examples 929731a

2.0.13

  • [patch] Upgrading ProseMirror Libs 35d14d5

2.0.12

  • [patch] Remove JSDOM warning in CI 309af83

2.0.9

  • [patch] CFE-846: Add support to extension handlers (lite version) 4ea9ffe

2.0.8

  • [patch] restrict nested bodiedExtensions 2583534

2.0.5

  • [patch] support __confluenceMetadata property on link mark b17f847

2.0.2

  • [patch] make colwidth an array of numbers in schema 369b522

2.0.0

  • [major] Remove linkCreateContext from default options and add userAuthProvider fc2ca7a

1.9.1

  • [patch] Enforce minimum version of w3c-keyname to be >= 1.1.8 dc120b9

1.9.0

  • [minor] add support for fab:adf and confluence decision list transforms e08eccc
  • [minor] add support for fab:adf and confluence decision list transforms f43f928
  • [minor] advanced features for tables e0bac20

1.8.11

  • [patch] Encode and decode for Extension schemaVersion 0335988

1.8.10

1.8.9

  • [patch] Fix issue with having multiple Dropzone elements listening at the same time with Editor and MediaPicker d37de20

1.8.8

  • [patch] Move media provider and state manager to editor-core 0601da7

1.8.7

  • [patch] bump editor-common to 6.1.2 bb7802e

1.8.6

  • [patch] Allow macro provider to handle auto conversion during paste b2c83f8

1.8.5

  • [patch] cket-transformer/tests/_schema-builder.ts a6e77ff

1.8.3

  • [patch] fix extension replacement with empty content e151446

1.8.1

  • [patch] Remove placeholderBaseUrl config option from the Confluence Macro Provider 1583960

1.8.0

  • [minor] added date plugin f7b8a33

1.7.0

  • [minor] Add React 16 support. 12ea6e4

1.6.1

  • [patch] Use media-test-helpers instead of hardcoded values f2b92f8

1.4.5

  • [patch] Add support for single image wrap left/right layout 59d9a74

1.4.0

  • [minor] Add Serializer for Single image 03405bf

1.3.0

  • [minor] FS-1461 added ContextIdentifierProvider interface to editor 0aeea41

1.2.6

  • [patch] Rename singleImage to mediaSingle. Replaced alignment and display attributes with layout. 0b97f0a

1.2.2

  • [patch] split extension node 4303d49

1.1.2

  • [patch] added extension node ec73cb8

1.1.0

0.8.1

  • [patch] Restore accessLevel attribute for mention node a83619f