@contentful/field-editor-shared 4.2.0 → 4.2.1-canary.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.
@@ -23,7 +23,12 @@ function normalizeReleaseLocaleFields(value) {
23
23
  if (Array.isArray(value)) {
24
24
  return value;
25
25
  }
26
- return value.fields?.['*'] ?? [];
26
+ if (value === '*') {
27
+ return [
28
+ '*'
29
+ ];
30
+ }
31
+ return value.fields['*'] ?? [];
27
32
  }
28
33
  function isEntryBasedAction(entityItem) {
29
34
  return 'action' in entityItem && (entityItem.action === 'publish' || entityItem.action === 'unpublish');
@@ -5,7 +5,12 @@ export function normalizeReleaseLocaleFields(value) {
5
5
  if (Array.isArray(value)) {
6
6
  return value;
7
7
  }
8
- return value.fields?.['*'] ?? [];
8
+ if (value === '*') {
9
+ return [
10
+ '*'
11
+ ];
12
+ }
13
+ return value.fields['*'] ?? [];
9
14
  }
10
15
  function isEntryBasedAction(entityItem) {
11
16
  return 'action' in entityItem && (entityItem.action === 'publish' || entityItem.action === 'unpublish');
@@ -23,7 +23,7 @@ export type ReleaseV2Entity = {
23
23
  };
24
24
  action: 'publish' | 'unpublish';
25
25
  };
26
- export type ReleaseV2LocaleFields = string[] | {
26
+ export type ReleaseV2LocaleFields = '*' | string[] | {
27
27
  fields: {
28
28
  '*': string[];
29
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-shared",
3
- "version": "4.2.0",
3
+ "version": "4.2.1-canary.2+44b7d839",
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": "857ff6c89d8a909d2c246c46a06c62592086d650"
76
+ "gitHead": "44b7d8391cd8708ef642a4d6a0458110fd5042ed"
77
77
  }