@contentful/field-editor-reference 5.27.5 → 5.28.0

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.
@@ -20,11 +20,15 @@ _export(exports, {
20
20
  },
21
21
  published: function() {
22
22
  return _published_entryjson.default;
23
+ },
24
+ publishedAndChanged: function() {
25
+ return _published_and_changed_entryjson.default;
23
26
  }
24
27
  });
25
28
  const _changed_entryjson = _interop_require_default(require("./changed_entry.json"));
26
29
  const _empty_entryjson = _interop_require_default(require("./empty_entry.json"));
27
30
  const _invalid_entryjson = _interop_require_default(require("./invalid_entry.json"));
31
+ const _published_and_changed_entryjson = _interop_require_default(require("./published_and_changed_entry.json"));
28
32
  const _published_entryjson = _interop_require_default(require("./published_entry.json"));
29
33
  function _interop_require_default(obj) {
30
34
  return obj && obj.__esModule ? obj : {
@@ -74,7 +74,9 @@ const styles = {
74
74
  }),
75
75
  fileInformation: {
76
76
  menuItem: (0, _emotion.css)({
77
- opacity: 1
77
+ '&:disabled': {
78
+ opacity: 1
79
+ }
78
80
  }),
79
81
  dl: (0, _emotion.css)({
80
82
  backgroundColor: _f36tokens.default.gray100,
@@ -118,7 +120,8 @@ function renderAssetInfo(props) {
118
120
  _react.createElement(_f36components.Menu.Item, {
119
121
  key: "file-information",
120
122
  className: styles.fileInformation.menuItem,
121
- isDisabled: true
123
+ isDisabled: true,
124
+ disabled: true
122
125
  }, _react.createElement("dl", {
123
126
  className: styles.fileInformation.dl
124
127
  }, fileName && _react.createElement(_react.Fragment, null, _react.createElement("dt", null, "File Name:"), _react.createElement(_f36components.Text, {
@@ -96,7 +96,7 @@ function getFileType(file) {
96
96
  }
97
97
  const WrappedAssetCard = (props)=>{
98
98
  const { className, onEdit, getAssetUrl, onRemove, size, isDisabled, isSelected, isClickable } = props;
99
- const status = _fieldeditorshared.entityHelpers.getEntryStatus(props.asset.sys);
99
+ const status = _fieldeditorshared.entityHelpers.getEntryStatus(props.asset.sys, props.localeCode);
100
100
  if (status === 'deleted') {
101
101
  return _react.createElement(_components.MissingAssetCard, {
102
102
  asSquare: true,
@@ -69,7 +69,7 @@ const styles = {
69
69
  };
70
70
  const WrappedAssetLink = (props)=>{
71
71
  const { className, href, onEdit, onRemove, isDisabled } = props;
72
- const status = _fieldeditorshared.entityHelpers.getEntryStatus(props.asset.sys);
72
+ const status = _fieldeditorshared.entityHelpers.getEntryStatus(props.asset.sys, props.localeCode);
73
73
  if (status === 'deleted') {
74
74
  return _react.createElement(_components.MissingAssetCard, {
75
75
  isDisabled: props.isDisabled,
@@ -97,7 +97,7 @@ function WrappedEntryCard(props) {
97
97
  props.localeCode,
98
98
  props.defaultLocaleCode
99
99
  ]);
100
- const status = getEntryStatus(props.entry?.sys);
100
+ const status = getEntryStatus(props.entry?.sys, props.localeCode);
101
101
  if (status === 'deleted') {
102
102
  return _react.createElement(_components.MissingEntityCard, {
103
103
  isDisabled: props.isDisabled,
@@ -1,5 +1,6 @@
1
1
  import changed from './changed_entry.json';
2
2
  import empty from './empty_entry.json';
3
3
  import invalid from './invalid_entry.json';
4
+ import publishedAndChanged from './published_and_changed_entry.json';
4
5
  import published from './published_entry.json';
5
- export { changed, empty, published, invalid };
6
+ export { changed, empty, published, invalid, publishedAndChanged };
@@ -10,7 +10,9 @@ const styles = {
10
10
  }),
11
11
  fileInformation: {
12
12
  menuItem: css({
13
- opacity: 1
13
+ '&:disabled': {
14
+ opacity: 1
15
+ }
14
16
  }),
15
17
  dl: css({
16
18
  backgroundColor: tokens.gray100,
@@ -54,7 +56,8 @@ export function renderAssetInfo(props) {
54
56
  React.createElement(Menu.Item, {
55
57
  key: "file-information",
56
58
  className: styles.fileInformation.menuItem,
57
- isDisabled: true
59
+ isDisabled: true,
60
+ disabled: true
58
61
  }, React.createElement("dl", {
59
62
  className: styles.fileInformation.dl
60
63
  }, fileName && React.createElement(React.Fragment, null, React.createElement("dt", null, "File Name:"), React.createElement(Text, {
@@ -40,7 +40,7 @@ function getFileType(file) {
40
40
  }
41
41
  export const WrappedAssetCard = (props)=>{
42
42
  const { className, onEdit, getAssetUrl, onRemove, size, isDisabled, isSelected, isClickable } = props;
43
- const status = entityHelpers.getEntryStatus(props.asset.sys);
43
+ const status = entityHelpers.getEntryStatus(props.asset.sys, props.localeCode);
44
44
  if (status === 'deleted') {
45
45
  return React.createElement(MissingAssetCard, {
46
46
  asSquare: true,
@@ -13,7 +13,7 @@ const styles = {
13
13
  };
14
14
  export const WrappedAssetLink = (props)=>{
15
15
  const { className, href, onEdit, onRemove, isDisabled } = props;
16
- const status = entityHelpers.getEntryStatus(props.asset.sys);
16
+ const status = entityHelpers.getEntryStatus(props.asset.sys, props.localeCode);
17
17
  if (status === 'deleted') {
18
18
  return React.createElement(MissingAssetCard, {
19
19
  isDisabled: props.isDisabled,
@@ -41,7 +41,7 @@ export function WrappedEntryCard(props) {
41
41
  props.localeCode,
42
42
  props.defaultLocaleCode
43
43
  ]);
44
- const status = getEntryStatus(props.entry?.sys);
44
+ const status = getEntryStatus(props.entry?.sys, props.localeCode);
45
45
  if (status === 'deleted') {
46
46
  return React.createElement(MissingEntityCard, {
47
47
  isDisabled: props.isDisabled,
@@ -1,5 +1,6 @@
1
1
  import changed from './changed_entry.json';
2
2
  import empty from './empty_entry.json';
3
3
  import invalid from './invalid_entry.json';
4
+ import publishedAndChanged from './published_and_changed_entry.json';
4
5
  import published from './published_entry.json';
5
- export { changed, empty, published, invalid };
6
+ export { changed, empty, published, invalid, publishedAndChanged };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-reference",
3
- "version": "5.27.5",
3
+ "version": "5.28.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -38,7 +38,7 @@
38
38
  "@contentful/f36-components": "^4.60.0",
39
39
  "@contentful/f36-icons": "^4.27.0",
40
40
  "@contentful/f36-tokens": "^4.0.4",
41
- "@contentful/field-editor-shared": "^1.4.9",
41
+ "@contentful/field-editor-shared": "^1.5.0",
42
42
  "@contentful/mimetype": "^2.2.29",
43
43
  "@dnd-kit/core": "^6.0.8",
44
44
  "@dnd-kit/modifiers": "^6.0.1",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "registry": "https://npm.pkg.github.com/"
69
69
  },
70
- "gitHead": "29cf5fb16a8d61f6c23678dad618c61aceec320d"
70
+ "gitHead": "843655f104af6fb8c116869d59cd9f20e6f1ab14"
71
71
  }