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

Package detail

@kalamazoo/media-card

stevenselcuk52Apache-2.01.0.2TypeScript support: included

Includes all media card related components, CardView, CardViewSmall, Card...

readme

changelog

@kalamazoo/media-card

66.1.2

Patch Changes

66.1.1

Patch Changes

66.1.0

Minor Changes

  • [minor]c23ff56fb0:

    Introduced new optional prop testId that will be applied to data-testid prop on top DOM element of Card

Patch Changes

  • [patch]5b2c89203e:

    Fix linting errors from prettier upgrade

66.0.2

Patch Changes

  • [patch]d222c2b987:

    Theme has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided.

    Breaking

    ** getTokens props changes ** When defining the value function passed into a ThemeProvider, the getTokens parameter cannot be called without props; if no props are provided an empty object {} must be passed in:

    <CustomTheme.Provider
      value={t => ({ ...t(), backgroundColor: '#333'})}
    >

    becomes:

    <CustomTheme.Provider
      value={t => ({ ...t({}), backgroundColor: '#333'})}
    >

    ** Color palette changes ** Color palettes have been moved into their own file. Users will need to update imports from this:

    import { colors } from '@kalamazoo/theme';
    
    colors.colorPalette('8');

    to this:

    import { colorPalette } from '@kalamazoo/theme';
    
    colorPalette.colorPalette('8');

    or for multi entry-point users:

    import * as colors from '@kalamazoo/theme/colors';
    
    colors.colorPalette('8');

    to this:

    import * as colorPalettes from '@kalamazoo/theme/color-palette';
    
    colorPalettes.colorPalette('8');

66.0.1

Patch Changes

66.0.0

Major Changes

  • [major]c3e65f1b9e:

    Breaking change

    remove deprecated "context" property from media components in favor of "mediaClientConfig"

    This affects all public media UI components:

    • Card
    • Filmstrip
    • SmartMediaEditor
    • MediaImage
    • Dropzone
    • Clipboard
    • Browser
    • MediaPicker
    • MediaViewer

    Before:

    import {ContextFactory} from '@kalamazoo/media-core';
    import {Card} from '@kalamazoo/media-card'
    import {SmartMediaEditor} from '@kalamazoo/media-editor'
    import {Filmstrip} from '@kalamazoo/media-filmstrip'
    import {MediaImage} from '@kalamazoo/media-image'
    import {MediaViewer} from '@kalamazoo/media-viewer'
    import {Dropzone, Clipboard, Browser, MediaPicker} from '@kalamazoo/media-picker';
    
    const context = ContextFactory.creat({
      authProvider: () => Promise.resolve({})
    })
    
    const mediaPicker = MediaPicker(context);
    
    <Card context={context}>
    <SmartMediaEditor context={context}>
    <Filmstrip context={context}>
    <MediaImage context={context}>
    <Dropzone context={context}>
    <Clipboard context={context}>
    <Browser context={context}>
    <MediaViewer context={context}>

    Now:

    import {MediaClientConfig} from '@kalamazoo/media-core';
    import {Card} from '@kalamazoo/media-card'
    import {SmartMediaEditor} from '@kalamazoo/media-editor'
    import {Filmstrip} from '@kalamazoo/media-filmstrip'
    import {MediaImage} from '@kalamazoo/media-image'
    import {MediaViewer} from '@kalamazoo/media-viewer'
    import {Dropzone, Clipboard, Browser, MediaPicker} from '@kalamazoo/media-picker';

const mediaClientConfig: MediaClientConfig = { authProvider: () => Promise.resolve({}) }

const mediaPicker = MediaPicker(mediaClientConfig);

