@contentful/field-editor-shared 2.3.0 → 2.3.2

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.
@@ -98,10 +98,12 @@ describe('useLocalePublishStatus', ()=>{
98
98
  linkType: 'ContentType',
99
99
  id: 'content-type'
100
100
  }
101
- },
102
- automationTags: []
101
+ }
103
102
  },
104
- fields: {}
103
+ fields: {
104
+ title: {},
105
+ file: {}
106
+ }
105
107
  };
106
108
  const { result } = (0, _reacthooks.renderHook)(()=>(0, _useLocalePublishStatus.useLocalePublishStatus)(entity, localesAPI));
107
109
  expect(result.current).toEqual(new Map([
@@ -94,10 +94,12 @@ describe('useLocalePublishStatus', ()=>{
94
94
  linkType: 'ContentType',
95
95
  id: 'content-type'
96
96
  }
97
- },
98
- automationTags: []
97
+ }
99
98
  },
100
- fields: {}
99
+ fields: {
100
+ title: {},
101
+ file: {}
102
+ }
101
103
  };
102
104
  const { result } = renderHook(()=>useLocalePublishStatus(entity, localesAPI));
103
105
  expect(result.current).toEqual(new Map([
@@ -55,13 +55,8 @@ export declare function getEntryTitle({ entry, contentType, localeCode, defaultL
55
55
  defaultLocaleCode: string;
56
56
  defaultTitle: string;
57
57
  }): string;
58
- type AsyncPublishStatus = 'draft' | 'published' | 'changed';
59
- type FieldStatus = {
60
- '*': Record<string, AsyncPublishStatus>;
61
- };
62
- export type EntitySys = (Entry['sys'] | Asset['sys']) & {
63
- fieldStatus?: FieldStatus;
64
- };
58
+ type FieldStatus = 'draft' | 'published' | 'changed';
59
+ export type EntitySys = Entry['sys'] | Asset['sys'];
65
60
  /**
66
61
  * Returns the status of the entry/asset
67
62
  * If a locale code(s) is provided it will pick up the most advanced state for these locale(s)
@@ -72,11 +67,9 @@ export type EntitySys = (Entry['sys'] | Asset['sys']) & {
72
67
  * - published
73
68
  * - draft
74
69
  */
75
- export declare function getEntityStatus(sys: EntitySys, localeCodes?: string | string[]): AsyncPublishStatus | "deleted" | "archived";
70
+ export declare function getEntityStatus(sys: EntitySys, localeCodes?: string | string[]): FieldStatus | "deleted" | "archived";
76
71
  /**@deprecated use `getEntityStatus` */
77
- export declare function getEntryStatus(sys: Entry['sys'] & {
78
- fieldStatus?: FieldStatus;
79
- }, localeCodes?: string | string[]): AsyncPublishStatus | "deleted" | "archived";
72
+ export declare function getEntryStatus(sys: Entry['sys'], localeCodes?: string | string[]): FieldStatus | "deleted" | "archived";
80
73
  /**
81
74
  * Gets a promise resolving with a localized asset image field representing a
82
75
  * given entities file. The promise may resolve with null.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-shared",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -43,7 +43,7 @@
43
43
  "@contentful/f36-components": "^4.70.0",
44
44
  "@contentful/f36-note": "^4.70.0",
45
45
  "@contentful/f36-tokens": "^4.0.5",
46
- "contentful-management": "^11.35.1",
46
+ "contentful-management": "^11.45.1",
47
47
  "emotion": "^10.0.17",
48
48
  "fast-deep-equal": "^3.1.3",
49
49
  "lodash": "^4.17.15"
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "registry": "https://npm.pkg.github.com/"
57
57
  },
58
- "gitHead": "5744bed7b566437cb831312e84af7444b9047b69"
58
+ "gitHead": "818d5f85db9f0d8db39fc41a6019efb958c7b513"
59
59
  }