@contentful/field-editor-reference 5.22.5 → 5.22.6

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