I am upgrading my @atlaskit/util-data-test' dependency to 17.0.1 from 15.0.1 and I am getting this error:

Module not found: Can't resolve '@atlaskit/util-data-test' in '/Table/TextEditor'

Text Editor File :

import { emoji } from "@atlaskit/util-data-test";
<Editor emojiProvider={emoji.storyData.getEmojiResource()}/>

Note : I have noticed that dependency structure is changed in version @atlaskit/[email protected]

Can someone suggest how to achive this thing with the latest version of @atlaskit/util-data-test?

2

There are 2 answers

1
megha rana On

Following changes worked for me:

import { getEmojiResource } from "@atlaskit/util-data-test/get-emoji-resource";
<Editor emojiProvider={getEmojiResource()}/>

0
MhkAsif On

emoji is not exported from "@atlaskit/util-data-test" look at this documentation, https://atlaskit.atlassian.com/packages/elements/emoji

The implementation is now different

import { getEmojiRepository } from '@atlaskit/util-data-test/get-emoji-repository';
import { Emoji } from '@atlaskit/emoji/element';

const emojiService = getEmojiRepository();
const wtf = emojiService.findByShortName(':wtf:');
  const wtfEmoji = wtf ? (
    <Emoji
      emoji={wtf}
      showTooltip={true}
      fitToHeight={fitToHeight}
      selected={true}
    />
...