@contentful/field-editor-reference 5.22.4 → 5.22.5

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.
@@ -10,17 +10,9 @@ Object.defineProperty(exports, "WrappedEntryCard", {
10
10
  });
11
11
  const _react = _interop_require_wildcard(require("react"));
12
12
  const _f36components = require("@contentful/f36-components");
13
- const _f36icons = require("@contentful/f36-icons");
14
- const _f36tokens = _interop_require_default(require("@contentful/f36-tokens"));
15
13
  const _fieldeditorshared = require("@contentful/field-editor-shared");
16
- const _emotion = require("emotion");
17
14
  const _components = require("../../components");
18
15
  const _SpaceName = require("../../components/SpaceName/SpaceName");
19
- function _interop_require_default(obj) {
20
- return obj && obj.__esModule ? obj : {
21
- default: obj
22
- };
23
- }
24
16
  function _getRequireWildcardCache(nodeInterop) {
25
17
  if (typeof WeakMap !== "function") return null;
26
18
  var cacheBabelInterop = new WeakMap();
@@ -63,11 +55,6 @@ function _interop_require_wildcard(obj, nodeInterop) {
63
55
  return newObj;
64
56
  }
65
57
  const { getEntryTitle, getEntityDescription, getEntryStatus, getEntryImage } = _fieldeditorshared.entityHelpers;
66
- const styles = {
67
- scheduleIcon: (0, _emotion.css)({
68
- marginRight: _f36tokens.default.spacing2Xs
69
- })
70
- };
71
58
  const defaultProps = {
72
59
  isClickable: true,
73
60
  hasCardEditActions: true,
@@ -125,8 +112,8 @@ function WrappedEntryCard(props) {
125
112
  description: description,
126
113
  contentType: contentType?.name,
127
114
  size: props.size,
128
- isSelected: props.isSelected,
129
115
  status: status,
116
+ isSelected: props.isSelected,
130
117
  icon: props.spaceName ? _react.createElement(_SpaceName.SpaceName, {
131
118
  spaceName: props.spaceName,
132
119
  environmentName: props.entry.sys.environment.sys.id
@@ -134,11 +121,9 @@ function WrappedEntryCard(props) {
134
121
  getEntityScheduledActions: props.getEntityScheduledActions,
135
122
  entityType: "Entry",
136
123
  entityId: props.entry.sys.id
137
- }, _react.createElement(_f36icons.ClockIcon, {
138
- className: styles.scheduleIcon,
139
- size: "small",
140
- variant: "muted",
141
- testId: "schedule-icon"
124
+ }, _react.createElement(_f36components.EntityStatusBadge, {
125
+ entityStatus: status,
126
+ isScheduled: true
142
127
  })),
143
128
  thumbnailElement: file && (0, _fieldeditorshared.isValidImage)(file) ? _react.createElement(_components.AssetThumbnail, {
144
129
  file: file
@@ -1,17 +1,9 @@
1
1
  import * as React from 'react';
2
- import { EntryCard, MenuItem, MenuDivider } from '@contentful/f36-components';
3
- import { ClockIcon } from '@contentful/f36-icons';
4
- import tokens from '@contentful/f36-tokens';
2
+ import { EntityStatusBadge, EntryCard, MenuDivider, MenuItem } from '@contentful/f36-components';
5
3
  import { entityHelpers, isValidImage } from '@contentful/field-editor-shared';
6
- import { css } from 'emotion';
7
4
  import { AssetThumbnail, MissingEntityCard, ScheduledIconWithTooltip } from '../../components';
8
5
  import { SpaceName } from '../../components/SpaceName/SpaceName';
9
6
  const { getEntryTitle, getEntityDescription, getEntryStatus, getEntryImage } = entityHelpers;
10
- const styles = {
11
- scheduleIcon: css({
12
- marginRight: tokens.spacing2Xs
13
- })
14
- };
15
7
  const defaultProps = {
16
8
  isClickable: true,
17
9
  hasCardEditActions: true,
@@ -69,8 +61,8 @@ export function WrappedEntryCard(props) {
69
61
  description: description,
70
62
  contentType: contentType?.name,
71
63
  size: props.size,
72
- isSelected: props.isSelected,
73
64
  status: status,
65
+ isSelected: props.isSelected,
74
66
  icon: props.spaceName ? React.createElement(SpaceName, {
75
67
  spaceName: props.spaceName,
76
68
  environmentName: props.entry.sys.environment.sys.id
@@ -78,11 +70,9 @@ export function WrappedEntryCard(props) {
78
70
  getEntityScheduledActions: props.getEntityScheduledActions,
79
71
  entityType: "Entry",
80
72
  entityId: props.entry.sys.id
81
- }, React.createElement(ClockIcon, {
82
- className: styles.scheduleIcon,
83
- size: "small",
84
- variant: "muted",
85
- testId: "schedule-icon"
73
+ }, React.createElement(EntityStatusBadge, {
74
+ entityStatus: status,
75
+ isScheduled: true
86
76
  })),
87
77
  thumbnailElement: file && isValidImage(file) ? React.createElement(AssetThumbnail, {
88
78
  file: file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-reference",
3
- "version": "5.22.4",
3
+ "version": "5.22.5",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "registry": "https://npm.pkg.github.com/"
69
69
  },
70
- "gitHead": "894934e9a2888aeb0a894cfebea3e034ba830f2a"
70
+ "gitHead": "10e398314c1fae1ec2b5a8552dd34bba410faf48"
71
71
  }