@contentful/field-editor-shared 3.1.1-canary.0 → 3.1.1

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.
@@ -173,7 +173,7 @@ function getLocaleStatusObject(sys) {
173
173
  return sys.fieldStatus?.['*'];
174
174
  }
175
175
  function getEntityStatus(sys, localeCodes) {
176
- if (!sys || sys.type !== 'Entry' && sys.type !== 'Asset') {
176
+ if (!sys) {
177
177
  throw new TypeError('Invalid entity metadata object');
178
178
  }
179
179
  if (sys.deletedVersion) {
@@ -123,7 +123,7 @@ function getLocaleStatusObject(sys) {
123
123
  return sys.fieldStatus?.['*'];
124
124
  }
125
125
  export function getEntityStatus(sys, localeCodes) {
126
- if (!sys || sys.type !== 'Entry' && sys.type !== 'Asset') {
126
+ if (!sys) {
127
127
  throw new TypeError('Invalid entity metadata object');
128
128
  }
129
129
  if (sys.deletedVersion) {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { LocaleProps, EntryProps, AssetProps, ScheduledActionProps } from 'contentful-management';
3
3
  import { LocalePublishStatusMap } from '../hooks/useLocalePublishStatus';
4
4
  type LocalePublishingPopoverProps = {
5
- entity: EntryProps | AssetProps;
5
+ entity: Pick<EntryProps | AssetProps, 'sys'>;
6
6
  jobs: ScheduledActionProps[];
7
7
  isScheduled: boolean;
8
8
  activeLocales?: Pick<LocaleProps, 'code'>[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-shared",
3
- "version": "3.1.1-canary.0+a2a221d3",
3
+ "version": "3.1.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "registry": "https://npm.pkg.github.com/"
75
75
  },
76
- "gitHead": "a2a221d30b3b58b129d8511f01ba76008c565f9e"
76
+ "gitHead": "b4833085fd4ade2941f02110e34511a35634197a"
77
77
  }