<Card mediaClientConfig={mediaClientConfig}> <SmartMediaEditor mediaClientConfig={mediaClientConfig}> <Filmstrip mediaClientConfig={mediaClientConfig}> <MediaImage mediaClientConfig={mediaClientConfig}> <Dropzone mediaClientConfig={mediaClientConfig}> <Clipboard mediaClientConfig={mediaClientConfig}> <Browser mediaClientConfig={mediaClientConfig}> <MediaViewer mediaClientConfig={mediaClientConfig}> ```

FABDODGEM-13 Editor Damask Release

BREAKING CHANGES


Affected Editor Components:

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

Editor

Mobile

Media

i18n-tools

Bumped dependencies.

Minor Changes

Emit media-viewed event through globalMediaEventEmitter when media is viewed, played or downloaded via media card or media viewer.- [minor]550d260bfc:

Introducing support for alt-text in media.

65.3.4

Patch Changes

check if selection.containsNode is available before using it to fix issue with IE11

65.3.3

Patch Changes

Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.

65.3.2

Patch Changes

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

65.3.1

Patch Changes

HOT-88731 don't send external image URL as a part of analytics

65.3.0

Minor Changes

Card now sends "copied file" on card copy event in editor and renderer- [minor]ab53f33dc5:

Adding operational events for media card component

65.2.1

65.2.0

Minor Changes

Add new "contextId?: string" property to Card, to retrieve auth from a given context

Patch Changes

Dont release file preview from Card when an external file is passed

65.1.1

Patch Changes

Update all the theme imports in media to use multi entry points

65.1.0

Minor Changes

Added Analytics events for Media Card Action, Dropdown Menu and Retry buttons

65.0.1

Patch Changes

Adding Error boundary in Media Card

65.0.0

Major Changes

Media card now emit analytics events which payload and context stuctures reflect GASv3 payload specification. Media Analytics Listener merges Payload and Context data before sending it to the backend. The merge is based on attributes.packageName equality Media Analytics Listener adds packageHierarchy attribute to merged payload, the same way Atlaskit Listener does.

64.2.1

Patch Changes

CEMS-244: Emit processed state when file gets copied

64.2.0

Minor Changes

Prefix the legacy lifecycle methods with UNSAFE_* to avoid warning in React 16.9+

More information about the deprecation of lifecycles methods can be found here: https://reactjs.org/blog/2018/03/29/react-v-16-3.html#component-lifecycle-changes

64.1.0

Minor Changes

Analytics Event will be fired when InlinePlayer is being clicked

64.0.2

Patch Changes

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

64.0.1

Patch Changes

Upgraded Typescript to 3.3.x

64.0.0

Major Changes

Property type was removed from CardViewAnalyticsContext interface File size won't be displayed if it was set to zero or not obtained

63.3.12

Patch Changes

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

63.3.11

63.3.10

Patch Changes

Adding try/catch in async imports for @kalamazoo/media-avatar-picker, @kalamazoo/media-card, @kalamazoo/media-editor, @kalamazoo/media-viewer

63.3.9

63.3.8

Patch Changes

Hide inline video player controls during inactivty

63.3.7

63.3.6

Patch Changes

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

63.3.5

Patch Changes

bugfix, fixes missing version.json file

63.3.4

Patch Changes

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

63.3.3

Patch Changes

TypeScript users of withAnalyticsEvents and withAnalyticsContext are now required to provide props as a generic type. This is so that TypeScript can correctly calculate the props and defaultProps of the returned component.

Before:

withAnalyticsEvents()(Button) as ComponentClass<Props>;

After:

withAnalyticsEvents<Props>()(Button);

63.3.2

63.3.1

63.3.0

Minor Changes

  • [minor]53b1e6a783:

    Add a download button to inline video player to allow download of video binary

63.2.0

Minor Changes

  • [minor]09f094a7a2:

    SL-259: bump react-lazily-render, remove react-lazily-render-scroll-parent.

63.1.5

63.1.4

Patch Changes

  • [patch]b37dd8dc38:

    Use video binary artifact while video is processing

63.1.3

Patch Changes

63.1.2

63.1.1

  • [patch]b0ef06c685:

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

63.1.0

63.0.4

  • [patch]b91590107b:

    • ED-6178 Fix media wrapper having a transparent background for images

63.0.3

  • [patch]a6f27f106a:

    • use componentDidMount in CardLoader to make it SSR hydrate friendly

63.0.2

63.0.1

  • [patch]cbc9ff5b6a:

    • Fix support for exif orientation when dropping a picture

63.0.0

62.0.0

61.0.0

60.0.6

  • [patch]d3cad2622e:

    • Removes babel-runtime in favour of @babel/runtime

60.0.5

  • [patch]8f17450f46:

    • Fix media-card code split from 82kB to 10kB

60.0.4

60.0.3

60.0.2

  • [patch]3f28e6443c:

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

60.0.1

60.0.0

  • [major]0ff405bd0f:

    • Removed CardView and CardViewLoader from public APIs and replaced it with light-weight and stateless CardLoading and CardError components. Handling of external images is now done by Card component itself using ExternalImageIdentifier interface.

    If you’ve been using CardView for loading:

    <CardView status="loading" mediaItemType="file" dimensions={cardDimensions} />

    Now you can use new component:

    <CardLoading dimensions={cardDimensions} />

    If you were using CardView to show an error

    <CardView status="error" mediaItemType={type} dimensions={cardDimensions} />

    Now you can use new component:

    <CardError dimensions={cardDimensions} />

    In case you were using CardView to show image with known external URI:

    <CardView status="complete" dataURI={dataURI} metadata={metadata} />

    You will have to find a way to switch to using Card component using ExternalImageIdentifier interface:

    <Card identifier={identifier} context={context} />

59.1.1

  • [patch]d13fad66df:

    • Enable esModuleInterop for typescript, this allows correct use of default exports

59.1.0

  • [minor]e1c1fa454a:

    • Support external image identifier in MediaViewer

59.0.0

58.0.1

  • [patch]106d046114:

    • Fix issue with media-viewer opening in CC on inline video player controlls clicked

58.0.0

  • [major]9c316bd8aa:

    • Exported MediaImage component is removed from media-card and moved to @kalamazoo/media-ui

57.0.3

  • [patch]d402fdb775:

    • FIX ED-6584: Keep card dataURI regardless of previus state

57.0.2

  • [patch]1bcaa1b991:

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

57.0.1

  • [patch]9192df506a:

    • Do not call given onClick if it's a video file and inline video player is enabled

57.0.0

56.0.0

55.0.4

  • [patch]ff3f40bc38:

    • Fix remove from cache function, which fixes issue when user is deleting recent image in media picker

55.0.3

  • [patch]3591859b2f:

    • use ReactDOM.createPortal to render MediaViewer when shouldOpenMediaViewer=true

55.0.2

55.0.1

55.0.0

54.1.0

  • [minor]eda74c4dce:

    • Add shouldOpenMediaViewer + mediaViewerDataSource optional props to Card api to simplify MediaViewer integration

54.0.0

53.0.0

  • [major]46dfcfbeca:

    • remove Link support from media-card

52.0.7

  • [patch]ab6ba14cd3:

    • Fix a bug where droping image with EXIF orientation >= 5 end up screwing up proportions for some of the cases

52.0.6

  • [patch]05c5bf7a93:

    • Dont user pointer cursor for external images in Cards

52.0.5

  • [patch]c415876da9:

    • add selected state to InlinePlayer in media-card

52.0.4

52.0.3

  • [patch]ef469cbb0b:

    • MS-357 replaced @kalamazoo/util-shared-styles from media components by @kalamazoo/theme

52.0.2

  • [patch]0e164e542a:

    • MS-1465: Dont fetch file preview if we already have a local one

52.0.1

  • [patch]1d3e336534:

    • Show progress bar while file is uploading

52.0.0

51.0.3

  • [patch]a3f8e527aa:

    • Take into account if image is on it's side according to orientation tag when deciding how to crop/fit and image

51.0.2

51.0.1

51.0.0

50.0.0

49.0.0

48.0.0

  • [minor]72d37fb:

    • Remove deprecated methods from media-core
    • Use context.collection methods in MediaViewer
    • Remove link support from media-card
    • Remove legacy services + providers from media-core
    • Remove link related methods from media-core
    • Remove axios dependency
    • Make context.getImage cancelable
  • Updated dependencies 72d37fb:

47.0.0

  • [major]135ed00:

    • remove "small" appearance from media-card

46.0.1

  • [patch]ca16fa9:

    • Add SSR support to media components

46.0.0

45.0.0

44.2.0

  • [minor]34369e4:

    • ED-5888 Add dark mode for media-card

44.1.4

  • [patch]6f44079:

    • ED-5612: make image preview display correctly after replacing Card props

44.1.3

44.1.2

  • [patch]676257b:

    • Prepare/fix card to be displayed as video inline player in renderer/editor contexts

44.1.1

  • [patch]5de3574:

    • CustomVideoPlayer is now CustomMediaPlayer and supports audio through type property. Media Viewer now uses custom audio player for audio everywhere except IE11.

44.1.0

  • [minor]c1ea81c:

    • use custom video player for inline video in media-card

44.0.2

44.0.1

44.0.0

43.0.0

42.0.0

  • [major]04c7192:

    • remove CardList component from media-card

41.4.0

  • [minor]abef80b:

    • ED-5527: apply max-width: 100% and pass container size to Card as dimension

41.3.0

  • [minor]4718333:

    • Add play icon for video files in MediaCard

41.2.0

41.1.2

41.1.1

  • [patch] Override css rules for an image inside a cart 20a15ef

41.1.0

  • [minor] Cleanup media + editor integration 🔥 2f9d14d

41.0.2

  • [patch] Make image in the card non-draggable 615a536

41.0.1

  • [patch] User img tag in cards instead of div with background 22ae8bb

41.0.0

40.0.1

  • [patch] Code split media list d101ce1

40.0.0

  • [major] Remove support for ApplicationCard 6e510d8

39.0.1

  • [patch] Fix bug with download binary 71ebe0b

39.0.0

38.0.1

  • [patch] Add pagination to recents view in MediaPicker 4b3c1f5

38.0.0

  • [patch] Deprecate context.uploadFile & context.getFile. Instead context.file.upload & context.file.getFileState should be used; media-store's uploadFile function now takes MediaStore as a second argument, not MediaApiConfig 8b2c4d3
  • [patch] Deprecate context.uploadFile & context.getFile. Instead context.file.upload & context.file.getFileState should be used; media-store's uploadFile function now takes MediaStore as a second argument, not MediaApiConfig 3302d51
  • [major] Updated dependencies 8b2c4d3
  • [major] Updated dependencies 3302d51

37.0.1

37.0.0

  • [major] Add I18n support to media-card dae7792

36.1.1

  • [patch] Fix rxjs imports to only import what's needed 2e0ce2b

36.1.0

  • [minor] Support external image identifiers in media-card 82c8bb9

36.0.0

35.0.0

  • [major] Fix CardView code split + remove private components from public api 1be4bb8

34.1.0

  • [minor] Async load media-card modules by default 01416b4

34.0.4

  • [patch] Refetch image when the dimensions change a0475c2

34.0.3

  • [patch] Revert fix for MS-667 43e601f

34.0.2

  • [patch] use new tsconfig for typechecking 09df171

34.0.1

  • [patch] Media-card now re-fetches the underlaying image when the dimensions prop changes 59fb6a4

34.0.0

33.0.2

33.0.1

  • [patch] use media tsconfig in media-card 3417d76

33.0.0

32.0.6

32.0.5

32.0.4

32.0.3

32.0.2

32.0.1

32.0.0

31.3.0

  • [minor] change file image cards background color to transparent 59ccb09

31.2.1

31.2.0

  • [minor] expose smart Filmstrip from media-filmstrip 7fa84a2

31.1.1

31.1.0

31.0.0

30.0.1

30.0.0

29.1.11

29.1.10

29.1.9

  • [patch] Render empty component in CardList when there are no items in the collection 9a1b6a2

29.1.8

29.1.7

29.1.6

  • [patch] Bitbucket images were displaying at 100% of the container, and not respect max-width of the image. ED-4946 370c812

29.1.5

29.1.4

29.1.3

29.1.2

29.1.1

29.1.0

29.0.3

29.0.2

29.0.1

29.0.0

28.0.6

28.0.5

28.0.4

28.0.3

  • [patch] Fix Card's defaultProps TS type 527bc9c

28.0.2

  • [patch] Remove card's "shown" analytics event 7877ce6

28.0.1

28.0.0

27.1.4

27.1.3

27.1.2

27.1.0

  • [minor] Added "disableOverlay" prop to Card and CardView public API 533d085

27.0.4

  • [patch] hide link items from CardList (Sidebard) dd2c7e7

27.0.3

  • [patch] Turn side effects to true due to rxjs operators imports 668f01c
  • [patch] Turn side effects to true due to rxjs operators imports 5eddd49

27.0.2

  • [patch] remove polished dependency 0e54c69

26.0.1

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

26.0.0

  • [major] Bump to React 16.3. 4251858

25.2.0

  • [minor] use local preview in MediaCard when available b33788b

25.1.6

  • [patch] Fix typo and potential memory leak 6ecc601

25.1.5

  • [patch] Add "sideEffects: false" to AKM2 packages to allow consumer's to tree-shake c3b018a

25.1.3

  • [patch] Fix/revert TS TDs in analytics-next 1284d32

25.1.2

  • [patch] ED-4030 Don't reload Image cards again after upload is done 9aff937

25.1.0

  • [minor] Add analytics events for click and show actions of media-card 031d5da
  • [minor] Add analytics events for click and show actions of media-card b361185

25.0.0

  • [major] icons are now assignable to card actions, which will cause media cards to render upto 2 icon buttons, or a dropdown menu if more than 2 actions are set 649871c

24.1.6

  • [patch] added a cursor to application cards when the onClick property is passed 97cb9c2

24.1.5

  • [patch] Remove TS types that requires styled-components v3 836e53b

24.1.3

  • [patch] Add key as an optional parameter to applicationCard actions 28be081

24.1.2

  • [patch] fix issues with ellipsing of new smart-card designs ec2bed9

24.1.0

  • [minor] Update styled-components dependency to support versions 1.4.6 - 3 ceccf30

24.0.6

  • [patch] Introduce media-ui package 39579e2

24.0.5

  • [patch] fix new smart-card design which is showing the dropdown below consecutive smart-cards 5574b67
  • [patch] fix issue with smart-card dropdown being hidden behind successive cards in new designs ff01687

24.0.4

24.0.3

  • [patch] fixed issue where clicking on smart-card try-again and cancel links would trigger onClick 1e575b3

24.0.2

  • [patch] added missing smart-card action states 3f7536e

23.2.2

  • [patch] Migrate Navigation from Ak repo to ak mk 2 repo, Fixed flow typing inconsistencies in ak mk 2 bdeef5b

23.2.1

  • [patch] added an offset to load lazily loaded cards earlier d1d891c

23.2.0

  • [minor] Add React 16 support. 12ea6e4

23.1.1

  • [patch] Update dependencies 623f8ca

23.1.0

  • [minor] Added new AppCardView v1.5 designs behind a feature flag. 92bc6c8

23.0.2

  • [patch] Make Card to work with pixel units dedba4f

23.0.1

  • [patch] Make Card to work properly with pixel units 69c6443
  • [patch] Dont use default dimensions for link cards ae94181

23.0.0

  • [major] Bump media-core peer dependency to next major versoin (12) 0a84f90

22.4.2

  • [patch] fix z-index issue for app cards d2e05ae

22.4.1

  • [patch] Use default dimensions in CardView when dimensions are not provided d07f3f8

22.4.0

  • [minor] make Card and CardView to work properly when percetanges are passed as dimensions 3178808

22.3.0

  • [minor] Update signature onClick event on filmstrip (renderer) 30bdfcc
  • [minor] Update signature onClick event on filmstrip (renderer) dbced25
  • [minor] Update signature onClick event on filmstrip (renderer) 7ee4743

22.2.7

  • [patch] fix lazy-loading of cards when scrolling up 868505d

22.2.6

  • [patch] Show static images for gifs in small cards e2508f9
  • [patch] Show static images for gifs in small cards e2508f9

22.2.5

  • [patch] Fixed hover state for link media-cards in renderer 05ae05d

22.2.3

  • [patch] Bumping dependency on docs (from a failed build) 6949056

22.2.1

  • [patch] Migrated to the new repo and updated dependencies f76434e

2.1.1 (2017-09-18)

  • bug fix; update media-core and media-test-helpers version (00108cf)

2.1.0 (2017-08-11)

  • feature; bump :allthethings: (f4b1375)

2.0.1 (2017-07-25)

  • fix; use class transform in loose mode in babel to improve load performance in apps (fde719a)

1.0.0 (2017-06-07)

  • feature; fix imgSrc property (d2274ce)
  • feature; mediaImage component skeleton (5dd2f84)